@cambly/syntax-core 6.4.0 → 6.6.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 +90 -104
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +95 -28
- package/dist/index.js +270 -174
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +263 -168
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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,157 @@ 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_1b3ot_1", "fitContent": "_fitContent_1b3ot_10" };
|
|
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
|
+
rel,
|
|
957
|
+
"data-testid": dataTestId,
|
|
958
|
+
color = "primary",
|
|
959
|
+
size = "md",
|
|
960
|
+
fullWidth = false,
|
|
961
|
+
startIcon: StartIcon,
|
|
962
|
+
endIcon: EndIcon,
|
|
963
|
+
onClick
|
|
964
|
+
}) {
|
|
965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
966
|
+
"a",
|
|
967
|
+
{
|
|
968
|
+
href,
|
|
969
|
+
"data-testid": dataTestId,
|
|
970
|
+
target,
|
|
971
|
+
rel,
|
|
972
|
+
className: (0, import_classnames8.default)(
|
|
973
|
+
LinkButton_module_default.linkButton,
|
|
974
|
+
Button_module_default3.button,
|
|
975
|
+
foregroundColor(color),
|
|
976
|
+
backgroundColor(color),
|
|
977
|
+
Button_module_default3[size],
|
|
978
|
+
{
|
|
979
|
+
[Button_module_default3.fullWidth]: fullWidth,
|
|
980
|
+
[LinkButton_module_default.fitContent]: !fullWidth,
|
|
981
|
+
[Button_module_default3.buttonGap]: size === "lg" || size === "md",
|
|
982
|
+
[Button_module_default3.secondaryBorder]: color === "secondary",
|
|
983
|
+
[Button_module_default3.secondaryDestructiveBorder]: color === "destructive-secondary"
|
|
984
|
+
}
|
|
985
|
+
),
|
|
986
|
+
onClick,
|
|
987
|
+
children: [
|
|
988
|
+
StartIcon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(StartIcon, { className: (0, import_classnames8.default)(Button_module_default3.icon, iconSize_default[size]) }),
|
|
989
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
990
|
+
Typography_default,
|
|
991
|
+
{
|
|
992
|
+
color: foregroundTypographyColor(color),
|
|
993
|
+
size: textVariant_default[size],
|
|
994
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { style: { fontWeight: 500 }, children: text })
|
|
995
|
+
}
|
|
996
|
+
),
|
|
997
|
+
EndIcon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(EndIcon, { className: (0, import_classnames8.default)(Button_module_default3.icon, iconSize_default[size]) })
|
|
998
|
+
]
|
|
999
|
+
}
|
|
1000
|
+
);
|
|
1001
|
+
}
|
|
1002
|
+
|
|
908
1003
|
// css-module:./MiniActionCard.module.css#css-module
|
|
909
1004
|
var MiniActionCard_module_default = { "miniActionCard": "_miniActionCard_qebkn_1", "card": "_card_qebkn_9" };
|
|
910
1005
|
|
|
911
1006
|
// src/MiniActionCard/MiniActionCard.tsx
|
|
912
|
-
var
|
|
1007
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
913
1008
|
var MiniActionCard = ({
|
|
914
1009
|
children
|
|
915
|
-
}) => /* @__PURE__ */ (0,
|
|
1010
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: MiniActionCard_module_default.miniActionCard, children });
|
|
916
1011
|
var MiniActionCard_default = MiniActionCard;
|
|
917
1012
|
|
|
918
1013
|
// src/Modal/Modal.tsx
|
|
919
|
-
var
|
|
1014
|
+
var import_classnames9 = __toESM(require_classnames());
|
|
920
1015
|
|
|
921
1016
|
// src/Modal/FocusTrap.tsx
|
|
922
1017
|
var import_react6 = require("react");
|
|
923
|
-
var
|
|
1018
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
924
1019
|
function queryFocusableAll(el) {
|
|
925
1020
|
const selector = [
|
|
926
1021
|
"a[href]",
|
|
@@ -981,7 +1076,7 @@ function FocusTrap({
|
|
|
981
1076
|
}
|
|
982
1077
|
};
|
|
983
1078
|
}, [elRef, previouslyFocusedElRef]);
|
|
984
|
-
return /* @__PURE__ */ (0,
|
|
1079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { "data-testid": "syntax-focus-trap", ref: elRef, children });
|
|
985
1080
|
}
|
|
986
1081
|
|
|
987
1082
|
// src/Modal/StopScroll.tsx
|
|
@@ -999,13 +1094,13 @@ function StopScroll(props) {
|
|
|
999
1094
|
|
|
1000
1095
|
// src/Modal/Layer.tsx
|
|
1001
1096
|
var import_react_dom = require("react-dom");
|
|
1002
|
-
var
|
|
1097
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1003
1098
|
function Layer({
|
|
1004
1099
|
children,
|
|
1005
1100
|
zIndex = 1
|
|
1006
1101
|
}) {
|
|
1007
1102
|
return (0, import_react_dom.createPortal)(
|
|
1008
|
-
/* @__PURE__ */ (0,
|
|
1103
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1009
1104
|
Box_default,
|
|
1010
1105
|
{
|
|
1011
1106
|
"data-testid": "syntax-layer",
|
|
@@ -1024,9 +1119,9 @@ function Layer({
|
|
|
1024
1119
|
var Modal_module_default = { "backdrop": "_backdrop_30t3h_1", "closeButton": "_closeButton_30t3h_12", "closeButtonWithImage": "_closeButtonWithImage_30t3h_32" };
|
|
1025
1120
|
|
|
1026
1121
|
// src/Modal/Modal.tsx
|
|
1027
|
-
var
|
|
1122
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1028
1123
|
function XIcon({ color = "#000" }) {
|
|
1029
|
-
return /* @__PURE__ */ (0,
|
|
1124
|
+
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
1125
|
"path",
|
|
1031
1126
|
{
|
|
1032
1127
|
fill: "inherit",
|
|
@@ -1049,14 +1144,14 @@ function Modal({
|
|
|
1049
1144
|
zIndex = 1,
|
|
1050
1145
|
"data-testid": dataTestId
|
|
1051
1146
|
}) {
|
|
1052
|
-
return /* @__PURE__ */ (0,
|
|
1147
|
+
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
1148
|
"div",
|
|
1054
1149
|
{
|
|
1055
1150
|
className: Modal_module_default.backdrop,
|
|
1056
1151
|
role: "presentation",
|
|
1057
1152
|
onClick: (e) => e.target === e.currentTarget && onDismiss(),
|
|
1058
1153
|
onKeyDown: (e) => e.key === "Escape" && onDismiss(),
|
|
1059
|
-
children: /* @__PURE__ */ (0,
|
|
1154
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1060
1155
|
Box_default,
|
|
1061
1156
|
{
|
|
1062
1157
|
"data-testid": dataTestId,
|
|
@@ -1069,23 +1164,23 @@ function Modal({
|
|
|
1069
1164
|
width: "100%",
|
|
1070
1165
|
dangerouslySetInlineStyle: { __style: { overflow: "hidden" } },
|
|
1071
1166
|
children: [
|
|
1072
|
-
/* @__PURE__ */ (0,
|
|
1167
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { position: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1073
1168
|
"button",
|
|
1074
1169
|
{
|
|
1075
1170
|
"aria-label": accessibilityCloseLabel,
|
|
1076
1171
|
type: "button",
|
|
1077
|
-
className: (0,
|
|
1172
|
+
className: (0, import_classnames9.default)(Modal_module_default.closeButton, {
|
|
1078
1173
|
[Modal_module_default.closeButtonWithImage]: !!image
|
|
1079
1174
|
}),
|
|
1080
1175
|
onClick: onDismiss,
|
|
1081
|
-
children: /* @__PURE__ */ (0,
|
|
1176
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(XIcon, { color: image ? "#fff" : "#000" })
|
|
1082
1177
|
}
|
|
1083
1178
|
) }),
|
|
1084
|
-
image && /* @__PURE__ */ (0,
|
|
1085
|
-
/* @__PURE__ */ (0,
|
|
1086
|
-
/* @__PURE__ */ (0,
|
|
1087
|
-
/* @__PURE__ */ (0,
|
|
1088
|
-
footer && /* @__PURE__ */ (0,
|
|
1179
|
+
image && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { maxHeight: 200, children: image }),
|
|
1180
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Box_default, { display: "flex", gap: 3, direction: "column", padding: 9, children: [
|
|
1181
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Heading_default, { as: "h1", size: 500, children: header }),
|
|
1182
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { marginBottom: 4, children }),
|
|
1183
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1089
1184
|
Box_default,
|
|
1090
1185
|
{
|
|
1091
1186
|
display: "flex",
|
|
@@ -1109,13 +1204,13 @@ Modal.displayName = "Modal";
|
|
|
1109
1204
|
|
|
1110
1205
|
// src/RadioButton/RadioButton.tsx
|
|
1111
1206
|
var import_react8 = require("react");
|
|
1112
|
-
var
|
|
1207
|
+
var import_classnames10 = __toESM(require_classnames());
|
|
1113
1208
|
|
|
1114
1209
|
// css-module:./RadioButton.module.css#css-module
|
|
1115
1210
|
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
1211
|
|
|
1117
1212
|
// src/RadioButton/RadioButton.tsx
|
|
1118
|
-
var
|
|
1213
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1119
1214
|
var RadioButton = ({
|
|
1120
1215
|
checked = false,
|
|
1121
1216
|
"data-testid": dataTestId,
|
|
@@ -1130,15 +1225,15 @@ var RadioButton = ({
|
|
|
1130
1225
|
}) => {
|
|
1131
1226
|
const [isFocused, setIsFocused] = (0, import_react8.useState)(false);
|
|
1132
1227
|
const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
|
|
1133
|
-
const sharedStyles = (0,
|
|
1228
|
+
const sharedStyles = (0, import_classnames10.default)(RadioButton_module_default.background, RadioButton_module_default[size], {
|
|
1134
1229
|
[RadioButton_module_default.errorBorderColor]: error,
|
|
1135
1230
|
[RadioButton_module_default.borderColor]: !error,
|
|
1136
1231
|
[Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
|
|
1137
1232
|
});
|
|
1138
|
-
return /* @__PURE__ */ (0,
|
|
1233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1139
1234
|
"label",
|
|
1140
1235
|
{
|
|
1141
|
-
className: (0,
|
|
1236
|
+
className: (0, import_classnames10.default)(
|
|
1142
1237
|
RadioButton_module_default.radioBaseContainer,
|
|
1143
1238
|
RadioButton_module_default[`cursor${disabled ? "Disabled" : "Enabled"}`],
|
|
1144
1239
|
{
|
|
@@ -1148,23 +1243,23 @@ var RadioButton = ({
|
|
|
1148
1243
|
}
|
|
1149
1244
|
),
|
|
1150
1245
|
children: [
|
|
1151
|
-
checked ? /* @__PURE__ */ (0,
|
|
1246
|
+
checked ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1152
1247
|
"div",
|
|
1153
1248
|
{
|
|
1154
|
-
className: (0,
|
|
1249
|
+
className: (0, import_classnames10.default)(sharedStyles, {
|
|
1155
1250
|
[RadioButton_module_default.mdCheckedBorder]: size === "md",
|
|
1156
1251
|
[RadioButton_module_default.smCheckedBorder]: size === "sm"
|
|
1157
1252
|
})
|
|
1158
1253
|
}
|
|
1159
|
-
) : /* @__PURE__ */ (0,
|
|
1160
|
-
/* @__PURE__ */ (0,
|
|
1254
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: (0, import_classnames10.default)(sharedStyles, RadioButton_module_default.neutralBorder) }),
|
|
1255
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1161
1256
|
"input",
|
|
1162
1257
|
{
|
|
1163
1258
|
"data-testid": dataTestId,
|
|
1164
1259
|
type: "radio",
|
|
1165
1260
|
id,
|
|
1166
1261
|
name,
|
|
1167
|
-
className: (0,
|
|
1262
|
+
className: (0, import_classnames10.default)(
|
|
1168
1263
|
RadioButton_module_default.radioStyleOverride,
|
|
1169
1264
|
RadioButton_module_default[`cursor${disabled ? "Disabled" : "Enabled"}`],
|
|
1170
1265
|
{
|
|
@@ -1184,7 +1279,7 @@ var RadioButton = ({
|
|
|
1184
1279
|
}
|
|
1185
1280
|
}
|
|
1186
1281
|
),
|
|
1187
|
-
label && /* @__PURE__ */ (0,
|
|
1282
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1188
1283
|
Typography_default,
|
|
1189
1284
|
{
|
|
1190
1285
|
size: size === "md" ? 200 : 100,
|
|
@@ -1200,7 +1295,7 @@ var RadioButton_default = RadioButton;
|
|
|
1200
1295
|
|
|
1201
1296
|
// src/SelectList/SelectList.tsx
|
|
1202
1297
|
var import_react9 = require("react");
|
|
1203
|
-
var
|
|
1298
|
+
var import_classnames11 = __toESM(require_classnames());
|
|
1204
1299
|
|
|
1205
1300
|
// ../syntax-design-tokens/dist/js/index.js
|
|
1206
1301
|
var ColorBaseDestructive700 = "#d32a4b";
|
|
@@ -1210,17 +1305,17 @@ var ColorBaseGray800 = "#353535";
|
|
|
1210
1305
|
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
1306
|
|
|
1212
1307
|
// src/SelectList/SelectOption.tsx
|
|
1213
|
-
var
|
|
1308
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1214
1309
|
var SelectOption = ({
|
|
1215
1310
|
"data-testid": dataTestId,
|
|
1216
1311
|
value,
|
|
1217
1312
|
label,
|
|
1218
1313
|
disabled = false
|
|
1219
|
-
}) => /* @__PURE__ */ (0,
|
|
1314
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { "data-testid": dataTestId, value, disabled, children: label });
|
|
1220
1315
|
var SelectOption_default = SelectOption;
|
|
1221
1316
|
|
|
1222
1317
|
// src/SelectList/SelectList.tsx
|
|
1223
|
-
var
|
|
1318
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1224
1319
|
var iconSize3 = {
|
|
1225
1320
|
sm: 20,
|
|
1226
1321
|
md: 24,
|
|
@@ -1242,22 +1337,22 @@ function SelectList({
|
|
|
1242
1337
|
const id = (0, import_react9.useId)();
|
|
1243
1338
|
const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
|
|
1244
1339
|
const [isFocused, setIsFocused] = (0, import_react9.useState)(false);
|
|
1245
|
-
return /* @__PURE__ */ (0,
|
|
1340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1246
1341
|
"div",
|
|
1247
1342
|
{
|
|
1248
|
-
className: (0,
|
|
1343
|
+
className: (0, import_classnames11.default)(SelectList_module_default.selectContainer, {
|
|
1249
1344
|
[SelectList_module_default.opacityOverlay]: disabled
|
|
1250
1345
|
}),
|
|
1251
1346
|
children: [
|
|
1252
|
-
label && /* @__PURE__ */ (0,
|
|
1253
|
-
/* @__PURE__ */ (0,
|
|
1254
|
-
/* @__PURE__ */ (0,
|
|
1347
|
+
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 }) }),
|
|
1348
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: SelectList_module_default.selectWrapper, children: [
|
|
1349
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1255
1350
|
"select",
|
|
1256
1351
|
{
|
|
1257
1352
|
id,
|
|
1258
1353
|
"data-testid": dataTestId,
|
|
1259
1354
|
disabled,
|
|
1260
|
-
className: (0,
|
|
1355
|
+
className: (0, import_classnames11.default)(SelectList_module_default.selectBox, SelectList_module_default[size], {
|
|
1261
1356
|
[SelectList_module_default.unselected]: !selectedValue && !errorText,
|
|
1262
1357
|
[SelectList_module_default.selected]: selectedValue && !errorText,
|
|
1263
1358
|
[SelectList_module_default.selectError]: errorText,
|
|
@@ -1272,19 +1367,19 @@ function SelectList({
|
|
|
1272
1367
|
onFocus: () => setIsFocused(true),
|
|
1273
1368
|
onBlur: () => setIsFocused(false),
|
|
1274
1369
|
children: [
|
|
1275
|
-
placeholderText && /* @__PURE__ */ (0,
|
|
1370
|
+
placeholderText && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { disabled: true, value: placeholderText, children: placeholderText }),
|
|
1276
1371
|
children
|
|
1277
1372
|
]
|
|
1278
1373
|
}
|
|
1279
1374
|
),
|
|
1280
|
-
/* @__PURE__ */ (0,
|
|
1375
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: SelectList_module_default.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1281
1376
|
"svg",
|
|
1282
1377
|
{
|
|
1283
1378
|
focusable: "false",
|
|
1284
1379
|
"aria-hidden": "true",
|
|
1285
1380
|
viewBox: "0 0 24 24",
|
|
1286
1381
|
width: iconSize3[size],
|
|
1287
|
-
children: /* @__PURE__ */ (0,
|
|
1382
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1288
1383
|
"path",
|
|
1289
1384
|
{
|
|
1290
1385
|
fill: errorText ? ColorBaseDestructive700 : ColorBaseGray800,
|
|
@@ -1294,7 +1389,7 @@ function SelectList({
|
|
|
1294
1389
|
}
|
|
1295
1390
|
) })
|
|
1296
1391
|
] }),
|
|
1297
|
-
(helperText || errorText) && /* @__PURE__ */ (0,
|
|
1392
|
+
(helperText || errorText) && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1298
1393
|
Typography_default,
|
|
1299
1394
|
{
|
|
1300
1395
|
size: 100,
|
|
@@ -1310,13 +1405,13 @@ SelectList.Option = SelectOption_default;
|
|
|
1310
1405
|
|
|
1311
1406
|
// src/TextField/TextField.tsx
|
|
1312
1407
|
var import_react10 = require("react");
|
|
1313
|
-
var
|
|
1408
|
+
var import_classnames12 = __toESM(require_classnames());
|
|
1314
1409
|
|
|
1315
1410
|
// css-module:./TextField.module.css#css-module
|
|
1316
1411
|
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
1412
|
|
|
1318
1413
|
// src/TextField/TextField.tsx
|
|
1319
|
-
var
|
|
1414
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1320
1415
|
function TextField({
|
|
1321
1416
|
autoComplete,
|
|
1322
1417
|
"data-testid": dataTestId,
|
|
@@ -1333,7 +1428,7 @@ function TextField({
|
|
|
1333
1428
|
}) {
|
|
1334
1429
|
const reactId = (0, import_react10.useId)();
|
|
1335
1430
|
const inputId = id != null ? id : reactId;
|
|
1336
|
-
return /* @__PURE__ */ (0,
|
|
1431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1337
1432
|
Box_default,
|
|
1338
1433
|
{
|
|
1339
1434
|
display: "flex",
|
|
@@ -1346,12 +1441,12 @@ function TextField({
|
|
|
1346
1441
|
}
|
|
1347
1442
|
},
|
|
1348
1443
|
children: [
|
|
1349
|
-
label && /* @__PURE__ */ (0,
|
|
1350
|
-
/* @__PURE__ */ (0,
|
|
1444
|
+
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 }) }) }),
|
|
1445
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1351
1446
|
"input",
|
|
1352
1447
|
{
|
|
1353
1448
|
autoComplete,
|
|
1354
|
-
className: (0,
|
|
1449
|
+
className: (0, import_classnames12.default)(TextField_module_default.textfield, TextField_module_default[size], {
|
|
1355
1450
|
[TextField_module_default.inputError]: errorText
|
|
1356
1451
|
}),
|
|
1357
1452
|
"data-testid": dataTestId,
|
|
@@ -1363,7 +1458,7 @@ function TextField({
|
|
|
1363
1458
|
value
|
|
1364
1459
|
}
|
|
1365
1460
|
),
|
|
1366
|
-
(helperText || errorText) && /* @__PURE__ */ (0,
|
|
1461
|
+
(helperText || errorText) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1367
1462
|
Typography_default,
|
|
1368
1463
|
{
|
|
1369
1464
|
size: 100,
|
|
@@ -1387,6 +1482,7 @@ function TextField({
|
|
|
1387
1482
|
Divider,
|
|
1388
1483
|
Heading,
|
|
1389
1484
|
IconButton,
|
|
1485
|
+
LinkButton,
|
|
1390
1486
|
MiniActionCard,
|
|
1391
1487
|
Modal,
|
|
1392
1488
|
RadioButton,
|