@cambly/syntax-core 10.14.0 → 10.15.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.
@@ -5,7 +5,7 @@ var _4UJE5GMHcjs = require('./4UJE5GMH.cjs');
5
5
 
6
6
 
7
7
 
8
- var _DA3CET5Gcjs = require('./DA3CET5G.cjs');
8
+ var _C2JXAQM4cjs = require('./C2JXAQM4.cjs');
9
9
 
10
10
 
11
11
  var _XLUVINJWcjs = require('./XLUVINJW.cjs');
@@ -33,7 +33,7 @@ var _react = require('react');
33
33
  var _classnames = require('classnames'); var _classnames2 = _interopRequireDefault(_classnames);
34
34
 
35
35
  // css-module:./SelectList.module.css#css-module
36
- var SelectList_module_default = { "selectContainer": "_selectContainer_1o5o7_1", "selectContainerCambio": "_selectContainerCambio_1o5o7_7", "opacityOverlay": "_opacityOverlay_1o5o7_11", "labelCambio": "_labelCambio_1o5o7_15", "selectWrapper": "_selectWrapper_1o5o7_26", "selectBox": "_selectBox_1o5o7_31", "selectBoxClassic": "_selectBoxClassic_1o5o7_47", "selectBoxCambio": "_selectBoxCambio_1o5o7_52", "selectMouseFocusStyling": "_selectMouseFocusStyling_1o5o7_60", "unselected": "_unselected_1o5o7_65", "selected": "_selected_1o5o7_69", "arrowIcon": "_arrowIcon_1o5o7_73", "sm": "_sm_1o5o7_87", "md": "_md_1o5o7_93", "lg": "_lg_1o5o7_99", "selectError": "_selectError_1o5o7_105", "selectErrorCambio": "_selectErrorCambio_1o5o7_111" };
36
+ var SelectList_module_default = { "selectContainer": "_selectContainer_hzvfu_1", "selectContainerCambio": "_selectContainerCambio_hzvfu_7", "opacityOverlay": "_opacityOverlay_hzvfu_11", "labelCambio": "_labelCambio_hzvfu_15", "selectWrapper": "_selectWrapper_hzvfu_26", "selectBox": "_selectBox_hzvfu_31", "selectBoxClassic": "_selectBoxClassic_hzvfu_47", "selectBoxCambio": "_selectBoxCambio_hzvfu_52", "selectMouseFocusStyling": "_selectMouseFocusStyling_hzvfu_61", "unselected": "_unselected_hzvfu_66", "selected": "_selected_hzvfu_70", "arrowIcon": "_arrowIcon_hzvfu_74", "sm": "_sm_hzvfu_88", "md": "_md_hzvfu_94", "lg": "_lg_hzvfu_100", "selectError": "_selectError_hzvfu_106", "selectErrorCambio": "_selectErrorCambio_hzvfu_112" };
37
37
 
38
38
  // src/SelectList/SelectList.tsx
39
39
  var _jsxruntime = require('react/jsx-runtime');
