diff --git a/.yarn/cache/@babel-runtime-npm-7.21.0-c4ef698c89-7b33e25bfa.zip b/.yarn/cache/@babel-runtime-npm-7.21.0-c4ef698c89-7b33e25bfa.zip deleted file mode 100644 index 06d3a9a3c..000000000 Binary files a/.yarn/cache/@babel-runtime-npm-7.21.0-c4ef698c89-7b33e25bfa.zip and /dev/null differ diff --git a/.yarn/cache/@carbon-colors-npm-10.37.1-8caedc3bef-7cdc38370d.zip b/.yarn/cache/@carbon-colors-npm-10.37.1-8caedc3bef-7cdc38370d.zip new file mode 100644 index 000000000..c85de6014 Binary files /dev/null and b/.yarn/cache/@carbon-colors-npm-10.37.1-8caedc3bef-7cdc38370d.zip differ diff --git a/.yarn/cache/@carbon-colors-npm-11.13.0-c8c3700ed5-73cbfa18ce.zip b/.yarn/cache/@carbon-colors-npm-11.13.0-c8c3700ed5-73cbfa18ce.zip deleted file mode 100644 index c171186ab..000000000 Binary files a/.yarn/cache/@carbon-colors-npm-11.13.0-c8c3700ed5-73cbfa18ce.zip and /dev/null differ diff --git a/.yarn/cache/@carbon-grid-npm-10.43.1-7e086e8cec-d59818f560.zip b/.yarn/cache/@carbon-grid-npm-10.43.1-7e086e8cec-d59818f560.zip new file mode 100644 index 000000000..3fab908ff Binary files /dev/null and b/.yarn/cache/@carbon-grid-npm-10.43.1-7e086e8cec-d59818f560.zip differ diff --git a/.yarn/cache/@carbon-grid-npm-11.12.0-a1e4993504-ff5c47d4a3.zip b/.yarn/cache/@carbon-grid-npm-11.12.0-a1e4993504-ff5c47d4a3.zip deleted file mode 100644 index 52fb1d6d1..000000000 Binary files a/.yarn/cache/@carbon-grid-npm-11.12.0-a1e4993504-ff5c47d4a3.zip and /dev/null differ diff --git a/.yarn/cache/@carbon-import-once-npm-10.7.0-4fdc07ee20-c92625bc34.zip b/.yarn/cache/@carbon-import-once-npm-10.7.0-4fdc07ee20-c92625bc34.zip new file mode 100644 index 000000000..828e63711 Binary files /dev/null and b/.yarn/cache/@carbon-import-once-npm-10.7.0-4fdc07ee20-c92625bc34.zip differ diff --git a/.yarn/cache/@carbon-layout-npm-10.37.1-eeb184f33f-baabf7e70e.zip b/.yarn/cache/@carbon-layout-npm-10.37.1-eeb184f33f-baabf7e70e.zip new file mode 100644 index 000000000..8949a8085 Binary files /dev/null and b/.yarn/cache/@carbon-layout-npm-10.37.1-eeb184f33f-baabf7e70e.zip differ diff --git a/.yarn/cache/@carbon-layout-npm-11.12.0-f91db2b7b7-7af239a8ee.zip b/.yarn/cache/@carbon-layout-npm-11.12.0-f91db2b7b7-7af239a8ee.zip deleted file mode 100644 index 8c3443950..000000000 Binary files a/.yarn/cache/@carbon-layout-npm-11.12.0-f91db2b7b7-7af239a8ee.zip and /dev/null differ diff --git a/.yarn/cache/@carbon-themes-npm-10.55.1-dba6d1b556-de435ba20b.zip b/.yarn/cache/@carbon-themes-npm-10.55.1-dba6d1b556-de435ba20b.zip new file mode 100644 index 000000000..d10fbb570 Binary files /dev/null and b/.yarn/cache/@carbon-themes-npm-10.55.1-dba6d1b556-de435ba20b.zip differ diff --git a/.yarn/cache/@carbon-themes-npm-11.17.0-5fc0055105-a10fb8426e.zip b/.yarn/cache/@carbon-themes-npm-11.17.0-5fc0055105-a10fb8426e.zip deleted file mode 100644 index 83c0a7ab5..000000000 Binary files a/.yarn/cache/@carbon-themes-npm-11.17.0-5fc0055105-a10fb8426e.zip and /dev/null differ diff --git a/.yarn/cache/@carbon-type-npm-10.45.1-fb4ed3ae89-08d1689874.zip b/.yarn/cache/@carbon-type-npm-10.45.1-fb4ed3ae89-08d1689874.zip new file mode 100644 index 000000000..04bba1db5 Binary files /dev/null and b/.yarn/cache/@carbon-type-npm-10.45.1-fb4ed3ae89-08d1689874.zip differ diff --git a/.yarn/cache/@carbon-type-npm-11.16.0-eb0a6c5430-78f3fa85ef.zip b/.yarn/cache/@carbon-type-npm-11.16.0-eb0a6c5430-78f3fa85ef.zip deleted file mode 100644 index 6f4a212ed..000000000 Binary files a/.yarn/cache/@carbon-type-npm-11.16.0-eb0a6c5430-78f3fa85ef.zip and /dev/null differ diff --git a/.yarn/cache/@carbon-web-components-npm-1.25.0-7d91ffa8fa-f37b0d49af.zip b/.yarn/cache/@carbon-web-components-npm-1.25.0-7d91ffa8fa-f37b0d49af.zip deleted file mode 100644 index b47e8ea66..000000000 Binary files a/.yarn/cache/@carbon-web-components-npm-1.25.0-7d91ffa8fa-f37b0d49af.zip and /dev/null differ diff --git a/.yarn/cache/carbon-components-npm-10.58.3-57a9dc3544-84a7e6ad39.zip b/.yarn/cache/carbon-components-npm-10.58.3-57a9dc3544-84a7e6ad39.zip deleted file mode 100644 index fbe752200..000000000 Binary files a/.yarn/cache/carbon-components-npm-10.58.3-57a9dc3544-84a7e6ad39.zip and /dev/null differ diff --git a/.yarn/cache/color-npm-3.2.1-568cf1014f-f81220e8b7.zip b/.yarn/cache/color-npm-3.2.1-568cf1014f-f81220e8b7.zip new file mode 100644 index 000000000..6021f3d11 Binary files /dev/null and b/.yarn/cache/color-npm-3.2.1-568cf1014f-f81220e8b7.zip differ diff --git a/.yarn/cache/color-npm-4.2.3-4a23227581-0579629c02.zip b/.yarn/cache/color-npm-4.2.3-4a23227581-0579629c02.zip deleted file mode 100644 index cca7ea310..000000000 Binary files a/.yarn/cache/color-npm-4.2.3-4a23227581-0579629c02.zip and /dev/null differ diff --git a/.yarn/cache/flatpickr-npm-4.6.13-06399933fc-2cca1b8dc9.zip b/.yarn/cache/flatpickr-npm-4.6.13-06399933fc-2cca1b8dc9.zip deleted file mode 100644 index 081e9d8ce..000000000 Binary files a/.yarn/cache/flatpickr-npm-4.6.13-06399933fc-2cca1b8dc9.zip and /dev/null differ diff --git a/.yarn/cache/lit-element-npm-2.5.1-7fccfb6b01-c4f45d0cc8.zip b/.yarn/cache/lit-element-npm-2.5.1-7fccfb6b01-c4f45d0cc8.zip deleted file mode 100644 index a96a840fa..000000000 Binary files a/.yarn/cache/lit-element-npm-2.5.1-7fccfb6b01-c4f45d0cc8.zip and /dev/null differ diff --git a/.yarn/cache/lit-html-npm-1.4.1-4c175266aa-6e1bb335cd.zip b/.yarn/cache/lit-html-npm-1.4.1-4c175266aa-6e1bb335cd.zip deleted file mode 100644 index 3031507dc..000000000 Binary files a/.yarn/cache/lit-html-npm-1.4.1-4c175266aa-6e1bb335cd.zip and /dev/null differ diff --git a/.yarn/cache/lodash-es-npm-4.17.21-b45832dfce-05cbffad6e.zip b/.yarn/cache/lodash-es-npm-4.17.21-b45832dfce-05cbffad6e.zip deleted file mode 100644 index c95a052ee..000000000 Binary files a/.yarn/cache/lodash-es-npm-4.17.21-b45832dfce-05cbffad6e.zip and /dev/null differ diff --git a/src/components/CvCheckbox/CvCheckbox.vue b/src/components/CvCheckbox/CvCheckbox.vue index ae21cdd6d..b13defb2a 100644 --- a/src/components/CvCheckbox/CvCheckbox.vue +++ b/src/components/CvCheckbox/CvCheckbox.vue @@ -69,5 +69,3 @@ const cvId = useCvId(props); const emit = defineEmits(['update:modelValue', 'change']); const { onChange, isChecked } = useCheck(toRefs(props), emit); - - diff --git a/src/components/CvTile/CvTile.stories.mdx b/src/components/CvTile/CvTile.stories.mdx index 6b9d766c1..b0b524b41 100644 --- a/src/components/CvTile/CvTile.stories.mdx +++ b/src/components/CvTile/CvTile.stories.mdx @@ -1,7 +1,7 @@ import { Canvas, Meta, Story } from '@storybook/addon-docs'; import CvTile from './CvTile.vue'; -import CvTileStandard from "./CvTileStandard.vue"; -import CvTileClickable from "./CvTileClickable.vue"; +import CvTileStandard from './CvTileStandard.vue'; +import CvTileClickable from './CvTileClickable.vue'; import { sbCompPrefix } from '../../global/storybook-utils'; import { action } from '@storybook/addon-actions'; @@ -10,50 +10,145 @@ import { action } from '@storybook/addon-actions'; export const Template = args => ({ // Components used in your story `template` are defined in the `components` object components: { - CvTile,CvTileStandard,CvTileClickable + CvTile, + CvTileStandard, + CvTileClickable, }, // The story's `args` need to be mapped into the template through the `setup()` method setup() { return { - args: { light: args.light, kind: args.kind, disabled: args.disabled}, + args: { + light: args.light, + kind: args.kind, + disabled: args.disabled, + expanded: args.expanded, + tileCollapsedLabel: args.tileCollapsedLabel, + tileExpandedLabel: args.tileExpandedLabel, + }, onChange: action('change'), + onExpanded: action('expanded'), + onClick: action('click'), }; }, // And then the `args` are bound to your component with `v-bind="args"` template: args.template, }); -const defaultTemplate = ` -
- Hello! -
-`; +const defaultTemplate = `Hello!`; const defaultCode = defaultTemplate.replace("v-bind='args'", ''); +const expandableTemplate = `Hello expandable!`; +const expandableCode = expandableTemplate.replace("v-bind='args'", ''); +const clickableTemplate = `Hello clickable!`; +const clickableCode = clickableTemplate.replace("v-bind='args'", ''); +const selectableTemplate = `Hello selectable! `; +const selectableCode = selectableTemplate.replace("v-bind='args'", ''); # CvTile **Migration notes:** -- The `light` and '`theme` options continue to be supported but neither seem to have any effect with Carbon 10. - The React component does not have these properties listed at all. Even so the `--content-switcher--light` is still - applied if `light` is set to true. -- In the Vue 2 component `cv-content-switcher-content` is set to visible if the controlling `cv-content-switcher` is - removed from the DOM. This is no longer supported. If you need this behaviour you can probably achieve the same effect - with the direct DOM version of the component plus some visibility logic. +- The `light` and '`theme` options continue to be supported but the boolean `light` is preferred. +- The expandable tile now emits a `expanded` event with a Boolean value. + {Template.bind({})} + + + + + + {Template.bind({})} + + + + + + {Template.bind({})} + + + + + {Template.bind({})} diff --git a/src/components/CvTile/CvTile.vue b/src/components/CvTile/CvTile.vue index 0bbb7b548..72885a6f4 100644 --- a/src/components/CvTile/CvTile.vue +++ b/src/components/CvTile/CvTile.vue @@ -5,6 +5,10 @@ :expanded="checkProp('expanded', expanded)" :tileCollapsedLabel="checkProp('tileCollapsedLabel', tileCollapsedLabel)" :tileExpandedLabel="checkProp('tileCollapsedLabel', tileExpandedLabel)" + :class="[ + `cv-tile ${carbonPrefix}--tile`, + { [`${carbonPrefix}--tile--light`]: isLight }, + ]" >