@kuina-ui/vue 0.5.0 → 0.7.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/dist/blocks/pagination/Pagination.js +4 -0
- package/dist/blocks/pagination/Pagination.vue.d.ts +39 -0
- package/dist/blocks/pagination/Pagination.vue_vue_type_script_setup_true_lang.js +151 -0
- package/dist/blocks/pagination/index.d.ts +2 -0
- package/dist/blocks/pagination/pagination.theme.d.ts +12 -0
- package/dist/blocks/pagination/pagination.theme.js +12 -0
- package/dist/blocks/table/Table.js +4 -0
- package/dist/blocks/table/Table.vue.d.ts +149 -0
- package/dist/blocks/table/Table.vue_vue_type_script_setup_true_lang.js +933 -0
- package/dist/blocks/table/TableCellText.js +4 -0
- package/dist/blocks/table/TableCellText.vue.d.ts +8 -0
- package/dist/blocks/table/TableCellText.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/blocks/table/index.d.ts +2 -0
- package/dist/blocks/table/table.theme.d.ts +286 -0
- package/dist/blocks/table/table.theme.js +391 -0
- package/dist/blocks/table/useLoadMoreTrigger.d.ts +11 -0
- package/dist/blocks/table/useLoadMoreTrigger.js +31 -0
- package/dist/blocks/table/usePinnedColumnOffsets.d.ts +10 -0
- package/dist/blocks/table/usePinnedColumnOffsets.js +63 -0
- package/dist/blocks/table/useRowReorder.d.ts +18 -0
- package/dist/blocks/table/useRowReorder.js +92 -0
- package/dist/blocks/table/useRowVirtualizer.d.ts +17 -0
- package/dist/blocks/table/useRowVirtualizer.js +45 -0
- package/dist/blocks/table/useTableSections.d.ts +46 -0
- package/dist/blocks/table/useTableSections.js +86 -0
- package/dist/components/alert/Alert.js +4 -0
- package/dist/components/alert/Alert.vue.d.ts +2 -2
- package/dist/components/alert/Alert.vue_vue_type_script_setup_true_lang.js +87 -0
- package/dist/components/alert/alert.theme.js +93 -0
- package/dist/components/avatar-group/AvatarGroup.js +4 -0
- package/dist/components/avatar-group/AvatarGroup.vue.d.ts +1 -1
- package/dist/components/avatar-group/AvatarGroup.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/components/avatar-group/avatar-group.theme.js +22 -0
- package/dist/components/date-picker/DateCalendar.js +4 -0
- package/dist/components/date-picker/DateCalendar.vue_vue_type_script_setup_true_lang.js +194 -0
- package/dist/components/date-picker/DateCalendarMonth.js +4 -0
- package/dist/components/date-picker/DateCalendarMonth.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/date-picker/DateCalendarPopover.js +4 -0
- package/dist/components/date-picker/DateCalendarPopover.vue_vue_type_script_setup_true_lang.js +161 -0
- package/dist/components/date-picker/DatePicker.js +4 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +6 -6
- package/dist/components/date-picker/DatePicker.vue_vue_type_script_setup_true_lang.js +224 -0
- package/dist/components/date-picker/DatePickerField.js +4 -0
- package/dist/components/date-picker/DatePickerField.vue.d.ts +6 -6
- package/dist/components/date-picker/DatePickerField.vue_vue_type_script_setup_true_lang.js +241 -0
- package/dist/components/date-picker/DatePickerPanel.js +4 -0
- package/dist/components/date-picker/DatePickerPanel.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/components/date-picker/DateRangePicker.js +4 -0
- package/dist/components/date-picker/DateRangePicker.vue.d.ts +6 -6
- package/dist/components/date-picker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +212 -0
- package/dist/components/date-picker/DateRangePickerField.js +4 -0
- package/dist/components/date-picker/DateRangePickerField.vue.d.ts +7 -7
- package/dist/components/date-picker/DateRangePickerField.vue_vue_type_script_setup_true_lang.js +228 -0
- package/dist/components/date-picker/date-calendar.theme.js +46 -0
- package/dist/components/date-picker/date-picker.theme.js +16 -0
- package/dist/components/date-picker/useDatePickerControl.js +47 -0
- package/dist/components/date-picker/useDatePickerPopover.js +39 -0
- package/dist/components/date-picker/useDateRangeSelection.js +50 -0
- package/dist/components/date-picker/useDateRangeTyping.js +59 -0
- package/dist/components/date-picker/useDateTypingFocus.js +37 -0
- package/dist/components/date-picker/useSingleDateSelection.js +11 -0
- package/dist/components/date-picker/useSingleDateTyping.js +31 -0
- package/dist/components/date-picker/useTypedDateInput.js +39 -0
- package/dist/components/menu/Menu.js +4 -0
- package/dist/components/menu/Menu.vue.d.ts +3 -2
- package/dist/components/menu/Menu.vue_vue_type_script_setup_true_lang.js +137 -0
- package/dist/components/menu/MenuItemRow.js +4 -0
- package/dist/components/menu/MenuItemRow.vue_vue_type_script_setup_true_lang.js +117 -0
- package/dist/components/menu/MenuPanel.js +4 -0
- package/dist/components/menu/MenuPanel.vue.d.ts +2 -1
- package/dist/components/menu/MenuPanel.vue_vue_type_script_setup_true_lang.js +249 -0
- package/dist/components/menu/menu.theme.d.ts +5 -0
- package/dist/components/menu/menu.theme.js +174 -0
- package/dist/components/menu/menuContext.js +9 -0
- package/dist/components/menu/menuEntries.js +25 -0
- package/dist/components/select/Select.js +4 -0
- package/dist/components/select/Select.vue.d.ts +2 -2
- package/dist/components/select/Select.vue_vue_type_script_setup_true_lang.js +262 -0
- package/dist/components/select/SelectField.js +4 -0
- package/dist/components/select/SelectField.vue.d.ts +2 -2
- package/dist/components/select/SelectField.vue_vue_type_script_setup_true_lang.js +271 -0
- package/dist/components/select/SelectOptionRow.js +4 -0
- package/dist/components/select/SelectOptionRow.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/components/select/SelectPanel.js +4 -0
- package/dist/components/select/SelectPanel.vue_vue_type_script_setup_true_lang.js +169 -0
- package/dist/components/select/select-panel.theme.js +44 -0
- package/dist/components/select/selectOptions.d.ts +0 -2
- package/dist/components/select/selectOptions.js +66 -0
- package/dist/components/select/useSelectControl.d.ts +3 -3
- package/dist/components/select/useSelectControl.js +62 -0
- package/dist/components/select/useSelectListbox.js +169 -0
- package/dist/components/slider/RangeSlider.js +4 -0
- package/dist/components/slider/RangeSlider.vue.d.ts +55 -0
- package/dist/components/slider/RangeSlider.vue_vue_type_script_setup_true_lang.js +214 -0
- package/dist/components/slider/Slider.js +4 -0
- package/dist/components/slider/Slider.vue.d.ts +49 -0
- package/dist/components/slider/Slider.vue_vue_type_script_setup_true_lang.js +151 -0
- package/dist/components/slider/SliderHeader.js +4 -0
- package/dist/components/slider/SliderHeader.vue.d.ts +30 -0
- package/dist/components/slider/SliderHeader.vue_vue_type_script_setup_true_lang.js +61 -0
- package/dist/components/slider/index.d.ts +5 -0
- package/dist/components/slider/slider.theme.d.ts +33 -0
- package/dist/components/slider/slider.theme.js +34 -0
- package/dist/components/text-field/TextField.js +4 -0
- package/dist/components/text-field/TextField.vue.d.ts +2 -2
- package/dist/components/text-field/TextField.vue_vue_type_script_setup_true_lang.js +122 -0
- package/dist/components/text-field/text-field.theme.js +379 -0
- package/dist/components/textarea/Textarea.js +4 -0
- package/dist/components/textarea/Textarea.vue.d.ts +1 -1
- package/dist/components/textarea/Textarea.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/components/textarea/textarea.theme.js +222 -0
- package/dist/elements/avatar/Avatar.js +4 -0
- package/dist/elements/avatar/Avatar.vue.d.ts +3 -3
- package/dist/elements/avatar/Avatar.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/elements/avatar/avatar.theme.js +141 -0
- package/dist/elements/badge/Badge.js +4 -0
- package/dist/elements/badge/Badge.vue.d.ts +2 -2
- package/dist/elements/badge/Badge.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/elements/badge/badge.theme.js +111 -0
- package/dist/elements/button/Button.js +4 -0
- package/dist/elements/button/Button.vue.d.ts +3 -3
- package/dist/elements/button/Button.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/elements/button/button.theme.js +424 -0
- package/dist/elements/checkbox/Checkbox.js +4 -0
- package/dist/elements/checkbox/Checkbox.vue.d.ts +3 -1
- package/dist/elements/checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/elements/checkbox/checkbox.theme.d.ts +1 -0
- package/dist/elements/checkbox/checkbox.theme.js +22 -0
- package/dist/elements/circular-progress/CircularProgress.js +4 -0
- package/dist/elements/circular-progress/CircularProgress.vue_vue_type_script_setup_true_lang.js +44 -0
- package/dist/elements/circular-progress/circular-progress.theme.js +8 -0
- package/dist/elements/input/Input.js +4 -0
- package/dist/elements/input/Input.vue.d.ts +62 -0
- package/dist/elements/input/Input.vue_vue_type_script_setup_true_lang.js +138 -0
- package/dist/elements/input/focusInputFromContainer.d.ts +2 -0
- package/dist/elements/input/focusInputFromContainer.js +28 -0
- package/dist/elements/input/index.d.ts +2 -0
- package/dist/elements/input/input.theme.d.ts +81 -0
- package/dist/elements/input/input.theme.js +391 -0
- package/dist/elements/loading-dots/LoadingDots.js +4 -0
- package/dist/elements/loading-dots/LoadingDots.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/elements/loading-dots/loading-dots.theme.js +4 -0
- package/dist/elements/loading-indicator/LoadingIndicator.js +4 -0
- package/dist/elements/loading-indicator/LoadingIndicator.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/elements/loading-indicator/loading-indicator.theme.js +4 -0
- package/dist/elements/popover/Popover.js +4 -0
- package/dist/elements/popover/Popover.vue.d.ts +60 -0
- package/dist/elements/popover/Popover.vue_vue_type_script_setup_true_lang.js +218 -0
- package/dist/elements/popover/index.d.ts +2 -0
- package/dist/elements/popover/popover.theme.d.ts +20 -0
- package/dist/elements/popover/popover.theme.js +17 -0
- package/dist/elements/popover/popoverLayers.d.ts +5 -0
- package/dist/elements/popover/popoverLayers.js +22 -0
- package/dist/elements/radio-group/RadioGroup.js +4 -0
- package/dist/elements/radio-group/RadioGroup.vue.d.ts +1 -1
- package/dist/elements/radio-group/RadioGroup.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/elements/radio-group/radio-group.theme.js +126 -0
- package/dist/elements/segmented-control/SegmentedControl.js +4 -0
- package/dist/elements/segmented-control/SegmentedControl.vue.d.ts +1 -1
- package/dist/elements/segmented-control/SegmentedControl.vue_vue_type_script_setup_true_lang.js +98 -0
- package/dist/elements/segmented-control/segmented-control.theme.js +201 -0
- package/dist/elements/select-control/SelectControl.js +4 -0
- package/dist/elements/select-control/SelectControl.vue.d.ts +1 -1
- package/dist/elements/select-control/SelectControl.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/elements/select-control/select-control.theme.js +360 -0
- package/dist/elements/select-field-control/SelectFieldControl.js +4 -0
- package/dist/elements/select-field-control/SelectFieldControl.vue.d.ts +1 -1
- package/dist/elements/select-field-control/SelectFieldControl.vue_vue_type_script_setup_true_lang.js +123 -0
- package/dist/elements/select-field-control/select-field-control.theme.js +299 -0
- package/dist/elements/slider-control/SliderControl.js +4 -0
- package/dist/elements/slider-control/SliderControl.vue.d.ts +35 -0
- package/dist/elements/slider-control/SliderControl.vue_vue_type_script_setup_true_lang.js +228 -0
- package/dist/elements/slider-control/index.d.ts +3 -0
- package/dist/elements/slider-control/slider-control.theme.d.ts +38 -0
- package/dist/elements/slider-control/slider-control.theme.js +35 -0
- package/dist/elements/slider-control/useSliderMarksLayout.d.ts +6 -0
- package/dist/elements/slider-control/useSliderMarksLayout.js +25 -0
- package/dist/elements/switch/Switch.js +4 -0
- package/dist/elements/switch/Switch.vue.d.ts +1 -1
- package/dist/elements/switch/Switch.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/elements/switch/switch.theme.js +37 -0
- package/dist/elements/text-link/TextLink.js +4 -0
- package/dist/elements/text-link/TextLink.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/elements/text-link/text-link.theme.js +25 -0
- package/dist/elements/tooltip/Tooltip.js +4 -0
- package/dist/elements/tooltip/Tooltip.vue.d.ts +48 -0
- package/dist/elements/tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +161 -0
- package/dist/elements/tooltip/index.d.ts +2 -0
- package/dist/elements/tooltip/tooltip.theme.d.ts +29 -0
- package/dist/elements/tooltip/tooltip.theme.js +46 -0
- package/dist/elements/tooltip/useTooltipOpenState.d.ts +17 -0
- package/dist/elements/tooltip/useTooltipOpenState.js +57 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +38 -1
- package/dist/nuxt.js +12 -13
- package/dist/shared/composables/useApplePlatform.js +10 -0
- package/dist/shared/composables/useCalendarLabels.js +13 -0
- package/dist/shared/composables/useCustomColor.js +10 -0
- package/dist/shared/composables/useDismissOnOutsidePointerDown.d.ts +1 -1
- package/dist/shared/composables/useDismissOnOutsidePointerDown.js +14 -0
- package/dist/shared/composables/useFieldDescription.js +16 -0
- package/dist/shared/composables/useFloatingPosition.d.ts +3 -2
- package/dist/shared/composables/useFloatingPosition.js +113 -0
- package/dist/shared/composables/useMask.js +32 -0
- package/dist/shared/composables/useMaskedFieldModel.d.ts +7 -0
- package/dist/shared/composables/useMaskedFieldModel.js +19 -0
- package/dist/shared/composables/useNumberFieldTyping.d.ts +21 -0
- package/dist/shared/composables/useNumberFieldTyping.js +70 -0
- package/dist/shared/composables/usePointerGraceArea.d.ts +11 -0
- package/dist/shared/composables/usePointerGraceArea.js +40 -0
- package/dist/shared/composables/useRowSelection.d.ts +17 -0
- package/dist/shared/composables/useRowSelection.js +40 -0
- package/dist/shared/composables/useShortcuts.js +21 -0
- package/dist/shared/composables/useSlidingThumb.js +65 -0
- package/dist/shared/composables/useTableRows.d.ts +26 -0
- package/dist/shared/composables/useTableRows.js +41 -0
- package/dist/shared/types/floating-position.d.ts +9 -0
- package/dist/shared/types/pointer-grace-area.d.ts +12 -0
- package/dist/shared/types/slider.d.ts +6 -0
- package/dist/shared/types/table.d.ts +59 -0
- package/dist/shared/types/value-path.d.ts +6 -0
- package/dist/shared/utils/calendarMonth.js +23 -0
- package/dist/shared/utils/computeFloatingPosition.js +32 -0
- package/dist/shared/utils/createDateFormatters.js +31 -0
- package/dist/shared/utils/createDateInputMask.js +103 -0
- package/dist/shared/utils/createDebouncedCallback.d.ts +5 -0
- package/dist/shared/utils/createDebouncedCallback.js +17 -0
- package/dist/shared/utils/createMask.js +65 -0
- package/dist/shared/utils/createShortcutHandler.js +60 -0
- package/dist/shared/utils/createTypeaheadSearch.js +16 -0
- package/dist/shared/utils/editableFieldGuard.js +11 -0
- package/dist/shared/utils/findFirstRenderedVNode.d.ts +3 -0
- package/dist/shared/utils/findFirstRenderedVNode.js +14 -0
- package/dist/shared/utils/flipFloatingPosition.js +28 -0
- package/dist/shared/utils/floatingPanelTransition.js +25 -0
- package/dist/shared/utils/formatShortcut.js +86 -0
- package/dist/shared/utils/isApplePlatform.js +5 -0
- package/dist/shared/utils/isExternalUrl.js +5 -0
- package/dist/shared/utils/isoDate.js +50 -0
- package/dist/shared/utils/normalizeSearchText.d.ts +2 -0
- package/dist/shared/utils/normalizeSearchText.js +6 -0
- package/dist/shared/utils/parseShortcut.js +48 -0
- package/dist/shared/utils/pointerGraceArea.d.ts +11 -0
- package/dist/shared/utils/pointerGraceArea.js +92 -0
- package/dist/shared/utils/readValueAtPath.d.ts +2 -0
- package/dist/shared/utils/readValueAtPath.js +7 -0
- package/dist/shared/utils/resolveFloatingAnchor.d.ts +4 -0
- package/dist/shared/utils/resolveFloatingAnchor.js +15 -0
- package/dist/shared/utils/resolvePressScale.js +5 -0
- package/dist/shared/utils/shiftFloatingPosition.d.ts +3 -0
- package/dist/shared/utils/shiftFloatingPosition.js +21 -0
- package/dist/shared/utils/sliderPosition.d.ts +11 -0
- package/dist/shared/utils/sliderPosition.js +27 -0
- package/dist/shared/utils/sliderThumbs.d.ts +13 -0
- package/dist/shared/utils/sliderThumbs.js +16 -0
- package/dist/shared/utils/steppedValue.d.ts +18 -0
- package/dist/shared/utils/steppedValue.js +21 -0
- package/dist/shared/utils/tableColumnTypes.d.ts +21 -0
- package/dist/shared/utils/tableColumnTypes.js +77 -0
- package/dist/shared/utils/tableColumns.d.ts +20 -0
- package/dist/shared/utils/tableColumns.js +77 -0
- package/dist/shared/utils/tableGroups.d.ts +10 -0
- package/dist/shared/utils/tableGroups.js +34 -0
- package/dist/shared/utils/tableRows.d.ts +25 -0
- package/dist/shared/utils/tableRows.js +80 -0
- package/dist/shared/utils/tableTree.d.ts +15 -0
- package/dist/shared/utils/tableTree.js +22 -0
- package/dist/shared/utils/toggleColumnSort.d.ts +5 -0
- package/dist/shared/utils/toggleColumnSort.js +27 -0
- package/dist/shared/utils/tv.js +1 -0
- package/dist/shared/utils/warnInDevelopment.d.ts +3 -0
- package/dist/shared/utils/warnInDevelopment.js +13 -0
- package/package.json +1 -1
- package/src/index.css +2 -0
- package/src/shared/styles/utilities/shake.css +21 -0
- package/src/shared/styles/utilities/slider-mark-position.css +8 -0
- package/dist/src-Bnn36nLV.js +0 -7856
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { useDismissOnOutsidePointerDown as e } from "../../shared/composables/useDismissOnOutsidePointerDown.js";
|
|
2
|
+
import { useSelectListbox as t } from "./useSelectListbox.js";
|
|
3
|
+
import { computed as n } from "vue";
|
|
4
|
+
import { ChevronsUpDown as r } from "lucide-vue-next";
|
|
5
|
+
// src/components/select/useSelectControl.ts
|
|
6
|
+
function i(i, a) {
|
|
7
|
+
let { selectedValue: o, isOpen: s, triggerElement: c } = a, l = n(() => !i.disabled && !i.loading), u = n(() => !!i.searchable && i.searchPlacement === "field"), d = n(() => !i.searchable || u.value), f = t({
|
|
8
|
+
optionEntries: () => i.options,
|
|
9
|
+
fieldKeys: () => ({
|
|
10
|
+
valueKey: i.valueKey ?? "value",
|
|
11
|
+
labelKey: i.labelKey,
|
|
12
|
+
descriptionKey: i.descriptionKey,
|
|
13
|
+
avatarKey: i.avatarKey
|
|
14
|
+
}),
|
|
15
|
+
actions: () => i.actions,
|
|
16
|
+
multiple: () => !!i.multiple,
|
|
17
|
+
searchable: () => !!i.searchable,
|
|
18
|
+
searchInTrigger: u,
|
|
19
|
+
openable: l,
|
|
20
|
+
selectedValue: o,
|
|
21
|
+
isOpen: s,
|
|
22
|
+
focusTrigger: () => c.value?.focus()
|
|
23
|
+
}), { selectedOptions: p } = f, m = n(() => p.value.length > 0), h = n(() => p.value.map((e) => e.sourceOption)), g = n(() => p.value.map((e) => e.label).join(", ")), _ = n(() => i.selectionLabel ? i.selectionLabel(h.value) : g.value), v = n(() => m.value && !!(i.selectionLabel || a.hasSelectionSlot())), y = n(() => {
|
|
24
|
+
let [e] = p.value;
|
|
25
|
+
if (!i.multiple && e?.avatar) return {
|
|
26
|
+
...e.avatar,
|
|
27
|
+
initials: e.avatar.initials ?? e.label.charAt(0).toUpperCase()
|
|
28
|
+
};
|
|
29
|
+
}), b = n(() => i.trailingIcon === void 0 ? r : i.trailingIcon), x = n(() => b.value !== null && !i.loading), S = n(() => !!i.clearable && m.value && l.value), C = n(() => f.hasStartedTriggerSearch.value ? f.searchQuery.value : m.value ? _.value : "");
|
|
30
|
+
function w(e, t) {
|
|
31
|
+
s.value && e.target !== t ? f.closeListbox({ restoreFocus: !0 }) : (t?.focus(), f.openListbox());
|
|
32
|
+
}
|
|
33
|
+
function T(e) {
|
|
34
|
+
e.target instanceof HTMLInputElement && f.searchFromTrigger(e.target.value);
|
|
35
|
+
}
|
|
36
|
+
function E() {
|
|
37
|
+
f.clearSelection(), c.value?.focus();
|
|
38
|
+
}
|
|
39
|
+
return e([a.rootElement, a.layerElement], {
|
|
40
|
+
active: s,
|
|
41
|
+
onDismiss: () => f.closeListbox({ restoreFocus: !1 })
|
|
42
|
+
}), {
|
|
43
|
+
...f,
|
|
44
|
+
isOpenable: l,
|
|
45
|
+
searchesInTrigger: u,
|
|
46
|
+
navigatesFromTrigger: d,
|
|
47
|
+
triggerSearchValue: C,
|
|
48
|
+
openTriggerSearchFromClick: w,
|
|
49
|
+
searchFromTriggerInput: T,
|
|
50
|
+
hasSelection: m,
|
|
51
|
+
selectedSourceOptions: h,
|
|
52
|
+
selectedLabels: g,
|
|
53
|
+
selectionText: _,
|
|
54
|
+
announcesSelectedLabelsSeparately: v,
|
|
55
|
+
selectedAvatar: y,
|
|
56
|
+
resolvedTrailingIcon: b,
|
|
57
|
+
showsTrailingIcon: x,
|
|
58
|
+
showsClearButton: S,
|
|
59
|
+
clearSelectionFromButton: E
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export { i as useSelectControl };
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { createShortcutHandler as e } from "../../shared/utils/createShortcutHandler.js";
|
|
2
|
+
import { createTypeaheadSearch as t } from "../../shared/utils/createTypeaheadSearch.js";
|
|
3
|
+
import { collectSelectOptions as n, filterSelectEntries as r, resolveSelectEntries as i } from "./selectOptions.js";
|
|
4
|
+
import { computed as a, nextTick as o, shallowRef as s, toValue as c, useId as l, watch as u } from "vue";
|
|
5
|
+
// src/components/select/useSelectListbox.ts
|
|
6
|
+
function d(e, t) {
|
|
7
|
+
return `${e}-action-${t}`;
|
|
8
|
+
}
|
|
9
|
+
function f(e) {
|
|
10
|
+
let t = e.parentElement;
|
|
11
|
+
for (; t && t !== document.body;) {
|
|
12
|
+
let { overflowY: e } = getComputedStyle(t);
|
|
13
|
+
if (e === "auto" || e === "scroll") return t;
|
|
14
|
+
t = t.parentElement;
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
function p(e) {
|
|
19
|
+
let t = f(e);
|
|
20
|
+
if (!t) return;
|
|
21
|
+
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
22
|
+
r.top < n.top ? t.scrollTop -= n.top - r.top : r.bottom > n.bottom && (t.scrollTop += r.bottom - n.bottom);
|
|
23
|
+
}
|
|
24
|
+
function m(e) {
|
|
25
|
+
let t = e.ctrlKey || e.metaKey || e.altKey;
|
|
26
|
+
return [...e.key].length === 1 && e.key !== " " && !t;
|
|
27
|
+
}
|
|
28
|
+
function h(f) {
|
|
29
|
+
let { selectedValue: h, isOpen: g } = f, _ = l(), v = s(""), y = s(!1), b = s(), x = t(), S = "selected", C = a(() => i(c(f.optionEntries), c(f.fieldKeys), _)), w = a(() => n(C.value)), T = a(() => c(f.searchable) ? r(C.value, v.value) : C.value), E = a(() => n(T.value)), D = a(() => c(f.multiple) ? Array.isArray(h.value) ? h.value : [] : h.value === void 0 || h.value === null ? [] : [h.value]), O = a(() => w.value.filter((e) => D.value.includes(e.value))), k = a(() => [...E.value.filter((e) => !e.disabled).map((e) => ({
|
|
30
|
+
itemId: e.optionId,
|
|
31
|
+
resolvedOption: e
|
|
32
|
+
})), ...c(f.actions).map((e, t) => ({
|
|
33
|
+
itemId: d(_, t),
|
|
34
|
+
selectAction: e
|
|
35
|
+
}))]);
|
|
36
|
+
function A(e) {
|
|
37
|
+
return D.value.includes(e.value);
|
|
38
|
+
}
|
|
39
|
+
function j(e) {
|
|
40
|
+
let t = k.value.filter((e) => "resolvedOption" in e), n = t.find((e) => A(e.resolvedOption));
|
|
41
|
+
return e === "selected" && n ? n.itemId : e === "last" ? t.at(-1)?.itemId : t.at(0)?.itemId;
|
|
42
|
+
}
|
|
43
|
+
function M() {
|
|
44
|
+
o(() => {
|
|
45
|
+
let e = b.value ? document.getElementById(b.value) : null;
|
|
46
|
+
e && p(e);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function N(e) {
|
|
50
|
+
b.value = e;
|
|
51
|
+
}
|
|
52
|
+
function P(e) {
|
|
53
|
+
N(e), M();
|
|
54
|
+
}
|
|
55
|
+
function F(e) {
|
|
56
|
+
let t = k.value.map((e) => e.itemId), n = t.indexOf(b.value ?? "");
|
|
57
|
+
P(n === -1 ? e === 1 ? t.at(0) : t.at(-1) : t[(n + e + t.length) % t.length]);
|
|
58
|
+
}
|
|
59
|
+
function I(e) {
|
|
60
|
+
let t = k.value.map((e) => e.itemId);
|
|
61
|
+
P(e === "first" ? t.at(0) : t.at(-1));
|
|
62
|
+
}
|
|
63
|
+
function L(e) {
|
|
64
|
+
let t = E.value.filter((e) => !e.disabled), n = t.findIndex((e) => e.optionId === b.value), r = x(e, t.map((e) => e.label), n);
|
|
65
|
+
r !== -1 && P(t[r]?.optionId);
|
|
66
|
+
}
|
|
67
|
+
function R(e = "selected") {
|
|
68
|
+
c(f.openable) && !g.value && (S = e, g.value = !0);
|
|
69
|
+
}
|
|
70
|
+
function z({ restoreFocus: e }) {
|
|
71
|
+
g.value = !1, e && f.focusTrigger();
|
|
72
|
+
}
|
|
73
|
+
function B() {
|
|
74
|
+
g.value ? z({ restoreFocus: !1 }) : R();
|
|
75
|
+
}
|
|
76
|
+
function V(e) {
|
|
77
|
+
e.disabled || (c(f.multiple) ? (h.value = A(e) ? D.value.filter((t) => t !== e.value) : [...D.value, e.value], c(f.searchInTrigger) && (v.value = "", y.value = !1)) : (h.value = e.value, z({ restoreFocus: !0 })));
|
|
78
|
+
}
|
|
79
|
+
function H() {
|
|
80
|
+
h.value = c(f.multiple) ? [] : void 0;
|
|
81
|
+
}
|
|
82
|
+
function U(e, t) {
|
|
83
|
+
e.onSelect?.(t), z({ restoreFocus: !0 });
|
|
84
|
+
}
|
|
85
|
+
function W(e) {
|
|
86
|
+
let t = k.value.find((e) => e.itemId === b.value);
|
|
87
|
+
t && ("resolvedOption" in t ? V(t.resolvedOption) : U(t.selectAction, e));
|
|
88
|
+
}
|
|
89
|
+
let G = {
|
|
90
|
+
handler: () => z({ restoreFocus: !0 }),
|
|
91
|
+
preventDefault: !1
|
|
92
|
+
}, K = e({
|
|
93
|
+
arrowdown: () => F(1),
|
|
94
|
+
arrowup: () => F(-1),
|
|
95
|
+
enter: W,
|
|
96
|
+
escape: () => z({ restoreFocus: !0 }),
|
|
97
|
+
tab: G,
|
|
98
|
+
"shift+tab": G
|
|
99
|
+
}), q = e({
|
|
100
|
+
home: () => I("first"),
|
|
101
|
+
end: () => I("last"),
|
|
102
|
+
space: W
|
|
103
|
+
}), J = e({
|
|
104
|
+
arrowdown: () => R("selected"),
|
|
105
|
+
arrowup: () => R(D.value.length ? "selected" : "last"),
|
|
106
|
+
enter: () => R("selected"),
|
|
107
|
+
space: () => R("selected")
|
|
108
|
+
});
|
|
109
|
+
function Y(e) {
|
|
110
|
+
if (g.value) K(e), q(e), !e.defaultPrevented && m(e) && L(e.key);
|
|
111
|
+
else {
|
|
112
|
+
if (!c(f.openable) || (J(e), e.defaultPrevented || !m(e))) return;
|
|
113
|
+
R("selected"), c(f.searchable) ? v.value = e.key : o(() => L(e.key));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function X(e) {
|
|
117
|
+
K(e);
|
|
118
|
+
}
|
|
119
|
+
let Z = e({
|
|
120
|
+
arrowdown: () => R("selected"),
|
|
121
|
+
arrowup: () => R(D.value.length ? "selected" : "last")
|
|
122
|
+
});
|
|
123
|
+
function Q(e) {
|
|
124
|
+
R("first"), y.value = !0, v.value = e;
|
|
125
|
+
}
|
|
126
|
+
function $(e) {
|
|
127
|
+
let t = e.ctrlKey || e.metaKey || e.altKey;
|
|
128
|
+
if (m(e) || e.key === " ") return e.key;
|
|
129
|
+
if (!t && (e.key === "Backspace" || e.key === "Delete")) return "";
|
|
130
|
+
}
|
|
131
|
+
function ee(e) {
|
|
132
|
+
if (!c(f.openable) || (g.value ? K(e) : Z(e), e.defaultPrevented || y.value)) return;
|
|
133
|
+
let t = $(e);
|
|
134
|
+
t !== void 0 && (e.preventDefault(), Q(t));
|
|
135
|
+
}
|
|
136
|
+
function te(e) {
|
|
137
|
+
!y.value && c(f.openable) && (e.preventDefault(), Q(e.clipboardData?.getData("text") ?? ""));
|
|
138
|
+
}
|
|
139
|
+
return u(g, (e) => {
|
|
140
|
+
e ? (P(j(S)), S = "selected") : (v.value = "", y.value = !1, b.value = void 0);
|
|
141
|
+
}), u(v, () => {
|
|
142
|
+
g.value && P(j("first"));
|
|
143
|
+
}), u(() => c(f.openable), (e) => {
|
|
144
|
+
!e && g.value && z({ restoreFocus: !1 });
|
|
145
|
+
}), {
|
|
146
|
+
listboxId: _,
|
|
147
|
+
searchQuery: v,
|
|
148
|
+
hasStartedTriggerSearch: y,
|
|
149
|
+
highlightedItemId: b,
|
|
150
|
+
visibleEntries: T,
|
|
151
|
+
visibleOptions: E,
|
|
152
|
+
selectedValues: D,
|
|
153
|
+
selectedOptions: O,
|
|
154
|
+
isOptionSelected: A,
|
|
155
|
+
highlightItem: N,
|
|
156
|
+
openListbox: R,
|
|
157
|
+
closeListbox: z,
|
|
158
|
+
toggleListbox: B,
|
|
159
|
+
selectOption: V,
|
|
160
|
+
clearSelection: H,
|
|
161
|
+
runSelectAction: U,
|
|
162
|
+
handleTriggerKeydown: Y,
|
|
163
|
+
handleSearchKeydown: X,
|
|
164
|
+
handleSearchTriggerKeydown: ee,
|
|
165
|
+
handleSearchTriggerPaste: te,
|
|
166
|
+
searchFromTrigger: Q
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
export { d as createSelectActionId, h as useSelectListbox };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { SliderControlSlotName } from '../../elements/slider-control';
|
|
2
|
+
import type { SliderMark, SliderRange } from '../../shared/types/slider';
|
|
3
|
+
import type { ClassNameValue } from '../../shared/utils/tv';
|
|
4
|
+
import type { SliderSlotName } from './slider.theme';
|
|
5
|
+
export interface RangeSliderProps {
|
|
6
|
+
label?: string;
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
step?: number;
|
|
10
|
+
minRange?: number;
|
|
11
|
+
resetValue?: SliderRange;
|
|
12
|
+
resetLabel?: string;
|
|
13
|
+
startLabel?: string;
|
|
14
|
+
endLabel?: string;
|
|
15
|
+
unit?: string;
|
|
16
|
+
prefixUnit?: string;
|
|
17
|
+
marks?: SliderMark[];
|
|
18
|
+
trackColor?: string;
|
|
19
|
+
rangeColor?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
ui?: Partial<Record<SliderSlotName | 'container' | Exclude<SliderControlSlotName, 'root'>, ClassNameValue>>;
|
|
23
|
+
class?: ClassNameValue;
|
|
24
|
+
}
|
|
25
|
+
export interface RangeSliderSlots {
|
|
26
|
+
label?: () => unknown;
|
|
27
|
+
}
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<RangeSliderProps & {
|
|
31
|
+
modelValue?: SliderRange;
|
|
32
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
33
|
+
blur: (blurEvent: FocusEvent) => any;
|
|
34
|
+
focus: (focusEvent: FocusEvent) => any;
|
|
35
|
+
"update:modelValue": (value: SliderRange | undefined) => any;
|
|
36
|
+
}, string, import("vue").PublicProps, Readonly<RangeSliderProps & {
|
|
37
|
+
modelValue?: SliderRange;
|
|
38
|
+
}> & Readonly<{
|
|
39
|
+
onBlur?: ((blurEvent: FocusEvent) => any) | undefined;
|
|
40
|
+
onFocus?: ((focusEvent: FocusEvent) => any) | undefined;
|
|
41
|
+
"onUpdate:modelValue"?: ((value: SliderRange | undefined) => any) | undefined;
|
|
42
|
+
}>, {
|
|
43
|
+
max: number;
|
|
44
|
+
min: number;
|
|
45
|
+
step: number;
|
|
46
|
+
minRange: number;
|
|
47
|
+
resetLabel: string;
|
|
48
|
+
startLabel: string;
|
|
49
|
+
endLabel: string;
|
|
50
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, RangeSliderSlots>;
|
|
51
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
52
|
+
new (): {
|
|
53
|
+
$slots: S;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import e from "../../elements/slider-control/SliderControl.js";
|
|
2
|
+
import { useNumberFieldTyping as t } from "../../shared/composables/useNumberFieldTyping.js";
|
|
3
|
+
import { clampToRange as n } from "../../shared/utils/steppedValue.js";
|
|
4
|
+
import r from "./SliderHeader.js";
|
|
5
|
+
import { sliderTheme as i } from "./slider.theme.js";
|
|
6
|
+
import { computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, normalizeClass as m, onMounted as h, openBlock as g, renderSlot as _, toDisplayString as v, toHandlers as y, unref as b, useId as ee, useModel as x, useSlots as S, useTemplateRef as C, watch as w, withCtx as T } from "vue";
|
|
7
|
+
// src/components/slider/RangeSlider.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var E = ["aria-labelledby"], D = [
|
|
9
|
+
"aria-label",
|
|
10
|
+
"value",
|
|
11
|
+
"disabled"
|
|
12
|
+
], O = [
|
|
13
|
+
"aria-label",
|
|
14
|
+
"value",
|
|
15
|
+
"disabled"
|
|
16
|
+
], k = /*@__PURE__*/ d({
|
|
17
|
+
__name: "RangeSlider",
|
|
18
|
+
props: /*@__PURE__*/ f({
|
|
19
|
+
label: {},
|
|
20
|
+
min: { default: 0 },
|
|
21
|
+
max: { default: 100 },
|
|
22
|
+
step: { default: 1 },
|
|
23
|
+
minRange: { default: 0 },
|
|
24
|
+
resetValue: {},
|
|
25
|
+
resetLabel: { default: "Reset to default" },
|
|
26
|
+
startLabel: { default: "Minimum" },
|
|
27
|
+
endLabel: { default: "Maximum" },
|
|
28
|
+
unit: {},
|
|
29
|
+
prefixUnit: {},
|
|
30
|
+
marks: {},
|
|
31
|
+
trackColor: {},
|
|
32
|
+
rangeColor: {},
|
|
33
|
+
name: {},
|
|
34
|
+
disabled: { type: Boolean },
|
|
35
|
+
ui: {},
|
|
36
|
+
class: { type: [
|
|
37
|
+
Array,
|
|
38
|
+
String,
|
|
39
|
+
null,
|
|
40
|
+
Number,
|
|
41
|
+
Boolean
|
|
42
|
+
] }
|
|
43
|
+
}, {
|
|
44
|
+
modelValue: {},
|
|
45
|
+
modelModifiers: {}
|
|
46
|
+
}),
|
|
47
|
+
emits: /*@__PURE__*/ f(["focus", "blur"], ["update:modelValue"]),
|
|
48
|
+
setup(d, { emit: f }) {
|
|
49
|
+
let k = d, A = f, j = S(), M = x(d, "modelValue"), N = ee(), P = `${N}-start`, F = `${N}-label`, I = C("sliderControl"), L = C("startInput"), R = C("endInput"), z = C("valueSeparator"), B = a({
|
|
50
|
+
get: () => M.value ?? [k.min, k.max],
|
|
51
|
+
set: (e) => {
|
|
52
|
+
M.value = e;
|
|
53
|
+
}
|
|
54
|
+
}), V = a({
|
|
55
|
+
get: () => [...B.value],
|
|
56
|
+
set: ([e, t]) => {
|
|
57
|
+
B.value = [e ?? k.min, t ?? k.max];
|
|
58
|
+
}
|
|
59
|
+
}), H = a({
|
|
60
|
+
get: () => B.value[0],
|
|
61
|
+
set: (e) => {
|
|
62
|
+
B.value = [e, B.value[1]];
|
|
63
|
+
}
|
|
64
|
+
}), U = a({
|
|
65
|
+
get: () => B.value[1],
|
|
66
|
+
set: (e) => {
|
|
67
|
+
B.value = [B.value[0], e];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
function W(e) {
|
|
71
|
+
A("focus", e);
|
|
72
|
+
}
|
|
73
|
+
function G(e) {
|
|
74
|
+
A("blur", e);
|
|
75
|
+
}
|
|
76
|
+
let K = t({
|
|
77
|
+
fieldValue: H,
|
|
78
|
+
lowestValue: () => k.min,
|
|
79
|
+
highestValue: () => U.value - k.minRange,
|
|
80
|
+
step: () => k.step,
|
|
81
|
+
fieldElement: L,
|
|
82
|
+
onFieldFocus: W,
|
|
83
|
+
onFieldBlur: G
|
|
84
|
+
}), q = t({
|
|
85
|
+
fieldValue: U,
|
|
86
|
+
lowestValue: () => H.value + k.minRange,
|
|
87
|
+
highestValue: () => k.max,
|
|
88
|
+
step: () => k.step,
|
|
89
|
+
fieldElement: R,
|
|
90
|
+
onFieldFocus: W,
|
|
91
|
+
onFieldBlur: G
|
|
92
|
+
}), J = K.valueText, Y = q.valueText, X = a(() => k.resetValue !== void 0 && k.resetValue[0] === H.value && k.resetValue[1] === U.value), Z = a(() => k.disabled || X.value && !(I.value?.isPointerPressing ?? !1)), Q = a(() => i({
|
|
93
|
+
disabled: k.disabled,
|
|
94
|
+
hidesResetButton: Z.value
|
|
95
|
+
})), te = a(() => ({
|
|
96
|
+
...k.ui,
|
|
97
|
+
root: k.ui?.container
|
|
98
|
+
})), ne = {
|
|
99
|
+
onFocus: W,
|
|
100
|
+
onBlur: G
|
|
101
|
+
};
|
|
102
|
+
function $() {
|
|
103
|
+
let [e, t] = B.value, r = n(e, k.min, k.max), i = n(t, k.min, k.max);
|
|
104
|
+
(r !== e || i !== t) && (B.value = [r, i]);
|
|
105
|
+
}
|
|
106
|
+
function re(e) {
|
|
107
|
+
let t = z.value?.getBoundingClientRect();
|
|
108
|
+
(t !== void 0 && e.clientX > t.left + t.width / 2 ? R : L).value?.focus();
|
|
109
|
+
}
|
|
110
|
+
function ie() {
|
|
111
|
+
k.resetValue && (B.value = [...k.resetValue]);
|
|
112
|
+
}
|
|
113
|
+
return w(() => [k.min, k.max], $), h($), (t, n) => (g(), s("div", {
|
|
114
|
+
role: "group",
|
|
115
|
+
"aria-labelledby": d.label || j.label ? F : void 0,
|
|
116
|
+
class: m(Q.value.root({ class: [d.ui?.root, k.class] }))
|
|
117
|
+
}, [u(r, {
|
|
118
|
+
"label-id": F,
|
|
119
|
+
"label-target-id": P,
|
|
120
|
+
label: d.label,
|
|
121
|
+
"shows-reset-button": d.resetValue !== void 0,
|
|
122
|
+
"reset-label": d.resetLabel,
|
|
123
|
+
"hides-reset-button": Z.value,
|
|
124
|
+
disabled: d.disabled,
|
|
125
|
+
ui: d.ui,
|
|
126
|
+
onReset: ie,
|
|
127
|
+
onValueClick: re
|
|
128
|
+
}, l({
|
|
129
|
+
default: T(() => [
|
|
130
|
+
d.prefixUnit ? (g(), s("span", {
|
|
131
|
+
key: 0,
|
|
132
|
+
class: m(Q.value.unit({ class: d.ui?.unit }))
|
|
133
|
+
}, v(d.prefixUnit), 3)) : o("", !0),
|
|
134
|
+
c("input", p({
|
|
135
|
+
id: P,
|
|
136
|
+
ref_key: "startInput",
|
|
137
|
+
ref: L,
|
|
138
|
+
type: "text",
|
|
139
|
+
"aria-label": d.startLabel,
|
|
140
|
+
value: b(J),
|
|
141
|
+
disabled: d.disabled,
|
|
142
|
+
style: { "--slider-value-length": b(J).length },
|
|
143
|
+
class: Q.value.valueInput({ class: d.ui?.valueInput })
|
|
144
|
+
}, y(b(K).fieldListeners, !0)), null, 16, D),
|
|
145
|
+
c("span", {
|
|
146
|
+
ref_key: "valueSeparator",
|
|
147
|
+
ref: z,
|
|
148
|
+
class: m(Q.value.valueSeparator({ class: d.ui?.valueSeparator }))
|
|
149
|
+
}, "–", 2),
|
|
150
|
+
d.prefixUnit ? (g(), s("span", {
|
|
151
|
+
key: 1,
|
|
152
|
+
class: m(Q.value.unit({ class: d.ui?.unit }))
|
|
153
|
+
}, v(d.prefixUnit), 3)) : o("", !0),
|
|
154
|
+
c("input", p({
|
|
155
|
+
ref_key: "endInput",
|
|
156
|
+
ref: R,
|
|
157
|
+
type: "text",
|
|
158
|
+
"aria-label": d.endLabel,
|
|
159
|
+
value: b(Y),
|
|
160
|
+
disabled: d.disabled,
|
|
161
|
+
style: { "--slider-value-length": b(Y).length },
|
|
162
|
+
class: Q.value.valueInput({ class: d.ui?.valueInput })
|
|
163
|
+
}, y(b(q).fieldListeners, !0)), null, 16, O),
|
|
164
|
+
d.unit ? (g(), s("span", {
|
|
165
|
+
key: 2,
|
|
166
|
+
class: m(Q.value.unit({ class: d.ui?.unit }))
|
|
167
|
+
}, v(d.unit), 3)) : o("", !0)
|
|
168
|
+
]),
|
|
169
|
+
_: 2
|
|
170
|
+
}, [j.label ? {
|
|
171
|
+
name: "label",
|
|
172
|
+
fn: T(() => [_(t.$slots, "label")]),
|
|
173
|
+
key: "0"
|
|
174
|
+
} : void 0]), 1032, [
|
|
175
|
+
"label",
|
|
176
|
+
"shows-reset-button",
|
|
177
|
+
"reset-label",
|
|
178
|
+
"hides-reset-button",
|
|
179
|
+
"disabled",
|
|
180
|
+
"ui"
|
|
181
|
+
]), u(b(e), {
|
|
182
|
+
ref_key: "sliderControl",
|
|
183
|
+
ref: I,
|
|
184
|
+
modelValue: V.value,
|
|
185
|
+
"onUpdate:modelValue": n[0] ||= (e) => V.value = e,
|
|
186
|
+
min: d.min,
|
|
187
|
+
max: d.max,
|
|
188
|
+
step: d.step,
|
|
189
|
+
"min-range": d.minRange,
|
|
190
|
+
disabled: d.disabled,
|
|
191
|
+
name: d.name,
|
|
192
|
+
marks: d.marks,
|
|
193
|
+
"track-color": d.trackColor,
|
|
194
|
+
"range-color": d.rangeColor,
|
|
195
|
+
"thumb-labels": [d.startLabel, d.endLabel],
|
|
196
|
+
"thumb-attributes": ne,
|
|
197
|
+
ui: te.value
|
|
198
|
+
}, null, 8, [
|
|
199
|
+
"modelValue",
|
|
200
|
+
"min",
|
|
201
|
+
"max",
|
|
202
|
+
"step",
|
|
203
|
+
"min-range",
|
|
204
|
+
"disabled",
|
|
205
|
+
"name",
|
|
206
|
+
"marks",
|
|
207
|
+
"track-color",
|
|
208
|
+
"range-color",
|
|
209
|
+
"thumb-labels",
|
|
210
|
+
"ui"
|
|
211
|
+
])], 10, E));
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
export { k as default };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { SliderControlSlotName } from '../../elements/slider-control';
|
|
2
|
+
import type { SliderMark } from '../../shared/types/slider';
|
|
3
|
+
import type { ClassNameValue } from '../../shared/utils/tv';
|
|
4
|
+
import type { SliderSlotName } from './slider.theme';
|
|
5
|
+
export interface SliderProps {
|
|
6
|
+
label?: string;
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
step?: number;
|
|
10
|
+
resetValue?: number;
|
|
11
|
+
resetLabel?: string;
|
|
12
|
+
unit?: string;
|
|
13
|
+
prefixUnit?: string;
|
|
14
|
+
marks?: SliderMark[];
|
|
15
|
+
trackColor?: string;
|
|
16
|
+
rangeColor?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
ui?: Partial<Record<SliderSlotName | 'container' | Exclude<SliderControlSlotName, 'root'>, ClassNameValue>>;
|
|
20
|
+
class?: ClassNameValue;
|
|
21
|
+
}
|
|
22
|
+
export interface SliderSlots {
|
|
23
|
+
label?: () => unknown;
|
|
24
|
+
}
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<SliderProps & {
|
|
28
|
+
modelValue?: number;
|
|
29
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
blur: (blurEvent: FocusEvent) => any;
|
|
31
|
+
focus: (focusEvent: FocusEvent) => any;
|
|
32
|
+
"update:modelValue": (value: number | undefined) => any;
|
|
33
|
+
}, string, import("vue").PublicProps, Readonly<SliderProps & {
|
|
34
|
+
modelValue?: number;
|
|
35
|
+
}> & Readonly<{
|
|
36
|
+
onBlur?: ((blurEvent: FocusEvent) => any) | undefined;
|
|
37
|
+
onFocus?: ((focusEvent: FocusEvent) => any) | undefined;
|
|
38
|
+
"onUpdate:modelValue"?: ((value: number | undefined) => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
max: number;
|
|
41
|
+
min: number;
|
|
42
|
+
step: number;
|
|
43
|
+
resetLabel: string;
|
|
44
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, SliderSlots>;
|
|
45
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|