From b65093d2eea42f0fae005129b53a16e2684319ae Mon Sep 17 00:00:00 2001 From: mrholek Date: Tue, 2 Jan 2024 19:54:22 +0100 Subject: [PATCH 01/93] release: v5.0.0-rc.1 --- README.md | 2 +- lerna.json | 2 +- packages/coreui-vue/package.json | 2 +- .../components/conditional-teleport/CConditionalTeleport.ts | 2 +- packages/coreui-vue/src/components/dropdown/CDropdown.ts | 4 ++-- .../coreui-vue/src/components/dropdown/CDropdownToggle.ts | 2 +- packages/coreui-vue/src/components/modal/CModal.ts | 2 +- packages/coreui-vue/src/components/popover/CPopover.ts | 2 +- packages/coreui-vue/src/components/progress/CProgress.ts | 2 +- packages/coreui-vue/src/components/tooltip/CTooltip.ts | 2 +- .../docs/api/conditional-teleport/CConditionalTeleport.api.md | 2 +- packages/docs/api/dropdown/CDropdown.api.md | 4 ++-- packages/docs/api/dropdown/CDropdownToggle.api.md | 2 +- packages/docs/api/modal/CModal.api.md | 2 +- packages/docs/api/popover/CPopover.api.md | 2 +- packages/docs/api/progress/CProgress.api.md | 2 +- packages/docs/api/tooltip/CTooltip.api.md | 2 +- packages/docs/package.json | 2 +- 18 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index daccefe7..e57961c8 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Several quick start options are available: -- [Download the latest release](https://github.com/coreui/coreui-vue/archive/v5.0.0-rc.0.zip) +- [Download the latest release](https://github.com/coreui/coreui-vue/archive/v5.0.0-rc.1.zip) - Clone the repo: `git clone https://github.com/coreui/coreui-vue.git` - Install with [npm](https://www.npmjs.com/): `npm install @coreui/vue` - Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/vue` diff --git a/lerna.json b/lerna.json index 7aa00b6e..fed1a749 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "npmClient": "yarn", "packages": ["packages/*"], - "version": "5.0.0-rc.0", + "version": "5.0.0-rc.1", "$schema": "node_modules/lerna/schemas/lerna-schema.json" } diff --git a/packages/coreui-vue/package.json b/packages/coreui-vue/package.json index d9495c62..21af3e3c 100644 --- a/packages/coreui-vue/package.json +++ b/packages/coreui-vue/package.json @@ -1,6 +1,6 @@ { "name": "@coreui/vue", - "version": "5.0.0-rc.0", + "version": "5.0.0-rc.1", "description": "UI Components Library for Vue.js", "keywords": [ "vue", diff --git a/packages/coreui-vue/src/components/conditional-teleport/CConditionalTeleport.ts b/packages/coreui-vue/src/components/conditional-teleport/CConditionalTeleport.ts index c380866a..22207486 100644 --- a/packages/coreui-vue/src/components/conditional-teleport/CConditionalTeleport.ts +++ b/packages/coreui-vue/src/components/conditional-teleport/CConditionalTeleport.ts @@ -16,7 +16,7 @@ const CConditionalTeleport = defineComponent({ /** * An HTML element or function that returns a single element, with `document.body` as the default. * - * @since v5.0.0-rc.0 + * @since v5.0.0-rc.1 */ container: { type: [Object, String] as PropType HTMLElement) | string>, diff --git a/packages/coreui-vue/src/components/dropdown/CDropdown.ts b/packages/coreui-vue/src/components/dropdown/CDropdown.ts index bf4dc8f3..b1eb9200 100644 --- a/packages/coreui-vue/src/components/dropdown/CDropdown.ts +++ b/packages/coreui-vue/src/components/dropdown/CDropdown.ts @@ -62,7 +62,7 @@ const CDropdown = defineComponent({ /** * Appends the vue dropdown menu to a specific element. You can pass an HTML element or function that returns a single element. By default `document.body`. * - * @since v5.0.0-rc.0 + * @since v5.0.0-rc.1 */ container: { type: [Object, String] as PropType HTMLElement) | string>, @@ -115,7 +115,7 @@ const CDropdown = defineComponent({ /** * Generates dropdown menu using Teleport. * - * @since v5.0.0-rc.0 + * @since v5.0.0-rc.1 */ teleport: { type: Boolean, diff --git a/packages/coreui-vue/src/components/dropdown/CDropdownToggle.ts b/packages/coreui-vue/src/components/dropdown/CDropdownToggle.ts index 55eec579..10b7f85a 100644 --- a/packages/coreui-vue/src/components/dropdown/CDropdownToggle.ts +++ b/packages/coreui-vue/src/components/dropdown/CDropdownToggle.ts @@ -49,7 +49,7 @@ const CDropdownToggle = defineComponent({ /** * If a dropdown `variant` is set to `nav-item` then render the toggler as a link instead of a button. * - * @since v5.0.0-rc.0 + * @since v5.0.0-rc.1 */ navLink: { type: Boolean, diff --git a/packages/coreui-vue/src/components/modal/CModal.ts b/packages/coreui-vue/src/components/modal/CModal.ts index af05a0ca..50a0a570 100644 --- a/packages/coreui-vue/src/components/modal/CModal.ts +++ b/packages/coreui-vue/src/components/modal/CModal.ts @@ -54,7 +54,7 @@ const CModal = defineComponent({ /** * Puts the focus on the modal when shown. * - * @since v5.0.0-rc.0 + * @since v5.0.0-rc.1 */ focus: { type: Boolean, diff --git a/packages/coreui-vue/src/components/popover/CPopover.ts b/packages/coreui-vue/src/components/popover/CPopover.ts index a173ba37..5dc24bfd 100644 --- a/packages/coreui-vue/src/components/popover/CPopover.ts +++ b/packages/coreui-vue/src/components/popover/CPopover.ts @@ -23,7 +23,7 @@ const CPopover = defineComponent({ /** * Appends the vue popover to a specific element. You can pass an HTML element or function that returns a single element. By default `document.body`. * - * @since v5.0.0-rc.0 + * @since v5.0.0-rc.1 */ container: { type: [Object, String] as PropType HTMLElement) | string>, diff --git a/packages/coreui-vue/src/components/progress/CProgress.ts b/packages/coreui-vue/src/components/progress/CProgress.ts index 82613fd0..ad67b183 100644 --- a/packages/coreui-vue/src/components/progress/CProgress.ts +++ b/packages/coreui-vue/src/components/progress/CProgress.ts @@ -23,7 +23,7 @@ const CProgress = defineComponent({ /** * A string of all className you want applied to the component. * - * @since 5.0.0-rc.0 + * @since 5.0.0-rc.1 */ progressBarClassName: String, /** diff --git a/packages/coreui-vue/src/components/tooltip/CTooltip.ts b/packages/coreui-vue/src/components/tooltip/CTooltip.ts index 1f26e1ed..1b0da318 100644 --- a/packages/coreui-vue/src/components/tooltip/CTooltip.ts +++ b/packages/coreui-vue/src/components/tooltip/CTooltip.ts @@ -23,7 +23,7 @@ const CTooltip = defineComponent({ /** * Appends the vue tooltip to a specific element. You can pass an HTML element or function that returns a single element. By default `document.body`. * - * @since v5.0.0-rc.0 + * @since v5.0.0-rc.1 */ container: { type: [Object, String] as PropType HTMLElement) | string>, diff --git a/packages/docs/api/conditional-teleport/CConditionalTeleport.api.md b/packages/docs/api/conditional-teleport/CConditionalTeleport.api.md index fd00e22d..b9dafcef 100644 --- a/packages/docs/api/conditional-teleport/CConditionalTeleport.api.md +++ b/packages/docs/api/conditional-teleport/CConditionalTeleport.api.md @@ -10,5 +10,5 @@ import CConditionalTeleport from '@coreui/vue/src/components/conditional-telepor | Prop name | Description | Type | Values | Default | | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | -------------------------------------------- | ------ | ------- | -| **container**
v5.0.0-rc.0+
| An HTML element or function that returns a single element, with `document.body` as the default. | HTMLElement \| (() => HTMLElement) \| string | - | 'body' | +| **container**
v5.0.0-rc.1+
| An HTML element or function that returns a single element, with `document.body` as the default. | HTMLElement \| (() => HTMLElement) \| string | - | 'body' | | **teleport** | Render some children into a different part of the DOM | boolean | - | true | diff --git a/packages/docs/api/dropdown/CDropdown.api.md b/packages/docs/api/dropdown/CDropdown.api.md index 1c053c79..76a88d7a 100644 --- a/packages/docs/api/dropdown/CDropdown.api.md +++ b/packages/docs/api/dropdown/CDropdown.api.md @@ -12,14 +12,14 @@ import CDropdown from '@coreui/vue/src/components/dropdown/CDropdown' | ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | | **alignment** | Set aligment of dropdown menu. | string \| Alignments | `{ 'start' \| 'end' \| { xs: 'start' \| 'end' } \| { sm: 'start' \| 'end' } \| { md: 'start' \| 'end' } \| { lg: 'start' \| 'end' } \| { xl: 'start' \| 'end'} \| { xxl: 'start' \| 'end'} }` | - | | **auto-close** | Configure the auto close behavior of the dropdown:
- `true` - the dropdown will be closed by clicking outside or inside the dropdown menu.
- `false` - the dropdown will be closed by clicking the toggle button and manually calling hide or toggle method. (Also will not be closed by pressing esc key)
- `'inside'` - the dropdown will be closed (only) by clicking inside the dropdown menu.
- `'outside'` - the dropdown will be closed (only) by clicking outside the dropdown menu. | boolean\|string | - | true | -| **container**
v5.0.0-rc.0+
| Appends the vue dropdown menu to a specific element. You can pass an HTML element or function that returns a single element. By default `document.body`. | HTMLElement \| (() => HTMLElement) \| string | - | 'body' | +| **container**
v5.0.0-rc.1+
| Appends the vue dropdown menu to a specific element. You can pass an HTML element or function that returns a single element. By default `document.body`. | HTMLElement \| (() => HTMLElement) \| string | - | 'body' | | **dark** | Sets a darker color scheme to match a dark navbar. | boolean | - | - | | **direction** | Sets a specified direction and location of the dropdown menu. | string | `'center'`, `'dropup'`, `'dropup-center'`, `'dropend'`, `'dropstart'` | - | | **disabled** | Toggle the disabled state for the component. | boolean | - | - | | **offset**
4.9.0+
| Offset of the dropdown menu relative to its target. | array | - | [0, 2] | | **placement** | Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property. | Placement | `'auto'`, `'top-end'`, `'top'`, `'top-start'`, `'bottom-end'`, `'bottom'`, `'bottom-start'`, `'right-start'`, `'right'`, `'right-end'`, `'left-start'`, `'left'`, `'left-end'` | 'bottom-start' | | **popper** | If you want to disable dynamic positioning set this property to `true`. | boolean | - | true | -| **teleport**
v5.0.0-rc.0+
| Generates dropdown menu using Teleport. | boolean | - | false | +| **teleport**
v5.0.0-rc.1+
| Generates dropdown menu using Teleport. | boolean | - | false | | **trigger** | Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them. | Triggers | - | 'click' | | **variant** | Set the dropdown variant to an btn-group, dropdown, input-group, and nav-item. | string | `'btn-group'`, `'dropdown'`, `'input-group'`, `'nav-item'` | 'btn-group' | | **visible** | Toggle the visibility of dropdown menu component. | boolean | - | - | diff --git a/packages/docs/api/dropdown/CDropdownToggle.api.md b/packages/docs/api/dropdown/CDropdownToggle.api.md index d56d845a..3c2a2479 100644 --- a/packages/docs/api/dropdown/CDropdownToggle.api.md +++ b/packages/docs/api/dropdown/CDropdownToggle.api.md @@ -15,7 +15,7 @@ import CDropdownToggle from '@coreui/vue/src/components/dropdown/CDropdownToggle | **caret** | Enables pseudo element caret on toggler. | boolean | - | true | | **custom** | Create a custom toggler which accepts any content. | boolean | - | - | | **disabled** | Toggle the disabled state for the component. | boolean | - | - | -| **nav-link**
v5.0.0-rc.0+
| If a dropdown `variant` is set to `nav-item` then render the toggler as a link instead of a button. | boolean | - | true | +| **nav-link**
v5.0.0-rc.1+
| If a dropdown `variant` is set to `nav-item` then render the toggler as a link instead of a button. | boolean | - | true | | **size** | Size the component small or large. | string | `'sm'`, `'lg'` | - | | **split** | Similarly, create split button dropdowns with virtually the same markup as single button dropdowns, but with the addition of `.dropdown-toggle-split` className for proper spacing around the dropdown caret. | boolean | - | - | | **trigger** | Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.
`@type` 'hover' \| 'focus' \| 'click' | Triggers | - | 'click' | diff --git a/packages/docs/api/modal/CModal.api.md b/packages/docs/api/modal/CModal.api.md index ce921a67..238935f9 100644 --- a/packages/docs/api/modal/CModal.api.md +++ b/packages/docs/api/modal/CModal.api.md @@ -13,7 +13,7 @@ import CModal from '@coreui/vue/src/components/modal/CModal' | **alignment** | Align the modal in the center or top of the screen. | string | `'top'`, `'center'` | 'top' | | **backdrop** | Apply a backdrop on body while offcanvas is open. | boolean\|string | `boolean \| 'static'` | true | | **content-class-name** | A string of all className you want applied to the modal content component. | string | - | - | -| **focus**
v5.0.0-rc.0+
| Puts the focus on the modal when shown. | boolean | - | true | +| **focus**
v5.0.0-rc.1+
| Puts the focus on the modal when shown. | boolean | - | true | | **fullscreen** | Set modal to covers the entire user viewport | boolean\|string | `boolean`, `'sm'`, `'md'`, `'lg'`, `'xl'`, `'xxl'` | - | | **keyboard** | Closes the modal when escape key is pressed. | boolean | - | true | | **scrollable** | Create a scrollable modal that allows scrolling the modal body. | boolean | - | - | diff --git a/packages/docs/api/popover/CPopover.api.md b/packages/docs/api/popover/CPopover.api.md index 69d234a4..bdcc1d81 100644 --- a/packages/docs/api/popover/CPopover.api.md +++ b/packages/docs/api/popover/CPopover.api.md @@ -11,7 +11,7 @@ import CPopover from '@coreui/vue/src/components/popover/CPopover' | Prop name | Description | Type | Values | Default | | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | ------------------------------- | ---------------------------------------- | | **animation**
4.9.0+
| Apply a CSS fade transition to the popover. | boolean | - | true | -| **container**
v5.0.0-rc.0+
| Appends the vue popover to a specific element. You can pass an HTML element or function that returns a single element. By default `document.body`. | HTMLElement \| (() => HTMLElement) \| string | - | 'body' | +| **container**
v5.0.0-rc.1+
| Appends the vue popover to a specific element. You can pass an HTML element or function that returns a single element. By default `document.body`. | HTMLElement \| (() => HTMLElement) \| string | - | 'body' | | **content** | Content for your component. If you want to pass non-string value please use dedicated slot `` | string | - | - | | **delay**
4.9.0+
| The delay for displaying and hiding the popover (in milliseconds). When a numerical value is provided, the delay applies to both the hide and show actions. The object structure for specifying the delay is as follows: delay: `{ 'show': 500, 'hide': 100 }`. | number \| { show: number; hide: number } | - | 0 | | **fallback-placements**
4.9.0+
| Specify the desired order of fallback placements by providing a list of placements as an array. The placements should be prioritized based on preference. | Placements \| Placements[] | - | () => ['top', 'right', 'bottom', 'left'] | diff --git a/packages/docs/api/progress/CProgress.api.md b/packages/docs/api/progress/CProgress.api.md index cd846ccb..cc4812ea 100644 --- a/packages/docs/api/progress/CProgress.api.md +++ b/packages/docs/api/progress/CProgress.api.md @@ -13,7 +13,7 @@ import CProgress from '@coreui/vue/src/components/progress/CProgress' | **animated** | Use to animate the stripes right to left via CSS3 animations. | boolean | - | - | | **color** | Sets the color context of the component to one of CoreUI’s themed colors. | string | `'primary'`, `'secondary'`, `'success'`, `'danger'`, `'warning'`, `'info'`, `'dark'`, `'light'` | - | | **height** | Sets the height of the component. If you set that value the inner `` will automatically resize accordingly. | number | - | - | -| **progress-bar-class-name**
5.0.0-rc.0+
| A string of all className you want applied to the component. | string | - | - | +| **progress-bar-class-name**
5.0.0-rc.1+
| A string of all className you want applied to the component. | string | - | - | | **thin** | Makes progress bar thinner. | boolean | - | - | | **value** | The percent to progress the ProgressBar. | number | - | 0 | | **variant** | Set the progress bar variant to optional striped. | string | `'striped'` | - | diff --git a/packages/docs/api/tooltip/CTooltip.api.md b/packages/docs/api/tooltip/CTooltip.api.md index 35ff42a9..4eb49c1a 100644 --- a/packages/docs/api/tooltip/CTooltip.api.md +++ b/packages/docs/api/tooltip/CTooltip.api.md @@ -11,7 +11,7 @@ import CTooltip from '@coreui/vue/src/components/tooltip/CTooltip' | Prop name | Description | Type | Values | Default | | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | ------------------------------- | ---------------------------------------- | | **animation**
4.9.0+
| Apply a CSS fade transition to the tooltip. | boolean | - | true | -| **container**
v5.0.0-rc.0+
| Appends the vue tooltip to a specific element. You can pass an HTML element or function that returns a single element. By default `document.body`. | HTMLElement \| (() => HTMLElement) \| string | - | 'body' | +| **container**
v5.0.0-rc.1+
| Appends the vue tooltip to a specific element. You can pass an HTML element or function that returns a single element. By default `document.body`. | HTMLElement \| (() => HTMLElement) \| string | - | 'body' | | **content** | Content for your component. If you want to pass non-string value please use dedicated slot `` | string | - | - | | **delay**
4.9.0+
| The delay for displaying and hiding the popover (in milliseconds). When a numerical value is provided, the delay applies to both the hide and show actions. The object structure for specifying the delay is as follows: delay: `{ 'show': 500, 'hide': 100 }`. | number \| { show: number; hide: number } | - | 0 | | **fallback-placements**
4.9.0+
| Specify the desired order of fallback placements by providing a list of placements as an array. The placements should be prioritized based on preference. | Placements \| Placements[] | - | () => ['top', 'right', 'bottom', 'left'] | diff --git a/packages/docs/package.json b/packages/docs/package.json index 5da9ef7d..d229be21 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -1,6 +1,6 @@ { "name": "@coreui/vue-docs", - "version": "5.0.0-rc.0", + "version": "5.0.0-rc.1", "scripts": { "api": "vue-docgen -c build/docgen.config.js", "dev": "vuepress dev --clean-cache", From 8ee8286c5a2e09d88b43fca7f466970351d28f55 Mon Sep 17 00:00:00 2001 From: mrholek Date: Fri, 5 Jan 2024 12:06:19 +0100 Subject: [PATCH 02/93] fix(COffcanvas): allow passing attributes like class and style to the component --- packages/coreui-vue/src/components/offcanvas/COffcanvas.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/coreui-vue/src/components/offcanvas/COffcanvas.ts b/packages/coreui-vue/src/components/offcanvas/COffcanvas.ts index aeef53aa..5377fa72 100644 --- a/packages/coreui-vue/src/components/offcanvas/COffcanvas.ts +++ b/packages/coreui-vue/src/components/offcanvas/COffcanvas.ts @@ -7,6 +7,7 @@ import { executeAfterTransition } from '../../utils/transition' const COffcanvas = defineComponent({ name: 'COffcanvas', + inheritAttrs: false, props: { /** * Apply a backdrop on body while offcanvas is open. @@ -94,7 +95,7 @@ const COffcanvas = defineComponent({ */ 'show', ], - setup(props, { slots, emit }) { + setup(props, { attrs, emit, slots }) { const offcanvasRef = ref() const visible = ref(props.visible) @@ -175,6 +176,7 @@ const COffcanvas = defineComponent({ h( 'div', { + ...attrs, class: [ { [`offcanvas${ @@ -182,6 +184,7 @@ const COffcanvas = defineComponent({ }`]: props.responsive, [`offcanvas-${props.placement}`]: props.placement, }, + attrs.class, ], onKeydown: (event: KeyboardEvent) => handleKeyDown(event), ref: offcanvasRef, From d573dcd223f2b87747b6a03432eb0b79ae6bb26a Mon Sep 17 00:00:00 2001 From: mrholek Date: Fri, 5 Jan 2024 12:32:41 +0100 Subject: [PATCH 03/93] docs: update content --- packages/docs/components/collapse.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docs/components/collapse.md b/packages/docs/components/collapse.md index 50d879bc..162b1a16 100644 --- a/packages/docs/components/collapse.md +++ b/packages/docs/components/collapse.md @@ -15,7 +15,7 @@ The collapse component is used to show and hide content. Buttons or anchors are You can use a link or a button component. ::: demo -Link +Link Button @@ -29,7 +29,7 @@ You can use a link or a button component. ::: ```vue - - -../../../../package.json \ No newline at end of file + \ No newline at end of file diff --git a/packages/docs/.vuepress/src/client/components/Header.vue b/packages/docs/.vuepress/src/client/components/Header.vue index ca3f0165..17ee1090 100644 --- a/packages/docs/.vuepress/src/client/components/Header.vue +++ b/packages/docs/.vuepress/src/client/components/Header.vue @@ -1,3 +1,12 @@ + - diff --git a/packages/docs/.vuepress/src/client/components/OtherFrameworks.vue b/packages/docs/.vuepress/src/client/components/OtherFrameworks.vue index f06b9959..b58ceed6 100644 --- a/packages/docs/.vuepress/src/client/components/OtherFrameworks.vue +++ b/packages/docs/.vuepress/src/client/components/OtherFrameworks.vue @@ -1,23 +1,3 @@ - -./other_frameworks.json \ No newline at end of file + + \ No newline at end of file diff --git a/packages/docs/.vuepress/src/client/components/ScssDocs.vue b/packages/docs/.vuepress/src/client/components/ScssDocs.vue index ba8b8fe6..61a93fee 100644 --- a/packages/docs/.vuepress/src/client/components/ScssDocs.vue +++ b/packages/docs/.vuepress/src/client/components/ScssDocs.vue @@ -1,50 +1,44 @@ - - - + + diff --git a/packages/docs/.vuepress/src/client/components/Sidebar.vue b/packages/docs/.vuepress/src/client/components/Sidebar.vue index 6ad736e2..d05ff18f 100755 --- a/packages/docs/.vuepress/src/client/components/Sidebar.vue +++ b/packages/docs/.vuepress/src/client/components/Sidebar.vue @@ -1,3 +1,10 @@ + + - - diff --git a/packages/docs/.vuepress/src/client/components/Toc.vue b/packages/docs/.vuepress/src/client/components/Toc.vue index bcb036d1..074ca917 100644 --- a/packages/docs/.vuepress/src/client/components/Toc.vue +++ b/packages/docs/.vuepress/src/client/components/Toc.vue @@ -1,3 +1,11 @@ + + - diff --git a/packages/docs/.vuepress/src/client/layouts/404.vue b/packages/docs/.vuepress/src/client/layouts/404.vue index 1066e78c..b8315905 100755 --- a/packages/docs/.vuepress/src/client/layouts/404.vue +++ b/packages/docs/.vuepress/src/client/layouts/404.vue @@ -1,3 +1,17 @@ + + - - diff --git a/packages/docs/.vuepress/src/client/layouts/Layout.vue b/packages/docs/.vuepress/src/client/layouts/Layout.vue index 672cf9be..75d6da70 100755 --- a/packages/docs/.vuepress/src/client/layouts/Layout.vue +++ b/packages/docs/.vuepress/src/client/layouts/Layout.vue @@ -1,41 +1,3 @@ - - + + diff --git a/packages/docs/.vuepress/src/node/defaultTheme.ts b/packages/docs/.vuepress/src/node/defaultTheme.ts index 0886fd22..0fe8ca5f 100755 --- a/packages/docs/.vuepress/src/node/defaultTheme.ts +++ b/packages/docs/.vuepress/src/node/defaultTheme.ts @@ -1,10 +1,12 @@ import type { Page, Theme } from '@vuepress/core' -import { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links' -import { backToTopPlugin } from '@vuepress/plugin-back-to-top' -import { prismjsPlugin } from '@vuepress/plugin-prismjs' + import { themeDataPlugin } from '@vuepress/plugin-theme-data' import { fs, getDirname, path } from '@vuepress/utils' -import type { DefaultThemeLocaleOptions, DefaultThemePluginsOptions } from '../shared' +import type { + DefaultThemeLocaleOptions, + DefaultThemePageData, + DefaultThemePluginsOptions, +} from '../shared' import { assignDefaultLocaleOptions } from './utils' const __dirname = getDirname(import.meta.url) @@ -25,17 +27,7 @@ export const defaultTheme = ({ return { name: '@vuepress/coreui-docs-theme', - templateBuild: path.resolve(__dirname, '../../templates/build.html'), - - alias: { - // use alias to make all components replaceable - ...Object.fromEntries( - fs - .readdirSync(path.resolve(__dirname, '../client/components')) - .filter((file) => file.endsWith('.vue')) - .map((file) => [`@theme/${file}`, path.resolve(__dirname, '../client/components', file)]), - ), - }, + templateBuild: path.resolve(__dirname, '../templates/build.html'), clientConfigFile: path.resolve(__dirname, '../client/config.ts'), @@ -46,44 +38,6 @@ export const defaultTheme = ({ page.routeMeta.title = page.title }, - // layouts: path.resolve(__dirname, '../client/layouts'), - - // clientAppEnhanceFiles: path.resolve(__dirname, '../client/clientAppEnhance.ts'), - - // clientAppSetupFiles: path.resolve(__dirname, '../client/clientAppSetup.ts'), - - // // use the relative file path to generate edit link - // extendsPageData: ({ filePathRelative }) => ({ filePathRelative }), - - plugins: [ - // @vuepress/plugin-active-header-link - themePlugins.activeHeaderLinks !== false - ? activeHeaderLinksPlugin({ - headerLinkSelector: 'a.sidebar-item', - headerAnchorSelector: '.header-anchor', - // should greater than page transition duration - delay: 300, - }) - : [], - - // @vuepress/plugin-back-to-top - themePlugins.backToTop !== false ? backToTopPlugin() : [], - - // @vuepress/plugin-prismjs - themePlugins.prismjs !== false ? prismjsPlugin() : [], - - // @vuepress/plugin-theme-data - themeDataPlugin({ themeData: localeOptions }), - // [ - // '@vuepress/active-header-links', - // { - // headerLinkSelector: 'a.sidebar-item', - // headerAnchorSelector: '.anchor-link', - // }, - // ], - // ['@vuepress/back-to-top', themePlugins.backToTop !== false], - // ['@vuepress/prismjs', themePlugins.prismjs !== false], - // ['@vuepress/theme-data', { themeData: localeOptions }], - ], + plugins: [themeDataPlugin({ themeData: localeOptions })], } } diff --git a/packages/docs/.vuepress/src/shared/page.ts b/packages/docs/.vuepress/src/shared/page.ts index 7e3bcdf5..64e5fe99 100755 --- a/packages/docs/.vuepress/src/shared/page.ts +++ b/packages/docs/.vuepress/src/shared/page.ts @@ -10,30 +10,11 @@ export interface DefaultThemePageFrontmatter { navbar?: boolean pageClass?: string name?: string + pro_component?: boolean + other_frameworks?: string } -export interface DefaultThemeHomePageFrontmatter - extends DefaultThemePageFrontmatter { - home: true - heroImage?: string - heroAlt?: string - heroText?: string | null - tagline?: string | null - actions?: { - text: string - link: string - type?: 'primary' | 'secondary' - }[] - features?: { - title: string - details: string - }[] - footer?: string - footerHtml?: boolean -} - -export interface DefaultThemeNormalPageFrontmatter - extends DefaultThemePageFrontmatter { +export interface DefaultThemeNormalPageFrontmatter extends DefaultThemePageFrontmatter { home?: false editLink?: boolean lastUpdated?: boolean @@ -42,6 +23,4 @@ export interface DefaultThemeNormalPageFrontmatter sidebarDepth?: number prev?: string | NavLink next?: string | NavLink - pro_component: boolean - other_frameworks?: string } diff --git a/packages/docs/.vuepress/templates/build.html b/packages/docs/.vuepress/src/templates/build.html similarity index 100% rename from packages/docs/.vuepress/templates/build.html rename to packages/docs/.vuepress/src/templates/build.html diff --git a/packages/docs/package.json b/packages/docs/package.json index cd89b42f..ef5215fd 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -4,7 +4,7 @@ "scripts": { "api": "vue-docgen -c build/docgen.config.js", "dev": "vuepress dev --clean-cache", - "build": "vuepress build" + "build": "vuepress build --debug" }, "license": "MIT", "devDependencies": { @@ -17,14 +17,18 @@ "@docsearch/css": "^3.6.0", "@docsearch/js": "^3.6.0", "@vuepress/bundler-vite": "2.0.0-rc.12", + "@vuepress/bundler-webpack": "2.0.0-rc.12", "@vuepress/plugin-active-header-links": "2.0.0-rc.31", "@vuepress/plugin-back-to-top": "2.0.0-rc.31", - "@vuepress/plugin-container": "2.0.0-rc.28", "@vuepress/plugin-git": "2.0.0-rc.31", + "@vuepress/plugin-markdown-container": "2.0.0-rc.30", "@vuepress/plugin-prismjs": "2.0.0-rc.32", "@vuepress/plugin-theme-data": "2.0.0-rc.31", "@vuepress/plugin-register-components": "2.0.0-rc.31", "@vuepress/plugin-toc": "2.0.0-rc.31", + "@vuepress/shared": "2.0.0-rc.12", + "@vuepress/utils": "2.0.0-rc.12", + "markdown-it-anchor": "^9.0.1", "markdown-it-include": "^2.0.0", "sass": "^1.77.2", "vue-docgen-cli": "^4.79.0", From 9ec63704fbf4d7568e3d6986043a036355787724 Mon Sep 17 00:00:00 2001 From: Cesar Date: Thu, 30 May 2024 15:21:13 +0200 Subject: [PATCH 39/93] Add the *as* property in the CFoooter component to use semantic tag --- .../src/components/footer/CFooter.ts | 9 ++++++++- .../footer/__tests__/CFooter.spec.ts | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/packages/coreui-vue/src/components/footer/CFooter.ts b/packages/coreui-vue/src/components/footer/CFooter.ts index 81de0158..3f0d5fd2 100644 --- a/packages/coreui-vue/src/components/footer/CFooter.ts +++ b/packages/coreui-vue/src/components/footer/CFooter.ts @@ -3,6 +3,13 @@ import { defineComponent, h } from 'vue' const CFooter = defineComponent({ name: 'CFooter', props: { + /** + * Component used for the root node. Either a string to use a HTML element or a component. + */ + as: { + type: String, + default: 'div', + }, /** * Place footer in non-static positions. * @@ -18,7 +25,7 @@ const CFooter = defineComponent({ setup(props, { slots }) { return () => h( - 'div', + props.as, { class: ['footer', { [`footer-${props.position}`]: props.position }] }, slots.default && slots.default(), ) diff --git a/packages/coreui-vue/src/components/footer/__tests__/CFooter.spec.ts b/packages/coreui-vue/src/components/footer/__tests__/CFooter.spec.ts index 4a5ba536..35b914ca 100644 --- a/packages/coreui-vue/src/components/footer/__tests__/CFooter.spec.ts +++ b/packages/coreui-vue/src/components/footer/__tests__/CFooter.spec.ts @@ -19,6 +19,15 @@ const customWrapper = mount(Component, { }, }) +const customWrapperTwo = mount(Component, { + propsData: { + as: 'footer', + }, + slots: { + default: 'Default slot', + }, +}) + describe(`Loads and display ${ComponentName} component`, () => { it('has a name', () => { expect(Component.name).toMatch(ComponentName) @@ -42,3 +51,13 @@ describe(`Customize ${ComponentName} component`, () => { expect(customWrapper.classes('footer-fixed')).toBe(true) }) }) + +describe(`Customize (number two) ${ComponentName} component`, () => { + it('renders correctly', () => { + expect(customWrapperTwo.html()).toMatchSnapshot() + }) + + it('tag name is custom', () => { + expect(customWrapperTwo.element.tagName).toBe('FOOTER') + }) +}) From 78f7c60c6b41d1024be6bb88ff5e22aaf1dec126 Mon Sep 17 00:00:00 2001 From: mrholek Date: Thu, 30 May 2024 17:37:36 +0200 Subject: [PATCH 40/93] refactor(CPopover, CTabs, CTooltips): change to an SSR-friendly unique ID generator --- .../src/components/popover/CPopover.ts | 7 ++++--- .../coreui-vue/src/components/tabs/CTab.ts | 4 ++-- .../src/components/tabs/CTabPanel.ts | 4 ++-- .../coreui-vue/src/components/tabs/CTabs.ts | 5 +++-- .../src/components/tooltip/CTooltip.ts | 7 ++++--- packages/coreui-vue/src/composables/index.ts | 3 ++- .../coreui-vue/src/composables/useUniqueId.ts | 18 ++++++++++++++++++ .../coreui-vue/src/directives/v-c-popover.ts | 6 +++--- .../coreui-vue/src/directives/v-c-tooltip.ts | 6 +++--- packages/docs/.vuepress/config.ts | 2 -- 10 files changed, 41 insertions(+), 21 deletions(-) create mode 100644 packages/coreui-vue/src/composables/useUniqueId.ts diff --git a/packages/coreui-vue/src/components/popover/CPopover.ts b/packages/coreui-vue/src/components/popover/CPopover.ts index a39aea63..3690fa48 100644 --- a/packages/coreui-vue/src/components/popover/CPopover.ts +++ b/packages/coreui-vue/src/components/popover/CPopover.ts @@ -2,10 +2,10 @@ import { defineComponent, h, onMounted, PropType, ref, RendererElement, Transiti import type { Placement } from '@popperjs/core' import { CConditionalTeleport } from '../conditional-teleport' -import { usePopper } from '../../composables' +import { useUniqueId, usePopper } from '../../composables' import type { Placements, Triggers } from '../../types' import { executeAfterTransition } from '../../utils/transition' -import { getRTLPlacement, getUID } from '../../utils' +import { getRTLPlacement } from '../../utils' const CPopover = defineComponent({ name: 'CPopover', @@ -119,6 +119,7 @@ const CPopover = defineComponent({ const popoverRef = ref() const uID = ref() const visible = ref(props.visible) + const { getUID } = useUniqueId('popover') const { initPopper, destroyPopper } = usePopper() const delay = @@ -149,7 +150,7 @@ const CPopover = defineComponent({ } onMounted(() => { - uID.value = getUID('popover') + uID.value = getUID() }) const handleEnter = (el: RendererElement, done: () => void) => { diff --git a/packages/coreui-vue/src/components/tabs/CTab.ts b/packages/coreui-vue/src/components/tabs/CTab.ts index c7c54250..05ce3fe4 100644 --- a/packages/coreui-vue/src/components/tabs/CTab.ts +++ b/packages/coreui-vue/src/components/tabs/CTab.ts @@ -28,11 +28,11 @@ const CTab = defineComponent({ active: isActive(), }, ], - id: `${id.value}${props.itemKey}-tab`, + id: `${props.itemKey}-tab-${id.value}`, role: 'tab', tabindex: isActive() ? 0 : -1, type: 'button', - 'aria-controls': `${id.value}${props.itemKey}-tab-pane`, + 'aria-controls': `${props.itemKey}-tab-panel-${id.value}`, 'aria-selected': isActive(), onClick: () => setActiveItemKey(props.itemKey), onFocus: () => setActiveItemKey(props.itemKey), diff --git a/packages/coreui-vue/src/components/tabs/CTabPanel.ts b/packages/coreui-vue/src/components/tabs/CTabPanel.ts index 5e2609bf..a4d23e7d 100644 --- a/packages/coreui-vue/src/components/tabs/CTabPanel.ts +++ b/packages/coreui-vue/src/components/tabs/CTabPanel.ts @@ -112,9 +112,9 @@ const CTabPanel = defineComponent({ show: firstRender.value && visible.value, }, ], - id: `${id.value}${props.itemKey}-tab-pane`, + id: `${props.itemKey}-tab-panel-${id.value}`, role: 'tabpanel', - 'aria-labelledby': `${id.value}${props.itemKey}-tab`, + 'aria-labelledby': `${props.itemKey}-tab-${id.value}`, tabindex: 0, ref: tabPaneRef, }, diff --git a/packages/coreui-vue/src/components/tabs/CTabs.ts b/packages/coreui-vue/src/components/tabs/CTabs.ts index e031153d..112decfe 100644 --- a/packages/coreui-vue/src/components/tabs/CTabs.ts +++ b/packages/coreui-vue/src/components/tabs/CTabs.ts @@ -1,5 +1,5 @@ import { defineComponent, h, provide, ref, watch } from 'vue' -import { getUID } from '../../utils' +import { useUniqueId } from '../../composables' const CTabs = defineComponent({ name: 'CTabs', @@ -19,7 +19,8 @@ const CTabs = defineComponent({ 'change', ], setup(props, { slots, emit }) { - const uID = ref(getUID('t')) + const { getUID } = useUniqueId() + const uID = ref(getUID()) const activeItemKey = ref(props.activeItemKey) const setActiveItemKey = (key: string | number) => { activeItemKey.value = key diff --git a/packages/coreui-vue/src/components/tooltip/CTooltip.ts b/packages/coreui-vue/src/components/tooltip/CTooltip.ts index 8ee54061..c982b3c8 100644 --- a/packages/coreui-vue/src/components/tooltip/CTooltip.ts +++ b/packages/coreui-vue/src/components/tooltip/CTooltip.ts @@ -2,10 +2,10 @@ import { defineComponent, h, onMounted, PropType, ref, RendererElement, Transiti import type { Placement } from '@popperjs/core' import { CConditionalTeleport } from '../conditional-teleport' -import { usePopper } from '../../composables' +import { useUniqueId, usePopper } from '../../composables' import type { Placements, Triggers } from '../../types' import { executeAfterTransition } from '../../utils/transition' -import { getRTLPlacement, getUID } from '../../utils' +import { getRTLPlacement } from '../../utils' const CTooltip = defineComponent({ name: 'CTooltip', @@ -115,6 +115,7 @@ const CTooltip = defineComponent({ const tooltipRef = ref() const uID = ref() const visible = ref(props.visible) + const { getUID } = useUniqueId('popover') const { initPopper, destroyPopper } = usePopper() const delay = @@ -145,7 +146,7 @@ const CTooltip = defineComponent({ } onMounted(() => { - uID.value = getUID('tooltip') + uID.value = getUID() }) const handleEnter = (el: RendererElement, done: () => void) => { diff --git a/packages/coreui-vue/src/composables/index.ts b/packages/coreui-vue/src/composables/index.ts index 4cee4c15..47572a5d 100644 --- a/packages/coreui-vue/src/composables/index.ts +++ b/packages/coreui-vue/src/composables/index.ts @@ -1,4 +1,5 @@ import { useColorModes } from './useColorModes' +import { useUniqueId } from './useUniqueId' import { usePopper } from './usePopper' -export { useColorModes, usePopper } +export { useColorModes, useUniqueId, usePopper } diff --git a/packages/coreui-vue/src/composables/useUniqueId.ts b/packages/coreui-vue/src/composables/useUniqueId.ts new file mode 100644 index 00000000..95810c31 --- /dev/null +++ b/packages/coreui-vue/src/composables/useUniqueId.ts @@ -0,0 +1,18 @@ +import { ref } from 'vue' + +export const useUniqueId = (prefix: string = '') => { + const ids = ref([]) + + const getUID = () => { + do { + prefix += Math.floor(Math.random() * 1_000_000) + } while (ids.value.includes(prefix)) + + ids.value.push(prefix) + return prefix + } + + return { + getUID, + } +} diff --git a/packages/coreui-vue/src/directives/v-c-popover.ts b/packages/coreui-vue/src/directives/v-c-popover.ts index 41c22601..5e846244 100644 --- a/packages/coreui-vue/src/directives/v-c-popover.ts +++ b/packages/coreui-vue/src/directives/v-c-popover.ts @@ -1,9 +1,8 @@ import { DirectiveBinding } from 'vue' import { createPopper } from '@popperjs/core' - import type { Options } from '@popperjs/core' -import { getUID } from '../utils' +import { useUniqueId } from '../composables' const createPopoverElement = (id: string, header: string, content: string): HTMLDivElement => { const popover = document.createElement('div') @@ -56,6 +55,7 @@ export default { name: 'c-popover', uid: '', mounted(el: HTMLElement, binding: DirectiveBinding): void { + const { getUID } = useUniqueId('popover') const value = binding.value const content = typeof value === 'string' ? value : value.content ?? '' const header = value.header ?? '' @@ -77,7 +77,7 @@ export default { ], } - const uID = getUID('popover') + const uID = getUID() binding.arg = uID const popover = createPopoverElement(uID, header, content) diff --git a/packages/coreui-vue/src/directives/v-c-tooltip.ts b/packages/coreui-vue/src/directives/v-c-tooltip.ts index 50903711..bf888042 100644 --- a/packages/coreui-vue/src/directives/v-c-tooltip.ts +++ b/packages/coreui-vue/src/directives/v-c-tooltip.ts @@ -1,9 +1,8 @@ import { DirectiveBinding } from 'vue' import { createPopper } from '@popperjs/core' - import type { Options } from '@popperjs/core' -import { getUID } from '../utils' +import { useUniqueId } from '../composables' const createTooltipElement = (id: string, content: string): HTMLDivElement => { const tooltip = document.createElement('div') @@ -54,6 +53,7 @@ const toggleTooltipElement = ( export default { name: 'c-tooltip', mounted(el: HTMLElement, binding: DirectiveBinding): void { + const { getUID } = useUniqueId('tooltip') const value = binding.value const content = typeof value === 'string' ? value : value.content ?? '' const trigger = value.trigger ?? 'hover' @@ -74,7 +74,7 @@ export default { ], } - const uID = getUID('tooltip') + const uID = getUID() binding.arg = uID const tooltip = createTooltipElement(uID, content) diff --git a/packages/docs/.vuepress/config.ts b/packages/docs/.vuepress/config.ts index abe4077c..0ae26563 100644 --- a/packages/docs/.vuepress/config.ts +++ b/packages/docs/.vuepress/config.ts @@ -1,7 +1,6 @@ import { defineUserConfig } from 'vuepress' import { viteBundler } from '@vuepress/bundler-vite' import { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links' -import { backToTopPlugin } from '@vuepress/plugin-back-to-top' import { markdownContainerPlugin } from '@vuepress/plugin-markdown-container' import { prismjsPlugin } from '@vuepress/plugin-prismjs' import { registerComponentsPlugin } from '@vuepress/plugin-register-components' @@ -11,7 +10,6 @@ import anchor from 'markdown-it-anchor' import include_plugin from 'markdown-it-include' import { defaultTheme } from './src/node' -import { fileURLToPath, URL } from 'url' const __dirname = getDirname(import.meta.url) export default defineUserConfig({ From fd9e5e3f3874f21f0784a762bba69cdb98ff8ce7 Mon Sep 17 00:00:00 2001 From: mrholek Date: Thu, 30 May 2024 18:05:28 +0200 Subject: [PATCH 41/93] docs: update theme --- packages/coreui-vue/src/composables/index.ts | 4 ++-- packages/docs/.vuepress/config.ts | 10 ++++++++++ packages/docs/.vuepress/src/shared/page.ts | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/coreui-vue/src/composables/index.ts b/packages/coreui-vue/src/composables/index.ts index 47572a5d..4d78d30e 100644 --- a/packages/coreui-vue/src/composables/index.ts +++ b/packages/coreui-vue/src/composables/index.ts @@ -1,5 +1,5 @@ import { useColorModes } from './useColorModes' -import { useUniqueId } from './useUniqueId' import { usePopper } from './usePopper' +import { useUniqueId } from './useUniqueId' -export { useColorModes, useUniqueId, usePopper } +export { useColorModes, usePopper, useUniqueId } diff --git a/packages/docs/.vuepress/config.ts b/packages/docs/.vuepress/config.ts index 0ae26563..764793ab 100644 --- a/packages/docs/.vuepress/config.ts +++ b/packages/docs/.vuepress/config.ts @@ -70,6 +70,16 @@ export default defineUserConfig({ }, }), tocPlugin({}), + { + name: 'extendsPage', + extendsPage: (page) => { + const frontmatter = page.frontmatter + + frontmatter.head = [ + ['link', { rel: 'canonical', href: `https://coreui.io/vue/docs${page.path}` }], + ] + }, + }, ], theme: defaultTheme({ sidebar: [ diff --git a/packages/docs/.vuepress/src/shared/page.ts b/packages/docs/.vuepress/src/shared/page.ts index 64e5fe99..40007b84 100755 --- a/packages/docs/.vuepress/src/shared/page.ts +++ b/packages/docs/.vuepress/src/shared/page.ts @@ -10,6 +10,7 @@ export interface DefaultThemePageFrontmatter { navbar?: boolean pageClass?: string name?: string + preview_component?: boolean pro_component?: boolean other_frameworks?: string } From 1fd45ef8537a13c1a0b62df6861bc56c6e65d15f Mon Sep 17 00:00:00 2001 From: mrholek Date: Thu, 30 May 2024 18:06:01 +0200 Subject: [PATCH 42/93] release: v5.1.0 --- lerna.json | 2 +- packages/coreui-vue/package.json | 2 +- packages/docs/package.json | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lerna.json b/lerna.json index 194343e3..5ceaf54d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "npmClient": "yarn", "packages": ["packages/*"], - "version": "5.0.0", + "version": "5.1.0", "$schema": "node_modules/lerna/schemas/lerna-schema.json" } diff --git a/packages/coreui-vue/package.json b/packages/coreui-vue/package.json index dad717e6..2b94d01b 100644 --- a/packages/coreui-vue/package.json +++ b/packages/coreui-vue/package.json @@ -1,6 +1,6 @@ { "name": "@coreui/vue", - "version": "5.0.0", + "version": "5.1.0", "description": "UI Components Library for Vue.js", "keywords": [ "vue", diff --git a/packages/docs/package.json b/packages/docs/package.json index ef5215fd..1fc7b75b 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -1,6 +1,6 @@ { "name": "@coreui/vue-docs", - "version": "5.0.0", + "version": "5.1.0", "scripts": { "api": "vue-docgen -c build/docgen.config.js", "dev": "vuepress dev --clean-cache", @@ -19,7 +19,6 @@ "@vuepress/bundler-vite": "2.0.0-rc.12", "@vuepress/bundler-webpack": "2.0.0-rc.12", "@vuepress/plugin-active-header-links": "2.0.0-rc.31", - "@vuepress/plugin-back-to-top": "2.0.0-rc.31", "@vuepress/plugin-git": "2.0.0-rc.31", "@vuepress/plugin-markdown-container": "2.0.0-rc.30", "@vuepress/plugin-prismjs": "2.0.0-rc.32", From 7f9805cce40f6a4a64351fda0de98e9fd7e3a29d Mon Sep 17 00:00:00 2001 From: Cesar Date: Fri, 31 May 2024 13:28:49 +0200 Subject: [PATCH 43/93] Add the *as* property in the CHeader component to use semantic tag --- .../src/components/header/CHeader.ts | 9 ++++++++- .../header/__tests__/CHeader.spec.ts | 19 +++++++++++++++++++ packages/docs/api/header/CHeader.api.md | 9 +++++---- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/packages/coreui-vue/src/components/header/CHeader.ts b/packages/coreui-vue/src/components/header/CHeader.ts index 32ab0bf5..d1c23b45 100644 --- a/packages/coreui-vue/src/components/header/CHeader.ts +++ b/packages/coreui-vue/src/components/header/CHeader.ts @@ -3,6 +3,13 @@ import { defineComponent, h } from 'vue' const CHeader = defineComponent({ name: 'CHeader', props: { + /** + * Component used for the root node. Either a string to use a HTML element or a component. + */ + as: { + type: String, + default: 'div', + }, /** * Defines optional container wrapping children elements. * @@ -31,7 +38,7 @@ const CHeader = defineComponent({ setup(props, { slots }) { return () => h( - 'div', + props.as, { class: ['header', { [`header-${props.position}`]: props.position }] }, props.container ? h( diff --git a/packages/coreui-vue/src/components/header/__tests__/CHeader.spec.ts b/packages/coreui-vue/src/components/header/__tests__/CHeader.spec.ts index 2bb30916..09ec0065 100644 --- a/packages/coreui-vue/src/components/header/__tests__/CHeader.spec.ts +++ b/packages/coreui-vue/src/components/header/__tests__/CHeader.spec.ts @@ -20,6 +20,15 @@ const customWrapper = mount(Component, { }, }) +const customWrapperTwo = mount(Component, { + propsData: { + as: 'header', + }, + slots: { + default: 'Default slot', + }, +}) + describe(`Loads and display ${ComponentName} component`, () => { it('has a name', () => { expect(Component.name).toMatch(ComponentName) @@ -44,3 +53,13 @@ describe(`Customize ${ComponentName} component`, () => { expect(customWrapper.find('.container-lg').classes('container-lg')).toBe(true) }) }) + + +describe(`Customize (number two) ${ComponentName} component`, () => { + it('renders correctly', () => { + expect(customWrapperTwo.html()).toMatchSnapshot() + }) + it('tag name is custom', () => { + expect(customWrapperTwo.element.tagName).toBe('HEADER') + }) +}) \ No newline at end of file diff --git a/packages/docs/api/header/CHeader.api.md b/packages/docs/api/header/CHeader.api.md index 0416d9ee..f47ab627 100644 --- a/packages/docs/api/header/CHeader.api.md +++ b/packages/docs/api/header/CHeader.api.md @@ -8,7 +8,8 @@ import CHeader from '@coreui/vue/src/components/header/CHeader' #### Props -| Prop name | Description | Type | Values | Default | -| ------------- | ------------------------------------------------------ | --------------- | ------------------------------------------------------------- | ------- | -| **container** | Defines optional container wrapping children elements. | boolean\|string | `boolean`, `'sm'`, `'md'`, `'lg'`, `'xl'`, `'xxl'`, `'fluid'` | - | -| **position** | Place header in non-static positions. | string | `'fixed'`, `'sticky'` | - | +| Prop name | Description | Type | Values | Default | +| ------------- | --------------------------------------------------------------------------------------- | --------------- | ------------------------------------------------------------- | ------- | +| **as** | Component used for the root node. Either a string to use a HTML element or a component. | string | - | 'div' | +| **container** | Defines optional container wrapping children elements. | boolean\|string | `boolean`, `'sm'`, `'md'`, `'lg'`, `'xl'`, `'xxl'`, `'fluid'` | - | +| **position** | Place header in non-static positions. | string | `'fixed'`, `'sticky'` | - | From b52f2ea6dbf6f83e7dece8325a9223b083efd8aa Mon Sep 17 00:00:00 2001 From: Cesar Date: Fri, 31 May 2024 13:42:20 +0200 Subject: [PATCH 44/93] docs: add as property in CFooter api --- packages/docs/api/footer/CFooter.api.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/docs/api/footer/CFooter.api.md b/packages/docs/api/footer/CFooter.api.md index b1eedef2..bc9337fe 100644 --- a/packages/docs/api/footer/CFooter.api.md +++ b/packages/docs/api/footer/CFooter.api.md @@ -8,6 +8,7 @@ import CFooter from '@coreui/vue/src/components/footer/CFooter' #### Props -| Prop name | Description | Type | Values | Default | -| ------------ | ------------------------------------- | ------ | --------------------- | ------- | -| **position** | Place footer in non-static positions. | string | `'fixed'`, `'sticky'` | - | +| Prop name | Description | Type | Values | Default | +| ------------ | --------------------------------------------------------------------------------------- | ------ | --------------------- | ------- | +| **as** | Component used for the root node. Either a string to use a HTML element or a component. | string | - | 'div' | +| **position** | Place footer in non-static positions. | string | `'fixed'`, `'sticky'` | - | From 0627839c115e1e1c931d9b7e1e6eaff848913555 Mon Sep 17 00:00:00 2001 From: atari <89896729+atari-sog@users.noreply.github.com> Date: Mon, 24 Jun 2024 15:34:06 +0900 Subject: [PATCH 45/93] Update CFormSelect.api.md Added 'selected' to the options. --- packages/docs/api/form/CFormSelect.api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docs/api/form/CFormSelect.api.md b/packages/docs/api/form/CFormSelect.api.md index 8d77c483..2637bffa 100644 --- a/packages/docs/api/form/CFormSelect.api.md +++ b/packages/docs/api/form/CFormSelect.api.md @@ -19,7 +19,7 @@ import CFormSelect from '@coreui/vue/src/components/form/CFormSelect' | **invalid** | Set component validation state to invalid. | boolean | - | - | | **label**
4.3.0+
| Add a caption for a component. | string | - | - | | **model-value** | The default name for a value passed using v-model. | string \| string[] | - | - | -| **options** | Options list of the select component. Available keys: `label`, `value`, `disabled`.
Examples:
- `:options="[{ value: 'js', label: 'JavaScript' }, { value: 'html', label: 'HTML', disabled: true }]"`
- `:options="['js', 'html']"` | Option[] \| string[] | - | - | +| **options** | Options list of the select component. Available keys: `label`, `value`, `disabled`, `selected`.
Examples:
- `:options="[{ value: 'js', label: 'JavaScript', selected: true }, { value: 'html', label: 'HTML', disabled: true }]"`
- `:options="['js', 'html']"` | Option[] \| string[] | - | - | | **size** | Size the component small or large. | string | `'sm' \| 'lg'` | - | | **text**
4.3.0+
| Add helper text to the component. | string | - | - | | **tooltip-feedback**
4.3.0+
| Display validation feedback in a styled tooltip. | boolean | - | - | From 3cdb3776aa7be02a6d2c1283246d7dae5418aaa3 Mon Sep 17 00:00:00 2001 From: mrholek Date: Wed, 24 Jul 2024 12:56:06 +0200 Subject: [PATCH 46/93] chore: update dependencies and devDependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @coreui/coreui ^5.0.2 → ^5.1.0 @docsearch/css ^3.6.0 → ^3.6.1 @docsearch/js ^3.6.0 → ^3.6.1 @rollup/plugin-commonjs ^25.0.8 → ^26.0.1 @typescript-eslint/eslint-plugin ^7.11.0 → ^7.17.0 @typescript-eslint/parser ^7.11.0 → ^7.17.0 @vuepress/bundler-vite 2.0.0-rc.12 → 2.0.0-rc.14 @vuepress/bundler-webpack 2.0.0-rc.12 → 2.0.0-rc.14 @vuepress/plugin-active-header-links 2.0.0-rc.31 → 2.0.0-rc.39 @vuepress/plugin-git 2.0.0-rc.31 → 2.0.0-rc.38 @vuepress/plugin-markdown-container 2.0.0-rc.30 → 2.0.0-rc.37 @vuepress/plugin-prismjs 2.0.0-rc.32 → 2.0.0-rc.37 @vuepress/plugin-register-components 2.0.0-rc.31 → 2.0.0-rc.37 @vuepress/plugin-theme-data 2.0.0-rc.31 → 2.0.0-rc.39 @vuepress/plugin-toc 2.0.0-rc.31 → 2.0.0-rc.39 @vuepress/shared 2.0.0-rc.12 → 2.0.0-rc.14 @vuepress/utils 2.0.0-rc.12 → 2.0.0-rc.14 eslint-plugin-prettier ^5.1.3 → ^5.2.1 eslint-plugin-unicorn ^51.0.1 → ^54.0.0 eslint-plugin-vue ^9.26.0 → ^9.27.0 lerna ^8.1.3 → ^8.1.7 prettier ^3.2.5 → ^3.3.3 rollup ^4.18.0 → ^4.19.0 sass ^1.77.2 → ^1.77.8 ts-jest ^29.1.4 → ^29.2.3 typescript ^5.4.5 → ^5.5.4 vue ^3.4.27 → ^3.4.33 vue-types ^5.1.2 → ^5.1.3 vuepress 2.0.0-rc.12 → 2.0.0-rc.14 --- package.json | 14 +++++++------- packages/coreui-vue/package.json | 14 +++++++------- packages/docs/package.json | 32 ++++++++++++++++---------------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index f038380e..f732fb97 100644 --- a/package.json +++ b/package.json @@ -22,18 +22,18 @@ "test:update": "npm-run-all charts:test:update icons:test:update lib:test:update" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^7.11.0", - "@typescript-eslint/parser": "^7.11.0", + "@typescript-eslint/eslint-plugin": "^7.17.0", + "@typescript-eslint/parser": "^7.17.0", "@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-typescript": "^13.0.0", "@vue/vue3-jest": "29.2.6", "eslint": "8.57.0", - "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-vue": "^9.26.0", + "eslint-plugin-prettier": "^5.2.1", + "eslint-plugin-vue": "^9.27.0", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-unicorn": "^51.0.1", - "lerna": "^8.1.3", + "eslint-plugin-unicorn": "^54.0.0", + "lerna": "^8.1.7", "npm-run-all": "^4.1.5", - "prettier": "^3.2.5" + "prettier": "^3.3.3" } } diff --git a/packages/coreui-vue/package.json b/packages/coreui-vue/package.json index 2b94d01b..f663bbf2 100644 --- a/packages/coreui-vue/package.json +++ b/packages/coreui-vue/package.json @@ -41,11 +41,11 @@ "test:update": "jest --coverage --updateSnapshot" }, "dependencies": { - "@coreui/coreui": "^5.0.2", + "@coreui/coreui": "^5.1.0", "@popperjs/core": "^2.11.8" }, "devDependencies": { - "@rollup/plugin-commonjs": "^25.0.8", + "@rollup/plugin-commonjs": "^26.0.1", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-typescript": "^11.1.6", "@types/jest": "^29.5.12", @@ -54,12 +54,12 @@ "cross-env": "^7.0.3", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", - "rollup": "^4.18.0", + "rollup": "^4.19.0", "rollup-plugin-vue": "^6.0.0", - "ts-jest": "^29.1.4", - "typescript": "^5.4.5", - "vue": "^3.4.27", - "vue-types": "^5.1.2" + "ts-jest": "^29.2.3", + "typescript": "^5.5.4", + "vue": "^3.4.33", + "vue-types": "^5.1.3" }, "peerDependencies": { "vue": "^3.2.21" diff --git a/packages/docs/package.json b/packages/docs/package.json index 1fc7b75b..629de096 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -9,28 +9,28 @@ "license": "MIT", "devDependencies": { "@coreui/chartjs": "^4.0.0", - "@coreui/coreui": "^5.0.2", + "@coreui/coreui": "^5.1.0", "@coreui/icons": "^3.0.1", "@coreui/icons-vue": "^2.0.0", "@coreui/utils": "^2.0.2", "@coreui/vue-chartjs": "^3.0.0", - "@docsearch/css": "^3.6.0", - "@docsearch/js": "^3.6.0", - "@vuepress/bundler-vite": "2.0.0-rc.12", - "@vuepress/bundler-webpack": "2.0.0-rc.12", - "@vuepress/plugin-active-header-links": "2.0.0-rc.31", - "@vuepress/plugin-git": "2.0.0-rc.31", - "@vuepress/plugin-markdown-container": "2.0.0-rc.30", - "@vuepress/plugin-prismjs": "2.0.0-rc.32", - "@vuepress/plugin-theme-data": "2.0.0-rc.31", - "@vuepress/plugin-register-components": "2.0.0-rc.31", - "@vuepress/plugin-toc": "2.0.0-rc.31", - "@vuepress/shared": "2.0.0-rc.12", - "@vuepress/utils": "2.0.0-rc.12", + "@docsearch/css": "^3.6.1", + "@docsearch/js": "^3.6.1", + "@vuepress/bundler-vite": "2.0.0-rc.14", + "@vuepress/bundler-webpack": "2.0.0-rc.14", + "@vuepress/plugin-active-header-links": "2.0.0-rc.39", + "@vuepress/plugin-git": "2.0.0-rc.38", + "@vuepress/plugin-markdown-container": "2.0.0-rc.37", + "@vuepress/plugin-prismjs": "2.0.0-rc.37", + "@vuepress/plugin-theme-data": "2.0.0-rc.39", + "@vuepress/plugin-register-components": "2.0.0-rc.37", + "@vuepress/plugin-toc": "2.0.0-rc.39", + "@vuepress/shared": "2.0.0-rc.14", + "@vuepress/utils": "2.0.0-rc.14", "markdown-it-anchor": "^9.0.1", "markdown-it-include": "^2.0.0", - "sass": "^1.77.2", + "sass": "^1.77.8", "vue-docgen-cli": "^4.79.0", - "vuepress": "2.0.0-rc.12" + "vuepress": "2.0.0-rc.14" } } From 5f76520011c138b7cd4b530f6ad762ce21ae7c0b Mon Sep 17 00:00:00 2001 From: mrholek Date: Wed, 24 Jul 2024 13:11:12 +0200 Subject: [PATCH 47/93] docs: update `CAvatar` documentation --- .../client/styles/_component-examples.scss | 5 ++ packages/docs/components/avatar.md | 73 ++++++++++++++++++- 2 files changed, 76 insertions(+), 2 deletions(-) diff --git a/packages/docs/.vuepress/src/client/styles/_component-examples.scss b/packages/docs/.vuepress/src/client/styles/_component-examples.scss index aee50619..2e725c8f 100644 --- a/packages/docs/.vuepress/src/client/styles/_component-examples.scss +++ b/packages/docs/.vuepress/src/client/styles/_component-examples.scss @@ -90,6 +90,11 @@ margin-left: .5rem; } + // Avatars + > .avatar + .avatar { + margin-left: .25rem; + } + // Badges > .badge + .badge { margin-left: .25rem; diff --git a/packages/docs/components/avatar.md b/packages/docs/components/avatar.md index e94d7e27..02fb3b37 100644 --- a/packages/docs/components/avatar.md +++ b/packages/docs/components/avatar.md @@ -1,12 +1,14 @@ --- title: Vue Avatar Component name: Avatar -description: Vue avatar component can be used to display circular user profile pictures. Avatar can be used to portray people or objects. It supports images, icons, or letters. +description: The Vue Avatar component is used to display circular user profile pictures. Vue avatars can portray people or objects and support images, icons, or letters. other_frameworks: avatar --- ## Image avatars +Showcase Vue avatars using images. These avatars are typically circular and can display user profile pictures. + ::: demo @@ -17,8 +19,11 @@ other_frameworks: avatar ``` + ## Letter avatars +Use letters inside avatars to represent users or objects when images are not available. This can be useful for displaying initials. + ::: demo CUI CUI @@ -30,6 +35,45 @@ other_frameworks: avatar CUI ``` +## Icons avatars + +Incorporate icons within Vue avatars, allowing for a visual representation using scalable vector graphics (SVG). + +::: demo + + + + + + + + + + + + + + + +::: +```vue + + + + + + + + + + + + + + + +``` + ## Rounded avatars Use the `shape="rounded"` prop to make avatars squared with rounded corners. @@ -66,20 +110,23 @@ Fancy larger or smaller avatar? Add `size="xl"`, `size="lg"` or `size="sm"` for ::: demo CUI CUI +CUI CUI CUI ::: ```vue CUI CUI +CUI CUI CUI ``` ## Avatars with status -::: demo +Add a status indicator to avatars using the `status` property to show online or offline status. +::: demo CUI ::: @@ -88,6 +135,28 @@ Fancy larger or smaller avatar? Add `size="xl"`, `size="lg"` or `size="sm"` for CUI ``` +## Customizing + +### CSS variables + +Vue avatars use local CSS variables on `.avatar` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported, too. + + + +#### How to use CSS variables + +```jsx +const vars = { + '--my-css-var': 10, + '--my-another-css-var': 'red', +} +return ... +``` + +### SASS variables + + + ## API !!!include(./api/avatar/CAvatar.api.md)!!! \ No newline at end of file From 51cf9a92d73de7abf205df5a5287228f495c3508 Mon Sep 17 00:00:00 2001 From: mrholek Date: Wed, 24 Jul 2024 15:45:53 +0200 Subject: [PATCH 48/93] refactor(CButton): improve colors and variants handling --- packages/coreui-vue/src/components/button/CButton.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/coreui-vue/src/components/button/CButton.ts b/packages/coreui-vue/src/components/button/CButton.ts index e918cbfc..287bfd12 100644 --- a/packages/coreui-vue/src/components/button/CButton.ts +++ b/packages/coreui-vue/src/components/button/CButton.ts @@ -93,8 +93,9 @@ export const CButton = defineComponent({ { class: [ 'btn', - props.variant ? `btn-${props.variant}-${props.color}` : `btn-${props.color}`, { + [`btn-${props.color}`]: props.color && !props.variant, + [`btn-${props.variant}-${props.color}`]: props.color && props.variant, [`btn-${props.size}`]: props.size, active: props.active, disabled: props.disabled, From 18c962df8ffbf3f1a9192e3219439ecda6f96283 Mon Sep 17 00:00:00 2001 From: mrholek Date: Thu, 25 Jul 2024 18:05:37 +0200 Subject: [PATCH 49/93] docs: update icons documentation --- packages/docs/.vuepress/client.ts | 3 +- .../api/coreui-icons-vue/src/CIconSvg.api.md | 17 ++ packages/docs/components/icon.md | 157 +++++++++++++++--- packages/docs/package.json | 2 +- 4 files changed, 158 insertions(+), 21 deletions(-) create mode 100644 packages/docs/api/coreui-icons-vue/src/CIconSvg.api.md diff --git a/packages/docs/.vuepress/client.ts b/packages/docs/.vuepress/client.ts index 0ae21634..0404f0fd 100644 --- a/packages/docs/.vuepress/client.ts +++ b/packages/docs/.vuepress/client.ts @@ -1,6 +1,6 @@ import { defineClientConfig } from '@vuepress/client' -import { CIcon } from '@coreui/icons-vue' +import { CIcon, CIconSvg } from '@coreui/icons-vue' import CChartPlugin from '@coreui/vue-chartjs' import CoreuiVue from '@coreui/vue/src/' import '@coreui/coreui/scss/coreui.scss' @@ -71,6 +71,7 @@ export default defineClientConfig({ app.use(CoreuiVue) app.provide('icons', icons) app.component('CIcon', CIcon) + app.component('CIconSvg', CIconSvg) app.use(CChartPlugin), router.addRoute({ path: '', redirect: '/getting-started/introduction.html' }) }, diff --git a/packages/docs/api/coreui-icons-vue/src/CIconSvg.api.md b/packages/docs/api/coreui-icons-vue/src/CIconSvg.api.md new file mode 100644 index 00000000..1984a5a7 --- /dev/null +++ b/packages/docs/api/coreui-icons-vue/src/CIconSvg.api.md @@ -0,0 +1,17 @@ +### CIconSvg + +```jsx +import { CIconSvg } from '@coreui/icons-vue' +// or +import CIconSvg from '@coreui/icons-vue/src/CIconSvg' +``` + +#### Props + +| Prop name | Description | Type | Values | Default | +| --------------------- | ------------------------------------------------------------------------------------------------- | --------------------- | ------ | ------- | +| **custom-class-name** | Use for replacing default CIconSvg component classes. Prop is overriding the 'size' prop. | string\|array\|object | - | - | +| **height** | The height attribute defines the vertical length of an icon. | number | - | - | +| **size** | Size of the icon. Available sizes: 'sm', 'lg', 'xl', 'xxl', '3xl...9xl', 'custom', 'custom-size'. | string | - | - | +| **title** | Title tag content. | string | - | - | +| **width** | The width attribute defines the horizontal length of an icon. | number | - | - | diff --git a/packages/docs/components/icon.md b/packages/docs/components/icon.md index d50d957e..10794fff 100644 --- a/packages/docs/components/icon.md +++ b/packages/docs/components/icon.md @@ -1,12 +1,12 @@ --- title: Vue Icon Component name: Icon -description: Official Vue.js component for CoreUI Icons and CoreUI Icons PRO. +description: Vue icons library is a great resource for Vue developers, who can use its customizable SVG icons in their applications. It offers an extensive library of icons to choose from, which can be easily inserted into projects with just a few lines of code. Not only that, but users are also able to customize the appearance of these icons by setting various props on them. This provides developers with an efficient and flexible way to integrate useful graphical elements into their web pages without doing any extra work. --- ## Installation -If you want to use our icon component and our icons library you have to install two additional packages. +To start using CoreUI Vue Icons in your project, you need to install it as a dependency. Follow the instructions below based on your package manager of choice: ### Npm @@ -27,7 +27,11 @@ yarn add @coreui/icons-vue ## Usage -### Single icon +Import vue.js icons using one of these two options: + +### Single Vue.js icon + +To use a single Vue.js icon, import the `` component and the desired icon(s) from the `@coreui/icons` library. Then, include the `` component in your code and specify the icon prop with the imported icon variable. Additionally, you can set the desired size for the icon using the `size` prop. ::: demo @@ -57,6 +61,8 @@ export default { ### All icons +To use all icons available in the CoreUI Vue.js Icons package, import the CIcon component and the entire `@coreui/icons` library using the `* as` syntax. Then, reference the desired icon within the `icon` prop. + ```vue ``` - - ## API -!!!include(./api/collapse/CCollapse.api.md)!!! \ No newline at end of file +!!!include(./api/collapse/CCollapse.api.md)!!! + + \ No newline at end of file diff --git a/packages/docs/components/header.md b/packages/docs/components/header.md index 5094d15c..8c45d6a3 100644 --- a/packages/docs/components/header.md +++ b/packages/docs/components/header.md @@ -68,60 +68,42 @@ Here's an example of all the sub-components included in a responsive light-theme ::: ```vue - - - Header - - - - - - Home - - - - Link - - - Action - Another action - Something else here - - - - Disabled - - - - - - - - + ``` - - - ## Customizing ### CSS variables @@ -150,4 +132,9 @@ return ... !!!include(./api/header/CHeaderBrand.api.md)!!! -!!!include(./api/header/CHeaderNav.api.md)!!! \ No newline at end of file +!!!include(./api/header/CHeaderNav.api.md)!!! + + diff --git a/packages/docs/components/icon.md b/packages/docs/components/icon.md index 1d71d1d9..a68ced42 100644 --- a/packages/docs/components/icon.md +++ b/packages/docs/components/icon.md @@ -42,20 +42,9 @@ To use a single Vue.js icon, import the `` component and the desired icon - ``` @@ -67,21 +56,12 @@ To use all icons available in the CoreUI Vue.js Icons package, import the CIcon - ``` + ### Icons object This way you import your needed Vue.js icons once and pass them to $root object on 'icons' key @@ -147,7 +127,6 @@ With some [color utility classes](https://coreui.io/docs/utilities/colors/), you ::: ```vue -::: demo @@ -155,7 +134,6 @@ With some [color utility classes](https://coreui.io/docs/utilities/colors/), you -::: ``` #### CSS Variables @@ -220,6 +198,9 @@ The ` component allows you to add custom SVG icons to your applicatio ::: ```vue + - ``` ## Available icons @@ -319,38 +292,22 @@ CoreUI Icons package is delivered with more than 1500 icons in multiple formats - +!!!include(./api/coreui-icons-vue/src/CIconSvg.api.md)!!! + \ No newline at end of file diff --git a/packages/docs/components/modal.md b/packages/docs/components/modal.md index 72ea1b66..07e19ad8 100644 --- a/packages/docs/components/modal.md +++ b/packages/docs/components/modal.md @@ -60,7 +60,11 @@ Toggle a working modal demo by clicking the button below. It will slide down and ::: -``` vue +```vue + - ``` ### Static backdrop @@ -114,7 +109,11 @@ If you set `backdrop` property to `static`, your modal will behave as though the ::: -``` vue +```vue + - ``` ### Scrolling long content @@ -248,7 +238,11 @@ When modals become too long for the user's viewport or device, they scroll indep ::: -``` vue +```vue + - ``` You can also create a scrollable modal that allows scroll the modal body by adding `scrollable` prop. @@ -459,7 +444,11 @@ You can also create a scrollable modal that allows scroll the modal body by addi ::: -``` vue +```vue + - ``` ### Vertically centered @@ -596,7 +576,11 @@ Add `alignment="center` to `` to vertically center the modal. ::: -``` vue +```vue +