@wix/editor-react-components 1.2288.0 → 1.2289.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.
Files changed (45) hide show
  1. package/dist/site/components/AccordionComponent/component.js +1 -1
  2. package/dist/site/components/AccordionComponent/manifest.js +1 -1
  3. package/dist/site/components/AudioPlayer/component.js +5 -1105
  4. package/dist/site/components/AudioPlayer/manifest.js +1 -1
  5. package/dist/site/components/Breadcrumbs/component.js +3 -117
  6. package/dist/site/components/Breadcrumbs/manifest.js +1 -1
  7. package/dist/site/components/CollapsibleText/component.js +1 -1
  8. package/dist/site/components/CollapsibleText/manifest.js +1 -1
  9. package/dist/site/components/DatePicker/DatePicker.d.ts +3 -0
  10. package/dist/site/components/DatePicker/DatePicker.types.d.ts +91 -0
  11. package/dist/site/components/DatePicker/component.d.ts +2 -0
  12. package/dist/site/components/DatePicker/component.js +12181 -0
  13. package/dist/site/components/DatePicker/component.preview.d.ts +2 -0
  14. package/dist/site/components/DatePicker/components/DatePickerCalendar.d.ts +5 -0
  15. package/dist/site/components/DatePicker/components/DatePickerField.d.ts +6 -0
  16. package/dist/site/components/DatePicker/components/DatePickerLabel.d.ts +6 -0
  17. package/dist/site/components/DatePicker/components/DatePickerTooltip.d.ts +5 -0
  18. package/dist/site/components/DatePicker/constants.d.ts +177 -0
  19. package/dist/site/components/DatePicker/css.css +349 -0
  20. package/dist/site/components/DatePicker/datePickerUtils.d.ts +26 -0
  21. package/dist/site/components/DatePicker/hooks/useDateConstraints.d.ts +12 -0
  22. package/dist/site/components/DatePicker/hooks/useDatePickerValue.d.ts +15 -0
  23. package/dist/site/components/DatePicker/hooks/useUnavailableDates.d.ts +3 -0
  24. package/dist/site/components/DatePicker/index.d.ts +2 -0
  25. package/dist/site/components/DatePicker/index.js +6 -0
  26. package/dist/site/components/DatePicker/manifest.d.ts +5 -0
  27. package/dist/site/components/DatePicker/manifest.js +370 -0
  28. package/dist/site/components/Dropdown/component.js +1 -3
  29. package/dist/site/components/TextBox/component.js +1 -4
  30. package/dist/site/components/TextInput/component.js +4 -297
  31. package/dist/site/components/chunks/Button2.js +1118 -0
  32. package/dist/site/components/chunks/DismissSmall.js +7 -0
  33. package/dist/site/components/chunks/Group.js +108 -36
  34. package/dist/site/components/chunks/I18nProvider.js +32 -2
  35. package/dist/site/components/chunks/InfoCircleSmall.js +7 -0
  36. package/dist/site/components/chunks/Input.js +341 -0
  37. package/dist/site/components/chunks/constants32.js +152 -49
  38. package/dist/site/components/chunks/constants33.js +53 -71
  39. package/dist/site/components/chunks/constants34.js +73 -77
  40. package/dist/site/components/chunks/constants35.js +76 -57
  41. package/dist/site/components/chunks/constants36.js +72 -0
  42. package/dist/site/components/chunks/filterDOMProps.js +14 -8
  43. package/dist/site/components/chunks/useLocalizedStringFormatter.js +122 -0
  44. package/dist/site/components/extensions.js +53 -48
  45. package/package.json +3 -2
