@cambly/syntax-core 4.8.1 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +257 -256
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +47 -29
- package/dist/index.js +245 -205
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +228 -189
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -114,6 +114,7 @@ var require_classnames = __commonJS({
|
|
|
114
114
|
var src_exports = {};
|
|
115
115
|
__export(src_exports, {
|
|
116
116
|
Avatar: () => Avatar_default,
|
|
117
|
+
Badge: () => Badge_default,
|
|
117
118
|
Box: () => Box_default,
|
|
118
119
|
Button: () => Button_default,
|
|
119
120
|
ButtonGroup: () => ButtonGroup_default,
|
|
@@ -153,9 +154,74 @@ var Avatar = ({
|
|
|
153
154
|
};
|
|
154
155
|
var Avatar_default = Avatar;
|
|
155
156
|
|
|
156
|
-
// src/
|
|
157
|
+
// src/Typography/Typography.tsx
|
|
157
158
|
var import_classnames2 = __toESM(require_classnames());
|
|
158
159
|
|
|
160
|
+
// css-module:./Typography.module.css#css-module
|
|
161
|
+
var Typography_module_default = { "typography": "_typography_1hx29_1", "size100": "_size100_1hx29_8", "size200": "_size200_1hx29_12", "size300": "_size300_1hx29_16", "size500": "_size500_1hx29_20", "size600": "_size600_1hx29_24", "size700": "_size700_1hx29_28", "size800": "_size800_1hx29_32", "center": "_center_1hx29_37", "forceLeft": "_forceLeft_1hx29_41", "forceRight": "_forceRight_1hx29_45", "start": "_start_1hx29_49", "end": "_end_1hx29_53", "bold": "_bold_1hx29_58", "regular": "_regular_1hx29_62", "semiBold": "_semiBold_1hx29_66", "heavy": "_heavy_1hx29_70", "underline": "_underline_1hx29_74", "inline": "_inline_1hx29_78", "uppercase": "_uppercase_1hx29_82", "lineClamp": "_lineClamp_1hx29_86" };
|
|
162
|
+
|
|
163
|
+
// css-module:../colors/colors.module.css#css-module
|
|
164
|
+
var colors_module_default = { "inheritColor": "_inheritColor_11wj3_2", "destructive700Color": "_destructive700Color_11wj3_6", "gray700Color": "_gray700Color_11wj3_10", "gray900Color": "_gray900Color_11wj3_14", "primary700Color": "_primary700Color_11wj3_18", "whiteColor": "_whiteColor_11wj3_22", "blackBackgroundColor": "_blackBackgroundColor_11wj3_27", "destructive100BackgroundColor": "_destructive100BackgroundColor_11wj3_31", "destructive200BackgroundColor": "_destructive200BackgroundColor_11wj3_35", "destructive300BackgroundColor": "_destructive300BackgroundColor_11wj3_39", "destructive700BackgroundColor": "_destructive700BackgroundColor_11wj3_43", "destructive800BackgroundColor": "_destructive800BackgroundColor_11wj3_47", "destructive900BackgroundColor": "_destructive900BackgroundColor_11wj3_51", "gray10BackgroundColor": "_gray10BackgroundColor_11wj3_55", "gray30BackgroundColor": "_gray30BackgroundColor_11wj3_59", "gray60BackgroundColor": "_gray60BackgroundColor_11wj3_63", "gray80BackgroundColor": "_gray80BackgroundColor_11wj3_67", "gray100BackgroundColor": "_gray100BackgroundColor_11wj3_71", "gray200BackgroundColor": "_gray200BackgroundColor_11wj3_75", "gray300BackgroundColor": "_gray300BackgroundColor_11wj3_79", "gray700BackgroundColor": "_gray700BackgroundColor_11wj3_83", "gray800BackgroundColor": "_gray800BackgroundColor_11wj3_87", "gray900BackgroundColor": "_gray900BackgroundColor_11wj3_91", "orange100BackgroundColor": "_orange100BackgroundColor_11wj3_95", "orange200BackgroundColor": "_orange200BackgroundColor_11wj3_99", "orange300BackgroundColor": "_orange300BackgroundColor_11wj3_103", "orange700BackgroundColor": "_orange700BackgroundColor_11wj3_107", "orange800BackgroundColor": "_orange800BackgroundColor_11wj3_111", "orange900BackgroundColor": "_orange900BackgroundColor_11wj3_115", "primary100BackgroundColor": "_primary100BackgroundColor_11wj3_119", "primary200BackgroundColor": "_primary200BackgroundColor_11wj3_123", "primary300BackgroundColor": "_primary300BackgroundColor_11wj3_127", "primary700BackgroundColor": "_primary700BackgroundColor_11wj3_131", "primary800BackgroundColor": "_primary800BackgroundColor_11wj3_135", "primary900BackgroundColor": "_primary900BackgroundColor_11wj3_139", "success100BackgroundColor": "_success100BackgroundColor_11wj3_143", "success200BackgroundColor": "_success200BackgroundColor_11wj3_147", "success300BackgroundColor": "_success300BackgroundColor_11wj3_151", "success700BackgroundColor": "_success700BackgroundColor_11wj3_155", "success800BackgroundColor": "_success800BackgroundColor_11wj3_159", "success900BackgroundColor": "_success900BackgroundColor_11wj3_163", "purple100BackgroundColor": "_purple100BackgroundColor_11wj3_167", "purple200BackgroundColor": "_purple200BackgroundColor_11wj3_171", "purple300BackgroundColor": "_purple300BackgroundColor_11wj3_175", "purple700BackgroundColor": "_purple700BackgroundColor_11wj3_179", "purple800BackgroundColor": "_purple800BackgroundColor_11wj3_183", "purple900BackgroundColor": "_purple900BackgroundColor_11wj3_187", "whiteBackgroundColor": "_whiteBackgroundColor_11wj3_191", "yellow100BackgroundColor": "_yellow100BackgroundColor_11wj3_195", "yellow200BackgroundColor": "_yellow200BackgroundColor_11wj3_199", "yellow300BackgroundColor": "_yellow300BackgroundColor_11wj3_203", "yellow700BackgroundColor": "_yellow700BackgroundColor_11wj3_207", "yellow800BackgroundColor": "_yellow800BackgroundColor_11wj3_211", "yellow900BackgroundColor": "_yellow900BackgroundColor_11wj3_215" };
|
|
165
|
+
|
|
166
|
+
// src/Typography/Typography.tsx
|
|
167
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
168
|
+
function textColor(color) {
|
|
169
|
+
switch (color) {
|
|
170
|
+
case "gray700":
|
|
171
|
+
return colors_module_default.gray700Color;
|
|
172
|
+
case "white":
|
|
173
|
+
return colors_module_default.whiteColor;
|
|
174
|
+
case "inherit":
|
|
175
|
+
return colors_module_default.inheritColor;
|
|
176
|
+
case "primary":
|
|
177
|
+
return colors_module_default.primary700Color;
|
|
178
|
+
case "destructive-primary":
|
|
179
|
+
return colors_module_default.destructive700Color;
|
|
180
|
+
default:
|
|
181
|
+
return colors_module_default.gray900Color;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
var Typography = ({
|
|
185
|
+
align = "start",
|
|
186
|
+
as = "div",
|
|
187
|
+
children,
|
|
188
|
+
color = "gray900",
|
|
189
|
+
inline = false,
|
|
190
|
+
lineClamp = void 0,
|
|
191
|
+
size = 200,
|
|
192
|
+
tooltip,
|
|
193
|
+
transform = "none",
|
|
194
|
+
underline = false,
|
|
195
|
+
weight = "regular"
|
|
196
|
+
}) => {
|
|
197
|
+
const Tag = as;
|
|
198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
199
|
+
Tag,
|
|
200
|
+
{
|
|
201
|
+
className: (0, import_classnames2.default)(
|
|
202
|
+
Typography_module_default.typography,
|
|
203
|
+
Typography_module_default[align],
|
|
204
|
+
Typography_module_default[weight],
|
|
205
|
+
textColor(color),
|
|
206
|
+
inline && Typography_module_default.inline,
|
|
207
|
+
Typography_module_default[`size${size}`],
|
|
208
|
+
transform === "uppercase" && Typography_module_default.uppercase,
|
|
209
|
+
underline && Typography_module_default.underline,
|
|
210
|
+
lineClamp != null && Typography_module_default.lineClamp
|
|
211
|
+
),
|
|
212
|
+
style: {
|
|
213
|
+
WebkitLineClamp: lineClamp
|
|
214
|
+
},
|
|
215
|
+
title: tooltip,
|
|
216
|
+
children
|
|
217
|
+
}
|
|
218
|
+
);
|
|
219
|
+
};
|
|
220
|
+
var Typography_default = Typography;
|
|
221
|
+
|
|
222
|
+
// src/Box/Box.tsx
|
|
223
|
+
var import_classnames3 = __toESM(require_classnames());
|
|
224
|
+
|
|
159
225
|
// css-module:./Box.module.css#css-module
|
|
160
226
|
var Box_module_default = { "box": "_box_7x1a7_1", "flexWrap": "_flexWrap_7x1a7_5", "alignItemscenter": "_alignItemscenter_7x1a7_10", "alignItemsstart": "_alignItemsstart_7x1a7_14", "alignItemsend": "_alignItemsend_7x1a7_18", "alignItemsstretch": "_alignItemsstretch_7x1a7_22", "alignItemsbaseline": "_alignItemsbaseline_7x1a7_26", "alignItemscenterSmall": "_alignItemscenterSmall_7x1a7_32", "alignItemsstartSmall": "_alignItemsstartSmall_7x1a7_36", "alignItemsendSmall": "_alignItemsendSmall_7x1a7_40", "alignItemsstretchSmall": "_alignItemsstretchSmall_7x1a7_44", "alignItemsbaselineSmall": "_alignItemsbaselineSmall_7x1a7_48", "alignItemscenterLarge": "_alignItemscenterLarge_7x1a7_55", "alignItemsstartLarge": "_alignItemsstartLarge_7x1a7_59", "alignItemsendLarge": "_alignItemsendLarge_7x1a7_63", "alignItemsstretchLarge": "_alignItemsstretchLarge_7x1a7_67", "alignItemsbaselineLarge": "_alignItemsbaselineLarge_7x1a7_71", "alignSelfcenter": "_alignSelfcenter_7x1a7_77", "alignSelfstart": "_alignSelfstart_7x1a7_81", "alignSelfend": "_alignSelfend_7x1a7_85", "alignSelfstretch": "_alignSelfstretch_7x1a7_89", "alignSelfbaseline": "_alignSelfbaseline_7x1a7_93", "alignSelfauto": "_alignSelfauto_7x1a7_97", "roundingsm": "_roundingsm_7x1a7_102", "roundingmd": "_roundingmd_7x1a7_106", "roundinglg": "_roundinglg_7x1a7_110", "roundingxl": "_roundingxl_7x1a7_114", "roundingfull": "_roundingfull_7x1a7_118", "block": "_block_7x1a7_123", "flex": "_flex_7x1a7_5", "inlineBlock": "_inlineBlock_7x1a7_131", "none": "_none_7x1a7_135", "visuallyHidden": "_visuallyHidden_7x1a7_139", "blockSmall": "_blockSmall_7x1a7_153", "flexSmall": "_flexSmall_7x1a7_157", "inlineBlockSmall": "_inlineBlockSmall_7x1a7_161", "noneSmall": "_noneSmall_7x1a7_165", "visuallyHiddenSmall": "_visuallyHiddenSmall_7x1a7_169", "blockLarge": "_blockLarge_7x1a7_184", "flexLarge": "_flexLarge_7x1a7_188", "inlineBlockLarge": "_inlineBlockLarge_7x1a7_192", "noneLarge": "_noneLarge_7x1a7_196", "visuallyHiddenLarge": "_visuallyHiddenLarge_7x1a7_200", "column": "_column_7x1a7_214", "row": "_row_7x1a7_218", "columnSmall": "_columnSmall_7x1a7_224", "rowSmall": "_rowSmall_7x1a7_228", "columnLarge": "_columnLarge_7x1a7_235", "rowLarge": "_rowLarge_7x1a7_239", "gap0": "_gap0_7x1a7_245", "gap1": "_gap1_7x1a7_249", "gap2": "_gap2_7x1a7_253", "gap3": "_gap3_7x1a7_257", "gap4": "_gap4_7x1a7_261", "gap5": "_gap5_7x1a7_265", "gap6": "_gap6_7x1a7_269", "gap7": "_gap7_7x1a7_273", "gap8": "_gap8_7x1a7_277", "gap9": "_gap9_7x1a7_281", "gap10": "_gap10_7x1a7_285", "gap11": "_gap11_7x1a7_289", "gap12": "_gap12_7x1a7_293", "justifyContentcenter": "_justifyContentcenter_7x1a7_298", "justifyContentstart": "_justifyContentstart_7x1a7_302", "justifyContentend": "_justifyContentend_7x1a7_306", "justifyContentbetween": "_justifyContentbetween_7x1a7_310", "justifyContentaround": "_justifyContentaround_7x1a7_314", "justifyContentevenly": "_justifyContentevenly_7x1a7_318", "justifyContentcenterSmall": "_justifyContentcenterSmall_7x1a7_324", "justifyContentstartSmall": "_justifyContentstartSmall_7x1a7_328", "justifyContentendSmall": "_justifyContentendSmall_7x1a7_332", "justifyContentbetweenSmall": "_justifyContentbetweenSmall_7x1a7_336", "justifyContentaroundSmall": "_justifyContentaroundSmall_7x1a7_340", "justifyContentevenlySmall": "_justifyContentevenlySmall_7x1a7_344", "justifyContentcenterLarge": "_justifyContentcenterLarge_7x1a7_351", "justifyContentstartLarge": "_justifyContentstartLarge_7x1a7_355", "justifyContentendLarge": "_justifyContentendLarge_7x1a7_359", "justifyContentbetweenLarge": "_justifyContentbetweenLarge_7x1a7_363", "justifyContentaroundLarge": "_justifyContentaroundLarge_7x1a7_367", "justifyContentevenlyLarge": "_justifyContentevenlyLarge_7x1a7_371", "absolute": "_absolute_7x1a7_377", "fixed": "_fixed_7x1a7_381", "relative": "_relative_7x1a7_385", "sticky": "_sticky_7x1a7_389" };
|
|
161
227
|
|
|
@@ -165,12 +231,9 @@ var margin_module_default = { "marginBottom-12": "_marginBottom-12_1whn1_2", "ma
|
|
|
165
231
|
// css-module:./padding.module.css#css-module
|
|
166
232
|
var padding_module_default = { "paddingX0": "_paddingX0_1aqye_2", "paddingX1": "_paddingX1_1aqye_7", "paddingX2": "_paddingX2_1aqye_12", "paddingX3": "_paddingX3_1aqye_17", "paddingX4": "_paddingX4_1aqye_22", "paddingX5": "_paddingX5_1aqye_27", "paddingX6": "_paddingX6_1aqye_32", "paddingX7": "_paddingX7_1aqye_37", "paddingX8": "_paddingX8_1aqye_42", "paddingX9": "_paddingX9_1aqye_47", "paddingX10": "_paddingX10_1aqye_52", "paddingX11": "_paddingX11_1aqye_57", "paddingX12": "_paddingX12_1aqye_62", "paddingY0": "_paddingY0_1aqye_67", "paddingY1": "_paddingY1_1aqye_72", "paddingY2": "_paddingY2_1aqye_77", "paddingY3": "_paddingY3_1aqye_82", "paddingY4": "_paddingY4_1aqye_87", "paddingY5": "_paddingY5_1aqye_92", "paddingY6": "_paddingY6_1aqye_97", "paddingY7": "_paddingY7_1aqye_102", "paddingY8": "_paddingY8_1aqye_107", "paddingY9": "_paddingY9_1aqye_112", "paddingY10": "_paddingY10_1aqye_117", "paddingY11": "_paddingY11_1aqye_122", "paddingY12": "_paddingY12_1aqye_127", "paddingX0Small": "_paddingX0Small_1aqye_134", "paddingX1Small": "_paddingX1Small_1aqye_139", "paddingX2Small": "_paddingX2Small_1aqye_144", "paddingX3Small": "_paddingX3Small_1aqye_149", "paddingX4Small": "_paddingX4Small_1aqye_154", "paddingX5Small": "_paddingX5Small_1aqye_159", "paddingX6Small": "_paddingX6Small_1aqye_164", "paddingX7Small": "_paddingX7Small_1aqye_169", "paddingX8Small": "_paddingX8Small_1aqye_174", "paddingX9Small": "_paddingX9Small_1aqye_179", "paddingX10Small": "_paddingX10Small_1aqye_184", "paddingX11Small": "_paddingX11Small_1aqye_189", "paddingX12Small": "_paddingX12Small_1aqye_194", "paddingY0Small": "_paddingY0Small_1aqye_199", "paddingY1Small": "_paddingY1Small_1aqye_204", "paddingY2Small": "_paddingY2Small_1aqye_209", "paddingY3Small": "_paddingY3Small_1aqye_214", "paddingY4Small": "_paddingY4Small_1aqye_219", "paddingY5Small": "_paddingY5Small_1aqye_224", "paddingY6Small": "_paddingY6Small_1aqye_229", "paddingY7Small": "_paddingY7Small_1aqye_234", "paddingY8Small": "_paddingY8Small_1aqye_239", "paddingY9Small": "_paddingY9Small_1aqye_244", "paddingY10Small": "_paddingY10Small_1aqye_249", "paddingY11Small": "_paddingY11Small_1aqye_254", "paddingY12Small": "_paddingY12Small_1aqye_259", "paddingX0Large": "_paddingX0Large_1aqye_267", "paddingX1Large": "_paddingX1Large_1aqye_272", "paddingX2Large": "_paddingX2Large_1aqye_277", "paddingX3Large": "_paddingX3Large_1aqye_282", "paddingX4Large": "_paddingX4Large_1aqye_287", "paddingX5Large": "_paddingX5Large_1aqye_292", "paddingX6Large": "_paddingX6Large_1aqye_297", "paddingX7Large": "_paddingX7Large_1aqye_302", "paddingX8Large": "_paddingX8Large_1aqye_307", "paddingX9Large": "_paddingX9Large_1aqye_312", "paddingX10Large": "_paddingX10Large_1aqye_317", "paddingX11Large": "_paddingX11Large_1aqye_322", "paddingX12Large": "_paddingX12Large_1aqye_327", "paddingY0Large": "_paddingY0Large_1aqye_332", "paddingY1Large": "_paddingY1Large_1aqye_337", "paddingY2Large": "_paddingY2Large_1aqye_342", "paddingY3Large": "_paddingY3Large_1aqye_347", "paddingY4Large": "_paddingY4Large_1aqye_352", "paddingY5Large": "_paddingY5Large_1aqye_357", "paddingY6Large": "_paddingY6Large_1aqye_362", "paddingY7Large": "_paddingY7Large_1aqye_367", "paddingY8Large": "_paddingY8Large_1aqye_372", "paddingY9Large": "_paddingY9Large_1aqye_377", "paddingY10Large": "_paddingY10Large_1aqye_382", "paddingY11Large": "_paddingY11Large_1aqye_387", "paddingY12Large": "_paddingY12Large_1aqye_392" };
|
|
167
233
|
|
|
168
|
-
// css-module:../colors/colors.module.css#css-module
|
|
169
|
-
var colors_module_default = { "inheritColor": "_inheritColor_11wj3_2", "destructive700Color": "_destructive700Color_11wj3_6", "gray700Color": "_gray700Color_11wj3_10", "gray900Color": "_gray900Color_11wj3_14", "primary700Color": "_primary700Color_11wj3_18", "whiteColor": "_whiteColor_11wj3_22", "blackBackgroundColor": "_blackBackgroundColor_11wj3_27", "destructive100BackgroundColor": "_destructive100BackgroundColor_11wj3_31", "destructive200BackgroundColor": "_destructive200BackgroundColor_11wj3_35", "destructive300BackgroundColor": "_destructive300BackgroundColor_11wj3_39", "destructive700BackgroundColor": "_destructive700BackgroundColor_11wj3_43", "destructive800BackgroundColor": "_destructive800BackgroundColor_11wj3_47", "destructive900BackgroundColor": "_destructive900BackgroundColor_11wj3_51", "gray10BackgroundColor": "_gray10BackgroundColor_11wj3_55", "gray30BackgroundColor": "_gray30BackgroundColor_11wj3_59", "gray60BackgroundColor": "_gray60BackgroundColor_11wj3_63", "gray80BackgroundColor": "_gray80BackgroundColor_11wj3_67", "gray100BackgroundColor": "_gray100BackgroundColor_11wj3_71", "gray200BackgroundColor": "_gray200BackgroundColor_11wj3_75", "gray300BackgroundColor": "_gray300BackgroundColor_11wj3_79", "gray700BackgroundColor": "_gray700BackgroundColor_11wj3_83", "gray800BackgroundColor": "_gray800BackgroundColor_11wj3_87", "gray900BackgroundColor": "_gray900BackgroundColor_11wj3_91", "orange100BackgroundColor": "_orange100BackgroundColor_11wj3_95", "orange200BackgroundColor": "_orange200BackgroundColor_11wj3_99", "orange300BackgroundColor": "_orange300BackgroundColor_11wj3_103", "orange700BackgroundColor": "_orange700BackgroundColor_11wj3_107", "orange800BackgroundColor": "_orange800BackgroundColor_11wj3_111", "orange900BackgroundColor": "_orange900BackgroundColor_11wj3_115", "primary100BackgroundColor": "_primary100BackgroundColor_11wj3_119", "primary200BackgroundColor": "_primary200BackgroundColor_11wj3_123", "primary300BackgroundColor": "_primary300BackgroundColor_11wj3_127", "primary700BackgroundColor": "_primary700BackgroundColor_11wj3_131", "primary800BackgroundColor": "_primary800BackgroundColor_11wj3_135", "primary900BackgroundColor": "_primary900BackgroundColor_11wj3_139", "success100BackgroundColor": "_success100BackgroundColor_11wj3_143", "success200BackgroundColor": "_success200BackgroundColor_11wj3_147", "success300BackgroundColor": "_success300BackgroundColor_11wj3_151", "success700BackgroundColor": "_success700BackgroundColor_11wj3_155", "success800BackgroundColor": "_success800BackgroundColor_11wj3_159", "success900BackgroundColor": "_success900BackgroundColor_11wj3_163", "purple100BackgroundColor": "_purple100BackgroundColor_11wj3_167", "purple200BackgroundColor": "_purple200BackgroundColor_11wj3_171", "purple300BackgroundColor": "_purple300BackgroundColor_11wj3_175", "purple700BackgroundColor": "_purple700BackgroundColor_11wj3_179", "purple800BackgroundColor": "_purple800BackgroundColor_11wj3_183", "purple900BackgroundColor": "_purple900BackgroundColor_11wj3_187", "whiteBackgroundColor": "_whiteBackgroundColor_11wj3_191", "yellow100BackgroundColor": "_yellow100BackgroundColor_11wj3_195", "yellow200BackgroundColor": "_yellow200BackgroundColor_11wj3_199", "yellow300BackgroundColor": "_yellow300BackgroundColor_11wj3_203", "yellow700BackgroundColor": "_yellow700BackgroundColor_11wj3_207", "yellow800BackgroundColor": "_yellow800BackgroundColor_11wj3_211", "yellow900BackgroundColor": "_yellow900BackgroundColor_11wj3_215" };
|
|
170
|
-
|
|
171
234
|
// src/Box/Box.tsx
|
|
172
235
|
var import_react = require("react");
|
|
173
|
-
var
|
|
236
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
174
237
|
var Box_default = (0, import_react.forwardRef)(function Box(props, ref) {
|
|
175
238
|
var _c;
|
|
176
239
|
const _a = props, { as: BoxElement = "div", children } = _a, boxProps = __objRest(_a, ["as", "children"]);
|
|
@@ -282,7 +345,7 @@ var Box_default = (0, import_react.forwardRef)(function Box(props, ref) {
|
|
|
282
345
|
"width"
|
|
283
346
|
]);
|
|
284
347
|
const parsedProps = {
|
|
285
|
-
className: (0,
|
|
348
|
+
className: (0, import_classnames3.default)(
|
|
286
349
|
Box_module_default.box,
|
|
287
350
|
alignItems && Box_module_default[`alignItems${alignItems}`],
|
|
288
351
|
smAlignItems && Box_module_default[`alignItems${smAlignItems}Small`],
|
|
@@ -355,11 +418,37 @@ var Box_default = (0, import_react.forwardRef)(function Box(props, ref) {
|
|
|
355
418
|
}
|
|
356
419
|
return acc;
|
|
357
420
|
}, {});
|
|
358
|
-
return /* @__PURE__ */ (0,
|
|
421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BoxElement, __spreadProps(__spreadValues(__spreadValues({}, parsedProps), passthroughProps), { ref, children }));
|
|
359
422
|
});
|
|
360
423
|
|
|
424
|
+
// src/Badge/Badge.tsx
|
|
425
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
426
|
+
var Badge = ({
|
|
427
|
+
text,
|
|
428
|
+
color = "primary700"
|
|
429
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
430
|
+
Box_default,
|
|
431
|
+
{
|
|
432
|
+
display: "inlineBlock",
|
|
433
|
+
paddingX: 2,
|
|
434
|
+
paddingY: 1,
|
|
435
|
+
rounding: "full",
|
|
436
|
+
backgroundColor: color,
|
|
437
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
438
|
+
Typography_default,
|
|
439
|
+
{
|
|
440
|
+
color: color === "yellow700" ? "gray900" : "white",
|
|
441
|
+
size: 100,
|
|
442
|
+
weight: "bold",
|
|
443
|
+
children: text
|
|
444
|
+
}
|
|
445
|
+
)
|
|
446
|
+
}
|
|
447
|
+
);
|
|
448
|
+
var Badge_default = Badge;
|
|
449
|
+
|
|
361
450
|
// src/Button/Button.tsx
|
|
362
|
-
var
|
|
451
|
+
var import_classnames4 = __toESM(require_classnames());
|
|
363
452
|
|
|
364
453
|
// css-module:./colors.module.css#css-module
|
|
365
454
|
var colors_module_default2 = { "inheritColor": "_inheritColor_11wj3_2", "destructive700Color": "_destructive700Color_11wj3_6", "gray700Color": "_gray700Color_11wj3_10", "gray900Color": "_gray900Color_11wj3_14", "primary700Color": "_primary700Color_11wj3_18", "whiteColor": "_whiteColor_11wj3_22", "blackBackgroundColor": "_blackBackgroundColor_11wj3_27", "destructive100BackgroundColor": "_destructive100BackgroundColor_11wj3_31", "destructive200BackgroundColor": "_destructive200BackgroundColor_11wj3_35", "destructive300BackgroundColor": "_destructive300BackgroundColor_11wj3_39", "destructive700BackgroundColor": "_destructive700BackgroundColor_11wj3_43", "destructive800BackgroundColor": "_destructive800BackgroundColor_11wj3_47", "destructive900BackgroundColor": "_destructive900BackgroundColor_11wj3_51", "gray10BackgroundColor": "_gray10BackgroundColor_11wj3_55", "gray30BackgroundColor": "_gray30BackgroundColor_11wj3_59", "gray60BackgroundColor": "_gray60BackgroundColor_11wj3_63", "gray80BackgroundColor": "_gray80BackgroundColor_11wj3_67", "gray100BackgroundColor": "_gray100BackgroundColor_11wj3_71", "gray200BackgroundColor": "_gray200BackgroundColor_11wj3_75", "gray300BackgroundColor": "_gray300BackgroundColor_11wj3_79", "gray700BackgroundColor": "_gray700BackgroundColor_11wj3_83", "gray800BackgroundColor": "_gray800BackgroundColor_11wj3_87", "gray900BackgroundColor": "_gray900BackgroundColor_11wj3_91", "orange100BackgroundColor": "_orange100BackgroundColor_11wj3_95", "orange200BackgroundColor": "_orange200BackgroundColor_11wj3_99", "orange300BackgroundColor": "_orange300BackgroundColor_11wj3_103", "orange700BackgroundColor": "_orange700BackgroundColor_11wj3_107", "orange800BackgroundColor": "_orange800BackgroundColor_11wj3_111", "orange900BackgroundColor": "_orange900BackgroundColor_11wj3_115", "primary100BackgroundColor": "_primary100BackgroundColor_11wj3_119", "primary200BackgroundColor": "_primary200BackgroundColor_11wj3_123", "primary300BackgroundColor": "_primary300BackgroundColor_11wj3_127", "primary700BackgroundColor": "_primary700BackgroundColor_11wj3_131", "primary800BackgroundColor": "_primary800BackgroundColor_11wj3_135", "primary900BackgroundColor": "_primary900BackgroundColor_11wj3_139", "success100BackgroundColor": "_success100BackgroundColor_11wj3_143", "success200BackgroundColor": "_success200BackgroundColor_11wj3_147", "success300BackgroundColor": "_success300BackgroundColor_11wj3_151", "success700BackgroundColor": "_success700BackgroundColor_11wj3_155", "success800BackgroundColor": "_success800BackgroundColor_11wj3_159", "success900BackgroundColor": "_success900BackgroundColor_11wj3_163", "purple100BackgroundColor": "_purple100BackgroundColor_11wj3_167", "purple200BackgroundColor": "_purple200BackgroundColor_11wj3_171", "purple300BackgroundColor": "_purple300BackgroundColor_11wj3_175", "purple700BackgroundColor": "_purple700BackgroundColor_11wj3_179", "purple800BackgroundColor": "_purple800BackgroundColor_11wj3_183", "purple900BackgroundColor": "_purple900BackgroundColor_11wj3_187", "whiteBackgroundColor": "_whiteBackgroundColor_11wj3_191", "yellow100BackgroundColor": "_yellow100BackgroundColor_11wj3_195", "yellow200BackgroundColor": "_yellow200BackgroundColor_11wj3_199", "yellow300BackgroundColor": "_yellow300BackgroundColor_11wj3_203", "yellow700BackgroundColor": "_yellow700BackgroundColor_11wj3_207", "yellow800BackgroundColor": "_yellow800BackgroundColor_11wj3_211", "yellow900BackgroundColor": "_yellow900BackgroundColor_11wj3_215" };
|
|
@@ -401,11 +490,14 @@ function foregroundColor(color) {
|
|
|
401
490
|
}
|
|
402
491
|
}
|
|
403
492
|
|
|
493
|
+
// src/Button/Button.tsx
|
|
494
|
+
var import_react2 = require("react");
|
|
495
|
+
|
|
404
496
|
// css-module:./Button.module.css#css-module
|
|
405
497
|
var Button_module_default = { "button": "_button_13egy_1", "buttonGap": "_buttonGap_13egy_9", "fullWidth": "_fullWidth_13egy_50", "sm": "_sm_13egy_54", "md": "_md_13egy_61", "lg": "_lg_13egy_68", "icon": "_icon_13egy_75", "smIcon": "_smIcon_13egy_79", "mdIcon": "_mdIcon_13egy_86", "lgIcon": "_lgIcon_13egy_93", "textContainer": "_textContainer_13egy_100", "secondaryBorder": "_secondaryBorder_13egy_105", "secondaryDestructiveBorder": "_secondaryDestructiveBorder_13egy_109", "loading": "_loading_13egy_123", "syntaxButtonLoadingRotate": "_syntaxButtonLoadingRotate_13egy_1", "loadingCircle": "_loadingCircle_13egy_127", "buttonText": "_buttonText_13egy_135", "buttonTextSmall": "_buttonTextSmall_13egy_142", "buttonTextMedium": "_buttonTextMedium_13egy_146", "buttonTextLarge": "_buttonTextLarge_13egy_150" };
|
|
406
498
|
|
|
407
499
|
// src/Button/Button.tsx
|
|
408
|
-
var
|
|
500
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
409
501
|
var textVariant = {
|
|
410
502
|
// Replace with `Typography` once it lands in `syntax-core`
|
|
411
503
|
["sm"]: Button_module_default.buttonTextSmall,
|
|
@@ -422,76 +514,80 @@ var iconSize = {
|
|
|
422
514
|
["md"]: Button_module_default.mdIcon,
|
|
423
515
|
["lg"]: Button_module_default.lgIcon
|
|
424
516
|
};
|
|
425
|
-
var Button = (
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
[
|
|
454
|
-
[Button_module_default.buttonGap]: size === "lg" || size === "md",
|
|
455
|
-
[Button_module_default.secondaryBorder]: color === "secondary",
|
|
456
|
-
[Button_module_default.secondaryDestructiveBorder]: color === "destructive-secondary"
|
|
457
|
-
}
|
|
458
|
-
),
|
|
459
|
-
children: [
|
|
460
|
-
!loading && StartIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(StartIcon, { className: (0, import_classnames3.default)(Button_module_default.icon, iconSize[size]) }),
|
|
461
|
-
(loading && loadingText || !loading && text) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: Button_module_default.textContainer, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_classnames3.default)(Button_module_default.buttonText, textVariant[size]), children: loading ? loadingText : text }) }),
|
|
462
|
-
!loading && EndIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(EndIcon, { className: (0, import_classnames3.default)(Button_module_default.icon, iconSize[size]) }),
|
|
463
|
-
loading && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
464
|
-
"svg",
|
|
517
|
+
var Button = (0, import_react2.forwardRef)(
|
|
518
|
+
({
|
|
519
|
+
text,
|
|
520
|
+
loadingText,
|
|
521
|
+
color = "primary",
|
|
522
|
+
size = "md",
|
|
523
|
+
accessibilityLabel,
|
|
524
|
+
disabled = false,
|
|
525
|
+
loading = false,
|
|
526
|
+
fullWidth = false,
|
|
527
|
+
startIcon: StartIcon,
|
|
528
|
+
endIcon: EndIcon,
|
|
529
|
+
onClick,
|
|
530
|
+
tooltip
|
|
531
|
+
}, ref) => {
|
|
532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
533
|
+
"button",
|
|
534
|
+
{
|
|
535
|
+
ref,
|
|
536
|
+
"aria-label": accessibilityLabel,
|
|
537
|
+
type: "button",
|
|
538
|
+
title: tooltip,
|
|
539
|
+
disabled: disabled || loading,
|
|
540
|
+
onClick,
|
|
541
|
+
className: (0, import_classnames4.default)(
|
|
542
|
+
Button_module_default.button,
|
|
543
|
+
foregroundColor(color),
|
|
544
|
+
backgroundColor(color),
|
|
545
|
+
Button_module_default[size],
|
|
465
546
|
{
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
471
|
-
"circle",
|
|
472
|
-
{
|
|
473
|
-
className: Button_module_default.loadingCircle,
|
|
474
|
-
cx: "44",
|
|
475
|
-
cy: "44",
|
|
476
|
-
r: "20.2",
|
|
477
|
-
fill: "none",
|
|
478
|
-
strokeWidth: "3.6"
|
|
479
|
-
}
|
|
480
|
-
)
|
|
547
|
+
[Button_module_default.fullWidth]: fullWidth,
|
|
548
|
+
[Button_module_default.buttonGap]: size === "lg" || size === "md",
|
|
549
|
+
[Button_module_default.secondaryBorder]: color === "secondary",
|
|
550
|
+
[Button_module_default.secondaryDestructiveBorder]: color === "destructive-secondary"
|
|
481
551
|
}
|
|
482
|
-
)
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
}
|
|
552
|
+
),
|
|
553
|
+
children: [
|
|
554
|
+
!loading && StartIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StartIcon, { className: (0, import_classnames4.default)(Button_module_default.icon, iconSize[size]) }),
|
|
555
|
+
(loading && loadingText || !loading && text) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: Button_module_default.textContainer, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: (0, import_classnames4.default)(Button_module_default.buttonText, textVariant[size]), children: loading ? loadingText : text }) }),
|
|
556
|
+
!loading && EndIcon && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(EndIcon, { className: (0, import_classnames4.default)(Button_module_default.icon, iconSize[size]) }),
|
|
557
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
558
|
+
"svg",
|
|
559
|
+
{
|
|
560
|
+
className: (0, import_classnames4.default)(Button_module_default.loading, foregroundColor(color)),
|
|
561
|
+
viewBox: "22 22 44 44",
|
|
562
|
+
width: loadingIconSize[size],
|
|
563
|
+
height: loadingIconSize[size],
|
|
564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
565
|
+
"circle",
|
|
566
|
+
{
|
|
567
|
+
className: Button_module_default.loadingCircle,
|
|
568
|
+
cx: "44",
|
|
569
|
+
cy: "44",
|
|
570
|
+
r: "20.2",
|
|
571
|
+
fill: "none",
|
|
572
|
+
strokeWidth: "3.6"
|
|
573
|
+
}
|
|
574
|
+
)
|
|
575
|
+
}
|
|
576
|
+
)
|
|
577
|
+
]
|
|
578
|
+
}
|
|
579
|
+
);
|
|
580
|
+
}
|
|
581
|
+
);
|
|
582
|
+
Button.displayName = "Button";
|
|
487
583
|
var Button_default = Button;
|
|
488
584
|
|
|
489
585
|
// css-module:./ButtonGroup.module.css#css-module
|
|
490
586
|
var ButtonGroup_module_default = { "buttonGroup": "_buttonGroup_1f9x9_1", "horizontal": "_horizontal_1f9x9_5", "vertical": "_vertical_1f9x9_9", "smallGap": "_smallGap_1f9x9_13", "mediumGap": "_mediumGap_1f9x9_17", "largeGap": "_largeGap_1f9x9_21" };
|
|
491
587
|
|
|
492
588
|
// src/ButtonGroup/ButtonGroup.tsx
|
|
493
|
-
var
|
|
494
|
-
var
|
|
589
|
+
var import_classnames5 = __toESM(require_classnames());
|
|
590
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
495
591
|
var gap = {
|
|
496
592
|
["sm"]: ButtonGroup_module_default.smallGap,
|
|
497
593
|
["md"]: ButtonGroup_module_default.mediumGap,
|
|
@@ -502,95 +598,33 @@ var ButtonGroup = ({
|
|
|
502
598
|
size = "md",
|
|
503
599
|
children
|
|
504
600
|
}) => {
|
|
505
|
-
const classnames2 = (0,
|
|
601
|
+
const classnames2 = (0, import_classnames5.default)(ButtonGroup_module_default.buttonGroup, gap[size], {
|
|
506
602
|
[ButtonGroup_module_default.horizontal]: orientation === "horizontal",
|
|
507
603
|
[ButtonGroup_module_default.vertical]: orientation === "vertical"
|
|
508
604
|
});
|
|
509
|
-
return /* @__PURE__ */ (0,
|
|
605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: classnames2, children });
|
|
510
606
|
};
|
|
511
607
|
var ButtonGroup_default = ButtonGroup;
|
|
512
608
|
|
|
513
609
|
// src/Card/Card.tsx
|
|
514
|
-
var
|
|
610
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
515
611
|
var Card = ({
|
|
516
612
|
children
|
|
517
|
-
}) => /* @__PURE__ */ (0,
|
|
613
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { rounding: "xl", padding: 7, smPadding: 9, backgroundColor: "white", children });
|
|
518
614
|
var Card_default = Card;
|
|
519
615
|
|
|
520
616
|
// css-module:./Divider.module.css#css-module
|
|
521
617
|
var Divider_module_default = { "divider": "_divider_1ddgq_1" };
|
|
522
618
|
|
|
523
619
|
// src/Divider/Divider.tsx
|
|
524
|
-
var
|
|
620
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
525
621
|
function Divider() {
|
|
526
|
-
return /* @__PURE__ */ (0,
|
|
622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("hr", { className: Divider_module_default.divider });
|
|
527
623
|
}
|
|
528
624
|
Divider.displayName = "Divider";
|
|
529
625
|
|
|
530
|
-
// src/Typography/Typography.tsx
|
|
531
|
-
var import_classnames5 = __toESM(require_classnames());
|
|
532
|
-
|
|
533
|
-
// css-module:./Typography.module.css#css-module
|
|
534
|
-
var Typography_module_default = { "typography": "_typography_1hx29_1", "size100": "_size100_1hx29_8", "size200": "_size200_1hx29_12", "size300": "_size300_1hx29_16", "size500": "_size500_1hx29_20", "size600": "_size600_1hx29_24", "size700": "_size700_1hx29_28", "size800": "_size800_1hx29_32", "center": "_center_1hx29_37", "forceLeft": "_forceLeft_1hx29_41", "forceRight": "_forceRight_1hx29_45", "start": "_start_1hx29_49", "end": "_end_1hx29_53", "bold": "_bold_1hx29_58", "regular": "_regular_1hx29_62", "semiBold": "_semiBold_1hx29_66", "heavy": "_heavy_1hx29_70", "underline": "_underline_1hx29_74", "inline": "_inline_1hx29_78", "uppercase": "_uppercase_1hx29_82", "lineClamp": "_lineClamp_1hx29_86" };
|
|
535
|
-
|
|
536
|
-
// src/Typography/Typography.tsx
|
|
537
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
538
|
-
function textColor(color) {
|
|
539
|
-
switch (color) {
|
|
540
|
-
case "gray700":
|
|
541
|
-
return colors_module_default.gray700Color;
|
|
542
|
-
case "white":
|
|
543
|
-
return colors_module_default.whiteColor;
|
|
544
|
-
case "inherit":
|
|
545
|
-
return colors_module_default.inheritColor;
|
|
546
|
-
case "primary":
|
|
547
|
-
return colors_module_default.primary700Color;
|
|
548
|
-
case "destructive-primary":
|
|
549
|
-
return colors_module_default.destructive700Color;
|
|
550
|
-
default:
|
|
551
|
-
return colors_module_default.gray900Color;
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
var Typography = ({
|
|
555
|
-
align = "start",
|
|
556
|
-
as = "div",
|
|
557
|
-
children,
|
|
558
|
-
color = "gray900",
|
|
559
|
-
inline = false,
|
|
560
|
-
lineClamp = void 0,
|
|
561
|
-
size = 200,
|
|
562
|
-
tooltip,
|
|
563
|
-
transform = "none",
|
|
564
|
-
underline = false,
|
|
565
|
-
weight = "regular"
|
|
566
|
-
}) => {
|
|
567
|
-
const Tag = as;
|
|
568
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
569
|
-
Tag,
|
|
570
|
-
{
|
|
571
|
-
className: (0, import_classnames5.default)(
|
|
572
|
-
Typography_module_default.typography,
|
|
573
|
-
Typography_module_default[align],
|
|
574
|
-
Typography_module_default[weight],
|
|
575
|
-
textColor(color),
|
|
576
|
-
inline && Typography_module_default.inline,
|
|
577
|
-
Typography_module_default[`size${size}`],
|
|
578
|
-
transform === "uppercase" && Typography_module_default.uppercase,
|
|
579
|
-
underline && Typography_module_default.underline,
|
|
580
|
-
lineClamp != null && Typography_module_default.lineClamp
|
|
581
|
-
),
|
|
582
|
-
style: {
|
|
583
|
-
WebkitLineClamp: lineClamp
|
|
584
|
-
},
|
|
585
|
-
title: tooltip,
|
|
586
|
-
children
|
|
587
|
-
}
|
|
588
|
-
);
|
|
589
|
-
};
|
|
590
|
-
var Typography_default = Typography;
|
|
591
|
-
|
|
592
626
|
// src/Heading/Heading.tsx
|
|
593
|
-
var
|
|
627
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
594
628
|
var Heading = ({
|
|
595
629
|
align = "start",
|
|
596
630
|
as = "h1",
|
|
@@ -599,58 +633,63 @@ var Heading = ({
|
|
|
599
633
|
size = 500
|
|
600
634
|
}) => {
|
|
601
635
|
const weight = [700, 800].includes(size) ? "heavy" : "bold";
|
|
602
|
-
return /* @__PURE__ */ (0,
|
|
636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Typography_default, { align, as, color, size, weight, children });
|
|
603
637
|
};
|
|
604
638
|
var Heading_default = Heading;
|
|
605
639
|
|
|
606
640
|
// src/IconButton/IconButton.tsx
|
|
607
641
|
var import_classnames6 = __toESM(require_classnames());
|
|
642
|
+
var import_react3 = require("react");
|
|
608
643
|
|
|
609
644
|
// css-module:./IconButton.module.css#css-module
|
|
610
645
|
var IconButton_module_default = { "iconButton": "_iconButton_dzhn0_1", "sm": "_sm_dzhn0_46", "md": "_md_dzhn0_51", "lg": "_lg_dzhn0_56", "smIcon": "_smIcon_dzhn0_61", "mdIcon": "_mdIcon_dzhn0_68", "lgIcon": "_lgIcon_dzhn0_75" };
|
|
611
646
|
|
|
612
647
|
// src/IconButton/IconButton.tsx
|
|
613
|
-
var
|
|
648
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
614
649
|
var iconSize2 = {
|
|
615
650
|
["sm"]: IconButton_module_default.smIcon,
|
|
616
651
|
["md"]: IconButton_module_default.mdIcon,
|
|
617
652
|
["lg"]: IconButton_module_default.lgIcon
|
|
618
653
|
};
|
|
619
|
-
var IconButton = (
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
}
|
|
654
|
+
var IconButton = (0, import_react3.forwardRef)(
|
|
655
|
+
({
|
|
656
|
+
accessibilityLabel,
|
|
657
|
+
color = "primary",
|
|
658
|
+
disabled = false,
|
|
659
|
+
icon: Icon,
|
|
660
|
+
size = "md",
|
|
661
|
+
tooltip,
|
|
662
|
+
onClick
|
|
663
|
+
}, ref) => {
|
|
664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
665
|
+
"button",
|
|
666
|
+
{
|
|
667
|
+
"aria-label": accessibilityLabel,
|
|
668
|
+
type: "button",
|
|
669
|
+
title: tooltip,
|
|
670
|
+
disabled,
|
|
671
|
+
onClick,
|
|
672
|
+
className: (0, import_classnames6.default)(
|
|
673
|
+
IconButton_module_default.iconButton,
|
|
674
|
+
foregroundColor(color),
|
|
675
|
+
backgroundColor(color),
|
|
676
|
+
IconButton_module_default[size]
|
|
677
|
+
),
|
|
678
|
+
ref,
|
|
679
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Icon, { className: iconSize2[size] })
|
|
680
|
+
}
|
|
681
|
+
);
|
|
682
|
+
}
|
|
683
|
+
);
|
|
684
|
+
IconButton.displayName = "IconButton";
|
|
646
685
|
var IconButton_default = IconButton;
|
|
647
686
|
|
|
648
687
|
// src/Checkbox/Checkbox.tsx
|
|
649
|
-
var
|
|
688
|
+
var import_react5 = require("react");
|
|
650
689
|
var import_classnames7 = __toESM(require_classnames());
|
|
651
690
|
|
|
652
691
|
// src/useFocusVisible.tsx
|
|
653
|
-
var
|
|
692
|
+
var import_react4 = require("react");
|
|
654
693
|
var hasSetupGlobalListeners = false;
|
|
655
694
|
var currentModality = null;
|
|
656
695
|
var changeHandlers = /* @__PURE__ */ new Set();
|
|
@@ -726,8 +765,8 @@ function setupGlobalFocusEvents() {
|
|
|
726
765
|
}
|
|
727
766
|
function useFocusVisible() {
|
|
728
767
|
setupGlobalFocusEvents();
|
|
729
|
-
const [isFocusVisibleState, setFocusVisible] = (0,
|
|
730
|
-
(0,
|
|
768
|
+
const [isFocusVisibleState, setFocusVisible] = (0, import_react4.useState)(isFocusVisible());
|
|
769
|
+
(0, import_react4.useEffect)(() => {
|
|
731
770
|
const handler = () => {
|
|
732
771
|
setFocusVisible(isFocusVisible());
|
|
733
772
|
};
|
|
@@ -746,7 +785,7 @@ var Checkbox_module_default = { "mainContainer": "_mainContainer_1jq7b_1", "chec
|
|
|
746
785
|
var Focus_module_default = { "accessibilityOutlineFocus": "_accessibilityOutlineFocus_1h8bq_1" };
|
|
747
786
|
|
|
748
787
|
// src/Checkbox/Checkbox.tsx
|
|
749
|
-
var
|
|
788
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
750
789
|
var typographySize = {
|
|
751
790
|
sm: 100,
|
|
752
791
|
md: 200
|
|
@@ -763,7 +802,7 @@ var Checkbox = ({
|
|
|
763
802
|
error = false,
|
|
764
803
|
onChange
|
|
765
804
|
}) => {
|
|
766
|
-
const [isFocused, setIsFocused] = (0,
|
|
805
|
+
const [isFocused, setIsFocused] = (0, import_react5.useState)(false);
|
|
767
806
|
const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
|
|
768
807
|
const checkboxStyling = (0, import_classnames7.default)(Checkbox_module_default.checkbox, Checkbox_module_default[size]);
|
|
769
808
|
const uncheckedStyling = (0, import_classnames7.default)(checkboxStyling, Checkbox_module_default.uncheckedBox, {
|
|
@@ -776,9 +815,9 @@ var Checkbox = ({
|
|
|
776
815
|
[Checkbox_module_default.checkedError]: error,
|
|
777
816
|
[Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
|
|
778
817
|
});
|
|
779
|
-
return /* @__PURE__ */ (0,
|
|
780
|
-
/* @__PURE__ */ (0,
|
|
781
|
-
/* @__PURE__ */ (0,
|
|
818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("label", { className: (0, import_classnames7.default)(Checkbox_module_default.mainContainer), children: [
|
|
819
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: Checkbox_module_default.checkboxContainer, children: [
|
|
820
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
782
821
|
"input",
|
|
783
822
|
{
|
|
784
823
|
type: "checkbox",
|
|
@@ -794,7 +833,7 @@ var Checkbox = ({
|
|
|
794
833
|
}
|
|
795
834
|
}
|
|
796
835
|
),
|
|
797
|
-
/* @__PURE__ */ (0,
|
|
836
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: checked ? checkedStyling : uncheckedStyling, children: checked && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", width: iconWidth[size], children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
798
837
|
"path",
|
|
799
838
|
{
|
|
800
839
|
fill: "#fff",
|
|
@@ -802,7 +841,7 @@ var Checkbox = ({
|
|
|
802
841
|
}
|
|
803
842
|
) }) })
|
|
804
843
|
] }),
|
|
805
|
-
/* @__PURE__ */ (0,
|
|
844
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
806
845
|
Typography_default,
|
|
807
846
|
{
|
|
808
847
|
size: typographySize[size],
|
|
@@ -818,21 +857,21 @@ var Checkbox_default = Checkbox;
|
|
|
818
857
|
var MiniActionCard_module_default = { "miniActionCard": "_miniActionCard_qebkn_1", "card": "_card_qebkn_9" };
|
|
819
858
|
|
|
820
859
|
// src/MiniActionCard/MiniActionCard.tsx
|
|
821
|
-
var
|
|
860
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
822
861
|
var MiniActionCard = ({
|
|
823
862
|
children
|
|
824
|
-
}) => /* @__PURE__ */ (0,
|
|
863
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: MiniActionCard_module_default.miniActionCard, children });
|
|
825
864
|
var MiniActionCard_default = MiniActionCard;
|
|
826
865
|
|
|
827
866
|
// src/RadioButton/RadioButton.tsx
|
|
828
|
-
var
|
|
867
|
+
var import_react6 = require("react");
|
|
829
868
|
var import_classnames8 = __toESM(require_classnames());
|
|
830
869
|
|
|
831
870
|
// css-module:./RadioButton.module.css#css-module
|
|
832
|
-
var RadioButton_module_default = { "radioBaseContainer": "
|
|
871
|
+
var RadioButton_module_default = { "radioBaseContainer": "_radioBaseContainer_ne98c_1", "smBase": "_smBase_ne98c_9", "mdBase": "_mdBase_ne98c_14", "radioStyleOverride": "_radioStyleOverride_ne98c_19", "smOverride": "_smOverride_ne98c_24", "mdOverride": "_mdOverride_ne98c_29", "background": "_background_ne98c_34", "sm": "_sm_ne98c_9", "md": "_md_ne98c_14", "neutralBorder": "_neutralBorder_ne98c_51", "smCheckedBorder": "_smCheckedBorder_ne98c_55", "mdCheckedBorder": "_mdCheckedBorder_ne98c_59", "errorBorderColor": "_errorBorderColor_ne98c_63", "borderColor": "_borderColor_ne98c_67" };
|
|
833
872
|
|
|
834
873
|
// src/RadioButton/RadioButton.tsx
|
|
835
|
-
var
|
|
874
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
836
875
|
var RadioButton = ({
|
|
837
876
|
checked = false,
|
|
838
877
|
disabled = false,
|
|
@@ -843,14 +882,14 @@ var RadioButton = ({
|
|
|
843
882
|
size = "md",
|
|
844
883
|
value
|
|
845
884
|
}) => {
|
|
846
|
-
const [isFocused, setIsFocused] = (0,
|
|
885
|
+
const [isFocused, setIsFocused] = (0, import_react6.useState)(false);
|
|
847
886
|
const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
|
|
848
887
|
const sharedStyles = (0, import_classnames8.default)(RadioButton_module_default.background, RadioButton_module_default[size], {
|
|
849
888
|
[RadioButton_module_default.errorBorderColor]: error,
|
|
850
889
|
[RadioButton_module_default.borderColor]: !error,
|
|
851
890
|
[Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
|
|
852
891
|
});
|
|
853
|
-
return /* @__PURE__ */ (0,
|
|
892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
854
893
|
"label",
|
|
855
894
|
{
|
|
856
895
|
className: (0, import_classnames8.default)(RadioButton_module_default.radioBaseContainer, {
|
|
@@ -858,7 +897,7 @@ var RadioButton = ({
|
|
|
858
897
|
[RadioButton_module_default.mdBase]: size === "md"
|
|
859
898
|
}),
|
|
860
899
|
children: [
|
|
861
|
-
/* @__PURE__ */ (0,
|
|
900
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
862
901
|
"input",
|
|
863
902
|
{
|
|
864
903
|
type: "radio",
|
|
@@ -879,7 +918,7 @@ var RadioButton = ({
|
|
|
879
918
|
}
|
|
880
919
|
}
|
|
881
920
|
),
|
|
882
|
-
checked ? /* @__PURE__ */ (0,
|
|
921
|
+
checked ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
883
922
|
"div",
|
|
884
923
|
{
|
|
885
924
|
className: (0, import_classnames8.default)(sharedStyles, {
|
|
@@ -887,8 +926,8 @@ var RadioButton = ({
|
|
|
887
926
|
[RadioButton_module_default.smCheckedBorder]: size === "sm"
|
|
888
927
|
})
|
|
889
928
|
}
|
|
890
|
-
) : /* @__PURE__ */ (0,
|
|
891
|
-
/* @__PURE__ */ (0,
|
|
929
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: (0, import_classnames8.default)(sharedStyles, RadioButton_module_default.neutralBorder) }),
|
|
930
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
892
931
|
Typography_default,
|
|
893
932
|
{
|
|
894
933
|
size: size === "md" ? 200 : 100,
|
|
@@ -903,7 +942,7 @@ var RadioButton = ({
|
|
|
903
942
|
var RadioButton_default = RadioButton;
|
|
904
943
|
|
|
905
944
|
// src/SelectList/SelectList.tsx
|
|
906
|
-
var
|
|
945
|
+
var import_react7 = require("react");
|
|
907
946
|
var import_classnames9 = __toESM(require_classnames());
|
|
908
947
|
|
|
909
948
|
// ../syntax-design-tokens/dist/js/index.js
|
|
@@ -914,12 +953,12 @@ var ColorBaseGray800 = "#353535";
|
|
|
914
953
|
var SelectList_module_default = { "selectContainer": "_selectContainer_1e7f9_1", "opacityOverlay": "_opacityOverlay_1e7f9_7", "outerTextContainer": "_outerTextContainer_1e7f9_11", "selectWrapper": "_selectWrapper_1e7f9_16", "selectBox": "_selectBox_1e7f9_21", "seletBoxMouseFocusStyling": "_seletBoxMouseFocusStyling_1e7f9_35", "unselected": "_unselected_1e7f9_40", "selected": "_selected_1e7f9_44", "arrowIcon": "_arrowIcon_1e7f9_48", "sm": "_sm_1e7f9_62", "md": "_md_1e7f9_67", "lg": "_lg_1e7f9_72", "selectError": "_selectError_1e7f9_77" };
|
|
915
954
|
|
|
916
955
|
// src/SelectList/SelectOption.tsx
|
|
917
|
-
var
|
|
956
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
918
957
|
var SelectOption = ({
|
|
919
958
|
value,
|
|
920
959
|
label,
|
|
921
960
|
disabled = false
|
|
922
|
-
}) => /* @__PURE__ */ (0,
|
|
961
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
923
962
|
"option",
|
|
924
963
|
{
|
|
925
964
|
"data-testid": `syntax-select-${value}`,
|
|
@@ -931,7 +970,7 @@ var SelectOption = ({
|
|
|
931
970
|
var SelectOption_default = SelectOption;
|
|
932
971
|
|
|
933
972
|
// src/SelectList/SelectList.tsx
|
|
934
|
-
var
|
|
973
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
935
974
|
var iconSize3 = {
|
|
936
975
|
sm: 20,
|
|
937
976
|
md: 24,
|
|
@@ -948,19 +987,19 @@ var SelectList = ({
|
|
|
948
987
|
selectedValue = "",
|
|
949
988
|
size = "md"
|
|
950
989
|
}) => {
|
|
951
|
-
const id = (0,
|
|
990
|
+
const id = (0, import_react7.useId)();
|
|
952
991
|
const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
|
|
953
|
-
const [isFocused, setIsFocused] = (0,
|
|
954
|
-
return /* @__PURE__ */ (0,
|
|
992
|
+
const [isFocused, setIsFocused] = (0, import_react7.useState)(false);
|
|
993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
955
994
|
"div",
|
|
956
995
|
{
|
|
957
996
|
className: (0, import_classnames9.default)(SelectList_module_default.selectContainer, {
|
|
958
997
|
[SelectList_module_default.opacityOverlay]: disabled
|
|
959
998
|
}),
|
|
960
999
|
children: [
|
|
961
|
-
/* @__PURE__ */ (0,
|
|
962
|
-
/* @__PURE__ */ (0,
|
|
963
|
-
/* @__PURE__ */ (0,
|
|
1000
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: id, className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Typography_default, { size: 100, color: "gray700", children: label }) }),
|
|
1001
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: SelectList_module_default.selectWrapper, children: [
|
|
1002
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
964
1003
|
"select",
|
|
965
1004
|
{
|
|
966
1005
|
id,
|
|
@@ -980,19 +1019,19 @@ var SelectList = ({
|
|
|
980
1019
|
onFocus: () => setIsFocused(true),
|
|
981
1020
|
onBlur: () => setIsFocused(false),
|
|
982
1021
|
children: [
|
|
983
|
-
placeholderText && /* @__PURE__ */ (0,
|
|
1022
|
+
placeholderText && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { disabled: true, value: placeholderText, children: placeholderText }),
|
|
984
1023
|
children
|
|
985
1024
|
]
|
|
986
1025
|
}
|
|
987
1026
|
),
|
|
988
|
-
/* @__PURE__ */ (0,
|
|
1027
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: SelectList_module_default.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
989
1028
|
"svg",
|
|
990
1029
|
{
|
|
991
1030
|
focusable: "false",
|
|
992
1031
|
"aria-hidden": "true",
|
|
993
1032
|
viewBox: "0 0 24 24",
|
|
994
1033
|
width: iconSize3[size],
|
|
995
|
-
children: /* @__PURE__ */ (0,
|
|
1034
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
996
1035
|
"path",
|
|
997
1036
|
{
|
|
998
1037
|
fill: errorText ? ColorBaseDestructive700 : ColorBaseGray800,
|
|
@@ -1002,7 +1041,7 @@ var SelectList = ({
|
|
|
1002
1041
|
}
|
|
1003
1042
|
) })
|
|
1004
1043
|
] }),
|
|
1005
|
-
/* @__PURE__ */ (0,
|
|
1044
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1006
1045
|
Typography_default,
|
|
1007
1046
|
{
|
|
1008
1047
|
size: 100,
|
|
@@ -1019,6 +1058,7 @@ SelectList.Option = SelectOption_default;
|
|
|
1019
1058
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1020
1059
|
0 && (module.exports = {
|
|
1021
1060
|
Avatar,
|
|
1061
|
+
Badge,
|
|
1022
1062
|
Box,
|
|
1023
1063
|
Button,
|
|
1024
1064
|
ButtonGroup,
|