@@ -121,7 +121,7 @@ function SelectList({
121
121
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
122
122
  "path",
123
123
  {
124
- fill: errorText ? _DA3CET5Gcjs.ColorBaseDestructive700 : _DA3CET5Gcjs.ColorBaseGray800,
124
+ fill: errorText ? _C2JXAQM4cjs.ColorBaseDestructive700 : _C2JXAQM4cjs.ColorBaseGray800,
125
125
  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"
126
126
  }
127
127
  )
@@ -145,4 +145,4 @@ SelectList.Option = _4UJE5GMHcjs.SelectOption_default;
145
145
 
146
146
 
147
147
  exports.SelectList = SelectList;
148
- //# sourceMappingURL=ZDSY6FEO.cjs.map
148
+ //# sourceMappingURL=SI257QZE.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/SelectList/SelectList.tsx","css-module:./SelectList.module.css#css-module"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,EAGE;AAAA,EACA;AAAA,OACK;AAEP,OAAO,gBAAgB;;;ACP6E,IAAO,4BAAQ,EAAC,mBAAkB,4BAA2B,yBAAwB,kCAAiC,kBAAiB,4BAA2B,eAAc,yBAAwB,iBAAgB,2BAA0B,aAAY,uBAAsB,oBAAmB,8BAA6B,mBAAkB,6BAA4B,2BAA0B,qCAAoC,cA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AAO;AAAA,gBACX,cAAc,aAAa,0BAAO,IAAI;AAAA,gBACtC;AAAA,kBACE,CAAC,0BAAO,UAAU,GAAG,CAAC,iBAAiB,CAAC;AAAA,kBACxC,CAAC,0BAAO,QAAQ,GAAG,iBAAiB,CAAC;AAAA,kBACrC,CAAC,cAAc,YACX,0BAAO,cACP,0BAAO,iBAAiB,GAAG;AAAA,kBAC/B,CAAC,qBAAY,yBAAyB,GACpC,aAAa;AAAA;AAAA,kBACf,CAAC,0BAAO,uBAAuB,GAAG,aAAa,CAAC;AAAA;AAAA,gBAClD;AAAA,cACF;AAAA,cACA;AAAA,cACA;AAAA,cACA,OACE,mBAAmB,CAAC,gBAAgB,kBAAkB;AAAA,cAExD,SAAS,MAAM,aAAa,IAAI;AAAA,cAChC,QAAQ,MAAM,aAAa,KAAK;AAAA,cAE/B;AAAA,mCACC,oBAAC,YAAO,UAAQ,MAAC,OAAO,iBACrB,2BACH;AAAA,gBAED;AAAA;AAAA;AAAA,UACH;AAAA,UACA,oBAAC,SAAI,WAAW,0BAAO,WACrB;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,eAAY;AAAA,cACZ,SAAQ;AAAA,cACR,OAAO,cAAc,YAAY,SAAS,IAAI,IAAI;AAAA,cAElD;AAAA,gBAAC;AAAA;AAAA,kBACC,MAAM,YAAY,0BAA0B;AAAA,kBAC5C,GAAE;AAAA;AAAA,cACJ;AAAA;AAAA,UACF,GACF;AAAA,WACF;AAAA,SACE,cAAc,cACd,oBAAC,eAAI,UAAU,cAAc,YAAY,IAAI,GAC3C;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,OAAO,YAAY,wBAAwB;AAAA,YAE1C,sBAAY,YAAY;AAAA;AAAA,QAC3B,GACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,WAAW,SAAS","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 ColorBaseGray800,\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\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\n\nconst iconSize = {\n sm: 20,\n md: 24,\n lg: 24,\n} as const;\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 onChange,\n onClick,\n placeholderText,\n selectedValue = \"\",\n size = \"md\",\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 * Callback to be called when select is clicked\n */\n onClick?: React.MouseEventHandler<HTMLSelectElement>;\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 /**\n * Size of the select box\n * * `sm`: 32px\n * * `md`: 40px\n * * `lg`: 48px\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\n}): ReactElement {\n const reactId = useId();\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const { themeName } = useTheme();\n const selectId = id ?? reactId;\n const { isFocusVisible } = useFocusVisible();\n const [isFocused, setIsFocused] = useState(false);\n\n return (\n <div\n className={classNames(styles.selectContainer, {\n [styles.opacityOverlay]: disabled,\n [styles.selectContainerCambio]: themeName === \"cambio\",\n })}\n >\n {label && (\n <label\n htmlFor={selectId}\n className={classNames(themeName === \"cambio\" && styles.labelCambio)}\n >\n <Box paddingX={themeName === \"classic\" ? 1 : 3}>\n <Typography size={100} color=\"gray700\">\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(\n styles.selectBox,\n themeName === \"classic\"\n ? styles.selectBoxClassic\n : styles.selectBoxCambio,\n themeName === \"classic\" && styles[size],\n {\n [styles.unselected]: !selectedValue && !errorText,\n [styles.selected]: selectedValue && !errorText,\n [themeName === \"classic\"\n ? styles.selectError\n : styles.selectErrorCambio]: errorText,\n [focusStyles.accessibilityOutlineFocus]:\n isFocused && isFocusVisible, // for focus keyboard\n [styles.selectMouseFocusStyling]: isFocused && !isFocusVisible, // for focus mouse\n },\n )}\n onChange={onChange}\n onClick={onClick}\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={themeName === \"classic\" ? iconSize[size] : 24}\n >\n <path\n fill={errorText ? ColorBaseDestructive700 : ColorBaseGray800}\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={themeName === \"classic\" ? 1 : 0}>\n <Typography\n size={100}\n color={errorText ? \"destructive-primary\" : \"gray700\"}\n >\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_hzvfu_1\",\"selectContainerCambio\":\"_selectContainerCambio_hzvfu_7\",\"opacityOverlay\":\"_opacityOverlay_hzvfu_11\",\"labelCambio\":\"_labelCambio_hzvfu_15\",\"selectWrapper\":\"_selectWrapper_hzvfu_26\",\"selectBox\":\"_selectBox_hzvfu_31\",\"selectBoxClassic\":\"_selectBoxClassic_hzvfu_47\",\"selectBoxCambio\":\"_selectBoxCambio_hzvfu_52\",\"selectMouseFocusStyling\":\"_selectMouseFocusStyling_hzvfu_61\",\"unselected\":\"_unselected_hzvfu_66\",\"selected\":\"_selected_hzvfu_70\",\"arrowIcon\":\"_arrowIcon_hzvfu_74\",\"sm\":\"_sm_hzvfu_88\",\"md\":\"_md_hzvfu_94\",\"lg\":\"_lg_hzvfu_100\",\"selectError\":\"_selectError_hzvfu_106\",\"selectErrorCambio\":\"_selectErrorCambio_hzvfu_112\"}"]}
@@ -19,7 +19,7 @@ var _UKLQ64N7cjs = require('./UKLQ64N7.cjs');
19
19
 
20
20
 
21
21
 
22
- var _DA3CET5Gcjs = require('./DA3CET5G.cjs');
22
+ var _C2JXAQM4cjs = require('./C2JXAQM4.cjs');
23
23
 
24
24
 
25
25
  var _NFDOY7GEcjs = require('./NFDOY7GE.cjs');
@@ -34,6 +34,9 @@ var _27K33DEMcjs = require('./27K33DEM.cjs');
34
34
  var _WGRHH5TFcjs = require('./WGRHH5TF.cjs');
35
35
 
36
36
 
37
+ var _6W5WRS53cjs = require('./6W5WRS53.cjs');
38
+
39
+
37
40
  var _K4AUV2VKcjs = require('./K4AUV2VK.cjs');
38
41
 
39
42
 
@@ -56,7 +59,7 @@ var _utils = require('@react-stately/utils');
56
59
  var _interactions = require('@react-aria/interactions');
57
60
 
58
61
  // css-module:../SelectList/SelectList.module.css#css-module
59
- var SelectList_module_default = { "selectContainer": "_selectContainer_1o5o7_1", "selectContainerCambio": "_selectContainerCambio_1o5o7_7", "opacityOverlay": "_opacityOverlay_1o5o7_11", "labelCambio": "_labelCambio_1o5o7_15", "selectWrapper": "_selectWrapper_1o5o7_26", "selectBox": "_selectBox_1o5o7_31", "selectBoxClassic": "_selectBoxClassic_1o5o7_47", "selectBoxCambio": "_selectBoxCambio_1o5o7_52", "selectMouseFocusStyling": "_selectMouseFocusStyling_1o5o7_60", "unselected": "_unselected_1o5o7_65", "selected": "_selected_1o5o7_69", "arrowIcon": "_arrowIcon_1o5o7_73", "sm": "_sm_1o5o7_87", "md": "_md_1o5o7_93", "lg": "_lg_1o5o7_99", "selectError": "_selectError_1o5o7_105", "selectErrorCambio": "_selectErrorCambio_1o5o7_111" };
62
+ var SelectList_module_default = { "selectContainer": "_selectContainer_hzvfu_1", "selectContainerCambio": "_selectContainerCambio_hzvfu_7", "opacityOverlay": "_opacityOverlay_hzvfu_11", "labelCambio": "_labelCambio_hzvfu_15", "selectWrapper": "_selectWrapper_hzvfu_26", "selectBox": "_selectBox_hzvfu_31", "selectBoxClassic": "_selectBoxClassic_hzvfu_47", "selectBoxCambio": "_selectBoxCambio_hzvfu_52", "selectMouseFocusStyling": "_selectMouseFocusStyling_hzvfu_61", "unselected": "_unselected_hzvfu_66", "selected": "_selected_hzvfu_70", "arrowIcon": "_arrowIcon_hzvfu_74", "sm": "_sm_hzvfu_88", "md": "_md_hzvfu_94", "lg": "_lg_hzvfu_100", "selectError": "_selectError_hzvfu_106", "selectErrorCambio": "_selectErrorCambio_hzvfu_112" };
60
63
 
61
64
  // src/RichSelect/RichSelectList.tsx
62
65
  var _reactaria = require('react-aria');
@@ -105,6 +108,7 @@ function RichSelectList(props) {
105
108
  const inputId = id != null ? id : reactId;
106
109
  const isHydrated = _K4AUV2VKcjs.useIsHydrated.call(void 0, );
107
110
  const disabled = !isHydrated || disabledProp;
111
+ const { themeName } = _6W5WRS53cjs.useTheme.call(void 0, );
108
112
  const overlayHandlerRef = _react.useRef.call(void 0, {});
109
113
  const selectedKeysProp = _react.useMemo.call(void 0,
110
114
  () => _4TWU6PQAcjs.convertSelection.call(void 0, selectedValuesProp),
@@ -157,16 +161,16 @@ function RichSelectList(props) {
157
161
  "div",
158
162
  {
159
163
  className: _classnames2.default.call(void 0, SelectList_module_default.selectContainer, {
160
- [SelectList_module_default.opacityOverlay]: disabled
164
+ [SelectList_module_default.opacityOverlay]: disabled,
165
+ [SelectList_module_default.selectContainerCambio]: themeName === "cambio"
161
166
  }),
162
167
  children: [
163
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
168
+ label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
164
169
  _reactariacomponents.Label,
165
170
  _X2SDR4SDcjs.__spreadProps.call(void 0, _X2SDR4SDcjs.__spreadValues.call(void 0, {
166
171
  "data-testid": [dataTestId, "label"].filter(Boolean).join("-"),
167
172
  className: _classnames2.default.call(void 0,
168
- SelectList_module_default.selectContainer,
169
- SelectList_module_default.outerTextContainer
173
+ themeName === "cambio" && SelectList_module_default.labelCambio
170
174
  )
171
175
  }, labelProps), {
172
176
  onClick: () => {
@@ -176,9 +180,9 @@ function RichSelectList(props) {
176
180
  (_a2 = fieldRef.current) == null ? void 0 : _a2.focus();
177
181
  _interactions.setInteractionModality.call(void 0, "keyboard");
178
182
  },
179
- children: label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: SelectList_module_default.label, htmlFor: id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _27K33DEMcjs.Box_default, { paddingX: 1, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _WGRHH5TFcjs.Typography_default, { size: 100, color: "gray700", children: label }) }) })
183
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _27K33DEMcjs.Box_default, { paddingX: themeName === "classic" ? 1 : 3, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _WGRHH5TFcjs.Typography_default, { size: 100, color: "gray700", children: label }) })
180
184
  })
181
- ),
185
+ ) }),
182
186
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
183
187
  _EVDDEHP3cjs.Popover_default,