@@ -0,0 +1,370 @@
1
+ import { N as NativeStateType, b as DISPLAY_GROUPS, D as DATA, E as ELEMENTS, L as LAYOUT, A as Archetype } from "../chunks/chunk-JPMZBG44.js";
2
+ import { D as DesignStates, P as PREVIEW_CALENDAR_OPEN, b as DisplayNames, d as defaultValues, s as selectors } from "../chunks/constants32.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";
5
+ import { m as manifestFocusable, a as manifestChangeable } from "../chunks/manifestSdkMixins.js";
6
+ import { D as DomEventType } from "../chunks/types.impl.js";
7
+ const cssProperties = {
8
+ font: {},
9
+ color: {}
10
+ };
11
+ const designState = (s) => withSpec({
12
+ spec: IS_SUPPORT_DESIGN_STATE_SPEC,
13
+ displayName: s.displayName,
14
+ className: s.className
15
+ });
16
+ const openWhileDesigning = {
17
+ stateKey: PREVIEW_CALENDAR_OPEN,
18
+ elementPath: ".root"
19
+ };
20
+ const boxBorder = {
21
+ borderTop: {},
22
+ borderBottom: {},
23
+ borderInlineStart: {},
24
+ borderInlineEnd: {},
25
+ borderStartStartRadius: {},
26
+ borderStartEndRadius: {},
27
+ borderEndStartRadius: {},
28
+ borderEndEndRadius: {}
29
+ };
30
+ const boxPadding = {
31
+ paddingTop: {},
32
+ paddingBottom: {},
33
+ paddingInlineStart: {},
34
+ paddingInlineEnd: {}
35
+ };
36
+ const manifest = {
37
+ id: "0bdb8b86-cfd6-45cb-a30b-900480415524",
38
+ type: "wixEditorElements.DatePicker__DEV__v2",
39
+ description: "A date picker input. Visitors pick a date from a segmented field or a calendar popover. The selected date is exposed as an ISO string and can be connected to a data field.",
40
+ installation: {
41
+ initialSize: {
42
+ width: {
43
+ sizingType: LAYOUT.SIZING_TYPE.pixels,
44
+ pixels: 240
45
+ },
46
+ height: {
47
+ sizingType: LAYOUT.SIZING_TYPE.content
48
+ }
49
+ }
50
+ },
51
+ editorElement: {
52
+ selector: getSelector(selectors.root),
53
+ displayName: DisplayNames.root.elementDisplayName,
54
+ archetype: Archetype.DatePicker,
55
+ layout: {
56
+ resizeDirection: LAYOUT.RESIZE_DIRECTION.horizontalAndVertical,
57
+ contentResizeDirection: LAYOUT.CONTENT_RESIZE_DIRECTION.vertical,
58
+ disableStretching: true,
59
+ disablePositioning: false
60
+ },
61
+ elements: {
62
+ label: {
63
+ elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
64
+ inlineElement: {
65
+ displayName: DisplayNames.root.elements.label,
66
+ selector: getSelector(selectors.label),
67
+ behaviors: { selectable: false },
68
+ cssProperties: { font: {}, color: {} }
69
+ }
70
+ },
71
+ dateInput: {
72
+ elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
73
+ inlineElement: {
74
+ displayName: DisplayNames.root.elements.dateInput,
75
+ selector: getSelector(selectors.group),
76
+ behaviors: { selectable: false },
77
+ cssProperties: {
78
+ background: {},
79
+ columnGap: {},
80
+ ...boxBorder,
81
+ ...boxPadding
82
+ },
83
+ states: {
84
+ hover: designState(DesignStates.dateInput.hover),
85
+ focus: designState(DesignStates.dateInput.focus),
86
+ disabled: designState(DesignStates.dateInput.disabled)
87
+ }
88
+ }
89
+ },
90
+ calendarButton: {
91
+ elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
92
+ inlineElement: {
93
+ displayName: DisplayNames.root.elements.calendarButton,
94
+ selector: getSelector(selectors.calendarButton),
95
+ behaviors: { selectable: false },
96
+ cssProperties: {
97
+ background: {},
98
+ color: {},
99
+ borderStartStartRadius: {},
100
+ borderStartEndRadius: {},
101
+ borderEndStartRadius: {},
102
+ borderEndEndRadius: {}
103
+ },
104
+ states: {
105
+ hover: designState(DesignStates.calendarButton.hover),
106
+ selected: designState(DesignStates.calendarButton.selected)
107
+ }
108
+ }
109
+ },
110
+ popover: {
111
+ elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
112
+ inlineElement: {
113
+ displayName: DisplayNames.root.elements.popover,
114
+ selector: getSelector(selectors.popover),
115
+ behaviors: { selectable: false },
116
+ cssProperties: { boxShadow: {}, ...boxBorder },
117
+ visibleState: openWhileDesigning
118
+ }
119
+ },
120
+ calendar: {
121
+ elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
122
+ inlineElement: {
123
+ displayName: DisplayNames.root.elements.calendar,
124
+ selector: getSelector(selectors.calendar),
125
+ behaviors: { selectable: false },
126
+ cssProperties: { background: {}, ...boxPadding },
127
+ visibleState: openWhileDesigning
128
+ }
129
+ },
130
+ calendarDay: {
131
+ elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
132
+ inlineElement: {
133
+ displayName: DisplayNames.root.elements.calendarDay,
134
+ selector: getSelector(selectors.day),
135
+ behaviors: { selectable: false },
136
+ cssProperties: { background: {}, color: {} },
137
+ states: {
138
+ hover: designState(DesignStates.calendarDay.hover),
139
+ selected: designState(DesignStates.calendarDay.selected),
140
+ disabled: designState(DesignStates.calendarDay.disabled)
141
+ },
142
+ visibleState: openWhileDesigning
143
+ }
144
+ },
145
+ today: {
146
+ elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
147
+ inlineElement: {
148
+ displayName: DisplayNames.root.elements.today,
149
+ selector: `${getSelector(selectors.day)}[data-today]`,
150
+ behaviors: { selectable: false },
151
+ cssProperties: { background: {}, color: {} },
152
+ visibleState: openWhileDesigning
153
+ }
154
+ }
155
+ },
156
+ data: {
157
+ value: {
158
+ dataType: DATA.DATA_TYPE.text,
159
+ displayName: DisplayNames.root.data.value
160
+ },
161
+ endValue: {
162
+ dataType: DATA.DATA_TYPE.text,
163
+ displayName: DisplayNames.root.data.endValue
164
+ },
165
+ selectionMode: {
166
+ dataType: DATA.DATA_TYPE.textEnum,
167
+ displayName: DisplayNames.root.data.selectionMode.displayName,
168
+ [DATA.DATA_TYPE.textEnum]: {
169
+ options: [
170
+ {
171
+ value: "single",
172
+ displayName: DisplayNames.root.data.selectionMode.options.single
173
+ },
174
+ {
175
+ value: "range",
176
+ displayName: DisplayNames.root.data.selectionMode.options.range
177
+ }
178
+ ]
179
+ },
180
+ defaultValue: defaultValues.selectionMode
181
+ },
182
+ granularity: {
183
+ dataType: DATA.DATA_TYPE.textEnum,
184
+ displayName: DisplayNames.root.data.granularity.displayName,
185
+ [DATA.DATA_TYPE.textEnum]: {
186
+ options: [
187
+ {
188
+ value: "day",
189
+ displayName: DisplayNames.root.data.granularity.options.day
190
+ },
191
+ {
192
+ value: "hour",
193
+ displayName: DisplayNames.root.data.granularity.options.hour
194
+ },
195
+ {
196
+ value: "minute",
197
+ displayName: DisplayNames.root.data.granularity.options.minute
198
+ }
199
+ ]
200
+ },
201
+ defaultValue: defaultValues.granularity
202
+ },
203
+ label: {
204
+ dataType: DATA.DATA_TYPE.text,
205
+ displayName: DisplayNames.root.data.label,
206
+ defaultValue: defaultValues.label
207
+ },
208
+ tooltip: {
209
+ dataType: DATA.DATA_TYPE.text,
210
+ displayName: DisplayNames.root.data.tooltip,
211
+ defaultValue: defaultValues.tooltip
212
+ },
213
+ description: {
214
+ dataType: DATA.DATA_TYPE.text,
215
+ displayName: DisplayNames.root.data.description,
216
+ defaultValue: defaultValues.description
217
+ },
218
+ minDate: {
219
+ dataType: DATA.DATA_TYPE.localDate,
220
+ displayName: DisplayNames.root.data.minDate
221
+ },
222
+ maxDate: {
223
+ dataType: DATA.DATA_TYPE.localDate,
224
+ displayName: DisplayNames.root.data.maxDate
225
+ },
226
+ unavailableDates: {
227
+ dataType: DATA.DATA_TYPE.arrayItems,
228
+ displayName: DisplayNames.root.data.unavailableDates,
229
+ [DATA.DATA_TYPE.arrayItems]: {
230
+ data: {
231
+ items: {
232
+ from: {
233
+ dataType: DATA.DATA_TYPE.localDate,
234
+ displayName: DisplayNames.root.data.unavailableFrom
235
+ },
236
+ to: {
237
+ dataType: DATA.DATA_TYPE.localDate,
238
+ displayName: DisplayNames.root.data.unavailableTo
239
+ }
240
+ }
241
+ }
242
+ }
243
+ },
244
+ allowPastDates: {
245
+ dataType: DATA.DATA_TYPE.booleanValue,
246
+ displayName: DisplayNames.root.data.allowPastDates,
247
+ defaultValue: defaultValues.allowPastDates
248
+ },
249
+ allowFutureDates: {
250
+ dataType: DATA.DATA_TYPE.booleanValue,
251
+ displayName: DisplayNames.root.data.allowFutureDates,
252
+ defaultValue: defaultValues.allowFutureDates
253
+ },
254
+ required: {
255
+ dataType: DATA.DATA_TYPE.booleanValue,
256
+ displayName: DisplayNames.root.data.required,
257
+ defaultValue: defaultValues.required
258
+ },
259
+ readOnly: {
260
+ dataType: DATA.DATA_TYPE.booleanValue,
261
+ displayName: DisplayNames.root.data.readOnly,
262
+ defaultValue: defaultValues.readOnly
263
+ },
264
+ isDisabled: {
265
+ dataType: DATA.DATA_TYPE.booleanValue,
266
+ displayName: DisplayNames.root.data.disabled,
267
+ defaultValue: defaultValues.disabled
268
+ },
269
+ clearable: {
270
+ dataType: DATA.DATA_TYPE.booleanValue,
271
+ displayName: DisplayNames.root.data.clearable,
272
+ defaultValue: defaultValues.clearable
273
+ },
274
+ a11y: {
275
+ dataType: DATA.DATA_TYPE.a11y,
276
+ [DATA.DATA_TYPE.a11y]: {
277
+ attributes: [DATA.A11Y_ATTRIBUTES.ariaLabel]
278
+ }
279
+ },
280
+ direction: {
281
+ dataType: DATA.DATA_TYPE.direction
282
+ },
283
+ ...manifestChangeable(),
284
+ onEndChange: {
285
+ dataType: DATA.DATA_TYPE.function,
286
+ displayName: DisplayNames.root.data.onEndChange,
287
+ [DATA.DATA_TYPE.function]: {
288
+ parameters: [{ domEvent: DomEventType.CHANGE }]
289
+ }
290
+ },
291
+ ...manifestFocusable()
292
+ },
293
+ displayGroups: {
294
+ orderedDataGroup: {
295
+ groupType: DISPLAY_GROUPS.GROUP_TYPE.data,
296
+ data: {
297
+ items: [
298
+ "required",
299
+ "readOnly",
300
+ "isDisabled",
301
+ "clearable",
302
+ "allowPastDates",
303
+ "allowFutureDates",
304
+ "selectionMode",
305
+ "granularity",
306
+ "label",
307
+ "tooltip",
308
+ "description",
309
+ "minDate",
310
+ "maxDate"
311
+ ]
312
+ }
313
+ }
314
+ },
315
+ states: {
316
+ hover: withSpec({
317
+ spec: IS_SUPPORT_DESIGN_STATE_SPEC,
318
+ displayName: DesignStates.root.hover.displayName,
319
+ className: DesignStates.root.hover.className,
320
+ pseudoClass: NativeStateType.hover
321
+ }),
322
+ focus: withSpec({
323
+ spec: IS_SUPPORT_DESIGN_STATE_SPEC,
324
+ displayName: DesignStates.root.focus.displayName,
325
+ className: DesignStates.root.focus.className,
326
+ pseudoClass: NativeStateType.focus
327
+ }),
328
+ disabled: withSpec({
329
+ spec: IS_SUPPORT_DESIGN_STATE_SPEC,
330
+ displayName: DesignStates.root.disabled.displayName,
331
+ className: DesignStates.root.disabled.className,
332
+ pseudoClass: NativeStateType.disabled
333
+ }),
334
+ // Editor-only: activating this state passes `previewCalendarOpen` so the
335
+ // overlay parts (referenced via `visibleState`) are editable on canvas.
336
+ [PREVIEW_CALENDAR_OPEN]: {
337
+ props: {
338
+ [PREVIEW_CALENDAR_OPEN]: true
339
+ }
340
+ }
341
+ },
342
+ displayFilters: {
343
+ states: {
344
+ hide: [PREVIEW_CALENDAR_OPEN]
345
+ }
346
+ },
347
+ cssProperties
348
+ },
349
+ resources: {
350
+ client: {
351
+ componentUrl: "./site/components/DatePicker/component.tsx",
352
+ dependencies: {
353
+ serviceDependencies: [
354
+ "@wix/viewer-service-environment",
355
+ "@wix/viewer-service-translations"
356
+ ]
357
+ }
358
+ },
359
+ editor: {
360
+ componentUrl: "./site/components/DatePicker/component.preview.tsx"
361
+ }
362
+ },
363
+ moduleConfiguration: {
364
+ package: { name: "@wix/editor-react-components", version: "^1.0.0" },
365
+ component: { path: "site/components/DatePicker" }
366
+ }
367
+ };
368
+ export {
369
+ manifest as default
370
+ };
@@ -12,15 +12,13 @@ import { d as directionStyles } from "../chunks/direction.module.js";
12
12
  import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
