@charcoal-ui/react 3.13.0-beta.0 → 3.13.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/README.md +1 -1
- package/dist/core/SSRProvider.d.ts +3 -1
- package/dist/core/SSRProvider.d.ts.map +1 -1
- package/dist/index.cjs.js +106 -100
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +7 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +8 -8
- package/src/core/SSRProvider.tsx +12 -1
package/dist/index.cjs.js
CHANGED
|
@@ -49,7 +49,7 @@ __export(src_exports, {
|
|
|
49
49
|
OverlayProvider: () => import_overlays.OverlayProvider,
|
|
50
50
|
Radio: () => Radio_default,
|
|
51
51
|
RadioGroup: () => RadioGroup,
|
|
52
|
-
SSRProvider: () =>
|
|
52
|
+
SSRProvider: () => SSRProvider,
|
|
53
53
|
SegmentedControl: () => SegmentedControl_default,
|
|
54
54
|
Switch: () => Switch_default,
|
|
55
55
|
TagItem: () => TagItem_default,
|
|
@@ -89,6 +89,12 @@ function useComponentAbstraction() {
|
|
|
89
89
|
|
|
90
90
|
// src/core/SSRProvider.tsx
|
|
91
91
|
var import_ssr = require("@react-aria/ssr");
|
|
92
|
+
var import_react2 = require("react");
|
|
93
|
+
function isReactVersionOver(minVersion) {
|
|
94
|
+
const reactMajorVersion = parseInt(import_react2.version.split(".")[0], 10);
|
|
95
|
+
return Number.isFinite(reactMajorVersion) ? reactMajorVersion >= minVersion : false;
|
|
96
|
+
}
|
|
97
|
+
var SSRProvider = isReactVersionOver(18) ? import_react2.Fragment : import_ssr.SSRProvider;
|
|
92
98
|
|
|
93
99
|
// src/core/OverlayProvider.tsx
|
|
94
100
|
var import_overlays = require("@react-aria/overlays");
|
|
@@ -105,14 +111,14 @@ function CharcoalProvider({
|
|
|
105
111
|
children,
|
|
106
112
|
background
|
|
107
113
|
}) {
|
|
108
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SSRProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_styled_components.ThemeProvider, { theme: defaultTheme, children: [
|
|
109
115
|
injectTokens && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_styled.TokenInjector, { theme: themeMap, background }),
|
|
110
116
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ComponentAbstraction, { components, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_overlays.OverlayProvider, { children }) })
|
|
111
117
|
] }) });
|
|
112
118
|
}
|
|
113
119
|
|
|
114
120
|
// src/components/Button/index.tsx
|
|
115
|
-
var
|
|
121
|
+
var import_react3 = require("react");
|
|
116
122
|
|
|
117
123
|
// src/_lib/index.ts
|
|
118
124
|
function unreachable(value) {
|
|
@@ -214,7 +220,7 @@ var StyledButton = (0, import_styled_components3.default)(Clickable_default).wit
|
|
|
214
220
|
|
|
215
221
|
// src/components/Button/index.tsx
|
|
216
222
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
217
|
-
var Button = (0,
|
|
223
|
+
var Button = (0, import_react3.forwardRef)(function Button2({
|
|
218
224
|
children,
|
|
219
225
|
variant = "Default",
|
|
220
226
|
size = "M",
|
|
@@ -228,11 +234,11 @@ var Button = (0, import_react2.forwardRef)(function Button2({
|
|
|
228
234
|
var Button_default = Button;
|
|
229
235
|
|
|
230
236
|
// src/components/IconButton/index.tsx
|
|
231
|
-
var
|
|
237
|
+
var import_react4 = require("react");
|
|
232
238
|
var import_styled_components4 = __toESM(require("styled-components"));
|
|
233
239
|
var import_styled3 = require("@charcoal-ui/styled");
|
|
234
240
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
235
|
-
var IconButton = (0,
|
|
241
|
+
var IconButton = (0, import_react4.forwardRef)(function IconButtonInner({
|
|
236
242
|
variant = "Default",
|
|
237
243
|
size = "M",
|
|
238
244
|
icon,
|
|
@@ -318,13 +324,13 @@ function validateIconSize(size, icon) {
|
|
|
318
324
|
}
|
|
319
325
|
|
|
320
326
|
// src/components/Radio/index.tsx
|
|
321
|
-
var
|
|
327
|
+
var import_react5 = require("react");
|
|
322
328
|
var React3 = __toESM(require("react"));
|
|
323
329
|
var import_styled_components5 = __toESM(require("styled-components"));
|
|
324
330
|
var import_warning = __toESM(require("warning"));
|
|
325
331
|
var import_styled4 = require("@charcoal-ui/styled");
|
|
326
332
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
327
|
-
var Radio = (0,
|
|
333
|
+
var Radio = (0, import_react5.forwardRef)(function RadioInner({
|
|
328
334
|
value,
|
|
329
335
|
disabled = false,
|
|
330
336
|
children,
|
|
@@ -337,7 +343,7 @@ var Radio = (0, import_react4.forwardRef)(function RadioInner({
|
|
|
337
343
|
readonly,
|
|
338
344
|
invalid,
|
|
339
345
|
onChange
|
|
340
|
-
} = (0,
|
|
346
|
+
} = (0, import_react5.useContext)(RadioGroupContext);
|
|
341
347
|
(0, import_warning.default)(
|
|
342
348
|
name !== void 0,
|
|
343
349
|
`"name" is not Provided for <Radio>. Perhaps you forgot to wrap with <RadioGroup> ?`
|
|
@@ -345,7 +351,7 @@ var Radio = (0, import_react4.forwardRef)(function RadioInner({
|
|
|
345
351
|
const isSelected = value === selected;
|
|
346
352
|
const isDisabled = disabled || isParentDisabled;
|
|
347
353
|
const isReadonly = readonly && !isSelected;
|
|
348
|
-
const handleChange = (0,
|
|
354
|
+
const handleChange = (0, import_react5.useCallback)((e) => {
|
|
349
355
|
onChange(e.currentTarget.value);
|
|
350
356
|
}, [onChange]);
|
|
351
357
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(RadioRoot, { "aria-disabled": isDisabled || isReadonly, className, children: [
|
|
@@ -353,7 +359,7 @@ var Radio = (0, import_react4.forwardRef)(function RadioInner({
|
|
|
353
359
|
children != null && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RadioLabel, { children })
|
|
354
360
|
] });
|
|
355
361
|
});
|
|
356
|
-
var Radio_default = (0,
|
|
362
|
+
var Radio_default = (0, import_react5.memo)(Radio);
|
|
357
363
|
var RadioRoot = import_styled_components5.default.label.withConfig({
|
|
358
364
|
componentId: "ccl__sc-1hitkzn-0"
|
|
359
365
|
})(["display:grid;grid-template-columns:auto 1fr;grid-gap:4px;align-items:center;cursor:pointer;&[aria-disabled]:not([aria-disabled='false']){opacity:0.32;cursor:default;}"]);
|
|
@@ -389,7 +395,7 @@ function RadioGroup({
|
|
|
389
395
|
invalid,
|
|
390
396
|
children
|
|
391
397
|
}) {
|
|
392
|
-
const handleChange = (0,
|
|
398
|
+
const handleChange = (0, import_react5.useCallback)((next) => {
|
|
393
399
|
onChange(next);
|
|
394
400
|
}, [onChange]);
|
|
395
401
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RadioGroupContext.Provider, { value: {
|
|
@@ -403,14 +409,14 @@ function RadioGroup({
|
|
|
403
409
|
}
|
|
404
410
|
|
|
405
411
|
// src/components/MultiSelect/index.tsx
|
|
406
|
-
var
|
|
412
|
+
var import_react7 = require("react");
|
|
407
413
|
var import_styled_components6 = __toESM(require("styled-components"));
|
|
408
414
|
var import_warning2 = __toESM(require("warning"));
|
|
409
415
|
var import_utils2 = require("@charcoal-ui/utils");
|
|
410
416
|
|
|
411
417
|
// src/components/MultiSelect/context.ts
|
|
412
|
-
var
|
|
413
|
-
var MultiSelectGroupContext = (0,
|
|
418
|
+
var import_react6 = require("react");
|
|
419
|
+
var MultiSelectGroupContext = (0, import_react6.createContext)({
|
|
414
420
|
name: void 0,
|
|
415
421
|
selected: [],
|
|
416
422
|
disabled: false,
|
|
@@ -441,7 +447,7 @@ var Icon_default = Icon;
|
|
|
441
447
|
|
|
442
448
|
// src/components/MultiSelect/index.tsx
|
|
443
449
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
444
|
-
var MultiSelect = (0,
|
|
450
|
+
var MultiSelect = (0, import_react7.forwardRef)(function MultiSelectInner({
|
|
445
451
|
value,
|
|
446
452
|
disabled = false,
|
|
447
453
|
onChange,
|
|
@@ -456,14 +462,14 @@ var MultiSelect = (0, import_react6.forwardRef)(function MultiSelectInner({
|
|
|
456
462
|
readonly,
|
|
457
463
|
invalid,
|
|
458
464
|
onChange: parentOnChange
|
|
459
|
-
} = (0,
|
|
465
|
+
} = (0, import_react7.useContext)(MultiSelectGroupContext);
|
|
460
466
|
(0, import_warning2.default)(
|
|
461
467
|
name !== void 0,
|
|
462
468
|
`"name" is not Provided for <MultiSelect>. Perhaps you forgot to wrap with <MultiSelectGroup> ?`
|
|
463
469
|
);
|
|
464
470
|
const isSelected = selected.includes(value);
|
|
465
471
|
const isDisabled = disabled || parentDisabled || readonly;
|
|
466
|
-
const handleChange = (0,
|
|
472
|
+
const handleChange = (0, import_react7.useCallback)((event) => {
|
|
467
473
|
if (!(event.currentTarget instanceof HTMLInputElement)) {
|
|
468
474
|
return;
|
|
469
475
|
}
|
|
@@ -487,7 +493,7 @@ var MultiSelect = (0, import_react6.forwardRef)(function MultiSelectInner({
|
|
|
487
493
|
Boolean(children) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MultiSelectLabel, { children })
|
|
488
494
|
] });
|
|
489
495
|
});
|
|
490
|
-
var MultiSelect_default = (0,
|
|
496
|
+
var MultiSelect_default = (0, import_react7.memo)(MultiSelect);
|
|
491
497
|
var MultiSelectRoot = import_styled_components6.default.label.withConfig({
|
|
492
498
|
componentId: "ccl__sc-wpr5y9-0"
|
|
493
499
|
})(["display:grid;grid-template-columns:auto 1fr;align-items:center;position:relative;cursor:pointer;gap:", ";&:disabled,&[aria-disabled]:not([aria-disabled='false']){opacity:0.32;cursor:default;}"], ({
|
|
@@ -525,7 +531,7 @@ function MultiSelectGroup({
|
|
|
525
531
|
invalid = false,
|
|
526
532
|
children
|
|
527
533
|
}) {
|
|
528
|
-
const handleChange = (0,
|
|
534
|
+
const handleChange = (0, import_react7.useCallback)((payload) => {
|
|
529
535
|
const index = selected.indexOf(payload.value);
|
|
530
536
|
if (payload.selected) {
|
|
531
537
|
if (index < 0) {
|
|
@@ -549,18 +555,18 @@ function MultiSelectGroup({
|
|
|
549
555
|
|
|
550
556
|
// src/components/Switch/index.tsx
|
|
551
557
|
var import_switch = require("@react-aria/switch");
|
|
552
|
-
var
|
|
558
|
+
var import_react8 = require("react");
|
|
553
559
|
var import_react_stately = require("react-stately");
|
|
554
560
|
var import_styled_components7 = __toESM(require("styled-components"));
|
|
555
561
|
var import_utils3 = require("@react-aria/utils");
|
|
556
562
|
var import_styled6 = require("@charcoal-ui/styled");
|
|
557
563
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
558
|
-
var SwitchCheckbox = (0,
|
|
564
|
+
var SwitchCheckbox = (0, import_react8.forwardRef)(function SwitchCheckboxInner(props, external) {
|
|
559
565
|
const {
|
|
560
566
|
disabled,
|
|
561
567
|
className
|
|
562
568
|
} = props;
|
|
563
|
-
const ariaSwitchProps = (0,
|
|
569
|
+
const ariaSwitchProps = (0, import_react8.useMemo)(() => ({
|
|
564
570
|
...props,
|
|
565
571
|
"aria-label": "children" in props ? void 0 : props.label,
|
|
566
572
|
isDisabled: props.disabled,
|
|
@@ -580,7 +586,7 @@ var SwitchCheckbox = (0, import_react7.forwardRef)(function SwitchCheckboxInner(
|
|
|
580
586
|
"children" in props ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(LabelInner, { children: props.children }) : void 0
|
|
581
587
|
] });
|
|
582
588
|
});
|
|
583
|
-
var Switch_default = (0,
|
|
589
|
+
var Switch_default = (0, import_react8.memo)(SwitchCheckbox);
|
|
584
590
|
var Label = import_styled_components7.default.label.withConfig({
|
|
585
591
|
componentId: "ccl__sc-1wy6z5h-0"
|
|
586
592
|
})(["display:inline-grid;grid-template-columns:auto 1fr;align-items:center;cursor:pointer;outline:0;&:disabled,&[aria-disabled]:not([aria-disabled='false']){opacity:0.32;cursor:default;}"]);
|
|
@@ -596,7 +602,7 @@ var SwitchInput = import_styled_components7.default.input.attrs({
|
|
|
596
602
|
// src/components/TextField/index.tsx
|
|
597
603
|
var import_textfield = require("@react-aria/textfield");
|
|
598
604
|
var import_visually_hidden = require("@react-aria/visually-hidden");
|
|
599
|
-
var
|
|
605
|
+
var import_react10 = require("react");
|
|
600
606
|
var React6 = __toESM(require("react"));
|
|
601
607
|
var import_styled_components9 = __toESM(require("styled-components"));
|
|
602
608
|
|
|
@@ -634,9 +640,9 @@ var FieldLabelWrapper = import_styled_components8.default.div.withConfig({
|
|
|
634
640
|
})(["display:inline-flex;align-items:center;> ", "{margin-left:4px;}> ", "{margin-left:auto;}"], RequiredText, SubLabelClickable);
|
|
635
641
|
|
|
636
642
|
// src/components/TextField/useFocusWithClick.tsx
|
|
637
|
-
var
|
|
643
|
+
var import_react9 = require("react");
|
|
638
644
|
function useFocusWithClick(containerRef, inputRef) {
|
|
639
|
-
(0,
|
|
645
|
+
(0, import_react9.useEffect)(() => {
|
|
640
646
|
const el = containerRef.current;
|
|
641
647
|
if (el) {
|
|
642
648
|
const handleDown = (e) => {
|
|
@@ -679,10 +685,10 @@ var TextField = React6.forwardRef(function SingleLineTextFieldInner({
|
|
|
679
685
|
const {
|
|
680
686
|
visuallyHiddenProps
|
|
681
687
|
} = (0, import_visually_hidden.useVisuallyHidden)();
|
|
682
|
-
const ariaRef = (0,
|
|
683
|
-
const [count, setCount] = (0,
|
|
688
|
+
const ariaRef = (0, import_react10.useRef)(null);
|
|
689
|
+
const [count, setCount] = (0, import_react10.useState)(countCodePointsInString(props.value ?? ""));
|
|
684
690
|
const nonControlled = props.value === void 0;
|
|
685
|
-
const handleChange = (0,
|
|
691
|
+
const handleChange = (0, import_react10.useCallback)((value) => {
|
|
686
692
|
const count2 = countCodePointsInString(value);
|
|
687
693
|
if (maxLength !== void 0 && count2 > maxLength) {
|
|
688
694
|
return;
|
|
@@ -692,7 +698,7 @@ var TextField = React6.forwardRef(function SingleLineTextFieldInner({
|
|
|
692
698
|
}
|
|
693
699
|
onChange?.(value);
|
|
694
700
|
}, [maxLength, nonControlled, onChange]);
|
|
695
|
-
(0,
|
|
701
|
+
(0, import_react10.useEffect)(() => {
|
|
696
702
|
setCount(countCodePointsInString(props.value ?? ""));
|
|
697
703
|
}, [props.value]);
|
|
698
704
|
const {
|
|
@@ -711,7 +717,7 @@ var TextField = React6.forwardRef(function SingleLineTextFieldInner({
|
|
|
711
717
|
onChange: handleChange,
|
|
712
718
|
...props
|
|
713
719
|
}, ariaRef);
|
|
714
|
-
const containerRef = (0,
|
|
720
|
+
const containerRef = (0, import_react10.useRef)(null);
|
|
715
721
|
useFocusWithClick(containerRef, ariaRef);
|
|
716
722
|
const inputProps = (0, import_utils4.mergeProps)(restProps, ariaInputProps);
|
|
717
723
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(TextFieldRoot, { className, isDisabled: disabled, children: [
|
|
@@ -758,11 +764,11 @@ var AssistiveText = import_styled_components9.default.p.withConfig({
|
|
|
758
764
|
// src/components/TextArea/index.tsx
|
|
759
765
|
var import_textfield2 = require("@react-aria/textfield");
|
|
760
766
|
var import_visually_hidden2 = require("@react-aria/visually-hidden");
|
|
761
|
-
var
|
|
767
|
+
var import_react11 = require("react");
|
|
762
768
|
var import_styled_components10 = __toESM(require("styled-components"));
|
|
763
769
|
var import_utils5 = require("@react-aria/utils");
|
|
764
770
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
765
|
-
var TextArea = (0,
|
|
771
|
+
var TextArea = (0, import_react11.forwardRef)(function TextAreaInner({
|
|
766
772
|
onChange,
|
|
767
773
|
...props
|
|
768
774
|
}, forwardRef18) {
|
|
@@ -786,17 +792,17 @@ var TextArea = (0, import_react10.forwardRef)(function TextAreaInner({
|
|
|
786
792
|
const {
|
|
787
793
|
visuallyHiddenProps
|
|
788
794
|
} = (0, import_visually_hidden2.useVisuallyHidden)();
|
|
789
|
-
const textareaRef = (0,
|
|
790
|
-
const ariaRef = (0,
|
|
791
|
-
const [count, setCount] = (0,
|
|
792
|
-
const [rows, setRows] = (0,
|
|
793
|
-
const syncHeight = (0,
|
|
795
|
+
const textareaRef = (0, import_react11.useRef)(null);
|
|
796
|
+
const ariaRef = (0, import_react11.useRef)(null);
|
|
797
|
+
const [count, setCount] = (0, import_react11.useState)(countCodePointsInString(props.value ?? ""));
|
|
798
|
+
const [rows, setRows] = (0, import_react11.useState)(initialRows);
|
|
799
|
+
const syncHeight = (0, import_react11.useCallback)((textarea) => {
|
|
794
800
|
const rows2 = (`${textarea.value}
|
|
795
801
|
`.match(/\n/gu)?.length ?? 0) || 1;
|
|
796
802
|
setRows(initialRows <= rows2 ? rows2 : initialRows);
|
|
797
803
|
}, [initialRows]);
|
|
798
804
|
const nonControlled = props.value === void 0;
|
|
799
|
-
const handleChange = (0,
|
|
805
|
+
const handleChange = (0, import_react11.useCallback)((value) => {
|
|
800
806
|
const count2 = countCodePointsInString(value);
|
|
801
807
|
if (maxLength !== void 0 && count2 > maxLength) {
|
|
802
808
|
return;
|
|
@@ -809,7 +815,7 @@ var TextArea = (0, import_react10.forwardRef)(function TextAreaInner({
|
|
|
809
815
|
}
|
|
810
816
|
onChange?.(value);
|
|
811
817
|
}, [autoHeight, maxLength, nonControlled, onChange, syncHeight]);
|
|
812
|
-
(0,
|
|
818
|
+
(0, import_react11.useEffect)(() => {
|
|
813
819
|
setCount(countCodePointsInString(props.value ?? ""));
|
|
814
820
|
}, [props.value]);
|
|
815
821
|
const {
|
|
@@ -828,12 +834,12 @@ var TextArea = (0, import_react10.forwardRef)(function TextAreaInner({
|
|
|
828
834
|
onChange: handleChange,
|
|
829
835
|
...props
|
|
830
836
|
}, ariaRef);
|
|
831
|
-
(0,
|
|
837
|
+
(0, import_react11.useEffect)(() => {
|
|
832
838
|
if (autoHeight && textareaRef.current !== null) {
|
|
833
839
|
syncHeight(textareaRef.current);
|
|
834
840
|
}
|
|
835
841
|
}, [autoHeight, syncHeight]);
|
|
836
|
-
const containerRef = (0,
|
|
842
|
+
const containerRef = (0, import_react11.useRef)(null);
|
|
837
843
|
useFocusWithClick(containerRef, ariaRef);
|
|
838
844
|
const inputProps = (0, import_utils5.mergeProps)(restProps, ariaInputProps);
|
|
839
845
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(TextFieldRoot2, { className, isDisabled: disabled, children: [
|
|
@@ -867,7 +873,7 @@ var MultiLineCounter = import_styled_components10.default.span.withConfig({
|
|
|
867
873
|
})(["position:absolute;bottom:9px;right:8px;line-height:22px;font-size:14px;color:var(--charcoal-text3);"]);
|
|
868
874
|
|
|
869
875
|
// src/components/Modal/index.tsx
|
|
870
|
-
var
|
|
876
|
+
var import_react14 = require("react");
|
|
871
877
|
var React10 = __toESM(require("react"));
|
|
872
878
|
var import_overlays3 = require("@react-aria/overlays");
|
|
873
879
|
var import_styled_components12 = __toESM(require("styled-components"));
|
|
@@ -877,7 +883,7 @@ var import_react_spring2 = require("react-spring");
|
|
|
877
883
|
var import_utils8 = require("@react-aria/utils");
|
|
878
884
|
|
|
879
885
|
// src/components/Modal/Dialog/index.tsx
|
|
880
|
-
var
|
|
886
|
+
var import_react12 = require("react");
|
|
881
887
|
var import_styled_components11 = __toESM(require("styled-components"));
|
|
882
888
|
var import_dialog = require("@react-aria/dialog");
|
|
883
889
|
var import_foundation = require("@charcoal-ui/foundation");
|
|
@@ -902,7 +908,7 @@ function useForwardedRef(ref) {
|
|
|
902
908
|
|
|
903
909
|
// src/components/Modal/Dialog/index.tsx
|
|
904
910
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
905
|
-
var Dialog = (0,
|
|
911
|
+
var Dialog = (0, import_react12.forwardRef)(function Dialog2(props, forwardRef18) {
|
|
906
912
|
const ref = useForwardedRef(forwardRef18);
|
|
907
913
|
const {
|
|
908
914
|
dialogProps
|
|
@@ -941,9 +947,9 @@ var React9 = __toESM(require("react"));
|
|
|
941
947
|
var import_overlays2 = require("@react-aria/overlays");
|
|
942
948
|
|
|
943
949
|
// src/components/DropdownSelector/Popover/usePreventScroll.tsx
|
|
944
|
-
var
|
|
950
|
+
var import_react13 = require("react");
|
|
945
951
|
function usePreventScroll(element, isOpen) {
|
|
946
|
-
(0,
|
|
952
|
+
(0, import_react13.useEffect)(() => {
|
|
947
953
|
if (isOpen && element) {
|
|
948
954
|
const defaultPaddingRight = element.style.paddingRight;
|
|
949
955
|
const defaultOverflow = element.style.overflow;
|
|
@@ -984,7 +990,7 @@ function useCharcoalModalOverlay(props, state, ref) {
|
|
|
984
990
|
// src/components/Modal/index.tsx
|
|
985
991
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
986
992
|
var DEFAULT_Z_INDEX = 10;
|
|
987
|
-
var Modal = (0,
|
|
993
|
+
var Modal = (0, import_react14.forwardRef)(function ModalInner({
|
|
988
994
|
children,
|
|
989
995
|
zIndex = DEFAULT_Z_INDEX,
|
|
990
996
|
portalContainer,
|
|
@@ -1066,7 +1072,7 @@ var Modal = (0, import_react13.forwardRef)(function ModalInner({
|
|
|
1066
1072
|
isDismissable === true && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ModalCloseButton, { size: "S", icon: "24/Close", type: "button", "aria-label": closeButtonAriaLabel, onClick: onClose })
|
|
1067
1073
|
] }) }) }) }) }));
|
|
1068
1074
|
});
|
|
1069
|
-
var Modal_default = (0,
|
|
1075
|
+
var Modal_default = (0, import_react14.memo)(Modal);
|
|
1070
1076
|
var ModalContext = React10.createContext({
|
|
1071
1077
|
titleProps: {},
|
|
1072
1078
|
title: "",
|
|
@@ -1088,7 +1094,7 @@ function ModalTitle(props) {
|
|
|
1088
1094
|
const {
|
|
1089
1095
|
titleProps,
|
|
1090
1096
|
title
|
|
1091
|
-
} = (0,
|
|
1097
|
+
} = (0, import_react14.useContext)(ModalContext);
|
|
1092
1098
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ModalHeading, { ...titleProps, ...props, children: title });
|
|
1093
1099
|
}
|
|
1094
1100
|
var ModalHeading = import_styled_components12.default.h3.withConfig({
|
|
@@ -1097,11 +1103,11 @@ var ModalHeading = import_styled_components12.default.h3.withConfig({
|
|
|
1097
1103
|
|
|
1098
1104
|
// src/components/Modal/ModalPlumbing.tsx
|
|
1099
1105
|
var import_styled_components13 = __toESM(require("styled-components"));
|
|
1100
|
-
var
|
|
1106
|
+
var import_react15 = require("react");
|
|
1101
1107
|
var import_utils9 = require("@charcoal-ui/utils");
|
|
1102
1108
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1103
1109
|
function ModalHeader() {
|
|
1104
|
-
const modalCtx = (0,
|
|
1110
|
+
const modalCtx = (0, import_react15.useContext)(ModalContext);
|
|
1105
1111
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ModalHeaderRoot, { $bottomSheet: modalCtx.bottomSheet, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(StyledModalTitle, {}) });
|
|
1106
1112
|
}
|
|
1107
1113
|
var ModalHeaderRoot = import_styled_components13.default.div.withConfig({
|
|
@@ -1123,10 +1129,10 @@ var ModalButtons = import_styled_components13.default.div.withConfig({
|
|
|
1123
1129
|
})(["display:grid;grid-auto-flow:row;grid-row-gap:8px;padding-top:16px;padding-left:16px;padding-right:16px;"]);
|
|
1124
1130
|
|
|
1125
1131
|
// src/components/LoadingSpinner/index.tsx
|
|
1126
|
-
var
|
|
1132
|
+
var import_react16 = require("react");
|
|
1127
1133
|
var import_styled_components14 = __toESM(require("styled-components"));
|
|
1128
1134
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1129
|
-
var LoadingSpinner = (0,
|
|
1135
|
+
var LoadingSpinner = (0, import_react16.forwardRef)(function LoadingSpinnerInner({
|
|
1130
1136
|
size = 48,
|
|
1131
1137
|
padding = 16,
|
|
1132
1138
|
transparent = false,
|
|
@@ -1134,7 +1140,7 @@ var LoadingSpinner = (0, import_react15.forwardRef)(function LoadingSpinnerInner
|
|
|
1134
1140
|
}, ref) {
|
|
1135
1141
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(LoadingSpinnerRoot, { size, padding, transparent, className, ref, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(LoadingSpinnerIcon, {}) });
|
|
1136
1142
|
});
|
|
1137
|
-
var LoadingSpinner_default = (0,
|
|
1143
|
+
var LoadingSpinner_default = (0, import_react16.memo)(LoadingSpinner);
|
|
1138
1144
|
var LoadingSpinnerRoot = import_styled_components14.default.div.attrs({
|
|
1139
1145
|
role: "progressbar"
|
|
1140
1146
|
}).withConfig({
|
|
@@ -1148,11 +1154,11 @@ var Icon2 = import_styled_components14.default.div.attrs({
|
|
|
1148
1154
|
}).withConfig({
|
|
1149
1155
|
componentId: "ccl__sc-1id6yz4-1"
|
|
1150
1156
|
})(["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");
|
|
1151
|
-
var LoadingSpinnerIcon = (0,
|
|
1157
|
+
var LoadingSpinnerIcon = (0, import_react16.forwardRef)(function LoadingSpinnerIcon2({
|
|
1152
1158
|
once = false
|
|
1153
1159
|
}, ref) {
|
|
1154
|
-
const iconRef = (0,
|
|
1155
|
-
(0,
|
|
1160
|
+
const iconRef = (0, import_react16.useRef)(null);
|
|
1161
|
+
(0, import_react16.useImperativeHandle)(ref, () => ({
|
|
1156
1162
|
restart: () => {
|
|
1157
1163
|
if (!iconRef.current) {
|
|
1158
1164
|
return;
|
|
@@ -1166,21 +1172,21 @@ var LoadingSpinnerIcon = (0, import_react15.forwardRef)(function LoadingSpinnerI
|
|
|
1166
1172
|
});
|
|
1167
1173
|
|
|
1168
1174
|
// src/components/DropdownSelector/index.tsx
|
|
1169
|
-
var
|
|
1175
|
+
var import_react21 = require("react");
|
|
1170
1176
|
var import_styled_components17 = __toESM(require("styled-components"));
|
|
1171
1177
|
var import_utils10 = require("@charcoal-ui/utils");
|
|
1172
1178
|
|
|
1173
1179
|
// src/components/DropdownSelector/DropdownPopover.tsx
|
|
1174
|
-
var
|
|
1180
|
+
var import_react18 = require("react");
|
|
1175
1181
|
|
|
1176
1182
|
// src/components/DropdownSelector/Popover/index.tsx
|
|
1177
|
-
var
|
|
1183
|
+
var import_react17 = require("react");
|
|
1178
1184
|
var import_overlays4 = require("@react-aria/overlays");
|
|
1179
1185
|
var import_styled_components15 = __toESM(require("styled-components"));
|
|
1180
1186
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1181
1187
|
var _empty = () => null;
|
|
1182
1188
|
function Popover(props) {
|
|
1183
|
-
const defaultPopoverRef = (0,
|
|
1189
|
+
const defaultPopoverRef = (0, import_react17.useRef)(null);
|
|
1184
1190
|
const finalPopoverRef = props.popoverRef === void 0 ? defaultPopoverRef : props.popoverRef;
|
|
1185
1191
|
const {
|
|
1186
1192
|
popoverProps,
|
|
@@ -1196,7 +1202,7 @@ function Popover(props) {
|
|
|
1196
1202
|
setOpen: _empty,
|
|
1197
1203
|
toggle: _empty
|
|
1198
1204
|
});
|
|
1199
|
-
const modalBackground = (0,
|
|
1205
|
+
const modalBackground = (0, import_react17.useContext)(ModalBackgroundContext);
|
|
1200
1206
|
usePreventScroll(modalBackground, props.isOpen);
|
|
1201
1207
|
if (!props.isOpen)
|
|
1202
1208
|
return null;
|
|
@@ -1223,13 +1229,13 @@ function DropdownPopover({
|
|
|
1223
1229
|
children,
|
|
1224
1230
|
...props
|
|
1225
1231
|
}) {
|
|
1226
|
-
const ref = (0,
|
|
1227
|
-
(0,
|
|
1232
|
+
const ref = (0, import_react18.useRef)(null);
|
|
1233
|
+
(0, import_react18.useEffect)(() => {
|
|
1228
1234
|
if (props.isOpen && ref.current && props.triggerRef.current) {
|
|
1229
1235
|
ref.current.style.width = `${props.triggerRef.current.clientWidth}px`;
|
|
1230
1236
|
}
|
|
1231
1237
|
}, [props.triggerRef, props.isOpen]);
|
|
1232
|
-
(0,
|
|
1238
|
+
(0, import_react18.useEffect)(() => {
|
|
1233
1239
|
if (props.isOpen && props.value !== void 0) {
|
|
1234
1240
|
const windowScrollY = window.scrollY;
|
|
1235
1241
|
const windowScrollX = window.scrollX;
|
|
@@ -1266,12 +1272,12 @@ function findPreviewRecursive(children, value) {
|
|
|
1266
1272
|
}
|
|
1267
1273
|
|
|
1268
1274
|
// src/components/DropdownSelector/MenuList/index.tsx
|
|
1269
|
-
var
|
|
1275
|
+
var import_react20 = require("react");
|
|
1270
1276
|
var import_styled_components16 = __toESM(require("styled-components"));
|
|
1271
1277
|
|
|
1272
1278
|
// src/components/DropdownSelector/MenuList/MenuListContext.ts
|
|
1273
|
-
var
|
|
1274
|
-
var MenuListContext = (0,
|
|
1279
|
+
var import_react19 = require("react");
|
|
1280
|
+
var MenuListContext = (0, import_react19.createContext)({
|
|
1275
1281
|
root: void 0,
|
|
1276
1282
|
value: "",
|
|
1277
1283
|
propsArray: [],
|
|
@@ -1305,8 +1311,8 @@ function getValuesRecursive(children) {
|
|
|
1305
1311
|
// src/components/DropdownSelector/MenuList/index.tsx
|
|
1306
1312
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1307
1313
|
function MenuList(props) {
|
|
1308
|
-
const root = (0,
|
|
1309
|
-
const propsArray = (0,
|
|
1314
|
+
const root = (0, import_react20.useRef)(null);
|
|
1315
|
+
const propsArray = (0, import_react20.useMemo)(() => getValuesRecursive(props.children), [props.children]);
|
|
1310
1316
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StyledUl, { ref: root, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MenuListContext.Provider, { value: {
|
|
1311
1317
|
value: props.value ?? "",
|
|
1312
1318
|
root,
|
|
@@ -1329,15 +1335,15 @@ function DropdownSelector({
|
|
|
1329
1335
|
onChange,
|
|
1330
1336
|
...props
|
|
1331
1337
|
}) {
|
|
1332
|
-
const triggerRef = (0,
|
|
1333
|
-
const [isOpen, setIsOpen] = (0,
|
|
1338
|
+
const triggerRef = (0, import_react21.useRef)(null);
|
|
1339
|
+
const [isOpen, setIsOpen] = (0, import_react21.useState)(false);
|
|
1334
1340
|
const preview = findPreviewRecursive(props.children, props.value);
|
|
1335
|
-
const isPlaceholder = (0,
|
|
1341
|
+
const isPlaceholder = (0, import_react21.useMemo)(() => props.placeholder !== void 0 && preview === void 0, [preview, props.placeholder]);
|
|
1336
1342
|
const propsArray = getValuesRecursive(props.children);
|
|
1337
1343
|
const {
|
|
1338
1344
|
visuallyHiddenProps
|
|
1339
1345
|
} = (0, import_visually_hidden3.useVisuallyHidden)();
|
|
1340
|
-
const handleChange = (0,
|
|
1346
|
+
const handleChange = (0, import_react21.useCallback)((e) => {
|
|
1341
1347
|
onChange(e.target.value);
|
|
1342
1348
|
}, [onChange]);
|
|
1343
1349
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(DropdownSelectorRoot, { "aria-disabled": props.disabled, children: [
|
|
@@ -1406,7 +1412,7 @@ var ItemDiv = import_styled_components18.default.div.withConfig({
|
|
|
1406
1412
|
})(["display:flex;align-items:center;min-height:40px;cursor:pointer;outline:none;padding-right:16px;padding-left:16px;transition:background-color 0.2s;&:disabled,&[aria-disabled]:not([aria-disabled='false']){opacity:0.32;cursor:default;}:hover,:focus,:focus-within{&:not(disabled):not([aria-disabled='true']){background-color:var(--charcoal-surface3);}}"]);
|
|
1407
1413
|
|
|
1408
1414
|
// src/components/DropdownSelector/MenuItem/internals/useMenuItemHandleKeyDown.tsx
|
|
1409
|
-
var
|
|
1415
|
+
var import_react22 = require("react");
|
|
1410
1416
|
|
|
1411
1417
|
// src/components/DropdownSelector/MenuItem/internals/handleFocusByKeyBoard.tsx
|
|
1412
1418
|
function handleFocusByKeyBoard(element, parent) {
|
|
@@ -1443,12 +1449,12 @@ function useMenuItemHandleKeyDown(value) {
|
|
|
1443
1449
|
setValue,
|
|
1444
1450
|
root,
|
|
1445
1451
|
propsArray
|
|
1446
|
-
} = (0,
|
|
1447
|
-
const setContextValue = (0,
|
|
1452
|
+
} = (0, import_react22.useContext)(MenuListContext);
|
|
1453
|
+
const setContextValue = (0, import_react22.useCallback)(() => {
|
|
1448
1454
|
if (value !== void 0)
|
|
1449
1455
|
setValue(value);
|
|
1450
1456
|
}, [value, setValue]);
|
|
1451
|
-
const handleKeyDown = (0,
|
|
1457
|
+
const handleKeyDown = (0, import_react22.useCallback)((e) => {
|
|
1452
1458
|
if (e.key === "Enter") {
|
|
1453
1459
|
setContextValue();
|
|
1454
1460
|
} else if (e.key === "ArrowUp" || e.key === "ArrowDown") {
|
|
@@ -1495,12 +1501,12 @@ function MenuItem(props) {
|
|
|
1495
1501
|
}
|
|
1496
1502
|
|
|
1497
1503
|
// src/components/DropdownSelector/DropdownMenuItem.tsx
|
|
1498
|
-
var
|
|
1504
|
+
var import_react23 = require("react");
|
|
1499
1505
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1500
1506
|
function DropdownMenuItem(props) {
|
|
1501
1507
|
const {
|
|
1502
1508
|
value: ctxValue
|
|
1503
|
-
} = (0,
|
|
1509
|
+
} = (0, import_react23.useContext)(MenuListContext);
|
|
1504
1510
|
const isSelected = props.value === ctxValue;
|
|
1505
1511
|
const {
|
|
1506
1512
|
children,
|
|
@@ -1540,15 +1546,15 @@ var StyledLi2 = import_styled_components20.default.li.withConfig({
|
|
|
1540
1546
|
})(["display:block;"]);
|
|
1541
1547
|
|
|
1542
1548
|
// src/components/SegmentedControl/index.tsx
|
|
1543
|
-
var
|
|
1549
|
+
var import_react25 = require("react");
|
|
1544
1550
|
var import_radio = require("@react-stately/radio");
|
|
1545
1551
|
var import_radio2 = require("@react-aria/radio");
|
|
1546
1552
|
var import_styled_components21 = __toESM(require("styled-components"));
|
|
1547
1553
|
|
|
1548
1554
|
// src/components/SegmentedControl/RadioGroupContext.tsx
|
|
1549
|
-
var
|
|
1555
|
+
var import_react24 = require("react");
|
|
1550
1556
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1551
|
-
var RadioContext = (0,
|
|
1557
|
+
var RadioContext = (0, import_react24.createContext)(null);
|
|
1552
1558
|
var RadioProvider = ({
|
|
1553
1559
|
value,
|
|
1554
1560
|
children
|
|
@@ -1556,7 +1562,7 @@ var RadioProvider = ({
|
|
|
1556
1562
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(RadioContext.Provider, { value, children });
|
|
1557
1563
|
};
|
|
1558
1564
|
var useRadioContext = () => {
|
|
1559
|
-
const state = (0,
|
|
1565
|
+
const state = (0, import_react24.useContext)(RadioContext);
|
|
1560
1566
|
if (state === null)
|
|
1561
1567
|
throw new Error("`<RadioProvider>` is not likely mounted.");
|
|
1562
1568
|
return state;
|
|
@@ -1564,8 +1570,8 @@ var useRadioContext = () => {
|
|
|
1564
1570
|
|
|
1565
1571
|
// src/components/SegmentedControl/index.tsx
|
|
1566
1572
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1567
|
-
var SegmentedControl = (0,
|
|
1568
|
-
const ariaRadioGroupProps = (0,
|
|
1573
|
+
var SegmentedControl = (0, import_react25.forwardRef)(function SegmentedControlInner(props, ref) {
|
|
1574
|
+
const ariaRadioGroupProps = (0, import_react25.useMemo)(() => ({
|
|
1569
1575
|
...props,
|
|
1570
1576
|
isDisabled: props.disabled,
|
|
1571
1577
|
isReadOnly: props.readonly,
|
|
@@ -1576,7 +1582,7 @@ var SegmentedControl = (0, import_react24.forwardRef)(function SegmentedControlI
|
|
|
1576
1582
|
const {
|
|
1577
1583
|
radioGroupProps
|
|
1578
1584
|
} = (0, import_radio2.useRadioGroup)(ariaRadioGroupProps, state);
|
|
1579
|
-
const segmentedControlItems = (0,
|
|
1585
|
+
const segmentedControlItems = (0, import_react25.useMemo)(() => {
|
|
1580
1586
|
return props.data.map((d) => typeof d === "string" ? {
|
|
1581
1587
|
value: d,
|
|
1582
1588
|
label: d
|
|
@@ -1584,11 +1590,11 @@ var SegmentedControl = (0, import_react24.forwardRef)(function SegmentedControlI
|
|
|
1584
1590
|
}, [props.data]);
|
|
1585
1591
|
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)) }) });
|
|
1586
1592
|
});
|
|
1587
|
-
var SegmentedControl_default = (0,
|
|
1593
|
+
var SegmentedControl_default = (0, import_react25.memo)(SegmentedControl);
|
|
1588
1594
|
var Segmented = (props) => {
|
|
1589
1595
|
const state = useRadioContext();
|
|
1590
|
-
const ref = (0,
|
|
1591
|
-
const ariaRadioProps = (0,
|
|
1596
|
+
const ref = (0, import_react25.useRef)(null);
|
|
1597
|
+
const ariaRadioProps = (0, import_react25.useMemo)(() => ({
|
|
1592
1598
|
value: props.value,
|
|
1593
1599
|
isDisabled: props.disabled,
|
|
1594
1600
|
children: props.children
|
|
@@ -1622,18 +1628,18 @@ var SegmentedLabelInner = import_styled_components21.default.div.withConfig({
|
|
|
1622
1628
|
})(["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;}"]);
|
|
1623
1629
|
|
|
1624
1630
|
// src/components/Checkbox/index.tsx
|
|
1625
|
-
var
|
|
1631
|
+
var import_react26 = require("react");
|
|
1626
1632
|
var import_styled_components22 = __toESM(require("styled-components"));
|
|
1627
1633
|
var import_checkbox = require("@react-aria/checkbox");
|
|
1628
1634
|
var import_utils11 = require("@react-aria/utils");
|
|
1629
1635
|
var import_react_stately2 = require("react-stately");
|
|
1630
1636
|
var import_styled9 = require("@charcoal-ui/styled");
|
|
1631
1637
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1632
|
-
var Checkbox = (0,
|
|
1638
|
+
var Checkbox = (0, import_react26.forwardRef)(function CheckboxInner({
|
|
1633
1639
|
invalid = false,
|
|
1634
1640
|
...props
|
|
1635
1641
|
}, ref) {
|
|
1636
|
-
const ariaCheckboxProps = (0,
|
|
1642
|
+
const ariaCheckboxProps = (0, import_react26.useMemo)(() => ({
|
|
1637
1643
|
...props,
|
|
1638
1644
|
isInValid: invalid,
|
|
1639
1645
|
isSelected: props.checked,
|
|
@@ -1657,7 +1663,7 @@ var Checkbox = (0, import_react25.forwardRef)(function CheckboxInner({
|
|
|
1657
1663
|
"children" in props && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(InputLabel, { children: props.children })
|
|
1658
1664
|
] });
|
|
1659
1665
|
});
|
|
1660
|
-
var Checkbox_default = (0,
|
|
1666
|
+
var Checkbox_default = (0, import_react26.memo)(Checkbox);
|
|
1661
1667
|
var hiddenCss = (0, import_styled_components22.css)(["visibility:hidden;"]);
|
|
1662
1668
|
var InputRoot = import_styled_components22.default.label.withConfig({
|
|
1663
1669
|
componentId: "ccl__sc-wrdmwj-0"
|
|
@@ -1678,7 +1684,7 @@ var InputLabel = import_styled_components22.default.div.withConfig({
|
|
|
1678
1684
|
})(["color:var(--charcoal-text2);font-size:14px;line-height:20px;"]);
|
|
1679
1685
|
|
|
1680
1686
|
// src/components/TagItem/index.tsx
|
|
1681
|
-
var
|
|
1687
|
+
var import_react27 = require("react");
|
|
1682
1688
|
var import_utils12 = require("@react-aria/utils");
|
|
1683
1689
|
var import_styled_components23 = __toESM(require("styled-components"));
|
|
1684
1690
|
var import_utils13 = require("@charcoal-ui/utils");
|
|
@@ -1689,7 +1695,7 @@ var sizeMap = {
|
|
|
1689
1695
|
S: 32,
|
|
1690
1696
|
M: 40
|
|
1691
1697
|
};
|
|
1692
|
-
var TagItem = (0,
|
|
1698
|
+
var TagItem = (0, import_react27.forwardRef)(function TagItemInner({
|
|
1693
1699
|
label,
|
|
1694
1700
|
translatedLabel,
|
|
1695
1701
|
bgColor = "#7ACCB1",
|
|
@@ -1701,7 +1707,7 @@ var TagItem = (0, import_react26.forwardRef)(function TagItemInner({
|
|
|
1701
1707
|
...props
|
|
1702
1708
|
}, _ref) {
|
|
1703
1709
|
const ref = (0, import_utils12.useObjectRef)(_ref);
|
|
1704
|
-
const ariaButtonProps = (0,
|
|
1710
|
+
const ariaButtonProps = (0, import_react27.useMemo)(() => ({
|
|
1705
1711
|
elementType: "a",
|
|
1706
1712
|
isDisabled: disabled,
|
|
1707
1713
|
...props
|
|
@@ -1721,7 +1727,7 @@ var TagItem = (0, import_react26.forwardRef)(function TagItemInner({
|
|
|
1721
1727
|
] })
|
|
1722
1728
|
] });
|
|
1723
1729
|
});
|
|
1724
|
-
var TagItem_default = (0,
|
|
1730
|
+
var TagItem_default = (0, import_react27.memo)(TagItem);
|
|
1725
1731
|
var horizontalPadding = ({
|
|
1726
1732
|
left,
|
|
1727
1733
|
right
|