@livestorm/ui-vue 3.0.0 → 4.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 +3 -3
- package/components-vite.js +2 -2
- package/dist/UiButton-uyW8EHRJ.mjs +602 -0
- package/dist/UiTimelineItem-EiOEi1yF.mjs +7293 -0
- package/dist/UiTooltip-DZcPD6_N.mjs +158 -0
- package/dist/a11y-CaZxRWzo.mjs +6 -0
- package/dist/breakpoints.mjs +4 -9
- package/dist/bus.mjs +5 -5
- package/dist/components.mjs +236 -231
- package/dist/i18n-B8QOMuFD.mjs +46 -0
- package/dist/index.mjs +4 -91
- package/dist/integrations.mjs +3 -14
- package/dist/layouts.mjs +228 -236
- package/dist/responsive.mjs +31 -36
- package/dist/slot.mjs +11 -17
- package/dist/toastDSV2-D3xDZPe5.mjs +105 -0
- package/dist/types/index.d.ts +19 -1
- package/dist/types/src/components/Toast/ToastMessage.vue.d.ts +17 -7
- package/dist/types/src/components/Toast/toastDSV2.d.ts +89 -64
- package/dist/types/src/components/UiActionBar/types.d.ts +2 -0
- package/dist/types/src/components/UiAvatar/UiAvatar.vue.d.ts +4 -2
- package/dist/types/src/components/UiAvatarList/UiAvatarList.vue.d.ts +3 -2
- package/dist/types/src/components/UiBanner/UiBanner.vue.d.ts +13 -1
- package/dist/types/src/components/UiButton/UiButton.vue.d.ts +95 -35
- package/dist/types/src/components/UiButtonGroup/UiButtonGroup.vue.d.ts +8 -2
- package/dist/types/src/components/UiButtonGroup/types.d.ts +4 -0
- package/dist/types/src/components/UiChoice/UiChoice.vue.d.ts +71 -0
- package/dist/types/src/components/UiChoice/index.d.ts +2 -0
- package/dist/types/src/components/UiChoice/types.d.ts +7 -0
- package/dist/types/src/components/UiColorField/UiColorField.vue.d.ts +1 -1
- package/dist/types/src/components/UiColorPicker/UiColorPicker.vue.d.ts +2 -2
- package/dist/types/src/components/UiCombobox/UiCombobox.types.d.ts +47 -0
- package/dist/types/src/components/UiCombobox/UiCombobox.vue.d.ts +40 -0
- package/dist/types/src/components/UiCombobox/index.d.ts +2 -0
- package/dist/types/src/components/UiDataTable/UiDataTable.types.d.ts +46 -0
- package/dist/types/src/components/UiDataTable/UiDataTable.vue.d.ts +136 -0
- package/dist/types/src/components/UiDataTable/index.d.ts +5 -0
- package/dist/types/src/components/UiDrawer/UiDrawer.vue.d.ts +28 -0
- package/dist/types/src/components/UiDrawer/UiDrawerContent.vue.d.ts +18 -0
- package/dist/types/src/components/UiDrawer/UiDrawerTrigger.vue.d.ts +14 -0
- package/dist/types/src/components/UiDropdown/DropdownItemCheckbox.vue.d.ts +3 -0
- package/dist/types/src/components/UiDropdown/UiDropdownContent.vue.d.ts +10 -0
- package/dist/types/src/components/UiDropdown/UiDropdownGroup.vue.d.ts +17 -0
- package/dist/types/src/components/UiDropdown/UiDropdownItem.vue.d.ts +8 -5
- package/dist/types/src/components/UiDropdown/UiDropdownTrigger.vue.d.ts +21 -5
- package/dist/types/src/components/UiDropdown/index.d.ts +1 -0
- package/dist/types/src/components/UiEmojiPickerList/UiEmojiPickerList.vue.d.ts +22 -0
- package/dist/types/src/components/UiEmptyState/UiEmptyState.vue.d.ts +8 -3
- package/dist/types/src/components/UiFieldWrapper/UiFieldWrapper.vue.d.ts +2 -2
- package/dist/types/src/components/UiInputCheckbox/CheckboxGlyph.vue.d.ts +17 -0
- package/dist/types/src/components/UiInputCheckbox/UiInputCheckbox.vue.d.ts +35 -4
- package/dist/types/src/components/UiInputRadio/RadioGlyph.vue.d.ts +19 -0
- package/dist/types/src/components/UiInputRadio/UiInputRadio.vue.d.ts +21 -8
- package/dist/types/src/components/UiInputRadio/UiInputRadioGroup.vue.d.ts +6 -1
- package/dist/types/src/components/UiInputRadio/types.d.ts +1 -1
- package/dist/types/src/components/UiInputSelect/UiInputSelect.vue.d.ts +5 -5
- package/dist/types/src/components/UiInputTextarea/UiInputTextarea.vue.d.ts +5 -5
- package/dist/types/src/components/UiListItem/UiListItem.vue.d.ts +18 -4
- package/dist/types/src/components/UiLoader/UiSpinnerIcon.vue.d.ts +3 -0
- package/dist/types/src/components/UiMenu/UiMenuContent.vue.d.ts +15 -2
- package/dist/types/src/components/UiMenu/UiMenuItem.vue.d.ts +9 -3
- package/dist/types/src/components/UiNestedOptions/UiNestedOptions.vue.d.ts +13 -0
- package/dist/types/src/components/UiPage/UiPage.vue.d.ts +79 -15
- package/dist/types/src/components/UiPagination/UiPagination.vue.d.ts +36 -0
- package/dist/types/src/components/UiPagination/index.d.ts +2 -0
- package/dist/types/src/components/UiPagination/types.d.ts +4 -0
- package/dist/types/src/components/UiPane/UiPane.vue.d.ts +22 -0
- package/dist/types/src/components/UiPane/UiPaneContent.vue.d.ts +75 -0
- package/dist/types/src/components/UiPane/UiPaneTrigger.vue.d.ts +14 -0
- package/dist/types/src/components/UiPane/index.d.ts +5 -0
- package/dist/types/src/components/UiRating/UiRating.vue.d.ts +62 -0
- package/dist/types/src/components/UiRating/types.d.ts +1 -0
- package/dist/types/src/components/UiRoomButton/UiRoomButton.vue.d.ts +5 -3
- package/dist/types/src/components/UiRoomCountdown/UiRoomCountdown.vue.d.ts +32 -0
- package/dist/types/src/components/UiShell/UiShell.vue.d.ts +3 -0
- package/dist/types/src/components/UiSideMenu/UiSideMenu.vue.d.ts +22 -1
- package/dist/types/src/components/UiSideMenu/UiSideMenuItemContent.vue.d.ts +2 -2
- package/dist/types/src/components/UiSwitch/UiSwitch.vue.d.ts +10 -5
- package/dist/types/src/components/UiTable/UiTable.vue.d.ts +13 -4
- package/dist/types/src/components/UiTable/UiTableActionsCell.vue.d.ts +49 -0
- package/dist/types/src/components/UiTable/UiTableActionsHeaderCell.vue.d.ts +3 -0
- package/dist/types/src/components/UiTable/UiTableBody.vue.d.ts +11 -1
- package/dist/types/src/components/UiTable/UiTableCell.vue.d.ts +16 -1
- package/dist/types/src/components/UiTable/UiTableHeaderCell.vue.d.ts +31 -2
- package/dist/types/src/components/UiTable/UiTableRow.vue.d.ts +32 -2
- package/dist/types/src/components/UiTable/context.d.ts +3 -0
- package/dist/types/src/components/UiTable/index.d.ts +4 -0
- package/dist/types/src/components/UiTabs/UiTabs.vue.d.ts +3 -0
- package/dist/types/src/components/UiTag/UiTag.types.d.ts +25 -0
- package/dist/types/src/components/UiTag/UiTag.vue.d.ts +5 -26
- package/dist/types/src/components/UiTag/index.d.ts +2 -1
- package/dist/types/src/components/UiTextField/UiTextField.vue.d.ts +10 -5
- package/dist/types/src/components/UiTooltip/UiTooltipProvider.vue.d.ts +1 -0
- package/dist/types/src/components/UiTooltip/UiTooltipTrigger.vue.d.ts +2 -2
- package/dist/types/src/composables/storedThemingApplies.d.ts +17 -0
- package/dist/types/src/composables/useButtonStyles.d.ts +1 -0
- package/dist/types/src/composables/useChoiceboxSurface.d.ts +11 -0
- package/dist/types/src/composables/useContentMode.d.ts +7 -9
- package/dist/types/src/composables/useControlModes.d.ts +7 -0
- package/dist/types/src/composables/useControlShape.d.ts +24 -0
- package/dist/types/src/composables/useFieldFocusEvents.d.ts +12 -0
- package/dist/types/src/composables/useIconSize.d.ts +2 -0
- package/dist/types/src/composables/usePullGesture.d.ts +42 -0
- package/dist/types/src/composables/useThemeAndModes.d.ts +4 -0
- package/dist/types/src/theming/colorScale.d.ts +165 -0
- package/dist/types/src/theming/legacyColorScale.d.ts +27 -0
- package/dist/types/src/theming/presetColors.d.ts +11 -0
- package/dist/types/src/theming/primitiveTokens.d.ts +2 -0
- package/dist/types/src/utils/effectiveOpacity.d.ts +2 -0
- package/dist/types/src/utils/numbers.d.ts +1 -2
- package/dist/types/src/utils/tokenColor.d.ts +2 -0
- package/dist/ui-vue.css +2 -1
- package/dist/utils.mjs +165 -194
- package/index.d.ts +18 -0
- package/index.js +36 -0
- package/package.json +26 -21
- package/src/components/Toast/LayoutToasts.vue +19 -11
- package/src/components/Toast/ToastMessage.vue +125 -68
- package/src/components/Toast/toastDSV2.ts +238 -67
- package/src/components/UiActionBar/UiActionBar.vue +4 -3
- package/src/components/UiActionBar/UiActionBarItem.vue +9 -6
- package/src/components/UiActionBar/types.ts +13 -0
- package/src/components/UiAvatar/UiAvatar.vue +8 -2
- package/src/components/UiAvatarList/UiAvatarList.vue +51 -20
- package/src/components/UiBadge/UiBadge.vue +1 -1
- package/src/components/UiBanner/UiBanner.vue +71 -21
- package/src/components/UiBreadcrumb/UiBreadcrumb.vue +1 -1
- package/src/components/UiButton/UiButton.vue +92 -25
- package/src/components/UiButtonGroup/UiButtonGroup.vue +21 -17
- package/src/components/UiButtonGroup/UiButtonGroupItem.vue +33 -15
- package/src/components/UiButtonGroup/types.ts +19 -0
- package/src/components/UiCard/UiCard.vue +20 -23
- package/src/components/UiChoice/UiChoice.vue +187 -0
- package/src/components/UiChoice/index.ts +2 -0
- package/src/components/UiChoice/types.ts +11 -0
- package/src/components/UiColorField/UiColorField.vue +2 -2
- package/src/components/UiColorPicker/UiColorPicker.vue +11 -8
- package/src/components/UiCombobox/UiCombobox.types.ts +52 -0
- package/src/components/UiCombobox/UiCombobox.vue +296 -0
- package/src/components/UiCombobox/index.ts +2 -0
- package/src/components/UiDataTable/UiDataTable.types.ts +47 -0
- package/src/components/UiDataTable/UiDataTable.vue +422 -0
- package/src/components/UiDataTable/index.ts +12 -0
- package/src/components/UiDialog/UiDialogContent.vue +22 -7
- package/src/components/UiDrawer/UiDrawer.vue +16 -0
- package/src/components/UiDrawer/UiDrawerContent.vue +42 -0
- package/src/components/UiDrawer/UiDrawerTrigger.vue +17 -0
- package/src/components/UiDropdown/DropdownItemCheckbox.vue +10 -0
- package/src/components/UiDropdown/UiDropdownContent.vue +32 -21
- package/src/components/UiDropdown/UiDropdownGroup.vue +23 -0
- package/src/components/UiDropdown/UiDropdownItem.vue +38 -18
- package/src/components/UiDropdown/UiDropdownSeparator.vue +1 -1
- package/src/components/UiDropdown/UiDropdownTrigger.vue +138 -43
- package/src/components/UiDropdown/index.ts +1 -0
- package/src/components/UiEmojiPickerList/UiEmojiPickerList.vue +122 -0
- package/src/components/UiEmptyState/UiEmptyState.vue +16 -4
- package/src/components/UiFieldWrapper/UiFieldWrapper.vue +9 -3
- package/src/components/UiHorizontalSeparator/UiHorizontalSeparator.vue +2 -2
- package/src/components/UiInputCheckbox/CheckboxGlyph.vue +78 -0
- package/src/components/UiInputCheckbox/UiInputCheckbox.vue +213 -177
- package/src/components/UiInputEmoji/UiInputEmoji.vue +18 -95
- package/src/components/UiInputRadio/RadioGlyph.vue +45 -0
- package/src/components/UiInputRadio/UiInputRadio.vue +177 -169
- package/src/components/UiInputRadio/UiInputRadioGroup.vue +15 -5
- package/src/components/UiInputRadio/types.ts +1 -2
- package/src/components/UiInputSelect/UiInputSelect.vue +9 -7
- package/src/components/UiInputTextarea/UiInputTextarea.vue +20 -35
- package/src/components/UiLabel/UiLabel.vue +1 -1
- package/src/components/UiListItem/UiListItem.vue +55 -9
- package/src/components/UiLoader/UiLoader.vue +4 -20
- package/src/components/UiLoader/UiSpinnerIcon.vue +21 -0
- package/src/components/UiMenu/UiMenuContent.vue +24 -3
- package/src/components/UiMenu/UiMenuGroup.vue +1 -1
- package/src/components/UiMenu/UiMenuItem.vue +14 -3
- package/src/components/UiMenu/UiMenuSubContent.vue +1 -1
- package/src/components/UiMenu/UiMenuSubTrigger.vue +1 -1
- package/src/components/UiNestedOptions/UiNestedOptions.vue +6 -0
- package/src/components/UiPage/UiPage.vue +190 -32
- package/src/components/UiPagination/UiPagination.vue +99 -0
- package/src/components/UiPagination/index.ts +2 -0
- package/src/components/UiPagination/types.ts +28 -0
- package/src/components/UiPane/UiPane.vue +20 -0
- package/src/components/UiPane/UiPaneContent.vue +232 -0
- package/src/components/UiPane/UiPaneTrigger.vue +14 -0
- package/src/components/UiPane/index.ts +12 -0
- package/src/components/UiPopover/UiPopoverContent.vue +21 -1
- package/src/components/UiProgress/UiProgress.vue +2 -2
- package/src/components/UiRating/UiRating.vue +258 -0
- package/src/components/UiRating/types.ts +1 -0
- package/src/components/UiRoomButton/UiRoomButton.vue +10 -41
- package/src/components/UiRoomCountdown/UiRoomCountdown.vue +376 -0
- package/src/components/UiShell/UiShell.vue +9 -3
- package/src/components/UiSideMenu/UiSideMenu.vue +155 -18
- package/src/components/UiSideMenu/UiSideMenuItemContent.vue +20 -16
- package/src/components/UiStepper/UiStepper.vue +3 -16
- package/src/components/UiStepper/UiStepperDescription.vue +1 -13
- package/src/components/UiStepper/UiStepperIndicator.vue +11 -48
- package/src/components/UiStepper/UiStepperItem.vue +1 -8
- package/src/components/UiStepper/UiStepperSeparator.vue +5 -16
- package/src/components/UiStepper/UiStepperTitle.vue +1 -10
- package/src/components/UiSwitch/UiSwitch.vue +44 -28
- package/src/components/UiTable/UiTable.vue +98 -8
- package/src/components/UiTable/UiTableActionsCell.vue +135 -0
- package/src/components/UiTable/UiTableActionsHeaderCell.vue +19 -0
- package/src/components/UiTable/UiTableBody.vue +16 -1
- package/src/components/UiTable/UiTableCell.vue +33 -16
- package/src/components/UiTable/UiTableHeader.vue +6 -5
- package/src/components/UiTable/UiTableHeaderCell.vue +61 -9
- package/src/components/UiTable/UiTableRow.vue +46 -10
- package/src/components/UiTable/context.ts +5 -0
- package/src/components/UiTable/index.ts +4 -0
- package/src/components/UiTabs/UiTabs.vue +56 -61
- package/src/components/UiTag/UiTag.types.ts +28 -0
- package/src/components/UiTag/UiTag.vue +24 -42
- package/src/components/UiTag/index.ts +2 -0
- package/src/components/UiTextField/UiTextField.vue +21 -36
- package/src/components/UiTooltip/UiTooltipContent.vue +1 -1
- package/src/components/UiTooltip/UiTooltipProvider.vue +3 -0
- package/src/components/UiTooltip/UiTooltipTrigger.vue +16 -1
- package/src/composables/storedThemingApplies.ts +19 -0
- package/src/composables/useButtonStyles.ts +9 -13
- package/src/composables/useChoiceboxSurface.ts +36 -0
- package/src/composables/useContentMode.ts +29 -16
- package/src/composables/useControlModes.ts +11 -0
- package/src/composables/useControlShape.ts +34 -0
- package/src/composables/useFieldFocusEvents.ts +30 -0
- package/src/composables/useIconSize.ts +15 -0
- package/src/composables/usePullGesture.ts +142 -0
- package/src/composables/useThemeAndModes.ts +28 -1
- package/src/css/body.css +16 -1
- package/src/css/fonts.css +39 -5
- package/src/global.d.ts +36 -0
- package/src/theming/colorScale.ts +173 -0
- package/src/theming/legacyColorScale.ts +58 -0
- package/src/theming/presetColors.ts +33 -0
- package/src/theming/primitiveTokens.ts +71 -0
- package/src/utils/effectiveOpacity.ts +8 -0
- package/src/utils/i18n.ts +6 -0
- package/src/utils/numbers.ts +1 -1
- package/src/utils/responsive.d.ts +14 -0
- package/src/utils/tokenColor.ts +9 -0
- package/dist/UiTimelineItem.vue_vue_type_style_index_0_lang-LpdvGf5X.mjs +0 -6093
- package/dist/a11y-BhF_nl7L.mjs +0 -159
- package/dist/i18n-Cktw9hIu.mjs +0 -49
- package/dist/toastDSV2-wMh-UMzW.mjs +0 -74
- package/dist/types/src/components/UiAvatar/index.d.ts +0 -1
- package/dist/types/src/components/UiAvatarList/index.d.ts +0 -1
- package/dist/types/src/components/UiBadge/index.d.ts +0 -1
- package/dist/types/src/components/UiBanner/index.d.ts +0 -2
- package/dist/types/src/components/UiButtonGroup/index.d.ts +0 -3
- package/dist/types/src/components/UiCarousel/index.d.ts +0 -2
- package/dist/types/src/components/UiColorField/index.d.ts +0 -2
- package/dist/types/src/components/UiDialog/MarketplaceHeaderExample.vue.d.ts +0 -28
- package/dist/types/src/components/UiDialog/index.d.ts +0 -7
- package/dist/types/src/components/UiFieldWrapper/index.d.ts +0 -1
- package/dist/types/src/components/UiInputCheckbox/index.d.ts +0 -2
- package/dist/types/src/components/UiInputEmoji/index.d.ts +0 -1
- package/dist/types/src/components/UiInputRadio/index.d.ts +0 -3
- package/dist/types/src/components/UiInputSelect/index.d.ts +0 -2
- package/dist/types/src/components/UiInputTextarea/index.d.ts +0 -2
- package/dist/types/src/components/UiMenu/index.d.ts +0 -10
- package/dist/types/src/components/UiProgress/index.d.ts +0 -2
- package/dist/types/src/components/UiSwitch/index.d.ts +0 -2
- package/dist/types/src/components/UiTabs/index.d.ts +0 -2
- package/dist/types/src/components/UiTimeline/index.d.ts +0 -2
- package/dist/types/src/components/UiTooltip/index.d.ts +0 -4
- package/dist/types/src/mixins/DynamicAction.d.ts +0 -30
- package/dist/useThemeAndModes-BzYwSOEv.mjs +0 -108
- package/src/components/UiAvatar/index.js +0 -1
- package/src/components/UiAvatarList/index.js +0 -1
- package/src/components/UiBadge/index.ts +0 -2
- package/src/components/UiBanner/index.ts +0 -2
- package/src/components/UiButtonGroup/index.ts +0 -3
- package/src/components/UiCarousel/index.ts +0 -2
- package/src/components/UiColorField/index.ts +0 -2
- package/src/components/UiDialog/MarketplaceHeaderExample.vue +0 -217
- package/src/components/UiDialog/index.ts +0 -18
- package/src/components/UiFieldWrapper/index.ts +0 -1
- package/src/components/UiInputCheckbox/index.ts +0 -2
- package/src/components/UiInputEmoji/index.ts +0 -1
- package/src/components/UiInputRadio/index.ts +0 -3
- package/src/components/UiInputSelect/index.ts +0 -2
- package/src/components/UiInputTextarea/index.ts +0 -2
- package/src/components/UiMenu/index.ts +0 -10
- package/src/components/UiProgress/index.ts +0 -2
- package/src/components/UiSwitch/index.ts +0 -2
- package/src/components/UiTabs/index.ts +0 -5
- package/src/components/UiTag/index.js +0 -1
- package/src/components/UiTimeline/index.ts +0 -2
- package/src/components/UiTooltip/index.js +0 -4
- package/src/mixins/DynamicAction.js +0 -61
package/dist/responsive.mjs
CHANGED
|
@@ -1,39 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { BREAKPOINT_LG as e, BREAKPOINT_XL_PLUS as t } from "./breakpoints.mjs";
|
|
2
|
+
import { computed as n, reactive as r } from "vue";
|
|
3
|
+
//#region src/utils/responsive.js
|
|
4
|
+
var i, a = 1280, o = 800, s = {
|
|
5
|
+
mobile: (e) => e.width < 768,
|
|
6
|
+
tablet: (t) => t.width < e,
|
|
7
|
+
smallDesktop: (e) => e.width < t,
|
|
8
|
+
desktop: (t) => t.width >= e
|
|
9
9
|
};
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
function c(e = {}, { deferViewportSync: t = !1 } = {}) {
|
|
11
|
+
let i = typeof window < "u", c = i && !t, l = r({
|
|
12
|
+
width: c ? window.innerWidth : a,
|
|
13
|
+
height: c ? window.innerHeight : o
|
|
14
|
+
}), u = {
|
|
15
|
+
...s,
|
|
16
|
+
...e
|
|
17
|
+
};
|
|
18
|
+
for (let e in u) l[e] = n(() => u[e](l));
|
|
19
|
+
if (i) {
|
|
20
|
+
let e = () => {
|
|
21
|
+
l.width = window.innerWidth, l.height = window.innerHeight;
|
|
22
|
+
};
|
|
23
|
+
t && queueMicrotask(e), window.addEventListener("resize", e);
|
|
24
|
+
}
|
|
25
|
+
return l;
|
|
24
26
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
+
function l() {
|
|
28
|
+
return i ||= c({}, { deferViewportSync: !0 }), i;
|
|
27
29
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
n = w(s.computed), e.config.globalProperties.$responsive = n;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
R as default,
|
|
38
|
-
g as useResponsive
|
|
39
|
-
};
|
|
30
|
+
var u = { install(e, t) {
|
|
31
|
+
i = c(Object.assign({}, { computed: {} }, t).computed), e.config.globalProperties.$responsive = i;
|
|
32
|
+
} };
|
|
33
|
+
//#endregion
|
|
34
|
+
export { u as default, l as useResponsive };
|
package/dist/slot.mjs
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Comment as e, Fragment as t, isVNode as n, useSlots as r } from "vue";
|
|
2
|
+
//#region src/utils/slot.ts
|
|
2
3
|
function i() {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// @ts-expect-error
|
|
6
|
-
get: (s, f) => (...p) => u(s[f]?.(...p))
|
|
7
|
-
});
|
|
4
|
+
let e = r();
|
|
5
|
+
return new Proxy(e, { get: (e, t) => (...n) => a(e[t]?.(...n)) });
|
|
8
6
|
}
|
|
9
|
-
function
|
|
10
|
-
|
|
7
|
+
function a(r) {
|
|
8
|
+
return r && r.some((r) => !n(r) || !(r.type === e || r.type === t && !a(r.children))) ? r : null;
|
|
11
9
|
}
|
|
12
|
-
|
|
13
|
-
function e
|
|
14
|
-
|
|
10
|
+
var o = ({ vnodes: e }) => e;
|
|
11
|
+
function s(e) {
|
|
12
|
+
return e ? e.map((e) => n(e) ? e.props?.vnodes ? s(e.props.vnodes) : e.type === t ? s(e.children) : e : e).flat(10) : null;
|
|
15
13
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
u as getSlotAsComponent,
|
|
19
|
-
e as unwrapFragments,
|
|
20
|
-
i as useSlotsAsComponents
|
|
21
|
-
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { o as RenderSlot, a as getSlotAsComponent, s as unwrapFragments, i as useSlotsAsComponents };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { markRaw as e, ref as t } from "vue";
|
|
2
|
+
import { createEventHook as n } from "@vueuse/core";
|
|
3
|
+
//#region src/components/Toast/toastDSV2.ts
|
|
4
|
+
var r = 1, i = 3, a = {
|
|
5
|
+
success: 3e3,
|
|
6
|
+
info: 7e3
|
|
7
|
+
};
|
|
8
|
+
function o(e, t) {
|
|
9
|
+
return e === !0 ? t === "success" || t === "info" ? a[t] : void 0 : typeof e == "number" ? e : void 0;
|
|
10
|
+
}
|
|
11
|
+
var s = t([]);
|
|
12
|
+
function c() {
|
|
13
|
+
return {
|
|
14
|
+
toasts: s,
|
|
15
|
+
openToast: f,
|
|
16
|
+
updateToast: p,
|
|
17
|
+
restartToast: m,
|
|
18
|
+
closeToast: h,
|
|
19
|
+
cancelCloseTimer: g
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function l(e) {
|
|
23
|
+
let { id: t } = e;
|
|
24
|
+
return {
|
|
25
|
+
id: t,
|
|
26
|
+
close: () => {
|
|
27
|
+
h(t);
|
|
28
|
+
},
|
|
29
|
+
onConfirm: e.confirmEventHook.on,
|
|
30
|
+
onCancel: e.cancelEventHook.on
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function u(t) {
|
|
34
|
+
let { component: n, messageComponent: r } = t;
|
|
35
|
+
return {
|
|
36
|
+
...t,
|
|
37
|
+
...n && { component: e(n) },
|
|
38
|
+
...r && { messageComponent: e(r) }
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function d(e, t) {
|
|
42
|
+
let { time: n, ...r } = t;
|
|
43
|
+
Object.assign(e.options, u(r)), n !== void 0 && (e.options.time = o(n, e.options.type ?? "info"));
|
|
44
|
+
}
|
|
45
|
+
function f(e) {
|
|
46
|
+
let t = s.value.find((t) => t.id === e.id);
|
|
47
|
+
if (t) return t.confirmEventHook.clear(), t.cancelEventHook.clear(), d(t, e), l(t);
|
|
48
|
+
let i = e.type || "info", a = e.id ?? r++, c = {
|
|
49
|
+
id: a,
|
|
50
|
+
options: {
|
|
51
|
+
...u(e),
|
|
52
|
+
id: a,
|
|
53
|
+
type: i,
|
|
54
|
+
time: o(e.time, i)
|
|
55
|
+
},
|
|
56
|
+
closeTimer: null,
|
|
57
|
+
paused: !1,
|
|
58
|
+
timerStartedAt: 0,
|
|
59
|
+
confirmEventHook: n(),
|
|
60
|
+
cancelEventHook: n()
|
|
61
|
+
};
|
|
62
|
+
return s.value.push(c), y(), l(c);
|
|
63
|
+
}
|
|
64
|
+
function p(e, t) {
|
|
65
|
+
let n = s.value.find((t) => t.id === e);
|
|
66
|
+
if (n) return d(n, t), l(n);
|
|
67
|
+
}
|
|
68
|
+
function m(e) {
|
|
69
|
+
let t = s.value.find((t) => t.id === e);
|
|
70
|
+
t && (t.paused = !1, x(t));
|
|
71
|
+
}
|
|
72
|
+
function h(e) {
|
|
73
|
+
let t = s.value.find((t) => t.id === e);
|
|
74
|
+
t && (b(t), v(e), y());
|
|
75
|
+
}
|
|
76
|
+
function g(e) {
|
|
77
|
+
let t = s.value.find((t) => t.id === e);
|
|
78
|
+
t && (t.paused = !0, b(t));
|
|
79
|
+
}
|
|
80
|
+
function _() {
|
|
81
|
+
s.value.forEach(b), s.value = [];
|
|
82
|
+
}
|
|
83
|
+
function v(e) {
|
|
84
|
+
let t = s.value.findIndex((t) => t.id === e);
|
|
85
|
+
t !== -1 && s.value.splice(t, 1);
|
|
86
|
+
}
|
|
87
|
+
function y() {
|
|
88
|
+
s.value.forEach((e, t) => {
|
|
89
|
+
if (!(t < 3) || e.paused) {
|
|
90
|
+
b(e);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
e.closeTimer || x(e);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function b(e) {
|
|
97
|
+
clearTimeout(e.closeTimer), e.closeTimer = null;
|
|
98
|
+
}
|
|
99
|
+
function x(e) {
|
|
100
|
+
b(e), e.options.time && (e.timerStartedAt = performance.now(), e.closeTimer = setTimeout(() => {
|
|
101
|
+
h(e.id);
|
|
102
|
+
}, e.options.time));
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
export { _ as a, c, f as i, g as n, m as o, h as r, p as s, i as t };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -12,18 +12,26 @@ import UiButtonGroup from './src/components/UiButtonGroup/UiButtonGroup.vue';
|
|
|
12
12
|
import UiButtonGroupItem from './src/components/UiButtonGroup/UiButtonGroupItem.vue';
|
|
13
13
|
import UiCard from './src/components/UiCard/UiCard.vue';
|
|
14
14
|
import UiCarousel from './src/components/UiCarousel/UiCarousel.vue';
|
|
15
|
+
import UiChoice from './src/components/UiChoice/UiChoice.vue';
|
|
15
16
|
import UiColorField from './src/components/UiColorField/UiColorField.vue';
|
|
16
17
|
import UiColorPicker from './src/components/UiColorPicker/UiColorPicker.vue';
|
|
18
|
+
import UiCombobox from './src/components/UiCombobox/UiCombobox.vue';
|
|
19
|
+
import UiDataTable from './src/components/UiDataTable/UiDataTable.vue';
|
|
17
20
|
import UiDialog from './src/components/UiDialog/UiDialog.vue';
|
|
18
21
|
import UiDialogClose from './src/components/UiDialog/UiDialogClose.vue';
|
|
19
22
|
import UiDialogContent from './src/components/UiDialog/UiDialogContent.vue';
|
|
20
23
|
import UiDialogFooter from './src/components/UiDialog/UiDialogFooter.vue';
|
|
21
24
|
import UiDialogTrigger from './src/components/UiDialog/UiDialogTrigger.vue';
|
|
25
|
+
import UiDrawer from './src/components/UiDrawer/UiDrawer.vue';
|
|
26
|
+
import UiDrawerContent from './src/components/UiDrawer/UiDrawerContent.vue';
|
|
27
|
+
import UiDrawerTrigger from './src/components/UiDrawer/UiDrawerTrigger.vue';
|
|
22
28
|
import UiDropdown from './src/components/UiDropdown/UiDropdown.vue';
|
|
23
29
|
import UiDropdownContent from './src/components/UiDropdown/UiDropdownContent.vue';
|
|
30
|
+
import UiDropdownGroup from './src/components/UiDropdown/UiDropdownGroup.vue';
|
|
24
31
|
import UiDropdownItem from './src/components/UiDropdown/UiDropdownItem.vue';
|
|
25
32
|
import UiDropdownSeparator from './src/components/UiDropdown/UiDropdownSeparator.vue';
|
|
26
33
|
import UiDropdownTrigger from './src/components/UiDropdown/UiDropdownTrigger.vue';
|
|
34
|
+
import UiEmojiPickerList from './src/components/UiEmojiPickerList/UiEmojiPickerList.vue';
|
|
27
35
|
import UiEmptyState from './src/components/UiEmptyState/UiEmptyState.vue';
|
|
28
36
|
import UiFieldWrapper from './src/components/UiFieldWrapper/UiFieldWrapper.vue';
|
|
29
37
|
import UiFormField from './src/components/UiForm/UiFormField.vue';
|
|
@@ -38,6 +46,7 @@ import UiLabel from './src/components/UiLabel/UiLabel.vue';
|
|
|
38
46
|
import UiList from './src/components/UiList/UiList.vue';
|
|
39
47
|
import UiListItem from './src/components/UiListItem/UiListItem.vue';
|
|
40
48
|
import UiLoader from './src/components/UiLoader/UiLoader.vue';
|
|
49
|
+
import UiSpinnerIcon from './src/components/UiLoader/UiSpinnerIcon.vue';
|
|
41
50
|
import UiLogo from './src/components/UiLogo/UiLogo.vue';
|
|
42
51
|
import UiMenu from './src/components/UiMenu/UiMenu.vue';
|
|
43
52
|
import UiMenuContent from './src/components/UiMenu/UiMenuContent.vue';
|
|
@@ -49,14 +58,21 @@ import UiMenuSub from './src/components/UiMenu/UiMenuSub.vue';
|
|
|
49
58
|
import UiMenuSubContent from './src/components/UiMenu/UiMenuSubContent.vue';
|
|
50
59
|
import UiMenuSubTrigger from './src/components/UiMenu/UiMenuSubTrigger.vue';
|
|
51
60
|
import UiMenuTrigger from './src/components/UiMenu/UiMenuTrigger.vue';
|
|
61
|
+
import UiNestedOptions from './src/components/UiNestedOptions/UiNestedOptions.vue';
|
|
52
62
|
import UiPage from './src/components/UiPage/UiPage.vue';
|
|
53
63
|
import UiPageHeader from './src/components/UiPageHeader/UiPageHeader.vue';
|
|
64
|
+
import UiPagination from './src/components/UiPagination/UiPagination.vue';
|
|
65
|
+
import UiPane from './src/components/UiPane/UiPane.vue';
|
|
66
|
+
import UiPaneContent from './src/components/UiPane/UiPaneContent.vue';
|
|
67
|
+
import UiPaneTrigger from './src/components/UiPane/UiPaneTrigger.vue';
|
|
54
68
|
import UiPopover from './src/components/UiPopover/UiPopover.vue';
|
|
55
69
|
import UiPopoverAnchor from './src/components/UiPopover/UiPopoverAnchor.vue';
|
|
56
70
|
import UiPopoverContent from './src/components/UiPopover/UiPopoverContent.vue';
|
|
57
71
|
import UiPopoverTrigger from './src/components/UiPopover/UiPopoverTrigger.vue';
|
|
58
72
|
import UiProgress from './src/components/UiProgress/UiProgress.vue';
|
|
73
|
+
import UiRating from './src/components/UiRating/UiRating.vue';
|
|
59
74
|
import UiRoomButton from './src/components/UiRoomButton/UiRoomButton.vue';
|
|
75
|
+
import UiRoomCountdown from './src/components/UiRoomCountdown/UiRoomCountdown.vue';
|
|
60
76
|
import UiShell from './src/components/UiShell/UiShell.vue';
|
|
61
77
|
import UiSideMenu from './src/components/UiSideMenu/UiSideMenu.vue';
|
|
62
78
|
import UiSideMenuBottom from './src/components/UiSideMenu/UiSideMenuBottom.vue';
|
|
@@ -71,6 +87,8 @@ import UiStepperSeparator from './src/components/UiStepper/UiStepperSeparator.vu
|
|
|
71
87
|
import UiStepperTitle from './src/components/UiStepper/UiStepperTitle.vue';
|
|
72
88
|
import UiSwitch from './src/components/UiSwitch/UiSwitch.vue';
|
|
73
89
|
import UiTable from './src/components/UiTable/UiTable.vue';
|
|
90
|
+
import UiTableActionsCell from './src/components/UiTable/UiTableActionsCell.vue';
|
|
91
|
+
import UiTableActionsHeaderCell from './src/components/UiTable/UiTableActionsHeaderCell.vue';
|
|
74
92
|
import UiTableBody from './src/components/UiTable/UiTableBody.vue';
|
|
75
93
|
import UiTableCell from './src/components/UiTable/UiTableCell.vue';
|
|
76
94
|
import UiTableHeader from './src/components/UiTable/UiTableHeader.vue';
|
|
@@ -85,4 +103,4 @@ import UiTooltip from './src/components/UiTooltip/UiTooltip.vue';
|
|
|
85
103
|
import UiTooltipContent from './src/components/UiTooltip/UiTooltipContent.vue';
|
|
86
104
|
import UiTooltipProvider from './src/components/UiTooltip/UiTooltipProvider.vue';
|
|
87
105
|
import UiTooltipTrigger from './src/components/UiTooltip/UiTooltipTrigger.vue';
|
|
88
|
-
export { UiActionBar, UiActionBarItem, UiActionBarSeparator, UiAnimatedLogo, UiAvatar, UiAvatarList, UiBadge, UiBanner, UiBreadcrumb, UiButton, UiButtonGroup, UiButtonGroupItem, UiCard, UiCarousel, UiColorField, UiColorPicker, UiDialog, UiDialogClose, UiDialogContent, UiDialogFooter, UiDialogTrigger, UiDropdown, UiDropdownContent, UiDropdownItem, UiDropdownSeparator, UiDropdownTrigger, UiEmptyState, UiFieldWrapper, UiFormField, UiHorizontalSeparator, UiInputCheckbox, UiInputEmoji, UiInputRadio, UiInputRadioGroup, UiInputSelect, UiInputTextarea, UiLabel, UiList, UiListItem, UiLoader, UiLogo, UiMenu, UiMenuContent, UiMenuGroup, UiMenuItem, UiMenuLabel, UiMenuSeparator, UiMenuSub, UiMenuSubContent, UiMenuSubTrigger, UiMenuTrigger, UiPage, UiPageHeader, UiPopover, UiPopoverAnchor, UiPopoverContent, UiPopoverTrigger, UiProgress, UiRoomButton, UiShell, UiSideMenu, UiSideMenuBottom, UiSideMenuItem, UiSideMenuItemContent, UiSideMenuTop, UiStepper, UiStepperDescription, UiStepperIndicator, UiStepperItem, UiStepperSeparator, UiStepperTitle, UiSwitch, UiTable, UiTableBody, UiTableCell, UiTableHeader, UiTableHeaderCell, UiTableRow, UiTabs, UiTag, UiTextField, UiTimeline, UiTimelineItem, UiTooltip, UiTooltipContent, UiTooltipProvider, UiTooltipTrigger };
|
|
106
|
+
export { UiActionBar, UiActionBarItem, UiActionBarSeparator, UiAnimatedLogo, UiAvatar, UiAvatarList, UiBadge, UiBanner, UiBreadcrumb, UiButton, UiButtonGroup, UiButtonGroupItem, UiCard, UiCarousel, UiChoice, UiColorField, UiColorPicker, UiCombobox, UiDataTable, UiDialog, UiDialogClose, UiDialogContent, UiDialogFooter, UiDialogTrigger, UiDrawer, UiDrawerContent, UiDrawerTrigger, UiDropdown, UiDropdownContent, UiDropdownGroup, UiDropdownItem, UiDropdownSeparator, UiDropdownTrigger, UiEmojiPickerList, UiEmptyState, UiFieldWrapper, UiFormField, UiHorizontalSeparator, UiInputCheckbox, UiInputEmoji, UiInputRadio, UiInputRadioGroup, UiInputSelect, UiInputTextarea, UiLabel, UiList, UiListItem, UiLoader, UiSpinnerIcon, UiLogo, UiMenu, UiMenuContent, UiMenuGroup, UiMenuItem, UiMenuLabel, UiMenuSeparator, UiMenuSub, UiMenuSubContent, UiMenuSubTrigger, UiMenuTrigger, UiNestedOptions, UiPage, UiPageHeader, UiPagination, UiPane, UiPaneContent, UiPaneTrigger, UiPopover, UiPopoverAnchor, UiPopoverContent, UiPopoverTrigger, UiProgress, UiRating, UiRoomButton, UiRoomCountdown, UiShell, UiSideMenu, UiSideMenuBottom, UiSideMenuItem, UiSideMenuItemContent, UiSideMenuTop, UiStepper, UiStepperDescription, UiStepperIndicator, UiStepperItem, UiStepperSeparator, UiStepperTitle, UiSwitch, UiTable, UiTableActionsCell, UiTableActionsHeaderCell, UiTableBody, UiTableCell, UiTableHeader, UiTableHeaderCell, UiTableRow, UiTabs, UiTag, UiTextField, UiTimeline, UiTimelineItem, UiTooltip, UiTooltipContent, UiTooltipProvider, UiTooltipTrigger };
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { ToastBaseOptions } from './toastDSV2';
|
|
2
|
+
import type { ThemeColorType } from '../../theme';
|
|
3
|
+
type ToastMessageProps = Partial<ToastBaseOptions> & {
|
|
4
|
+
/**
|
|
5
|
+
* When the store started the current run of the close timer, so the bar can
|
|
6
|
+
* animate again. Not a caller-facing option — `LayoutToasts` passes it.
|
|
7
|
+
*/
|
|
8
|
+
timerStartedAt?: number;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<ToastMessageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
11
|
mouseenter: (...args: any[]) => void;
|
|
4
12
|
mouseleave: (...args: any[]) => void;
|
|
5
13
|
close: (...args: any[]) => void;
|
|
6
|
-
cancel: (...args: any[]) => void;
|
|
7
14
|
confirm: (...args: any[]) => void;
|
|
8
|
-
|
|
15
|
+
cancel: (...args: any[]) => void;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<ToastMessageProps> & Readonly<{
|
|
9
17
|
onMouseenter?: ((...args: any[]) => any) | undefined;
|
|
10
18
|
onMouseleave?: ((...args: any[]) => any) | undefined;
|
|
11
19
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
12
|
-
onCancel?: ((...args: any[]) => any) | undefined;
|
|
13
20
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
21
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
14
22
|
}>, {
|
|
15
|
-
type:
|
|
23
|
+
type: ThemeColorType;
|
|
16
24
|
closable: boolean;
|
|
17
|
-
locked: boolean;
|
|
18
25
|
confirmHrefTarget: "_blank" | "_self";
|
|
26
|
+
actionsSize: import("../../constants/sizes.js").Size;
|
|
27
|
+
locked: boolean;
|
|
28
|
+
timerStartedAt: number;
|
|
19
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
30
|
declare const _default: typeof __VLS_export;
|
|
21
31
|
export default _default;
|
|
@@ -1,16 +1,47 @@
|
|
|
1
|
-
import type { Component } from 'vue';
|
|
1
|
+
import type { Component, Ref } from 'vue';
|
|
2
2
|
import type { RouteLocationRaw } from 'vue-router';
|
|
3
3
|
import { type EventHook } from '@vueuse/core';
|
|
4
4
|
import type { ThemeColorType } from '../../theme';
|
|
5
|
+
import type { Size } from '../../constants';
|
|
6
|
+
/**
|
|
7
|
+
* How many toasts render at once. It lives here rather than in `LayoutToasts`
|
|
8
|
+
* because the store schedules the close timers, and only the toasts actually
|
|
9
|
+
* on screen may run one.
|
|
10
|
+
*/
|
|
11
|
+
export declare const MAX_ITEMS_DISPLAYED = 3;
|
|
5
12
|
export type ToastType = 'alert' | 'warning' | 'info' | 'success';
|
|
6
|
-
|
|
7
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Identity shown in place of the status icon. Size and variant are fixed by
|
|
15
|
+
* the design, so only the identity-bearing `UiAvatar` props are exposed.
|
|
16
|
+
*/
|
|
17
|
+
export interface ToastAvatar {
|
|
18
|
+
src?: string | null;
|
|
19
|
+
firstName?: string | null;
|
|
20
|
+
lastName?: string | null;
|
|
21
|
+
customText?: string | null;
|
|
22
|
+
color?: string | null;
|
|
23
|
+
alt?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Every field a toast understands, all optional. `openToast` narrows this to
|
|
27
|
+
* `ToastOptions`, which additionally demands something to display.
|
|
28
|
+
*/
|
|
29
|
+
export interface ToastBaseOptions {
|
|
30
|
+
message?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Rendered in place of `message`, inside the default layout — `component`
|
|
33
|
+
* replaces the whole body instead. Markup, and sanitizing it, stays with
|
|
34
|
+
* the caller.
|
|
35
|
+
*/
|
|
36
|
+
messageComponent?: Component;
|
|
37
|
+
messageComponentProps?: Record<string, unknown>;
|
|
8
38
|
id?: PropertyKey;
|
|
9
39
|
title?: string;
|
|
10
40
|
info?: string;
|
|
11
41
|
type?: ThemeColorType;
|
|
42
|
+
avatar?: ToastAvatar;
|
|
12
43
|
time?: number | boolean;
|
|
13
|
-
|
|
44
|
+
progressIndeterminate?: boolean;
|
|
14
45
|
customIcon?: string;
|
|
15
46
|
confirmLabel?: string;
|
|
16
47
|
confirmHref?: string;
|
|
@@ -18,84 +49,78 @@ export interface ToastOptions {
|
|
|
18
49
|
confirmTo?: RouteLocationRaw;
|
|
19
50
|
confirmIcon?: string;
|
|
20
51
|
confirmColor?: ThemeColorType;
|
|
52
|
+
actionsSize?: Size;
|
|
21
53
|
cancelLabel?: string;
|
|
22
54
|
locked?: boolean;
|
|
23
55
|
closable?: boolean;
|
|
24
56
|
component?: Component;
|
|
25
57
|
componentProps?: Record<string, unknown>;
|
|
26
58
|
}
|
|
27
|
-
|
|
28
|
-
|
|
59
|
+
/**
|
|
60
|
+
* A toast has to show something. Requiring one of the three content fields
|
|
61
|
+
* here means an empty toast is a type error rather than an empty white box.
|
|
62
|
+
*/
|
|
63
|
+
export type ToastContent = {
|
|
29
64
|
message: string;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
65
|
+
} | {
|
|
66
|
+
messageComponent: Component;
|
|
67
|
+
} | {
|
|
68
|
+
title: string;
|
|
69
|
+
} | {
|
|
70
|
+
component: Component;
|
|
71
|
+
};
|
|
72
|
+
export type ToastOptions = ToastBaseOptions & ToastContent;
|
|
73
|
+
/**
|
|
74
|
+
* The caller's options as the store keeps them: `time` has been resolved to
|
|
75
|
+
* milliseconds, so nothing downstream has to handle the `true` shorthand.
|
|
76
|
+
*/
|
|
77
|
+
type StoredToastOptions = Omit<ToastBaseOptions, 'time'> & {
|
|
34
78
|
time?: number;
|
|
35
|
-
|
|
36
|
-
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* A toast on screen: what the caller asked for, kept in `options`, plus the
|
|
82
|
+
* bookkeeping the store needs alongside it. They stay apart so `LayoutToasts`
|
|
83
|
+
* can hand the component the options without the timer handle and the event
|
|
84
|
+
* hooks falling through onto the DOM.
|
|
85
|
+
*/
|
|
86
|
+
interface ToastItem {
|
|
87
|
+
id: PropertyKey;
|
|
88
|
+
options: StoredToastOptions;
|
|
37
89
|
closeTimer: any;
|
|
90
|
+
paused: boolean;
|
|
91
|
+
timerStartedAt: number;
|
|
38
92
|
confirmEventHook: EventHook;
|
|
39
93
|
cancelEventHook: EventHook;
|
|
40
94
|
}
|
|
41
95
|
export declare function useToasts(): {
|
|
42
|
-
toasts:
|
|
43
|
-
id: PropertyKey;
|
|
44
|
-
message: string;
|
|
45
|
-
title?: string | undefined;
|
|
46
|
-
info?: string | undefined;
|
|
47
|
-
type?: ThemeColorType | undefined;
|
|
48
|
-
icon?: string | undefined;
|
|
49
|
-
time?: number | undefined;
|
|
50
|
-
locked?: boolean | undefined;
|
|
51
|
-
progessIndeterminate?: boolean | undefined;
|
|
52
|
-
closeTimer: any;
|
|
53
|
-
confirmEventHook: {
|
|
54
|
-
on: import("@vueuse/core").EventHookOn<any>;
|
|
55
|
-
off: import("@vueuse/core").EventHookOff<any>;
|
|
56
|
-
trigger: import("@vueuse/core").EventHookTrigger<any>;
|
|
57
|
-
clear: () => void;
|
|
58
|
-
};
|
|
59
|
-
cancelEventHook: {
|
|
60
|
-
on: import("@vueuse/core").EventHookOn<any>;
|
|
61
|
-
off: import("@vueuse/core").EventHookOff<any>;
|
|
62
|
-
trigger: import("@vueuse/core").EventHookTrigger<any>;
|
|
63
|
-
clear: () => void;
|
|
64
|
-
};
|
|
65
|
-
}[], ToastItem[] | {
|
|
66
|
-
id: PropertyKey;
|
|
67
|
-
message: string;
|
|
68
|
-
title?: string | undefined;
|
|
69
|
-
info?: string | undefined;
|
|
70
|
-
type?: ThemeColorType | undefined;
|
|
71
|
-
icon?: string | undefined;
|
|
72
|
-
time?: number | undefined;
|
|
73
|
-
locked?: boolean | undefined;
|
|
74
|
-
progessIndeterminate?: boolean | undefined;
|
|
75
|
-
closeTimer: any;
|
|
76
|
-
confirmEventHook: {
|
|
77
|
-
on: import("@vueuse/core").EventHookOn<any>;
|
|
78
|
-
off: import("@vueuse/core").EventHookOff<any>;
|
|
79
|
-
trigger: import("@vueuse/core").EventHookTrigger<any>;
|
|
80
|
-
clear: () => void;
|
|
81
|
-
};
|
|
82
|
-
cancelEventHook: {
|
|
83
|
-
on: import("@vueuse/core").EventHookOn<any>;
|
|
84
|
-
off: import("@vueuse/core").EventHookOff<any>;
|
|
85
|
-
trigger: import("@vueuse/core").EventHookTrigger<any>;
|
|
86
|
-
clear: () => void;
|
|
87
|
-
};
|
|
88
|
-
}[]>;
|
|
89
|
-
closeToast: typeof closeToast;
|
|
96
|
+
toasts: Ref<ToastItem[], ToastItem[]>;
|
|
90
97
|
openToast: typeof openToast;
|
|
98
|
+
updateToast: typeof updateToast;
|
|
99
|
+
restartToast: typeof restartToast;
|
|
100
|
+
closeToast: typeof closeToast;
|
|
91
101
|
cancelCloseTimer: typeof cancelCloseTimer;
|
|
92
102
|
};
|
|
93
|
-
|
|
103
|
+
/** What a caller gets back for the toast it just opened or patched. */
|
|
104
|
+
interface ToastHandle {
|
|
94
105
|
id: PropertyKey;
|
|
95
106
|
close: () => void;
|
|
96
|
-
onConfirm:
|
|
97
|
-
onCancel:
|
|
98
|
-
}
|
|
107
|
+
onConfirm: EventHook['on'];
|
|
108
|
+
onCancel: EventHook['on'];
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Opens a toast. An `id` is an identity, so opening one that is already on
|
|
112
|
+
* screen patches it in place instead of stacking a second copy — that is what
|
|
113
|
+
* the room's per-user and per-link toasts rely on. It does not restart the
|
|
114
|
+
* close timer; call `restartToast` for that.
|
|
115
|
+
*/
|
|
116
|
+
export declare function openToast(options: ToastOptions): ToastHandle;
|
|
117
|
+
/**
|
|
118
|
+
* Patches an open toast. Unlike `openToast` it needs no content, so a caller
|
|
119
|
+
* can change one field. Returns undefined if the toast has already closed.
|
|
120
|
+
*/
|
|
121
|
+
export declare function updateToast(id: PropertyKey, patch: Omit<ToastBaseOptions, 'id'>): ToastHandle | undefined;
|
|
122
|
+
/** Runs the close timer again from zero, e.g. when the pointer leaves. */
|
|
123
|
+
export declare function restartToast(id: PropertyKey): void;
|
|
99
124
|
export declare function closeToast(id: PropertyKey): void;
|
|
100
125
|
export declare function cancelCloseTimer(id: PropertyKey): void;
|
|
101
126
|
export declare function resetToasts(): void;
|
|
@@ -14,3 +14,5 @@ export interface ActionBarContext {
|
|
|
14
14
|
* consumer threading props down manually.
|
|
15
15
|
*/
|
|
16
16
|
export declare const ACTION_BAR_CONTEXT_KEY: InjectionKey<ActionBarContext>;
|
|
17
|
+
export declare const ACTION_BAR_RAIL_RADIUS: Record<ActionBarSize, string>;
|
|
18
|
+
export declare const ACTION_BAR_ITEM_RADIUS: Record<ActionBarSize, string>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** `xs` 24 · `sm` 32 · `md` 40 · `lg` 48 · `xl` 64 · `10xl` 128 */
|
|
2
|
+
export type UiAvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '10xl';
|
|
1
3
|
interface Props {
|
|
2
4
|
/** Image URL. Initials are shown when missing or when the image fails to load. */
|
|
3
5
|
src?: string | null;
|
|
@@ -9,7 +11,7 @@ interface Props {
|
|
|
9
11
|
* Avatar size. Maps to the `--spacing-component-*` tokens:
|
|
10
12
|
* `xs` 24, `sm` 32, `md` 40, `lg` 48, `xl` 64, `10xl` 128.
|
|
11
13
|
*/
|
|
12
|
-
size?:
|
|
14
|
+
size?: UiAvatarSize;
|
|
13
15
|
/**
|
|
14
16
|
* `default` is light-on-dark (used standalone or inside an avatar list);
|
|
15
17
|
* `more` is the light-grey `+N` chip used by `UiAvatarList` overflow.
|
|
@@ -35,7 +37,7 @@ type __VLS_Slots = {} & {
|
|
|
35
37
|
badge?: (props: typeof __VLS_1) => any;
|
|
36
38
|
};
|
|
37
39
|
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
38
|
-
size:
|
|
40
|
+
size: UiAvatarSize;
|
|
39
41
|
icon: string;
|
|
40
42
|
src: string | null;
|
|
41
43
|
firstName: string | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UiAvatarSize } from '../UiAvatar/UiAvatar.vue';
|
|
1
2
|
export interface AvatarListItem {
|
|
2
3
|
id?: string | number;
|
|
3
4
|
firstName?: string | null;
|
|
@@ -17,10 +18,10 @@ interface Props {
|
|
|
17
18
|
/** Maximum visible avatars before showing the `+N` overflow chip. */
|
|
18
19
|
max?: number;
|
|
19
20
|
/** Mirrors `UiAvatar`'s size scale. The overlap scales with the size. */
|
|
20
|
-
size?:
|
|
21
|
+
size?: UiAvatarSize;
|
|
21
22
|
}
|
|
22
23
|
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
23
|
-
size:
|
|
24
|
+
size: UiAvatarSize;
|
|
24
25
|
total: number | null;
|
|
25
26
|
max: number;
|
|
26
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -9,6 +9,14 @@ export interface UiBannerProps {
|
|
|
9
9
|
* @values full-width, horizontal, vertical
|
|
10
10
|
*/
|
|
11
11
|
variant?: 'full-width' | 'horizontal' | 'vertical';
|
|
12
|
+
/**
|
|
13
|
+
* Title text; the default slot overrides it
|
|
14
|
+
*/
|
|
15
|
+
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Description text; the description slot overrides it
|
|
18
|
+
*/
|
|
19
|
+
description?: string;
|
|
12
20
|
/**
|
|
13
21
|
* Show or hide the icon
|
|
14
22
|
*/
|
|
@@ -58,11 +66,13 @@ type __VLS_ModelProps = {
|
|
|
58
66
|
'closed'?: boolean;
|
|
59
67
|
};
|
|
60
68
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
61
|
-
declare var __VLS_1: {}, __VLS_3: {};
|
|
69
|
+
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
62
70
|
type __VLS_Slots = {} & {
|
|
63
71
|
default?: (props: typeof __VLS_1) => any;
|
|
64
72
|
} & {
|
|
65
73
|
description?: (props: typeof __VLS_3) => any;
|
|
74
|
+
} & {
|
|
75
|
+
action?: (props: typeof __VLS_5) => any;
|
|
66
76
|
};
|
|
67
77
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
68
78
|
"banner-action": () => any;
|
|
@@ -73,8 +83,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
73
83
|
onClose?: (() => any) | undefined;
|
|
74
84
|
"onUpdate:closed"?: ((value: boolean) => any) | undefined;
|
|
75
85
|
}>, {
|
|
86
|
+
title: string;
|
|
76
87
|
variant: "full-width" | "horizontal" | "vertical";
|
|
77
88
|
color: "neutral" | "primary" | "success" | "warning" | "danger";
|
|
89
|
+
description: string;
|
|
78
90
|
showIcon: boolean;
|
|
79
91
|
actionLabel: string;
|
|
80
92
|
actionDisabled: boolean;
|