@wix/editor-react-components 1.2309.0 → 1.2311.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/AudioPlayer/component.js +3 -4
- package/dist/site/components/Breadcrumbs/component.js +1 -1
- package/dist/site/components/Button/component.js +1 -1
- package/dist/site/components/CollapsibleText/component.js +1 -1
- package/dist/site/components/DatePicker/component.js +8 -965
- package/dist/site/components/Image3/css.css +3 -1
- package/dist/site/components/Lottie/component.js +1 -1
- package/dist/site/components/Menu/component.js +1 -1
- package/dist/site/components/SiteLogo/css.css +9 -1
- package/dist/site/components/Slideshow/component.js +1 -1
- package/dist/site/components/SvgImage/css.css +6 -0
- package/dist/site/components/TextInput/component.js +2 -3
- package/dist/site/components/TextMarquee/component.js +6 -6
- package/dist/site/components/TimePicker/TimePicker.types.d.ts +31 -0
- package/dist/site/components/TimePicker/component.js +119 -17
- package/dist/site/components/TimePicker/constants.d.ts +63 -1
- package/dist/site/components/TimePicker/css.css +126 -0
- package/dist/site/components/TimePicker/hooks/useTimeConstraints.d.ts +8 -0
- package/dist/site/components/TimePicker/hooks/useTimePickerValue.d.ts +2 -1
- package/dist/site/components/TimePicker/manifest.js +142 -3
- package/dist/site/components/TimePicker/timePickerUtils.d.ts +2 -0
- package/dist/site/components/chunks/Button.js +1057 -347
- package/dist/site/components/chunks/Button2.js +351 -285
- package/dist/site/components/chunks/Group.js +160 -47
- package/dist/site/components/chunks/Input.js +14 -14
- package/dist/site/components/chunks/SvgImageTint.js +7 -5
- package/dist/site/components/chunks/{DateField.js → Tooltip.js} +1017 -52
- package/dist/site/components/chunks/VisuallyHidden.js +47 -0
- package/dist/site/components/chunks/constants2.js +62 -4
- package/dist/site/components/chunks/filterDOMProps.js +3 -3
- package/package.json +2 -2
- package/dist/site/components/chunks/useFocusable.js +0 -118
- package/dist/site/components/chunks/usePress.js +0 -825
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { TimeValue } from 'react-aria-components';
|
|
2
|
-
import { TimePickerProps } from '../TimePicker.types';
|
|
2
|
+
import { TimePickerGranularity, TimePickerProps } from '../TimePicker.types';
|
|
3
3
|
export declare const useTimePickerValue: (params: {
|
|
4
4
|
value: TimePickerProps["value"];
|
|
5
5
|
onChange: NonNullable<TimePickerProps["onChange"]>;
|
|
6
|
+
granularity: TimePickerGranularity;
|
|
6
7
|
}) => {
|
|
7
8
|
timeValue: TimeValue | null;
|
|
8
9
|
handleChange: (next: TimeValue | null) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as DATA, E as ELEMENTS, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
|
|
2
|
-
import { c as DisplayNames, s as selectors } from "../chunks/constants2.js";
|
|
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
3
|
import { g as getSelector } from "../chunks/manifest.js";
|
|
4
4
|
import { m as manifestFocusable, a as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
5
5
|
const cssProperties = {
|
|
@@ -7,7 +7,21 @@ const cssProperties = {
|
|
|
7
7
|
color: {},
|
|
8
8
|
textAlign: {}
|
|
9
9
|
};
|
|
10
|
-
const cssCustomProperties = {
|
|
10
|
+
const cssCustomProperties = {
|
|
11
|
+
"segment-focus-background-color": {
|
|
12
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
13
|
+
displayName: DisplayNames.root.cssCustomProperties.segmentFocusBackgroundColor
|
|
14
|
+
},
|
|
15
|
+
"segment-focus-text-color": {
|
|
16
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
17
|
+
displayName: DisplayNames.root.cssCustomProperties.segmentFocusTextColor
|
|
18
|
+
},
|
|
19
|
+
"label-spacing": {
|
|
20
|
+
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.rowGap,
|
|
21
|
+
displayName: DisplayNames.root.cssCustomProperties.labelSpacing,
|
|
22
|
+
defaultValue: "6px"
|
|
23
|
+
}
|
|
24
|
+
};
|
|
11
25
|
const boxBorder = {
|
|
12
26
|
borderTop: {},
|
|
13
27
|
borderBottom: {},
|
|
@@ -49,6 +63,15 @@ const manifest = {
|
|
|
49
63
|
disablePositioning: false
|
|
50
64
|
},
|
|
51
65
|
elements: {
|
|
66
|
+
label: {
|
|
67
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
68
|
+
inlineElement: {
|
|
69
|
+
displayName: DisplayNames.root.elements.label,
|
|
70
|
+
selector: getSelector(selectors.label),
|
|
71
|
+
behaviors: { selectable: false },
|
|
72
|
+
cssProperties: { font: {}, color: {} }
|
|
73
|
+
}
|
|
74
|
+
},
|
|
52
75
|
timeInput: {
|
|
53
76
|
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
54
77
|
inlineElement: {
|
|
@@ -69,6 +92,100 @@ const manifest = {
|
|
|
69
92
|
dataType: DATA.DATA_TYPE.localTime,
|
|
70
93
|
displayName: DisplayNames.root.data.value
|
|
71
94
|
},
|
|
95
|
+
granularity: {
|
|
96
|
+
dataType: DATA.DATA_TYPE.textEnum,
|
|
97
|
+
displayName: DisplayNames.root.data.granularity.displayName,
|
|
98
|
+
[DATA.DATA_TYPE.textEnum]: {
|
|
99
|
+
options: [
|
|
100
|
+
{
|
|
101
|
+
value: "hour",
|
|
102
|
+
displayName: DisplayNames.root.data.granularity.options.hour
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
value: "minute",
|
|
106
|
+
displayName: DisplayNames.root.data.granularity.options.minute
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
value: "second",
|
|
110
|
+
displayName: DisplayNames.root.data.granularity.options.second
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
defaultValue: defaultValues.granularity
|
|
115
|
+
},
|
|
116
|
+
hourCycle: {
|
|
117
|
+
dataType: DATA.DATA_TYPE.textEnum,
|
|
118
|
+
displayName: DisplayNames.root.data.hourCycle.displayName,
|
|
119
|
+
[DATA.DATA_TYPE.textEnum]: {
|
|
120
|
+
options: [
|
|
121
|
+
{
|
|
122
|
+
value: "auto",
|
|
123
|
+
displayName: DisplayNames.root.data.hourCycle.options.auto
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
value: "12",
|
|
127
|
+
displayName: DisplayNames.root.data.hourCycle.options.h12
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
value: "24",
|
|
131
|
+
displayName: DisplayNames.root.data.hourCycle.options.h24
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
defaultValue: defaultValues.hourCycle
|
|
136
|
+
},
|
|
137
|
+
shouldForceLeadingZeros: {
|
|
138
|
+
dataType: DATA.DATA_TYPE.booleanValue,
|
|
139
|
+
displayName: DisplayNames.root.data.shouldForceLeadingZeros,
|
|
140
|
+
defaultValue: defaultValues.shouldForceLeadingZeros
|
|
141
|
+
},
|
|
142
|
+
label: {
|
|
143
|
+
dataType: DATA.DATA_TYPE.text,
|
|
144
|
+
displayName: DisplayNames.root.data.label,
|
|
145
|
+
defaultValue: defaultValues.label
|
|
146
|
+
},
|
|
147
|
+
tooltip: {
|
|
148
|
+
dataType: DATA.DATA_TYPE.text,
|
|
149
|
+
displayName: DisplayNames.root.data.tooltip,
|
|
150
|
+
defaultValue: defaultValues.tooltip
|
|
151
|
+
},
|
|
152
|
+
placeholder: {
|
|
153
|
+
dataType: DATA.DATA_TYPE.localTime,
|
|
154
|
+
displayName: DisplayNames.root.data.placeholder
|
|
155
|
+
},
|
|
156
|
+
description: {
|
|
157
|
+
dataType: DATA.DATA_TYPE.text,
|
|
158
|
+
displayName: DisplayNames.root.data.description,
|
|
159
|
+
defaultValue: defaultValues.description
|
|
160
|
+
},
|
|
161
|
+
minTime: {
|
|
162
|
+
dataType: DATA.DATA_TYPE.localTime,
|
|
163
|
+
displayName: DisplayNames.root.data.minTime
|
|
164
|
+
},
|
|
165
|
+
maxTime: {
|
|
166
|
+
dataType: DATA.DATA_TYPE.localTime,
|
|
167
|
+
displayName: DisplayNames.root.data.maxTime
|
|
168
|
+
},
|
|
169
|
+
required: {
|
|
170
|
+
dataType: DATA.DATA_TYPE.booleanValue,
|
|
171
|
+
displayName: DisplayNames.root.data.required,
|
|
172
|
+
defaultValue: defaultValues.required
|
|
173
|
+
},
|
|
174
|
+
readOnly: {
|
|
175
|
+
dataType: DATA.DATA_TYPE.booleanValue,
|
|
176
|
+
displayName: DisplayNames.root.data.readOnly,
|
|
177
|
+
defaultValue: defaultValues.readOnly
|
|
178
|
+
},
|
|
179
|
+
isDisabled: {
|
|
180
|
+
dataType: DATA.DATA_TYPE.booleanValue,
|
|
181
|
+
displayName: DisplayNames.root.data.disabled,
|
|
182
|
+
defaultValue: defaultValues.disabled
|
|
183
|
+
},
|
|
184
|
+
clearable: {
|
|
185
|
+
dataType: DATA.DATA_TYPE.booleanValue,
|
|
186
|
+
displayName: DisplayNames.root.data.clearable,
|
|
187
|
+
defaultValue: defaultValues.clearable
|
|
188
|
+
},
|
|
72
189
|
a11y: {
|
|
73
190
|
dataType: DATA.DATA_TYPE.a11y,
|
|
74
191
|
[DATA.DATA_TYPE.a11y]: {
|
|
@@ -86,6 +203,28 @@ const manifest = {
|
|
|
86
203
|
hide: ["onChange", "onFocus", "onBlur"]
|
|
87
204
|
}
|
|
88
205
|
},
|
|
206
|
+
displayGroups: {
|
|
207
|
+
orderedDataGroup: {
|
|
208
|
+
groupType: DISPLAY_GROUPS.GROUP_TYPE.data,
|
|
209
|
+
data: {
|
|
210
|
+
items: [
|
|
211
|
+
"required",
|
|
212
|
+
"readOnly",
|
|
213
|
+
"isDisabled",
|
|
214
|
+
"clearable",
|
|
215
|
+
"granularity",
|
|
216
|
+
"hourCycle",
|
|
217
|
+
"shouldForceLeadingZeros",
|
|
218
|
+
"label",
|
|
219
|
+
"tooltip",
|
|
220
|
+
"placeholder",
|
|
221
|
+
"description",
|
|
222
|
+
"minTime",
|
|
223
|
+
"maxTime"
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
89
228
|
cssCustomProperties,
|
|
90
229
|
cssProperties
|
|
91
230
|
},
|
|
@@ -2,6 +2,8 @@ import { TimeValue } from 'react-aria-components';
|
|
|
2
2
|
import { TimePickerGranularity } from './TimePicker.types';
|
|
3
3
|
/** Reads a string prop, defaulting an unset/non-string value to empty. */
|
|
4
4
|
export declare const readString: (prop: string | undefined) => string;
|
|
5
|
+
/** Reads a boolean prop, defaulting an unset/non-boolean value to `fallback`. */
|
|
6
|
+
export declare const readBool: (prop: boolean | undefined, fallback: boolean) => boolean;
|
|
5
7
|
/**
|
|
6
8
|
* Parses an ISO `HH:MM[:SS]` into a React Aria `TimeValue` (or `null`).
|
|
7
9
|
* `parseTime` returns the top-level `@internationalized/date` type while RAC's
|