@cambly/syntax-core 19.4.0 → 20.0.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 (51) hide show
  1. package/dist/RichSelect/RichSelectList.cjs +3 -3
  2. package/dist/RichSelect/RichSelectList.css +28 -16
  3. package/dist/RichSelect/RichSelectList.css.map +1 -1
  4. package/dist/RichSelect/RichSelectList.js +2 -2
  5. package/dist/SelectList/SelectList.cjs +3 -3
  6. package/dist/SelectList/SelectList.css +28 -16
  7. package/dist/SelectList/SelectList.css.map +1 -1
  8. package/dist/SelectList/SelectList.d.ts +7 -6
  9. package/dist/SelectList/SelectList.js +2 -2
  10. package/dist/TextArea/TextArea.cjs +2 -2
  11. package/dist/TextArea/TextArea.css +20 -13
  12. package/dist/TextArea/TextArea.css.map +1 -1
  13. package/dist/TextArea/TextArea.d.ts +6 -0
  14. package/dist/TextArea/TextArea.js +1 -1
  15. package/dist/TextField/TextField.cjs +2 -2
  16. package/dist/TextField/TextField.css +20 -13
  17. package/dist/TextField/TextField.css.map +1 -1
  18. package/dist/TextField/TextField.d.ts +1 -1
  19. package/dist/TextField/TextField.js +1 -1
  20. package/dist/__chunks/{BDOOAHOC.cjs → 6MV5I6RV.cjs} +16 -24
  21. package/dist/__chunks/6MV5I6RV.cjs.map +1 -0
  22. package/dist/__chunks/{BJU7QKAS.cjs → CQWIABDZ.cjs} +1 -1
  23. package/dist/__chunks/{BJU7QKAS.cjs.map → CQWIABDZ.cjs.map} +1 -1
  24. package/dist/__chunks/{MZK5G2SD.js → D5RAT3YV.js} +9 -5
  25. package/dist/__chunks/D5RAT3YV.js.map +1 -0
  26. package/dist/__chunks/{2FH3ZXIJ.js → DG5BGE3F.js} +13 -21
  27. package/dist/__chunks/DG5BGE3F.js.map +1 -0
  28. package/dist/__chunks/{Z6EWS3QI.cjs → IUX3GQRD.cjs} +9 -5
  29. package/dist/__chunks/IUX3GQRD.cjs.map +1 -0
  30. package/dist/__chunks/{INXS6UTP.js → JWSI5EOR.js} +1 -1
  31. package/dist/__chunks/{INXS6UTP.js.map → JWSI5EOR.js.map} +1 -1
  32. package/dist/__chunks/{WVK5Z5JA.cjs → KSBBGTKF.cjs} +2 -2
  33. package/dist/__chunks/KSBBGTKF.cjs.map +1 -0
  34. package/dist/__chunks/{HWT7SAAO.js → LHQQKL6Q.js} +2 -2
  35. package/dist/__chunks/LHQQKL6Q.js.map +1 -0
  36. package/dist/__chunks/{RE4YJRHB.cjs → PAC42QWP.cjs} +6 -6
  37. package/dist/__chunks/PAC42QWP.cjs.map +1 -0
  38. package/dist/__chunks/{GEUE4GXC.js → VXPUQYXA.js} +3 -3
  39. package/dist/__chunks/{GEUE4GXC.js.map → VXPUQYXA.js.map} +1 -1
  40. package/dist/index.cjs +6 -6
  41. package/dist/index.css +48 -29
  42. package/dist/index.css.map +1 -1
  43. package/dist/index.js +5 -5
  44. package/package.json +1 -1
  45. package/dist/__chunks/2FH3ZXIJ.js.map +0 -1
  46. package/dist/__chunks/BDOOAHOC.cjs.map +0 -1
  47. package/dist/__chunks/HWT7SAAO.js.map +0 -1
  48. package/dist/__chunks/MZK5G2SD.js.map +0 -1
  49. package/dist/__chunks/RE4YJRHB.cjs.map +0 -1
  50. package/dist/__chunks/WVK5Z5JA.cjs.map +0 -1
  51. package/dist/__chunks/Z6EWS3QI.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/TextArea/TextArea.tsx","css-module:./TextArea.module.css#css-module","css-module:../TextField/TextField.module.css#css-module"],"sourcesContent":["import Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport React, { type ReactElement, useId, forwardRef } from \"react\";\nimport styles from \"./TextArea.module.css\";\nimport textFieldStyles from \"../TextField/TextField.module.css\";\nimport classNames from \"classnames\";\nimport useIsHydrated from \"../useIsHydrated\";\n\ntype TextAreaProps = {\n /**\n * A data-testid to make querying for the TextArea easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextArea will be disabled.\n */\n disabled?: boolean;\n /**\n * Text shown below TextArea if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextArea\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextArea visible label\n */\n label: string;\n /**\n * Maximum number of characters allowed in the TextArea\n */\n maxLength?: number;\n /**\n * Indicate whether the component renders on a light or dark background. Changes the color of the input field and text\n *\n * @defaulValue `lightBackground`\n */\n on?: \"lightBackground\" | \"darkBackground\";\n /**\n * Callback fired when the value is changed.\n */\n onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n /**\n * Placeholder text to display when TextArea is empty\n */\n placeholder?: string;\n /**\n * Sets which part resizes when the user drags the resize handle.\n * * `none`: TextArea can not be resized\n * * `horizontal`: TextArea can only be resized horizontally\n * * `vertical`: TextArea can only be resized vertically\n * * `both`: TextArea can be resized horizontally and vertically\n *\n * @defaultvalue `none`\n */\n resize?: \"none\" | \"horizontal\" | \"vertical\" | \"both\";\n /**\n * Number of rows to display\n */\n rows?: number;\n /**\n * Value of the TextArea\n */\n value: string;\n};\n\n/**\n * [TextArea](https://cambly-syntax.vercel.app/?path=/docs/components-textarea--docs) allows users to enter multiple lines of text.\n */\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength = 1024,\n placeholder = \"\",\n rows = 3,\n value = \"\",\n on,\n onChange,\n resize = \"none\",\n }: TextAreaProps,\n forwardedRef,\n ): ReactElement {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const reactId = useId();\n const inputId = id ?? reactId;\n const textColor = on === \"darkBackground\" ? \"white\" : \"gray900\";\n const errorTextColor =\n on !== \"darkBackground\"\n ? \"destructive-lightBackground\"\n : \"destructive-darkBackground\";\n\n return (\n <Box\n display=\"flex\"\n direction=\"column\"\n gap={2}\n width=\"100%\"\n dangerouslySetInlineStyle={{\n __style: {\n opacity: disabled ? 0.5 : 1,\n },\n }}\n position=\"relative\"\n >\n {label && (\n <label className={textFieldStyles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color={textColor}>\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <Typography size={100}>\n <textarea\n data-testid={dataTestId}\n ref={forwardedRef}\n className={classNames(\n textFieldStyles.textfield,\n styles.textarea,\n styles[`resize${resize}`],\n errorText &&\n (on === \"darkBackground\"\n ? textFieldStyles.transparentInputError\n : textFieldStyles.inputError),\n {\n [textFieldStyles.transparent]: on === \"darkBackground\",\n },\n )}\n id={inputId}\n placeholder={placeholder}\n maxLength={maxLength}\n onChange={onChange}\n rows={rows}\n value={value}\n disabled={disabled}\n />\n </Typography>\n {(helperText || errorText) && (\n <Box paddingX={1}>\n <Typography\n size={100}\n color={errorText ? errorTextColor : textColor}\n >\n {errorText || helperText}\n </Typography>\n </Box>\n )}\n </Box>\n );\n },\n);\n\nexport default TextArea;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextArea/TextArea.module.css\"; export default {\"textarea\":\"_textarea_1sb0v_1\",\"resizenone\":\"_resizenone_1sb0v_6\",\"resizehorizontal\":\"_resizehorizontal_1sb0v_10\",\"resizevertical\":\"_resizevertical_1sb0v_14\",\"resizeboth\":\"_resizeboth_1sb0v_18\"}","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextField/TextField.module.css\"; export default {\"textfield\":\"_textfield_17wxq_1\",\"transparent\":\"_transparent_17wxq_20\",\"label\":\"_label_17wxq_36\",\"md\":\"_md_17wxq_40\",\"height\":\"_height_17wxq_44\",\"inputError\":\"_inputError_17wxq_48\",\"transparentInputError\":\"_transparentInputError_17wxq_57\",\"transparenInputError\":\"_transparenInputError_17wxq_62\"}"],"mappings":";;;;;;;;;;;;AAEA,SAAmC,OAAO,kBAAkB;;;ACFoC,IAAO,0BAAQ,EAAC,YAAW,qBAAoB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QAAQ;AAAA,gBACxB,cACG,OAAO,mBACJ,yBAAgB,wBAChB,yBAAgB;AAAA,gBACtB;AAAA,kBACE,CAAC,yBAAgB,WAAW,GAAG,OAAO;AAAA,gBACxC;AAAA,cACF;AAAA,cACA,IAAI;AAAA,cACJ;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA;AAAA,UACF,GACF;AAAA,WACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO,YAAY,iBAAiB;AAAA,cAEnC,uBAAa;AAAA;AAAA,UAChB,GACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;","names":["TextArea"]}
