@cambly/syntax-core 6.4.0 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +87 -105
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +90 -28
- package/dist/index.js +268 -174
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +261 -168
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -66,7 +66,7 @@ var require_classnames = __commonJS({
|
|
|
66
66
|
"use strict";
|
|
67
67
|
var hasOwn = {}.hasOwnProperty;
|
|
68
68
|
var nativeCodeString = "[native code]";
|
|
69
|
-
function
|
|
69
|
+
function classNames11() {
|
|
70
70
|
var classes = [];
|
|
71
71
|
for (var i = 0; i < arguments.length; i++) {
|
|
72
72
|
var arg = arguments[i];
|
|
@@ -77,7 +77,7 @@ var require_classnames = __commonJS({
|
|
|
77
77
|
classes.push(arg);
|
|
78
78
|
} else if (Array.isArray(arg)) {
|
|
79
79
|
if (arg.length) {
|
|
80
|
-
var inner =
|
|
80
|
+
var inner = classNames11.apply(null, arg);
|
|
81
81
|
if (inner) {
|
|
82
82
|
classes.push(inner);
|
|
83
83
|
}
|
|
@@ -97,14 +97,14 @@ var require_classnames = __commonJS({
|
|
|
97
97
|
return classes.join(" ");
|
|
98
98
|
}
|
|
99
99
|
if (typeof module2 !== "undefined" && module2.exports) {
|
|
100
|
-
|
|
101
|
-
module2.exports =
|
|
100
|
+
classNames11.default = classNames11;
|
|
101
|
+
module2.exports = classNames11;
|
|
102
102
|
} else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
|
|
103
103
|
define("classnames", [], function() {
|
|
104
|
-
return
|
|
104
|
+
return classNames11;
|
|
105
105
|
});
|
|
106
106
|
} else {
|
|
107
|
-
window.classNames =
|
|
107
|
+
window.classNames = classNames11;
|
|
108
108
|
}
|
|
109
109
|
})();
|
|
110
110
|
}
|
|
@@ -123,6 +123,7 @@ __export(src_exports, {
|
|
|
123
123
|
Divider: () => Divider,
|
|
124
124
|
Heading: () => Heading_default,
|
|
125
125
|
IconButton: () => IconButton_default,
|
|
126
|
+
LinkButton: () => LinkButton,
|
|
126
127
|
MiniActionCard: () => MiniActionCard_default,
|
|
127
128
|
Modal: () => Modal,
|
|
128
129
|
RadioButton: () => RadioButton_default,
|
|
@@ -460,6 +461,7 @@ var Badge = ({
|
|
|
460
461
|
var Badge_default = Badge;
|
|
461
462
|
|
|
462
463
|
// src/Button/Button.tsx
|
|
464
|
+
var import_react2 = require("react");
|
|
463
465
|
var import_classnames4 = __toESM(require_classnames());
|
|
464
466
|
|
|
465
467
|
// css-module:./colors.module.css#css-module
|
|
@@ -502,30 +504,54 @@ function foregroundColor(color) {
|
|
|
502
504
|
}
|
|
503
505
|
}
|
|
504
506
|
|
|
505
|
-
// src/
|
|
506
|
-
|
|
507
|
+
// src/colors/foregroundTypographyColor.ts
|
|
508
|
+
function foregroundTypographyColor(color) {
|
|
509
|
+
switch (color) {
|
|
510
|
+
case "secondary":
|
|
511
|
+
case "tertiary":
|
|
512
|
+
return "primary";
|
|
513
|
+
case "destructive-secondary":
|
|
514
|
+
case "destructive-tertiary":
|
|
515
|
+
return "destructive-primary";
|
|
516
|
+
case "branded":
|
|
517
|
+
return "gray900";
|
|
518
|
+
default:
|
|
519
|
+
return "white";
|
|
520
|
+
}
|
|
521
|
+
}
|
|
507
522
|
|
|
508
|
-
// css-module
|
|
509
|
-
var Button_module_default = { "button": "
|
|
523
|
+
// css-module:../Button.module.css#css-module
|
|
524
|
+
var Button_module_default = { "button": "_button_1fo30_1", "buttonGap": "_buttonGap_1fo30_9", "fullWidth": "_fullWidth_1fo30_50", "sm": "_sm_1fo30_54", "md": "_md_1fo30_61", "lg": "_lg_1fo30_68", "icon": "_icon_1fo30_75", "smIcon": "_smIcon_1fo30_79", "mdIcon": "_mdIcon_1fo30_86", "lgIcon": "_lgIcon_1fo30_93", "secondaryBorder": "_secondaryBorder_1fo30_100", "secondaryDestructiveBorder": "_secondaryDestructiveBorder_1fo30_104", "loading": "_loading_1fo30_118", "syntaxButtonLoadingRotate": "_syntaxButtonLoadingRotate_1fo30_1", "loadingCircle": "_loadingCircle_1fo30_122" };
|
|
510
525
|
|
|
511
|
-
// src/Button/
|
|
512
|
-
var
|
|
526
|
+
// src/Button/constants/iconSize.ts
|
|
527
|
+
var iconSize = {
|
|
528
|
+
["sm"]: Button_module_default.smIcon,
|
|
529
|
+
["md"]: Button_module_default.mdIcon,
|
|
530
|
+
["lg"]: Button_module_default.lgIcon
|
|
531
|
+
};
|
|
532
|
+
var iconSize_default = iconSize;
|
|
533
|
+
|
|
534
|
+
// src/Button/constants/textVariant.ts
|
|
513
535
|
var textVariant = {
|
|
514
|
-
|
|
515
|
-
["
|
|
516
|
-
["
|
|
517
|
-
["lg"]: Button_module_default.buttonTextLarge
|
|
536
|
+
["sm"]: 100,
|
|
537
|
+
["md"]: 200,
|
|
538
|
+
["lg"]: 300
|
|
518
539
|
};
|
|
540
|
+
var textVariant_default = textVariant;
|
|
541
|
+
|
|
542
|
+
// src/Button/constants/loadingIconSize.ts
|
|
519
543
|
var loadingIconSize = {
|
|
520
544
|
["sm"]: 16,
|
|
521
545
|
["md"]: 20,
|
|
522
546
|
["lg"]: 24
|
|
523
547
|
};
|
|
524
|
-
var
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
548
|
+
var loadingIconSize_default = loadingIconSize;
|
|
549
|
+
|
|
550
|
+
// css-module:./Button.module.css#css-module
|
|
551
|
+
var Button_module_default2 = { "button": "_button_1fo30_1", "buttonGap": "_buttonGap_1fo30_9", "fullWidth": "_fullWidth_1fo30_50", "sm": "_sm_1fo30_54", "md": "_md_1fo30_61", "lg": "_lg_1fo30_68", "icon": "_icon_1fo30_75", "smIcon": "_smIcon_1fo30_79", "mdIcon": "_mdIcon_1fo30_86", "lgIcon": "_lgIcon_1fo30_93", "secondaryBorder": "_secondaryBorder_1fo30_100", "secondaryDestructiveBorder": "_secondaryDestructiveBorder_1fo30_104", "loading": "_loading_1fo30_118", "syntaxButtonLoadingRotate": "_syntaxButtonLoadingRotate_1fo30_1", "loadingCircle": "_loadingCircle_1fo30_122" };
|
|
552
|
+
|
|
553
|
+
// src/Button/Button.tsx
|
|
554
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
529
555
|
var Button = (0, import_react2.forwardRef)(
|
|
530
556
|
({
|
|
531
557
|
"data-testid": dataTestId,
|
|
@@ -554,32 +580,39 @@ var Button = (0, import_react2.forwardRef)(
|
|
|
554
580
|
disabled: disabled || loading,
|
|
555
581
|
onClick,
|
|
556
582
|
className: (0, import_classnames4.default)(
|
|
557
|
-
|
|
583
|
+
Button_module_default2.button,
|
|
558
584
|
foregroundColor(color),
|
|
559
585
|
backgroundColor(color),
|
|
560
|
-
|
|
586
|
+
Button_module_default2[size],
|
|
561
587
|
{
|
|
562
|
-
[
|
|
563
|
-
[
|
|
564
|
-
[
|
|
565
|
-
[
|
|
588
|
+
[Button_module_default2.fullWidth]: fullWidth,
|
|
589
|
+
[Button_module_default2.buttonGap]: size === "lg" || size === "md",
|
|
590
|
+
[Button_module_default2.secondaryBorder]: color === "secondary",
|
|
591
|
+
[Button_module_default2.secondaryDestructiveBorder]: color === "destructive-secondary"
|
|
566
592
|
}
|
|
567
593
|
),
|
|
568
594
|
children: [
|
|
569
|
-
!loading && StartIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StartIcon, { className: (0, import_classnames4.default)(
|
|
570
|
-
(loading && loadingText || !loading && text) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
571
|
-
|
|
595
|
+
!loading && StartIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StartIcon, { className: (0, import_classnames4.default)(Button_module_default2.icon, iconSize_default[size]) }),
|
|
596
|
+
(loading && loadingText || !loading && text) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
597
|
+
Typography_default,
|
|
598
|
+
{
|
|
599
|
+
size: textVariant_default[size],
|
|
600
|
+
color: foregroundTypographyColor(color),
|
|
601
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style: { fontWeight: 500 }, children: loading ? loadingText : text })
|
|
602
|
+
}
|
|
603
|
+
) }),
|
|
604
|
+
!loading && EndIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EndIcon, { className: (0, import_classnames4.default)(Button_module_default2.icon, iconSize_default[size]) }),
|
|
572
605
|
loading && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
573
606
|
"svg",
|
|
574
607
|
{
|
|
575
|
-
className: (0, import_classnames4.default)(
|
|
608
|
+
className: (0, import_classnames4.default)(Button_module_default2.loading, foregroundColor(color)),
|
|
576
609
|
viewBox: "22 22 44 44",
|
|
577
|
-
width:
|
|
578
|
-
height:
|
|
610
|
+
width: loadingIconSize_default[size],
|
|
611
|
+
height: loadingIconSize_default[size],
|
|
579
612
|
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
580
613
|
"circle",
|
|
581
614
|
{
|
|
582
|
-
className:
|
|
615
|
+
className: Button_module_default2.loadingCircle,
|
|
583
616
|
cx: "44",
|
|
584
617
|
cy: "44",
|
|
585
618
|
r: "20.2",
|
|
@@ -647,85 +680,12 @@ function Card({
|
|
|
647
680
|
);
|
|
648
681
|
}
|
|
649
682
|
|
|
650
|
-
// css-module:./Divider.module.css#css-module
|
|
651
|
-
var Divider_module_default = { "divider": "_divider_1ddgq_1" };
|
|
652
|
-
|
|
653
|
-
// src/Divider/Divider.tsx
|
|
654
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
655
|
-
function Divider() {
|
|
656
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("hr", { className: Divider_module_default.divider });
|
|
657
|
-
}
|
|
658
|
-
Divider.displayName = "Divider";
|
|
659
|
-
|
|
660
|
-
// src/Heading/Heading.tsx
|
|
661
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
662
|
-
var Heading = ({
|
|
663
|
-
align = "start",
|
|
664
|
-
as = "h1",
|
|
665
|
-
children,
|
|
666
|
-
color = "gray900",
|
|
667
|
-
size = 500
|
|
668
|
-
}) => {
|
|
669
|
-
const weight = [700, 800].includes(size) ? "heavy" : "bold";
|
|
670
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Typography_default, { align, as, color, size, weight, children });
|
|
671
|
-
};
|
|
672
|
-
var Heading_default = Heading;
|
|
673
|
-
|
|
674
|
-
// src/IconButton/IconButton.tsx
|
|
675
|
-
var import_classnames6 = __toESM(require_classnames());
|
|
676
|
-
var import_react3 = require("react");
|
|
677
|
-
|
|
678
|
-
// css-module:./IconButton.module.css#css-module
|
|
679
|
-
var IconButton_module_default = { "iconButton": "_iconButton_13wmh_1", "sm": "_sm_13wmh_46", "md": "_md_13wmh_51", "lg": "_lg_13wmh_56", "smIcon": "_smIcon_13wmh_61", "mdIcon": "_mdIcon_13wmh_68", "lgIcon": "_lgIcon_13wmh_75" };
|
|
680
|
-
|
|
681
|
-
// src/IconButton/IconButton.tsx
|
|
682
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
683
|
-
var iconSize2 = {
|
|
684
|
-
["sm"]: IconButton_module_default.smIcon,
|
|
685
|
-
["md"]: IconButton_module_default.mdIcon,
|
|
686
|
-
["lg"]: IconButton_module_default.lgIcon
|
|
687
|
-
};
|
|
688
|
-
var IconButton = (0, import_react3.forwardRef)(
|
|
689
|
-
({
|
|
690
|
-
accessibilityLabel,
|
|
691
|
-
color = "primary",
|
|
692
|
-
"data-testid": dataTestId,
|
|
693
|
-
disabled = false,
|
|
694
|
-
icon: Icon,
|
|
695
|
-
size = "md",
|
|
696
|
-
tooltip,
|
|
697
|
-
onClick
|
|
698
|
-
}, ref) => {
|
|
699
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
700
|
-
"button",
|
|
701
|
-
{
|
|
702
|
-
"aria-label": accessibilityLabel,
|
|
703
|
-
"data-testid": dataTestId,
|
|
704
|
-
type: "button",
|
|
705
|
-
title: tooltip,
|
|
706
|
-
disabled,
|
|
707
|
-
onClick,
|
|
708
|
-
className: (0, import_classnames6.default)(
|
|
709
|
-
IconButton_module_default.iconButton,
|
|
710
|
-
foregroundColor(color),
|
|
711
|
-
backgroundColor(color),
|
|
712
|
-
IconButton_module_default[size]
|
|
713
|
-
),
|
|
714
|
-
ref,
|
|
715
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { className: iconSize2[size] })
|
|
716
|
-
}
|
|
717
|
-
);
|
|
718
|
-
}
|
|
719
|
-
);
|
|
720
|
-
IconButton.displayName = "IconButton";
|
|
721
|
-
var IconButton_default = IconButton;
|
|
722
|
-
|
|
723
683
|
// src/Checkbox/Checkbox.tsx
|
|
724
|
-
var
|
|
725
|
-
var
|
|
684
|
+
var import_react4 = require("react");
|
|
685
|
+
var import_classnames6 = __toESM(require_classnames());
|
|
726
686
|
|
|
727
687
|
// src/useFocusVisible.tsx
|
|
728
|
-
var
|
|
688
|
+
var import_react3 = require("react");
|
|
729
689
|
var hasSetupGlobalListeners = false;
|
|
730
690
|
var currentModality = null;
|
|
731
691
|
var changeHandlers = /* @__PURE__ */ new Set();
|
|
@@ -801,8 +761,8 @@ function setupGlobalFocusEvents() {
|
|
|
801
761
|
}
|
|
802
762
|
function useFocusVisible() {
|
|
803
763
|
setupGlobalFocusEvents();
|
|
804
|
-
const [isFocusVisibleState, setFocusVisible] = (0,
|
|
805
|
-
(0,
|
|
764
|
+
const [isFocusVisibleState, setFocusVisible] = (0, import_react3.useState)(isFocusVisible());
|
|
765
|
+
(0, import_react3.useEffect)(() => {
|
|
806
766
|
const handler = () => {
|
|
807
767
|
setFocusVisible(isFocusVisible());
|
|
808
768
|
};
|
|
@@ -821,7 +781,7 @@ var Checkbox_module_default = { "mainContainer": "_mainContainer_1omm6_1", "inpu
|
|
|
821
781
|
var Focus_module_default = { "accessibilityOutlineFocus": "_accessibilityOutlineFocus_1h8bq_1" };
|
|
822
782
|
|
|
823
783
|
// src/Checkbox/Checkbox.tsx
|
|
824
|
-
var
|
|
784
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
825
785
|
var typographySize = {
|
|
826
786
|
sm: 100,
|
|
827
787
|
md: 200
|
|
@@ -839,23 +799,23 @@ var Checkbox = ({
|
|
|
839
799
|
error = false,
|
|
840
800
|
onChange
|
|
841
801
|
}) => {
|
|
842
|
-
const [isFocused, setIsFocused] = (0,
|
|
802
|
+
const [isFocused, setIsFocused] = (0, import_react4.useState)(false);
|
|
843
803
|
const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
|
|
844
|
-
const checkboxStyling = (0,
|
|
845
|
-
const uncheckedStyling = (0,
|
|
804
|
+
const checkboxStyling = (0, import_classnames6.default)(Checkbox_module_default.checkbox, Checkbox_module_default[size]);
|
|
805
|
+
const uncheckedStyling = (0, import_classnames6.default)(checkboxStyling, Checkbox_module_default.uncheckedBox, {
|
|
846
806
|
[Checkbox_module_default.uncheckedBorder]: !error,
|
|
847
807
|
[Checkbox_module_default.uncheckedErrorBorder]: error,
|
|
848
808
|
[Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
|
|
849
809
|
});
|
|
850
|
-
const checkedStyling = (0,
|
|
810
|
+
const checkedStyling = (0, import_classnames6.default)(checkboxStyling, Checkbox_module_default.checkedBox, {
|
|
851
811
|
[Checkbox_module_default.checkedNonError]: !error,
|
|
852
812
|
[Checkbox_module_default.checkedError]: error,
|
|
853
813
|
[Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
|
|
854
814
|
});
|
|
855
|
-
return /* @__PURE__ */ (0,
|
|
815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
856
816
|
"label",
|
|
857
817
|
{
|
|
858
|
-
className: (0,
|
|
818
|
+
className: (0, import_classnames6.default)(
|
|
859
819
|
Checkbox_module_default.mainContainer,
|
|
860
820
|
Checkbox_module_default[`cursor${disabled ? "Disabled" : "Enabled"}`],
|
|
861
821
|
{
|
|
@@ -863,19 +823,19 @@ var Checkbox = ({
|
|
|
863
823
|
}
|
|
864
824
|
),
|
|
865
825
|
children: [
|
|
866
|
-
/* @__PURE__ */ (0,
|
|
826
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: checked ? checkedStyling : uncheckedStyling, children: checked && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", width: iconWidth[size], children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
867
827
|
"path",
|
|
868
828
|
{
|
|
869
829
|
fill: "#fff",
|
|
870
830
|
d: "m9 16.2-3.5-3.5a.9839.9839 0 0 0-1.4 0c-.39.39-.39 1.01 0 1.4l4.19 4.19c.39.39 1.02.39 1.41 0L20.3 7.7c.39-.39.39-1.01 0-1.4a.9839.9839 0 0 0-1.4 0L9 16.2z"
|
|
871
831
|
}
|
|
872
832
|
) }) }),
|
|
873
|
-
/* @__PURE__ */ (0,
|
|
833
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
874
834
|
"input",
|
|
875
835
|
{
|
|
876
836
|
"data-testid": dataTestId,
|
|
877
837
|
type: "checkbox",
|
|
878
|
-
className: (0,
|
|
838
|
+
className: (0, import_classnames6.default)(
|
|
879
839
|
Checkbox_module_default.inputOverlay,
|
|
880
840
|
Checkbox_module_default[size],
|
|
881
841
|
Checkbox_module_default[`cursor${disabled ? "Disabled" : "Enabled"}`]
|
|
@@ -891,7 +851,7 @@ var Checkbox = ({
|
|
|
891
851
|
}
|
|
892
852
|
}
|
|
893
853
|
),
|
|
894
|
-
/* @__PURE__ */ (0,
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
895
855
|
Typography_default,
|
|
896
856
|
{
|
|
897
857
|
size: typographySize[size],
|
|
@@ -905,22 +865,155 @@ var Checkbox = ({
|
|
|
905
865
|
};
|
|
906
866
|
var Checkbox_default = Checkbox;
|
|
907
867
|
|
|
868
|
+
// css-module:./Divider.module.css#css-module
|
|
869
|
+
var Divider_module_default = { "divider": "_divider_1ddgq_1" };
|
|
870
|
+
|
|
871
|
+
// src/Divider/Divider.tsx
|
|
872
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
873
|
+
function Divider() {
|
|
874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("hr", { className: Divider_module_default.divider });
|
|
875
|
+
}
|
|
876
|
+
Divider.displayName = "Divider";
|
|
877
|
+
|
|
878
|
+
// src/Heading/Heading.tsx
|
|
879
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
880
|
+
var Heading = ({
|
|
881
|
+
align = "start",
|
|
882
|
+
as = "h1",
|
|
883
|
+
children,
|
|
884
|
+
color = "gray900",
|
|
885
|
+
size = 500
|
|
886
|
+
}) => {
|
|
887
|
+
const weight = [700, 800].includes(size) ? "heavy" : "bold";
|
|
888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Typography_default, { align, as, color, size, weight, children });
|
|
889
|
+
};
|
|
890
|
+
var Heading_default = Heading;
|
|
891
|
+
|
|
892
|
+
// src/IconButton/IconButton.tsx
|
|
893
|
+
var import_classnames7 = __toESM(require_classnames());
|
|
894
|
+
var import_react5 = require("react");
|
|
895
|
+
|
|
896
|
+
// css-module:./IconButton.module.css#css-module
|
|
897
|
+
var IconButton_module_default = { "iconButton": "_iconButton_13wmh_1", "sm": "_sm_13wmh_46", "md": "_md_13wmh_51", "lg": "_lg_13wmh_56", "smIcon": "_smIcon_13wmh_61", "mdIcon": "_mdIcon_13wmh_68", "lgIcon": "_lgIcon_13wmh_75" };
|
|
898
|
+
|
|
899
|
+
// src/IconButton/IconButton.tsx
|
|
900
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
901
|
+
var iconSize2 = {
|
|
902
|
+
["sm"]: IconButton_module_default.smIcon,
|
|
903
|
+
["md"]: IconButton_module_default.mdIcon,
|
|
904
|
+
["lg"]: IconButton_module_default.lgIcon
|
|
905
|
+
};
|
|
906
|
+
var IconButton = (0, import_react5.forwardRef)(
|
|
907
|
+
({
|
|
908
|
+
accessibilityLabel,
|
|
909
|
+
color = "primary",
|
|
910
|
+
"data-testid": dataTestId,
|
|
911
|
+
disabled = false,
|
|
912
|
+
icon: Icon,
|
|
913
|
+
size = "md",
|
|
914
|
+
tooltip,
|
|
915
|
+
onClick
|
|
916
|
+
}, ref) => {
|
|
917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
918
|
+
"button",
|
|
919
|
+
{
|
|
920
|
+
"aria-label": accessibilityLabel,
|
|
921
|
+
"data-testid": dataTestId,
|
|
922
|
+
type: "button",
|
|
923
|
+
title: tooltip,
|
|
924
|
+
disabled,
|
|
925
|
+
onClick,
|
|
926
|
+
className: (0, import_classnames7.default)(
|
|
927
|
+
IconButton_module_default.iconButton,
|
|
928
|
+
foregroundColor(color),
|
|
929
|
+
backgroundColor(color),
|
|
930
|
+
IconButton_module_default[size]
|
|
931
|
+
),
|
|
932
|
+
ref,
|
|
933
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { className: iconSize2[size] })
|
|
934
|
+
}
|
|
935
|
+
);
|
|
936
|
+
}
|
|
937
|
+
);
|
|
938
|
+
IconButton.displayName = "IconButton";
|
|
939
|
+
var IconButton_default = IconButton;
|
|
940
|
+
|
|
941
|
+
// src/LinkButton/LinkButton.tsx
|
|
942
|
+
var import_classnames8 = __toESM(require_classnames());
|
|
943
|
+
|
|
944
|
+
// css-module:../Button/Button.module.css#css-module
|
|
945
|
+
var Button_module_default3 = { "button": "_button_1fo30_1", "buttonGap": "_buttonGap_1fo30_9", "fullWidth": "_fullWidth_1fo30_50", "sm": "_sm_1fo30_54", "md": "_md_1fo30_61", "lg": "_lg_1fo30_68", "icon": "_icon_1fo30_75", "smIcon": "_smIcon_1fo30_79", "mdIcon": "_mdIcon_1fo30_86", "lgIcon": "_lgIcon_1fo30_93", "secondaryBorder": "_secondaryBorder_1fo30_100", "secondaryDestructiveBorder": "_secondaryDestructiveBorder_1fo30_104", "loading": "_loading_1fo30_118", "syntaxButtonLoadingRotate": "_syntaxButtonLoadingRotate_1fo30_1", "loadingCircle": "_loadingCircle_1fo30_122" };
|
|
946
|
+
|
|
947
|
+
// css-module:./LinkButton.module.css#css-module
|
|
948
|
+
var LinkButton_module_default = { "linkButton": "_linkButton_1r7tz_1", "fitContent": "_fitContent_1r7tz_5" };
|
|
949
|
+
|
|
950
|
+
// src/LinkButton/LinkButton.tsx
|
|
951
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
952
|
+
function LinkButton({
|
|
953
|
+
text,
|
|
954
|
+
href,
|
|
955
|
+
target,
|
|
956
|
+
"data-testid": dataTestId,
|
|
957
|
+
color = "primary",
|
|
958
|
+
size = "md",
|
|
959
|
+
fullWidth = false,
|
|
960
|
+
startIcon: StartIcon,
|
|
961
|
+
endIcon: EndIcon,
|
|
962
|
+
onClick
|
|
963
|
+
}) {
|
|
964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
965
|
+
"a",
|
|
966
|
+
{
|
|
967
|
+
href,
|
|
968
|
+
"data-testid": dataTestId,
|
|
969
|
+
target,
|
|
970
|
+
className: (0, import_classnames8.default)(
|
|
971
|
+
LinkButton_module_default.linkButton,
|
|
972
|
+
Button_module_default3.button,
|
|
973
|
+
foregroundColor(color),
|
|
974
|
+
backgroundColor(color),
|
|
975
|
+
Button_module_default3[size],
|
|
976
|
+
{
|
|
977
|
+
[Button_module_default3.fullWidth]: fullWidth,
|
|
978
|
+
[LinkButton_module_default.fitContent]: !fullWidth,
|
|
979
|
+
[Button_module_default3.buttonGap]: size === "lg" || size === "md",
|
|
980
|
+
[Button_module_default3.secondaryBorder]: color === "secondary",
|
|
981
|
+
[Button_module_default3.secondaryDestructiveBorder]: color === "destructive-secondary"
|
|
982
|
+
}
|
|
983
|
+
),
|
|
984
|
+
onClick,
|
|
985
|
+
children: [
|
|
986
|
+
StartIcon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(StartIcon, { className: (0, import_classnames8.default)(Button_module_default3.icon, iconSize_default[size]) }),
|
|
987
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
988
|
+
Typography_default,
|
|
989
|
+
{
|
|
990
|
+
color: foregroundTypographyColor(color),
|
|
991
|
+
size: textVariant_default[size],
|
|
992
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { style: { fontWeight: 500 }, children: text })
|
|
993
|
+
}
|
|
994
|
+
),
|
|
995
|
+
EndIcon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EndIcon, { className: (0, import_classnames8.default)(Button_module_default3.icon, iconSize_default[size]) })
|
|
996
|
+
]
|
|
997
|
+
}
|
|
998
|
+
);
|
|
999
|
+
}
|
|
1000
|
+
|
|
908
1001
|
// css-module:./MiniActionCard.module.css#css-module
|
|
909
1002
|
var MiniActionCard_module_default = { "miniActionCard": "_miniActionCard_qebkn_1", "card": "_card_qebkn_9" };
|
|
910
1003
|
|
|
911
1004
|
// src/MiniActionCard/MiniActionCard.tsx
|
|
912
|
-
var
|
|
1005
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
913
1006
|
var MiniActionCard = ({
|
|
914
1007
|
children
|
|
915
|
-
}) => /* @__PURE__ */ (0,
|
|
1008
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: MiniActionCard_module_default.miniActionCard, children });
|
|
916
1009
|
var MiniActionCard_default = MiniActionCard;
|
|
917
1010
|
|
|
918
1011
|
// src/Modal/Modal.tsx
|
|
919
|
-
var
|
|
1012
|
+
var import_classnames9 = __toESM(require_classnames());
|
|
920
1013
|
|
|
921
1014
|
// src/Modal/FocusTrap.tsx
|
|
922
1015
|
var import_react6 = require("react");
|
|
923
|
-
var
|
|
1016
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
924
1017
|
function queryFocusableAll(el) {
|
|
925
1018
|
const selector = [
|
|
926
1019
|
"a[href]",
|
|
@@ -981,7 +1074,7 @@ function FocusTrap({
|
|
|
981
1074
|
}
|
|
982
1075
|
};
|
|
983
1076
|
}, [elRef, previouslyFocusedElRef]);
|
|
984
|
-
return /* @__PURE__ */ (0,
|
|
1077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { "data-testid": "syntax-focus-trap", ref: elRef, children });
|
|
985
1078
|
}
|
|
986
1079
|
|
|
987
1080
|
// src/Modal/StopScroll.tsx
|
|
@@ -999,13 +1092,13 @@ function StopScroll(props) {
|
|
|
999
1092
|
|
|
1000
1093
|
// src/Modal/Layer.tsx
|
|
1001
1094
|
var import_react_dom = require("react-dom");
|
|
1002
|
-
var
|
|
1095
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1003
1096
|
function Layer({
|
|
1004
1097
|
children,
|
|
1005
1098
|
zIndex = 1
|
|
1006
1099
|
}) {
|
|
1007
1100
|
return (0, import_react_dom.createPortal)(
|
|
1008
|
-
/* @__PURE__ */ (0,
|
|
1101
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1009
1102
|
Box_default,
|
|
1010
1103
|
{
|
|
1011
1104
|
"data-testid": "syntax-layer",
|
|
@@ -1024,9 +1117,9 @@ function Layer({
|
|
|
1024
1117
|
var Modal_module_default = { "backdrop": "_backdrop_30t3h_1", "closeButton": "_closeButton_30t3h_12", "closeButtonWithImage": "_closeButtonWithImage_30t3h_32" };
|
|
1025
1118
|
|
|
1026
1119
|
// src/Modal/Modal.tsx
|
|
1027
|
-
var
|
|
1120
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1028
1121
|
function XIcon({ color = "#000" }) {
|
|
1029
|
-
return /* @__PURE__ */ (0,
|
|
1122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", fill: color, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1030
1123
|
"path",
|
|
1031
1124
|
{
|
|
1032
1125
|
fill: "inherit",
|
|
@@ -1049,14 +1142,14 @@ function Modal({
|
|
|
1049
1142
|
zIndex = 1,
|
|
1050
1143
|
"data-testid": dataTestId
|
|
1051
1144
|
}) {
|
|
1052
|
-
return /* @__PURE__ */ (0,
|
|
1145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Layer, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(StopScroll, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FocusTrap, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1053
1146
|
"div",
|
|
1054
1147
|
{
|
|
1055
1148
|
className: Modal_module_default.backdrop,
|
|
1056
1149
|
role: "presentation",
|
|
1057
1150
|
onClick: (e) => e.target === e.currentTarget && onDismiss(),
|
|
1058
1151
|
onKeyDown: (e) => e.key === "Escape" && onDismiss(),
|
|
1059
|
-
children: /* @__PURE__ */ (0,
|
|
1152
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1060
1153
|
Box_default,
|
|
1061
1154
|
{
|
|
1062
1155
|
"data-testid": dataTestId,
|
|
@@ -1069,23 +1162,23 @@ function Modal({
|
|
|
1069
1162
|
width: "100%",
|
|
1070
1163
|
dangerouslySetInlineStyle: { __style: { overflow: "hidden" } },
|
|
1071
1164
|
children: [
|
|
1072
|
-
/* @__PURE__ */ (0,
|
|
1165
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { position: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1073
1166
|
"button",
|
|
1074
1167
|
{
|
|
1075
1168
|
"aria-label": accessibilityCloseLabel,
|
|
1076
1169
|
type: "button",
|
|
1077
|
-
className: (0,
|
|
1170
|
+
className: (0, import_classnames9.default)(Modal_module_default.closeButton, {
|
|
1078
1171
|
[Modal_module_default.closeButtonWithImage]: !!image
|
|
1079
1172
|
}),
|
|
1080
1173
|
onClick: onDismiss,
|
|
1081
|
-
children: /* @__PURE__ */ (0,
|
|
1174
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(XIcon, { color: image ? "#fff" : "#000" })
|
|
1082
1175
|
}
|
|
1083
1176
|
) }),
|
|
1084
|
-
image && /* @__PURE__ */ (0,
|
|
1085
|
-
/* @__PURE__ */ (0,
|
|
1086
|
-
/* @__PURE__ */ (0,
|
|
1087
|
-
/* @__PURE__ */ (0,
|
|
1088
|
-
footer && /* @__PURE__ */ (0,
|
|
1177
|
+
image && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { maxHeight: 200, children: image }),
|
|
1178
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { display: "flex", gap: 3, direction: "column", padding: 9, children: [
|
|
1179
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Heading_default, { as: "h1", size: 500, children: header }),
|
|
1180
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { marginBottom: 4, children }),
|
|
1181
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1089
1182
|
Box_default,
|
|
1090
1183
|
{
|
|
1091
1184
|
display: "flex",
|
|
@@ -1109,13 +1202,13 @@ Modal.displayName = "Modal";
|
|
|
1109
1202
|
|
|
1110
1203
|
// src/RadioButton/RadioButton.tsx
|
|
1111
1204
|
var import_react8 = require("react");
|
|
1112
|
-
var
|
|
1205
|
+
var import_classnames10 = __toESM(require_classnames());
|
|
1113
1206
|
|
|
1114
1207
|
// css-module:./RadioButton.module.css#css-module
|
|
1115
1208
|
var RadioButton_module_default = { "radioBaseContainer": "_radioBaseContainer_6h2zg_1", "disabled": "_disabled_6h2zg_9", "cursorDisabled": "_cursorDisabled_6h2zg_13", "cursorEnabled": "_cursorEnabled_6h2zg_17", "smBase": "_smBase_6h2zg_21", "mdBase": "_mdBase_6h2zg_25", "radioStyleOverride": "_radioStyleOverride_6h2zg_29", "smOverride": "_smOverride_6h2zg_34", "mdOverride": "_mdOverride_6h2zg_39", "background": "_background_6h2zg_44", "sm": "_sm_6h2zg_21", "md": "_md_6h2zg_25", "neutralBorder": "_neutralBorder_6h2zg_61", "smCheckedBorder": "_smCheckedBorder_6h2zg_65", "mdCheckedBorder": "_mdCheckedBorder_6h2zg_69", "errorBorderColor": "_errorBorderColor_6h2zg_73", "borderColor": "_borderColor_6h2zg_77" };
|
|
1116
1209
|
|
|
1117
1210
|
// src/RadioButton/RadioButton.tsx
|
|
1118
|
-
var
|
|
1211
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1119
1212
|
var RadioButton = ({
|
|
1120
1213
|
checked = false,
|
|
1121
1214
|
"data-testid": dataTestId,
|
|
@@ -1130,15 +1223,15 @@ var RadioButton = ({
|
|
|
1130
1223
|
}) => {
|
|
1131
1224
|
const [isFocused, setIsFocused] = (0, import_react8.useState)(false);
|
|
1132
1225
|
const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
|
|
1133
|
-
const sharedStyles = (0,
|
|
1226
|
+
const sharedStyles = (0, import_classnames10.default)(RadioButton_module_default.background, RadioButton_module_default[size], {
|
|
1134
1227
|
[RadioButton_module_default.errorBorderColor]: error,
|
|
1135
1228
|
[RadioButton_module_default.borderColor]: !error,
|
|
1136
1229
|
[Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
|
|
1137
1230
|
});
|
|
1138
|
-
return /* @__PURE__ */ (0,
|
|
1231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1139
1232
|
"label",
|
|
1140
1233
|
{
|
|
1141
|
-
className: (0,
|
|
1234
|
+
className: (0, import_classnames10.default)(
|
|
1142
1235
|
RadioButton_module_default.radioBaseContainer,
|
|
1143
1236
|
RadioButton_module_default[`cursor${disabled ? "Disabled" : "Enabled"}`],
|
|
1144
1237
|
{
|
|
@@ -1148,23 +1241,23 @@ var RadioButton = ({
|
|
|
1148
1241
|
}
|
|
1149
1242
|
),
|
|
1150
1243
|
children: [
|
|
1151
|
-
checked ? /* @__PURE__ */ (0,
|
|
1244
|
+
checked ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1152
1245
|
"div",
|
|
1153
1246
|
{
|
|
1154
|
-
className: (0,
|
|
1247
|
+
className: (0, import_classnames10.default)(sharedStyles, {
|
|
1155
1248
|
[RadioButton_module_default.mdCheckedBorder]: size === "md",
|
|
1156
1249
|
[RadioButton_module_default.smCheckedBorder]: size === "sm"
|
|
1157
1250
|
})
|
|
1158
1251
|
}
|
|
1159
|
-
) : /* @__PURE__ */ (0,
|
|
1160
|
-
/* @__PURE__ */ (0,
|
|
1252
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: (0, import_classnames10.default)(sharedStyles, RadioButton_module_default.neutralBorder) }),
|
|
1253
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1161
1254
|
"input",
|
|
1162
1255
|
{
|
|
1163
1256
|
"data-testid": dataTestId,
|
|
1164
1257
|
type: "radio",
|
|
1165
1258
|
id,
|
|
1166
1259
|
name,
|
|
1167
|
-
className: (0,
|
|
1260
|
+
className: (0, import_classnames10.default)(
|
|
1168
1261
|
RadioButton_module_default.radioStyleOverride,
|
|
1169
1262
|
RadioButton_module_default[`cursor${disabled ? "Disabled" : "Enabled"}`],
|
|
1170
1263
|
{
|
|
@@ -1184,7 +1277,7 @@ var RadioButton = ({
|
|
|
1184
1277
|
}
|
|
1185
1278
|
}
|
|
1186
1279
|
),
|
|
1187
|
-
label && /* @__PURE__ */ (0,
|
|
1280
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1188
1281
|
Typography_default,
|
|
1189
1282
|
{
|
|
1190
1283
|
size: size === "md" ? 200 : 100,
|
|
@@ -1200,7 +1293,7 @@ var RadioButton_default = RadioButton;
|
|
|
1200
1293
|
|
|
1201
1294
|
// src/SelectList/SelectList.tsx
|
|
1202
1295
|
var import_react9 = require("react");
|
|
1203
|
-
var
|
|
1296
|
+
var import_classnames11 = __toESM(require_classnames());
|
|
1204
1297
|
|
|
1205
1298
|
// ../syntax-design-tokens/dist/js/index.js
|
|
1206
1299
|
var ColorBaseDestructive700 = "#d32a4b";
|
|
@@ -1210,17 +1303,17 @@ var ColorBaseGray800 = "#353535";
|
|
|
1210
1303
|
var SelectList_module_default = { "selectContainer": "_selectContainer_1cdwo_1", "opacityOverlay": "_opacityOverlay_1cdwo_7", "outerTextContainer": "_outerTextContainer_1cdwo_11", "selectWrapper": "_selectWrapper_1cdwo_16", "selectBox": "_selectBox_1cdwo_21", "selectMouseFocusStyling": "_selectMouseFocusStyling_1cdwo_37", "unselected": "_unselected_1cdwo_42", "selected": "_selected_1cdwo_46", "arrowIcon": "_arrowIcon_1cdwo_50", "sm": "_sm_1cdwo_64", "md": "_md_1cdwo_70", "lg": "_lg_1cdwo_76", "selectError": "_selectError_1cdwo_82" };
|
|
1211
1304
|
|
|
1212
1305
|
// src/SelectList/SelectOption.tsx
|
|
1213
|
-
var
|
|
1306
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1214
1307
|
var SelectOption = ({
|
|
1215
1308
|
"data-testid": dataTestId,
|
|
1216
1309
|
value,
|
|
1217
1310
|
label,
|
|
1218
1311
|
disabled = false
|
|
1219
|
-
}) => /* @__PURE__ */ (0,
|
|
1312
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { "data-testid": dataTestId, value, disabled, children: label });
|
|
1220
1313
|
var SelectOption_default = SelectOption;
|
|
1221
1314
|
|
|
1222
1315
|
// src/SelectList/SelectList.tsx
|
|
1223
|
-
var
|
|
1316
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1224
1317
|
var iconSize3 = {
|
|
1225
1318
|
sm: 20,
|
|
1226
1319
|
md: 24,
|
|
@@ -1242,22 +1335,22 @@ function SelectList({
|
|
|
1242
1335
|
const id = (0, import_react9.useId)();
|
|
1243
1336
|
const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
|
|
1244
1337
|
const [isFocused, setIsFocused] = (0, import_react9.useState)(false);
|
|
1245
|
-
return /* @__PURE__ */ (0,
|
|
1338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1246
1339
|
"div",
|
|
1247
1340
|
{
|
|
1248
|
-
className: (0,
|
|
1341
|
+
className: (0, import_classnames11.default)(SelectList_module_default.selectContainer, {
|
|
1249
1342
|
[SelectList_module_default.opacityOverlay]: disabled
|
|
1250
1343
|
}),
|
|
1251
1344
|
children: [
|
|
1252
|
-
label && /* @__PURE__ */ (0,
|
|
1253
|
-
/* @__PURE__ */ (0,
|
|
1254
|
-
/* @__PURE__ */ (0,
|
|
1345
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { htmlFor: id, className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Typography_default, { size: 100, color: "gray700", children: label }) }),
|
|
1346
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: SelectList_module_default.selectWrapper, children: [
|
|
1347
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1255
1348
|
"select",
|
|
1256
1349
|
{
|
|
1257
1350
|
id,
|
|
1258
1351
|
"data-testid": dataTestId,
|
|
1259
1352
|
disabled,
|
|
1260
|
-
className: (0,
|
|
1353
|
+
className: (0, import_classnames11.default)(SelectList_module_default.selectBox, SelectList_module_default[size], {
|
|
1261
1354
|
[SelectList_module_default.unselected]: !selectedValue && !errorText,
|
|
1262
1355
|
[SelectList_module_default.selected]: selectedValue && !errorText,
|
|
1263
1356
|
[SelectList_module_default.selectError]: errorText,
|
|
@@ -1272,19 +1365,19 @@ function SelectList({
|
|
|
1272
1365
|
onFocus: () => setIsFocused(true),
|
|
1273
1366
|
onBlur: () => setIsFocused(false),
|
|
1274
1367
|
children: [
|
|
1275
|
-
placeholderText && /* @__PURE__ */ (0,
|
|
1368
|
+
placeholderText && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { disabled: true, value: placeholderText, children: placeholderText }),
|
|
1276
1369
|
children
|
|
1277
1370
|
]
|
|
1278
1371
|
}
|
|
1279
1372
|
),
|
|
1280
|
-
/* @__PURE__ */ (0,
|
|
1373
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: SelectList_module_default.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1281
1374
|
"svg",
|
|
1282
1375
|
{
|
|
1283
1376
|
focusable: "false",
|
|
1284
1377
|
"aria-hidden": "true",
|
|
1285
1378
|
viewBox: "0 0 24 24",
|
|
1286
1379
|
width: iconSize3[size],
|
|
1287
|
-
children: /* @__PURE__ */ (0,
|
|
1380
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1288
1381
|
"path",
|
|
1289
1382
|
{
|
|
1290
1383
|
fill: errorText ? ColorBaseDestructive700 : ColorBaseGray800,
|
|
@@ -1294,7 +1387,7 @@ function SelectList({
|
|
|
1294
1387
|
}
|
|
1295
1388
|
) })
|
|
1296
1389
|
] }),
|
|
1297
|
-
(helperText || errorText) && /* @__PURE__ */ (0,
|
|
1390
|
+
(helperText || errorText) && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1298
1391
|
Typography_default,
|
|
1299
1392
|
{
|
|
1300
1393
|
size: 100,
|
|
@@ -1310,13 +1403,13 @@ SelectList.Option = SelectOption_default;
|
|
|
1310
1403
|
|
|
1311
1404
|
// src/TextField/TextField.tsx
|
|
1312
1405
|
var import_react10 = require("react");
|
|
1313
|
-
var
|
|
1406
|
+
var import_classnames12 = __toESM(require_classnames());
|
|
1314
1407
|
|
|
1315
1408
|
// css-module:./TextField.module.css#css-module
|
|
1316
1409
|
var TextField_module_default = { "textfield": "_textfield_cltsv_1", "label": "_label_cltsv_21", "sm": "_sm_cltsv_25", "md": "_md_cltsv_30", "lg": "_lg_cltsv_35", "inputError": "_inputError_cltsv_40" };
|
|
1317
1410
|
|
|
1318
1411
|
// src/TextField/TextField.tsx
|
|
1319
|
-
var
|
|
1412
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1320
1413
|
function TextField({
|
|
1321
1414
|
autoComplete,
|
|
1322
1415
|
"data-testid": dataTestId,
|
|
@@ -1333,7 +1426,7 @@ function TextField({
|
|
|
1333
1426
|
}) {
|
|
1334
1427
|
const reactId = (0, import_react10.useId)();
|
|
1335
1428
|
const inputId = id != null ? id : reactId;
|
|
1336
|
-
return /* @__PURE__ */ (0,
|
|
1429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1337
1430
|
Box_default,
|
|
1338
1431
|
{
|
|
1339
1432
|
display: "flex",
|
|
@@ -1346,12 +1439,12 @@ function TextField({
|
|
|
1346
1439
|
}
|
|
1347
1440
|
},
|
|
1348
1441
|
children: [
|
|
1349
|
-
label && /* @__PURE__ */ (0,
|
|
1350
|
-
/* @__PURE__ */ (0,
|
|
1442
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { className: TextField_module_default.label, htmlFor: inputId, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Typography_default, { size: 100, color: "gray700", children: label }) }) }),
|
|
1443
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1351
1444
|
"input",
|
|
1352
1445
|
{
|
|
1353
1446
|
autoComplete,
|
|
1354
|
-
className: (0,
|
|
1447
|
+
className: (0, import_classnames12.default)(TextField_module_default.textfield, TextField_module_default[size], {
|
|
1355
1448
|
[TextField_module_default.inputError]: errorText
|
|
1356
1449
|
}),
|
|
1357
1450
|
"data-testid": dataTestId,
|
|
@@ -1363,7 +1456,7 @@ function TextField({
|
|
|
1363
1456
|
value
|
|
1364
1457
|
}
|
|
1365
1458
|
),
|
|
1366
|
-
(helperText || errorText) && /* @__PURE__ */ (0,
|
|
1459
|
+
(helperText || errorText) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1367
1460
|
Typography_default,
|
|
1368
1461
|
{
|
|
1369
1462
|
size: 100,
|
|
@@ -1387,6 +1480,7 @@ function TextField({
|
|
|
1387
1480
|
Divider,
|
|
1388
1481
|
Heading,
|
|
1389
1482
|
IconButton,
|
|
1483
|
+
LinkButton,
|
|
1390
1484
|
MiniActionCard,
|
|
1391
1485
|
Modal,
|
|
1392
1486
|
RadioButton,
|