@salutejs/plasma-new-hope 0.241.1-canary.1701.12826370058.0 → 0.242.0-canary.1702.12829190112.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/cjs/components/Cell/ui/CellTextbox/CellTextbox.js +4 -9
- package/cjs/components/Cell/ui/CellTextbox/CellTextbox.js.map +1 -1
- package/cjs/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js +2 -6
- package/cjs/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js.map +1 -1
- package/cjs/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js +2 -6
- package/cjs/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js.map +1 -1
- package/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +4 -10
- package/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js.map +1 -1
- package/cjs/components/Checkbox/Checkbox.css +7 -7
- package/cjs/components/Checkbox/Checkbox.js +1 -2
- package/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/cjs/components/Checkbox/Checkbox.styles.js +1 -1
- package/cjs/components/Checkbox/Checkbox.styles.js.map +1 -1
- package/cjs/components/Checkbox/{Checkbox.styles_16ay1rj.css → Checkbox.styles_dmi26u.css} +2 -2
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +7 -7
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +7 -7
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +7 -7
- package/cjs/components/DatePicker/RangeDate/RangeDate.js +66 -21
- package/cjs/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +7 -7
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +7 -7
- package/cjs/components/Radiobox/Radiobox.css +9 -9
- package/cjs/components/Radiobox/Radiobox.js +1 -2
- package/cjs/components/Radiobox/Radiobox.js.map +1 -1
- package/cjs/components/Radiobox/Radiobox.styles.js +1 -1
- package/cjs/components/Radiobox/Radiobox.styles.js.map +1 -1
- package/cjs/components/Radiobox/{Radiobox.styles_vikocp.css → Radiobox.styles_520asv.css} +1 -1
- package/cjs/components/Select/Select.css +7 -7
- package/cjs/components/Select/ui/Inner/Inner.css +7 -7
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +7 -7
- package/cjs/index.css +9 -9
- package/emotion/cjs/components/Cell/ui/CellTextbox/CellTextbox.js +4 -11
- package/emotion/cjs/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js +2 -7
- package/emotion/cjs/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js +2 -7
- package/emotion/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +4 -12
- package/emotion/cjs/components/Checkbox/Checkbox.js +1 -2
- package/emotion/cjs/components/Checkbox/Checkbox.styles.js +15 -7
- package/emotion/cjs/components/DatePicker/RangeDate/RangeDate.js +66 -21
- package/emotion/cjs/components/Radiobox/Radiobox.js +1 -2
- package/emotion/cjs/components/Radiobox/Radiobox.styles.js +2 -2
- package/emotion/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +8 -23
- package/emotion/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -7
- package/emotion/cjs/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +0 -23
- package/emotion/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +3 -7
- package/emotion/es/components/Cell/ui/CellTextbox/CellTextbox.js +4 -11
- package/emotion/es/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js +2 -7
- package/emotion/es/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js +2 -7
- package/emotion/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +4 -12
- package/emotion/es/components/Checkbox/Checkbox.js +1 -2
- package/emotion/es/components/Checkbox/Checkbox.styles.js +15 -7
- package/emotion/es/components/DatePicker/RangeDate/RangeDate.js +66 -21
- package/emotion/es/components/Radiobox/Radiobox.js +1 -2
- package/emotion/es/components/Radiobox/Radiobox.styles.js +2 -2
- package/emotion/es/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +8 -23
- package/emotion/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -7
- package/emotion/es/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +0 -23
- package/emotion/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +3 -7
- package/es/components/Cell/ui/CellTextbox/CellTextbox.js +4 -9
- package/es/components/Cell/ui/CellTextbox/CellTextbox.js.map +1 -1
- package/es/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js +2 -6
- package/es/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js.map +1 -1
- package/es/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js +2 -6
- package/es/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js.map +1 -1
- package/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +4 -10
- package/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js.map +1 -1
- package/es/components/Checkbox/Checkbox.css +7 -7
- package/es/components/Checkbox/Checkbox.js +1 -2
- package/es/components/Checkbox/Checkbox.js.map +1 -1
- package/es/components/Checkbox/Checkbox.styles.js +1 -1
- package/es/components/Checkbox/Checkbox.styles.js.map +1 -1
- package/es/components/Checkbox/{Checkbox.styles_16ay1rj.css → Checkbox.styles_dmi26u.css} +2 -2
- package/es/components/Combobox/ComboboxNew/Combobox.css +7 -7
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +7 -7
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +7 -7
- package/es/components/DatePicker/RangeDate/RangeDate.js +66 -21
- package/es/components/DatePicker/RangeDate/RangeDate.js.map +1 -1
- package/es/components/Pagination/Pagination.css +7 -7
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +7 -7
- package/es/components/Radiobox/Radiobox.css +9 -9
- package/es/components/Radiobox/Radiobox.js +1 -2
- package/es/components/Radiobox/Radiobox.js.map +1 -1
- package/es/components/Radiobox/Radiobox.styles.js +1 -1
- package/es/components/Radiobox/Radiobox.styles.js.map +1 -1
- package/es/components/Radiobox/{Radiobox.styles_vikocp.css → Radiobox.styles_520asv.css} +1 -1
- package/es/components/Select/Select.css +7 -7
- package/es/components/Select/ui/Inner/Inner.css +7 -7
- package/es/components/Select/ui/Inner/ui/Item/Item.css +7 -7
- package/es/index.css +9 -9
- package/package.json +2 -2
- package/styled-components/cjs/components/Cell/ui/CellTextbox/CellTextbox.js +4 -11
- package/styled-components/cjs/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js +2 -7
- package/styled-components/cjs/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js +2 -7
- package/styled-components/cjs/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +4 -12
- package/styled-components/cjs/components/Checkbox/Checkbox.js +1 -2
- package/styled-components/cjs/components/Checkbox/Checkbox.styles.js +2 -2
- package/styled-components/cjs/components/DatePicker/RangeDate/RangeDate.js +66 -21
- package/styled-components/cjs/components/Radiobox/Radiobox.js +1 -2
- package/styled-components/cjs/components/Radiobox/Radiobox.styles.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +8 -23
- package/styled-components/cjs/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -7
- package/styled-components/cjs/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +0 -23
- package/styled-components/cjs/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +3 -7
- package/styled-components/es/components/Cell/ui/CellTextbox/CellTextbox.js +4 -11
- package/styled-components/es/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.js +2 -7
- package/styled-components/es/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.js +2 -7
- package/styled-components/es/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.js +4 -12
- package/styled-components/es/components/Checkbox/Checkbox.js +1 -2
- package/styled-components/es/components/Checkbox/Checkbox.styles.js +2 -2
- package/styled-components/es/components/DatePicker/RangeDate/RangeDate.js +66 -21
- package/styled-components/es/components/Radiobox/Radiobox.js +1 -2
- package/styled-components/es/components/Radiobox/Radiobox.styles.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +8 -23
- package/styled-components/es/examples/plasma_b2c/components/DatePicker/DatePicker.stories.tsx +1 -7
- package/styled-components/es/examples/plasma_web/components/Checkbox/Checkbox.stories.tsx +0 -23
- package/styled-components/es/examples/plasma_web/components/DatePicker/DatePicker.stories.tsx +3 -7
- package/types/components/Cell/ui/CellTextbox/CellTextbox.d.ts.map +1 -1
- package/types/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.d.ts.map +1 -1
- package/types/components/Checkbox/Checkbox.styles.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/RangeDate.d.ts +10 -8
- package/types/components/DatePicker/RangeDate/RangeDate.d.ts.map +1 -1
- package/types/components/DatePicker/RangeDate/RangeDate.styles.d.ts +12 -12
- package/types/components/DatePicker/RangeDate/RangeDate.types.d.ts +4 -0
- package/types/components/DatePicker/RangeDate/RangeDate.types.d.ts.map +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts +1 -1
- package/types/components/DatePicker/SingleDate/SingleDate.types.d.ts.map +1 -1
- package/types/components/Radiobox/Radiobox.styles.d.ts.map +1 -1
- package/types/components/Range/Range.types.d.ts +5 -5
- package/types/components/Range/Range.types.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts +5 -4
- package/types/examples/plasma_b2c/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Range/Range.d.ts +12 -12
- package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts +5 -4
- package/types/examples/plasma_web/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Range/Range.d.ts +12 -12
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["className", "autoComplete", "isDoubleCalendar", "opened", "label", "leftHelper", "contentLeft", "contentRight", "view", "size", "readOnly", "disabled", "name", "dividerVariant", "dividerIcon", "defaultFirstDate", "defaultSecondDate", "firstValueError", "secondValueError", "firstValueSuccess", "secondValueSuccess", "firstPlaceholder", "secondPlaceholder", "firstTextfieldContentLeft", "firstTextfieldContentRight", "secondTextfieldContentLeft", "secondTextfieldContentRight", "firstTextfieldTextBefore", "secondTextfieldTextBefore", "firstTextfieldTextAfter", "secondTextfieldTextAfter", "required", "requiredPlacement", "format", "lang", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "type", "frame", "usePortal", "placement", "closeOnOverlayClick", "closeOnEsc", "offset", "onToggle", "onChange", "onChangeFirstValue", "onChangeSecondValue", "onCommitFirstDate", "onCommitSecondDate", "onFocusFirstTextfield", "onFocusSecondTextfield", "onBlurFirstTextfield", "onBlurSecondTextfield"];
|
1
|
+
var _excluded = ["className", "autoComplete", "isDoubleCalendar", "opened", "label", "leftHelper", "contentLeft", "contentRight", "view", "size", "readOnly", "disabled", "name", "dividerVariant", "dividerIcon", "defaultFirstDate", "defaultSecondDate", "firstValueError", "secondValueError", "firstValueSuccess", "secondValueSuccess", "firstPlaceholder", "secondPlaceholder", "firstTextfieldContentLeft", "firstTextfieldContentRight", "secondTextfieldContentLeft", "secondTextfieldContentRight", "firstTextfieldTextBefore", "secondTextfieldTextBefore", "firstTextfieldTextAfter", "secondTextfieldTextAfter", "required", "requiredPlacement", "format", "lang", "maskWithFormat", "min", "max", "includeEdgeDates", "eventList", "disabledList", "eventMonthList", "disabledMonthList", "eventQuarterList", "disabledQuarterList", "eventYearList", "disabledYearList", "type", "frame", "usePortal", "placement", "closeOnOverlayClick", "closeOnEsc", "closeAfterDateSelect", "offset", "onToggle", "onChange", "onChangeFirstValue", "onChangeSecondValue", "onCommitFirstDate", "onCommitSecondDate", "onFocusFirstTextfield", "onFocusSecondTextfield", "onBlurFirstTextfield", "onBlurSecondTextfield"];
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -95,6 +95,8 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
95
95
|
closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
|
96
96
|
_ref$closeOnEsc = _ref.closeOnEsc,
|
97
97
|
closeOnEsc = _ref$closeOnEsc === void 0 ? true : _ref$closeOnEsc,
|
98
|
+
_ref$closeAfterDateSe = _ref.closeAfterDateSelect,
|
99
|
+
closeAfterDateSelect = _ref$closeAfterDateSe === void 0 ? true : _ref$closeAfterDateSe,
|
98
100
|
offset = _ref.offset,
|
99
101
|
onToggle = _ref.onToggle,
|
100
102
|
onChange = _ref.onChange,
|
@@ -147,6 +149,14 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
147
149
|
_useState14 = _slicedToArray(_useState13, 2),
|
148
150
|
inputSecondValue = _useState14[0],
|
149
151
|
setInputSecondValue = _useState14[1];
|
152
|
+
var _useState15 = useState(Boolean(calendarFirstValue && calendarSecondValue)),
|
153
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
154
|
+
fullDateEntered = _useState16[0],
|
155
|
+
setFullDateEntered = _useState16[1];
|
156
|
+
var _useState17 = useState(false),
|
157
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
158
|
+
secondTextFieldClicked = _useState18[0],
|
159
|
+
setSecondTextFieldClicked = _useState18[1];
|
150
160
|
var setFirstInputValue = function setFirstInputValue(value) {
|
151
161
|
setInputFirstValue(value);
|
152
162
|
if (onChange) {
|
@@ -207,12 +217,12 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
207
217
|
}),
|
208
218
|
handleChangeSecondValue = _useDatePicker2.handleChangeValue,
|
209
219
|
handleCommitSecondDate = _useDatePicker2.handleCommitDate;
|
210
|
-
var handleToggle = function handleToggle(
|
220
|
+
var handleToggle = function handleToggle(currentOpened, event) {
|
211
221
|
var _firstInputRef$curren, _secondInputRef$curre;
|
212
222
|
if (disabled || readOnly) {
|
213
223
|
return;
|
214
224
|
}
|
215
|
-
var isCalendarOpen = (firstInputRef !== null && firstInputRef !== void 0 && (_firstInputRef$curren = firstInputRef.current) !== null && _firstInputRef$curren !== void 0 && _firstInputRef$curren.contains(event.target || null) || secondInputRef !== null && secondInputRef !== void 0 && (_secondInputRef$curre = secondInputRef.current) !== null && _secondInputRef$curre !== void 0 && _secondInputRef$curre.contains(event.target || null)) && event.code !== keys.Escape ? true :
|
225
|
+
var isCalendarOpen = (firstInputRef !== null && firstInputRef !== void 0 && (_firstInputRef$curren = firstInputRef.current) !== null && _firstInputRef$curren !== void 0 && _firstInputRef$curren.contains((event === null || event === void 0 ? void 0 : event.target) || null) || secondInputRef !== null && secondInputRef !== void 0 && (_secondInputRef$curre = secondInputRef.current) !== null && _secondInputRef$curre !== void 0 && _secondInputRef$curre.contains((event === null || event === void 0 ? void 0 : event.target) || null)) && (event === null || event === void 0 ? void 0 : event.code) !== keys.Escape ? true : currentOpened;
|
216
226
|
if (!isCalendarOpen) {
|
217
227
|
if (calendarFirstValue && !calendarSecondValue) {
|
218
228
|
var _secondInputRef$curre2;
|
@@ -223,11 +233,22 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
223
233
|
firstInputRef === null || firstInputRef === void 0 || (_firstInputRef$curren2 = firstInputRef.current) === null || _firstInputRef$curren2 === void 0 || _firstInputRef$curren2.focus();
|
224
234
|
}
|
225
235
|
}
|
236
|
+
if (!isCalendarOpen) {
|
237
|
+
setSecondTextFieldClicked(false);
|
238
|
+
}
|
226
239
|
if (onToggle) {
|
227
240
|
return onToggle(isCalendarOpen, event);
|
228
241
|
}
|
229
242
|
setIsInnerOpen(isCalendarOpen);
|
230
243
|
};
|
244
|
+
var handleFocusFirstTextField = function handleFocusFirstTextField(event) {
|
245
|
+
onFocusFirstTextfield === null || onFocusFirstTextfield === void 0 || onFocusFirstTextfield(event);
|
246
|
+
setSecondTextFieldClicked(false);
|
247
|
+
};
|
248
|
+
var handleFocusSecondTextField = function handleFocusSecondTextField(event) {
|
249
|
+
onFocusSecondTextfield === null || onFocusSecondTextfield === void 0 || onFocusSecondTextfield(event);
|
250
|
+
setSecondTextFieldClicked(true);
|
251
|
+
};
|
231
252
|
var handleBlur = function handleBlur(event, outerHandler) {
|
232
253
|
if (!inputFirstValue || !inputSecondValue) {
|
233
254
|
outerHandler === null || outerHandler === void 0 || outerHandler(event);
|
@@ -267,6 +288,37 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
267
288
|
closeOnEsc: closeOnEsc
|
268
289
|
}),
|
269
290
|
onKeyDown = _useKeyNavigation.onKeyDown;
|
291
|
+
var handleChangeStartOfRange = function handleChangeStartOfRange(chosenDate, dateInfo) {
|
292
|
+
if (!fullDateEntered) {
|
293
|
+
handleCommitFirstDate(chosenDate, false, true, dateInfo);
|
294
|
+
handleCommitSecondDate('');
|
295
|
+
return;
|
296
|
+
}
|
297
|
+
var prevValue = secondTextFieldClicked ? calendarFirstValue : calendarSecondValue;
|
298
|
+
var _getSortedValues3 = getSortedValues([prevValue, chosenDate]),
|
299
|
+
_getSortedValues4 = _slicedToArray(_getSortedValues3, 2),
|
300
|
+
first = _getSortedValues4[0],
|
301
|
+
second = _getSortedValues4[1];
|
302
|
+
handleCommitFirstDate(first, false, true, dateInfo);
|
303
|
+
handleCommitSecondDate(second, false, true, dateInfo);
|
304
|
+
if (!firstValueError && !secondValueError && closeAfterDateSelect) {
|
305
|
+
handleToggle(false);
|
306
|
+
}
|
307
|
+
};
|
308
|
+
var handleChangeCalendarValue = function handleChangeCalendarValue(_ref2, dateInfo) {
|
309
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
310
|
+
firstDate = _ref3[0],
|
311
|
+
secondDate = _ref3[1];
|
312
|
+
if (firstDate) {
|
313
|
+
handleCommitFirstDate(firstDate, false, true, dateInfo);
|
314
|
+
}
|
315
|
+
if (secondDate) {
|
316
|
+
handleCommitSecondDate(secondDate, false, true, dateInfo);
|
317
|
+
}
|
318
|
+
if (firstDate && secondDate && !firstValueError && !secondValueError && closeAfterDateSelect) {
|
319
|
+
handleToggle(false);
|
320
|
+
}
|
321
|
+
};
|
270
322
|
var RangeComponent = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledRange, {
|
271
323
|
ref: rangeRef,
|
272
324
|
autoComplete: autoComplete,
|
@@ -312,8 +364,8 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
312
364
|
rangeRef === null || rangeRef === void 0 || (_rangeRef$current4 = rangeRef.current) === null || _rangeRef$current4 === void 0 || (_rangeRef$current4 = _rangeRef$current4.firstTextField()) === null || _rangeRef$current4 === void 0 || (_rangeRef$current4 = _rangeRef$current4.current) === null || _rangeRef$current4 === void 0 || _rangeRef$current4.focus();
|
313
365
|
}
|
314
366
|
},
|
315
|
-
onFocusFirstTextfield:
|
316
|
-
onFocusSecondTextfield:
|
367
|
+
onFocusFirstTextfield: handleFocusFirstTextField,
|
368
|
+
onFocusSecondTextfield: handleFocusSecondTextField,
|
317
369
|
onBlurFirstTextfield: function onBlurFirstTextfield(event) {
|
318
370
|
return handleBlur(event, _onBlurFirstTextfield);
|
319
371
|
},
|
@@ -362,8 +414,13 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
362
414
|
lang: lang
|
363
415
|
}));
|
364
416
|
}, [format, lang]);
|
365
|
-
|
366
|
-
|
417
|
+
useEffect(function () {
|
418
|
+
if (calendarFirstValue && calendarSecondValue) {
|
419
|
+
setFullDateEntered(true);
|
420
|
+
}
|
421
|
+
}, [calendarFirstValue, calendarSecondValue]);
|
422
|
+
var RootWrapper = useCallback(function (_ref4) {
|
423
|
+
var children = _ref4.children;
|
367
424
|
return /*#__PURE__*/React.createElement(Root, {
|
368
425
|
view: view,
|
369
426
|
size: size,
|
@@ -405,20 +462,8 @@ export var datePickerRangeRoot = function datePickerRangeRoot(Root) {
|
|
405
462
|
lang: lang,
|
406
463
|
isDoubleCalendar: isDoubleCalendar,
|
407
464
|
rootWrapper: RootWrapper,
|
408
|
-
onChangeStartOfRange:
|
409
|
-
|
410
|
-
handleCommitSecondDate('');
|
411
|
-
},
|
412
|
-
onChangeValue: function onChangeValue(_ref3, dateInfo) {
|
413
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
414
|
-
firstDate = _ref4[0],
|
415
|
-
secondDate = _ref4[1];
|
416
|
-
firstDate && handleCommitFirstDate(firstDate, false, true, dateInfo);
|
417
|
-
secondDate && handleCommitSecondDate(secondDate, false, true, dateInfo);
|
418
|
-
if (firstDate && secondDate && !firstValueError && !secondValueError) {
|
419
|
-
setIsInnerOpen(false);
|
420
|
-
}
|
421
|
-
}
|
465
|
+
onChangeStartOfRange: handleChangeStartOfRange,
|
466
|
+
onChangeValue: handleChangeCalendarValue
|
422
467
|
}), leftHelper && /*#__PURE__*/React.createElement(LeftHelper, null, leftHelper), /*#__PURE__*/React.createElement(InputHidden, _extends({
|
423
468
|
name: name,
|
424
469
|
type: "hidden",
|
@@ -57,8 +57,7 @@ export var radioboxRoot = function radioboxRoot(Root) {
|
|
57
57
|
"aria-describedby": uniqDescriptionId,
|
58
58
|
tabIndex: canFocused
|
59
59
|
})), /*#__PURE__*/React.createElement(StyledContentWrapper, {
|
60
|
-
htmlFor: radioboxId
|
61
|
-
className: singleLineClass
|
60
|
+
htmlFor: radioboxId
|
62
61
|
}, /*#__PURE__*/React.createElement(StyledTrigger, {
|
63
62
|
className: classes.radioboxTrigger
|
64
63
|
}, _StyledEllipse || (_StyledEllipse = /*#__PURE__*/React.createElement(StyledEllipse, null))), hasContent && /*#__PURE__*/React.createElement(StyledContent, {
|
@@ -9,5 +9,5 @@ var mappingOverride = /*#__PURE__*/"\n ".concat(checkboxTokens.labelFontFamil
|
|
9
9
|
export var StyledEllipse = /*#__PURE__*/_styled("div", {
|
10
10
|
target: "e9i9tl60",
|
11
11
|
label: "plasma-new-hope__StyledEllipse"
|
12
|
-
})("width:var(", tokens.ellipseSize, ");height:var(", tokens.ellipseSize, ");border-radius:var(", tokens.ellipseSize, ");background-color:var(", tokens.ellipseColor, ");transition:transform 0.3s ease-in-out;transform:scale(0);input:checked+label &{transform:scale(1);}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvUmFkaW9ib3gvUmFkaW9ib3guc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9DdUMiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9SYWRpb2JveC9SYWRpb2JveC5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7IGNoZWNrYm94VG9rZW5zIH0gZnJvbSAnLi4vQ2hlY2tib3gnO1xuaW1wb3J0IHsgYXBwbHlFbGxpcHNpcywgYXBwbHlOb1VzZXJTZWxlY3QgfSBmcm9tICcuLi8uLi9taXhpbnMnO1xuXG5pbXBvcnQgeyBjbGFzc2VzLCB0b2tlbnMgfSBmcm9tICcuL1JhZGlvYm94LnRva2Vucyc7XG5cbi8vIE5PVEU6INCd0LXQvtCx0YXQvtC00LjQvNC+0LUg0L/QtdGA0LXQvtC/0YDQtdC00LXQu9C10L3QuNC1INGC0L7QutC10L3QvtCyINC40Lcg0LrQvtC80L/QvtC90LXQvdGC0LAgQ2hlY2tib3gg0YIu0LouINC40YHQv9C+
|
13
|
-
export var base = /*#__PURE__*/css(mappingOverride, ";margin:var(", tokens.margin, ");", /*#__PURE__*/applyNoUserSelect(), ";position:relative;align-items:flex-start;display:flex;.", classes.singleLine, "{", /*#__PURE__*/applyEllipsis(), ";};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvUmFkaW9ib3gvUmFkaW9ib3guc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtEdUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9SYWRpb2JveC9SYWRpb2JveC5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7IGNoZWNrYm94VG9rZW5zIH0gZnJvbSAnLi4vQ2hlY2tib3gnO1xuaW1wb3J0IHsgYXBwbHlFbGxpcHNpcywgYXBwbHlOb1VzZXJTZWxlY3QgfSBmcm9tICcuLi8uLi9taXhpbnMnO1xuXG5pbXBvcnQgeyBjbGFzc2VzLCB0b2tlbnMgfSBmcm9tICcuL1JhZGlvYm94LnRva2Vucyc7XG5cbi8vIE5PVEU6INCd0LXQvtCx0YXQvtC00LjQvNC+0LUg0L/QtdGA0LXQvtC/0YDQtdC00LXQu9C10L3QuNC1INGC0L7QutC10L3QvtCyINC40Lcg0LrQvtC80L/QvtC90LXQvdGC0LAgQ2hlY2tib3gg0YIu0LouINC40YHQv9C+
|
12
|
+
})("width:var(", tokens.ellipseSize, ");height:var(", tokens.ellipseSize, ");border-radius:var(", tokens.ellipseSize, ");background-color:var(", tokens.ellipseColor, ");transition:transform 0.3s ease-in-out;transform:scale(0);input:checked+label &{transform:scale(1);}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvUmFkaW9ib3gvUmFkaW9ib3guc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9DdUMiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9SYWRpb2JveC9SYWRpb2JveC5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7IGNoZWNrYm94VG9rZW5zIH0gZnJvbSAnLi4vQ2hlY2tib3gnO1xuaW1wb3J0IHsgYXBwbHlFbGxpcHNpcywgYXBwbHlOb1VzZXJTZWxlY3QgfSBmcm9tICcuLi8uLi9taXhpbnMnO1xuXG5pbXBvcnQgeyBjbGFzc2VzLCB0b2tlbnMgfSBmcm9tICcuL1JhZGlvYm94LnRva2Vucyc7XG5cbi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50ZXI7XG5cbiAgICAuJHtjbGFzc2VzLnNpbmdsZUxpbmV9IHtcbiAgICAgICAgJHthcHBseUVsbGlwc2lzKCl9O1xuICAgIH1cbmA7XG4iXX0= */"));
|
13
|
+
export var base = /*#__PURE__*/css(mappingOverride, ";margin:var(", tokens.margin, ");", /*#__PURE__*/applyNoUserSelect(), ";position:relative;align-items:flex-start;display:flex;cursor:pointer;.", classes.singleLine, "{", /*#__PURE__*/applyEllipsis(), ";};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvUmFkaW9ib3gvUmFkaW9ib3guc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtEdUIiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9SYWRpb2JveC9SYWRpb2JveC5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7IGNoZWNrYm94VG9rZW5zIH0gZnJvbSAnLi4vQ2hlY2tib3gnO1xuaW1wb3J0IHsgYXBwbHlFbGxpcHNpcywgYXBwbHlOb1VzZXJTZWxlY3QgfSBmcm9tICcuLi8uLi9taXhpbnMnO1xuXG5pbXBvcnQgeyBjbGFzc2VzLCB0b2tlbnMgfSBmcm9tICcuL1JhZGlvYm94LnRva2Vucyc7XG5cbi8vIE5PVEU6INCd0LXQvtCx0YXQvtC00LjQvNC+0LUg0L/QtdGA0LXQvtC/0YDQtdC00LXQu9C10L3QuNC1INGC0L7QutC10L3QvtCyINC40Lcg0LrQvtC80L/QvtC90L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+98,14 @@ const StoryDefault = (props: CheckboxProps) => {
|
|
98
98
|
<>
|
99
99
|
<Checkbox {...props} />
|
100
100
|
<Checkbox name="item.name" value="item.value" label="Label" description="Description" {...props} />
|
101
|
+
<Checkbox
|
102
|
+
name="item.name"
|
103
|
+
value="item.value"
|
104
|
+
singleLine
|
105
|
+
label="Label looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger"
|
106
|
+
description="Description looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger"
|
107
|
+
{...props}
|
108
|
+
/>
|
101
109
|
</>
|
102
110
|
);
|
103
111
|
};
|
@@ -106,29 +114,6 @@ export const Default: StoryObj<CheckboxProps> = {
|
|
106
114
|
render: (args) => <StoryDefault {...args} />,
|
107
115
|
};
|
108
116
|
|
109
|
-
const StoryLong = (props: CheckboxProps) => {
|
110
|
-
const { width, ...otherProps } = props;
|
111
|
-
return (
|
112
|
-
<div style={{ width }}>
|
113
|
-
<Checkbox {...otherProps} />
|
114
|
-
</div>
|
115
|
-
);
|
116
|
-
};
|
117
|
-
|
118
|
-
export const LongText: StoryObj<CheckboxProps> = {
|
119
|
-
args: {
|
120
|
-
name: 'item.name',
|
121
|
-
value: 'item.value',
|
122
|
-
label:
|
123
|
-
'Label looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger',
|
124
|
-
description:
|
125
|
-
'Description looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger',
|
126
|
-
singleLine: true,
|
127
|
-
width: '300px',
|
128
|
-
},
|
129
|
-
render: (args) => <StoryLong {...args} />,
|
130
|
-
};
|
131
|
-
|
132
117
|
const StoryComplex = (props: CheckboxProps) => {
|
133
118
|
const [values, setValues] = useState({
|
134
119
|
russian: true,
|
@@ -192,7 +192,6 @@ const StoryRange = ({
|
|
192
192
|
const rangeRef = useRef<RangeInputRefs>(null);
|
193
193
|
|
194
194
|
const [isOpen, setIsOpen] = useState(false);
|
195
|
-
const [firstDate, setFirstDate] = useState<string | Date>('');
|
196
195
|
|
197
196
|
const iconSize = size === 'xs' ? 'xs' : 's';
|
198
197
|
const showDividerIcon = dividerVariant === 'icon';
|
@@ -239,12 +238,6 @@ const StoryRange = ({
|
|
239
238
|
onChangeSecondValue={(e, currentValue) => {
|
240
239
|
onChangeSecondValue(e, currentValue);
|
241
240
|
}}
|
242
|
-
onCommitFirstDate={(currentValue) => {
|
243
|
-
setFirstDate(currentValue);
|
244
|
-
}}
|
245
|
-
onCommitSecondDate={(currentValue) => {
|
246
|
-
firstDate && currentValue && setIsOpen(false);
|
247
|
-
}}
|
248
241
|
lang={lang}
|
249
242
|
{...dividerIconProps}
|
250
243
|
{...rest}
|
@@ -279,6 +272,7 @@ export const Range: StoryObj<StoryPropsRange> = {
|
|
279
272
|
size: 'l',
|
280
273
|
view: 'default',
|
281
274
|
isDoubleCalendar: false,
|
275
|
+
closeAfterDateSelect: true,
|
282
276
|
dividerVariant: 'dash',
|
283
277
|
min: new Date(2024, 1, 1),
|
284
278
|
max: new Date(2024, 12, 29),
|
@@ -114,29 +114,6 @@ export const Default: StoryObj<CheckboxProps> = {
|
|
114
114
|
render: (args) => <StoryDefault {...args} />,
|
115
115
|
};
|
116
116
|
|
117
|
-
const StoryLong = (props: CheckboxProps) => {
|
118
|
-
const { width, ...otherProps } = props;
|
119
|
-
return (
|
120
|
-
<div style={{ width }}>
|
121
|
-
<Checkbox {...otherProps} />
|
122
|
-
</div>
|
123
|
-
);
|
124
|
-
};
|
125
|
-
|
126
|
-
export const LongText: StoryObj<CheckboxProps> = {
|
127
|
-
args: {
|
128
|
-
name: 'item.name',
|
129
|
-
value: 'item.value',
|
130
|
-
label:
|
131
|
-
'Label looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger',
|
132
|
-
description:
|
133
|
-
'Description looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonger',
|
134
|
-
singleLine: true,
|
135
|
-
width: '300px',
|
136
|
-
},
|
137
|
-
render: (args) => <StoryLong {...args} />,
|
138
|
-
};
|
139
|
-
|
140
117
|
const StoryComplex = (props: CheckboxProps) => {
|
141
118
|
const [values, setValues] = useState({
|
142
119
|
russian: true,
|
@@ -186,12 +186,12 @@ const StoryRange = ({
|
|
186
186
|
secondValueError,
|
187
187
|
secondValueSuccess,
|
188
188
|
size,
|
189
|
+
lang,
|
189
190
|
...rest
|
190
191
|
}: StoryPropsRange) => {
|
191
192
|
const rangeRef = useRef<RangeInputRefs>(null);
|
192
193
|
|
193
194
|
const [isOpen, setIsOpen] = useState(false);
|
194
|
-
const [firstDate, setFirstDate] = useState<string | Date>('');
|
195
195
|
|
196
196
|
const iconSize = size === 'xs' ? 'xs' : 's';
|
197
197
|
const showDividerIcon = dividerVariant === 'icon';
|
@@ -238,12 +238,7 @@ const StoryRange = ({
|
|
238
238
|
onChangeSecondValue={(e, currentValue) => {
|
239
239
|
onChangeSecondValue(e, currentValue);
|
240
240
|
}}
|
241
|
-
|
242
|
-
setFirstDate(currentValue);
|
243
|
-
}}
|
244
|
-
onCommitSecondDate={(currentValue) => {
|
245
|
-
firstDate && currentValue && setIsOpen(false);
|
246
|
-
}}
|
241
|
+
lang={lang}
|
247
242
|
{...dividerIconProps}
|
248
243
|
{...rest}
|
249
244
|
/>
|
@@ -277,6 +272,7 @@ export const Range: StoryObj<StoryPropsRange> = {
|
|
277
272
|
size: 'l',
|
278
273
|
view: 'default',
|
279
274
|
isDoubleCalendar: false,
|
275
|
+
closeAfterDateSelect: true,
|
280
276
|
dividerVariant: 'dash',
|
281
277
|
min: new Date(2024, 1, 1),
|
282
278
|
max: new Date(2024, 12, 29),
|
@@ -1,25 +1,20 @@
|
|
1
|
-
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
1
|
import React from 'react';
|
3
2
|
import { CellTextboxLabel } from '../CellTextboxLabel/CellTextboxLabel.js';
|
4
3
|
import { CellTextboxTitle } from '../CellTextboxTitle/CellTextboxTitle.js';
|
5
4
|
import { CellTextboxSubtitle } from '../CellTextboxSubtitle/CellTextboxSubtitle.js';
|
6
|
-
import { cx } from '../../../../utils/index.js';
|
7
5
|
import { CellTextboxStyled } from './CellTextbox.styles.js';
|
8
6
|
|
9
|
-
var _excluded = ["label", "title", "subtitle", "children", "className"];
|
10
7
|
var CellTextbox = function CellTextbox(_ref) {
|
11
8
|
var label = _ref.label,
|
12
9
|
title = _ref.title,
|
13
10
|
subtitle = _ref.subtitle,
|
14
|
-
children = _ref.children
|
15
|
-
className = _ref.className,
|
16
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
11
|
+
children = _ref.children;
|
17
12
|
return (
|
18
13
|
/*#__PURE__*/
|
19
14
|
// TODO: #1548
|
20
|
-
React.createElement(CellTextboxStyled,
|
21
|
-
className:
|
22
|
-
},
|
15
|
+
React.createElement(CellTextboxStyled, {
|
16
|
+
className: "cell-textbox"
|
17
|
+
}, label || title || subtitle ? /*#__PURE__*/React.createElement(React.Fragment, null, label && /*#__PURE__*/React.createElement(CellTextboxLabel, null, label), title && /*#__PURE__*/React.createElement(CellTextboxTitle, null, title), subtitle && /*#__PURE__*/React.createElement(CellTextboxSubtitle, null, subtitle)) : children)
|
23
18
|
);
|
24
19
|
};
|
25
20
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CellTextbox.js","sources":["../../../../../src/components/Cell/ui/CellTextbox/CellTextbox.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\n\nimport { CellTextboxLabel } from '../CellTextboxLabel/CellTextboxLabel';\nimport { CellTextboxTitle } from '../CellTextboxTitle/CellTextboxTitle';\nimport { CellTextboxSubtitle } from '../CellTextboxSubtitle/CellTextboxSubtitle';\
|
1
|
+
{"version":3,"file":"CellTextbox.js","sources":["../../../../../src/components/Cell/ui/CellTextbox/CellTextbox.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\n\nimport { CellTextboxLabel } from '../CellTextboxLabel/CellTextboxLabel';\nimport { CellTextboxTitle } from '../CellTextboxTitle/CellTextboxTitle';\nimport { CellTextboxSubtitle } from '../CellTextboxSubtitle/CellTextboxSubtitle';\n\nimport { CellTextboxStyled } from './CellTextbox.styles';\nimport type { CellTextboxProps } from './CellTextbox.types';\n\nexport const CellTextbox: React.FC<HTMLAttributes<HTMLDivElement> & CellTextboxProps> = ({\n label,\n title,\n subtitle,\n children,\n}) => {\n return (\n // TODO: #1548\n <CellTextboxStyled className=\"cell-textbox\">\n {label || title || subtitle ? (\n <>\n {label && <CellTextboxLabel>{label}</CellTextboxLabel>}\n {title && <CellTextboxTitle>{title}</CellTextboxTitle>}\n {subtitle && <CellTextboxSubtitle>{subtitle}</CellTextboxSubtitle>}\n </>\n ) : (\n children\n )}\n </CellTextboxStyled>\n );\n};\n"],"names":["CellTextbox","_ref","label","title","subtitle","children","React","createElement","CellTextboxStyled","className","Fragment","CellTextboxLabel","CellTextboxTitle","CellTextboxSubtitle"],"mappings":";;;;;;IASaA,WAAwE,GAAG,SAA3EA,WAAwEA,CAAAC,IAAA,EAK/E;AAAA,EAAA,IAJFC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ,CAAA;AAER,EAAA;AAAA;AACI;IACAC,KAAA,CAAAC,aAAA,CAACC,iBAAiB,EAAA;AAACC,MAAAA,SAAS,EAAC,cAAA;KACxBP,EAAAA,KAAK,IAAIC,KAAK,IAAIC,QAAQ,gBACvBE,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAI,QAAA,EAAA,IAAA,EACKR,KAAK,iBAAII,KAAA,CAAAC,aAAA,CAACI,gBAAgB,EAAA,IAAA,EAAET,KAAwB,CAAC,EACrDC,KAAK,iBAAIG,KAAA,CAAAC,aAAA,CAACK,gBAAgB,EAAA,IAAA,EAAET,KAAwB,CAAC,EACrDC,QAAQ,iBAAIE,KAAA,CAAAC,aAAA,CAACM,mBAAmB,QAAET,QAA8B,CACnE,CAAC,GAEHC,QAEW,CAAA;AAAC,IAAA;AAE5B;;;;"}
|
@@ -1,12 +1,8 @@
|
|
1
|
-
import { objectWithoutProperties as _objectWithoutProperties } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
1
|
import React from 'react';
|
3
2
|
import { StyledTextboxLabel } from './CellTextboxLabel.styles.js';
|
4
3
|
|
5
|
-
var
|
6
|
-
|
7
|
-
var children = _ref.children,
|
8
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
9
|
-
return /*#__PURE__*/React.createElement(StyledTextboxLabel, rest, children);
|
4
|
+
var CellTextboxLabel = function CellTextboxLabel(props) {
|
5
|
+
return /*#__PURE__*/React.createElement(StyledTextboxLabel, null, props.children);
|
10
6
|
};
|
11
7
|
|
12
8
|
export { CellTextboxLabel };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CellTextboxLabel.js","sources":["../../../../../src/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\n\nimport { StyledTextboxLabel } from './CellTextboxLabel.styles';\n\nexport const CellTextboxLabel: React.FC<HTMLAttributes<HTMLDivElement>> = (
|
1
|
+
{"version":3,"file":"CellTextboxLabel.js","sources":["../../../../../src/components/Cell/ui/CellTextboxLabel/CellTextboxLabel.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\n\nimport { StyledTextboxLabel } from './CellTextboxLabel.styles';\n\nexport const CellTextboxLabel: React.FC<HTMLAttributes<HTMLDivElement>> = (props) => {\n return <StyledTextboxLabel>{props.children}</StyledTextboxLabel>;\n};\n"],"names":["CellTextboxLabel","props","React","createElement","StyledTextboxLabel","children"],"mappings":";;;IAIaA,gBAA0D,GAAG,SAA7DA,gBAA0DA,CAAIC,KAAK,EAAK;EACjF,oBAAOC,KAAA,CAAAC,aAAA,CAACC,kBAAkB,EAAEH,IAAAA,EAAAA,KAAK,CAACI,QAA6B,CAAC,CAAA;AACpE;;;;"}
|
@@ -1,12 +1,8 @@
|
|
1
|
-
import { objectWithoutProperties as _objectWithoutProperties } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
1
|
import React from 'react';
|
3
2
|
import { StyledTextboxSubtitle } from './CellTextboxSubtitle.styles.js';
|
4
3
|
|
5
|
-
var
|
6
|
-
|
7
|
-
var children = _ref.children,
|
8
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
9
|
-
return /*#__PURE__*/React.createElement(StyledTextboxSubtitle, rest, children);
|
4
|
+
var CellTextboxSubtitle = function CellTextboxSubtitle(props) {
|
5
|
+
return /*#__PURE__*/React.createElement(StyledTextboxSubtitle, null, props.children);
|
10
6
|
};
|
11
7
|
|
12
8
|
export { CellTextboxSubtitle };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CellTextboxSubtitle.js","sources":["../../../../../src/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\n\nimport { StyledTextboxSubtitle } from './CellTextboxSubtitle.styles';\n\nexport const CellTextboxSubtitle: React.FC<HTMLAttributes<HTMLDivElement>> = (
|
1
|
+
{"version":3,"file":"CellTextboxSubtitle.js","sources":["../../../../../src/components/Cell/ui/CellTextboxSubtitle/CellTextboxSubtitle.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\n\nimport { StyledTextboxSubtitle } from './CellTextboxSubtitle.styles';\n\nexport const CellTextboxSubtitle: React.FC<HTMLAttributes<HTMLDivElement>> = (props) => {\n return <StyledTextboxSubtitle>{props.children}</StyledTextboxSubtitle>;\n};\n"],"names":["CellTextboxSubtitle","props","React","createElement","StyledTextboxSubtitle","children"],"mappings":";;;IAIaA,mBAA6D,GAAG,SAAhEA,mBAA6DA,CAAIC,KAAK,EAAK;EACpF,oBAAOC,KAAA,CAAAC,aAAA,CAACC,qBAAqB,EAAEH,IAAAA,EAAAA,KAAK,CAACI,QAAgC,CAAC,CAAA;AAC1E;;;;"}
|
@@ -1,17 +1,11 @@
|
|
1
|
-
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
1
|
import React from 'react';
|
3
|
-
import { cx } from '../../../../utils/index.js';
|
4
2
|
import { StyledTextboxTitle } from './CellTextboxTitle.styles.js';
|
5
3
|
|
6
|
-
var
|
7
|
-
var CellTextboxTitle = function CellTextboxTitle(_ref) {
|
8
|
-
var children = _ref.children,
|
9
|
-
className = _ref.className,
|
10
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
4
|
+
var CellTextboxTitle = function CellTextboxTitle(props) {
|
11
5
|
// TODO: #1548
|
12
|
-
return /*#__PURE__*/React.createElement(StyledTextboxTitle,
|
13
|
-
className:
|
14
|
-
},
|
6
|
+
return /*#__PURE__*/React.createElement(StyledTextboxTitle, {
|
7
|
+
className: "cell-textbox-title"
|
8
|
+
}, props.children);
|
15
9
|
};
|
16
10
|
|
17
11
|
export { CellTextboxTitle };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CellTextboxTitle.js","sources":["../../../../../src/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\n\nimport {
|
1
|
+
{"version":3,"file":"CellTextboxTitle.js","sources":["../../../../../src/components/Cell/ui/CellTextboxTitle/CellTextboxTitle.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\n\nimport { StyledTextboxTitle } from './CellTextboxTitle.styles';\n\nexport const CellTextboxTitle: React.FC<HTMLAttributes<HTMLDivElement>> = (props) => {\n // TODO: #1548\n return <StyledTextboxTitle className=\"cell-textbox-title\">{props.children}</StyledTextboxTitle>;\n};\n"],"names":["CellTextboxTitle","props","React","createElement","StyledTextboxTitle","className","children"],"mappings":";;;IAIaA,gBAA0D,GAAG,SAA7DA,gBAA0DA,CAAIC,KAAK,EAAK;AACjF;AACA,EAAA,oBAAOC,KAAA,CAAAC,aAAA,CAACC,kBAAkB,EAAA;AAACC,IAAAA,SAAS,EAAC,oBAAA;GAAsBJ,EAAAA,KAAK,CAACK,QAA6B,CAAC,CAAA;AACnG;;;;"}
|
@@ -4,10 +4,10 @@
|
|
4
4
|
|
5
5
|
.base_hr4zpz_b1y5wkm1__d6390059 .base_hr4zpz_checkboxTrigger__d6390059{position:relative;}.base_hr4zpz_b1y5wkm1__d6390059 .base_hr4zpz_checkboxTrigger__d6390059::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:var(--plasma-checkbox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_hr4zpz_b1y5wkm1__d6390059 .base_hr4zpz_checkboxTrigger__d6390059.base_hr4zpz_focusVisible__d6390059:focus::before,.base_hr4zpz_b1y5wkm1__d6390059 .base_hr4zpz_checkboxTrigger__d6390059[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.125rem transparent;}.base_hr4zpz_b1y5wkm1__d6390059 input[data-focus-visible-added] + label .base_hr4zpz_checkboxTrigger__d6390059{border-color:transparent;position:relative;}.base_hr4zpz_b1y5wkm1__d6390059 input[data-focus-visible-added] + label .base_hr4zpz_checkboxTrigger__d6390059::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.125rem solid transparent;border-radius:var(--plasma-checkbox-trigger-border-radius);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_hr4zpz_b1y5wkm1__d6390059 input[data-focus-visible-added] + label .base_hr4zpz_checkboxTrigger__d6390059::before{box-shadow:0 0 0 0.125rem var(--plasma-checkbox-focus-color);}.base_hr4zpz_b1y5wkm1__d6390059 input[data-focus-visible-added]:checked + label .base_hr4zpz_checkboxTrigger__d6390059,.base_hr4zpz_b1y5wkm1__d6390059 input[type='checkbox'][data-focus-visible-added]:indeterminate + label .base_hr4zpz_checkboxTrigger__d6390059{position:relative;}.base_hr4zpz_b1y5wkm1__d6390059 input[data-focus-visible-added]:checked + label .base_hr4zpz_checkboxTrigger__d6390059::before,.base_hr4zpz_b1y5wkm1__d6390059 input[type='checkbox'][data-focus-visible-added]:indeterminate + label .base_hr4zpz_checkboxTrigger__d6390059::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-checkbox-trigger-border-radius) + 0.125rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_hr4zpz_b1y5wkm1__d6390059 input[data-focus-visible-added]:checked + label .base_hr4zpz_checkboxTrigger__d6390059::before,.base_hr4zpz_b1y5wkm1__d6390059 input[type='checkbox'][data-focus-visible-added]:indeterminate + label .base_hr4zpz_checkboxTrigger__d6390059::before{box-shadow:0 0 0 0.063rem var(--plasma-checkbox-focus-color);}
|
6
6
|
|
7
|
-
.
|
8
|
-
.
|
9
|
-
.
|
10
|
-
.
|
11
|
-
.
|
12
|
-
.
|
13
|
-
.
|
7
|
+
.Checkbox_styles_dmi26u_b1udywkg__94b814df{margin:var(--plasma-checkbox-margin);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;}.Checkbox_styles_dmi26u_b1udywkg__94b814df .Checkbox_styles_dmi26u_singleLine__94b814df{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
8
|
+
.Checkbox_styles_dmi26u_s165w87d__94b814df{position:absolute;width:1px;height:1px;overflow:hidden;-webkit-clip:rect(0 0 0 0);clip:rect(0 0 0 0);}.Checkbox_styles_dmi26u_s165w87d__94b814df:focus{outline:0 none;}
|
9
|
+
.Checkbox_styles_dmi26u_sft3zxv__94b814df{margin:var(--plasma-checkbox-trigger-margin);width:var(--plasma-checkbox-trigger-size);height:var(--plasma-checkbox-trigger-size);border-radius:var(--plasma-checkbox-trigger-border-radius);position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;background:var(--plasma-checkbox-trigger-background-color);border:0.125rem solid var(--plasma-checkbox-trigger-border-color);box-sizing:border-box;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-flex:0;-webkit-flex-grow:0;-ms-flex-positive:0;flex-grow:0;}input:not(:indeterminate) + label .Checkbox_styles_dmi26u_sft3zxv__94b814df div{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform 0.15s ease-in-out;-webkit-transition:transform 0.15s ease-in-out;transition:transform 0.15s ease-in-out;}input:checked + label .Checkbox_styles_dmi26u_sft3zxv__94b814df div{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}
|
10
|
+
.Checkbox_styles_dmi26u_s1u3nd7e__94b814df{position:relative;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;cursor:inherit;}
|
11
|
+
.Checkbox_styles_dmi26u_shwv1in__94b814df{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-top:var(--plasma-checkbox-content-top-offset);margin-left:var(--plasma-checkbox-content-left-offset);}
|
12
|
+
.Checkbox_styles_dmi26u_s1my1ay__94b814df{font-family:var(--plasma-checkbox-label-font-family);font-size:var(--plasma-checkbox-label-font-size);font-style:var(--plasma-checkbox-label-font-style);font-weight:var(--plasma-checkbox-label-font-weight);-webkit-letter-spacing:var(--plasma-checkbox-label-letter-spacing);-moz-letter-spacing:var(--plasma-checkbox-label-letter-spacing);-ms-letter-spacing:var(--plasma-checkbox-label-letter-spacing);letter-spacing:var(--plasma-checkbox-label-letter-spacing);line-height:var(--plasma-checkbox-label-line-height);}
|
13
|
+
.Checkbox_styles_dmi26u_s14u8fnn__94b814df{margin-top:var(--plasma-checkbox-description-margin-top);color:var(--plasma-checkbox-description-color);font-family:var(--plasma-checkbox-description-font-family);font-size:var(--plasma-checkbox-description-font-size);font-style:var(--plasma-checkbox-description-font-style);font-weight:var(--plasma-checkbox-description-font-weight);-webkit-letter-spacing:var(--plasma-checkbox-description-letter-spacing);-moz-letter-spacing:var(--plasma-checkbox-description-letter-spacing);-ms-letter-spacing:var(--plasma-checkbox-description-letter-spacing);letter-spacing:var(--plasma-checkbox-description-letter-spacing);line-height:var(--plasma-checkbox-description-line-height);}.Checkbox_styles_dmi26u_s14u8fnn__94b814df.Checkbox_styles_dmi26u_onlyDescription__94b814df{margin-top:0;}
|
@@ -64,8 +64,7 @@ var checkboxRoot = function checkboxRoot(Root) {
|
|
64
64
|
"aria-describedby": uniqDescriptionId,
|
65
65
|
tabIndex: canFocused
|
66
66
|
})), /*#__PURE__*/React.createElement(StyledContentWrapper, {
|
67
|
-
htmlFor: checkboxId
|
68
|
-
className: singleLineClass
|
67
|
+
htmlFor: checkboxId
|
69
68
|
}, /*#__PURE__*/React.createElement(StyledTrigger, {
|
70
69
|
className: classes.checkboxTrigger
|
71
70
|
}, indeterminate ? _Indeterminate || (_Indeterminate = /*#__PURE__*/React.createElement(Indeterminate, null)) : _Done || (_Done = /*#__PURE__*/React.createElement(Done, null))), hasContent && /*#__PURE__*/React.createElement(StyledContent, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useMemo, useRef } from 'react';\nimport { safeUseId, useForkRef, extractTextFrom } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines/types';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as focusedCSS } from './variations/_focused/base';\nimport { Done, Indeterminate } from './IconsSvg';\nimport {\n StyledContent,\n StyledContentWrapper,\n StyledDescription,\n StyledInput,\n StyledLabel,\n StyledTrigger,\n base,\n} from './Checkbox.styles';\nimport type { CheckboxProps } from './Checkbox.types';\nimport { classes } from './Checkbox.tokens';\n\nexport const checkboxRoot = (Root: RootProps<HTMLInputElement, CheckboxProps>) =>\n forwardRef<HTMLInputElement, CheckboxProps>((props, ref) => {\n const {\n size,\n view,\n focused,\n disabled,\n id,\n label,\n description,\n indeterminate,\n style,\n className,\n singleLine = false,\n 'aria-label': ariaLabelExternal,\n ...rest\n } = props;\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const forkRef = useForkRef(inputRef, ref);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.indeterminate = Boolean(indeterminate);\n }\n }, [inputRef, indeterminate]);\n\n const uniqId = safeUseId();\n const uniqLabelId = `label-${uniqId}`;\n const uniqDescriptionId = `description-${uniqId}`;\n const checkboxId = id || `input-${uniqId}`;\n\n const ariaLabel = useMemo(() => ariaLabelExternal || extractTextFrom(label), [ariaLabelExternal, label]);\n const isLabelAriaHidden = typeof label === 'string';\n const canFocused = focused ? 0 : -1;\n const hasContent = label || description;\n const singleLineClass = singleLine ? classes.singleLine : undefined;\n const onlyDescriptionClass = !label && description ? classes.onlyDescription : undefined;\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n focused={focused}\n style={style}\n className={className}\n tabIndex={-1}\n >\n <StyledInput\n {...rest}\n id={checkboxId}\n ref={forkRef}\n type=\"checkbox\"\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={uniqDescriptionId}\n tabIndex={canFocused}\n />\n <StyledContentWrapper htmlFor={checkboxId}
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef, useEffect, useMemo, useRef } from 'react';\nimport { safeUseId, useForkRef, extractTextFrom } from '@salutejs/plasma-core';\n\nimport type { RootProps } from '../../engines/types';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as focusedCSS } from './variations/_focused/base';\nimport { Done, Indeterminate } from './IconsSvg';\nimport {\n StyledContent,\n StyledContentWrapper,\n StyledDescription,\n StyledInput,\n StyledLabel,\n StyledTrigger,\n base,\n} from './Checkbox.styles';\nimport type { CheckboxProps } from './Checkbox.types';\nimport { classes } from './Checkbox.tokens';\n\nexport const checkboxRoot = (Root: RootProps<HTMLInputElement, CheckboxProps>) =>\n forwardRef<HTMLInputElement, CheckboxProps>((props, ref) => {\n const {\n size,\n view,\n focused,\n disabled,\n id,\n label,\n description,\n indeterminate,\n style,\n className,\n singleLine = false,\n 'aria-label': ariaLabelExternal,\n ...rest\n } = props;\n\n const inputRef = useRef<HTMLInputElement | null>(null);\n const forkRef = useForkRef(inputRef, ref);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.indeterminate = Boolean(indeterminate);\n }\n }, [inputRef, indeterminate]);\n\n const uniqId = safeUseId();\n const uniqLabelId = `label-${uniqId}`;\n const uniqDescriptionId = `description-${uniqId}`;\n const checkboxId = id || `input-${uniqId}`;\n\n const ariaLabel = useMemo(() => ariaLabelExternal || extractTextFrom(label), [ariaLabelExternal, label]);\n const isLabelAriaHidden = typeof label === 'string';\n const canFocused = focused ? 0 : -1;\n const hasContent = label || description;\n const singleLineClass = singleLine ? classes.singleLine : undefined;\n const onlyDescriptionClass = !label && description ? classes.onlyDescription : undefined;\n\n return (\n <Root\n view={view}\n size={size}\n disabled={disabled}\n focused={focused}\n style={style}\n className={className}\n tabIndex={-1}\n >\n <StyledInput\n {...rest}\n id={checkboxId}\n ref={forkRef}\n type=\"checkbox\"\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={uniqDescriptionId}\n tabIndex={canFocused}\n />\n <StyledContentWrapper htmlFor={checkboxId}>\n <StyledTrigger className={classes.checkboxTrigger}>\n {indeterminate ? <Indeterminate /> : <Done />}\n </StyledTrigger>\n {hasContent && (\n <StyledContent className={singleLineClass}>\n {label && (\n <StyledLabel\n className={singleLineClass}\n id={uniqLabelId}\n aria-hidden={isLabelAriaHidden}\n >\n {label}\n </StyledLabel>\n )}\n {description && (\n <StyledDescription\n className={cx(singleLineClass, onlyDescriptionClass)}\n id={uniqDescriptionId}\n >\n {description}\n </StyledDescription>\n )}\n </StyledContent>\n )}\n </StyledContentWrapper>\n </Root>\n );\n });\n\nexport const checkboxConfig = {\n name: 'Checkbox',\n tag: 'div',\n layout: checkboxRoot,\n base,\n variations: {\n size: {\n css: sizeCSS,\n },\n view: {\n css: viewCSS,\n },\n disabled: {\n css: disabledCSS,\n },\n focused: {\n css: focusedCSS,\n },\n },\n defaults: {\n size: 'm',\n view: 'accent',\n },\n};\n"],"names":["checkboxRoot","Root","forwardRef","props","ref","size","view","focused","disabled","id","label","description","indeterminate","style","className","_props$singleLine","singleLine","ariaLabelExternal","rest","_objectWithoutProperties","_excluded","inputRef","useRef","forkRef","useForkRef","useEffect","current","Boolean","uniqId","safeUseId","uniqLabelId","concat","uniqDescriptionId","checkboxId","ariaLabel","useMemo","extractTextFrom","isLabelAriaHidden","canFocused","hasContent","singleLineClass","classes","undefined","onlyDescriptionClass","onlyDescription","React","createElement","tabIndex","StyledInput","_extends","type","StyledContentWrapper","htmlFor","StyledTrigger","checkboxTrigger","_Indeterminate","Indeterminate","_Done","Done","StyledContent","StyledLabel","StyledDescription","cx","checkboxConfig","name","tag","layout","base","variations","css","sizeCSS","viewCSS","disabledCSS","focusedCSS","defaults"],"mappings":";;;;;;;;;;;;;;IAuBaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAAgD,EAAA;AAAA,EAAA,oBACzEC,UAAU,CAAkC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACxD,IAAA,IACIC,IAAI,GAaJF,KAAK,CAbLE,IAAI;MACJC,IAAI,GAYJH,KAAK,CAZLG,IAAI;MACJC,OAAO,GAWPJ,KAAK,CAXLI,OAAO;MACPC,QAAQ,GAURL,KAAK,CAVLK,QAAQ;MACRC,EAAE,GASFN,KAAK,CATLM,EAAE;MACFC,KAAK,GAQLP,KAAK,CARLO,KAAK;MACLC,WAAW,GAOXR,KAAK,CAPLQ,WAAW;MACXC,aAAa,GAMbT,KAAK,CANLS,aAAa;MACbC,KAAK,GAKLV,KAAK,CALLU,KAAK;MACLC,SAAS,GAITX,KAAK,CAJLW,SAAS;MAAAC,iBAAA,GAITZ,KAAK,CAHLa,UAAU;AAAVA,MAAAA,UAAU,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,iBAAA;MACJE,iBAAiB,GAE/Bd,KAAK,CAFL,YAAY,CAAA;AACTe,MAAAA,IAAI,GAAAC,wBAAA,CACPhB,KAAK,EAAAiB,SAAA,CAAA,CAAA;AAET,IAAA,IAAMC,QAAQ,GAAGC,MAAM,CAA0B,IAAI,CAAC,CAAA;AACtD,IAAA,IAAMC,OAAO,GAAGC,UAAU,CAACH,QAAQ,EAAEjB,GAAG,CAAC,CAAA;AAEzCqB,IAAAA,SAAS,CAAC,YAAM;MACZ,IAAIJ,QAAQ,CAACK,OAAO,EAAE;QAClBL,QAAQ,CAACK,OAAO,CAACd,aAAa,GAAGe,OAAO,CAACf,aAAa,CAAC,CA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