@cambly/syntax-core 18.5.0 → 18.7.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.
Files changed (112) hide show
  1. package/dist/Button/Button.cjs +3 -3
  2. package/dist/Button/Button.css +21 -20
  3. package/dist/Button/Button.css.map +1 -1
  4. package/dist/Button/Button.js +2 -2
  5. package/dist/Button/constants/iconSize.cjs +2 -2
  6. package/dist/Button/constants/iconSize.css +21 -20
  7. package/dist/Button/constants/iconSize.css.map +1 -1
  8. package/dist/Button/constants/iconSize.js +1 -1
  9. package/dist/Dialog/ModalDialog.cjs +6 -5
  10. package/dist/Dialog/ModalDialog.css +21 -20
  11. package/dist/Dialog/ModalDialog.css.map +1 -1
  12. package/dist/Dialog/ModalDialog.js +4 -3
  13. package/dist/IconButton/IconButton.cjs +5 -4
  14. package/dist/IconButton/IconButton.css +21 -20
  15. package/dist/IconButton/IconButton.css.map +1 -1
  16. package/dist/IconButton/IconButton.js +3 -2
  17. package/dist/IconLinkButton/IconLinkButton.cjs +17 -0
  18. package/dist/IconLinkButton/IconLinkButton.cjs.map +1 -0
  19. package/dist/IconLinkButton/IconLinkButton.css +607 -0
  20. package/dist/IconLinkButton/IconLinkButton.css.map +1 -0
  21. package/dist/IconLinkButton/IconLinkButton.d.ts +76 -0
  22. package/dist/IconLinkButton/IconLinkButton.js +17 -0
  23. package/dist/IconLinkButton/IconLinkButton.js.map +1 -0
  24. package/dist/LinkButton/LinkButton.cjs +4 -3
  25. package/dist/LinkButton/LinkButton.css +21 -20
  26. package/dist/LinkButton/LinkButton.css.map +1 -1
  27. package/dist/LinkButton/LinkButton.js +3 -2
  28. package/dist/Modal/Modal.cjs +6 -5
  29. package/dist/Modal/Modal.css +21 -20
  30. package/dist/Modal/Modal.css.map +1 -1
  31. package/dist/Modal/Modal.js +4 -3
  32. package/dist/Popover/Popover.cjs +7 -6
  33. package/dist/Popover/Popover.css +21 -20
  34. package/dist/Popover/Popover.css.map +1 -1
  35. package/dist/Popover/Popover.js +5 -4
  36. package/dist/RichSelect/RichSelectBox.cjs +5 -5
  37. package/dist/RichSelect/RichSelectBox.css +21 -20
  38. package/dist/RichSelect/RichSelectBox.css.map +1 -1
  39. package/dist/RichSelect/RichSelectBox.js +4 -4
  40. package/dist/RichSelect/RichSelectList.cjs +12 -11
  41. package/dist/RichSelect/RichSelectList.css +21 -20
  42. package/dist/RichSelect/RichSelectList.css.map +1 -1
  43. package/dist/RichSelect/RichSelectList.d.ts +5 -0
  44. package/dist/RichSelect/RichSelectList.js +10 -9
  45. package/dist/SelectList/SelectList.cjs +3 -3
  46. package/dist/SelectList/SelectList.js +2 -2
  47. package/dist/__chunks/{IUSNCMKA.cjs → 33OLOKXZ.cjs} +5 -5
  48. package/dist/__chunks/33OLOKXZ.cjs.map +1 -0
  49. package/dist/__chunks/{BZ546NNE.cjs → 5UGT7MVT.cjs} +18 -18
  50. package/dist/__chunks/{BZ546NNE.cjs.map → 5UGT7MVT.cjs.map} +1 -1
  51. package/dist/__chunks/64WM4STC.js +22 -0
  52. package/dist/__chunks/{ESVDNOSI.js.map → 64WM4STC.js.map} +1 -1
  53. package/dist/__chunks/65BTPZZT.cjs +22 -0
  54. package/dist/__chunks/{7TEFD526.cjs.map → 65BTPZZT.cjs.map} +1 -1
  55. package/dist/__chunks/{YJAKY2I2.cjs → 7QBU4DTX.cjs} +4 -4
  56. package/dist/__chunks/{O2K6UM3Z.cjs → A7LK5QZS.cjs} +34 -15
  57. package/dist/__chunks/A7LK5QZS.cjs.map +1 -0
  58. package/dist/__chunks/{C4GAUB4Y.cjs → AHFP6M2N.cjs} +3 -3
  59. package/dist/__chunks/BFZKWCPH.cjs +83 -0
  60. package/dist/__chunks/BFZKWCPH.cjs.map +1 -0
  61. package/dist/__chunks/{L67MBZZR.cjs → BIJUVIB4.cjs} +2 -4
  62. package/dist/__chunks/BIJUVIB4.cjs.map +1 -0
  63. package/dist/__chunks/{BNRTELQX.js → CP27NWEM.js} +5 -5
  64. package/dist/__chunks/CP27NWEM.js.map +1 -0
  65. package/dist/__chunks/{RUHTSUF3.js → F2UOAZUN.js} +2 -2
  66. package/dist/__chunks/F2UOAZUN.js.map +1 -0
  67. package/dist/__chunks/{65PXO4OL.js → H4FEI25U.js} +2 -2
  68. package/dist/__chunks/JE76S4R4.js +83 -0
  69. package/dist/__chunks/JE76S4R4.js.map +1 -0
  70. package/dist/__chunks/{TU2BVOKD.js → JFPMPJ2P.js} +5 -5
  71. package/dist/__chunks/{RCCK2EW4.cjs → NIIFJYOC.cjs} +3 -3
  72. package/dist/__chunks/{IYYTLOO3.cjs → NNGCYWZA.cjs} +3 -3
  73. package/dist/__chunks/{BTBAAACD.js → NOPJE4A2.js} +3 -3
  74. package/dist/__chunks/{BTBAAACD.js.map → NOPJE4A2.js.map} +1 -1
  75. package/dist/__chunks/{HTCVFULF.js → OXV7VGXO.js} +1 -3
  76. package/dist/__chunks/{HTCVFULF.js.map → OXV7VGXO.js.map} +1 -1
  77. package/dist/__chunks/{LIUV3J2M.cjs → QKBS4OXL.cjs} +6 -6
  78. package/dist/__chunks/{UYQTZSTJ.js → R47ZRXRK.js} +30 -11
  79. package/dist/__chunks/R47ZRXRK.js.map +1 -0
  80. package/dist/__chunks/{BLW57GRR.js → RPWXCCIV.js} +2 -2
  81. package/dist/__chunks/TH4TA3JN.cjs +9 -0
  82. package/dist/__chunks/TH4TA3JN.cjs.map +1 -0
  83. package/dist/__chunks/{MZOGVH4K.js → UASXKT55.js} +2 -2
  84. package/dist/__chunks/{TSMYMWWE.cjs → UYUCK2UE.cjs} +7 -7
  85. package/dist/__chunks/{TSMYMWWE.cjs.map → UYUCK2UE.cjs.map} +1 -1
  86. package/dist/__chunks/{SNLD3DG6.js → W7VHIMWJ.js} +2 -2
  87. package/dist/__chunks/YLWWTB4I.js +9 -0
  88. package/dist/__chunks/YLWWTB4I.js.map +1 -0
  89. package/dist/index.cjs +24 -18
  90. package/dist/index.css +21 -20
  91. package/dist/index.css.map +1 -1
  92. package/dist/index.d.ts +1 -0
  93. package/dist/index.js +25 -19
  94. package/package.json +1 -1
  95. package/dist/__chunks/7TEFD526.cjs +0 -22
  96. package/dist/__chunks/BNRTELQX.js.map +0 -1
  97. package/dist/__chunks/ESVDNOSI.js +0 -22
  98. package/dist/__chunks/IUSNCMKA.cjs.map +0 -1
  99. package/dist/__chunks/L67MBZZR.cjs.map +0 -1
  100. package/dist/__chunks/O2K6UM3Z.cjs.map +0 -1
  101. package/dist/__chunks/RUHTSUF3.js.map +0 -1
  102. package/dist/__chunks/UYQTZSTJ.js.map +0 -1
  103. /package/dist/__chunks/{YJAKY2I2.cjs.map → 7QBU4DTX.cjs.map} +0 -0
  104. /package/dist/__chunks/{C4GAUB4Y.cjs.map → AHFP6M2N.cjs.map} +0 -0
  105. /package/dist/__chunks/{65PXO4OL.js.map → H4FEI25U.js.map} +0 -0
  106. /package/dist/__chunks/{TU2BVOKD.js.map → JFPMPJ2P.js.map} +0 -0
  107. /package/dist/__chunks/{RCCK2EW4.cjs.map → NIIFJYOC.cjs.map} +0 -0
  108. /package/dist/__chunks/{IYYTLOO3.cjs.map → NNGCYWZA.cjs.map} +0 -0
  109. /package/dist/__chunks/{LIUV3J2M.cjs.map → QKBS4OXL.cjs.map} +0 -0
  110. /package/dist/__chunks/{BLW57GRR.js.map → RPWXCCIV.js.map} +0 -0
  111. /package/dist/__chunks/{MZOGVH4K.js.map → UASXKT55.js.map} +0 -0
  112. /package/dist/__chunks/{SNLD3DG6.js.map → W7VHIMWJ.js.map} +0 -0
