@codeandfunction/callaloo 5.8.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.css +1 -1
- package/dist/components/Containers/CLDisclosure/CLDisclosure.js +1 -1
- package/dist/components/Containers/CLDisclosure/CLDisclosure.vue.d.ts +12 -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 +19 -4
- 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,249 @@
|
|
|
1
|
+
import { CLBorderRadius, CLColors, CLColorVariants, CLGenericFocusFunction, CLGenericFunction, CLIconNames, CLOrientation, CLPlacement, CLSizes } from '../../../index.ts';
|
|
2
|
+
export interface CLInputTimePickerProps {
|
|
3
|
+
/** Sets the aria-label on the trigger button. It should be used when there is no label present. */
|
|
4
|
+
ariaLabel?: string;
|
|
5
|
+
/** The border radius size. The property can be one of `CLBorderRadius`. */
|
|
6
|
+
borderRadius?: CLBorderRadius;
|
|
7
|
+
/** Sets the color of the trigger button and apply button. */
|
|
8
|
+
color?: CLColors;
|
|
9
|
+
/** Sets the size. The property can be one of `CLSizes`. */
|
|
10
|
+
size?: CLSizes;
|
|
11
|
+
/** Sets the color variant. */
|
|
12
|
+
variant?: CLColorVariants.Outline | CLColorVariants.Ghost;
|
|
13
|
+
/** A boolean value which dictates the busy state. */
|
|
14
|
+
busy?: boolean;
|
|
15
|
+
/** Set the disabled state. */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** When set to true, sets the width to 100% of parent. */
|
|
18
|
+
fluid?: boolean;
|
|
19
|
+
/** Form identifier for form submission. */
|
|
20
|
+
form?: string;
|
|
21
|
+
/** A unique identifier, required. */
|
|
22
|
+
id: string;
|
|
23
|
+
/** Label text associated with the component. */
|
|
24
|
+
label?: string;
|
|
25
|
+
/** Messages array. */
|
|
26
|
+
messages?: string[];
|
|
27
|
+
/** Message type color. */
|
|
28
|
+
messageType?: CLColors;
|
|
29
|
+
/** Name attribute for the input. */
|
|
30
|
+
name: string;
|
|
31
|
+
/** Callback when focus lost. */
|
|
32
|
+
onBlur?: CLGenericFocusFunction;
|
|
33
|
+
/** Callback when value changed. */
|
|
34
|
+
onChange?: CLGenericFunction;
|
|
35
|
+
/** Callback when gaining focus. */
|
|
36
|
+
onFocus?: CLGenericFocusFunction;
|
|
37
|
+
/** Callback when reset is clicked. */
|
|
38
|
+
onReset?: CLGenericFunction;
|
|
39
|
+
/** Orientation of label. */
|
|
40
|
+
orientation?: CLOrientation;
|
|
41
|
+
/** Placement of dropdown popover. */
|
|
42
|
+
placement?: CLPlacement;
|
|
43
|
+
/** Placeholder text. */
|
|
44
|
+
placeholder?: string;
|
|
45
|
+
/** Required state. */
|
|
46
|
+
required?: boolean;
|
|
47
|
+
/** Rounded corners flag. */
|
|
48
|
+
rounded?: boolean;
|
|
49
|
+
/** Custom test ID. */
|
|
50
|
+
testId?: string;
|
|
51
|
+
/** Use 24-hour format. */
|
|
52
|
+
use24Hour?: boolean;
|
|
53
|
+
}
|
|
54
|
+
declare const _default: import('vue').DefineComponent<{
|
|
55
|
+
modelValue?: string | null;
|
|
56
|
+
} & CLInputTimePickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
57
|
+
"update:modelValue": (value: string | null) => any;
|
|
58
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
59
|
+
modelValue?: string | null;
|
|
60
|
+
} & CLInputTimePickerProps> & Readonly<{
|
|
61
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
62
|
+
}>, {
|
|
63
|
+
size: CLSizes;
|
|
64
|
+
color: CLColors;
|
|
65
|
+
variant: CLColorVariants.Outline | CLColorVariants.Ghost;
|
|
66
|
+
fluid: boolean;
|
|
67
|
+
rounded: boolean;
|
|
68
|
+
testId: string;
|
|
69
|
+
form: string;
|
|
70
|
+
label: string;
|
|
71
|
+
onFocus: CLGenericFocusFunction;
|
|
72
|
+
onBlur: CLGenericFocusFunction;
|
|
73
|
+
onChange: CLGenericFunction;
|
|
74
|
+
onReset: CLGenericFunction;
|
|
75
|
+
borderRadius: CLBorderRadius;
|
|
76
|
+
use24Hour: boolean;
|
|
77
|
+
required: boolean;
|
|
78
|
+
ariaLabel: string;
|
|
79
|
+
busy: boolean;
|
|
80
|
+
disabled: boolean;
|
|
81
|
+
placeholder: string;
|
|
82
|
+
orientation: CLOrientation;
|
|
83
|
+
messages: string[];
|
|
84
|
+
messageType: CLColors;
|
|
85
|
+
placement: CLPlacement;
|
|
86
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
87
|
+
inputRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
88
|
+
modelValue?: string | number;
|
|
89
|
+
} & import('../CLInput').CLInputProps> & Readonly<{
|
|
90
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
91
|
+
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
92
|
+
}>, {
|
|
93
|
+
inputRef: Readonly<globalThis.ShallowRef<HTMLInputElement | null>>;
|
|
94
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
95
|
+
reset: (...args: any[]) => void;
|
|
96
|
+
"update:modelValue": (value: string | number) => void;
|
|
97
|
+
}, import('vue').PublicProps, {
|
|
98
|
+
size: CLSizes;
|
|
99
|
+
color: CLColors;
|
|
100
|
+
variant: CLColorVariants.Outline | CLColorVariants.Ghost;
|
|
101
|
+
fluid: boolean;
|
|
102
|
+
rounded: boolean;
|
|
103
|
+
testId: string;
|
|
104
|
+
type: import('@codeandfunction/callaloo-types').CLInputTypes;
|
|
105
|
+
form: string;
|
|
106
|
+
label: string;
|
|
107
|
+
pattern: string;
|
|
108
|
+
onFocus: CLGenericFocusFunction;
|
|
109
|
+
onBlur: CLGenericFocusFunction;
|
|
110
|
+
onChange: CLGenericFunction;
|
|
111
|
+
onInput: import('../../../index.ts').CLGenericInputFunction;
|
|
112
|
+
borderRadius: CLBorderRadius;
|
|
113
|
+
required: boolean;
|
|
114
|
+
prefix: string | CLIconNames;
|
|
115
|
+
ariaLabel: string;
|
|
116
|
+
busy: boolean;
|
|
117
|
+
disabled: boolean;
|
|
118
|
+
pill: string;
|
|
119
|
+
placeholder: string;
|
|
120
|
+
orientation: CLOrientation;
|
|
121
|
+
messages: string[];
|
|
122
|
+
messageType: CLColors;
|
|
123
|
+
maxLength: number;
|
|
124
|
+
grouped: boolean;
|
|
125
|
+
suffix: string | CLIconNames;
|
|
126
|
+
autoComplete: boolean;
|
|
127
|
+
charCounter: boolean;
|
|
128
|
+
minLength: number;
|
|
129
|
+
onPrefixClick: (event?: MouseEvent) => void;
|
|
130
|
+
onSuffixClick: (event?: MouseEvent) => void;
|
|
131
|
+
prefixAriaLabel: string;
|
|
132
|
+
readonly: boolean;
|
|
133
|
+
spellCheck: boolean;
|
|
134
|
+
suffixAriaLabel: string;
|
|
135
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
136
|
+
'input-elem': HTMLInputElement;
|
|
137
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
138
|
+
P: {};
|
|
139
|
+
B: {};
|
|
140
|
+
D: {};
|
|
141
|
+
C: {};
|
|
142
|
+
M: {};
|
|
143
|
+
Defaults: {};
|
|
144
|
+
}, Readonly<{
|
|
145
|
+
modelValue?: string | number;
|
|
146
|
+
} & import('../CLInput').CLInputProps> & Readonly<{
|
|
147
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
148
|
+
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
149
|
+
}>, {
|
|
150
|
+
inputRef: Readonly<globalThis.ShallowRef<HTMLInputElement | null>>;
|
|
151
|
+
}, {}, {}, {}, {
|
|
152
|
+
size: CLSizes;
|
|
153
|
+
color: CLColors;
|
|
154
|
+
variant: CLColorVariants.Outline | CLColorVariants.Ghost;
|
|
155
|
+
fluid: boolean;
|
|
156
|
+
rounded: boolean;
|
|
157
|
+
testId: string;
|
|
158
|
+
type: import('@codeandfunction/callaloo-types').CLInputTypes;
|
|
159
|
+
form: string;
|
|
160
|
+
label: string;
|
|
161
|
+
pattern: string;
|
|
162
|
+
onFocus: CLGenericFocusFunction;
|
|
163
|
+
onBlur: CLGenericFocusFunction;
|
|
164
|
+
onChange: CLGenericFunction;
|
|
165
|
+
onInput: import('../../../index.ts').CLGenericInputFunction;
|
|
166
|
+
borderRadius: CLBorderRadius;
|
|
167
|
+
required: boolean;
|
|
168
|
+
prefix: string | CLIconNames;
|
|
169
|
+
ariaLabel: string;
|
|
170
|
+
busy: boolean;
|
|
171
|
+
disabled: boolean;
|
|
172
|
+
pill: string;
|
|
173
|
+
placeholder: string;
|
|
174
|
+
orientation: CLOrientation;
|
|
175
|
+
messages: string[];
|
|
176
|
+
messageType: CLColors;
|
|
177
|
+
maxLength: number;
|
|
178
|
+
grouped: boolean;
|
|
179
|
+
suffix: string | CLIconNames;
|
|
180
|
+
autoComplete: boolean;
|
|
181
|
+
charCounter: boolean;
|
|
182
|
+
minLength: number;
|
|
183
|
+
onPrefixClick: (event?: MouseEvent) => void;
|
|
184
|
+
onSuffixClick: (event?: MouseEvent) => void;
|
|
185
|
+
prefixAriaLabel: string;
|
|
186
|
+
readonly: boolean;
|
|
187
|
+
spellCheck: boolean;
|
|
188
|
+
suffixAriaLabel: string;
|
|
189
|
+
}> | null;
|
|
190
|
+
popoverRef: HTMLDivElement;
|
|
191
|
+
timePickerRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
192
|
+
modelValue?: string | null;
|
|
193
|
+
} & import('../CLTimePicker').CLTimePickerProps> & Readonly<{
|
|
194
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
195
|
+
"onTime-select"?: ((time: string) => any) | undefined;
|
|
196
|
+
}>, {
|
|
197
|
+
apply: () => void;
|
|
198
|
+
cancel: () => void;
|
|
199
|
+
draftHour: globalThis.Ref<string, string>;
|
|
200
|
+
draftMinute: globalThis.Ref<string, string>;
|
|
201
|
+
draftPeriod: globalThis.Ref<import('../../../composables/useTimePicker').TimePeriod, import('../../../composables/useTimePicker').TimePeriod>;
|
|
202
|
+
getFormattedDraft: () => string;
|
|
203
|
+
initializeDraft: () => void;
|
|
204
|
+
reset: () => void;
|
|
205
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
206
|
+
"update:modelValue": (value: string | null) => any;
|
|
207
|
+
"time-select": (time: string) => any;
|
|
208
|
+
}, import('vue').PublicProps, {
|
|
209
|
+
color: CLColors;
|
|
210
|
+
fluid: boolean;
|
|
211
|
+
testId: string;
|
|
212
|
+
width: string;
|
|
213
|
+
use24Hour: boolean;
|
|
214
|
+
busy: boolean;
|
|
215
|
+
disabled: boolean;
|
|
216
|
+
headerLabel: string;
|
|
217
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
218
|
+
P: {};
|
|
219
|
+
B: {};
|
|
220
|
+
D: {};
|
|
221
|
+
C: {};
|
|
222
|
+
M: {};
|
|
223
|
+
Defaults: {};
|
|
224
|
+
}, Readonly<{
|
|
225
|
+
modelValue?: string | null;
|
|
226
|
+
} & import('../CLTimePicker').CLTimePickerProps> & Readonly<{
|
|
227
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
228
|
+
"onTime-select"?: ((time: string) => any) | undefined;
|
|
229
|
+
}>, {
|
|
230
|
+
apply: () => void;
|
|
231
|
+
cancel: () => void;
|
|
232
|
+
draftHour: globalThis.Ref<string, string>;
|
|
233
|
+
draftMinute: globalThis.Ref<string, string>;
|
|
234
|
+
draftPeriod: globalThis.Ref<import('../../../composables/useTimePicker').TimePeriod, import('../../../composables/useTimePicker').TimePeriod>;
|
|
235
|
+
getFormattedDraft: () => string;
|
|
236
|
+
initializeDraft: () => void;
|
|
237
|
+
reset: () => void;
|
|
238
|
+
}, {}, {}, {}, {
|
|
239
|
+
color: CLColors;
|
|
240
|
+
fluid: boolean;
|
|
241
|
+
testId: string;
|
|
242
|
+
width: string;
|
|
243
|
+
use24Hour: boolean;
|
|
244
|
+
busy: boolean;
|
|
245
|
+
disabled: boolean;
|
|
246
|
+
headerLabel: string;
|
|
247
|
+
}> | null;
|
|
248
|
+
}, HTMLDivElement>;
|
|
249
|
+
export default _default;
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { default as CLInputTimePickerComponent } from './CLInputTimePicker.vue';
|
|
2
|
+
export declare const CLInputTimePicker: import('vue').DefineComponent<{
|
|
3
|
+
modelValue?: string | null;
|
|
4
|
+
} & import('./CLInputTimePicker.vue').CLInputTimePickerProps, {}, {}, {}, {}, 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('./CLInputTimePicker.vue').CLInputTimePickerProps> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
10
|
+
}>, {
|
|
11
|
+
size: import('@codeandfunction/callaloo-tokens').CLSizes;
|
|
12
|
+
color: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
13
|
+
variant: import("@codeandfunction/callaloo-tokens").CLColorVariants.Outline | import("@codeandfunction/callaloo-tokens").CLColorVariants.Ghost;
|
|
14
|
+
fluid: boolean;
|
|
15
|
+
rounded: boolean;
|
|
16
|
+
testId: string;
|
|
17
|
+
form: string;
|
|
18
|
+
label: string;
|
|
19
|
+
onFocus: import('../../..').CLGenericFocusFunction;
|
|
20
|
+
onBlur: import('../../..').CLGenericFocusFunction;
|
|
21
|
+
onChange: import('../../..').CLGenericFunction;
|
|
22
|
+
onReset: import('../../..').CLGenericFunction;
|
|
23
|
+
borderRadius: import('@codeandfunction/callaloo-tokens').CLBorderRadius;
|
|
24
|
+
use24Hour: boolean;
|
|
25
|
+
required: boolean;
|
|
26
|
+
ariaLabel: string;
|
|
27
|
+
busy: boolean;
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
placeholder: string;
|
|
30
|
+
orientation: import('@codeandfunction/callaloo-types').CLOrientation;
|
|
31
|
+
messages: string[];
|
|
32
|
+
messageType: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
33
|
+
placement: import('@codeandfunction/callaloo-tokens').CLPlacement;
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
35
|
+
inputRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
36
|
+
modelValue?: string | number;
|
|
37
|
+
} & import('../CLInput').CLInputProps> & Readonly<{
|
|
38
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
39
|
+
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
inputRef: Readonly<globalThis.ShallowRef<HTMLInputElement | null>>;
|
|
42
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
43
|
+
reset: (...args: any[]) => void;
|
|
44
|
+
"update:modelValue": (value: string | number) => void;
|
|
45
|
+
}, import('vue').PublicProps, {
|
|
46
|
+
size: import('@codeandfunction/callaloo-tokens').CLSizes;
|
|
47
|
+
color: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
48
|
+
variant: import("@codeandfunction/callaloo-tokens").CLColorVariants.Outline | import("@codeandfunction/callaloo-tokens").CLColorVariants.Ghost;
|
|
49
|
+
fluid: boolean;
|
|
50
|
+
rounded: boolean;
|
|
51
|
+
testId: string;
|
|
52
|
+
type: import('@codeandfunction/callaloo-types').CLInputTypes;
|
|
53
|
+
form: string;
|
|
54
|
+
label: string;
|
|
55
|
+
pattern: string;
|
|
56
|
+
onFocus: import('../../..').CLGenericFocusFunction;
|
|
57
|
+
onBlur: import('../../..').CLGenericFocusFunction;
|
|
58
|
+
onChange: import('../../..').CLGenericFunction;
|
|
59
|
+
onInput: import('../../..').CLGenericInputFunction;
|
|
60
|
+
borderRadius: import('@codeandfunction/callaloo-tokens').CLBorderRadius;
|
|
61
|
+
required: boolean;
|
|
62
|
+
prefix: string | import('@codeandfunction/callaloo-tokens').CLIconNames;
|
|
63
|
+
ariaLabel: string;
|
|
64
|
+
busy: boolean;
|
|
65
|
+
disabled: boolean;
|
|
66
|
+
pill: string;
|
|
67
|
+
placeholder: string;
|
|
68
|
+
orientation: import('@codeandfunction/callaloo-types').CLOrientation;
|
|
69
|
+
messages: string[];
|
|
70
|
+
messageType: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
71
|
+
maxLength: number;
|
|
72
|
+
grouped: boolean;
|
|
73
|
+
suffix: string | import('@codeandfunction/callaloo-tokens').CLIconNames;
|
|
74
|
+
autoComplete: boolean;
|
|
75
|
+
charCounter: boolean;
|
|
76
|
+
minLength: number;
|
|
77
|
+
onPrefixClick: (event?: MouseEvent) => void;
|
|
78
|
+
onSuffixClick: (event?: MouseEvent) => void;
|
|
79
|
+
prefixAriaLabel: string;
|
|
80
|
+
readonly: boolean;
|
|
81
|
+
spellCheck: boolean;
|
|
82
|
+
suffixAriaLabel: string;
|
|
83
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
84
|
+
'input-elem': HTMLInputElement;
|
|
85
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
86
|
+
P: {};
|
|
87
|
+
B: {};
|
|
88
|
+
D: {};
|
|
89
|
+
C: {};
|
|
90
|
+
M: {};
|
|
91
|
+
Defaults: {};
|
|
92
|
+
}, Readonly<{
|
|
93
|
+
modelValue?: string | number;
|
|
94
|
+
} & import('../CLInput').CLInputProps> & Readonly<{
|
|
95
|
+
onReset?: ((...args: any[]) => any) | undefined;
|
|
96
|
+
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
97
|
+
}>, {
|
|
98
|
+
inputRef: Readonly<globalThis.ShallowRef<HTMLInputElement | null>>;
|
|
99
|
+
}, {}, {}, {}, {
|
|
100
|
+
size: import('@codeandfunction/callaloo-tokens').CLSizes;
|
|
101
|
+
color: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
102
|
+
variant: import("@codeandfunction/callaloo-tokens").CLColorVariants.Outline | import("@codeandfunction/callaloo-tokens").CLColorVariants.Ghost;
|
|
103
|
+
fluid: boolean;
|
|
104
|
+
rounded: boolean;
|
|
105
|
+
testId: string;
|
|
106
|
+
type: import('@codeandfunction/callaloo-types').CLInputTypes;
|
|
107
|
+
form: string;
|
|
108
|
+
label: string;
|
|
109
|
+
pattern: string;
|
|
110
|
+
onFocus: import('../../..').CLGenericFocusFunction;
|
|
111
|
+
onBlur: import('../../..').CLGenericFocusFunction;
|
|
112
|
+
onChange: import('../../..').CLGenericFunction;
|
|
113
|
+
onInput: import('../../..').CLGenericInputFunction;
|
|
114
|
+
borderRadius: import('@codeandfunction/callaloo-tokens').CLBorderRadius;
|
|
115
|
+
required: boolean;
|
|
116
|
+
prefix: string | import('@codeandfunction/callaloo-tokens').CLIconNames;
|
|
117
|
+
ariaLabel: string;
|
|
118
|
+
busy: boolean;
|
|
119
|
+
disabled: boolean;
|
|
120
|
+
pill: string;
|
|
121
|
+
placeholder: string;
|
|
122
|
+
orientation: import('@codeandfunction/callaloo-types').CLOrientation;
|
|
123
|
+
messages: string[];
|
|
124
|
+
messageType: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
125
|
+
maxLength: number;
|
|
126
|
+
grouped: boolean;
|
|
127
|
+
suffix: string | import('@codeandfunction/callaloo-tokens').CLIconNames;
|
|
128
|
+
autoComplete: boolean;
|
|
129
|
+
charCounter: boolean;
|
|
130
|
+
minLength: number;
|
|
131
|
+
onPrefixClick: (event?: MouseEvent) => void;
|
|
132
|
+
onSuffixClick: (event?: MouseEvent) => void;
|
|
133
|
+
prefixAriaLabel: string;
|
|
134
|
+
readonly: boolean;
|
|
135
|
+
spellCheck: boolean;
|
|
136
|
+
suffixAriaLabel: string;
|
|
137
|
+
}> | null;
|
|
138
|
+
popoverRef: HTMLDivElement;
|
|
139
|
+
timePickerRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
140
|
+
modelValue?: string | null;
|
|
141
|
+
} & import('../CLTimePicker').CLTimePickerProps> & Readonly<{
|
|
142
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
143
|
+
"onTime-select"?: ((time: string) => any) | undefined;
|
|
144
|
+
}>, {
|
|
145
|
+
apply: () => void;
|
|
146
|
+
cancel: () => void;
|
|
147
|
+
draftHour: globalThis.Ref<string, string>;
|
|
148
|
+
draftMinute: globalThis.Ref<string, string>;
|
|
149
|
+
draftPeriod: globalThis.Ref<import('../../../composables/useTimePicker').TimePeriod, import('../../../composables/useTimePicker').TimePeriod>;
|
|
150
|
+
getFormattedDraft: () => string;
|
|
151
|
+
initializeDraft: () => void;
|
|
152
|
+
reset: () => void;
|
|
153
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
154
|
+
"update:modelValue": (value: string | null) => any;
|
|
155
|
+
"time-select": (time: string) => any;
|
|
156
|
+
}, import('vue').PublicProps, {
|
|
157
|
+
color: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
158
|
+
fluid: boolean;
|
|
159
|
+
testId: string;
|
|
160
|
+
width: string;
|
|
161
|
+
use24Hour: boolean;
|
|
162
|
+
busy: boolean;
|
|
163
|
+
disabled: boolean;
|
|
164
|
+
headerLabel: string;
|
|
165
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
166
|
+
P: {};
|
|
167
|
+
B: {};
|
|
168
|
+
D: {};
|
|
169
|
+
C: {};
|
|
170
|
+
M: {};
|
|
171
|
+
Defaults: {};
|
|
172
|
+
}, Readonly<{
|
|
173
|
+
modelValue?: string | null;
|
|
174
|
+
} & import('../CLTimePicker').CLTimePickerProps> & Readonly<{
|
|
175
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
176
|
+
"onTime-select"?: ((time: string) => any) | undefined;
|
|
177
|
+
}>, {
|
|
178
|
+
apply: () => void;
|
|
179
|
+
cancel: () => void;
|
|
180
|
+
draftHour: globalThis.Ref<string, string>;
|
|
181
|
+
draftMinute: globalThis.Ref<string, string>;
|
|
182
|
+
draftPeriod: globalThis.Ref<import('../../../composables/useTimePicker').TimePeriod, import('../../../composables/useTimePicker').TimePeriod>;
|
|
183
|
+
getFormattedDraft: () => string;
|
|
184
|
+
initializeDraft: () => void;
|
|
185
|
+
reset: () => void;
|
|
186
|
+
}, {}, {}, {}, {
|
|
187
|
+
color: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
188
|
+
fluid: boolean;
|
|
189
|
+
testId: string;
|
|
190
|
+
width: string;
|
|
191
|
+
use24Hour: boolean;
|
|
192
|
+
busy: boolean;
|
|
193
|
+
disabled: boolean;
|
|
194
|
+
headerLabel: string;
|
|
195
|
+
}> | null;
|
|
196
|
+
}, HTMLDivElement>;
|
|
197
|
+
export type CLInputTimePicker = InstanceType<typeof CLInputTimePickerComponent>;
|
|
198
|
+
export type { CLInputTimePickerProps } from './CLInputTimePicker.vue';
|
|
199
|
+
export default CLInputTimePicker;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLRadioButton.css';
|
|
3
3
|
import '../../../assets/shared/form-utilities.css';
|
|
4
|
-
import{defineComponent as e,mergeModels as a,useModel as l,useTemplateRef as s,computed as o,createBlock as d,openBlock as t,withCtx as r,createElementVNode as u,createCommentVNode as n,normalizeStyle as i,normalizeClass as m,unref as c,withDirectives as p,vModelRadio as b,createTextVNode as _,toDisplayString as y}from"vue";import{_ as f,a as $}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-
|
|
4
|
+
import{defineComponent as e,mergeModels as a,useModel as l,useTemplateRef as s,computed as o,createBlock as d,openBlock as t,withCtx as r,createElementVNode as u,createCommentVNode as n,normalizeStyle as i,normalizeClass as m,unref as c,withDirectives as p,vModelRadio as b,createTextVNode as _,toDisplayString as y}from"vue";import{_ as f,a as $}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DMZJm-t4.js";import{_ as g}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BfbUuVfZ.js";import{C as X,a as v,c as L,d as h}from"../../../chunks/index-CGlfDAYR.js";import{a as B}from"../../../chunks/utils-B5AOZV7T.js";import{useTheme as k}from"../../../composables/useTheme.js";const C=["data-testid"],q=["for"],x=["id","aria-label","checked","disabled","name","value","required"],R=/* @__PURE__ */e({name:"CLRadioButton",__name:"CLRadioButton",props:/* @__PURE__ */a({ariaLabel:{},borderRadius:{},busy:{type:Boolean},checked:{type:Boolean},color:{default:h.Neutral},disabled:{type:Boolean},form:{},id:{},label:{},messages:{},messageType:{},name:{},required:{type:Boolean},rounded:{type:Boolean,default:!0},size:{default:X.Small},testId:{default:"clll-radiobutton"},value:{type:[String,Number,Boolean]},variant:{default:L.Outline},onBlur:{},onChange:{},onFocus:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const L={[X.Tiny]:v.Small,[X.Small]:v.Medium,[X.Medium]:v.Medium,[X.Large]:v.Large,[X.XL]:v.XL,[X.XXL]:v.XXL,[X.XXXL]:v.XXXL,[X.XXXXL]:v.XXXXL},h=e,R=k(),T="clll-radiobutton",j=l(e,"modelValue"),M=s("radiobutton-ref"),F=()=>{M.value&&M.value.focus()},S=o(()=>[T,h.borderRadius?`${T}--${h.borderRadius}`:"",h.busy?`${T}--busy`:`${T}--ready`,`${T}--${h.color}`,`${T}--${h.size}`,h.disabled?`${T}--disabled`:`${T}--active`,h.label?`${T}--haslabel`:"",h.messageType?`${T}--${h.messageType}`:"",h.rounded?`${T}--rounded`:`${T}--box`,h.required?`${T}--required`:`${T}--optional`]),V=o(()=>[`${T}__radiobutton-container`,`${T}--${h.variant}`]);return a({radiobuttonRef:M}),(a,l)=>(t(),d(f,null,{default:r(()=>[u("span",{class:m(c(S)),style:i(c(B)({color:e.color,variant:e.variant,theme:c(R)})),"data-testid":e.testId},[u("span",{class:m(c(V)),onClick:F},[u("label",{for:e.id,class:m(`${T}__label`)},[u("span",{class:m([`${T}__radiobutton-frame`,"form-control-flex"])},[p(u("input",{id:e.id,ref:"radiobutton-ref","onUpdate:modelValue":l[0]||(l[0]=e=>j.value=e),"aria-label":e.ariaLabel,class:m(`${T}__radiobutton`),checked:e.checked,disabled:e.disabled||e.busy,name:e.name,value:e.value,required:e.required,type:"radio",onBlur:l[1]||(l[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onChange:l[2]||(l[2]=(...a)=>e.onChange&&e.onChange(...a)),onFocus:l[3]||(l[3]=(...a)=>e.onFocus&&e.onFocus(...a))},null,42,x),[[b,j.value]]),u("span",{class:m(`${T}__indicator`)},null,2)],2),e.label?(t(),d(c(g),{key:0,as:"span",type:L[e.size],class:m(e.required?`${T}__label--required`:"")},{default:r(()=>[_(y(e.label),1)]),_:1},8,["type","class"])):n("",!0)],10,q)],2)],14,C),e.id?(t(),d($,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):n("",!0)]),_:1}))}});export{R as CLRadioButton,R as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLSelect.css';
|
|
3
3
|
import '../../../assets/shared/form-utilities.css';
|
|
4
|
-
import{defineComponent as e,mergeModels as a,useModel as l,useTemplateRef as s,computed as o,createBlock as i,openBlock as t,withCtx as r,createElementVNode as d,createCommentVNode as n,normalizeStyle as u,normalizeClass as m,unref as c,withDirectives as p,createElementBlock as f,Fragment as b,renderList as y,toDisplayString as _,vModelSelect as $,createVNode as v}from"vue";import{_ as g,a as h}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-
|
|
4
|
+
import{defineComponent as e,mergeModels as a,useModel as l,useTemplateRef as s,computed as o,createBlock as i,openBlock as t,withCtx as r,createElementVNode as d,createCommentVNode as n,normalizeStyle as u,normalizeClass as m,unref as c,withDirectives as p,createElementBlock as f,Fragment as b,renderList as y,toDisplayString as _,vModelSelect as $,createVNode as v}from"vue";import{_ as g,a as h}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DMZJm-t4.js";import{_ as L}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-D7aTnF1Y.js";import{_ as C}from"../../../chunks/CLIcon.vue_vue_type_style_index_0_lang-C21socAp.js";import{C as k,e as X,f as x,c as q,d as z}from"../../../chunks/index-CGlfDAYR.js";import{f as B}from"../../../chunks/index-C9S3C1LU.js";import{s as T}from"../../../chunks/utils-B5AOZV7T.js";import{useTheme as j}from"../../../composables/useTheme.js";const S=["data-testid"],F=["id","aria-label","disabled","name","placeholder","form","required"],M=["value","selected","disabled"],V=/* @__PURE__ */e({name:"CLSelect",__name:"CLSelect",props:/* @__PURE__ */a({ariaLabel:{},borderRadius:{},busy:{type:Boolean},color:{default:z.Neutral},disabled:{type:Boolean},fluid:{type:Boolean,default:!1},form:{},id:{},label:{},messages:{},messageType:{},name:{},onBlur:{},onChange:{},onFocus:{},orientation:{default:B.Vertical},options:{},placeholder:{},required:{type:Boolean},rounded:{type:Boolean,default:!0},size:{default:k.Small},testId:{default:"clll-select"},variant:{default:q.Outline}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const q={[k.Tiny]:X.Tiny,[k.Small]:X.Tiny,[k.Medium]:X.Small,[k.Large]:X.Medium,[k.XL]:X.Medium,[k.XXL]:X.Large,[k.XXXL]:X.Large,[k.XXXXL]:X.XL},z=e,V=j(),I="clll-select",R=l(e,"modelValue"),w=s("select-ref"),D=()=>{w.value&&w.value.focus()},H=o(()=>[I,z.borderRadius?`${I}--${z.borderRadius}`:"",z.busy?`${I}--busy`:`${I}--ready`,`${I}--${z.color}`,`${I}--${z.size}`,`${I}--${z.variant}`,z.disabled||z.busy?`${I}--disabled`:`${I}--active`,z.fluid||z.orientation===B.Horizontal?`${I}--fluid`:`${I}--fixed`,z.label?`${I}--haslabel`:"",z.messageType?`${I}--${z.messageType}`:"",z.orientation?`${I}--${z.orientation}`:"",z.rounded?`${I}--rounded`:`${I}--box`,z.required?`${I}--required`:`${I}--optional`]);return a({selectRef:w}),(a,l)=>(t(),i(g,{fluid:e.fluid,orientation:e.orientation},{default:r(()=>[d("span",{class:m(c(H)),style:u(c(T)({color:e.color,variant:e.variant,theme:c(V)})),"data-testid":e.testId},[e.label?(t(),i(L,{key:0,"css-prefix":I,"html-for":e.id,label:e.label,required:e.required,size:e.size},null,8,["html-for","label","required","size"])):n("",!0),d("span",{class:m(`${I}__select-container`),onClick:D},[p(d("select",{id:e.id,ref:"select-ref","onUpdate:modelValue":l[0]||(l[0]=e=>R.value=e),"aria-label":e.ariaLabel,class:m(`${I}__select`),disabled:e.disabled||e.busy,name:e.name,placeholder:e.placeholder,form:e.form,required:e.required,onBlur:l[1]||(l[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onChange:l[2]||(l[2]=(...a)=>e.onChange&&e.onChange(...a)),onFocus:l[3]||(l[3]=(...a)=>e.onFocus&&e.onFocus(...a))},[e.options?(t(!0),f(b,{key:0},y(e.options,(a,l)=>(t(),f("option",{key:`${e.id}-option-${l}`,value:a.value,selected:a.value===R.value,disabled:a.disabled},_(a.label),9,M))),128)):n("",!0)],42,F),[[$,R.value]]),d("span",{class:m([`${I}__icon`,"form-select-icon-flex"])},[v(c(C),{name:c(x).ChevronDown,size:q[e.size]},null,8,["name","size"])],2)],2)],14,S),e.id?(t(),i(h,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):n("",!0)]),_:1},8,["fluid","orientation"]))}});export{V as CLSelect,V as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLTextArea.css';
|
|
3
3
|
import '../../../assets/shared/form-utilities.css';
|
|
4
|
-
import{defineComponent as e,mergeModels as a,useTemplateRef as l,useModel as o,computed as t,createBlock as r,openBlock as n,withCtx as s,createElementVNode as i,createCommentVNode as u,normalizeStyle as d,normalizeClass as m,unref as p,withDirectives as c,vModelText as h}from"vue";import{_ as f,a as y}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-
|
|
4
|
+
import{defineComponent as e,mergeModels as a,useTemplateRef as l,useModel as o,computed as t,createBlock as r,openBlock as n,withCtx as s,createElementVNode as i,createCommentVNode as u,normalizeStyle as d,normalizeClass as m,unref as p,withDirectives as c,vModelText as h}from"vue";import{_ as f,a as y}from"../../../chunks/CLInputMessages.vue_vue_type_style_index_0_lang-DMZJm-t4.js";import{_ as g}from"../../../chunks/CLFormLabel.vue_vue_type_script_setup_true_lang-D7aTnF1Y.js";import{_ as b}from"../../../chunks/CLFormCharCounter.vue_vue_type_style_index_0_lang-FFNlcIuE.js";import{c as x,C as $,d as _}from"../../../chunks/index-CGlfDAYR.js";import{f as C,C as v}from"../../../chunks/index-C9S3C1LU.js";import{i as L}from"../../../chunks/utils-B5AOZV7T.js";import{useTheme as k}from"../../../composables/useTheme.js";const B=["data-testid"],z=["id","aria-label","autocomplete","cols","disabled","form","maxlength","minlength","name","pattern","placeholder","readonly","required","spellcheck","rows"],q=/* @__PURE__ */e({name:"CLTextArea",__name:"CLTextArea",props:/* @__PURE__ */a({ariaLabel:{},autoComplete:{type:Boolean},borderRadius:{},busy:{type:Boolean},charCounter:{type:Boolean},color:{default:_.Neutral},cols:{},disabled:{type:Boolean},fluid:{type:Boolean,default:!1},form:{},id:{},label:{},maxLength:{},messages:{},messageType:{},minLength:{},name:{},onBlur:{},onChange:{},onFocus:{},onInput:{},orientation:{default:C.Vertical},pattern:{},placeholder:{},readonly:{type:Boolean},required:{type:Boolean},resizable:{type:Boolean,default:!1},rounded:{type:Boolean,default:!0},rows:{},size:{default:$.Small},spellCheck:{type:Boolean},testId:{default:"clll-textarea"},variant:{default:x.Outline}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:a}){const x=e,$=k(),_="clll-textarea",q=l("textarea-ref"),T=o(e,"modelValue"),j=()=>{q.value&&q.value.focus()},I=t(()=>[_,x.borderRadius?`${_}--${x.borderRadius}`:"",x.busy?`${_}--busy`:`${_}--ready`,`${_}--${x.color}`,`${_}--${x.size}`,`${_}--${x.variant}`,x.disabled||x.busy?`${_}--disabled`:`${_}--active`,x.charCounter&&x.maxLength?`${_}--hascharcounter`:"",x.fluid||x.orientation===C.Horizontal?`${_}--fluid`:`${_}--fixed`,x.label?`${_}--haslabel`:"",x.messageType?`${_}--${x.messageType}`:"",x.orientation?`${_}--${x.orientation}`:"",x.resizable?`${_}--resizable`:"",x.readonly?`${_}--readonly`:`${_}--writeable`,x.rounded?`${_}--rounded`:`${_}--box`,x.required?`${_}--required`:`${_}--optional`]);return a({textareaRef:q}),(a,l)=>(n(),r(f,{fluid:e.fluid,"has-char-counter":!(!e.charCounter||!e.maxLength),orientation:e.orientation},{default:s(()=>[i("span",{class:m(p(I)),style:d(p(L)({color:e.color,variant:e.variant,theme:p($)})),"data-testid":e.testId},[e.label?(n(),r(g,{key:0,"css-prefix":_,"html-for":e.id,label:e.label,required:e.required,size:e.size},null,8,["html-for","label","required","size"])):u("",!0),i("span",{class:m(`${_}__input-container`),onClick:j},[c(i("textarea",{id:e.id,ref:"textarea-ref","onUpdate:modelValue":l[0]||(l[0]=e=>T.value=e),"aria-label":e.ariaLabel,autocomplete:e.autoComplete?"on":"off",class:m(`${_}__input`),cols:e.cols,disabled:e.disabled||e.busy,form:e.form,maxlength:e.maxLength,minlength:e.minLength,name:e.name,pattern:e.pattern,placeholder:e.placeholder,readonly:e.readonly,required:e.required,spellcheck:e.spellCheck,rows:e.rows,onBlur:l[1]||(l[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onChange:l[2]||(l[2]=(...a)=>e.onChange&&e.onChange(...a)),onFocus:l[3]||(l[3]=(...a)=>e.onFocus&&e.onFocus(...a)),onInput:l[4]||(l[4]=(...a)=>e.onInput&&e.onInput(...a))},null,42,z),[[h,T.value]])],2),e.charCounter&&e.maxLength?(n(),r(b,{key:1,"css-prefix":_,"current-length":T.value?T.value.toString().length:0,"max-length":e.maxLength,color:e.color,size:e.size,layout:p(v).Block},null,8,["current-length","max-length","color","size","layout"])):u("",!0)],14,B),e.id?(n(),r(y,{key:0,id:e.id,messages:e.messages,"message-type":e.messageType},null,8,["id","messages","message-type"])):u("",!0)]),_:1},8,["fluid","has-char-counter","orientation"]))}});export{q as CLTextArea,q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.clll-time-picker{font-family:var(--clll-font-family);-webkit-font-smoothing:antialiased;display:flex;flex-direction:column;background-color:var(--clll-time-picker-bg);padding:var(--clll-unit-3);width:var(--v09187e41);box-sizing:border-box}.clll-time-picker--fluid{width:100%}.clll-time-picker__header{margin-bottom:var(--clll-unit-3)}.clll-time-picker__controls{display:flex;align-items:flex-start;gap:var(--clll-unit-2)}.clll-time-picker__unit-container{display:flex;flex-direction:column;align-items:center}.clll-time-picker__box{display:flex;align-items:center;justify-content:center;width:80px;height:72px;background-color:var(--clll-time-picker-input-bg);border:2px solid transparent;border-radius:var(--clll-unit-2);transition:border-color .2s,background-color .2s}.clll-time-picker__box:focus-within,.clll-time-picker__box--active{border-color:var(--clll-time-picker-active-border);background-color:var(--clll-time-picker-active-bg)}.clll-time-picker__input{font-family:var(--clll-font-family);-webkit-font-smoothing:antialiased;width:100%;text-align:center;font-size:2.25rem;font-weight:500;color:var(--clll-time-picker-text);background:transparent;border:none;outline:none;padding:0}.clll-time-picker__input:disabled{cursor:not-allowed;opacity:.6}.clll-time-picker__sublabel{margin-top:var(--clll-unit-2)}.clll-time-picker__separator{font-family:var(--clll-font-family);-webkit-font-smoothing:antialiased;font-size:2.25rem;font-weight:600;line-height:72px;color:var(--clll-time-picker-text)}.clll-time-picker__period-toggle{display:flex;flex-direction:column;height:72px;width:54px;border:1px solid var(--clll-time-picker-border);border-radius:var(--clll-unit-2);overflow:hidden;margin-left:var(--clll-unit-1)}.clll-time-picker__period-btn{font-family:var(--clll-font-family);-webkit-font-smoothing:antialiased;flex:1;display:flex;align-items:center;justify-content:center;background:var(--clll-time-picker-input-bg);border:none;font-size:.875rem;font-weight:600;color:var(--clll-time-picker-sublabel);cursor:pointer;transition:background-color .2s,color .2s}.clll-time-picker__period-btn:first-child{border-bottom:1px solid var(--clll-time-picker-border)}.clll-time-picker__period-btn--active{background-color:var(--clll-time-picker-active-bg);color:var(--clll-time-picker-active-text)}.clll-time-picker__period-btn:disabled{cursor:not-allowed;opacity:.6}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import '../../../assets/core.css';
|
|
2
|
+
import './CLTimePicker.css';
|
|
3
|
+
import{defineComponent as e,mergeModels as l,useCssVars as a,ref as t,useModel as u,toRef as i,watch as s,createElementBlock as o,openBlock as r,normalizeStyle as d,normalizeClass as n,unref as c,createCommentVNode as p,createElementVNode as m,createVNode as v,withCtx as _,createTextVNode as b,toDisplayString as f,withDirectives as y,isRef as g,vModelText as h}from"vue";import{_ as $}from"../../../chunks/CLText.vue_vue_type_style_index_0_lang-BfbUuVfZ.js";import{d as x,a as M}from"../../../chunks/index-CGlfDAYR.js";import{t as S}from"../../../chunks/utils-B5AOZV7T.js";import{useTimePicker as k}from"../../../composables/useTimePicker.js";import{useTheme as H}from"../../../composables/useTheme.js";const P=["data-testid"],D=["disabled"],I=["disabled"],T=["disabled"],j=["disabled"],B=/* @__PURE__ */e({name:"CLTimePicker",__name:"CLTimePicker",props:/* @__PURE__ */l({color:{default:x.Primary},disabled:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},headerLabel:{default:"Enter time"},testId:{default:"clll-time-picker"},use24Hour:{type:Boolean,default:!1},width:{default:"auto"}},{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */l(["time-select"],["update:modelValue"]),setup(e,{expose:l,emit:B}){a(e=>({v09187e41:e.width}));const L=e,C=B,V=H(),A="clll-time-picker",F=t(null),N=u(e,"modelValue"),w=t(N.value??null),{cancelDraft:z,clearDraft:U,draftHour:E,draftMinute:O,draftPeriod:q,formatTimeObject:G,getFormattedDraft:J,initializeDraft:K,parseTime:Q}=k({appliedTime:w,use24Hour:i(L,"use24Hour")});s(N,e=>{w.value=e??null,K()},{immediate:!0});const R=e=>{let l=e.target.value.replace(/\D/g,"");if(!l)return void(E.value="");let a=parseInt(l,10);L.use24Hour?a>23&&(a=23):(a>12&&(a=12),a<1&&l.length>=2&&(a=1)),E.value=String(a).padStart(l.length>=2?2:l.length,"0")},W=()=>{F.value="hour"},X=()=>{if(F.value=null,E.value&&"0"!==E.value&&"00"!==E.value){const e=parseInt(E.value,10);E.value=String(e).padStart(2,"0")}else E.value=L.use24Hour?"00":"12";ae()},Y=e=>{let l=e.target.value.replace(/\D/g,"");if(!l)return void(O.value="");let a=parseInt(l,10);a>59&&(a=59),O.value=String(a).padStart(l.length>=2?2:l.length,"0")},Z=()=>{F.value="minute"},ee=()=>{if(F.value=null,O.value){const e=parseInt(O.value,10);O.value=String(e).padStart(2,"0")}else O.value="00";ae()},le=e=>{L.disabled||L.busy||(q.value=e,ae())},ae=()=>{const e=J();C("time-select",e)};return l({apply:()=>{const e=J();w.value=e,N.value=e},cancel:()=>{z()},draftHour:E,draftMinute:O,draftPeriod:q,getFormattedDraft:J,initializeDraft:K,reset:()=>{U(),w.value=null,N.value=null}}),(l,a)=>(r(),o("div",{class:n([A,e.fluid?`${A}--fluid`:""]),"data-testid":e.testId,style:d(c(S)({color:e.color,theme:c(V)}))},[e.headerLabel?(r(),o("div",{key:0,class:n(`${A}__header`)},[v(c($),{type:c(M).Small,color:c(x).Neutral,medium:""},{default:_(()=>[b(f(e.headerLabel),1)]),_:1},8,["type","color"])],2)):p("",!0),m("div",{class:n(`${A}__controls`)},[m("div",{class:n(`${A}__unit-container`)},[m("div",{class:n([`${A}__box`,"hour"===F.value?`${A}__box--active`:""])},[y(m("input",{"onUpdate:modelValue":a[0]||(a[0]=e=>g(E)?E.value=e:null),type:"text",inputmode:"numeric",maxlength:"2",disabled:e.disabled||e.busy,class:n(`${A}__input`),"aria-label":"Hour input",onInput:R,onFocus:W,onBlur:X},null,42,D),[[h,c(E)]])],2),v(c($),{type:c(M).Small,color:c(x).Neutral,class:n(`${A}__sublabel`)},{default:_(()=>[...a[4]||(a[4]=[b(" Hour ",-1)])]),_:1},8,["type","color","class"])],2),m("div",{class:n(`${A}__separator`)},":",2),m("div",{class:n(`${A}__unit-container`)},[m("div",{class:n([`${A}__box`,"minute"===F.value?`${A}__box--active`:""])},[y(m("input",{"onUpdate:modelValue":a[1]||(a[1]=e=>g(O)?O.value=e:null),type:"text",inputmode:"numeric",maxlength:"2",disabled:e.disabled||e.busy,class:n(`${A}__input`),"aria-label":"Minute input",onInput:Y,onFocus:Z,onBlur:ee},null,42,I),[[h,c(O)]])],2),v(c($),{type:c(M).Small,color:c(x).Neutral,class:n(`${A}__sublabel`)},{default:_(()=>[...a[5]||(a[5]=[b(" Minute ",-1)])]),_:1},8,["type","color","class"])],2),e.use24Hour?p("",!0):(r(),o("div",{key:0,class:n(`${A}__period-toggle`)},[m("button",{type:"button",class:n([`${A}__period-btn`,"AM"===c(q)?`${A}__period-btn--active`:""]),disabled:e.disabled||e.busy,"aria-label":"Select AM",onClick:a[2]||(a[2]=e=>le("AM"))}," AM ",10,T),m("button",{type:"button",class:n([`${A}__period-btn`,"PM"===c(q)?`${A}__period-btn--active`:""]),disabled:e.disabled||e.busy,"aria-label":"Select PM",onClick:a[3]||(a[3]=e=>le("PM"))}," PM ",10,j)],2))],2)],14,P))}});export{B as CLTimePicker,B as default};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { CLColors } from '../../../index.ts';
|
|
2
|
+
import { TimePeriod } from '../../../composables/useTimePicker';
|
|
3
|
+
export interface CLTimePickerProps {
|
|
4
|
+
/** Sets the color theme of the time picker. */
|
|
5
|
+
color?: CLColors;
|
|
6
|
+
/** Sets the disabled state. */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** Sets the busy state. */
|
|
9
|
+
busy?: boolean;
|
|
10
|
+
/** Whether to make the time picker fluid (100% width). */
|
|
11
|
+
fluid?: boolean;
|
|
12
|
+
/** Header label text displayed at top of picker. Defaults to 'Enter time'. */
|
|
13
|
+
headerLabel?: string;
|
|
14
|
+
/** Sets custom ID used for unit tests. */
|
|
15
|
+
testId?: string;
|
|
16
|
+
/** Whether to use 24-hour format instead of 12-hour AM/PM format. */
|
|
17
|
+
use24Hour?: boolean;
|
|
18
|
+
/** Sets the width of the time picker container. */
|
|
19
|
+
width?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const _default: import('vue').DefineComponent<{
|
|
22
|
+
modelValue?: string | null;
|
|
23
|
+
} & CLTimePickerProps, {
|
|
24
|
+
apply: () => void;
|
|
25
|
+
cancel: () => void;
|
|
26
|
+
draftHour: globalThis.Ref<string, string>;
|
|
27
|
+
draftMinute: globalThis.Ref<string, string>;
|
|
28
|
+
draftPeriod: globalThis.Ref<TimePeriod, TimePeriod>;
|
|
29
|
+
getFormattedDraft: () => string;
|
|
30
|
+
initializeDraft: () => void;
|
|
31
|
+
reset: () => void;
|
|
32
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
33
|
+
"update:modelValue": (value: string | null) => any;
|
|
34
|
+
"time-select": (time: string) => any;
|
|
35
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
36
|
+
modelValue?: string | null;
|
|
37
|
+
} & CLTimePickerProps> & Readonly<{
|
|
38
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
39
|
+
"onTime-select"?: ((time: string) => any) | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
color: CLColors;
|
|
42
|
+
fluid: boolean;
|
|
43
|
+
testId: string;
|
|
44
|
+
width: string;
|
|
45
|
+
use24Hour: boolean;
|
|
46
|
+
busy: boolean;
|
|
47
|
+
disabled: boolean;
|
|
48
|
+
headerLabel: string;
|
|
49
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
50
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as CLTimePickerComponent } from './CLTimePicker.vue';
|
|
2
|
+
export declare const CLTimePicker: import('vue').DefineComponent<{
|
|
3
|
+
modelValue?: string | null;
|
|
4
|
+
} & import('./CLTimePicker.vue').CLTimePickerProps, {
|
|
5
|
+
apply: () => void;
|
|
6
|
+
cancel: () => void;
|
|
7
|
+
draftHour: globalThis.Ref<string, string>;
|
|
8
|
+
draftMinute: globalThis.Ref<string, string>;
|
|
9
|
+
draftPeriod: globalThis.Ref<import('../../../composables/useTimePicker').TimePeriod, import('../../../composables/useTimePicker').TimePeriod>;
|
|
10
|
+
getFormattedDraft: () => string;
|
|
11
|
+
initializeDraft: () => void;
|
|
12
|
+
reset: () => void;
|
|
13
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (value: string | null) => any;
|
|
15
|
+
"time-select": (time: string) => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
17
|
+
modelValue?: string | null;
|
|
18
|
+
} & import('./CLTimePicker.vue').CLTimePickerProps> & Readonly<{
|
|
19
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
20
|
+
"onTime-select"?: ((time: string) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
color: import('@codeandfunction/callaloo-tokens').CLColors;
|
|
23
|
+
fluid: boolean;
|
|
24
|
+
testId: string;
|
|
25
|
+
width: string;
|
|
26
|
+
use24Hour: boolean;
|
|
27
|
+
busy: boolean;
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
headerLabel: string;
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
31
|
+
export type CLTimePicker = InstanceType<typeof CLTimePickerComponent>;
|
|
32
|
+
export type { CLTimePickerProps } from './CLTimePicker.vue';
|
|
33
|
+
export default CLTimePicker;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { CLCheckbox } from './CLCheckbox';
|
|
2
2
|
export { CLCalendar } from './CLCalendar';
|
|
3
3
|
export { CLInputDatePicker } from './CLInputDatePicker';
|
|
4
|
+
export { CLTimePicker } from './CLTimePicker';
|
|
5
|
+
export { CLInputTimePicker } from './CLInputTimePicker';
|
|
4
6
|
export { CLInput } from './CLInput';
|
|
5
7
|
export { CLRadioButton } from './CLRadioButton';
|
|
6
8
|
export { CLSelect } from './CLSelect';
|