@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,46 @@
|
|
|
1
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
2
|
+
import type { TableColumn, TableColumnSettings, TableRowKey } from '../../shared/types/table';
|
|
3
|
+
import { type TableDisplayRow } from '../../shared/utils/tableTree';
|
|
4
|
+
export interface TableMergedCell<Row> {
|
|
5
|
+
rowSpan: number;
|
|
6
|
+
lastRow: Row;
|
|
7
|
+
}
|
|
8
|
+
export interface TableSectionItem<Row> {
|
|
9
|
+
itemKey: string;
|
|
10
|
+
kind: 'row' | 'details';
|
|
11
|
+
row: Row;
|
|
12
|
+
displayRow: TableDisplayRow<Row>;
|
|
13
|
+
rowIndex: number;
|
|
14
|
+
mergedCells: Record<string, TableMergedCell<Row>>;
|
|
15
|
+
}
|
|
16
|
+
export interface TableSectionGroup<Row> {
|
|
17
|
+
groupKey: string;
|
|
18
|
+
label: string;
|
|
19
|
+
rows: Row[];
|
|
20
|
+
isCollapsed: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface TableSection<Row> {
|
|
23
|
+
sectionKey: string;
|
|
24
|
+
group?: TableSectionGroup<Row>;
|
|
25
|
+
items: TableSectionItem<Row>[];
|
|
26
|
+
}
|
|
27
|
+
interface TableSectionsOptions<Row> {
|
|
28
|
+
columns: ComputedRef<TableColumn<Row>[]>;
|
|
29
|
+
mergedColumns: () => TableColumn<Row>[];
|
|
30
|
+
columnSettings: ComputedRef<TableColumnSettings>;
|
|
31
|
+
groupBy: () => string | undefined;
|
|
32
|
+
groupLabel: () => ((groupValue: unknown, groupRows: Row[]) => string) | undefined;
|
|
33
|
+
childrenKey: () => string | undefined;
|
|
34
|
+
hasRowDetails: () => boolean;
|
|
35
|
+
expandedRowKeys: Ref<TableRowKey[]>;
|
|
36
|
+
collapsedGroupKeys: Ref<string[]>;
|
|
37
|
+
findRowKey: (row: Row) => TableRowKey;
|
|
38
|
+
isRowAutoExpanded: (row: Row) => boolean;
|
|
39
|
+
orderChildRows: (childRows: Row[]) => Row[];
|
|
40
|
+
}
|
|
41
|
+
/** Split the shown rows into the sections of the table: groups, rows with their children, and opened details. */
|
|
42
|
+
export declare function useTableSections<Row>(visibleRows: ComputedRef<Row[]>, sectionsOptions: TableSectionsOptions<Row>): {
|
|
43
|
+
tableSections: ComputedRef<TableSection<Row>[]>;
|
|
44
|
+
displayedRows: ComputedRef<Row[]>;
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { readValueAtPath as e } from "../../shared/utils/readValueAtPath.js";
|
|
2
|
+
import { formatCellValue as t, readCellValue as n } from "../../shared/utils/tableColumns.js";
|
|
3
|
+
import { groupTableRows as r } from "../../shared/utils/tableGroups.js";
|
|
4
|
+
import { flattenTableRows as i } from "../../shared/utils/tableTree.js";
|
|
5
|
+
import { computed as a } from "vue";
|
|
6
|
+
// src/blocks/table/useTableSections.ts
|
|
7
|
+
function o(e, t) {
|
|
8
|
+
return e instanceof Date && t instanceof Date ? e.getTime() === t.getTime() : Object.is(e, t);
|
|
9
|
+
}
|
|
10
|
+
function s(e, t) {
|
|
11
|
+
for (let r of t) {
|
|
12
|
+
let t, i, a = 0;
|
|
13
|
+
for (let s of e) {
|
|
14
|
+
if (s.kind === "details") {
|
|
15
|
+
t = void 0;
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
let e = n(s.row, r);
|
|
19
|
+
t !== void 0 && s.displayRow.depth === a && o(e, i) && t ? (t.rowSpan++, t.lastRow = s.row, s.mergedCells[r.key] = {
|
|
20
|
+
rowSpan: 0,
|
|
21
|
+
lastRow: s.row
|
|
22
|
+
}) : (t = {
|
|
23
|
+
rowSpan: 1,
|
|
24
|
+
lastRow: s.row
|
|
25
|
+
}, i = e, a = s.displayRow.depth, s.mergedCells[r.key] = t);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return e;
|
|
29
|
+
}
|
|
30
|
+
function c(o, c) {
|
|
31
|
+
function l(e) {
|
|
32
|
+
return c.expandedRowKeys.value.includes(c.findRowKey(e));
|
|
33
|
+
}
|
|
34
|
+
function u(e, t) {
|
|
35
|
+
return s(i(e, {
|
|
36
|
+
childrenKey: c.childrenKey(),
|
|
37
|
+
isRowExpanded: (e) => l(e) || c.isRowAutoExpanded(e),
|
|
38
|
+
orderChildRows: c.orderChildRows
|
|
39
|
+
}).flatMap((e, n) => {
|
|
40
|
+
let r = String(c.findRowKey(e.row)), i = {
|
|
41
|
+
itemKey: `row-${r}`,
|
|
42
|
+
kind: "row",
|
|
43
|
+
row: e.row,
|
|
44
|
+
displayRow: e,
|
|
45
|
+
rowIndex: t + n,
|
|
46
|
+
mergedCells: {}
|
|
47
|
+
};
|
|
48
|
+
return !c.hasRowDetails() || !l(e.row) ? [i] : [i, {
|
|
49
|
+
...i,
|
|
50
|
+
itemKey: `details-${r}`,
|
|
51
|
+
kind: "details",
|
|
52
|
+
mergedCells: {}
|
|
53
|
+
}];
|
|
54
|
+
}), c.mergedColumns());
|
|
55
|
+
}
|
|
56
|
+
function d(e, n, r) {
|
|
57
|
+
let i = c.groupLabel();
|
|
58
|
+
return i ? i(e, n) : r && n[0] !== void 0 ? t(n[0], r, c.columnSettings.value) : String(e ?? "");
|
|
59
|
+
}
|
|
60
|
+
let f = a(() => {
|
|
61
|
+
let t = c.groupBy();
|
|
62
|
+
if (!t) return [{
|
|
63
|
+
sectionKey: "all-rows",
|
|
64
|
+
items: u(o.value, 0)
|
|
65
|
+
}];
|
|
66
|
+
let i = c.columns.value.find((e) => e.key === t), a = (r) => i ? n(r, i) : e(r, t), s = 0;
|
|
67
|
+
return r(o.value, a).map((e) => {
|
|
68
|
+
let t = c.collapsedGroupKeys.value.includes(e.groupKey), n = t ? [] : u(e.rows, s);
|
|
69
|
+
return s += n.filter((e) => e.kind === "row").length, {
|
|
70
|
+
sectionKey: `group-${e.groupKey}`,
|
|
71
|
+
group: {
|
|
72
|
+
groupKey: e.groupKey,
|
|
73
|
+
label: d(e.groupValue, e.rows, i),
|
|
74
|
+
rows: e.rows,
|
|
75
|
+
isCollapsed: t
|
|
76
|
+
},
|
|
77
|
+
items: n
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
return {
|
|
82
|
+
tableSections: f,
|
|
83
|
+
displayedRows: a(() => f.value.flatMap((e) => e.items.flatMap((e) => e.kind === "row" ? [e.row] : [])))
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export { c as useTableSections };
|
|
@@ -25,8 +25,8 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<AlertP
|
|
|
25
25
|
}> & Readonly<{
|
|
26
26
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
|
-
variant: "
|
|
29
|
-
color: "primary" | "
|
|
28
|
+
variant: "soft" | "solid" | "outline";
|
|
29
|
+
color: "primary" | "success" | "info" | "discovery" | "danger" | "warning" | "caution";
|
|
30
30
|
actionsPlacement: "end" | "bottom";
|
|
31
31
|
showIcon: boolean;
|
|
32
32
|
closeLabel: string;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import e from "../../elements/button/Button.js";
|
|
2
|
+
import { alertTheme as t } from "./alert.theme.js";
|
|
3
|
+
import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, defineComponent as c, mergeModels as l, normalizeClass as u, openBlock as d, renderSlot as f, resolveDynamicComponent as p, toDisplayString as m, unref as h, useModel as g, useSlots as _ } from "vue";
|
|
4
|
+
import { CircleCheck as v, Info as y, TriangleAlert as b, X as x } from "lucide-vue-next";
|
|
5
|
+
// src/components/alert/Alert.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var S = ["role"], C = /*@__PURE__*/ c({
|
|
7
|
+
__name: "Alert",
|
|
8
|
+
props: /*@__PURE__*/ l({
|
|
9
|
+
title: {},
|
|
10
|
+
description: {},
|
|
11
|
+
variant: { default: "outline" },
|
|
12
|
+
color: { default: "primary" },
|
|
13
|
+
icon: {},
|
|
14
|
+
showIcon: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !0
|
|
17
|
+
},
|
|
18
|
+
actionsPlacement: { default: "end" },
|
|
19
|
+
closable: { type: Boolean },
|
|
20
|
+
closeLabel: { default: "Close" },
|
|
21
|
+
ui: {},
|
|
22
|
+
class: { type: [
|
|
23
|
+
Array,
|
|
24
|
+
String,
|
|
25
|
+
null,
|
|
26
|
+
Number,
|
|
27
|
+
Boolean
|
|
28
|
+
] }
|
|
29
|
+
}, {
|
|
30
|
+
open: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !0
|
|
33
|
+
},
|
|
34
|
+
openModifiers: {}
|
|
35
|
+
}),
|
|
36
|
+
emits: ["update:open"],
|
|
37
|
+
setup(c) {
|
|
38
|
+
let l = c, C = g(c, "open"), w = _(), T = {
|
|
39
|
+
warning: b,
|
|
40
|
+
caution: b,
|
|
41
|
+
danger: b,
|
|
42
|
+
success: v
|
|
43
|
+
}, E = n(() => l.icon ?? T[l.color] ?? y), D = n(() => !!(l.title || w.title)), O = n(() => !!(l.description || w.description)), k = n(() => !!w.actions), A = n(() => t({
|
|
44
|
+
variant: l.variant,
|
|
45
|
+
color: l.color,
|
|
46
|
+
actionsPlacement: l.actionsPlacement,
|
|
47
|
+
hasActions: k.value,
|
|
48
|
+
hasTitle: D.value
|
|
49
|
+
}));
|
|
50
|
+
return (t, n) => C.value ? (d(), a("div", {
|
|
51
|
+
key: 0,
|
|
52
|
+
role: c.color === "danger" ? "alert" : void 0,
|
|
53
|
+
class: u(A.value.root({ class: [c.ui?.root, l.class] }))
|
|
54
|
+
}, [o("div", { class: u(A.value.body({ class: c.ui?.body })) }, [
|
|
55
|
+
c.showIcon ? (d(), r(p(E.value), {
|
|
56
|
+
key: 0,
|
|
57
|
+
class: u(A.value.icon({ class: c.ui?.icon }))
|
|
58
|
+
}, null, 8, ["class"])) : i("", !0),
|
|
59
|
+
o("div", { class: u(A.value.content({ class: c.ui?.content })) }, [o("div", { class: u(A.value.wrapper({ class: c.ui?.wrapper })) }, [D.value ? (d(), a("div", {
|
|
60
|
+
key: 0,
|
|
61
|
+
class: u(A.value.title({ class: c.ui?.title }))
|
|
62
|
+
}, [f(t.$slots, "title", {}, () => [s(m(c.title), 1)])], 2)) : i("", !0), O.value ? (d(), a("div", {
|
|
63
|
+
key: 1,
|
|
64
|
+
class: u(A.value.description({ class: c.ui?.description }))
|
|
65
|
+
}, [f(t.$slots, "description", {}, () => [s(m(c.description), 1)])], 2)) : i("", !0)], 2), k.value ? (d(), a("div", {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: u(A.value.actions({ class: c.ui?.actions }))
|
|
68
|
+
}, [f(t.$slots, "actions")], 2)) : i("", !0)], 2),
|
|
69
|
+
c.closable ? (d(), r(h(e), {
|
|
70
|
+
key: 1,
|
|
71
|
+
label: c.closeLabel,
|
|
72
|
+
size: "xs",
|
|
73
|
+
variant: "ghost",
|
|
74
|
+
color: "gray",
|
|
75
|
+
square: "",
|
|
76
|
+
"leading-icon": h(x),
|
|
77
|
+
class: u(A.value.closeButton({ class: c.ui?.closeButton })),
|
|
78
|
+
onClick: n[0] ||= (e) => C.value = !1
|
|
79
|
+
}, null, 8, [
|
|
80
|
+
"label",
|
|
81
|
+
"leading-icon",
|
|
82
|
+
"class"
|
|
83
|
+
])) : i("", !0)
|
|
84
|
+
], 2)], 10, S)) : i("", !0);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
export { C as default };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { tv as e } from "../../shared/utils/tv.js";
|
|
2
|
+
// src/components/alert/alert.theme.ts
|
|
3
|
+
var t = {
|
|
4
|
+
outline: {
|
|
5
|
+
primary: "inset-ring inset-ring-line",
|
|
6
|
+
success: "inset-ring light:inset-ring-green-600 light:text-green-700 dark:inset-ring-green-500 dark:text-green-400",
|
|
7
|
+
warning: "inset-ring light:inset-ring-orange-600 light:text-orange-700 dark:inset-ring-orange-500 dark:text-orange-400",
|
|
8
|
+
caution: "inset-ring light:inset-ring-yellow-600 light:text-yellow-700 dark:inset-ring-yellow-500 dark:text-yellow-400",
|
|
9
|
+
danger: "inset-ring light:inset-ring-red-600 light:text-red-600 dark:inset-ring-red-500 dark:text-red-400",
|
|
10
|
+
info: "inset-ring light:inset-ring-blue-600 light:text-blue-600 dark:inset-ring-blue-400 dark:text-blue-300",
|
|
11
|
+
discovery: "inset-ring light:inset-ring-purple-600 light:text-purple-600 dark:inset-ring-purple-400 dark:text-purple-300"
|
|
12
|
+
},
|
|
13
|
+
soft: {
|
|
14
|
+
primary: "inset-ring light:bg-stone-950/4 light:inset-ring-stone-950/6 dark:bg-white/6 dark:inset-ring-white/8",
|
|
15
|
+
success: "inset-ring light:bg-green-500/6 light:inset-ring-green-500/16 light:text-green-700 dark:bg-green-400/10 dark:inset-ring-green-400/20 dark:text-green-400",
|
|
16
|
+
warning: "inset-ring light:bg-orange-500/6 light:inset-ring-orange-500/16 light:text-orange-700 dark:bg-orange-400/10 dark:inset-ring-orange-400/20 dark:text-orange-400",
|
|
17
|
+
caution: "inset-ring light:bg-yellow-500/8 light:inset-ring-yellow-500/20 light:text-yellow-800 dark:bg-yellow-400/10 dark:inset-ring-yellow-400/20 dark:text-yellow-400",
|
|
18
|
+
danger: "inset-ring light:bg-red-500/6 light:inset-ring-red-500/16 light:text-red-600 dark:bg-red-400/10 dark:inset-ring-red-400/20 dark:text-red-400",
|
|
19
|
+
info: "inset-ring light:bg-blue-500/6 light:inset-ring-blue-500/16 light:text-blue-600 dark:bg-blue-400/10 dark:inset-ring-blue-400/20 dark:text-blue-300",
|
|
20
|
+
discovery: "inset-ring light:bg-purple-500/6 light:inset-ring-purple-500/16 light:text-purple-600 dark:bg-purple-400/10 dark:inset-ring-purple-400/20 dark:text-purple-300"
|
|
21
|
+
},
|
|
22
|
+
solid: {
|
|
23
|
+
primary: "light:bg-neutral-900 light:text-white dark:bg-stone-200 dark:text-stone-950",
|
|
24
|
+
success: "light:bg-green-600 light:text-white dark:bg-green-600 dark:text-white",
|
|
25
|
+
warning: "light:bg-orange-600 light:text-white dark:bg-orange-600 dark:text-white",
|
|
26
|
+
caution: "light:bg-yellow-700 light:text-white dark:bg-yellow-700 dark:text-white",
|
|
27
|
+
danger: "light:bg-red-600 light:text-white dark:bg-red-600 dark:text-white",
|
|
28
|
+
info: "light:bg-blue-600 light:text-white dark:bg-blue-500 dark:text-white",
|
|
29
|
+
discovery: "light:bg-purple-600 light:text-white dark:bg-purple-500 dark:text-white"
|
|
30
|
+
}
|
|
31
|
+
}, n = Object.keys(t), r = Object.keys(t.outline), i = n.flatMap((e) => r.map((n) => ({
|
|
32
|
+
variant: e,
|
|
33
|
+
color: n,
|
|
34
|
+
class: { root: t[e][n] }
|
|
35
|
+
}))), a = e({
|
|
36
|
+
slots: {
|
|
37
|
+
root: "@container w-full rounded-xl p-4 text-sm leading-5",
|
|
38
|
+
body: "flex gap-3",
|
|
39
|
+
icon: "size-5 shrink-0",
|
|
40
|
+
content: "min-w-0 flex-1",
|
|
41
|
+
wrapper: "min-w-0 flex-1",
|
|
42
|
+
title: "font-semibold text-pretty",
|
|
43
|
+
description: "text-pretty",
|
|
44
|
+
actions: "flex shrink-0 gap-2",
|
|
45
|
+
closeButton: "shrink-0"
|
|
46
|
+
},
|
|
47
|
+
variants: {
|
|
48
|
+
variant: {
|
|
49
|
+
outline: "",
|
|
50
|
+
soft: "",
|
|
51
|
+
solid: ""
|
|
52
|
+
},
|
|
53
|
+
color: {
|
|
54
|
+
primary: "",
|
|
55
|
+
success: "",
|
|
56
|
+
warning: "",
|
|
57
|
+
caution: "",
|
|
58
|
+
danger: "",
|
|
59
|
+
info: "",
|
|
60
|
+
discovery: ""
|
|
61
|
+
},
|
|
62
|
+
actionsPlacement: {
|
|
63
|
+
end: "",
|
|
64
|
+
bottom: ""
|
|
65
|
+
},
|
|
66
|
+
hasActions: {
|
|
67
|
+
true: "",
|
|
68
|
+
false: { body: "items-center" }
|
|
69
|
+
},
|
|
70
|
+
hasTitle: { true: { description: "mt-0.5" } }
|
|
71
|
+
},
|
|
72
|
+
compoundVariants: [
|
|
73
|
+
...i,
|
|
74
|
+
{
|
|
75
|
+
hasActions: !0,
|
|
76
|
+
actionsPlacement: "end",
|
|
77
|
+
class: {
|
|
78
|
+
body: "items-start @md:items-center",
|
|
79
|
+
content: "@md:flex @md:items-center @md:justify-between",
|
|
80
|
+
actions: "mt-4 @md:mt-0 @md:ml-4"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
hasActions: !0,
|
|
85
|
+
actionsPlacement: "bottom",
|
|
86
|
+
class: {
|
|
87
|
+
body: "items-start",
|
|
88
|
+
actions: "mt-4"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
export { a as alertTheme };
|
|
@@ -17,6 +17,6 @@ export default _default;
|
|
|
17
17
|
declare const __VLS_export: import("vue").DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {
|
|
18
18
|
size: "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
|
|
19
19
|
overflowCount: number;
|
|
20
|
-
stack: "end" | "start";
|
|
21
20
|
surface: "canvas" | "widget";
|
|
21
|
+
stack: "end" | "start";
|
|
22
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import e from "../../elements/avatar/Avatar.js";
|
|
2
|
+
import { avatarGroupTheme as t } from "./avatar-group.theme.js";
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createElementBlock as a, defineComponent as o, mergeProps as s, normalizeClass as c, openBlock as l, renderList as u, unref as d } from "vue";
|
|
4
|
+
// src/components/avatar-group/AvatarGroup.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var f = ["role", "aria-label"], p = /*@__PURE__*/ o({
|
|
6
|
+
__name: "AvatarGroup",
|
|
7
|
+
props: {
|
|
8
|
+
avatars: {},
|
|
9
|
+
label: {},
|
|
10
|
+
size: { default: "md" },
|
|
11
|
+
stack: { default: "start" },
|
|
12
|
+
overflowCount: { default: 0 },
|
|
13
|
+
surface: { default: "widget" },
|
|
14
|
+
ui: {},
|
|
15
|
+
class: { type: [
|
|
16
|
+
Array,
|
|
17
|
+
String,
|
|
18
|
+
null,
|
|
19
|
+
Number,
|
|
20
|
+
Boolean
|
|
21
|
+
] }
|
|
22
|
+
},
|
|
23
|
+
setup(o) {
|
|
24
|
+
let p = o, m = r(() => p.overflowCount > 0), h = r(() => {
|
|
25
|
+
let e = (m.value ? [...p.avatars, { overflowCount: p.overflowCount }] : [...p.avatars]).map((e, t) => ({
|
|
26
|
+
avatarProps: e,
|
|
27
|
+
avatarPosition: t
|
|
28
|
+
}));
|
|
29
|
+
return p.stack === "start" ? e.reverse() : e;
|
|
30
|
+
}), g = r(() => t({
|
|
31
|
+
stack: p.stack,
|
|
32
|
+
surface: p.surface,
|
|
33
|
+
hasOverflow: m.value
|
|
34
|
+
}));
|
|
35
|
+
return (t, r) => (l(), a("div", {
|
|
36
|
+
role: o.label ? "group" : void 0,
|
|
37
|
+
"aria-label": o.label || void 0,
|
|
38
|
+
class: c(g.value.base({ class: [o.ui?.base, p.class] }))
|
|
39
|
+
}, [(l(!0), a(n, null, u(h.value, (t) => (l(), i(d(e), s({ key: t.avatarPosition }, { ref_for: !0 }, t.avatarProps, { size: o.size }), null, 16, ["size"]))), 128))], 10, f));
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
export { p as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { tv as e } from "../../shared/utils/tv.js";
|
|
2
|
+
// src/components/avatar-group/avatar-group.theme.ts
|
|
3
|
+
var t = e({
|
|
4
|
+
slots: { base: "flex *:ring-3" },
|
|
5
|
+
variants: {
|
|
6
|
+
stack: {
|
|
7
|
+
start: { base: "flex-row-reverse justify-end *:not-first:-me-[calc(var(--avatar-size)/4)]" },
|
|
8
|
+
end: { base: "*:not-first:-ms-[calc(var(--avatar-size)/4)]" }
|
|
9
|
+
},
|
|
10
|
+
surface: {
|
|
11
|
+
widget: { base: "*:ring-widget" },
|
|
12
|
+
canvas: { base: "*:ring-canvas" }
|
|
13
|
+
},
|
|
14
|
+
hasOverflow: { true: "" }
|
|
15
|
+
},
|
|
16
|
+
compoundVariants: [{
|
|
17
|
+
stack: "start",
|
|
18
|
+
hasOverflow: !0,
|
|
19
|
+
class: { base: "*:first:z-10" }
|
|
20
|
+
}]
|
|
21
|
+
});
|
|
22
|
+
export { t as avatarGroupTheme };
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import e from "../../elements/button/Button.js";
|
|
2
|
+
import { createCalendarMonth as t, orderWeekdays as n } from "../../shared/utils/calendarMonth.js";
|
|
3
|
+
import { createShortcutHandler as ee } from "../../shared/utils/createShortcutHandler.js";
|
|
4
|
+
import { addDaysToIsoDate as r, addMonthsToIsoDate as i, addMonthsToIsoMonth as a, clampIsoDate as o, countMonthsBetweenIsoMonths as s, extractIsoMonth as c, findIsoDateWeekday as l, findLocalTodayIsoDate as u, isIsoDateUnavailable as d } from "../../shared/utils/isoDate.js";
|
|
5
|
+
import te from "./DateCalendarMonth.js";
|
|
6
|
+
import { dateCalendarTheme as ne } from "./date-calendar.theme.js";
|
|
7
|
+
import { Fragment as f, TransitionGroup as re, computed as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, nextTick as v, normalizeClass as y, normalizeStyle as b, onMounted as x, openBlock as S, ref as C, renderList as ie, shallowRef as ae, unref as w, useTemplateRef as oe, watch as se, withCtx as T } from "vue";
|
|
8
|
+
import { ChevronLeft as E, ChevronRight as D } from "lucide-vue-next";
|
|
9
|
+
// src/components/date-picker/DateCalendar.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
var O = 242, k = 7, A = /*@__PURE__*/ _({
|
|
11
|
+
__name: "DateCalendar",
|
|
12
|
+
props: {
|
|
13
|
+
initialMonth: {},
|
|
14
|
+
initialFocusedDate: {},
|
|
15
|
+
monthCount: { default: 1 },
|
|
16
|
+
selectedStart: {},
|
|
17
|
+
selectedEnd: {},
|
|
18
|
+
min: {},
|
|
19
|
+
max: {},
|
|
20
|
+
disabledDates: {},
|
|
21
|
+
isDateDisabled: {},
|
|
22
|
+
weekStartsOn: {},
|
|
23
|
+
weekdayLabel: {},
|
|
24
|
+
monthLabel: {},
|
|
25
|
+
dayLabel: {},
|
|
26
|
+
previousMonthLabel: {},
|
|
27
|
+
nextMonthLabel: {},
|
|
28
|
+
ui: {}
|
|
29
|
+
},
|
|
30
|
+
emits: [
|
|
31
|
+
"selectDate",
|
|
32
|
+
"hoverDate",
|
|
33
|
+
"leaveDates"
|
|
34
|
+
],
|
|
35
|
+
setup(_, { expose: A, emit: ce }) {
|
|
36
|
+
let j = _, M = ce, N = oe("viewportElement"), P = u(), F = C(j.initialMonth), I = C(0), L = C(0), R = C(j.initialFocusedDate), z = ae(), B = C(!1), V = p(() => n(j.weekStartsOn)), H = p(() => Array.from({ length: j.monthCount }, (e, n) => ({
|
|
37
|
+
calendarMonth: t(a(F.value, n), j.weekStartsOn),
|
|
38
|
+
carouselPosition: I.value + n,
|
|
39
|
+
monthOffset: n
|
|
40
|
+
}))), U = p(() => H.value[0].calendarMonth), W = p(() => H.value[H.value.length - 1].calendarMonth), le = p(() => !j.min || j.min < U.value.firstIsoDate), ue = p(() => !j.max || W.value.lastIsoDate < j.max), G = p(() => R.value >= U.value.firstIsoDate && R.value <= W.value.lastIsoDate ? R.value : U.value.firstIsoDate);
|
|
41
|
+
function de(e) {
|
|
42
|
+
return d(e, j);
|
|
43
|
+
}
|
|
44
|
+
function K() {
|
|
45
|
+
--I.value, F.value = a(F.value, -1);
|
|
46
|
+
}
|
|
47
|
+
function q() {
|
|
48
|
+
I.value += 1, F.value = a(F.value, 1);
|
|
49
|
+
}
|
|
50
|
+
function J(e) {
|
|
51
|
+
let t = c(e), n = s(F.value, t);
|
|
52
|
+
if (!(n >= 0 && n < j.monthCount)) {
|
|
53
|
+
if (n === -1) return K();
|
|
54
|
+
if (n === j.monthCount) return q();
|
|
55
|
+
F.value = n < 0 ? t : a(t, 1 - j.monthCount), I.value = 0, L.value += 1;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function Y() {
|
|
59
|
+
N.value?.querySelector(`[data-iso-date="${G.value}"]`)?.focus();
|
|
60
|
+
}
|
|
61
|
+
function X(e) {
|
|
62
|
+
return (l(e) - j.weekStartsOn + k) % k;
|
|
63
|
+
}
|
|
64
|
+
function Z(e) {
|
|
65
|
+
R.value = o(e(R.value), j.min, j.max), J(R.value), v(Y);
|
|
66
|
+
}
|
|
67
|
+
let Q = ee({
|
|
68
|
+
arrowleft: () => Z((e) => r(e, -1)),
|
|
69
|
+
arrowright: () => Z((e) => r(e, 1)),
|
|
70
|
+
arrowup: () => Z((e) => r(e, -7)),
|
|
71
|
+
arrowdown: () => Z((e) => r(e, k)),
|
|
72
|
+
home: () => Z((e) => r(e, -X(e))),
|
|
73
|
+
end: () => Z((e) => r(e, 6 - X(e))),
|
|
74
|
+
pageup: () => Z((e) => i(e, -1)),
|
|
75
|
+
pagedown: () => Z((e) => i(e, 1)),
|
|
76
|
+
"shift+pageup": () => Z((e) => i(e, -12)),
|
|
77
|
+
"shift+pagedown": () => Z((e) => i(e, 12))
|
|
78
|
+
});
|
|
79
|
+
function fe(e, t) {
|
|
80
|
+
R.value = t, Q(e);
|
|
81
|
+
}
|
|
82
|
+
function pe(e) {
|
|
83
|
+
R.value = e, M("selectDate", e);
|
|
84
|
+
}
|
|
85
|
+
function me(e) {
|
|
86
|
+
e.setAttribute("data-leaving-month", "");
|
|
87
|
+
}
|
|
88
|
+
function he() {
|
|
89
|
+
let e = N.value?.querySelectorAll("[data-calendar-month]:not([data-leaving-month])"), t = Math.max(0, ...[...e ?? []].map((e) => e.offsetHeight));
|
|
90
|
+
t > 0 && (z.value = t);
|
|
91
|
+
}
|
|
92
|
+
x(() => {
|
|
93
|
+
se(H, he, {
|
|
94
|
+
immediate: !0,
|
|
95
|
+
flush: "post"
|
|
96
|
+
}), requestAnimationFrame(() => {
|
|
97
|
+
B.value = !0;
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
function ge(e) {
|
|
101
|
+
R.value = e, J(e);
|
|
102
|
+
}
|
|
103
|
+
A({
|
|
104
|
+
focusTabbableDay: Y,
|
|
105
|
+
showDate: ge
|
|
106
|
+
});
|
|
107
|
+
let $ = p(() => ne({
|
|
108
|
+
showsTwoMonths: j.monthCount > 1,
|
|
109
|
+
animatesHeight: B.value
|
|
110
|
+
}));
|
|
111
|
+
return (t, n) => (S(), m("div", { class: y($.value.calendar({ class: _.ui?.calendar })) }, [h("div", {
|
|
112
|
+
ref_key: "viewportElement",
|
|
113
|
+
ref: N,
|
|
114
|
+
style: b({ height: z.value === void 0 ? void 0 : `${z.value}px` }),
|
|
115
|
+
class: y($.value.viewport({ class: _.ui?.viewport })),
|
|
116
|
+
onMouseleave: n[1] ||= (e) => M("leaveDates")
|
|
117
|
+
}, [
|
|
118
|
+
h("div", { class: y($.value.previousMonth({ class: _.ui?.previousMonth })) }, [g(w(e), {
|
|
119
|
+
label: _.previousMonthLabel,
|
|
120
|
+
variant: "ghost",
|
|
121
|
+
color: "gray",
|
|
122
|
+
size: "sm",
|
|
123
|
+
"leading-icon": w(E),
|
|
124
|
+
square: "",
|
|
125
|
+
pill: !1,
|
|
126
|
+
disabled: !le.value,
|
|
127
|
+
onClick: K
|
|
128
|
+
}, null, 8, [
|
|
129
|
+
"label",
|
|
130
|
+
"leading-icon",
|
|
131
|
+
"disabled"
|
|
132
|
+
])], 2),
|
|
133
|
+
h("div", { class: y($.value.nextMonth({ class: _.ui?.nextMonth })) }, [g(w(e), {
|
|
134
|
+
label: _.nextMonthLabel,
|
|
135
|
+
variant: "ghost",
|
|
136
|
+
color: "gray",
|
|
137
|
+
size: "sm",
|
|
138
|
+
"leading-icon": w(D),
|
|
139
|
+
square: "",
|
|
140
|
+
pill: !1,
|
|
141
|
+
disabled: !ue.value,
|
|
142
|
+
onClick: q
|
|
143
|
+
}, null, 8, [
|
|
144
|
+
"label",
|
|
145
|
+
"leading-icon",
|
|
146
|
+
"disabled"
|
|
147
|
+
])], 2),
|
|
148
|
+
(S(), m("div", {
|
|
149
|
+
key: L.value,
|
|
150
|
+
style: b({ transform: `translateX(${-I.value * O}px)` }),
|
|
151
|
+
class: y($.value.monthTrack({ class: _.ui?.monthTrack }))
|
|
152
|
+
}, [g(re, {
|
|
153
|
+
duration: 400,
|
|
154
|
+
"leave-active-class": "pointer-events-none",
|
|
155
|
+
onBeforeLeave: me
|
|
156
|
+
}, {
|
|
157
|
+
default: T(() => [(S(!0), m(f, null, ie(H.value, (e) => (S(), m("div", {
|
|
158
|
+
key: e.calendarMonth.isoMonth,
|
|
159
|
+
"data-calendar-month": "",
|
|
160
|
+
style: b({ left: `${e.carouselPosition * O}px` }),
|
|
161
|
+
class: y($.value.month({ class: [e.monthOffset > 0 && "max-sm:hidden", _.ui?.month] }))
|
|
162
|
+
}, [g(te, {
|
|
163
|
+
"calendar-month": e.calendarMonth,
|
|
164
|
+
weekdays: V.value,
|
|
165
|
+
"selected-start": _.selectedStart,
|
|
166
|
+
"selected-end": _.selectedEnd,
|
|
167
|
+
"tabbable-date": G.value,
|
|
168
|
+
today: w(P),
|
|
169
|
+
"is-date-unavailable": de,
|
|
170
|
+
"weekday-label": _.weekdayLabel,
|
|
171
|
+
"month-label": _.monthLabel,
|
|
172
|
+
"day-label": _.dayLabel,
|
|
173
|
+
ui: _.ui,
|
|
174
|
+
onSelectDate: pe,
|
|
175
|
+
onHoverDate: n[0] ||= (e) => M("hoverDate", e),
|
|
176
|
+
onKeydownDate: fe
|
|
177
|
+
}, null, 8, [
|
|
178
|
+
"calendar-month",
|
|
179
|
+
"weekdays",
|
|
180
|
+
"selected-start",
|
|
181
|
+
"selected-end",
|
|
182
|
+
"tabbable-date",
|
|
183
|
+
"today",
|
|
184
|
+
"weekday-label",
|
|
185
|
+
"month-label",
|
|
186
|
+
"day-label",
|
|
187
|
+
"ui"
|
|
188
|
+
])], 6))), 128))]),
|
|
189
|
+
_: 1
|
|
190
|
+
})], 6))
|
|
191
|
+
], 38)], 2));
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
export { A as default };
|