diff --git a/.vscode/settings.json b/.vscode/settings.json index 1501ec7..55c49a5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,7 @@ { "i18n-ally.localesPaths": [ "layers/base/locales", + "layers/cart/locales", "layers/auth/locales", "app/locales" ], diff --git a/app/components/header/HeaderActions.vue b/app/components/header/HeaderActions.vue index 3bb4d8d..250e656 100644 --- a/app/components/header/HeaderActions.vue +++ b/app/components/header/HeaderActions.vue @@ -4,6 +4,7 @@ diff --git a/app/components/header/HeaderProfile.vue b/app/components/header/HeaderProfile.vue index c3579c1..24fdab8 100644 --- a/app/components/header/HeaderProfile.vue +++ b/app/components/header/HeaderProfile.vue @@ -17,7 +17,6 @@ function onLogout() { +import type { Icon } from '@wisemen/vue-core' +import { AppIcon } from '@wisemen/vue-core' +import type { RouteLocationRaw } from 'vue-router' + +import type { ButtonStyleProps } from './button.style' +import { useButtonStyle } from './button.style' + +export interface AppButtonProps { + /** + * Whether the button is disabled. + * @default false + */ + isDisabled?: boolean + /** + * Whether the button is in a loading state. + * @default false + */ + isLoading?: boolean + /** + * The icon to display on the left side of the button. + * @default null + */ + iconLeft?: Icon | null + /** + * The icon to display on the right side of the button. + * @default null + */ + iconRight?: Icon | null + /** + * The size of the button. + * @default 'default' + */ + size?: ButtonStyleProps['size'] + to: RouteLocationRaw + /** + * The type of the button. + * @default 'button' + */ + type?: 'button' | 'reset' | 'submit' + /** + * The variant of the button. + * @default 'default' + */ + variant?: ButtonStyleProps['variant'] +} + +const props = withDefaults(defineProps(), { + // TODO: find out why defaulting these to `null` breaks the `Icon` prop type when using `declare module`. + // iconLeft: null, + // iconRight: null, + isDisabled: false, + isLoading: false, + size: 'default', + type: 'button', + variant: 'default', +}) + +const buttonStyle = useButtonStyle() + +const buttonClasses = computed(() => + buttonStyle.button({ + size: props.size, + variant: props.variant, + })) + +const buttonLeftIconClasses = computed(() => + buttonStyle.buttonLeftIcon({ + isLoading: props.isLoading, + size: props.size, + })) + +const buttonRightIconClasses = computed(() => + buttonStyle.buttonRightIcon({ + isLoading: props.isLoading, + size: props.size, + })) + + + diff --git a/layers/base/components/core/button/AppRouterLinkButton.vue b/layers/base/components/core/button/AppRouterLinkButton.vue deleted file mode 100644 index 03a9c82..0000000 --- a/layers/base/components/core/button/AppRouterLinkButton.vue +++ /dev/null @@ -1,172 +0,0 @@ - - - diff --git a/layers/base/components/core/divider/AppDivider.vue b/layers/base/components/core/divider/AppDivider.vue new file mode 100644 index 0000000..a971461 --- /dev/null +++ b/layers/base/components/core/divider/AppDivider.vue @@ -0,0 +1,24 @@ + + + diff --git a/layers/base/components/core/icon/AppIconCircle.vue b/layers/base/components/core/icon/AppIconCircle.vue new file mode 100644 index 0000000..6413ad8 --- /dev/null +++ b/layers/base/components/core/icon/AppIconCircle.vue @@ -0,0 +1,35 @@ + + + diff --git a/layers/base/components/core/increment/AppIncrement.vue b/layers/base/components/core/increment/AppIncrement.vue new file mode 100644 index 0000000..7dcc484 --- /dev/null +++ b/layers/base/components/core/increment/AppIncrement.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/layers/base/components/core/increment/FormIncrement.vue b/layers/base/components/core/increment/FormIncrement.vue new file mode 100644 index 0000000..e0f5c57 --- /dev/null +++ b/layers/base/components/core/increment/FormIncrement.vue @@ -0,0 +1,55 @@ + + + diff --git a/layers/base/components/seo/SeoWrapper.vue b/layers/base/components/seo/SeoWrapper.vue index 8c0c71b..df7fd22 100644 --- a/layers/base/components/seo/SeoWrapper.vue +++ b/layers/base/components/seo/SeoWrapper.vue @@ -1,3 +1,4 @@ +