@cambly/syntax-core 1.9.0 → 1.11.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.d.ts +6 -32
- package/dist/index.js +31 -58
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -58
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -22,32 +22,6 @@ declare const Avatar: ({ src, accessibilityLabel, size, }: {
|
|
|
22
22
|
size?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
23
23
|
}) => JSX.Element;
|
|
24
24
|
|
|
25
|
-
declare const Color: {
|
|
26
|
-
readonly PRIMARY: "primary";
|
|
27
|
-
readonly SECONDARY: "secondary";
|
|
28
|
-
readonly TERTIARY: "tertiary";
|
|
29
|
-
readonly BRANDED: "branded";
|
|
30
|
-
readonly DESTRUCTIVE_PRIMARY: "destructive-primary";
|
|
31
|
-
readonly DESTRUCTIVE_SECONDARY: "destructive-secondary";
|
|
32
|
-
readonly DESTRUCTIVE_TERTIARY: "destructive-tertiary";
|
|
33
|
-
readonly SUCCESS: "success";
|
|
34
|
-
readonly GRAY200: "gray200";
|
|
35
|
-
readonly GRAY700: "gray700";
|
|
36
|
-
readonly GRAY800: "gray800";
|
|
37
|
-
readonly GRAY900: "gray900";
|
|
38
|
-
readonly WHITE: "white";
|
|
39
|
-
readonly INHERIT: "inherit";
|
|
40
|
-
};
|
|
41
|
-
type ColorKeys = keyof typeof Color;
|
|
42
|
-
type ColorValue = (typeof Color)[ColorKeys];
|
|
43
|
-
declare const Size: {
|
|
44
|
-
readonly SMALL: "sm";
|
|
45
|
-
readonly MEDIUM: "md";
|
|
46
|
-
readonly LARGE: "lg";
|
|
47
|
-
};
|
|
48
|
-
type SizeKeys = keyof typeof Size;
|
|
49
|
-
type SizeValue = (typeof Size)[SizeKeys];
|
|
50
|
-
|
|
51
25
|
declare const Button: ({ text, loadingText, color, size: sizeProp, accessibilityLabel, disabled: disabledProp, loading, fullWidth: fullWidthProp, startIcon: StartIcon, endIcon: EndIcon, onClick, tooltip, }: {
|
|
52
26
|
/**
|
|
53
27
|
* The text to be displayed inside the button
|
|
@@ -62,13 +36,13 @@ declare const Button: ({ text, loadingText, color, size: sizeProp, accessibility
|
|
|
62
36
|
*
|
|
63
37
|
* @defaultValue "primary"
|
|
64
38
|
*/
|
|
65
|
-
color?:
|
|
39
|
+
color?: "primary" | "secondary" | "tertiary" | "branded" | "destructive-primary" | "destructive-secondary" | "destructive-tertiary" | "success" | "gray200" | "gray700" | "gray800" | "gray900" | "white" | "inherit" | undefined;
|
|
66
40
|
/**
|
|
67
41
|
* The size of the button
|
|
68
42
|
*
|
|
69
43
|
* @defaultValue "medium"
|
|
70
44
|
*/
|
|
71
|
-
size?:
|
|
45
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
72
46
|
/**
|
|
73
47
|
* The label to be used for accessibility
|
|
74
48
|
*/
|
|
@@ -122,25 +96,25 @@ declare const ButtonGroup: ({ disabled, fullWidth, orientation, size, children,
|
|
|
122
96
|
*
|
|
123
97
|
* @defaultValue false
|
|
124
98
|
*/
|
|
125
|
-
disabled
|
|
99
|
+
disabled?: boolean | undefined;
|
|
126
100
|
/**
|
|
127
101
|
* If `true`, all buttons will be full width.
|
|
128
102
|
*
|
|
129
103
|
* @defaultValue false
|
|
130
104
|
*/
|
|
131
|
-
fullWidth
|
|
105
|
+
fullWidth?: boolean | undefined;
|
|
132
106
|
/**
|
|
133
107
|
* The orientation of the button group
|
|
134
108
|
*
|
|
135
109
|
* @defaultValue "horizontal"
|
|
136
110
|
*/
|
|
137
|
-
orientation
|
|
111
|
+
orientation?: "horizontal" | "vertical" | undefined;
|
|
138
112
|
/**
|
|
139
113
|
* The size of the button group
|
|
140
114
|
*
|
|
141
115
|
* @defaultValue "medium"
|
|
142
116
|
*/
|
|
143
|
-
size
|
|
117
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
144
118
|
/**
|
|
145
119
|
* Buttons to be rendered inside the button group
|
|
146
120
|
*/
|
package/dist/index.js
CHANGED
|
@@ -120,51 +120,24 @@ var Avatar_default = Avatar;
|
|
|
120
120
|
// src/Button/Button.tsx
|
|
121
121
|
var import_classnames2 = __toESM(require_classnames());
|
|
122
122
|
|
|
123
|
-
// src/constants.ts
|
|
124
|
-
var Color = {
|
|
125
|
-
PRIMARY: "primary",
|
|
126
|
-
SECONDARY: "secondary",
|
|
127
|
-
TERTIARY: "tertiary",
|
|
128
|
-
BRANDED: "branded",
|
|
129
|
-
DESTRUCTIVE_PRIMARY: "destructive-primary",
|
|
130
|
-
DESTRUCTIVE_SECONDARY: "destructive-secondary",
|
|
131
|
-
DESTRUCTIVE_TERTIARY: "destructive-tertiary",
|
|
132
|
-
SUCCESS: "success",
|
|
133
|
-
GRAY200: "gray200",
|
|
134
|
-
GRAY700: "gray700",
|
|
135
|
-
GRAY800: "gray800",
|
|
136
|
-
GRAY900: "gray900",
|
|
137
|
-
WHITE: "white",
|
|
138
|
-
INHERIT: "inherit"
|
|
139
|
-
};
|
|
140
|
-
var Size = {
|
|
141
|
-
SMALL: "sm",
|
|
142
|
-
MEDIUM: "md",
|
|
143
|
-
LARGE: "lg"
|
|
144
|
-
};
|
|
145
|
-
var Orientation = {
|
|
146
|
-
HORIZONTAL: "horizontal",
|
|
147
|
-
VERTICAL: "vertical"
|
|
148
|
-
};
|
|
149
|
-
|
|
150
123
|
// css-module:./colors.module.css#css-module
|
|
151
124
|
var colors_module_default = { "primary700Color": "_primary700Color_18uh7_2", "destructive700Color": "_destructive700Color_18uh7_6", "gray900Color": "_gray900Color_18uh7_10", "whiteColor": "_whiteColor_18uh7_14", "primary100BackgroundColor": "_primary100BackgroundColor_18uh7_19", "destructive700Background": "_destructive700Background_18uh7_23", "destructive100BackgroundColor": "_destructive100BackgroundColor_18uh7_27", "success700BackgroundColor": "_success700BackgroundColor_18uh7_31", "whiteBackgroundColor": "_whiteBackgroundColor_18uh7_35", "yellow700BackgroundColor": "_yellow700BackgroundColor_18uh7_39", "primary700BackgroundColor": "_primary700BackgroundColor_18uh7_43" };
|
|
152
125
|
|
|
153
126
|
// src/colors/backgroundColor.ts
|
|
154
127
|
function backgroundColor(color) {
|
|
155
128
|
switch (color) {
|
|
156
|
-
case
|
|
129
|
+
case "secondary":
|
|
157
130
|
return colors_module_default.primary100BackgroundColor;
|
|
158
|
-
case
|
|
131
|
+
case "destructive-primary":
|
|
159
132
|
return colors_module_default.destructive700Background;
|
|
160
|
-
case
|
|
133
|
+
case "destructive-secondary":
|
|
161
134
|
return colors_module_default.destructive100BackgroundColor;
|
|
162
|
-
case
|
|
135
|
+
case "success":
|
|
163
136
|
return colors_module_default.success700BackgroundColor;
|
|
164
|
-
case
|
|
165
|
-
case
|
|
137
|
+
case "tertiary":
|
|
138
|
+
case "destructive-tertiary":
|
|
166
139
|
return colors_module_default.whiteBackgroundColor;
|
|
167
|
-
case
|
|
140
|
+
case "branded":
|
|
168
141
|
return colors_module_default.yellow700BackgroundColor;
|
|
169
142
|
default:
|
|
170
143
|
return colors_module_default.primary700BackgroundColor;
|
|
@@ -174,13 +147,13 @@ function backgroundColor(color) {
|
|
|
174
147
|
// src/colors/foregroundColor.ts
|
|
175
148
|
function foregroundColor(color) {
|
|
176
149
|
switch (color) {
|
|
177
|
-
case
|
|
178
|
-
case
|
|
150
|
+
case "secondary":
|
|
151
|
+
case "tertiary":
|
|
179
152
|
return colors_module_default.primary700Color;
|
|
180
|
-
case
|
|
181
|
-
case
|
|
153
|
+
case "destructive-secondary":
|
|
154
|
+
case "destructive-tertiary":
|
|
182
155
|
return colors_module_default.destructive700Color;
|
|
183
|
-
case
|
|
156
|
+
case "branded":
|
|
184
157
|
return colors_module_default.gray900Color;
|
|
185
158
|
default:
|
|
186
159
|
return colors_module_default.whiteColor;
|
|
@@ -205,25 +178,25 @@ var Button_module_default = { "button": "_button_6lbba_1", "buttonGap": "_button
|
|
|
205
178
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
206
179
|
var textVariant = {
|
|
207
180
|
// Replace with `Typography` once it lands in `syntax-core`
|
|
208
|
-
[
|
|
209
|
-
[
|
|
210
|
-
[
|
|
181
|
+
["sm"]: Button_module_default.buttonTextSmall,
|
|
182
|
+
["md"]: Button_module_default.buttonTextMedium,
|
|
183
|
+
["lg"]: Button_module_default.buttonTextLarge
|
|
211
184
|
};
|
|
212
185
|
var loadingIconSize = {
|
|
213
|
-
[
|
|
214
|
-
[
|
|
215
|
-
[
|
|
186
|
+
["sm"]: 16,
|
|
187
|
+
["md"]: 20,
|
|
188
|
+
["lg"]: 24
|
|
216
189
|
};
|
|
217
190
|
var iconSize = {
|
|
218
|
-
[
|
|
219
|
-
[
|
|
220
|
-
[
|
|
191
|
+
["sm"]: Button_module_default.smIcon,
|
|
192
|
+
["md"]: Button_module_default.mdIcon,
|
|
193
|
+
["lg"]: Button_module_default.lgIcon
|
|
221
194
|
};
|
|
222
195
|
var Button = ({
|
|
223
196
|
text,
|
|
224
197
|
loadingText,
|
|
225
|
-
color =
|
|
226
|
-
size: sizeProp =
|
|
198
|
+
color = "primary",
|
|
199
|
+
size: sizeProp = "md",
|
|
227
200
|
accessibilityLabel,
|
|
228
201
|
disabled: disabledProp = false,
|
|
229
202
|
loading = false,
|
|
@@ -252,7 +225,7 @@ var Button = ({
|
|
|
252
225
|
Button_module_default[size],
|
|
253
226
|
{
|
|
254
227
|
[Button_module_default.fullWidth]: fullWidth,
|
|
255
|
-
[Button_module_default.buttonGap]: size ===
|
|
228
|
+
[Button_module_default.buttonGap]: size === "lg" || size === "md"
|
|
256
229
|
}
|
|
257
230
|
),
|
|
258
231
|
children: [
|
|
@@ -295,15 +268,15 @@ var ButtonGroup_module_default = { "buttonGroup": "_buttonGroup_184aa_1", "horiz
|
|
|
295
268
|
var import_classnames3 = __toESM(require_classnames());
|
|
296
269
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
297
270
|
var gap = {
|
|
298
|
-
[
|
|
299
|
-
[
|
|
300
|
-
[
|
|
271
|
+
["sm"]: ButtonGroup_module_default.smallGap,
|
|
272
|
+
["md"]: ButtonGroup_module_default.mediumGap,
|
|
273
|
+
["lg"]: ButtonGroup_module_default.largeGap
|
|
301
274
|
};
|
|
302
275
|
var ButtonGroup = ({
|
|
303
276
|
disabled = false,
|
|
304
277
|
fullWidth = false,
|
|
305
|
-
orientation =
|
|
306
|
-
size =
|
|
278
|
+
orientation = "horizontal",
|
|
279
|
+
size = "md",
|
|
307
280
|
children
|
|
308
281
|
}) => {
|
|
309
282
|
const context = (0, import_react3.useMemo)(
|
|
@@ -311,8 +284,8 @@ var ButtonGroup = ({
|
|
|
311
284
|
[disabled, fullWidth, size]
|
|
312
285
|
);
|
|
313
286
|
const classnames = (0, import_classnames3.default)(ButtonGroup_module_default.buttonGroup, gap[size], {
|
|
314
|
-
[ButtonGroup_module_default.horizontal]: orientation ===
|
|
315
|
-
[ButtonGroup_module_default.vertical]: orientation ===
|
|
287
|
+
[ButtonGroup_module_default.horizontal]: orientation === "horizontal",
|
|
288
|
+
[ButtonGroup_module_default.vertical]: orientation === "vertical"
|
|
316
289
|
});
|
|
317
290
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ButtonGroupContext_default.Provider, { value: context, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: classnames, children }) });
|
|
318
291
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/classnames/index.js","../src/index.tsx","../src/Avatar/Avatar.tsx","css-module:./Avatar.module.css#css-module","../src/Button/Button.tsx","../src/constants.ts","css-module:./colors.module.css#css-module","../src/colors/backgroundColor.ts","../src/colors/foregroundColor.ts","../src/ButtonGroup/ButtonGroupContext.tsx","css-module:./Button.module.css#css-module","../src/ButtonGroup/ButtonGroup.tsx","css-module:./ButtonGroup.module.css#css-module","css-module:./Card.module.css#css-module","../src/Card/Card.tsx","css-module:./Divider.module.css#css-module","../src/Divider/Divider.tsx","css-module:./MiniActionCard.module.css#css-module","../src/MiniActionCard/MiniActionCard.tsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import Avatar from \"./Avatar/Avatar\";\nimport Button from \"./Button/Button\";\nimport ButtonGroup from \"./ButtonGroup/ButtonGroup\";\nimport Card from \"./Card/Card\";\nimport Divider from \"./Divider/Divider\";\nimport MiniActionCard from \"./MiniActionCard/MiniActionCard\";\n\nexport { Avatar, Button, ButtonGroup, Card, Divider, MiniActionCard };\n","import classNames from \"classnames\";\nimport styles from \"./Avatar.module.css\";\n\n/**\n * Avatar is a circular image that represents a user.\n */\nconst Avatar = ({\n src,\n accessibilityLabel,\n size = \"md\",\n}: {\n /**\n * URL of the image to display as the avatar.\n */\n src: string;\n /**\n * Alt text to use for the image.\n * This should describe the image to people using screen readers.\n */\n accessibilityLabel: string;\n /**\n * Size of the avatar.\n * sm: 24px, md: 40px, lg: 72px, xl: 128px.\n *\n * @defaultValue `md`\n */\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n}): JSX.Element => {\n return (\n <img\n alt={accessibilityLabel}\n src={src}\n className={classNames(styles.avatar, styles[size])}\n />\n );\n};\n\nexport default Avatar;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Avatar/Avatar.module.css\"; export default {\"avatar\":\"_avatar_1s8z7_1\",\"sm\":\"_sm_1s8z7_8\",\"md\":\"_md_1s8z7_13\",\"lg\":\"_lg_1s8z7_18\",\"xl\":\"_xl_1s8z7_23\"}","import classNames from \"classnames\";\nimport backgroundColor from \"../colors//backgroundColor\";\nimport foregroundColor from \"../colors/foregroundColor\";\nimport React, { useContext, ReactElement } from \"react\";\nimport { Color, ColorValue, Size, SizeValue } from \"../constants\";\nimport ButtonGroupContext from \"../ButtonGroup/ButtonGroupContext\";\nimport styles from \"./Button.module.css\";\n\nconst textVariant = {\n // Replace with `Typography` once it lands in `syntax-core`\n [Size.SMALL]: styles.buttonTextSmall,\n [Size.MEDIUM]: styles.buttonTextMedium,\n [Size.LARGE]: styles.buttonTextLarge,\n} as const;\n\nconst loadingIconSize = {\n [Size.SMALL]: 16,\n [Size.MEDIUM]: 20,\n [Size.LARGE]: 24,\n};\n\nconst iconSize = {\n [Size.SMALL]: styles.smIcon,\n [Size.MEDIUM]: styles.mdIcon,\n [Size.LARGE]: styles.lgIcon,\n};\n\nconst Button = ({\n text,\n loadingText,\n color = Color.PRIMARY,\n size: sizeProp = Size.MEDIUM,\n accessibilityLabel,\n disabled: disabledProp = false,\n loading = false,\n fullWidth: fullWidthProp = false,\n startIcon: StartIcon,\n endIcon: EndIcon,\n onClick,\n tooltip,\n}: {\n /**\n * The text to be displayed inside the button\n */\n text: string;\n /**\n * The text to be displayed inside the button when it is in a loading state\n */\n loadingText?: string;\n /**\n * The color of the button\n *\n * @defaultValue \"primary\"\n */\n color?: ColorValue;\n /**\n * The size of the button\n *\n * @defaultValue \"medium\"\n */\n size?: SizeValue;\n /**\n * The label to be used for accessibility\n */\n accessibilityLabel?: string;\n /**\n * If `true`, the button will be disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * If `true`, the button will be in a loading state\n *\n * @defaultValue false\n */\n loading?: boolean;\n /**\n * If `true`, the button will take up the full width of its container\n *\n * @defaultValue false\n */\n fullWidth?: boolean;\n /**\n * The icon to be displayed at the start of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n startIcon?: React.ComponentType<{ className: string }>;\n /**\n * The icon to be displayed at the end of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n endIcon?: React.ComponentType<{ className: string }>;\n /**\n * The callback to be called when the button is clicked\n */\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n /**\n * The tooltip to be displayed when the user hovers over the button\n */\n tooltip?: string;\n}): ReactElement => {\n const contextProps = useContext(ButtonGroupContext);\n\n const size = contextProps?.size || sizeProp;\n const disabled = contextProps?.disabled || disabledProp;\n const fullWidth = contextProps?.fullWidth || fullWidthProp;\n\n return (\n <button\n aria-label={accessibilityLabel}\n type=\"button\"\n title={tooltip}\n disabled={disabled || loading}\n onClick={onClick}\n className={classNames(\n styles.button,\n foregroundColor(color),\n backgroundColor(color),\n styles[size],\n {\n [styles.fullWidth]: fullWidth,\n [styles.buttonGap]: size === Size.LARGE || size === Size.MEDIUM,\n },\n )}\n >\n {!loading && StartIcon && (\n <StartIcon className={classNames(styles.icon, iconSize[size])} />\n )}\n {((loading && loadingText) || (!loading && text)) && (\n <div className={styles.textContainer}>\n {/* Replace with `Typography` once it lands in `syntax-core` */}\n <div className={classNames(styles.buttonText, textVariant[size])}>\n {loading ? loadingText : text}\n </div>\n </div>\n )}\n {!loading && EndIcon && (\n <EndIcon className={classNames(styles.icon, iconSize[size])} />\n )}\n {loading && (\n <svg\n className={classNames(styles.loading, foregroundColor(color))}\n viewBox=\"22 22 44 44\"\n width={loadingIconSize[size]}\n height={loadingIconSize[size]}\n >\n <circle\n className={styles.loadingCircle}\n cx=\"44\"\n cy=\"44\"\n r=\"20.2\"\n fill=\"none\"\n strokeWidth=\"3.6\"\n />\n </svg>\n )}\n </button>\n );\n};\n\nexport default Button;\n","export const Color = {\n PRIMARY: \"primary\",\n SECONDARY: \"secondary\",\n TERTIARY: \"tertiary\",\n BRANDED: \"branded\",\n DESTRUCTIVE_PRIMARY: \"destructive-primary\",\n DESTRUCTIVE_SECONDARY: \"destructive-secondary\",\n DESTRUCTIVE_TERTIARY: \"destructive-tertiary\",\n SUCCESS: \"success\",\n GRAY200: \"gray200\",\n GRAY700: \"gray700\",\n GRAY800: \"gray800\",\n GRAY900: \"gray900\",\n WHITE: \"white\",\n INHERIT: \"inherit\",\n} as const;\n\nexport type ColorKeys = keyof typeof Color;\nexport type ColorValue = (typeof Color)[ColorKeys];\n\nexport const Size = {\n SMALL: \"sm\",\n MEDIUM: \"md\",\n LARGE: \"lg\",\n} as const;\n\nexport type SizeKeys = keyof typeof Size;\nexport type SizeValue = (typeof Size)[SizeKeys];\n\nexport const Orientation = {\n HORIZONTAL: \"horizontal\",\n VERTICAL: \"vertical\",\n} as const;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/colors/colors.module.css\"; export default {\"primary700Color\":\"_primary700Color_18uh7_2\",\"destructive700Color\":\"_destructive700Color_18uh7_6\",\"gray900Color\":\"_gray900Color_18uh7_10\",\"whiteColor\":\"_whiteColor_18uh7_14\",\"primary100BackgroundColor\":\"_primary100BackgroundColor_18uh7_19\",\"destructive700Background\":\"_destructive700Background_18uh7_23\",\"destructive100BackgroundColor\":\"_destructive100BackgroundColor_18uh7_27\",\"success700BackgroundColor\":\"_success700BackgroundColor_18uh7_31\",\"whiteBackgroundColor\":\"_whiteBackgroundColor_18uh7_35\",\"yellow700BackgroundColor\":\"_yellow700BackgroundColor_18uh7_39\",\"primary700BackgroundColor\":\"_primary700BackgroundColor_18uh7_43\"}","import { Color, ColorValue } from \"../constants\";\nimport styles from \"./colors.module.css\";\n\nexport default function backgroundColor(color: ColorValue): string {\n switch (color) {\n case Color.SECONDARY:\n return styles.primary100BackgroundColor;\n case Color.DESTRUCTIVE_PRIMARY:\n return styles.destructive700Background;\n case Color.DESTRUCTIVE_SECONDARY:\n return styles.destructive100BackgroundColor;\n case Color.SUCCESS:\n return styles.success700BackgroundColor;\n case Color.TERTIARY:\n case Color.DESTRUCTIVE_TERTIARY:\n return styles.whiteBackgroundColor;\n case Color.BRANDED:\n return styles.yellow700BackgroundColor;\n default:\n return styles.primary700BackgroundColor;\n }\n}\n","import { Color, ColorValue } from \"../constants\";\nimport styles from \"./colors.module.css\";\n\nexport default function foregroundColor(color: ColorValue): string {\n switch (color) {\n case Color.SECONDARY:\n case Color.TERTIARY:\n return styles.primary700Color;\n case Color.DESTRUCTIVE_SECONDARY:\n case Color.DESTRUCTIVE_TERTIARY:\n return styles.destructive700Color;\n case Color.BRANDED:\n return styles.gray900Color;\n default:\n return styles.whiteColor;\n }\n}\n","import { SizeValue } from \"../constants\";\nimport React from \"react\";\n\ninterface ButtonGroupContextType {\n size?: SizeValue;\n disabled?: boolean;\n fullWidth?: boolean;\n}\n\nconst ButtonGroupContext = React.createContext<ButtonGroupContextType | null>(\n {},\n);\n\nButtonGroupContext.displayName = \"ButtonGroupContext\";\n\nexport default ButtonGroupContext;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Button/Button.module.css\"; export default {\"button\":\"_button_6lbba_1\",\"buttonGap\":\"_buttonGap_6lbba_9\",\"fullWidth\":\"_fullWidth_6lbba_50\",\"sm\":\"_sm_6lbba_54\",\"md\":\"_md_6lbba_61\",\"lg\":\"_lg_6lbba_68\",\"icon\":\"_icon_6lbba_75\",\"smIcon\":\"_smIcon_6lbba_79\",\"mdIcon\":\"_mdIcon_6lbba_86\",\"lgIcon\":\"_lgIcon_6lbba_93\",\"textContainer\":\"_textContainer_6lbba_100\",\"loading\":\"_loading_6lbba_115\",\"syntaxButtonLoadingRotate\":\"_syntaxButtonLoadingRotate_6lbba_1\",\"loadingCircle\":\"_loadingCircle_6lbba_119\",\"buttonText\":\"_buttonText_6lbba_127\",\"buttonTextSmall\":\"_buttonTextSmall_6lbba_134\",\"buttonTextMedium\":\"_buttonTextMedium_6lbba_138\",\"buttonTextLarge\":\"_buttonTextLarge_6lbba_142\"}","import { useMemo, ReactElement, ReactNode } from \"react\";\nimport styles from \"./ButtonGroup.module.css\";\nimport { Size, Orientation, SizeValue } from \"../constants\";\nimport ButtonGroupContext from \"./ButtonGroupContext\";\nimport classNames from \"classnames\";\n\nconst gap = {\n [Size.SMALL]: styles.smallGap,\n [Size.MEDIUM]: styles.mediumGap,\n [Size.LARGE]: styles.largeGap,\n} as const;\n\n/**\n * Group buttons to render them in a row or column with consistent spacing in between each button\n */\nconst ButtonGroup = ({\n disabled = false,\n fullWidth = false,\n orientation = Orientation.HORIZONTAL,\n size = Size.MEDIUM,\n children,\n}: {\n /**\n * If `true`, all buttons will be disabled.\n *\n * @defaultValue false\n */\n disabled: boolean;\n /**\n * If `true`, all buttons will be full width.\n *\n * @defaultValue false\n */\n fullWidth: boolean;\n /**\n * The orientation of the button group\n *\n * @defaultValue \"horizontal\"\n */\n orientation: \"horizontal\" | \"vertical\";\n /**\n * The size of the button group\n *\n * @defaultValue \"medium\"\n */\n size: SizeValue;\n /**\n * Buttons to be rendered inside the button group\n */\n children?: ReactNode;\n}): ReactElement => {\n const context = useMemo(\n () => ({ disabled, fullWidth, size }),\n [disabled, fullWidth, size],\n );\n\n const classnames = classNames(styles.buttonGroup, gap[size], {\n [styles.horizontal]: orientation === Orientation.HORIZONTAL,\n [styles.vertical]: orientation === Orientation.VERTICAL,\n });\n\n return (\n <ButtonGroupContext.Provider value={context}>\n <div className={classnames}>{children}</div>\n </ButtonGroupContext.Provider>\n );\n};\n\nexport default ButtonGroup;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/ButtonGroup/ButtonGroup.module.css\"; export default {\"buttonGroup\":\"_buttonGroup_184aa_1\",\"horizontal\":\"_horizontal_184aa_6\",\"vertical\":\"_vertical_184aa_10\",\"smallGap\":\"_smallGap_184aa_14\",\"mediumGap\":\"_mediumGap_184aa_18\",\"largeGap\":\"_largeGap_184aa_22\"}","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Card/Card.module.css\"; export default {\"card\":\"_card_hvz2b_1\"}","import styles from \"./Card.module.css\";\n\n/**\n * Card is a basic container component to apply consistent styling and render child components.\n */\nconst Card = ({\n children,\n}: {\n /**\n * The child components to render within Card.\n */\n children: JSX.Element;\n}): JSX.Element => <div className={styles.card}>{children}</div>;\n\nexport default Card;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Divider/Divider.module.css\"; export default {\"divider\":\"_divider_1ddgq_1\"}","import styles from \"./Divider.module.css\";\n\n/**\n * Divider is a thin horizontal line to group content in lists and layouts.\n */\nexport default function Divider({}: Record<string, never>) {\n return <hr className={styles.divider} />;\n}\n\nDivider.displayName = \"Divider\";\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/MiniActionCard/MiniActionCard.module.css\"; export default {\"miniActionCard\":\"_miniActionCard_qebkn_1\",\"card\":\"_card_qebkn_9\"}","import styles from \"./MiniActionCard.module.css\";\n\n/**\n * MiniActionCard is component that alerts users to a call to action.\n */\nconst MiniActionCard = ({\n children,\n}: {\n /**\n * The child components to render within MiniActionCard.\n */\n children: JSX.Element;\n}): JSX.Element => <div className={styles.miniActionCard}>{children}</div>;\n\nexport default MiniActionCard;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,oDAAAA,SAAA;AAOA,KAAC,WAAY;AACZ;AAEA,UAAI,SAAS,CAAC,EAAE;AAChB,UAAI,mBAAmB;AAEvB,eAASC,cAAa;AACrB,YAAI,UAAU,CAAC;AAEf,iBAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AAC1C,cAAI,MAAM,UAAU,CAAC;AACrB,cAAI,CAAC;AAAK;AAEV,cAAI,UAAU,OAAO;AAErB,cAAI,YAAY,YAAY,YAAY,UAAU;AACjD,oBAAQ,KAAK,GAAG;AAAA,UACjB,WAAW,MAAM,QAAQ,GAAG,GAAG;AAC9B,gBAAI,IAAI,QAAQ;AACf,kBAAI,QAAQA,YAAW,MAAM,MAAM,GAAG;AACtC,kBAAI,OAAO;AACV,wBAAQ,KAAK,KAAK;AAAA,cACnB;AAAA,YACD;AAAA,UACD,WAAW,YAAY,UAAU;AAChC,gBAAI,IAAI,aAAa,OAAO,UAAU,YAAY,CAAC,IAAI,SAAS,SAAS,EAAE,SAAS,eAAe,GAAG;AACrG,sBAAQ,KAAK,IAAI,SAAS,CAAC;AAC3B;AAAA,YACD;AAEA,qBAAS,OAAO,KAAK;AACpB,kBAAI,OAAO,KAAK,KAAK,GAAG,KAAK,IAAI,GAAG,GAAG;AACtC,wBAAQ,KAAK,GAAG;AAAA,cACjB;AAAA,YACD;AAAA,UACD;AAAA,QACD;AAEA,eAAO,QAAQ,KAAK,GAAG;AAAA,MACxB;AAEA,UAAI,OAAOD,YAAW,eAAeA,QAAO,SAAS;AACpD,QAAAC,YAAW,UAAUA;AACrB,QAAAD,QAAO,UAAUC;AAAA,MAClB,WAAW,OAAO,WAAW,cAAc,OAAO,OAAO,QAAQ,YAAY,OAAO,KAAK;AAExF,eAAO,cAAc,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AAC,SAAW,2BAAO,aAAa,IAAI,IAAI,GAAG;AAAA,IAC3D,CAAC,2BAAO,UAAU,GAAG,gBAAgB,YAAY;AAAA,IACjD,CAAC,2BAAO,QAAQ,GAAG,gBAAgB,YAAY;AAAA,EACjD,CAAC;AAED,SACE,6CAAC,2BAAmB,UAAnB,EAA4B,OAAO,SAClC,uDAAC,SAAI,WAAW,YAAa,UAAS,GACxC;AAEJ;AAEA,IAAO,sBAAQ;;;AEpEyE,IAAO,sBAAQ,EAAC,QAAO,gBAAe;;;ACY3G,IAAAC,sBAAA;AAPnB,IAAM,OAAO,CAAC;AAAA,EACZ;AACF,MAKmB,6CAAC,SAAI,WAAW,oBAAO,MAAO,UAAS;AAE1D,IAAO,eAAQ;;;ACd+E,IAAO,yBAAQ,EAAC,WAAU,mBAAkB;;;ACMjI,IAAAC,sBAAA;AADM,SAAR,QAAyB,CAAC,GAA0B;AACzD,SAAO,6CAAC,QAAG,WAAW,uBAAO,SAAS;AACxC;AAEA,QAAQ,cAAc;;;ACTsF,IAAO,gCAAQ,EAAC,kBAAiB,2BAA0B,QAAO,gBAAe;;;ACY1K,IAAAC,sBAAA;AAPnB,IAAM,iBAAiB,CAAC;AAAA,EACtB;AACF,MAKmB,6CAAC,SAAI,WAAW,8BAAO,gBAAiB,UAAS;AAEpE,IAAO,yBAAQ;","names":["module","classNames","classNames","import_classnames","import_react","React","import_jsx_runtime","classNames","import_react","import_classnames","import_jsx_runtime","classNames","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/classnames/index.js","../src/index.tsx","../src/Avatar/Avatar.tsx","css-module:./Avatar.module.css#css-module","../src/Button/Button.tsx","css-module:./colors.module.css#css-module","../src/colors/backgroundColor.ts","../src/colors/foregroundColor.ts","../src/ButtonGroup/ButtonGroupContext.tsx","css-module:./Button.module.css#css-module","../src/ButtonGroup/ButtonGroup.tsx","css-module:./ButtonGroup.module.css#css-module","css-module:./Card.module.css#css-module","../src/Card/Card.tsx","css-module:./Divider.module.css#css-module","../src/Divider/Divider.tsx","css-module:./MiniActionCard.module.css#css-module","../src/MiniActionCard/MiniActionCard.tsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import Avatar from \"./Avatar/Avatar\";\nimport Button from \"./Button/Button\";\nimport ButtonGroup from \"./ButtonGroup/ButtonGroup\";\nimport Card from \"./Card/Card\";\nimport Divider from \"./Divider/Divider\";\nimport MiniActionCard from \"./MiniActionCard/MiniActionCard\";\n\nexport { Avatar, Button, ButtonGroup, Card, Divider, MiniActionCard };\n","import classNames from \"classnames\";\nimport styles from \"./Avatar.module.css\";\n\n/**\n * Avatar is a circular image that represents a user.\n */\nconst Avatar = ({\n src,\n accessibilityLabel,\n size = \"md\",\n}: {\n /**\n * URL of the image to display as the avatar.\n */\n src: string;\n /**\n * Alt text to use for the image.\n * This should describe the image to people using screen readers.\n */\n accessibilityLabel: string;\n /**\n * Size of the avatar.\n * sm: 24px, md: 40px, lg: 72px, xl: 128px.\n *\n * @defaultValue `md`\n */\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n}): JSX.Element => {\n return (\n <img\n alt={accessibilityLabel}\n src={src}\n className={classNames(styles.avatar, styles[size])}\n />\n );\n};\n\nexport default Avatar;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Avatar/Avatar.module.css\"; export default {\"avatar\":\"_avatar_1s8z7_1\",\"sm\":\"_sm_1s8z7_8\",\"md\":\"_md_1s8z7_13\",\"lg\":\"_lg_1s8z7_18\",\"xl\":\"_xl_1s8z7_23\"}","import classNames from \"classnames\";\nimport backgroundColor from \"../colors//backgroundColor\";\nimport foregroundColor from \"../colors/foregroundColor\";\nimport React, { useContext, ReactElement } from \"react\";\nimport { Color, Size } from \"../constants\";\nimport ButtonGroupContext from \"../ButtonGroup/ButtonGroupContext\";\nimport styles from \"./Button.module.css\";\n\nconst textVariant = {\n // Replace with `Typography` once it lands in `syntax-core`\n [\"sm\"]: styles.buttonTextSmall,\n [\"md\"]: styles.buttonTextMedium,\n [\"lg\"]: styles.buttonTextLarge,\n} as const;\n\nconst loadingIconSize = {\n [\"sm\"]: 16,\n [\"md\"]: 20,\n [\"lg\"]: 24,\n};\n\nconst iconSize = {\n [\"sm\"]: styles.smIcon,\n [\"md\"]: styles.mdIcon,\n [\"lg\"]: styles.lgIcon,\n};\n\nconst Button = ({\n text,\n loadingText,\n color = \"primary\",\n size: sizeProp = \"md\",\n accessibilityLabel,\n disabled: disabledProp = false,\n loading = false,\n fullWidth: fullWidthProp = false,\n startIcon: StartIcon,\n endIcon: EndIcon,\n onClick,\n tooltip,\n}: {\n /**\n * The text to be displayed inside the button\n */\n text: string;\n /**\n * The text to be displayed inside the button when it is in a loading state\n */\n loadingText?: string;\n /**\n * The color of the button\n *\n * @defaultValue \"primary\"\n */\n color?: (typeof Color)[number];\n /**\n * The size of the button\n *\n * @defaultValue \"medium\"\n */\n size?: (typeof Size)[number];\n /**\n * The label to be used for accessibility\n */\n accessibilityLabel?: string;\n /**\n * If `true`, the button will be disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * If `true`, the button will be in a loading state\n *\n * @defaultValue false\n */\n loading?: boolean;\n /**\n * If `true`, the button will take up the full width of its container\n *\n * @defaultValue false\n */\n fullWidth?: boolean;\n /**\n * The icon to be displayed at the start of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n startIcon?: React.ComponentType<{ className: string }>;\n /**\n * The icon to be displayed at the end of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n endIcon?: React.ComponentType<{ className: string }>;\n /**\n * The callback to be called when the button is clicked\n */\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n /**\n * The tooltip to be displayed when the user hovers over the button\n */\n tooltip?: string;\n}): ReactElement => {\n const contextProps = useContext(ButtonGroupContext);\n\n const size = contextProps?.size || sizeProp;\n const disabled = contextProps?.disabled || disabledProp;\n const fullWidth = contextProps?.fullWidth || fullWidthProp;\n\n return (\n <button\n aria-label={accessibilityLabel}\n type=\"button\"\n title={tooltip}\n disabled={disabled || loading}\n onClick={onClick}\n className={classNames(\n styles.button,\n foregroundColor(color),\n backgroundColor(color),\n styles[size],\n {\n [styles.fullWidth]: fullWidth,\n [styles.buttonGap]: size === \"lg\" || size === \"md\",\n },\n )}\n >\n {!loading && StartIcon && (\n <StartIcon className={classNames(styles.icon, iconSize[size])} />\n )}\n {((loading && loadingText) || (!loading && text)) && (\n <div className={styles.textContainer}>\n {/* Replace with `Typography` once it lands in `syntax-core` */}\n <div className={classNames(styles.buttonText, textVariant[size])}>\n {loading ? loadingText : text}\n </div>\n </div>\n )}\n {!loading && EndIcon && (\n <EndIcon className={classNames(styles.icon, iconSize[size])} />\n )}\n {loading && (\n <svg\n className={classNames(styles.loading, foregroundColor(color))}\n viewBox=\"22 22 44 44\"\n width={loadingIconSize[size]}\n height={loadingIconSize[size]}\n >\n <circle\n className={styles.loadingCircle}\n cx=\"44\"\n cy=\"44\"\n r=\"20.2\"\n fill=\"none\"\n strokeWidth=\"3.6\"\n />\n </svg>\n )}\n </button>\n );\n};\n\nexport default Button;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/colors/colors.module.css\"; export default {\"primary700Color\":\"_primary700Color_18uh7_2\",\"destructive700Color\":\"_destructive700Color_18uh7_6\",\"gray900Color\":\"_gray900Color_18uh7_10\",\"whiteColor\":\"_whiteColor_18uh7_14\",\"primary100BackgroundColor\":\"_primary100BackgroundColor_18uh7_19\",\"destructive700Background\":\"_destructive700Background_18uh7_23\",\"destructive100BackgroundColor\":\"_destructive100BackgroundColor_18uh7_27\",\"success700BackgroundColor\":\"_success700BackgroundColor_18uh7_31\",\"whiteBackgroundColor\":\"_whiteBackgroundColor_18uh7_35\",\"yellow700BackgroundColor\":\"_yellow700BackgroundColor_18uh7_39\",\"primary700BackgroundColor\":\"_primary700BackgroundColor_18uh7_43\"}","import { Color } from \"../constants\";\nimport styles from \"./colors.module.css\";\n\nexport default function backgroundColor(color: (typeof Color)[number]): string {\n switch (color) {\n case \"secondary\":\n return styles.primary100BackgroundColor;\n case \"destructive-primary\":\n return styles.destructive700Background;\n case \"destructive-secondary\":\n return styles.destructive100BackgroundColor;\n case \"success\":\n return styles.success700BackgroundColor;\n case \"tertiary\":\n case \"destructive-tertiary\":\n return styles.whiteBackgroundColor;\n case \"branded\":\n return styles.yellow700BackgroundColor;\n default:\n return styles.primary700BackgroundColor;\n }\n}\n","import { Color } from \"../constants\";\nimport styles from \"./colors.module.css\";\n\nexport default function foregroundColor(color: (typeof Color)[number]): string {\n switch (color) {\n case \"secondary\":\n case \"tertiary\":\n return styles.primary700Color;\n case \"destructive-secondary\":\n case \"destructive-tertiary\":\n return styles.destructive700Color;\n case \"branded\":\n return styles.gray900Color;\n default:\n return styles.whiteColor;\n }\n}\n","import { Size } from \"../constants\";\nimport React from \"react\";\n\ninterface ButtonGroupContextType {\n size?: (typeof Size)[number];\n disabled?: boolean;\n fullWidth?: boolean;\n}\n\nconst ButtonGroupContext = React.createContext<ButtonGroupContextType | null>(\n {},\n);\n\nButtonGroupContext.displayName = \"ButtonGroupContext\";\n\nexport default ButtonGroupContext;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Button/Button.module.css\"; export default {\"button\":\"_button_6lbba_1\",\"buttonGap\":\"_buttonGap_6lbba_9\",\"fullWidth\":\"_fullWidth_6lbba_50\",\"sm\":\"_sm_6lbba_54\",\"md\":\"_md_6lbba_61\",\"lg\":\"_lg_6lbba_68\",\"icon\":\"_icon_6lbba_75\",\"smIcon\":\"_smIcon_6lbba_79\",\"mdIcon\":\"_mdIcon_6lbba_86\",\"lgIcon\":\"_lgIcon_6lbba_93\",\"textContainer\":\"_textContainer_6lbba_100\",\"loading\":\"_loading_6lbba_115\",\"syntaxButtonLoadingRotate\":\"_syntaxButtonLoadingRotate_6lbba_1\",\"loadingCircle\":\"_loadingCircle_6lbba_119\",\"buttonText\":\"_buttonText_6lbba_127\",\"buttonTextSmall\":\"_buttonTextSmall_6lbba_134\",\"buttonTextMedium\":\"_buttonTextMedium_6lbba_138\",\"buttonTextLarge\":\"_buttonTextLarge_6lbba_142\"}","import { useMemo, ReactElement, ReactNode } from \"react\";\nimport styles from \"./ButtonGroup.module.css\";\nimport { Size } from \"../constants\";\nimport ButtonGroupContext from \"./ButtonGroupContext\";\nimport classNames from \"classnames\";\n\nconst gap = {\n [\"sm\"]: styles.smallGap,\n [\"md\"]: styles.mediumGap,\n [\"lg\"]: styles.largeGap,\n} as const;\n\n/**\n * Group buttons to render them in a row or column with consistent spacing in between each button\n */\nconst ButtonGroup = ({\n disabled = false,\n fullWidth = false,\n orientation = \"horizontal\",\n size = \"md\",\n children,\n}: {\n /**\n * If `true`, all buttons will be disabled.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * If `true`, all buttons will be full width.\n *\n * @defaultValue false\n */\n fullWidth?: boolean;\n /**\n * The orientation of the button group\n *\n * @defaultValue \"horizontal\"\n */\n orientation?: \"horizontal\" | \"vertical\";\n /**\n * The size of the button group\n *\n * @defaultValue \"medium\"\n */\n size?: (typeof Size)[number];\n /**\n * Buttons to be rendered inside the button group\n */\n children?: ReactNode;\n}): ReactElement => {\n const context = useMemo(\n () => ({ disabled, fullWidth, size }),\n [disabled, fullWidth, size],\n );\n\n const classnames = classNames(styles.buttonGroup, gap[size], {\n [styles.horizontal]: orientation === \"horizontal\",\n [styles.vertical]: orientation === \"vertical\",\n });\n\n return (\n <ButtonGroupContext.Provider value={context}>\n <div className={classnames}>{children}</div>\n </ButtonGroupContext.Provider>\n );\n};\n\nexport default ButtonGroup;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/ButtonGroup/ButtonGroup.module.css\"; export default {\"buttonGroup\":\"_buttonGroup_184aa_1\",\"horizontal\":\"_horizontal_184aa_6\",\"vertical\":\"_vertical_184aa_10\",\"smallGap\":\"_smallGap_184aa_14\",\"mediumGap\":\"_mediumGap_184aa_18\",\"largeGap\":\"_largeGap_184aa_22\"}","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Card/Card.module.css\"; export default {\"card\":\"_card_hvz2b_1\"}","import styles from \"./Card.module.css\";\n\n/**\n * Card is a basic container component to apply consistent styling and render child components.\n */\nconst Card = ({\n children,\n}: {\n /**\n * The child components to render within Card.\n */\n children: JSX.Element;\n}): JSX.Element => <div className={styles.card}>{children}</div>;\n\nexport default Card;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Divider/Divider.module.css\"; export default {\"divider\":\"_divider_1ddgq_1\"}","import styles from \"./Divider.module.css\";\n\n/**\n * Divider is a thin horizontal line to group content in lists and layouts.\n */\nexport default function Divider({}: Record<string, never>) {\n return <hr className={styles.divider} />;\n}\n\nDivider.displayName = \"Divider\";\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/MiniActionCard/MiniActionCard.module.css\"; export default {\"miniActionCard\":\"_miniActionCard_qebkn_1\",\"card\":\"_card_qebkn_9\"}","import styles from \"./MiniActionCard.module.css\";\n\n/**\n * MiniActionCard is component that alerts users to a call to action.\n */\nconst MiniActionCard = ({\n children,\n}: {\n /**\n * The child components to render within MiniActionCard.\n */\n children: JSX.Element;\n}): JSX.Element => <div className={styles.miniActionCard}>{children}</div>;\n\nexport default MiniActionCard;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,oDAAAA,SAAA;AAOA,KAAC,WAAY;AACZ;AAEA,UAAI,SAAS,CAAC,EAAE;AAChB,UAAI,mBAAmB;AAEvB,eAASC,cAAa;AACrB,YAAI,UAAU,CAAC;AAEf,iBAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AAC1C,cAAI,MAAM,UAAU,CAAC;AACrB,cAAI,CAAC;AAAK;AAEV,cAAI,UAAU,OAAO;AAErB,cAAI,YAAY,YAAY,YAAY,UAAU;AACjD,oBAAQ,KAAK,GAAG;AAAA,UACjB,WAAW,MAAM,QAAQ,GAAG,GAAG;AAC9B,gBAAI,IAAI,QAAQ;AACf,kBAAI,QAAQA,YAAW,MAAM,MAAM,GAAG;AACtC,kBAAI,OAAO;AACV,wBAAQ,KAAK,KAAK;AAAA,cACnB;AAAA,YACD;AAAA,UACD,WAAW,YAAY,UAAU;AAChC,gBAAI,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AG,gBAAgB;AAAA,IACrC,CAAC,2BAAO,QAAQ,GAAG,gBAAgB;AAAA,EACrC,CAAC;AAED,SACE,6CAAC,2BAAmB,UAAnB,EAA4B,OAAO,SAClC,uDAAC,SAAI,WAAW,YAAa,UAAS,GACxC;AAEJ;AAEA,IAAO,sBAAQ;;;AEpEyE,IAAO,sBAAQ,EAAC,QAAO,gBAAe;;;ACY3G,IAAAC,sBAAA;AAPnB,IAAM,OAAO,CAAC;AAAA,EACZ;AACF,MAKmB,6CAAC,SAAI,WAAW,oBAAO,MAAO,UAAS;AAE1D,IAAO,eAAQ;;;ACd+E,IAAO,yBAAQ,EAAC,WAAU,mBAAkB;;;ACMjI,IAAAC,sBAAA;AADM,SAAR,QAAyB,CAAC,GAA0B;AACzD,SAAO,6CAAC,QAAG,WAAW,uBAAO,SAAS;AACxC;AAEA,QAAQ,cAAc;;;ACTsF,IAAO,gCAAQ,EAAC,kBAAiB,2BAA0B,QAAO,gBAAe;;;ACY1K,IAAAC,sBAAA;AAPnB,IAAM,iBAAiB,CAAC;AAAA,EACtB;AACF,MAKmB,6CAAC,SAAI,WAAW,8BAAO,gBAAiB,UAAS;AAEpE,IAAO,yBAAQ;","names":["module","classNames","classNames","import_classnames","import_react","React","import_jsx_runtime","classNames","import_react","import_classnames","import_jsx_runtime","classNames","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
|
package/dist/index.mjs
CHANGED
|
@@ -102,51 +102,24 @@ var Avatar_default = Avatar;
|
|
|
102
102
|
// src/Button/Button.tsx
|
|
103
103
|
var import_classnames2 = __toESM(require_classnames());
|
|
104
104
|
|
|
105
|
-
// src/constants.ts
|
|
106
|
-
var Color = {
|
|
107
|
-
PRIMARY: "primary",
|
|
108
|
-
SECONDARY: "secondary",
|
|
109
|
-
TERTIARY: "tertiary",
|
|
110
|
-
BRANDED: "branded",
|
|
111
|
-
DESTRUCTIVE_PRIMARY: "destructive-primary",
|
|
112
|
-
DESTRUCTIVE_SECONDARY: "destructive-secondary",
|
|
113
|
-
DESTRUCTIVE_TERTIARY: "destructive-tertiary",
|
|
114
|
-
SUCCESS: "success",
|
|
115
|
-
GRAY200: "gray200",
|
|
116
|
-
GRAY700: "gray700",
|
|
117
|
-
GRAY800: "gray800",
|
|
118
|
-
GRAY900: "gray900",
|
|
119
|
-
WHITE: "white",
|
|
120
|
-
INHERIT: "inherit"
|
|
121
|
-
};
|
|
122
|
-
var Size = {
|
|
123
|
-
SMALL: "sm",
|
|
124
|
-
MEDIUM: "md",
|
|
125
|
-
LARGE: "lg"
|
|
126
|
-
};
|
|
127
|
-
var Orientation = {
|
|
128
|
-
HORIZONTAL: "horizontal",
|
|
129
|
-
VERTICAL: "vertical"
|
|
130
|
-
};
|
|
131
|
-
|
|
132
105
|
// css-module:./colors.module.css#css-module
|
|
133
106
|
var colors_module_default = { "primary700Color": "_primary700Color_18uh7_2", "destructive700Color": "_destructive700Color_18uh7_6", "gray900Color": "_gray900Color_18uh7_10", "whiteColor": "_whiteColor_18uh7_14", "primary100BackgroundColor": "_primary100BackgroundColor_18uh7_19", "destructive700Background": "_destructive700Background_18uh7_23", "destructive100BackgroundColor": "_destructive100BackgroundColor_18uh7_27", "success700BackgroundColor": "_success700BackgroundColor_18uh7_31", "whiteBackgroundColor": "_whiteBackgroundColor_18uh7_35", "yellow700BackgroundColor": "_yellow700BackgroundColor_18uh7_39", "primary700BackgroundColor": "_primary700BackgroundColor_18uh7_43" };
|
|
134
107
|
|
|
135
108
|
// src/colors/backgroundColor.ts
|
|
136
109
|
function backgroundColor(color) {
|
|
137
110
|
switch (color) {
|
|
138
|
-
case
|
|
111
|
+
case "secondary":
|
|
139
112
|
return colors_module_default.primary100BackgroundColor;
|
|
140
|
-
case
|
|
113
|
+
case "destructive-primary":
|
|
141
114
|
return colors_module_default.destructive700Background;
|
|
142
|
-
case
|
|
115
|
+
case "destructive-secondary":
|
|
143
116
|
return colors_module_default.destructive100BackgroundColor;
|
|
144
|
-
case
|
|
117
|
+
case "success":
|
|
145
118
|
return colors_module_default.success700BackgroundColor;
|
|
146
|
-
case
|
|
147
|
-
case
|
|
119
|
+
case "tertiary":
|
|
120
|
+
case "destructive-tertiary":
|
|
148
121
|
return colors_module_default.whiteBackgroundColor;
|
|
149
|
-
case
|
|
122
|
+
case "branded":
|
|
150
123
|
return colors_module_default.yellow700BackgroundColor;
|
|
151
124
|
default:
|
|
152
125
|
return colors_module_default.primary700BackgroundColor;
|
|
@@ -156,13 +129,13 @@ function backgroundColor(color) {
|
|
|
156
129
|
// src/colors/foregroundColor.ts
|
|
157
130
|
function foregroundColor(color) {
|
|
158
131
|
switch (color) {
|
|
159
|
-
case
|
|
160
|
-
case
|
|
132
|
+
case "secondary":
|
|
133
|
+
case "tertiary":
|
|
161
134
|
return colors_module_default.primary700Color;
|
|
162
|
-
case
|
|
163
|
-
case
|
|
135
|
+
case "destructive-secondary":
|
|
136
|
+
case "destructive-tertiary":
|
|
164
137
|
return colors_module_default.destructive700Color;
|
|
165
|
-
case
|
|
138
|
+
case "branded":
|
|
166
139
|
return colors_module_default.gray900Color;
|
|
167
140
|
default:
|
|
168
141
|
return colors_module_default.whiteColor;
|
|
@@ -187,25 +160,25 @@ var Button_module_default = { "button": "_button_6lbba_1", "buttonGap": "_button
|
|
|
187
160
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
188
161
|
var textVariant = {
|
|
189
162
|
// Replace with `Typography` once it lands in `syntax-core`
|
|
190
|
-
[
|
|
191
|
-
[
|
|
192
|
-
[
|
|
163
|
+
["sm"]: Button_module_default.buttonTextSmall,
|
|
164
|
+
["md"]: Button_module_default.buttonTextMedium,
|
|
165
|
+
["lg"]: Button_module_default.buttonTextLarge
|
|
193
166
|
};
|
|
194
167
|
var loadingIconSize = {
|
|
195
|
-
[
|
|
196
|
-
[
|
|
197
|
-
[
|
|
168
|
+
["sm"]: 16,
|
|
169
|
+
["md"]: 20,
|
|
170
|
+
["lg"]: 24
|
|
198
171
|
};
|
|
199
172
|
var iconSize = {
|
|
200
|
-
[
|
|
201
|
-
[
|
|
202
|
-
[
|
|
173
|
+
["sm"]: Button_module_default.smIcon,
|
|
174
|
+
["md"]: Button_module_default.mdIcon,
|
|
175
|
+
["lg"]: Button_module_default.lgIcon
|
|
203
176
|
};
|
|
204
177
|
var Button = ({
|
|
205
178
|
text,
|
|
206
179
|
loadingText,
|
|
207
|
-
color =
|
|
208
|
-
size: sizeProp =
|
|
180
|
+
color = "primary",
|
|
181
|
+
size: sizeProp = "md",
|
|
209
182
|
accessibilityLabel,
|
|
210
183
|
disabled: disabledProp = false,
|
|
211
184
|
loading = false,
|
|
@@ -234,7 +207,7 @@ var Button = ({
|
|
|
234
207
|
Button_module_default[size],
|
|
235
208
|
{
|
|
236
209
|
[Button_module_default.fullWidth]: fullWidth,
|
|
237
|
-
[Button_module_default.buttonGap]: size ===
|
|
210
|
+
[Button_module_default.buttonGap]: size === "lg" || size === "md"
|
|
238
211
|
}
|
|
239
212
|
),
|
|
240
213
|
children: [
|
|
@@ -277,15 +250,15 @@ var ButtonGroup_module_default = { "buttonGroup": "_buttonGroup_184aa_1", "horiz
|
|
|
277
250
|
var import_classnames3 = __toESM(require_classnames());
|
|
278
251
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
279
252
|
var gap = {
|
|
280
|
-
[
|
|
281
|
-
[
|
|
282
|
-
[
|
|
253
|
+
["sm"]: ButtonGroup_module_default.smallGap,
|
|
254
|
+
["md"]: ButtonGroup_module_default.mediumGap,
|
|
255
|
+
["lg"]: ButtonGroup_module_default.largeGap
|
|
283
256
|
};
|
|
284
257
|
var ButtonGroup = ({
|
|
285
258
|
disabled = false,
|
|
286
259
|
fullWidth = false,
|
|
287
|
-
orientation =
|
|
288
|
-
size =
|
|
260
|
+
orientation = "horizontal",
|
|
261
|
+
size = "md",
|
|
289
262
|
children
|
|
290
263
|
}) => {
|
|
291
264
|
const context = useMemo(
|
|
@@ -293,8 +266,8 @@ var ButtonGroup = ({
|
|
|
293
266
|
[disabled, fullWidth, size]
|
|
294
267
|
);
|
|
295
268
|
const classnames = (0, import_classnames3.default)(ButtonGroup_module_default.buttonGroup, gap[size], {
|
|
296
|
-
[ButtonGroup_module_default.horizontal]: orientation ===
|
|
297
|
-
[ButtonGroup_module_default.vertical]: orientation ===
|
|
269
|
+
[ButtonGroup_module_default.horizontal]: orientation === "horizontal",
|
|
270
|
+
[ButtonGroup_module_default.vertical]: orientation === "vertical"
|
|
298
271
|
});
|
|
299
272
|
return /* @__PURE__ */ jsx3(ButtonGroupContext_default.Provider, { value: context, children: /* @__PURE__ */ jsx3("div", { className: classnames, children }) });
|
|
300
273
|
};
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/classnames/index.js","../src/Avatar/Avatar.tsx","css-module:./Avatar.module.css#css-module","../src/Button/Button.tsx","../src/constants.ts","css-module:./colors.module.css#css-module","../src/colors/backgroundColor.ts","../src/colors/foregroundColor.ts","../src/ButtonGroup/ButtonGroupContext.tsx","css-module:./Button.module.css#css-module","../src/ButtonGroup/ButtonGroup.tsx","css-module:./ButtonGroup.module.css#css-module","css-module:./Card.module.css#css-module","../src/Card/Card.tsx","css-module:./Divider.module.css#css-module","../src/Divider/Divider.tsx","css-module:./MiniActionCard.module.css#css-module","../src/MiniActionCard/MiniActionCard.tsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import classNames from \"classnames\";\nimport styles from \"./Avatar.module.css\";\n\n/**\n * Avatar is a circular image that represents a user.\n */\nconst Avatar = ({\n src,\n accessibilityLabel,\n size = \"md\",\n}: {\n /**\n * URL of the image to display as the avatar.\n */\n src: string;\n /**\n * Alt text to use for the image.\n * This should describe the image to people using screen readers.\n */\n accessibilityLabel: string;\n /**\n * Size of the avatar.\n * sm: 24px, md: 40px, lg: 72px, xl: 128px.\n *\n * @defaultValue `md`\n */\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n}): JSX.Element => {\n return (\n <img\n alt={accessibilityLabel}\n src={src}\n className={classNames(styles.avatar, styles[size])}\n />\n );\n};\n\nexport default Avatar;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Avatar/Avatar.module.css\"; export default {\"avatar\":\"_avatar_1s8z7_1\",\"sm\":\"_sm_1s8z7_8\",\"md\":\"_md_1s8z7_13\",\"lg\":\"_lg_1s8z7_18\",\"xl\":\"_xl_1s8z7_23\"}","import classNames from \"classnames\";\nimport backgroundColor from \"../colors//backgroundColor\";\nimport foregroundColor from \"../colors/foregroundColor\";\nimport React, { useContext, ReactElement } from \"react\";\nimport { Color, ColorValue, Size, SizeValue } from \"../constants\";\nimport ButtonGroupContext from \"../ButtonGroup/ButtonGroupContext\";\nimport styles from \"./Button.module.css\";\n\nconst textVariant = {\n // Replace with `Typography` once it lands in `syntax-core`\n [Size.SMALL]: styles.buttonTextSmall,\n [Size.MEDIUM]: styles.buttonTextMedium,\n [Size.LARGE]: styles.buttonTextLarge,\n} as const;\n\nconst loadingIconSize = {\n [Size.SMALL]: 16,\n [Size.MEDIUM]: 20,\n [Size.LARGE]: 24,\n};\n\nconst iconSize = {\n [Size.SMALL]: styles.smIcon,\n [Size.MEDIUM]: styles.mdIcon,\n [Size.LARGE]: styles.lgIcon,\n};\n\nconst Button = ({\n text,\n loadingText,\n color = Color.PRIMARY,\n size: sizeProp = Size.MEDIUM,\n accessibilityLabel,\n disabled: disabledProp = false,\n loading = false,\n fullWidth: fullWidthProp = false,\n startIcon: StartIcon,\n endIcon: EndIcon,\n onClick,\n tooltip,\n}: {\n /**\n * The text to be displayed inside the button\n */\n text: string;\n /**\n * The text to be displayed inside the button when it is in a loading state\n */\n loadingText?: string;\n /**\n * The color of the button\n *\n * @defaultValue \"primary\"\n */\n color?: ColorValue;\n /**\n * The size of the button\n *\n * @defaultValue \"medium\"\n */\n size?: SizeValue;\n /**\n * The label to be used for accessibility\n */\n accessibilityLabel?: string;\n /**\n * If `true`, the button will be disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * If `true`, the button will be in a loading state\n *\n * @defaultValue false\n */\n loading?: boolean;\n /**\n * If `true`, the button will take up the full width of its container\n *\n * @defaultValue false\n */\n fullWidth?: boolean;\n /**\n * The icon to be displayed at the start of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n startIcon?: React.ComponentType<{ className: string }>;\n /**\n * The icon to be displayed at the end of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n endIcon?: React.ComponentType<{ className: string }>;\n /**\n * The callback to be called when the button is clicked\n */\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n /**\n * The tooltip to be displayed when the user hovers over the button\n */\n tooltip?: string;\n}): ReactElement => {\n const contextProps = useContext(ButtonGroupContext);\n\n const size = contextProps?.size || sizeProp;\n const disabled = contextProps?.disabled || disabledProp;\n const fullWidth = contextProps?.fullWidth || fullWidthProp;\n\n return (\n <button\n aria-label={accessibilityLabel}\n type=\"button\"\n title={tooltip}\n disabled={disabled || loading}\n onClick={onClick}\n className={classNames(\n styles.button,\n foregroundColor(color),\n backgroundColor(color),\n styles[size],\n {\n [styles.fullWidth]: fullWidth,\n [styles.buttonGap]: size === Size.LARGE || size === Size.MEDIUM,\n },\n )}\n >\n {!loading && StartIcon && (\n <StartIcon className={classNames(styles.icon, iconSize[size])} />\n )}\n {((loading && loadingText) || (!loading && text)) && (\n <div className={styles.textContainer}>\n {/* Replace with `Typography` once it lands in `syntax-core` */}\n <div className={classNames(styles.buttonText, textVariant[size])}>\n {loading ? loadingText : text}\n </div>\n </div>\n )}\n {!loading && EndIcon && (\n <EndIcon className={classNames(styles.icon, iconSize[size])} />\n )}\n {loading && (\n <svg\n className={classNames(styles.loading, foregroundColor(color))}\n viewBox=\"22 22 44 44\"\n width={loadingIconSize[size]}\n height={loadingIconSize[size]}\n >\n <circle\n className={styles.loadingCircle}\n cx=\"44\"\n cy=\"44\"\n r=\"20.2\"\n fill=\"none\"\n strokeWidth=\"3.6\"\n />\n </svg>\n )}\n </button>\n );\n};\n\nexport default Button;\n","export const Color = {\n PRIMARY: \"primary\",\n SECONDARY: \"secondary\",\n TERTIARY: \"tertiary\",\n BRANDED: \"branded\",\n DESTRUCTIVE_PRIMARY: \"destructive-primary\",\n DESTRUCTIVE_SECONDARY: \"destructive-secondary\",\n DESTRUCTIVE_TERTIARY: \"destructive-tertiary\",\n SUCCESS: \"success\",\n GRAY200: \"gray200\",\n GRAY700: \"gray700\",\n GRAY800: \"gray800\",\n GRAY900: \"gray900\",\n WHITE: \"white\",\n INHERIT: \"inherit\",\n} as const;\n\nexport type ColorKeys = keyof typeof Color;\nexport type ColorValue = (typeof Color)[ColorKeys];\n\nexport const Size = {\n SMALL: \"sm\",\n MEDIUM: \"md\",\n LARGE: \"lg\",\n} as const;\n\nexport type SizeKeys = keyof typeof Size;\nexport type SizeValue = (typeof Size)[SizeKeys];\n\nexport const Orientation = {\n HORIZONTAL: \"horizontal\",\n VERTICAL: \"vertical\",\n} as const;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/colors/colors.module.css\"; export default {\"primary700Color\":\"_primary700Color_18uh7_2\",\"destructive700Color\":\"_destructive700Color_18uh7_6\",\"gray900Color\":\"_gray900Color_18uh7_10\",\"whiteColor\":\"_whiteColor_18uh7_14\",\"primary100BackgroundColor\":\"_primary100BackgroundColor_18uh7_19\",\"destructive700Background\":\"_destructive700Background_18uh7_23\",\"destructive100BackgroundColor\":\"_destructive100BackgroundColor_18uh7_27\",\"success700BackgroundColor\":\"_success700BackgroundColor_18uh7_31\",\"whiteBackgroundColor\":\"_whiteBackgroundColor_18uh7_35\",\"yellow700BackgroundColor\":\"_yellow700BackgroundColor_18uh7_39\",\"primary700BackgroundColor\":\"_primary700BackgroundColor_18uh7_43\"}","import { Color, ColorValue } from \"../constants\";\nimport styles from \"./colors.module.css\";\n\nexport default function backgroundColor(color: ColorValue): string {\n switch (color) {\n case Color.SECONDARY:\n return styles.primary100BackgroundColor;\n case Color.DESTRUCTIVE_PRIMARY:\n return styles.destructive700Background;\n case Color.DESTRUCTIVE_SECONDARY:\n return styles.destructive100BackgroundColor;\n case Color.SUCCESS:\n return styles.success700BackgroundColor;\n case Color.TERTIARY:\n case Color.DESTRUCTIVE_TERTIARY:\n return styles.whiteBackgroundColor;\n case Color.BRANDED:\n return styles.yellow700BackgroundColor;\n default:\n return styles.primary700BackgroundColor;\n }\n}\n","import { Color, ColorValue } from \"../constants\";\nimport styles from \"./colors.module.css\";\n\nexport default function foregroundColor(color: ColorValue): string {\n switch (color) {\n case Color.SECONDARY:\n case Color.TERTIARY:\n return styles.primary700Color;\n case Color.DESTRUCTIVE_SECONDARY:\n case Color.DESTRUCTIVE_TERTIARY:\n return styles.destructive700Color;\n case Color.BRANDED:\n return styles.gray900Color;\n default:\n return styles.whiteColor;\n }\n}\n","import { SizeValue } from \"../constants\";\nimport React from \"react\";\n\ninterface ButtonGroupContextType {\n size?: SizeValue;\n disabled?: boolean;\n fullWidth?: boolean;\n}\n\nconst ButtonGroupContext = React.createContext<ButtonGroupContextType | null>(\n {},\n);\n\nButtonGroupContext.displayName = \"ButtonGroupContext\";\n\nexport default ButtonGroupContext;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Button/Button.module.css\"; export default {\"button\":\"_button_6lbba_1\",\"buttonGap\":\"_buttonGap_6lbba_9\",\"fullWidth\":\"_fullWidth_6lbba_50\",\"sm\":\"_sm_6lbba_54\",\"md\":\"_md_6lbba_61\",\"lg\":\"_lg_6lbba_68\",\"icon\":\"_icon_6lbba_75\",\"smIcon\":\"_smIcon_6lbba_79\",\"mdIcon\":\"_mdIcon_6lbba_86\",\"lgIcon\":\"_lgIcon_6lbba_93\",\"textContainer\":\"_textContainer_6lbba_100\",\"loading\":\"_loading_6lbba_115\",\"syntaxButtonLoadingRotate\":\"_syntaxButtonLoadingRotate_6lbba_1\",\"loadingCircle\":\"_loadingCircle_6lbba_119\",\"buttonText\":\"_buttonText_6lbba_127\",\"buttonTextSmall\":\"_buttonTextSmall_6lbba_134\",\"buttonTextMedium\":\"_buttonTextMedium_6lbba_138\",\"buttonTextLarge\":\"_buttonTextLarge_6lbba_142\"}","import { useMemo, ReactElement, ReactNode } from \"react\";\nimport styles from \"./ButtonGroup.module.css\";\nimport { Size, Orientation, SizeValue } from \"../constants\";\nimport ButtonGroupContext from \"./ButtonGroupContext\";\nimport classNames from \"classnames\";\n\nconst gap = {\n [Size.SMALL]: styles.smallGap,\n [Size.MEDIUM]: styles.mediumGap,\n [Size.LARGE]: styles.largeGap,\n} as const;\n\n/**\n * Group buttons to render them in a row or column with consistent spacing in between each button\n */\nconst ButtonGroup = ({\n disabled = false,\n fullWidth = false,\n orientation = Orientation.HORIZONTAL,\n size = Size.MEDIUM,\n children,\n}: {\n /**\n * If `true`, all buttons will be disabled.\n *\n * @defaultValue false\n */\n disabled: boolean;\n /**\n * If `true`, all buttons will be full width.\n *\n * @defaultValue false\n */\n fullWidth: boolean;\n /**\n * The orientation of the button group\n *\n * @defaultValue \"horizontal\"\n */\n orientation: \"horizontal\" | \"vertical\";\n /**\n * The size of the button group\n *\n * @defaultValue \"medium\"\n */\n size: SizeValue;\n /**\n * Buttons to be rendered inside the button group\n */\n children?: ReactNode;\n}): ReactElement => {\n const context = useMemo(\n () => ({ disabled, fullWidth, size }),\n [disabled, fullWidth, size],\n );\n\n const classnames = classNames(styles.buttonGroup, gap[size], {\n [styles.horizontal]: orientation === Orientation.HORIZONTAL,\n [styles.vertical]: orientation === Orientation.VERTICAL,\n });\n\n return (\n <ButtonGroupContext.Provider value={context}>\n <div className={classnames}>{children}</div>\n </ButtonGroupContext.Provider>\n );\n};\n\nexport default ButtonGroup;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/ButtonGroup/ButtonGroup.module.css\"; export default {\"buttonGroup\":\"_buttonGroup_184aa_1\",\"horizontal\":\"_horizontal_184aa_6\",\"vertical\":\"_vertical_184aa_10\",\"smallGap\":\"_smallGap_184aa_14\",\"mediumGap\":\"_mediumGap_184aa_18\",\"largeGap\":\"_largeGap_184aa_22\"}","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Card/Card.module.css\"; export default {\"card\":\"_card_hvz2b_1\"}","import styles from \"./Card.module.css\";\n\n/**\n * Card is a basic container component to apply consistent styling and render child components.\n */\nconst Card = ({\n children,\n}: {\n /**\n * The child components to render within Card.\n */\n children: JSX.Element;\n}): JSX.Element => <div className={styles.card}>{children}</div>;\n\nexport default Card;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Divider/Divider.module.css\"; export default {\"divider\":\"_divider_1ddgq_1\"}","import styles from \"./Divider.module.css\";\n\n/**\n * Divider is a thin horizontal line to group content in lists and layouts.\n */\nexport default function Divider({}: Record<string, never>) {\n return <hr className={styles.divider} />;\n}\n\nDivider.displayName = \"Divider\";\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/MiniActionCard/MiniActionCard.module.css\"; export default {\"miniActionCard\":\"_miniActionCard_qebkn_1\",\"card\":\"_card_qebkn_9\"}","import styles from \"./MiniActionCard.module.css\";\n\n/**\n * MiniActionCard is component that alerts users to a call to action.\n */\nconst MiniActionCard = ({\n children,\n}: {\n /**\n * The child components to render within MiniActionCard.\n */\n children: JSX.Element;\n}): JSX.Element => <div className={styles.miniActionCard}>{children}</div>;\n\nexport default MiniActionCard;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAOA,KAAC,WAAY;AACZ;AAEA,UAAI,SAAS,CAAC,EAAE;AAChB,UAAI,mBAAmB;AAEvB,eAASA,cAAa;AACrB,YAAI,UAAU,CAAC;AAEf,iBAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AAC1C,cAAI,MAAM,UAAU,CAAC;AACrB,cAAI,CAAC;AAAK;AAEV,cAAI,UAAU,OAAO;AAErB,cAAI,YAAY,YAAY,YAAY,UAAU;AACjD,oBAAQ,KAAK,GAAG;AAAA,UACjB,WAAW,MAAM,QAAQ,GAAG,GAAG;AAC9B,gBAAI,IAAI,QAAQ;AACf,kBAAI,QAAQA,YAAW,MAAM,MAAM,GAAG;AACtC,kBAAI,OAAO;AACV,wBAAQ,KAAK,KAAK;AAAA,cACnB;AAAA,YACD;AAAA,UACD,WAAW,YAAY,UAAU;AAChC,gBAAI,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C,YAAA;AAPnB,IAAM,iBAAiB,CAAC;AAAA,EACtB;AACF,MAKmB,gBAAAA,KAAC,SAAI,WAAW,8BAAO,gBAAiB,UAAS;AAEpE,IAAO,yBAAQ;","names":["classNames","classNames","import_classnames","jsx","classNames","import_classnames","jsx","classNames","jsx","jsx","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/classnames/index.js","../src/Avatar/Avatar.tsx","css-module:./Avatar.module.css#css-module","../src/Button/Button.tsx","css-module:./colors.module.css#css-module","../src/colors/backgroundColor.ts","../src/colors/foregroundColor.ts","../src/ButtonGroup/ButtonGroupContext.tsx","css-module:./Button.module.css#css-module","../src/ButtonGroup/ButtonGroup.tsx","css-module:./ButtonGroup.module.css#css-module","css-module:./Card.module.css#css-module","../src/Card/Card.tsx","css-module:./Divider.module.css#css-module","../src/Divider/Divider.tsx","css-module:./MiniActionCard.module.css#css-module","../src/MiniActionCard/MiniActionCard.tsx"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import classNames from \"classnames\";\nimport styles from \"./Avatar.module.css\";\n\n/**\n * Avatar is a circular image that represents a user.\n */\nconst Avatar = ({\n src,\n accessibilityLabel,\n size = \"md\",\n}: {\n /**\n * URL of the image to display as the avatar.\n */\n src: string;\n /**\n * Alt text to use for the image.\n * This should describe the image to people using screen readers.\n */\n accessibilityLabel: string;\n /**\n * Size of the avatar.\n * sm: 24px, md: 40px, lg: 72px, xl: 128px.\n *\n * @defaultValue `md`\n */\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n}): JSX.Element => {\n return (\n <img\n alt={accessibilityLabel}\n src={src}\n className={classNames(styles.avatar, styles[size])}\n />\n );\n};\n\nexport default Avatar;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Avatar/Avatar.module.css\"; export default {\"avatar\":\"_avatar_1s8z7_1\",\"sm\":\"_sm_1s8z7_8\",\"md\":\"_md_1s8z7_13\",\"lg\":\"_lg_1s8z7_18\",\"xl\":\"_xl_1s8z7_23\"}","import classNames from \"classnames\";\nimport backgroundColor from \"../colors//backgroundColor\";\nimport foregroundColor from \"../colors/foregroundColor\";\nimport React, { useContext, ReactElement } from \"react\";\nimport { Color, Size } from \"../constants\";\nimport ButtonGroupContext from \"../ButtonGroup/ButtonGroupContext\";\nimport styles from \"./Button.module.css\";\n\nconst textVariant = {\n // Replace with `Typography` once it lands in `syntax-core`\n [\"sm\"]: styles.buttonTextSmall,\n [\"md\"]: styles.buttonTextMedium,\n [\"lg\"]: styles.buttonTextLarge,\n} as const;\n\nconst loadingIconSize = {\n [\"sm\"]: 16,\n [\"md\"]: 20,\n [\"lg\"]: 24,\n};\n\nconst iconSize = {\n [\"sm\"]: styles.smIcon,\n [\"md\"]: styles.mdIcon,\n [\"lg\"]: styles.lgIcon,\n};\n\nconst Button = ({\n text,\n loadingText,\n color = \"primary\",\n size: sizeProp = \"md\",\n accessibilityLabel,\n disabled: disabledProp = false,\n loading = false,\n fullWidth: fullWidthProp = false,\n startIcon: StartIcon,\n endIcon: EndIcon,\n onClick,\n tooltip,\n}: {\n /**\n * The text to be displayed inside the button\n */\n text: string;\n /**\n * The text to be displayed inside the button when it is in a loading state\n */\n loadingText?: string;\n /**\n * The color of the button\n *\n * @defaultValue \"primary\"\n */\n color?: (typeof Color)[number];\n /**\n * The size of the button\n *\n * @defaultValue \"medium\"\n */\n size?: (typeof Size)[number];\n /**\n * The label to be used for accessibility\n */\n accessibilityLabel?: string;\n /**\n * If `true`, the button will be disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * If `true`, the button will be in a loading state\n *\n * @defaultValue false\n */\n loading?: boolean;\n /**\n * If `true`, the button will take up the full width of its container\n *\n * @defaultValue false\n */\n fullWidth?: boolean;\n /**\n * The icon to be displayed at the start of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n startIcon?: React.ComponentType<{ className: string }>;\n /**\n * The icon to be displayed at the end of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n endIcon?: React.ComponentType<{ className: string }>;\n /**\n * The callback to be called when the button is clicked\n */\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n /**\n * The tooltip to be displayed when the user hovers over the button\n */\n tooltip?: string;\n}): ReactElement => {\n const contextProps = useContext(ButtonGroupContext);\n\n const size = contextProps?.size || sizeProp;\n const disabled = contextProps?.disabled || disabledProp;\n const fullWidth = contextProps?.fullWidth || fullWidthProp;\n\n return (\n <button\n aria-label={accessibilityLabel}\n type=\"button\"\n title={tooltip}\n disabled={disabled || loading}\n onClick={onClick}\n className={classNames(\n styles.button,\n foregroundColor(color),\n backgroundColor(color),\n styles[size],\n {\n [styles.fullWidth]: fullWidth,\n [styles.buttonGap]: size === \"lg\" || size === \"md\",\n },\n )}\n >\n {!loading && StartIcon && (\n <StartIcon className={classNames(styles.icon, iconSize[size])} />\n )}\n {((loading && loadingText) || (!loading && text)) && (\n <div className={styles.textContainer}>\n {/* Replace with `Typography` once it lands in `syntax-core` */}\n <div className={classNames(styles.buttonText, textVariant[size])}>\n {loading ? loadingText : text}\n </div>\n </div>\n )}\n {!loading && EndIcon && (\n <EndIcon className={classNames(styles.icon, iconSize[size])} />\n )}\n {loading && (\n <svg\n className={classNames(styles.loading, foregroundColor(color))}\n viewBox=\"22 22 44 44\"\n width={loadingIconSize[size]}\n height={loadingIconSize[size]}\n >\n <circle\n className={styles.loadingCircle}\n cx=\"44\"\n cy=\"44\"\n r=\"20.2\"\n fill=\"none\"\n strokeWidth=\"3.6\"\n />\n </svg>\n )}\n </button>\n );\n};\n\nexport default Button;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/colors/colors.module.css\"; export default {\"primary700Color\":\"_primary700Color_18uh7_2\",\"destructive700Color\":\"_destructive700Color_18uh7_6\",\"gray900Color\":\"_gray900Color_18uh7_10\",\"whiteColor\":\"_whiteColor_18uh7_14\",\"primary100BackgroundColor\":\"_primary100BackgroundColor_18uh7_19\",\"destructive700Background\":\"_destructive700Background_18uh7_23\",\"destructive100BackgroundColor\":\"_destructive100BackgroundColor_18uh7_27\",\"success700BackgroundColor\":\"_success700BackgroundColor_18uh7_31\",\"whiteBackgroundColor\":\"_whiteBackgroundColor_18uh7_35\",\"yellow700BackgroundColor\":\"_yellow700BackgroundColor_18uh7_39\",\"primary700BackgroundColor\":\"_primary700BackgroundColor_18uh7_43\"}","import { Color } from \"../constants\";\nimport styles from \"./colors.module.css\";\n\nexport default function backgroundColor(color: (typeof Color)[number]): string {\n switch (color) {\n case \"secondary\":\n return styles.primary100BackgroundColor;\n case \"destructive-primary\":\n return styles.destructive700Background;\n case \"destructive-secondary\":\n return styles.destructive100BackgroundColor;\n case \"success\":\n return styles.success700BackgroundColor;\n case \"tertiary\":\n case \"destructive-tertiary\":\n return styles.whiteBackgroundColor;\n case \"branded\":\n return styles.yellow700BackgroundColor;\n default:\n return styles.primary700BackgroundColor;\n }\n}\n","import { Color } from \"../constants\";\nimport styles from \"./colors.module.css\";\n\nexport default function foregroundColor(color: (typeof Color)[number]): string {\n switch (color) {\n case \"secondary\":\n case \"tertiary\":\n return styles.primary700Color;\n case \"destructive-secondary\":\n case \"destructive-tertiary\":\n return styles.destructive700Color;\n case \"branded\":\n return styles.gray900Color;\n default:\n return styles.whiteColor;\n }\n}\n","import { Size } from \"../constants\";\nimport React from \"react\";\n\ninterface ButtonGroupContextType {\n size?: (typeof Size)[number];\n disabled?: boolean;\n fullWidth?: boolean;\n}\n\nconst ButtonGroupContext = React.createContext<ButtonGroupContextType | null>(\n {},\n);\n\nButtonGroupContext.displayName = \"ButtonGroupContext\";\n\nexport default ButtonGroupContext;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Button/Button.module.css\"; export default {\"button\":\"_button_6lbba_1\",\"buttonGap\":\"_buttonGap_6lbba_9\",\"fullWidth\":\"_fullWidth_6lbba_50\",\"sm\":\"_sm_6lbba_54\",\"md\":\"_md_6lbba_61\",\"lg\":\"_lg_6lbba_68\",\"icon\":\"_icon_6lbba_75\",\"smIcon\":\"_smIcon_6lbba_79\",\"mdIcon\":\"_mdIcon_6lbba_86\",\"lgIcon\":\"_lgIcon_6lbba_93\",\"textContainer\":\"_textContainer_6lbba_100\",\"loading\":\"_loading_6lbba_115\",\"syntaxButtonLoadingRotate\":\"_syntaxButtonLoadingRotate_6lbba_1\",\"loadingCircle\":\"_loadingCircle_6lbba_119\",\"buttonText\":\"_buttonText_6lbba_127\",\"buttonTextSmall\":\"_buttonTextSmall_6lbba_134\",\"buttonTextMedium\":\"_buttonTextMedium_6lbba_138\",\"buttonTextLarge\":\"_buttonTextLarge_6lbba_142\"}","import { useMemo, ReactElement, ReactNode } from \"react\";\nimport styles from \"./ButtonGroup.module.css\";\nimport { Size } from \"../constants\";\nimport ButtonGroupContext from \"./ButtonGroupContext\";\nimport classNames from \"classnames\";\n\nconst gap = {\n [\"sm\"]: styles.smallGap,\n [\"md\"]: styles.mediumGap,\n [\"lg\"]: styles.largeGap,\n} as const;\n\n/**\n * Group buttons to render them in a row or column with consistent spacing in between each button\n */\nconst ButtonGroup = ({\n disabled = false,\n fullWidth = false,\n orientation = \"horizontal\",\n size = \"md\",\n children,\n}: {\n /**\n * If `true`, all buttons will be disabled.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * If `true`, all buttons will be full width.\n *\n * @defaultValue false\n */\n fullWidth?: boolean;\n /**\n * The orientation of the button group\n *\n * @defaultValue \"horizontal\"\n */\n orientation?: \"horizontal\" | \"vertical\";\n /**\n * The size of the button group\n *\n * @defaultValue \"medium\"\n */\n size?: (typeof Size)[number];\n /**\n * Buttons to be rendered inside the button group\n */\n children?: ReactNode;\n}): ReactElement => {\n const context = useMemo(\n () => ({ disabled, fullWidth, size }),\n [disabled, fullWidth, size],\n );\n\n const classnames = classNames(styles.buttonGroup, gap[size], {\n [styles.horizontal]: orientation === \"horizontal\",\n [styles.vertical]: orientation === \"vertical\",\n });\n\n return (\n <ButtonGroupContext.Provider value={context}>\n <div className={classnames}>{children}</div>\n </ButtonGroupContext.Provider>\n );\n};\n\nexport default ButtonGroup;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/ButtonGroup/ButtonGroup.module.css\"; export default {\"buttonGroup\":\"_buttonGroup_184aa_1\",\"horizontal\":\"_horizontal_184aa_6\",\"vertical\":\"_vertical_184aa_10\",\"smallGap\":\"_smallGap_184aa_14\",\"mediumGap\":\"_mediumGap_184aa_18\",\"largeGap\":\"_largeGap_184aa_22\"}","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Card/Card.module.css\"; export default {\"card\":\"_card_hvz2b_1\"}","import styles from \"./Card.module.css\";\n\n/**\n * Card is a basic container component to apply consistent styling and render child components.\n */\nconst Card = ({\n children,\n}: {\n /**\n * The child components to render within Card.\n */\n children: JSX.Element;\n}): JSX.Element => <div className={styles.card}>{children}</div>;\n\nexport default Card;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Divider/Divider.module.css\"; export default {\"divider\":\"_divider_1ddgq_1\"}","import styles from \"./Divider.module.css\";\n\n/**\n * Divider is a thin horizontal line to group content in lists and layouts.\n */\nexport default function Divider({}: Record<string, never>) {\n return <hr className={styles.divider} />;\n}\n\nDivider.displayName = \"Divider\";\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/MiniActionCard/MiniActionCard.module.css\"; export default {\"miniActionCard\":\"_miniActionCard_qebkn_1\",\"card\":\"_card_qebkn_9\"}","import styles from \"./MiniActionCard.module.css\";\n\n/**\n * MiniActionCard is component that alerts users to a call to action.\n */\nconst MiniActionCard = ({\n children,\n}: {\n /**\n * The child components to render within MiniActionCard.\n */\n children: JSX.Element;\n}): JSX.Element => <div className={styles.miniActionCard}>{children}</div>;\n\nexport default MiniActionCard;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAOA,KAAC,WAAY;AACZ;AAEA,UAAI,SAAS,CAAC,EAAE;AAChB,UAAI,mBAAmB;AAEvB,eAASA,cAAa;AACrB,YAAI,UAAU,CAAC;AAEf,iBAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AAC1C,cAAI,MAAM,UAAU,CAAC;AACrB,cAAI,CAAC;AAAK;AAEV,cAAI,UAAU,OAAO;AAErB,cAAI,YAAY,YAAY,YAAY,UAAU;AACjD,oBAAQ,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