@@ -6,7 +6,7 @@ import {
6
6
  ColorBaseDestructive700,
7
7
  ColorBaseGray700,
8
8
  ColorCambioWhite100
9
- } from "./INXS6UTP.js";
9
+ } from "./JWSI5EOR.js";
10
10
  import {
11
11
  Focus_module_default
12
12
  } from "./KKADUD65.js";
@@ -31,7 +31,7 @@ import {
31
31
  import classNames from "classnames";
32
32
 
33
33
  // css-module:./SelectList.module.css#css-module
34
- var SelectList_module_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" };
34
+ var SelectList_module_default = { "selectContainer": "_selectContainer_13v7l_1", "opacityOverlay": "_opacityOverlay_13v7l_7", "selectWrapper": "_selectWrapper_13v7l_11", "selectBox": "_selectBox_13v7l_16", "selectBoxCambio": "_selectBoxCambio_13v7l_30", "selectMouseFocusStyling": "_selectMouseFocusStyling_13v7l_38", "unselected": "_unselected_13v7l_43", "selected": "_selected_13v7l_47", "transparent": "_transparent_13v7l_51", "arrowIcon": "_arrowIcon_13v7l_63", "selectErrorCambio": "_selectErrorCambio_13v7l_77", "selectColorwhite": "_selectColorwhite_13v7l_83", "transparentInputError": "_transparentInputError_13v7l_89", "transparenInputError": "_transparenInputError_13v7l_94" };
35
35
 
36
36
  // src/SelectList/SelectList.tsx
37
37
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -43,11 +43,11 @@ function SelectList({
43
43
  helperText,
44
44
  id,
45
45
  label,
46
+ on,
46
47
  onChange,
47
48
  onClick,
48
49
  placeholderText,
49
- selectedValue = "",
50
- color = "white"
50
+ selectedValue = ""
51
51
  }) {
52
52
  const reactId = useId();
53
53
  const isHydrated = useIsHydrated();
@@ -55,6 +55,8 @@ function SelectList({
55
55
  const selectId = id != null ? id : reactId;
56
56
  const { isFocusVisible } = useFocusVisible();
57
57
  const [isFocused, setIsFocused] = useState(false);
58
+ const textColor = on === "darkBackground" ? "white" : "gray900";
59
+ const errorTextColor = on !== "darkBackground" ? "destructive-lightBackground" : "destructive-darkBackground";
58
60
  const handleKeyDown = (event) => {
59
61
  if (disabled || onClick == null)
60
62
  return;
@@ -62,15 +64,11 @@ function SelectList({
62
64
  onClick(event);
63
65
  }
64
66
  };
65
- const textColor = {
66
- white: "gray700",
67
- clear: "white"
68
- };
69
67
  const getArrowIconColor = () => {
70
68
  if (errorText) {
71
69
  return ColorBaseDestructive700;
72
70
  } else {
73
- if (color === "clear") {
71
+ if (on === "darkBackground") {
74
72
  return ColorCambioWhite100;
75
73
  } else {
76
74
  return ColorBaseGray700;
@@ -84,7 +82,7 @@ function SelectList({
84
82
  [SelectList_module_default.opacityOverlay]: disabled
85
83
  }),
86
84
  children: [
87
- label && /* @__PURE__ */ jsx("label", { htmlFor: selectId, children: /* @__PURE__ */ jsx(Box_default, { paddingX: 1, children: /* @__PURE__ */ jsx(Typography_default, { size: 100, color: textColor[color], children: label }) }) }),
85
+ label && /* @__PURE__ */ jsx("label", { htmlFor: selectId, children: /* @__PURE__ */ jsx(Box_default, { paddingX: 1, children: /* @__PURE__ */ jsx(Typography_default, { size: 100, color: textColor, children: label }) }) }),
88
86
  /* @__PURE__ */ jsxs("div", { className: SelectList_module_default.selectWrapper, children: [
89
87
  /* @__PURE__ */ jsxs(
90
88
  "select",
@@ -95,12 +93,13 @@ function SelectList({
95
93
  className: classNames(SelectList_module_default.selectBox, SelectList_module_default.selectBoxCambio, {
96
94
  [SelectList_module_default.unselected]: !selectedValue && !errorText,
97
95
  [SelectList_module_default.selected]: selectedValue && !errorText,
98
- [SelectList_module_default.selectErrorCambio]: errorText,
96
+ [SelectList_module_default.selectErrorCambio]: errorText && on === "lightBackground",
97
+ [SelectList_module_default.transparentInputError]: errorText && on === "darkBackground",
99
98
  [Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible,
100
99
  // for focus keyboard
101
100
  [SelectList_module_default.selectMouseFocusStyling]: isFocused && !isFocusVisible,
102
101
  // for focus mouse
103
- [SelectList_module_default[`selectColor${color}`]]: color
102
+ [SelectList_module_default.transparent]: on === "darkBackground"
104
103
  }),
105
104
  onChange,
106
105
  onClick,
@@ -131,14 +130,7 @@ function SelectList({
131
130
  }
132
131
  ) })
133
132
  ] }),
134
- (helperText || errorText) && /* @__PURE__ */ jsx(Box_default, { paddingX: 1, children: /* @__PURE__ */ jsx(
135
- Typography_default,
136
- {
137
- size: 100,
138
- color: errorText ? "destructive-primary" : textColor[color],
139
- children: errorText ? errorText : helperText
140
- }
141
- ) })
133
+ (helperText || errorText) && /* @__PURE__ */ jsx(Box_default, { paddingX: 1, children: /* @__PURE__ */ jsx(Typography_default, { size: 100, color: errorText ? errorTextColor : textColor, children: errorText ? errorText : helperText }) })
142
134
  ]
143
135
  }
144
136
  );
@@ -148,4 +140,4 @@ SelectList.Option = SelectOption_default;
148
140
  export {
149
141
  SelectList
150
142
  };
151
- //# sourceMappingURL=2FH3ZXIJ.js.map
143
+ //# sourceMappingURL=DG5BGE3F.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/SelectList/SelectList.tsx","css-module:./SelectList.module.css#css-module"],"sourcesContent":["import React, {\n type ReactElement,\n type ReactNode,\n useId,\n useState,\n} from \"react\";\nimport Box from \"../Box/Box\";\nimport classNames from \"classnames\";\nimport {\n ColorBaseDestructive700,\n ColorBaseGray700,\n ColorCambioWhite100,\n} from \"@cambly/syntax-design-tokens\";\nimport Typography from \"../Typography/Typography\";\nimport styles from \"./SelectList.module.css\";\nimport focusStyles from \"../Focus.module.css\";\nimport SelectOption from \"./SelectOption\";\nimport useFocusVisible from \"../useFocusVisible\";\nimport useIsHydrated from \"../useIsHydrated\";\n\n/**\n * [SelectList](https://cambly-syntax.vercel.app/?path=/docs/components-selectlist--docs) is a dropdown menu that allows users to select one option from a list.\n */\nexport default function SelectList({\n children,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText,\n helperText,\n id,\n label,\n on,\n onChange,\n onClick,\n placeholderText,\n selectedValue = \"\",\n}: {\n /**\n * One or more SelectList.Option components.\n */\n children: ReactNode;\n /**\n * Test id for the select element\n */\n \"data-testid\"?: string;\n /**\n * true if the select dropdown is disabled\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Indicate whether the component renders on a light or dark background. Changes the color of the text\n *\n * @defaulValue `lightBackground`\n */\n on?: \"lightBackground\" | \"darkBackground\";\n /**\n * Callback to be called when select is clicked\n */\n onClick?: (event: React.SyntheticEvent<HTMLSelectElement>) => void;\n /**\n * Text shown below select box if there is an input error.\n */\n errorText?: string;\n /**\n * Text shown below select box\n */\n helperText?: string;\n /**\n * Id of the select element\n */\n id?: string;\n /**\n * Text shown above select box\n */\n label: string;\n /**\n * The callback to be called when an option is selected\n */\n onChange: React.ChangeEventHandler<HTMLSelectElement>;\n /**\n * Text showing in select box if no option has been chosen.\n * We should always have a placeholder unless there is a default option selected\n */\n placeholderText?: string;\n /**\n * Value of the currently selected option\n */\n selectedValue?: string;\n}): ReactElement {\n const reactId = useId();\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const selectId = id ?? reactId;\n const { isFocusVisible } = useFocusVisible();\n const [isFocused, setIsFocused] = useState(false);\n const textColor = on === \"darkBackground\" ? \"white\" : \"gray900\";\n const errorTextColor =\n on !== \"darkBackground\"\n ? \"destructive-lightBackground\"\n : \"destructive-darkBackground\";\n\n const handleKeyDown: React.KeyboardEventHandler<HTMLSelectElement> = (\n event,\n ) => {\n if (disabled || onClick == null) return;\n if (event.key === \"Enter\" || event.key === \" \" || event.key === \"Space\") {\n onClick(event);\n }\n };\n\n const getArrowIconColor = () => {\n if (errorText) {\n return ColorBaseDestructive700;\n } else {\n if (on === \"darkBackground\") {\n return ColorCambioWhite100;\n } else {\n return ColorBaseGray700;\n }\n }\n };\n\n return (\n <div\n className={classNames(styles.selectContainer, {\n [styles.opacityOverlay]: disabled,\n })}\n >\n {label && (\n <label htmlFor={selectId}>\n <Box paddingX={1}>\n <Typography size={100} color={textColor}>\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <div className={styles.selectWrapper}>\n <select\n id={selectId}\n data-testid={dataTestId}\n disabled={disabled}\n className={classNames(styles.selectBox, styles.selectBoxCambio, {\n [styles.unselected]: !selectedValue && !errorText,\n [styles.selected]: selectedValue && !errorText,\n [styles.selectErrorCambio]: errorText && on === \"lightBackground\",\n [styles.transparentInputError]:\n errorText && on === \"darkBackground\",\n [focusStyles.accessibilityOutlineFocus]:\n isFocused && isFocusVisible, // for focus keyboard\n [styles.selectMouseFocusStyling]: isFocused && !isFocusVisible, // for focus mouse\n [styles.transparent]: on === \"darkBackground\",\n })}\n onChange={onChange}\n onClick={onClick}\n onKeyDown={handleKeyDown}\n value={\n placeholderText && !selectedValue ? placeholderText : selectedValue\n }\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n >\n {placeholderText && (\n <option disabled value={placeholderText}>\n {placeholderText}\n </option>\n )}\n {children}\n </select>\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 {(helperText || errorText) && (\n <Box paddingX={1}>\n <Typography size={100} color={errorText ? errorTextColor : textColor}>\n {errorText ? errorText : helperText}\n </Typography>\n </Box>\n )}\n </div>\n );\n}\n\nSelectList.Option = SelectOption;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/SelectList/SelectList.module.css\"; export default {\"selectContainer\":\"_selectContainer_13v7l_1\",\"opacityOverlay\":\"_opacityOverlay_13v7l_7\",\"selectWrapper\":\"_selectWrapper_13v7l_11\",\"selectBox\":\"_selectBox_13v7l_16\",\"selectBoxCambio\":\"_selectBoxCambio_13v7l_30\",\"selectMouseFocusStyling\":\"_selectMouseFocusStyling_13v7l_38\",\"unselected\":\"_unselected_13v7l_43\",\"selected\":\"_selected_13v7l_47\",\"transparent\":\"_transparent_13v7l_51\",\"arrowIcon\":\"_arrowIcon_13v7l_63\",\"selectErrorCambio\":\"_selectErrorCambio_13v7l_77\",\"selectColorwhite\":\"_selectColorwhite_13v7l_83\",\"transparentInputError\":\"_transparentInputError_13v7l_89\",\"transparenInputError\":\"_transparenInputError_13v7l_94\"}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,EAGE;AAAA,EACA;AAAA,OACK;AAEP,OAAO,gBAAgB;;;ACP6E,IAAO,4BAAQ,EAAC,mBAAkB,4BAA2B,kBAAiB,2BAA0B,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AY,YAC3B,GACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,WAAW,SAAS;","names":[]}
@@ -16,7 +16,7 @@ var _react = require('react');
16
16
  var TextArea_module_default = { "textarea": "_textarea_1sb0v_1", "resizenone": "_resizenone_1sb0v_6", "resizehorizontal": "_resizehorizontal_1sb0v_10", "resizevertical": "_resizevertical_1sb0v_14", "resizeboth": "_resizeboth_1sb0v_18" };
17
17
 
18
18
  // css-module:../TextField/TextField.module.css#css-module
19
- var TextField_module_default = { "textfield": "_textfield_f2wi6_1", "transparent": "_transparent_f2wi6_13", "label": "_label_f2wi6_28", "md": "_md_f2wi6_32", "height": "_height_f2wi6_36", "inputError": "_inputError_f2wi6_40", "transparentInputError": "_transparentInputError_f2wi6_49", "transparenInputError": "_transparenInputError_f2wi6_54" };
19
+ var TextField_module_default = { "textfield": "_textfield_17wxq_1", "transparent": "_transparent_17wxq_20", "label": "_label_17wxq_36", "md": "_md_17wxq_40", "height": "_height_17wxq_44", "inputError": "_inputError_17wxq_48", "transparentInputError": "_transparentInputError_17wxq_57", "transparenInputError": "_transparenInputError_17wxq_62" };
20
20
 
21
21
  // src/TextArea/TextArea.tsx
22
22
  var _classnames = require('classnames'); var _classnames2 = _interopRequireDefault(_classnames);
@@ -33,6 +33,7 @@ var TextArea = _react.forwardRef.call(void 0,
33
33
  placeholder = "",
34
34
  rows = 3,
35
35
  value = "",
36
+ on,
36
37
  onChange,
37
38
  resize = "none"
38
39
  }, forwardedRef) {
@@ -40,6 +41,8 @@ var TextArea = _react.forwardRef.call(void 0,
40
41
  const disabled = !isHydrated || disabledProp;
41
42
  const reactId = _react.useId.call(void 0, );
42
43
  const inputId = id != null ? id : reactId;
44
+ const textColor = on === "darkBackground" ? "white" : "gray900";
45
+ const errorTextColor = on !== "darkBackground" ? "destructive-lightBackground" : "destructive-darkBackground";
43
46
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
44
47
  _QODNNCT2cjs.Box_default,
45
48
  {
@@ -54,7 +57,7 @@ var TextArea = _react.forwardRef.call(void 0,
54
57
  },
55
58
  position: "relative",
56
59
  children: [
57
- label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: TextField_module_default.label, htmlFor: inputId, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _QODNNCT2cjs.Box_default, { paddingX: 1, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _RVU3UEZIcjs.Typography_default, { size: 100, color: "gray700", children: label }) }) }),
60
+ label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: TextField_module_default.label, htmlFor: inputId, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _QODNNCT2cjs.Box_default, { paddingX: 1, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _RVU3UEZIcjs.Typography_default, { size: 100, color: textColor, children: label }) }) }),
58
61
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _RVU3UEZIcjs.Typography_default, { size: 100, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
59
62
  "textarea",
60
63
  {
@@ -64,8 +67,9 @@ var TextArea = _react.forwardRef.call(void 0,
64
67
  TextField_module_default.textfield,
65
68
  TextArea_module_default.textarea,
66
69
  TextArea_module_default[`resize${resize}`],
70
+ errorText && (on === "darkBackground" ? TextField_module_default.transparentInputError : TextField_module_default.inputError),
67
71
  {
68
- [TextField_module_default.inputError]: errorText
72
+ [TextField_module_default.transparent]: on === "darkBackground"
69
73
  }
70
74
  ),
71
75
  id: inputId,
@@ -81,7 +85,7 @@ var TextArea = _react.forwardRef.call(void 0,
81
85
  _RVU3UEZIcjs.Typography_default,
82
86
  {
83
87
  size: 100,
84
- color: errorText ? "destructive-darkBackground" : "gray700",
88
+ color: errorText ? errorTextColor : textColor,
85
89
  children: errorText || helperText
86
90
  }
87
91
  ) })
@@ -95,4 +99,4 @@ var TextArea_default = TextArea;
95
99
 
96
100
 
97
101
  exports.TextArea_default = TextArea_default;
98
- //# sourceMappingURL=Z6EWS3QI.cjs.map
102
+ //# sourceMappingURL=IUX3GQRD.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/TextArea/TextArea.tsx","css-module:./TextArea.module.css#css-module","css-module:../TextField/TextField.module.css#css-module"],"names":["TextArea"],"mappings":";;;;;;;;;;;;AAEA,SAAmC,OAAO,kBAAkB;;;ACFoC,IAAO,0BAAQ,EAAC,YAAW,qBAAoB,cAAa,uBAAsB,oBAAmB,8BAA6B,kBAAiB,4BAA2B,cAAa,uBAAsB;;;ACA/M,IAAO,2BAAQ,EAAC,aAAY,sBAAqB,eAAc,yBAAwB,SAAQ,mBAAkB,MAAK,gBAAe,UAAS,oBAAmB,cAAa,wBAAuB,yBAAwB,mCAAkC,wBAAuB,iCAAgC;;;AFKxZ,OAAO,gBAAgB;AAmGjB,SAeQ,KAfR;AA9BN,IAAM,WAAW;AAAA,EACf,SAASA,UACP;AAAA,IACE,eAAe;AAAA,IACf,UAAU,eAAe;AAAA,IACzB,YAAY;AAAA,IACZ,aAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,OAAO;AAAA,IACP,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA,SAAS;AAAA,EACX,GACA,cACc;AACd,UAAM,aAAa,cAAc;AACjC,UAAM,WAAW,CAAC,cAAc;AAChC,UAAM,UAAU,MAAM;AACtB,UAAM,UAAU,kBAAM;AACtB,UAAM,YAAY,OAAO,mBAAmB,UAAU;AACtD,UAAM,iBACJ,OAAO,mBACH,gCACA;AAEN,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,WAAU;AAAA,QACV,KAAK;AAAA,QACL,OAAM;AAAA,QACN,2BAA2B;AAAA,UACzB,SAAS;AAAA,YACP,SAAS,WAAW,MAAM;AAAA,UAC5B;AAAA,QACF;AAAA,QACA,UAAS;AAAA,QAER;AAAA,mBACC,oBAAC,WAAM,WAAW,yBAAgB,OAAO,SAAS,SAChD,8BAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,KAAK,OAAO,WAC3B,iBACH,GACF,GACF;AAAA,UAEF,oBAAC,sBAAW,MAAM,KAChB;AAAA,YAAC;AAAA;AAAA,cACC,eAAa;AAAA,cACb,KAAK;AAAA,cACL,WAAW;AAAA,gBACT,yBAAgB;AAAA,gBAChB,wBAAO;AAAA,gBACP,wBAAO,SAAS,QAAQ;AAAA,gBACxB,cACG,OAAO,mBACJ,yBAAgB,wBAChB,yBAAgB;AAAA,gBACtB;AAAA,kBACE,CAAC,yBAAgB,WAAW,GAAG,OAAO;AAAA,gBACxC;AAAA,cACF;AAAA,cACA,IAAI;AAAA,cACJ;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA;AAAA,UACF,GACF;AAAA,WACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO,YAAY,iBAAiB;AAAA,cAEnC,uBAAa;AAAA;AAAA,UAChB,GACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ","sourcesContent":["import Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport React, { type ReactElement, useId, forwardRef } from \"react\";\nimport styles from \"./TextArea.module.css\";\nimport textFieldStyles from \"../TextField/TextField.module.css\";\nimport classNames from \"classnames\";\nimport useIsHydrated from \"../useIsHydrated\";\n\ntype TextAreaProps = {\n /**\n * A data-testid to make querying for the TextArea easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextArea will be disabled.\n */\n disabled?: boolean;\n /**\n * Text shown below TextArea if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextArea\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextArea visible label\n */\n label: string;\n /**\n * Maximum number of characters allowed in the TextArea\n */\n maxLength?: number;\n /**\n * Indicate whether the component renders on a light or dark background. Changes the color of the input field and text\n *\n * @defaulValue `lightBackground`\n */\n on?: \"lightBackground\" | \"darkBackground\";\n /**\n * Callback fired when the value is changed.\n */\n onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n /**\n * Placeholder text to display when TextArea is empty\n */\n placeholder?: string;\n /**\n * Sets which part resizes when the user drags the resize handle.\n * * `none`: TextArea can not be resized\n * * `horizontal`: TextArea can only be resized horizontally\n * * `vertical`: TextArea can only be resized vertically\n * * `both`: TextArea can be resized horizontally and vertically\n *\n * @defaultvalue `none`\n */\n resize?: \"none\" | \"horizontal\" | \"vertical\" | \"both\";\n /**\n * Number of rows to display\n */\n rows?: number;\n /**\n * Value of the TextArea\n */\n value: string;\n};\n\n/**\n * [TextArea](https://cambly-syntax.vercel.app/?path=/docs/components-textarea--docs) allows users to enter multiple lines of text.\n */\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength = 1024,\n placeholder = \"\",\n rows = 3,\n value = \"\",\n on,\n onChange,\n resize = \"none\",\n }: TextAreaProps,\n forwardedRef,\n ): ReactElement {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const reactId = useId();\n const inputId = id ?? reactId;\n const textColor = on === \"darkBackground\" ? \"white\" : \"gray900\";\n const errorTextColor =\n on !== \"darkBackground\"\n ? \"destructive-lightBackground\"\n : \"destructive-darkBackground\";\n\n return (\n <Box\n display=\"flex\"\n direction=\"column\"\n gap={2}\n width=\"100%\"\n dangerouslySetInlineStyle={{\n __style: {\n opacity: disabled ? 0.5 : 1,\n },\n }}\n position=\"relative\"\n >\n {label && (\n <label className={textFieldStyles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color={textColor}>\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <Typography size={100}>\n <textarea\n data-testid={dataTestId}\n ref={forwardedRef}\n className={classNames(\n textFieldStyles.textfield,\n styles.textarea,\n styles[`resize${resize}`],\n errorText &&\n (on === \"darkBackground\"\n ? textFieldStyles.transparentInputError\n : textFieldStyles.inputError),\n {\n [textFieldStyles.transparent]: on === \"darkBackground\",\n },\n )}\n id={inputId}\n placeholder={placeholder}\n maxLength={maxLength}\n onChange={onChange}\n rows={rows}\n value={value}\n disabled={disabled}\n />\n </Typography>\n {(helperText || errorText) && (\n <Box paddingX={1}>\n <Typography\n size={100}\n color={errorText ? errorTextColor : textColor}\n >\n {errorText || helperText}\n </Typography>\n </Box>\n )}\n </Box>\n );\n },\n);\n\nexport default TextArea;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextArea/TextArea.module.css\"; export default {\"textarea\":\"_textarea_1sb0v_1\",\"resizenone\":\"_resizenone_1sb0v_6\",\"resizehorizontal\":\"_resizehorizontal_1sb0v_10\",\"resizevertical\":\"_resizevertical_1sb0v_14\",\"resizeboth\":\"_resizeboth_1sb0v_18\"}","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextField/TextField.module.css\"; export default {\"textfield\":\"_textfield_17wxq_1\",\"transparent\":\"_transparent_17wxq_20\",\"label\":\"_label_17wxq_36\",\"md\":\"_md_17wxq_40\",\"height\":\"_height_17wxq_44\",\"inputError\":\"_inputError_17wxq_48\",\"transparentInputError\":\"_transparentInputError_17wxq_57\",\"transparenInputError\":\"_transparenInputError_17wxq_62\"}"]}
@@ -10,4 +10,4 @@ export {
10
10
  ColorBaseGray700,
11
11
  ColorCambioWhite100
12
12
  };
13
- //# sourceMappingURL=INXS6UTP.js.map
13
+ //# sourceMappingURL=JWSI5EOR.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"sourcesContent":["/**\n * Do not edit directly\n * Generated on Tue, 27 Aug 2024 22:54:25 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
+ {"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"sourcesContent":["/**\n * Do not edit directly\n * Generated on Thu, 29 Aug 2024 16:33:27 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":[]}
@@ -19,7 +19,7 @@ var _react = require('react');
19
19
  var _classnames = require('classnames'); var _classnames2 = _interopRequireDefault(_classnames);
20
20
 
21
21
  // css-module:./TextField.module.css#css-module
22
- var TextField_module_default = { "textfield": "_textfield_f2wi6_1", "transparent": "_transparent_f2wi6_13", "label": "_label_f2wi6_28", "md": "_md_f2wi6_32", "height": "_height_f2wi6_36", "inputError": "_inputError_f2wi6_40", "transparentInputError": "_transparentInputError_f2wi6_49", "transparenInputError": "_transparenInputError_f2wi6_54" };
22
+ var TextField_module_default = { "textfield": "_textfield_17wxq_1", "transparent": "_transparent_17wxq_20", "label": "_label_17wxq_36", "md": "_md_17wxq_40", "height": "_height_17wxq_44", "inputError": "_inputError_17wxq_48", "transparentInputError": "_transparentInputError_17wxq_57", "transparenInputError": "_transparenInputError_17wxq_62" };
23
23
 
24
24
  // src/TextField/TextField.tsx
25
25
  var _jsxruntime = require('react/jsx-runtime');
@@ -118,4 +118,4 @@ function TextField({
118
118
 
119
119
 
120
120
  exports.TextField = TextField;
121
- //# sourceMappingURL=WVK5Z5JA.cjs.map
121
+ //# sourceMappingURL=KSBBGTKF.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/TextField/TextField.tsx","css-module:./TextField.module.css#css-module"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA,EAGE;AAAA,OACK;AACP,OAAO,gBAAgB;;;ACL2E,IAAO,2BAAQ,EAAC,aAAY,sBAAqB,eAAc,yBAAwB,SAAQ,mBAAkB,MAAK,gBAAe,UAAS,oBAAmB,cAAa,wBAAuB,yBAAwB,mCAAkC,wBAAuB,iCAAgC;;;AD6H5Y,cAMN,YANM;AA9GG,SAAR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;AAAA;AAAA,cACF;AAAA,cACC,YACC;AAAA,gBAAC;AAAA;AAAA,kBACC,UAAS;AAAA,kBACT,2BAA2B,EAAE,SAAS,EAAE,KAAK,MAAM,EAAE;AAAA,kBACrD,WAAW;AAAA,kBAEX;AAAA,oBAAC;AAAA;AAAA,sBACC,MAAM;AAAA,sBACN,OAAO,OAAO,oBAAoB,YAAY;AAAA;AAAA,kBAChD;AAAA;AAAA,cACF;AAAA;AAAA;AAAA,QAEJ;AAAA,SACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,KAAK,OAAO,YAAY,iBAAiB,WACxD,uBAAa,YAChB,GACF;AAAA;AAAA;AAAA,EAEJ;AAEJ","sourcesContent":["import React, {\n type ReactElement,\n type HTMLInputTypeAttribute,\n useId,\n} from \"react\";\nimport classNames from \"classnames\";\nimport styles from \"./TextField.module.css\";\nimport Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport Badge from \"../Badge/Badge\";\n\n/**\n * [TextField](https://cambly-syntax.vercel.app/?path=/docs/components-textfield--docs) is a component that allows users to enter text.\n */\nexport default function TextField({\n autoComplete,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n on = \"lightBackground\",\n endBadge,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength,\n onChange,\n placeholder = \"\",\n type = \"text\",\n value = \"\",\n step,\n}: {\n /**\n * The autocomplete attribute specifies whether or not an input field should have autocomplete enabled.\n *\n * Feel free to add new values from the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) as needed\n */\n autoComplete?: \"current-password\" | \"new-password\" | \"off\" | \"on\" | \"email\";\n /**\n * A data-testid to make querying for the TextField easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextField will be disabled.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Indicate whether the component renders on a light or dark background. Changes the color of the input field, text and badge\n *\n * @defaulValue `lightBackground`\n */\n on?: \"lightBackground\" | \"darkBackground\";\n /**\n * Text for endBadge shown at the end of the input field.\n */\n endBadge?: string;\n /**\n * Text shown below TextField if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextField\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextField visible label\n */\n label: string;\n /**\n * Maximum length of the TextField\n */\n maxLength?: number;\n /**\n * The callback to be called the input changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Optional TextField placeholder text\n */\n placeholder?: string;\n /**\n * Input type of the TextField\n *\n * See [full list of input types](https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_input_types)\n */\n type?: HTMLInputTypeAttribute;\n /**\n * Value of the TextField\n */\n value: string;\n /**\n * Specified legal number intervals for an input field. Specifically for time or number. If for time, specify in milliseconds. Must be a positive value.\n */\n step?: number;\n}): ReactElement {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const reactId = useId();\n const inputId = id ?? reactId;\n const textColor = on === \"darkBackground\" ? \"white\" : \"gray900\";\n const errorTextColor =\n on !== \"darkBackground\"\n ? \"destructive-lightBackground\"\n : \"destructive-darkBackground\";\n return (\n <Box\n display=\"flex\"\n direction=\"column\"\n gap={2}\n width=\"100%\"\n dangerouslySetInlineStyle={{\n __style: {\n opacity: disabled ? 0.5 : 1,\n },\n }}\n >\n {label && (\n <label className={styles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color={textColor}>\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <Box\n display=\"flex\"\n position=\"relative\"\n justifyContent={endBadge ? \"end\" : \"start\"}\n >\n <input\n autoComplete={autoComplete}\n className={classNames(\n styles.textfield,\n styles.md,\n styles.height,\n errorText &&\n (on === \"darkBackground\"\n ? styles.transparentInputError\n : styles.inputError),\n {\n [styles.transparent]: on === \"darkBackground\",\n },\n )}\n data-testid={dataTestId}\n disabled={disabled}\n id={inputId}\n maxLength={maxLength}\n type={type}\n onChange={onChange}\n placeholder={placeholder}\n value={value}\n step={step}\n />\n {endBadge && (\n <Box\n position=\"absolute\"\n dangerouslySetInlineStyle={{ __style: { top: \"25%\" } }}\n marginEnd={4}\n >\n <Badge\n text={endBadge}\n color={on === \"lightBackground\" ? \"gray370\" : \"gray870\"}\n />\n </Box>\n )}\n </Box>\n {(helperText || errorText) && (\n <Box paddingX={1}>\n <Typography size={100} color={errorText ? errorTextColor : textColor}>\n {errorText || helperText}\n </Typography>\n </Box>\n )}\n </Box>\n );\n}\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextField/TextField.module.css\"; export default {\"textfield\":\"_textfield_17wxq_1\",\"transparent\":\"_transparent_17wxq_20\",\"label\":\"_label_17wxq_36\",\"md\":\"_md_17wxq_40\",\"height\":\"_height_17wxq_44\",\"inputError\":\"_inputError_17wxq_48\",\"transparentInputError\":\"_transparentInputError_17wxq_57\",\"transparenInputError\":\"_transparenInputError_17wxq_62\"}"]}
@@ -19,7 +19,7 @@ import {
19
19
  import classNames from "classnames";
20
20
 
21
21
  // css-module:./TextField.module.css#css-module
22
- var TextField_module_default = { "textfield": "_textfield_f2wi6_1", "transparent": "_transparent_f2wi6_13", "label": "_label_f2wi6_28", "md": "_md_f2wi6_32", "height": "_height_f2wi6_36", "inputError": "_inputError_f2wi6_40", "transparentInputError": "_transparentInputError_f2wi6_49", "transparenInputError": "_transparenInputError_f2wi6_54" };
22
+ var TextField_module_default = { "textfield": "_textfield_17wxq_1", "transparent": "_transparent_17wxq_20", "label": "_label_17wxq_36", "md": "_md_17wxq_40", "height": "_height_17wxq_44", "inputError": "_inputError_17wxq_48", "transparentInputError": "_transparentInputError_17wxq_57", "transparenInputError": "_transparenInputError_17wxq_62" };
23
23
 
24
24
  // src/TextField/TextField.tsx
25
25
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -118,4 +118,4 @@ function TextField({
118
118
  export {
119
119
  TextField
120
120
  };
121
- //# sourceMappingURL=HWT7SAAO.js.map
121
+ //# sourceMappingURL=LHQQKL6Q.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/TextField/TextField.tsx","css-module:./TextField.module.css#css-module"],"sourcesContent":["import React, {\n type ReactElement,\n type HTMLInputTypeAttribute,\n useId,\n} from \"react\";\nimport classNames from \"classnames\";\nimport styles from \"./TextField.module.css\";\nimport Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport Badge from \"../Badge/Badge\";\n\n/**\n * [TextField](https://cambly-syntax.vercel.app/?path=/docs/components-textfield--docs) is a component that allows users to enter text.\n */\nexport default function TextField({\n autoComplete,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n on = \"lightBackground\",\n endBadge,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength,\n onChange,\n placeholder = \"\",\n type = \"text\",\n value = \"\",\n step,\n}: {\n /**\n * The autocomplete attribute specifies whether or not an input field should have autocomplete enabled.\n *\n * Feel free to add new values from the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) as needed\n */\n autoComplete?: \"current-password\" | \"new-password\" | \"off\" | \"on\" | \"email\";\n /**\n * A data-testid to make querying for the TextField easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextField will be disabled.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Indicate whether the component renders on a light or dark background. Changes the color of the input field, text and badge\n *\n * @defaulValue `lightBackground`\n */\n on?: \"lightBackground\" | \"darkBackground\";\n /**\n * Text for endBadge shown at the end of the input field.\n */\n endBadge?: string;\n /**\n * Text shown below TextField if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextField\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextField visible label\n */\n label: string;\n /**\n * Maximum length of the TextField\n */\n maxLength?: number;\n /**\n * The callback to be called the input changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Optional TextField placeholder text\n */\n placeholder?: string;\n /**\n * Input type of the TextField\n *\n * See [full list of input types](https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_input_types)\n */\n type?: HTMLInputTypeAttribute;\n /**\n * Value of the TextField\n */\n value: string;\n /**\n * Specified legal number intervals for an input field. Specifically for time or number. If for time, specify in milliseconds. Must be a positive value.\n */\n step?: number;\n}): ReactElement {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const reactId = useId();\n const inputId = id ?? reactId;\n const textColor = on === \"darkBackground\" ? \"white\" : \"gray900\";\n const errorTextColor =\n on !== \"darkBackground\"\n ? \"destructive-lightBackground\"\n : \"destructive-darkBackground\";\n return (\n <Box\n display=\"flex\"\n direction=\"column\"\n gap={2}\n width=\"100%\"\n dangerouslySetInlineStyle={{\n __style: {\n opacity: disabled ? 0.5 : 1,\n },\n }}\n >\n {label && (\n <label className={styles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color={textColor}>\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <Box\n display=\"flex\"\n position=\"relative\"\n justifyContent={endBadge ? \"end\" : \"start\"}\n >\n <input\n autoComplete={autoComplete}\n className={classNames(\n styles.textfield,\n styles.md,\n styles.height,\n errorText &&\n (on === \"darkBackground\"\n ? styles.transparentInputError\n : styles.inputError),\n {\n [styles.transparent]: on === \"darkBackground\",\n },\n )}\n data-testid={dataTestId}\n disabled={disabled}\n id={inputId}\n maxLength={maxLength}\n type={type}\n onChange={onChange}\n placeholder={placeholder}\n value={value}\n step={step}\n />\n {endBadge && (\n <Box\n position=\"absolute\"\n dangerouslySetInlineStyle={{ __style: { top: \"25%\" } }}\n marginEnd={4}\n >\n <Badge\n text={endBadge}\n color={on === \"lightBackground\" ? \"gray370\" : \"gray870\"}\n />\n </Box>\n )}\n </Box>\n {(helperText || errorText) && (\n <Box paddingX={1}>\n <Typography size={100} color={errorText ? errorTextColor : textColor}>\n {errorText || helperText}\n </Typography>\n </Box>\n )}\n </Box>\n );\n}\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextField/TextField.module.css\"; export default {\"textfield\":\"_textfield_17wxq_1\",\"transparent\":\"_transparent_17wxq_20\",\"label\":\"_label_17wxq_36\",\"md\":\"_md_17wxq_40\",\"height\":\"_height_17wxq_44\",\"inputError\":\"_inputError_17wxq_48\",\"transparentInputError\":\"_transparentInputError_17wxq_57\",\"transparenInputError\":\"_transparenInputError_17wxq_62\"}"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA,EAGE;AAAA,OACK;AACP,OAAO,gBAAgB;;;ACL2E,IAAO,2BAAQ,EAAC,aAAY,sBAAqB,eAAc,yBAAwB,SAAQ,mBAAkB,MAAK,gBAAe,UAAS,oBAAmB,cAAa,wBAAuB,yBAAwB,mCAAkC,wBAAuB,iCAAgC;;;AD6H5Y,cAMN,YANM;AA9GG,SAAR,UAA2B;AAAA,EAChC;AAAA,EACA,eAAe;AAAA,EACf,UAAU,eAAe;AAAA,EACzB,KAAK;AAAA,EACL;AAAA,EACA,YAAY;AAAA,EACZ,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AACF,GAqEiB;AACf,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,UAAU,MAAM;AACtB,QAAM,UAAU,kBAAM;AACtB,QAAM,YAAY,OAAO,mBAAmB,UAAU;AACtD,QAAM,iBACJ,OAAO,mBACH,gCACA;AACN,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAU;AAAA,MACV,KAAK;AAAA,MACL,OAAM;AAAA,MACN,2BAA2B;AAAA,QACzB,SAAS;AAAA,UACP,SAAS,WAAW,MAAM;AAAA,QAC5B;AAAA,MACF;AAAA,MAEC;AAAA,iBACC,oBAAC,WAAM,WAAW,yBAAO,OAAO,SAAS,SACvC,8BAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,KAAK,OAAO,WAC3B,iBACH,GACF,GACF;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC,SAAQ;AAAA,YACR,UAAS;AAAA,YACT,gBAAgB,WAAW,QAAQ;AAAA,YAEnC;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC;AAAA,kBACA,WAAW;AAAA,oBACT,yBAAO;AAAA,oBACP,yBAAO;AAAA,oBACP,yBAAO;AAAA,oBACP,cACG,OAAO,mBACJ,yBAAO,wBACP,yBAAO;AAAA,oBACb;AAAA,sBACE,CAAC,yBAAO,WAAW,GAAG,OAAO;AAAA,oBAC/B;AAAA,kBACF;AAAA,kBACA,eAAa;AAAA,kBACb;AAAA,kBACA,IAAI;AAAA,kBACJ;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA;AAAA,cACF;AAAA,cACC,YACC;AAAA,gBAAC;AAAA;AAAA,kBACC,UAAS;AAAA,kBACT,2BAA2B,EAAE,SAAS,EAAE,KAAK,MAAM,EAAE;AAAA,kBACrD,WAAW;AAAA,kBAEX;AAAA,oBAAC;AAAA;AAAA,sBACC,MAAM;AAAA,sBACN,OAAO,OAAO,oBAAoB,YAAY;AAAA;AAAA,kBAChD;AAAA;AAAA,cACF;AAAA;AAAA;AAAA,QAEJ;AAAA,SACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,KAAK,OAAO,YAAY,iBAAiB,WACxD,uBAAa,YAChB,GACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
@@ -9,7 +9,7 @@ var _3RX4RMGCcjs = require('./3RX4RMGC.cjs');
9
9
 
10
10
 
11
11
 
12
- var _BJU7QKAScjs = require('./BJU7QKAS.cjs');
12
+ var _CQWIABDZcjs = require('./CQWIABDZ.cjs');
13
13
 
14
14
 
15
15
 
@@ -57,7 +57,7 @@ var _utils = require('@react-stately/utils');
57
57
  var _interactions = require('@react-aria/interactions');
58
58
 
59
59
  // css-module:../SelectList/SelectList.module.css#css-module
60
- var SelectList_module_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" };
60
+ var SelectList_module_default = { "selectContainer": "_selectContainer_13v7l_1", "opacityOverlay": "_opacityOverlay_13v7l_7", "selectWrapper": "_selectWrapper_13v7l_11", "selectBox": "_selectBox_13v7l_16", "selectBoxCambio": "_selectBoxCambio_13v7l_30", "selectMouseFocusStyling": "_selectMouseFocusStyling_13v7l_38", "unselected": "_unselected_13v7l_43", "selected": "_selected_13v7l_47", "transparent": "_transparent_13v7l_51", "arrowIcon": "_arrowIcon_13v7l_63", "selectErrorCambio": "_selectErrorCambio_13v7l_77", "selectColorwhite": "_selectColorwhite_13v7l_83", "transparentInputError": "_transparentInputError_13v7l_89", "transparenInputError": "_transparenInputError_13v7l_94" };
61
61
 
62
62
  // src/RichSelect/RichSelectList.tsx
63
63
  var _reactaria = require('react-aria');
@@ -147,12 +147,12 @@ function RichSelectList(props) {
147
147
  };
148
148
  const getArrowIconColor = () => {
149
149
  if (errorText) {
150
- return _BJU7QKAScjs.ColorBaseDestructive700;
150
+ return _CQWIABDZcjs.ColorBaseDestructive700;
151
151
  } else {
152
152
  if (color === "clear") {
153
- return _BJU7QKAScjs.ColorCambioWhite100;
153
+ return _CQWIABDZcjs.ColorCambioWhite100;
154
154
  } else {
155
- return _BJU7QKAScjs.ColorBaseGray700;
155
+ return _CQWIABDZcjs.ColorBaseGray700;
156
156
  }
157
157
  }
158
158
  };
@@ -286,4 +286,4 @@ var RichSelectList_default = Object.assign(RichSelectList, {
286
286
 
287
287
 
288
288
  exports.RichSelectList_default = RichSelectList_default;
289
- //# sourceMappingURL=RE4YJRHB.cjs.map
289
+ //# sourceMappingURL=PAC42QWP.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/RichSelect/RichSelectList.tsx","css-module:../SelectList/SelectList.module.css#css-module"],"names":["_a"],"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,eAAc,yBAAwB,aAAY,uBAAsB,qBAAoB,+BAA8B,oBAAmB,8BAA6B,yBAAwB,mCAAkC,wBAAuB,iCAAgC;;;ADmCnuB,SAAS,gBAAgB;AA8Jf,mBAWM,KAwCJ,YAnDF;AA5JV,IAAM,OAAO,MAAM;AA2DnB,SAAS,eAAe,OAA0C;AAChE,QAiBI,YAhBF;AAAA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,UAAU,eAAe;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,IAChB,uBAAuB;AAAA,IACvB,QAAQ;AAAA,EAhHZ,IAkHM,IADC,+BACD,IADC;AAAA,IAfH;AAAA,IACA;AAAA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BACrD,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","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_13v7l_1\",\"opacityOverlay\":\"_opacityOverlay_13v7l_7\",\"selectWrapper\":\"_selectWrapper_13v7l_11\",\"selectBox\":\"_selectBox_13v7l_16\",\"selectBoxCambio\":\"_selectBoxCambio_13v7l_30\",\"selectMouseFocusStyling\":\"_selectMouseFocusStyling_13v7l_38\",\"unselected\":\"_unselected_13v7l_43\",\"selected\":\"_selected_13v7l_47\",\"transparent\":\"_transparent_13v7l_51\",\"arrowIcon\":\"_arrowIcon_13v7l_63\",\"selectErrorCambio\":\"_selectErrorCambio_13v7l_77\",\"selectColorwhite\":\"_selectColorwhite_13v7l_83\",\"transparentInputError\":\"_transparentInputError_13v7l_89\",\"transparenInputError\":\"_transparenInputError_13v7l_94\"}"]}
@@ -9,7 +9,7 @@ import {
9
9
  ColorBaseDestructive700,
10
10
  ColorBaseGray700,
11
11
  ColorCambioWhite100
12
- } from "./INXS6UTP.js";
12
+ } from "./JWSI5EOR.js";
13
13
  import {
14
14
  RichSelectBoxContext,
15
15
  RichSelectBox_default,
@@ -57,7 +57,7 @@ import { useControlledState } from "@react-stately/utils";
57
57
  import { setInteractionModality } from "@react-aria/interactions";
58
58
 
59
59
  // css-module:../SelectList/SelectList.module.css#css-module
60
- var SelectList_module_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" };
60
+ var SelectList_module_default = { "selectContainer": "_selectContainer_13v7l_1", "opacityOverlay": "_opacityOverlay_13v7l_7", "selectWrapper": "_selectWrapper_13v7l_11", "selectBox": "_selectBox_13v7l_16", "selectBoxCambio": "_selectBoxCambio_13v7l_30", "selectMouseFocusStyling": "_selectMouseFocusStyling_13v7l_38", "unselected": "_unselected_13v7l_43", "selected": "_selected_13v7l_47", "transparent": "_transparent_13v7l_51", "arrowIcon": "_arrowIcon_13v7l_63", "selectErrorCambio": "_selectErrorCambio_13v7l_77", "selectColorwhite": "_selectColorwhite_13v7l_83", "transparentInputError": "_transparentInputError_13v7l_89", "transparenInputError": "_transparenInputError_13v7l_94" };
61
61
 
62
62
  // src/RichSelect/RichSelectList.tsx
63
63
  import { useField } from "react-aria";
@@ -286,4 +286,4 @@ var RichSelectList_default = Object.assign(RichSelectList, {
286
286
  export {
287
287
  RichSelectList_default
288
288
  };
289
- //# sourceMappingURL=GEUE4GXC.js.map
289
+ //# sourceMappingURL=VXPUQYXA.js.map
@@ -1 +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;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CAAC,aACD,iBAAiB,SACjB,CAAC,aAAa;AAAA,8BAChB,CAAC,0BAAO,QAAQ,GACd,CAAC,cACA,iBAAiB,SAAS,aAAa;AAAA,8BAC1C,CAAC,0BAAO,iBAAiB,GAAG;AAAA,8BAC5B,CAAC,0BAAO,cAAc,OAAO,CAAC,GAAG;AAAA,4BACnC;AAAA,0BACF;AAAA,0BAEC;AAAA;AAAA,sBACH;AAAA,sBACA,oBAAC,SAAI,WAAW,0BAAO,WACrB;AAAA,wBAAC;AAAA;AAAA,0BACC,WAAU;AAAA,0BACV,eAAY;AAAA,0BACZ,SAAQ;AAAA,0BACR,OAAO;AAAA,0BAEP;AAAA,4BAAC;AAAA;AAAA,8BACC,MAAM,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"]}
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_13v7l_1\",\"opacityOverlay\":\"_opacityOverlay_13v7l_7\",\"selectWrapper\":\"_selectWrapper_13v7l_11\",\"selectBox\":\"_selectBox_13v7l_16\",\"selectBoxCambio\":\"_selectBoxCambio_13v7l_30\",\"selectMouseFocusStyling\":\"_selectMouseFocusStyling_13v7l_38\",\"unselected\":\"_unselected_13v7l_43\",\"selected\":\"_selected_13v7l_47\",\"transparent\":\"_transparent_13v7l_51\",\"arrowIcon\":\"_arrowIcon_13v7l_63\",\"selectErrorCambio\":\"_selectErrorCambio_13v7l_77\",\"selectColorwhite\":\"_selectColorwhite_13v7l_83\",\"transparentInputError\":\"_transparentInputError_13v7l_89\",\"transparenInputError\":\"_transparenInputError_13v7l_94\"}"],"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,eAAc,yBAAwB,aAAY,uBAAsB,qBAAoB,+BAA8B,oBAAmB,8BAA6B,yBAAwB,mCAAkC,wBAAuB,iCAAgC;;;ADmCnuB,SAAS,gBAAgB;AA8Jf,mBAWM,KAwCJ,YAnDF;AA5JV,IAAM,OAAO,MAAM;AA2DnB,SAAS,eAAe,OAA0C;AAChE,QAiBI,YAhBF;AAAA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,UAAU,eAAe;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,gBAAgB;AAAA,IAChB,uBAAuB;AAAA,IACvB,QAAQ;AAAA,EAhHZ,IAkHM,IADC,+BACD,IADC;AAAA,IAfH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAIF,QAAM,UAAU,MAAM;AACtB,QAAM,UAAU,kBAAM;AACtB,QAAM,a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;AAAA,EACN,aAAa;AACf,CAAC;","names":["_a"]}
package/dist/index.cjs CHANGED
@@ -32,11 +32,11 @@ var _RUXLZWRZcjs = require('./__chunks/RUXLZWRZ.cjs');
32
32
  require('./__chunks/TH4TA3JN.cjs');
33
33
 
34
34
 
35
- var _BDOOAHOCcjs = require('./__chunks/BDOOAHOC.cjs');
35
+ var _6MV5I6RVcjs = require('./__chunks/6MV5I6RV.cjs');
36
36
  require('./__chunks/JVGX637E.cjs');
37
37
 
38
38
 
39
- var _RE4YJRHBcjs = require('./__chunks/RE4YJRHB.cjs');
39
+ var _PAC42QWPcjs = require('./__chunks/PAC42QWP.cjs');
40
40
 
41
41
 
42
42
  var _VZTP4FJUcjs = require('./__chunks/VZTP4FJU.cjs');
@@ -46,7 +46,7 @@ require('./__chunks/3RX4RMGC.cjs');
46
46
 
47
47
  var _VJWLFFADcjs = require('./__chunks/VJWLFFAD.cjs');
48
48
  require('./__chunks/WFVGNGEP.cjs');
49
- require('./__chunks/BJU7QKAS.cjs');
49
+ require('./__chunks/CQWIABDZ.cjs');
50
50
  require('./__chunks/5I7B5SAF.cjs');
51
51
 
52
52
 
@@ -77,13 +77,13 @@ require('./__chunks/RYUXG4AS.cjs');
77
77
  var _36JMUQOLcjs = require('./__chunks/36JMUQOL.cjs');
78
78
 
79
79
 
80
- var _WVK5Z5JAcjs = require('./__chunks/WVK5Z5JA.cjs');
80
+ var _KSBBGTKFcjs = require('./__chunks/KSBBGTKF.cjs');
81
81
 
82
82
 
83
83
  var _SJSSW5MPcjs = require('./__chunks/SJSSW5MP.cjs');
84
84
 
85
85
 
86
- var _Z6EWS3QIcjs = require('./__chunks/Z6EWS3QI.cjs');
86
+ var _IUX3GQRDcjs = require('./__chunks/IUX3GQRD.cjs');
87
87
 
88
88
 
89
89
 
@@ -162,5 +162,5 @@ require('./__chunks/X2SDR4SD.cjs');
162
162
 
163
163
 
164
164
 
165
- exports.Avatar = _GQUBAKFOcjs.Avatar_default; exports.AvatarGroup = _GEXK47GRcjs.AvatarGroup; exports.Badge = _SJSSW5MPcjs.Badge_default; exports.Box = _QODNNCT2cjs.Box_default; exports.Button = _7COSMEXWcjs.Button_default; exports.ButtonGroup = _6KSVCCCBcjs.ButtonGroup_default; exports.Card = _AVJQ2E2Gcjs.Card_default; exports.Checkbox = _S7BCIAUQcjs.Checkbox_default; exports.Chip = _PBHDA7GVcjs.Chip_default; exports.Divider = _A3B4YKGNcjs.Divider; exports.Heading = _Q7CC3YA4cjs.Heading_default; exports.Icon = _IBT4YOI5cjs.Icon_default; exports.IconButton = _VJWLFFADcjs.IconButton_default; exports.IconLinkButton = _RUXLZWRZcjs.IconLinkButton_default; exports.LinkButton = _YNGB4N62cjs.LinkButton_default; exports.Modal = _SAPSO6DDcjs.Modal; exports.Popover = _VZTP4FJUcjs.Popover_default; exports.RadioButton = _AI52ORKAcjs.RadioButton_default; exports.RichSelectList = _RE4YJRHBcjs.RichSelectList_default; exports.SelectList = _BDOOAHOCcjs.SelectList; exports.TabButton = _Q65LBFK3cjs.TabButton; exports.TabLink = _E3KSILLWcjs.TabLink_default; exports.Tabs = _4QUXUGJPcjs.Tabs; exports.TapArea = _3UEOKPM2cjs.TapArea_default; exports.TextArea = _Z6EWS3QIcjs.TextArea_default; exports.TextField = _WVK5Z5JAcjs.TextField; exports.ThemeProvider = _36JMUQOLcjs.ThemeProvider; exports.Tooltip = _JACR34JOcjs.Tooltip_default; exports.Typography = _RVU3UEZIcjs.Typography_default; exports.WordConfetti = _FHQ7KPFEcjs.WordConfetti_default;
165
+ exports.Avatar = _GQUBAKFOcjs.Avatar_default; exports.AvatarGroup = _GEXK47GRcjs.AvatarGroup; exports.Badge = _SJSSW5MPcjs.Badge_default; exports.Box = _QODNNCT2cjs.Box_default; exports.Button = _7COSMEXWcjs.Button_default; exports.ButtonGroup = _6KSVCCCBcjs.ButtonGroup_default; exports.Card = _AVJQ2E2Gcjs.Card_default; exports.Checkbox = _S7BCIAUQcjs.Checkbox_default; exports.Chip = _PBHDA7GVcjs.Chip_default; exports.Divider = _A3B4YKGNcjs.Divider; exports.Heading = _Q7CC3YA4cjs.Heading_default; exports.Icon = _IBT4YOI5cjs.Icon_default; exports.IconButton = _VJWLFFADcjs.IconButton_default; exports.IconLinkButton = _RUXLZWRZcjs.IconLinkButton_default; exports.LinkButton = _YNGB4N62cjs.LinkButton_default; exports.Modal = _SAPSO6DDcjs.Modal; exports.Popover = _VZTP4FJUcjs.Popover_default; exports.RadioButton = _AI52ORKAcjs.RadioButton_default; exports.RichSelectList = _PAC42QWPcjs.RichSelectList_default; exports.SelectList = _6MV5I6RVcjs.SelectList; exports.TabButton = _Q65LBFK3cjs.TabButton; exports.TabLink = _E3KSILLWcjs.TabLink_default; exports.Tabs = _4QUXUGJPcjs.Tabs; exports.TapArea = _3UEOKPM2cjs.TapArea_default; exports.TextArea = _IUX3GQRDcjs.TextArea_default; exports.TextField = _KSBBGTKFcjs.TextField; exports.ThemeProvider = _36JMUQOLcjs.ThemeProvider; exports.Tooltip = _JACR34JOcjs.Tooltip_default; exports.Typography = _RVU3UEZIcjs.Typography_default; exports.WordConfetti = _FHQ7KPFEcjs.WordConfetti_default;
166
166
  //# sourceMappingURL=index.cjs.map