nuance-ui 0.1.38 → 0.1.39
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/module.json +1 -1
- package/dist/runtime/components/action-icon/action-icon-group.d.vue.ts +2 -2
- package/dist/runtime/components/action-icon/action-icon-group.vue.d.ts +2 -2
- package/dist/runtime/components/action-icon/action-icon-section.d.vue.ts +2 -2
- package/dist/runtime/components/action-icon/action-icon-section.vue.d.ts +2 -2
- package/dist/runtime/components/action-icon/action-icon.d.vue.ts +2 -2
- package/dist/runtime/components/action-icon/action-icon.vue.d.ts +2 -2
- package/dist/runtime/components/alert.d.vue.ts +3 -3
- package/dist/runtime/components/alert.vue.d.ts +3 -3
- package/dist/runtime/components/app-shell/app-shell-aside.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-aside.vue.d.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-footer.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-footer.vue.d.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-header.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-header.vue.d.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-main.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-main.vue.d.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-navbar.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-navbar.vue.d.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-section.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-section.vue.d.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell.vue.d.ts +2 -2
- package/dist/runtime/components/avatar/avatar-group.d.vue.ts +2 -2
- package/dist/runtime/components/avatar/avatar-group.vue.d.ts +2 -2
- package/dist/runtime/components/avatar/avatar.d.vue.ts +2 -2
- package/dist/runtime/components/avatar/avatar.vue.d.ts +2 -2
- package/dist/runtime/components/badge.d.vue.ts +4 -4
- package/dist/runtime/components/badge.vue +45 -24
- package/dist/runtime/components/badge.vue.d.ts +4 -4
- package/dist/runtime/components/box.d.vue.ts +2 -2
- package/dist/runtime/components/box.vue.d.ts +2 -2
- package/dist/runtime/components/breadcrumbs.d.vue.ts +4 -4
- package/dist/runtime/components/breadcrumbs.vue.d.ts +4 -4
- package/dist/runtime/components/button/button-group.d.vue.ts +2 -2
- package/dist/runtime/components/button/button-group.vue.d.ts +2 -2
- package/dist/runtime/components/button/button.d.vue.ts +8 -8
- package/dist/runtime/components/button/button.module.css +1 -1
- package/dist/runtime/components/button/button.vue.d.ts +8 -8
- package/dist/runtime/components/button/unstyled-button.d.vue.ts +2 -2
- package/dist/runtime/components/button/unstyled-button.vue +2 -2
- package/dist/runtime/components/button/unstyled-button.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/calendar.d.vue.ts +20 -8
- package/dist/runtime/components/calendar/calendar.vue +1 -1
- package/dist/runtime/components/calendar/calendar.vue.d.ts +20 -8
- package/dist/runtime/components/calendar/lib/context.d.ts +1 -1
- package/dist/runtime/components/calendar/lib/use-calendar-selection.js +5 -4
- package/dist/runtime/components/calendar/model.d.ts +3 -2
- package/dist/runtime/components/calendar/ui/core/calendar-cell.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +22 -13
- package/dist/runtime/components/calendar/ui/core/calendar-cell.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-header.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-header.vue +22 -17
- package/dist/runtime/components/calendar/ui/core/calendar-header.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-root.d.vue.ts +19 -9
- package/dist/runtime/components/calendar/ui/core/calendar-root.vue +6 -7
- package/dist/runtime/components/calendar/ui/core/calendar-root.vue.d.ts +19 -9
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.d.vue.ts +1 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue.d.ts +1 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-month.d.vue.ts +3 -3
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +9 -16
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue.d.ts +3 -3
- package/dist/runtime/components/calendar/ui/levels/calendar-year.d.vue.ts +1 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +9 -5
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue.d.ts +1 -1
- package/dist/runtime/components/card/card-section.d.vue.ts +2 -2
- package/dist/runtime/components/card/card-section.vue.d.ts +2 -2
- package/dist/runtime/components/card/card.d.vue.ts +2 -2
- package/dist/runtime/components/card/card.vue.d.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox-card.d.vue.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox-card.vue.d.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox-group.d.vue.ts +5 -5
- package/dist/runtime/components/checkbox/checkbox-group.vue.d.ts +5 -5
- package/dist/runtime/components/checkbox/checkbox-indicator.d.vue.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox-indicator.vue.d.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox.d.vue.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox.vue.d.ts +2 -2
- package/dist/runtime/components/chip/chip-group.d.vue.ts +10 -6
- package/dist/runtime/components/chip/chip-group.vue.d.ts +10 -6
- package/dist/runtime/components/chip/chip.d.vue.ts +2 -2
- package/dist/runtime/components/chip/chip.vue.d.ts +2 -2
- package/dist/runtime/components/combobox/combobox-dropdown.d.vue.ts +2 -2
- package/dist/runtime/components/combobox/combobox-dropdown.vue.d.ts +2 -2
- package/dist/runtime/components/combobox/combobox-empty.d.vue.ts +2 -2
- package/dist/runtime/components/combobox/combobox-empty.vue.d.ts +2 -2
- package/dist/runtime/components/combobox/combobox-group.d.vue.ts +10 -6
- package/dist/runtime/components/combobox/combobox-group.vue.d.ts +10 -6
- package/dist/runtime/components/combobox/combobox-option-list.d.vue.ts +2 -2
- package/dist/runtime/components/combobox/combobox-option-list.vue.d.ts +2 -2
- package/dist/runtime/components/combobox/combobox-option.d.vue.ts +8 -4
- package/dist/runtime/components/combobox/combobox-option.vue.d.ts +8 -4
- package/dist/runtime/components/combobox/combobox-options-dropdown.d.vue.ts +10 -7
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue +1 -3
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue.d.ts +10 -7
- package/dist/runtime/components/combobox/combobox-root.d.vue.ts +2 -2
- package/dist/runtime/components/combobox/combobox-root.vue +2 -2
- package/dist/runtime/components/combobox/combobox-root.vue.d.ts +2 -2
- package/dist/runtime/components/combobox/combobox-target.d.vue.ts +2 -2
- package/dist/runtime/components/combobox/combobox-target.vue +1 -1
- package/dist/runtime/components/combobox/combobox-target.vue.d.ts +2 -2
- package/dist/runtime/components/container.d.vue.ts +2 -2
- package/dist/runtime/components/container.vue.d.ts +2 -2
- package/dist/runtime/components/date-time-picker.d.vue.ts +47 -0
- package/dist/runtime/components/date-time-picker.vue +151 -0
- package/dist/runtime/components/date-time-picker.vue.d.ts +47 -0
- package/dist/runtime/components/dialog/index.d.ts +4 -4
- package/dist/runtime/components/dialog/{dialog-close-button.d.vue.ts → ui/dialog-close-button.d.vue.ts} +3 -3
- package/dist/runtime/components/dialog/{dialog-close-button.vue → ui/dialog-close-button.vue} +2 -2
- package/dist/runtime/components/dialog/{dialog-close-button.vue.d.ts → ui/dialog-close-button.vue.d.ts} +3 -3
- package/dist/runtime/components/dialog/{dialog-header.d.vue.ts → ui/dialog-header.d.vue.ts} +3 -3
- package/dist/runtime/components/dialog/{dialog-header.vue → ui/dialog-header.vue} +1 -1
- package/dist/runtime/components/dialog/{dialog-header.vue.d.ts → ui/dialog-header.vue.d.ts} +3 -3
- package/dist/runtime/components/dialog/{dialog-root.d.vue.ts → ui/dialog-root.d.vue.ts} +5 -5
- package/dist/runtime/components/dialog/{dialog-root.vue → ui/dialog-root.vue} +5 -5
- package/dist/runtime/components/dialog/{dialog-root.vue.d.ts → ui/dialog-root.vue.d.ts} +5 -5
- package/dist/runtime/components/dialog/{dialog-title.d.vue.ts → ui/dialog-title.d.vue.ts} +3 -3
- package/dist/runtime/components/dialog/{dialog-title.vue → ui/dialog-title.vue} +2 -2
- package/dist/runtime/components/dialog/{dialog-title.vue.d.ts → ui/dialog-title.vue.d.ts} +3 -3
- package/dist/runtime/components/dialog/ui/dialog.module.css +1 -0
- package/dist/runtime/components/drawer/drawer-close-button.d.vue.ts +2 -2
- package/dist/runtime/components/drawer/drawer-close-button.vue +1 -1
- package/dist/runtime/components/drawer/drawer-close-button.vue.d.ts +2 -2
- package/dist/runtime/components/drawer/drawer-header.d.vue.ts +2 -2
- package/dist/runtime/components/drawer/drawer-header.vue +1 -1
- package/dist/runtime/components/drawer/drawer-header.vue.d.ts +2 -2
- package/dist/runtime/components/drawer/drawer-root.d.vue.ts +2 -2
- package/dist/runtime/components/drawer/drawer-root.vue +3 -3
- package/dist/runtime/components/drawer/drawer-root.vue.d.ts +2 -2
- package/dist/runtime/components/drawer/drawer-title.d.vue.ts +2 -2
- package/dist/runtime/components/drawer/drawer-title.vue +2 -2
- package/dist/runtime/components/drawer/drawer-title.vue.d.ts +2 -2
- package/dist/runtime/components/drawer/drawer.module.css +1 -1
- package/dist/runtime/components/file-upload.d.vue.ts +9 -5
- package/dist/runtime/components/file-upload.vue.d.ts +9 -5
- package/dist/runtime/components/index.d.ts +1 -0
- package/dist/runtime/components/input/date-picker.d.vue.ts +44 -0
- package/dist/runtime/components/input/date-picker.vue +174 -0
- package/dist/runtime/components/input/date-picker.vue.d.ts +44 -0
- package/dist/runtime/components/input/email-input.d.vue.ts +6 -6
- package/dist/runtime/components/input/email-input.vue +9 -5
- package/dist/runtime/components/input/email-input.vue.d.ts +6 -6
- package/dist/runtime/components/input/index.d.ts +2 -1
- package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +2 -2
- package/dist/runtime/components/input/lib/input-wrapper.context.js +1 -2
- package/dist/runtime/components/input/number-input.d.vue.ts +5 -5
- package/dist/runtime/components/input/number-input.vue +19 -18
- package/dist/runtime/components/input/number-input.vue.d.ts +5 -5
- package/dist/runtime/components/input/password-input.d.vue.ts +6 -6
- package/dist/runtime/components/input/password-input.vue +8 -1
- package/dist/runtime/components/input/password-input.vue.d.ts +6 -6
- package/dist/runtime/components/input/text-input.d.vue.ts +21 -11
- package/dist/runtime/components/input/text-input.vue +34 -15
- package/dist/runtime/components/input/text-input.vue.d.ts +21 -11
- package/dist/runtime/components/input/types/index.d.ts +2 -0
- package/dist/runtime/components/input/ui/button-input.d.vue.ts +42 -0
- package/dist/runtime/components/input/ui/button-input.vue +103 -0
- package/dist/runtime/components/input/ui/button-input.vue.d.ts +42 -0
- package/dist/runtime/components/input/ui/input-base.d.vue.ts +11 -63
- package/dist/runtime/components/input/ui/input-base.vue +55 -78
- package/dist/runtime/components/input/ui/input-base.vue.d.ts +11 -63
- package/dist/runtime/components/input/ui/input-inline.d.vue.ts +5 -5
- package/dist/runtime/components/input/ui/input-inline.vue +2 -6
- package/dist/runtime/components/input/ui/input-inline.vue.d.ts +5 -5
- package/dist/runtime/components/input/ui/input-label.vue +2 -5
- package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +5 -5
- package/dist/runtime/components/input/ui/input-wrapper.vue +11 -5
- package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +5 -5
- package/dist/runtime/components/input/ui/spin-input.d.vue.ts +25 -0
- package/dist/runtime/components/input/ui/spin-input.vue +155 -0
- package/dist/runtime/components/input/ui/spin-input.vue.d.ts +25 -0
- package/dist/runtime/components/link/link-button.d.vue.ts +4 -4
- package/dist/runtime/components/link/link-button.vue.d.ts +4 -4
- package/dist/runtime/components/link/link.d.vue.ts +2 -2
- package/dist/runtime/components/link/link.vue +1 -1
- package/dist/runtime/components/link/link.vue.d.ts +2 -2
- package/dist/runtime/components/modal/modal-close-button.d.vue.ts +2 -2
- package/dist/runtime/components/modal/modal-close-button.vue +1 -1
- package/dist/runtime/components/modal/modal-close-button.vue.d.ts +2 -2
- package/dist/runtime/components/modal/modal-header.d.vue.ts +2 -2
- package/dist/runtime/components/modal/modal-header.vue +1 -1
- package/dist/runtime/components/modal/modal-header.vue.d.ts +2 -2
- package/dist/runtime/components/modal/modal-root.d.vue.ts +2 -2
- package/dist/runtime/components/modal/modal-root.vue +3 -3
- package/dist/runtime/components/modal/modal-root.vue.d.ts +2 -2
- package/dist/runtime/components/modal/modal-title.d.vue.ts +2 -2
- package/dist/runtime/components/modal/modal-title.vue +2 -2
- package/dist/runtime/components/modal/modal-title.vue.d.ts +2 -2
- package/dist/runtime/components/nav-link/nav-icon-link.d.vue.ts +2 -2
- package/dist/runtime/components/nav-link/nav-icon-link.vue.d.ts +2 -2
- package/dist/runtime/components/nav-link/nav-link.d.vue.ts +5 -5
- package/dist/runtime/components/nav-link/nav-link.vue.d.ts +5 -5
- package/dist/runtime/components/paper.d.vue.ts +2 -2
- package/dist/runtime/components/paper.vue.d.ts +2 -2
- package/dist/runtime/components/popover/lib/use-popover.d.ts +1 -0
- package/dist/runtime/components/popover/lib/use-popover.js +2 -1
- package/dist/runtime/components/popover/popover-dropdown.vue +2 -0
- package/dist/runtime/components/popover/popover-target.d.vue.ts +7 -3
- package/dist/runtime/components/popover/popover-target.vue +10 -2
- package/dist/runtime/components/popover/popover-target.vue.d.ts +7 -3
- package/dist/runtime/components/popover/popover.vue +1 -1
- package/dist/runtime/components/progress/progress-label.d.vue.ts +2 -2
- package/dist/runtime/components/progress/progress-label.vue.d.ts +2 -2
- package/dist/runtime/components/progress/progress-root.d.vue.ts +2 -2
- package/dist/runtime/components/progress/progress-root.vue.d.ts +2 -2
- package/dist/runtime/components/progress/progress-section.d.vue.ts +2 -2
- package/dist/runtime/components/progress/progress-section.vue.d.ts +2 -2
- package/dist/runtime/components/renderless/renderless.d.vue.ts +2 -2
- package/dist/runtime/components/renderless/renderless.vue.d.ts +2 -2
- package/dist/runtime/components/roving-focus/roving-focus-item.d.vue.ts +2 -2
- package/dist/runtime/components/roving-focus/roving-focus-item.vue.d.ts +2 -2
- package/dist/runtime/components/roving-focus/roving-focus.d.vue.ts +2 -2
- package/dist/runtime/components/roving-focus/roving-focus.vue.d.ts +2 -2
- package/dist/runtime/components/select/select.d.vue.ts +12 -8
- package/dist/runtime/components/select/select.vue +9 -11
- package/dist/runtime/components/select/select.vue.d.ts +12 -8
- package/dist/runtime/components/table/table.d.vue.ts +10 -6
- package/dist/runtime/components/table/table.vue +1 -1
- package/dist/runtime/components/table/table.vue.d.ts +10 -6
- package/dist/runtime/components/tabs/tabs-list.d.vue.ts +2 -2
- package/dist/runtime/components/tabs/tabs-list.vue +1 -1
- package/dist/runtime/components/tabs/tabs-list.vue.d.ts +2 -2
- package/dist/runtime/components/tabs/tabs-panel.d.vue.ts +2 -2
- package/dist/runtime/components/tabs/tabs-panel.vue.d.ts +2 -2
- package/dist/runtime/components/tabs/tabs-root.d.vue.ts +2 -2
- package/dist/runtime/components/tabs/tabs-root.vue.d.ts +2 -2
- package/dist/runtime/components/tabs/tabs-tab.d.vue.ts +4 -4
- package/dist/runtime/components/tabs/tabs-tab.vue.d.ts +4 -4
- package/dist/runtime/components/text.d.vue.ts +2 -2
- package/dist/runtime/components/text.vue +1 -1
- package/dist/runtime/components/text.vue.d.ts +2 -2
- package/dist/runtime/components/textarea.d.vue.ts +11 -9
- package/dist/runtime/components/textarea.vue +42 -30
- package/dist/runtime/components/textarea.vue.d.ts +11 -9
- package/dist/runtime/components/time-picker/index.d.ts +6 -0
- package/dist/runtime/components/time-picker/index.js +5 -0
- package/dist/runtime/components/time-picker/lib/clamp-time.d.ts +13 -0
- package/dist/runtime/components/time-picker/lib/clamp-time.js +23 -0
- package/dist/runtime/components/time-picker/lib/get-parsed-time.d.ts +16 -0
- package/dist/runtime/components/time-picker/lib/get-parsed-time.js +26 -0
- package/dist/runtime/components/time-picker/lib/get-time-string.d.ts +13 -0
- package/dist/runtime/components/time-picker/lib/get-time-string.js +41 -0
- package/dist/runtime/components/time-picker/lib/pad-time.d.ts +1 -0
- package/dist/runtime/components/time-picker/lib/pad-time.js +3 -0
- package/dist/runtime/components/time-picker/lib/split-time-string.d.ts +5 -0
- package/dist/runtime/components/time-picker/lib/split-time-string.js +4 -0
- package/dist/runtime/components/time-picker/lib/use-time-picker.d.ts +29 -0
- package/dist/runtime/components/time-picker/lib/use-time-picker.js +103 -0
- package/dist/runtime/components/time-picker/model.d.ts +17 -0
- package/dist/runtime/components/time-picker/model.js +0 -0
- package/dist/runtime/components/time-picker/time-picker.d.vue.ts +88 -0
- package/dist/runtime/components/time-picker/time-picker.vue +313 -0
- package/dist/runtime/components/time-picker/time-picker.vue.d.ts +88 -0
- package/dist/runtime/components/title.d.vue.ts +2 -2
- package/dist/runtime/components/title.vue +1 -1
- package/dist/runtime/components/title.vue.d.ts +2 -2
- package/dist/runtime/components/tree/_ui/tree-root.d.vue.ts +2 -2
- package/dist/runtime/components/tree/_ui/tree-root.vue.d.ts +2 -2
- package/dist/runtime/components/visually-hidden/visually-hidden-input.d.vue.ts +10 -6
- package/dist/runtime/components/visually-hidden/visually-hidden-input.vue.d.ts +10 -6
- package/dist/runtime/components/visually-hidden/visually-hidden.d.vue.ts +2 -2
- package/dist/runtime/components/visually-hidden/visually-hidden.vue.d.ts +2 -2
- package/dist/runtime/composals/use-date-config.d.ts +11 -1
- package/dist/runtime/composals/use-date-config.js +8 -5
- package/dist/runtime/helpers/date/create-months.d.ts +1 -7
- package/dist/runtime/helpers/date/create-months.js +1 -1
- package/dist/runtime/helpers/date/get-days-between.js +4 -1
- package/dist/runtime/types/index.d.ts +1 -1
- package/package.json +18 -18
- package/dist/runtime/components/dialog/dialog.module.css +0 -1
- package/dist/runtime/components/input/input.d.vue.ts +0 -38
- package/dist/runtime/components/input/input.vue +0 -47
- package/dist/runtime/components/input/input.vue.d.ts +0 -38
- /package/dist/runtime/components/dialog/{types/index.d.ts → model.d.ts} +0 -0
- /package/dist/runtime/components/dialog/{types/index.js → model.js} +0 -0
|
@@ -10,10 +10,10 @@ export interface ButtonProps extends BoxProps {
|
|
|
10
10
|
radius?: NuanceRadius;
|
|
11
11
|
/** Styles API */
|
|
12
12
|
classes?: {
|
|
13
|
-
root?: string;
|
|
14
|
-
inner?: string;
|
|
15
|
-
label?: string;
|
|
16
|
-
section?: string;
|
|
13
|
+
root?: string | string[];
|
|
14
|
+
inner?: string | string[];
|
|
15
|
+
label?: string | string[];
|
|
16
|
+
section?: string | string[];
|
|
17
17
|
};
|
|
18
18
|
/** section pointer-events */
|
|
19
19
|
leftSectionPE?: CSSStyleDeclaration['pointerEvents'];
|
|
@@ -22,13 +22,13 @@ export interface ButtonProps extends BoxProps {
|
|
|
22
22
|
rightSectionPE?: CSSStyleDeclaration['pointerEvents'];
|
|
23
23
|
rightSectionProps?: HTMLAttributes;
|
|
24
24
|
}
|
|
25
|
-
declare var
|
|
25
|
+
declare var __VLS_19: {}, __VLS_21: {}, __VLS_23: {};
|
|
26
26
|
type __VLS_Slots = {} & {
|
|
27
|
-
leftSection?: (props: typeof
|
|
27
|
+
leftSection?: (props: typeof __VLS_19) => any;
|
|
28
28
|
} & {
|
|
29
|
-
default?: (props: typeof
|
|
29
|
+
default?: (props: typeof __VLS_21) => any;
|
|
30
30
|
} & {
|
|
31
|
-
rightSection?: (props: typeof
|
|
31
|
+
rightSection?: (props: typeof __VLS_23) => any;
|
|
32
32
|
};
|
|
33
33
|
declare const __VLS_base: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.root{--button-height-xs:rem(30px);--button-height-sm:rem(36px);--button-height-md:rem(42px);--button-height-lg:rem(50px);--button-height-xl:rem(60px);--button-height-compact-xs:rem(22px);--button-height-compact-sm:rem(26px);--button-height-compact-md:rem(30px);--button-height-compact-lg:rem(34px);--button-height-compact-xl:rem(40px);--button-padding-x-xs:rem(14px);--button-padding-x-sm:rem(18px);--button-padding-x-md:rem(22px);--button-padding-x-lg:rem(26px);--button-padding-x-xl:rem(32px);--button-padding-x-compact-xs:rem(7px);--button-padding-x-compact-sm:rem(8px);--button-padding-x-compact-md:rem(10px);--button-padding-x-compact-lg:rem(12px);--button-padding-x-compact-xl:rem(14px);--button-height:var(--button-height-sm);--button-padding-x:var(--button-padding-x-sm);--button-color:var(--color-white);--button-fz:var(--font-size-sm);--button-bg:var(--color-primary-filled);--button-radius:var(--radius-default);--button-hover:var(--color-primary-filled-hover);background:var(--button-bg);border:var(--button-bd,rem(1px) solid transparent);border-radius:var(--button-radius);color:var(--button-color,var(--color-white));cursor:pointer;display:inline-block;font-size:var(--button-fz);font-weight:600;height:var(--button-height,var(--button-height-sm));line-height:1;overflow:hidden;padding-inline:var(--button-padding-x,var(--button-padding-x-sm));position:relative;text-align:center;transition:background-color .2s ease-in,color .2s ease-in;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:auto}.root:where([data-with-left-section]){padding-inline-start:
|
|
1
|
+
.root{--button-height-xs:rem(30px);--button-height-sm:rem(36px);--button-height-md:rem(42px);--button-height-lg:rem(50px);--button-height-xl:rem(60px);--button-height-compact-xs:rem(22px);--button-height-compact-sm:rem(26px);--button-height-compact-md:rem(30px);--button-height-compact-lg:rem(34px);--button-height-compact-xl:rem(40px);--button-padding-x-xs:rem(14px);--button-padding-x-sm:rem(18px);--button-padding-x-md:rem(22px);--button-padding-x-lg:rem(26px);--button-padding-x-xl:rem(32px);--button-padding-x-compact-xs:rem(7px);--button-padding-x-compact-sm:rem(8px);--button-padding-x-compact-md:rem(10px);--button-padding-x-compact-lg:rem(12px);--button-padding-x-compact-xl:rem(14px);--button-height:var(--button-height-sm);--button-padding-x:var(--button-padding-x-sm);--button-color:var(--color-white);--button-fz:var(--font-size-sm);--button-bg:var(--color-primary-filled);--button-radius:var(--radius-default);--button-hover:var(--color-primary-filled-hover);--button-section-size:calc(var(--button-height) - 0.25rem);background:var(--button-bg);border:var(--button-bd,rem(1px) solid transparent);border-radius:var(--button-radius);color:var(--button-color,var(--color-white));cursor:pointer;display:inline-block;font-size:var(--button-fz);font-weight:600;height:var(--button-height,var(--button-height-sm));line-height:1;overflow:hidden;padding-inline:var(--button-padding-x,var(--button-padding-x-sm));position:relative;text-align:center;transition:background-color .2s ease-in,color .2s ease-in;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:auto}.root:where([data-with-left-section]){padding-inline-start:0}.root:where([data-with-right-section]){padding-inline-end:0}.root:where([data-variant=gradient-outline]){background-clip:padding-box,border-box;background-origin:border-box}.root:where(:disabled:not([data-loading])){background:var(--color-disabled);border:1px solid transparent;color:var(--color-disabled);cursor:not-allowed;transform:none}.root:before{border-radius:var(--button-radius,var(--radius-default));content:"";filter:blur(12px);inset:-1px;opacity:0;pointer-events:none;position:absolute;transform:translateY(-100%);transition:transform .15s ease,opacity .1s ease;@mixin where-light{background:var(--color-gray-1);color:var(--color-gray-5)}@mixin where-dark{background:var(--color-dark-6);color:var(--color-dark-3)}}.root:where([data-loading]){cursor:not-allowed;transform:none}.root:where([data-loading]):before{opacity:1;transform:translateY(0)}.root:where([data-loading]) .inner{opacity:0;transform:translateY(100%)}.root:hover:where(:not([data-loading],:disabled)){background:var(--button-hover);color:var(--button-color)}.root:hover:where(:not([data-loading],:disabled)):where([data-variant=gradient-outline]){color:#fff}.inner{gap:var(--spacing-xs);justify-content:center;overflow:visible;transition:transform .15s ease,opacity .1s ease;width:100%}.inner,.label{align-items:center;display:flex;height:100%}.label{flex:1;opacity:1;overflow:hidden;white-space:nowrap}.label:where([data-loading]){opacity:.2}.section{--section-pointer-events:none;align-items:center;display:flex;height:100%;justify-content:center;pointer-events:var(--section-pointer-events);width:var(--button-section-size)}.loader{left:calc(50% - var(--loader-size)/2);position:absolute;top:calc(50% - var(--loader-size)/2)}.group{--button-border-width:1px;display:flex}.group :where(.root):focus{position:relative;z-index:1}.group[data-orientation=horizontal]{flex-direction:row}.group[data-orientation=horizontal] .root:not(:only-child):first-child{border-end-end-radius:0;border-inline-end-width:calc(var(--button-border-width)/2);border-start-end-radius:0}.group[data-orientation=horizontal] .root:not(:only-child):last-child{border-end-start-radius:0;border-inline-start-width:calc(var(--button-border-width)/2);border-start-start-radius:0}.group[data-orientation=horizontal] .root:not(:only-child):not(:first-child):not(:last-child){border-inline-width:calc(var(--button-border-width)/2);border-radius:0}.group[data-orientation=vertical]{flex-direction:column}.group[data-orientation=vertical] .root:not(:only-child):first-child{border-bottom-width:calc(var(--button-border-width)/2);border-end-end-radius:0;border-end-start-radius:0}.group[data-orientation=vertical] .root:not(:only-child):last-child{border-start-end-radius:0;border-start-start-radius:0;border-top-width:calc(var(--button-border-width)/2)}.group[data-orientation=vertical] .root:not(:only-child):not(:first-child):not(:last-child){border-bottom-width:calc(var(--button-border-width)/2);border-radius:0;border-top-width:calc(var(--button-border-width)/2)}
|
|
@@ -10,10 +10,10 @@ export interface ButtonProps extends BoxProps {
|
|
|
10
10
|
radius?: NuanceRadius;
|
|
11
11
|
/** Styles API */
|
|
12
12
|
classes?: {
|
|
13
|
-
root?: string;
|
|
14
|
-
inner?: string;
|
|
15
|
-
label?: string;
|
|
16
|
-
section?: string;
|
|
13
|
+
root?: string | string[];
|
|
14
|
+
inner?: string | string[];
|
|
15
|
+
label?: string | string[];
|
|
16
|
+
section?: string | string[];
|
|
17
17
|
};
|
|
18
18
|
/** section pointer-events */
|
|
19
19
|
leftSectionPE?: CSSStyleDeclaration['pointerEvents'];
|
|
@@ -22,13 +22,13 @@ export interface ButtonProps extends BoxProps {
|
|
|
22
22
|
rightSectionPE?: CSSStyleDeclaration['pointerEvents'];
|
|
23
23
|
rightSectionProps?: HTMLAttributes;
|
|
24
24
|
}
|
|
25
|
-
declare var
|
|
25
|
+
declare var __VLS_19: {}, __VLS_21: {}, __VLS_23: {};
|
|
26
26
|
type __VLS_Slots = {} & {
|
|
27
|
-
leftSection?: (props: typeof
|
|
27
|
+
leftSection?: (props: typeof __VLS_19) => any;
|
|
28
28
|
} & {
|
|
29
|
-
default?: (props: typeof
|
|
29
|
+
default?: (props: typeof __VLS_21) => any;
|
|
30
30
|
} & {
|
|
31
|
-
rightSection?: (props: typeof
|
|
31
|
+
rightSection?: (props: typeof __VLS_23) => any;
|
|
32
32
|
};
|
|
33
33
|
declare const __VLS_base: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -2,9 +2,9 @@ import type { BoxProps } from '../box.vue.js';
|
|
|
2
2
|
import type { InputBaseProps } from '../input/index.js';
|
|
3
3
|
interface UnstyledButtonProps extends InputBaseProps, BoxProps {
|
|
4
4
|
}
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_8: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof
|
|
7
|
+
default?: (props: typeof __VLS_8) => any;
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_base: import("vue").DefineComponent<UnstyledButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<UnstyledButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -9,13 +9,13 @@ const { is = "button", ...props } = defineProps({
|
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
11
|
<template>
|
|
12
|
-
<Box :is
|
|
12
|
+
<Box :is :class='$style.unstyled' v-bind='props' type='button'>
|
|
13
13
|
<slot />
|
|
14
14
|
</Box>
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<style module lang="postcss">
|
|
18
|
-
.
|
|
18
|
+
:where(.unstyled) {
|
|
19
19
|
touch-action: manipulation;
|
|
20
20
|
cursor: pointer;
|
|
21
21
|
|
|
@@ -2,9 +2,9 @@ import type { BoxProps } from '../box.vue.js';
|
|
|
2
2
|
import type { InputBaseProps } from '../input/index.js';
|
|
3
3
|
interface UnstyledButtonProps extends InputBaseProps, BoxProps {
|
|
4
4
|
}
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_8: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof
|
|
7
|
+
default?: (props: typeof __VLS_8) => any;
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_base: import("vue").DefineComponent<UnstyledButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<UnstyledButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -4,7 +4,7 @@ import type { CalendarLevel, DateSelection, SelectionMode } from './model.js';
|
|
|
4
4
|
import type { CalendarRootProps } from './ui/core/index.js';
|
|
5
5
|
export interface CalendarProps<T extends SelectionMode = 'single'> extends CalendarRootProps<T> {
|
|
6
6
|
/** Controls size */
|
|
7
|
-
size?: NuanceSize;
|
|
7
|
+
size?: NuanceSize | string;
|
|
8
8
|
/** Determines whether week numbers should be displayed @default `false` */
|
|
9
9
|
withWeekNumbers?: boolean;
|
|
10
10
|
/** Callback function to determine whether the prev button should be disabled */
|
|
@@ -18,8 +18,8 @@ export interface CalendarProps<T extends SelectionMode = 'single'> extends Calen
|
|
|
18
18
|
/** Detects the presence of spaces between cells. @default `true` */
|
|
19
19
|
withCellSpacing?: boolean;
|
|
20
20
|
}
|
|
21
|
-
declare const __VLS_export: <T extends SelectionMode = "single">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>,
|
|
22
|
-
props: __VLS_PrettifyLocal<(CalendarProps<T> & {
|
|
21
|
+
declare const __VLS_export: <T extends SelectionMode = "single">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
22
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(CalendarProps<T> & {
|
|
23
23
|
date?: DateInput;
|
|
24
24
|
level?: CalendarLevel;
|
|
25
25
|
value?: DateSelection<T>;
|
|
@@ -31,24 +31,36 @@ declare const __VLS_export: <T extends SelectionMode = "single">(__VLS_props: No
|
|
|
31
31
|
"onUpdate:date"?: ((value: DateInput) => any) | undefined;
|
|
32
32
|
"onUpdate:level"?: ((value: CalendarLevel) => any) | undefined;
|
|
33
33
|
"onUpdate:value"?: ((value: DateSelection<T> | undefined) => any) | undefined;
|
|
34
|
-
}> &
|
|
34
|
+
}> & (typeof globalThis extends {
|
|
35
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
36
|
+
} ? P : {});
|
|
35
37
|
expose: (exposed: {}) => void;
|
|
36
38
|
attrs: any;
|
|
37
39
|
slots: {
|
|
38
40
|
level?: (props: {
|
|
39
|
-
config:
|
|
41
|
+
config: Omit<import("@formkit/tempo").FormatOptions, "date" | "format"> & {
|
|
42
|
+
firstDayOfWeek: number;
|
|
43
|
+
} & {
|
|
44
|
+
firstDayOfWeek: number;
|
|
45
|
+
locale?: string;
|
|
46
|
+
genitive?: boolean;
|
|
47
|
+
tz?: string;
|
|
48
|
+
partFilter?: (part: import("@formkit/tempo").Part) => boolean;
|
|
49
|
+
};
|
|
40
50
|
}) => any;
|
|
41
51
|
} & {
|
|
42
52
|
weekday?: (props: {}) => any;
|
|
43
53
|
} & {
|
|
44
54
|
day?: (props: {}) => any;
|
|
45
55
|
};
|
|
46
|
-
emit: (((evt: "select", args_0: DateSelection<T>) => void) & ((evt: "next") => void) & ((evt: "prev") => void) & ((evt: "level") => void)) & (((
|
|
56
|
+
emit: (((evt: "select", args_0: DateSelection<T>) => void) & ((evt: "next") => void) & ((evt: "prev") => void) & ((evt: "level") => void)) & (((event: "update:date", value: DateInput) => void) & ((event: "update:level", value: CalendarLevel) => void) & ((event: "update:value", value: DateSelection<T> | undefined) => void));
|
|
47
57
|
}>) => import("vue").VNode & {
|
|
48
58
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
49
59
|
};
|
|
50
60
|
declare const _default: typeof __VLS_export;
|
|
51
61
|
export default _default;
|
|
52
|
-
type __VLS_PrettifyLocal<T> = {
|
|
62
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
63
|
+
[K in keyof T]: T[K];
|
|
64
|
+
} : {
|
|
53
65
|
[K in keyof T as K]: T[K];
|
|
54
|
-
} & {};
|
|
66
|
+
}) & {};
|
|
@@ -18,7 +18,6 @@ const props = defineProps({
|
|
|
18
18
|
maxDate: { type: [Date, String], required: false },
|
|
19
19
|
excludeDate: { type: Function, required: false },
|
|
20
20
|
highlightToday: { type: Boolean, required: false, default: true },
|
|
21
|
-
hideWeekdays: { type: Boolean, required: false, default: false },
|
|
22
21
|
hideOutsideDates: { type: Boolean, required: false, default: false },
|
|
23
22
|
disabled: { type: Boolean, required: false, default: false },
|
|
24
23
|
readonly: { type: Boolean, required: false, default: false },
|
|
@@ -122,6 +121,7 @@ const [calendars, nav] = useCalendarNavigation({
|
|
|
122
121
|
|
|
123
122
|
display: flex;
|
|
124
123
|
gap: var(--spacing-sm);
|
|
124
|
+
|
|
125
125
|
width: fit-content;
|
|
126
126
|
}
|
|
127
127
|
</style>
|
|
@@ -4,7 +4,7 @@ import type { CalendarLevel, DateSelection, SelectionMode } from './model.js';
|
|
|
4
4
|
import type { CalendarRootProps } from './ui/core/index.js';
|
|
5
5
|
export interface CalendarProps<T extends SelectionMode = 'single'> extends CalendarRootProps<T> {
|
|
6
6
|
/** Controls size */
|
|
7
|
-
size?: NuanceSize;
|
|
7
|
+
size?: NuanceSize | string;
|
|
8
8
|
/** Determines whether week numbers should be displayed @default `false` */
|
|
9
9
|
withWeekNumbers?: boolean;
|
|
10
10
|
/** Callback function to determine whether the prev button should be disabled */
|
|
@@ -18,8 +18,8 @@ export interface CalendarProps<T extends SelectionMode = 'single'> extends Calen
|
|
|
18
18
|
/** Detects the presence of spaces between cells. @default `true` */
|
|
19
19
|
withCellSpacing?: boolean;
|
|
20
20
|
}
|
|
21
|
-
declare const __VLS_export: <T extends SelectionMode = "single">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>,
|
|
22
|
-
props: __VLS_PrettifyLocal<(CalendarProps<T> & {
|
|
21
|
+
declare const __VLS_export: <T extends SelectionMode = "single">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
22
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(CalendarProps<T> & {
|
|
23
23
|
date?: DateInput;
|
|
24
24
|
level?: CalendarLevel;
|
|
25
25
|
value?: DateSelection<T>;
|
|
@@ -31,24 +31,36 @@ declare const __VLS_export: <T extends SelectionMode = "single">(__VLS_props: No
|
|
|
31
31
|
"onUpdate:date"?: ((value: DateInput) => any) | undefined;
|
|
32
32
|
"onUpdate:level"?: ((value: CalendarLevel) => any) | undefined;
|
|
33
33
|
"onUpdate:value"?: ((value: DateSelection<T> | undefined) => any) | undefined;
|
|
34
|
-
}> &
|
|
34
|
+
}> & (typeof globalThis extends {
|
|
35
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
36
|
+
} ? P : {});
|
|
35
37
|
expose: (exposed: {}) => void;
|
|
36
38
|
attrs: any;
|
|
37
39
|
slots: {
|
|
38
40
|
level?: (props: {
|
|
39
|
-
config:
|
|
41
|
+
config: Omit<import("@formkit/tempo").FormatOptions, "date" | "format"> & {
|
|
42
|
+
firstDayOfWeek: number;
|
|
43
|
+
} & {
|
|
44
|
+
firstDayOfWeek: number;
|
|
45
|
+
locale?: string;
|
|
46
|
+
genitive?: boolean;
|
|
47
|
+
tz?: string;
|
|
48
|
+
partFilter?: (part: import("@formkit/tempo").Part) => boolean;
|
|
49
|
+
};
|
|
40
50
|
}) => any;
|
|
41
51
|
} & {
|
|
42
52
|
weekday?: (props: {}) => any;
|
|
43
53
|
} & {
|
|
44
54
|
day?: (props: {}) => any;
|
|
45
55
|
};
|
|
46
|
-
emit: (((evt: "select", args_0: DateSelection<T>) => void) & ((evt: "next") => void) & ((evt: "prev") => void) & ((evt: "level") => void)) & (((
|
|
56
|
+
emit: (((evt: "select", args_0: DateSelection<T>) => void) & ((evt: "next") => void) & ((evt: "prev") => void) & ((evt: "level") => void)) & (((event: "update:date", value: DateInput) => void) & ((event: "update:level", value: CalendarLevel) => void) & ((event: "update:value", value: DateSelection<T> | undefined) => void));
|
|
47
57
|
}>) => import("vue").VNode & {
|
|
48
58
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
49
59
|
};
|
|
50
60
|
declare const _default: typeof __VLS_export;
|
|
51
61
|
export default _default;
|
|
52
|
-
type __VLS_PrettifyLocal<T> = {
|
|
62
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
63
|
+
[K in keyof T]: T[K];
|
|
64
|
+
} : {
|
|
53
65
|
[K in keyof T as K]: T[K];
|
|
54
|
-
} & {};
|
|
66
|
+
}) & {};
|
|
@@ -25,10 +25,11 @@ export function useCalendarSelection({
|
|
|
25
25
|
}
|
|
26
26
|
case "range": {
|
|
27
27
|
const [start, end] = value.value;
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return
|
|
28
|
+
if (start || end) {
|
|
29
|
+
const isStart = !!start && sameDay(date, start);
|
|
30
|
+
const isEnd = !!end && sameDay(date, end);
|
|
31
|
+
return isStart || isEnd;
|
|
32
|
+
}
|
|
32
33
|
return false;
|
|
33
34
|
}
|
|
34
35
|
case "week": {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FormatOptions } from '@formkit/tempo';
|
|
2
2
|
/**
|
|
3
3
|
* `@formkit/tempo` config
|
|
4
4
|
*/
|
|
5
5
|
export type CalendarSettings = Omit<FormatOptions, 'date'>;
|
|
6
6
|
export type CalendarLevel = 'month' | 'year' | 'decade';
|
|
7
7
|
export type SelectionMode = 'single' | 'range' | 'week' | 'multiple';
|
|
8
|
-
|
|
8
|
+
/** ISO string value */
|
|
9
|
+
export type Selection = string | null;
|
|
9
10
|
export type DateSelection<T extends SelectionMode = 'single'> = T extends 'single' ? Selection : T extends 'range' ? [Selection, Selection] : T extends 'week' ? [Selection, Selection] : T extends 'multiple' ? Selection[] : never;
|
|
@@ -3,9 +3,9 @@ import type { BoxProps } from '../../../box.vue.js';
|
|
|
3
3
|
export interface CalendarCellProps extends BoxProps {
|
|
4
4
|
size?: NuanceSize | string;
|
|
5
5
|
}
|
|
6
|
-
declare var
|
|
6
|
+
declare var __VLS_8: {};
|
|
7
7
|
type __VLS_Slots = {} & {
|
|
8
|
-
default?: (props: typeof
|
|
8
|
+
default?: (props: typeof __VLS_8) => any;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: import("vue").DefineComponent<CalendarCellProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalendarCellProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -27,18 +27,22 @@ const style = computed(() => ({
|
|
|
27
27
|
--day-size-xl: rem(54px);
|
|
28
28
|
--day-size: var(--day-size-sm);
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
user-select: none;
|
|
32
|
+
|
|
33
33
|
display: inline-flex;
|
|
34
|
-
justify-content: center;
|
|
35
34
|
align-items: center;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
justify-content: center;
|
|
36
|
+
|
|
37
|
+
width: var(--day-size, var(--day-size-sm));
|
|
38
|
+
height: var(--day-size, var(--day-size-sm));
|
|
39
39
|
border-radius: var(--radius-default);
|
|
40
|
+
|
|
41
|
+
font-size: calc(var(--day-size) / 2.8);
|
|
40
42
|
color: var(--color-text);
|
|
41
43
|
|
|
44
|
+
background-color: transparent;
|
|
45
|
+
|
|
42
46
|
&:hover {
|
|
43
47
|
&:where(:not([data-static], &:disabled, [data-selected], [data-in-range])) {
|
|
44
48
|
@mixin light {
|
|
@@ -52,8 +56,8 @@ const style = computed(() => ({
|
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
&:where([data-static]) {
|
|
55
|
-
user-select: auto;
|
|
56
59
|
cursor: default;
|
|
60
|
+
user-select: auto;
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
&:where([data-weekend]) {
|
|
@@ -61,6 +65,7 @@ const style = computed(() => ({
|
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
&:where([data-outside]) {
|
|
68
|
+
/* stylelint-disable-next-line function-no-unknown */
|
|
64
69
|
color: alpha(var(--color-dimmed), .5);
|
|
65
70
|
}
|
|
66
71
|
|
|
@@ -79,9 +84,10 @@ const style = computed(() => ({
|
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
&:where([data-in-range]) {
|
|
82
|
-
background-color: var(--color-primary-light-hover);
|
|
83
87
|
border-radius: 0;
|
|
84
88
|
|
|
89
|
+
background-color: var(--color-primary-light-hover);
|
|
90
|
+
|
|
85
91
|
&:hover {
|
|
86
92
|
&:where(:not(:disabled, [data-static])) {
|
|
87
93
|
background-color: var(--color-primary-light);
|
|
@@ -97,8 +103,8 @@ const style = computed(() => ({
|
|
|
97
103
|
|
|
98
104
|
&:where([data-last-in-range]) {
|
|
99
105
|
border-radius: 0;
|
|
100
|
-
border-end-end-radius: var(--radius-default);
|
|
101
106
|
border-start-end-radius: var(--radius-default);
|
|
107
|
+
border-end-end-radius: var(--radius-default);
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
&:where([data-last-in-range][data-first-in-range]) {
|
|
@@ -106,9 +112,10 @@ const style = computed(() => ({
|
|
|
106
112
|
}
|
|
107
113
|
|
|
108
114
|
&:where([data-selected]) {
|
|
109
|
-
background-color: var(--color-primary-filled);
|
|
110
115
|
color: var(--color-white);
|
|
111
116
|
|
|
117
|
+
background-color: var(--color-primary-filled);
|
|
118
|
+
|
|
112
119
|
&:hover {
|
|
113
120
|
&:where(:not(:disabled, [data-static])) {
|
|
114
121
|
background-color: var(--color-primary-filled-hover);
|
|
@@ -117,9 +124,11 @@ const style = computed(() => ({
|
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
&:where(:disabled) {
|
|
120
|
-
color: alpha(var(--color-disabled), .5);
|
|
121
|
-
cursor: not-allowed;
|
|
122
127
|
pointer-events: none;
|
|
128
|
+
cursor: not-allowed;
|
|
129
|
+
|
|
130
|
+
/* stylelint-disable-next-line function-no-unknown */
|
|
131
|
+
color: alpha(var(--color-disabled), .5);
|
|
123
132
|
}
|
|
124
133
|
}
|
|
125
134
|
</style>
|
|
@@ -3,9 +3,9 @@ import type { BoxProps } from '../../../box.vue.js';
|
|
|
3
3
|
export interface CalendarCellProps extends BoxProps {
|
|
4
4
|
size?: NuanceSize | string;
|
|
5
5
|
}
|
|
6
|
-
declare var
|
|
6
|
+
declare var __VLS_8: {};
|
|
7
7
|
type __VLS_Slots = {} & {
|
|
8
|
-
default?: (props: typeof
|
|
8
|
+
default?: (props: typeof __VLS_8) => any;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: import("vue").DefineComponent<CalendarCellProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalendarCellProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -14,9 +14,9 @@ export interface CalendarHeaderEmits {
|
|
|
14
14
|
level: [];
|
|
15
15
|
next: [];
|
|
16
16
|
}
|
|
17
|
-
declare var
|
|
17
|
+
declare var __VLS_29: {};
|
|
18
18
|
type __VLS_Slots = {} & {
|
|
19
|
-
default?: (props: typeof
|
|
19
|
+
default?: (props: typeof __VLS_29) => any;
|
|
20
20
|
};
|
|
21
21
|
declare const __VLS_base: import("vue").DefineComponent<CalendarHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
22
|
next: () => any;
|
|
@@ -59,28 +59,31 @@ defineEmits(["prev", "level", "next"]);
|
|
|
59
59
|
|
|
60
60
|
<style lang="postcss" module>
|
|
61
61
|
.header {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
--dch-control-size-xs: rem(30px);
|
|
63
|
+
--dch-control-size-sm: rem(36px);
|
|
64
|
+
--dch-control-size-md: rem(42px);
|
|
65
|
+
--dch-control-size-lg: rem(48px);
|
|
66
|
+
--dch-control-size-xl: rem(54px);
|
|
67
|
+
--dch-control-size: var(--dch-control-size-sm);
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
--dch-control-radius: var(--radius-default);
|
|
70
70
|
|
|
71
71
|
display: flex;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.level,
|
|
75
75
|
.control {
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
user-select: none;
|
|
78
|
+
|
|
78
79
|
display: flex;
|
|
79
|
-
justify-content: center;
|
|
80
80
|
align-items: center;
|
|
81
|
-
|
|
81
|
+
justify-content: center;
|
|
82
|
+
|
|
83
|
+
height: var(--dch-control-size);
|
|
84
|
+
border-radius: var(--dch-control-radius);
|
|
85
|
+
|
|
82
86
|
opacity: 1;
|
|
83
|
-
cursor: pointer;
|
|
84
87
|
|
|
85
88
|
&:where([data-static]) {
|
|
86
89
|
cursor: default;
|
|
@@ -99,16 +102,18 @@ defineEmits(["prev", "level", "next"]);
|
|
|
99
102
|
}
|
|
100
103
|
|
|
101
104
|
&:where(:disabled) {
|
|
102
|
-
opacity: 0.2;
|
|
103
105
|
cursor: not-allowed;
|
|
106
|
+
|
|
107
|
+
opacity: 0.2;
|
|
104
108
|
}
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
.level {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
flex: 1;
|
|
113
|
+
|
|
114
|
+
font-size: var(--dch-fz, var(--font-size-sm));
|
|
115
|
+
font-weight: 500;
|
|
116
|
+
text-transform: capitalize;
|
|
112
117
|
}
|
|
113
118
|
|
|
114
119
|
.control {
|
|
@@ -14,9 +14,9 @@ export interface CalendarHeaderEmits {
|
|
|
14
14
|
level: [];
|
|
15
15
|
next: [];
|
|
16
16
|
}
|
|
17
|
-
declare var
|
|
17
|
+
declare var __VLS_29: {};
|
|
18
18
|
type __VLS_Slots = {} & {
|
|
19
|
-
default?: (props: typeof
|
|
19
|
+
default?: (props: typeof __VLS_29) => any;
|
|
20
20
|
};
|
|
21
21
|
declare const __VLS_base: import("vue").DefineComponent<CalendarHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
22
|
next: () => any;
|
|
@@ -19,8 +19,6 @@ export interface CalendarRootProps<T extends SelectionMode> {
|
|
|
19
19
|
excludeDate?: DateMatcher;
|
|
20
20
|
/** Determines whether today should be highlighted with a border @default `false` */
|
|
21
21
|
highlightToday?: boolean;
|
|
22
|
-
/** Determines whether weekdays row should be hidden @default `false` */
|
|
23
|
-
hideWeekdays?: boolean;
|
|
24
22
|
/** Determines whether outside dates should be hidden @default `false` */
|
|
25
23
|
hideOutsideDates?: boolean;
|
|
26
24
|
/** Whether the calendar is disabled */
|
|
@@ -30,28 +28,40 @@ export interface CalendarRootProps<T extends SelectionMode> {
|
|
|
30
28
|
/** `@formkit/tempo` locale config */
|
|
31
29
|
config?: DateConfig;
|
|
32
30
|
}
|
|
33
|
-
declare const __VLS_export: <T extends SelectionMode = "single">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>,
|
|
34
|
-
props: __VLS_PrettifyLocal<(CalendarRootProps<T> & {
|
|
31
|
+
declare const __VLS_export: <T extends SelectionMode = "single">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
32
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(CalendarRootProps<T> & {
|
|
35
33
|
date: DateInput;
|
|
36
34
|
select?: DateSelection<T>;
|
|
37
35
|
}) & {
|
|
38
36
|
onSelect?: ((args_0: DateSelection<T>) => any) | undefined;
|
|
39
37
|
"onUpdate:date"?: ((value: DateInput) => any) | undefined;
|
|
40
38
|
"onUpdate:select"?: ((value: DateSelection<T>) => any) | undefined;
|
|
41
|
-
}> &
|
|
39
|
+
}> & (typeof globalThis extends {
|
|
40
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
41
|
+
} ? P : {});
|
|
42
42
|
expose: (exposed: {}) => void;
|
|
43
43
|
attrs: any;
|
|
44
44
|
slots: {
|
|
45
45
|
default?: (props: {
|
|
46
|
-
config:
|
|
46
|
+
config: Omit<import("@formkit/tempo").FormatOptions, "date" | "format"> & {
|
|
47
|
+
firstDayOfWeek: number;
|
|
48
|
+
} & {
|
|
49
|
+
firstDayOfWeek: number;
|
|
50
|
+
locale?: string;
|
|
51
|
+
genitive?: boolean;
|
|
52
|
+
tz?: string;
|
|
53
|
+
partFilter?: (part: import("@formkit/tempo").Part) => boolean;
|
|
54
|
+
};
|
|
47
55
|
}) => any;
|
|
48
56
|
};
|
|
49
|
-
emit: ((evt: "select", args_0: DateSelection<T>) => void) & (((
|
|
57
|
+
emit: ((evt: "select", args_0: DateSelection<T>) => void) & (((event: "update:date", value: DateInput) => void) & ((event: "update:select", value: DateSelection<T>) => void));
|
|
50
58
|
}>) => import("vue").VNode & {
|
|
51
59
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
52
60
|
};
|
|
53
61
|
declare const _default: typeof __VLS_export;
|
|
54
62
|
export default _default;
|
|
55
|
-
type __VLS_PrettifyLocal<T> = {
|
|
63
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
64
|
+
[K in keyof T]: T[K];
|
|
65
|
+
} : {
|
|
56
66
|
[K in keyof T as K]: T[K];
|
|
57
|
-
} & {};
|
|
67
|
+
}) & {};
|
|
@@ -14,7 +14,6 @@ const props = defineProps({
|
|
|
14
14
|
maxDate: { type: [Date, String], required: false },
|
|
15
15
|
excludeDate: { type: Function, required: false },
|
|
16
16
|
highlightToday: { type: Boolean, required: false, default: true },
|
|
17
|
-
hideWeekdays: { type: Boolean, required: false, default: false },
|
|
18
17
|
hideOutsideDates: { type: Boolean, required: false, default: false },
|
|
19
18
|
disabled: { type: Boolean, required: false, default: false },
|
|
20
19
|
readonly: { type: Boolean, required: false, default: false },
|
|
@@ -22,14 +21,14 @@ const props = defineProps({
|
|
|
22
21
|
});
|
|
23
22
|
const emit = defineEmits(["select"]);
|
|
24
23
|
const date = defineModel("date", { type: [Date, String], ...{ required: true } });
|
|
25
|
-
const config =
|
|
24
|
+
const config = useDatesConfig(props.config);
|
|
26
25
|
const hideOutsideDates = computed(() => props.numberOfMonths && props.numberOfMonths > 1 || props.hideOutsideDates);
|
|
27
26
|
const weekdays = computed(() => {
|
|
28
|
-
const days = range(props.weekdayFormat, config
|
|
29
|
-
if (config.
|
|
27
|
+
const days = range(props.weekdayFormat, config?.locale, config?.genitive);
|
|
28
|
+
if (config.firstDayOfWeek === 1) {
|
|
30
29
|
return [
|
|
31
|
-
...days.slice(config.
|
|
32
|
-
...days.slice(0, config.
|
|
30
|
+
...days.slice(config.firstDayOfWeek),
|
|
31
|
+
...days.slice(0, config.firstDayOfWeek)
|
|
33
32
|
];
|
|
34
33
|
}
|
|
35
34
|
return days;
|
|
@@ -67,7 +66,7 @@ useProvideCalendarState({
|
|
|
67
66
|
useCalendarSelection({
|
|
68
67
|
value: select,
|
|
69
68
|
mode: props.mode,
|
|
70
|
-
config
|
|
69
|
+
config,
|
|
71
70
|
readonly: props.readonly,
|
|
72
71
|
onSelect: (data) => emit("select", data)
|
|
73
72
|
});
|