@wix/editor-react-components 1.2331.0 → 1.2333.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/site/components/Dropdown/Dropdown.types.d.ts +2 -0
- package/dist/site/components/Dropdown/component.js +89 -42
- package/dist/site/components/Dropdown/component.preview.d.ts +7 -2
- package/dist/site/components/Dropdown/components/DropdownList.d.ts +2 -1
- package/dist/site/components/Dropdown/components/DropdownTrigger.d.ts +3 -2
- package/dist/site/components/Dropdown/constants.d.ts +93 -1
- package/dist/site/components/Dropdown/css.css +15 -8
- package/dist/site/components/Dropdown/manifest.js +264 -22
- package/dist/site/components/TextInput/manifest.js +1 -1
- package/dist/site/components/TimePicker/TimePicker.types.d.ts +0 -5
- package/dist/site/components/TimePicker/component.js +0 -6
- package/dist/site/components/TimePicker/constants.d.ts +21 -2
- package/dist/site/components/TimePicker/css.css +28 -24
- package/dist/site/components/TimePicker/manifest.js +31 -27
- package/dist/site/components/chunks/constants2.js +22 -1
- package/dist/site/components/chunks/constants3.js +2 -2
- package/dist/site/components/chunks/constants32.js +74 -8
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CSS_PROPERTIES, b as DISPLAY_GROUPS, D as DATA, N as NativeStateType, a as ACTIONS, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
|
-
import { D as DesignStates, f as DisplayNames, d as defaultValues,
|
|
1
|
+
import { C as CSS_PROPERTIES, b as DISPLAY_GROUPS, D as DATA, N as NativeStateType, E as ELEMENTS, a as ACTIONS, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
|
+
import { D as DesignStates, f as DisplayNames, d as defaultValues, F as FunctionalStateKeys, s as selectors } from "../chunks/constants32.js";
|
|
3
3
|
import { w as withSpec, g as getSelector } from "../chunks/manifest.js";
|
|
4
4
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
5
5
|
import { m as manifestFocusable, b as manifestInputable, a as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
@@ -23,8 +23,8 @@ const manifest = {
|
|
|
23
23
|
displayName: DisplayNames.root.elementDisplayName,
|
|
24
24
|
archetype: Archetype.Dropdown,
|
|
25
25
|
layout: {
|
|
26
|
-
resizeDirection: LAYOUT.RESIZE_DIRECTION.
|
|
27
|
-
contentResizeDirection: LAYOUT.CONTENT_RESIZE_DIRECTION.
|
|
26
|
+
resizeDirection: LAYOUT.RESIZE_DIRECTION.horizontalAndVertical,
|
|
27
|
+
contentResizeDirection: LAYOUT.CONTENT_RESIZE_DIRECTION.vertical,
|
|
28
28
|
disableStretching: true,
|
|
29
29
|
disablePositioning: false
|
|
30
30
|
},
|
|
@@ -54,7 +54,262 @@ const manifest = {
|
|
|
54
54
|
className: DesignStates.root.disabled.className,
|
|
55
55
|
pseudoClass: NativeStateType.disabled,
|
|
56
56
|
props: { isDisabled: true }
|
|
57
|
-
})
|
|
57
|
+
}),
|
|
58
|
+
// Display-less functional states: force hidden parts visible while their
|
|
59
|
+
// element is designed (referenced by the elements' visibleState).
|
|
60
|
+
[FunctionalStateKeys.previewList]: {
|
|
61
|
+
props: { previewList: true }
|
|
62
|
+
},
|
|
63
|
+
[FunctionalStateKeys.previewChips]: {
|
|
64
|
+
props: { previewChips: true }
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
displayFilters: {
|
|
68
|
+
states: {
|
|
69
|
+
hide: [
|
|
70
|
+
FunctionalStateKeys.previewList,
|
|
71
|
+
FunctionalStateKeys.previewChips
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
elements: {
|
|
76
|
+
label: {
|
|
77
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
78
|
+
inlineElement: {
|
|
79
|
+
displayName: DisplayNames.root.elements.label,
|
|
80
|
+
selector: getSelector(selectors.label),
|
|
81
|
+
behaviors: {
|
|
82
|
+
selectable: false,
|
|
83
|
+
removable: false
|
|
84
|
+
},
|
|
85
|
+
cssCustomProperties: {
|
|
86
|
+
labelFont: {
|
|
87
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.font,
|
|
88
|
+
displayName: DisplayNames.root.cssCustomProperties.labelFont,
|
|
89
|
+
defaultValue: "normal normal normal 14px/1.4em madefor-text, helveticaneuew01-45ligh, helveticaneuew02-45ligh, helveticaneuew10-45ligh, sans-serif"
|
|
90
|
+
},
|
|
91
|
+
labelColor: {
|
|
92
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
93
|
+
displayName: DisplayNames.root.cssCustomProperties.labelColor
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
input: {
|
|
99
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
100
|
+
inlineElement: {
|
|
101
|
+
displayName: DisplayNames.root.elements.input,
|
|
102
|
+
selector: getSelector(selectors.input),
|
|
103
|
+
behaviors: {
|
|
104
|
+
selectable: false,
|
|
105
|
+
removable: false
|
|
106
|
+
},
|
|
107
|
+
// Same var names as the root's — element-scoped overrides.
|
|
108
|
+
cssCustomProperties: {
|
|
109
|
+
backgroundColor: {
|
|
110
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.backgroundColor,
|
|
111
|
+
displayName: DisplayNames.root.cssCustomProperties.backgroundColor
|
|
112
|
+
},
|
|
113
|
+
borderColor: {
|
|
114
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.borderColor,
|
|
115
|
+
displayName: DisplayNames.root.cssCustomProperties.borderColor
|
|
116
|
+
},
|
|
117
|
+
textColor: {
|
|
118
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
119
|
+
displayName: DisplayNames.root.cssCustomProperties.textColor
|
|
120
|
+
},
|
|
121
|
+
placeholderColor: {
|
|
122
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
123
|
+
displayName: DisplayNames.root.cssCustomProperties.placeholderColor
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
states: {
|
|
127
|
+
hover: withSpec({
|
|
128
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
129
|
+
displayName: DesignStates.input.hover.displayName,
|
|
130
|
+
className: DesignStates.input.hover.className,
|
|
131
|
+
pseudoClass: NativeStateType.hover
|
|
132
|
+
}),
|
|
133
|
+
focus: withSpec({
|
|
134
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
135
|
+
displayName: DesignStates.input.focus.displayName,
|
|
136
|
+
className: DesignStates.input.focus.className,
|
|
137
|
+
pseudoClass: NativeStateType.focus
|
|
138
|
+
}),
|
|
139
|
+
disabled: withSpec({
|
|
140
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
141
|
+
displayName: DesignStates.input.disabled.displayName,
|
|
142
|
+
className: DesignStates.input.disabled.className,
|
|
143
|
+
pseudoClass: NativeStateType.disabled,
|
|
144
|
+
props: { isDisabled: true }
|
|
145
|
+
})
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
trigger: {
|
|
150
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
151
|
+
inlineElement: {
|
|
152
|
+
displayName: DisplayNames.root.elements.trigger,
|
|
153
|
+
selector: getSelector(selectors.trigger),
|
|
154
|
+
behaviors: {
|
|
155
|
+
selectable: false,
|
|
156
|
+
removable: false
|
|
157
|
+
},
|
|
158
|
+
cssCustomProperties: {
|
|
159
|
+
backgroundColor: {
|
|
160
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.backgroundColor,
|
|
161
|
+
displayName: DisplayNames.root.cssCustomProperties.backgroundColor
|
|
162
|
+
},
|
|
163
|
+
borderColor: {
|
|
164
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.borderColor,
|
|
165
|
+
displayName: DisplayNames.root.cssCustomProperties.borderColor
|
|
166
|
+
},
|
|
167
|
+
textColor: {
|
|
168
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
169
|
+
displayName: DisplayNames.root.cssCustomProperties.textColor
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
states: {
|
|
173
|
+
hover: withSpec({
|
|
174
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
175
|
+
displayName: DesignStates.trigger.hover.displayName,
|
|
176
|
+
className: DesignStates.trigger.hover.className,
|
|
177
|
+
pseudoClass: NativeStateType.hover
|
|
178
|
+
}),
|
|
179
|
+
selected: withSpec({
|
|
180
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
181
|
+
displayName: DesignStates.trigger.selected.displayName,
|
|
182
|
+
className: DesignStates.trigger.selected.className
|
|
183
|
+
})
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
clearButton: {
|
|
188
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
189
|
+
inlineElement: {
|
|
190
|
+
displayName: DisplayNames.root.elements.clearButton,
|
|
191
|
+
selector: getSelector(selectors.clear),
|
|
192
|
+
behaviors: {
|
|
193
|
+
selectable: false,
|
|
194
|
+
removable: false
|
|
195
|
+
},
|
|
196
|
+
states: {
|
|
197
|
+
hover: withSpec({
|
|
198
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
199
|
+
displayName: DesignStates.clearButton.hover.displayName,
|
|
200
|
+
className: DesignStates.clearButton.hover.className,
|
|
201
|
+
pseudoClass: NativeStateType.hover
|
|
202
|
+
}),
|
|
203
|
+
selected: withSpec({
|
|
204
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
205
|
+
displayName: DesignStates.clearButton.selected.displayName,
|
|
206
|
+
className: DesignStates.clearButton.selected.className
|
|
207
|
+
})
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
list: {
|
|
212
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
213
|
+
inlineElement: {
|
|
214
|
+
displayName: DisplayNames.root.elements.list,
|
|
215
|
+
selector: getSelector(selectors.list),
|
|
216
|
+
behaviors: {
|
|
217
|
+
selectable: false,
|
|
218
|
+
removable: false
|
|
219
|
+
},
|
|
220
|
+
cssProperties: {
|
|
221
|
+
background: {},
|
|
222
|
+
borderTop: {},
|
|
223
|
+
borderBottom: {},
|
|
224
|
+
borderInlineStart: {},
|
|
225
|
+
borderInlineEnd: {},
|
|
226
|
+
borderStartStartRadius: {},
|
|
227
|
+
borderStartEndRadius: {},
|
|
228
|
+
borderEndStartRadius: {},
|
|
229
|
+
borderEndEndRadius: {}
|
|
230
|
+
},
|
|
231
|
+
visibleState: {
|
|
232
|
+
stateKey: FunctionalStateKeys.previewList,
|
|
233
|
+
elementPath: ".root"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
option: {
|
|
238
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
239
|
+
inlineElement: {
|
|
240
|
+
displayName: DisplayNames.root.elements.option,
|
|
241
|
+
selector: getSelector(selectors.option),
|
|
242
|
+
behaviors: {
|
|
243
|
+
selectable: false,
|
|
244
|
+
removable: false
|
|
245
|
+
},
|
|
246
|
+
cssCustomProperties: {
|
|
247
|
+
optionTextColor: {
|
|
248
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
249
|
+
displayName: DisplayNames.root.cssCustomProperties.optionTextColor
|
|
250
|
+
},
|
|
251
|
+
optionHoverBackgroundColor: {
|
|
252
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
253
|
+
displayName: DisplayNames.root.cssCustomProperties.optionHoverBackgroundColor
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
states: {
|
|
257
|
+
hover: withSpec({
|
|
258
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
259
|
+
displayName: DesignStates.option.hover.displayName,
|
|
260
|
+
className: DesignStates.option.hover.className,
|
|
261
|
+
pseudoClass: NativeStateType.hover
|
|
262
|
+
}),
|
|
263
|
+
selected: withSpec({
|
|
264
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
265
|
+
displayName: DesignStates.option.selected.displayName,
|
|
266
|
+
className: DesignStates.option.selected.className
|
|
267
|
+
})
|
|
268
|
+
},
|
|
269
|
+
visibleState: {
|
|
270
|
+
stateKey: FunctionalStateKeys.previewList,
|
|
271
|
+
elementPath: ".root"
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
chip: {
|
|
276
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
277
|
+
inlineElement: {
|
|
278
|
+
displayName: DisplayNames.root.elements.chip,
|
|
279
|
+
selector: getSelector(selectors.chip),
|
|
280
|
+
behaviors: {
|
|
281
|
+
selectable: false,
|
|
282
|
+
removable: false
|
|
283
|
+
},
|
|
284
|
+
cssCustomProperties: {
|
|
285
|
+
chipBackgroundColor: {
|
|
286
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
287
|
+
displayName: DisplayNames.root.cssCustomProperties.chipBackgroundColor
|
|
288
|
+
},
|
|
289
|
+
chipTextColor: {
|
|
290
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
291
|
+
displayName: DisplayNames.root.cssCustomProperties.chipTextColor
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
states: {
|
|
295
|
+
hover: withSpec({
|
|
296
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
297
|
+
displayName: DesignStates.chip.hover.displayName,
|
|
298
|
+
className: DesignStates.chip.hover.className,
|
|
299
|
+
pseudoClass: NativeStateType.hover
|
|
300
|
+
}),
|
|
301
|
+
selected: withSpec({
|
|
302
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
303
|
+
displayName: DesignStates.chip.selected.displayName,
|
|
304
|
+
className: DesignStates.chip.selected.className
|
|
305
|
+
})
|
|
306
|
+
},
|
|
307
|
+
visibleState: {
|
|
308
|
+
stateKey: FunctionalStateKeys.previewChips,
|
|
309
|
+
elementPath: ".root"
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
58
313
|
},
|
|
59
314
|
data: {
|
|
60
315
|
options: {
|
|
@@ -347,6 +602,10 @@ const manifest = {
|
|
|
347
602
|
displayName: DisplayNames.root.cssCustomProperties.paddingInlineEnd,
|
|
348
603
|
defaultValue: "12px"
|
|
349
604
|
},
|
|
605
|
+
boxShadow: {
|
|
606
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.boxShadow,
|
|
607
|
+
displayName: DisplayNames.root.cssCustomProperties.boxShadow
|
|
608
|
+
},
|
|
350
609
|
gap: {
|
|
351
610
|
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.gap,
|
|
352
611
|
displayName: DisplayNames.root.cssCustomProperties.gap,
|
|
@@ -366,15 +625,6 @@ const manifest = {
|
|
|
366
625
|
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
367
626
|
displayName: DisplayNames.root.cssCustomProperties.textColor
|
|
368
627
|
},
|
|
369
|
-
labelFont: {
|
|
370
|
-
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.font,
|
|
371
|
-
displayName: DisplayNames.root.cssCustomProperties.labelFont,
|
|
372
|
-
defaultValue: "normal normal normal 14px/1.4em madefor-text, helveticaneuew01-45ligh, helveticaneuew02-45ligh, helveticaneuew10-45ligh, sans-serif"
|
|
373
|
-
},
|
|
374
|
-
labelColor: {
|
|
375
|
-
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
376
|
-
displayName: DisplayNames.root.cssCustomProperties.labelColor
|
|
377
|
-
},
|
|
378
628
|
helperFont: {
|
|
379
629
|
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.font,
|
|
380
630
|
displayName: DisplayNames.root.cssCustomProperties.helperFont,
|
|
@@ -383,14 +633,6 @@ const manifest = {
|
|
|
383
633
|
helperColor: {
|
|
384
634
|
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
385
635
|
displayName: DisplayNames.root.cssCustomProperties.helperColor
|
|
386
|
-
},
|
|
387
|
-
optionTextColor: {
|
|
388
|
-
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
389
|
-
displayName: DisplayNames.root.cssCustomProperties.optionTextColor
|
|
390
|
-
},
|
|
391
|
-
optionHoverBackgroundColor: {
|
|
392
|
-
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
393
|
-
displayName: DisplayNames.root.cssCustomProperties.optionHoverBackgroundColor
|
|
394
636
|
}
|
|
395
637
|
}
|
|
396
638
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { I as INTERACTIONS, D as DATA, C as CSS_PROPERTIES, b as DISPLAY_GROUPS, N as NativeStateType, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
|
-
import { D as
|
|
2
|
+
import { D as DesignStates, a as DisplayNames, s as selectors } from "../chunks/constants3.js";
|
|
3
3
|
import { w as withSpec, g as getSelector } from "../chunks/manifest.js";
|
|
4
4
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
5
5
|
import { m as manifestFocusable, b as manifestInputable, a as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
@@ -27,11 +27,6 @@ export type TimePickerProps = Omit<SdkFunctionChangeableProps, 'onChange'> & Sdk
|
|
|
27
27
|
value: string;
|
|
28
28
|
/** Optional text label rendered above the field. */
|
|
29
29
|
label: string;
|
|
30
|
-
/**
|
|
31
|
-
* ISO `HH:MM` time that seeds the empty field (React Aria `placeholderValue`
|
|
32
|
-
* — e.g. which hour the segments start at).
|
|
33
|
-
*/
|
|
34
|
-
placeholder: string;
|
|
35
30
|
/** Site-facing helper text rendered under the field. */
|
|
36
31
|
description?: string;
|
|
37
32
|
/** Hint text revealed from an info icon next to the label. */
|
|
@@ -140,11 +140,6 @@ function TimePicker(props) {
|
|
|
140
140
|
const tooltip2 = readString(props.tooltip);
|
|
141
141
|
const isDisabled = readBool(props.isDisabled, false);
|
|
142
142
|
const isRequired = readBool(props.required, defaultValues.required);
|
|
143
|
-
const placeholderStr = readString(props.placeholder);
|
|
144
|
-
const placeholderValue = useMemo(
|
|
145
|
-
() => toTimeValue(placeholderStr) ?? void 0,
|
|
146
|
-
[placeholderStr]
|
|
147
|
-
);
|
|
148
143
|
const { timeValue, handleChange, hasValue } = useTimePickerValue({
|
|
149
144
|
value: props.value,
|
|
150
145
|
onChange,
|
|
@@ -202,7 +197,6 @@ function TimePicker(props) {
|
|
|
202
197
|
shouldForceLeadingZeros: shouldForceLeadingZeros || void 0,
|
|
203
198
|
minValue,
|
|
204
199
|
maxValue,
|
|
205
|
-
placeholderValue,
|
|
206
200
|
isDisabled,
|
|
207
201
|
isReadOnly: readOnly,
|
|
208
202
|
isRequired,
|
|
@@ -22,7 +22,6 @@ export declare const DisplayNames: {
|
|
|
22
22
|
shouldForceLeadingZeros: string;
|
|
23
23
|
tooltip: string;
|
|
24
24
|
label: string;
|
|
25
|
-
placeholder: string;
|
|
26
25
|
description: string;
|
|
27
26
|
minTime: string;
|
|
28
27
|
maxTime: string;
|
|
@@ -31,6 +30,11 @@ export declare const DisplayNames: {
|
|
|
31
30
|
disabled: string;
|
|
32
31
|
clearable: string;
|
|
33
32
|
};
|
|
33
|
+
designStates: {
|
|
34
|
+
hover: string;
|
|
35
|
+
focus: string;
|
|
36
|
+
disabled: string;
|
|
37
|
+
};
|
|
34
38
|
elements: {
|
|
35
39
|
label: string;
|
|
36
40
|
timeInput: string;
|
|
@@ -48,7 +52,6 @@ export declare const defaultValues: {
|
|
|
48
52
|
readonly shouldForceLeadingZeros: false;
|
|
49
53
|
readonly tooltip: "";
|
|
50
54
|
readonly label: "";
|
|
51
|
-
readonly placeholder: "";
|
|
52
55
|
readonly description: "";
|
|
53
56
|
readonly required: false;
|
|
54
57
|
readonly readOnly: false;
|
|
@@ -67,6 +70,22 @@ export declare const enum HourCycleValues {
|
|
|
67
70
|
H12 = "12",
|
|
68
71
|
H24 = "24"
|
|
69
72
|
}
|
|
73
|
+
export declare const DesignStates: {
|
|
74
|
+
timeInput: {
|
|
75
|
+
hover: {
|
|
76
|
+
displayName: string;
|
|
77
|
+
className: string;
|
|
78
|
+
};
|
|
79
|
+
focus: {
|
|
80
|
+
displayName: string;
|
|
81
|
+
className: string;
|
|
82
|
+
};
|
|
83
|
+
disabled: {
|
|
84
|
+
displayName: string;
|
|
85
|
+
className: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
70
89
|
/** The value that represents "no time selected". */
|
|
71
90
|
export declare const EMPTY_VALUE = "";
|
|
72
91
|
export declare const TRANSLATIONS_NAMESPACE = "timePicker";
|
|
@@ -9,13 +9,7 @@
|
|
|
9
9
|
);
|
|
10
10
|
--label-text-color: var(--wst-paragraph-2-color, #2b2b2b);
|
|
11
11
|
|
|
12
|
-
--field-background-color: var(--wst-primary-background-color, #ffffff);
|
|
13
12
|
--borderColor: var(--wst-system-line-1-color, #dfe5eb);
|
|
14
|
-
--borderWidth: 1px;
|
|
15
|
-
--borderStartStartRadius: 6px;
|
|
16
|
-
--borderStartEndRadius: 6px;
|
|
17
|
-
--borderEndStartRadius: 6px;
|
|
18
|
-
--borderEndEndRadius: 6px;
|
|
19
13
|
|
|
20
14
|
--label-spacing: 6px;
|
|
21
15
|
|
|
@@ -48,17 +42,23 @@
|
|
|
48
42
|
.timePicker__j78My {
|
|
49
43
|
display: flex;
|
|
50
44
|
flex-direction: column;
|
|
45
|
+
row-gap: var(--label-spacing, 6px);
|
|
51
46
|
}
|
|
52
47
|
.labelRow__qoC8g {
|
|
53
48
|
display: flex;
|
|
54
|
-
align-items:
|
|
49
|
+
align-items: flex-start;
|
|
55
50
|
gap: 6px;
|
|
56
|
-
margin: 0
|
|
51
|
+
margin: 0;
|
|
52
|
+
min-width: 0;
|
|
57
53
|
}
|
|
58
54
|
.label__THO5j {
|
|
59
55
|
margin: 0;
|
|
56
|
+
min-width: 0;
|
|
57
|
+
max-width: 100%;
|
|
60
58
|
font: var(--labelFont);
|
|
61
59
|
color: var(--label-text-color);
|
|
60
|
+
overflow-wrap: break-word;
|
|
61
|
+
word-break: break-word;
|
|
62
62
|
}
|
|
63
63
|
.tooltipButton__ISWIR {
|
|
64
64
|
flex: none;
|
|
@@ -100,29 +100,34 @@
|
|
|
100
100
|
box-sizing: border-box;
|
|
101
101
|
display: flex;
|
|
102
102
|
align-items: center;
|
|
103
|
-
gap: 8px;
|
|
104
103
|
width: 100%;
|
|
105
|
-
|
|
104
|
+
column-gap: 8px;
|
|
105
|
+
padding-top: 8px;
|
|
106
|
+
padding-bottom: 8px;
|
|
107
|
+
padding-inline-start: 12px;
|
|
108
|
+
padding-inline-end: 12px;
|
|
106
109
|
font: inherit;
|
|
107
110
|
color: inherit;
|
|
108
|
-
background: var(--
|
|
109
|
-
|
|
110
|
-
border-
|
|
111
|
-
border-
|
|
112
|
-
border-
|
|
113
|
-
border-
|
|
114
|
-
border-
|
|
115
|
-
border-
|
|
111
|
+
background: var(--wst-primary-background-color, #ffffff);
|
|
112
|
+
box-shadow: none;
|
|
113
|
+
border-top: 1px solid var(--borderColor);
|
|
114
|
+
border-bottom: 1px solid var(--borderColor);
|
|
115
|
+
border-inline-start: 1px solid var(--borderColor);
|
|
116
|
+
border-inline-end: 1px solid var(--borderColor);
|
|
117
|
+
border-start-start-radius: 6px;
|
|
118
|
+
border-start-end-radius: 6px;
|
|
119
|
+
border-end-start-radius: 6px;
|
|
120
|
+
border-end-end-radius: 6px;
|
|
116
121
|
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
117
122
|
}
|
|
118
|
-
.group__6HZy7:focus-within {
|
|
123
|
+
.group__6HZy7:focus-within, .group__6HZy7.timePicker__group--focus {
|
|
119
124
|
border-color: var(--accent-color);
|
|
120
125
|
box-shadow: 0 0 0 1px var(--accent-color);
|
|
121
126
|
}
|
|
122
|
-
.group__6HZy7:hover:not(:focus-within) {
|
|
127
|
+
.group__6HZy7:hover:not(:focus-within), .group__6HZy7.timePicker__group--hover {
|
|
123
128
|
border-color: color-mix(in srgb, var(--accent-color) 45%, transparent);
|
|
124
129
|
}
|
|
125
|
-
.
|
|
130
|
+
.group__6HZy7[data-disabled], .group__6HZy7.timePicker__group--disabled {
|
|
126
131
|
opacity: 0.55;
|
|
127
132
|
cursor: not-allowed;
|
|
128
133
|
}
|
|
@@ -136,7 +141,6 @@
|
|
|
136
141
|
white-space: nowrap;
|
|
137
142
|
}
|
|
138
143
|
.description__ePprf {
|
|
139
|
-
margin-top: 4px;
|
|
140
144
|
font-size: 12px;
|
|
141
145
|
opacity: 0.7;
|
|
142
146
|
}
|
|
@@ -155,8 +159,8 @@
|
|
|
155
159
|
color: color-mix(in srgb, currentColor 45%, transparent);
|
|
156
160
|
}
|
|
157
161
|
.segment__OtazP[data-focused] {
|
|
158
|
-
background: var(--
|
|
159
|
-
color: var(--segment-focus-text-color);
|
|
162
|
+
background: var(--segment-focus-background-color, #116dff);
|
|
163
|
+
color: var(--segment-focus-text-color, #ffffff);
|
|
160
164
|
}
|
|
161
165
|
.clearButton__Bto7s {
|
|
162
166
|
flex: none;
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { C as CSS_PROPERTIES, b as DISPLAY_GROUPS, D as DATA, E as ELEMENTS, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
|
-
import { c as DisplayNames, d as defaultValues, s as selectors } from "../chunks/constants2.js";
|
|
3
|
-
import { g as getSelector } from "../chunks/manifest.js";
|
|
2
|
+
import { c as DisplayNames, d as defaultValues, e as DesignStates, s as selectors } from "../chunks/constants2.js";
|
|
3
|
+
import { w as withSpec, g as getSelector } from "../chunks/manifest.js";
|
|
4
|
+
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
4
5
|
import { m as manifestFocusable, a as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
5
6
|
const cssProperties = {
|
|
6
7
|
font: {},
|
|
7
8
|
color: {},
|
|
8
9
|
textAlign: {}
|
|
9
10
|
};
|
|
11
|
+
const designState = (s) => withSpec({
|
|
12
|
+
spec: IS_SUPPORT_DESIGN_STATE_SPEC,
|
|
13
|
+
displayName: s.displayName,
|
|
14
|
+
className: s.className
|
|
15
|
+
});
|
|
10
16
|
const cssCustomProperties = {
|
|
11
17
|
"segment-focus-background-color": {
|
|
18
|
+
// Keep `color` (not `backgroundColor`): Dev Center enrichment rejects
|
|
19
|
+
// changing a released cssCustomProperty's type (this was published as color).
|
|
12
20
|
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
13
21
|
displayName: DisplayNames.root.cssCustomProperties.segmentFocusBackgroundColor
|
|
14
22
|
},
|
|
@@ -22,21 +30,22 @@ const cssCustomProperties = {
|
|
|
22
30
|
defaultValue: "6px"
|
|
23
31
|
}
|
|
24
32
|
};
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
const fieldBorder = "1px solid var(--wst-system-line-1-color, #dfe5eb)";
|
|
34
|
+
const timeInputCssProperties = {
|
|
35
|
+
background: { defaultValue: "var(--wst-primary-background-color, #ffffff)" },
|
|
36
|
+
boxShadow: { defaultValue: "none" },
|
|
37
|
+
borderTop: { defaultValue: fieldBorder },
|
|
38
|
+
borderBottom: { defaultValue: fieldBorder },
|
|
39
|
+
borderInlineStart: { defaultValue: fieldBorder },
|
|
40
|
+
borderInlineEnd: { defaultValue: fieldBorder },
|
|
41
|
+
borderStartStartRadius: { defaultValue: "6px" },
|
|
42
|
+
borderStartEndRadius: { defaultValue: "6px" },
|
|
43
|
+
borderEndStartRadius: { defaultValue: "6px" },
|
|
44
|
+
borderEndEndRadius: { defaultValue: "6px" },
|
|
45
|
+
paddingTop: { defaultValue: "8px" },
|
|
46
|
+
paddingBottom: { defaultValue: "8px" },
|
|
47
|
+
paddingInlineStart: { defaultValue: "12px" },
|
|
48
|
+
paddingInlineEnd: { defaultValue: "12px" }
|
|
40
49
|
};
|
|
41
50
|
const manifest = {
|
|
42
51
|
id: "eb293641-a409-4f13-b122-57534b6abdab",
|
|
@@ -78,11 +87,11 @@ const manifest = {
|
|
|
78
87
|
displayName: DisplayNames.root.elements.timeInput,
|
|
79
88
|
selector: getSelector(selectors.group),
|
|
80
89
|
behaviors: { selectable: false },
|
|
81
|
-
cssProperties:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
90
|
+
cssProperties: timeInputCssProperties,
|
|
91
|
+
states: {
|
|
92
|
+
hover: designState(DesignStates.timeInput.hover),
|
|
93
|
+
focus: designState(DesignStates.timeInput.focus),
|
|
94
|
+
disabled: designState(DesignStates.timeInput.disabled)
|
|
86
95
|
}
|
|
87
96
|
}
|
|
88
97
|
}
|
|
@@ -149,10 +158,6 @@ const manifest = {
|
|
|
149
158
|
displayName: DisplayNames.root.data.tooltip,
|
|
150
159
|
defaultValue: defaultValues.tooltip
|
|
151
160
|
},
|
|
152
|
-
placeholder: {
|
|
153
|
-
dataType: DATA.DATA_TYPE.localTime,
|
|
154
|
-
displayName: DisplayNames.root.data.placeholder
|
|
155
|
-
},
|
|
156
161
|
description: {
|
|
157
162
|
dataType: DATA.DATA_TYPE.text,
|
|
158
163
|
displayName: DisplayNames.root.data.description,
|
|
@@ -217,7 +222,6 @@ const manifest = {
|
|
|
217
222
|
"shouldForceLeadingZeros",
|
|
218
223
|
"label",
|
|
219
224
|
"tooltip",
|
|
220
|
-
"placeholder",
|
|
221
225
|
"description",
|
|
222
226
|
"minTime",
|
|
223
227
|
"maxTime"
|
|
@@ -22,7 +22,6 @@ const DisplayNames = {
|
|
|
22
22
|
shouldForceLeadingZeros: "Always show leading zeros",
|
|
23
23
|
tooltip: "Tooltip",
|
|
24
24
|
label: "Label",
|
|
25
|
-
placeholder: "Placeholder time (HH:MM)",
|
|
26
25
|
description: "Helper text",
|
|
27
26
|
minTime: "Earliest time (HH:MM)",
|
|
28
27
|
maxTime: "Latest time (HH:MM)",
|
|
@@ -31,6 +30,11 @@ const DisplayNames = {
|
|
|
31
30
|
disabled: "Disabled",
|
|
32
31
|
clearable: "Show clear button"
|
|
33
32
|
},
|
|
33
|
+
designStates: {
|
|
34
|
+
hover: "Hover",
|
|
35
|
+
focus: "Focus",
|
|
36
|
+
disabled: "Disabled"
|
|
37
|
+
},
|
|
34
38
|
elements: {
|
|
35
39
|
label: "Label",
|
|
36
40
|
timeInput: "Time input"
|
|
@@ -60,6 +64,22 @@ var HourCycleValues = /* @__PURE__ */ ((HourCycleValues2) => {
|
|
|
60
64
|
HourCycleValues2["H24"] = "24";
|
|
61
65
|
return HourCycleValues2;
|
|
62
66
|
})(HourCycleValues || {});
|
|
67
|
+
const DesignStates = {
|
|
68
|
+
timeInput: {
|
|
69
|
+
hover: {
|
|
70
|
+
displayName: DisplayNames.root.designStates.hover,
|
|
71
|
+
className: "timePicker__group--hover"
|
|
72
|
+
},
|
|
73
|
+
focus: {
|
|
74
|
+
displayName: DisplayNames.root.designStates.focus,
|
|
75
|
+
className: "timePicker__group--focus"
|
|
76
|
+
},
|
|
77
|
+
disabled: {
|
|
78
|
+
displayName: DisplayNames.root.designStates.disabled,
|
|
79
|
+
className: "timePicker__group--disabled"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
};
|
|
63
83
|
const EMPTY_VALUE = "";
|
|
64
84
|
const TRANSLATIONS_NAMESPACE = "timePicker";
|
|
65
85
|
const TranslationKeys = {
|
|
@@ -91,5 +111,6 @@ export {
|
|
|
91
111
|
TranslationKeys as b,
|
|
92
112
|
DisplayNames as c,
|
|
93
113
|
defaultValues as d,
|
|
114
|
+
DesignStates as e,
|
|
94
115
|
selectors as s
|
|
95
116
|
};
|