@livechat/design-system-react-components 1.0.0-alpha.23 → 1.0.0-alpha.25
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/dsrc.cjs.js +4 -4
- package/dist/dsrc.es.js +117 -111
- package/dist/dsrc.umd.js +4 -4
- package/dist/src/components/Modal/ModalBase.d.ts +1 -0
- package/dist/src/components/Popover/Popover.d.ts +2 -1
- package/dist/src/components/Search/Search.d.ts +1 -0
- package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +18 -0
- package/dist/src/components/SegmentedControl/index.d.ts +1 -0
- package/dist/src/components/Switch/Switch.d.ts +1 -0
- package/dist/src/components/TagInput/TagInput.d.ts +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +0 -11
- package/dist/src/components/ButtonGroup/index.d.ts +0 -1
package/dist/dsrc.es.js
CHANGED
|
@@ -686,62 +686,58 @@ const Button = (_g) => {
|
|
|
686
686
|
className: styles$t[`${baseClass$D}__content`]
|
|
687
687
|
}, children));
|
|
688
688
|
};
|
|
689
|
-
const btn = "lc-
|
|
689
|
+
const btn = "lc-SegmentedControl-module__btn___tfsvL";
|
|
690
690
|
var styles$s = {
|
|
691
|
-
"
|
|
691
|
+
"segmented-control": "lc-SegmentedControl-module__segmented-control___LHWSk",
|
|
692
692
|
btn,
|
|
693
|
-
"btn--active": "lc-
|
|
694
|
-
"btn--compact": "lc-
|
|
695
|
-
"btn--medium": "lc-
|
|
696
|
-
"btn--large": "lc-
|
|
693
|
+
"btn--active": "lc-SegmentedControl-module__btn--active___Za-th",
|
|
694
|
+
"btn--compact": "lc-SegmentedControl-module__btn--compact___gcSwq",
|
|
695
|
+
"btn--medium": "lc-SegmentedControl-module__btn--medium___w3UzC",
|
|
696
|
+
"btn--large": "lc-SegmentedControl-module__btn--large___yHPw4"
|
|
697
697
|
};
|
|
698
698
|
function noop() {
|
|
699
699
|
}
|
|
700
|
-
const baseClass$C = "
|
|
701
|
-
const
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
} = _j, restProps = __objRest(_j, [
|
|
711
|
-
"size",
|
|
712
|
-
"fullWidth",
|
|
713
|
-
"onIndexChange",
|
|
714
|
-
"className",
|
|
715
|
-
"children",
|
|
716
|
-
"currentIndex",
|
|
717
|
-
"initialIndex"
|
|
718
|
-
]);
|
|
700
|
+
const baseClass$C = "segmented-control";
|
|
701
|
+
const SegmentedControl = ({
|
|
702
|
+
size = "medium",
|
|
703
|
+
buttons,
|
|
704
|
+
className,
|
|
705
|
+
initialId,
|
|
706
|
+
currentId,
|
|
707
|
+
fullWidth = false,
|
|
708
|
+
onButtonClick = noop
|
|
709
|
+
}) => {
|
|
719
710
|
const mergedClassName = cx(styles$s[baseClass$C], className);
|
|
720
|
-
const [
|
|
721
|
-
const isControlled = typeof
|
|
722
|
-
|
|
723
|
-
|
|
711
|
+
const [currentStateId, setCurrentStateId] = React.useState(() => initialId);
|
|
712
|
+
const isControlled = typeof currentId === "string";
|
|
713
|
+
React.useEffect(() => {
|
|
714
|
+
isControlled && setCurrentStateId(currentId);
|
|
715
|
+
}, [currentId]);
|
|
716
|
+
const handleClick = (id, event) => {
|
|
724
717
|
if (!isControlled) {
|
|
725
|
-
|
|
718
|
+
setCurrentStateId(id);
|
|
726
719
|
}
|
|
727
|
-
|
|
720
|
+
onButtonClick(id, event);
|
|
728
721
|
};
|
|
729
|
-
|
|
722
|
+
const buttonSet = buttons.map(({ id, label, loading, disabled }) => {
|
|
723
|
+
const activityStyles = id === currentStateId ? styles$s["btn--active"] : "";
|
|
724
|
+
const loadingStatus = id === currentStateId ? false : loading;
|
|
725
|
+
return /* @__PURE__ */ React.createElement(Button, {
|
|
726
|
+
key: id,
|
|
727
|
+
fullWidth,
|
|
728
|
+
loading: loadingStatus,
|
|
729
|
+
disabled,
|
|
730
|
+
kind: "secondary",
|
|
731
|
+
className: cx(styles$s["btn"], styles$s[`btn--${size}`], activityStyles),
|
|
732
|
+
onClick: (event) => {
|
|
733
|
+
handleClick(id, event);
|
|
734
|
+
}
|
|
735
|
+
}, label);
|
|
736
|
+
});
|
|
737
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
730
738
|
role: "group",
|
|
731
739
|
className: mergedClassName
|
|
732
|
-
},
|
|
733
|
-
fullWidth,
|
|
734
|
-
size,
|
|
735
|
-
kind: "secondary",
|
|
736
|
-
type: "button",
|
|
737
|
-
onClick: (event) => {
|
|
738
|
-
handleClick(i, event);
|
|
739
|
-
if (child.props.onClick) {
|
|
740
|
-
child.props.onClick(event);
|
|
741
|
-
}
|
|
742
|
-
},
|
|
743
|
-
className: cx(styles$s["btn"], styles$s[`btn--${size}`], i === _currentIndex && styles$s["btn--active"])
|
|
744
|
-
})));
|
|
740
|
+
}, buttonSet);
|
|
745
741
|
};
|
|
746
742
|
const card = "lc-Card-module__card___GqMm2";
|
|
747
743
|
const card__header = "lc-Card-module__card__header___0ptfD";
|
|
@@ -771,8 +767,8 @@ const baseClass$B = "card";
|
|
|
771
767
|
const headerClass = `${baseClass$B}__header`;
|
|
772
768
|
const headingClass = `${headerClass}__heading`;
|
|
773
769
|
const actionsClass = `${baseClass$B}__actions`;
|
|
774
|
-
const Card = (
|
|
775
|
-
var
|
|
770
|
+
const Card = (_i) => {
|
|
771
|
+
var _j = _i, {
|
|
776
772
|
alt,
|
|
777
773
|
buttonsOptions = [],
|
|
778
774
|
children,
|
|
@@ -781,7 +777,7 @@ const Card = (_k) => {
|
|
|
781
777
|
expandableContent,
|
|
782
778
|
src,
|
|
783
779
|
title
|
|
784
|
-
} =
|
|
780
|
+
} = _j, divProps = __objRest(_j, [
|
|
785
781
|
"alt",
|
|
786
782
|
"buttonsOptions",
|
|
787
783
|
"children",
|
|
@@ -845,11 +841,11 @@ var styles$q = {
|
|
|
845
841
|
"field-description": "lc-FieldDescription-module__field-description___IcRDH"
|
|
846
842
|
};
|
|
847
843
|
const baseClass$A = "field-description";
|
|
848
|
-
const FieldDescription = (
|
|
849
|
-
var
|
|
844
|
+
const FieldDescription = (_k) => {
|
|
845
|
+
var _l = _k, {
|
|
850
846
|
children,
|
|
851
847
|
className = ""
|
|
852
|
-
} =
|
|
848
|
+
} = _l, props = __objRest(_l, [
|
|
853
849
|
"children",
|
|
854
850
|
"className"
|
|
855
851
|
]);
|
|
@@ -880,8 +876,8 @@ var styles$p = {
|
|
|
880
876
|
checkbox__helper
|
|
881
877
|
};
|
|
882
878
|
const baseClass$z = "checkbox";
|
|
883
|
-
const Checkbox = React.forwardRef((
|
|
884
|
-
var
|
|
879
|
+
const Checkbox = React.forwardRef((_m, ref) => {
|
|
880
|
+
var _n = _m, { checked, disabled, children, description, className } = _n, restInputProps = __objRest(_n, ["checked", "disabled", "children", "description", "className"]);
|
|
885
881
|
return /* @__PURE__ */ React.createElement("div", {
|
|
886
882
|
className: cx(styles$p[baseClass$z], className, {
|
|
887
883
|
[styles$p[`${baseClass$z}--selected`]]: checked,
|
|
@@ -1476,11 +1472,11 @@ var styles$n = {
|
|
|
1476
1472
|
"field-error": "lc-FieldError-module__field-error___IDkPT"
|
|
1477
1473
|
};
|
|
1478
1474
|
const baseClass$v = "field-error";
|
|
1479
|
-
const FieldError = (
|
|
1480
|
-
var
|
|
1475
|
+
const FieldError = (_o) => {
|
|
1476
|
+
var _p = _o, {
|
|
1481
1477
|
children,
|
|
1482
1478
|
className = ""
|
|
1483
|
-
} =
|
|
1479
|
+
} = _p, props = __objRest(_p, [
|
|
1484
1480
|
"children",
|
|
1485
1481
|
"className"
|
|
1486
1482
|
]);
|
|
@@ -1498,15 +1494,15 @@ var styles$m = {
|
|
|
1498
1494
|
"field-group--stretched": "lc-FieldGroup-module__field-group--stretched___6rkuO"
|
|
1499
1495
|
};
|
|
1500
1496
|
const baseClass$u = "field-group";
|
|
1501
|
-
const FieldGroup = (
|
|
1502
|
-
var
|
|
1497
|
+
const FieldGroup = (_q) => {
|
|
1498
|
+
var _r = _q, {
|
|
1503
1499
|
className = "",
|
|
1504
1500
|
children,
|
|
1505
1501
|
description,
|
|
1506
1502
|
error,
|
|
1507
1503
|
inline,
|
|
1508
1504
|
stretch
|
|
1509
|
-
} =
|
|
1505
|
+
} = _r, props = __objRest(_r, [
|
|
1510
1506
|
"className",
|
|
1511
1507
|
"children",
|
|
1512
1508
|
"description",
|
|
@@ -1535,14 +1531,14 @@ var styles$l = {
|
|
|
1535
1531
|
form__helper
|
|
1536
1532
|
};
|
|
1537
1533
|
const baseClass$t = "form";
|
|
1538
|
-
const Form = (
|
|
1539
|
-
var
|
|
1534
|
+
const Form = (_s) => {
|
|
1535
|
+
var _t = _s, {
|
|
1540
1536
|
className,
|
|
1541
1537
|
children,
|
|
1542
1538
|
labelText,
|
|
1543
1539
|
helperText,
|
|
1544
1540
|
formFooter
|
|
1545
|
-
} =
|
|
1541
|
+
} = _t, restProps = __objRest(_t, [
|
|
1546
1542
|
"className",
|
|
1547
1543
|
"children",
|
|
1548
1544
|
"labelText",
|
|
@@ -1627,13 +1623,13 @@ var styles$j = {
|
|
|
1627
1623
|
"form-group__helper": "lc-FormGroup-module__form-group__helper___SRuxe"
|
|
1628
1624
|
};
|
|
1629
1625
|
const baseClass$r = "form-group";
|
|
1630
|
-
const FormGroup = (
|
|
1631
|
-
var
|
|
1626
|
+
const FormGroup = (_u) => {
|
|
1627
|
+
var _v = _u, {
|
|
1632
1628
|
className = "",
|
|
1633
1629
|
children,
|
|
1634
1630
|
labelText,
|
|
1635
1631
|
helperText
|
|
1636
|
-
} =
|
|
1632
|
+
} = _v, props = __objRest(_v, [
|
|
1637
1633
|
"className",
|
|
1638
1634
|
"children",
|
|
1639
1635
|
"labelText",
|
|
@@ -1666,8 +1662,8 @@ var styles$i = {
|
|
|
1666
1662
|
"input--large": "lc-Input-module__input--large___jX5RW"
|
|
1667
1663
|
};
|
|
1668
1664
|
const baseClass$q = "input";
|
|
1669
|
-
const Input = React.forwardRef((
|
|
1670
|
-
var
|
|
1665
|
+
const Input = React.forwardRef((_w, ref) => {
|
|
1666
|
+
var _x = _w, { size = "medium", error = false, className } = _x, inputProps = __objRest(_x, ["size", "error", "className"]);
|
|
1671
1667
|
return /* @__PURE__ */ React.createElement("input", __spreadValues({
|
|
1672
1668
|
className: cx(className, styles$i[baseClass$q], styles$i[`${baseClass$q}--${size}`], {
|
|
1673
1669
|
[styles$i[`${baseClass$q}--error`]]: error
|
|
@@ -1682,11 +1678,11 @@ var styles$h = {
|
|
|
1682
1678
|
"link--bold": "lc-Link-module__link--bold___1rGdO"
|
|
1683
1679
|
};
|
|
1684
1680
|
const baseClass$p = "link";
|
|
1685
|
-
const Link = (
|
|
1686
|
-
var
|
|
1681
|
+
const Link = (_y) => {
|
|
1682
|
+
var _z = _y, {
|
|
1687
1683
|
bold = false,
|
|
1688
1684
|
className = ""
|
|
1689
|
-
} =
|
|
1685
|
+
} = _z, rest = __objRest(_z, [
|
|
1690
1686
|
"bold",
|
|
1691
1687
|
"className"
|
|
1692
1688
|
]);
|
|
@@ -1737,17 +1733,19 @@ const KeyCodes = {
|
|
|
1737
1733
|
arrowDown: "ArrowDown"
|
|
1738
1734
|
};
|
|
1739
1735
|
const baseClass$o = "modal-base";
|
|
1740
|
-
const ModalBase = (
|
|
1741
|
-
var
|
|
1736
|
+
const ModalBase = (_A) => {
|
|
1737
|
+
var _B = _A, {
|
|
1742
1738
|
children,
|
|
1743
1739
|
className = "",
|
|
1744
1740
|
onClose,
|
|
1745
|
-
closeOnEscPress = true
|
|
1746
|
-
|
|
1741
|
+
closeOnEscPress = true,
|
|
1742
|
+
closeOnOverlayPress = true
|
|
1743
|
+
} = _B, props = __objRest(_B, [
|
|
1747
1744
|
"children",
|
|
1748
1745
|
"className",
|
|
1749
1746
|
"onClose",
|
|
1750
|
-
"closeOnEscPress"
|
|
1747
|
+
"closeOnEscPress",
|
|
1748
|
+
"closeOnOverlayPress"
|
|
1751
1749
|
]);
|
|
1752
1750
|
const mergedClassNames = cx(styles$g[baseClass$o], className);
|
|
1753
1751
|
React.useEffect(() => {
|
|
@@ -1763,7 +1761,7 @@ const ModalBase = (_C) => {
|
|
|
1763
1761
|
return () => document.removeEventListener("keyup", onKeyUp, true);
|
|
1764
1762
|
}, [closeOnEscPress]);
|
|
1765
1763
|
const onOverlayClick = (event) => {
|
|
1766
|
-
if (event.target === event.currentTarget) {
|
|
1764
|
+
if (closeOnOverlayPress && event.target === event.currentTarget) {
|
|
1767
1765
|
onClose();
|
|
1768
1766
|
}
|
|
1769
1767
|
};
|
|
@@ -1783,14 +1781,14 @@ const ModalBase = (_C) => {
|
|
|
1783
1781
|
}), children));
|
|
1784
1782
|
};
|
|
1785
1783
|
const baseClass$n = "action-modal";
|
|
1786
|
-
const ActionModal = (
|
|
1787
|
-
var
|
|
1784
|
+
const ActionModal = (_C) => {
|
|
1785
|
+
var _D = _C, {
|
|
1788
1786
|
children,
|
|
1789
1787
|
className = "",
|
|
1790
1788
|
icon: icon2,
|
|
1791
1789
|
heading,
|
|
1792
1790
|
actions
|
|
1793
|
-
} =
|
|
1791
|
+
} = _D, props = __objRest(_D, [
|
|
1794
1792
|
"children",
|
|
1795
1793
|
"className",
|
|
1796
1794
|
"icon",
|
|
@@ -1811,13 +1809,13 @@ const ActionModal = (_E) => {
|
|
|
1811
1809
|
}, actions));
|
|
1812
1810
|
};
|
|
1813
1811
|
const baseClass$m = "modal";
|
|
1814
|
-
const Modal = (
|
|
1815
|
-
var
|
|
1812
|
+
const Modal = (_E) => {
|
|
1813
|
+
var _F = _E, {
|
|
1816
1814
|
children,
|
|
1817
1815
|
className = "",
|
|
1818
1816
|
heading,
|
|
1819
1817
|
footer
|
|
1820
|
-
} =
|
|
1818
|
+
} = _F, props = __objRest(_F, [
|
|
1821
1819
|
"children",
|
|
1822
1820
|
"className",
|
|
1823
1821
|
"heading",
|
|
@@ -1870,8 +1868,8 @@ var styles$f = {
|
|
|
1870
1868
|
"numeric-input--error": "lc-NumericInput-module__numeric-input--error___TMxRx"
|
|
1871
1869
|
};
|
|
1872
1870
|
const baseClass$l = "numeric-input";
|
|
1873
|
-
const NumericInput = (
|
|
1874
|
-
var
|
|
1871
|
+
const NumericInput = (_G) => {
|
|
1872
|
+
var _H = _G, {
|
|
1875
1873
|
className,
|
|
1876
1874
|
error,
|
|
1877
1875
|
value,
|
|
@@ -1881,7 +1879,7 @@ const NumericInput = (_I) => {
|
|
|
1881
1879
|
noControls,
|
|
1882
1880
|
style,
|
|
1883
1881
|
onChange
|
|
1884
|
-
} =
|
|
1882
|
+
} = _H, restProps = __objRest(_H, [
|
|
1885
1883
|
"className",
|
|
1886
1884
|
"error",
|
|
1887
1885
|
"value",
|
|
@@ -2327,6 +2325,7 @@ const Popover = (props) => {
|
|
|
2327
2325
|
children,
|
|
2328
2326
|
className,
|
|
2329
2327
|
placement,
|
|
2328
|
+
flipOptions,
|
|
2330
2329
|
isVisible = false
|
|
2331
2330
|
} = props;
|
|
2332
2331
|
const [visible, setVisibility] = React.useState(false);
|
|
@@ -2340,7 +2339,7 @@ const Popover = (props) => {
|
|
|
2340
2339
|
update,
|
|
2341
2340
|
placement: updatedPlacement
|
|
2342
2341
|
} = useFloating({
|
|
2343
|
-
middleware: [offset(4), flip()],
|
|
2342
|
+
middleware: [offset(4), flip(flipOptions)],
|
|
2344
2343
|
placement
|
|
2345
2344
|
});
|
|
2346
2345
|
React.useEffect(() => {
|
|
@@ -2435,13 +2434,13 @@ const SIZE_VALUE_FROM_SIZE = {
|
|
|
2435
2434
|
large: 56
|
|
2436
2435
|
};
|
|
2437
2436
|
const baseClass$h = "progress-circle";
|
|
2438
|
-
const ProgressCircle = React.forwardRef((
|
|
2439
|
-
var
|
|
2437
|
+
const ProgressCircle = React.forwardRef((_I, ref) => {
|
|
2438
|
+
var _J = _I, {
|
|
2440
2439
|
status = "normal",
|
|
2441
2440
|
progressValue,
|
|
2442
2441
|
className,
|
|
2443
2442
|
size = "medium"
|
|
2444
|
-
} =
|
|
2443
|
+
} = _J, restProps = __objRest(_J, [
|
|
2445
2444
|
"status",
|
|
2446
2445
|
"progressValue",
|
|
2447
2446
|
"className",
|
|
@@ -2496,13 +2495,13 @@ var styles$a = {
|
|
|
2496
2495
|
"progress-bar__indicator--normal": "lc-ProgressBar-module__progress-bar__indicator--normal___0Uhle"
|
|
2497
2496
|
};
|
|
2498
2497
|
const baseClass$g = "progress-bar";
|
|
2499
|
-
const ProgressBar = React.forwardRef((
|
|
2500
|
-
var
|
|
2498
|
+
const ProgressBar = React.forwardRef((_K, ref) => {
|
|
2499
|
+
var _L = _K, {
|
|
2501
2500
|
status = "normal",
|
|
2502
2501
|
percent,
|
|
2503
2502
|
size = "medium",
|
|
2504
2503
|
className = ""
|
|
2505
|
-
} =
|
|
2504
|
+
} = _L, restProps = __objRest(_L, [
|
|
2506
2505
|
"status",
|
|
2507
2506
|
"percent",
|
|
2508
2507
|
"size",
|
|
@@ -2622,8 +2621,8 @@ var styles$8 = {
|
|
|
2622
2621
|
"radio-button--disabled": "lc-RadioButton-module__radio-button--disabled___wHSA7"
|
|
2623
2622
|
};
|
|
2624
2623
|
const baseClass$e = "radio-button";
|
|
2625
|
-
const RadioButton = React.forwardRef((
|
|
2626
|
-
var
|
|
2624
|
+
const RadioButton = React.forwardRef((_M, ref) => {
|
|
2625
|
+
var _N = _M, { children, className = "", description, checked, disabled } = _N, props = __objRest(_N, ["children", "className", "description", "checked", "disabled"]);
|
|
2627
2626
|
const mergedClassNames = cx(styles$8[baseClass$e], className, {
|
|
2628
2627
|
[styles$8[`${baseClass$e}--selected`]]: checked,
|
|
2629
2628
|
[styles$8[`${baseClass$e}--disabled`]]: disabled
|
|
@@ -2672,13 +2671,14 @@ const SearchInput = ({
|
|
|
2672
2671
|
placeholder = "Search ...",
|
|
2673
2672
|
size = "medium",
|
|
2674
2673
|
value,
|
|
2674
|
+
className,
|
|
2675
2675
|
onChange
|
|
2676
2676
|
}) => {
|
|
2677
2677
|
const [searchValue, setSearchValue] = React.useState(value || "");
|
|
2678
2678
|
const [isCollapsed, setIsCollapsed] = React.useState(true);
|
|
2679
2679
|
const inputRef = React.useRef(null);
|
|
2680
2680
|
const isCloseIconVisible = !!searchValue && !isDisabled && !isLoading;
|
|
2681
|
-
const mergedClassNames = cx(styles$7[`${inputBaseClass}`], styles$7[`${inputBaseClass}--${size}`], (isDisabled || isLoading) && styles$7[`${inputBaseClass}--disabled`], isCollapsable && styles$7[`${inputBaseClass}--collapsable`], !isCollapsed && styles$7[`${inputBaseClass}--collapsable--open`]);
|
|
2681
|
+
const mergedClassNames = cx(className, styles$7[`${inputBaseClass}`], styles$7[`${inputBaseClass}--${size}`], (isDisabled || isLoading) && styles$7[`${inputBaseClass}--disabled`], isCollapsable && styles$7[`${inputBaseClass}--collapsable`], !isCollapsed && styles$7[`${inputBaseClass}--collapsable--open`]);
|
|
2682
2682
|
React.useEffect(() => {
|
|
2683
2683
|
if (typeof value === "string") {
|
|
2684
2684
|
setSearchValue(value);
|
|
@@ -2782,8 +2782,8 @@ var styles$6 = {
|
|
|
2782
2782
|
switch__icon
|
|
2783
2783
|
};
|
|
2784
2784
|
const baseClass$c = "switch";
|
|
2785
|
-
const Switch = (
|
|
2786
|
-
var
|
|
2785
|
+
const Switch = (_O) => {
|
|
2786
|
+
var _P = _O, {
|
|
2787
2787
|
className = "",
|
|
2788
2788
|
defaultOn = false,
|
|
2789
2789
|
disabled = false,
|
|
@@ -2792,8 +2792,9 @@ const Switch = (_Q) => {
|
|
|
2792
2792
|
onChange = noop,
|
|
2793
2793
|
size = "large",
|
|
2794
2794
|
state = "regular",
|
|
2795
|
-
innerRef
|
|
2796
|
-
|
|
2795
|
+
innerRef,
|
|
2796
|
+
ariaLabel
|
|
2797
|
+
} = _P, props = __objRest(_P, [
|
|
2797
2798
|
"className",
|
|
2798
2799
|
"defaultOn",
|
|
2799
2800
|
"disabled",
|
|
@@ -2802,7 +2803,8 @@ const Switch = (_Q) => {
|
|
|
2802
2803
|
"onChange",
|
|
2803
2804
|
"size",
|
|
2804
2805
|
"state",
|
|
2805
|
-
"innerRef"
|
|
2806
|
+
"innerRef",
|
|
2807
|
+
"ariaLabel"
|
|
2806
2808
|
]);
|
|
2807
2809
|
const [checked, setChecked] = React.useState(() => on !== void 0 ? on : defaultOn);
|
|
2808
2810
|
React.useEffect(() => {
|
|
@@ -2836,7 +2838,7 @@ const Switch = (_Q) => {
|
|
|
2836
2838
|
name,
|
|
2837
2839
|
ref: innerRef,
|
|
2838
2840
|
disabled: shouldBehaveAsDisabled,
|
|
2839
|
-
"
|
|
2841
|
+
"aria-label": ariaLabel
|
|
2840
2842
|
}, props)), /* @__PURE__ */ React.createElement("span", {
|
|
2841
2843
|
className: styles$6[`${baseClass$c}__container`]
|
|
2842
2844
|
}, /* @__PURE__ */ React.createElement("span", {
|
|
@@ -2861,13 +2863,13 @@ var styles$5 = {
|
|
|
2861
2863
|
"tab--selected": "lc-Tab-module__tab--selected___c0EkL"
|
|
2862
2864
|
};
|
|
2863
2865
|
const baseClass$b = "tab";
|
|
2864
|
-
const Tab = (
|
|
2865
|
-
var
|
|
2866
|
+
const Tab = (_Q) => {
|
|
2867
|
+
var _R = _Q, {
|
|
2866
2868
|
children,
|
|
2867
2869
|
className,
|
|
2868
2870
|
description,
|
|
2869
2871
|
isSelected
|
|
2870
|
-
} =
|
|
2872
|
+
} = _R, restProps = __objRest(_R, [
|
|
2871
2873
|
"children",
|
|
2872
2874
|
"className",
|
|
2873
2875
|
"description",
|
|
@@ -2937,8 +2939,8 @@ const getCustomTextClass = (customColor) => {
|
|
|
2937
2939
|
}
|
|
2938
2940
|
return getContrast(customColor, "#FFFFFF") > 4.5 ? "text-white" : "text-black";
|
|
2939
2941
|
};
|
|
2940
|
-
const Tag = (
|
|
2941
|
-
var
|
|
2942
|
+
const Tag = (_S) => {
|
|
2943
|
+
var _T = _S, {
|
|
2942
2944
|
className = "",
|
|
2943
2945
|
children,
|
|
2944
2946
|
dismissible = false,
|
|
@@ -2949,7 +2951,7 @@ const Tag = (_U) => {
|
|
|
2949
2951
|
icon: icon2,
|
|
2950
2952
|
avatar: avatar2,
|
|
2951
2953
|
customColor
|
|
2952
|
-
} =
|
|
2954
|
+
} = _T, restProps = __objRest(_T, [
|
|
2953
2955
|
"className",
|
|
2954
2956
|
"children",
|
|
2955
2957
|
"dismissible",
|
|
@@ -3123,6 +3125,7 @@ const tagSeparatorKeys = [
|
|
|
3123
3125
|
];
|
|
3124
3126
|
const tagRemoveKeys = [KeyCodes.backspace, KeyCodes.delete];
|
|
3125
3127
|
const TagInput = ({
|
|
3128
|
+
id,
|
|
3126
3129
|
tags,
|
|
3127
3130
|
onChange,
|
|
3128
3131
|
validator,
|
|
@@ -3187,6 +3190,7 @@ const TagInput = ({
|
|
|
3187
3190
|
validator,
|
|
3188
3191
|
size
|
|
3189
3192
|
}, tag2)), /* @__PURE__ */ React.createElement("input", {
|
|
3193
|
+
id,
|
|
3190
3194
|
ref: inputRef,
|
|
3191
3195
|
className: inputClassNames,
|
|
3192
3196
|
placeholder,
|
|
@@ -3202,6 +3206,7 @@ const emailValidator = (value) => {
|
|
|
3202
3206
|
return emailRegex.test(value);
|
|
3203
3207
|
};
|
|
3204
3208
|
const EmailTagInput = ({
|
|
3209
|
+
id,
|
|
3205
3210
|
tags,
|
|
3206
3211
|
onChange,
|
|
3207
3212
|
error,
|
|
@@ -3209,6 +3214,7 @@ const EmailTagInput = ({
|
|
|
3209
3214
|
size
|
|
3210
3215
|
}) => {
|
|
3211
3216
|
return /* @__PURE__ */ React.createElement(TagInput, {
|
|
3217
|
+
id,
|
|
3212
3218
|
tags,
|
|
3213
3219
|
error,
|
|
3214
3220
|
onChange,
|
|
@@ -3265,15 +3271,15 @@ const iconConfig = {
|
|
|
3265
3271
|
}
|
|
3266
3272
|
};
|
|
3267
3273
|
const baseClass$6 = "toast";
|
|
3268
|
-
const Toast = (
|
|
3269
|
-
var
|
|
3274
|
+
const Toast = (_U) => {
|
|
3275
|
+
var _V = _U, {
|
|
3270
3276
|
action,
|
|
3271
3277
|
className,
|
|
3272
3278
|
children,
|
|
3273
3279
|
removable,
|
|
3274
3280
|
kind = "info",
|
|
3275
3281
|
onClose
|
|
3276
|
-
} =
|
|
3282
|
+
} = _V, divProps = __objRest(_V, [
|
|
3277
3283
|
"action",
|
|
3278
3284
|
"className",
|
|
3279
3285
|
"children",
|
|
@@ -3817,4 +3823,4 @@ const UserGuide = (props) => {
|
|
|
3817
3823
|
})
|
|
3818
3824
|
}), props.children)) : null;
|
|
3819
3825
|
};
|
|
3820
|
-
export { ANIMATION_TIME, ActionModal, Alert, Avatar, Badge, Button,
|
|
3826
|
+
export { ANIMATION_TIME, ActionModal, Alert, Avatar, Badge, Button, Card, Checkbox, DatePicker, DesignToken, EmailTagInput, FieldDescription, FieldError, FieldGroup, Form, FormField, FormGroup, Heading, Icon, Info, Input, Interactive, Link, Loader, Modal, ModalBase, ModalCloseButton, ModalPortal, NumericInput, Picker, Popover, ProgressBar, ProgressCircle, PromoBanner, RadioButton, RangeDatePicker, SearchInput, SegmentedControl, ShadowToken, Simple, SpacingToken, Switch, Tab, TabsList, TabsWrapper, Tag, TagInput, Text, Toast, ToastWrapper, Tooltip, UserGuide };
|