@livestorm/ui-vue 1.1.2 → 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 +213 -1550
- 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 +127 -58
- 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 -47
- 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-e70e5768.mjs +0 -1664
- 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 -291
- 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 -82
- package/src/components/BaseCheckbox/BaseCheckbox.vue +0 -161
- 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 -143
- package/src/components/BaseModal/BaseModal.vue +0 -187
- package/src/components/BaseModal/BaseModalContent.vue +0 -164
- package/src/components/BaseModal/BaseModalContentOld.vue +0 -242
- 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 -354
- package/src/css/checkbox-radio.postcss +0 -152
- package/src/css/icon.postcss +0 -9
- package/src/css/loader.postcss +0 -120
- package/src/css/popper.postcss +0 -143
- 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,219 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, ref } from 'vue'
|
|
3
|
+
import UiFieldWrapper from '../UiFieldWrapper/UiFieldWrapper.vue'
|
|
4
|
+
import type { TextareaSize } from './types'
|
|
5
|
+
|
|
6
|
+
interface UiInputTextareaProps {
|
|
7
|
+
size?: TextareaSize
|
|
8
|
+
modelValue?: string
|
|
9
|
+
placeholder?: string
|
|
10
|
+
disabled?: boolean
|
|
11
|
+
loading?: boolean
|
|
12
|
+
error?: boolean
|
|
13
|
+
label?: string
|
|
14
|
+
required?: boolean
|
|
15
|
+
labelInfo?: string
|
|
16
|
+
helperMessage?: string
|
|
17
|
+
errorMessage?: string
|
|
18
|
+
maxlength?: number
|
|
19
|
+
rows?: number
|
|
20
|
+
name?: string
|
|
21
|
+
id?: string
|
|
22
|
+
resizable?: boolean
|
|
23
|
+
ariaDescribedby?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const props = withDefaults(defineProps<UiInputTextareaProps>(), {
|
|
27
|
+
size: 'md',
|
|
28
|
+
disabled: false,
|
|
29
|
+
loading: false,
|
|
30
|
+
error: false,
|
|
31
|
+
required: false,
|
|
32
|
+
placeholder: '',
|
|
33
|
+
modelValue: '',
|
|
34
|
+
rows: 3,
|
|
35
|
+
resizable: true,
|
|
36
|
+
ariaDescribedby: undefined,
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const emit = defineEmits<{
|
|
40
|
+
'update:modelValue': [value: string]
|
|
41
|
+
'focus': [event: FocusEvent]
|
|
42
|
+
'blur': [event: FocusEvent]
|
|
43
|
+
'keydown': [event: KeyboardEvent]
|
|
44
|
+
'keyup': [event: KeyboardEvent]
|
|
45
|
+
}>()
|
|
46
|
+
|
|
47
|
+
const textareaRef = ref<HTMLTextAreaElement | null>(null)
|
|
48
|
+
const isFocused = ref(false)
|
|
49
|
+
|
|
50
|
+
const minHeight = computed(() => {
|
|
51
|
+
const lineHeight = { sm: 1.25, md: 1.5, lg: 1.5, xl: 1.75 }
|
|
52
|
+
const paddingY = { sm: 0.25, md: 0.5, lg: 0.5, xl: 0.5 }
|
|
53
|
+
return `${props.rows * lineHeight[props.size] + paddingY[props.size] * 2}rem`
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
const textareaClasses = computed(() => {
|
|
57
|
+
const baseClasses = [
|
|
58
|
+
'ui-textarea',
|
|
59
|
+
'block relative w-full rounded-md transition-colors',
|
|
60
|
+
'text-text-neutral-base',
|
|
61
|
+
'placeholder:text-text-neutral-tertiary',
|
|
62
|
+
'focus:outline-hidden',
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
const sizeClasses = {
|
|
66
|
+
sm: 'px-2 py-1 text-content-legends-medium-md',
|
|
67
|
+
md: 'px-3 py-2 text-content-text-md-regular',
|
|
68
|
+
lg: 'px-4 py-2 text-content-text-md-regular',
|
|
69
|
+
xl: 'px-4 py-2 text-content-text-lg-regular',
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
baseClasses.push(sizeClasses[props.size])
|
|
73
|
+
|
|
74
|
+
if (props.resizable) {
|
|
75
|
+
baseClasses.push('resize-y')
|
|
76
|
+
} else {
|
|
77
|
+
baseClasses.push('resize-none')
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (props.error) {
|
|
81
|
+
baseClasses.push(
|
|
82
|
+
'bg-actions-danger-idle-alpha-light',
|
|
83
|
+
'border', 'border-borders-danger-strong',
|
|
84
|
+
)
|
|
85
|
+
} else {
|
|
86
|
+
baseClasses.push(
|
|
87
|
+
'bg-actions-neutral-idle-alpha-light',
|
|
88
|
+
'border', 'border-borders-neutral-strong',
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (props.disabled) {
|
|
93
|
+
baseClasses.push('opacity-50 cursor-not-allowed')
|
|
94
|
+
} else if (!props.loading) {
|
|
95
|
+
baseClasses.push('hover:bg-actions-neutral-hover-overlay')
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (isFocused.value && !props.disabled && !props.loading) {
|
|
99
|
+
if (props.error) {
|
|
100
|
+
baseClasses.push('border-borders-danger-strong', 'ring-1', 'ring-inset', 'ring-borders-danger-strong')
|
|
101
|
+
} else {
|
|
102
|
+
baseClasses.push('border-actions-primary-idle-alpha-strong', 'ring-1', 'ring-inset', 'ring-focus-ring')
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return baseClasses
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
const characterCount = computed(() => {
|
|
110
|
+
if (!props.maxlength) return null
|
|
111
|
+
return `${props.modelValue?.length || 0}/${props.maxlength}`
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
function handleInput (event: Event) {
|
|
115
|
+
const target = event.target as HTMLTextAreaElement
|
|
116
|
+
emit('update:modelValue', target.value)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function handleFocus (event: FocusEvent) {
|
|
120
|
+
isFocused.value = true
|
|
121
|
+
emit('focus', event)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function handleBlur (event: FocusEvent) {
|
|
125
|
+
isFocused.value = false
|
|
126
|
+
emit('blur', event)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function handleKeydown (event: KeyboardEvent) {
|
|
130
|
+
emit('keydown', event)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function handleKeyup (event: KeyboardEvent) {
|
|
134
|
+
emit('keyup', event)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
defineExpose({
|
|
138
|
+
focus: () => textareaRef.value?.focus(),
|
|
139
|
+
blur: () => textareaRef.value?.blur(),
|
|
140
|
+
})
|
|
141
|
+
</script>
|
|
142
|
+
|
|
143
|
+
<template>
|
|
144
|
+
<UiFieldWrapper
|
|
145
|
+
:id="id"
|
|
146
|
+
:label="label"
|
|
147
|
+
:required="required"
|
|
148
|
+
:label-info="labelInfo"
|
|
149
|
+
:error="error"
|
|
150
|
+
:helper-message="helperMessage"
|
|
151
|
+
:error-message="errorMessage"
|
|
152
|
+
>
|
|
153
|
+
<template #default="{ fieldId }">
|
|
154
|
+
<div class="relative">
|
|
155
|
+
<!-- Loading State -->
|
|
156
|
+
<div
|
|
157
|
+
v-if="loading"
|
|
158
|
+
:class="textareaClasses"
|
|
159
|
+
:style="{ minHeight }"
|
|
160
|
+
>
|
|
161
|
+
<div class="flex flex-col gap-2">
|
|
162
|
+
<div class="h-3 w-24 bg-surface-neutral-alpha-400 rounded-md animate-pulse" />
|
|
163
|
+
<div class="h-3 flex-1 bg-surface-neutral-alpha-100 rounded-md" />
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<!-- Textarea Element -->
|
|
168
|
+
<textarea
|
|
169
|
+
v-else
|
|
170
|
+
:id="id || fieldId"
|
|
171
|
+
ref="textareaRef"
|
|
172
|
+
:value="modelValue"
|
|
173
|
+
:name="name"
|
|
174
|
+
:placeholder="placeholder"
|
|
175
|
+
:disabled="disabled"
|
|
176
|
+
:rows="rows"
|
|
177
|
+
:maxlength="maxlength"
|
|
178
|
+
:class="textareaClasses"
|
|
179
|
+
:style="{ minHeight }"
|
|
180
|
+
:aria-invalid="error"
|
|
181
|
+
:aria-describedby="ariaDescribedby || ((helperMessage || errorMessage) ? `${fieldId}-message` : undefined)"
|
|
182
|
+
@input="handleInput"
|
|
183
|
+
@focus="handleFocus"
|
|
184
|
+
@blur="handleBlur"
|
|
185
|
+
@keydown="handleKeydown"
|
|
186
|
+
@keyup="handleKeyup"
|
|
187
|
+
/>
|
|
188
|
+
</div>
|
|
189
|
+
</template>
|
|
190
|
+
|
|
191
|
+
<template
|
|
192
|
+
v-if="characterCount"
|
|
193
|
+
#footer
|
|
194
|
+
>
|
|
195
|
+
<span class="text-content-legends-medium-md text-text-neutral-tertiary ml-auto">
|
|
196
|
+
{{ characterCount }}
|
|
197
|
+
</span>
|
|
198
|
+
</template>
|
|
199
|
+
</UiFieldWrapper>
|
|
200
|
+
</template>
|
|
201
|
+
|
|
202
|
+
<style scoped>
|
|
203
|
+
.ui-textarea::-webkit-scrollbar {
|
|
204
|
+
width: 8px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.ui-textarea::-webkit-scrollbar-track {
|
|
208
|
+
background: transparent;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.ui-textarea::-webkit-scrollbar-thumb {
|
|
212
|
+
background: var(--color-neutral-alpha-dark-400);
|
|
213
|
+
border-radius: 4px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.ui-textarea::-webkit-scrollbar-thumb:hover {
|
|
217
|
+
background: var(--color-neutral-alpha-dark-500);
|
|
218
|
+
}
|
|
219
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TextareaSize = 'sm' | 'md' | 'lg' | 'xl'
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
label?: string | null
|
|
6
|
+
forId: string | undefined
|
|
7
|
+
tooltip?: string | null
|
|
8
|
+
required?: boolean
|
|
9
|
+
labelClass?: HTMLAttributes['class']
|
|
10
|
+
labelColor: string | undefined
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
withDefaults(defineProps<Props>(), {
|
|
14
|
+
label: null,
|
|
15
|
+
tooltip: null,
|
|
16
|
+
required: false,
|
|
17
|
+
labelClass: undefined,
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div class="mb-1 flex items-center text-content-legends-bold-md text-text-neutral-tertiary">
|
|
24
|
+
<label
|
|
25
|
+
v-tooltip="tooltip"
|
|
26
|
+
:for="forId"
|
|
27
|
+
:class="labelClass"
|
|
28
|
+
:style="{
|
|
29
|
+
color: labelColor,
|
|
30
|
+
}"
|
|
31
|
+
v-html="required ? `${label}*` : label"
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, useSlots } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = withDefaults(defineProps<{
|
|
5
|
+
maxContentHeight?: number
|
|
6
|
+
stickyFooter?: boolean
|
|
7
|
+
contentClass?: string
|
|
8
|
+
containerClass?: string
|
|
9
|
+
footerClass?: string
|
|
10
|
+
}>(), {
|
|
11
|
+
stickyFooter: false,
|
|
12
|
+
contentClass: '',
|
|
13
|
+
containerClass: '',
|
|
14
|
+
footerClass: '',
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
const slots = useSlots()
|
|
18
|
+
|
|
19
|
+
const hasFooterSlot = computed(() => !!slots.footer)
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div
|
|
24
|
+
class="flex flex-col gap-2 bg-surface-neutral-300"
|
|
25
|
+
:class="containerClass"
|
|
26
|
+
>
|
|
27
|
+
<div
|
|
28
|
+
class="flex flex-col gap-2 overflow-y-auto"
|
|
29
|
+
:class="contentClass"
|
|
30
|
+
:style="{
|
|
31
|
+
maxHeight: props.maxContentHeight ? `${props.maxContentHeight}px` : 'calc(100vh - 200px)',
|
|
32
|
+
}"
|
|
33
|
+
>
|
|
34
|
+
<slot />
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div
|
|
38
|
+
v-if="hasFooterSlot"
|
|
39
|
+
class="shrink-0 sticky bottom-0 bg-surface-neutral-300"
|
|
40
|
+
:class="footerClass"
|
|
41
|
+
>
|
|
42
|
+
<slot name="footer" />
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, useSlots } from 'vue'
|
|
3
|
+
import type { RouteLocationRaw } from 'vue-router'
|
|
4
|
+
|
|
5
|
+
const VARIANTS = [
|
|
6
|
+
'default',
|
|
7
|
+
'title',
|
|
8
|
+
'spacer-xs',
|
|
9
|
+
'metadata', // NOT IMPLEMENTED
|
|
10
|
+
'spacer-null', // NOT IMPLEMENTED
|
|
11
|
+
'divider', // NOT IMPLEMENTED
|
|
12
|
+
'divider-full', // NOT IMPLEMENTED
|
|
13
|
+
'spacer-md', // NOT IMPLEMENTED
|
|
14
|
+
'spacer-sm', // NOT IMPLEMENTED
|
|
15
|
+
] as const
|
|
16
|
+
export type Variant = typeof VARIANTS[number]
|
|
17
|
+
|
|
18
|
+
const COLORS = ['primary', 'neutral', 'success', 'warning', 'error', 'neutral-invert'] as const
|
|
19
|
+
export type Color = typeof COLORS[number]
|
|
20
|
+
|
|
21
|
+
const props = defineProps<{
|
|
22
|
+
variant?: Variant
|
|
23
|
+
selected?: boolean
|
|
24
|
+
isActive?: boolean
|
|
25
|
+
label?: string
|
|
26
|
+
icon?: string
|
|
27
|
+
iconEnd?: string
|
|
28
|
+
additionalInfo?: string
|
|
29
|
+
to?: RouteLocationRaw
|
|
30
|
+
href?: string
|
|
31
|
+
}>()
|
|
32
|
+
|
|
33
|
+
const slots = useSlots()
|
|
34
|
+
const hasAvatarSlot = computed(() => !!slots.avatar)
|
|
35
|
+
const hasAsideSlot = computed(() => !!slots.aside)
|
|
36
|
+
|
|
37
|
+
const cssClasses = computed(() => {
|
|
38
|
+
return {
|
|
39
|
+
'text-content-text-md-regular default min-h-10 hover:bg-actions-primary-hover-overlay': props.variant === 'default',
|
|
40
|
+
'text-content-legends-bold-md title min-h-7': props.variant === 'title',
|
|
41
|
+
'spacer-xs h-8': props.variant === 'spacer-xs',
|
|
42
|
+
'is-active bg-actions-primary-active-overlay': props.isActive && props.variant === 'default',
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<template>
|
|
48
|
+
<div
|
|
49
|
+
:class="cssClasses"
|
|
50
|
+
class="flex items-center gap-2 relative rounded-xl px-3"
|
|
51
|
+
>
|
|
52
|
+
<slot
|
|
53
|
+
v-if="hasAvatarSlot"
|
|
54
|
+
name="avatar"
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
<div>
|
|
58
|
+
<template v-if="props.label">
|
|
59
|
+
{{ props.label }}
|
|
60
|
+
</template>
|
|
61
|
+
<slot />
|
|
62
|
+
|
|
63
|
+
<template v-if="props.variant?.startsWith('spacer')">
|
|
64
|
+
<div class="h-2 p-2" />
|
|
65
|
+
</template>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<slot
|
|
69
|
+
v-if="hasAsideSlot"
|
|
70
|
+
name="aside"
|
|
71
|
+
/>
|
|
72
|
+
|
|
73
|
+
<slot />
|
|
74
|
+
|
|
75
|
+
<router-link
|
|
76
|
+
v-if="to && !href"
|
|
77
|
+
:to="to"
|
|
78
|
+
class="absolute inset-0 focus:outline-hidden rounded-xl"
|
|
79
|
+
/>
|
|
80
|
+
<a
|
|
81
|
+
v-else-if="href"
|
|
82
|
+
:href="href"
|
|
83
|
+
target="_blank"
|
|
84
|
+
rel="noopener noreferrer"
|
|
85
|
+
class="absolute inset-0 focus:outline-hidden rounded-xl"
|
|
86
|
+
/>
|
|
87
|
+
|
|
88
|
+
<div
|
|
89
|
+
v-if="iconEnd"
|
|
90
|
+
:class="iconEnd"
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
</template>
|
|
94
|
+
|
|
95
|
+
<style scoped>
|
|
96
|
+
.default {
|
|
97
|
+
color: var(--color-actions-neutral-idle);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.title {
|
|
101
|
+
color: var(--color-text-neutral-tertiary);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.is-active {
|
|
105
|
+
background-color: var(--color-actions-primary-active-overlay);
|
|
106
|
+
color: var(--color-actions-primary-idle);
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<svg
|
|
4
|
+
:class="[
|
|
5
|
+
sizeClass,
|
|
6
|
+
'text-action-neutral-idle animate-spin',
|
|
7
|
+
]"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
fill="none"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
>
|
|
12
|
+
<circle
|
|
13
|
+
class="opacity-20"
|
|
14
|
+
cx="12"
|
|
15
|
+
cy="12"
|
|
16
|
+
r="10"
|
|
17
|
+
stroke="currentColor"
|
|
18
|
+
stroke-width="4"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
class="opacity-100"
|
|
22
|
+
fill="currentColor"
|
|
23
|
+
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
24
|
+
/>
|
|
25
|
+
</svg>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
<script lang="ts" setup>
|
|
29
|
+
import { computed } from 'vue'
|
|
30
|
+
|
|
31
|
+
const props = defineProps({
|
|
32
|
+
size: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: 'md',
|
|
35
|
+
validator: (value: string) => ['sm', 'md', 'lg'].includes(value),
|
|
36
|
+
},
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const sizeClass = computed(() => {
|
|
40
|
+
if (props.size === 'sm') return 'size-4'
|
|
41
|
+
if (props.size === 'md') return 'size-6'
|
|
42
|
+
if (props.size === 'lg') return 'size-8'
|
|
43
|
+
return 'size-6'
|
|
44
|
+
})
|
|
45
|
+
</script>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import TornadoVariant from "./variants/TornadoVariant.vue";
|
|
4
|
+
import PulseVariant from "./variants/PulseVariant.vue";
|
|
5
|
+
|
|
6
|
+
// CSS/svg remake of the lottie tornado logo (UiAnimatedLogo), with themable
|
|
7
|
+
// colors. Animations live in variants/.
|
|
8
|
+
// A variant renders the .badge/.mark paths, keeps its keyframes in its own
|
|
9
|
+
// scoped style, and tags animated elements with .motion — then goes in the
|
|
10
|
+
// VARIANTS map.
|
|
11
|
+
|
|
12
|
+
type UiLogoVariant = "tornado" | "pulse";
|
|
13
|
+
|
|
14
|
+
interface Props {
|
|
15
|
+
variant?: UiLogoVariant;
|
|
16
|
+
height: number;
|
|
17
|
+
width: number;
|
|
18
|
+
/** Follow the brand palette (--color-brand-800) instead of the Livestorm navy. */
|
|
19
|
+
themed?: boolean;
|
|
20
|
+
/** Dark badge + white mark, for light backgrounds. */
|
|
21
|
+
inverted?: boolean;
|
|
22
|
+
/** When false, renders the static logo (the resting pose). */
|
|
23
|
+
animated?: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// vue casts absent boolean props to false, hence the explicit defaults
|
|
27
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
28
|
+
variant: "tornado",
|
|
29
|
+
themed: false,
|
|
30
|
+
inverted: false,
|
|
31
|
+
animated: true,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const VARIANTS = {
|
|
35
|
+
tornado: TornadoVariant,
|
|
36
|
+
pulse: PulseVariant,
|
|
37
|
+
} as const;
|
|
38
|
+
|
|
39
|
+
const variantComponent = computed(() => VARIANTS[props.variant]);
|
|
40
|
+
|
|
41
|
+
const markColor = computed(() =>
|
|
42
|
+
props.themed ? "var(--color-brand-800, #112660)" : "#112660",
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const colorVars = computed(() => {
|
|
46
|
+
if (props.inverted) {
|
|
47
|
+
return {
|
|
48
|
+
"--ui-logo-badge": markColor.value,
|
|
49
|
+
"--ui-logo-mark": "#ffffff",
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (props.themed) {
|
|
54
|
+
return { "--ui-logo-mark": markColor.value };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// no inline vars, so a parent can still override --ui-logo-*
|
|
58
|
+
return {};
|
|
59
|
+
});
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<template>
|
|
63
|
+
<div class="ui-logo-loader">
|
|
64
|
+
<svg
|
|
65
|
+
class="ui-logo"
|
|
66
|
+
:class="{ 'ui-logo--static': !props.animated }"
|
|
67
|
+
:style="{
|
|
68
|
+
height: props.height + 'rem',
|
|
69
|
+
width: props.width + 'rem',
|
|
70
|
+
...colorVars,
|
|
71
|
+
}"
|
|
72
|
+
viewBox="0 0 600 600"
|
|
73
|
+
role="img"
|
|
74
|
+
aria-label="Livestorm"
|
|
75
|
+
>
|
|
76
|
+
<component :is="variantComponent" />
|
|
77
|
+
</svg>
|
|
78
|
+
</div>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<style scoped>
|
|
82
|
+
.ui-logo :deep(.badge) {
|
|
83
|
+
fill: var(--ui-logo-badge, #ffffff);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ui-logo :deep(.mark) {
|
|
87
|
+
fill: var(--ui-logo-mark, #112660);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ui-logo--static :deep(.motion) {
|
|
91
|
+
animation: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@media (prefers-reduced-motion: reduce) {
|
|
95
|
+
.ui-logo :deep(.motion) {
|
|
96
|
+
animation: none;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!--
|
|
3
|
+
Mark rows fade in a staggered wave, top to bottom. Same loop duration as
|
|
4
|
+
the tornado so the two feel related.
|
|
5
|
+
-->
|
|
6
|
+
<path
|
|
7
|
+
class="badge"
|
|
8
|
+
d="M532.48 300.0C532.48 364.22 534.64 439.0 486.84 486.96C439.04 534.92 364.22 532.48 300.0 532.48C235.78 532.48 161.0 534.63 113.04 486.84C65.08 439.04 67.52 364.22 67.52 300.0C67.52 235.79 65.41 161.0 113.2 113.04C161.0 65.08 235.83 67.52 300.0 67.52C364.18 67.52 439.0 65.41 486.96 113.2C534.92 161.0 532.48 235.83 532.48 300.0Z"
|
|
9
|
+
/>
|
|
10
|
+
<g class="motion pulse--row-1">
|
|
11
|
+
<path
|
|
12
|
+
class="mark"
|
|
13
|
+
d="M176.97 177.96C163.72 177.96 152.97 188.71 152.97 201.97C152.97 215.23 163.72 225.98 176.97 225.98L326.25 225.98C339.5 225.98 350.25 215.23 350.25 201.97C350.25 188.71 339.5 177.96 326.25 177.96L176.97 177.96Z"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
class="mark"
|
|
17
|
+
d="M447.98 201.97C447.98 188.71 437.23 177.96 423.97 177.96C410.71 177.96 399.97 188.71 399.97 201.97C399.97 215.23 410.71 225.98 423.97 225.98C437.23 225.98 447.98 215.23 447.98 201.97Z"
|
|
18
|
+
/>
|
|
19
|
+
</g>
|
|
20
|
+
<path
|
|
21
|
+
class="mark motion pulse--row-2"
|
|
22
|
+
d="M375.96 276.45L226.06 276.45C212.8 276.45 202.05 287.2 202.05 300.46C202.05 313.72 212.8 324.47 226.06 324.47L375.96 324.47C389.22 324.47 399.97 313.72 399.97 300.46C399.97 287.2 389.22 276.45 375.96 276.45Z"
|
|
23
|
+
/>
|
|
24
|
+
<path
|
|
25
|
+
class="mark motion pulse--row-3"
|
|
26
|
+
d="M326.88 374.98L275.13 374.98C261.88 374.98 251.13 385.73 251.13 398.99C251.13 412.25 261.88 422.99 275.13 422.99L326.88 422.99C340.14 422.99 350.89 412.25 350.89 398.99C350.89 385.73 340.14 374.98 326.88 374.98Z"
|
|
27
|
+
/>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<style scoped>
|
|
31
|
+
.motion {
|
|
32
|
+
animation-name: ui-logo-pulse;
|
|
33
|
+
animation-duration: 1640ms;
|
|
34
|
+
animation-timing-function: ease-in-out;
|
|
35
|
+
animation-iteration-count: infinite;
|
|
36
|
+
animation-fill-mode: both;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.pulse--row-2 {
|
|
40
|
+
animation-delay: 180ms;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.pulse--row-3 {
|
|
44
|
+
animation-delay: 360ms;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@keyframes ui-logo-pulse {
|
|
48
|
+
0%, 100% { opacity: 1; }
|
|
49
|
+
50% { opacity: 0.35; }
|
|
50
|
+
}
|
|
51
|
+
</style>
|