13
13
  import { A as ALL_VALUE, T as TestIds, s as semanticClassNames, d as defaultValues, a as TriggerModeValues, b as ARIA_LABEL_NAMESPACE, c as AriaLabels, e as selectors } from "../chunks/constants31.js";
14
14
  import { u as useResizeObserver } from "../chunks/useResizeObserver.js";
15
+ import { D as DismissSmall_default } from "../chunks/DismissSmall.js";
15
16
  import { g as getDefaultExportFromCjs } from "../chunks/_commonjsHelpers.js";
16
17
  import { r as requireIsSymbol, a as require_baseSlice } from "../chunks/_baseSlice.js";
17
18
  import { r as requireIsObject, a as requireEq, b as requireIsArrayLike, c as require_isIndex } from "../chunks/isArrayLike.js";
18
19
  const ConfirmSmall = ({ size, ...props }) => /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 18 18", fill: "currentColor", width: size || "18", height: size || "18", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M11.9393398,6 C12.232233,5.70710678 12.7071068,5.70710678 13,6 C13.2928932,6.29289322 13.2928932,6.76776695 13,7.06066017 L7.5,12.5606602 L5,10.0606602 C4.70710678,9.76776695 4.70710678,9.29289322 5,9 C5.29289322,8.70710678 5.76776695,8.70710678 6.06066017,9 L7.5,10.4393398 L11.9393398,6 Z" }));