184
188
  {
@@ -219,11 +223,16 @@ function RichSelectList(props) {
219
223
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
220
224
  "div",
221
225
  {
222
- className: _classnames2.default.call(void 0, SelectList_module_default.selectBox, SelectList_module_default[size], {
223
- [SelectList_module_default.unselected]: !errorText && selectedKeys !== "all" && !selectedKeys.size,
224
- [SelectList_module_default.selected]: !errorText && (selectedKeys === "all" || selectedKeys.size),
225
- [SelectList_module_default.selectError]: errorText
226
- }),
226
+ className: _classnames2.default.call(void 0,
227
+ SelectList_module_default.selectBox,
228
+ themeName === "classic" ? SelectList_module_default.selectBoxClassic : SelectList_module_default.selectBoxCambio,
229
+ themeName === "classic" && SelectList_module_default[size],
230
+ {
231
+ [SelectList_module_default.unselected]: !errorText && selectedKeys !== "all" && !selectedKeys.size,
232
+ [SelectList_module_default.selected]: !errorText && (selectedKeys === "all" || selectedKeys.size),
233
+ [themeName === "classic" ? SelectList_module_default.selectError : SelectList_module_default.selectErrorCambio]: errorText
234
+ }
235
+ ),
227
236
  children: selectedTextValue
228
237
  }
229
238
  ),
@@ -237,7 +246,7 @@ function RichSelectList(props) {
237
246
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
238
247
  "path",
239
248
  {
240
- fill: errorText ? _DA3CET5Gcjs.ColorBaseDestructive700 : _DA3CET5Gcjs.ColorBaseGray800,
249
+ fill: errorText ? _C2JXAQM4cjs.ColorBaseDestructive700 : _C2JXAQM4cjs.ColorBaseGray800,
241
250
  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"
242
251
  }
243
252
  )
@@ -248,7 +257,7 @@ function RichSelectList(props) {
248
257
  )
249
258
  }
