@livestorm/ui-vue 2.0.5 → 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 +9 -6
- 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 -222
- package/dist/i18n-B8QOMuFD.mjs +46 -0
- package/dist/index.mjs +4 -87
- 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 +23 -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/UiActionBar.vue.d.ts +3 -1
- package/dist/types/src/components/UiActionBar/UiActionBarItem.vue.d.ts +18 -3
- package/dist/types/src/components/UiActionBar/types.d.ts +5 -1
- 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 +102 -38
- package/dist/types/src/components/UiButtonGroup/UiButtonGroup.vue.d.ts +8 -2
- package/dist/types/src/components/UiButtonGroup/UiButtonGroupItem.vue.d.ts +3 -0
- package/dist/types/src/components/UiButtonGroup/types.d.ts +5 -1
- 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 +9 -4
- 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/UiInputEmoji/UiInputEmoji.vue.d.ts +45 -0
- package/dist/types/src/components/UiInputRadio/RadioGlyph.vue.d.ts +19 -0
- package/dist/types/src/components/UiInputRadio/UiInputRadio.vue.d.ts +80 -0
- package/dist/types/src/components/UiInputRadio/UiInputRadioGroup.vue.d.ts +86 -0
- package/dist/types/src/components/UiInputRadio/types.d.ts +19 -0
- 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/UiLoader.vue.d.ts +6 -5
- package/dist/types/src/components/UiLoader/UiSpinnerIcon.vue.d.ts +3 -0
- package/dist/types/src/components/UiLogo/UiLogo.vue.d.ts +9 -3
- 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 +106 -8
- 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/UiProgress/UiProgress.vue.d.ts +1 -1
- 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 +114 -0
- package/dist/types/src/components/UiSwitch/types.d.ts +3 -0
- 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 +8 -2
- 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 +23 -0
- 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 +13 -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/constants/sizes.d.ts +1 -1
- 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 +22 -0
- package/index.js +44 -0
- package/package.json +28 -20
- package/src/components/Toast/LayoutToasts.vue +19 -11
- package/src/components/Toast/ToastMessage.vue +130 -73
- package/src/components/Toast/toastDSV2.ts +238 -67
- package/src/components/UiActionBar/UiActionBar.vue +15 -5
- package/src/components/UiActionBar/UiActionBarItem.vue +65 -38
- package/src/components/UiActionBar/types.ts +16 -1
- package/src/components/UiAvatar/UiAvatar.vue +9 -3
- package/src/components/UiAvatarList/UiAvatarList.vue +51 -20
- package/src/components/UiBadge/UiBadge.vue +1 -1
- package/src/components/UiBanner/UiBanner.vue +77 -27
- package/src/components/UiBreadcrumb/UiBreadcrumb.vue +1 -1
- package/src/components/UiButton/UiButton.vue +96 -29
- package/src/components/UiButtonGroup/UiButtonGroup.vue +22 -16
- package/src/components/UiButtonGroup/UiButtonGroupItem.vue +44 -14
- package/src/components/UiButtonGroup/types.ts +20 -1
- package/src/components/UiCard/UiCard.vue +20 -23
- package/src/components/UiCarousel/UiCarousel.vue +2 -2
- 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 +16 -13
- 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/UiDialogClose.vue +1 -1
- 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 +45 -18
- package/src/components/UiDropdown/UiDropdownSeparator.vue +1 -1
- package/src/components/UiDropdown/UiDropdownTrigger.vue +139 -45
- 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 +10 -4
- 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 +96 -0
- package/src/components/UiInputRadio/RadioGlyph.vue +45 -0
- package/src/components/UiInputRadio/UiInputRadio.vue +382 -0
- package/src/components/UiInputRadio/UiInputRadioGroup.vue +166 -0
- package/src/components/UiInputRadio/types.ts +24 -0
- 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 +11 -29
- package/src/components/UiLoader/UiSpinnerIcon.vue +21 -0
- package/src/components/UiLogo/UiLogo.vue +41 -7
- 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 +2 -2
- package/src/components/UiNestedOptions/UiNestedOptions.vue +6 -0
- package/src/components/UiPage/UiPage.vue +273 -47
- package/src/components/UiPageHeader/UiPageHeader.vue +29 -9
- 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 +14 -45
- package/src/components/UiRoomCountdown/UiRoomCountdown.vue +376 -0
- package/src/components/UiShell/UiShell.vue +10 -4
- package/src/components/UiSideMenu/UiSideMenu.vue +158 -18
- package/src/components/UiSideMenu/UiSideMenuItemContent.vue +22 -18
- package/src/components/UiStepper/UiStepper.vue +3 -16
- package/src/components/UiStepper/UiStepperDescription.vue +1 -13
- package/src/components/UiStepper/UiStepperIndicator.vue +17 -57
- 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 +375 -0
- package/src/components/UiSwitch/types.ts +5 -0
- 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 +61 -63
- 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 +27 -47
- package/src/components/UiTimeline/README.md +6 -6
- package/src/components/UiTimeline/UiTimelineItem.vue +3 -3
- 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 +66 -0
- 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 +43 -0
- package/src/composables/usePullGesture.ts +142 -0
- package/src/composables/useThemeAndModes.ts +28 -1
- package/src/constants/sizes.ts +1 -1
- package/src/css/body.css +16 -1
- package/src/css/fonts.css +39 -5
- package/src/global.d.ts +44 -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-DJFdCn2R.mjs +0 -5456
- 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/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/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/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/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
|
@@ -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;
|
|
@@ -3,6 +3,8 @@ import { type ButtonVariant, type ButtonColor } from '../../composables/useButto
|
|
|
3
3
|
import type { RouteLocationRaw } from 'vue-router';
|
|
4
4
|
export type Variant = ButtonVariant;
|
|
5
5
|
export type Color = ButtonColor;
|
|
6
|
+
declare const TEXT_STYLES: readonly ["action", "body"];
|
|
7
|
+
export type TextStyle = typeof TEXT_STYLES[number];
|
|
6
8
|
declare const _default: typeof __VLS_export;
|
|
7
9
|
export default _default;
|
|
8
10
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -11,7 +13,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
11
13
|
default: string;
|
|
12
14
|
};
|
|
13
15
|
size: {
|
|
14
|
-
type:
|
|
16
|
+
type: () => Size;
|
|
15
17
|
default: string;
|
|
16
18
|
validator: (value: Size) => boolean;
|
|
17
19
|
};
|
|
@@ -40,6 +42,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
40
42
|
type: (BooleanConstructor | StringConstructor)[];
|
|
41
43
|
default: undefined;
|
|
42
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* `body` sets the label in the regular body text style and its icons one step smaller, the look of a
|
|
47
|
+
* `UiDropdownTrigger` of variant `tertiary`, so a button reads as one more control beside such triggers.
|
|
48
|
+
*/
|
|
49
|
+
textStyle: {
|
|
50
|
+
type: () => TextStyle;
|
|
51
|
+
default: string;
|
|
52
|
+
validator: (value: TextStyle) => boolean;
|
|
53
|
+
};
|
|
43
54
|
loading: {
|
|
44
55
|
type: BooleanConstructor;
|
|
45
56
|
default: boolean;
|
|
@@ -64,11 +75,34 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
64
75
|
type: () => RouteLocationRaw;
|
|
65
76
|
default: undefined;
|
|
66
77
|
};
|
|
78
|
+
/**
|
|
79
|
+
* Renders the label as a link that flows and wraps inside running text: no box, the surrounding font size,
|
|
80
|
+
* the tertiary colour. Without `to` or `href` it is a focusable `role="button"` span, since a `<button>`
|
|
81
|
+
* cannot break across lines.
|
|
82
|
+
*/
|
|
83
|
+
inline: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
67
87
|
}>, {
|
|
68
88
|
component: import("vue").ComputedRef<{
|
|
89
|
+
is: string;
|
|
90
|
+
props: {
|
|
91
|
+
role: string;
|
|
92
|
+
tabindex: number;
|
|
93
|
+
'aria-disabled': any;
|
|
94
|
+
to?: undefined;
|
|
95
|
+
href?: undefined;
|
|
96
|
+
type?: undefined;
|
|
97
|
+
disabled?: undefined;
|
|
98
|
+
};
|
|
99
|
+
} | {
|
|
69
100
|
is: string;
|
|
70
101
|
props: {
|
|
71
102
|
to: any;
|
|
103
|
+
role?: undefined;
|
|
104
|
+
tabindex?: undefined;
|
|
105
|
+
'aria-disabled'?: undefined;
|
|
72
106
|
href?: undefined;
|
|
73
107
|
type?: undefined;
|
|
74
108
|
disabled?: undefined;
|
|
@@ -77,6 +111,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
77
111
|
is: string;
|
|
78
112
|
props: {
|
|
79
113
|
href: any;
|
|
114
|
+
role?: undefined;
|
|
115
|
+
tabindex?: undefined;
|
|
116
|
+
'aria-disabled'?: undefined;
|
|
80
117
|
to?: undefined;
|
|
81
118
|
type?: undefined;
|
|
82
119
|
disabled?: undefined;
|
|
@@ -86,6 +123,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
86
123
|
props: {
|
|
87
124
|
type: any;
|
|
88
125
|
disabled: any;
|
|
126
|
+
role?: undefined;
|
|
127
|
+
tabindex?: undefined;
|
|
128
|
+
'aria-disabled'?: undefined;
|
|
89
129
|
to?: undefined;
|
|
90
130
|
href?: undefined;
|
|
91
131
|
};
|
|
@@ -98,64 +138,68 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
98
138
|
}>[] | undefined>;
|
|
99
139
|
hasLabel: import("vue").ComputedRef<boolean>;
|
|
100
140
|
isLink: import("vue").ComputedRef<boolean>;
|
|
101
|
-
iconSizeClasses: import("vue").ComputedRef<
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
141
|
+
iconSizeClasses: import("vue").ComputedRef<"size-3" | "size-4" | "size-5" | "size-6" | "size-7" | "size-2.5" | "size-3.5">;
|
|
142
|
+
trailingIconSizeClasses: import("vue").ComputedRef<"size-4" | "size-5" | "size-6" | "size-2.5" | "size-3.5">;
|
|
143
|
+
shape: import("vue").ComputedRef<{
|
|
144
|
+
height: string;
|
|
145
|
+
square: string;
|
|
146
|
+
radius: string;
|
|
105
147
|
}>;
|
|
106
148
|
buttonClasses: import("vue").ComputedRef<(string | {
|
|
107
|
-
'
|
|
108
|
-
'
|
|
109
|
-
'
|
|
110
|
-
'
|
|
111
|
-
'
|
|
112
|
-
'
|
|
113
|
-
'
|
|
149
|
+
'grid place-items-center': boolean;
|
|
150
|
+
'text-content-legends-medium-md'?: undefined;
|
|
151
|
+
'text-content-text-md-regular'?: undefined;
|
|
152
|
+
'text-content-text-lg-regular'?: undefined;
|
|
153
|
+
'text-action-button-sm'?: undefined;
|
|
154
|
+
'text-action-button-md'?: undefined;
|
|
155
|
+
'text-action-button-lg'?: undefined;
|
|
114
156
|
'inline-flex'?: undefined;
|
|
115
157
|
} | {
|
|
116
|
-
'
|
|
117
|
-
'
|
|
118
|
-
'
|
|
119
|
-
'
|
|
120
|
-
'
|
|
121
|
-
'
|
|
122
|
-
'
|
|
158
|
+
'text-content-legends-medium-md': boolean;
|
|
159
|
+
'text-content-text-md-regular': boolean;
|
|
160
|
+
'text-content-text-lg-regular': boolean;
|
|
161
|
+
'grid place-items-center'?: undefined;
|
|
162
|
+
'text-action-button-sm'?: undefined;
|
|
163
|
+
'text-action-button-md'?: undefined;
|
|
164
|
+
'text-action-button-lg'?: undefined;
|
|
123
165
|
'inline-flex'?: undefined;
|
|
124
166
|
} | {
|
|
125
|
-
'
|
|
126
|
-
'
|
|
127
|
-
'
|
|
128
|
-
'size-8'?: undefined;
|
|
129
|
-
'size-10'?: undefined;
|
|
130
|
-
'size-12'?: undefined;
|
|
167
|
+
'text-action-button-sm': boolean;
|
|
168
|
+
'text-action-button-md': boolean;
|
|
169
|
+
'text-action-button-lg': boolean;
|
|
131
170
|
'grid place-items-center'?: undefined;
|
|
171
|
+
'text-content-legends-medium-md'?: undefined;
|
|
172
|
+
'text-content-text-md-regular'?: undefined;
|
|
173
|
+
'text-content-text-lg-regular'?: undefined;
|
|
132
174
|
'inline-flex'?: undefined;
|
|
133
175
|
} | {
|
|
134
176
|
'inline-flex': boolean;
|
|
135
|
-
'size-8'?: undefined;
|
|
136
|
-
'size-10'?: undefined;
|
|
137
|
-
'size-12'?: undefined;
|
|
138
177
|
'grid place-items-center'?: undefined;
|
|
139
|
-
'
|
|
140
|
-
'
|
|
141
|
-
'
|
|
178
|
+
'text-content-legends-medium-md'?: undefined;
|
|
179
|
+
'text-content-text-md-regular'?: undefined;
|
|
180
|
+
'text-content-text-lg-regular'?: undefined;
|
|
181
|
+
'text-action-button-sm'?: undefined;
|
|
182
|
+
'text-action-button-md'?: undefined;
|
|
183
|
+
'text-action-button-lg'?: undefined;
|
|
142
184
|
})[]>;
|
|
143
185
|
bgClasses: import("vue").ComputedRef<string>;
|
|
144
186
|
focusRingClasses: string;
|
|
145
187
|
textClasses: import("vue").ComputedRef<string[]>;
|
|
146
188
|
borderClasses: import("vue").ComputedRef<string[]>;
|
|
189
|
+
decorationClass: import("vue").ComputedRef<"" | "[text-decoration-line:var(--control-link-decoration)] underline-offset-3">;
|
|
147
190
|
overlayClasses: import("vue").ComputedRef<string[]>;
|
|
148
191
|
isSquare: import("vue").ComputedRef<boolean>;
|
|
149
192
|
finalDisabled: import("vue").ComputedRef<any>;
|
|
150
193
|
labelFinal: import("vue").ComputedRef<any>;
|
|
151
194
|
onClick: (event: Event) => void;
|
|
195
|
+
onInlineKeydown: (event: KeyboardEvent) => void;
|
|
152
196
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "mouseenter" | "mouseleave")[], "click" | "mouseenter" | "mouseleave", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
153
197
|
variant: {
|
|
154
198
|
type: () => Variant;
|
|
155
199
|
default: string;
|
|
156
200
|
};
|
|
157
201
|
size: {
|
|
158
|
-
type:
|
|
202
|
+
type: () => Size;
|
|
159
203
|
default: string;
|
|
160
204
|
validator: (value: Size) => boolean;
|
|
161
205
|
};
|
|
@@ -184,6 +228,15 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
184
228
|
type: (BooleanConstructor | StringConstructor)[];
|
|
185
229
|
default: undefined;
|
|
186
230
|
};
|
|
231
|
+
/**
|
|
232
|
+
* `body` sets the label in the regular body text style and its icons one step smaller, the look of a
|
|
233
|
+
* `UiDropdownTrigger` of variant `tertiary`, so a button reads as one more control beside such triggers.
|
|
234
|
+
*/
|
|
235
|
+
textStyle: {
|
|
236
|
+
type: () => TextStyle;
|
|
237
|
+
default: string;
|
|
238
|
+
validator: (value: TextStyle) => boolean;
|
|
239
|
+
};
|
|
187
240
|
loading: {
|
|
188
241
|
type: BooleanConstructor;
|
|
189
242
|
default: boolean;
|
|
@@ -208,12 +261,21 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
208
261
|
type: () => RouteLocationRaw;
|
|
209
262
|
default: undefined;
|
|
210
263
|
};
|
|
264
|
+
/**
|
|
265
|
+
* Renders the label as a link that flows and wraps inside running text: no box, the surrounding font size,
|
|
266
|
+
* the tertiary colour. Without `to` or `href` it is a focusable `role="button"` span, since a `<button>`
|
|
267
|
+
* cannot break across lines.
|
|
268
|
+
*/
|
|
269
|
+
inline: {
|
|
270
|
+
type: BooleanConstructor;
|
|
271
|
+
default: boolean;
|
|
272
|
+
};
|
|
211
273
|
}>> & Readonly<{
|
|
212
274
|
onMouseenter?: ((...args: any[]) => any) | undefined;
|
|
213
275
|
onMouseleave?: ((...args: any[]) => any) | undefined;
|
|
214
276
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
215
277
|
}>, {
|
|
216
|
-
size:
|
|
278
|
+
size: "xs" | "sm" | "md" | "lg";
|
|
217
279
|
label: string;
|
|
218
280
|
type: string;
|
|
219
281
|
icon: string | boolean;
|
|
@@ -224,27 +286,29 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
224
286
|
color: "primary" | "neutral" | "warning" | "success" | "error" | "neutral-invert";
|
|
225
287
|
showIconLeft: boolean;
|
|
226
288
|
iconRight: string | boolean;
|
|
289
|
+
textStyle: "body" | "action";
|
|
227
290
|
loading: boolean;
|
|
228
291
|
imageSource: string;
|
|
229
292
|
tooltip: string | Record<string, any>;
|
|
293
|
+
inline: boolean;
|
|
230
294
|
}, {}, {
|
|
231
295
|
RenderSlot: ({ vnodes }: {
|
|
232
296
|
vnodes: any;
|
|
233
297
|
}) => any;
|
|
234
298
|
UiLoader: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
235
299
|
size: {
|
|
236
|
-
type:
|
|
300
|
+
type: () => Size;
|
|
237
301
|
default: string;
|
|
238
|
-
validator: (value:
|
|
302
|
+
validator: (value: Size) => boolean;
|
|
239
303
|
};
|
|
240
304
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
241
305
|
size: {
|
|
242
|
-
type:
|
|
306
|
+
type: () => Size;
|
|
243
307
|
default: string;
|
|
244
|
-
validator: (value:
|
|
308
|
+
validator: (value: Size) => boolean;
|
|
245
309
|
};
|
|
246
310
|
}>> & Readonly<{}>, {
|
|
247
|
-
size:
|
|
311
|
+
size: "xs" | "sm" | "md" | "lg";
|
|
248
312
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
249
313
|
UiTooltip: {
|
|
250
314
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../UiTooltip/UiTooltip.vue").UiTooltipProps> & Readonly<{
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import type { ButtonGroupColor, ButtonGroupSize } from './types';
|
|
1
|
+
import type { ButtonGroupColor, ButtonGroupSize, ButtonGroupVariant } from './types';
|
|
2
2
|
interface UiButtonGroupProps {
|
|
3
3
|
modelValue?: string;
|
|
4
4
|
defaultValue?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
size?: ButtonGroupSize;
|
|
7
7
|
color?: ButtonGroupColor;
|
|
8
|
+
/** `strong` fills the selected item with the color; `light` raises it on the surface and writes its label in the color. */
|
|
9
|
+
variant?: ButtonGroupVariant;
|
|
8
10
|
name?: string;
|
|
9
11
|
orientation?: 'horizontal' | 'vertical';
|
|
10
12
|
/**
|
|
@@ -13,6 +15,8 @@ interface UiButtonGroupProps {
|
|
|
13
15
|
* Set to true to allow clearing the selection by clicking the active item.
|
|
14
16
|
*/
|
|
15
17
|
allowDeselect?: boolean;
|
|
18
|
+
/** When false, the group hugs its items instead of filling its container. */
|
|
19
|
+
fullWidth?: boolean;
|
|
16
20
|
}
|
|
17
21
|
declare var __VLS_11: {};
|
|
18
22
|
type __VLS_Slots = {} & {
|
|
@@ -26,11 +30,13 @@ declare const __VLS_base: import("vue").DefineComponent<UiButtonGroupProps, {},
|
|
|
26
30
|
orientation: "horizontal" | "vertical";
|
|
27
31
|
size: ButtonGroupSize;
|
|
28
32
|
disabled: boolean;
|
|
33
|
+
variant: ButtonGroupVariant;
|
|
29
34
|
color: ButtonGroupColor;
|
|
30
|
-
defaultValue: string;
|
|
31
35
|
name: string;
|
|
36
|
+
defaultValue: string;
|
|
32
37
|
modelValue: string;
|
|
33
38
|
allowDeselect: boolean;
|
|
39
|
+
fullWidth: boolean;
|
|
34
40
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
41
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
42
|
declare const _default: typeof __VLS_export;
|
|
@@ -2,6 +2,8 @@ interface UiButtonGroupItemProps {
|
|
|
2
2
|
value: string;
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
ariaLabel?: string;
|
|
5
|
+
/** Icon class (e.g. "i-ph-text-align-left") rendered before the slot, sized per group size. */
|
|
6
|
+
icon?: string;
|
|
5
7
|
}
|
|
6
8
|
declare var __VLS_9: {};
|
|
7
9
|
type __VLS_Slots = {} & {
|
|
@@ -9,6 +11,7 @@ type __VLS_Slots = {} & {
|
|
|
9
11
|
};
|
|
10
12
|
declare const __VLS_base: import("vue").DefineComponent<UiButtonGroupItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<UiButtonGroupItemProps> & Readonly<{}>, {
|
|
11
13
|
ariaLabel: string;
|
|
14
|
+
icon: string;
|
|
12
15
|
disabled: boolean;
|
|
13
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
17
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { ComputedRef, InjectionKey } from 'vue';
|
|
2
|
-
export type ButtonGroupSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export type ButtonGroupSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
3
3
|
export type ButtonGroupColor = 'neutral' | 'neutral-invert' | 'primary' | 'success' | 'warning' | 'error';
|
|
4
|
+
export type ButtonGroupVariant = 'strong' | 'light';
|
|
4
5
|
export interface ButtonGroupRegister {
|
|
5
6
|
register(value: string, el: HTMLElement): void;
|
|
6
7
|
unregister(value: string): void;
|
|
7
8
|
}
|
|
8
9
|
export declare const BUTTON_GROUP_SIZE_KEY: InjectionKey<ComputedRef<ButtonGroupSize>>;
|
|
9
10
|
export declare const BUTTON_GROUP_COLOR_KEY: InjectionKey<ComputedRef<ButtonGroupColor>>;
|
|
11
|
+
export declare const BUTTON_GROUP_VARIANT_KEY: InjectionKey<ComputedRef<ButtonGroupVariant>>;
|
|
10
12
|
export declare const BUTTON_GROUP_REGISTER_KEY: InjectionKey<ButtonGroupRegister>;
|
|
13
|
+
export declare const BUTTON_GROUP_RAIL_RADIUS: Record<ButtonGroupSize, string>;
|
|
14
|
+
export declare const BUTTON_GROUP_INNER_RADIUS: Record<ButtonGroupSize, string>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { RadioValue } from '../UiInputRadio/types';
|
|
2
|
+
import type { ChoiceControl, ChoiceValue, ControlPosition } from './types';
|
|
3
|
+
interface UiChoiceProps {
|
|
4
|
+
/**
|
|
5
|
+
* The control rendered in the row
|
|
6
|
+
*/
|
|
7
|
+
control: ChoiceControl;
|
|
8
|
+
/**
|
|
9
|
+
* The label text
|
|
10
|
+
*/
|
|
11
|
+
label: string;
|
|
12
|
+
/**
|
|
13
|
+
* Supporting text under the label, announced with the control
|
|
14
|
+
*/
|
|
15
|
+
description?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Info tooltip next to the label
|
|
18
|
+
*/
|
|
19
|
+
labelInfo?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The value this row selects. Required when `control` is `radio`; `null` is a valid value.
|
|
22
|
+
* A radio row goes inside a UiInputRadioGroup, which owns the selection.
|
|
23
|
+
*/
|
|
24
|
+
value?: RadioValue;
|
|
25
|
+
/**
|
|
26
|
+
* Switch and checkbox: whether the row is on. A radio reads its group instead.
|
|
27
|
+
*/
|
|
28
|
+
modelValue?: ChoiceValue;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the row is disabled
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the row uses the small height
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
compact?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Which side of the text the control sits on
|
|
41
|
+
* @default 'end'
|
|
42
|
+
*/
|
|
43
|
+
controlPosition?: ControlPosition;
|
|
44
|
+
}
|
|
45
|
+
type __VLS_Slots = {
|
|
46
|
+
/** Radio only: extra content under the text, such as a field the option configures */
|
|
47
|
+
content?(): unknown;
|
|
48
|
+
/** Radio only: an icon or a logo before the text */
|
|
49
|
+
icon?(): unknown;
|
|
50
|
+
};
|
|
51
|
+
declare const __VLS_base: import("vue").DefineComponent<UiChoiceProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
52
|
+
"update:modelValue": (value: boolean) => any;
|
|
53
|
+
}, string, import("vue").PublicProps, Readonly<UiChoiceProps> & Readonly<{
|
|
54
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
55
|
+
}>, {
|
|
56
|
+
value: RadioValue;
|
|
57
|
+
disabled: boolean;
|
|
58
|
+
description: string;
|
|
59
|
+
modelValue: ChoiceValue;
|
|
60
|
+
labelInfo: string;
|
|
61
|
+
controlPosition: ControlPosition;
|
|
62
|
+
compact: boolean;
|
|
63
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
64
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
65
|
+
declare const _default: typeof __VLS_export;
|
|
66
|
+
export default _default;
|
|
67
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
68
|
+
new (): {
|
|
69
|
+
$slots: S;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
export type ChoiceControl = 'radio' | 'switch' | 'checkbox';
|
|
3
|
+
export type ChoiceValue = boolean;
|
|
4
|
+
/** Which side of the text a radio, checkbox or switch sits on */
|
|
5
|
+
export type ControlPosition = 'start' | 'end';
|
|
6
|
+
/** Provided by UiChoice, which draws the option row around the control it wraps */
|
|
7
|
+
export declare const CHOICE_ROW_KEY: InjectionKey<boolean>;
|
|
@@ -11,8 +11,8 @@ declare const __VLS_export: import("vue").DefineComponent<UiColorFieldProps, {},
|
|
|
11
11
|
label: string;
|
|
12
12
|
disabled: boolean;
|
|
13
13
|
modelValue: string;
|
|
14
|
-
placeholder: string;
|
|
15
14
|
id: string;
|
|
15
|
+
placeholder: string;
|
|
16
16
|
defaultColor: string;
|
|
17
17
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const _default: typeof __VLS_export;
|
|
@@ -6,14 +6,14 @@ type __VLS_Slots = {} & {
|
|
|
6
6
|
};
|
|
7
7
|
declare const __VLS_base: import("vue").DefineComponent<UiColorPickerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
8
|
"update:modelValue": (value: string) => any;
|
|
9
|
+
change: (value: string) => any;
|
|
9
10
|
"update:color": (color: Color) => any;
|
|
10
11
|
"update:selectedPresetValue": (value: string) => any;
|
|
11
|
-
change: (value: string) => any;
|
|
12
12
|
}, string, import("vue").PublicProps, Readonly<UiColorPickerProps> & Readonly<{
|
|
13
13
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
14
|
+
onChange?: ((value: string) => any) | undefined;
|
|
14
15
|
"onUpdate:color"?: ((color: Color) => any) | undefined;
|
|
15
16
|
"onUpdate:selectedPresetValue"?: ((value: string) => any) | undefined;
|
|
16
|
-
onChange?: ((value: string) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
18
|
disabled: boolean;
|
|
19
19
|
variant: import("./types").UiColorPickerVariant;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { FieldSize } from '../../composables/useControlShape';
|
|
2
|
+
export type UiComboboxSize = FieldSize;
|
|
3
|
+
export interface UiComboboxOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** Shown instead of the description, typically why the option is disabled. */
|
|
9
|
+
hint?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface UiComboboxGroup<T extends UiComboboxOption = UiComboboxOption> {
|
|
12
|
+
label: string;
|
|
13
|
+
options: T[];
|
|
14
|
+
}
|
|
15
|
+
/** A selectable row after the options, picked like an option but emitted as `action`. `icon` is a complete icon class such as `i-ph-user-plus`. */
|
|
16
|
+
export interface UiComboboxAction {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
icon?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface UiComboboxProps<T extends UiComboboxOption = UiComboboxOption> {
|
|
23
|
+
modelValue?: string;
|
|
24
|
+
items?: UiComboboxGroup<T>[];
|
|
25
|
+
/** Selectable rows after the options. */
|
|
26
|
+
actions?: UiComboboxAction[];
|
|
27
|
+
loading?: boolean;
|
|
28
|
+
size?: UiComboboxSize;
|
|
29
|
+
placeholder?: string;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
label?: string;
|
|
32
|
+
ariaLabel?: string;
|
|
33
|
+
/** Translated result count, announced through a polite live region while the list is open. */
|
|
34
|
+
resultsLabel?: string;
|
|
35
|
+
id?: string;
|
|
36
|
+
/** Rows shown before the list scrolls, with a peek of the next one. All rows show when unset. */
|
|
37
|
+
maxVisibleOptions?: number;
|
|
38
|
+
/** Options show a checkbox and the list stays open after a pick, so several can be picked in a row. */
|
|
39
|
+
multiple?: boolean;
|
|
40
|
+
/** Values of the options shown checked when `multiple` is set. Picking one of them emits `deselect`. */
|
|
41
|
+
selected?: string[];
|
|
42
|
+
/**
|
|
43
|
+
* 'trigger' matches the list to the field. 'compact' caps it at 480px, so on a wide field part of the
|
|
44
|
+
* page behind stays visible, such as a list that updates while picking.
|
|
45
|
+
*/
|
|
46
|
+
width?: 'trigger' | 'compact';
|
|
47
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { UiComboboxAction, UiComboboxOption, UiComboboxProps } from './UiCombobox.types';
|
|
2
|
+
declare const __VLS_export: <T extends UiComboboxOption>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<UiComboboxProps<T> & {
|
|
4
|
+
onSelect?: ((option: T) => any) | undefined;
|
|
5
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
6
|
+
onAction?: ((id: string) => any) | undefined;
|
|
7
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
8
|
+
onDeselect?: ((option: T) => any) | undefined;
|
|
9
|
+
}> & (typeof globalThis extends {
|
|
10
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
11
|
+
} ? P : {});
|
|
12
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
13
|
+
/** Closes the list, for a pick that leads somewhere else, such as a dialog. */
|
|
14
|
+
close: () => void;
|
|
15
|
+
}>) => void;
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: {
|
|
18
|
+
item?: (props: {
|
|
19
|
+
option: T;
|
|
20
|
+
}) => unknown;
|
|
21
|
+
empty?: () => unknown;
|
|
22
|
+
action?: (props: {
|
|
23
|
+
action: UiComboboxAction;
|
|
24
|
+
}) => unknown;
|
|
25
|
+
/** Pinned under the options, outside their scroll: `close` closes the list. Hidden from assistive tech, so keep anything focusable out of the Tab order (`tabindex="-1"`) and redundant with Escape. */
|
|
26
|
+
footer?: (props: {
|
|
27
|
+
close: () => void;
|
|
28
|
+
}) => unknown;
|
|
29
|
+
};
|
|
30
|
+
emit: ((evt: "select", option: T) => void) & ((evt: "update:open", open: boolean) => void) & ((evt: "action", id: string) => void) & ((evt: "update:modelValue", value: string) => void) & ((evt: "deselect", option: T) => void);
|
|
31
|
+
}>) => import("vue").VNode & {
|
|
32
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
33
|
+
};
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
37
|
+
[K in keyof T]: T[K];
|
|
38
|
+
} : {
|
|
39
|
+
[K in keyof T as K]: T[K];
|
|
40
|
+
}) & {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface UiDataTableColumn<TData> {
|
|
2
|
+
/**
|
|
3
|
+
* Unique column id. Also names the per-column slots:
|
|
4
|
+
* `#cell-<id>` and `#header-<id>`.
|
|
5
|
+
*/
|
|
6
|
+
id: string;
|
|
7
|
+
/** Header label. An empty string renders an empty header cell. */
|
|
8
|
+
header: string;
|
|
9
|
+
/**
|
|
10
|
+
* Row property rendered by default. Omit for columns rendered
|
|
11
|
+
* entirely through their `#cell-<id>` slot.
|
|
12
|
+
*/
|
|
13
|
+
accessorKey?: keyof TData & string;
|
|
14
|
+
/**
|
|
15
|
+
* Shows the sort affordance on the header. Sorting logic stays in the
|
|
16
|
+
* consumer: bind `v-model:sorting` and sort/refetch the data yourself.
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
sortable?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Content alignment. Textual data stays left-aligned; reserve `right`
|
|
22
|
+
* for numeric data.
|
|
23
|
+
* @default 'left'
|
|
24
|
+
*/
|
|
25
|
+
align?: 'left' | 'right';
|
|
26
|
+
/** Fixed column width as a CSS value (e.g. '160px', '20%'). */
|
|
27
|
+
width?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Minimum column width as a CSS length (e.g. '160px'). The column never
|
|
30
|
+
* shrinks below it: when the columns do not fit, the table grows wider
|
|
31
|
+
* than its region, which scrolls horizontally.
|
|
32
|
+
*/
|
|
33
|
+
minWidth?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Keeps the header and the values of the column on one line: the column
|
|
36
|
+
* grows to fit them instead of wrapping, and the table grows wider than
|
|
37
|
+
* its region when needed, as with `minWidth`.
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
nowrap?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface UiDataTableSort {
|
|
43
|
+
/** Column id being sorted. */
|
|
44
|
+
id: string;
|
|
45
|
+
direction: 'asc' | 'desc';
|
|
46
|
+
}
|