19
20
  ConfirmSmall.displayName = "ConfirmSmall";
20
21
  var ConfirmSmall_default = ConfirmSmall;
21
- const DismissSmall = ({ size, ...props }) => /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 18 18", fill: "currentColor", width: size || "18", height: size || "18", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M8.43933983,9.5 L6,7.06066017 C5.70710678,6.76776695 5.70710678,6.29289322 6,6 C6.29289322,5.70710678 6.76776695,5.70710678 7.06066017,6 L9.5,8.43933983 L11.9393398,6 C12.232233,5.70710678 12.7071068,5.70710678 13,6 C13.2928932,6.29289322 13.2928932,6.76776695 13,7.06066017 L10.5606602,9.5 L13,11.9393398 C13.2928932,12.232233 13.2928932,12.7071068 13,13 C12.7071068,13.2928932 12.232233,13.2928932 11.9393398,13 L9.5,10.5606602 L7.06066017,13 C6.76776695,13.2928932 6.29289322,13.2928932 6,13 C5.70710678,12.7071068 5.70710678,12.232233 6,11.9393398 L8.43933983,9.5 Z" }));
22
- DismissSmall.displayName = "DismissSmall";
23
- var DismissSmall_default = DismissSmall;
24
22
  var _trimmedEndIndex;
