@kuina-ui/vue 0.6.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_vue_type_script_setup_true_lang.js +214 -0
- package/dist/components/slider/Slider.js +4 -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_vue_type_script_setup_true_lang.js +61 -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_vue_type_script_setup_true_lang.js +228 -0
- package/dist/elements/slider-control/slider-control.theme.js +35 -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_vue_type_script_setup_true_lang.js +161 -0
- package/dist/elements/tooltip/tooltip.theme.js +46 -0
- package/dist/elements/tooltip/useTooltipOpenState.js +57 -0
- package/dist/index.d.ts +17 -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.js +70 -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/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.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.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.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.js +21 -0
- package/dist/shared/utils/sliderPosition.js +27 -0
- package/dist/shared/utils/sliderThumbs.js +16 -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 +1 -0
- package/src/shared/styles/utilities/shake.css +21 -0
- package/dist/src-Rouj5r7z.js +0 -9111
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { hasCrowdedMarks as e } from "../../shared/utils/sliderPosition.js";
|
|
2
|
+
import { nextTick as t, ref as n, watch as r } from "vue";
|
|
3
|
+
// src/elements/slider-control/useSliderMarksLayout.ts
|
|
4
|
+
var i = 16;
|
|
5
|
+
function a(a, o) {
|
|
6
|
+
let s = n("inline"), c = 0, l;
|
|
7
|
+
function u() {
|
|
8
|
+
let t = [...a.value?.children ?? []];
|
|
9
|
+
return e(t.map((e) => e.getBoundingClientRect()), i);
|
|
10
|
+
}
|
|
11
|
+
async function d() {
|
|
12
|
+
let e = ++c, n = () => e !== c;
|
|
13
|
+
s.value = "inline", await t(), !n() && u() && (s.value = "wrapped", await t(), !n() && u() && (s.value = "hidden"));
|
|
14
|
+
}
|
|
15
|
+
return r(a, (e, t, n) => {
|
|
16
|
+
if (!e) return;
|
|
17
|
+
l = void 0;
|
|
18
|
+
let r = new ResizeObserver(([e]) => {
|
|
19
|
+
let t = e?.contentRect.width;
|
|
20
|
+
t !== l && (l = t, d());
|
|
21
|
+
});
|
|
22
|
+
r.observe(e), n(() => r.disconnect());
|
|
23
|
+
}, { flush: "post" }), r(o, d, { flush: "post" }), { marksLayout: s };
|
|
24
|
+
}
|
|
25
|
+
export { a as useSliderMarksLayout };
|
|
@@ -21,6 +21,6 @@ declare const __VLS_export: import("vue").DefineComponent<SwitchProps & {
|
|
|
21
21
|
}> & Readonly<{
|
|
22
22
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
23
23
|
}>, {
|
|
24
|
-
color: "primary" | "secondary" |
|
|
24
|
+
color: "primary" | "secondary" | (string & {}) | "neutral";
|
|
25
25
|
labelPosition: "end" | "start";
|
|
26
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { useCustomColor as e } from "../../shared/composables/useCustomColor.js";
|
|
2
|
+
import { switchTheme as t } from "./switch.theme.js";
|
|
3
|
+
import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, normalizeClass as d, normalizeStyle as f, openBlock as p, toDisplayString as m, unref as h, useId as g, useModel as _, vModelCheckbox as v, withDirectives as y } from "vue";
|
|
4
|
+
// src/elements/switch/Switch.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var b = [
|
|
6
|
+
"checked",
|
|
7
|
+
"disabled",
|
|
8
|
+
"aria-labelledby",
|
|
9
|
+
"aria-describedby"
|
|
10
|
+
], x = /*@__PURE__*/ c({
|
|
11
|
+
inheritAttrs: !1,
|
|
12
|
+
__name: "Switch",
|
|
13
|
+
props: /*@__PURE__*/ l({
|
|
14
|
+
label: {},
|
|
15
|
+
description: {},
|
|
16
|
+
color: { default: "neutral" },
|
|
17
|
+
labelPosition: { default: "end" },
|
|
18
|
+
block: { type: Boolean },
|
|
19
|
+
disabled: { type: Boolean },
|
|
20
|
+
ui: {},
|
|
21
|
+
class: { type: [
|
|
22
|
+
Array,
|
|
23
|
+
String,
|
|
24
|
+
null,
|
|
25
|
+
Number,
|
|
26
|
+
Boolean
|
|
27
|
+
] }
|
|
28
|
+
}, {
|
|
29
|
+
modelValue: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
modelModifiers: {}
|
|
34
|
+
}),
|
|
35
|
+
emits: ["update:modelValue"],
|
|
36
|
+
setup(c) {
|
|
37
|
+
let l = c, x = _(c, "modelValue"), { themeColor: S, customColorVariable: C } = e(() => l.color, t.variants.color), w = g(), T = `${w}-label`, E = `${w}-description`, D = r(() => !!(l.label && l.description)), O = r(() => t({
|
|
38
|
+
color: S.value,
|
|
39
|
+
labelPosition: l.labelPosition,
|
|
40
|
+
block: l.block,
|
|
41
|
+
disabled: l.disabled,
|
|
42
|
+
hasLabel: !!l.label
|
|
43
|
+
}));
|
|
44
|
+
return (e, t) => (p(), a("label", {
|
|
45
|
+
class: d(O.value.root({ class: [c.ui?.root, l.class] })),
|
|
46
|
+
style: f(h(C))
|
|
47
|
+
}, [o("span", { class: d(O.value.base({ class: c.ui?.base })) }, [y(o("input", u(e.$attrs, {
|
|
48
|
+
"onUpdate:modelValue": t[0] ||= (e) => x.value = e,
|
|
49
|
+
checked: x.value,
|
|
50
|
+
type: "checkbox",
|
|
51
|
+
role: "switch",
|
|
52
|
+
disabled: c.disabled,
|
|
53
|
+
"aria-labelledby": D.value ? T : void 0,
|
|
54
|
+
"aria-describedby": D.value ? E : void 0,
|
|
55
|
+
class: "peer sr-only"
|
|
56
|
+
}), null, 16, b), [[v, x.value]]), o("span", {
|
|
57
|
+
"aria-hidden": "true",
|
|
58
|
+
class: d(O.value.thumb({ class: c.ui?.thumb }))
|
|
59
|
+
}, null, 2)], 2), D.value ? (p(), a("span", {
|
|
60
|
+
key: 0,
|
|
61
|
+
class: d(O.value.wrapper({ class: c.ui?.wrapper }))
|
|
62
|
+
}, [o("span", {
|
|
63
|
+
id: T,
|
|
64
|
+
class: d(O.value.label({ class: c.ui?.label }))
|
|
65
|
+
}, m(c.label), 3), o("span", {
|
|
66
|
+
id: E,
|
|
67
|
+
class: d(O.value.description({ class: c.ui?.description }))
|
|
68
|
+
}, m(c.description), 3)], 2)) : c.label ? (p(), a(n, { key: 1 }, [s(m(c.label), 1)], 64)) : i("", !0)], 6));
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
export { x as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { tv as e } from "../../shared/utils/tv.js";
|
|
2
|
+
// src/elements/switch/switch.theme.ts
|
|
3
|
+
var t = e({
|
|
4
|
+
slots: {
|
|
5
|
+
root: "flex items-start text-sm leading-5 select-none",
|
|
6
|
+
base: "relative h-4.75 w-8 shrink-0 rounded-full outline-primary transition-colors duration-250 ease-[cubic-bezier(0.65,0,0.35,1)] has-focus-visible:outline-2 has-focus-visible:outline-offset-2 light:bg-stone-200 dark:bg-stone-700",
|
|
7
|
+
thumb: "absolute top-0.75 left-0.75 size-3.25 rounded-full bg-white transition duration-250 ease-[cubic-bezier(0.65,0,0.35,1)] peer-checked:translate-x-3.25 dark:peer-checked:bg-stone-950",
|
|
8
|
+
wrapper: "min-w-0",
|
|
9
|
+
label: "block font-medium",
|
|
10
|
+
description: "mt-0.5 block text-muted"
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
color: {
|
|
14
|
+
primary: { base: "has-checked:bg-primary" },
|
|
15
|
+
secondary: { base: "has-checked:bg-secondary" },
|
|
16
|
+
neutral: { base: "light:has-checked:bg-neutral-900 dark:has-checked:bg-stone-200" }
|
|
17
|
+
},
|
|
18
|
+
labelPosition: {
|
|
19
|
+
start: { root: "flex-row-reverse" },
|
|
20
|
+
end: ""
|
|
21
|
+
},
|
|
22
|
+
block: {
|
|
23
|
+
true: { root: "w-full justify-between gap-x-4" },
|
|
24
|
+
false: { root: "w-fit gap-x-2" }
|
|
25
|
+
},
|
|
26
|
+
disabled: {
|
|
27
|
+
true: { root: "cursor-not-allowed opacity-50" },
|
|
28
|
+
false: {
|
|
29
|
+
root: "cursor-pointer",
|
|
30
|
+
base: "light:not-has-checked:hover:bg-stone-300 dark:not-has-checked:hover:bg-stone-600",
|
|
31
|
+
thumb: "shadow-[0_1px_2px_rgb(0_0_0/20%)]"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
hasLabel: { true: { base: "top-px" } }
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export { t as switchTheme };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { isExternalUrl as e } from "../../shared/utils/isExternalUrl.js";
|
|
2
|
+
import { textLinkTheme as t } from "./text-link.theme.js";
|
|
3
|
+
import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createTextVNode as o, defineComponent as s, normalizeClass as c, openBlock as l, renderSlot as u, resolveDynamicComponent as d, toDisplayString as f } from "vue";
|
|
4
|
+
// src/elements/text-link/TextLink.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var p = [
|
|
6
|
+
"href",
|
|
7
|
+
"target",
|
|
8
|
+
"rel"
|
|
9
|
+
], m = /*@__PURE__*/ s({
|
|
10
|
+
__name: "TextLink",
|
|
11
|
+
props: {
|
|
12
|
+
label: {},
|
|
13
|
+
href: { default: "#" },
|
|
14
|
+
color: { default: "inherit" },
|
|
15
|
+
weight: { default: "inherit" },
|
|
16
|
+
underline: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: void 0
|
|
19
|
+
},
|
|
20
|
+
external: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: void 0
|
|
23
|
+
},
|
|
24
|
+
leadingIcon: {},
|
|
25
|
+
trailingIcon: {},
|
|
26
|
+
ui: {},
|
|
27
|
+
class: { type: [
|
|
28
|
+
Array,
|
|
29
|
+
String,
|
|
30
|
+
null,
|
|
31
|
+
Number,
|
|
32
|
+
Boolean
|
|
33
|
+
] }
|
|
34
|
+
},
|
|
35
|
+
setup(s) {
|
|
36
|
+
let m = s, h = n(() => m.underline ?? m.color !== "primary"), g = n(() => m.external ?? e(m.href)), _ = n(() => t({
|
|
37
|
+
color: m.color,
|
|
38
|
+
weight: m.weight,
|
|
39
|
+
underline: h.value,
|
|
40
|
+
hasIcon: !!(m.leadingIcon || m.trailingIcon)
|
|
41
|
+
}));
|
|
42
|
+
return (e, t) => (l(), a("a", {
|
|
43
|
+
href: s.href,
|
|
44
|
+
target: g.value ? "_blank" : void 0,
|
|
45
|
+
rel: g.value ? "noopener noreferrer" : void 0,
|
|
46
|
+
class: c(_.value.base({ class: [s.ui?.base, m.class] }))
|
|
47
|
+
}, [
|
|
48
|
+
s.leadingIcon ? (l(), r(d(s.leadingIcon), {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: c(_.value.leadingIcon({ class: s.ui?.leadingIcon }))
|
|
51
|
+
}, null, 8, ["class"])) : i("", !0),
|
|
52
|
+
u(e.$slots, "default", {}, () => [o(f(s.label), 1)]),
|
|
53
|
+
s.trailingIcon ? (l(), r(d(s.trailingIcon), {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: c(_.value.trailingIcon({ class: s.ui?.trailingIcon }))
|
|
56
|
+
}, null, 8, ["class"])) : i("", !0),
|
|
57
|
+
g.value ? (l(), a("span", {
|
|
58
|
+
key: 2,
|
|
59
|
+
class: c(_.value.newTabHint({ class: s.ui?.newTabHint }))
|
|
60
|
+
}, "(opens in a new tab)", 2)) : i("", !0)
|
|
61
|
+
], 10, p));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
export { m as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { tv as e } from "../../shared/utils/tv.js";
|
|
2
|
+
// src/elements/text-link/text-link.theme.ts
|
|
3
|
+
var t = e({
|
|
4
|
+
slots: {
|
|
5
|
+
base: "rounded-sm wrap-anywhere outline-primary transition-colors focus-visible:outline-2 focus-visible:outline-offset-1",
|
|
6
|
+
leadingIcon: "size-[1em] shrink-0",
|
|
7
|
+
trailingIcon: "size-[1em] shrink-0",
|
|
8
|
+
newTabHint: "sr-only"
|
|
9
|
+
},
|
|
10
|
+
variants: {
|
|
11
|
+
color: {
|
|
12
|
+
inherit: { base: "hover:text-current/80" },
|
|
13
|
+
muted: { base: "text-muted light:hover:text-stone-950 dark:hover:text-white" },
|
|
14
|
+
primary: { base: "text-primary light:hover:text-[color-mix(in_oklab,var(--color-primary),black_25%)] dark:hover:text-[color-mix(in_oklab,var(--color-primary),white_25%)]" }
|
|
15
|
+
},
|
|
16
|
+
weight: {
|
|
17
|
+
inherit: "",
|
|
18
|
+
medium: { base: "font-medium" },
|
|
19
|
+
semibold: { base: "font-semibold" }
|
|
20
|
+
},
|
|
21
|
+
underline: { true: { base: "underline decoration-current/70 underline-offset-[0.1em]" } },
|
|
22
|
+
hasIcon: { true: { base: "inline-flex items-center gap-0.5" } }
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
export { t as textLinkTheme };
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { useDismissOnOutsidePointerDown as e } from "../../shared/composables/useDismissOnOutsidePointerDown.js";
|
|
2
|
+
import { useFloatingPosition as t } from "../../shared/composables/useFloatingPosition.js";
|
|
3
|
+
import { usePointerGraceArea as n } from "../../shared/composables/usePointerGraceArea.js";
|
|
4
|
+
import { useShortcuts as r } from "../../shared/composables/useShortcuts.js";
|
|
5
|
+
import { findFirstRenderedVNode as i } from "../../shared/utils/findFirstRenderedVNode.js";
|
|
6
|
+
import { flipFloatingPosition as a } from "../../shared/utils/flipFloatingPosition.js";
|
|
7
|
+
import { shiftFloatingPosition as o } from "../../shared/utils/shiftFloatingPosition.js";
|
|
8
|
+
import { tooltipTheme as s } from "./tooltip.theme.js";
|
|
9
|
+
import { useTooltipOpenState as c } from "./useTooltipOpenState.js";
|
|
10
|
+
import { Fragment as l, Teleport as ee, Text as u, cloneVNode as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createTextVNode as g, defineComponent as _, h as v, mergeModels as y, normalizeClass as b, normalizeStyle as x, onBeforeUnmount as S, onMounted as C, openBlock as w, renderSlot as te, resolveDynamicComponent as ne, shallowRef as re, toDisplayString as T, unref as E, useAttrs as D, useId as O, useModel as k, useSlots as A, useTemplateRef as j, watch as M } from "vue";
|
|
11
|
+
// src/elements/tooltip/Tooltip.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
+
var N = ["id", "data-state"], P = /*@__PURE__*/ _({
|
|
13
|
+
inheritAttrs: !1,
|
|
14
|
+
__name: "Tooltip",
|
|
15
|
+
props: /*@__PURE__*/ y({
|
|
16
|
+
content: {},
|
|
17
|
+
label: {},
|
|
18
|
+
side: { default: "top" },
|
|
19
|
+
align: { default: "center" },
|
|
20
|
+
sideOffset: { default: 5 },
|
|
21
|
+
alignOffset: { default: 0 },
|
|
22
|
+
maxWidth: { default: 300 },
|
|
23
|
+
gutterSize: { default: "md" },
|
|
24
|
+
compact: { type: Boolean },
|
|
25
|
+
openDelay: { default: 150 },
|
|
26
|
+
interactive: { type: Boolean },
|
|
27
|
+
preventUnintentionalClickToClose: { type: Boolean },
|
|
28
|
+
ui: {},
|
|
29
|
+
class: { type: [
|
|
30
|
+
Array,
|
|
31
|
+
String,
|
|
32
|
+
null,
|
|
33
|
+
Number,
|
|
34
|
+
Boolean
|
|
35
|
+
] }
|
|
36
|
+
}, {
|
|
37
|
+
open: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !1
|
|
40
|
+
},
|
|
41
|
+
openModifiers: {}
|
|
42
|
+
}),
|
|
43
|
+
emits: ["update:open"],
|
|
44
|
+
setup(_) {
|
|
45
|
+
let y = _, P = k(_, "open"), F = A(), I = D(), L = O(), R = re(), z = j("tooltipBubble"), B = !1, V = !1;
|
|
46
|
+
function H() {
|
|
47
|
+
return !!y.content || !!F.content;
|
|
48
|
+
}
|
|
49
|
+
function U() {
|
|
50
|
+
return P.value && H();
|
|
51
|
+
}
|
|
52
|
+
let { tooltipState: W, openTooltipNow: ie, openTooltipOnPointerEnter: G, cancelPendingOpen: K, closeTooltip: q, closeTooltipOnTriggerPress: J } = c(P, {
|
|
53
|
+
openDelay: () => y.openDelay,
|
|
54
|
+
hasContent: H,
|
|
55
|
+
preventUnintentionalClickToClose: () => y.preventUnintentionalClickToClose
|
|
56
|
+
}), { floatingStyles: Y } = t(R, z, {
|
|
57
|
+
open: U,
|
|
58
|
+
side: () => y.side,
|
|
59
|
+
align: () => y.align,
|
|
60
|
+
sideOffset: () => y.sideOffset,
|
|
61
|
+
alignOffset: () => y.alignOffset,
|
|
62
|
+
strategy: "fixed",
|
|
63
|
+
positionModifiers: [a(15), o(15)]
|
|
64
|
+
}), { isPointerInTransit: ae } = n(R, z, {
|
|
65
|
+
active: () => y.interactive && P.value,
|
|
66
|
+
onPointerLeaveArea: q
|
|
67
|
+
});
|
|
68
|
+
r({ escape: {
|
|
69
|
+
handler: q,
|
|
70
|
+
allowInEditable: !0
|
|
71
|
+
} }, { enabled: P }), e([R, z], {
|
|
72
|
+
active: P,
|
|
73
|
+
onDismiss: q
|
|
74
|
+
});
|
|
75
|
+
let X = f(() => s({
|
|
76
|
+
gutterSize: y.gutterSize,
|
|
77
|
+
compact: y.compact,
|
|
78
|
+
open: W.value !== "closed"
|
|
79
|
+
})), oe = f(() => ({
|
|
80
|
+
...Y.value,
|
|
81
|
+
maxWidth: y.maxWidth === "none" ? void 0 : `${y.maxWidth}px`
|
|
82
|
+
}));
|
|
83
|
+
function Z() {
|
|
84
|
+
B = !1;
|
|
85
|
+
}
|
|
86
|
+
function se(e) {
|
|
87
|
+
e.defaultPrevented || e.pointerType === "touch" || V || ae.value || (G(), V = !0);
|
|
88
|
+
}
|
|
89
|
+
function ce(e) {
|
|
90
|
+
e.defaultPrevented || (y.interactive ? K() : q(), V = !1);
|
|
91
|
+
}
|
|
92
|
+
function le(e) {
|
|
93
|
+
e.defaultPrevented || (P.value && J(), B = !0, document.addEventListener("pointerup", Z, { once: !0 }));
|
|
94
|
+
}
|
|
95
|
+
function ue(e) {
|
|
96
|
+
e.defaultPrevented || B || ie();
|
|
97
|
+
}
|
|
98
|
+
function Q(e) {
|
|
99
|
+
e.defaultPrevented || q();
|
|
100
|
+
}
|
|
101
|
+
function de(e) {
|
|
102
|
+
e.defaultPrevented || J();
|
|
103
|
+
}
|
|
104
|
+
function fe(e) {
|
|
105
|
+
let t = e instanceof Element ? e : e?.$el;
|
|
106
|
+
R.value = t instanceof HTMLElement ? t : void 0;
|
|
107
|
+
}
|
|
108
|
+
function pe(e) {
|
|
109
|
+
let t = new Set(String(e ?? "").split(/\s+/).filter(Boolean));
|
|
110
|
+
return U() && t.add(L), t.size > 0 ? [...t].join(" ") : void 0;
|
|
111
|
+
}
|
|
112
|
+
function $(e) {
|
|
113
|
+
return v("span", {
|
|
114
|
+
tabindex: 0,
|
|
115
|
+
class: X.value.trigger({ class: y.ui?.trigger })
|
|
116
|
+
}, e);
|
|
117
|
+
}
|
|
118
|
+
function me() {
|
|
119
|
+
if (y.label) return $(y.label);
|
|
120
|
+
let e = i(F.default?.() ?? []);
|
|
121
|
+
return e?.type === u ? $(String(e.children)) : e;
|
|
122
|
+
}
|
|
123
|
+
function he() {
|
|
124
|
+
let e = me();
|
|
125
|
+
return e ? d(e, {
|
|
126
|
+
...I,
|
|
127
|
+
ref: fe,
|
|
128
|
+
"aria-describedby": pe(e.props?.["aria-describedby"] ?? I["aria-describedby"]),
|
|
129
|
+
"data-state": W.value,
|
|
130
|
+
onPointermove: se,
|
|
131
|
+
onPointerleave: ce,
|
|
132
|
+
onPointerdown: le,
|
|
133
|
+
onFocusin: ue,
|
|
134
|
+
onFocusout: Q,
|
|
135
|
+
onClick: de
|
|
136
|
+
}, !0) : m("");
|
|
137
|
+
}
|
|
138
|
+
return C(() => {
|
|
139
|
+
M([P, R], ([e, t], n, r) => {
|
|
140
|
+
if (!e || !t) return;
|
|
141
|
+
let i = (e) => {
|
|
142
|
+
e.target instanceof Node && e.target.contains(t) && q();
|
|
143
|
+
};
|
|
144
|
+
window.addEventListener("scroll", i, {
|
|
145
|
+
capture: !0,
|
|
146
|
+
passive: !0
|
|
147
|
+
}), r(() => window.removeEventListener("scroll", i, { capture: !0 }));
|
|
148
|
+
}, { immediate: !0 });
|
|
149
|
+
}), S(() => document.removeEventListener("pointerup", Z)), (e, t) => (w(), h(l, null, [(w(), p(ne(he()))), (w(), p(ee, { to: "body" }, [U() ? (w(), h("div", {
|
|
150
|
+
key: 0,
|
|
151
|
+
id: E(L),
|
|
152
|
+
ref_key: "tooltipBubble",
|
|
153
|
+
ref: z,
|
|
154
|
+
role: "tooltip",
|
|
155
|
+
"data-state": E(W),
|
|
156
|
+
style: x(oe.value),
|
|
157
|
+
class: b(X.value.base({ class: [_.ui?.base, y.class] }))
|
|
158
|
+
}, [te(e.$slots, "content", {}, () => [g(T(_.content), 1)])], 14, N)) : m("", !0)]))], 64));
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
export { P as default };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { tv as e } from "../../shared/utils/tv.js";
|
|
2
|
+
// src/elements/tooltip/tooltip.theme.ts
|
|
3
|
+
var t = e({
|
|
4
|
+
slots: {
|
|
5
|
+
base: "z-10 w-max rounded-lg text-left text-sm/[1.45] font-normal whitespace-normal shadow-lg",
|
|
6
|
+
trigger: "cursor-pointer underline decoration-dotted outline-none"
|
|
7
|
+
},
|
|
8
|
+
variants: {
|
|
9
|
+
gutterSize: {
|
|
10
|
+
sm: "",
|
|
11
|
+
md: "",
|
|
12
|
+
lg: ""
|
|
13
|
+
},
|
|
14
|
+
compact: {
|
|
15
|
+
true: { base: "px-2 py-0.5 light:bg-neutral-800 light:text-white dark:bg-stone-400 dark:text-stone-950" },
|
|
16
|
+
false: { base: "border border-line bg-widget" }
|
|
17
|
+
},
|
|
18
|
+
open: {
|
|
19
|
+
true: { trigger: "decoration-muted" },
|
|
20
|
+
false: { trigger: "decoration-transparent" }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
compoundVariants: [
|
|
24
|
+
{
|
|
25
|
+
compact: !1,
|
|
26
|
+
gutterSize: "sm",
|
|
27
|
+
class: { base: "px-3 py-2" }
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
compact: !1,
|
|
31
|
+
gutterSize: "md",
|
|
32
|
+
class: { base: "px-4 py-3" }
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
compact: !1,
|
|
36
|
+
gutterSize: "lg",
|
|
37
|
+
class: { base: "px-4.5 py-3.5" }
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
gutterSize: "md",
|
|
42
|
+
compact: !1,
|
|
43
|
+
open: !1
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export { t as tooltipTheme };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { computed as e, onBeforeUnmount as t, onMounted as n, shallowRef as r, toValue as i, watch as a } from "vue";
|
|
2
|
+
// src/elements/tooltip/useTooltipOpenState.ts
|
|
3
|
+
var o = "kuina:tooltip-open", s = 300, c = 400;
|
|
4
|
+
function l(l, u) {
|
|
5
|
+
let d = Symbol("tooltip"), f = r(!1), p = !0, m = !1, h, g, _, v = e(() => l.value ? f.value ? "delayed-open" : "instant-open" : "closed");
|
|
6
|
+
function y(e) {
|
|
7
|
+
clearTimeout(_), m = e && i(u.preventUnintentionalClickToClose), m && (_ = setTimeout(() => {
|
|
8
|
+
m = !1;
|
|
9
|
+
}, c));
|
|
10
|
+
}
|
|
11
|
+
function b(e) {
|
|
12
|
+
clearTimeout(g), e ? p = !1 : g = setTimeout(() => {
|
|
13
|
+
p = !0;
|
|
14
|
+
}, s);
|
|
15
|
+
}
|
|
16
|
+
function x(e) {
|
|
17
|
+
e !== l.value && (b(e), y(e), e && document.dispatchEvent(new CustomEvent(o, { detail: d })), l.value = e);
|
|
18
|
+
}
|
|
19
|
+
function S() {
|
|
20
|
+
clearTimeout(h), h = void 0;
|
|
21
|
+
}
|
|
22
|
+
function C() {
|
|
23
|
+
S(), i(u.hasContent) && (f.value = !1, x(!0));
|
|
24
|
+
}
|
|
25
|
+
function w() {
|
|
26
|
+
S(), i(u.hasContent) && (h = setTimeout(() => {
|
|
27
|
+
h = void 0, f.value = !0, x(!0);
|
|
28
|
+
}, i(u.openDelay)));
|
|
29
|
+
}
|
|
30
|
+
function T() {
|
|
31
|
+
p ? w() : C();
|
|
32
|
+
}
|
|
33
|
+
function E() {
|
|
34
|
+
S(), x(!1);
|
|
35
|
+
}
|
|
36
|
+
function D() {
|
|
37
|
+
m || E();
|
|
38
|
+
}
|
|
39
|
+
function O(e) {
|
|
40
|
+
e instanceof CustomEvent && e.detail !== d && E();
|
|
41
|
+
}
|
|
42
|
+
return n(() => {
|
|
43
|
+
a(l, (e, t, n) => {
|
|
44
|
+
e && (document.addEventListener(o, O), n(() => document.removeEventListener(o, O)));
|
|
45
|
+
}, { immediate: !0 });
|
|
46
|
+
}), t(() => {
|
|
47
|
+
S(), clearTimeout(g), clearTimeout(_);
|
|
48
|
+
}), {
|
|
49
|
+
tooltipState: v,
|
|
50
|
+
openTooltipNow: C,
|
|
51
|
+
openTooltipOnPointerEnter: T,
|
|
52
|
+
cancelPendingOpen: S,
|
|
53
|
+
closeTooltip: E,
|
|
54
|
+
closeTooltipOnTriggerPress: D
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export { l as useTooltipOpenState };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export { KPagination } from './blocks/pagination';
|
|
2
|
+
export type { PaginationProps } from './blocks/pagination';
|
|
3
|
+
export { KTable } from './blocks/table';
|
|
4
|
+
export type { TableCellClickPayload, TableCellSlotProps, TableExpandedSlotProps, TableFooterSlotProps, TableHeaderSlotProps, TableProps, TableReorderPayload, TableRowPreviewSlotProps, TableSlots, } from './blocks/table';
|
|
1
5
|
export { KAlert } from './components/alert';
|
|
2
6
|
export type { AlertProps } from './components/alert';
|
|
3
7
|
export { KAvatarGroup } from './components/avatar-group';
|
|
@@ -24,10 +28,14 @@ export { KCheckbox } from './elements/checkbox';
|
|
|
24
28
|
export type { CheckboxProps } from './elements/checkbox';
|
|
25
29
|
export { KCircularProgress } from './elements/circular-progress';
|
|
26
30
|
export type { CircularProgressProps } from './elements/circular-progress';
|
|
31
|
+
export { KInput } from './elements/input';
|
|
32
|
+
export type { InputProps, InputSlots } from './elements/input';
|
|
27
33
|
export { KLoadingDots } from './elements/loading-dots';
|
|
28
34
|
export type { LoadingDotsProps } from './elements/loading-dots';
|
|
29
35
|
export { KLoadingIndicator } from './elements/loading-indicator';
|
|
30
36
|
export type { LoadingIndicatorProps } from './elements/loading-indicator';
|
|
37
|
+
export { KPopover } from './elements/popover';
|
|
38
|
+
export type { PopoverContentSlotProps, PopoverProps, PopoverSlots } from './elements/popover';
|
|
31
39
|
export { KRadioGroup } from './elements/radio-group';
|
|
32
40
|
export type { RadioGroupOption, RadioGroupProps } from './elements/radio-group';
|
|
33
41
|
export { KSegmentedControl } from './elements/segmented-control';
|
|
@@ -39,9 +47,18 @@ export type { TextLinkProps } from './elements/text-link';
|
|
|
39
47
|
export { KTooltip } from './elements/tooltip';
|
|
40
48
|
export type { TooltipProps, TooltipSlots } from './elements/tooltip';
|
|
41
49
|
export { useMask } from './shared/composables/useMask';
|
|
50
|
+
export { useRowSelection } from './shared/composables/useRowSelection';
|
|
51
|
+
export type { RowSelectionOptions, RowSelectionState } from './shared/composables/useRowSelection';
|
|
42
52
|
export { useShortcuts } from './shared/composables/useShortcuts';
|
|
43
53
|
export type { ShortcutListenerOptions } from './shared/composables/useShortcuts';
|
|
54
|
+
export { useTableRows } from './shared/composables/useTableRows';
|
|
55
|
+
export type { TableRowsOptions } from './shared/composables/useTableRows';
|
|
44
56
|
export type { KeyCombination, ShortcutBinding, ShortcutContext, ShortcutDefinition, ShortcutDefinitions, ShortcutGuard, ShortcutHandler, ShortcutModifierName, ShortcutOptions, } from './shared/types/shortcut';
|
|
45
57
|
export type { DateOrDateRange, Weekday } from './shared/types/calendar';
|
|
58
|
+
export type { FloatingAnchor, FloatingPoint, VirtualFloatingAnchor } from './shared/types/floating-position';
|
|
46
59
|
export type { MaskOptions, MaskResult, MaskSettings, MaskToken, MaskTokens } from './shared/types/mask';
|
|
60
|
+
export type { BuiltInTableColumnTypeName, TableAggregate, TableCellAlign, TableColumn, TableColumnFilters, TableColumnPinning, TableColumnType, TableColumnTypes, TableFooter, TableFormatOptions, TableRowKey, TableRowColor, TableRowKeyReader, TableSort, TableSortDirection, TableSortEntry, TableValueContext, } from './shared/types/table';
|
|
61
|
+
export type { ValuePath } from './shared/types/value-path';
|
|
47
62
|
export { createMask } from './shared/utils/createMask';
|
|
63
|
+
export { defineTableColumns } from './shared/utils/tableColumns';
|
|
64
|
+
export { defineTableColumnTypes } from './shared/utils/tableColumnTypes';
|
package/dist/index.js
CHANGED
|
@@ -1 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
import e from "./blocks/pagination/Pagination.js";
|
|
2
|
+
import t from "./blocks/table/Table.js";
|
|
3
|
+
import n from "./components/alert/Alert.js";
|
|
4
|
+
import r from "./components/avatar-group/AvatarGroup.js";
|
|
5
|
+
import i from "./components/date-picker/DatePicker.js";
|
|
6
|
+
import a from "./components/date-picker/DatePickerField.js";
|
|
7
|
+
import o from "./components/date-picker/DateRangePicker.js";
|
|
8
|
+
import s from "./components/date-picker/DateRangePickerField.js";
|
|
9
|
+
import { extractMenuShortcuts as c } from "./components/menu/menuEntries.js";
|
|
10
|
+
import l from "./components/menu/Menu.js";
|
|
11
|
+
import u from "./components/select/Select.js";
|
|
12
|
+
import d from "./components/select/SelectField.js";
|
|
13
|
+
import f from "./components/slider/RangeSlider.js";
|
|
14
|
+
import p from "./components/slider/Slider.js";
|
|
15
|
+
import m from "./components/text-field/TextField.js";
|
|
16
|
+
import h from "./components/textarea/Textarea.js";
|
|
17
|
+
import g from "./elements/avatar/Avatar.js";
|
|
18
|
+
import _ from "./elements/badge/Badge.js";
|
|
19
|
+
import v from "./elements/button/Button.js";
|
|
20
|
+
import y from "./elements/checkbox/Checkbox.js";
|
|
21
|
+
import b from "./elements/circular-progress/CircularProgress.js";
|
|
22
|
+
import x from "./elements/input/Input.js";
|
|
23
|
+
import S from "./elements/loading-dots/LoadingDots.js";
|
|
24
|
+
import C from "./elements/loading-indicator/LoadingIndicator.js";
|
|
25
|
+
import w from "./elements/popover/Popover.js";
|
|
26
|
+
import T from "./elements/radio-group/RadioGroup.js";
|
|
27
|
+
import E from "./elements/segmented-control/SegmentedControl.js";
|
|
28
|
+
import D from "./elements/switch/Switch.js";
|
|
29
|
+
import O from "./elements/text-link/TextLink.js";
|
|
30
|
+
import k from "./elements/tooltip/Tooltip.js";
|
|
31
|
+
import { useMask as A } from "./shared/composables/useMask.js";
|
|
32
|
+
import { useRowSelection as j } from "./shared/composables/useRowSelection.js";
|
|
33
|
+
import { useShortcuts as M } from "./shared/composables/useShortcuts.js";
|
|
34
|
+
import { useTableRows as N } from "./shared/composables/useTableRows.js";
|
|
35
|
+
import { createMask as P } from "./shared/utils/createMask.js";
|
|
36
|
+
import { defineTableColumns as F } from "./shared/utils/tableColumns.js";
|
|
37
|
+
import { defineTableColumnTypes as I } from "./shared/utils/tableColumnTypes.js";
|
|
38
|
+
export { n as KAlert, g as KAvatar, r as KAvatarGroup, _ as KBadge, v as KButton, y as KCheckbox, b as KCircularProgress, i as KDatePicker, a as KDatePickerField, o as KDateRangePicker, s as KDateRangePickerField, x as KInput, S as KLoadingDots, C as KLoadingIndicator, l as KMenu, e as KPagination, w as KPopover, T as KRadioGroup, f as KRangeSlider, E as KSegmentedControl, u as KSelect, d as KSelectField, p as KSlider, D as KSwitch, t as KTable, m as KTextField, O as KTextLink, h as KTextarea, k as KTooltip, P as createMask, I as defineTableColumnTypes, F as defineTableColumns, c as extractMenuShortcuts, A as useMask, j as useRowSelection, M as useShortcuts, N as useTableRows };
|
package/dist/nuxt.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import a from "@tailwindcss/vite";
|
|
1
|
+
import { addComponent as e, addImports as t, addVitePlugin as n, defineNuxtModule as r } from "@nuxt/kit";
|
|
2
|
+
import i from "@tailwindcss/vite";
|
|
4
3
|
// src/nuxt.ts
|
|
5
|
-
var
|
|
4
|
+
var a = r({
|
|
6
5
|
meta: {
|
|
7
6
|
name: "@kuina-ui/vue",
|
|
8
7
|
configKey: "kuina",
|
|
9
8
|
compatibility: { nuxt: ">=4.0.0" }
|
|
10
9
|
},
|
|
11
|
-
setup() {
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
for (let
|
|
15
|
-
name:
|
|
16
|
-
export:
|
|
10
|
+
async setup() {
|
|
11
|
+
n(i());
|
|
12
|
+
let r = await import("./index.js"), a = Object.keys(r).filter((e) => e.startsWith("K"));
|
|
13
|
+
for (let t of a) e({
|
|
14
|
+
name: t,
|
|
15
|
+
export: t,
|
|
17
16
|
filePath: "@kuina-ui/vue"
|
|
18
17
|
});
|
|
19
|
-
let o = Object.keys(
|
|
20
|
-
|
|
18
|
+
let o = Object.keys(r).filter((e) => /^(use|define)[A-Z]/.test(e));
|
|
19
|
+
t(o.map((e) => ({
|
|
21
20
|
name: e,
|
|
22
21
|
from: "@kuina-ui/vue"
|
|
23
22
|
})));
|
|
24
23
|
}
|
|
25
24
|
});
|
|
26
|
-
export {
|
|
25
|
+
export { a as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { isApplePlatform as e } from "../utils/isApplePlatform.js";
|
|
2
|
+
import { onMounted as t, readonly as n, shallowRef as r } from "vue";
|
|
3
|
+
// src/shared/composables/useApplePlatform.ts
|
|
4
|
+
function i() {
|
|
5
|
+
let i = r(!1);
|
|
6
|
+
return t(() => {
|
|
7
|
+
i.value = e();
|
|
8
|
+
}), n(i);
|
|
9
|
+
}
|
|
10
|
+
export { i as useApplePlatform };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createDateFormatters as e } from "../utils/createDateFormatters.js";
|
|
2
|
+
import { computed as t } from "vue";
|
|
3
|
+
// src/shared/composables/useCalendarLabels.ts
|
|
4
|
+
function n(n) {
|
|
5
|
+
let r = t(() => e(n.locale));
|
|
6
|
+
return {
|
|
7
|
+
dateFormatters: r,
|
|
8
|
+
resolvedWeekdayLabel: t(() => n.weekdayLabel ?? r.value.formatWeekday),
|
|
9
|
+
resolvedMonthLabel: t(() => n.monthLabel ?? r.value.formatMonth),
|
|
10
|
+
resolvedDayLabel: t(() => n.dayLabel ?? r.value.formatFullDate)
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export { n as useCalendarLabels };
|