@@ -0,0 +1,83 @@
1
+ "use client"
2
+ import {
3
+ Button_module_default
4
+ } from "./YLWWTB4I.js";
5
+ import {
6
+ internalIconSize,
7
+ materialIconSize
8
+ } from "./64WM4STC.js";
9
+ import {
10
+ foregroundColor
11
+ } from "./VRJAMHSI.js";
12
+ import {
13
+ border
14
+ } from "./FMNQCHIR.js";
15
+ import {
16
+ backgroundColor
17
+ } from "./3CYMW6HT.js";
18
+
19
+ // src/IconLinkButton/IconLinkButton.tsx
20
+ import {
21
+ forwardRef
22
+ } from "react";
23
+ import classNames from "classnames";
24
+
25
+ // css-module:../IconButton/IconButton.module.css#css-module
26
+ var IconButton_module_default = { "iconButton": "_iconButton_txjkh_1", "sm": "_sm_txjkh_46", "md": "_md_txjkh_51", "lg": "_lg_txjkh_56", "smIcon": "_smIcon_txjkh_61", "mdIcon": "_mdIcon_txjkh_68", "lgIcon": "_lgIcon_txjkh_75" };
27
+
28
+ // src/IconLinkButton/IconLinkButton.tsx
29
+ import { jsx } from "react/jsx-runtime";
30
+ var IconLinkButton = forwardRef(
31
+ ({
32
+ href,
33
+ target,
34
+ rel,
35
+ "data-testid": dataTestId,
36
+ color = "primary",
37
+ size = "md",
38
+ icon: Icon,
39
+ on = "lightBackground",
40
+ onClick,
41
+ disabled = false,
42
+ accessibilityLabel
43
+ }, ref) => {
44
+ const foregroundColorClass = foregroundColor(color, on);
45
+ const backgroundColorClass = backgroundColor(color, on);
46
+ return /* @__PURE__ */ jsx(
47
+ "a",
48
+ {
49
+ ref,
50
+ href,
51
+ target,
52
+ rel,
53
+ "data-testid": dataTestId,
54
+ "aria-label": accessibilityLabel,
55
+ className: classNames(
56
+ IconButton_module_default.iconButton,
57
+ foregroundColorClass,
58
+ backgroundColorClass,
59
+ border(color, on),
60
+ IconButton_module_default[size],
61
+ {
62
+ [Button_module_default.disabled]: disabled
63
+ }
64
+ ),
65
+ onClick,
66
+ children: /* @__PURE__ */ jsx(
67
+ Icon,
68
+ {
69
+ className: materialIconSize[size],
70
+ size: internalIconSize[size]
71
+ }
72
+ )
73
+ }
74
+ );
75
+ }
76
+ );
77
+ IconLinkButton.displayName = "IconLinkButton";
78
+ var IconLinkButton_default = IconLinkButton;
79
+
80
+ export {
81
+ IconLinkButton_default
82
+ };
83
+ //# sourceMappingURL=JE76S4R4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/IconLinkButton/IconLinkButton.tsx","css-module:../IconButton/IconButton.module.css#css-module"],"sourcesContent":["import {\n forwardRef,\n type HtmlHTMLAttributes,\n type ComponentProps,\n} from \"react\";\nimport classNames from \"classnames\";\nimport React from \"react\";\nimport { type Size } from \"../constants\";\nimport {\n materialIconSize,\n internalIconSize,\n} from \"../Button/constants/iconSize\";\nimport { border } from \"../colors/border\";\n\nimport buttonStyles from \"../Button/Button.module.css\";\nimport type InternalIcon from \"../Icon/Icon\";\nimport iconButtonStyles from \"../IconButton/IconButton.module.css\";\n\nimport { foregroundColor } from \"../colors/foregroundColor\";\nimport { backgroundColor } from \"../colors/backgroundColor\";\n\ntype IconLinkButtonProps = {\n /**\n * Test id for the button\n */\n \"data-testid\"?: string;\n /**\n * The link that the IconLinkButton should route to.\n *\n */\n href?: string;\n /**\n * The target attribute specifies where to open the linked document.\n *\n */\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\";\n /**\n * The rel attribute specifies the relationship between the document and the link.\n *\n */\n rel?: HtmlHTMLAttributes<HTMLAnchorElement>[\"rel\"];\n /**\n * The color of the button\n *\n * @defaultValue \"primary\"\n */\n color?:\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"destructive-primary\"\n | \"destructive-secondary\"\n | \"destructive-tertiary\"\n | \"branded\"\n | \"success-primary\"\n | \"success-secondary\"\n | \"success-tertiary\";\n /**\n * The size of the button\n * * `sm`: 32px\n * * `md`: 48px\n * * `lg`: 64px\n *\n * @defaultValue \"md\"\n */\n size?: (typeof Size)[number];\n /**\n * If `true`, the button will be disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * The label to be used for accessibility\n */\n\n accessibilityLabel: string;\n\n /**\n * The icon to be displayed.\n *\n * Deprecated: [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n * Preferred: Syntax icon\n */\n icon:\n | React.ComponentType<{ className?: string }>\n | React.ComponentType<ComponentProps<typeof InternalIcon>>;\n /**\n * Indicate whether the button renders on a light or dark background. Changes the color of the button\n *\n * @defaultValue `lightBackground`\n */\n on?: \"lightBackground\" | \"darkBackground\";\n /**\n * An optional onClick event. This is used for certain wrapper's support (such as react-router-dom).\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>;\n};\n\n/**\n * [IconLinkButton](https://cambly-syntax.vercel.app/?path=/docs/components-iconlinkbutton--docs) is a \"variation\" of IconButton that should look identical to IconButton, but should be used to render links instead.\n */\nconst IconLinkButton = forwardRef<HTMLAnchorElement, IconLinkButtonProps>(\n (\n {\n href,\n target,\n rel,\n \"data-testid\": dataTestId,\n color = \"primary\",\n size = \"md\",\n icon: Icon,\n on = \"lightBackground\",\n onClick,\n disabled = false,\n accessibilityLabel,\n }: IconLinkButtonProps,\n ref,\n ) => {\n const foregroundColorClass = foregroundColor(color, on);\n const backgroundColorClass = backgroundColor(color, on);\n\n return (\n <a\n ref={ref}\n href={href}\n target={target}\n rel={rel}\n data-testid={dataTestId}\n aria-label={accessibilityLabel}\n className={classNames(\n iconButtonStyles.iconButton,\n foregroundColorClass,\n backgroundColorClass,\n border(color, on),\n iconButtonStyles[size],\n {\n [buttonStyles.disabled]: disabled,\n },\n )}\n onClick={onClick}\n >\n <Icon\n className={materialIconSize[size]}\n size={internalIconSize[size]}\n />\n </a>\n );\n },\n);\n\nIconLinkButton.displayName = \"IconLinkButton\";\n\nexport default IconLinkButton;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/IconButton/IconButton.module.css\"; export default {\"iconButton\":\"_iconButton_txjkh_1\",\"sm\":\"_sm_txjkh_46\",\"md\":\"_md_txjkh_51\",\"lg\":\"_lg_txjkh_56\",\"smIcon\":\"_smIcon_txjkh_61\",\"mdIcon\":\"_mdIcon_txjkh_68\",\"lgIcon\":\"_lgIcon_txjkh_75\"}"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA,EACE;AAAA,OAGK;AACP,OAAO,gBAAgB;;;ACL6E,IAAO,4BAAQ,EAAC,cAAa,uBAAsB,MAAK,gBAAe,MAAK,gBAAe,MAAK,gBAAe,UAAS,oBAAmB,UAAS,oBAAmB,UAAS,mBAAkB;;;AD8I9R;AAxCR,IAAM,iBAAiB;AAAA,EACrB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,KAAK;AAAA,IACL;AAAA,IACA,WAAW;AAAA,IACX;AAAA,EACF,GACA,QACG;AACH,UAAM,uBAAuB,gBAAgB,OAAO,EAAE;AACtD,UAAM,uBAAuB,gBAAgB,OAAO,EAAE;AAEtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAa;AAAA,QACb,cAAY;AAAA,QACZ,WAAW;AAAA,UACT,0BAAiB;AAAA,UACjB;AAAA,UACA;AAAA,UACA,OAAO,OAAO,EAAE;AAAA,UAChB,0BAAiB,IAAI;AAAA,UACrB;AAAA,YACE,CAAC,sBAAa,QAAQ,GAAG;AAAA,UAC3B;AAAA,QACF;AAAA,QACA;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,iBAAiB,IAAI;AAAA,YAChC,MAAM,iBAAiB,IAAI;AAAA;AAAA,QAC7B;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;AAE7B,IAAO,yBAAQ;","names":[]}
@@ -1,13 +1,13 @@
1
1
  "use client"
2
+ import {
3
+ ButtonGroup_default
4
+ } from "./BOX3VY3Q.js";
2
5
  import {
3
6
  Button_default
4
- } from "./BTBAAACD.js";
7
+ } from "./NOPJE4A2.js";
5
8
  import {
6
9
  Divider
7
10
  } from "./YAZOHZLW.js";
8
- import {
9
- ButtonGroup_default
10
- } from "./BOX3VY3Q.js";
11
11
  import {
12
12
  RichSelectSection_default
13
13
  } from "./YPUA2AJT.js";
@@ -208,4 +208,4 @@ export {
208
208
  RichSelectBoxContext,
209
209
  RichSelectBox_default
210
210
  };
211
- //# sourceMappingURL=TU2BVOKD.js.map
211
+ //# sourceMappingURL=JFPMPJ2P.js.map
@@ -4,7 +4,7 @@
4
4
  var _J27AGJQBcjs = require('./J27AGJQB.cjs');
5
5
 
6
6
 
7
- var _YJAKY2I2cjs = require('./YJAKY2I2.cjs');
7
+ var _7QBU4DTXcjs = require('./7QBU4DTX.cjs');
8
8
 
9
9
 
10
10
  var _KJLBDAZHcjs = require('./KJLBDAZH.cjs');
@@ -130,7 +130,7 @@ var ModalDialog = _react.forwardRef.call(void 0,
130
130
  }
131
131
  },
