diff --git a/app/.storybook/main.ts b/app/.storybook/main.ts index 279e6d0d..74c089de 100644 --- a/app/.storybook/main.ts +++ b/app/.storybook/main.ts @@ -28,6 +28,7 @@ const config: StorybookConfig = { { from: '../public', to: '/' }, { from: '../../dist/', to: '/dist' }, { from: '../../css/foundations/fonts/', to: '/dist/fonts' }, + { from: '../../dist/', to: '/dist' }, ], } export default config diff --git a/app/.storybook/preview.ts b/app/.storybook/preview.ts index b1e0361e..1501a835 100644 --- a/app/.storybook/preview.ts +++ b/app/.storybook/preview.ts @@ -61,11 +61,28 @@ export default { }, backgrounds: { values: [ - { name: 'Light', value: 'var(--color-white, #fff)' }, - { name: 'Dark', value: 'var(--color-secondary-600, #5f755f)' }, + { name: 'Light', value: 'light' }, + { name: 'Dark', value: 'dark' }, ], // 👇 Specify which background is shown by default default: 'Light', }, }, + decorators: [ + (_, args) => { + const theme = args.globals?.backgrounds?.value + switch (theme) { + case 'light': + document.querySelector('html')?.setAttribute('data-theme', 'light') + break + case 'dark': + document.querySelector('html')?.setAttribute('data-theme', 'dark') + break + default: + document.querySelector('html')?.setAttribute('data-theme', 'auto') + break + } + return { template: `` } + }, + ], } diff --git a/app/public/images/grid-example-1.png b/app/assets/images/grid-example-1.png similarity index 100% rename from app/public/images/grid-example-1.png rename to app/assets/images/grid-example-1.png diff --git a/app/public/images/grid-example-2.png b/app/assets/images/grid-example-2.png similarity index 100% rename from app/public/images/grid-example-2.png rename to app/assets/images/grid-example-2.png diff --git a/app/public/images/grid-example-3.png b/app/assets/images/grid-example-3.png similarity index 100% rename from app/public/images/grid-example-3.png rename to app/assets/images/grid-example-3.png diff --git a/app/components/ch/components/AlertBanner.vue b/app/components/ch/components/AlertBanner.vue index bb6e599a..f16d0352 100644 --- a/app/components/ch/components/AlertBanner.vue +++ b/app/components/ch/components/AlertBanner.vue @@ -23,7 +23,8 @@ :icon="link.icon ? link.icon : 'ArrowRight'" icon-pos="right" size="sm" - variant="link-negative" + variant="link" + class="link--negative" /> diff --git a/app/components/ch/components/BackToTopBtn.vue b/app/components/ch/components/BackToTopBtn.vue index 5ebbdf0c..50967b55 100644 --- a/app/components/ch/components/BackToTopBtn.vue +++ b/app/components/ch/components/BackToTopBtn.vue @@ -19,7 +19,7 @@ const props = defineProps({ type: { type: String, validator: (prop) => - ['default', 'negative', 'outline'].includes(prop as string), + ['negative', 'outline'].includes(prop as string), default: () => undefined, }, target: { diff --git a/app/components/ch/components/Badge.vue b/app/components/ch/components/Badge.vue index caafda4e..e4815b71 100644 --- a/app/components/ch/components/Badge.vue +++ b/app/components/ch/components/Badge.vue @@ -20,8 +20,8 @@ diff --git a/app/components/ch/components/PaginationItem.vue b/app/components/ch/components/PaginationItem.vue index 48bb703e..10830788 100644 --- a/app/components/ch/components/PaginationItem.vue +++ b/app/components/ch/components/PaginationItem.vue @@ -17,12 +17,6 @@ import SvgIcon from './SvgIcon.vue' import { computed } from 'vue' const props = defineProps({ - type: { - type: String, - default: () => '', - validator: (prop) => - ['outline', 'outline-negative'].includes(prop as string), - }, icon: { type: String, default: () => '', @@ -38,8 +32,7 @@ const props = defineProps({ }) const computedClasses = computed(() => { - let base = 'btn ' - if (props.type) base += `btn--${props.type} ` + let base = 'btn btn--outline ' if (props.icon) base += `btn--icon-only ` return base }) diff --git a/app/components/ch/components/Radio.vue b/app/components/ch/components/Radio.vue index 02dab627..ec3abe0d 100644 --- a/app/components/ch/components/Radio.vue +++ b/app/components/ch/components/Radio.vue @@ -28,11 +28,6 @@ import { computed, type PropType } from 'vue' const props = defineProps({ - variant: { - type: String, - validator: (prop) => ['outline', 'negative'].includes(prop as string), - default: () => 'outline', - }, size: { type: String, validator: (prop) => ['sm', 'base', 'lg'].includes(prop as string), @@ -79,7 +74,6 @@ const props = defineProps({ const classes = computed(() => { let base = 'input ' - if (props.variant) base += `input--${props.variant} ` if (props.size) base += `input--${props.size} ` if (props.messageType) base += `input--${props.messageType} ` return base @@ -87,7 +81,6 @@ const classes = computed(() => { const labelClasses = computed(() => { let base = '' - if (props.variant === 'negative') base += `text--negative ` if (props.size) base += `text--${props.size} ` if (props.required) base += `text--asterisk ` return base diff --git a/app/components/ch/components/Select.vue b/app/components/ch/components/Select.vue index 36c9f3b9..521a5567 100644 --- a/app/components/ch/components/Select.vue +++ b/app/components/ch/components/Select.vue @@ -35,11 +35,6 @@ import { computed, type PropType } from 'vue' const props = defineProps({ - variant: { - type: String, - validator: (prop) => ['outline', 'negative'].includes(prop as string), - default: () => 'outline', - }, bare: { type: Boolean, default: () => false, @@ -95,7 +90,6 @@ const selectWrapperClasses = computed(() => { const selectClasses = computed(() => { let base = '' - if (props.variant) base += `input--${props.variant} ` if (props.size) base += `input--${props.size} ` if (props.message) base += `input--${props.messageType} ` return base @@ -103,7 +97,6 @@ const selectClasses = computed(() => { const labelClasses = computed(() => { let base = '' - if (props.variant === 'negative') base += `text--negative ` if (props.size) base += `text--${props.size} ` if (props.hideLabel) base += `sr-only ` if (props.required) base += `text--asterisk ` diff --git a/app/components/ch/components/ShoppingCard.vue b/app/components/ch/components/ShoppingCard.vue index c72d4351..7096211b 100644 --- a/app/components/ch/components/ShoppingCard.vue +++ b/app/components/ch/components/ShoppingCard.vue @@ -29,7 +29,7 @@ diff --git a/app/components/ch/components/ShoppingCart.vue b/app/components/ch/components/ShoppingCart.vue index dfb353c3..10b7b903 100644 --- a/app/components/ch/components/ShoppingCart.vue +++ b/app/components/ch/components/ShoppingCart.vue @@ -80,7 +80,7 @@
-
+
['outline', 'negative'].includes(prop as string), - default: () => undefined, - }, size: { type: String, validator: (prop) => ['sm', 'base', 'lg'].includes(prop as string), @@ -92,7 +87,6 @@ const props = defineProps({ const classes = computed(() => { let base = '' - if (props.variant) base += `input--${props.variant} ` if (props.size) base += `input--${props.size} ` if (props.messageType) base += `input--${props.messageType} ` if (!props.resizable) base += 'textarea--public' @@ -101,7 +95,6 @@ const classes = computed(() => { const labelClasses = computed(() => { let base = '' - if (props.variant === 'negative') base += `text--negative ` if (props.size) base += `text--${props.size} ` if (props.required) base += `text--asterisk ` return base diff --git a/app/components/ch/demo/ColorList.vue b/app/components/ch/demo/ColorList.vue index 7d4ef2dd..3f67b07d 100644 --- a/app/components/ch/demo/ColorList.vue +++ b/app/components/ch/demo/ColorList.vue @@ -1,19 +1,24 @@ diff --git a/app/components/ch/objects/AlterBodyClasses.vue b/app/components/ch/objects/AlterBodyClasses.vue index d6c0a0e5..ec897964 100644 --- a/app/components/ch/objects/AlterBodyClasses.vue +++ b/app/components/ch/objects/AlterBodyClasses.vue @@ -1,3 +1,5 @@ + + diff --git a/app/components/ch/sections/FormDemo.vue b/app/components/ch/sections/FormDemo.vue index 750b4469..c5db991f 100644 --- a/app/components/ch/sections/FormDemo.vue +++ b/app/components/ch/sections/FormDemo.vue @@ -1,5 +1,5 @@