@livestorm/ui-vue 1.1.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +164 -32
- package/components-vite.js +5 -5
- package/components.d.ts +3 -3
- package/dist/UiTimelineItem.vue_vue_type_style_index_0_lang-DOLFRKcb.mjs +5565 -0
- package/dist/a11y-DIdrv5Mn.mjs +66 -0
- package/dist/breakpoints.mjs +9 -0
- package/dist/bus.mjs +5 -0
- package/dist/components.mjs +214 -1663
- package/dist/index.mjs +84 -166
- package/dist/integrations.mjs +8 -0
- package/dist/layouts.mjs +236 -0
- package/dist/responsive.mjs +25 -0
- package/dist/slot.mjs +21 -0
- package/dist/toastDSV2-wMh-UMzW.mjs +74 -0
- package/dist/types/index.d.ts +84 -0
- package/dist/types/src/components/Toast/LayoutToasts.vue.d.ts +3 -0
- package/dist/types/src/components/Toast/ToastMessage.vue.d.ts +21 -0
- package/dist/types/src/components/Toast/toastDSV2.d.ts +102 -0
- package/dist/types/src/components/UiActionBar/UiActionBar.vue.d.ts +44 -0
- package/dist/types/src/components/UiActionBar/UiActionBarItem.vue.d.ts +47 -0
- package/dist/types/src/components/UiActionBar/UiActionBarSeparator.vue.d.ts +3 -0
- package/dist/types/src/components/UiActionBar/index.d.ts +4 -0
- package/dist/types/src/components/UiActionBar/types.d.ts +14 -0
- package/dist/types/src/components/UiAnimatedLogo/UiAnimatedLogo.vue.d.ts +10 -0
- package/dist/types/src/components/UiAnimatedLogo/animations-links.d.ts +3 -0
- package/dist/types/src/components/UiAvatar/UiAvatar.vue.d.ts +55 -0
- package/dist/types/src/components/UiAvatar/index.d.ts +1 -0
- package/dist/types/src/components/UiAvatarList/UiAvatarList.vue.d.ts +28 -0
- package/dist/types/src/components/UiAvatarList/index.d.ts +1 -0
- package/dist/types/src/components/UiBadge/UiBadge.vue.d.ts +47 -0
- package/dist/types/src/components/UiBadge/index.d.ts +1 -0
- package/dist/types/src/components/UiBanner/UiBanner.vue.d.ts +96 -0
- package/dist/types/src/components/UiBanner/index.d.ts +2 -0
- package/dist/types/src/components/UiBreadcrumb/UiBreadcrumb.vue.d.ts +15 -0
- package/dist/types/src/components/UiBreadcrumb/index.d.ts +2 -0
- package/dist/types/src/components/UiButton/UiButton.vue.d.ts +249 -0
- package/dist/types/src/components/UiButtonGroup/UiButtonGroup.vue.d.ts +42 -0
- package/dist/types/src/components/UiButtonGroup/UiButtonGroupItem.vue.d.ts +21 -0
- package/dist/types/src/components/UiButtonGroup/index.d.ts +3 -0
- package/dist/types/src/components/UiButtonGroup/types.d.ts +10 -0
- package/dist/types/src/components/UiCard/UiCard.vue.d.ts +31 -0
- package/dist/types/src/components/UiCarousel/UiCarousel.vue.d.ts +63 -0
- package/dist/types/src/components/UiCarousel/index.d.ts +2 -0
- package/dist/types/src/components/UiColorField/UiColorField.vue.d.ts +19 -0
- package/dist/types/src/components/UiColorField/index.d.ts +2 -0
- package/dist/types/src/components/UiColorField/types.d.ts +29 -0
- package/dist/types/src/components/UiColorPicker/UiColorPicker.vue.d.ts +35 -0
- package/dist/types/src/components/UiColorPicker/index.d.ts +2 -0
- package/dist/types/src/components/UiColorPicker/types.d.ts +97 -0
- package/dist/types/src/components/UiDialog/MarketplaceHeaderExample.vue.d.ts +28 -0
- package/dist/types/src/components/UiDialog/UiDialog.vue.d.ts +18 -0
- package/dist/types/src/components/UiDialog/UiDialogClose.vue.d.ts +10 -0
- package/dist/types/src/components/UiDialog/UiDialogContent.vue.d.ts +54 -0
- package/dist/types/src/components/UiDialog/UiDialogFooter.vue.d.ts +13 -0
- package/dist/types/src/components/UiDialog/UiDialogTrigger.vue.d.ts +14 -0
- package/dist/types/src/components/UiDialog/index.d.ts +7 -0
- package/dist/types/src/components/UiDropdown/UiDropdown.vue.d.ts +42 -0
- package/dist/types/src/components/UiDropdown/UiDropdownContent.vue.d.ts +32 -0
- package/dist/types/src/components/UiDropdown/UiDropdownItem.vue.d.ts +27 -0
- package/dist/types/src/components/UiDropdown/UiDropdownSeparator.vue.d.ts +3 -0
- package/dist/types/src/components/UiDropdown/UiDropdownTrigger.vue.d.ts +45 -0
- package/dist/types/src/components/UiDropdown/context.d.ts +7 -0
- package/dist/types/src/components/UiDropdown/index.d.ts +6 -0
- package/dist/types/src/components/UiEmptyState/UiEmptyState.vue.d.ts +29 -0
- package/dist/types/src/components/UiFieldWrapper/UiFieldWrapper.vue.d.ts +36 -0
- package/dist/types/src/components/UiFieldWrapper/index.d.ts +1 -0
- package/dist/types/src/components/UiForm/UiFormField.types.d.ts +22 -0
- package/dist/types/src/components/UiForm/UiFormField.vue.d.ts +34 -0
- package/dist/types/src/components/UiForm/index.d.ts +3 -0
- package/dist/types/src/components/UiHorizontalSeparator/UiHorizontalSeparator.vue.d.ts +6 -0
- package/dist/types/src/components/UiInputCheckbox/UiInputCheckbox.vue.d.ts +108 -0
- package/dist/types/src/components/UiInputCheckbox/index.d.ts +2 -0
- package/dist/types/src/components/UiInputCheckbox/types.d.ts +1 -0
- package/dist/types/src/components/UiInputSelect/UiInputSelect.vue.d.ts +66 -0
- package/dist/types/src/components/UiInputSelect/index.d.ts +2 -0
- package/dist/types/src/components/UiInputSelect/types.d.ts +1 -0
- package/dist/types/src/components/UiInputTextarea/UiInputTextarea.vue.d.ts +49 -0
- package/dist/types/src/components/UiInputTextarea/index.d.ts +2 -0
- package/dist/types/src/components/UiInputTextarea/types.d.ts +1 -0
- package/dist/types/src/components/UiLabel/UiLabel.vue.d.ts +17 -0
- package/dist/types/src/components/UiList/UiList.vue.d.ts +27 -0
- package/dist/types/src/components/UiListItem/UiListItem.vue.d.ts +35 -0
- package/dist/types/src/components/UiLoader/UiLoader.vue.d.ts +17 -0
- package/dist/types/src/components/UiLogo/UiLogo.vue.d.ts +20 -0
- package/dist/types/src/components/UiLogo/variants/PulseVariant.vue.d.ts +3 -0
- package/dist/types/src/components/UiLogo/variants/TornadoVariant.vue.d.ts +3 -0
- package/dist/types/src/components/UiMenu/UiMenu.vue.d.ts +18 -0
- package/dist/types/src/components/UiMenu/UiMenuContent.vue.d.ts +30 -0
- package/dist/types/src/components/UiMenu/UiMenuGroup.vue.d.ts +16 -0
- package/dist/types/src/components/UiMenu/UiMenuItem.vue.d.ts +18 -0
- package/dist/types/src/components/UiMenu/UiMenuLabel.vue.d.ts +13 -0
- package/dist/types/src/components/UiMenu/UiMenuSeparator.vue.d.ts +13 -0
- package/dist/types/src/components/UiMenu/UiMenuSub.vue.d.ts +18 -0
- package/dist/types/src/components/UiMenu/UiMenuSubContent.vue.d.ts +32 -0
- package/dist/types/src/components/UiMenu/UiMenuSubTrigger.vue.d.ts +14 -0
- package/dist/types/src/components/UiMenu/UiMenuTrigger.vue.d.ts +14 -0
- package/dist/types/src/components/UiMenu/index.d.ts +10 -0
- package/dist/types/src/components/UiPage/UiPage.vue.d.ts +37 -0
- package/dist/types/src/components/UiPageHeader/UiPageHeader.vue.d.ts +33 -0
- package/dist/types/src/components/UiPopover/UiPopover.vue.d.ts +18 -0
- package/dist/types/src/components/UiPopover/UiPopoverAnchor.vue.d.ts +14 -0
- package/dist/types/src/components/UiPopover/UiPopoverContent.vue.d.ts +28 -0
- package/dist/types/src/components/UiPopover/UiPopoverTrigger.vue.d.ts +14 -0
- package/dist/types/src/components/UiProgress/UiProgress.vue.d.ts +15 -0
- package/dist/types/src/components/UiProgress/index.d.ts +2 -0
- package/dist/types/src/components/UiProgress/types.d.ts +4 -0
- package/dist/types/src/components/UiRoomButton/UiRoomButton.vue.d.ts +29 -0
- package/dist/types/src/components/UiShell/UiShell.vue.d.ts +24 -0
- package/dist/types/src/components/UiSideMenu/UiSideMenu.vue.d.ts +64 -0
- package/dist/types/src/components/UiSideMenu/UiSideMenuBottom.vue.d.ts +7 -0
- package/dist/types/src/components/UiSideMenu/UiSideMenuItem.vue.d.ts +53 -0
- package/dist/types/src/components/UiSideMenu/UiSideMenuItemContent.vue.d.ts +43 -0
- package/dist/types/src/components/UiSideMenu/UiSideMenuTop.vue.d.ts +7 -0
- package/dist/types/src/components/UiSideMenu/injection.d.ts +7 -0
- package/dist/types/src/components/UiSideMenu/types.d.ts +39 -0
- package/dist/types/src/components/UiSideMenu/useLabelHidden.d.ts +2 -0
- package/dist/types/src/components/UiSideMenu/useSideMenuLayout.d.ts +7 -0
- package/dist/types/src/components/UiStepper/UiStepper.vue.d.ts +18 -0
- package/dist/types/src/components/UiStepper/UiStepperDescription.vue.d.ts +14 -0
- package/dist/types/src/components/UiStepper/UiStepperIndicator.vue.d.ts +20 -0
- package/dist/types/src/components/UiStepper/UiStepperItem.vue.d.ts +19 -0
- package/dist/types/src/components/UiStepper/UiStepperSeparator.vue.d.ts +10 -0
- package/dist/types/src/components/UiStepper/UiStepperTitle.vue.d.ts +14 -0
- package/dist/types/src/components/UiStepper/index.d.ts +7 -0
- package/dist/types/src/components/UiTable/UiTable.vue.d.ts +20 -0
- package/dist/types/src/components/UiTable/UiTableBody.vue.d.ts +13 -0
- package/dist/types/src/components/UiTable/UiTableCell.vue.d.ts +13 -0
- package/dist/types/src/components/UiTable/UiTableHeader.vue.d.ts +13 -0
- package/dist/types/src/components/UiTable/UiTableHeaderCell.vue.d.ts +13 -0
- package/dist/types/src/components/UiTable/UiTableRow.vue.d.ts +16 -0
- package/dist/types/src/components/UiTable/index.d.ts +6 -0
- package/dist/types/src/components/UiTabs/UiTabs.vue.d.ts +37 -0
- package/dist/types/src/components/UiTabs/index.d.ts +2 -0
- package/dist/types/src/components/UiTag/UiTag.vue.d.ts +43 -0
- package/dist/types/src/components/UiTag/index.d.ts +1 -0
- package/dist/types/src/components/UiTextField/UiTextField.vue.d.ts +65 -0
- package/dist/types/src/components/UiTextField/index.d.ts +2 -0
- package/dist/types/src/components/UiTextField/types.d.ts +2 -0
- package/dist/types/src/components/UiTimeline/UiTimeline.vue.d.ts +19 -0
- package/dist/types/src/components/UiTimeline/UiTimelineItem.vue.d.ts +28 -0
- package/dist/types/src/components/UiTimeline/index.d.ts +2 -0
- package/dist/types/src/components/UiTooltip/UiTooltip.vue.d.ts +18 -0
- package/dist/types/src/components/UiTooltip/UiTooltipContent.vue.d.ts +54 -0
- package/dist/types/src/components/UiTooltip/UiTooltipProvider.vue.d.ts +17 -0
- package/dist/types/src/components/UiTooltip/UiTooltipTrigger.vue.d.ts +14 -0
- package/dist/types/src/components/UiTooltip/index.d.ts +4 -0
- package/dist/types/src/composables/useButtonStyles.d.ts +20 -0
- package/dist/types/src/composables/useMobileMenu.d.ts +11 -0
- package/dist/types/src/composables/useThemeAndModes.d.ts +34 -0
- package/dist/types/src/constants/index.d.ts +2 -0
- package/dist/types/src/constants/sizes.d.ts +2 -0
- package/dist/types/src/constants/themes.d.ts +22 -0
- package/dist/types/src/integrations/index.d.ts +1 -0
- package/dist/types/src/layouts/index.d.ts +2 -0
- package/dist/types/src/mixins/DynamicAction.d.ts +30 -0
- package/dist/types/src/primitives.d.ts +6 -0
- package/dist/types/src/theme.d.ts +1 -0
- package/dist/types/src/utils/a11y.d.ts +2 -0
- package/dist/types/src/utils/breakpoints.d.ts +9 -0
- package/dist/types/src/utils/bus.d.ts +2 -0
- package/dist/types/src/utils/clipboard.d.ts +4 -0
- package/dist/types/src/utils/devices.d.ts +19 -0
- package/dist/types/src/utils/elements.d.ts +1 -0
- package/dist/types/src/utils/index.d.ts +9 -0
- package/dist/types/src/utils/numbers.d.ts +30 -0
- package/dist/types/src/utils/responsive.d.ts +5 -0
- package/dist/types/src/utils/responsive.types.d.ts +12 -0
- package/dist/types/src/utils/router.d.ts +1 -0
- package/dist/types/src/utils/slot.d.ts +8 -0
- package/dist/types/src/utils/stack-view.d.ts +10 -0
- package/dist/types/src/utils/uid.d.ts +1 -0
- package/dist/types/style.d.ts +1 -0
- package/dist/ui-vue.css +1 -0
- package/dist/useThemeAndModes-DY5SDC0a.mjs +109 -0
- package/dist/utils.mjs +111 -0
- package/index.d.ts +88 -2
- package/index.js +169 -16
- package/integrations.d.ts +10 -0
- package/package.json +131 -63
- package/src/components/Toast/LayoutToasts.vue +63 -0
- package/src/components/Toast/ToastMessage.vue +208 -0
- package/src/components/Toast/toastDSV2.ts +151 -0
- package/src/components/UiActionBar/UiActionBar.vue +86 -0
- package/src/components/UiActionBar/UiActionBarItem.vue +179 -0
- package/src/components/UiActionBar/UiActionBarSeparator.vue +18 -0
- package/src/components/UiActionBar/index.ts +4 -0
- package/src/components/UiActionBar/types.ts +24 -0
- package/src/components/UiAnimatedLogo/UiAnimatedLogo.vue +47 -0
- package/src/components/UiAnimatedLogo/animations-links.ts +6 -0
- package/src/components/UiAvatar/UiAvatar.vue +186 -0
- package/src/components/UiAvatar/index.js +1 -0
- package/src/components/UiAvatarList/UiAvatarList.vue +109 -0
- package/src/components/UiAvatarList/index.js +1 -0
- package/src/components/UiBadge/UiBadge.vue +161 -0
- package/src/components/UiBadge/index.ts +2 -0
- package/src/components/UiBanner/UiBanner.vue +363 -0
- package/src/components/UiBanner/index.ts +2 -0
- package/src/components/UiBreadcrumb/UiBreadcrumb.vue +93 -0
- package/src/components/UiBreadcrumb/index.ts +2 -0
- package/src/components/UiButton/UiButton.vue +319 -0
- package/src/components/UiButtonGroup/UiButtonGroup.vue +198 -0
- package/src/components/UiButtonGroup/UiButtonGroupItem.vue +123 -0
- package/src/components/UiButtonGroup/index.ts +3 -0
- package/src/components/UiButtonGroup/types.ts +24 -0
- package/src/components/UiCard/UiCard.vue +112 -0
- package/src/components/UiCarousel/UiCarousel.vue +215 -0
- package/src/components/UiCarousel/index.ts +2 -0
- package/src/components/UiColorField/UiColorField.vue +158 -0
- package/src/components/UiColorField/index.ts +2 -0
- package/src/components/UiColorField/types.ts +30 -0
- package/src/components/UiColorPicker/UiColorPicker.vue +487 -0
- package/src/components/UiColorPicker/index.ts +2 -0
- package/src/components/UiColorPicker/types.ts +103 -0
- package/src/components/UiDialog/MarketplaceHeaderExample.vue +217 -0
- package/src/components/UiDialog/UiDialog.md +97 -0
- package/src/components/UiDialog/UiDialog.vue +16 -0
- package/src/components/UiDialog/UiDialogClose.vue +29 -0
- package/src/components/UiDialog/UiDialogContent.vue +238 -0
- package/src/components/UiDialog/UiDialogFooter.vue +9 -0
- package/src/components/UiDialog/UiDialogTrigger.vue +12 -0
- package/src/components/UiDialog/index.ts +18 -0
- package/src/components/UiDropdown/UiDropdown.vue +48 -0
- package/src/components/UiDropdown/UiDropdownContent.vue +72 -0
- package/src/components/UiDropdown/UiDropdownItem.vue +75 -0
- package/src/components/UiDropdown/UiDropdownSeparator.vue +7 -0
- package/src/components/UiDropdown/UiDropdownTrigger.vue +239 -0
- package/src/components/UiDropdown/context.ts +9 -0
- package/src/components/UiDropdown/index.ts +21 -0
- package/src/components/UiEmptyState/UiEmptyState.vue +80 -0
- package/src/components/UiFieldWrapper/UiFieldWrapper.vue +79 -0
- package/src/components/UiFieldWrapper/index.ts +1 -0
- package/src/components/UiForm/UiFormField.types.ts +24 -0
- package/src/components/UiForm/UiFormField.vue +66 -0
- package/src/components/UiForm/index.ts +3 -0
- package/src/components/UiHorizontalSeparator/UiHorizontalSeparator.vue +28 -0
- package/src/components/UiInputCheckbox/UiInputCheckbox.vue +477 -0
- package/src/components/UiInputCheckbox/index.ts +2 -0
- package/src/components/UiInputCheckbox/types.ts +1 -0
- package/src/components/UiInputSelect/UiInputSelect.vue +166 -0
- package/src/components/UiInputSelect/index.ts +2 -0
- package/src/components/UiInputSelect/types.ts +1 -0
- package/src/components/UiInputTextarea/UiInputTextarea.vue +219 -0
- package/src/components/UiInputTextarea/index.ts +2 -0
- package/src/components/UiInputTextarea/types.ts +1 -0
- package/src/components/UiLabel/UiLabel.vue +34 -0
- package/src/components/UiList/UiList.vue +45 -0
- package/src/components/UiListItem/UiListItem.vue +108 -0
- package/src/components/UiLoader/UiLoader.vue +45 -0
- package/src/components/UiLogo/UiLogo.vue +99 -0
- package/src/components/UiLogo/variants/PulseVariant.vue +51 -0
- package/src/components/UiLogo/variants/TornadoVariant.vue +147 -0
- package/src/components/UiMenu/UiMenu.vue +15 -0
- package/src/components/UiMenu/UiMenuContent.vue +25 -0
- package/src/components/UiMenu/UiMenuGroup.vue +19 -0
- package/src/components/UiMenu/UiMenuItem.vue +18 -0
- package/src/components/UiMenu/UiMenuLabel.vue +9 -0
- package/src/components/UiMenu/UiMenuSeparator.vue +9 -0
- package/src/components/UiMenu/UiMenuSub.vue +15 -0
- package/src/components/UiMenu/UiMenuSubContent.vue +23 -0
- package/src/components/UiMenu/UiMenuSubTrigger.vue +17 -0
- package/src/components/UiMenu/UiMenuTrigger.vue +13 -0
- package/src/components/UiMenu/index.ts +10 -0
- package/src/components/UiPage/UiPage.vue +201 -0
- package/src/components/UiPageHeader/UiPageHeader.vue +128 -0
- package/src/components/UiPopover/UiPopover.vue +16 -0
- package/src/components/UiPopover/UiPopoverAnchor.vue +12 -0
- package/src/components/UiPopover/UiPopoverContent.vue +26 -0
- package/src/components/UiPopover/UiPopoverTrigger.vue +19 -0
- package/src/components/UiProgress/UiProgress.vue +92 -0
- package/src/components/UiProgress/index.ts +2 -0
- package/src/components/UiProgress/types.ts +5 -0
- package/src/components/UiRoomButton/UiRoomButton.vue +240 -0
- package/src/components/UiShell/UiShell.vue +88 -0
- package/src/components/UiSideMenu/UiSideMenu.vue +513 -0
- package/src/components/UiSideMenu/UiSideMenuBottom.vue +27 -0
- package/src/components/UiSideMenu/UiSideMenuItem.vue +102 -0
- package/src/components/UiSideMenu/UiSideMenuItemContent.vue +172 -0
- package/src/components/UiSideMenu/UiSideMenuTop.vue +29 -0
- package/src/components/UiSideMenu/injection.ts +9 -0
- package/src/components/UiSideMenu/types.ts +41 -0
- package/src/components/UiSideMenu/useLabelHidden.ts +33 -0
- package/src/components/UiSideMenu/useSideMenuLayout.ts +12 -0
- package/src/components/UiStepper/UiStepper.vue +40 -0
- package/src/components/UiStepper/UiStepperDescription.vue +27 -0
- package/src/components/UiStepper/UiStepperIndicator.vue +93 -0
- package/src/components/UiStepper/UiStepperItem.vue +30 -0
- package/src/components/UiStepper/UiStepperSeparator.vue +49 -0
- package/src/components/UiStepper/UiStepperTitle.vue +24 -0
- package/src/components/UiStepper/index.ts +17 -0
- package/src/components/UiTable/UiTable.vue +24 -0
- package/src/components/UiTable/UiTableBody.vue +5 -0
- package/src/components/UiTable/UiTableCell.vue +26 -0
- package/src/components/UiTable/UiTableHeader.vue +17 -0
- package/src/components/UiTable/UiTableHeaderCell.vue +19 -0
- package/src/components/UiTable/UiTableRow.vue +27 -0
- package/src/components/UiTable/index.ts +6 -0
- package/src/components/UiTabs/UiTabs.vue +218 -0
- package/src/components/UiTabs/index.ts +5 -0
- package/src/components/UiTag/UiTag.vue +187 -0
- package/src/components/UiTag/index.js +1 -0
- package/src/components/UiTextField/UiTextField.vue +370 -0
- package/src/components/UiTextField/index.ts +2 -0
- package/src/components/UiTextField/types.ts +2 -0
- package/src/components/UiTimeline/README.md +169 -0
- package/src/components/UiTimeline/UiTimeline.vue +58 -0
- package/src/components/UiTimeline/UiTimelineItem.vue +141 -0
- package/src/components/UiTimeline/index.ts +2 -0
- package/src/components/UiTooltip/UiTooltip.vue +16 -0
- package/src/components/UiTooltip/UiTooltipContent.vue +86 -0
- package/src/components/UiTooltip/UiTooltipProvider.vue +15 -0
- package/src/components/UiTooltip/UiTooltipTrigger.vue +19 -0
- package/src/components/UiTooltip/index.js +4 -0
- package/src/composables/useButtonStyles.ts +242 -0
- package/src/composables/useMobileMenu.ts +57 -0
- package/src/composables/useThemeAndModes.ts +225 -0
- package/src/constants/index.ts +2 -0
- package/src/constants/sizes.ts +2 -0
- package/src/constants/themes.ts +34 -0
- package/src/css/{body.postcss → body.css} +3 -2
- package/src/css/reka-animations.css +209 -0
- package/src/css/{transitions.postcss → transitions.css} +12 -5
- package/src/global.d.ts +181 -0
- package/src/integrations/index.js +1 -0
- package/src/layouts/index.js +5 -0
- package/src/mixins/DynamicAction.js +5 -3
- package/src/primitives.ts +6 -0
- package/src/theme.ts +1 -0
- package/src/utils/a11y.ts +8 -0
- package/src/utils/{breakpoints.js → breakpoints.ts} +1 -0
- package/src/utils/clipboard.js +2 -2
- package/src/utils/devices.js +0 -3
- package/src/utils/index.js +2 -1
- package/src/utils/numbers.ts +61 -0
- package/src/utils/responsive.types.ts +12 -0
- package/src/utils/{slot.js → slot.ts} +18 -1
- package/style.js +3 -12
- package/theme.d.ts +1 -0
- package/.env +0 -1
- package/.eslintignore +0 -4
- package/.eslintrc.js +0 -49
- package/.pkg +0 -11
- package/babel.config.js +0 -5
- package/build/Dockerfile +0 -31
- package/ci/ci.yml +0 -54
- package/components-webpack.js +0 -29
- package/dist/environment-da321c85.mjs +0 -1656
- package/dist/style.css +0 -1
- package/plugins.js +0 -17
- package/postcss.config.js +0 -1
- package/src/components/BaseAutocomplete/BaseAutocomplete.spec.js +0 -506
- package/src/components/BaseAutocomplete/BaseAutocomplete.stories.js +0 -184
- package/src/components/BaseAutocomplete/BaseAutocomplete.vue +0 -431
- package/src/components/BaseBanner/BaseBanner.spec.js +0 -32
- package/src/components/BaseBanner/BaseBanner.stories.js +0 -133
- package/src/components/BaseBanner/BaseBanner.vue +0 -229
- package/src/components/BaseButton/BaseButton.spec.js +0 -98
- package/src/components/BaseButton/BaseButton.stories.js +0 -300
- package/src/components/BaseButton/BaseButton.vue +0 -193
- package/src/components/BaseButton/__snapshots__/BaseButton.spec.js.snap +0 -37
- package/src/components/BaseButton/__snapshots__/BaseButton.spec.js.snap.old +0 -31
- package/src/components/BaseCheckbox/BaseCheckbox.stories.js +0 -157
- package/src/components/BaseCheckbox/BaseCheckbox.vue +0 -180
- package/src/components/BaseDropdownMenu/BaseDropdownMenu.stories.js +0 -84
- package/src/components/BaseDropdownMenu/BaseDropdownMenu.vue +0 -251
- package/src/components/BaseDropdownMenu/BaseDropdownMenuButton.vue +0 -26
- package/src/components/BaseDropdownMenu/BaseDropdownMenuDivider.vue +0 -10
- package/src/components/BaseDropdownMenu/BaseDropdownMenuItem.vue +0 -206
- package/src/components/BaseDropdownMenu/BaseDropdownMenuSearch.vue +0 -49
- package/src/components/BaseDropdownMenu/BaseDropdownMenuTitle.vue +0 -26
- package/src/components/BaseModal/BaseModal.stories.js +0 -155
- package/src/components/BaseModal/BaseModal.vue +0 -187
- package/src/components/BaseModal/BaseModalContent.vue +0 -166
- package/src/components/BaseModal/BaseModalContentOld.vue +0 -242
- package/src/components/BaseRadio/BaseRadio.stories.js +0 -164
- package/src/components/BaseRadio/BaseRadio.vue +0 -153
- package/src/components/BaseRating/BaseRating.spec.js +0 -46
- package/src/components/BaseRating/BaseRating.stories.js +0 -46
- package/src/components/BaseRating/BaseRating.vue +0 -119
- package/src/components/BaseSelect/BaseSelect.stories.js +0 -177
- package/src/components/BaseSelect/BaseSelect.vue +0 -443
- package/src/components/BaseSelect/BaseSelectGroup.vue +0 -34
- package/src/components/BaseSelect/BaseSelectOption.vue +0 -219
- package/src/components/BaseSwitch/BaseSwitch.stories.js +0 -44
- package/src/components/BaseSwitch/BaseSwitch.vue +0 -114
- package/src/components/BaseTag/BaseTag.stories.js +0 -123
- package/src/components/BaseTag/BaseTag.vue +0 -244
- package/src/css/button.postcss +0 -363
- package/src/css/checkbox-radio.postcss +0 -188
- package/src/css/icon.postcss +0 -9
- package/src/css/loader.postcss +0 -120
- package/src/css/popper.postcss +0 -161
- package/src/css/tailwind-utilities.postcss +0 -1
- package/src/css/tailwind.postcss +0 -2
- package/style-postcss.d.ts +0 -3
- package/style-postcss.js +0 -2
- package/tailwind.config.base.cjs +0 -88
- package/tailwind.config.js +0 -9
- package/tsconfig.check.json +0 -13
- package/tsconfig.json +0 -66
- package/vite.config.js +0 -43
- package/vitest.setup.js +0 -26
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectContentProps } from 'reka-ui'
|
|
3
|
+
import { SelectContent, SelectPortal, SelectScrollDownButton, SelectScrollUpButton, SelectViewport } from 'reka-ui'
|
|
4
|
+
import { useSlots } from 'vue'
|
|
5
|
+
|
|
6
|
+
interface Props extends SelectContentProps {
|
|
7
|
+
showScrollButtons?: boolean
|
|
8
|
+
/**
|
|
9
|
+
* The color semantic mode for the dropdown content
|
|
10
|
+
* @default 'light'
|
|
11
|
+
*/
|
|
12
|
+
colorsSemantic?: 'light' | 'dark'
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
withDefaults(defineProps<Props>(), {
|
|
16
|
+
position: 'popper',
|
|
17
|
+
side: 'bottom',
|
|
18
|
+
sideOffset: 8,
|
|
19
|
+
align: 'start',
|
|
20
|
+
colorsSemantic: 'light',
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
const slots = useSlots()
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<SelectPortal>
|
|
28
|
+
<SelectContent
|
|
29
|
+
v-bind="$attrs"
|
|
30
|
+
:position="position"
|
|
31
|
+
:side-offset="sideOffset"
|
|
32
|
+
:align="align"
|
|
33
|
+
:side="side"
|
|
34
|
+
:data-colors-semantic="colorsSemantic"
|
|
35
|
+
class="ui-dropdown-content focus-indicator-none z-50 relative py-3 px-2 rounded-xl bg-surface-neutral-bg-main min-w-(--reka-select-trigger-width) max-h-(--reka-select-content-available-height) shadow-shadows-drop-shadow-lg data-[state=open]:animate-[slideDownAndFade_0.2s_ease] data-[state=closed]:animate-[slideUpAndFade_0.15s_ease]"
|
|
36
|
+
>
|
|
37
|
+
<div
|
|
38
|
+
v-if="slots.header"
|
|
39
|
+
class="sticky top-0 bg-surface-neutral-bg-main px-3 mb-3"
|
|
40
|
+
>
|
|
41
|
+
<slot name="header" />
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div class="flex flex-col gap-1 overflow-y-auto max-h-[300px]">
|
|
45
|
+
<SelectScrollUpButton
|
|
46
|
+
v-if="showScrollButtons"
|
|
47
|
+
class="flex items-center justify-center h-6 cursor-default text-text-neutral-base"
|
|
48
|
+
>
|
|
49
|
+
<div class="i-ls-chevron-up size-4" />
|
|
50
|
+
</SelectScrollUpButton>
|
|
51
|
+
|
|
52
|
+
<SelectViewport class="flex flex-col gap-1">
|
|
53
|
+
<slot />
|
|
54
|
+
</SelectViewport>
|
|
55
|
+
|
|
56
|
+
<SelectScrollDownButton
|
|
57
|
+
v-if="showScrollButtons"
|
|
58
|
+
class="flex items-center justify-center h-6 cursor-default text-text-neutral-base"
|
|
59
|
+
>
|
|
60
|
+
<div class="i-ls-chevron-down size-4" />
|
|
61
|
+
</SelectScrollDownButton>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div
|
|
65
|
+
v-if="slots.footer"
|
|
66
|
+
class="sticky bottom-0 bg-surface-neutral-bg-main"
|
|
67
|
+
>
|
|
68
|
+
<slot name="footer" />
|
|
69
|
+
</div>
|
|
70
|
+
</SelectContent>
|
|
71
|
+
</SelectPortal>
|
|
72
|
+
</template>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectItemProps } from 'reka-ui'
|
|
3
|
+
import { SelectItem, SelectItemText } from 'reka-ui'
|
|
4
|
+
import { inject } from 'vue'
|
|
5
|
+
import { UI_DROPDOWN_MULTIPLE_KEY } from './context'
|
|
6
|
+
|
|
7
|
+
interface Props extends SelectItemProps {
|
|
8
|
+
title?: string
|
|
9
|
+
description?: string
|
|
10
|
+
icon?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
withDefaults(defineProps<Props>(), {
|
|
14
|
+
title: undefined,
|
|
15
|
+
description: undefined,
|
|
16
|
+
icon: undefined,
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
// `UiDropdown` provides this when `multiple` is set so items render a
|
|
20
|
+
// leading checkbox automatically. Falls back to single-select behavior
|
|
21
|
+
// when the item is used outside a `UiDropdown` (defensive default).
|
|
22
|
+
const isMultiple = inject(UI_DROPDOWN_MULTIPLE_KEY, undefined)
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<SelectItem
|
|
27
|
+
v-bind="$attrs"
|
|
28
|
+
:value="value"
|
|
29
|
+
:disabled="disabled"
|
|
30
|
+
class="focus-indicator-none group flex px-3 py-1 rounded-md cursor-pointer outline-hidden transition-all duration-150 ease-in-out data-highlighted:bg-actions-neutral-hover-overlay data-[state=checked]:bg-actions-primary-active-overlay data-disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:pointer-events-none"
|
|
31
|
+
>
|
|
32
|
+
<div class="flex flex-1 gap-2 items-center overflow-hidden">
|
|
33
|
+
<!-- Multi-select indicator: visually mirrors `UiInputCheckbox` (same
|
|
34
|
+
size, border radius, primary fill, and `i-ls-checkbox-check`
|
|
35
|
+
icon) without dragging in the input's runtime/a11y plumbing.
|
|
36
|
+
Driven entirely by the parent `SelectItem`'s `data-[state=checked]`
|
|
37
|
+
attribute — no per-item state. -->
|
|
38
|
+
<div
|
|
39
|
+
v-if="isMultiple"
|
|
40
|
+
class="shrink-0 size-4 rounded-sm border border-borders-neutral-strong bg-surface-neutral-bg-main grid place-content-center transition-colors group-data-[state=checked]:bg-actions-primary-idle group-data-[state=checked]:border-borders-primary-default"
|
|
41
|
+
>
|
|
42
|
+
<div class="i-ls-checkbox-check size-3 text-actions-neutral-invert-idle opacity-0 group-data-[state=checked]:opacity-100" />
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div
|
|
46
|
+
v-if="icon"
|
|
47
|
+
:class="[icon, 'size-4']"
|
|
48
|
+
class="shrink-0 group-data-highlighted:text-actions-neutral-idle group-data-[state=checked]:text-actions-primary-idle"
|
|
49
|
+
/>
|
|
50
|
+
|
|
51
|
+
<div class="flex flex-1 flex-col items-start justify-center min-w-0 py-1.5">
|
|
52
|
+
<SelectItemText class="whitespace-nowrap text-content-text-md-regular text-actions-neutral-idle group-data-highlighted:text-actions-neutral-idle group-data-[state=checked]:text-actions-primary-idle">
|
|
53
|
+
<slot name="title">
|
|
54
|
+
{{ title }}
|
|
55
|
+
</slot>
|
|
56
|
+
</SelectItemText>
|
|
57
|
+
<div
|
|
58
|
+
v-if="description || $slots.description"
|
|
59
|
+
class="text-content-legends-medium-md text-text-neutral-secondary group-data-highlighted:text-text-neutral-secondary group-data-[state=checked]:text-text-primary-secondary"
|
|
60
|
+
>
|
|
61
|
+
<slot name="description">
|
|
62
|
+
{{ description }}
|
|
63
|
+
</slot>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div
|
|
68
|
+
v-if="$slots.right"
|
|
69
|
+
class="shrink-0 ml-auto"
|
|
70
|
+
>
|
|
71
|
+
<slot name="right" />
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</SelectItem>
|
|
75
|
+
</template>
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectTriggerProps } from 'reka-ui'
|
|
3
|
+
import { SelectIcon, SelectTrigger, SelectValue } from 'reka-ui'
|
|
4
|
+
import { computed, useSlots } from 'vue'
|
|
5
|
+
import { useButtonStyles } from '../../composables/useButtonStyles'
|
|
6
|
+
|
|
7
|
+
type TSize = 'sm' | 'md' | 'lg' | 'xl'
|
|
8
|
+
type TColor = 'neutral' | 'primary'
|
|
9
|
+
// Mirrors a subset of `UiButton`'s variants: `secondary` is the bordered field
|
|
10
|
+
// (the default), `tertiary` is the borderless, text-only look.
|
|
11
|
+
type TVariant = 'secondary' | 'tertiary'
|
|
12
|
+
|
|
13
|
+
interface Props extends SelectTriggerProps {
|
|
14
|
+
placeholder?: string
|
|
15
|
+
showIcon?: boolean
|
|
16
|
+
disabled?: boolean
|
|
17
|
+
size?: TSize
|
|
18
|
+
/**
|
|
19
|
+
* Visual color of the trigger. Defaults to `neutral` (the standard field
|
|
20
|
+
* look). `primary` mirrors the primary action palette and is intended for
|
|
21
|
+
* filter chips that need to stand out next to a button group.
|
|
22
|
+
*/
|
|
23
|
+
color?: TColor
|
|
24
|
+
/**
|
|
25
|
+
* Visual variant, named to match `UiButton`. `secondary` (default) is the
|
|
26
|
+
* bordered field look. `tertiary` drops the border + background to read like
|
|
27
|
+
* a `UiButton` tertiary — the trigger shows only colored text with a hover
|
|
28
|
+
* overlay, so it sits flush next to tertiary buttons (e.g. a "View all" CTA).
|
|
29
|
+
*/
|
|
30
|
+
variant?: TVariant
|
|
31
|
+
error?: boolean
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
35
|
+
placeholder: undefined,
|
|
36
|
+
showIcon: true,
|
|
37
|
+
disabled: false,
|
|
38
|
+
size: 'md',
|
|
39
|
+
color: 'neutral',
|
|
40
|
+
variant: 'secondary',
|
|
41
|
+
error: false,
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
const slots = useSlots()
|
|
45
|
+
|
|
46
|
+
// Shared button styling — both variants pull their background / border / text /
|
|
47
|
+
// overlay tokens from the same source `UiButton` uses, so the trigger stays in
|
|
48
|
+
// lockstep with the button palette. `error` maps onto the button `error` color;
|
|
49
|
+
// otherwise the trigger's `primary`/`neutral` colors line up 1:1.
|
|
50
|
+
const buttonColor = computed(() => (props.error ? 'error' as const : props.color))
|
|
51
|
+
const { textClass, bgClass, borderClasses, beforeHoverOverlayClass } = useButtonStyles({
|
|
52
|
+
variant: () => props.variant,
|
|
53
|
+
color: buttonColor,
|
|
54
|
+
disabled: () => props.disabled,
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
const sizeClasses = computed(() => {
|
|
58
|
+
const sizes = {
|
|
59
|
+
sm: {
|
|
60
|
+
field: 'h-8 px-2 gap-1',
|
|
61
|
+
text: 'text-action-button-sm tracking-[0.05px]',
|
|
62
|
+
icon: 'size-3',
|
|
63
|
+
padding: 'px-2',
|
|
64
|
+
},
|
|
65
|
+
md: {
|
|
66
|
+
field: 'h-10 px-3 gap-1.5',
|
|
67
|
+
text: 'text-action-button-md leading-[20px] tracking-[-0.04px]',
|
|
68
|
+
icon: 'size-4',
|
|
69
|
+
padding: 'px-3',
|
|
70
|
+
},
|
|
71
|
+
lg: {
|
|
72
|
+
field: 'h-12 px-4 gap-2',
|
|
73
|
+
text: 'text-action-button-lg leading-[20px] tracking-[-0.04px]',
|
|
74
|
+
icon: 'size-4',
|
|
75
|
+
padding: 'px-4',
|
|
76
|
+
},
|
|
77
|
+
xl: {
|
|
78
|
+
field: 'h-16 px-4 gap-2',
|
|
79
|
+
text: 'text-action-button-lg leading-[24px] tracking-[-0.04px]',
|
|
80
|
+
icon: 'size-6',
|
|
81
|
+
padding: 'px-4',
|
|
82
|
+
},
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return sizes[props.size]
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
const fieldClasses = computed(() => {
|
|
89
|
+
const base = [
|
|
90
|
+
'focus-indicator-none',
|
|
91
|
+
'group',
|
|
92
|
+
'flex',
|
|
93
|
+
'items-center',
|
|
94
|
+
'justify-between',
|
|
95
|
+
'w-full',
|
|
96
|
+
'rounded-lg',
|
|
97
|
+
'border',
|
|
98
|
+
'border-solid',
|
|
99
|
+
'transition-all',
|
|
100
|
+
'duration-150',
|
|
101
|
+
'ease-in-out',
|
|
102
|
+
'relative',
|
|
103
|
+
'cursor-pointer',
|
|
104
|
+
'font-medium',
|
|
105
|
+
'focus:outline-hidden',
|
|
106
|
+
'focus-visible:ring-1',
|
|
107
|
+
'focus-visible:ring-inset',
|
|
108
|
+
// Hover overlay via ::before
|
|
109
|
+
"before:content-['']",
|
|
110
|
+
'before:absolute',
|
|
111
|
+
'before:inset-0',
|
|
112
|
+
'before:rounded-[inherit]',
|
|
113
|
+
'before:opacity-0',
|
|
114
|
+
'before:transition-opacity',
|
|
115
|
+
'before:duration-150',
|
|
116
|
+
'before:ease-in-out',
|
|
117
|
+
'before:pointer-events-none',
|
|
118
|
+
'before:z-1',
|
|
119
|
+
'hover:not-data-disabled:before:opacity-100',
|
|
120
|
+
// Children above overlay
|
|
121
|
+
'[&>*]:relative',
|
|
122
|
+
'[&>*]:z-2',
|
|
123
|
+
sizeClasses.value.field,
|
|
124
|
+
]
|
|
125
|
+
|
|
126
|
+
const state = []
|
|
127
|
+
|
|
128
|
+
if (props.disabled) {
|
|
129
|
+
state.push('opacity-50', '!cursor-not-allowed')
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Background / border / hover overlay all come from `useButtonStyles`, keyed
|
|
133
|
+
// by `variant` × `buttonColor` — the exact tokens `UiButton` uses. Tertiary
|
|
134
|
+
// resolves to no border/bg (transparent), secondary to the bordered field.
|
|
135
|
+
if (props.variant === 'tertiary') {
|
|
136
|
+
state.push('border-transparent', 'bg-transparent')
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
state.push(bgClass.value, ...borderClasses.value)
|
|
140
|
+
}
|
|
141
|
+
if (beforeHoverOverlayClass.value) state.push(beforeHoverOverlayClass.value)
|
|
142
|
+
|
|
143
|
+
// Focus ring + open-state border are trigger-specific (a button has no
|
|
144
|
+
// open state). Error keeps its danger-colored focus ring; everything else
|
|
145
|
+
// uses the standard primary focus highlight.
|
|
146
|
+
if (props.error) {
|
|
147
|
+
state.push(
|
|
148
|
+
'focus-visible:border-borders-danger-strong',
|
|
149
|
+
'focus-visible:ring-borders-danger-strong',
|
|
150
|
+
'data-[state=open]:border-borders-danger-strong',
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
state.push('focus-visible:ring-focus-ring')
|
|
155
|
+
if (props.variant !== 'tertiary') {
|
|
156
|
+
state.push(
|
|
157
|
+
'focus-visible:border-actions-primary-idle-alpha-strong',
|
|
158
|
+
'data-[state=open]:border-actions-primary-idle-alpha-strong',
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return [...base, ...state].join(' ')
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
const isPrimary = computed(() => !props.error && props.color === 'primary')
|
|
167
|
+
const isTertiary = computed(() => props.variant === 'tertiary')
|
|
168
|
+
|
|
169
|
+
const textClasses = computed(() => {
|
|
170
|
+
// Tertiary defers its text color to the shared button palette so it matches
|
|
171
|
+
// a `UiButton variant="tertiary"` of the same color. Secondary keeps the
|
|
172
|
+
// field text tokens (filled value reads as body text, not an action label).
|
|
173
|
+
const colorClass = isTertiary.value
|
|
174
|
+
? textClass.value
|
|
175
|
+
: isPrimary.value ? 'text-actions-primary-idle' : 'text-text-neutral-base'
|
|
176
|
+
// Placeholder color: primary (incl. tertiary-primary) keeps the primary
|
|
177
|
+
// token so an empty filter chip still reads as actionable; everything else
|
|
178
|
+
// uses the muted placeholder token.
|
|
179
|
+
const placeholderClass = (isPrimary.value || (isTertiary.value && props.color === 'primary'))
|
|
180
|
+
? 'group-data-placeholder:text-actions-primary-idle'
|
|
181
|
+
: 'group-data-placeholder:text-text-neutral-tertiary'
|
|
182
|
+
return [
|
|
183
|
+
'flex-1',
|
|
184
|
+
'overflow-hidden',
|
|
185
|
+
'text-ellipsis',
|
|
186
|
+
'whitespace-nowrap',
|
|
187
|
+
'min-w-0',
|
|
188
|
+
'text-left',
|
|
189
|
+
colorClass,
|
|
190
|
+
placeholderClass,
|
|
191
|
+
sizeClasses.value.text,
|
|
192
|
+
].join(' ')
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
const iconContainerClasses = computed(() => {
|
|
196
|
+
return [
|
|
197
|
+
'flex',
|
|
198
|
+
'items-center',
|
|
199
|
+
'justify-center',
|
|
200
|
+
'shrink-0',
|
|
201
|
+
'transition-transform',
|
|
202
|
+
'duration-200',
|
|
203
|
+
'ease-in-out',
|
|
204
|
+
isTertiary.value
|
|
205
|
+
? textClass.value
|
|
206
|
+
: isPrimary.value ? 'text-actions-primary-idle' : 'text-text-neutral-tertiary',
|
|
207
|
+
sizeClasses.value.icon,
|
|
208
|
+
].join(' ')
|
|
209
|
+
})
|
|
210
|
+
</script>
|
|
211
|
+
|
|
212
|
+
<template>
|
|
213
|
+
<SelectTrigger
|
|
214
|
+
v-bind="$attrs"
|
|
215
|
+
:class="fieldClasses"
|
|
216
|
+
:disabled="disabled"
|
|
217
|
+
>
|
|
218
|
+
<div :class="textClasses">
|
|
219
|
+
<SelectValue
|
|
220
|
+
v-if="!slots.value"
|
|
221
|
+
:placeholder="placeholder"
|
|
222
|
+
/>
|
|
223
|
+
<slot
|
|
224
|
+
v-else
|
|
225
|
+
name="value"
|
|
226
|
+
/>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
<SelectIcon
|
|
230
|
+
v-if="showIcon"
|
|
231
|
+
:class="iconContainerClasses"
|
|
232
|
+
>
|
|
233
|
+
<div
|
|
234
|
+
class="i-ls-chevron-down transition-transform duration-200 ease-in-out group-data-[state=open]:rotate-180"
|
|
235
|
+
:class="sizeClasses.icon"
|
|
236
|
+
/>
|
|
237
|
+
</SelectIcon>
|
|
238
|
+
</SelectTrigger>
|
|
239
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComputedRef, InjectionKey } from 'vue'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Injection key consumed by `UiDropdownItem` so it can render a leading
|
|
5
|
+
* checkbox automatically when the parent `UiDropdown` is in multi-select
|
|
6
|
+
* mode. `UiDropdown` provides this; `UiDropdownItem` injects it.
|
|
7
|
+
*/
|
|
8
|
+
export const UI_DROPDOWN_MULTIPLE_KEY: InjectionKey<ComputedRef<boolean>> =
|
|
9
|
+
Symbol('ui-dropdown-multiple')
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// UiDropdown exports
|
|
2
|
+
export { default as UiDropdown } from './UiDropdown.vue'
|
|
3
|
+
export { default as UiDropdownTrigger } from './UiDropdownTrigger.vue'
|
|
4
|
+
export { default as UiDropdownContent } from './UiDropdownContent.vue'
|
|
5
|
+
export { default as UiDropdownItem } from './UiDropdownItem.vue'
|
|
6
|
+
export { default as UiDropdownSeparator } from './UiDropdownSeparator.vue'
|
|
7
|
+
|
|
8
|
+
// Re-export useful Reka UI types and components for advanced usage
|
|
9
|
+
export {
|
|
10
|
+
SelectGroup,
|
|
11
|
+
SelectLabel,
|
|
12
|
+
SelectScrollUpButton,
|
|
13
|
+
SelectScrollDownButton,
|
|
14
|
+
SelectArrow,
|
|
15
|
+
type SelectRootProps,
|
|
16
|
+
type SelectRootEmits,
|
|
17
|
+
type SelectContentProps,
|
|
18
|
+
type SelectContentEmits,
|
|
19
|
+
type SelectItemProps,
|
|
20
|
+
type SelectTriggerProps,
|
|
21
|
+
} from 'reka-ui'
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<!-- UiEmptyState.vue - Empty state component for showing placeholder content with optional illustration and actions. -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
import { computed, useSlots } from 'vue'
|
|
4
|
+
|
|
5
|
+
export interface UiEmptyStateProps {
|
|
6
|
+
/** Title shown as the primary heading */
|
|
7
|
+
title: string
|
|
8
|
+
/** Optional secondary description below the title */
|
|
9
|
+
description?: string
|
|
10
|
+
/** Optional illustration image URL */
|
|
11
|
+
image?: string
|
|
12
|
+
/** Layout orientation. `vertical` stacks the illustration above the text; `horizontal` places it to the right. */
|
|
13
|
+
variant?: 'vertical' | 'horizontal'
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const props = withDefaults(defineProps<UiEmptyStateProps>(), {
|
|
17
|
+
description: undefined,
|
|
18
|
+
image: undefined,
|
|
19
|
+
variant: 'vertical',
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const slots = useSlots()
|
|
23
|
+
const hasActions = computed(() => !!(slots['primary-action'] || slots['secondary-action']))
|
|
24
|
+
|
|
25
|
+
const isHorizontal = computed(() => props.variant === 'horizontal')
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<div
|
|
30
|
+
class="flex gap-8 justify-center mx-auto"
|
|
31
|
+
:class="isHorizontal
|
|
32
|
+
? 'flex-row items-center max-w-[576px] min-w-[384px]'
|
|
33
|
+
: 'flex-col items-center max-w-[320px] min-w-[256px]'"
|
|
34
|
+
>
|
|
35
|
+
<img
|
|
36
|
+
v-if="image && !isHorizontal"
|
|
37
|
+
:src="image"
|
|
38
|
+
alt=""
|
|
39
|
+
class="w-[270px]"
|
|
40
|
+
>
|
|
41
|
+
|
|
42
|
+
<div
|
|
43
|
+
class="flex flex-col gap-4 w-full"
|
|
44
|
+
:class="isHorizontal ? 'items-start' : 'items-center'"
|
|
45
|
+
>
|
|
46
|
+
<div
|
|
47
|
+
class="flex flex-col gap-2 w-full"
|
|
48
|
+
:class="isHorizontal ? 'items-start text-left' : 'items-center text-center'"
|
|
49
|
+
>
|
|
50
|
+
<h3 class="text-title-sm-bold text-text-neutral-base">
|
|
51
|
+
{{ title }}
|
|
52
|
+
</h3>
|
|
53
|
+
<p
|
|
54
|
+
v-if="description"
|
|
55
|
+
class="text-content-text-md-regular text-text-neutral-tertiary"
|
|
56
|
+
>
|
|
57
|
+
{{ description }}
|
|
58
|
+
</p>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<div
|
|
62
|
+
v-if="hasActions"
|
|
63
|
+
class="flex gap-2"
|
|
64
|
+
:class="isHorizontal
|
|
65
|
+
? 'flex-row items-start'
|
|
66
|
+
: 'flex-col items-center w-full'"
|
|
67
|
+
>
|
|
68
|
+
<slot name="primary-action" />
|
|
69
|
+
<slot name="secondary-action" />
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<img
|
|
74
|
+
v-if="image && isHorizontal"
|
|
75
|
+
:src="image"
|
|
76
|
+
alt=""
|
|
77
|
+
class="size-40 shrink-0"
|
|
78
|
+
>
|
|
79
|
+
</div>
|
|
80
|
+
</template>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { Label, useId } from 'reka-ui'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
id?: string
|
|
7
|
+
label?: string
|
|
8
|
+
required?: boolean
|
|
9
|
+
labelInfo?: string
|
|
10
|
+
error?: boolean
|
|
11
|
+
helperMessage?: string
|
|
12
|
+
errorMessage?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
+
id: undefined,
|
|
17
|
+
label: undefined,
|
|
18
|
+
required: false,
|
|
19
|
+
labelInfo: undefined,
|
|
20
|
+
error: false,
|
|
21
|
+
helperMessage: undefined,
|
|
22
|
+
errorMessage: undefined,
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const generatedId = useId()
|
|
26
|
+
const fieldId = computed(() => props.id ?? generatedId)
|
|
27
|
+
|
|
28
|
+
const displayMessage = computed(() => {
|
|
29
|
+
if (props.error && props.errorMessage) {
|
|
30
|
+
return props.errorMessage
|
|
31
|
+
}
|
|
32
|
+
return props.helperMessage
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
defineExpose({ fieldId })
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<div>
|
|
40
|
+
<!-- Label -->
|
|
41
|
+
<div
|
|
42
|
+
v-if="label"
|
|
43
|
+
class="flex items-start gap-1 mb-1"
|
|
44
|
+
>
|
|
45
|
+
<Label
|
|
46
|
+
:for="fieldId"
|
|
47
|
+
class="text-content-legends-bold-md text-text-neutral-tertiary"
|
|
48
|
+
>
|
|
49
|
+
{{ label }}{{ required ? '*' : '' }}
|
|
50
|
+
</Label>
|
|
51
|
+
<div
|
|
52
|
+
v-if="labelInfo"
|
|
53
|
+
v-tooltip="labelInfo"
|
|
54
|
+
class="flex items-center justify-center size-4 text-text-neutral-secondary cursor-help"
|
|
55
|
+
>
|
|
56
|
+
<span class="i-ls-info size-4" />
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<!-- Input -->
|
|
61
|
+
<slot :field-id="fieldId" />
|
|
62
|
+
|
|
63
|
+
<!-- Message -->
|
|
64
|
+
<div
|
|
65
|
+
v-if="displayMessage || $slots['footer']"
|
|
66
|
+
class="flex items-center justify-between mt-1"
|
|
67
|
+
>
|
|
68
|
+
<p
|
|
69
|
+
v-if="displayMessage"
|
|
70
|
+
:id="`${fieldId}-message`"
|
|
71
|
+
class="text-content-legends-bold-md"
|
|
72
|
+
:class="error ? 'text-text-danger-secondary' : 'text-text-neutral-secondary'"
|
|
73
|
+
>
|
|
74
|
+
{{ displayMessage }}
|
|
75
|
+
</p>
|
|
76
|
+
<slot name="footer" />
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as UiFieldWrapper } from './UiFieldWrapper.vue'
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { VueFormApi } from '@tanstack/vue-form'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* VueFormApi has 12 generic parameters (form data + 11 validator slots).
|
|
5
|
+
* UiFormField only needs the form data type for field name inference —
|
|
6
|
+
* the validator configuration is irrelevant here, so we accept any.
|
|
7
|
+
*/
|
|
8
|
+
export type AnyVueForm<T extends object> = VueFormApi<T, any, any, any, any, any, any, any, any, any, any, any>
|
|
9
|
+
|
|
10
|
+
export interface UiFormFieldProps<TFormData extends object, TName extends keyof TFormData & string> {
|
|
11
|
+
form: AnyVueForm<TFormData>
|
|
12
|
+
name: TName
|
|
13
|
+
label?: string
|
|
14
|
+
required?: boolean
|
|
15
|
+
labelInfo?: string
|
|
16
|
+
helperMessage?: string
|
|
17
|
+
/**
|
|
18
|
+
* When to show validation errors
|
|
19
|
+
* - 'touched': only after the field has been blurred (default)
|
|
20
|
+
* - 'always': show errors immediately
|
|
21
|
+
* - 'submit': only after form submission attempt
|
|
22
|
+
*/
|
|
23
|
+
showErrors?: 'touched' | 'always' | 'submit'
|
|
24
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<script setup lang="ts" generic="TFormData extends object, TName extends keyof TFormData & string">
|
|
2
|
+
import UiFieldWrapper from '../UiFieldWrapper/UiFieldWrapper.vue'
|
|
3
|
+
import type { UiFormFieldProps } from './UiFormField.types'
|
|
4
|
+
|
|
5
|
+
defineOptions({ inheritAttrs: false })
|
|
6
|
+
|
|
7
|
+
type Props = UiFormFieldProps<TFormData, TName>
|
|
8
|
+
|
|
9
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
10
|
+
label: undefined,
|
|
11
|
+
required: false,
|
|
12
|
+
labelInfo: undefined,
|
|
13
|
+
helperMessage: undefined,
|
|
14
|
+
showErrors: 'touched',
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const submissionAttempts = props.form.useStore(s => s.submissionAttempts)
|
|
18
|
+
|
|
19
|
+
function shouldShowError (state: { meta: { isTouched: boolean; errors: unknown[] } }) {
|
|
20
|
+
const gateOpen = props.showErrors === 'always' ||
|
|
21
|
+
(props.showErrors === 'touched' && state.meta.isTouched) ||
|
|
22
|
+
(props.showErrors === 'submit' && submissionAttempts.value > 0)
|
|
23
|
+
return gateOpen && state.meta.errors.length > 0
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<props.form.Field
|
|
29
|
+
:name="name"
|
|
30
|
+
v-bind="$attrs"
|
|
31
|
+
>
|
|
32
|
+
<template #default="{ field, state }">
|
|
33
|
+
<UiFieldWrapper
|
|
34
|
+
:label="label"
|
|
35
|
+
:required="required"
|
|
36
|
+
:label-info="labelInfo"
|
|
37
|
+
:error="shouldShowError(state)"
|
|
38
|
+
:error-message="(state.meta.errors[0] as unknown as string)"
|
|
39
|
+
:helper-message="helperMessage"
|
|
40
|
+
>
|
|
41
|
+
<template #default="{ fieldId }">
|
|
42
|
+
<slot
|
|
43
|
+
:field="field"
|
|
44
|
+
:state="state"
|
|
45
|
+
:field-id="fieldId"
|
|
46
|
+
:field-message-id="`${fieldId}-message`"
|
|
47
|
+
:errors="state.meta.errors"
|
|
48
|
+
:has-error="shouldShowError(state)"
|
|
49
|
+
:is-touched="state.meta.isTouched"
|
|
50
|
+
/>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<template
|
|
54
|
+
v-if="$slots.footer"
|
|
55
|
+
#footer
|
|
56
|
+
>
|
|
57
|
+
<slot
|
|
58
|
+
name="footer"
|
|
59
|
+
:field="field"
|
|
60
|
+
:state="state"
|
|
61
|
+
/>
|
|
62
|
+
</template>
|
|
63
|
+
</UiFieldWrapper>
|
|
64
|
+
</template>
|
|
65
|
+
</props.form.Field>
|
|
66
|
+
</template>
|