@codeandfunction/callaloo 5.9.0 → 5.10.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/callaloo.global.js +1 -1
- package/dist/chunks/{CLA11yButton.vue_vue_type_style_index_0_lang-f1fPKzcG.js → CLA11yButton.vue_vue_type_style_index_0_lang-DmZZOodW.js} +1 -1
- package/dist/chunks/{CLButton.vue_vue_type_style_index_0_lang-CjZJuMsj.js → CLButton.vue_vue_type_style_index_0_lang-C4FnlILR.js} +1 -1
- package/dist/chunks/CLCalendar.vue_vue_type_style_index_0_lang-DcHQwUiD.js +2 -0
- package/dist/chunks/{CLCard.vue_vue_type_style_index_0_lang-DbPAZNtp.js → CLCard.vue_vue_type_style_index_0_lang-BipF7MT1.js} +1 -1
- package/dist/chunks/{CLFormCharCounter.vue_vue_type_style_index_0_lang-BI9KcBgN.js → CLFormCharCounter.vue_vue_type_style_index_0_lang-FFNlcIuE.js} +1 -1
- package/dist/chunks/{CLFormLabel.vue_vue_type_script_setup_true_lang-CAHC-mI7.js → CLFormLabel.vue_vue_type_script_setup_true_lang-D7aTnF1Y.js} +1 -1
- package/dist/chunks/{CLHeading.vue_vue_type_style_index_0_lang-8r8ehDQf.js → CLHeading.vue_vue_type_style_index_0_lang-BkfH2FiT.js} +1 -1
- package/dist/chunks/{CLIcon.vue_vue_type_style_index_0_lang-7-UT438b.js → CLIcon.vue_vue_type_style_index_0_lang-C21socAp.js} +1 -1
- package/dist/chunks/{CLInputMessages.vue_vue_type_style_index_0_lang-BJ_Y2usB.js → CLInputMessages.vue_vue_type_style_index_0_lang-DMZJm-t4.js} +1 -1
- package/dist/chunks/{CLLink.vue_vue_type_style_index_0_lang-BoZjt2Xh.js → CLLink.vue_vue_type_style_index_0_lang-Dfcq8WIX.js} +1 -1
- package/dist/chunks/{CLModal.vue_vue_type_style_index_0_lang-vUfynvl2.js → CLModal.vue_vue_type_style_index_0_lang-CZzQ8wCU.js} +1 -1
- package/dist/chunks/{CLNavLink.vue_vue_type_script_setup_true_lang-grTk84C0.js → CLNavLink.vue_vue_type_script_setup_true_lang-BDDQvo5I.js} +1 -1
- package/dist/chunks/{CLPill.vue_vue_type_style_index_0_lang-j0AHu53P.js → CLPill.vue_vue_type_style_index_0_lang-CoaDiJJy.js} +1 -1
- package/dist/chunks/{CLSkeleton.vue_vue_type_style_index_0_lang-BwASexqS.js → CLSkeleton.vue_vue_type_style_index_0_lang-_qLiUhKp.js} +1 -1
- package/dist/chunks/{CLSpinner.vue_vue_type_style_index_0_lang-C0jwsD1v.js → CLSpinner.vue_vue_type_style_index_0_lang-BUtkZagF.js} +1 -1
- package/dist/chunks/{CLText.vue_vue_type_style_index_0_lang-CkTc30tw.js → CLText.vue_vue_type_style_index_0_lang-BfbUuVfZ.js} +1 -1
- package/dist/chunks/{CLToast.vue_vue_type_style_index_0_lang-Dw2Am9xs.js → CLToast.vue_vue_type_style_index_0_lang-CwaPbZ_K.js} +1 -1
- package/dist/chunks/{index-ojQDOR8H.js → index-C9S3C1LU.js} +1 -1
- package/dist/chunks/{index-C_yUYGq9.js → index-CGlfDAYR.js} +1 -1
- package/dist/chunks/utils-B5AOZV7T.js +1 -0
- package/dist/chunks/{utils-CpKbjET1.js → utils-BrVlb7BP.js} +1 -1
- package/dist/chunks/{utils-5Vh8KJC-.js → utils-CQ3b50lb.js} +1 -1
- package/dist/chunks/{utils-DqMdkofF.js → utils-Dd3hXwRa.js} +1 -1
- package/dist/chunks/{utils-MGg9IN4I.js → utils-OYa6vYYI.js} +1 -1
- package/dist/chunks/{utils-BTCQeV7Y.js → utils-iQnJybN9.js} +1 -1
- package/dist/components/Buttons/CLA11yButton/CLA11yButton.js +1 -1
- package/dist/components/Buttons/CLButton/CLButton.js +1 -1
- package/dist/components/CLIcon/CLIcon.js +1 -1
- package/dist/components/CLTable/CLTable.js +1 -1
- package/dist/components/Containers/CLCard/CLCard.js +1 -1
- package/dist/components/Containers/CLCarousel/CLCarousel.js +1 -1
- package/dist/components/Containers/CLDisclosure/CLDisclosure.js +1 -1
- package/dist/components/Containers/CLDrawer/CLDrawer.js +1 -1
- package/dist/components/Form/CLCalendar/CLCalendar.css +1 -1
- package/dist/components/Form/CLCalendar/CLCalendar.js +1 -1
- package/dist/components/Form/CLCheckbox/CLCheckbox.js +1 -1
- package/dist/components/Form/CLInput/CLInput.js +1 -1
- package/dist/components/Form/CLInputDatePicker/CLInputDatePicker.js +1 -1
- package/dist/components/Form/CLInputTimePicker/CLInputTimePicker.css +1 -0
- package/dist/components/Form/CLInputTimePicker/CLInputTimePicker.js +3 -0
- package/dist/components/Form/CLInputTimePicker/CLInputTimePicker.vue.d.ts +249 -0
- package/dist/components/Form/CLInputTimePicker/index.d.ts +199 -0
- package/dist/components/Form/CLRadioButton/CLRadioButton.js +1 -1
- package/dist/components/Form/CLSelect/CLSelect.js +1 -1
- package/dist/components/Form/CLTextArea/CLTextArea.js +1 -1
- package/dist/components/Form/CLTimePicker/CLTimePicker.css +1 -0
- package/dist/components/Form/CLTimePicker/CLTimePicker.js +3 -0
- package/dist/components/Form/CLTimePicker/CLTimePicker.vue.d.ts +50 -0
- package/dist/components/Form/CLTimePicker/index.d.ts +33 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Form/utils.d.ts +10 -0
- package/dist/components/Indicators/CLBadge/CLBadge.js +1 -1
- package/dist/components/Indicators/CLBanner/CLBanner.js +1 -1
- package/dist/components/Indicators/CLPill/CLPill.js +1 -1
- package/dist/components/Indicators/CLProgress/CLProgress.js +1 -1
- package/dist/components/Loading/CLSkeleton/CLSkeleton.js +1 -1
- package/dist/components/Loading/CLSpinner/CLSpinner.js +1 -1
- package/dist/components/Modals/CLModal/CLModal.js +1 -1
- package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.js +1 -1
- package/dist/components/Modals/CLModalTimePicker/CLModalTimePicker.css +1 -0
- package/dist/components/Modals/CLModalTimePicker/CLModalTimePicker.js +3 -0
- package/dist/components/Modals/CLModalTimePicker/CLModalTimePicker.vue.d.ts +128 -0
- package/dist/components/Modals/CLModalTimePicker/index.d.ts +90 -0
- package/dist/components/Modals/index.d.ts +2 -1
- package/dist/components/Navigation/CLLink/CLLink.js +1 -1
- package/dist/components/Navigation/CLNavLink/CLNavLink.js +1 -1
- package/dist/components/Navigation/CLNavSection/CLNavSection.js +1 -1
- package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +1 -1
- package/dist/components/Popups/CLToast/CLToast.js +1 -1
- package/dist/components/Providers/CLThemeProvider/CLThemeProvider.js +1 -1
- package/dist/components/Providers/CLToastProvider/CLToastProvider.js +1 -1
- package/dist/components/Typography/CLHeading/CLHeading.js +1 -1
- package/dist/components/Typography/CLText/CLText.js +1 -1
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/useDatePicker.d.ts +1 -0
- package/dist/composables/useDatePicker.js +1 -1
- package/dist/composables/useTheme.js +1 -1
- package/dist/composables/useTimeInputMask.d.ts +6 -0
- package/dist/composables/useTimeInputMask.js +2 -0
- package/dist/composables/useTimePicker.d.ts +24 -0
- package/dist/composables/useTimePicker.js +2 -0
- package/dist/index.cdn.d.ts +6 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +17 -2
- package/dist/chunks/CLCalendar.vue_vue_type_style_index_0_lang-bEkt9DYK.js +0 -2
- package/dist/chunks/utils-B8oj25O0.js +0 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { CLBorderRadius, CLColors, CLColorVariants, CLGenericFocusFunction, CLGenericFunction, CLSizes } from '../../../index.ts';
|
|
2
|
+
export interface CLModalTimePickerProps {
|
|
3
|
+
/** Sets aria-label on trigger button. */
|
|
4
|
+
buttonAriaLabel?: string;
|
|
5
|
+
/** Border radius size of trigger button. */
|
|
6
|
+
buttonBorderRadius?: CLBorderRadius;
|
|
7
|
+
/** Color of trigger button and primary actions. */
|
|
8
|
+
buttonColor?: CLColors;
|
|
9
|
+
/** Default label text on trigger button. */
|
|
10
|
+
buttonLabel?: string;
|
|
11
|
+
/** Size of trigger button. */
|
|
12
|
+
buttonSize?: CLSizes;
|
|
13
|
+
/** Color variant of trigger button. */
|
|
14
|
+
buttonVariant?: CLColorVariants;
|
|
15
|
+
/** Width of trigger button. */
|
|
16
|
+
buttonWidth?: string;
|
|
17
|
+
/** Whether button padding is wrapped. */
|
|
18
|
+
buttonWrapped?: boolean;
|
|
19
|
+
/** Busy state. */
|
|
20
|
+
busy?: boolean;
|
|
21
|
+
/** Disabled state. */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Fluid layout state. */
|
|
24
|
+
fluid?: boolean;
|
|
25
|
+
/** Unique ID, required. */
|
|
26
|
+
id: string;
|
|
27
|
+
/** Callback when focus is lost. */
|
|
28
|
+
onBlur?: CLGenericFocusFunction;
|
|
29
|
+
/** Callback when value changes. */
|
|
30
|
+
onChange?: CLGenericFunction;
|
|
31
|
+
/** Callback when focused. */
|
|
32
|
+
onFocus?: CLGenericFocusFunction;
|
|
33
|
+
/** Callback when reset is triggered. */
|
|
34
|
+
onReset?: CLGenericFunction;
|
|
35
|
+
/** Custom test ID. */
|
|
36
|
+
testId?: string;
|
|
37
|
+
/** Modal header title. */
|
|
38
|
+
title?: string;
|
|
39
|
+
/** Use 24-hour format. */
|
|
40
|
+
use24Hour?: boolean;
|
|
41
|
+
}
|
|
42
|
+
declare const _default: import('vue').DefineComponent<{
|
|
43
|
+
modelValue?: string | null;
|
|
44
|
+
} & CLModalTimePickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
45
|
+
"update:modelValue": (value: string | null) => any;
|
|
46
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
47
|
+
modelValue?: string | null;
|
|
48
|
+
} & CLModalTimePickerProps> & Readonly<{
|
|
49
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
50
|
+
}>, {
|
|
51
|
+
fluid: boolean;
|
|
52
|
+
testId: string;
|
|
53
|
+
title: string;
|
|
54
|
+
onFocus: CLGenericFocusFunction;
|
|
55
|
+
onBlur: CLGenericFocusFunction;
|
|
56
|
+
onChange: CLGenericFunction;
|
|
57
|
+
onReset: CLGenericFunction;
|
|
58
|
+
use24Hour: boolean;
|
|
59
|
+
busy: boolean;
|
|
60
|
+
disabled: boolean;
|
|
61
|
+
buttonAriaLabel: string;
|
|
62
|
+
buttonBorderRadius: CLBorderRadius;
|
|
63
|
+
buttonColor: CLColors;
|
|
64
|
+
buttonLabel: string;
|
|
65
|
+
buttonSize: CLSizes;
|
|
66
|
+
buttonVariant: CLColorVariants;
|
|
67
|
+
buttonWidth: string;
|
|
68
|
+
buttonWrapped: boolean;
|
|
69
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
70
|
+
timePickerRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
71
|
+
modelValue?: string | null;
|
|
72
|
+
} & import('../../Form/CLTimePicker').CLTimePickerProps> & Readonly<{
|
|
73
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
74
|
+
"onTime-select"?: ((time: string) => any) | undefined;
|
|
75
|
+
}>, {
|
|
76
|
+
apply: () => void;
|
|
77
|
+
cancel: () => void;
|
|
78
|
+
draftHour: globalThis.Ref<string, string>;
|
|
79
|
+
draftMinute: globalThis.Ref<string, string>;
|
|
80
|
+
draftPeriod: globalThis.Ref<import('../../../composables/useTimePicker').TimePeriod, import('../../../composables/useTimePicker').TimePeriod>;
|
|
81
|
+
getFormattedDraft: () => string;
|
|
82
|
+
initializeDraft: () => void;
|
|
83
|
+
reset: () => void;
|
|
84
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
85
|
+
"update:modelValue": (value: string | null) => any;
|
|
86
|
+
"time-select": (time: string) => any;
|
|
87
|
+
}, import('vue').PublicProps, {
|
|
88
|
+
color: CLColors;
|
|
89
|
+
fluid: boolean;
|
|
90
|
+
testId: string;
|
|
91
|
+
width: string;
|
|
92
|
+
use24Hour: boolean;
|
|
93
|
+
busy: boolean;
|
|
94
|
+
disabled: boolean;
|
|
95
|
+
headerLabel: string;
|
|
96
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
97
|
+
P: {};
|
|
98
|
+
B: {};
|
|
99
|
+
D: {};
|
|
100
|
+
C: {};
|
|
101
|
+
M: {};
|
|
102
|
+
Defaults: {};
|
|
103
|
+
}, Readonly<{
|
|
104
|
+
modelValue?: string | null;
|
|
105
|
+
} & import('../../Form/CLTimePicker').CLTimePickerProps> & Readonly<{
|
|
106
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
107
|
+
"onTime-select"?: ((time: string) => any) | undefined;
|
|
108
|
+
}>, {
|
|
109
|
+
apply: () => void;
|
|
110
|
+
cancel: () => void;
|
|
111
|
+
draftHour: globalThis.Ref<string, string>;
|
|
112
|
+
draftMinute: globalThis.Ref<string, string>;
|
|
113
|
+
draftPeriod: globalThis.Ref<import('../../../composables/useTimePicker').TimePeriod, import('../../../composables/useTimePicker').TimePeriod>;
|
|
114
|
+
getFormattedDraft: () => string;
|
|
115
|
+
initializeDraft: () => void;
|
|
116
|
+
reset: () => void;
|
|
117
|
+
}, {}, {}, {}, {
|
|
118
|
+
color: CLColors;
|
|
119
|
+
fluid: boolean;
|
|
120
|
+
testId: string;
|
|
121
|
+
width: string;
|
|
122
|
+
use24Hour: boolean;
|
|
123
|
+
busy: boolean;
|
|
124
|
+
disabled: boolean;
|
|
125
|
+
headerLabel: string;
|
|
126
|
+
}> | null;
|
|
127
|
+
}, HTMLDivElement>;
|
|
128
|
+
export default _default;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { default as CLModalTimePickerComponent } from './CLModalTimePicker.vue';
|
|
2
|
+
export declare const CLModalTimePicker: import('vue').DefineComponent<{
|
|
3
|
+
modelValue?: string | null;
|
|
4
|
+
} & import('./CLModalTimePicker.vue').CLModalTimePickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
+
"update:modelValue": (value: string | null) => any;
|
|
6
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
7
|
+
modelValue?: string | null;
|
|
8
|
+
} & import('./CLModalTimePicker.vue').CLModalTimePickerProps> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
fluid: boolean;
|
|
12
|
+
testId: string;
|
|
13
|
+
title: string;
|
|
14
|
+
onFocus: import('../../..').CLGenericFocusFunction;
|
|
15
|
+
onBlur: import('../../..').CLGenericFocusFunction;
|
|
16
|
+
onChange: import('../../..').CLGenericFunction;
|
|
17
|
+
onReset: import('../../..').CLGenericFunction;
|
|
18
|
+
use24Hour: boolean;
|
|
19
|
+
busy: boolean;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
buttonAriaLabel: string;
|
|
22
|
+
buttonBorderRadius: import('@codeandfunction/callaloo-tokens').CLBorderRadius;
|
|
23
|
+
buttonColor: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
24
|
+
buttonLabel: string;
|
|
25
|
+
buttonSize: import('@codeandfunction/callaloo-tokens').CLSizes;
|
|
26
|
+
buttonVariant: import('@codeandfunction/callaloo-tokens').CLColorVariants;
|
|
27
|
+
buttonWidth: string;
|
|
28
|
+
buttonWrapped: boolean;
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
30
|
+
timePickerRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
31
|
+
modelValue?: string | null;
|
|
32
|
+
} & import('../../Form/CLTimePicker').CLTimePickerProps> & Readonly<{
|
|
33
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
34
|
+
"onTime-select"?: ((time: string) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
apply: () => void;
|
|
37
|
+
cancel: () => void;
|
|
38
|
+
draftHour: globalThis.Ref<string, string>;
|
|
39
|
+
draftMinute: globalThis.Ref<string, string>;
|
|
40
|
+
draftPeriod: globalThis.Ref<import('../../../composables/useTimePicker').TimePeriod, import('../../../composables/useTimePicker').TimePeriod>;
|
|
41
|
+
getFormattedDraft: () => string;
|
|
42
|
+
initializeDraft: () => void;
|
|
43
|
+
reset: () => void;
|
|
44
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
45
|
+
"update:modelValue": (value: string | null) => any;
|
|
46
|
+
"time-select": (time: string) => any;
|
|
47
|
+
}, import('vue').PublicProps, {
|
|
48
|
+
color: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
49
|
+
fluid: boolean;
|
|
50
|
+
testId: string;
|
|
51
|
+
width: string;
|
|
52
|
+
use24Hour: boolean;
|
|
53
|
+
busy: boolean;
|
|
54
|
+
disabled: boolean;
|
|
55
|
+
headerLabel: string;
|
|
56
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
57
|
+
P: {};
|
|
58
|
+
B: {};
|
|
59
|
+
D: {};
|
|
60
|
+
C: {};
|
|
61
|
+
M: {};
|
|
62
|
+
Defaults: {};
|
|
63
|
+
}, Readonly<{
|
|
64
|
+
modelValue?: string | null;
|
|
65
|
+
} & import('../../Form/CLTimePicker').CLTimePickerProps> & Readonly<{
|
|
66
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
67
|
+
"onTime-select"?: ((time: string) => any) | undefined;
|
|
68
|
+
}>, {
|
|
69
|
+
apply: () => void;
|
|
70
|
+
cancel: () => void;
|
|
71
|
+
draftHour: globalThis.Ref<string, string>;
|
|
72
|
+
draftMinute: globalThis.Ref<string, string>;
|
|
73
|
+
draftPeriod: globalThis.Ref<import('../../../composables/useTimePicker').TimePeriod, import('../../../composables/useTimePicker').TimePeriod>;
|
|
74
|
+
getFormattedDraft: () => string;
|
|
75
|
+
initializeDraft: () => void;
|
|
76
|
+
reset: () => void;
|
|
77
|
+
}, {}, {}, {}, {
|
|
78
|
+
color: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
79
|
+
fluid: boolean;
|
|
80
|
+
testId: string;
|
|
81
|
+
width: string;
|
|
82
|
+
use24Hour: boolean;
|
|
83
|
+
busy: boolean;
|
|
84
|
+
disabled: boolean;
|
|
85
|
+
headerLabel: string;
|
|
86
|
+
}> | null;
|
|
87
|
+
}, HTMLDivElement>;
|
|
88
|
+
export type CLModalTimePicker = InstanceType<typeof CLModalTimePickerComponent>;
|
|
89
|
+
export type { CLModalTimePickerProps } from './CLModalTimePicker.vue';
|
|
90
|
+
export default CLModalTimePicker;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLLink.css';
|
|
3
|
-
import{_ as e}from"../../../chunks/CLLink.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as e}from"../../../chunks/CLLink.vue_vue_type_style_index_0_lang-Dfcq8WIX.js";export{e as CLLink,e as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
|
-
import{_ as a}from"../../../chunks/CLNavLink.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import{_ as a}from"../../../chunks/CLNavLink.vue_vue_type_script_setup_true_lang-BDDQvo5I.js";export{a as CLNavLink,a as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLNavSection.css';
|
|
3
|
-
import{defineComponent as e,computed as t,createElementBlock as a,openBlock as l,normalizeClass as r,unref as n,Fragment as s,renderList as i,createVNode as o,withCtx as c,createTextVNode as u,toDisplayString as d}from"vue";import{_}from"../../../chunks/CLNavLink.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import{defineComponent as e,computed as t,createElementBlock as a,openBlock as l,normalizeClass as r,unref as n,Fragment as s,renderList as i,createVNode as o,withCtx as c,createTextVNode as u,toDisplayString as d}from"vue";import{_}from"../../../chunks/CLNavLink.vue_vue_type_script_setup_true_lang-BDDQvo5I.js";import{_ as m}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BfbUuVfZ.js";import{d as p}from"../../../chunks/index-CGlfDAYR.js";import{f}from"../../../chunks/index-C9S3C1LU.js";const v=["data-testid"],k=/* @__PURE__ */e({name:"CLNavSection",__name:"CLNavSection",props:{color:{default:p.Primary},navItems:{},testId:{default:"clll-nav-section"},type:{default:f.Horizontal}},setup(e){const p=e,f="clll-nav-section",k=t(()=>[f,`${f}--${p.type}`]);return(t,p)=>(l(),a("ul",{class:r(n(k)),"data-testid":e.testId},[(l(!0),a(s,null,i(e.navItems,(t,r)=>(l(),a("li",{key:`link-${t.id}-${r}`,class:"clll-nav-section__item"},[o(n(_),{id:t.id,"aria-label":t.ariaLabel,color:e.color,external:t.external,href:t.href,rel:t.rel,target:t.target,"on-click":t.onClick},{default:c(()=>[o(n(m),{as:"span"},{default:c(()=>[u(d(t.label),1)]),_:2},1024)]),_:2},1032,["id","aria-label","color","external","href","rel","target","on-click"])]))),128))],10,v))}});export{k as CLNavSection,k as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLDropdownMenu.css';
|
|
3
|
-
import{defineComponent as e,ref as t,computed as o,onBeforeUnmount as n,createElementBlock as a,openBlock as d,normalizeClass as r,createVNode as l,createCommentVNode as i,unref as s,withCtx as u,createTextVNode as c,toDisplayString as p,normalizeStyle as f,renderSlot as b}from"vue";import{u as m,a as _,f as v,o as w,s as g}from"../../../chunks/floating-ui.vue-C0JWy0Dz.js";import{_ as h}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{defineComponent as e,ref as t,computed as o,onBeforeUnmount as n,createElementBlock as a,openBlock as d,normalizeClass as r,createVNode as l,createCommentVNode as i,unref as s,withCtx as u,createTextVNode as c,toDisplayString as p,normalizeStyle as f,renderSlot as b}from"vue";import{u as m,a as _,f as v,o as w,s as g}from"../../../chunks/floating-ui.vue-C0JWy0Dz.js";import{_ as h}from"../../../chunks/CLButton.vue_vue_type_style_index_0_lang-C4FnlILR.js";import{_ as y}from"../../../chunks/CLCard.vue_vue_type_style_index_0_lang-BipF7MT1.js";import{b as B,i as $}from"../../../chunks/helper-BlxFN3eF.js";import{useDropdown as z}from"../../../composables/useDropdown.js";import{useEsc as k}from"../../../composables/useEsc.js";import{n as x,e as C,f as I,c as E,C as L,d as D,i as S}from"../../../chunks/index-CGlfDAYR.js";const H=["data-testid"],j=["id","aria-labelledby","aria-hidden"],O=/* @__PURE__ */e({name:"CLDropdownMenu",__name:"CLDropdownMenu",props:{buttonAlign:{default:S.Center},buttonAriaLabel:{},buttonBorderRadius:{},buttonBusy:{type:Boolean},buttonColor:{default:D.Secondary},buttonDisabled:{type:Boolean},buttonHeight:{default:"auto"},buttonSize:{default:L.Small},buttonVariant:{default:E.Soft},buttonWidth:{default:"auto"},buttonWrapped:{type:Boolean},containerBordered:{type:Boolean,default:!0},containerBorderRadius:{},containerElevated:{type:Boolean,default:!1},contentWidth:{default:"auto"},dropdownId:{},fluid:{type:Boolean,default:!1},iconAfter:{default:I.ChevronDown},iconBefore:{},iconSize:{default:C.Tiny},isOpen:{type:Boolean,default:!1},label:{},onCloseHandler:{},onOpenHandler:{},placement:{default:x.BottomStart},testId:{default:"clll-dropdown-menu"},zIndex:{default:30}},setup(e,{expose:x}){const C=e;let I=t(),L=t();const S=t(),O=t(),A=t(C.isOpen),W=t(C.placement),R="clll-dropdown-menu",M=o(()=>"auto"===C.zIndex||B(C.zIndex)?C.zIndex:C.zIndex.toString()),V=e=>{e&&(I.value=e)},G=e=>{e&&(L.value=e)},N=()=>{T.value?F():q()},{open:T,openDropdown:q,closeDropdown:F,clearEventListeners:J}=z({triggerElem:I,dropdownRef:O,openDropdownHandler:()=>{A.value=!0,C?.onOpenHandler?.(),P(),$&&document.addEventListener("click",Q)},closeDropdownHandler:()=>{A.value=!1,C?.onCloseHandler?.(),$&&document.removeEventListener("click",Q),U(),J()}});x({close:()=>{F(),J(),U()},open:()=>{q()}});const{floatingStyles:K,update:P}=m(S,O,{middleware:[v(),w(10),g()],placement:W,open:A,whileElementsMounted:_}),Q=e=>{A.value&&O.value?.contains(e?.target)&&F()},{clearEventListeners:U}=k({escHandler:F,triggerElem:I});return n(()=>{$&&document.removeEventListener("click",Q),U(),J()}),(t,o)=>(d(),a("div",{class:r([`${R}__menu`,e.fluid?`${R}__menu--fluid`:""]),"data-testid":e.testId},[l(s(h),{id:`${R}__toggle--${e.dropdownId}`,ref_key:"anchor",ref:S,"aria-controls":`${R}--${e.dropdownId}`,"aria-expanded":s(A)||e.isOpen,"aria-label":e.buttonAriaLabel,"align-content":e.buttonAlign,busy:e.buttonBusy,disabled:e.buttonDisabled||e.buttonBusy,class:r(`${R}__toggle`),color:e.buttonColor,"border-radius":e.buttonBorderRadius,"forward-ref":V,height:e.buttonHeight,"icon-after":e.iconAfter,"icon-before":e.iconBefore,"icon-size":e.iconSize,size:e.buttonSize,"test-id":`${R}__toggle`,variant:e.buttonVariant,width:e.fluid?"100%":e.buttonWidth,wrap:e.buttonWrapped,"on-click":N},{default:u(()=>[c(p(e.label),1)]),_:1},8,["id","aria-controls","aria-expanded","aria-label","align-content","busy","disabled","class","color","border-radius","height","icon-after","icon-before","icon-size","size","test-id","variant","width","wrap"]),s(A)||e.isOpen?(d(),a("div",{key:0,id:`${R}--${e.dropdownId}`,ref_key:"dropdownElem",ref:O,"aria-labelledby":`${R}__toggle--${e.dropdownId}`,"aria-hidden":!(s(A)||e.isOpen),class:r([`${R}__dropdown`,`${R}__dropdown--${s(W)}`]),style:f({...s(K),zIndex:s(M)})},[l(s(y),{bordered:e.containerBordered,"border-radius":e.containerBorderRadius,color:s(D).Neutral,elevated:e.containerElevated,"forward-ref":G,padded:!1,"test-id":`${R}__content`,variant:s(E).Ghost,width:e.contentWidth},{default:u(()=>[b(t.$slots,"content")]),_:3},8,["bordered","border-radius","color","elevated","test-id","variant","width"])],14,j)):i("",!0)],10,H))}});export{O as CLDropdownMenu,O as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLToast.css';
|
|
3
|
-
import{_ as s}from"../../../chunks/CLToast.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as s}from"../../../chunks/CLToast.vue_vue_type_style_index_0_lang-CwaPbZ_K.js";export{s as CLToast,s as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
|
-
import{ref as e,defineComponent as o,provide as t,onMounted as a,onBeforeUnmount as r,watch as s,createBlock as l,openBlock as d,resolveDynamicComponent as i,normalizeStyle as n,normalizeClass as c,unref as
|
|
2
|
+
import{ref as e,defineComponent as o,provide as t,onMounted as a,onBeforeUnmount as r,watch as s,createBlock as l,openBlock as d,resolveDynamicComponent as i,normalizeStyle as n,normalizeClass as c,unref as u,withCtx as m,renderSlot as f}from"vue";import{D as h,p as k}from"../../../chunks/index-CGlfDAYR.js";import{T as v}from"../../../chunks/context-BrNC8CsD.js";import{i as p,c as M}from"../../../chunks/helper-BlxFN3eF.js";const g=/* @__PURE__ */o({__name:"CLThemeProvider",props:{tag:{default:"div"},themeConfig:{},autoDetectDarkMode:{type:Boolean,default:!0}},setup(o){const g=o,y=(o=>{const t=e(o?.borderRadius||h.borderRadius),a=e(o?.darkMode??h.darkMode),r=e(o?.fontFamily??h.fontFamily),s=k(h.colors,o?.colors),l=e(s);return{borderRadius:t,colors:l,darkMode:a,fontFamily:r,setBorderRadius:e=>{t.value=e},setColors:e=>{l.value={...l.value,...e}},setDarkMode:e=>{a.value=e},setFontFamily:e=>{r.value=e}}})(g.themeConfig);t(v,y);const{borderRadius:D,darkMode:C,fontFamily:F,setBorderRadius:R,setColors:b,setDarkMode:j,setFontFamily:L}=y;let x=null;const B=()=>{if(g.autoDetectDarkMode&&p){const e=M();j(e)}};return a(()=>{g.autoDetectDarkMode&&p&&(B(),x=window.matchMedia("(prefers-color-scheme: dark)"),x.addEventListener("change",B))}),r(()=>{x&&p&&x.removeEventListener("change",B)}),s(()=>g.themeConfig?.borderRadius,e=>{R(e)}),s(()=>g.themeConfig?.colors,e=>{e&&b(e)}),s(()=>g.themeConfig?.darkMode,e=>{void 0===e||g.autoDetectDarkMode||j(e)}),s(()=>g.themeConfig?.fontFamily,e=>{L(e)}),(e,t)=>(d(),l(i(o.tag),{class:c(["clll-theme-provider","--clll-color-theme-"+(u(C)?"dark":"light")]),style:n({"--clll-font-family":u(F),"--clll-default-radius":u(D)?`var(--clll-${u(D)})`:void 0})},{default:m(()=>[f(e.$slots,"default")]),_:3},8,["class","style"]))}});export{g as CLThemeProvider,h as DEFAULT_THEME,v as ThemeInjectionKey,g as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
|
-
import{defineComponent as s,ref as i,provide as o,createElementBlock as e,openBlock as r,createBlock as a,createCommentVNode as t,renderSlot as d,unref as u,mergeProps as l}from"vue";import{_ as m}from"../../../chunks/CLToast.vue_vue_type_style_index_0_lang-
|
|
2
|
+
import{defineComponent as s,ref as i,provide as o,createElementBlock as e,openBlock as r,createBlock as a,createCommentVNode as t,renderSlot as d,unref as u,mergeProps as l}from"vue";import{_ as m}from"../../../chunks/CLToast.vue_vue_type_style_index_0_lang-CwaPbZ_K.js";import{T as n}from"../../../chunks/context-JmPivI9V.js";const v={class:"clll-toast-provider"},p=/* @__PURE__ */s({name:"CLToastProvider",__name:"CLToastProvider",props:{borderRadius:{},dismissTimer:{},position:{}},setup(s){const p=s,T=i({}),_=i(!1),c=()=>{_.value=!1,T.value={}};return o(n,{visible:_,showToast:s=>{T.value={...s,borderRadius:s.borderRadius??p.borderRadius,dismissTimer:s.dismissTimer??p.dismissTimer,position:s.position??p.position},_.value=!0},hideToast:c}),(s,i)=>(r(),e("div",v,[_.value?(r(),a(u(m),l({key:0},T.value,{"on-dismiss":c}),null,16)):t("",!0),d(s.$slots,"default")]))}});export{p as CLToastProvider,n as ToastInjectionKey,p as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLHeading.css';
|
|
3
|
-
import{_ as e}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as e}from"../../../chunks/CLHeading.vue_vue_type_style_index_0_lang-BkfH2FiT.js";export{e as CLHeading,e as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLText.css';
|
|
3
|
-
import{_ as e}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-
|
|
3
|
+
import{_ as e}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BfbUuVfZ.js";export{e as CLText,e as default};
|
|
@@ -2,3 +2,5 @@ export { useTheme } from './useTheme';
|
|
|
2
2
|
export { useToast } from './useToast';
|
|
3
3
|
export { useElementSize } from './useElementSize';
|
|
4
4
|
export { SizeDimension, SizeMode } from './useElementSize';
|
|
5
|
+
export { useTimePicker } from './useTimePicker';
|
|
6
|
+
export { useTimeInputMask } from './useTimeInputMask';
|
|
@@ -28,6 +28,7 @@ interface Return {
|
|
|
28
28
|
handlePrevMonth: () => void;
|
|
29
29
|
initializeDraft: () => void;
|
|
30
30
|
isDraftEnd: (iso: ISODate) => boolean;
|
|
31
|
+
isDraftSameDay: (iso: ISODate) => boolean;
|
|
31
32
|
isDraftStart: (iso: ISODate) => boolean;
|
|
32
33
|
isInDraftRange: (iso: ISODate) => boolean;
|
|
33
34
|
isoToLocalDate: (iso: ISODate) => Date;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../assets/core.css';
|
|
2
|
-
import{ref as e,onMounted as a,computed as t,unref as l}from"vue";const u=({appliedEnd:u,appliedStart:n,isRange:r=!0}={})=>{const o=e(/* @__PURE__ */new Date),v=e(null),i=e(null),
|
|
2
|
+
import{ref as e,onMounted as a,computed as t,unref as l}from"vue";const u=({appliedEnd:u,appliedStart:n,isRange:r=!0}={})=>{const o=e(/* @__PURE__ */new Date),v=e(null),i=e(null),d=e(!1);a(()=>{d.value=!0});const g=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,D=e=>/* @__PURE__ */new Date(`${e}T00:00:00`),s=e=>d.value?D(e).toLocaleDateString("default",{day:"numeric",month:"long",weekday:"long",year:"numeric"}):e,c=e=>{const a=D(e);return`${a.getMonth()+1}/${String(a.getDate())}`},h=e=>{const a=D(e);return`${a.getMonth()+1}/${String(a.getDate())}/${String(a.getFullYear()).slice(-2)}`},f=()=>{const e=n?.value?D(n.value):/* @__PURE__ */new Date;o.value=new Date(e.getFullYear(),e.getMonth(),1)},$=t(()=>{if(!d.value){return`${o.value.getMonth()+1}/${o.value.getFullYear()}`}return o.value.toLocaleString("default",{month:"long",year:"numeric"})}),S=t(()=>{const e=n?.value??null,a=u?.value??null;if(!e)return;if(!l(r))return h(e);if(!a)return h(e);return D(e).getFullYear()!==D(a).getFullYear()?`${h(e)} - ${h(a)}`:`${c(e)} - ${c(a)}`}),m=e=>i.value===e,y=e=>v.value===e,M=e=>Boolean(l(r)&&i.value&&v.value&&i.value===v.value&&i.value===e),w=e=>!!l(r)&&(!!i.value&&(v.value?e>=i.value&&e<=v.value:e===i.value));return{calendarGrid:t(()=>{const e=o.value.getFullYear(),a=o.value.getMonth(),t=new Date(e,a,1),l=new Date(e,a+1,0).getDate(),u=new Date(e,a,0).getDate(),n=t.getDay(),r=[];for(let o=0;o<n;o++){const t=u-(n-1-o),l=g(new Date(e,a-1,t));r.push({day:t,date:l,isOutsideMonth:!0})}for(let o=1;o<=l;o++){const t=g(new Date(e,a,o));r.push({day:o,date:t,isOutsideMonth:!1})}let v=1;for(;r.length<42;){const t=g(new Date(e,a+1,v));r.push({day:v,date:t,isOutsideMonth:!0}),v++}return r}),cancelDraft:()=>{i.value=n?.value??null,v.value=u?.value??null},clearDraft:()=>{n&&(n.value=null),u&&(u.value=null),i.value=null,v.value=null},currentDate:o,currentMonthLabel:$,draftEnd:v,draftStart:i,formatDateToISO:g,formatHumanDate:e=>d.value?D(e).toLocaleDateString("default",{day:"numeric",month:"short",year:"numeric"}):e,formatLongDate:s,formatShortNoYear:c,formatShortWithYear:h,getDayAriaLabel:e=>l(r)?M(e)?`${s(e)} (same day selected)`:m(e)?`${s(e)} (start date)`:y(e)?`${s(e)} (end date)`:w(e)?`${s(e)} (in range)`:s(e):m(e)?`${s(e)} (selected)`:s(e),handleNextMonth:()=>{o.value=new Date(o.value.getFullYear(),o.value.getMonth()+1,1)},handlePrevMonth:()=>{o.value=new Date(o.value.getFullYear(),o.value.getMonth()-1,1)},initializeDraft:()=>{f(),i.value=n?.value??null,v.value=u?.value??null},isDraftEnd:y,isDraftSameDay:M,isDraftStart:m,isInDraftRange:w,isoToLocalDate:D,onDayClick:e=>{if(e)return l(r)?!i.value||i.value&&v.value?(i.value=e,void(v.value=null)):e<i.value?(v.value=i.value,void(i.value=e)):void(v.value=e):(i.value=e,void(v.value=null))},rangeLabel:S,setCalendarMonthToAppliedOrToday:f,weekDays:["Su","Mo","Tu","We","Th","Fr","Sa"]}};export{u as useDatePicker};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '../assets/core.css';
|
|
2
|
-
import{ref as o,getCurrentInstance as e,inject as r}from"vue";import{D as a}from"../chunks/index-
|
|
2
|
+
import{ref as o,getCurrentInstance as e,inject as r}from"vue";import{D as a}from"../chunks/index-CGlfDAYR.js";import{T as n}from"../chunks/context-BrNC8CsD.js";const s=o(a.borderRadius),t=o(a.darkMode),l=o(a.fontFamily),u=o(a.colors||{primary:{},secondary:{},neutral:{},danger:{},warning:{},success:{},info:{}}),m=()=>{const o=e(),a=o?.type.name||"(anonymous component)",m=r(n,null);return m||(console.warn(`[Callaloo]: useTheme() must be used within a <CLThemeProvider />. Called from component: ${a}`,(new Error).stack),{borderRadius:s,colors:u,darkMode:t,fontFamily:l,setBorderRadius:o=>{s.value=o},setColors:o=>{u.value={...u.value,...o}},setDarkMode:o=>{t.value=o},setFontFamily:o=>{l.value=o}})};export{m as useTheme};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export declare const useTimeInputMask: () => {
|
|
3
|
+
formatAsTime: (value: string, use24Hour: boolean) => string;
|
|
4
|
+
handleTimeInput: (event: Event, inputValueRef: Ref<string>, use24Hour: boolean, callback?: () => void) => void;
|
|
5
|
+
validateTime: (value: string, use24Hour: boolean) => boolean;
|
|
6
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import '../assets/core.css';
|
|
2
|
+
import{nextTick as e}from"vue";const t=()=>{const t=(e,t)=>{const n=e.toUpperCase(),i=n.replace(/\D/g,"");if(t){const e=i.slice(0,4);return e.length>2?`${e.slice(0,2)}:${e.slice(2)}`:e}const l=i.slice(0,4);let r="";return n.includes("P")?r=" PM":n.includes("A")&&(r=" AM"),l.length>2?`${l.slice(0,2)}:${l.slice(2)}${r}`:`${l}${r}`};return{formatAsTime:t,handleTimeInput:(n,i,l,r)=>{const s=n.target,c=s.value,u=n.inputType?.includes("delete"),o=s.selectionStart;if(u)return i.value=c,void r?.();const a=t(c,l);c!==a?(i.value=a,e(()=>{if(null!==o){let e=o;const t=a.length-c.length;t>0&&(e+=t),s.setSelectionRange(e,e)}})):i.value=c,r?.()},validateTime:(e,t)=>{if(!e||!e.trim())return!0;if(t){return/^([01]\d|2[0-3]):([0-5]\d)$/.test(e.trim())}return/^(0[1-9]|1[0-2]):([0-5]\d)\s*(AM|PM|am|pm)$/i.test(e.trim())}}};export{t as useTimeInputMask};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MaybeRef, Ref } from 'vue';
|
|
2
|
+
export type TimePeriod = 'AM' | 'PM';
|
|
3
|
+
export interface TimeObject {
|
|
4
|
+
hour: string;
|
|
5
|
+
minute: string;
|
|
6
|
+
period: TimePeriod;
|
|
7
|
+
}
|
|
8
|
+
interface UseTimePickerInput {
|
|
9
|
+
appliedTime?: Ref<string | null>;
|
|
10
|
+
use24Hour?: MaybeRef<boolean>;
|
|
11
|
+
}
|
|
12
|
+
export declare const useTimePicker: ({ appliedTime, use24Hour }?: UseTimePickerInput) => {
|
|
13
|
+
cancelDraft: () => void;
|
|
14
|
+
clearDraft: () => void;
|
|
15
|
+
draftHour: Ref<string, string>;
|
|
16
|
+
draftMinute: Ref<string, string>;
|
|
17
|
+
draftPeriod: Ref<TimePeriod, TimePeriod>;
|
|
18
|
+
formattedLabel: globalThis.ComputedRef<string | undefined>;
|
|
19
|
+
formatTimeObject: (obj: TimeObject, is24?: boolean) => string;
|
|
20
|
+
getFormattedDraft: () => string;
|
|
21
|
+
initializeDraft: () => void;
|
|
22
|
+
parseTime: (timeStr: string | null) => TimeObject;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import '../assets/core.css';
|
|
2
|
+
import{ref as t,computed as r,unref as e}from"vue";const a=({appliedTime:a,use24Hour:i=!1}={})=>{const n=t("12"),u=t("00"),o=t("AM"),p=t=>{if(!t||!t.trim())return{hour:"12",minute:"00",period:"AM"};const r=e(i),a=t.trim(),n=a.match(/^(\d{1,2}):(\d{2})\s*(AM|PM|am|pm)$/i);if(n){let t=parseInt(n[1],10);const r=parseInt(n[2],10),e=n[3].toUpperCase();return t<1&&(t=12),t>12&&(t=12),{hour:String(t).padStart(2,"0"),minute:String(Math.min(59,Math.max(0,r))).padStart(2,"0"),period:e}}const u=a.match(/^(\d{1,2}):(\d{2})$/);if(u){let t=parseInt(u[1],10);const e=parseInt(u[2],10);if(r)return t=Math.min(23,Math.max(0,t)),{hour:String(t).padStart(2,"0"),minute:String(Math.min(59,Math.max(0,e))).padStart(2,"0"),period:"AM"};let a="AM";return t>=12?(a="PM",t>12&&(t-=12)):0===t&&(t=12),{hour:String(t).padStart(2,"0"),minute:String(Math.min(59,Math.max(0,e))).padStart(2,"0"),period:a}}return{hour:"12",minute:"00",period:"AM"}},m=(t,r=e(i))=>{let a=parseInt(t.hour,10);const n=t.minute.padStart(2,"0");return r?("PM"===t.period&&a<12&&(a+=12),"AM"===t.period&&12===a&&(a=0),`${String(a).padStart(2,"0")}:${n}`):`${t.hour}:${n} ${t.period}`},d=()=>{const t=p(a?.value??null);n.value=t.hour,u.value=t.minute,o.value=t.period},l=r(()=>{if(!a?.value)return;const t=p(a.value);return m(t,e(i))});return{cancelDraft:()=>{d()},clearDraft:()=>{a&&(a.value=null),n.value="12",u.value="00",o.value="AM"},draftHour:n,draftMinute:u,draftPeriod:o,formattedLabel:l,formatTimeObject:m,getFormattedDraft:()=>m({hour:n.value,minute:u.value,period:o.value},e(i)),initializeDraft:d,parseTime:p}};export{a as useTimePicker};
|
package/dist/index.cdn.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ import { default as CLCalendar } from './components/Form/CLCalendar/CLCalendar.v
|
|
|
11
11
|
import { default as CLCheckbox } from './components/Form/CLCheckbox/CLCheckbox.vue';
|
|
12
12
|
import { default as CLInput } from './components/Form/CLInput/CLInput.vue';
|
|
13
13
|
import { default as CLInputDatePicker } from './components/Form/CLInputDatePicker/CLInputDatePicker.vue';
|
|
14
|
+
import { default as CLTimePicker } from './components/Form/CLTimePicker/CLTimePicker.vue';
|
|
15
|
+
import { default as CLInputTimePicker } from './components/Form/CLInputTimePicker/CLInputTimePicker.vue';
|
|
14
16
|
import { default as CLRadioButton } from './components/Form/CLRadioButton/CLRadioButton.vue';
|
|
15
17
|
import { default as CLSelect } from './components/Form/CLSelect/CLSelect.vue';
|
|
16
18
|
import { default as CLTextArea } from './components/Form/CLTextArea/CLTextArea.vue';
|
|
@@ -22,6 +24,7 @@ import { default as CLSkeleton } from './components/Loading/CLSkeleton/CLSkeleto
|
|
|
22
24
|
import { default as CLSpinner } from './components/Loading/CLSpinner/CLSpinner.vue';
|
|
23
25
|
import { default as CLModal } from './components/Modals/CLModal/CLModal.vue';
|
|
24
26
|
import { default as CLModalDatePicker } from './components/Modals/CLModalDatePicker/CLModalDatePicker.vue';
|
|
27
|
+
import { default as CLModalTimePicker } from './components/Modals/CLModalTimePicker/CLModalTimePicker.vue';
|
|
25
28
|
import { default as CLLink } from './components/Navigation/CLLink/CLLink.vue';
|
|
26
29
|
import { default as CLNavLink } from './components/Navigation/CLNavLink/CLNavLink.vue';
|
|
27
30
|
import { default as CLNavSection } from './components/Navigation/CLNavSection/CLNavSection.vue';
|
|
@@ -33,8 +36,10 @@ import { default as CLHeading } from './components/Typography/CLHeading/CLHeadin
|
|
|
33
36
|
import { default as CLText } from './components/Typography/CLText/CLText.vue';
|
|
34
37
|
export { useTheme } from './composables/useTheme';
|
|
35
38
|
export { useToast } from './composables/useToast';
|
|
39
|
+
export { useTimePicker } from './composables/useTimePicker';
|
|
40
|
+
export { useTimeInputMask } from './composables/useTimeInputMask';
|
|
36
41
|
export * from './types';
|
|
37
|
-
export { CLIcon, CLTable, CLA11yButton, CLButton, CLCard, CLCarousel, CLDisclosure, CLDrawer, CLCalendar, CLCheckbox, CLInput, CLInputDatePicker, CLRadioButton, CLSelect, CLTextArea, CLBadge, CLBanner, CLPill, CLProgress, CLSkeleton, CLSpinner, CLModal, CLModalDatePicker, CLLink, CLNavLink, CLNavSection, CLDropdownMenu, CLToast, CLThemeProvider, CLToastProvider, CLHeading, CLText };
|
|
42
|
+
export { CLIcon, CLTable, CLA11yButton, CLButton, CLCard, CLCarousel, CLDisclosure, CLDrawer, CLCalendar, CLCheckbox, CLInput, CLInputDatePicker, CLTimePicker, CLInputTimePicker, CLRadioButton, CLSelect, CLTextArea, CLBadge, CLBanner, CLPill, CLProgress, CLSkeleton, CLSpinner, CLModal, CLModalDatePicker, CLModalTimePicker, CLLink, CLNavLink, CLNavSection, CLDropdownMenu, CLToast, CLThemeProvider, CLToastProvider, CLHeading, CLText };
|
|
38
43
|
declare const _default: {
|
|
39
44
|
install(app: App): void;
|
|
40
45
|
};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{i as CLAlign,h as CLBorderRadius,
|
|
1
|
+
export{i as CLAlign,h as CLBorderRadius,k as CLCardTypes,c as CLColorVariants,d as CLColors,m as CLDrawerPosition,l as CLHeadingTypes,f as CLIconNames,e as CLIconSizes,b as CLMode,n as CLPlacement,j as CLPosition,C as CLSizes,q as CLTableTypes,a as CLTextTypes,o as CLToastPosition}from"./chunks/index-CGlfDAYR.js";export{C as CLCharCounterLayout,b as CLHeadingLevels,h as CLInputTypes,a as CLLinkTarget,d as CLLoading,i as CLMessageType,e as CLOrder,f as CLOrientation,c as CLOverflow,g as CLPaginationType}from"./chunks/index-C9S3C1LU.js";var s=/* @__PURE__ */(s=>(s.Button="button",s.Submit="submit",s))(s||{});export{s as CLButtonTypes};
|