250
259
  ),
251
- (helperText || errorText) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
260
+ (helperText || errorText) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _27K33DEMcjs.Box_default, { paddingX: themeName === "classic" ? 1 : 0, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
252
261
  _WGRHH5TFcjs.Typography_default,
253
262
  _X2SDR4SDcjs.__spreadProps.call(void 0, _X2SDR4SDcjs.__spreadValues.call(void 0, {
254
263
  size: 100,
@@ -272,4 +281,4 @@ var RichSelectList_default = Object.assign(RichSelectList, {
272
281
 
273
282
 
274
283
  exports.RichSelectList_default = RichSelectList_default;
275
- //# sourceMappingURL=5WZOSAYH.cjs.map
284
+ //# sourceMappingURL=VOLO4QB4.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;AAQvB;AAAA,EACE,SAAS;AAAA,EACT,YAAY;AAAA,OACP;AACP,SAAS,0BAA0B;AACnC,SAAS,8BAA8B;;;ACpB6D,IAAO,4BAAQ,EAAC,mBAAkB,4BAA2B,yBAAwB,kCAAiC,kBAAiB,4BAA2B,eAAc,yBAAwB,iBAAgB,2BAA0B,aAAY,uBAAsB,oBAAmB,8BAA6B,mBAAkB,6BAA4B,2BAA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C,CAAC,cAAc,YACX,0BAAO,cACP,0BAAO,iBAAiB,GAAG;AAAA,4BACjC;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,SAAS,IAAI;AAAA,0BAEpB;AAAA,4BAAC;AAAA;AAAA,8BACC,MACE,YAAY,0BAA0B;AAAA,8BAExC,GAAE;AAAA;AAAA,0BACJ;AAAA;AAAA,sBACF,GACF;AAAA,uBACF;AAAA;AAAA,gBACF;AAAA;AAAA,YACF;AAAA,aACE,cAAc,cACd,oBAAC,eAAI,UAAU,cAAc,YAAY,IAAI,GAC3C;AAAA,cAAC;AAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAO,YAAY,wBAAwB;AAAA,iBACtC,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 ColorBaseGray800,\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\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\n\nconst NOOP = () => undefined;\n\nconst iconSize = {\n sm: 20,\n md: 24,\n lg: 24,\n} as const;\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 * Size of the select box\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\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 size = \"md\",\n ...richSelectBoxProps\n } = props;\n\n const reactId = useId();\n const inputId = id ?? reactId;\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const { themeName } = useTheme();\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 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 [styles.selectContainerCambio]: themeName === \"cambio\",\n })}\n >\n {label && (\n <>\n <ReactAriaLabel\n data-testid={[dataTestId, \"label\"].filter(Boolean).join(\"-\")}\n className={classNames(\n themeName === \"cambio\" && styles.labelCambio,\n )}\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={themeName === \"classic\" ? 1 : 3}>\n <Typography size={100} color=\"gray700\">\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 >\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={size === \"lg\" ? \"lg\" : \"md\"}\n {...fieldProps}\n ref={fieldRef}\n >\n <div className={styles.selectWrapper}>\n <div\n className={classNames(\n styles.selectBox,\n themeName === \"classic\"\n ? styles.selectBoxClassic\n : styles.selectBoxCambio,\n themeName === \"classic\" && styles[size],\n {\n [styles.unselected]:\n !errorText &&\n selectedKeys !== \"all\" &&\n !selectedKeys.size,\n [styles.selected]:\n !errorText &&\n (selectedKeys === \"all\" || selectedKeys.size),\n [themeName === \"classic\"\n ? styles.selectError\n : styles.selectErrorCambio]: errorText,\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={iconSize[size]}\n >\n <path\n fill={\n errorText ? ColorBaseDestructive700 : ColorBaseGray800\n }\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={themeName === \"classic\" ? 1 : 0}>\n <Typography\n size={100}\n color={errorText ? \"destructive-primary\" : \"gray700\"}\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_hzvfu_1\",\"selectContainerCambio\":\"_selectContainerCambio_hzvfu_7\",\"opacityOverlay\":\"_opacityOverlay_hzvfu_11\",\"labelCambio\":\"_labelCambio_hzvfu_15\",\"selectWrapper\":\"_selectWrapper_hzvfu_26\",\"selectBox\":\"_selectBox_hzvfu_31\",\"selectBoxClassic\":\"_selectBoxClassic_hzvfu_47\",\"selectBoxCambio\":\"_selectBoxCambio_hzvfu_52\",\"selectMouseFocusStyling\":\"_selectMouseFocusStyling_hzvfu_61\",\"unselected\":\"_unselected_hzvfu_66\",\"selected\":\"_selected_hzvfu_70\",\"arrowIcon\":\"_arrowIcon_hzvfu_74\",\"sm\":\"_sm_hzvfu_88\",\"md\":\"_md_hzvfu_94\",\"lg\":\"_lg_hzvfu_100\",\"selectError\":\"_selectError_hzvfu_106\",\"selectErrorCambio\":\"_selectErrorCambio_hzvfu_112\"}"]}
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  ColorBaseDestructive700,
21
21
  ColorBaseGray800
22
- } from "./F4PJ53QQ.js";
22
+ } from "./AVW5DTQH.js";
23
23
  import {
24
24
  RichSelectSection_default
25
25
  } from "./53I23AHM.js";
@@ -32,6 +32,9 @@ import {
32
32
  import {
33
33
  Typography_default
34
34
  } from "./2A52YKFW.js";
35
+ import {
36
+ useTheme
37
+ } from "./FY4WHNNR.js";
35
38
  import {
36
39
  useIsHydrated
37
40
  } from "./JB65NEXK.js";
@@ -56,11 +59,11 @@ import { useControlledState } from "@react-stately/utils";
56
59
  import { setInteractionModality } from "@react-aria/interactions";
57
60
 
58
61
  // css-module:../SelectList/SelectList.module.css#css-module
59
- var SelectList_module_default = { "selectContainer": "_selectContainer_1o5o7_1", "selectContainerCambio": "_selectContainerCambio_1o5o7_7", "opacityOverlay": "_opacityOverlay_1o5o7_11", "labelCambio": "_labelCambio_1o5o7_15", "selectWrapper": "_selectWrapper_1o5o7_26", "selectBox": "_selectBox_1o5o7_31", "selectBoxClassic": "_selectBoxClassic_1o5o7_47", "selectBoxCambio": "_selectBoxCambio_1o5o7_52", "selectMouseFocusStyling": "_selectMouseFocusStyling_1o5o7_60", "unselected": "_unselected_1o5o7_65", "selected": "_selected_1o5o7_69", "arrowIcon": "_arrowIcon_1o5o7_73", "sm": "_sm_1o5o7_87", "md": "_md_1o5o7_93", "lg": "_lg_1o5o7_99", "selectError": "_selectError_1o5o7_105", "selectErrorCambio": "_selectErrorCambio_1o5o7_111" };
62
+ var SelectList_module_default = { "selectContainer": "_selectContainer_hzvfu_1", "selectContainerCambio": "_selectContainerCambio_hzvfu_7", "opacityOverlay": "_opacityOverlay_hzvfu_11", "labelCambio": "_labelCambio_hzvfu_15", "selectWrapper": "_selectWrapper_hzvfu_26", "selectBox": "_selectBox_hzvfu_31", "selectBoxClassic": "_selectBoxClassic_hzvfu_47", "selectBoxCambio": "_selectBoxCambio_hzvfu_52", "selectMouseFocusStyling": "_selectMouseFocusStyling_hzvfu_61", "unselected": "_unselected_hzvfu_66", "selected": "_selected_hzvfu_70", "arrowIcon": "_arrowIcon_hzvfu_74", "sm": "_sm_hzvfu_88", "md": "_md_hzvfu_94", "lg": "_lg_hzvfu_100", "selectError": "_selectError_hzvfu_106", "selectErrorCambio": "_selectErrorCambio_hzvfu_112" };
60
63
 
61
64
  // src/RichSelect/RichSelectList.tsx
62
65
  import { useField } from "react-aria";
63
- import { jsx, jsxs } from "react/jsx-runtime";
66
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
64
67
  var NOOP = () => void 0;
65
68
  var iconSize = {
66
69
  sm: 20,
@@ -105,6 +108,7 @@ function RichSelectList(props) {
105
108
  const inputId = id != null ? id : reactId;
106
109
  const isHydrated = useIsHydrated();
107
110
  const disabled = !isHydrated || disabledProp;
111
+ const { themeName } = useTheme();
108
112
  const overlayHandlerRef = useRef({});
109
113
  const selectedKeysProp = useMemo(
110
114
  () => convertSelection(selectedValuesProp),
@@ -157,16 +161,16 @@ function RichSelectList(props) {
157
161
  "div",
158
162
  {
159
163
  className: classNames(SelectList_module_default.selectContainer, {
160
- [SelectList_module_default.opacityOverlay]: disabled
164
+ [SelectList_module_default.opacityOverlay]: disabled,
165
+ [SelectList_module_default.selectContainerCambio]: themeName === "cambio"
161
166
  }),
162
167
  children: [
163
- /* @__PURE__ */ jsx(
168
+ label && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
164
169
  ReactAriaLabel,
165
170
  __spreadProps(__spreadValues({
166
171
  "data-testid": [dataTestId, "label"].filter(Boolean).join("-"),
167
172
  className: classNames(
168
- SelectList_module_default.selectContainer,
169
- SelectList_module_default.outerTextContainer
173
+ themeName === "cambio" && SelectList_module_default.labelCambio
170
174
  )
171
175
  }, labelProps), {
172
176
  onClick: () => {
@@ -176,9 +180,9 @@ function RichSelectList(props) {
176
180
  (_a2 = fieldRef.current) == null ? void 0 : _a2.focus();
177
181
  setInteractionModality("keyboard");
178
182
  },
179
- children: label && /* @__PURE__ */ jsx("label", { className: SelectList_module_default.label, htmlFor: id, children: /* @__PURE__ */ jsx(Box_default, { paddingX: 1, children: /* @__PURE__ */ jsx(Typography_default, { size: 100, color: "gray700", children: label }) }) })
183
+ children: /* @__PURE__ */ jsx(Box_default, { paddingX: themeName === "classic" ? 1 : 3, children: /* @__PURE__ */ jsx(Typography_default, { size: 100, color: "gray700", children: label }) })
180
184
  })
181
- ),
185
+ ) }),
182
186
  /* @__PURE__ */ jsx(
183
187
  Popover_default,
184
188
  {
@@ -219,11 +223,16 @@ function RichSelectList(props) {
219
223
  /* @__PURE__ */ jsx(
220
224
  "div",
221
225
  {
222
- className: classNames(SelectList_module_default.selectBox, SelectList_module_default[size], {
223
- [SelectList_module_default.unselected]: !errorText && selectedKeys !== "all" && !selectedKeys.size,
224
- [SelectList_module_default.selected]: !errorText && (selectedKeys === "all" || selectedKeys.size),
225
- [SelectList_module_default.selectError]: errorText
226
- }),
226
+ className: classNames(
227
+ SelectList_module_default.selectBox,
228
+ themeName === "classic" ? SelectList_module_default.selectBoxClassic : SelectList_module_default.selectBoxCambio,
229
+ themeName === "classic" && SelectList_module_default[size],
230
+ {
231
+ [SelectList_module_default.unselected]: !errorText && selectedKeys !== "all" && !selectedKeys.size,
232
+ [SelectList_module_default.selected]: !errorText && (selectedKeys === "all" || selectedKeys.size),
233
+ [themeName === "classic" ? SelectList_module_default.selectError : SelectList_module_default.selectErrorCambio]: errorText
234
+ }
235
+ ),
227
236
  children: selectedTextValue
228
237
  }
229
238
  ),
@@ -248,7 +257,7 @@ function RichSelectList(props) {
248
257
  )
249
258
  }
250
259
  ),
251
- (helperText || errorText) && /* @__PURE__ */ jsx("div", { className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ jsx(
260
+ (helperText || errorText) && /* @__PURE__ */ jsx(Box_default, { paddingX: themeName === "classic" ? 1 : 0, children: /* @__PURE__ */ jsx(
252
261
  Typography_default,
253
262
  __spreadProps(__spreadValues({
254
263
  size: 100,
@@ -272,4 +281,4 @@ var RichSelectList_default = Object.assign(RichSelectList, {
272
281
  export {
273
282
  RichSelectList_default
274
283
  };
275
- //# sourceMappingURL=FQMG5WUT.js.map
284
+ //# sourceMappingURL=ZM7GAFGB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/RichSelect/RichSelectList.tsx","css-module:../SelectList/SelectList.module.css#css-module"],"sourcesContent":["import React, {\n type ReactElement,\n useMemo,\n type SyntheticEvent,\n useRef,\n useId,\n} from \"react\";\nimport classNames from \"classnames\";\nimport {\n ColorBaseDestructive700,\n ColorBaseGray800,\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\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\n\nconst NOOP = () => undefined;\n\nconst iconSize = {\n sm: 20,\n md: 24,\n lg: 24,\n} as const;\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 * Size of the select box\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\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 size = \"md\",\n ...richSelectBoxProps\n } = props;\n\n const reactId = useId();\n const inputId = id ?? reactId;\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const { themeName } = useTheme();\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 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 [styles.selectContainerCambio]: themeName === \"cambio\",\n })}\n >\n {label && (\n <>\n <ReactAriaLabel\n data-testid={[dataTestId, \"label\"].filter(Boolean).join(\"-\")}\n className={classNames(\n themeName === \"cambio\" && styles.labelCambio,\n )}\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={themeName === \"classic\" ? 1 : 3}>\n <Typography size={100} color=\"gray700\">\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 >\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={size === \"lg\" ? \"lg\" : \"md\"}\n {...fieldProps}\n ref={fieldRef}\n >\n <div className={styles.selectWrapper}>\n <div\n className={classNames(\n styles.selectBox,\n themeName === \"classic\"\n ? styles.selectBoxClassic\n : styles.selectBoxCambio,\n themeName === \"classic\" && styles[size],\n {\n [styles.unselected]:\n !errorText &&\n selectedKeys !== \"all\" &&\n !selectedKeys.size,\n [styles.selected]:\n !errorText &&\n (selectedKeys === \"all\" || selectedKeys.size),\n [themeName === \"classic\"\n ? styles.selectError\n : styles.selectErrorCambio]: errorText,\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={iconSize[size]}\n >\n <path\n fill={\n errorText ? ColorBaseDestructive700 : ColorBaseGray800\n }\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={themeName === \"classic\" ? 1 : 0}>\n <Typography\n size={100}\n color={errorText ? \"destructive-primary\" : \"gray700\"}\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_hzvfu_1\",\"selectContainerCambio\":\"_selectContainerCambio_hzvfu_7\",\"opacityOverlay\":\"_opacityOverlay_hzvfu_11\",\"labelCambio\":\"_labelCambio_hzvfu_15\",\"selectWrapper\":\"_selectWrapper_hzvfu_26\",\"selectBox\":\"_selectBox_hzvfu_31\",\"selectBoxClassic\":\"_selectBoxClassic_hzvfu_47\",\"selectBoxCambio\":\"_selectBoxCambio_hzvfu_52\",\"selectMouseFocusStyling\":\"_selectMouseFocusStyling_hzvfu_61\",\"unselected\":\"_unselected_hzvfu_66\",\"selected\":\"_selected_hzvfu_70\",\"arrowIcon\":\"_arrowIcon_hzvfu_74\",\"sm\":\"_sm_hzvfu_88\",\"md\":\"_md_hzvfu_94\",\"lg\":\"_lg_hzvfu_100\",\"selectError\":\"_selectError_hzvfu_106\",\"selectErrorCambio\":\"_selectErrorCambio_hzvfu_112\"}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,EAEE;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AACP,OAAO,gBAAgB;AAQvB;AAAA,EACE,SAAS;AAAA,EACT,YAAY;AAAA,OACP;AACP,SA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ACX,cAAc,aAAa,0BAAO,IAAI;AAAA,4BACtC;AAAA,8BACE,CAAC,0BAAO,UAAU,GAChB,CAAC,aACD,iBAAiB,SACjB,CAAC,aAAa;AAAA,8BAChB,CAAC,0BAAO,QAAQ,GACd,CAAC,cACA,iBAAiB,SAAS,aAAa;AAAA,8BAC1C,CAAC,cAAc,YACX,0BAAO,cACP,0BAAO,iBAAiB,GAAG;AAAA,4BACjC;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,SAAS,IAAI;AAAA,0BAEpB;AAAA,4BAAC;AAAA;AAAA,8BACC,MACE,YAAY,0BAA0B;AAAA,8BAExC,GAAE;AAAA;AAAA,0BACJ;AAAA;AAAA,sBACF,GACF;AAAA,uBACF;AAAA;AAAA,gBACF;AAAA;AAAA,YACF;AAAA,aACE,cAAc,cACd,oBAAC,eAAI,UAAU,cAAc,YAAY,IAAI,GAC3C;AAAA,cAAC;AAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAO,YAAY,wBAAwB;AAAA,iBACtC,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"]}
package/dist/index.cjs CHANGED
@@ -31,11 +31,11 @@ require('./__chunks/BA4JPX36.cjs');
31
31
  var _ZFX4HW2Pcjs = require('./__chunks/ZFX4HW2P.cjs');
32
32
 
33
33
 
34
- var _ZDSY6FEOcjs = require('./__chunks/ZDSY6FEO.cjs');
34
+ var _SI257QZEcjs = require('./__chunks/SI257QZE.cjs');
35
35
  require('./__chunks/4UJE5GMH.cjs');
36
36
 
37
37
 
38
- var _5WZOSAYHcjs = require('./__chunks/5WZOSAYH.cjs');
38
+ var _VOLO4QB4cjs = require('./__chunks/VOLO4QB4.cjs');
39
39
  require('./__chunks/4TWU6PQA.cjs');
40
40
 
41
41
 
@@ -67,7 +67,7 @@ require('./__chunks/HWQUS53M.cjs');
67
67
 
68
68
 
69
69
  var _UKLQ64N7cjs = require('./__chunks/UKLQ64N7.cjs');
70
- require('./__chunks/DA3CET5G.cjs');
70
+ require('./__chunks/C2JXAQM4.cjs');
71
71
  require('./__chunks/NFDOY7GE.cjs');
72
72
  require('./__chunks/MF7LLV7V.cjs');
73
73
  require('./__chunks/I5HC6BIK.cjs');
@@ -134,5 +134,5 @@ require('./__chunks/X2SDR4SD.cjs');
134
134
 
135
135
 
136
136
 
137
- exports.Avatar = _CXD34CNPcjs.Avatar_default; exports.AvatarGroup = _LLI3KZARcjs.AvatarGroup; exports.Badge = _POGPHQGUcjs.Badge_default; exports.Box = _27K33DEMcjs.Box_default; exports.Button = _5T5R6ZMDcjs.Button_default; exports.ButtonGroup = _P3JJQI6Ncjs.ButtonGroup_default; exports.Card = _W7GPAEHPcjs.Card; exports.Checkbox = _GBZPZQPJcjs.Checkbox_default; exports.Chip = _MUNI4VXLcjs.Chip_default; exports.Divider = _VDAYXRSAcjs.Divider; exports.Heading = _XYAY2TL4cjs.Heading_default; exports.IconButton = _IMYS42TLcjs.IconButton_default; exports.LinkButton = _OXXXLEUDcjs.LinkButton_default; exports.Modal = _YLJDLIHHcjs.Modal; exports.Popover = _EVDDEHP3cjs.Popover_default; exports.RadioButton = _GPW7ICYPcjs.RadioButton_default; exports.RichSelectList = _5WZOSAYHcjs.RichSelectList_default; exports.SelectList = _ZDSY6FEOcjs.SelectList; exports.TapArea = _UKLQ64N7cjs.TapArea_default; exports.TextArea = _ZFX4HW2Pcjs.TextArea_default; exports.TextField = _4SUKTRWGcjs.TextField; exports.ThemeProvider = _6W5WRS53cjs.ThemeProvider; exports.Tooltip = _7TGECM7Wcjs.Tooltip_default; exports.Typography = _WGRHH5TFcjs.Typography_default;
137
+ exports.Avatar = _CXD34CNPcjs.Avatar_default; exports.AvatarGroup = _LLI3KZARcjs.AvatarGroup; exports.Badge = _POGPHQGUcjs.Badge_default; exports.Box = _27K33DEMcjs.Box_default; exports.Button = _5T5R6ZMDcjs.Button_default; exports.ButtonGroup = _P3JJQI6Ncjs.ButtonGroup_default; exports.Card = _W7GPAEHPcjs.Card; exports.Checkbox = _GBZPZQPJcjs.Checkbox_default; exports.Chip = _MUNI4VXLcjs.Chip_default; exports.Divider = _VDAYXRSAcjs.Divider; exports.Heading = _XYAY2TL4cjs.Heading_default; exports.IconButton = _IMYS42TLcjs.IconButton_default; exports.LinkButton = _OXXXLEUDcjs.LinkButton_default; exports.Modal = _YLJDLIHHcjs.Modal; exports.Popover = _EVDDEHP3cjs.Popover_default; exports.RadioButton = _GPW7ICYPcjs.RadioButton_default; exports.RichSelectList = _VOLO4QB4cjs.RichSelectList_default; exports.SelectList = _SI257QZEcjs.SelectList; exports.TapArea = _UKLQ64N7cjs.TapArea_default; exports.TextArea = _ZFX4HW2Pcjs.TextArea_default; exports.TextField = _4SUKTRWGcjs.TextField; exports.ThemeProvider = _6W5WRS53cjs.ThemeProvider; exports.Tooltip = _7TGECM7Wcjs.Tooltip_default; exports.Typography = _WGRHH5TFcjs.Typography_default;
138
138
  //# sourceMappingURL=index.cjs.map
package/dist/index.css CHANGED
@@ -2800,18 +2800,18 @@
2800
2800
  }
2801
2801
 
2802
2802
  /* css-module:/home/runner/work/syntax/syntax/packages/syntax-core/src/SelectList/SelectList.module.css/#css-module-data */
2803
- ._selectContainer_1o5o7_1 {
2803
+ ._selectContainer_hzvfu_1 {
2804
2804
  display: flex;
2805
2805
  flex-direction: column;
2806
2806
  gap: 8px;
2807
2807
  }
2808
- ._selectContainerCambio_1o5o7_7 {
2808
+ ._selectContainerCambio_hzvfu_7 {
2809
2809
  position: relative;
2810
2810
  }
2811
- ._opacityOverlay_1o5o7_11 {
2811
+ ._opacityOverlay_hzvfu_11 {
2812
2812
  opacity: 0.5;
2813
2813
  }
2814
- ._labelCambio_1o5o7_15 {
2814
+ ._labelCambio_hzvfu_15 {
2815
2815
  left: 1px;
2816
2816
  right: 1px;
2817
2817
  position: absolute;
@@ -2821,11 +2821,11 @@
2821
2821
  padding-top: 7px;
2822
2822
  z-index: 1;
2823
2823
  }
2824
- ._selectWrapper_1o5o7_26 {
2824
+ ._selectWrapper_hzvfu_26 {
2825
2825
  display: flex;
2826
2826
  position: relative;
2827
2827
  }
2828
- ._selectBox_1o5o7_31 {
2828
+ ._selectBox_hzvfu_31 {
2829
2829
  align-items: center;
2830
2830
  appearance: none;
2831
2831
  background-color: var(--color-base-white);
@@ -2847,28 +2847,29 @@
2847
2847
  outline: 0;
2848
2848
  width: 100%;
2849
2849
  }
2850
- ._selectBoxClassic_1o5o7_47 {
2850
+ ._selectBoxClassic_hzvfu_47 {
2851
2851
  border: 1px solid var(--color-base-gray-700);
2852
2852
  padding: 0 36px 0 12px;
2853
2853
  }
2854
- ._selectBoxCambio_1o5o7_52 {
2854
+ ._selectBoxCambio_hzvfu_52 {
2855
2855
  border: 1px solid var(--color-cambio-gray-370);
2856
2856
  border-radius: 8px;
2857
+ box-sizing: border-box;
2857
2858
  font-size: 14px;
2858
2859
  height: 48px;
2859
2860
  padding: 12px 36px 0 12px;
2860
2861
  }
2861
- ._selectMouseFocusStyling_1o5o7_60 {
2862
+ ._selectMouseFocusStyling_hzvfu_61 {
2862
2863
  border: 1px solid var(--color-base-primary-700);
2863
2864
  box-shadow: 0 0 0 1px var(--color-base-primary-700);
2864
2865
  }
2865
- ._unselected_1o5o7_65 {
2866
+ ._unselected_hzvfu_66 {
2866
2867
  color: var(--color-base-gray-700);
2867
2868
  }
2868
- ._selected_1o5o7_69 {
2869
+ ._selected_hzvfu_70 {
2869
2870
  color: var(--color-base-gray-800);
2870
2871
  }
2871
- ._arrowIcon_1o5o7_73 {
2872
+ ._arrowIcon_hzvfu_74 {
2872
2873
  display: flex;
2873
2874
  position: absolute;
2874
2875
  right: 0;
@@ -2877,30 +2878,30 @@
2877
2878
  padding-inline-end: 8px;
2878
2879
  pointer-events: none;
2879
2880
  }
2880
- ._selectBox_1o5o7_31:disabled {
2881
+ ._selectBox_hzvfu_31:disabled {
2881
2882
  cursor: auto;
2882
2883
  }
2883
- ._sm_1o5o7_87 {
2884
+ ._sm_hzvfu_88 {
2884
2885
  border-radius: 12px;
2885
2886
  font-size: 12px;
2886
2887
  height: 32px;
2887
2888
  }
2888
- ._md_1o5o7_93 {
2889
+ ._md_hzvfu_94 {
2889
2890
  border-radius: 12px;
2890
2891
  font-size: 14px;
2891
2892
  height: 40px;
2892
2893
  }
2893
- ._lg_1o5o7_99 {
2894
+ ._lg_hzvfu_100 {
2894
2895
  border-radius: 16px;
2895
2896
  font-size: 16px;
2896
2897
  height: 48px;
2897
2898
  }
2898
- ._selectError_1o5o7_105 {
2899
+ ._selectError_hzvfu_106 {
2899
2900
  color: var(--color-base-destructive-700);
2900
2901
  border-color: var(--color-base-destructive-700);
2901
2902
  background-color: var(--color-base-destructive-100);
2902
2903
  }
2903
- ._selectErrorCambio_1o5o7_111 {
2904
+ ._selectErrorCambio_hzvfu_112 {
2904
2905
  color: var(--color-cambio-destructive-900);
2905
2906
  border-color: var(--color-cambio-destructive-700);
2906
2907
  }