@charcoal-ui/react 4.0.0-beta.3 → 4.0.0-beta.4
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/components/Checkbox/index.d.ts +9 -20
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/CheckboxInput/index.d.ts +9 -0
- package/dist/components/CheckboxInput/index.d.ts.map +1 -0
- package/dist/components/DropdownSelector/Popover/index.d.ts +1 -2
- package/dist/components/DropdownSelector/Popover/index.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/useCustomModalOverlay.d.ts.map +1 -1
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/Radio/index.d.ts +4 -4
- package/dist/components/Radio/index.d.ts.map +1 -1
- package/dist/components/TextArea/index.d.ts.map +1 -1
- package/dist/components/TextField/index.d.ts.map +1 -1
- package/dist/core/CharcoalProvider.d.ts +1 -1
- package/dist/core/CharcoalProvider.d.ts.map +1 -1
- package/dist/index.cjs.js +177 -414
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +86 -0
- package/dist/index.css.map +1 -1
- package/dist/index.esm.js +152 -389
- package/dist/index.esm.js.map +1 -1
- package/package.json +14 -17
- package/src/components/Checkbox/__snapshots__/index.story.storyshot +163 -517
- package/src/components/Checkbox/index.css +21 -0
- package/src/components/Checkbox/index.story.tsx +44 -79
- package/src/components/Checkbox/index.tsx +19 -157
- package/src/components/CheckboxInput/__snapshots__/index.story.storyshot +109 -0
- package/src/components/CheckboxInput/index.css +77 -0
- package/src/components/CheckboxInput/index.story.tsx +35 -0
- package/src/components/CheckboxInput/index.tsx +53 -0
- package/src/components/DropdownSelector/Popover/index.tsx +1 -2
- package/src/components/IconButton/__snapshots__/index.story.storyshot +6 -8
- package/src/components/IconButton/index.story.tsx +14 -37
- package/src/components/LoadingSpinner/__snapshots__/index.story.storyshot +139 -1
- package/src/components/LoadingSpinner/index.story.tsx +18 -7
- package/src/components/Modal/index.tsx +1 -1
- package/src/components/Modal/useCustomModalOverlay.tsx +5 -4
- package/src/components/MultiSelect/__snapshots__/index.story.storyshot +32 -44
- package/src/components/MultiSelect/index.story.tsx +88 -192
- package/src/components/MultiSelect/index.tsx +2 -1
- package/src/components/Radio/__snapshots__/index.story.storyshot +1 -1
- package/src/components/Radio/index.story.tsx +20 -21
- package/src/components/Radio/index.tsx +14 -13
- package/src/components/Switch/__snapshots__/index.story.storyshot +8 -9
- package/src/components/Switch/index.story.tsx +10 -18
- package/src/components/TagItem/__snapshots__/index.story.storyshot +791 -665
- package/src/components/TagItem/index.story.tsx +44 -161
- package/src/components/TextArea/TextArea.story.tsx +62 -24
- package/src/components/TextArea/__snapshots__/TextArea.story.storyshot +1858 -472
- package/src/components/TextArea/index.tsx +2 -0
- package/src/components/TextField/TextField.story.tsx +77 -67
- package/src/components/TextField/__snapshots__/TextField.story.storyshot +2004 -786
- package/src/components/TextField/index.tsx +2 -0
- package/src/components/a11y.test.tsx +1 -1
- package/src/core/CharcoalProvider.tsx +1 -1
- package/dist/components/Button/index.story.d.ts +0 -22
- package/dist/components/Button/index.story.d.ts.map +0 -1
- package/dist/components/Button/index.test.d.ts +0 -2
- package/dist/components/Button/index.test.d.ts.map +0 -1
- package/dist/components/Checkbox/index.story.d.ts +0 -8
- package/dist/components/Checkbox/index.story.d.ts.map +0 -1
- package/dist/components/Clickable/index.story.d.ts +0 -6
- package/dist/components/Clickable/index.story.d.ts.map +0 -1
- package/dist/components/DropdownSelector/ListItem/index.story.d.ts +0 -9
- package/dist/components/DropdownSelector/ListItem/index.story.d.ts.map +0 -1
- package/dist/components/DropdownSelector/MenuList/index.story.d.ts +0 -8
- package/dist/components/DropdownSelector/MenuList/index.story.d.ts.map +0 -1
- package/dist/components/DropdownSelector/Popover/index.story.d.ts +0 -5
- package/dist/components/DropdownSelector/Popover/index.story.d.ts.map +0 -1
- package/dist/components/DropdownSelector/index.story.d.ts +0 -19
- package/dist/components/DropdownSelector/index.story.d.ts.map +0 -1
- package/dist/components/Icon/index.story.d.ts +0 -6
- package/dist/components/Icon/index.story.d.ts.map +0 -1
- package/dist/components/IconButton/index.story.d.ts +0 -9
- package/dist/components/IconButton/index.story.d.ts.map +0 -1
- package/dist/components/LoadingSpinner/LoadingSpinnerIcon.story.d.ts +0 -8
- package/dist/components/LoadingSpinner/LoadingSpinnerIcon.story.d.ts.map +0 -1
- package/dist/components/LoadingSpinner/index.story.d.ts +0 -6
- package/dist/components/LoadingSpinner/index.story.d.ts.map +0 -1
- package/dist/components/Modal/index.story.d.ts +0 -21
- package/dist/components/Modal/index.story.d.ts.map +0 -1
- package/dist/components/MultiSelect/index.story.d.ts +0 -82
- package/dist/components/MultiSelect/index.story.d.ts.map +0 -1
- package/dist/components/MultiSelect/index.test.d.ts +0 -2
- package/dist/components/MultiSelect/index.test.d.ts.map +0 -1
- package/dist/components/Radio/index.story.d.ts +0 -26
- package/dist/components/Radio/index.story.d.ts.map +0 -1
- package/dist/components/Radio/index.test.d.ts +0 -2
- package/dist/components/Radio/index.test.d.ts.map +0 -1
- package/dist/components/SegmentedControl/index.story.d.ts +0 -7
- package/dist/components/SegmentedControl/index.story.d.ts.map +0 -1
- package/dist/components/Switch/index.story.d.ts +0 -9
- package/dist/components/Switch/index.story.d.ts.map +0 -1
- package/dist/components/TagItem/index.story.d.ts +0 -16
- package/dist/components/TagItem/index.story.d.ts.map +0 -1
- package/dist/components/TextArea/TextArea.story.d.ts +0 -9
- package/dist/components/TextArea/TextArea.story.d.ts.map +0 -1
- package/dist/components/TextField/TextField.story.d.ts +0 -22
- package/dist/components/TextField/TextField.story.d.ts.map +0 -1
- package/dist/components/a11y.test.d.ts +0 -2
- package/dist/components/a11y.test.d.ts.map +0 -1
- package/src/components/LoadingSpinner/LoadingSpinnerIcon.story.tsx +0 -13
package/dist/index.cjs.js
CHANGED
|
@@ -360,7 +360,24 @@ var MultiSelectGroupContext = (0, import_react6.createContext)({
|
|
|
360
360
|
|
|
361
361
|
// src/components/MultiSelect/index.tsx
|
|
362
362
|
var import_styled4 = require("@charcoal-ui/styled");
|
|
363
|
+
|
|
364
|
+
// src/components/Icon/index.tsx
|
|
365
|
+
var React5 = __toESM(require("react"));
|
|
366
|
+
var import_icons = require("@charcoal-ui/icons");
|
|
363
367
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
368
|
+
var Icon = React5.forwardRef(function IconInner({
|
|
369
|
+
name,
|
|
370
|
+
scale,
|
|
371
|
+
unsafeNonGuidelineScale,
|
|
372
|
+
className,
|
|
373
|
+
...rest
|
|
374
|
+
}, ref) {
|
|
375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("pixiv-icon", { ref, name, scale, "unsafe-non-guideline-scale": unsafeNonGuidelineScale, class: className, ...rest });
|
|
376
|
+
});
|
|
377
|
+
var Icon_default = Icon;
|
|
378
|
+
|
|
379
|
+
// src/components/MultiSelect/index.tsx
|
|
380
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
364
381
|
var MultiSelect = (0, import_react7.forwardRef)(function MultiSelectInner({
|
|
365
382
|
value,
|
|
366
383
|
disabled = false,
|
|
@@ -397,14 +414,14 @@ var MultiSelect = (0, import_react7.forwardRef)(function MultiSelectInner({
|
|
|
397
414
|
selected: event.currentTarget.checked
|
|
398
415
|
});
|
|
399
416
|
}, [onChange, parentOnChange, value]);
|
|
400
|
-
return /* @__PURE__ */ (0,
|
|
401
|
-
/* @__PURE__ */ (0,
|
|
417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(MultiSelectRoot, { "aria-disabled": isDisabled, className, children: [
|
|
418
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MultiSelectInput, { ...{
|
|
402
419
|
name,
|
|
403
420
|
value,
|
|
404
421
|
invalid
|
|
405
422
|
}, checked: isSelected, disabled: isDisabled, onChange: handleChange, overlay: variant === "overlay", "aria-invalid": invalid, ref }),
|
|
406
|
-
/* @__PURE__ */ (0,
|
|
407
|
-
Boolean(children) && /* @__PURE__ */ (0,
|
|
423
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MultiSelectInputOverlay, { overlay: variant === "overlay", invalid, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon_default, { name: "24/Check", "unsafe-non-guideline-scale": 16 / 24 }) }),
|
|
424
|
+
Boolean(children) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MultiSelectLabel, { children })
|
|
408
425
|
] });
|
|
409
426
|
});
|
|
410
427
|
var MultiSelect_default = (0, import_react7.memo)(MultiSelect);
|
|
@@ -457,14 +474,14 @@ function MultiSelectGroup({
|
|
|
457
474
|
}
|
|
458
475
|
}
|
|
459
476
|
}, [onChange, selected]);
|
|
460
|
-
return /* @__PURE__ */ (0,
|
|
477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MultiSelectGroupContext.Provider, { value: {
|
|
461
478
|
name,
|
|
462
479
|
selected: Array.from(new Set(selected)),
|
|
463
480
|
disabled,
|
|
464
481
|
readonly,
|
|
465
482
|
invalid,
|
|
466
483
|
onChange: handleChange
|
|
467
|
-
}, children: /* @__PURE__ */ (0,
|
|
484
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className, "aria-label": label, "data-testid": "SelectGroup", children }) });
|
|
468
485
|
}
|
|
469
486
|
|
|
470
487
|
// src/components/Switch/index.tsx
|
|
@@ -474,7 +491,7 @@ var import_react_stately = require("react-stately");
|
|
|
474
491
|
var import_styled_components6 = __toESM(require("styled-components"));
|
|
475
492
|
var import_utils3 = require("@react-aria/utils");
|
|
476
493
|
var import_styled5 = require("@charcoal-ui/styled");
|
|
477
|
-
var
|
|
494
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
478
495
|
var SwitchCheckbox = (0, import_react8.forwardRef)(function SwitchCheckboxInner(props, external) {
|
|
479
496
|
const {
|
|
480
497
|
disabled,
|
|
@@ -495,9 +512,9 @@ var SwitchCheckbox = (0, import_react8.forwardRef)(function SwitchCheckboxInner(
|
|
|
495
512
|
...rest
|
|
496
513
|
}
|
|
497
514
|
} = (0, import_switch.useSwitch)(ariaSwitchProps, state, ref);
|
|
498
|
-
return /* @__PURE__ */ (0,
|
|
499
|
-
/* @__PURE__ */ (0,
|
|
500
|
-
"children" in props ? /* @__PURE__ */ (0,
|
|
515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Label, { className, "aria-disabled": disabled, children: [
|
|
516
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SwitchInput, { ...rest, ref }),
|
|
517
|
+
"children" in props ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(LabelInner, { children: props.children }) : void 0
|
|
501
518
|
] });
|
|
502
519
|
});
|
|
503
520
|
var Switch_default = (0, import_react8.memo)(SwitchCheckbox);
|
|
@@ -517,14 +534,14 @@ var SwitchInput = import_styled_components6.default.input.attrs({
|
|
|
517
534
|
var import_textfield = require("@react-aria/textfield");
|
|
518
535
|
var import_visually_hidden = require("@react-aria/visually-hidden");
|
|
519
536
|
var import_react10 = require("react");
|
|
520
|
-
var
|
|
537
|
+
var React7 = __toESM(require("react"));
|
|
521
538
|
var import_styled_components8 = __toESM(require("styled-components"));
|
|
522
539
|
|
|
523
540
|
// src/components/FieldLabel/index.tsx
|
|
524
|
-
var
|
|
541
|
+
var React6 = __toESM(require("react"));
|
|
525
542
|
var import_styled_components7 = __toESM(require("styled-components"));
|
|
526
|
-
var
|
|
527
|
-
var FieldLabel =
|
|
543
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
544
|
+
var FieldLabel = React6.forwardRef(function FieldLabel2({
|
|
528
545
|
style,
|
|
529
546
|
className,
|
|
530
547
|
label,
|
|
@@ -533,10 +550,10 @@ var FieldLabel = React5.forwardRef(function FieldLabel2({
|
|
|
533
550
|
subLabel,
|
|
534
551
|
...labelProps
|
|
535
552
|
}, ref) {
|
|
536
|
-
return /* @__PURE__ */ (0,
|
|
537
|
-
/* @__PURE__ */ (0,
|
|
538
|
-
required && /* @__PURE__ */ (0,
|
|
539
|
-
/* @__PURE__ */ (0,
|
|
553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(FieldLabelWrapper, { style, className, children: [
|
|
554
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Label2, { ref, ...labelProps, children: label }),
|
|
555
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(RequiredText, { children: requiredText }),
|
|
556
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SubLabelClickable, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: subLabel }) })
|
|
540
557
|
] });
|
|
541
558
|
});
|
|
542
559
|
var FieldLabel_default = FieldLabel;
|
|
@@ -594,11 +611,11 @@ function useFocusWithClick(containerRef, inputRef) {
|
|
|
594
611
|
|
|
595
612
|
// src/components/TextField/index.tsx
|
|
596
613
|
var import_utils4 = require("@react-aria/utils");
|
|
597
|
-
var
|
|
598
|
-
var TextField =
|
|
614
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
615
|
+
var TextField = React7.forwardRef(function SingleLineTextFieldInner({
|
|
599
616
|
onChange,
|
|
600
617
|
...props
|
|
601
|
-
},
|
|
618
|
+
}, forwardRef19) {
|
|
602
619
|
const {
|
|
603
620
|
className,
|
|
604
621
|
showLabel = false,
|
|
@@ -609,6 +626,7 @@ var TextField = React6.forwardRef(function SingleLineTextFieldInner({
|
|
|
609
626
|
disabled = false,
|
|
610
627
|
required,
|
|
611
628
|
invalid = false,
|
|
629
|
+
readOnly = false,
|
|
612
630
|
assistiveText,
|
|
613
631
|
maxLength,
|
|
614
632
|
prefix = null,
|
|
@@ -643,6 +661,7 @@ var TextField = React6.forwardRef(function SingleLineTextFieldInner({
|
|
|
643
661
|
inputElementType: "input",
|
|
644
662
|
isDisabled: disabled,
|
|
645
663
|
isRequired: required,
|
|
664
|
+
isReadOnly: readOnly,
|
|
646
665
|
validationState: invalid ? "invalid" : "valid",
|
|
647
666
|
description: !invalid && assistiveText,
|
|
648
667
|
errorMessage: invalid && assistiveText,
|
|
@@ -652,17 +671,17 @@ var TextField = React6.forwardRef(function SingleLineTextFieldInner({
|
|
|
652
671
|
const containerRef = (0, import_react10.useRef)(null);
|
|
653
672
|
useFocusWithClick(containerRef, ariaRef);
|
|
654
673
|
const inputProps = (0, import_utils4.mergeProps)(restProps, ariaInputProps);
|
|
655
|
-
return /* @__PURE__ */ (0,
|
|
656
|
-
/* @__PURE__ */ (0,
|
|
657
|
-
/* @__PURE__ */ (0,
|
|
658
|
-
prefix && /* @__PURE__ */ (0,
|
|
659
|
-
/* @__PURE__ */ (0,
|
|
660
|
-
(suffix || showCount) && /* @__PURE__ */ (0,
|
|
674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(TextFieldRoot, { className, isDisabled: disabled, children: [
|
|
675
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TextFieldLabel, { label, requiredText, required, subLabel, ...labelProps, ...!showLabel ? visuallyHiddenProps : {} }),
|
|
676
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(StyledInputContainer, { ref: containerRef, invalid, "aria-disabled": disabled === true ? true : void 0, hasPrefix: prefix != null, hasSuffix: suffix != null || showCount, children: [
|
|
677
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PrefixContainer, { children: prefix }),
|
|
678
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(StyledInput, { ref: mergeRefs(forwardRef19, ariaRef), invalid, ...inputProps }),
|
|
679
|
+
(suffix || showCount) && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(SuffixContainer, { children: [
|
|
661
680
|
suffix,
|
|
662
|
-
showCount && /* @__PURE__ */ (0,
|
|
681
|
+
showCount && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SingleLineCounter, { children: maxLength !== void 0 ? `${count}/${maxLength}` : count })
|
|
663
682
|
] })
|
|
664
683
|
] }),
|
|
665
|
-
assistiveText != null && assistiveText.length !== 0 && /* @__PURE__ */ (0,
|
|
684
|
+
assistiveText != null && assistiveText.length !== 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AssistiveText, { invalid, ...invalid ? errorMessageProps : descriptionProps, children: assistiveText })
|
|
666
685
|
] });
|
|
667
686
|
});
|
|
668
687
|
var TextField_default = TextField;
|
|
@@ -699,11 +718,11 @@ var import_visually_hidden2 = require("@react-aria/visually-hidden");
|
|
|
699
718
|
var import_react11 = require("react");
|
|
700
719
|
var import_styled_components9 = __toESM(require("styled-components"));
|
|
701
720
|
var import_utils5 = require("@react-aria/utils");
|
|
702
|
-
var
|
|
721
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
703
722
|
var TextArea = (0, import_react11.forwardRef)(function TextAreaInner({
|
|
704
723
|
onChange,
|
|
705
724
|
...props
|
|
706
|
-
},
|
|
725
|
+
}, forwardRef19) {
|
|
707
726
|
const {
|
|
708
727
|
className,
|
|
709
728
|
showCount = false,
|
|
@@ -714,6 +733,7 @@ var TextArea = (0, import_react11.forwardRef)(function TextAreaInner({
|
|
|
714
733
|
disabled = false,
|
|
715
734
|
required,
|
|
716
735
|
invalid = false,
|
|
736
|
+
readOnly = false,
|
|
717
737
|
assistiveText,
|
|
718
738
|
maxLength,
|
|
719
739
|
autoHeight = false,
|
|
@@ -758,6 +778,7 @@ var TextArea = (0, import_react11.forwardRef)(function TextAreaInner({
|
|
|
758
778
|
inputElementType: "textarea",
|
|
759
779
|
isDisabled: disabled,
|
|
760
780
|
isRequired: required,
|
|
781
|
+
isReadOnly: readOnly,
|
|
761
782
|
validationState: invalid ? "invalid" : "valid",
|
|
762
783
|
description: !invalid && assistiveText,
|
|
763
784
|
errorMessage: invalid && assistiveText,
|
|
@@ -772,13 +793,13 @@ var TextArea = (0, import_react11.forwardRef)(function TextAreaInner({
|
|
|
772
793
|
const containerRef = (0, import_react11.useRef)(null);
|
|
773
794
|
useFocusWithClick(containerRef, ariaRef);
|
|
774
795
|
const inputProps = (0, import_utils5.mergeProps)(restProps, ariaInputProps);
|
|
775
|
-
return /* @__PURE__ */ (0,
|
|
776
|
-
/* @__PURE__ */ (0,
|
|
777
|
-
/* @__PURE__ */ (0,
|
|
778
|
-
/* @__PURE__ */ (0,
|
|
779
|
-
showCount && /* @__PURE__ */ (0,
|
|
796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(TextFieldRoot2, { className, isDisabled: disabled, children: [
|
|
797
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TextFieldLabel, { label, requiredText, required, subLabel, ...labelProps, ...!showLabel ? visuallyHiddenProps : {} }),
|
|
798
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(StyledTextareaContainer, { ref: containerRef, invalid, rows: showCount ? rows + 1 : rows, "aria-disabled": disabled === true ? "true" : void 0, children: [
|
|
799
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(StyledTextarea, { ref: mergeRefs(textareaRef, forwardRef19, ariaRef), rows, noBottomPadding: showCount, ...inputProps }),
|
|
800
|
+
showCount && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MultiLineCounter, { children: maxLength !== void 0 ? `${count}/${maxLength}` : count })
|
|
780
801
|
] }),
|
|
781
|
-
assistiveText != null && assistiveText.length !== 0 && /* @__PURE__ */ (0,
|
|
802
|
+
assistiveText != null && assistiveText.length !== 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AssistiveText, { invalid, ...invalid ? errorMessageProps : descriptionProps, children: assistiveText })
|
|
782
803
|
] });
|
|
783
804
|
});
|
|
784
805
|
var TextArea_default = TextArea;
|
|
@@ -802,23 +823,8 @@ var MultiLineCounter = import_styled_components9.default.span.withConfig({
|
|
|
802
823
|
componentId: "ccl__sc-58waht-3"
|
|
803
824
|
})(["position:absolute;bottom:9px;right:8px;line-height:22px;font-size:14px;color:var(--charcoal-text3);"]);
|
|
804
825
|
|
|
805
|
-
// src/components/Icon/index.tsx
|
|
806
|
-
var React7 = __toESM(require("react"));
|
|
807
|
-
var import_icons = require("@charcoal-ui/icons");
|
|
808
|
-
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
809
|
-
var Icon = React7.forwardRef(function IconInner({
|
|
810
|
-
name,
|
|
811
|
-
scale,
|
|
812
|
-
unsafeNonGuidelineScale,
|
|
813
|
-
className,
|
|
814
|
-
...rest
|
|
815
|
-
}, ref) {
|
|
816
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("pixiv-icon", { ref, name, scale, "unsafe-non-guideline-scale": unsafeNonGuidelineScale, class: className, ...rest });
|
|
817
|
-
});
|
|
818
|
-
var Icon_default = Icon;
|
|
819
|
-
|
|
820
826
|
// src/components/Modal/index.tsx
|
|
821
|
-
var
|
|
827
|
+
var import_react14 = require("react");
|
|
822
828
|
var React11 = __toESM(require("react"));
|
|
823
829
|
var import_overlays3 = require("@react-aria/overlays");
|
|
824
830
|
var import_styled_components11 = __toESM(require("styled-components"));
|
|
@@ -831,15 +837,7 @@ var import_utils8 = require("@react-aria/utils");
|
|
|
831
837
|
var import_react12 = require("react");
|
|
832
838
|
var import_styled_components10 = __toESM(require("styled-components"));
|
|
833
839
|
var import_dialog = require("@react-aria/dialog");
|
|
834
|
-
|
|
835
|
-
// ../foundation/src/grid.ts
|
|
836
|
-
var COLUMN_UNIT = 80;
|
|
837
|
-
var GUTTER_UNIT = 24;
|
|
838
|
-
function columnSystem(span, column, gutter) {
|
|
839
|
-
return span * column + (span - 1) * gutter;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
// src/components/Modal/Dialog/index.tsx
|
|
840
|
+
var import_foundation = require("@charcoal-ui/foundation");
|
|
843
841
|
var import_utils6 = require("@charcoal-ui/utils");
|
|
844
842
|
var import_react_spring = require("react-spring");
|
|
845
843
|
|
|
@@ -861,8 +859,8 @@ function useForwardedRef(ref) {
|
|
|
861
859
|
|
|
862
860
|
// src/components/Modal/Dialog/index.tsx
|
|
863
861
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
864
|
-
var Dialog = (0, import_react12.forwardRef)(function Dialog2(props,
|
|
865
|
-
const ref = useForwardedRef(
|
|
862
|
+
var Dialog = (0, import_react12.forwardRef)(function Dialog2(props, forwardRef19) {
|
|
863
|
+
const ref = useForwardedRef(forwardRef19);
|
|
866
864
|
const {
|
|
867
865
|
dialogProps
|
|
868
866
|
} = (0, import_dialog.useDialog)({
|
|
@@ -875,13 +873,13 @@ var AnimatedStyledDialogDiv = (0, import_react_spring.animated)(import_styled_co
|
|
|
875
873
|
})(["margin:auto;position:relative;height:fit-content;width:", "px;background-color:var(--charcoal-surface1);border-radius:24px;@media ", "{max-width:440px;width:calc(100% - 48px);", "}:focus{outline:none;}"], (p) => {
|
|
876
874
|
switch (p.size) {
|
|
877
875
|
case "S": {
|
|
878
|
-
return columnSystem(3, COLUMN_UNIT, GUTTER_UNIT) + GUTTER_UNIT * 2;
|
|
876
|
+
return (0, import_foundation.columnSystem)(3, import_foundation.COLUMN_UNIT, import_foundation.GUTTER_UNIT) + import_foundation.GUTTER_UNIT * 2;
|
|
879
877
|
}
|
|
880
878
|
case "M": {
|
|
881
|
-
return columnSystem(4, COLUMN_UNIT, GUTTER_UNIT) + GUTTER_UNIT * 2;
|
|
879
|
+
return (0, import_foundation.columnSystem)(4, import_foundation.COLUMN_UNIT, import_foundation.GUTTER_UNIT) + import_foundation.GUTTER_UNIT * 2;
|
|
882
880
|
}
|
|
883
881
|
case "L": {
|
|
884
|
-
return columnSystem(6, COLUMN_UNIT, GUTTER_UNIT) + GUTTER_UNIT * 2;
|
|
882
|
+
return (0, import_foundation.columnSystem)(6, import_foundation.COLUMN_UNIT, import_foundation.GUTTER_UNIT) + import_foundation.GUTTER_UNIT * 2;
|
|
885
883
|
}
|
|
886
884
|
default: {
|
|
887
885
|
return unreachable(p.size);
|
|
@@ -898,6 +896,25 @@ var ModalBackgroundContext = React9.createContext(null);
|
|
|
898
896
|
// src/components/Modal/useCustomModalOverlay.tsx
|
|
899
897
|
var React10 = __toESM(require("react"));
|
|
900
898
|
var import_overlays2 = require("@react-aria/overlays");
|
|
899
|
+
|
|
900
|
+
// src/components/DropdownSelector/Popover/usePreventScroll.tsx
|
|
901
|
+
var import_react13 = require("react");
|
|
902
|
+
function usePreventScroll(element, isOpen) {
|
|
903
|
+
(0, import_react13.useEffect)(() => {
|
|
904
|
+
if (isOpen && element) {
|
|
905
|
+
const defaultPaddingRight = element.style.paddingRight;
|
|
906
|
+
const defaultOverflow = element.style.overflow;
|
|
907
|
+
element.style.paddingRight = `${window.innerWidth - element.clientWidth}px`;
|
|
908
|
+
element.style.overflow = "hidden";
|
|
909
|
+
return () => {
|
|
910
|
+
element.style.paddingRight = defaultPaddingRight;
|
|
911
|
+
element.style.overflow = defaultOverflow;
|
|
912
|
+
};
|
|
913
|
+
}
|
|
914
|
+
}, [element, isOpen]);
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
// src/components/Modal/useCustomModalOverlay.tsx
|
|
901
918
|
function useCharcoalModalOverlay(props, state, ref) {
|
|
902
919
|
const {
|
|
903
920
|
overlayProps,
|
|
@@ -908,9 +925,7 @@ function useCharcoalModalOverlay(props, state, ref) {
|
|
|
908
925
|
onClose: state.onClose,
|
|
909
926
|
shouldCloseOnInteractOutside: () => false
|
|
910
927
|
}, ref);
|
|
911
|
-
(
|
|
912
|
-
isDisabled: !state.isOpen
|
|
913
|
-
});
|
|
928
|
+
usePreventScroll(typeof document !== "undefined" ? document.body : null, state.isOpen);
|
|
914
929
|
(0, import_overlays2.useOverlayFocusContain)();
|
|
915
930
|
React10.useEffect(() => {
|
|
916
931
|
if (state.isOpen && ref.current) {
|
|
@@ -926,7 +941,7 @@ function useCharcoalModalOverlay(props, state, ref) {
|
|
|
926
941
|
// src/components/Modal/index.tsx
|
|
927
942
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
928
943
|
var DEFAULT_Z_INDEX = 10;
|
|
929
|
-
var Modal = (0,
|
|
944
|
+
var Modal = (0, import_react14.forwardRef)(function ModalInner({
|
|
930
945
|
children,
|
|
931
946
|
zIndex = DEFAULT_Z_INDEX,
|
|
932
947
|
portalContainer,
|
|
@@ -1007,7 +1022,7 @@ var Modal = (0, import_react13.forwardRef)(function ModalInner({
|
|
|
1007
1022
|
isDismissable === true && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ModalCrossButton, { size: "S", icon: "24/Close", onClick: onClose })
|
|
1008
1023
|
] }) }) }) }) }));
|
|
1009
1024
|
});
|
|
1010
|
-
var Modal_default = (0,
|
|
1025
|
+
var Modal_default = (0, import_react14.memo)(Modal);
|
|
1011
1026
|
var ModalContext = React11.createContext({
|
|
1012
1027
|
titleProps: {},
|
|
1013
1028
|
title: "",
|
|
@@ -1029,7 +1044,7 @@ function ModalTitle(props) {
|
|
|
1029
1044
|
const {
|
|
1030
1045
|
titleProps,
|
|
1031
1046
|
title
|
|
1032
|
-
} = (0,
|
|
1047
|
+
} = (0, import_react14.useContext)(ModalContext);
|
|
1033
1048
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ModalHeading, { ...titleProps, ...props, children: title });
|
|
1034
1049
|
}
|
|
1035
1050
|
var ModalHeading = import_styled_components11.default.h3.withConfig({
|
|
@@ -1038,11 +1053,11 @@ var ModalHeading = import_styled_components11.default.h3.withConfig({
|
|
|
1038
1053
|
|
|
1039
1054
|
// src/components/Modal/ModalPlumbing.tsx
|
|
1040
1055
|
var import_styled_components12 = __toESM(require("styled-components"));
|
|
1041
|
-
var
|
|
1056
|
+
var import_react15 = require("react");
|
|
1042
1057
|
var import_utils9 = require("@charcoal-ui/utils");
|
|
1043
1058
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1044
1059
|
function ModalHeader() {
|
|
1045
|
-
const modalCtx = (0,
|
|
1060
|
+
const modalCtx = (0, import_react15.useContext)(ModalContext);
|
|
1046
1061
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ModalHeaderRoot, { $bottomSheet: modalCtx.bottomSheet, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(StyledModalTitle, {}) });
|
|
1047
1062
|
}
|
|
1048
1063
|
var ModalHeaderRoot = import_styled_components12.default.div.withConfig({
|
|
@@ -1064,10 +1079,10 @@ var ModalButtons = import_styled_components12.default.div.withConfig({
|
|
|
1064
1079
|
})(["display:grid;grid-auto-flow:row;grid-row-gap:8px;padding-top:16px;padding-left:16px;padding-right:16px;"]);
|
|
1065
1080
|
|
|
1066
1081
|
// src/components/LoadingSpinner/index.tsx
|
|
1067
|
-
var
|
|
1082
|
+
var import_react16 = require("react");
|
|
1068
1083
|
var import_styled_components13 = __toESM(require("styled-components"));
|
|
1069
1084
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1070
|
-
var LoadingSpinner = (0,
|
|
1085
|
+
var LoadingSpinner = (0, import_react16.forwardRef)(function LoadingSpinnerInner({
|
|
1071
1086
|
size = 48,
|
|
1072
1087
|
padding = 16,
|
|
1073
1088
|
transparent = false,
|
|
@@ -1075,7 +1090,7 @@ var LoadingSpinner = (0, import_react15.forwardRef)(function LoadingSpinnerInner
|
|
|
1075
1090
|
}, ref) {
|
|
1076
1091
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(LoadingSpinnerRoot, { size, padding, transparent, className, ref, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(LoadingSpinnerIcon, {}) });
|
|
1077
1092
|
});
|
|
1078
|
-
var LoadingSpinner_default = (0,
|
|
1093
|
+
var LoadingSpinner_default = (0, import_react16.memo)(LoadingSpinner);
|
|
1079
1094
|
var LoadingSpinnerRoot = import_styled_components13.default.div.attrs({
|
|
1080
1095
|
role: "progressbar"
|
|
1081
1096
|
}).withConfig({
|
|
@@ -1089,11 +1104,11 @@ var Icon2 = import_styled_components13.default.div.attrs({
|
|
|
1089
1104
|
}).withConfig({
|
|
1090
1105
|
componentId: "ccl__sc-1id6yz4-1"
|
|
1091
1106
|
})(["width:1em;height:1em;border-radius:1em;background-color:currentColor;animation:", " 1s both ease-out;animation-iteration-count:", ";&[data-reset-animation]{animation:none;}"], scaleOut, (p) => p.once ? 1 : "infinite");
|
|
1092
|
-
var LoadingSpinnerIcon = (0,
|
|
1107
|
+
var LoadingSpinnerIcon = (0, import_react16.forwardRef)(function LoadingSpinnerIcon2({
|
|
1093
1108
|
once = false
|
|
1094
1109
|
}, ref) {
|
|
1095
|
-
const iconRef = (0,
|
|
1096
|
-
(0,
|
|
1110
|
+
const iconRef = (0, import_react16.useRef)(null);
|
|
1111
|
+
(0, import_react16.useImperativeHandle)(ref, () => ({
|
|
1097
1112
|
restart: () => {
|
|
1098
1113
|
if (!iconRef.current) {
|
|
1099
1114
|
return;
|
|
@@ -1118,25 +1133,6 @@ var import_react18 = require("react");
|
|
|
1118
1133
|
var import_react17 = require("react");
|
|
1119
1134
|
var import_overlays4 = require("@react-aria/overlays");
|
|
1120
1135
|
var import_styled_components14 = __toESM(require("styled-components"));
|
|
1121
|
-
|
|
1122
|
-
// src/components/DropdownSelector/Popover/usePreventScroll.tsx
|
|
1123
|
-
var import_react16 = require("react");
|
|
1124
|
-
function usePreventScroll2(element, isOpen) {
|
|
1125
|
-
(0, import_react16.useEffect)(() => {
|
|
1126
|
-
if (isOpen && element) {
|
|
1127
|
-
const defaultPaddingRight = element.style.paddingRight;
|
|
1128
|
-
const defaultOverflow = element.style.overflow;
|
|
1129
|
-
element.style.paddingRight = `${window.innerWidth - element.clientWidth}px`;
|
|
1130
|
-
element.style.overflow = "hidden";
|
|
1131
|
-
return () => {
|
|
1132
|
-
element.style.paddingRight = defaultPaddingRight;
|
|
1133
|
-
element.style.overflow = defaultOverflow;
|
|
1134
|
-
};
|
|
1135
|
-
}
|
|
1136
|
-
}, [element, isOpen]);
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
// src/components/DropdownSelector/Popover/index.tsx
|
|
1140
1136
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1141
1137
|
var _empty = () => null;
|
|
1142
1138
|
function Popover(props) {
|
|
@@ -1157,7 +1153,7 @@ function Popover(props) {
|
|
|
1157
1153
|
toggle: _empty
|
|
1158
1154
|
});
|
|
1159
1155
|
const modalBackground = (0, import_react17.useContext)(ModalBackgroundContext);
|
|
1160
|
-
|
|
1156
|
+
usePreventScroll(modalBackground, props.isOpen);
|
|
1161
1157
|
if (!props.isOpen)
|
|
1162
1158
|
return null;
|
|
1163
1159
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_overlays4.Overlay, { portalContainer: document.body, children: [
|
|
@@ -1500,240 +1496,15 @@ var StyledLi2 = import_styled_components19.default.li.withConfig({
|
|
|
1500
1496
|
})(["display:block;"]);
|
|
1501
1497
|
|
|
1502
1498
|
// src/components/SegmentedControl/index.tsx
|
|
1503
|
-
var import_react28 = require("react");
|
|
1504
|
-
|
|
1505
|
-
// ../../node_modules/@react-stately/form/dist/import.mjs
|
|
1506
|
-
var import_react24 = require("react");
|
|
1507
|
-
var $e5be200c675c3b3a$export$aca958c65c314e6c = {
|
|
1508
|
-
badInput: false,
|
|
1509
|
-
customError: false,
|
|
1510
|
-
patternMismatch: false,
|
|
1511
|
-
rangeOverflow: false,
|
|
1512
|
-
rangeUnderflow: false,
|
|
1513
|
-
stepMismatch: false,
|
|
1514
|
-
tooLong: false,
|
|
1515
|
-
tooShort: false,
|
|
1516
|
-
typeMismatch: false,
|
|
1517
|
-
valueMissing: false,
|
|
1518
|
-
valid: true
|
|
1519
|
-
};
|
|
1520
|
-
var $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE = {
|
|
1521
|
-
...$e5be200c675c3b3a$export$aca958c65c314e6c,
|
|
1522
|
-
customError: true,
|
|
1523
|
-
valid: false
|
|
1524
|
-
};
|
|
1525
|
-
var $e5be200c675c3b3a$export$dad6ae84456c676a = {
|
|
1526
|
-
isInvalid: false,
|
|
1527
|
-
validationDetails: $e5be200c675c3b3a$export$aca958c65c314e6c,
|
|
1528
|
-
validationErrors: []
|
|
1529
|
-
};
|
|
1530
|
-
var $e5be200c675c3b3a$export$571b5131b7e65c11 = (0, import_react24.createContext)({});
|
|
1531
|
-
var $e5be200c675c3b3a$export$a763b9476acd3eb = "__formValidationState" + Date.now();
|
|
1532
|
-
function $e5be200c675c3b3a$export$fc1a364ae1f3ff10(props) {
|
|
1533
|
-
if (props[$e5be200c675c3b3a$export$a763b9476acd3eb]) {
|
|
1534
|
-
let {
|
|
1535
|
-
realtimeValidation,
|
|
1536
|
-
displayValidation,
|
|
1537
|
-
updateValidation,
|
|
1538
|
-
resetValidation,
|
|
1539
|
-
commitValidation
|
|
1540
|
-
} = props[$e5be200c675c3b3a$export$a763b9476acd3eb];
|
|
1541
|
-
return {
|
|
1542
|
-
realtimeValidation,
|
|
1543
|
-
displayValidation,
|
|
1544
|
-
updateValidation,
|
|
1545
|
-
resetValidation,
|
|
1546
|
-
commitValidation
|
|
1547
|
-
};
|
|
1548
|
-
}
|
|
1549
|
-
return $e5be200c675c3b3a$var$useFormValidationStateImpl(props);
|
|
1550
|
-
}
|
|
1551
|
-
function $e5be200c675c3b3a$var$useFormValidationStateImpl(props) {
|
|
1552
|
-
let {
|
|
1553
|
-
isInvalid,
|
|
1554
|
-
validationState,
|
|
1555
|
-
name,
|
|
1556
|
-
value,
|
|
1557
|
-
builtinValidation,
|
|
1558
|
-
validate,
|
|
1559
|
-
validationBehavior = "aria"
|
|
1560
|
-
} = props;
|
|
1561
|
-
if (validationState)
|
|
1562
|
-
isInvalid || (isInvalid = validationState === "invalid");
|
|
1563
|
-
let controlledError = isInvalid ? {
|
|
1564
|
-
isInvalid: true,
|
|
1565
|
-
validationErrors: [],
|
|
1566
|
-
validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE
|
|
1567
|
-
} : null;
|
|
1568
|
-
let clientError = (0, import_react24.useMemo)(() => $e5be200c675c3b3a$var$getValidationResult($e5be200c675c3b3a$var$runValidate(validate, value)), [validate, value]);
|
|
1569
|
-
if (builtinValidation === null || builtinValidation === void 0 ? void 0 : builtinValidation.validationDetails.valid)
|
|
1570
|
-
builtinValidation = null;
|
|
1571
|
-
let serverErrors = (0, import_react24.useContext)($e5be200c675c3b3a$export$571b5131b7e65c11);
|
|
1572
|
-
let serverErrorMessages = (0, import_react24.useMemo)(() => {
|
|
1573
|
-
if (name)
|
|
1574
|
-
return Array.isArray(name) ? name.flatMap((name2) => $e5be200c675c3b3a$var$asArray(serverErrors[name2])) : $e5be200c675c3b3a$var$asArray(serverErrors[name]);
|
|
1575
|
-
return [];
|
|
1576
|
-
}, [serverErrors, name]);
|
|
1577
|
-
let [lastServerErrors, setLastServerErrors] = (0, import_react24.useState)(serverErrors);
|
|
1578
|
-
let [isServerErrorCleared, setServerErrorCleared] = (0, import_react24.useState)(false);
|
|
1579
|
-
if (serverErrors !== lastServerErrors) {
|
|
1580
|
-
setLastServerErrors(serverErrors);
|
|
1581
|
-
setServerErrorCleared(false);
|
|
1582
|
-
}
|
|
1583
|
-
let serverError = (0, import_react24.useMemo)(() => $e5be200c675c3b3a$var$getValidationResult(isServerErrorCleared ? [] : serverErrorMessages), [isServerErrorCleared, serverErrorMessages]);
|
|
1584
|
-
let nextValidation = (0, import_react24.useRef)($e5be200c675c3b3a$export$dad6ae84456c676a);
|
|
1585
|
-
let [currentValidity, setCurrentValidity] = (0, import_react24.useState)($e5be200c675c3b3a$export$dad6ae84456c676a);
|
|
1586
|
-
let lastError = (0, import_react24.useRef)($e5be200c675c3b3a$export$dad6ae84456c676a);
|
|
1587
|
-
let commitValidation = () => {
|
|
1588
|
-
if (!commitQueued)
|
|
1589
|
-
return;
|
|
1590
|
-
setCommitQueued(false);
|
|
1591
|
-
let error = clientError || builtinValidation || nextValidation.current;
|
|
1592
|
-
if (!$e5be200c675c3b3a$var$isEqualValidation(error, lastError.current)) {
|
|
1593
|
-
lastError.current = error;
|
|
1594
|
-
setCurrentValidity(error);
|
|
1595
|
-
}
|
|
1596
|
-
};
|
|
1597
|
-
let [commitQueued, setCommitQueued] = (0, import_react24.useState)(false);
|
|
1598
|
-
(0, import_react24.useEffect)(commitValidation);
|
|
1599
|
-
let realtimeValidation = controlledError || serverError || clientError || builtinValidation || $e5be200c675c3b3a$export$dad6ae84456c676a;
|
|
1600
|
-
let displayValidation = validationBehavior === "native" ? controlledError || serverError || currentValidity : controlledError || serverError || clientError || builtinValidation || currentValidity;
|
|
1601
|
-
return {
|
|
1602
|
-
realtimeValidation,
|
|
1603
|
-
displayValidation,
|
|
1604
|
-
updateValidation(value2) {
|
|
1605
|
-
if (validationBehavior === "aria" && !$e5be200c675c3b3a$var$isEqualValidation(currentValidity, value2))
|
|
1606
|
-
setCurrentValidity(value2);
|
|
1607
|
-
else
|
|
1608
|
-
nextValidation.current = value2;
|
|
1609
|
-
},
|
|
1610
|
-
resetValidation() {
|
|
1611
|
-
let error = $e5be200c675c3b3a$export$dad6ae84456c676a;
|
|
1612
|
-
if (!$e5be200c675c3b3a$var$isEqualValidation(error, lastError.current)) {
|
|
1613
|
-
lastError.current = error;
|
|
1614
|
-
setCurrentValidity(error);
|
|
1615
|
-
}
|
|
1616
|
-
if (validationBehavior === "native")
|
|
1617
|
-
setCommitQueued(false);
|
|
1618
|
-
setServerErrorCleared(true);
|
|
1619
|
-
},
|
|
1620
|
-
commitValidation() {
|
|
1621
|
-
if (validationBehavior === "native")
|
|
1622
|
-
setCommitQueued(true);
|
|
1623
|
-
setServerErrorCleared(true);
|
|
1624
|
-
}
|
|
1625
|
-
};
|
|
1626
|
-
}
|
|
1627
|
-
function $e5be200c675c3b3a$var$asArray(v) {
|
|
1628
|
-
if (!v)
|
|
1629
|
-
return [];
|
|
1630
|
-
return Array.isArray(v) ? v : [v];
|
|
1631
|
-
}
|
|
1632
|
-
function $e5be200c675c3b3a$var$runValidate(validate, value) {
|
|
1633
|
-
if (typeof validate === "function") {
|
|
1634
|
-
let e = validate(value);
|
|
1635
|
-
if (e && typeof e !== "boolean")
|
|
1636
|
-
return $e5be200c675c3b3a$var$asArray(e);
|
|
1637
|
-
}
|
|
1638
|
-
return [];
|
|
1639
|
-
}
|
|
1640
|
-
function $e5be200c675c3b3a$var$getValidationResult(errors) {
|
|
1641
|
-
return errors.length ? {
|
|
1642
|
-
isInvalid: true,
|
|
1643
|
-
validationErrors: errors,
|
|
1644
|
-
validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE
|
|
1645
|
-
} : null;
|
|
1646
|
-
}
|
|
1647
|
-
function $e5be200c675c3b3a$var$isEqualValidation(a, b) {
|
|
1648
|
-
if (a === b)
|
|
1649
|
-
return true;
|
|
1650
|
-
return a && b && a.isInvalid === b.isInvalid && a.validationErrors.length === b.validationErrors.length && a.validationErrors.every((a2, i) => a2 === b.validationErrors[i]) && Object.entries(a.validationDetails).every(([k, v]) => b.validationDetails[k] === v);
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
|
-
// ../../node_modules/@react-stately/utils/dist/import.mjs
|
|
1654
1499
|
var import_react25 = require("react");
|
|
1655
|
-
|
|
1656
|
-
let [stateValue, setStateValue] = (0, import_react25.useState)(value || defaultValue);
|
|
1657
|
-
let isControlledRef = (0, import_react25.useRef)(value !== void 0);
|
|
1658
|
-
let isControlled = value !== void 0;
|
|
1659
|
-
(0, import_react25.useEffect)(() => {
|
|
1660
|
-
let wasControlled = isControlledRef.current;
|
|
1661
|
-
if (wasControlled !== isControlled)
|
|
1662
|
-
console.warn(`WARN: A component changed from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`);
|
|
1663
|
-
isControlledRef.current = isControlled;
|
|
1664
|
-
}, [isControlled]);
|
|
1665
|
-
let currentValue = isControlled ? value : stateValue;
|
|
1666
|
-
let setValue = (0, import_react25.useCallback)((value2, ...args) => {
|
|
1667
|
-
let onChangeCaller = (value3, ...onChangeArgs) => {
|
|
1668
|
-
if (onChange) {
|
|
1669
|
-
if (!Object.is(currentValue, value3))
|
|
1670
|
-
onChange(value3, ...onChangeArgs);
|
|
1671
|
-
}
|
|
1672
|
-
if (!isControlled)
|
|
1673
|
-
currentValue = value3;
|
|
1674
|
-
};
|
|
1675
|
-
if (typeof value2 === "function") {
|
|
1676
|
-
console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320");
|
|
1677
|
-
let updateFunction = (oldValue, ...functionArgs) => {
|
|
1678
|
-
let interceptedValue = value2(isControlled ? currentValue : oldValue, ...functionArgs);
|
|
1679
|
-
onChangeCaller(interceptedValue, ...args);
|
|
1680
|
-
if (!isControlled)
|
|
1681
|
-
return interceptedValue;
|
|
1682
|
-
return oldValue;
|
|
1683
|
-
};
|
|
1684
|
-
setStateValue(updateFunction);
|
|
1685
|
-
} else {
|
|
1686
|
-
if (!isControlled)
|
|
1687
|
-
setStateValue(value2);
|
|
1688
|
-
onChangeCaller(value2, ...args);
|
|
1689
|
-
}
|
|
1690
|
-
}, [isControlled, currentValue, onChange]);
|
|
1691
|
-
return [currentValue, setValue];
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
// ../../node_modules/@react-stately/radio/dist/import.mjs
|
|
1695
|
-
var import_react26 = require("react");
|
|
1696
|
-
var $a54cdc5c1942b639$var$instance = Math.round(Math.random() * 1e10);
|
|
1697
|
-
var $a54cdc5c1942b639$var$i = 0;
|
|
1698
|
-
function $a54cdc5c1942b639$export$bca9d026f8e704eb(props) {
|
|
1699
|
-
let name = (0, import_react26.useMemo)(() => props.name || `radio-group-${$a54cdc5c1942b639$var$instance}-${++$a54cdc5c1942b639$var$i}`, [props.name]);
|
|
1700
|
-
var _props_defaultValue;
|
|
1701
|
-
let [selectedValue, setSelected] = (0, $458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : null, props.onChange);
|
|
1702
|
-
let [lastFocusedValue, setLastFocusedValue] = (0, import_react26.useState)(null);
|
|
1703
|
-
let validation = (0, $e5be200c675c3b3a$export$fc1a364ae1f3ff10)({
|
|
1704
|
-
...props,
|
|
1705
|
-
value: selectedValue
|
|
1706
|
-
});
|
|
1707
|
-
let setSelectedValue = (value) => {
|
|
1708
|
-
if (!props.isReadOnly && !props.isDisabled) {
|
|
1709
|
-
setSelected(value);
|
|
1710
|
-
validation.commitValidation();
|
|
1711
|
-
}
|
|
1712
|
-
};
|
|
1713
|
-
let isInvalid = validation.displayValidation.isInvalid;
|
|
1714
|
-
return {
|
|
1715
|
-
...validation,
|
|
1716
|
-
name,
|
|
1717
|
-
selectedValue,
|
|
1718
|
-
setSelectedValue,
|
|
1719
|
-
lastFocusedValue,
|
|
1720
|
-
setLastFocusedValue,
|
|
1721
|
-
isDisabled: props.isDisabled || false,
|
|
1722
|
-
isReadOnly: props.isReadOnly || false,
|
|
1723
|
-
isRequired: props.isRequired || false,
|
|
1724
|
-
validationState: props.validationState || (isInvalid ? "invalid" : null),
|
|
1725
|
-
isInvalid
|
|
1726
|
-
};
|
|
1727
|
-
}
|
|
1728
|
-
|
|
1729
|
-
// src/components/SegmentedControl/index.tsx
|
|
1500
|
+
var import_radio = require("@react-stately/radio");
|
|
1730
1501
|
var import_radio2 = require("@react-aria/radio");
|
|
1731
1502
|
var import_styled_components20 = __toESM(require("styled-components"));
|
|
1732
1503
|
|
|
1733
1504
|
// src/components/SegmentedControl/RadioGroupContext.tsx
|
|
1734
|
-
var
|
|
1505
|
+
var import_react24 = require("react");
|
|
1735
1506
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1736
|
-
var RadioContext = (0,
|
|
1507
|
+
var RadioContext = (0, import_react24.createContext)(null);
|
|
1737
1508
|
var RadioProvider = ({
|
|
1738
1509
|
value,
|
|
1739
1510
|
children
|
|
@@ -1741,7 +1512,7 @@ var RadioProvider = ({
|
|
|
1741
1512
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(RadioContext.Provider, { value, children });
|
|
1742
1513
|
};
|
|
1743
1514
|
var useRadioContext = () => {
|
|
1744
|
-
const state = (0,
|
|
1515
|
+
const state = (0, import_react24.useContext)(RadioContext);
|
|
1745
1516
|
if (state === null)
|
|
1746
1517
|
throw new Error("`<RadioProvider>` is not likely mounted.");
|
|
1747
1518
|
return state;
|
|
@@ -1749,19 +1520,19 @@ var useRadioContext = () => {
|
|
|
1749
1520
|
|
|
1750
1521
|
// src/components/SegmentedControl/index.tsx
|
|
1751
1522
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1752
|
-
var SegmentedControl = (0,
|
|
1753
|
-
const ariaRadioGroupProps = (0,
|
|
1523
|
+
var SegmentedControl = (0, import_react25.forwardRef)(function SegmentedControlInner(props, ref) {
|
|
1524
|
+
const ariaRadioGroupProps = (0, import_react25.useMemo)(() => ({
|
|
1754
1525
|
...props,
|
|
1755
1526
|
isDisabled: props.disabled,
|
|
1756
1527
|
isReadOnly: props.readonly,
|
|
1757
1528
|
isRequired: props.required,
|
|
1758
1529
|
"aria-label": props.name
|
|
1759
1530
|
}), [props]);
|
|
1760
|
-
const state =
|
|
1531
|
+
const state = (0, import_radio.useRadioGroupState)(ariaRadioGroupProps);
|
|
1761
1532
|
const {
|
|
1762
1533
|
radioGroupProps
|
|
1763
1534
|
} = (0, import_radio2.useRadioGroup)(ariaRadioGroupProps, state);
|
|
1764
|
-
const segmentedControlItems = (0,
|
|
1535
|
+
const segmentedControlItems = (0, import_react25.useMemo)(() => {
|
|
1765
1536
|
return props.data.map((d) => typeof d === "string" ? {
|
|
1766
1537
|
value: d,
|
|
1767
1538
|
label: d
|
|
@@ -1769,11 +1540,11 @@ var SegmentedControl = (0, import_react28.forwardRef)(function SegmentedControlI
|
|
|
1769
1540
|
}, [props.data]);
|
|
1770
1541
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SegmentedControlRoot, { ref, ...radioGroupProps, className: props.className, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RadioProvider, { value: state, children: segmentedControlItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Segmented, { value: item.value, disabled: item.disabled, children: item.label }, item.value)) }) });
|
|
1771
1542
|
});
|
|
1772
|
-
var SegmentedControl_default = (0,
|
|
1543
|
+
var SegmentedControl_default = (0, import_react25.memo)(SegmentedControl);
|
|
1773
1544
|
var Segmented = (props) => {
|
|
1774
1545
|
const state = useRadioContext();
|
|
1775
|
-
const ref = (0,
|
|
1776
|
-
const ariaRadioProps = (0,
|
|
1546
|
+
const ref = (0, import_react25.useRef)(null);
|
|
1547
|
+
const ariaRadioProps = (0, import_react25.useMemo)(() => ({
|
|
1777
1548
|
value: props.value,
|
|
1778
1549
|
isDisabled: props.disabled,
|
|
1779
1550
|
children: props.children
|
|
@@ -1807,73 +1578,65 @@ var SegmentedLabelInner = import_styled_components20.default.div.withConfig({
|
|
|
1807
1578
|
})(["font-size:14px;line-height:22px;display:flow-root;&::before{display:block;width:0;height:0;content:'';margin-top:-4px;}&::after{display:block;width:0;height:0;content:'';margin-bottom:-4px;}"]);
|
|
1808
1579
|
|
|
1809
1580
|
// src/components/Checkbox/index.tsx
|
|
1810
|
-
var
|
|
1811
|
-
var
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
var
|
|
1815
|
-
var import_styled8 = require("@charcoal-ui/styled");
|
|
1581
|
+
var import_react27 = require("react");
|
|
1582
|
+
var import_utils11 = require("@react-aria/utils");
|
|
1583
|
+
|
|
1584
|
+
// src/components/CheckboxInput/index.tsx
|
|
1585
|
+
var import_react26 = require("react");
|
|
1816
1586
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1817
|
-
var
|
|
1818
|
-
|
|
1587
|
+
var CheckboxInput = (0, import_react26.forwardRef)(function CheckboxInput2({
|
|
1588
|
+
onChange,
|
|
1589
|
+
checked,
|
|
1590
|
+
invalid,
|
|
1819
1591
|
...props
|
|
1820
1592
|
}, ref) {
|
|
1821
|
-
const
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
"
|
|
1828
|
-
|
|
1829
|
-
})
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1593
|
+
const handleChange = (0, import_react26.useCallback)((e) => {
|
|
1594
|
+
const el = e.currentTarget;
|
|
1595
|
+
onChange?.(el.checked);
|
|
1596
|
+
}, [onChange]);
|
|
1597
|
+
const classNames = useClassNames("charcoal-checkbox-input__root", props.className);
|
|
1598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: classNames, children: [
|
|
1599
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("input", { ref, className: "charcoal-checkbox-input__input", type: "checkbox", onChange: handleChange, "aria-invalid": invalid, checked, ...props }),
|
|
1600
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "charcoal-checkbox-input__overlay", "aria-hidden": true, "data-checked": checked, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon_default, { name: "24/Check", unsafeNonGuidelineScale: 2 / 3 }) })
|
|
1601
|
+
] });
|
|
1602
|
+
});
|
|
1603
|
+
var CheckboxInput_default = (0, import_react26.memo)(CheckboxInput);
|
|
1604
|
+
|
|
1605
|
+
// src/components/Checkbox/index.tsx
|
|
1606
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1607
|
+
var Checkbox = (0, import_react27.forwardRef)(function CheckboxInner({
|
|
1608
|
+
disabled,
|
|
1609
|
+
className,
|
|
1610
|
+
id,
|
|
1611
|
+
children,
|
|
1612
|
+
...props
|
|
1613
|
+
}, ref) {
|
|
1614
|
+
const classNames = useClassNames("charcoal-checkbox__label", className);
|
|
1615
|
+
const htmlId = (0, import_utils11.useId)(id);
|
|
1616
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CheckboxInput_default, { ...props, id: htmlId, disabled, ref });
|
|
1617
|
+
if (children === void 0) {
|
|
1618
|
+
return input;
|
|
1619
|
+
}
|
|
1620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { htmlFor: htmlId, "aria-disabled": disabled, className: classNames, children: [
|
|
1621
|
+
input,
|
|
1622
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "charcoal-checkbox__text", children })
|
|
1842
1623
|
] });
|
|
1843
1624
|
});
|
|
1844
|
-
var Checkbox_default = (0,
|
|
1845
|
-
var hiddenCss = (0, import_styled_components21.css)(["visibility:hidden;"]);
|
|
1846
|
-
var InputRoot = import_styled_components21.default.label.withConfig({
|
|
1847
|
-
componentId: "ccl__sc-wrdmwj-0"
|
|
1848
|
-
})(["position:relative;display:flex;cursor:pointer;gap:4px;&:disabled,&[aria-disabled]:not([aria-disabled='false']){cursor:default;opacity:0.32;}"]);
|
|
1849
|
-
var CheckboxRoot = import_styled_components21.default.div.withConfig({
|
|
1850
|
-
componentId: "ccl__sc-wrdmwj-1"
|
|
1851
|
-
})(["position:relative;"]);
|
|
1852
|
-
var CheckboxInput = import_styled_components21.default.input.withConfig({
|
|
1853
|
-
componentId: "ccl__sc-wrdmwj-2"
|
|
1854
|
-
})(["&[type='checkbox']{appearance:none;display:block;cursor:pointer;margin:0;width:20px;height:20px;border-radius:4px;transition:0.2s box-shadow,0.2s background-color;&:disabled{cursor:default;}&:read-only{cursor:default;}&:checked{background-color:var(--charcoal-brand);&:not(:disabled):not([aria-disabled]),&[aria-disabled='false']{&:hover{background-color:var(--charcoal-brand-hover);}&:active{background-color:var(--charcoal-brand-press);}}}&:not(:disabled):not([aria-disabled]),&[aria-disabled='false']{", " &[aria-invalid='true']{box-shadow:0 0 0 4px rgba(255,43,0,0.32);}}&:not(:checked){border-width:2px;border-style:solid;border-color:var(--charcoal-text4);}}"], import_styled8.focusVisibleFocusRingCss);
|
|
1855
|
-
var CheckboxInputOverlay = import_styled_components21.default.div.withConfig({
|
|
1856
|
-
componentId: "ccl__sc-wrdmwj-3"
|
|
1857
|
-
})(["position:absolute;top:-2px;left:-2px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:24px;height:24px;color:var(--charcoal-text5);", ";"], ({
|
|
1858
|
-
checked
|
|
1859
|
-
}) => checked !== true && hiddenCss);
|
|
1860
|
-
var InputLabel = import_styled_components21.default.div.withConfig({
|
|
1861
|
-
componentId: "ccl__sc-wrdmwj-4"
|
|
1862
|
-
})(["color:var(--charcoal-text2);font-size:14px;line-height:20px;"]);
|
|
1625
|
+
var Checkbox_default = (0, import_react27.memo)(Checkbox);
|
|
1863
1626
|
|
|
1864
1627
|
// src/components/TagItem/index.tsx
|
|
1865
|
-
var
|
|
1866
|
-
var
|
|
1867
|
-
var
|
|
1868
|
-
var
|
|
1628
|
+
var import_react28 = require("react");
|
|
1629
|
+
var import_utils12 = require("@react-aria/utils");
|
|
1630
|
+
var import_styled_components21 = __toESM(require("styled-components"));
|
|
1631
|
+
var import_utils13 = require("@charcoal-ui/utils");
|
|
1869
1632
|
var import_button = require("@react-aria/button");
|
|
1870
|
-
var
|
|
1871
|
-
var
|
|
1633
|
+
var import_styled8 = require("@charcoal-ui/styled");
|
|
1634
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1872
1635
|
var sizeMap = {
|
|
1873
1636
|
S: 32,
|
|
1874
1637
|
M: 40
|
|
1875
1638
|
};
|
|
1876
|
-
var TagItem = (0,
|
|
1639
|
+
var TagItem = (0, import_react28.forwardRef)(function TagItemInner({
|
|
1877
1640
|
label,
|
|
1878
1641
|
translatedLabel,
|
|
1879
1642
|
bgColor = "#7ACCB1",
|
|
@@ -1884,8 +1647,8 @@ var TagItem = (0, import_react30.forwardRef)(function TagItemInner({
|
|
|
1884
1647
|
className,
|
|
1885
1648
|
...props
|
|
1886
1649
|
}, _ref) {
|
|
1887
|
-
const ref = (0,
|
|
1888
|
-
const ariaButtonProps = (0,
|
|
1650
|
+
const ref = (0, import_utils12.useObjectRef)(_ref);
|
|
1651
|
+
const ariaButtonProps = (0, import_react28.useMemo)(() => ({
|
|
1889
1652
|
elementType: "a",
|
|
1890
1653
|
isDisabled: disabled,
|
|
1891
1654
|
...props
|
|
@@ -1894,22 +1657,22 @@ var TagItem = (0, import_react30.forwardRef)(function TagItemInner({
|
|
|
1894
1657
|
buttonProps
|
|
1895
1658
|
} = (0, import_button.useButton)(ariaButtonProps, ref);
|
|
1896
1659
|
const hasTranslatedLabel = translatedLabel !== void 0 && translatedLabel.length > 0;
|
|
1897
|
-
return /* @__PURE__ */ (0,
|
|
1898
|
-
/* @__PURE__ */ (0,
|
|
1899
|
-
/* @__PURE__ */ (0,
|
|
1900
|
-
/* @__PURE__ */ (0,
|
|
1901
|
-
hasTranslatedLabel && /* @__PURE__ */ (0,
|
|
1902
|
-
/* @__PURE__ */ (0,
|
|
1660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(TagItemRoot, { ref, size: hasTranslatedLabel ? "M" : size, status, ...buttonProps, className, children: [
|
|
1661
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Background, { bgColor, bgImage, status }),
|
|
1662
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Inner, { children: [
|
|
1663
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(LabelWrapper, { isTranslate: hasTranslatedLabel, children: [
|
|
1664
|
+
hasTranslatedLabel && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TranslatedLabel, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Label3, { children: translatedLabel }) }),
|
|
1665
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Label3, { children: label })
|
|
1903
1666
|
] }),
|
|
1904
|
-
status === "active" && /* @__PURE__ */ (0,
|
|
1667
|
+
status === "active" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: "16/Remove" })
|
|
1905
1668
|
] })
|
|
1906
1669
|
] });
|
|
1907
1670
|
});
|
|
1908
|
-
var TagItem_default = (0,
|
|
1671
|
+
var TagItem_default = (0, import_react28.memo)(TagItem);
|
|
1909
1672
|
var horizontalPadding = ({
|
|
1910
1673
|
left,
|
|
1911
1674
|
right
|
|
1912
|
-
}) => (0,
|
|
1675
|
+
}) => (0, import_styled_components21.css)(["padding-right:", ";padding-left:", ";"], (0, import_utils13.px)(right), (0, import_utils13.px)(left));
|
|
1913
1676
|
var tagItemRootSize = (size) => {
|
|
1914
1677
|
switch (size) {
|
|
1915
1678
|
case "M":
|
|
@@ -1928,7 +1691,7 @@ var activeTagItemRoot = horizontalPadding({
|
|
|
1928
1691
|
left: 16,
|
|
1929
1692
|
right: 8
|
|
1930
1693
|
});
|
|
1931
|
-
var TagItemRoot =
|
|
1694
|
+
var TagItemRoot = import_styled_components21.default.a.withConfig({
|
|
1932
1695
|
componentId: "ccl__sc-11j9pu2-0"
|
|
1933
1696
|
})(["isolation:isolate;position:relative;height:", "px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;cursor:pointer;overflow:hidden;border-radius:4px;", " ", " color:", ";transition:0.2s box-shadow;&:not(:disabled):not([aria-disabled]),&[aria-disabled='false']{", "}&:disabled,&[aria-disabled]:not([aria-disabled='false']){opacity:0.32;cursor:default;}"], ({
|
|
1934
1697
|
size
|
|
@@ -1939,30 +1702,30 @@ var TagItemRoot = import_styled_components22.default.a.withConfig({
|
|
|
1939
1702
|
status
|
|
1940
1703
|
}) => status === "active" && activeTagItemRoot, ({
|
|
1941
1704
|
status
|
|
1942
|
-
}) => status === "inactive" ? "var(--charcoal-text2)" : "var(--charcoal-text5)",
|
|
1943
|
-
var Background =
|
|
1705
|
+
}) => status === "inactive" ? "var(--charcoal-text2)" : "var(--charcoal-text5)", import_styled8.focusVisibleFocusRingCss);
|
|
1706
|
+
var Background = import_styled_components21.default.div.withConfig({
|
|
1944
1707
|
componentId: "ccl__sc-11j9pu2-1"
|
|
1945
1708
|
})(["position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;background-color:", ";", " ", ""], ({
|
|
1946
1709
|
bgColor
|
|
1947
1710
|
}) => bgColor, ({
|
|
1948
1711
|
status
|
|
1949
|
-
}) => status === "inactive" && (0,
|
|
1712
|
+
}) => status === "inactive" && (0, import_styled_components21.css)(["background-color:var(--charcoal-surface3);"]), ({
|
|
1950
1713
|
bgImage
|
|
1951
|
-
}) => bgImage !== void 0 && (0,
|
|
1952
|
-
var Inner =
|
|
1714
|
+
}) => bgImage !== void 0 && (0, import_styled_components21.css)(["background-color:var(--charcoal-surface4);&::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-position:center;background-size:cover;background-image:url(", ");mix-blend-mode:overlay;}"], bgImage));
|
|
1715
|
+
var Inner = import_styled_components21.default.div.withConfig({
|
|
1953
1716
|
componentId: "ccl__sc-11j9pu2-2"
|
|
1954
1717
|
})(["display:inline-flex;gap:8px;align-items:center;z-index:2;"]);
|
|
1955
|
-
var labelCSS = (0,
|
|
1956
|
-
var translateLabelCSS = (0,
|
|
1957
|
-
var LabelWrapper =
|
|
1718
|
+
var labelCSS = (0, import_styled_components21.css)(["font-size:14px;line-height:22px;font-weight:bold;display:flow-root;&::before{display:block;width:0;height:0;content:'';margin-top:-4px;}&::after{display:block;width:0;height:0;content:'';margin-bottom:-4px;}"]);
|
|
1719
|
+
var translateLabelCSS = (0, import_styled_components21.css)(["display:flex;align-items:center;flex-direction:column;font-size:10px;"]);
|
|
1720
|
+
var LabelWrapper = import_styled_components21.default.div.withConfig({
|
|
1958
1721
|
componentId: "ccl__sc-11j9pu2-3"
|
|
1959
1722
|
})(["", ""], ({
|
|
1960
1723
|
isTranslate
|
|
1961
1724
|
}) => isTranslate ?? false ? translateLabelCSS : labelCSS);
|
|
1962
|
-
var Label3 =
|
|
1725
|
+
var Label3 = import_styled_components21.default.span.withConfig({
|
|
1963
1726
|
componentId: "ccl__sc-11j9pu2-4"
|
|
1964
1727
|
})(["max-width:152px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:inherit;color:inherit;line-height:inherit;"]);
|
|
1965
|
-
var TranslatedLabel =
|
|
1728
|
+
var TranslatedLabel = import_styled_components21.default.div.withConfig({
|
|
1966
1729
|
componentId: "ccl__sc-11j9pu2-5"
|
|
1967
1730
|
})(["font-size:12px;line-height:20px;font-weight:bold;display:flow-root;&::before{display:block;width:0;height:0;content:'';margin-top:-4px;}&::after{display:block;width:0;height:0;content:'';margin-bottom:-4px;}"]);
|
|
1968
1731
|
// Annotate the CommonJS export names for ESM import in node:
|