@cambly/syntax-core 6.3.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 +92 -30
- package/dist/index.js +278 -175
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +271 -169
- 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,
|
|
@@ -426,6 +427,15 @@ var Box_default = Box;
|
|
|
426
427
|
|
|
427
428
|
// src/Badge/Badge.tsx
|
|
428
429
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
430
|
+
var textColorForBackgroundColor = (color) => {
|
|
431
|
+
switch (color) {
|
|
432
|
+
case "gray200":
|
|
433
|
+
case "yellow700":
|
|
434
|
+
return "gray900";
|
|
435
|
+
default:
|
|
436
|
+
return "white";
|
|
437
|
+
}
|
|
438
|
+
};
|
|
429
439
|
var Badge = ({
|
|
430
440
|
text,
|
|
431
441
|
color = "primary700"
|
|
@@ -440,7 +450,7 @@ var Badge = ({
|
|
|
440
450
|
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
441
451
|
Typography_default,
|
|
442
452
|
{
|
|
443
|
-
color: color
|
|
453
|
+
color: textColorForBackgroundColor(color),
|
|
444
454
|
size: 100,
|
|
445
455
|
weight: "bold",
|
|
446
456
|
children: text
|
|
@@ -451,6 +461,7 @@ var Badge = ({
|
|
|
451
461
|
var Badge_default = Badge;
|
|
452
462
|
|
|
453
463
|
// src/Button/Button.tsx
|
|
464
|
+
var import_react2 = require("react");
|
|
454
465
|
var import_classnames4 = __toESM(require_classnames());
|
|
455
466
|
|
|
456
467
|
// css-module:./colors.module.css#css-module
|
|
@@ -493,30 +504,54 @@ function foregroundColor(color) {
|
|
|
493
504
|
}
|
|
494
505
|
}
|
|
495
506
|
|
|
496
|
-
// src/
|
|
497
|
-
|
|
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
|
+
}
|
|
498
522
|
|
|
499
|
-
// css-module
|
|
500
|
-
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" };
|
|
501
525
|
|
|
502
|
-
// src/Button/
|
|
503
|
-
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
|
|
504
535
|
var textVariant = {
|
|
505
|
-
|
|
506
|
-
["
|
|
507
|
-
["
|
|
508
|
-
["lg"]: Button_module_default.buttonTextLarge
|
|
536
|
+
["sm"]: 100,
|
|
537
|
+
["md"]: 200,
|
|
538
|
+
["lg"]: 300
|
|
509
539
|
};
|
|
540
|
+
var textVariant_default = textVariant;
|
|
541
|
+
|
|
542
|
+
// src/Button/constants/loadingIconSize.ts
|
|
510
543
|
var loadingIconSize = {
|
|
511
544
|
["sm"]: 16,
|
|
512
545
|
["md"]: 20,
|
|
513
546
|
["lg"]: 24
|
|
514
547
|
};
|
|
515
|
-
var
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
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");
|
|
520
555
|
var Button = (0, import_react2.forwardRef)(
|
|
521
556
|
({
|
|
522
557
|
"data-testid": dataTestId,
|
|
@@ -545,32 +580,39 @@ var Button = (0, import_react2.forwardRef)(
|
|
|
545
580
|
disabled: disabled || loading,
|
|
546
581
|
onClick,
|
|
547
582
|
className: (0, import_classnames4.default)(
|
|
548
|
-
|
|
583
|
+
Button_module_default2.button,
|
|
549
584
|
foregroundColor(color),
|
|
550
585
|
backgroundColor(color),
|
|
551
|
-
|
|
586
|
+
Button_module_default2[size],
|
|
552
587
|
{
|
|
553
|
-
[
|
|
554
|
-
[
|
|
555
|
-
[
|
|
556
|
-
[
|
|
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"
|
|
557
592
|
}
|
|
558
593
|
),
|
|
559
594
|
children: [
|
|
560
|
-
!loading && StartIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StartIcon, { className: (0, import_classnames4.default)(
|
|
561
|
-
(loading && loadingText || !loading && text) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
562
|
-
|
|
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]) }),
|
|
563
605
|
loading && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
564
606
|
"svg",
|
|
565
607
|
{
|
|
566
|
-
className: (0, import_classnames4.default)(
|
|
608
|
+
className: (0, import_classnames4.default)(Button_module_default2.loading, foregroundColor(color)),
|
|
567
609
|
viewBox: "22 22 44 44",
|
|
568
|
-
width:
|
|
569
|
-
height:
|
|
610
|
+
width: loadingIconSize_default[size],
|
|
611
|
+
height: loadingIconSize_default[size],
|
|
570
612
|
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
571
613
|
"circle",
|
|
572
614
|
{
|
|
573
|
-
className:
|
|
615
|
+
className: Button_module_default2.loadingCircle,
|
|
574
616
|
cx: "44",
|
|
575
617
|
cy: "44",
|
|
576
618
|
r: "20.2",
|
|
@@ -638,85 +680,12 @@ function Card({
|
|
|
638
680
|
);
|
|
639
681
|
}
|
|
640
682
|
|
|
641
|
-
// css-module:./Divider.module.css#css-module
|
|
642
|
-
var Divider_module_default = { "divider": "_divider_1ddgq_1" };
|
|
643
|
-
|
|
644
|
-
// src/Divider/Divider.tsx
|
|
645
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
646
|
-
function Divider() {
|
|
647
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("hr", { className: Divider_module_default.divider });
|
|
648
|
-
}
|
|
649
|
-
Divider.displayName = "Divider";
|
|
650
|
-
|
|
651
|
-
// src/Heading/Heading.tsx
|
|
652
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
653
|
-
var Heading = ({
|
|
654
|
-
align = "start",
|
|
655
|
-
as = "h1",
|
|
656
|
-
children,
|
|
657
|
-
color = "gray900",
|
|
658
|
-
size = 500
|
|
659
|
-
}) => {
|
|
660
|
-
const weight = [700, 800].includes(size) ? "heavy" : "bold";
|
|
661
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Typography_default, { align, as, color, size, weight, children });
|
|
662
|
-
};
|
|
663
|
-
var Heading_default = Heading;
|
|
664
|
-
|
|
665
|
-
// src/IconButton/IconButton.tsx
|
|
666
|
-
var import_classnames6 = __toESM(require_classnames());
|
|
667
|
-
var import_react3 = require("react");
|
|
668
|
-
|
|
669
|
-
// css-module:./IconButton.module.css#css-module
|
|
670
|
-
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" };
|
|
671
|
-
|
|
672
|
-
// src/IconButton/IconButton.tsx
|
|
673
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
674
|
-
var iconSize2 = {
|
|
675
|
-
["sm"]: IconButton_module_default.smIcon,
|
|
676
|
-
["md"]: IconButton_module_default.mdIcon,
|
|
677
|
-
["lg"]: IconButton_module_default.lgIcon
|
|
678
|
-
};
|
|
679
|
-
var IconButton = (0, import_react3.forwardRef)(
|
|
680
|
-
({
|
|
681
|
-
accessibilityLabel,
|
|
682
|
-
color = "primary",
|
|
683
|
-
"data-testid": dataTestId,
|
|
684
|
-
disabled = false,
|
|
685
|
-
icon: Icon,
|
|
686
|
-
size = "md",
|
|
687
|
-
tooltip,
|
|
688
|
-
onClick
|
|
689
|
-
}, ref) => {
|
|
690
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
691
|
-
"button",
|
|
692
|
-
{
|
|
693
|
-
"aria-label": accessibilityLabel,
|
|
694
|
-
"data-testid": dataTestId,
|
|
695
|
-
type: "button",
|
|
696
|
-
title: tooltip,
|
|
697
|
-
disabled,
|
|
698
|
-
onClick,
|
|
699
|
-
className: (0, import_classnames6.default)(
|
|
700
|
-
IconButton_module_default.iconButton,
|
|
701
|
-
foregroundColor(color),
|
|
702
|
-
backgroundColor(color),
|
|
703
|
-
IconButton_module_default[size]
|
|
704
|
-
),
|
|
705
|
-
ref,
|
|
706
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { className: iconSize2[size] })
|
|
707
|
-
}
|
|
708
|
-
);
|
|
709
|
-
}
|
|
710
|
-
);
|
|
711
|
-
IconButton.displayName = "IconButton";
|
|
712
|
-
var IconButton_default = IconButton;
|
|
713
|
-
|
|
714
683
|
// src/Checkbox/Checkbox.tsx
|
|
715
|
-
var
|
|
716
|
-
var
|
|
684
|
+
var import_react4 = require("react");
|
|
685
|
+
var import_classnames6 = __toESM(require_classnames());
|
|
717
686
|
|
|
718
687
|
// src/useFocusVisible.tsx
|
|
719
|
-
var
|
|
688
|
+
var import_react3 = require("react");
|
|
720
689
|
var hasSetupGlobalListeners = false;
|
|
721
690
|
var currentModality = null;
|
|
722
691
|
var changeHandlers = /* @__PURE__ */ new Set();
|
|
@@ -792,8 +761,8 @@ function setupGlobalFocusEvents() {
|
|
|
792
761
|
}
|
|
793
762
|
function useFocusVisible() {
|
|
794
763
|
setupGlobalFocusEvents();
|
|
795
|
-
const [isFocusVisibleState, setFocusVisible] = (0,
|
|
796
|
-
(0,
|
|
764
|
+
const [isFocusVisibleState, setFocusVisible] = (0, import_react3.useState)(isFocusVisible());
|
|
765
|
+
(0, import_react3.useEffect)(() => {
|
|
797
766
|
const handler = () => {
|
|
798
767
|
setFocusVisible(isFocusVisible());
|
|
799
768
|
};
|
|
@@ -812,7 +781,7 @@ var Checkbox_module_default = { "mainContainer": "_mainContainer_1omm6_1", "inpu
|
|
|
812
781
|
var Focus_module_default = { "accessibilityOutlineFocus": "_accessibilityOutlineFocus_1h8bq_1" };
|
|
813
782
|
|
|
814
783
|
// src/Checkbox/Checkbox.tsx
|
|
815
|
-
var
|
|
784
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
816
785
|
var typographySize = {
|
|
817
786
|
sm: 100,
|
|
818
787
|
md: 200
|
|
@@ -830,23 +799,23 @@ var Checkbox = ({
|
|
|
830
799
|
error = false,
|
|
831
800
|
onChange
|
|
832
801
|
}) => {
|
|
833
|
-
const [isFocused, setIsFocused] = (0,
|
|
802
|
+
const [isFocused, setIsFocused] = (0, import_react4.useState)(false);
|
|
834
803
|
const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
|
|
835
|
-
const checkboxStyling = (0,
|
|
836
|
-
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, {
|
|
837
806
|
[Checkbox_module_default.uncheckedBorder]: !error,
|
|
838
807
|
[Checkbox_module_default.uncheckedErrorBorder]: error,
|
|
839
808
|
[Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
|
|
840
809
|
});
|
|
841
|
-
const checkedStyling = (0,
|
|
810
|
+
const checkedStyling = (0, import_classnames6.default)(checkboxStyling, Checkbox_module_default.checkedBox, {
|
|
842
811
|
[Checkbox_module_default.checkedNonError]: !error,
|
|
843
812
|
[Checkbox_module_default.checkedError]: error,
|
|
844
813
|
[Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
|
|
845
814
|
});
|
|
846
|
-
return /* @__PURE__ */ (0,
|
|
815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
847
816
|
"label",
|
|
848
817
|
{
|
|
849
|
-
className: (0,
|
|
818
|
+
className: (0, import_classnames6.default)(
|
|
850
819
|
Checkbox_module_default.mainContainer,
|
|
851
820
|
Checkbox_module_default[`cursor${disabled ? "Disabled" : "Enabled"}`],
|
|
852
821
|
{
|
|
@@ -854,19 +823,19 @@ var Checkbox = ({
|
|
|
854
823
|
}
|
|
855
824
|
),
|
|
856
825
|
children: [
|
|
857
|
-
/* @__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)(
|
|
858
827
|
"path",
|
|
859
828
|
{
|
|
860
829
|
fill: "#fff",
|
|
861
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"
|
|
862
831
|
}
|
|
863
832
|
) }) }),
|
|
864
|
-
/* @__PURE__ */ (0,
|
|
833
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
865
834
|
"input",
|
|
866
835
|
{
|
|
867
836
|
"data-testid": dataTestId,
|
|
868
837
|
type: "checkbox",
|
|
869
|
-
className: (0,
|
|
838
|
+
className: (0, import_classnames6.default)(
|
|
870
839
|
Checkbox_module_default.inputOverlay,
|
|
871
840
|
Checkbox_module_default[size],
|
|
872
841
|
Checkbox_module_default[`cursor${disabled ? "Disabled" : "Enabled"}`]
|
|
@@ -882,7 +851,7 @@ var Checkbox = ({
|
|
|
882
851
|
}
|
|
883
852
|
}
|
|
884
853
|
),
|
|
885
|
-
/* @__PURE__ */ (0,
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
886
855
|
Typography_default,
|
|
887
856
|
{
|
|
888
857
|
size: typographySize[size],
|
|
@@ -896,22 +865,155 @@ var Checkbox = ({
|
|
|
896
865
|
};
|
|
897
866
|
var Checkbox_default = Checkbox;
|
|
898
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
|
+
|
|
899
1001
|
// css-module:./MiniActionCard.module.css#css-module
|
|
900
1002
|
var MiniActionCard_module_default = { "miniActionCard": "_miniActionCard_qebkn_1", "card": "_card_qebkn_9" };
|
|
901
1003
|
|
|
902
1004
|
// src/MiniActionCard/MiniActionCard.tsx
|
|
903
|
-
var
|
|
1005
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
904
1006
|
var MiniActionCard = ({
|
|
905
1007
|
children
|
|
906
|
-
}) => /* @__PURE__ */ (0,
|
|
1008
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: MiniActionCard_module_default.miniActionCard, children });
|
|
907
1009
|
var MiniActionCard_default = MiniActionCard;
|
|
908
1010
|
|
|
909
1011
|
// src/Modal/Modal.tsx
|
|
910
|
-
var
|
|
1012
|
+
var import_classnames9 = __toESM(require_classnames());
|
|
911
1013
|
|
|
912
1014
|
// src/Modal/FocusTrap.tsx
|
|
913
1015
|
var import_react6 = require("react");
|
|
914
|
-
var
|
|
1016
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
915
1017
|
function queryFocusableAll(el) {
|
|
916
1018
|
const selector = [
|
|
917
1019
|
"a[href]",
|
|
@@ -972,7 +1074,7 @@ function FocusTrap({
|
|
|
972
1074
|
}
|
|
973
1075
|
};
|
|
974
1076
|
}, [elRef, previouslyFocusedElRef]);
|
|
975
|
-
return /* @__PURE__ */ (0,
|
|
1077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { "data-testid": "syntax-focus-trap", ref: elRef, children });
|
|
976
1078
|
}
|
|
977
1079
|
|
|
978
1080
|
// src/Modal/StopScroll.tsx
|
|
@@ -990,13 +1092,13 @@ function StopScroll(props) {
|
|
|
990
1092
|
|
|
991
1093
|
// src/Modal/Layer.tsx
|
|
992
1094
|
var import_react_dom = require("react-dom");
|
|
993
|
-
var
|
|
1095
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
994
1096
|
function Layer({
|
|
995
1097
|
children,
|
|
996
1098
|
zIndex = 1
|
|
997
1099
|
}) {
|
|
998
1100
|
return (0, import_react_dom.createPortal)(
|
|
999
|
-
/* @__PURE__ */ (0,
|
|
1101
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1000
1102
|
Box_default,
|
|
1001
1103
|
{
|
|
1002
1104
|
"data-testid": "syntax-layer",
|
|
@@ -1015,9 +1117,9 @@ function Layer({
|
|
|
1015
1117
|
var Modal_module_default = { "backdrop": "_backdrop_30t3h_1", "closeButton": "_closeButton_30t3h_12", "closeButtonWithImage": "_closeButtonWithImage_30t3h_32" };
|
|
1016
1118
|
|
|
1017
1119
|
// src/Modal/Modal.tsx
|
|
1018
|
-
var
|
|
1120
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1019
1121
|
function XIcon({ color = "#000" }) {
|
|
1020
|
-
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)(
|
|
1021
1123
|
"path",
|
|
1022
1124
|
{
|
|
1023
1125
|
fill: "inherit",
|
|
@@ -1040,14 +1142,14 @@ function Modal({
|
|
|
1040
1142
|
zIndex = 1,
|
|
1041
1143
|
"data-testid": dataTestId
|
|
1042
1144
|
}) {
|
|
1043
|
-
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)(
|
|
1044
1146
|
"div",
|
|
1045
1147
|
{
|
|
1046
1148
|
className: Modal_module_default.backdrop,
|
|
1047
1149
|
role: "presentation",
|
|
1048
1150
|
onClick: (e) => e.target === e.currentTarget && onDismiss(),
|
|
1049
1151
|
onKeyDown: (e) => e.key === "Escape" && onDismiss(),
|
|
1050
|
-
children: /* @__PURE__ */ (0,
|
|
1152
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1051
1153
|
Box_default,
|
|
1052
1154
|
{
|
|
1053
1155
|
"data-testid": dataTestId,
|
|
@@ -1060,23 +1162,23 @@ function Modal({
|
|
|
1060
1162
|
width: "100%",
|
|
1061
1163
|
dangerouslySetInlineStyle: { __style: { overflow: "hidden" } },
|
|
1062
1164
|
children: [
|
|
1063
|
-
/* @__PURE__ */ (0,
|
|
1165
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Box_default, { position: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1064
1166
|
"button",
|
|
1065
1167
|
{
|
|
1066
1168
|
"aria-label": accessibilityCloseLabel,
|
|
1067
1169
|
type: "button",
|
|
1068
|
-
className: (0,
|
|
1170
|
+
className: (0, import_classnames9.default)(Modal_module_default.closeButton, {
|
|
1069
1171
|
[Modal_module_default.closeButtonWithImage]: !!image
|
|
1070
1172
|
}),
|
|
1071
1173
|
onClick: onDismiss,
|
|
1072
|
-
children: /* @__PURE__ */ (0,
|
|
1174
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(XIcon, { color: image ? "#fff" : "#000" })
|
|
1073
1175
|
}
|
|
1074
1176
|
) }),
|
|
1075
|
-
image && /* @__PURE__ */ (0,
|
|
1076
|
-
/* @__PURE__ */ (0,
|
|
1077
|
-
/* @__PURE__ */ (0,
|
|
1078
|
-
/* @__PURE__ */ (0,
|
|
1079
|
-
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)(
|
|
1080
1182
|
Box_default,
|
|
1081
1183
|
{
|
|
1082
1184
|
display: "flex",
|
|
@@ -1100,13 +1202,13 @@ Modal.displayName = "Modal";
|
|
|
1100
1202
|
|
|
1101
1203
|
// src/RadioButton/RadioButton.tsx
|
|
1102
1204
|
var import_react8 = require("react");
|
|
1103
|
-
var
|
|
1205
|
+
var import_classnames10 = __toESM(require_classnames());
|
|
1104
1206
|
|
|
1105
1207
|
// css-module:./RadioButton.module.css#css-module
|
|
1106
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" };
|
|
1107
1209
|
|
|
1108
1210
|
// src/RadioButton/RadioButton.tsx
|
|
1109
|
-
var
|
|
1211
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1110
1212
|
var RadioButton = ({
|
|
1111
1213
|
checked = false,
|
|
1112
1214
|
"data-testid": dataTestId,
|
|
@@ -1121,15 +1223,15 @@ var RadioButton = ({
|
|
|
1121
1223
|
}) => {
|
|
1122
1224
|
const [isFocused, setIsFocused] = (0, import_react8.useState)(false);
|
|
1123
1225
|
const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
|
|
1124
|
-
const sharedStyles = (0,
|
|
1226
|
+
const sharedStyles = (0, import_classnames10.default)(RadioButton_module_default.background, RadioButton_module_default[size], {
|
|
1125
1227
|
[RadioButton_module_default.errorBorderColor]: error,
|
|
1126
1228
|
[RadioButton_module_default.borderColor]: !error,
|
|
1127
1229
|
[Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
|
|
1128
1230
|
});
|
|
1129
|
-
return /* @__PURE__ */ (0,
|
|
1231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1130
1232
|
"label",
|
|
1131
1233
|
{
|
|
1132
|
-
className: (0,
|
|
1234
|
+
className: (0, import_classnames10.default)(
|
|
1133
1235
|
RadioButton_module_default.radioBaseContainer,
|
|
1134
1236
|
RadioButton_module_default[`cursor${disabled ? "Disabled" : "Enabled"}`],
|
|
1135
1237
|
{
|
|
@@ -1139,23 +1241,23 @@ var RadioButton = ({
|
|
|
1139
1241
|
}
|
|
1140
1242
|
),
|
|
1141
1243
|
children: [
|
|
1142
|
-
checked ? /* @__PURE__ */ (0,
|
|
1244
|
+
checked ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1143
1245
|
"div",
|
|
1144
1246
|
{
|
|
1145
|
-
className: (0,
|
|
1247
|
+
className: (0, import_classnames10.default)(sharedStyles, {
|
|
1146
1248
|
[RadioButton_module_default.mdCheckedBorder]: size === "md",
|
|
1147
1249
|
[RadioButton_module_default.smCheckedBorder]: size === "sm"
|
|
1148
1250
|
})
|
|
1149
1251
|
}
|
|
1150
|
-
) : /* @__PURE__ */ (0,
|
|
1151
|
-
/* @__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)(
|
|
1152
1254
|
"input",
|
|
1153
1255
|
{
|
|
1154
1256
|
"data-testid": dataTestId,
|
|
1155
1257
|
type: "radio",
|
|
1156
1258
|
id,
|
|
1157
1259
|
name,
|
|
1158
|
-
className: (0,
|
|
1260
|
+
className: (0, import_classnames10.default)(
|
|
1159
1261
|
RadioButton_module_default.radioStyleOverride,
|
|
1160
1262
|
RadioButton_module_default[`cursor${disabled ? "Disabled" : "Enabled"}`],
|
|
1161
1263
|
{
|
|
@@ -1175,7 +1277,7 @@ var RadioButton = ({
|
|
|
1175
1277
|
}
|
|
1176
1278
|
}
|
|
1177
1279
|
),
|
|
1178
|
-
label && /* @__PURE__ */ (0,
|
|
1280
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1179
1281
|
Typography_default,
|
|
1180
1282
|
{
|
|
1181
1283
|
size: size === "md" ? 200 : 100,
|
|
@@ -1191,7 +1293,7 @@ var RadioButton_default = RadioButton;
|
|
|
1191
1293
|
|
|
1192
1294
|
// src/SelectList/SelectList.tsx
|
|
1193
1295
|
var import_react9 = require("react");
|
|
1194
|
-
var
|
|
1296
|
+
var import_classnames11 = __toESM(require_classnames());
|
|
1195
1297
|
|
|
1196
1298
|
// ../syntax-design-tokens/dist/js/index.js
|
|
1197
1299
|
var ColorBaseDestructive700 = "#d32a4b";
|
|
@@ -1201,17 +1303,17 @@ var ColorBaseGray800 = "#353535";
|
|
|
1201
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" };
|
|
1202
1304
|
|
|
1203
1305
|
// src/SelectList/SelectOption.tsx
|
|
1204
|
-
var
|
|
1306
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1205
1307
|
var SelectOption = ({
|
|
1206
1308
|
"data-testid": dataTestId,
|
|
1207
1309
|
value,
|
|
1208
1310
|
label,
|
|
1209
1311
|
disabled = false
|
|
1210
|
-
}) => /* @__PURE__ */ (0,
|
|
1312
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("option", { "data-testid": dataTestId, value, disabled, children: label });
|
|
1211
1313
|
var SelectOption_default = SelectOption;
|
|
1212
1314
|
|
|
1213
1315
|
// src/SelectList/SelectList.tsx
|
|
1214
|
-
var
|
|
1316
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1215
1317
|
var iconSize3 = {
|
|
1216
1318
|
sm: 20,
|
|
1217
1319
|
md: 24,
|
|
@@ -1233,22 +1335,22 @@ function SelectList({
|
|
|
1233
1335
|
const id = (0, import_react9.useId)();
|
|
1234
1336
|
const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
|
|
1235
1337
|
const [isFocused, setIsFocused] = (0, import_react9.useState)(false);
|
|
1236
|
-
return /* @__PURE__ */ (0,
|
|
1338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1237
1339
|
"div",
|
|
1238
1340
|
{
|
|
1239
|
-
className: (0,
|
|
1341
|
+
className: (0, import_classnames11.default)(SelectList_module_default.selectContainer, {
|
|
1240
1342
|
[SelectList_module_default.opacityOverlay]: disabled
|
|
1241
1343
|
}),
|
|
1242
1344
|
children: [
|
|
1243
|
-
label && /* @__PURE__ */ (0,
|
|
1244
|
-
/* @__PURE__ */ (0,
|
|
1245
|
-
/* @__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)(
|
|
1246
1348
|
"select",
|
|
1247
1349
|
{
|
|
1248
1350
|
id,
|
|
1249
1351
|
"data-testid": dataTestId,
|
|
1250
1352
|
disabled,
|
|
1251
|
-
className: (0,
|
|
1353
|
+
className: (0, import_classnames11.default)(SelectList_module_default.selectBox, SelectList_module_default[size], {
|
|
1252
1354
|
[SelectList_module_default.unselected]: !selectedValue && !errorText,
|
|
1253
1355
|
[SelectList_module_default.selected]: selectedValue && !errorText,
|
|
1254
1356
|
[SelectList_module_default.selectError]: errorText,
|
|
@@ -1263,19 +1365,19 @@ function SelectList({
|
|
|
1263
1365
|
onFocus: () => setIsFocused(true),
|
|
1264
1366
|
onBlur: () => setIsFocused(false),
|
|
1265
1367
|
children: [
|
|
1266
|
-
placeholderText && /* @__PURE__ */ (0,
|
|
1368
|
+
placeholderText && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("option", { disabled: true, value: placeholderText, children: placeholderText }),
|
|
1267
1369
|
children
|
|
1268
1370
|
]
|
|
1269
1371
|
}
|
|
1270
1372
|
),
|
|
1271
|
-
/* @__PURE__ */ (0,
|
|
1373
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: SelectList_module_default.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1272
1374
|
"svg",
|
|
1273
1375
|
{
|
|
1274
1376
|
focusable: "false",
|
|
1275
1377
|
"aria-hidden": "true",
|
|
1276
1378
|
viewBox: "0 0 24 24",
|
|
1277
1379
|
width: iconSize3[size],
|
|
1278
|
-
children: /* @__PURE__ */ (0,
|
|
1380
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1279
1381
|
"path",
|
|
1280
1382
|
{
|
|
1281
1383
|
fill: errorText ? ColorBaseDestructive700 : ColorBaseGray800,
|
|
@@ -1285,7 +1387,7 @@ function SelectList({
|
|
|
1285
1387
|
}
|
|
1286
1388
|
) })
|
|
1287
1389
|
] }),
|
|
1288
|
-
(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)(
|
|
1289
1391
|
Typography_default,
|
|
1290
1392
|
{
|
|
1291
1393
|
size: 100,
|
|
@@ -1301,13 +1403,13 @@ SelectList.Option = SelectOption_default;
|
|
|
1301
1403
|
|
|
1302
1404
|
// src/TextField/TextField.tsx
|
|
1303
1405
|
var import_react10 = require("react");
|
|
1304
|
-
var
|
|
1406
|
+
var import_classnames12 = __toESM(require_classnames());
|
|
1305
1407
|
|
|
1306
1408
|
// css-module:./TextField.module.css#css-module
|
|
1307
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" };
|
|
1308
1410
|
|
|
1309
1411
|
// src/TextField/TextField.tsx
|
|
1310
|
-
var
|
|
1412
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1311
1413
|
function TextField({
|
|
1312
1414
|
autoComplete,
|
|
1313
1415
|
"data-testid": dataTestId,
|
|
@@ -1324,7 +1426,7 @@ function TextField({
|
|
|
1324
1426
|
}) {
|
|
1325
1427
|
const reactId = (0, import_react10.useId)();
|
|
1326
1428
|
const inputId = id != null ? id : reactId;
|
|
1327
|
-
return /* @__PURE__ */ (0,
|
|
1429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1328
1430
|
Box_default,
|
|
1329
1431
|
{
|
|
1330
1432
|
display: "flex",
|
|
@@ -1337,12 +1439,12 @@ function TextField({
|
|
|
1337
1439
|
}
|
|
1338
1440
|
},
|
|
1339
1441
|
children: [
|
|
1340
|
-
label && /* @__PURE__ */ (0,
|
|
1341
|
-
/* @__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)(
|
|
1342
1444
|
"input",
|
|
1343
1445
|
{
|
|
1344
1446
|
autoComplete,
|
|
1345
|
-
className: (0,
|
|
1447
|
+
className: (0, import_classnames12.default)(TextField_module_default.textfield, TextField_module_default[size], {
|
|
1346
1448
|
[TextField_module_default.inputError]: errorText
|
|
1347
1449
|
}),
|
|
1348
1450
|
"data-testid": dataTestId,
|
|
@@ -1354,7 +1456,7 @@ function TextField({
|
|
|
1354
1456
|
value
|
|
1355
1457
|
}
|
|
1356
1458
|
),
|
|
1357
|
-
(helperText || errorText) && /* @__PURE__ */ (0,
|
|
1459
|
+
(helperText || errorText) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Box_default, { paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1358
1460
|
Typography_default,
|
|
1359
1461
|
{
|
|
1360
1462
|
size: 100,
|
|
@@ -1378,6 +1480,7 @@ function TextField({
|
|
|
1378
1480
|
Divider,
|
|
1379
1481
|
Heading,
|
|
1380
1482
|
IconButton,
|
|
1483
|
+
LinkButton,
|
|
1381
1484
|
MiniActionCard,
|
|
1382
1485
|
Modal,
|
|
1383
1486
|
RadioButton,
|