25
23
  var hasRequired_trimmedEndIndex;
26
24
  function require_trimmedEndIndex() {
@@ -1,5 +1,4 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
2
  import { useState } from "react";
4
3
  import { c as clsx } from "../chunks/clsx.js";
5
4
  import { F as Field, T as Tooltip, I as Input_Input_Input } from "../chunks/index10.js";
@@ -10,9 +9,7 @@ import { a as getDataAttributes } from "../chunks/dataUtils.js";
10
9
  import { d as directionStyles } from "../chunks/direction.module.js";
11
10
  import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
12
11
  import { d as defaultValues, s as selectors, T as TestIds, a as semanticClassNames } from "../chunks/constants17.js";
13
- const InfoCircleSmall = ({ size, ...props }) => /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 18 18", fill: "currentColor", width: size || "18", height: size || "18", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M9,16 C5.13400675,16 2,12.8659932 2,9 C2,5.13400675 5.13400675,2 9,2 C12.8659932,2 16,5.13400675 16,9 C16,12.8659932 12.8659932,16 9,16 Z M9,15 C12.3137085,15 15,12.3137085 15,9 C15,5.6862915 12.3137085,3 9,3 C5.6862915,3 3,5.6862915 3,9 C3,12.3137085 5.6862915,15 9,15 Z M8,8 L10,8 L10,12 L11,13 L7,13 L8,12 L8,8.85714286 L7,8.85714286 L8,8 Z M9,5 C9.55228475,5 10,5.44771525 10,6 C10,6.55228475 9.55228475,7 9,7 C8.44771525,7 8,6.55228475 8,6 C8,5.44771525 8.44771525,5 9,5 Z" }));
14
- InfoCircleSmall.displayName = "InfoCircleSmall";
15
- var InfoCircleSmall_default = InfoCircleSmall;
12
+ import { I as InfoCircleSmall_default } from "../chunks/InfoCircleSmall.js";
16
13
  const root = "root__dlp5n";
17
14
  const field = "field__i7dfL";
18
15
  const labelRow = "labelRow__qwrwd";