132
132
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
133
- _YJAKY2I2cjs.IconButton_default,
133
+ _7QBU4DTXcjs.IconButton_default,
134
134
  {
135
135
  onClick: () => state.close(),
136
136
  color: "tertiary",
@@ -157,4 +157,4 @@ var ModalDialog_default = ModalDialog;
157
157
 
158
158
 
159
159
  exports.AriaModalOverlay = AriaModalOverlay; exports.AriaModal = AriaModal; exports.ModalDialog_default = ModalDialog_default;
160
- //# sourceMappingURL=RCCK2EW4.cjs.map
160
+ //# sourceMappingURL=NIIFJYOC.cjs.map
@@ -13,7 +13,7 @@ var _G3SXARBLcjs = require('./G3SXARBL.cjs');
13
13
  var _THM3NAFOcjs = require('./THM3NAFO.cjs');
14
14
 
15
15
 
16
- var _YJAKY2I2cjs = require('./YJAKY2I2.cjs');
16
+ var _7QBU4DTXcjs = require('./7QBU4DTX.cjs');
17
17
 
18
18
 
19
19
  var _KJLBDAZHcjs = require('./KJLBDAZH.cjs');
@@ -79,7 +79,7 @@ function Modal({
79
79
  __style: { top: 4, right: 4 }
80
80
  },
81
81
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
82
- _YJAKY2I2cjs.IconButton_default,
82
+ _7QBU4DTXcjs.IconButton_default,
83
83
  {
84
84
  accessibilityLabel: accessibilityCloseLabel,
85
85
  color: image ? "primary" : "tertiary",
@@ -130,4 +130,4 @@ Modal.displayName = "Modal";
130
130
 
131
131
 
132
132
  exports.Modal = Modal;
133
- //# sourceMappingURL=IYYTLOO3.cjs.map
133
+ //# sourceMappingURL=NNGCYWZA.cjs.map
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  internalIconSize,
10
10
  materialIconSize
11
- } from "./ESVDNOSI.js";
11
+ } from "./64WM4STC.js";
12
12
  import {
13
13
  Box_default
14
14
  } from "./65PMWIHY.js";
@@ -33,7 +33,7 @@ import { forwardRef } from "react";
33
33
  import classNames from "classnames";
34
34
 
35
35
  // css-module:./Button.module.css#css-module
36
- var Button_module_default = { "button": "_button_1hpt0_1", "buttonGap": "_buttonGap_1hpt0_8", "disabled": "_disabled_1hpt0_42", "disabledPrimary": "_disabledPrimary_1hpt0_56", "fullWidth": "_fullWidth_1hpt0_60", "sm": "_sm_1hpt0_64", "md": "_md_1hpt0_71", "lg": "_lg_1hpt0_78", "icon": "_icon_1hpt0_85", "smIcon": "_smIcon_1hpt0_89", "mdIcon": "_mdIcon_1hpt0_96", "lgIcon": "_lgIcon_1hpt0_103", "loading": "_loading_1hpt0_120", "syntaxButtonLoadingRotate": "_syntaxButtonLoadingRotate_1hpt0_1", "loadingCircle": "_loadingCircle_1hpt0_124" };
36
+ var Button_module_default = { "button": "_button_v2jgj_1", "buttonGap": "_buttonGap_v2jgj_8", "disabled": "_disabled_v2jgj_42", "disabledPrimary": "_disabledPrimary_v2jgj_57", "fullWidth": "_fullWidth_v2jgj_61", "sm": "_sm_v2jgj_65", "md": "_md_v2jgj_72", "lg": "_lg_v2jgj_79", "icon": "_icon_v2jgj_86", "smIcon": "_smIcon_v2jgj_90", "mdIcon": "_mdIcon_v2jgj_97", "lgIcon": "_lgIcon_v2jgj_104", "loading": "_loading_v2jgj_121", "syntaxButtonLoadingRotate": "_syntaxButtonLoadingRotate_v2jgj_1", "loadingCircle": "_loadingCircle_v2jgj_125" };
37
37
 
38
38
  // src/Button/Button.tsx
39
39
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -146,4 +146,4 @@ var Button_default = Button;
146
146
  export {
147
147
  Button_default
148
148
  };
149
- //# sourceMappingURL=BTBAAACD.js.map
149
+ //# sourceMappingURL=NOPJE4A2.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Button/Button.tsx","css-module:./Button.module.css#css-module"],"sourcesContent":["import React, { forwardRef, type ComponentProps } from \"react\";\nimport classNames from \"classnames\";\nimport { type Size } from \"../constants\";\nimport Typography from \"../Typography/Typography\";\nimport Box from \"../Box/Box\";\nimport { materialIconSize, internalIconSize } from \"./constants/iconSize\";\nimport textVariant from \"./constants/textVariant\";\nimport loadingIconSize from \"./constants/loadingIconSize\";\nimport styles from \"./Button.module.css\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport { backgroundColor } from \"../colors/backgroundColor\";\nimport { foregroundColor } from \"../colors/foregroundColor\";\nimport { border } from \"../colors/border\";\nimport type InternalIcon from \"../Icon/Icon\";\n\ntype ButtonProps = {\n /**\n * Test id for the button\n */\n \"data-testid\"?: string;\n /**\n * The text to be displayed inside the button\n */\n text: string;\n /**\n * The text to be displayed inside the button when it is in a loading state\n */\n loadingText?: string;\n /**\n * The color of the button\n *\n * @defaultValue \"primary\"\n */\n color?:\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"destructive-primary\"\n | \"destructive-secondary\"\n | \"destructive-tertiary\"\n | \"branded\"\n | \"success-primary\"\n | \"success-secondary\"\n | \"success-tertiary\";\n /**\n * The size of the button\n *\n * * `sm`: 32px\n * * `md`: 48px\n * * `lg`: 64px\n *\n * @defaultValue \"md\"\n */\n size?: (typeof Size)[number];\n /**\n * The label to be used for accessibility\n */\n accessibilityLabel?: string;\n /**\n * If `true`, the button will be disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * If `true`, the button will be in a loading state\n *\n * @defaultValue false\n */\n loading?: boolean;\n /**\n * If `true`, the button will take up the full width of its container\n *\n * @defaultValue false\n */\n fullWidth?: boolean;\n /**\n * The icon to be displayed at the start of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n startIcon?:\n | React.ComponentType<{ className?: string }>\n | React.ComponentType<ComponentProps<typeof InternalIcon>>;\n /**\n * The icon to be displayed at the end of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n endIcon?:\n | React.ComponentType<{ className?: string }>\n | React.ComponentType<ComponentProps<typeof InternalIcon>>;\n /**\n * Indicate whether the button renders on a light or dark background. Changes the color of the button\n *\n * @defaulValue `lightBackground`\n */\n on?: \"lightBackground\" | \"darkBackground\";\n /**\n * The callback to be called when the button is clicked\n */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n /**\n * The tooltip to be displayed when the user hovers over the button\n */\n tooltip?: string;\n /**\n * The type you want to set for the primitive `<button/>`\n */\n type?: \"button\" | \"submit\" | \"reset\";\n};\n\n/**\n * [Button](https://cambly-syntax.vercel.app/?path=/docs/components-button--docs) is used to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n \"data-testid\": dataTestId,\n text,\n loadingText,\n color = \"primary\",\n size = \"md\",\n accessibilityLabel,\n disabled = false,\n loading = false,\n fullWidth = false,\n startIcon: StartIcon,\n endIcon: EndIcon,\n on = \"lightBackground\",\n onClick,\n tooltip,\n type = \"button\",\n }: ButtonProps,\n ref,\n ) => {\n const isHydrated = useIsHydrated();\n\n const foregroundColorClass = foregroundColor(color, on);\n const backgroundColorClass = backgroundColor(color, on);\n const disabledPrimary = color === \"primary\" && disabled;\n const isDisabled = !isHydrated || disabled || loading;\n\n return (\n <button\n data-testid={dataTestId}\n ref={ref}\n aria-label={accessibilityLabel}\n type={type}\n title={tooltip}\n disabled={isDisabled}\n onClick={onClick}\n className={classNames(\n styles.button,\n foregroundColorClass,\n backgroundColorClass,\n border(color, on),\n styles[size],\n {\n [styles.fullWidth]: fullWidth,\n [styles.buttonGap]: size === \"lg\" || size === \"md\",\n [styles.disabled]: isDisabled,\n },\n )}\n >\n {!loading && StartIcon && (\n <StartIcon\n className={classNames(\n styles.icon,\n materialIconSize[size],\n disabledPrimary && styles.disabledPrimary,\n )}\n size={internalIconSize[size]}\n />\n )}\n {((loading && loadingText) || (!loading && text)) && (\n <Box paddingX={1}>\n <Typography size={textVariant[size]} weight=\"medium\">\n <span\n className={classNames(\n foregroundColorClass,\n disabledPrimary && styles.disabledPrimary,\n )}\n >\n {loading ? loadingText : text}\n </span>\n </Typography>\n </Box>\n )}\n {!loading && EndIcon && (\n <EndIcon\n className={classNames(\n styles.icon,\n materialIconSize[size],\n disabledPrimary && styles.disabledPrimary,\n )}\n size={internalIconSize[size]}\n />\n )}\n {loading && (\n <svg\n className={classNames(styles.loading, foregroundColorClass)}\n viewBox=\"22 22 44 44\"\n width={loadingIconSize[size]}\n height={loadingIconSize[size]}\n >\n <circle\n className={styles.loadingCircle}\n cx=\"44\"\n cy=\"44\"\n r=\"20.2\"\n fill=\"none\"\n strokeWidth=\"3.6\"\n />\n </svg>\n )}\n </button>\n );\n },\n);\n\nButton.displayName = \"Button\";\n\nexport default Button;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Button/Button.module.css\"; export default {\"button\":\"_button_1hpt0_1\",\"buttonGap\":\"_buttonGap_1hpt0_8\",\"disabled\":\"_disabled_1hpt0_42\",\"disabledPrimary\":\"_disabledPrimary_1hpt0_56\",\"fullWidth\":\"_fullWidth_1hpt0_60\",\"sm\":\"_sm_1hpt0_64\",\"md\":\"_md_1hpt0_71\",\"lg\":\"_lg_1hpt0_78\",\"icon\":\"_icon_1hpt0_85\",\"smIcon\":\"_smIcon_1hpt0_89\",\"mdIcon\":\"_mdIcon_1hpt0_96\",\"lgIcon\":\"_lgIcon_1hpt0_103\",\"loading\":\"_loading_1hpt0_120\",\"syntaxButtonLoadingRotate\":\"_syntaxButtonLoadingRotate_1hpt0_1\",\"loadingCircle\":\"_loadingCircle_1hpt0_124\"}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,S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AA,cACC,WAAW;AAAA,gBACT,sBAAO;AAAA,gBACP,iBAAiB,IAAI;AAAA,gBACrB,mBAAmB,sBAAO;AAAA,cAC5B;AAAA,cACA,MAAM,iBAAiB,IAAI;AAAA;AAAA,UAC7B;AAAA,WAEC,WAAW,eAAiB,CAAC,WAAW,SACzC,oBAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,oBAAY,IAAI,GAAG,QAAO,UAC1C;AAAA,YAAC;AAAA;AAAA,cACC,WAAW;AAAA,gBACT;AAAA,gBACA,mBAAmB,sBAAO;AAAA,cAC5B;AAAA,cAEC,oBAAU,cAAc;AAAA;AAAA,UAC3B,GACF,GACF;AAAA,UAED,CAAC,WAAW,WACX;AAAA,YAAC;AAAA;AAAA,cACC,WAAW;AAAA,gBACT,sBAAO;AAAA,gBACP,iBAAiB,IAAI;AAAA,gBACrB,mBAAmB,sBAAO;AAAA,cAC5B;AAAA,cACA,MAAM,iBAAiB,IAAI;AAAA;AAAA,UAC7B;AAAA,UAED,WACC;AAAA,YAAC;AAAA;AAAA,cACC,WAAW,WAAW,sBAAO,SAAS,oBAAoB;AAAA,cAC1D,SAAQ;AAAA,cACR,OAAO,wBAAgB,IAAI;AAAA,cAC3B,QAAQ,wBAAgB,IAAI;AAAA,cAE5B;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAW,sBAAO;AAAA,kBAClB,IAAG;AAAA,kBACH,IAAG;AAAA,kBACH,GAAE;AAAA,kBACF,MAAK;AAAA,kBACL,aAAY;AAAA;AAAA,cACd;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;AAErB,IAAO,iBAAQ;","names":[]}
1
+ {"version":3,"sources":["../../src/Button/Button.tsx","css-module:./Button.module.css#css-module"],"sourcesContent":["import React, { forwardRef, type ComponentProps } from \"react\";\nimport classNames from \"classnames\";\nimport { type Size } from \"../constants\";\nimport Typography from \"../Typography/Typography\";\nimport Box from \"../Box/Box\";\nimport { materialIconSize, internalIconSize } from \"./constants/iconSize\";\nimport textVariant from \"./constants/textVariant\";\nimport loadingIconSize from \"./constants/loadingIconSize\";\nimport styles from \"./Button.module.css\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport { backgroundColor } from \"../colors/backgroundColor\";\nimport { foregroundColor } from \"../colors/foregroundColor\";\nimport { border } from \"../colors/border\";\nimport type InternalIcon from \"../Icon/Icon\";\n\ntype ButtonProps = {\n /**\n * Test id for the button\n */\n \"data-testid\"?: string;\n /**\n * The text to be displayed inside the button\n */\n text: string;\n /**\n * The text to be displayed inside the button when it is in a loading state\n */\n loadingText?: string;\n /**\n * The color of the button\n *\n * @defaultValue \"primary\"\n */\n color?:\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"destructive-primary\"\n | \"destructive-secondary\"\n | \"destructive-tertiary\"\n | \"branded\"\n | \"success-primary\"\n | \"success-secondary\"\n | \"success-tertiary\";\n /**\n * The size of the button\n *\n * * `sm`: 32px\n * * `md`: 48px\n * * `lg`: 64px\n *\n * @defaultValue \"md\"\n */\n size?: (typeof Size)[number];\n /**\n * The label to be used for accessibility\n */\n accessibilityLabel?: string;\n /**\n * If `true`, the button will be disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * If `true`, the button will be in a loading state\n *\n * @defaultValue false\n */\n loading?: boolean;\n /**\n * If `true`, the button will take up the full width of its container\n *\n * @defaultValue false\n */\n fullWidth?: boolean;\n /**\n * The icon to be displayed at the start of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n startIcon?:\n | React.ComponentType<{ className?: string }>\n | React.ComponentType<ComponentProps<typeof InternalIcon>>;\n /**\n * The icon to be displayed at the end of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n endIcon?:\n | React.ComponentType<{ className?: string }>\n | React.ComponentType<ComponentProps<typeof InternalIcon>>;\n /**\n * Indicate whether the button renders on a light or dark background. Changes the color of the button\n *\n * @defaulValue `lightBackground`\n */\n on?: \"lightBackground\" | \"darkBackground\";\n /**\n * The callback to be called when the button is clicked\n */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n /**\n * The tooltip to be displayed when the user hovers over the button\n */\n tooltip?: string;\n /**\n * The type you want to set for the primitive `<button/>`\n */\n type?: \"button\" | \"submit\" | \"reset\";\n};\n\n/**\n * [Button](https://cambly-syntax.vercel.app/?path=/docs/components-button--docs) is used to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n \"data-testid\": dataTestId,\n text,\n loadingText,\n color = \"primary\",\n size = \"md\",\n accessibilityLabel,\n disabled = false,\n loading = false,\n fullWidth = false,\n startIcon: StartIcon,\n endIcon: EndIcon,\n on = \"lightBackground\",\n onClick,\n tooltip,\n type = \"button\",\n }: ButtonProps,\n ref,\n ) => {\n const isHydrated = useIsHydrated();\n\n const foregroundColorClass = foregroundColor(color, on);\n const backgroundColorClass = backgroundColor(color, on);\n const disabledPrimary = color === \"primary\" && disabled;\n const isDisabled = !isHydrated || disabled || loading;\n\n return (\n <button\n data-testid={dataTestId}\n ref={ref}\n aria-label={accessibilityLabel}\n type={type}\n title={tooltip}\n disabled={isDisabled}\n onClick={onClick}\n className={classNames(\n styles.button,\n foregroundColorClass,\n backgroundColorClass,\n border(color, on),\n styles[size],\n {\n [styles.fullWidth]: fullWidth,\n [styles.buttonGap]: size === \"lg\" || size === \"md\",\n [styles.disabled]: isDisabled,\n },\n )}\n >\n {!loading && StartIcon && (\n <StartIcon\n className={classNames(\n styles.icon,\n materialIconSize[size],\n disabledPrimary && styles.disabledPrimary,\n )}\n size={internalIconSize[size]}\n />\n )}\n {((loading && loadingText) || (!loading && text)) && (\n <Box paddingX={1}>\n <Typography size={textVariant[size]} weight=\"medium\">\n <span\n className={classNames(\n foregroundColorClass,\n disabledPrimary && styles.disabledPrimary,\n )}\n >\n {loading ? loadingText : text}\n </span>\n </Typography>\n </Box>\n )}\n {!loading && EndIcon && (\n <EndIcon\n className={classNames(\n styles.icon,\n materialIconSize[size],\n disabledPrimary && styles.disabledPrimary,\n )}\n size={internalIconSize[size]}\n />\n )}\n {loading && (\n <svg\n className={classNames(styles.loading, foregroundColorClass)}\n viewBox=\"22 22 44 44\"\n width={loadingIconSize[size]}\n height={loadingIconSize[size]}\n >\n <circle\n className={styles.loadingCircle}\n cx=\"44\"\n cy=\"44\"\n r=\"20.2\"\n fill=\"none\"\n strokeWidth=\"3.6\"\n />\n </svg>\n )}\n </button>\n );\n },\n);\n\nButton.displayName = \"Button\";\n\nexport default Button;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Button/Button.module.css\"; export default {\"button\":\"_button_v2jgj_1\",\"buttonGap\":\"_buttonGap_v2jgj_8\",\"disabled\":\"_disabled_v2jgj_42\",\"disabledPrimary\":\"_disabledPrimary_v2jgj_57\",\"fullWidth\":\"_fullWidth_v2jgj_61\",\"sm\":\"_sm_v2jgj_65\",\"md\":\"_md_v2jgj_72\",\"lg\":\"_lg_v2jgj_79\",\"icon\":\"_icon_v2jgj_86\",\"smIcon\":\"_smIcon_v2jgj_90\",\"mdIcon\":\"_mdIcon_v2jgj_97\",\"lgIcon\":\"_lgIcon_v2jgj_104\",\"loading\":\"_loading_v2jgj_121\",\"syntaxButtonLoadingRotate\":\"_syntaxButtonLoadingRotate_v2jgj_1\",\"loadingCircle\":\"_loadingCircle_v2jgj_125\"}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,kBAAuC;AACvD,OAAO,gBAAgB;;;ACDqE,IAAO,wBAAQ,EAAC,UAAS,mBAAkB,aAAY,sBAAqB,YAAW,sBAAqB,mBAAkB,6BAA4B,aAAY,uBAAsB,MAAK,gBAAe,MAAK,gBAAe,MAAK,gBAAe,QAAO,kBAAiB,UAAS,oBAAmB,UAAS,oBAAmB,UAAS,qBAAoB,WAAU,sBAAqB,6BAA4B,sCAAqC,iBAAg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AAA,YAAC;AAAA;AAAA,cACC,WAAW;AAAA,gBACT;AAAA,gBACA,mBAAmB,sBAAO;AAAA,cAC5B;AAAA,cAEC,oBAAU,cAAc;AAAA;AAAA,UAC3B,GACF,GACF;AAAA,UAED,CAAC,WAAW,WACX;AAAA,YAAC;AAAA;AAAA,cACC,WAAW;AAAA,gBACT,sBAAO;AAAA,gBACP,iBAAiB,IAAI;AAAA,gBACrB,mBAAmB,sBAAO;AAAA,cAC5B;AAAA,cACA,MAAM,iBAAiB,IAAI;AAAA;AAAA,UAC7B;AAAA,UAED,WACC;AAAA,YAAC;AAAA;AAAA,cACC,WAAW,WAAW,sBAAO,SAAS,oBAAoB;AAAA,cAC1D,SAAQ;AAAA,cACR,OAAO,wBAAgB,IAAI;AAAA,cAC3B,QAAQ,wBAAgB,IAAI;AAAA,cAE5B;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAW,sBAAO;AAAA,kBAClB,IAAG;AAAA,kBACH,IAAG;AAAA,kBACH,GAAE;AAAA,kBACF,MAAK;AAAA,kBACL,aAAY;AAAA;AAAA,cACd;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;AAErB,IAAO,iBAAQ;","names":[]}
@@ -3,13 +3,11 @@
3
3
  // ../syntax-design-tokens/dist/js/index.js
4
4
  var ColorBaseDestructive700 = "#d32a4b";
5
5
  var ColorBaseGray700 = "#767676";
6
- var ColorBaseGray800 = "#353535";
7
6
  var ColorCambioWhite100 = "#ffffff";
8
7
 
9
8
  export {
10
9
  ColorBaseDestructive700,
11
10
  ColorBaseGray700,
12
- ColorBaseGray800,
13
11
  ColorCambioWhite100
14
12
  };
15
- //# sourceMappingURL=HTCVFULF.js.map
13
+ //# sourceMappingURL=OXV7VGXO.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"sourcesContent":["/**\n * Do not edit directly\n * Generated on Thu, 18 Jul 2024 17:46:31 GMT\n */\n\nexport const ColorBaseBlack = \"#000000\";\nexport const ColorBaseDestructive100 = \"#fef3f5\";\nexport const ColorBaseDestructive200 = \"#fad6de\";\nexport const ColorBaseDestructive300 = \"#f2a2b2\";\nexport const ColorBaseDestructive700 = \"#d32a4b\";\nexport const ColorBaseDestructive800 = \"#81162c\";\nexport const ColorBaseDestructive900 = \"#55101d\";\nexport const ColorBaseGray10 = \"#cbcbcb\"; // Used as the default color for dividers and inner strokes\nexport const ColorBaseGray30 = \"#000000\"; // For IconButton background when on top of an image\nexport const ColorBaseGray60 = \"#000000\"; // Used for icon background in classroom video grid\nexport const ColorBaseGray80 = \"#000000\"; // Used as the background for modals\nexport const ColorBaseGray100 = \"#f7f7f7\";\nexport const ColorBaseGray200 = \"#f0f0f0\"; // Used for light mode backgrounds when showing card content on top\nexport const ColorBaseGray300 = \"#d0d0d0\"; // Used for component outlines, eg: select and textfield\nexport const ColorBaseGray700 = \"#767676\"; // For secondary text in light mode\nexport const ColorBaseGray800 = \"#353535\";\nexport const ColorBaseGray900 = \"#191919\"; // Default text color, Classroom background\nexport const ColorBaseOrange100 = \"#fdf2f0\";\nexport const ColorBaseOrange200 = \"#f6cdc4\";\nexport const ColorBaseOrange300 = \"#ec9987\";\nexport const ColorBaseOrange700 = \"#c34124\";\nexport const ColorBaseOrange800 = \"#732818\";\nexport const ColorBaseOrange900 = \"#4d1a10\";\nexport const ColorBasePrimary100 = \"#eff6fa\";\nexport const ColorBasePrimary200 = \"#c1dbe7\";\nexport const ColorBasePrimary300 = \"#84b7d0\";\nexport const ColorBasePrimary700 = \"#236482\";\nexport const ColorBasePrimary800 = \"#274858\";\nexport const ColorBasePrimary900 = \"#1b303b\";\nexport const ColorBaseSuccess100 = \"#eff7f1\";\nexport const ColorBaseSuccess200 = \"#bddcc6\";\nexport const ColorBaseSuccess300 = \"#81ba92\";\nexport const ColorBaseSuccess700 = \"#397b4d\";\nexport const ColorBaseSuccess800 = \"#2d4936\";\nexport const ColorBaseSuccess900 = \"#1e3124\";\nexport const ColorBasePurple100 = \"#f9f5fa\";\nexport const ColorBasePurple200 = \"#e8dceb\";\nexport const ColorBasePurple300 = \"#cdb4d3\";\nexport const ColorBasePurple700 = \"#8b5f95\";\nexport const ColorBasePurple800 = \"#523b58\";\nexport const ColorBasePurple900 = \"#37273b\";\nexport const ColorBaseYellow100 = \"#fdf5d9\";\nexport const ColorBaseYellow200 = \"#fbe8a3\";\nexport const ColorBaseYellow300 = \"#f8d663\";\nexport const ColorBaseYellow700 = \"#ffc929\";\nexport const ColorBaseYellow800 = \"#765f1c\";\nexport const ColorBaseYellow900 = \"#3b3009\";\nexport const ColorBaseWhite = \"#ffffff\";\nexport const ColorCambioBlack = \"#050500\";\nexport const ColorCambioWhite40 = \"#ffffff\";\nexport const ColorCambioWhite70 = \"#ffffff\";\nexport const ColorCambioWhite100 = \"#ffffff\";\nexport const ColorCambioGray100 = \"#faf4eb\";\nexport const ColorCambioGray200 = \"#e4dbd3\";\nexport const ColorCambioGray270 = \"#e4dbd3\";\nexport const ColorCambioGray300 = \"#beb4ab\";\nexport const ColorCambioGray370 = \"#beb4ab\";\nexport const ColorCambioGray700 = \"#5e5952\";\nexport const ColorCambioGray800 = \"#363432\";\nexport const ColorCambioGray870 = \"#5e5952\";\nexport const ColorCambioGray900 = \"#262625\";\nexport const ColorCambioDestructive100 = \"#ffdeda\";\nexport const ColorCambioDestructive300 = \"#ff8071\";\nexport const ColorCambioDestructive370 = \"#ff8071\";\nexport const ColorCambioDestructive700 = \"#c93f32\";\nexport const ColorCambioDestructive770 = \"#c93f32\";\nexport const ColorCambioDestructive900 = \"#6d0002\";\nexport const ColorCambioSuccess100 = \"#daf2c8\";\nexport const ColorCambioSuccess300 = \"#84ce64\";\nexport const ColorCambioSuccess370 = \"#84ce64\";\nexport const ColorCambioSuccess700 = \"#3c7f20\";\nexport const ColorCambioSuccess770 = \"#3c7f20\";\nexport const ColorCambioSuccess900 = \"#103e00\";\nexport const ColorCambioRed = \"#f56e56\";\nexport const ColorCambioOrange = \"#ff8f57\";\nexport const ColorCambioTan = \"#ffb47d\";\nexport const ColorCambioCream = \"#fffad1\";\nexport const ColorCambioPurple = \"#6840a8\";\nexport const ColorCambioLilac = \"#b59ef0\";\nexport const ColorCambioThistle = \"#d69ca4\";\nexport const ColorCambioPink = \"#ffccea\";\nexport const ColorCambioNavy = \"#191142\";\nexport const ColorCambioTeal = \"#44a6cf\";\nexport const ColorCambioSlate = \"#7c9fc6\";\nexport const ColorCambioSky = \"#b1e8fc\";\nexport const ColorCambioYellow700 = \"#ffe733\";\nexport const ColorCambioTransparentFull = \"#000000\";\nexport const Elevation400 = \"0px 16px 32px 0px #00000040\";\nexport const SyntaxFontSansSerif = \"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif\";\nexport const ShadowInteractive = \"0px 3px 16px 0px rgba(144, 134, 130, 0.05), 0px 2px 30px 0px rgba(144, 134, 130, 0.02)\";\n"],"mappings":";;;AASO,IAAM,0BAA0B;AAUhC,IAAM,mBAAmB;AACzB,IAAM,mBAAmB;AAoCzB,IAAM,sBAAsB;","names":[]}
1
+ {"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"sourcesContent":["/**\n * Do not edit directly\n * Generated on Tue, 23 Jul 2024 17:34:09 GMT\n */\n\nexport const ColorBaseBlack = \"#000000\";\nexport const ColorBaseDestructive100 = \"#fef3f5\";\nexport const ColorBaseDestructive200 = \"#fad6de\";\nexport const ColorBaseDestructive300 = \"#f2a2b2\";\nexport const ColorBaseDestructive700 = \"#d32a4b\";\nexport const ColorBaseDestructive800 = \"#81162c\";\nexport const ColorBaseDestructive900 = \"#55101d\";\nexport const ColorBaseGray10 = \"#cbcbcb\"; // Used as the default color for dividers and inner strokes\nexport const ColorBaseGray30 = \"#000000\"; // For IconButton background when on top of an image\nexport const ColorBaseGray60 = \"#000000\"; // Used for icon background in classroom video grid\nexport const ColorBaseGray80 = \"#000000\"; // Used as the background for modals\nexport const ColorBaseGray100 = \"#f7f7f7\";\nexport const ColorBaseGray200 = \"#f0f0f0\"; // Used for light mode backgrounds when showing card content on top\nexport const ColorBaseGray300 = \"#d0d0d0\"; // Used for component outlines, eg: select and textfield\nexport const ColorBaseGray700 = \"#767676\"; // For secondary text in light mode\nexport const ColorBaseGray800 = \"#353535\";\nexport const ColorBaseGray900 = \"#191919\"; // Default text color, Classroom background\nexport const ColorBaseOrange100 = \"#fdf2f0\";\nexport const ColorBaseOrange200 = \"#f6cdc4\";\nexport const ColorBaseOrange300 = \"#ec9987\";\nexport const ColorBaseOrange700 = \"#c34124\";\nexport const ColorBaseOrange800 = \"#732818\";\nexport const ColorBaseOrange900 = \"#4d1a10\";\nexport const ColorBasePrimary100 = \"#eff6fa\";\nexport const ColorBasePrimary200 = \"#c1dbe7\";\nexport const ColorBasePrimary300 = \"#84b7d0\";\nexport const ColorBasePrimary700 = \"#236482\";\nexport const ColorBasePrimary800 = \"#274858\";\nexport const ColorBasePrimary900 = \"#1b303b\";\nexport const ColorBaseSuccess100 = \"#eff7f1\";\nexport const ColorBaseSuccess200 = \"#bddcc6\";\nexport const ColorBaseSuccess300 = \"#81ba92\";\nexport const ColorBaseSuccess700 = \"#397b4d\";\nexport const ColorBaseSuccess800 = \"#2d4936\";\nexport const ColorBaseSuccess900 = \"#1e3124\";\nexport const ColorBasePurple100 = \"#f9f5fa\";\nexport const ColorBasePurple200 = \"#e8dceb\";\nexport const ColorBasePurple300 = \"#cdb4d3\";\nexport const ColorBasePurple700 = \"#8b5f95\";\nexport const ColorBasePurple800 = \"#523b58\";\nexport const ColorBasePurple900 = \"#37273b\";\nexport const ColorBaseYellow100 = \"#fdf5d9\";\nexport const ColorBaseYellow200 = \"#fbe8a3\";\nexport const ColorBaseYellow300 = \"#f8d663\";\nexport const ColorBaseYellow700 = \"#ffc929\";\nexport const ColorBaseYellow800 = \"#765f1c\";\nexport const ColorBaseYellow900 = \"#3b3009\";\nexport const ColorBaseWhite = \"#ffffff\";\nexport const ColorCambioBlack = \"#050500\";\nexport const ColorCambioWhite40 = \"#ffffff\";\nexport const ColorCambioWhite70 = \"#ffffff\";\nexport const ColorCambioWhite100 = \"#ffffff\";\nexport const ColorCambioGray100 = \"#faf4eb\";\nexport const ColorCambioGray200 = \"#e4dbd3\";\nexport const ColorCambioGray270 = \"#e4dbd3\";\nexport const ColorCambioGray300 = \"#beb4ab\";\nexport const ColorCambioGray370 = \"#beb4ab\";\nexport const ColorCambioGray700 = \"#5e5952\";\nexport const ColorCambioGray800 = \"#363432\";\nexport const ColorCambioGray870 = \"#5e5952\";\nexport const ColorCambioGray900 = \"#262625\";\nexport const ColorCambioDestructive100 = \"#ffdeda\";\nexport const ColorCambioDestructive300 = \"#ff8071\";\nexport const ColorCambioDestructive370 = \"#ff8071\";\nexport const ColorCambioDestructive700 = \"#c93f32\";\nexport const ColorCambioDestructive770 = \"#c93f32\";\nexport const ColorCambioDestructive900 = \"#6d0002\";\nexport const ColorCambioSuccess100 = \"#daf2c8\";\nexport const ColorCambioSuccess300 = \"#84ce64\";\nexport const ColorCambioSuccess370 = \"#84ce64\";\nexport const ColorCambioSuccess700 = \"#3c7f20\";\nexport const ColorCambioSuccess770 = \"#3c7f20\";\nexport const ColorCambioSuccess900 = \"#103e00\";\nexport const ColorCambioRed = \"#f56e56\";\nexport const ColorCambioOrange = \"#ff8f57\";\nexport const ColorCambioTan = \"#ffb47d\";\nexport const ColorCambioCream = \"#fffad1\";\nexport const ColorCambioPurple = \"#6840a8\";\nexport const ColorCambioLilac = \"#b59ef0\";\nexport const ColorCambioThistle = \"#d69ca4\";\nexport const ColorCambioPink = \"#ffccea\";\nexport const ColorCambioNavy = \"#191142\";\nexport const ColorCambioTeal = \"#44a6cf\";\nexport const ColorCambioSlate = \"#7c9fc6\";\nexport const ColorCambioSky = \"#b1e8fc\";\nexport const ColorCambioYellow700 = \"#ffe733\";\nexport const ColorCambioTransparentFull = \"#000000\";\nexport const Elevation400 = \"0px 16px 32px 0px #00000040\";\nexport const SyntaxFontSansSerif = \"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif\";\nexport const ShadowInteractive = \"0px 3px 16px 0px rgba(144, 134, 130, 0.05), 0px 2px 30px 0px rgba(144, 134, 130, 0.02)\";\n"],"mappings":";;;AASO,IAAM,0BAA0B;AAUhC,IAAM,mBAAmB;AAqCzB,IAAM,sBAAsB;","names":[]}
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
2
2
 
3
3
 
4
- var _TSMYMWWEcjs = require('./TSMYMWWE.cjs');
4
+ var _C5XPZTFOcjs = require('./C5XPZTFO.cjs');
5
5
 
6
6
 
7
- var _42SRFCQLcjs = require('./42SRFCQL.cjs');
7
+ var _UYUCK2UEcjs = require('./UYUCK2UE.cjs');
8
8
 
9
9
 
10
- var _C5XPZTFOcjs = require('./C5XPZTFO.cjs');
10
+ var _42SRFCQLcjs = require('./42SRFCQL.cjs');
11
11
 
12
12
 
13
13
  var _I76WKOLEcjs = require('./I76WKOLE.cjs');
@@ -169,7 +169,7 @@ var RichSelectBox = _react.forwardRef.call(void 0,
169
169
  justifyContent: "end",
170
170
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _C5XPZTFOcjs.ButtonGroup_default, { orientation: "horizontal", children: [
171
171
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
172
- _TSMYMWWEcjs.Button_default,
172
+ _UYUCK2UEcjs.Button_default,
173
173
  {
174
174
  onClick: clearChanges,
175
175
  color: "secondary",
@@ -179,7 +179,7 @@ var RichSelectBox = _react.forwardRef.call(void 0,
179
179
  }
180
180
  ),
181
181
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
182
- _TSMYMWWEcjs.Button_default,
182
+ _UYUCK2UEcjs.Button_default,
183
183
  {
184
184
  onClick: saveChanges,
185
185
  text: primaryButtonText,
@@ -208,4 +208,4 @@ var RichSelectBox_default = Object.assign(RichSelectBox, {
208
208
 
209
209
 
210
210
  exports.convertSelection = convertSelection; exports.RichSelectBoxContext = RichSelectBoxContext; exports.RichSelectBox_default = RichSelectBox_default;
211
- //# sourceMappingURL=LIUV3J2M.cjs.map
211
+ //# sourceMappingURL=QKBS4OXL.cjs.map
@@ -1,19 +1,20 @@
1
1
  "use client"
2
2
  import {
3
3
  Popover_default
4
- } from "./SNLD3DG6.js";
4
+ } from "./W7VHIMWJ.js";
5
5
  import {
6
6
  DialogContext
7
7
  } from "./5HEC7ASW.js";
8
8
  import {
9
9
  ColorBaseDestructive700,
10
- ColorBaseGray800
11
- } from "./HTCVFULF.js";
10
+ ColorBaseGray700,
11
+ ColorCambioWhite100
12
+ } from "./OXV7VGXO.js";
12
13
  import {
13
14
  RichSelectBoxContext,
14
15
  RichSelectBox_default,
15
16
  convertSelection
16
- } from "./TU2BVOKD.js";
17
+ } from "./JFPMPJ2P.js";
17
18
  import {
18
19
  RichSelectSection_default
19
20
  } from "./YPUA2AJT.js";
@@ -77,7 +78,8 @@ function RichSelectList(props) {
77
78
  placeholderText,
78
79
  selectTextValue,
79
80
  selectedValues: selectedValuesProp,
80
- defaultSelectedValues: defaultSelectedValuesProp
81
+ defaultSelectedValues: defaultSelectedValuesProp,
82
+ color = "white"
81
83
  } = _a, richSelectBoxProps = __objRest(_a, [
82
84
  "autosave",
83
85
  "children",
@@ -92,7 +94,8 @@ function RichSelectList(props) {
92
94
  "placeholderText",
93
95
  "selectTextValue",
94
96
  "selectedValues",
95
- "defaultSelectedValues"
97
+ "defaultSelectedValues",
98
+ "color"
96
99
  ]);
97
100
  const reactId = useId();
98
101
  const inputId = id != null ? id : reactId;
@@ -138,6 +141,21 @@ function RichSelectList(props) {
138
141
  description: helperText,
139
142
  errorMessage: errorText
140
143
  });
144
+ const textColor = {
145
+ white: "gray700",
146
+ clear: "white"
147
+ };
148
+ const getArrowIconColor = () => {
149
+ if (errorText) {
150
+ return ColorBaseDestructive700;
151
+ } else {
152
+ if (color === "clear") {
153
+ return ColorCambioWhite100;
154
+ } else {
155
+ return ColorBaseGray700;
156
+ }
157
+ }
158
+ };
141
159
  return /* @__PURE__ */ jsx(
142
160
  ReactAriaProvider,
143
161
  {
@@ -166,7 +184,7 @@ function RichSelectList(props) {
166
184
  (_a2 = fieldRef.current) == null ? void 0 : _a2.focus();
167
185
  setInteractionModality("keyboard");
168
186
  },
169
- children: /* @__PURE__ */ jsx(Box_default, { paddingX: 1, children: /* @__PURE__ */ jsx(Typography_default, { size: 100, color: "gray700", children: label }) })
187
+ children: /* @__PURE__ */ jsx(Box_default, { paddingX: 1, children: /* @__PURE__ */ jsx(Typography_default, { size: 100, color: textColor[color], children: label }) })
170
188
  })
171
189
  ) }),
172
190
  /* @__PURE__ */ jsx(
@@ -216,7 +234,8 @@ function RichSelectList(props) {
216
234
  {
217
235
  [SelectList_module_default.unselected]: !errorText && selectedKeys !== "all" && !selectedKeys.size,
218
236
  [SelectList_module_default.selected]: !errorText && (selectedKeys === "all" || selectedKeys.size),
219
- [SelectList_module_default.selectErrorCambio]: errorText
237
+ [SelectList_module_default.selectErrorCambio]: errorText,
238
+ [SelectList_module_default[`selectColor${color}`]]: color
220
239
  }
221
240
  ),
222
241
  children: selectedTextValue
@@ -232,7 +251,7 @@ function RichSelectList(props) {
232
251
  children: /* @__PURE__ */ jsx(
233
252
  "path",
234
253
  {
235
- fill: errorText ? ColorBaseDestructive700 : ColorBaseGray800,
254
+ fill: getArrowIconColor(),
236
255
  d: "M15.88 9.29 12 13.17 8.12 9.29a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41-.39-.38-1.03-.39-1.42 0z"
237
256
  }
238
257
  )
@@ -247,7 +266,7 @@ function RichSelectList(props) {
247
266
  Typography_default,
248
267
  __spreadProps(__spreadValues({
249
268
  size: 100,
250
- color: errorText ? "destructive-primary" : "gray700"
269
+ color: errorText ? "destructive-primary" : textColor[color]
251
270
  }, errorText ? errorMessageProps : descriptionProps), {
252
271
  children: errorText ? errorText : helperText
253
272
  })
@@ -267,4 +286,4 @@ var RichSelectList_default = Object.assign(RichSelectList, {
267
286
  export {
268
287
  RichSelectList_default
269
288
  };
270
- //# sourceMappingURL=UYQTZSTJ.js.map
289
+ //# sourceMappingURL=R47ZRXRK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/RichSelect/RichSelectList.tsx","css-module:../SelectList/SelectList.module.css#css-module"],"sourcesContent":["import React, {\n type ReactElement,\n useMemo,\n type SyntheticEvent,\n useRef,\n useId,\n} from \"react\";\nimport classNames from \"classnames\";\nimport {\n ColorBaseDestructive700,\n ColorBaseGray700,\n ColorCambioWhite100,\n} from \"@cambly/syntax-design-tokens\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport Popover from \"../Popover/Popover\";\nimport {\n Label as ReactAriaLabel,\n Provider as ReactAriaProvider,\n} from \"react-aria-components\";\nimport { useControlledState } from \"@react-stately/utils\";\nimport { setInteractionModality } from \"@react-aria/interactions\";\nimport { DialogContext } from \"../Dialog/Dialog\";\nimport styles from \"../SelectList/SelectList.module.css\";\nimport RichSelectBox, {\n RichSelectBoxContext,\n convertSelection,\n type RichSelectBoxProps,\n} from \"./RichSelectBox\";\nimport TapArea from \"../TapArea/TapArea\";\nimport { type OverlayHandlerRef } from \"../react-aria-utils/Triggerable\";\nimport Box from \"../Box/Box\";\nimport RichSelectSection from \"./RichSelectSection\";\nimport RichSelectChip from \"./RichSelectChip\";\nimport RichSelectRadioButton from \"./RichSelectRadioButton\";\nimport { useField } from \"react-aria\";\n\nconst NOOP = () => undefined;\n\nexport type RichSelectListProps = RichSelectBoxProps & {\n /** Test id for the select element */\n \"data-testid\"?: string;\n /**\n * Disables the select dropdown entirely\n * @defaultValue false\n */\n disabled?: boolean;\n /** Callback to be called when select is clicked */\n onClick?: (event: SyntheticEvent<HTMLDivElement>) => void;\n /** Text shown below select box if there is an input error. */\n errorText?: string;\n /** Text shown below select box */\n helperText?: string;\n /**\n * RichSelectList id, if not provided, a unique id will be generated\n */\n id?: string;\n /** Text shown above select box */\n label: string;\n /**\n * Text showing in select box if no option has been chosen.\n * There should always have a placeholder unless there is a default option selected\n */\n placeholderText?: string;\n /** Use to render (override) text shown in the select box */\n selectTextValue?: (selectedValues?: \"all\" | string[]) => string | undefined;\n /**\n * Color of the select box\n * @defaultValue white\n */\n color?: \"white\" | \"clear\";\n};\n\n/**\n * [RichSelectList](https://cambly-syntax.vercel.app/?path=/docs/components-richselectlist--docs) is a dropdown menu that allows users to select one or multiple options from a list.\n *\n * Example Usage:\n ```\n <RichSelectList\n label=\"My Label\"\n multiple\n onChange={() => { ... }}\n primaryButtonText=\"Save\"\n primaryButtonAccessibilityLabel=\"Save\"\n secondaryButtonText=\"Clear\"\n secondaryButtonAccessibilityLabel=\"Clear\"\n >\n <RichSelectList.Section label=\"Cities\">\n <RichSelectList.Chip label=\"San Francisco\" value=\"sf\" />\n <RichSelectList.Chip label=\"New York\" value=\"ny\" disabled />\n <RichSelectList.Chip label=\"Tulsa\" value=\"tulsa\" />\n <RichSelectList.Chip label=\"Chicago\" value=\"chicago\" disabled />\n </RichSelectList.Section>\n </RichSelectList>\n ```\n */\nfunction RichSelectList(props: RichSelectListProps): ReactElement {\n const {\n autosave,\n children,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText,\n helperText,\n label,\n id,\n onChange,\n onClick = NOOP,\n placeholderText,\n selectTextValue,\n selectedValues: selectedValuesProp,\n defaultSelectedValues: defaultSelectedValuesProp,\n color = \"white\",\n ...richSelectBoxProps\n } = props;\n\n const reactId = useId();\n const inputId = id ?? reactId;\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n\n // passed to popover, which attached open/close methods\n const overlayHandlerRef = useRef<OverlayHandlerRef>({});\n\n const selectedKeysProp = useMemo(\n () => convertSelection(selectedValuesProp),\n [selectedValuesProp],\n );\n const defaultSelectedKeys = useMemo(\n () => convertSelection(defaultSelectedValuesProp, new Set()),\n [defaultSelectedValuesProp],\n );\n const [selectedKeys, setSelectedKeys] = useControlledState(\n selectedKeysProp!, // eslint-disable-line @typescript-eslint/no-non-null-assertion -- there is a bug in the typedef for useControlledState from react-stately. Internally they rely on value (first arg) able to be undefined\n defaultSelectedKeys,\n (value) => {\n const _value = value === \"all\" ? \"all\" : [...value].map(String);\n onChange(_value);\n if (!autosave) overlayHandlerRef.current.close?.();\n },\n );\n\n const selectedTextValue = useMemo(() => {\n if (selectTextValue)\n return (\n selectTextValue(\n selectedKeys === \"all\" ? \"all\" : [...selectedKeys].map(String),\n ) ?? placeholderText\n );\n if (selectedKeys === \"all\") return \"All selected\";\n if (selectedKeys.size) return `${selectedKeys.size} selected`;\n return placeholderText;\n }, [selectTextValue, selectedKeys, placeholderText]);\n\n const fieldRef = useRef<HTMLDivElement>(null);\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField({\n label, // this is the label for the select box\n description: helperText,\n errorMessage: errorText,\n });\n\n const textColor = {\n white: \"gray700\",\n clear: \"white\",\n } as const;\n\n const getArrowIconColor = () => {\n if (errorText) {\n return ColorBaseDestructive700;\n } else {\n if (color === \"clear\") {\n return ColorCambioWhite100;\n } else {\n return ColorBaseGray700;\n }\n }\n };\n\n return (\n <ReactAriaProvider\n values={[\n [RichSelectBoxContext, { autoFocus: true }],\n [DialogContext, { padding: autosave ? undefined : 0 }], // this is altering Popover's internal dialog padding to show the sticky save/close buttons. Ideally this could be avoided\n ]}\n >\n <div\n className={classNames(styles.selectContainer, {\n [styles.opacityOverlay]: disabled,\n })}\n onClick={onClick}\n >\n {label && (\n <>\n <ReactAriaLabel\n data-testid={[dataTestId, \"label\"].filter(Boolean).join(\"-\")}\n {...labelProps}\n onClick={() => {\n if (disabled) return;\n fieldRef.current?.focus();\n setInteractionModality(\"keyboard\"); // Show the focus ring so the user knows where focus went\n }}\n >\n <Box paddingX={1}>\n <Typography size={100} color={textColor[color]}>\n {label}\n </Typography>\n </Box>\n </ReactAriaLabel>\n </>\n )}\n <Popover\n ref={overlayHandlerRef}\n disabled={disabled}\n content={\n // this Box wrapper is to reapply the padding that was stripped from popover's dialog to show the sticky save/close buttons. Ideally this could be avoided\n <Box\n padding={autosave ? undefined : 5}\n dangerouslySetInlineStyle={\n autosave ? undefined : { __style: { paddingBottom: 0 } }\n }\n role=\"menu\"\n >\n <RichSelectBox\n autosave={autosave}\n selectedValues={selectedKeys}\n defaultSelectedValues={defaultSelectedKeys}\n onChange={(selected) => setSelectedKeys(new Set(selected))}\n {...richSelectBoxProps}\n accessibilityLabel={inputId}\n >\n {children}\n </RichSelectBox>\n </Box>\n }\n >\n <TapArea\n data-testid={dataTestId}\n disabled={disabled}\n onClick={onClick}\n rounding=\"md\"\n {...fieldProps}\n ref={fieldRef}\n >\n <div className={styles.selectWrapper}>\n <div\n className={classNames(\n styles.selectBox,\n styles.selectBoxCambio,\n {\n [styles.unselected]:\n !errorText &&\n selectedKeys !== \"all\" &&\n !selectedKeys.size,\n [styles.selected]:\n !errorText &&\n (selectedKeys === \"all\" || selectedKeys.size),\n [styles.selectErrorCambio]: errorText,\n [styles[`selectColor${color}`]]: color,\n },\n )}\n >\n {selectedTextValue}\n </div>\n <div className={styles.arrowIcon}>\n <svg\n focusable=\"false\"\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n width={24}\n >\n <path\n fill={getArrowIconColor()}\n d=\"M15.88 9.29 12 13.17 8.12 9.29a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41-.39-.38-1.03-.39-1.42 0z\"\n />\n </svg>\n </div>\n </div>\n </TapArea>\n </Popover>\n {(helperText || errorText) && (\n <Box paddingX={1}>\n <Typography\n size={100}\n color={errorText ? \"destructive-primary\" : textColor[color]}\n {...(errorText ? errorMessageProps : descriptionProps)}\n >\n {errorText ? errorText : helperText}\n </Typography>\n </Box>\n )}\n </div>\n </ReactAriaProvider>\n );\n}\n\nexport default Object.assign(RichSelectList, {\n Section: RichSelectSection,\n Chip: RichSelectChip,\n RadioButton: RichSelectRadioButton,\n});\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/SelectList/SelectList.module.css\"; export default {\"selectContainer\":\"_selectContainer_1g9ap_1\",\"opacityOverlay\":\"_opacityOverlay_1g9ap_7\",\"selectWrapper\":\"_selectWrapper_1g9ap_11\",\"selectBox\":\"_selectBox_1g9ap_16\",\"selectBoxCambio\":\"_selectBoxCambio_1g9ap_30\",\"selectMouseFocusStyling\":\"_selectMouseFocusStyling_1g9ap_38\",\"unselected\":\"_unselected_1g9ap_43\",\"selected\":\"_selected_1g9ap_47\",\"arrowIcon\":\"_arrowIcon_1g9ap_51\",\"selectErrorCambio\":\"_selectErrorCambio_1g9ap_65\",\"selectColorwhite\":\"_selectColorwhite_1g9ap_71\",\"selectColorclear\":\"_selectColorclear_1g9ap_77\"}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,EAEE;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AACP,OAAO,gBAAgB;AASvB;AAAA,EACE,SAAS;AAAA,EACT,YAAY;AAAA,OACP;AACP,SAAS,0BAA0B;AACnC,SAAS,8BAA8B;;;ACrB6D,IAAO,4BAAQ,EAAC,mBAAkB,4BAA2B,kBAAiB,2BAA0B,iBAAgB,2BAA0B,aAAY,uBAAsB,mBAAkB,6BAA4B,2BAA0B,qCAAoC,cAAa,wBAAuB,YAAW,sBAAqB,aAAY,uBAAsB,qBAAoB,+BAA8B,oBAAmB,8BAA6B,oBAAmB,6BAA4B;;;ADmC3nB,SAAS,gBAAgB;AA8Jf,mBAWM,KAwCJ,YAnDF;AA5JV,IAAM,OAAO,MAAM;AA2DnB,SAAS,eAAe,OAA0C;AAChE,QAiBI,YAhBF;AAAA;AAAA,IACA;AA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AAM,kBAAkB;AAAA,8BACxB,GAAE;AAAA;AAAA,0BACJ;AAAA;AAAA,sBACF,GACF;AAAA,uBACF;AAAA;AAAA,gBACF;AAAA;AAAA,YACF;AAAA,aACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,cAAC;AAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAO,YAAY,wBAAwB,UAAU,KAAK;AAAA,iBACrD,YAAY,oBAAoB,mBAHtC;AAAA,gBAKE,sBAAY,YAAY;AAAA;AAAA,YAC3B,GACF;AAAA;AAAA;AAAA,MAEJ;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,yBAAQ,OAAO,OAAO,gBAAgB;AAAA,EAC3C,SAAS;AAAA,EACT,MAAM;AAAA,EACN,aAAa;AACf,CAAC;","names":["_a"]}
@@ -4,7 +4,7 @@ import {
4
4
  } from "./5HEC7ASW.js";
5
5
  import {
6
6
  IconButton_default
7
- } from "./MZOGVH4K.js";
7
+ } from "./UASXKT55.js";
8
8
  import {
9
9
  Box_default
10
10
  } from "./65PMWIHY.js";
@@ -157,4 +157,4 @@ export {
157
157
  AriaModal,
158
158
  ModalDialog_default
159
159
  };
160
- //# sourceMappingURL=BLW57GRR.js.map
160
+ //# sourceMappingURL=RPWXCCIV.js.map
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
2
+
3
+ // css-module:../Button/Button.module.css#css-module
4
+ var Button_module_default = { "button": "_button_v2jgj_1", "buttonGap": "_buttonGap_v2jgj_8", "disabled": "_disabled_v2jgj_42", "disabledPrimary": "_disabledPrimary_v2jgj_57", "fullWidth": "_fullWidth_v2jgj_61", "sm": "_sm_v2jgj_65", "md": "_md_v2jgj_72", "lg": "_lg_v2jgj_79", "icon": "_icon_v2jgj_86", "smIcon": "_smIcon_v2jgj_90", "mdIcon": "_mdIcon_v2jgj_97", "lgIcon": "_lgIcon_v2jgj_104", "loading": "_loading_v2jgj_121", "syntaxButtonLoadingRotate": "_syntaxButtonLoadingRotate_v2jgj_1", "loadingCircle": "_loadingCircle_v2jgj_125" };
5
+
6
+
7
+
8
+ exports.Button_module_default = Button_module_default;
9
+ //# sourceMappingURL=TH4TA3JN.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["css-module:../Button/Button.module.css#css-module"],"names":[],"mappings":";;;AAA4F,IAAO,wBAAQ,EAAC,UAAS,mBAAkB,aAAY,sBAAqB,YAAW,sBAAqB,mBAAkB,6BAA4B,aAAY,uBAAsB,MAAK,gBAAe,MAAK,gBAAe,MAAK,gBAAe,QAAO,kBAAiB,UAAS,oBAAmB,UAAS,oBAAmB,UAAS,qBAAoB,WAAU,sBAAqB,6BAA4B,sCAAqC,iBAAgB,2BAA0B","sourcesContent":["import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Button/Button.module.css\"; export default {\"button\":\"_button_v2jgj_1\",\"buttonGap\":\"_buttonGap_v2jgj_8\",\"disabled\":\"_disabled_v2jgj_42\",\"disabledPrimary\":\"_disabledPrimary_v2jgj_57\",\"fullWidth\":\"_fullWidth_v2jgj_61\",\"sm\":\"_sm_v2jgj_65\",\"md\":\"_md_v2jgj_72\",\"lg\":\"_lg_v2jgj_79\",\"icon\":\"_icon_v2jgj_86\",\"smIcon\":\"_smIcon_v2jgj_90\",\"mdIcon\":\"_mdIcon_v2jgj_97\",\"lgIcon\":\"_lgIcon_v2jgj_104\",\"loading\":\"_loading_v2jgj_121\",\"syntaxButtonLoadingRotate\":\"_syntaxButtonLoadingRotate_v2jgj_1\",\"loadingCircle\":\"_loadingCircle_v2jgj_125\"}"]}
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  internalIconSize,
4
4
  materialIconSize
5
- } from "./ESVDNOSI.js";
5
+ } from "./64WM4STC.js";
6
6
  import {
7
7
  foregroundColor
8
8
  } from "./VRJAMHSI.js";
@@ -74,4 +74,4 @@ var IconButton_default = IconButton;
74
74
  export {
75
75
  IconButton_default
76
76
  };
77
- //# sourceMappingURL=MZOGVH4K.js.map
77
+ //# sourceMappingURL=UASXKT55.js.map
@@ -8,7 +8,7 @@ var _3P2PWHOUcjs = require('./3P2PWHOU.cjs');
8
8
 
9
9
 
10
10
 
11
- var _7TEFD526cjs = require('./7TEFD526.cjs');
11
+ var _65BTPZZTcjs = require('./65BTPZZT.cjs');
12
12
 
13
13
 
14
14
  var _KJLBDAZHcjs = require('./KJLBDAZH.cjs');
@@ -33,7 +33,7 @@ var _react = require('react');
33
33
  var _classnames = require('classnames'); var _classnames2 = _interopRequireDefault(_classnames);
34
34
 
35
35
  // css-module:./Button.module.css#css-module
36
- var Button_module_default = { "button": "_button_1hpt0_1", "buttonGap": "_buttonGap_1hpt0_8", "disabled": "_disabled_1hpt0_42", "disabledPrimary": "_disabledPrimary_1hpt0_56", "fullWidth": "_fullWidth_1hpt0_60", "sm": "_sm_1hpt0_64", "md": "_md_1hpt0_71", "lg": "_lg_1hpt0_78", "icon": "_icon_1hpt0_85", "smIcon": "_smIcon_1hpt0_89", "mdIcon": "_mdIcon_1hpt0_96", "lgIcon": "_lgIcon_1hpt0_103", "loading": "_loading_1hpt0_120", "syntaxButtonLoadingRotate": "_syntaxButtonLoadingRotate_1hpt0_1", "loadingCircle": "_loadingCircle_1hpt0_124" };
36
+ var Button_module_default = { "button": "_button_v2jgj_1", "buttonGap": "_buttonGap_v2jgj_8", "disabled": "_disabled_v2jgj_42", "disabledPrimary": "_disabledPrimary_v2jgj_57", "fullWidth": "_fullWidth_v2jgj_61", "sm": "_sm_v2jgj_65", "md": "_md_v2jgj_72", "lg": "_lg_v2jgj_79", "icon": "_icon_v2jgj_86", "smIcon": "_smIcon_v2jgj_90", "mdIcon": "_mdIcon_v2jgj_97", "lgIcon": "_lgIcon_v2jgj_104", "loading": "_loading_v2jgj_121", "syntaxButtonLoadingRotate": "_syntaxButtonLoadingRotate_v2jgj_1", "loadingCircle": "_loadingCircle_v2jgj_125" };
37
37
 
38
38
  // src/Button/Button.tsx
39
39
  var _jsxruntime = require('react/jsx-runtime');
@@ -88,10 +88,10 @@ var Button = _react.forwardRef.call(void 0,
88
88
  {
89
89
  className: _classnames2.default.call(void 0,
90
90
  Button_module_default.icon,
91
- _7TEFD526cjs.materialIconSize[size],
91
+ _65BTPZZTcjs.materialIconSize[size],
92
92
  disabledPrimary && Button_module_default.disabledPrimary
93
93
  ),
94
- size: _7TEFD526cjs.internalIconSize[size]
94
+ size: _65BTPZZTcjs.internalIconSize[size]
95
95
  }
96
96
  ),
97
97
  (loading && loadingText || !loading && text) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _KJLBDAZHcjs.Box_default, { paddingX: 1, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _FEFAG4KTcjs.Typography_default, { size: _5JUNB754cjs.textVariant_default[size], weight: "medium", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -109,10 +109,10 @@ var Button = _react.forwardRef.call(void 0,
109
109
  {
110
110
  className: _classnames2.default.call(void 0,
111
111
  Button_module_default.icon,
112
- _7TEFD526cjs.materialIconSize[size],
112
+ _65BTPZZTcjs.materialIconSize[size],
113
113
  disabledPrimary && Button_module_default.disabledPrimary
114
114
  ),
115
- size: _7TEFD526cjs.internalIconSize[size]
115
+ size: _65BTPZZTcjs.internalIconSize[size]
116
116
  }
117
117
  ),
118
118
  loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -146,4 +146,4 @@ var Button_default = Button;
146
146
 
147
147
 
148
148
  exports.Button_default = Button_default;
149
- //# sourceMappingURL=TSMYMWWE.cjs.map
149
+ //# sourceMappingURL=UYUCK2UE.cjs.map