@wix/editor-react-components 1.2419.0 → 1.2420.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/TimePicker/component.js +20 -4
- package/dist/site/components/TimePicker/constants.d.ts +10 -2
- package/dist/site/components/TimePicker/css.css +18 -10
- package/dist/site/components/TimePicker/manifest.js +21 -10
- package/dist/site/components/chunks/constants2.js +12 -4
- package/package.json +2 -2
|
@@ -17,8 +17,8 @@ import { u as useValidatedField } from "../chunks/useValidatedField.js";
|
|
|
17
17
|
import { R as RequiredIndicator } from "../chunks/RequiredIndicator.js";
|
|
18
18
|
import { D as DismissSmall_default } from "../chunks/DismissSmall.js";
|
|
19
19
|
import { I as InfoCircleSmall_default } from "../chunks/InfoCircleSmall.js";
|
|
20
|
-
const timePicker = "timePicker__j78My";
|
|
21
20
|
const root = "root__dzkbY";
|
|
21
|
+
const timePicker = "timePicker__j78My";
|
|
22
22
|
const labelRow = "labelRow__qoC8g";
|
|
23
23
|
const label = "label__THO5j";
|
|
24
24
|
const tooltipButton = "tooltipButton__ISWIR";
|
|
@@ -31,8 +31,8 @@ const segment = "segment__OtazP";
|
|
|
31
31
|
const clearButton = "clearButton__Bto7s";
|
|
32
32
|
const clearIcon = "clearIcon__x11eI";
|
|
33
33
|
const styles = {
|
|
34
|
-
timePicker,
|
|
35
34
|
root,
|
|
35
|
+
timePicker,
|
|
36
36
|
labelRow,
|
|
37
37
|
label,
|
|
38
38
|
tooltipButton,
|
|
@@ -101,7 +101,13 @@ const useTimeConstraints = (params) => {
|
|
|
101
101
|
[minTimeStr, maxTimeStr]
|
|
102
102
|
);
|
|
103
103
|
};
|
|
104
|
-
const renderSegments = (segment2) => /* @__PURE__ */ jsx(
|
|
104
|
+
const renderSegments = (segment2) => /* @__PURE__ */ jsx(
|
|
105
|
+
$40825cdb76e74f70$export$336ab7fa954c4b5f,
|
|
106
|
+
{
|
|
107
|
+
segment: segment2,
|
|
108
|
+
className: clsx(styles.segment, selectors.segment)
|
|
109
|
+
}
|
|
110
|
+
);
|
|
105
111
|
const TimePickerField = ({
|
|
106
112
|
clearButton: clearButton2
|
|
107
113
|
}) => /* @__PURE__ */ jsxs(
|
|
@@ -264,7 +270,17 @@ function TimePicker(props) {
|
|
|
264
270
|
] }) : null
|
|
265
271
|
] }) : null,
|
|
266
272
|
/* @__PURE__ */ jsx(TimePickerField, { clearButton: clearButton2 }),
|
|
267
|
-
description2 ? /* @__PURE__ */ jsx(
|
|
273
|
+
description2 ? /* @__PURE__ */ jsx(
|
|
274
|
+
$514c0188e459b4c0$export$5f1af8db9871e1d6,
|
|
275
|
+
{
|
|
276
|
+
slot: "description",
|
|
277
|
+
className: clsx(
|
|
278
|
+
styles.description,
|
|
279
|
+
selectors.description
|
|
280
|
+
),
|
|
281
|
+
children: description2
|
|
282
|
+
}
|
|
283
|
+
) : null,
|
|
268
284
|
isInvalid && validity.validationMessage ? /* @__PURE__ */ jsx(
|
|
269
285
|
$ee014567cb39d3f0$export$f551688fc98f2e09,
|
|
270
286
|
{
|
|
@@ -39,11 +39,11 @@ export declare const DisplayNames: {
|
|
|
39
39
|
elements: {
|
|
40
40
|
label: string;
|
|
41
41
|
timeInput: string;
|
|
42
|
+
description: string;
|
|
43
|
+
segment: string;
|
|
42
44
|
};
|
|
43
45
|
cssCustomProperties: {
|
|
44
46
|
labelSpacing: string;
|
|
45
|
-
segmentFocusBackgroundColor: string;
|
|
46
|
-
segmentFocusTextColor: string;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
};
|
|
@@ -86,6 +86,12 @@ export declare const DesignStates: {
|
|
|
86
86
|
className: string;
|
|
87
87
|
};
|
|
88
88
|
};
|
|
89
|
+
segment: {
|
|
90
|
+
focus: {
|
|
91
|
+
displayName: string;
|
|
92
|
+
className: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
89
95
|
};
|
|
90
96
|
/** The value that represents "no time selected". */
|
|
91
97
|
export declare const EMPTY_VALUE = "";
|
|
@@ -114,6 +120,8 @@ export declare const selectors: {
|
|
|
114
120
|
readonly label: "timePicker__label";
|
|
115
121
|
readonly requiredIndicator: "timePicker__required-indicator";
|
|
116
122
|
readonly group: "timePicker__group";
|
|
123
|
+
readonly description: "timePicker__description";
|
|
124
|
+
readonly segment: "timePicker__segment";
|
|
117
125
|
readonly errorMessage: "timePicker__error-message";
|
|
118
126
|
};
|
|
119
127
|
/** Intrinsic `required` failure message (pre-resolved; i18n is a shared TODO). */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
.
|
|
1
|
+
/* :global() required: this file is @import'ed into the .module.scss; without it the vars scope to the module hash and shadow the editor's root overrides. */
|
|
2
|
+
.timePicker {
|
|
2
3
|
--labelFont: var(
|
|
3
4
|
--wst-paragraph-2-font,
|
|
4
5
|
normal normal normal 14px/1.4em madefor-text,
|
|
@@ -13,10 +14,7 @@
|
|
|
13
14
|
|
|
14
15
|
--label-spacing: 6px;
|
|
15
16
|
|
|
16
|
-
--
|
|
17
|
-
--segment-focus-text-color: var(--wst-primary-background-color, #ffffff);
|
|
18
|
-
|
|
19
|
-
--accent-color: var(--segment-focus-background-color);
|
|
17
|
+
--accent-color: var(--wst-links-and-actions-color, #116dff);
|
|
20
18
|
|
|
21
19
|
--tooltip-font: var(
|
|
22
20
|
--wst-paragraph-2-font,
|
|
@@ -28,6 +26,16 @@
|
|
|
28
26
|
);
|
|
29
27
|
--tooltip-text-color: var(--wst-primary-background-color, #ffffff);
|
|
30
28
|
--tooltip-background-color: var(--wst-paragraph-2-color, #2b2b2b);
|
|
29
|
+
|
|
30
|
+
--descriptionFont: var(
|
|
31
|
+
--wst-paragraph-3-font,
|
|
32
|
+
normal normal normal 12px/1.4em madefor-text,
|
|
33
|
+
helveticaneuew01-45ligh,
|
|
34
|
+
helveticaneuew02-45ligh,
|
|
35
|
+
helveticaneuew10-45ligh,
|
|
36
|
+
sans-serif
|
|
37
|
+
);
|
|
38
|
+
--description-text-color: var(--wst-paragraph-2-color, #6b6b6b);
|
|
31
39
|
}
|
|
32
40
|
.root__dzkbY {
|
|
33
41
|
box-sizing: border-box;
|
|
@@ -141,8 +149,8 @@
|
|
|
141
149
|
white-space: nowrap;
|
|
142
150
|
}
|
|
143
151
|
.description__ePprf {
|
|
144
|
-
font
|
|
145
|
-
|
|
152
|
+
font: var(--descriptionFont);
|
|
153
|
+
color: var(--description-text-color);
|
|
146
154
|
}
|
|
147
155
|
.errorMessage__zxbOJ {
|
|
148
156
|
margin-top: 4px;
|
|
@@ -163,9 +171,9 @@
|
|
|
163
171
|
.segment__OtazP[data-placeholder] {
|
|
164
172
|
color: color-mix(in srgb, currentColor 45%, transparent);
|
|
165
173
|
}
|
|
166
|
-
.segment__OtazP[data-focused] {
|
|
167
|
-
background: var(--
|
|
168
|
-
color: var(--
|
|
174
|
+
.segment__OtazP[data-focused], .segment__OtazP.timePicker__segment--focus {
|
|
175
|
+
background: var(--wst-links-and-actions-color, #116dff);
|
|
176
|
+
color: var(--wst-primary-background-color, #ffffff);
|
|
169
177
|
}
|
|
170
178
|
.clearButton__Bto7s {
|
|
171
179
|
flex: none;
|
|
@@ -15,16 +15,6 @@ const designState = (s) => withSpec({
|
|
|
15
15
|
className: s.className
|
|
16
16
|
});
|
|
17
17
|
const cssCustomProperties = {
|
|
18
|
-
"segment-focus-background-color": {
|
|
19
|
-
// Keep `color` (not `backgroundColor`): Dev Center enrichment rejects
|
|
20
|
-
// changing a released cssCustomProperty's type (this was published as color).
|
|
21
|
-
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
22
|
-
displayName: DisplayNames.root.cssCustomProperties.segmentFocusBackgroundColor
|
|
23
|
-
},
|
|
24
|
-
"segment-focus-text-color": {
|
|
25
|
-
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.color,
|
|
26
|
-
displayName: DisplayNames.root.cssCustomProperties.segmentFocusTextColor
|
|
27
|
-
},
|
|
28
18
|
"label-spacing": {
|
|
29
19
|
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.rowGap,
|
|
30
20
|
displayName: DisplayNames.root.cssCustomProperties.labelSpacing,
|
|
@@ -95,6 +85,27 @@ const manifest = {
|
|
|
95
85
|
disabled: designState(DesignStates.timeInput.disabled)
|
|
96
86
|
}
|
|
97
87
|
}
|
|
88
|
+
},
|
|
89
|
+
description: {
|
|
90
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
91
|
+
inlineElement: {
|
|
92
|
+
displayName: DisplayNames.root.elements.description,
|
|
93
|
+
selector: getSelector(selectors.description),
|
|
94
|
+
behaviors: { selectable: false },
|
|
95
|
+
cssProperties: { font: {}, color: {} }
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
segment: {
|
|
99
|
+
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
100
|
+
inlineElement: {
|
|
101
|
+
displayName: DisplayNames.root.elements.segment,
|
|
102
|
+
selector: getSelector(selectors.segment),
|
|
103
|
+
behaviors: { selectable: false },
|
|
104
|
+
cssProperties: { background: {}, color: {} },
|
|
105
|
+
states: {
|
|
106
|
+
focus: designState(DesignStates.segment.focus)
|
|
107
|
+
}
|
|
108
|
+
}
|
|
98
109
|
}
|
|
99
110
|
},
|
|
100
111
|
data: {
|
|
@@ -38,12 +38,12 @@ const DisplayNames = {
|
|
|
38
38
|
},
|
|
39
39
|
elements: {
|
|
40
40
|
label: "Label",
|
|
41
|
-
timeInput: "Time input"
|
|
41
|
+
timeInput: "Time input",
|
|
42
|
+
description: "Helper text",
|
|
43
|
+
segment: "Segment"
|
|
42
44
|
},
|
|
43
45
|
cssCustomProperties: {
|
|
44
|
-
labelSpacing: "Label spacing"
|
|
45
|
-
segmentFocusBackgroundColor: "Focused segment background",
|
|
46
|
-
segmentFocusTextColor: "Focused segment text color"
|
|
46
|
+
labelSpacing: "Label spacing"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
};
|
|
@@ -79,6 +79,12 @@ const DesignStates = {
|
|
|
79
79
|
displayName: DisplayNames.root.designStates.disabled,
|
|
80
80
|
className: "timePicker__group--disabled"
|
|
81
81
|
}
|
|
82
|
+
},
|
|
83
|
+
segment: {
|
|
84
|
+
focus: {
|
|
85
|
+
displayName: DisplayNames.root.designStates.focus,
|
|
86
|
+
className: "timePicker__segment--focus"
|
|
87
|
+
}
|
|
82
88
|
}
|
|
83
89
|
};
|
|
84
90
|
const EMPTY_VALUE = "";
|
|
@@ -105,6 +111,8 @@ const selectors = {
|
|
|
105
111
|
label: "timePicker__label",
|
|
106
112
|
requiredIndicator: "timePicker__required-indicator",
|
|
107
113
|
group: "timePicker__group",
|
|
114
|
+
description: "timePicker__description",
|
|
115
|
+
segment: "timePicker__segment",
|
|
108
116
|
errorMessage: "timePicker__error-message"
|
|
109
117
|
};
|
|
110
118
|
const VALUE_MISSING_MESSAGE = "This field is required";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2420.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -197,5 +197,5 @@
|
|
|
197
197
|
"registry": "https://registry.npmjs.org/",
|
|
198
198
|
"access": "public"
|
|
199
199
|
},
|
|
200
|
-
"falconPackageHash": "
|
|
200
|
+
"falconPackageHash": "85190a52b976e7eff33a44b0e123e13f91258bc1f5511adb99448a57"
|
|
201
201
|
}
|