@acoyfellow/kumo-vue 0.0.1
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/kumo.manifest.json +1140 -0
- package/package/button.css +1 -0
- package/package/components/autocomplete.content.d.ts +4 -0
- package/package/components/autocomplete.content.js +21 -0
- package/package/components/autocomplete.d.ts +8 -0
- package/package/components/autocomplete.input-group.d.ts +4 -0
- package/package/components/autocomplete.input-group.js +21 -0
- package/package/components/autocomplete.item.d.ts +4 -0
- package/package/components/autocomplete.item.js +21 -0
- package/package/components/autocomplete.js +102 -0
- package/package/components/autocomplete.list.d.ts +4 -0
- package/package/components/autocomplete.list.js +21 -0
- package/package/components/badge.d.ts +8 -0
- package/package/components/badge.js +57 -0
- package/package/components/banner.d.ts +8 -0
- package/package/components/banner.js +71 -0
- package/package/components/breadcrumbs.current.d.ts +4 -0
- package/package/components/breadcrumbs.current.js +21 -0
- package/package/components/breadcrumbs.d.ts +8 -0
- package/package/components/breadcrumbs.js +86 -0
- package/package/components/breadcrumbs.link.d.ts +4 -0
- package/package/components/breadcrumbs.link.js +21 -0
- package/package/components/breadcrumbs.separator.d.ts +4 -0
- package/package/components/breadcrumbs.separator.js +21 -0
- package/package/components/button.d.ts +8 -0
- package/package/components/button.js +93 -0
- package/package/components/checkbox.d.ts +8 -0
- package/package/components/checkbox.js +77 -0
- package/package/components/clipboard-text.d.ts +8 -0
- package/package/components/clipboard-text.js +54 -0
- package/package/components/cloudflare-logo.d.ts +8 -0
- package/package/components/cloudflare-logo.js +70 -0
- package/package/components/code.d.ts +8 -0
- package/package/components/code.js +56 -0
- package/package/components/combobox.content.d.ts +4 -0
- package/package/components/combobox.content.js +21 -0
- package/package/components/combobox.d.ts +8 -0
- package/package/components/combobox.item.d.ts +4 -0
- package/package/components/combobox.item.js +21 -0
- package/package/components/combobox.js +101 -0
- package/package/components/combobox.list.d.ts +4 -0
- package/package/components/combobox.list.js +21 -0
- package/package/components/combobox.trigger-input.d.ts +4 -0
- package/package/components/combobox.trigger-input.js +21 -0
- package/package/components/command-palette.d.ts +8 -0
- package/package/components/command-palette.highlighted-text.d.ts +4 -0
- package/package/components/command-palette.highlighted-text.js +21 -0
- package/package/components/command-palette.input.d.ts +4 -0
- package/package/components/command-palette.input.js +21 -0
- package/package/components/command-palette.item.d.ts +4 -0
- package/package/components/command-palette.item.js +21 -0
- package/package/components/command-palette.js +126 -0
- package/package/components/command-palette.list.d.ts +4 -0
- package/package/components/command-palette.list.js +21 -0
- package/package/components/command-palette.root.d.ts +4 -0
- package/package/components/command-palette.root.js +21 -0
- package/package/components/date-picker.d.ts +8 -0
- package/package/components/date-picker.js +119 -0
- package/package/components/date-range-picker.d.ts +8 -0
- package/package/components/date-range-picker.js +154 -0
- package/package/components/dialog.close.d.ts +4 -0
- package/package/components/dialog.close.js +21 -0
- package/package/components/dialog.d.ts +8 -0
- package/package/components/dialog.description.d.ts +4 -0
- package/package/components/dialog.description.js +21 -0
- package/package/components/dialog.js +107 -0
- package/package/components/dialog.root.d.ts +4 -0
- package/package/components/dialog.root.js +21 -0
- package/package/components/dialog.title.d.ts +4 -0
- package/package/components/dialog.title.js +21 -0
- package/package/components/dialog.trigger.d.ts +4 -0
- package/package/components/dialog.trigger.js +21 -0
- package/package/components/dropdown-menu.content.d.ts +4 -0
- package/package/components/dropdown-menu.content.js +21 -0
- package/package/components/dropdown-menu.d.ts +8 -0
- package/package/components/dropdown-menu.item.d.ts +4 -0
- package/package/components/dropdown-menu.item.js +21 -0
- package/package/components/dropdown-menu.js +172 -0
- package/package/components/dropdown-menu.sub-content.d.ts +4 -0
- package/package/components/dropdown-menu.sub-content.js +21 -0
- package/package/components/dropdown-menu.sub-trigger.d.ts +4 -0
- package/package/components/dropdown-menu.sub-trigger.js +21 -0
- package/package/components/dropdown-menu.sub.d.ts +4 -0
- package/package/components/dropdown-menu.sub.js +21 -0
- package/package/components/dropdown-menu.trigger.d.ts +4 -0
- package/package/components/dropdown-menu.trigger.js +21 -0
- package/package/components/empty.d.ts +8 -0
- package/package/components/empty.js +68 -0
- package/package/components/field.d.ts +7 -0
- package/package/components/field.js +2 -0
- package/package/components/field.legacy.js +49 -0
- package/package/components/field.native-input.d.ts +4 -0
- package/package/components/field.native-input.js +21 -0
- package/package/components/field.semantic.js +43 -0
- package/package/components/grid-item.d.ts +8 -0
- package/package/components/grid-item.js +52 -0
- package/package/components/grid.d.ts +8 -0
- package/package/components/grid.js +58 -0
- package/package/components/input-area.d.ts +8 -0
- package/package/components/input-area.js +70 -0
- package/package/components/input-group.addon.d.ts +4 -0
- package/package/components/input-group.addon.js +21 -0
- package/package/components/input-group.button.d.ts +4 -0
- package/package/components/input-group.button.js +21 -0
- package/package/components/input-group.d.ts +8 -0
- package/package/components/input-group.input.d.ts +4 -0
- package/package/components/input-group.input.js +21 -0
- package/package/components/input-group.js +96 -0
- package/package/components/input-group.suffix.d.ts +4 -0
- package/package/components/input-group.suffix.js +21 -0
- package/package/components/input.d.ts +8 -0
- package/package/components/input.js +70 -0
- package/package/components/label.d.ts +8 -0
- package/package/components/label.js +56 -0
- package/package/components/layer-card.d.ts +8 -0
- package/package/components/layer-card.js +60 -0
- package/package/components/layer-card.primary.d.ts +4 -0
- package/package/components/layer-card.primary.js +21 -0
- package/package/components/layer-card.secondary.d.ts +4 -0
- package/package/components/layer-card.secondary.js +21 -0
- package/package/components/link.d.ts +8 -0
- package/package/components/link.js +58 -0
- package/package/components/loader.d.ts +8 -0
- package/package/components/loader.js +67 -0
- package/package/components/menu-bar.d.ts +8 -0
- package/package/components/menu-bar.js +76 -0
- package/package/components/meter.d.ts +8 -0
- package/package/components/meter.js +97 -0
- package/package/components/pagination.d.ts +8 -0
- package/package/components/pagination.js +157 -0
- package/package/components/popover.close.d.ts +4 -0
- package/package/components/popover.close.js +21 -0
- package/package/components/popover.content.d.ts +4 -0
- package/package/components/popover.content.js +21 -0
- package/package/components/popover.d.ts +8 -0
- package/package/components/popover.description.d.ts +4 -0
- package/package/components/popover.description.js +21 -0
- package/package/components/popover.js +138 -0
- package/package/components/popover.title.d.ts +4 -0
- package/package/components/popover.title.js +21 -0
- package/package/components/popover.trigger.d.ts +4 -0
- package/package/components/popover.trigger.js +21 -0
- package/package/components/radio.d.ts +8 -0
- package/package/components/radio.js +91 -0
- package/package/components/select.d.ts +8 -0
- package/package/components/select.js +200 -0
- package/package/components/select.option.d.ts +4 -0
- package/package/components/select.option.js +21 -0
- package/package/components/sensitive-input.d.ts +8 -0
- package/package/components/sensitive-input.js +82 -0
- package/package/components/sidebar.collapsible-content.d.ts +4 -0
- package/package/components/sidebar.collapsible-content.js +21 -0
- package/package/components/sidebar.collapsible.d.ts +4 -0
- package/package/components/sidebar.collapsible.js +21 -0
- package/package/components/sidebar.content.d.ts +4 -0
- package/package/components/sidebar.content.js +21 -0
- package/package/components/sidebar.d.ts +8 -0
- package/package/components/sidebar.footer.d.ts +4 -0
- package/package/components/sidebar.footer.js +21 -0
- package/package/components/sidebar.group-label.d.ts +4 -0
- package/package/components/sidebar.group-label.js +21 -0
- package/package/components/sidebar.group.d.ts +4 -0
- package/package/components/sidebar.group.js +21 -0
- package/package/components/sidebar.header.d.ts +4 -0
- package/package/components/sidebar.header.js +21 -0
- package/package/components/sidebar.js +140 -0
- package/package/components/sidebar.menu-button.d.ts +4 -0
- package/package/components/sidebar.menu-button.js +21 -0
- package/package/components/sidebar.menu.d.ts +4 -0
- package/package/components/sidebar.menu.js +21 -0
- package/package/components/sidebar.provider.d.ts +4 -0
- package/package/components/sidebar.provider.js +21 -0
- package/package/components/sidebar.resize-handle.d.ts +4 -0
- package/package/components/sidebar.resize-handle.js +21 -0
- package/package/components/sidebar.sliding-view.d.ts +4 -0
- package/package/components/sidebar.sliding-view.js +21 -0
- package/package/components/sidebar.sliding-views.d.ts +4 -0
- package/package/components/sidebar.sliding-views.js +21 -0
- package/package/components/sidebar.trigger.d.ts +4 -0
- package/package/components/sidebar.trigger.js +21 -0
- package/package/components/surface.d.ts +8 -0
- package/package/components/surface.js +60 -0
- package/package/components/switch.d.ts +8 -0
- package/package/components/switch.js +78 -0
- package/package/components/table-of-contents.d.ts +8 -0
- package/package/components/table-of-contents.group.d.ts +4 -0
- package/package/components/table-of-contents.group.js +21 -0
- package/package/components/table-of-contents.item.d.ts +4 -0
- package/package/components/table-of-contents.item.js +21 -0
- package/package/components/table-of-contents.js +78 -0
- package/package/components/table-of-contents.list.d.ts +4 -0
- package/package/components/table-of-contents.list.js +21 -0
- package/package/components/table-of-contents.title.d.ts +4 -0
- package/package/components/table-of-contents.title.js +21 -0
- package/package/components/table.body.d.ts +4 -0
- package/package/components/table.body.js +21 -0
- package/package/components/table.cell.d.ts +4 -0
- package/package/components/table.cell.js +21 -0
- package/package/components/table.d.ts +8 -0
- package/package/components/table.head.d.ts +4 -0
- package/package/components/table.head.js +21 -0
- package/package/components/table.header.d.ts +4 -0
- package/package/components/table.header.js +21 -0
- package/package/components/table.js +66 -0
- package/package/components/table.row.d.ts +4 -0
- package/package/components/table.row.js +21 -0
- package/package/components/tabs.d.ts +8 -0
- package/package/components/tabs.js +98 -0
- package/package/components/text.d.ts +8 -0
- package/package/components/text.js +64 -0
- package/package/components/toasty.d.ts +8 -0
- package/package/components/toasty.js +101 -0
- package/package/dialog.css +1 -0
- package/package/form.css +1 -0
- package/package/index.d.ts +119 -0
- package/package/index.js +119 -0
- package/package/native-control.css +1 -0
- package/package/navigation.css +1 -0
- package/package/popover.css +1 -0
- package/package/selection-command-date.css +1 -0
- package/package/styles.css +23 -0
- package/package/tokens.css +1 -0
- package/package.json +441 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
const __sfc__ = /*@__PURE__*/ _defineComponent({
|
|
3
|
+
...{ inheritAttrs: false },
|
|
4
|
+
__name: 'command-palette.highlighted-text',
|
|
5
|
+
setup(__props, { expose: __expose }) {
|
|
6
|
+
__expose();
|
|
7
|
+
const __returned__ = {};
|
|
8
|
+
Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
|
|
9
|
+
return __returned__;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
import { renderSlot as _renderSlot, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
13
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14
|
+
return (_openBlock(), _createElementBlock("span", _mergeProps(_ctx.$attrs, { "data-kumo-part": "HighlightedText" }), [
|
|
15
|
+
_renderSlot(_ctx.$slots, "default")
|
|
16
|
+
], 16 /* FULL_PROPS */));
|
|
17
|
+
}
|
|
18
|
+
__sfc__.render = render;
|
|
19
|
+
__sfc__.name = "KumoCommandPaletteHighlightedText";
|
|
20
|
+
__sfc__.__file = "components/command-palette.highlighted-text.vue";
|
|
21
|
+
export default __sfc__;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
const __sfc__ = /*@__PURE__*/ _defineComponent({
|
|
3
|
+
...{ inheritAttrs: false },
|
|
4
|
+
__name: 'command-palette.input',
|
|
5
|
+
setup(__props, { expose: __expose }) {
|
|
6
|
+
__expose();
|
|
7
|
+
const __returned__ = {};
|
|
8
|
+
Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
|
|
9
|
+
return __returned__;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
import { renderSlot as _renderSlot, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
13
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14
|
+
return (_openBlock(), _createElementBlock("span", _mergeProps(_ctx.$attrs, { "data-kumo-part": "Input" }), [
|
|
15
|
+
_renderSlot(_ctx.$slots, "default")
|
|
16
|
+
], 16 /* FULL_PROPS */));
|
|
17
|
+
}
|
|
18
|
+
__sfc__.render = render;
|
|
19
|
+
__sfc__.name = "KumoCommandPaletteInput";
|
|
20
|
+
__sfc__.__file = "components/command-palette.input.vue";
|
|
21
|
+
export default __sfc__;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
const __sfc__ = /*@__PURE__*/ _defineComponent({
|
|
3
|
+
...{ inheritAttrs: false },
|
|
4
|
+
__name: 'command-palette.item',
|
|
5
|
+
setup(__props, { expose: __expose }) {
|
|
6
|
+
__expose();
|
|
7
|
+
const __returned__ = {};
|
|
8
|
+
Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
|
|
9
|
+
return __returned__;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
import { renderSlot as _renderSlot, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
13
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14
|
+
return (_openBlock(), _createElementBlock("span", _mergeProps(_ctx.$attrs, { "data-kumo-part": "Item" }), [
|
|
15
|
+
_renderSlot(_ctx.$slots, "default")
|
|
16
|
+
], 16 /* FULL_PROPS */));
|
|
17
|
+
}
|
|
18
|
+
__sfc__.render = render;
|
|
19
|
+
__sfc__.name = "KumoCommandPaletteItem";
|
|
20
|
+
__sfc__.__file = "components/command-palette.item.vue";
|
|
21
|
+
export default __sfc__;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
import { computed, nextTick, onMounted, ref, useAttrs, useSlots } from 'vue';
|
|
3
|
+
export const modelDigest = "4aabec222bec5b00f25388a2bb017b36c91349e55fa3ba6cb97fdc3d0afee0c0";
|
|
4
|
+
export const contentBindingDigest = "a6655036dbbdb2cd56a9e62bf5f2f8f75bb6a7bb4d3c5fbf41726fd8666277cd";
|
|
5
|
+
const __sfc__ = /*@__PURE__*/ _defineComponent({
|
|
6
|
+
...{ inheritAttrs: false },
|
|
7
|
+
__name: 'command-palette',
|
|
8
|
+
props: {
|
|
9
|
+
compound: { type: null, required: false },
|
|
10
|
+
Dialog: { type: null, required: false },
|
|
11
|
+
Input: { type: null, required: false },
|
|
12
|
+
Panel: { type: String, required: false },
|
|
13
|
+
Root: { type: String, required: false },
|
|
14
|
+
onHighlightChange: { type: null, required: false },
|
|
15
|
+
onValueChange: { type: null, required: false },
|
|
16
|
+
onOpenChange: { type: null, required: false },
|
|
17
|
+
highlights: { type: null, required: false },
|
|
18
|
+
text: { type: null, required: false },
|
|
19
|
+
fixture: { type: null, required: false },
|
|
20
|
+
semanticContent: { type: null, required: false }
|
|
21
|
+
},
|
|
22
|
+
setup(__props, { expose: __expose }) {
|
|
23
|
+
__expose();
|
|
24
|
+
const props = __props;
|
|
25
|
+
const paletteFixture = computed(() => props.fixture);
|
|
26
|
+
const fixtureChildren = (node) => node?.children ?? [];
|
|
27
|
+
const fixturePart = (node, name) => fixtureChildren(node).find(child => child.export === name);
|
|
28
|
+
const partText = (node) => node ? String(node.text ?? '') + fixtureChildren(node).map(partText).join('') : '';
|
|
29
|
+
const highlightedText = computed(() => paletteFixture.value?.export === '.HighlightedText');
|
|
30
|
+
const highlightSegments = computed(() => {
|
|
31
|
+
const text = String(paletteFixture.value?.props?.text ?? '');
|
|
32
|
+
const ranges = (paletteFixture.value?.props?.highlights ?? []);
|
|
33
|
+
const segments = [];
|
|
34
|
+
let cursor = 0;
|
|
35
|
+
for (const [start, end] of ranges.toSorted((a, b) => a[0] - b[0])) {
|
|
36
|
+
if (start > cursor)
|
|
37
|
+
segments.push({ text: text.slice(cursor, start), marked: false });
|
|
38
|
+
segments.push({ text: text.slice(start, end + 1), marked: true });
|
|
39
|
+
cursor = Math.max(cursor, end + 1);
|
|
40
|
+
}
|
|
41
|
+
if (cursor < text.length)
|
|
42
|
+
segments.push({ text: text.slice(cursor), marked: false });
|
|
43
|
+
return segments;
|
|
44
|
+
});
|
|
45
|
+
const inputPart = computed(() => fixturePart(paletteFixture.value, '.Input'));
|
|
46
|
+
const listPart = computed(() => fixturePart(paletteFixture.value, '.List'));
|
|
47
|
+
const items = computed(() => fixtureChildren(listPart.value).filter(item => item.export === '.Item'));
|
|
48
|
+
const inputRef = ref(null);
|
|
49
|
+
const open = ref(Boolean(paletteFixture.value?.props?.open));
|
|
50
|
+
const value = ref('');
|
|
51
|
+
const highlightedIndex = ref(items.value.length ? 0 : -1);
|
|
52
|
+
onMounted(() => { if (!highlightedText.value && highlightedIndex.value >= 0)
|
|
53
|
+
props.onHighlightChange?.(String(items.value[highlightedIndex.value]?.props?.value ?? partText(items.value[highlightedIndex.value]))); });
|
|
54
|
+
function handleInput(event) { value.value = event.currentTarget.value; props.onValueChange?.(value.value); }
|
|
55
|
+
function handlePaletteKey(event) {
|
|
56
|
+
if (event.key === 'ArrowDown' && items.value.length) {
|
|
57
|
+
event.preventDefault();
|
|
58
|
+
highlightedIndex.value = Math.min(highlightedIndex.value + 1, items.value.length - 1);
|
|
59
|
+
props.onHighlightChange?.(String(items.value[highlightedIndex.value]?.props?.value ?? partText(items.value[highlightedIndex.value])));
|
|
60
|
+
}
|
|
61
|
+
else if (event.key === 'Escape') {
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
open.value = false;
|
|
64
|
+
props.onOpenChange?.(false);
|
|
65
|
+
inputRef.value?.blur();
|
|
66
|
+
nextTick(() => document.activeElement?.blur?.());
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const slots = useSlots();
|
|
70
|
+
const styles = {};
|
|
71
|
+
const normalizeSlotContent = (value) => Array.isArray(value) ? value.map(normalizeSlotContent).join('') : value == null || typeof value === 'boolean' ? '' : typeof value === 'string' || typeof value === 'number' ? String(value) : normalizeSlotContent(value.children);
|
|
72
|
+
const renderContent = () => props.semanticContent ?? normalizeSlotContent(slots.default?.());
|
|
73
|
+
const fixture = computed(() => props.fixture);
|
|
74
|
+
const semanticValues = Object.assign({}, useAttrs(), props);
|
|
75
|
+
const semanticEqual = (left, right) => JSON.stringify(left) === JSON.stringify(right);
|
|
76
|
+
const fixtureText = (value) => value && typeof value === 'object' ? String(typeof value.text === 'string' ? value.text : '') + (Array.isArray(value.children) ? value.children.map(fixtureText).join('') : '') : '';
|
|
77
|
+
const __returned__ = { modelDigest, contentBindingDigest, props, paletteFixture, fixtureChildren, fixturePart, partText, highlightedText, highlightSegments, inputPart, listPart, items, inputRef, open, value, highlightedIndex, handleInput, handlePaletteKey, slots, styles, normalizeSlotContent, renderContent, fixture, semanticValues, semanticEqual, fixtureText };
|
|
78
|
+
Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
|
|
79
|
+
return __returned__;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, mergeProps as _mergeProps } from "vue";
|
|
83
|
+
const _hoisted_1 = { key: 0 };
|
|
84
|
+
const _hoisted_2 = { key: 0 };
|
|
85
|
+
const _hoisted_3 = ["placeholder", "value"];
|
|
86
|
+
const _hoisted_4 = ["hidden"];
|
|
87
|
+
const _hoisted_5 = ["data-highlighted"];
|
|
88
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
89
|
+
return ($setup.highlightedText)
|
|
90
|
+
? (_openBlock(), _createElementBlock("span", _hoisted_1, [
|
|
91
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.highlightSegments, (segment, index) => {
|
|
92
|
+
return (_openBlock(), _createElementBlock(_Fragment, { key: index }, [
|
|
93
|
+
(segment.marked)
|
|
94
|
+
? (_openBlock(), _createElementBlock("mark", _hoisted_2, _toDisplayString(segment.text), 1 /* TEXT */))
|
|
95
|
+
: (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [
|
|
96
|
+
_createTextVNode(_toDisplayString(segment.text), 1 /* TEXT */)
|
|
97
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
98
|
+
], 64 /* STABLE_FRAGMENT */));
|
|
99
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
100
|
+
]))
|
|
101
|
+
: (_openBlock(), _createElementBlock("div", _mergeProps({ key: 1 }, _ctx.$attrs, { "data-kumo-component": "CommandPalette" }), [
|
|
102
|
+
_createElementVNode("input", {
|
|
103
|
+
ref: "inputRef",
|
|
104
|
+
placeholder: $setup.inputPart?.props?.placeholder,
|
|
105
|
+
value: $setup.value,
|
|
106
|
+
onInput: $setup.handleInput,
|
|
107
|
+
onKeydown: $setup.handlePaletteKey
|
|
108
|
+
}, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_3),
|
|
109
|
+
_createElementVNode("ul", {
|
|
110
|
+
hidden: !$setup.open
|
|
111
|
+
}, [
|
|
112
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.items, (item, index) => {
|
|
113
|
+
return (_openBlock(), _createElementBlock("li", {
|
|
114
|
+
key: String(item.props?.value ?? index),
|
|
115
|
+
"data-highlighted": index === $setup.highlightedIndex || undefined
|
|
116
|
+
}, _toDisplayString($setup.partText(item)), 9 /* TEXT, PROPS */, _hoisted_5));
|
|
117
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
118
|
+
], 8 /* PROPS */, _hoisted_4)
|
|
119
|
+
], 16 /* FULL_PROPS */));
|
|
120
|
+
}
|
|
121
|
+
__sfc__.render = render;
|
|
122
|
+
__sfc__.name = "KumoCommandPalette";
|
|
123
|
+
__sfc__.__file = "components/command-palette.vue";
|
|
124
|
+
export default __sfc__;
|
|
125
|
+
|
|
126
|
+
export { __sfc__ as CommandPalette }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
const __sfc__ = /*@__PURE__*/ _defineComponent({
|
|
3
|
+
...{ inheritAttrs: false },
|
|
4
|
+
__name: 'command-palette.list',
|
|
5
|
+
setup(__props, { expose: __expose }) {
|
|
6
|
+
__expose();
|
|
7
|
+
const __returned__ = {};
|
|
8
|
+
Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
|
|
9
|
+
return __returned__;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
import { renderSlot as _renderSlot, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
13
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14
|
+
return (_openBlock(), _createElementBlock("span", _mergeProps(_ctx.$attrs, { "data-kumo-part": "List" }), [
|
|
15
|
+
_renderSlot(_ctx.$slots, "default")
|
|
16
|
+
], 16 /* FULL_PROPS */));
|
|
17
|
+
}
|
|
18
|
+
__sfc__.render = render;
|
|
19
|
+
__sfc__.name = "KumoCommandPaletteList";
|
|
20
|
+
__sfc__.__file = "components/command-palette.list.vue";
|
|
21
|
+
export default __sfc__;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
const __sfc__ = /*@__PURE__*/ _defineComponent({
|
|
3
|
+
...{ inheritAttrs: false },
|
|
4
|
+
__name: 'command-palette.root',
|
|
5
|
+
setup(__props, { expose: __expose }) {
|
|
6
|
+
__expose();
|
|
7
|
+
const __returned__ = {};
|
|
8
|
+
Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
|
|
9
|
+
return __returned__;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
import { renderSlot as _renderSlot, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
13
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14
|
+
return (_openBlock(), _createElementBlock("span", _mergeProps(_ctx.$attrs, { "data-kumo-part": "Root" }), [
|
|
15
|
+
_renderSlot(_ctx.$slots, "default")
|
|
16
|
+
], 16 /* FULL_PROPS */));
|
|
17
|
+
}
|
|
18
|
+
__sfc__.render = render;
|
|
19
|
+
__sfc__.name = "KumoCommandPaletteRoot";
|
|
20
|
+
__sfc__.__file = "components/command-palette.root.vue";
|
|
21
|
+
export default __sfc__;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// @generated by src/kumo/emitters/vue/index.mjs; do not edit
|
|
2
|
+
import type { DefineComponent } from 'vue';
|
|
3
|
+
export interface DatePickerProps { [key: string]: unknown }
|
|
4
|
+
declare const component: DefineComponent<DatePickerProps>;
|
|
5
|
+
export default component;
|
|
6
|
+
export declare const modelDigest: "5f335d94261bdac9b04be13a3684f1d47504a43360cb208c4a84231a1d259fce";
|
|
7
|
+
|
|
8
|
+
export { component as DatePicker };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
import { computed, getCurrentInstance, ref, useAttrs, useSlots } from 'vue';
|
|
3
|
+
export const modelDigest = "5f335d94261bdac9b04be13a3684f1d47504a43360cb208c4a84231a1d259fce";
|
|
4
|
+
export const contentBindingDigest = "a6655036dbbdb2cd56a9e62bf5f2f8f75bb6a7bb4d3c5fbf41726fd8666277cd";
|
|
5
|
+
const __sfc__ = /*@__PURE__*/ _defineComponent({
|
|
6
|
+
...{ inheritAttrs: false },
|
|
7
|
+
__name: 'date-picker',
|
|
8
|
+
props: {
|
|
9
|
+
"aria-label": { type: String, required: false },
|
|
10
|
+
fromDate: { type: null, required: false },
|
|
11
|
+
mode: { type: null, required: false },
|
|
12
|
+
onChange: { type: null, required: false },
|
|
13
|
+
reactDayPickerProps: { type: null, required: false },
|
|
14
|
+
selected: { type: null, required: false },
|
|
15
|
+
toDate: { type: null, required: false },
|
|
16
|
+
ariaLabel: { type: String, required: false },
|
|
17
|
+
selectedDate: { type: String, required: false },
|
|
18
|
+
defaultMonthDate: { type: String, required: false },
|
|
19
|
+
disabledBeforeDate: { type: String, required: false },
|
|
20
|
+
disabledAfterDate: { type: String, required: false },
|
|
21
|
+
fixture: { type: null, required: false },
|
|
22
|
+
semanticContent: { type: null, required: false }
|
|
23
|
+
},
|
|
24
|
+
setup(__props, { expose: __expose }) {
|
|
25
|
+
__expose();
|
|
26
|
+
const props = __props;
|
|
27
|
+
const instance = getCurrentInstance();
|
|
28
|
+
const controlled = computed(() => Object.prototype.hasOwnProperty.call(instance?.vnode.props ?? {}, 'selectedDate'));
|
|
29
|
+
const internalSelectedDate = ref(props.selectedDate);
|
|
30
|
+
const selectedDate = computed(() => controlled.value ? props.selectedDate : internalSelectedDate.value);
|
|
31
|
+
const padDatePart = (value) => String(value).padStart(2, '0');
|
|
32
|
+
const isoDate = (date) => `${String(date.getUTCFullYear()).padStart(4, '0')}-${padDatePart(date.getUTCMonth() + 1)}-${padDatePart(date.getUTCDate())}`;
|
|
33
|
+
const parseDate = (value, fallback) => {
|
|
34
|
+
const match = typeof value === 'string' && /^([0-9]{4})-([0-9]{2})-([0-9]{2})$/.exec(value);
|
|
35
|
+
if (!match)
|
|
36
|
+
return new Date(fallback + 'T00:00:00.000Z');
|
|
37
|
+
const date = new Date(Date.UTC(Number(match[1]), Number(match[2]) - 1, Number(match[3])));
|
|
38
|
+
return Number.isNaN(date.getTime()) ? new Date(fallback + 'T00:00:00.000Z') : date;
|
|
39
|
+
};
|
|
40
|
+
const initialMonth = parseDate(props.defaultMonthDate, '2025-01-01');
|
|
41
|
+
const monthDate = ref(new Date(Date.UTC(initialMonth.getUTCFullYear(), initialMonth.getUTCMonth(), 1)));
|
|
42
|
+
const calendarDays = computed(() => {
|
|
43
|
+
const first = monthDate.value;
|
|
44
|
+
const start = new Date(Date.UTC(first.getUTCFullYear(), first.getUTCMonth(), 1 - first.getUTCDay()));
|
|
45
|
+
const daysInMonth = new Date(Date.UTC(first.getUTCFullYear(), first.getUTCMonth() + 1, 0)).getUTCDate();
|
|
46
|
+
const count = Math.ceil((first.getUTCDay() + daysInMonth) / 7) * 7;
|
|
47
|
+
return Array.from({ length: count }, (_, index) => {
|
|
48
|
+
const date = new Date(start.getTime() + index * 86400000);
|
|
49
|
+
return { iso: isoDate(date), day: date.getUTCDate() };
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
const calendarRows = computed(() => Array.from({ length: calendarDays.value.length / 7 }, (_, row) => calendarDays.value.slice(row * 7, row * 7 + 7)));
|
|
53
|
+
function isDisabled(iso) { return Boolean((props.disabledBeforeDate && iso < props.disabledBeforeDate) || (props.disabledAfterDate && iso > props.disabledAfterDate)); }
|
|
54
|
+
function changeMonth(offset) { monthDate.value = new Date(Date.UTC(monthDate.value.getUTCFullYear(), monthDate.value.getUTCMonth() + offset, 1)); }
|
|
55
|
+
function selectDay(iso) {
|
|
56
|
+
if (isDisabled(iso))
|
|
57
|
+
return;
|
|
58
|
+
if (!controlled.value)
|
|
59
|
+
internalSelectedDate.value = iso;
|
|
60
|
+
props.onChange?.(iso);
|
|
61
|
+
}
|
|
62
|
+
const slots = useSlots();
|
|
63
|
+
const styles = {};
|
|
64
|
+
const normalizeSlotContent = (value) => Array.isArray(value) ? value.map(normalizeSlotContent).join('') : value == null || typeof value === 'boolean' ? '' : typeof value === 'string' || typeof value === 'number' ? String(value) : normalizeSlotContent(value.children);
|
|
65
|
+
const renderContent = () => props.semanticContent ?? normalizeSlotContent(slots.default?.());
|
|
66
|
+
const fixture = computed(() => props.fixture);
|
|
67
|
+
const semanticValues = Object.assign({}, useAttrs(), props);
|
|
68
|
+
const semanticEqual = (left, right) => JSON.stringify(left) === JSON.stringify(right);
|
|
69
|
+
const fixtureText = (value) => value && typeof value === 'object' ? String(typeof value.text === 'string' ? value.text : '') + (Array.isArray(value.children) ? value.children.map(fixtureText).join('') : '') : '';
|
|
70
|
+
const __returned__ = { modelDigest, contentBindingDigest, props, instance, controlled, internalSelectedDate, selectedDate, padDatePart, isoDate, parseDate, initialMonth, monthDate, calendarDays, calendarRows, isDisabled, changeMonth, selectDay, slots, styles, normalizeSlotContent, renderContent, fixture, semanticValues, semanticEqual, fixtureText };
|
|
71
|
+
Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
|
|
72
|
+
return __returned__;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
import { createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, mergeProps as _mergeProps } from "vue";
|
|
76
|
+
const _hoisted_1 = ["aria-label"];
|
|
77
|
+
const _hoisted_2 = { role: "grid" };
|
|
78
|
+
const _hoisted_3 = ["data-day", "disabled", "aria-selected", "onClick"];
|
|
79
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
80
|
+
return (_openBlock(), _createElementBlock("div", _mergeProps(_ctx.$attrs, {
|
|
81
|
+
"aria-label": $setup.props.ariaLabel
|
|
82
|
+
}), [
|
|
83
|
+
_createElementVNode("button", {
|
|
84
|
+
type: "button",
|
|
85
|
+
onClick: _cache[0] || (_cache[0] = $event => ($setup.changeMonth(-1)))
|
|
86
|
+
}, "Previous"),
|
|
87
|
+
_createElementVNode("button", {
|
|
88
|
+
type: "button",
|
|
89
|
+
onClick: _cache[1] || (_cache[1] = $event => ($setup.changeMonth(1)))
|
|
90
|
+
}, "Next"),
|
|
91
|
+
_createElementVNode("table", _hoisted_2, [
|
|
92
|
+
_createElementVNode("tbody", null, [
|
|
93
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.calendarRows, (row, rowIndex) => {
|
|
94
|
+
return (_openBlock(), _createElementBlock("tr", { key: rowIndex }, [
|
|
95
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(row, (day) => {
|
|
96
|
+
return (_openBlock(), _createElementBlock("td", {
|
|
97
|
+
key: day.iso
|
|
98
|
+
}, [
|
|
99
|
+
_createElementVNode("button", {
|
|
100
|
+
type: "button",
|
|
101
|
+
"data-day": day.iso,
|
|
102
|
+
disabled: $setup.isDisabled(day.iso) || undefined,
|
|
103
|
+
"aria-selected": day.iso === $setup.selectedDate || undefined,
|
|
104
|
+
onClick: $event => ($setup.selectDay(day.iso))
|
|
105
|
+
}, _toDisplayString(day.day), 9 /* TEXT, PROPS */, _hoisted_3)
|
|
106
|
+
]));
|
|
107
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
108
|
+
]));
|
|
109
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
110
|
+
])
|
|
111
|
+
])
|
|
112
|
+
], 16 /* FULL_PROPS */, _hoisted_1));
|
|
113
|
+
}
|
|
114
|
+
__sfc__.render = render;
|
|
115
|
+
__sfc__.name = "KumoDatePicker";
|
|
116
|
+
__sfc__.__file = "components/date-picker.vue";
|
|
117
|
+
export default __sfc__;
|
|
118
|
+
|
|
119
|
+
export { __sfc__ as DatePicker }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// @generated by src/kumo/emitters/vue/index.mjs; do not edit
|
|
2
|
+
import type { DefineComponent } from 'vue';
|
|
3
|
+
export interface DateRangePickerProps { [key: string]: unknown }
|
|
4
|
+
declare const component: DefineComponent<DateRangePickerProps>;
|
|
5
|
+
export default component;
|
|
6
|
+
export declare const modelDigest: "3cfb56490eb493fd3a522a1fdf7ba0b041d91576a3c454046059939ae2aae977";
|
|
7
|
+
|
|
8
|
+
export { component as DateRangePicker };
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
import { computed, nextTick, ref, useAttrs, useSlots } from 'vue';
|
|
3
|
+
export const modelDigest = "3cfb56490eb493fd3a522a1fdf7ba0b041d91576a3c454046059939ae2aae977";
|
|
4
|
+
export const contentBindingDigest = "a6655036dbbdb2cd56a9e62bf5f2f8f75bb6a7bb4d3c5fbf41726fd8666277cd";
|
|
5
|
+
const __sfc__ = /*@__PURE__*/ _defineComponent({
|
|
6
|
+
...{ inheritAttrs: false },
|
|
7
|
+
__name: 'date-range-picker',
|
|
8
|
+
props: {
|
|
9
|
+
className: { type: String, required: false },
|
|
10
|
+
onEndDateChange: { type: null, required: false },
|
|
11
|
+
onStartDateChange: { type: null, required: false },
|
|
12
|
+
size: { type: String, required: false, default: "base" },
|
|
13
|
+
timezone: { type: String, required: false, default: "New York, NY, USA (GMT-4)" },
|
|
14
|
+
variant: { type: null, required: false, default: "default" },
|
|
15
|
+
onStartChange: { type: null, required: false },
|
|
16
|
+
onEndChange: { type: null, required: false },
|
|
17
|
+
fixture: { type: null, required: false },
|
|
18
|
+
semanticContent: { type: null, required: false }
|
|
19
|
+
},
|
|
20
|
+
setup(__props, { expose: __expose }) {
|
|
21
|
+
__expose();
|
|
22
|
+
const props = __props;
|
|
23
|
+
const rangeRoot = ref(null);
|
|
24
|
+
const startValue = ref(null);
|
|
25
|
+
const endValue = ref(null);
|
|
26
|
+
const monthCursor = ref(new Date(Date.UTC(2026, 5, 1)));
|
|
27
|
+
const pad = (value) => String(value).padStart(2, '0');
|
|
28
|
+
const iso = (date) => `${date.getUTCFullYear()}-${pad(date.getUTCMonth() + 1)}-${pad(date.getUTCDate())}`;
|
|
29
|
+
const monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
30
|
+
function buildMonth(base) {
|
|
31
|
+
const year = base.getUTCFullYear(), month = base.getUTCMonth();
|
|
32
|
+
const first = new Date(Date.UTC(year, month, 1)), start = new Date(first);
|
|
33
|
+
start.setUTCDate(1 - first.getUTCDay());
|
|
34
|
+
const days = Array.from({ length: 42 }, (_, index) => { const date = new Date(start); date.setUTCDate(start.getUTCDate() + index); return { iso: iso(date), day: date.getUTCDate(), inMonth: date.getUTCMonth() === month }; });
|
|
35
|
+
return { key: `${year}-${month}`, label: `${monthNames[month]} ${year}`, days };
|
|
36
|
+
}
|
|
37
|
+
const monthPanels = computed(() => [0, 1].map(offset => { const date = new Date(monthCursor.value); date.setUTCMonth(date.getUTCMonth() + offset); return buildMonth(date); }));
|
|
38
|
+
const rootClasses = computed(() => props.size === 'sm' && props.variant === 'subtle' ? "p-3 bg-kumo-base" : "p-4 bg-kumo-overlay");
|
|
39
|
+
function changeMonth(delta) { const date = new Date(monthCursor.value); date.setUTCMonth(date.getUTCMonth() + delta); monthCursor.value = date; }
|
|
40
|
+
function isInRange(value) { return Boolean(startValue.value && endValue.value && value >= startValue.value && value <= endValue.value); }
|
|
41
|
+
function selectDay(value) {
|
|
42
|
+
if (startValue.value === null || endValue.value !== null || value < startValue.value) {
|
|
43
|
+
startValue.value = value;
|
|
44
|
+
endValue.value = null;
|
|
45
|
+
props.onStartChange?.(value);
|
|
46
|
+
props.onStartDateChange?.(value);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
endValue.value = value;
|
|
50
|
+
props.onEndChange?.(value);
|
|
51
|
+
props.onEndDateChange?.(value);
|
|
52
|
+
}
|
|
53
|
+
function resetRange() {
|
|
54
|
+
startValue.value = null;
|
|
55
|
+
endValue.value = null;
|
|
56
|
+
props.onStartChange?.(null);
|
|
57
|
+
props.onStartDateChange?.(null);
|
|
58
|
+
props.onEndChange?.(null);
|
|
59
|
+
props.onEndDateChange?.(null);
|
|
60
|
+
nextTick(() => { if (rangeRoot.value) {
|
|
61
|
+
rangeRoot.value.setAttribute('tabindex', '-1');
|
|
62
|
+
rangeRoot.value.focus();
|
|
63
|
+
} });
|
|
64
|
+
}
|
|
65
|
+
const slots = useSlots();
|
|
66
|
+
const styles = {};
|
|
67
|
+
const normalizeSlotContent = (value) => Array.isArray(value) ? value.map(normalizeSlotContent).join('') : value == null || typeof value === 'boolean' ? '' : typeof value === 'string' || typeof value === 'number' ? String(value) : normalizeSlotContent(value.children);
|
|
68
|
+
const renderContent = () => props.semanticContent ?? normalizeSlotContent(slots.default?.());
|
|
69
|
+
const fixture = computed(() => props.fixture);
|
|
70
|
+
const semanticValues = Object.assign({}, useAttrs(), props);
|
|
71
|
+
const semanticEqual = (left, right) => JSON.stringify(left) === JSON.stringify(right);
|
|
72
|
+
const fixtureText = (value) => value && typeof value === 'object' ? String(typeof value.text === 'string' ? value.text : '') + (Array.isArray(value.children) ? value.children.map(fixtureText).join('') : '') : '';
|
|
73
|
+
const __returned__ = { modelDigest, contentBindingDigest, props, rangeRoot, startValue, endValue, monthCursor, pad, iso, monthNames, buildMonth, monthPanels, rootClasses, changeMonth, isInRange, selectDay, resetRange, slots, styles, normalizeSlotContent, renderContent, fixture, semanticValues, semanticEqual, fixtureText };
|
|
74
|
+
Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
|
|
75
|
+
return __returned__;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
import { createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, mergeProps as _mergeProps } from "vue";
|
|
79
|
+
const _hoisted_1 = { class: "kumo-date-range__toolbar" };
|
|
80
|
+
const _hoisted_2 = { class: "kumo-date-range__months" };
|
|
81
|
+
const _hoisted_3 = {
|
|
82
|
+
class: "kumo-date-range__weekdays",
|
|
83
|
+
"aria-hidden": "true"
|
|
84
|
+
};
|
|
85
|
+
const _hoisted_4 = {
|
|
86
|
+
class: "kumo-date-range__grid",
|
|
87
|
+
role: "grid"
|
|
88
|
+
};
|
|
89
|
+
const _hoisted_5 = ["data-day", "data-outside-month", "aria-label", "aria-selected", "data-in-range", "onClick"];
|
|
90
|
+
const _hoisted_6 = { class: "kumo-date-range__footer" };
|
|
91
|
+
const _hoisted_7 = { "aria-live": "polite" };
|
|
92
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
93
|
+
return (_openBlock(), _createElementBlock("div", _mergeProps({ ref: "rangeRoot" }, _ctx.$attrs, {
|
|
94
|
+
class: ['kumo-date-range', $setup.rootClasses]
|
|
95
|
+
}), [
|
|
96
|
+
_createElementVNode("div", _hoisted_1, [
|
|
97
|
+
_createElementVNode("button", {
|
|
98
|
+
type: "button",
|
|
99
|
+
"data-navigation": "previous",
|
|
100
|
+
"aria-label": "Previous month",
|
|
101
|
+
onClick: _cache[0] || (_cache[0] = $event => ($setup.changeMonth(-1)))
|
|
102
|
+
}, "Previous"),
|
|
103
|
+
_createElementVNode("button", {
|
|
104
|
+
type: "button",
|
|
105
|
+
"data-navigation": "next",
|
|
106
|
+
"aria-label": "Next month",
|
|
107
|
+
onClick: _cache[1] || (_cache[1] = $event => ($setup.changeMonth(1)))
|
|
108
|
+
}, "Next")
|
|
109
|
+
]),
|
|
110
|
+
_createElementVNode("div", _hoisted_2, [
|
|
111
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.monthPanels, (month) => {
|
|
112
|
+
return (_openBlock(), _createElementBlock("section", {
|
|
113
|
+
key: month.key,
|
|
114
|
+
class: "kumo-date-range__month"
|
|
115
|
+
}, [
|
|
116
|
+
_createElementVNode("h3", null, _toDisplayString(month.label), 1 /* TEXT */),
|
|
117
|
+
_createElementVNode("div", _hoisted_3, [
|
|
118
|
+
(_openBlock(), _createElementBlock(_Fragment, null, _renderList(['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], (day) => {
|
|
119
|
+
return _createElementVNode("span", { key: day }, _toDisplayString(day), 1 /* TEXT */);
|
|
120
|
+
}), 64 /* STABLE_FRAGMENT */))
|
|
121
|
+
]),
|
|
122
|
+
_createElementVNode("div", _hoisted_4, [
|
|
123
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(month.days, (day) => {
|
|
124
|
+
return (_openBlock(), _createElementBlock("button", {
|
|
125
|
+
key: day.iso,
|
|
126
|
+
type: "button",
|
|
127
|
+
"data-day": day.iso,
|
|
128
|
+
"data-outside-month": !day.inMonth || undefined,
|
|
129
|
+
"aria-label": day.iso,
|
|
130
|
+
"aria-selected": day.iso === $setup.startValue || day.iso === $setup.endValue || undefined,
|
|
131
|
+
"data-in-range": $setup.isInRange(day.iso) || undefined,
|
|
132
|
+
onClick: $event => ($setup.selectDay(day.iso))
|
|
133
|
+
}, _toDisplayString(day.day), 9 /* TEXT, PROPS */, _hoisted_5));
|
|
134
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
135
|
+
])
|
|
136
|
+
]));
|
|
137
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
138
|
+
]),
|
|
139
|
+
_createElementVNode("div", _hoisted_6, [
|
|
140
|
+
_createElementVNode("span", _hoisted_7, _toDisplayString($setup.startValue ? ($setup.endValue ? $setup.startValue + ' – ' + $setup.endValue : 'Start: ' + $setup.startValue) : 'Choose a start date'), 1 /* TEXT */),
|
|
141
|
+
_createElementVNode("button", {
|
|
142
|
+
type: "button",
|
|
143
|
+
"data-reset": "",
|
|
144
|
+
onClick: $setup.resetRange
|
|
145
|
+
}, "Reset dates")
|
|
146
|
+
])
|
|
147
|
+
], 16 /* FULL_PROPS */));
|
|
148
|
+
}
|
|
149
|
+
__sfc__.render = render;
|
|
150
|
+
__sfc__.name = "KumoDateRangePicker";
|
|
151
|
+
__sfc__.__file = "components/date-range-picker.vue";
|
|
152
|
+
export default __sfc__;
|
|
153
|
+
|
|
154
|
+
export { __sfc__ as DateRangePicker }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
const __sfc__ = /*@__PURE__*/ _defineComponent({
|
|
3
|
+
...{ inheritAttrs: false },
|
|
4
|
+
__name: 'dialog.close',
|
|
5
|
+
setup(__props, { expose: __expose }) {
|
|
6
|
+
__expose();
|
|
7
|
+
const __returned__ = {};
|
|
8
|
+
Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
|
|
9
|
+
return __returned__;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
import { renderSlot as _renderSlot, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
13
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14
|
+
return (_openBlock(), _createElementBlock("span", _mergeProps(_ctx.$attrs, { "data-kumo-part": "Close" }), [
|
|
15
|
+
_renderSlot(_ctx.$slots, "default")
|
|
16
|
+
], 16 /* FULL_PROPS */));
|
|
17
|
+
}
|
|
18
|
+
__sfc__.render = render;
|
|
19
|
+
__sfc__.name = "KumoDialogClose";
|
|
20
|
+
__sfc__.__file = "components/dialog.close.vue";
|
|
21
|
+
export default __sfc__;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// @generated by src/kumo/emitters/vue/index.mjs; do not edit
|
|
2
|
+
import type { DefineComponent } from 'vue';
|
|
3
|
+
export interface DialogProps { [key: string]: unknown }
|
|
4
|
+
declare const component: DefineComponent<DialogProps>;
|
|
5
|
+
export default component;
|
|
6
|
+
export declare const modelDigest: "bbb9a5923924fd49391fbcee50197c821eda77610c050fb355e378e852397b0d";
|
|
7
|
+
|
|
8
|
+
export { component as Dialog };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
const __sfc__ = /*@__PURE__*/ _defineComponent({
|
|
3
|
+
...{ inheritAttrs: false },
|
|
4
|
+
__name: 'dialog.description',
|
|
5
|
+
setup(__props, { expose: __expose }) {
|
|
6
|
+
__expose();
|
|
7
|
+
const __returned__ = {};
|
|
8
|
+
Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true });
|
|
9
|
+
return __returned__;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
import { renderSlot as _renderSlot, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
13
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14
|
+
return (_openBlock(), _createElementBlock("span", _mergeProps(_ctx.$attrs, { "data-kumo-part": "Description" }), [
|
|
15
|
+
_renderSlot(_ctx.$slots, "default")
|
|
16
|
+
], 16 /* FULL_PROPS */));
|
|
17
|
+
}
|
|
18
|
+
__sfc__.render = render;
|
|
19
|
+
__sfc__.name = "KumoDialogDescription";
|
|
20
|
+
__sfc__.__file = "components/dialog.description.vue";
|
|
21
|
+
export default __sfc__;
|