diff --git a/playground/pages/button.vue b/playground/pages/button.vue index e17967b2..1a48e4c9 100644 --- a/playground/pages/button.vue +++ b/playground/pages/button.vue @@ -27,11 +27,6 @@ const variants = Object.keys(theme.variants.variant) Loading -
- - Truncate - -
diff --git a/src/runtime/components/Button.vue b/src/runtime/components/Button.vue index 1266d22c..aeaf83a6 100644 --- a/src/runtime/components/Button.vue +++ b/src/runtime/components/Button.vue @@ -19,7 +19,6 @@ export interface ButtonProps extends UseComponentIconsProps, Omit } @@ -51,7 +50,6 @@ const ui = computed(() => tv({ extend: button, slots: props.ui })({ variant: props.variant, size: buttonSize.value, loading: props.loading, - truncate: props.truncate, block: props.block, square: props.square || (!slots.default && !props.label), leading: isLeading.value, diff --git a/src/theme/button.ts b/src/theme/button.ts index ebd70965..e6476645 100644 --- a/src/theme/button.ts +++ b/src/theme/button.ts @@ -4,7 +4,7 @@ import { buttonGroupVariant } from './button-group' export default (options: Required) => ({ slots: { base: ['rounded-md font-medium inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75', options.transitions && 'transition-colors'], - label: '', + label: 'truncate', leadingIcon: 'shrink-0', leadingAvatar: 'shrink-0', trailingIcon: 'shrink-0' @@ -52,11 +52,6 @@ export default (options: Required) => ({ trailingIcon: 'size-6' } }, - truncate: { - true: { - label: 'truncate' - } - }, block: { true: { base: 'w-full', diff --git a/test/components/Button.spec.ts b/test/components/Button.spec.ts index 830a0e47..59a82182 100644 --- a/test/components/Button.spec.ts +++ b/test/components/Button.spec.ts @@ -24,7 +24,6 @@ describe('Button', () => { ['with disabled', { props: { label: 'Button', disabled: true } }], ['with block', { props: { label: 'Button', block: true } }], ['with square', { props: { label: 'Button', square: true } }], - ['with truncate', { props: { label: 'Button', truncate: true } }], ['with class', { props: { class: 'rounded-full font-bold' } }], ['with ui', { props: { ui: { label: 'font-bold' } } }], // Slots diff --git a/test/components/__snapshots__/Button.spec.ts.snap b/test/components/__snapshots__/Button.spec.ts.snap index 51467a9e..5cbef038 100644 --- a/test/components/__snapshots__/Button.spec.ts.snap +++ b/test/components/__snapshots__/Button.spec.ts.snap @@ -2,7 +2,7 @@ exports[`Button > renders with block correctly 1`] = ` "" `; @@ -11,56 +11,56 @@ exports[`Button > renders with class correctly 1`] = `"" `; exports[`Button > renders with color gray correctly 1`] = ` "" `; exports[`Button > renders with color green correctly 1`] = ` "" `; exports[`Button > renders with color primary correctly 1`] = ` "" `; exports[`Button > renders with color red correctly 1`] = ` "" `; exports[`Button > renders with color white correctly 1`] = ` "" `; exports[`Button > renders with default slot correctly 1`] = ` "" `; exports[`Button > renders with disabled correctly 1`] = ` "" `; @@ -74,7 +74,7 @@ exports[`Button > renders with icon correctly 1`] = ` exports[`Button > renders with label correctly 1`] = ` "" `; @@ -116,42 +116,42 @@ exports[`Button > renders with loadingIcon correctly 1`] = ` exports[`Button > renders with size lg correctly 1`] = ` "" `; exports[`Button > renders with size md correctly 1`] = ` "" `; exports[`Button > renders with size sm correctly 1`] = ` "" `; exports[`Button > renders with size xl correctly 1`] = ` "" `; exports[`Button > renders with size xs correctly 1`] = ` "" `; exports[`Button > renders with square correctly 1`] = ` "" `; @@ -177,53 +177,46 @@ exports[`Button > renders with trailingIcon correctly 1`] = ` " `; -exports[`Button > renders with truncate correctly 1`] = ` -"" -`; - exports[`Button > renders with ui correctly 1`] = `""`; exports[`Button > renders with variant ghost correctly 1`] = ` "" `; exports[`Button > renders with variant link correctly 1`] = ` "" `; exports[`Button > renders with variant outline correctly 1`] = ` "" `; exports[`Button > renders with variant soft correctly 1`] = ` "" `; exports[`Button > renders with variant solid correctly 1`] = ` "" `; exports[`Button > renders with variant subtle correctly 1`] = ` "" `; diff --git a/test/components/__snapshots__/ButtonGroup.spec.ts.snap b/test/components/__snapshots__/ButtonGroup.spec.ts.snap index ea761928..2f76c8b5 100644 --- a/test/components/__snapshots__/ButtonGroup.spec.ts.snap +++ b/test/components/__snapshots__/ButtonGroup.spec.ts.snap @@ -6,7 +6,7 @@ exports[`ButtonGroup > renders orientation vertical with default slot correctly " @@ -22,7 +22,7 @@ exports[`ButtonGroup > renders with default slot correctly 1`] = ` " @@ -34,7 +34,7 @@ exports[`ButtonGroup > renders with size lg correctly 1`] = ` " @@ -46,7 +46,7 @@ exports[`ButtonGroup > renders with size md correctly 1`] = ` " @@ -58,7 +58,7 @@ exports[`ButtonGroup > renders with size sm correctly 1`] = ` " @@ -70,7 +70,7 @@ exports[`ButtonGroup > renders with size xl correctly 1`] = ` " @@ -82,7 +82,7 @@ exports[`ButtonGroup > renders with size xs correctly 1`] = ` " diff --git a/test/components/__snapshots__/Pagination.spec.ts.snap b/test/components/__snapshots__/Pagination.spec.ts.snap index 93e2f842..0e06174f 100644 --- a/test/components/__snapshots__/Pagination.spec.ts.snap +++ b/test/components/__snapshots__/Pagination.spec.ts.snap @@ -9,19 +9,19 @@ exports[`Pagination > renders with active color black correctly 1`] = ` Ellipsis slotEllipsis slotNext slotPrev slot diff --git a/test/components/__snapshots__/Toast.spec.ts.snap b/test/components/__snapshots__/Toast.spec.ts.snap index c812742e..3cc16955 100644 --- a/test/components/__snapshots__/Toast.spec.ts.snap +++ b/test/components/__snapshots__/Toast.spec.ts.snap @@ -14,7 +14,7 @@ exports[`Toast > renders with actions correctly 1`] = `