@common-origin/design-system 1.1.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/README.md +143 -0
- package/dist/components/atoms/Avatar/Avatar.d.ts +8 -0
- package/dist/components/atoms/Avatar/index.d.ts +1 -0
- package/dist/components/atoms/Box/Box.d.ts +52 -0
- package/dist/components/atoms/Box/index.d.ts +1 -0
- package/dist/components/atoms/Button/Button.d.ts +22 -0
- package/dist/components/atoms/Button/index.d.ts +1 -0
- package/dist/components/atoms/Chip/Chip.d.ts +19 -0
- package/dist/components/atoms/Chip/index.d.ts +1 -0
- package/dist/components/atoms/Container/Container.d.ts +6 -0
- package/dist/components/atoms/Container/index.d.ts +1 -0
- package/dist/components/atoms/CoverImage/CoverImage.d.ts +11 -0
- package/dist/components/atoms/CoverImage/index.d.ts +1 -0
- package/dist/components/atoms/Icon/Icon.d.ts +10 -0
- package/dist/components/atoms/Icon/index.d.ts +1 -0
- package/dist/components/atoms/IconButton/IconButton.d.ts +15 -0
- package/dist/components/atoms/IconButton/index.d.ts +1 -0
- package/dist/components/atoms/SectionSeparator/SectionSeparator.d.ts +26 -0
- package/dist/components/atoms/SectionSeparator/index.d.ts +1 -0
- package/dist/components/atoms/Stack/Stack.d.ts +16 -0
- package/dist/components/atoms/Stack/index.d.ts +1 -0
- package/dist/components/atoms/Typography/Typography.d.ts +34 -0
- package/dist/components/atoms/Typography/index.d.ts +1 -0
- package/dist/components/atoms/index.d.ts +11 -0
- package/dist/components/dateFormatter.d.ts +7 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/layout/GridSystem/GridSystem.d.ts +52 -0
- package/dist/components/layout/GridSystem/index.d.ts +1 -0
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/components/molecules/ArtCard/ArtCard.d.ts +10 -0
- package/dist/components/molecules/ArtCard/index.d.ts +1 -0
- package/dist/components/molecules/Breadcrumbs/Breadcrumbs.d.ts +11 -0
- package/dist/components/molecules/Breadcrumbs/index.d.ts +1 -0
- package/dist/components/molecules/ChipGroup/ChipGroup.d.ts +7 -0
- package/dist/components/molecules/ChipGroup/index.d.ts +1 -0
- package/dist/components/molecules/CodeBlock/CodeBlock.d.ts +17 -0
- package/dist/components/molecules/CodeBlock/index.d.ts +1 -0
- package/dist/components/molecules/DesignCard/DesignCard.d.ts +11 -0
- package/dist/components/molecules/DesignCard/index.d.ts +1 -0
- package/dist/components/molecules/Dropdown/Dropdown.d.ts +21 -0
- package/dist/components/molecules/Dropdown/index.d.ts +1 -0
- package/dist/components/molecules/PageTitle/PageTitle.d.ts +8 -0
- package/dist/components/molecules/PageTitle/index.d.ts +1 -0
- package/dist/components/molecules/ReleaseCard/ReleaseCard.d.ts +9 -0
- package/dist/components/molecules/ReleaseCard/index.d.ts +1 -0
- package/dist/components/molecules/index.d.ts +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +2027 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +2045 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/styleUtils.d.ts +19 -0
- package/package.json +101 -0
|
@@ -0,0 +1,2027 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import Link from 'next/link';
|
|
4
|
+
import Image from 'next/image';
|
|
5
|
+
import { parseISO, format } from 'date-fns';
|
|
6
|
+
|
|
7
|
+
function _extends() {
|
|
8
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
9
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
10
|
+
var t = arguments[e];
|
|
11
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
12
|
+
}
|
|
13
|
+
return n;
|
|
14
|
+
}, _extends.apply(null, arguments);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/******************************************************************************
|
|
18
|
+
Copyright (c) Microsoft Corporation.
|
|
19
|
+
|
|
20
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
21
|
+
purpose with or without fee is hereby granted.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
24
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
25
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
26
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
27
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
28
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
29
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
30
|
+
***************************************************************************** */
|
|
31
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
function __rest(s, e) {
|
|
35
|
+
var t = {};
|
|
36
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
37
|
+
t[p] = s[p];
|
|
38
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
39
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
40
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
41
|
+
t[p[i]] = s[p[i]];
|
|
42
|
+
}
|
|
43
|
+
return t;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function __makeTemplateObject(cooked, raw) {
|
|
47
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
48
|
+
return cooked;
|
|
49
|
+
}
|
|
50
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
51
|
+
var e = new Error(message);
|
|
52
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
var base$1 = {
|
|
56
|
+
border: {
|
|
57
|
+
radius: {
|
|
58
|
+
"1": "0.125rem",
|
|
59
|
+
"2": "0.25rem",
|
|
60
|
+
"3": "0.5rem",
|
|
61
|
+
"4": "0.75rem",
|
|
62
|
+
"5": "1rem",
|
|
63
|
+
"6": "1.5rem",
|
|
64
|
+
"7": "2rem",
|
|
65
|
+
circle: "10rem"
|
|
66
|
+
},
|
|
67
|
+
style: {
|
|
68
|
+
solid: "solid",
|
|
69
|
+
dashed: "dashed",
|
|
70
|
+
dotted: "dotted"
|
|
71
|
+
},
|
|
72
|
+
width: {
|
|
73
|
+
"0": "0",
|
|
74
|
+
"1": "0.0625rem",
|
|
75
|
+
"2": "0.125rem",
|
|
76
|
+
"3": "0.1875rem",
|
|
77
|
+
"4": "0.25rem",
|
|
78
|
+
"5": "0.3125rem",
|
|
79
|
+
"6": "0.375rem",
|
|
80
|
+
"8": "0.5rem"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
shadow: {
|
|
84
|
+
"1": "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
85
|
+
"2": "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
86
|
+
"3": "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
87
|
+
"4": "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
88
|
+
"5": "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
|
|
89
|
+
"6": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
|
|
90
|
+
none: "none"
|
|
91
|
+
},
|
|
92
|
+
zIndex: {
|
|
93
|
+
"0": "0",
|
|
94
|
+
"1": "10",
|
|
95
|
+
"2": "20",
|
|
96
|
+
"3": "30",
|
|
97
|
+
"4": "40",
|
|
98
|
+
"5": "50",
|
|
99
|
+
"6": "1000",
|
|
100
|
+
"7": "1010",
|
|
101
|
+
"8": "1020"
|
|
102
|
+
},
|
|
103
|
+
opacity: {
|
|
104
|
+
"0": "0",
|
|
105
|
+
"5": "0.05",
|
|
106
|
+
"10": "0.1",
|
|
107
|
+
"20": "0.2",
|
|
108
|
+
"25": "0.25",
|
|
109
|
+
"30": "0.3",
|
|
110
|
+
"40": "0.4",
|
|
111
|
+
"50": "0.5",
|
|
112
|
+
"60": "0.6",
|
|
113
|
+
"70": "0.7",
|
|
114
|
+
"75": "0.75",
|
|
115
|
+
"80": "0.8",
|
|
116
|
+
"90": "0.9",
|
|
117
|
+
"95": "0.95",
|
|
118
|
+
"100": "1"
|
|
119
|
+
},
|
|
120
|
+
size: {
|
|
121
|
+
"0": "0",
|
|
122
|
+
"1": "0.25rem",
|
|
123
|
+
"2": "0.5rem",
|
|
124
|
+
"3": "0.75rem",
|
|
125
|
+
"4": "1rem",
|
|
126
|
+
"5": "1.25rem",
|
|
127
|
+
"6": "1.5rem",
|
|
128
|
+
"7": "1.75rem",
|
|
129
|
+
"8": "2rem",
|
|
130
|
+
"9": "2.25rem",
|
|
131
|
+
"10": "2.5rem",
|
|
132
|
+
"12": "3rem",
|
|
133
|
+
"14": "3.5rem",
|
|
134
|
+
"16": "4rem",
|
|
135
|
+
"20": "5rem",
|
|
136
|
+
"24": "6rem",
|
|
137
|
+
"28": "7rem",
|
|
138
|
+
"32": "8rem",
|
|
139
|
+
"40": "10rem",
|
|
140
|
+
"48": "12rem",
|
|
141
|
+
"56": "14rem",
|
|
142
|
+
"64": "16rem",
|
|
143
|
+
auto: "auto",
|
|
144
|
+
full: "100%",
|
|
145
|
+
screen: "100vh",
|
|
146
|
+
min: "min-content",
|
|
147
|
+
max: "max-content",
|
|
148
|
+
fit: "fit-content"
|
|
149
|
+
},
|
|
150
|
+
color: {
|
|
151
|
+
neutral: {
|
|
152
|
+
"100": "#f8f9fa",
|
|
153
|
+
"200": "#e9ecef",
|
|
154
|
+
"300": "#dee2e6",
|
|
155
|
+
"400": "#ced4da",
|
|
156
|
+
"500": "#adb5bd",
|
|
157
|
+
"600": "#6c757d",
|
|
158
|
+
"700": "#495057",
|
|
159
|
+
"800": "#343a40",
|
|
160
|
+
"900": "#212529",
|
|
161
|
+
"1000": "#16191C",
|
|
162
|
+
"000": "#ffffff"
|
|
163
|
+
},
|
|
164
|
+
green: {
|
|
165
|
+
"100": "#CEF8E0",
|
|
166
|
+
"200": "#ADF4CE",
|
|
167
|
+
"300": "#89ECBC",
|
|
168
|
+
"400": "#67DEA8",
|
|
169
|
+
"500": "#49CC93",
|
|
170
|
+
"600": "#2FB880",
|
|
171
|
+
"700": "#15A46E",
|
|
172
|
+
"800": "#008F5D",
|
|
173
|
+
"900": "#007A4D",
|
|
174
|
+
"1000": "#00653E",
|
|
175
|
+
"1100": "#005132",
|
|
176
|
+
"1200": "#053F27",
|
|
177
|
+
"1300": "#0A2E1D"
|
|
178
|
+
},
|
|
179
|
+
orange: {
|
|
180
|
+
"100": "#FFECCC",
|
|
181
|
+
"200": "#FFDFAD",
|
|
182
|
+
"300": "#FDD291",
|
|
183
|
+
"400": "#FFBB63",
|
|
184
|
+
"500": "#FFA037",
|
|
185
|
+
"600": "#F68511",
|
|
186
|
+
"700": "#E46F00",
|
|
187
|
+
"800": "#CB5D00",
|
|
188
|
+
"900": "#B14C00",
|
|
189
|
+
"1000": "#953D00",
|
|
190
|
+
"1100": "#7A2F00",
|
|
191
|
+
"1200": "#612300",
|
|
192
|
+
"1300": "#491901"
|
|
193
|
+
},
|
|
194
|
+
red: {
|
|
195
|
+
"100": "#FFEBE7",
|
|
196
|
+
"200": "#FFDDD6",
|
|
197
|
+
"300": "#FFCDC3",
|
|
198
|
+
"400": "#FFB7A9",
|
|
199
|
+
"500": "#FF9B88",
|
|
200
|
+
"600": "#FF7C65",
|
|
201
|
+
"700": "#F75C46",
|
|
202
|
+
"800": "#EA3829",
|
|
203
|
+
"900": "#D31510",
|
|
204
|
+
"1000": "#B40000",
|
|
205
|
+
"1100": "#930000",
|
|
206
|
+
"1200": "#740000",
|
|
207
|
+
"1300": "#590000"
|
|
208
|
+
},
|
|
209
|
+
blue: {
|
|
210
|
+
"100": "#E0F2FF",
|
|
211
|
+
"200": "#CAE8FF",
|
|
212
|
+
"300": "#B5DEFF",
|
|
213
|
+
"400": "#96CEFD",
|
|
214
|
+
"500": "#78BBFA",
|
|
215
|
+
"600": "#59A7F6",
|
|
216
|
+
"700": "#3892F3",
|
|
217
|
+
"800": "#147AF3",
|
|
218
|
+
"900": "#0265DC",
|
|
219
|
+
"1000": "#0054B6",
|
|
220
|
+
"1100": "#004491",
|
|
221
|
+
"1200": "#003571",
|
|
222
|
+
"1300": "#002754"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
spacing: {
|
|
226
|
+
"0": "0",
|
|
227
|
+
"1": "0.25rem",
|
|
228
|
+
"2": "0.5rem",
|
|
229
|
+
"3": "0.75rem",
|
|
230
|
+
"4": "1rem",
|
|
231
|
+
"5": "1.25rem",
|
|
232
|
+
"6": "1.5rem",
|
|
233
|
+
"7": "1.75rem",
|
|
234
|
+
"8": "2rem",
|
|
235
|
+
"9": "2.25rem",
|
|
236
|
+
"10": "2.5rem",
|
|
237
|
+
"12": "3rem",
|
|
238
|
+
"14": "3.5rem",
|
|
239
|
+
"16": "4rem",
|
|
240
|
+
"20": "5rem",
|
|
241
|
+
"24": "6rem",
|
|
242
|
+
"28": "7rem",
|
|
243
|
+
"32": "8rem",
|
|
244
|
+
"40": "10rem",
|
|
245
|
+
"48": "12rem",
|
|
246
|
+
"56": "14rem",
|
|
247
|
+
"64": "16rem",
|
|
248
|
+
auto: "auto"
|
|
249
|
+
},
|
|
250
|
+
fontFamily: {
|
|
251
|
+
heading: "'Inter', sans-serif",
|
|
252
|
+
body: "'Inter', sans-serif",
|
|
253
|
+
monospace: "Menlo, Monaco, Consolas, Courier New, monospace"
|
|
254
|
+
},
|
|
255
|
+
fontSize: {
|
|
256
|
+
"1": "0.75rem",
|
|
257
|
+
"2": "0.875rem",
|
|
258
|
+
"3": "1rem",
|
|
259
|
+
"4": "1.125rem",
|
|
260
|
+
"5": "1.25rem",
|
|
261
|
+
"6": "1.5rem",
|
|
262
|
+
"7": "1.75rem",
|
|
263
|
+
"8": "2rem",
|
|
264
|
+
"9": "3rem",
|
|
265
|
+
"10": "5rem"
|
|
266
|
+
},
|
|
267
|
+
fontWeight: {
|
|
268
|
+
"1": "300",
|
|
269
|
+
"2": "400",
|
|
270
|
+
"3": "500",
|
|
271
|
+
"4": "600",
|
|
272
|
+
"5": "700"
|
|
273
|
+
},
|
|
274
|
+
lineHeight: {
|
|
275
|
+
"1": "1rem",
|
|
276
|
+
"2": "1.125rem",
|
|
277
|
+
"3": "1.25rem",
|
|
278
|
+
"4": "1.5rem",
|
|
279
|
+
"5": "1.75rem",
|
|
280
|
+
"6": "2rem",
|
|
281
|
+
"7": "2.25rem",
|
|
282
|
+
"8": "2.5rem",
|
|
283
|
+
"9": "3rem",
|
|
284
|
+
"10": "4.5rem",
|
|
285
|
+
"11": "5rem"
|
|
286
|
+
},
|
|
287
|
+
letterSpacing: {
|
|
288
|
+
"0": "-0.125rem",
|
|
289
|
+
"1": "-0.0625rem",
|
|
290
|
+
"2": "0rem",
|
|
291
|
+
"3": "0.0625rem",
|
|
292
|
+
"4": "0.125rem"
|
|
293
|
+
},
|
|
294
|
+
breakpoint: {
|
|
295
|
+
xs: "0px",
|
|
296
|
+
sm: "640px",
|
|
297
|
+
md: "768px",
|
|
298
|
+
lg: "1024px",
|
|
299
|
+
xl: "1280px",
|
|
300
|
+
"2xl": "1536px"
|
|
301
|
+
},
|
|
302
|
+
duration: {
|
|
303
|
+
instant: "0ms",
|
|
304
|
+
fast: "150ms",
|
|
305
|
+
normal: "200ms",
|
|
306
|
+
moderate: "300ms",
|
|
307
|
+
slow: "500ms",
|
|
308
|
+
slower: "750ms",
|
|
309
|
+
slowest: "1000ms"
|
|
310
|
+
},
|
|
311
|
+
easing: {
|
|
312
|
+
linear: "linear",
|
|
313
|
+
ease: "ease",
|
|
314
|
+
easeIn: "ease-in",
|
|
315
|
+
easeOut: "ease-out",
|
|
316
|
+
easeInOut: "ease-in-out",
|
|
317
|
+
easeInQuart: "cubic-bezier(0.5, 0, 0.75, 0)",
|
|
318
|
+
easeOutQuart: "cubic-bezier(0.25, 1, 0.5, 1)",
|
|
319
|
+
easeInOutQuart: "cubic-bezier(0.76, 0, 0.24, 1)",
|
|
320
|
+
easeInBack: "cubic-bezier(0.36, 0, 0.66, -0.56)",
|
|
321
|
+
easeOutBack: "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
322
|
+
easeInOutBack: "cubic-bezier(0.68, -0.6, 0.32, 1.6)"
|
|
323
|
+
},
|
|
324
|
+
$ref: "./base/index.json"
|
|
325
|
+
};
|
|
326
|
+
var component = {
|
|
327
|
+
button: {
|
|
328
|
+
primary: {
|
|
329
|
+
backgroundColor: "#212529",
|
|
330
|
+
textColor: "#ffffff",
|
|
331
|
+
borderRadius: "0.25rem",
|
|
332
|
+
padding: "0.75rem 1rem",
|
|
333
|
+
font: "500 1rem/1.5rem 'Inter', sans-serif"
|
|
334
|
+
},
|
|
335
|
+
hover: {
|
|
336
|
+
backgroundColor: "#343a40"
|
|
337
|
+
},
|
|
338
|
+
active: {
|
|
339
|
+
backgroundColor: "#16191C"
|
|
340
|
+
},
|
|
341
|
+
focus: {
|
|
342
|
+
outline: "0.125rem solid #343a40",
|
|
343
|
+
outlineOffset: "2px"
|
|
344
|
+
},
|
|
345
|
+
disabled: {
|
|
346
|
+
backgroundColor: "#dee2e6",
|
|
347
|
+
textColor: "#adb5bd"
|
|
348
|
+
},
|
|
349
|
+
variants: {
|
|
350
|
+
secondary: {
|
|
351
|
+
backgroundColor: "#e9ecef",
|
|
352
|
+
textColor: "#212529",
|
|
353
|
+
hover: {
|
|
354
|
+
backgroundColor: "#dee2e6"
|
|
355
|
+
},
|
|
356
|
+
active: {
|
|
357
|
+
backgroundColor: "#f8f9fa"
|
|
358
|
+
},
|
|
359
|
+
disabled: {
|
|
360
|
+
backgroundColor: "#dee2e6",
|
|
361
|
+
textColor: "#adb5bd"
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
naked: {
|
|
365
|
+
backgroundColor: "transparent",
|
|
366
|
+
textColor: "#212529",
|
|
367
|
+
hover: {
|
|
368
|
+
backgroundColor: "#e9ecef"
|
|
369
|
+
},
|
|
370
|
+
active: {
|
|
371
|
+
backgroundColor: "#dee2e6"
|
|
372
|
+
},
|
|
373
|
+
disabled: {
|
|
374
|
+
backgroundColor: "transparent",
|
|
375
|
+
textColor: "#adb5bd"
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
sizes: {
|
|
380
|
+
small: {
|
|
381
|
+
padding: "0.5rem 0.75rem",
|
|
382
|
+
font: "500 0.75rem/1rem 'Inter', sans-serif"
|
|
383
|
+
},
|
|
384
|
+
medium: {
|
|
385
|
+
padding: "0.5rem 1rem",
|
|
386
|
+
font: "500 0.875rem/1.5rem 'Inter', sans-serif"
|
|
387
|
+
},
|
|
388
|
+
large: {
|
|
389
|
+
padding: "0.75rem 1rem",
|
|
390
|
+
font: "500 1rem/1.5rem 'Inter', sans-serif"
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
chip: {
|
|
395
|
+
"default": {
|
|
396
|
+
backgroundColor: "#e9ecef",
|
|
397
|
+
textColor: "#212529",
|
|
398
|
+
borderRadius: "0.25rem",
|
|
399
|
+
padding: "0.25rem 0.5rem",
|
|
400
|
+
font: "400 0.75rem/1rem 'Inter', sans-serif"
|
|
401
|
+
},
|
|
402
|
+
variants: {
|
|
403
|
+
emphasis: {
|
|
404
|
+
backgroundColor: "#212529",
|
|
405
|
+
textColor: "#ffffff"
|
|
406
|
+
},
|
|
407
|
+
subtle: {
|
|
408
|
+
backgroundColor: "#ffffff",
|
|
409
|
+
textColor: "#212529"
|
|
410
|
+
},
|
|
411
|
+
interactive: {
|
|
412
|
+
backgroundColor: "#0265DC",
|
|
413
|
+
textColor: "#ffffff"
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
sizes: {
|
|
417
|
+
small: {
|
|
418
|
+
padding: "0 0.25rem",
|
|
419
|
+
font: "400 0.75rem/1rem 'Inter', sans-serif"
|
|
420
|
+
},
|
|
421
|
+
medium: {
|
|
422
|
+
padding: "0.25rem 0.5rem",
|
|
423
|
+
font: "400 0.75rem/1rem 'Inter', sans-serif"
|
|
424
|
+
},
|
|
425
|
+
large: {
|
|
426
|
+
padding: "0.5rem 0.75rem",
|
|
427
|
+
font: "400 0.875rem/1.25rem 'Inter', sans-serif"
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
iconButton: {
|
|
432
|
+
primary: {
|
|
433
|
+
backgroundColor: "#212529",
|
|
434
|
+
borderRadius: "0.25rem",
|
|
435
|
+
minWidth: "40px",
|
|
436
|
+
minHeight: "40px",
|
|
437
|
+
display: "flex",
|
|
438
|
+
alignItems: "center",
|
|
439
|
+
justifyContent: "center"
|
|
440
|
+
},
|
|
441
|
+
hover: {
|
|
442
|
+
backgroundColor: "#343a40"
|
|
443
|
+
},
|
|
444
|
+
active: {
|
|
445
|
+
backgroundColor: "#16191C"
|
|
446
|
+
},
|
|
447
|
+
focus: {
|
|
448
|
+
outline: "0.125rem solid #343a40",
|
|
449
|
+
outlineOffset: "2px"
|
|
450
|
+
},
|
|
451
|
+
disabled: {
|
|
452
|
+
backgroundColor: "#dee2e6"
|
|
453
|
+
},
|
|
454
|
+
variants: {
|
|
455
|
+
secondary: {
|
|
456
|
+
backgroundColor: "#e9ecef",
|
|
457
|
+
hover: {
|
|
458
|
+
backgroundColor: "#dee2e6"
|
|
459
|
+
},
|
|
460
|
+
active: {
|
|
461
|
+
backgroundColor: "#f8f9fa"
|
|
462
|
+
},
|
|
463
|
+
disabled: {
|
|
464
|
+
backgroundColor: "#dee2e6"
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
naked: {
|
|
468
|
+
backgroundColor: "transparent",
|
|
469
|
+
hover: {
|
|
470
|
+
backgroundColor: "#e9ecef"
|
|
471
|
+
},
|
|
472
|
+
active: {
|
|
473
|
+
backgroundColor: "#dee2e6"
|
|
474
|
+
},
|
|
475
|
+
disabled: {
|
|
476
|
+
backgroundColor: "transparent"
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
sizes: {
|
|
481
|
+
small: {
|
|
482
|
+
minWidth: "32px",
|
|
483
|
+
minHeight: "32px",
|
|
484
|
+
padding: "0.25rem"
|
|
485
|
+
},
|
|
486
|
+
medium: {
|
|
487
|
+
minWidth: "40px",
|
|
488
|
+
minHeight: "40px",
|
|
489
|
+
padding: "0.5rem"
|
|
490
|
+
},
|
|
491
|
+
large: {
|
|
492
|
+
minWidth: "48px",
|
|
493
|
+
minHeight: "48px",
|
|
494
|
+
padding: "0.75rem"
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
separator: {
|
|
499
|
+
border: "0.0625rem solid #dee2e6",
|
|
500
|
+
margin: "2rem 0",
|
|
501
|
+
variants: {
|
|
502
|
+
"default": {
|
|
503
|
+
border: "0.0625rem solid #dee2e6",
|
|
504
|
+
margin: "2rem 0"
|
|
505
|
+
},
|
|
506
|
+
strong: {
|
|
507
|
+
border: "0.0625rem solid #343a40",
|
|
508
|
+
margin: "2rem 0"
|
|
509
|
+
},
|
|
510
|
+
minimal: {
|
|
511
|
+
border: "0.0625rem solid #dee2e6",
|
|
512
|
+
margin: "1.5rem 0"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
sizes: {
|
|
516
|
+
small: {
|
|
517
|
+
margin: "1rem 0"
|
|
518
|
+
},
|
|
519
|
+
medium: {
|
|
520
|
+
margin: "1.5rem 0"
|
|
521
|
+
},
|
|
522
|
+
large: {
|
|
523
|
+
margin: "2rem 0"
|
|
524
|
+
},
|
|
525
|
+
xlarge: {
|
|
526
|
+
margin: "3rem 0"
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
$ref: "./component/index.json"
|
|
531
|
+
};
|
|
532
|
+
var semantic$1 = {
|
|
533
|
+
border: {
|
|
534
|
+
"default": "0.0625rem solid #e9ecef",
|
|
535
|
+
subtle: "0.0625rem solid #dee2e6",
|
|
536
|
+
strong: "0.0625rem solid #343a40",
|
|
537
|
+
focus: "0.125rem solid #343a40",
|
|
538
|
+
tooltip: "0.125rem dotted #dee2e6"
|
|
539
|
+
},
|
|
540
|
+
size: {
|
|
541
|
+
icon: {
|
|
542
|
+
xs: "0.75rem",
|
|
543
|
+
sm: "1rem",
|
|
544
|
+
md: "1.25rem",
|
|
545
|
+
lg: "1.5rem",
|
|
546
|
+
xl: "2rem",
|
|
547
|
+
"2xl": "2.5rem"
|
|
548
|
+
},
|
|
549
|
+
avatar: {
|
|
550
|
+
xs: "1.5rem",
|
|
551
|
+
sm: "2rem",
|
|
552
|
+
md: "2.5rem",
|
|
553
|
+
lg: "3rem",
|
|
554
|
+
xl: "4rem"
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
spacing: {
|
|
558
|
+
separator: {
|
|
559
|
+
sm: "1rem",
|
|
560
|
+
md: "1.5rem",
|
|
561
|
+
lg: "2rem",
|
|
562
|
+
xl: "3rem"
|
|
563
|
+
},
|
|
564
|
+
layout: {
|
|
565
|
+
none: "0",
|
|
566
|
+
xs: "0.25rem",
|
|
567
|
+
sm: "0.5rem",
|
|
568
|
+
md: "0.75rem",
|
|
569
|
+
lg: "1rem",
|
|
570
|
+
xl: "1.25rem",
|
|
571
|
+
"2xl": "1.5rem",
|
|
572
|
+
"3xl": "1.75rem",
|
|
573
|
+
"4xl": "2rem",
|
|
574
|
+
"5xl": "2.25rem",
|
|
575
|
+
"6xl": "2.5rem",
|
|
576
|
+
"7xl": "3rem",
|
|
577
|
+
"8xl": "3.5rem",
|
|
578
|
+
"9xl": "4rem",
|
|
579
|
+
"10xl": "5rem",
|
|
580
|
+
auto: "auto"
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
color: {
|
|
584
|
+
text: {
|
|
585
|
+
"default": "#212529",
|
|
586
|
+
emphasis: "#343a40",
|
|
587
|
+
subdued: "#495057",
|
|
588
|
+
inverse: "#ffffff",
|
|
589
|
+
disabled: "#adb5bd",
|
|
590
|
+
interactive: "#0265DC",
|
|
591
|
+
error: "#D31510",
|
|
592
|
+
success: "#007A4D",
|
|
593
|
+
warning: "#B14C00"
|
|
594
|
+
},
|
|
595
|
+
background: {
|
|
596
|
+
"default": "#f8f9fa",
|
|
597
|
+
subtle: "#ffffff",
|
|
598
|
+
emphasis: "#212529",
|
|
599
|
+
surface: "#e9ecef",
|
|
600
|
+
inverse: "#343a40",
|
|
601
|
+
interactive: "#0265DC",
|
|
602
|
+
"interactive-subtle": "#E0F2FF",
|
|
603
|
+
"interactive-hover": "#0054B6",
|
|
604
|
+
"interactive-active": "#004491",
|
|
605
|
+
error: "#D31510",
|
|
606
|
+
"error-subtle": "#FFEBE7",
|
|
607
|
+
success: "#007A4D",
|
|
608
|
+
"success-subtle": "#CEF8E0",
|
|
609
|
+
warning: "#B14C00",
|
|
610
|
+
"warning-subtle": "#FFECCC",
|
|
611
|
+
disabled: "#dee2e6"
|
|
612
|
+
},
|
|
613
|
+
border: {
|
|
614
|
+
"default": "#e9ecef",
|
|
615
|
+
subtle: "#dee2e6",
|
|
616
|
+
strong: "#343a40",
|
|
617
|
+
interactive: "#0265DC",
|
|
618
|
+
error: "#D31510",
|
|
619
|
+
success: "#007A4D",
|
|
620
|
+
warning: "#B14C00"
|
|
621
|
+
},
|
|
622
|
+
icon: {
|
|
623
|
+
"default": "#212529",
|
|
624
|
+
emphasis: "#343a40",
|
|
625
|
+
subdued: "#6c757d",
|
|
626
|
+
disabled: "#adb5bd",
|
|
627
|
+
inverse: "#ffffff",
|
|
628
|
+
interactive: "#0265DC",
|
|
629
|
+
"interactive-hover": "#0054B6",
|
|
630
|
+
"interactive-active": "#004491",
|
|
631
|
+
error: "#D31510",
|
|
632
|
+
success: "#007A4D",
|
|
633
|
+
warning: "#B14C00"
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
typography: {
|
|
637
|
+
display: "700 5rem/4.5rem 'Inter', sans-serif",
|
|
638
|
+
h1: "700 3rem/3rem 'Inter', sans-serif",
|
|
639
|
+
h2: "700 2rem/2.5rem 'Inter', sans-serif",
|
|
640
|
+
h3: "700 1.75rem/2.25rem 'Inter', sans-serif",
|
|
641
|
+
h4: "500 1.5rem/2rem 'Inter', sans-serif",
|
|
642
|
+
h5: "500 1.25rem/1.75rem 'Inter', sans-serif",
|
|
643
|
+
h6: "500 1.125rem/1.5rem 'Inter', sans-serif",
|
|
644
|
+
subtitle: "500 1rem/1.5rem 'Inter', sans-serif",
|
|
645
|
+
body: "400 1rem/1.5rem 'Inter', sans-serif",
|
|
646
|
+
small: "400 0.875rem/1.25rem 'Inter', sans-serif",
|
|
647
|
+
overline: "700 0.75rem/1rem 'Inter', sans-serif",
|
|
648
|
+
caption: "400 0.75rem/1rem 'Inter', sans-serif",
|
|
649
|
+
button1: "500 1rem/1.5rem 'Inter', sans-serif",
|
|
650
|
+
button2: "500 0.875rem/1.5rem 'Inter', sans-serif",
|
|
651
|
+
button3: "500 0.75rem/1rem 'Inter', sans-serif",
|
|
652
|
+
label: "400 0.75rem/1rem 'Inter', sans-serif",
|
|
653
|
+
breadcrumb: "400 0.75rem/1.125rem 'Inter', sans-serif"
|
|
654
|
+
},
|
|
655
|
+
motion: {
|
|
656
|
+
transition: {
|
|
657
|
+
fast: "all 150ms ease-out",
|
|
658
|
+
normal: "all 200ms ease-in-out",
|
|
659
|
+
slow: "all 300ms ease-in-out"
|
|
660
|
+
},
|
|
661
|
+
hover: "background-color 150ms ease-out, color 150ms ease-out",
|
|
662
|
+
focus: "outline 150ms ease-out, outline-offset 150ms ease-out",
|
|
663
|
+
interactive: "transform 150ms ease-out, opacity 150ms ease-out"
|
|
664
|
+
},
|
|
665
|
+
$ref: "./semantic/index.json"
|
|
666
|
+
};
|
|
667
|
+
var tokens = {
|
|
668
|
+
base: base$1,
|
|
669
|
+
component: component,
|
|
670
|
+
semantic: semantic$1
|
|
671
|
+
};
|
|
672
|
+
|
|
673
|
+
var AvatarContainer = styled.div.withConfig({
|
|
674
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
675
|
+
return !['$size'].includes(prop);
|
|
676
|
+
}
|
|
677
|
+
})(templateObject_1$c || (templateObject_1$c = __makeTemplateObject(["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n background-color: ", ";\n overflow: hidden;\n flex-shrink: 0;\n"], ["\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n background-color: ", ";\n overflow: hidden;\n flex-shrink: 0;\n"])), function (_a) {
|
|
678
|
+
var $size = _a.$size;
|
|
679
|
+
return tokens.semantic.size.avatar[$size];
|
|
680
|
+
}, function (_a) {
|
|
681
|
+
var $size = _a.$size;
|
|
682
|
+
return tokens.semantic.size.avatar[$size];
|
|
683
|
+
}, tokens.base.border.radius.circle, tokens.semantic.color.background.subtle);
|
|
684
|
+
var AvatarImage = styled.img.withConfig({
|
|
685
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
686
|
+
return !['$size'].includes(prop);
|
|
687
|
+
}
|
|
688
|
+
})(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: ", ";\n /* Remove the img role since the container already has role=\"img\" */\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: ", ";\n /* Remove the img role since the container already has role=\"img\" */\n"])), tokens.base.border.radius.circle);
|
|
689
|
+
var AvatarInitials = styled.span.withConfig({
|
|
690
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
691
|
+
return !['$size'].includes(prop);
|
|
692
|
+
}
|
|
693
|
+
})(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n color: ", ";\n line-height: 1;\n text-transform: uppercase;\n user-select: none;\n"], ["\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n color: ", ";\n line-height: 1;\n text-transform: uppercase;\n user-select: none;\n"
|
|
694
|
+
// Helper function to get initials from name
|
|
695
|
+
])), tokens.base.fontFamily.body, tokens.base.fontWeight[3], function (_a) {
|
|
696
|
+
var $size = _a.$size;
|
|
697
|
+
var sizeMap = {
|
|
698
|
+
xs: tokens.base.fontSize[1],
|
|
699
|
+
sm: tokens.base.fontSize[2],
|
|
700
|
+
md: tokens.base.fontSize[3],
|
|
701
|
+
lg: tokens.base.fontSize[4],
|
|
702
|
+
xl: tokens.base.fontSize[5]
|
|
703
|
+
};
|
|
704
|
+
return sizeMap[$size];
|
|
705
|
+
}, tokens.semantic.color.text["default"]);
|
|
706
|
+
// Helper function to get initials from name
|
|
707
|
+
var getInitials = function getInitials(name) {
|
|
708
|
+
return name.split(' ').map(function (word) {
|
|
709
|
+
return word.charAt(0);
|
|
710
|
+
}).join('').slice(0, 2).toUpperCase();
|
|
711
|
+
};
|
|
712
|
+
var Avatar = function Avatar(_a) {
|
|
713
|
+
var name = _a.name,
|
|
714
|
+
picture = _a.picture,
|
|
715
|
+
_b = _a.size,
|
|
716
|
+
size = _b === void 0 ? 'md' : _b,
|
|
717
|
+
dataTestId = _a["data-testid"],
|
|
718
|
+
props = __rest(_a, ["name", "picture", "size", 'data-testid']);
|
|
719
|
+
// Remove styled-only props from the rest
|
|
720
|
+
var _c = props;
|
|
721
|
+
_c.$size;
|
|
722
|
+
var htmlProps = __rest(_c, ["$size"]);
|
|
723
|
+
var _d = useState(false),
|
|
724
|
+
imageError = _d[0],
|
|
725
|
+
setImageError = _d[1];
|
|
726
|
+
var _e = useState(false),
|
|
727
|
+
imageLoaded = _e[0],
|
|
728
|
+
setImageLoaded = _e[1];
|
|
729
|
+
var handleImageError = function handleImageError() {
|
|
730
|
+
setImageError(true);
|
|
731
|
+
};
|
|
732
|
+
var handleImageLoad = function handleImageLoad() {
|
|
733
|
+
setImageLoaded(true);
|
|
734
|
+
};
|
|
735
|
+
var showImage = picture && !imageError;
|
|
736
|
+
var initials = getInitials(name);
|
|
737
|
+
return /*#__PURE__*/React.createElement(AvatarContainer, _extends({
|
|
738
|
+
$size: size,
|
|
739
|
+
"data-testid": dataTestId,
|
|
740
|
+
"data-size": size,
|
|
741
|
+
role: "img",
|
|
742
|
+
"aria-label": "Avatar for ".concat(name)
|
|
743
|
+
}, htmlProps), showImage ? /*#__PURE__*/React.createElement(AvatarImage, {
|
|
744
|
+
$size: size,
|
|
745
|
+
src: picture,
|
|
746
|
+
alt: "Avatar of ".concat(name),
|
|
747
|
+
onError: handleImageError,
|
|
748
|
+
onLoad: handleImageLoad,
|
|
749
|
+
"data-state": imageLoaded ? 'loaded' : 'loading'
|
|
750
|
+
}) : /*#__PURE__*/React.createElement(AvatarInitials, {
|
|
751
|
+
$size: size,
|
|
752
|
+
"data-initials": initials,
|
|
753
|
+
"aria-hidden": "true"
|
|
754
|
+
}, initials));
|
|
755
|
+
};
|
|
756
|
+
var templateObject_1$c, templateObject_2$4, templateObject_3$3;
|
|
757
|
+
|
|
758
|
+
var StyledBox = styled.div.withConfig({
|
|
759
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
760
|
+
return !prop.startsWith('$');
|
|
761
|
+
}
|
|
762
|
+
})(templateObject_43 || (templateObject_43 = __makeTemplateObject(["\n ", "\n \n // Flexbox\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Margin\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Padding\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Size\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Position\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Borders\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Background & Color\n ", "\n ", "\n \n // Overflow\n ", "\n ", "\n ", "\n"], ["\n ", "\n \n // Flexbox\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Margin\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Padding\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Size\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Position\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Borders\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n \n // Background & Color\n ", "\n ", "\n \n // Overflow\n ", "\n ", "\n ", "\n"
|
|
763
|
+
// Transform component that maps clean props to $-prefixed props for styled-components
|
|
764
|
+
])), function (props) {
|
|
765
|
+
return props.$display && css(templateObject_1$b || (templateObject_1$b = __makeTemplateObject(["display: ", ";"], ["display: ", ";"])), props.$display);
|
|
766
|
+
}, function (props) {
|
|
767
|
+
return props.$flexDirection && css(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["flex-direction: ", ";"], ["flex-direction: ", ";"])), props.$flexDirection);
|
|
768
|
+
}, function (props) {
|
|
769
|
+
return props.$justifyContent && css(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["justify-content: ", ";"], ["justify-content: ", ";"])), props.$justifyContent);
|
|
770
|
+
}, function (props) {
|
|
771
|
+
return props.$alignItems && css(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["align-items: ", ";"], ["align-items: ", ";"])), props.$alignItems);
|
|
772
|
+
}, function (props) {
|
|
773
|
+
return props.$flexWrap && css(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["flex-wrap: ", ";"], ["flex-wrap: ", ";"])), props.$flexWrap);
|
|
774
|
+
}, function (props) {
|
|
775
|
+
return props.$gap && css(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["gap: ", ";"], ["gap: ", ";"])), tokens.semantic.spacing.layout[props.$gap]);
|
|
776
|
+
}, function (props) {
|
|
777
|
+
return props.$m && css(templateObject_7$1 || (templateObject_7$1 = __makeTemplateObject(["margin: ", ";"], ["margin: ", ";"])), tokens.semantic.spacing.layout[props.$m]);
|
|
778
|
+
}, function (props) {
|
|
779
|
+
return props.$mt && css(templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject(["margin-top: ", ";"], ["margin-top: ", ";"])), tokens.semantic.spacing.layout[props.$mt]);
|
|
780
|
+
}, function (props) {
|
|
781
|
+
return props.$mr && css(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject(["margin-right: ", ";"], ["margin-right: ", ";"])), tokens.semantic.spacing.layout[props.$mr]);
|
|
782
|
+
}, function (props) {
|
|
783
|
+
return props.$mb && css(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject(["margin-bottom: ", ";"], ["margin-bottom: ", ";"])), tokens.semantic.spacing.layout[props.$mb]);
|
|
784
|
+
}, function (props) {
|
|
785
|
+
return props.$ml && css(templateObject_11$1 || (templateObject_11$1 = __makeTemplateObject(["margin-left: ", ";"], ["margin-left: ", ";"])), tokens.semantic.spacing.layout[props.$ml]);
|
|
786
|
+
}, function (props) {
|
|
787
|
+
return props.$mx && css(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject(["\n margin-left: ", ";\n margin-right: ", ";\n "], ["\n margin-left: ", ";\n margin-right: ", ";\n "])), tokens.semantic.spacing.layout[props.$mx], tokens.semantic.spacing.layout[props.$mx]);
|
|
788
|
+
}, function (props) {
|
|
789
|
+
return props.$my && css(templateObject_13$1 || (templateObject_13$1 = __makeTemplateObject(["\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n margin-top: ", ";\n margin-bottom: ", ";\n "])), tokens.semantic.spacing.layout[props.$my], tokens.semantic.spacing.layout[props.$my]);
|
|
790
|
+
}, function (props) {
|
|
791
|
+
return props.$p && css(templateObject_14$1 || (templateObject_14$1 = __makeTemplateObject(["padding: ", ";"], ["padding: ", ";"])), tokens.semantic.spacing.layout[props.$p]);
|
|
792
|
+
}, function (props) {
|
|
793
|
+
return props.$pt && css(templateObject_15$1 || (templateObject_15$1 = __makeTemplateObject(["padding-top: ", ";"], ["padding-top: ", ";"])), tokens.semantic.spacing.layout[props.$pt]);
|
|
794
|
+
}, function (props) {
|
|
795
|
+
return props.$pr && css(templateObject_16$1 || (templateObject_16$1 = __makeTemplateObject(["padding-right: ", ";"], ["padding-right: ", ";"])), tokens.semantic.spacing.layout[props.$pr]);
|
|
796
|
+
}, function (props) {
|
|
797
|
+
return props.$pb && css(templateObject_17$1 || (templateObject_17$1 = __makeTemplateObject(["padding-bottom: ", ";"], ["padding-bottom: ", ";"])), tokens.semantic.spacing.layout[props.$pb]);
|
|
798
|
+
}, function (props) {
|
|
799
|
+
return props.$pl && css(templateObject_18$1 || (templateObject_18$1 = __makeTemplateObject(["padding-left: ", ";"], ["padding-left: ", ";"])), tokens.semantic.spacing.layout[props.$pl]);
|
|
800
|
+
}, function (props) {
|
|
801
|
+
return props.$px && css(templateObject_19$1 || (templateObject_19$1 = __makeTemplateObject(["\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n padding-left: ", ";\n padding-right: ", ";\n "])), tokens.semantic.spacing.layout[props.$px], tokens.semantic.spacing.layout[props.$px]);
|
|
802
|
+
}, function (props) {
|
|
803
|
+
return props.$py && css(templateObject_20$1 || (templateObject_20$1 = __makeTemplateObject(["\n padding-top: ", ";\n padding-bottom: ", ";\n "], ["\n padding-top: ", ";\n padding-bottom: ", ";\n "])), tokens.semantic.spacing.layout[props.$py], tokens.semantic.spacing.layout[props.$py]);
|
|
804
|
+
}, function (props) {
|
|
805
|
+
return props.$width && css(templateObject_21$1 || (templateObject_21$1 = __makeTemplateObject(["width: ", ";"], ["width: ", ";"])), props.$width);
|
|
806
|
+
}, function (props) {
|
|
807
|
+
return props.$height && css(templateObject_22$1 || (templateObject_22$1 = __makeTemplateObject(["height: ", ";"], ["height: ", ";"])), props.$height);
|
|
808
|
+
}, function (props) {
|
|
809
|
+
return props.$maxWidth && css(templateObject_23$1 || (templateObject_23$1 = __makeTemplateObject(["max-width: ", ";"], ["max-width: ", ";"])), props.$maxWidth);
|
|
810
|
+
}, function (props) {
|
|
811
|
+
return props.$maxHeight && css(templateObject_24$1 || (templateObject_24$1 = __makeTemplateObject(["max-height: ", ";"], ["max-height: ", ";"])), props.$maxHeight);
|
|
812
|
+
}, function (props) {
|
|
813
|
+
return props.$minWidth && css(templateObject_25$1 || (templateObject_25$1 = __makeTemplateObject(["min-width: ", ";"], ["min-width: ", ";"])), props.$minWidth);
|
|
814
|
+
}, function (props) {
|
|
815
|
+
return props.$minHeight && css(templateObject_26$1 || (templateObject_26$1 = __makeTemplateObject(["min-height: ", ";"], ["min-height: ", ";"])), props.$minHeight);
|
|
816
|
+
}, function (props) {
|
|
817
|
+
return props.$position && css(templateObject_27$1 || (templateObject_27$1 = __makeTemplateObject(["position: ", ";"], ["position: ", ";"])), props.$position);
|
|
818
|
+
}, function (props) {
|
|
819
|
+
return props.$top && css(templateObject_28$1 || (templateObject_28$1 = __makeTemplateObject(["top: ", ";"], ["top: ", ";"])), props.$top);
|
|
820
|
+
}, function (props) {
|
|
821
|
+
return props.$right && css(templateObject_29$1 || (templateObject_29$1 = __makeTemplateObject(["right: ", ";"], ["right: ", ";"])), props.$right);
|
|
822
|
+
}, function (props) {
|
|
823
|
+
return props.$bottom && css(templateObject_30$1 || (templateObject_30$1 = __makeTemplateObject(["bottom: ", ";"], ["bottom: ", ";"])), props.$bottom);
|
|
824
|
+
}, function (props) {
|
|
825
|
+
return props.$left && css(templateObject_31$1 || (templateObject_31$1 = __makeTemplateObject(["left: ", ";"], ["left: ", ";"])), props.$left);
|
|
826
|
+
}, function (props) {
|
|
827
|
+
return props.$borderRadius && css(templateObject_32$1 || (templateObject_32$1 = __makeTemplateObject(["border-radius: ", ";"], ["border-radius: ", ";"])), tokens.base.border.radius[props.$borderRadius]);
|
|
828
|
+
}, function (props) {
|
|
829
|
+
return props.$border && css(templateObject_33$1 || (templateObject_33$1 = __makeTemplateObject(["border: 1px solid ", ";"], ["border: 1px solid ", ";"])), tokens.semantic.color.border[props.$border]);
|
|
830
|
+
}, function (props) {
|
|
831
|
+
return props.$borderTop && css(templateObject_34$1 || (templateObject_34$1 = __makeTemplateObject(["border-top: 1px solid ", ";"], ["border-top: 1px solid ", ";"])), tokens.semantic.color.border[props.$borderTop]);
|
|
832
|
+
}, function (props) {
|
|
833
|
+
return props.$borderRight && css(templateObject_35$1 || (templateObject_35$1 = __makeTemplateObject(["border-right: 1px solid ", ";"], ["border-right: 1px solid ", ";"])), tokens.semantic.color.border[props.$borderRight]);
|
|
834
|
+
}, function (props) {
|
|
835
|
+
return props.$borderBottom && css(templateObject_36 || (templateObject_36 = __makeTemplateObject(["border-bottom: 1px solid ", ";"], ["border-bottom: 1px solid ", ";"])), tokens.semantic.color.border[props.$borderBottom]);
|
|
836
|
+
}, function (props) {
|
|
837
|
+
return props.$borderLeft && css(templateObject_37 || (templateObject_37 = __makeTemplateObject(["border-left: 1px solid ", ";"], ["border-left: 1px solid ", ";"])), tokens.semantic.color.border[props.$borderLeft]);
|
|
838
|
+
}, function (props) {
|
|
839
|
+
return props.$bg && css(templateObject_38 || (templateObject_38 = __makeTemplateObject(["background-color: ", ";"], ["background-color: ", ";"])), tokens.semantic.color.background[props.$bg]);
|
|
840
|
+
}, function (props) {
|
|
841
|
+
return props.$color && css(templateObject_39 || (templateObject_39 = __makeTemplateObject(["color: ", ";"], ["color: ", ";"])), tokens.semantic.color.text[props.$color]);
|
|
842
|
+
}, function (props) {
|
|
843
|
+
return props.$overflow && css(templateObject_40 || (templateObject_40 = __makeTemplateObject(["overflow: ", ";"], ["overflow: ", ";"])), props.$overflow);
|
|
844
|
+
}, function (props) {
|
|
845
|
+
return props.$overflowX && css(templateObject_41 || (templateObject_41 = __makeTemplateObject(["overflow-x: ", ";"], ["overflow-x: ", ";"])), props.$overflowX);
|
|
846
|
+
}, function (props) {
|
|
847
|
+
return props.$overflowY && css(templateObject_42 || (templateObject_42 = __makeTemplateObject(["overflow-y: ", ";"], ["overflow-y: ", ";"])), props.$overflowY);
|
|
848
|
+
});
|
|
849
|
+
// Transform component that maps clean props to $-prefixed props for styled-components
|
|
850
|
+
var BoxTransform = function BoxTransform(props) {
|
|
851
|
+
var
|
|
852
|
+
// Display
|
|
853
|
+
display = props.display,
|
|
854
|
+
// Flexbox
|
|
855
|
+
flexDirection = props.flexDirection,
|
|
856
|
+
justifyContent = props.justifyContent,
|
|
857
|
+
alignItems = props.alignItems,
|
|
858
|
+
flexWrap = props.flexWrap,
|
|
859
|
+
gap = props.gap,
|
|
860
|
+
// Spacing
|
|
861
|
+
m = props.m,
|
|
862
|
+
mt = props.mt,
|
|
863
|
+
mr = props.mr,
|
|
864
|
+
mb = props.mb,
|
|
865
|
+
ml = props.ml,
|
|
866
|
+
mx = props.mx,
|
|
867
|
+
my = props.my,
|
|
868
|
+
p = props.p,
|
|
869
|
+
pt = props.pt,
|
|
870
|
+
pr = props.pr,
|
|
871
|
+
pb = props.pb,
|
|
872
|
+
pl = props.pl,
|
|
873
|
+
px = props.px,
|
|
874
|
+
py = props.py,
|
|
875
|
+
// Size
|
|
876
|
+
width = props.width,
|
|
877
|
+
height = props.height,
|
|
878
|
+
maxWidth = props.maxWidth,
|
|
879
|
+
maxHeight = props.maxHeight,
|
|
880
|
+
minWidth = props.minWidth,
|
|
881
|
+
minHeight = props.minHeight,
|
|
882
|
+
// Position
|
|
883
|
+
position = props.position,
|
|
884
|
+
top = props.top,
|
|
885
|
+
right = props.right,
|
|
886
|
+
bottom = props.bottom,
|
|
887
|
+
left = props.left,
|
|
888
|
+
// Borders
|
|
889
|
+
borderRadius = props.borderRadius,
|
|
890
|
+
border = props.border,
|
|
891
|
+
borderTop = props.borderTop,
|
|
892
|
+
borderRight = props.borderRight,
|
|
893
|
+
borderBottom = props.borderBottom,
|
|
894
|
+
borderLeft = props.borderLeft,
|
|
895
|
+
// Background & Color
|
|
896
|
+
bg = props.bg,
|
|
897
|
+
color = props.color,
|
|
898
|
+
// Overflow
|
|
899
|
+
overflow = props.overflow,
|
|
900
|
+
overflowX = props.overflowX,
|
|
901
|
+
overflowY = props.overflowY,
|
|
902
|
+
// Standard props
|
|
903
|
+
as = props.as,
|
|
904
|
+
children = props.children,
|
|
905
|
+
dataTestId = props["data-testid"],
|
|
906
|
+
rest = __rest(props, ["display", "flexDirection", "justifyContent", "alignItems", "flexWrap", "gap", "m", "mt", "mr", "mb", "ml", "mx", "my", "p", "pt", "pr", "pb", "pl", "px", "py", "width", "height", "maxWidth", "maxHeight", "minWidth", "minHeight", "position", "top", "right", "bottom", "left", "borderRadius", "border", "borderTop", "borderRight", "borderBottom", "borderLeft", "bg", "color", "overflow", "overflowX", "overflowY", "as", "children", 'data-testid']);
|
|
907
|
+
return /*#__PURE__*/React.createElement(StyledBox, _extends({
|
|
908
|
+
as: as,
|
|
909
|
+
"data-testid": dataTestId,
|
|
910
|
+
$display: display,
|
|
911
|
+
$flexDirection: flexDirection,
|
|
912
|
+
$justifyContent: justifyContent,
|
|
913
|
+
$alignItems: alignItems,
|
|
914
|
+
$flexWrap: flexWrap,
|
|
915
|
+
$gap: gap,
|
|
916
|
+
$m: m,
|
|
917
|
+
$mt: mt,
|
|
918
|
+
$mr: mr,
|
|
919
|
+
$mb: mb,
|
|
920
|
+
$ml: ml,
|
|
921
|
+
$mx: mx,
|
|
922
|
+
$my: my,
|
|
923
|
+
$p: p,
|
|
924
|
+
$pt: pt,
|
|
925
|
+
$pr: pr,
|
|
926
|
+
$pb: pb,
|
|
927
|
+
$pl: pl,
|
|
928
|
+
$px: px,
|
|
929
|
+
$py: py,
|
|
930
|
+
$width: width,
|
|
931
|
+
$height: height,
|
|
932
|
+
$maxWidth: maxWidth,
|
|
933
|
+
$maxHeight: maxHeight,
|
|
934
|
+
$minWidth: minWidth,
|
|
935
|
+
$minHeight: minHeight,
|
|
936
|
+
$position: position,
|
|
937
|
+
$top: top,
|
|
938
|
+
$right: right,
|
|
939
|
+
$bottom: bottom,
|
|
940
|
+
$left: left,
|
|
941
|
+
$borderRadius: borderRadius,
|
|
942
|
+
$border: border,
|
|
943
|
+
$borderTop: borderTop,
|
|
944
|
+
$borderRight: borderRight,
|
|
945
|
+
$borderBottom: borderBottom,
|
|
946
|
+
$borderLeft: borderLeft,
|
|
947
|
+
$bg: bg,
|
|
948
|
+
$color: color,
|
|
949
|
+
$overflow: overflow,
|
|
950
|
+
$overflowX: overflowX,
|
|
951
|
+
$overflowY: overflowY
|
|
952
|
+
}, rest), children);
|
|
953
|
+
};
|
|
954
|
+
var Box = BoxTransform;
|
|
955
|
+
var templateObject_1$b, templateObject_2$3, templateObject_3$2, templateObject_4$1, templateObject_5$1, templateObject_6$1, templateObject_7$1, templateObject_8$1, templateObject_9$1, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14$1, templateObject_15$1, templateObject_16$1, templateObject_17$1, templateObject_18$1, templateObject_19$1, templateObject_20$1, templateObject_21$1, templateObject_22$1, templateObject_23$1, templateObject_24$1, templateObject_25$1, templateObject_26$1, templateObject_27$1, templateObject_28$1, templateObject_29$1, templateObject_30$1, templateObject_31$1, templateObject_32$1, templateObject_33$1, templateObject_34$1, templateObject_35$1, templateObject_36, templateObject_37, templateObject_38, templateObject_39, templateObject_40, templateObject_41, templateObject_42, templateObject_43;
|
|
956
|
+
|
|
957
|
+
var add = {
|
|
958
|
+
path: "M13 11H19V13H13V19H11V13H5V11H11V5H13V11Z",
|
|
959
|
+
name: "add"
|
|
960
|
+
};
|
|
961
|
+
var arrowDown = {
|
|
962
|
+
path: "m18.707 9.707-1.414-1.414L12 13.586 6.707 8.293 5.293 9.707 12 16.414l6.707-6.707Z",
|
|
963
|
+
name: "arrowDown"
|
|
964
|
+
};
|
|
965
|
+
var arrowUp = {
|
|
966
|
+
path: "m18.707 14.293-1.414 1.414L12 10.414l-5.293 5.293-1.414-1.414L12 7.586l6.707 6.707Z",
|
|
967
|
+
name: "arrowUp"
|
|
968
|
+
};
|
|
969
|
+
var arrowLeft = {
|
|
970
|
+
path: "M15.707 6.70703L10.4141 12L15.707 17.293L14.293 18.707L7.58594 12L14.293 5.29297L15.707 6.70703Z",
|
|
971
|
+
name: "arrowLeft"
|
|
972
|
+
};
|
|
973
|
+
var arrowRight = {
|
|
974
|
+
path: "M8.29297 6.70703L13.5859 12L8.29297 17.293L9.70703 18.707L16.4141 12L9.70703 5.29297L8.29297 6.70703Z",
|
|
975
|
+
name: "arrowRight"
|
|
976
|
+
};
|
|
977
|
+
var back = {
|
|
978
|
+
path: "m5 12-.707-.707-.707.707.707.707L5 12Zm12 1a1 1 0 1 0 0-2v2ZM8.293 7.293l-4 4 1.414 1.414 4-4-1.414-1.414Zm-4 5.414 4 4 1.414-1.414-4-4-1.414 1.414ZM5 13h12v-2H5v2Z",
|
|
979
|
+
name: "back"
|
|
980
|
+
};
|
|
981
|
+
var caret = {
|
|
982
|
+
path: "m14.77 11.808-4.458-3.715A.8.8 0 0 0 9 8.708v6.584a.8.8 0 0 0 1.312.614l4.458-3.714a.25.25 0 0 0 0-.384Z",
|
|
983
|
+
name: "caret"
|
|
984
|
+
};
|
|
985
|
+
var close = {
|
|
986
|
+
path: "M19.4141 6L13.4141 12L19.4141 18L18 19.4141L12 13.4141L6 19.4141L4.58594 18L10.5859 12L4.58594 6L6 4.58594L12 10.5859L18 4.58594L19.4141 6Z",
|
|
987
|
+
name: "close"
|
|
988
|
+
};
|
|
989
|
+
var directionRight = {
|
|
990
|
+
path: "M20 12L20.7071 11.2929L21.4142 12L20.7071 12.7071L20 12ZM5 13C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11V13ZM14 6L14.7071 5.29289L20.7071 11.2929L20 12L19.2929 12.7071L13.2929 6.70711L14 6ZM20 12L20.7071 12.7071L14.7071 18.7071L14 18L13.2929 17.2929L19.2929 11.2929L20 12ZM20 12V13H5V12V11H20V12Z",
|
|
991
|
+
name: "directionRight"
|
|
992
|
+
};
|
|
993
|
+
var menu = {
|
|
994
|
+
path: "M4 7a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Zm0 5a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Zm0 5a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Z",
|
|
995
|
+
name: "menu"
|
|
996
|
+
};
|
|
997
|
+
var pause = {
|
|
998
|
+
path: "M7 5a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1H7ZM15 5a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2Z",
|
|
999
|
+
name: "pause"
|
|
1000
|
+
};
|
|
1001
|
+
var play = {
|
|
1002
|
+
path: "M16.138 10.569 9.605 7.303A1.8 1.8 0 0 0 7 8.913v6.175a1.8 1.8 0 0 0 2.605 1.61l6.533-3.267c1.18-.59 1.18-2.272 0-2.862Z",
|
|
1003
|
+
name: "play"
|
|
1004
|
+
};
|
|
1005
|
+
var playBack = {
|
|
1006
|
+
path: "m16.293 5.293 1.414 1.414L12.414 12l5.293 5.293-1.414 1.414L9.586 12l6.707-6.707ZM5 17V7h2v10H5Z",
|
|
1007
|
+
name: "playBack"
|
|
1008
|
+
};
|
|
1009
|
+
var lineOut = {
|
|
1010
|
+
path: "M21 9V3H15V5H17.5859L8.58595 14H6.00001L5.35157 14.0049C5.14361 14.0103 4.94678 14.0221 4.76954 14.0459C4.38634 14.0974 3.94916 14.2227 3.58595 14.5859C3.22274 14.9492 3.09743 15.3863 3.04591 15.7695C2.99825 16.124 3.00001 16.5569 3.00001 17V18C3.00001 18.4431 2.99825 18.876 3.04591 19.2305C3.09743 19.6137 3.22274 20.0508 3.58595 20.4141C3.94916 20.7773 4.38634 20.9026 4.76954 20.9541C5.12397 21.0018 5.55688 21 6.00001 21H7.00001C7.44314 21 7.87604 21.0018 8.23048 20.9541C8.61368 20.9026 9.05086 20.7773 9.41407 20.4141C9.77729 20.0508 9.90259 19.6137 9.95411 19.2305C10.0018 18.876 10 18.4431 10 18V15.4141L19 6.41406V9H21ZM5.40235 16.0039L6.00001 16H8.00001V18C8.00001 18.4995 7.99821 18.7737 7.97266 18.9639C7.97236 18.9661 7.97199 18.9685 7.97169 18.9707C7.96917 18.9711 7.9665 18.9723 7.96388 18.9727C7.77369 18.9982 7.49949 19 7.00001 19H6.00001C5.50052 19 5.22632 18.9982 5.03614 18.9727C5.03384 18.9723 5.03151 18.971 5.02931 18.9707C5.029 18.9685 5.02766 18.9662 5.02735 18.9639C5.00181 18.7737 5.00001 18.4995 5.00001 18V17C5.00001 16.5005 5.00181 16.2263 5.02735 16.0361C5.02771 16.0335 5.02895 16.0308 5.02931 16.0283C5.03147 16.028 5.03389 16.0276 5.03614 16.0273C5.13128 16.0146 5.24749 16.0076 5.40235 16.0039Z",
|
|
1011
|
+
name: "lineOut"
|
|
1012
|
+
};
|
|
1013
|
+
var message = {
|
|
1014
|
+
path: "M16 5.00001C16.9145 5.00001 17.7014 4.99777 18.3281 5.08204C18.9835 5.17019 19.6115 5.36934 20.1211 5.87891C20.6307 6.38849 20.8298 7.01648 20.918 7.67188C21.0022 8.29863 21 9.08547 21 10V14C21 14.9145 21.0022 15.7014 20.918 16.3281C20.8298 16.9835 20.6307 17.6115 20.1211 18.1211C19.6115 18.6307 18.9835 18.8298 18.3281 18.918C17.7014 19.0022 16.9145 19 16 19H8.00001C7.08547 19 6.29863 19.0022 5.67188 18.918C5.01648 18.8298 4.38849 18.6307 3.87891 18.1211C3.36934 17.6115 3.17019 16.9835 3.08204 16.3281C2.99777 15.7014 3.00001 14.9145 3.00001 14V10C3.00001 9.08547 2.99777 8.29863 3.08204 7.67188C3.17019 7.01648 3.36933 6.38849 3.87891 5.87891C4.38849 5.36933 5.01648 5.17019 5.67188 5.08204C6.29863 4.99777 7.08547 5.00001 8.00001 5.00001H16ZM13.3418 13.4473C12.4972 13.8696 11.5028 13.8696 10.6582 13.4473L5.00001 10.6182V14C5.00001 14.9711 5.00228 15.599 5.06446 16.0615C5.12277 16.4951 5.21687 16.6309 5.29297 16.707C5.36908 16.7831 5.50495 16.8772 5.93848 16.9356C6.40099 16.9977 7.02893 17 8.00001 17H16C16.9711 17 17.599 16.9977 18.0615 16.9356C18.4951 16.8772 18.6309 16.7831 18.707 16.707C18.7831 16.6309 18.8772 16.4951 18.9356 16.0615C18.9977 15.599 19 14.9711 19 14V10.6182L13.3418 13.4473ZM8.00001 7.00001C7.02893 7.00001 6.40099 7.00228 5.93848 7.06446C5.50494 7.12278 5.36908 7.21687 5.29297 7.29297C5.21686 7.36908 5.12278 7.50494 5.06446 7.93848C5.04619 8.07437 5.03381 8.2246 5.02442 8.39356L11.5527 11.6582C11.8343 11.799 12.1657 11.799 12.4473 11.6582L18.9746 8.39356C18.9652 8.22462 18.9538 8.07436 18.9356 7.93848C18.8772 7.50495 18.7831 7.36908 18.707 7.29297C18.6309 7.21687 18.4951 7.12277 18.0615 7.06446C17.599 7.00228 16.9711 7.00001 16 7.00001H8.00001Z",
|
|
1015
|
+
name: "message"
|
|
1016
|
+
};
|
|
1017
|
+
var copy = {
|
|
1018
|
+
path: "M16 9.00001C16.9145 9.00001 17.7014 8.99777 18.3281 9.08204C18.9835 9.17019 19.6115 9.36934 20.1211 9.87891C20.6307 10.3885 20.8298 11.0165 20.918 11.6719C21.0022 12.2986 21 13.0855 21 14V16C21 16.9145 21.0022 17.7014 20.918 18.3281C20.8298 18.9835 20.6307 19.6115 20.1211 20.1211C19.6115 20.6307 18.9835 20.8298 18.3281 20.918C17.7014 21.0022 16.9145 21 16 21H14C13.0855 21 12.2986 21.0022 11.6719 20.918C11.0165 20.8298 10.3885 20.6307 9.87891 20.1211C9.36934 19.6115 9.17019 18.9835 9.08204 18.3281C8.99777 17.7014 9.00001 16.9145 9.00001 16V14C9.00001 13.0855 8.99777 12.2986 9.08204 11.6719C9.17019 11.0165 9.36933 10.3885 9.87891 9.87891C10.3885 9.36933 11.0165 9.17019 11.6719 9.08204C12.2986 8.99777 13.0855 9.00001 14 9.00001H16ZM14 11C13.0289 11 12.401 11.0023 11.9385 11.0645C11.5049 11.1228 11.3691 11.2169 11.293 11.293C11.2169 11.3691 11.1228 11.5049 11.0645 11.9385C11.0023 12.401 11 13.0289 11 14V16C11 16.9711 11.0023 17.599 11.0645 18.0615C11.1228 18.4951 11.2169 18.6309 11.293 18.707C11.3691 18.7831 11.5049 18.8772 11.9385 18.9356C12.401 18.9977 13.0289 19 14 19H16C16.9711 19 17.599 18.9977 18.0615 18.9356C18.4951 18.8772 18.6309 18.7831 18.707 18.707C18.7831 18.6309 18.8772 18.4951 18.9356 18.0615C18.9977 17.599 19 16.9711 19 16V14C19 13.0289 18.9977 12.401 18.9356 11.9385C18.8772 11.5049 18.7831 11.3691 18.707 11.293C18.6309 11.2169 18.4951 11.1228 18.0615 11.0645C17.599 11.0023 16.9711 11 16 11H14Z M11 3.00001C11.4521 3.00001 11.8413 2.99962 12.1621 3.02149C12.4919 3.04399 12.8225 3.09352 13.1484 3.22852C13.8832 3.53299 14.467 4.1168 14.7715 4.85157C14.9065 5.17749 14.956 5.50807 14.9785 5.8379C15.0004 6.15869 15 6.54787 15 7.00001H13C13 6.52039 12.9996 6.21062 12.9834 5.97364C12.9678 5.74574 12.9411 5.6588 12.9238 5.61719C12.8223 5.37227 12.6277 5.17767 12.3828 5.07618C12.3412 5.05894 12.2543 5.03216 12.0264 5.01661C11.7894 5.00044 11.4796 5.00001 11 5.00001H8.00001C7.02893 5.00001 6.40099 5.00228 5.93848 5.06446C5.50494 5.12278 5.36908 5.21687 5.29297 5.29297C5.21686 5.36908 5.12278 5.50494 5.06446 5.93848C5.00228 6.40099 5.00001 7.02893 5.00001 8.00001V11C5.00001 11.4796 5.00044 11.7894 5.01661 12.0264C5.03216 12.2543 5.05894 12.3412 5.07618 12.3828C5.17767 12.6277 5.37227 12.8223 5.61719 12.9238C5.6588 12.9411 5.74574 12.9678 5.97364 12.9834C6.21062 12.9996 6.52039 13 7.00001 13V15C6.54787 15 6.15869 15.0004 5.8379 14.9785C5.50807 14.956 5.17749 14.9065 4.85157 14.7715C4.1168 14.467 3.53299 13.8832 3.22852 13.1484C3.09352 12.8225 3.04399 12.4919 3.02149 12.1621C2.99962 11.8413 3.00001 11.4521 3.00001 11V8.00001C3.00001 7.08547 2.99777 6.29863 3.08204 5.67188C3.17019 5.01648 3.36933 4.38849 3.87891 3.87891C4.38849 3.36933 5.01648 3.17019 5.67188 3.08204C6.29863 2.99777 7.08547 3.00001 8.00001 3.00001H11Z",
|
|
1019
|
+
name: "copy"
|
|
1020
|
+
};
|
|
1021
|
+
var link = {
|
|
1022
|
+
path: "M10 7C10.5523 7 11 7.44772 11 8C11 8.55228 10.5523 9 10 9H7C5.34315 9 4 10.3431 4 12C4 13.6569 5.34315 15 7 15H10C10.5523 15 11 15.4477 11 16C11 16.5523 10.5523 17 10 17H7C4.23858 17 2 14.7614 2 12C2 9.23858 4.23858 7 7 7H10Z M17 7C19.7614 7 22 9.23858 22 12C22 14.7614 19.7614 17 17 17H14C13.4477 17 13 16.5523 13 16C13 15.4477 13.4477 15 14 15H17C18.6569 15 20 13.6569 20 12C20 10.3431 18.6569 9 17 9H14C13.4477 9 13 8.55228 13 8C13 7.44772 13.4477 7 14 7H17Z M16 11C16.5523 11 17 11.4477 17 12C17 12.5523 16.5523 13 16 13H8C7.44772 13 7 12.5523 7 12C7 11.4477 7.44772 11 8 11H16Z",
|
|
1023
|
+
name: "link"
|
|
1024
|
+
};
|
|
1025
|
+
var userBox = {
|
|
1026
|
+
path: "M12 6C14.2091 6 16 7.79086 16 10C16 12.2091 14.2091 14 12 14C9.79086 14 8 12.2091 8 10C8 7.79086 9.79086 6 12 6ZM12 8C10.8954 8 10 8.89543 10 10C10 11.1046 10.8954 12 12 12C13.1046 12 14 11.1046 14 10C14 8.89543 13.1046 8 12 8Z M14 2C17.7712 2 19.6566 2.0003 20.8281 3.17188C21.9997 4.34345 22 6.22876 22 10V14C22 17.7712 21.9997 19.6566 20.8281 20.8281C19.803 21.8533 18.2315 21.982 15.3281 21.998L14 22H10L8.67188 21.998C5.8719 21.9826 4.31033 21.8625 3.2832 20.9346L3.17188 20.8281C2.14675 19.803 2.01797 18.2315 2.00195 15.3281L2 14V10C2 6.34627 2 4.46248 3.06543 3.2832L3.17188 3.17188C4.34345 2.0003 6.22876 2 10 2H14ZM12 18C10.8577 18 9.76263 18.3153 8.88574 18.876C8.39459 19.1901 7.99492 19.5688 7.69043 19.9834C8.33459 19.9972 9.09233 20 10 20H14C14.9072 20 15.6646 19.9971 16.3086 19.9834C16.0041 19.5689 15.6052 19.19 15.1143 18.876C14.2374 18.3153 13.1423 18 12 18ZM10 4C8.05784 4 6.80197 4.00454 5.87695 4.12891C5.00986 4.24554 4.73816 4.43372 4.58594 4.58594C4.43372 4.73816 4.24554 5.00986 4.12891 5.87695C4.00454 6.80197 4 8.05784 4 10V14C4 15.9422 4.00454 17.198 4.12891 18.123C4.24554 18.9901 4.43372 19.2618 4.58594 19.4141C4.71234 19.5405 4.92163 19.6893 5.48535 19.8037C5.96679 18.7505 6.77822 17.8493 7.80859 17.1904C9.02742 16.4111 10.5007 16 12 16C13.4993 16 14.9726 16.4111 16.1914 17.1904C17.2217 17.8492 18.0322 18.7507 18.5137 19.8037C19.0781 19.6893 19.2876 19.5405 19.4141 19.4141C19.5663 19.2618 19.7545 18.9901 19.8711 18.123C19.9955 17.198 20 15.9422 20 14V10C20 8.05784 19.9955 6.80197 19.8711 5.87695C19.7545 5.00986 19.5663 4.73816 19.4141 4.58594C19.2618 4.43372 18.9901 4.24554 18.123 4.12891C17.198 4.00454 15.9422 4 14 4H10Z",
|
|
1027
|
+
name: "userBox"
|
|
1028
|
+
};
|
|
1029
|
+
var iconsData = {
|
|
1030
|
+
add: add,
|
|
1031
|
+
arrowDown: arrowDown,
|
|
1032
|
+
arrowUp: arrowUp,
|
|
1033
|
+
arrowLeft: arrowLeft,
|
|
1034
|
+
arrowRight: arrowRight,
|
|
1035
|
+
back: back,
|
|
1036
|
+
caret: caret,
|
|
1037
|
+
close: close,
|
|
1038
|
+
directionRight: directionRight,
|
|
1039
|
+
menu: menu,
|
|
1040
|
+
pause: pause,
|
|
1041
|
+
play: play,
|
|
1042
|
+
playBack: playBack,
|
|
1043
|
+
lineOut: lineOut,
|
|
1044
|
+
message: message,
|
|
1045
|
+
copy: copy,
|
|
1046
|
+
link: link,
|
|
1047
|
+
userBox: userBox
|
|
1048
|
+
};
|
|
1049
|
+
|
|
1050
|
+
var IconStyled = styled.span.withConfig({
|
|
1051
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1052
|
+
return !prop.startsWith('$');
|
|
1053
|
+
}
|
|
1054
|
+
})(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: ", ";\n height: ", ";\n \n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n \n /* Use semantic icon colors */\n color: ", ";\n"])), function (_a) {
|
|
1055
|
+
var $size = _a.$size;
|
|
1056
|
+
return tokens.semantic.size.icon[$size];
|
|
1057
|
+
}, function (_a) {
|
|
1058
|
+
var $size = _a.$size;
|
|
1059
|
+
return tokens.semantic.size.icon[$size];
|
|
1060
|
+
}, function (_a) {
|
|
1061
|
+
var $iconColor = _a.$iconColor;
|
|
1062
|
+
switch ($iconColor) {
|
|
1063
|
+
case 'default':
|
|
1064
|
+
return tokens.semantic.color.icon["default"];
|
|
1065
|
+
case 'emphasis':
|
|
1066
|
+
return tokens.semantic.color.icon.emphasis;
|
|
1067
|
+
case 'subdued':
|
|
1068
|
+
return tokens.semantic.color.icon.subdued;
|
|
1069
|
+
case 'disabled':
|
|
1070
|
+
return tokens.semantic.color.icon.disabled;
|
|
1071
|
+
case 'inverse':
|
|
1072
|
+
return tokens.semantic.color.icon.inverse;
|
|
1073
|
+
case 'interactive':
|
|
1074
|
+
return tokens.semantic.color.icon.interactive;
|
|
1075
|
+
case 'error':
|
|
1076
|
+
return tokens.semantic.color.icon.error;
|
|
1077
|
+
case 'success':
|
|
1078
|
+
return tokens.semantic.color.icon.success;
|
|
1079
|
+
case 'warning':
|
|
1080
|
+
return tokens.semantic.color.icon.warning;
|
|
1081
|
+
case 'inherit':
|
|
1082
|
+
return 'currentColor';
|
|
1083
|
+
default:
|
|
1084
|
+
return tokens.semantic.color.icon["default"];
|
|
1085
|
+
}
|
|
1086
|
+
});
|
|
1087
|
+
var Icon = function Icon(_a) {
|
|
1088
|
+
var name = _a.name,
|
|
1089
|
+
_b = _a.size,
|
|
1090
|
+
size = _b === void 0 ? 'lg' : _b,
|
|
1091
|
+
_c = _a.iconColor,
|
|
1092
|
+
iconColor = _c === void 0 ? 'default' : _c,
|
|
1093
|
+
dataTestId = _a["data-testid"];
|
|
1094
|
+
// Get the icon data from the JSON file
|
|
1095
|
+
var iconData = iconsData[name];
|
|
1096
|
+
if (!iconData) {
|
|
1097
|
+
console.warn("Icon \"".concat(name, "\" not found in icons.json"));
|
|
1098
|
+
return /*#__PURE__*/React.createElement(IconStyled, {
|
|
1099
|
+
$size: size,
|
|
1100
|
+
$iconColor: iconColor,
|
|
1101
|
+
"data-testid": dataTestId
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
return /*#__PURE__*/React.createElement(IconStyled, {
|
|
1105
|
+
$size: size,
|
|
1106
|
+
$iconColor: iconColor,
|
|
1107
|
+
"data-testid": dataTestId
|
|
1108
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
1109
|
+
viewBox: "0 0 24 24",
|
|
1110
|
+
fill: "currentColor",
|
|
1111
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1112
|
+
role: "img",
|
|
1113
|
+
"aria-label": iconData.name
|
|
1114
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1115
|
+
d: iconData.path
|
|
1116
|
+
})));
|
|
1117
|
+
};
|
|
1118
|
+
var templateObject_1$a;
|
|
1119
|
+
|
|
1120
|
+
var button = tokens.component.button,
|
|
1121
|
+
semantic = tokens.semantic;
|
|
1122
|
+
// Base styles shared between button and link
|
|
1123
|
+
var baseButtonStyles = "\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: ".concat(tokens.semantic.spacing.layout.xs, ";\n height: max-content;\n cursor: pointer;\n border: none;\n text-decoration: none;\n transition: ").concat(semantic.motion.hover, ";\n white-space: nowrap;\n user-select: none;\n \n &:focus {\n outline: ").concat(button.focus.outline, ";\n outline-offset: ").concat(button.focus.outlineOffset, ";\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n");
|
|
1124
|
+
// Dynamic variant styles using component tokens
|
|
1125
|
+
var getVariantStyles$1 = function getVariantStyles(_a) {
|
|
1126
|
+
var $variant = _a.$variant;
|
|
1127
|
+
return "\n background-color: ".concat($variant === 'primary' ? button.primary.backgroundColor : $variant === 'secondary' ? button.variants.secondary.backgroundColor : button.variants.naked.backgroundColor, ";\n color: ").concat($variant === 'primary' ? button.primary.textColor : $variant === 'secondary' ? button.variants.secondary.textColor : button.variants.naked.textColor, ";\n \n &:hover:not(:disabled) {\n background-color: ").concat($variant === 'primary' ? button.hover.backgroundColor : $variant === 'secondary' ? button.variants.secondary.hover.backgroundColor : button.variants.naked.hover.backgroundColor, ";\n }\n\n &:active:not(:disabled) {\n background-color: ").concat($variant === 'primary' ? button.active.backgroundColor : $variant === 'secondary' ? button.variants.secondary.active.backgroundColor : button.variants.naked.active.backgroundColor, ";\n }\n\n &:disabled {\n background-color: ").concat($variant === 'primary' ? button.disabled.backgroundColor : $variant === 'secondary' ? button.variants.secondary.disabled.backgroundColor : button.variants.naked.disabled.backgroundColor, ";\n color: ").concat($variant === 'primary' ? button.disabled.textColor : $variant === 'secondary' ? button.variants.secondary.disabled.textColor : button.variants.naked.disabled.textColor, ";\n }\n");
|
|
1128
|
+
};
|
|
1129
|
+
// Dynamic size styles using component tokens
|
|
1130
|
+
var getSizeStyles$1 = function getSizeStyles(_a) {
|
|
1131
|
+
var $size = _a.$size;
|
|
1132
|
+
switch ($size) {
|
|
1133
|
+
case 'small':
|
|
1134
|
+
return "\n font: ".concat(button.sizes.small.font, ";\n padding: ").concat(button.sizes.small.padding, ";\n ");
|
|
1135
|
+
case 'medium':
|
|
1136
|
+
return "\n font: ".concat(button.sizes.medium.font, ";\n padding: ").concat(button.sizes.medium.padding, ";\n ");
|
|
1137
|
+
case 'large':
|
|
1138
|
+
return "\n font: ".concat(button.sizes.large.font, ";\n padding: ").concat(button.sizes.large.padding, ";\n ");
|
|
1139
|
+
default:
|
|
1140
|
+
return "\n font: ".concat(button.sizes.large.font, ";\n padding: ").concat(button.sizes.large.padding, ";\n ");
|
|
1141
|
+
}
|
|
1142
|
+
};
|
|
1143
|
+
var StyledButton = styled.button.withConfig({
|
|
1144
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1145
|
+
return !['$variant', '$size'].includes(prop);
|
|
1146
|
+
}
|
|
1147
|
+
})(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"])), baseButtonStyles, button.primary.borderRadius, getVariantStyles$1, getSizeStyles$1);
|
|
1148
|
+
var StyledLink = styled.a.withConfig({
|
|
1149
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1150
|
+
return !['$variant', '$size'].includes(prop);
|
|
1151
|
+
}
|
|
1152
|
+
})(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"], ["\n ", "\n border-radius: ", ";\n \n ", "\n ", "\n"
|
|
1153
|
+
// Helper function to get icon size based on button size
|
|
1154
|
+
])), baseButtonStyles, button.primary.borderRadius, getVariantStyles$1, getSizeStyles$1);
|
|
1155
|
+
// Helper function to get icon size based on button size
|
|
1156
|
+
var getIconSize = function getIconSize(buttonSize) {
|
|
1157
|
+
switch (buttonSize) {
|
|
1158
|
+
case 'small':
|
|
1159
|
+
return 'xs';
|
|
1160
|
+
case 'medium':
|
|
1161
|
+
return 'sm';
|
|
1162
|
+
case 'large':
|
|
1163
|
+
return 'md';
|
|
1164
|
+
default:
|
|
1165
|
+
return 'md';
|
|
1166
|
+
}
|
|
1167
|
+
};
|
|
1168
|
+
// Helper function to render button content with optional icon
|
|
1169
|
+
var renderButtonContent = function renderButtonContent(children, iconName, size) {
|
|
1170
|
+
if (!iconName) return children;
|
|
1171
|
+
var iconSize = getIconSize(size);
|
|
1172
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Icon, {
|
|
1173
|
+
name: iconName,
|
|
1174
|
+
size: iconSize,
|
|
1175
|
+
iconColor: "inherit"
|
|
1176
|
+
}), children);
|
|
1177
|
+
};
|
|
1178
|
+
var Button = function Button(_a) {
|
|
1179
|
+
var _b = _a.variant,
|
|
1180
|
+
variant = _b === void 0 ? "primary" : _b,
|
|
1181
|
+
_c = _a.size,
|
|
1182
|
+
size = _c === void 0 ? "large" : _c,
|
|
1183
|
+
url = _a.url,
|
|
1184
|
+
_d = _a.purpose,
|
|
1185
|
+
purpose = _d === void 0 ? 'button' : _d,
|
|
1186
|
+
children = _a.children,
|
|
1187
|
+
target = _a.target,
|
|
1188
|
+
iconName = _a.iconName,
|
|
1189
|
+
dataTestId = _a["data-testid"],
|
|
1190
|
+
rest = __rest(_a, ["variant", "size", "url", "purpose", "children", "target", "iconName", 'data-testid']);
|
|
1191
|
+
// For internal links, use Next.js Link
|
|
1192
|
+
if (purpose === 'link' && url && !url.startsWith('http') && !target) {
|
|
1193
|
+
var linkProps = rest;
|
|
1194
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
1195
|
+
href: url,
|
|
1196
|
+
passHref: true,
|
|
1197
|
+
legacyBehavior: true
|
|
1198
|
+
}, /*#__PURE__*/React.createElement(StyledLink, _extends({
|
|
1199
|
+
$variant: variant,
|
|
1200
|
+
$size: size,
|
|
1201
|
+
"data-testid": dataTestId
|
|
1202
|
+
}, linkProps), renderButtonContent(children, iconName, size)));
|
|
1203
|
+
}
|
|
1204
|
+
// For external links or links with target
|
|
1205
|
+
if (purpose === 'link' && url) {
|
|
1206
|
+
var linkProps = rest;
|
|
1207
|
+
return /*#__PURE__*/React.createElement(StyledLink, _extends({
|
|
1208
|
+
href: url,
|
|
1209
|
+
target: target,
|
|
1210
|
+
$variant: variant,
|
|
1211
|
+
$size: size,
|
|
1212
|
+
"data-testid": dataTestId
|
|
1213
|
+
}, linkProps), renderButtonContent(children, iconName, size));
|
|
1214
|
+
}
|
|
1215
|
+
// For button with URL (legacy support)
|
|
1216
|
+
if (purpose === 'button' && url) {
|
|
1217
|
+
var buttonProps_1 = rest;
|
|
1218
|
+
var handleClick = function handleClick(e) {
|
|
1219
|
+
// Call any existing onClick handler first
|
|
1220
|
+
if (buttonProps_1.onClick) {
|
|
1221
|
+
buttonProps_1.onClick(e);
|
|
1222
|
+
}
|
|
1223
|
+
// Handle navigation
|
|
1224
|
+
if (url.startsWith('http') || target) {
|
|
1225
|
+
window.open(url, target || '_self');
|
|
1226
|
+
} else {
|
|
1227
|
+
window.location.href = url;
|
|
1228
|
+
}
|
|
1229
|
+
};
|
|
1230
|
+
return /*#__PURE__*/React.createElement(StyledButton, _extends({}, buttonProps_1, {
|
|
1231
|
+
$variant: variant,
|
|
1232
|
+
$size: size,
|
|
1233
|
+
"data-testid": dataTestId,
|
|
1234
|
+
onClick: handleClick
|
|
1235
|
+
}), renderButtonContent(children, iconName, size));
|
|
1236
|
+
}
|
|
1237
|
+
// Regular button
|
|
1238
|
+
var buttonProps = rest;
|
|
1239
|
+
return /*#__PURE__*/React.createElement(StyledButton, _extends({
|
|
1240
|
+
$variant: variant,
|
|
1241
|
+
$size: size,
|
|
1242
|
+
"data-testid": dataTestId
|
|
1243
|
+
}, buttonProps), renderButtonContent(children, iconName, size));
|
|
1244
|
+
};
|
|
1245
|
+
var templateObject_1$9, templateObject_2$2;
|
|
1246
|
+
|
|
1247
|
+
var chip = tokens.component.chip;
|
|
1248
|
+
// Dynamic variant styles using component tokens
|
|
1249
|
+
var getVariantStyles = function getVariantStyles(_a) {
|
|
1250
|
+
var variant = _a.variant;
|
|
1251
|
+
switch (variant) {
|
|
1252
|
+
case 'emphasis':
|
|
1253
|
+
return "\n background-color: ".concat(chip.variants.emphasis.backgroundColor, ";\n color: ").concat(chip.variants.emphasis.textColor, ";\n ");
|
|
1254
|
+
case 'subtle':
|
|
1255
|
+
return "\n background-color: ".concat(chip.variants.subtle.backgroundColor, ";\n color: ").concat(chip.variants.subtle.textColor, ";\n ");
|
|
1256
|
+
case 'interactive':
|
|
1257
|
+
return "\n background-color: ".concat(chip.variants.interactive.backgroundColor, ";\n color: ").concat(chip.variants.interactive.textColor, ";\n ");
|
|
1258
|
+
case 'default':
|
|
1259
|
+
default:
|
|
1260
|
+
return "\n background-color: ".concat(chip["default"].backgroundColor, ";\n color: ").concat(chip["default"].textColor, ";\n ");
|
|
1261
|
+
}
|
|
1262
|
+
};
|
|
1263
|
+
// Dynamic size styles using component tokens
|
|
1264
|
+
var getSizeStyles = function getSizeStyles(_a) {
|
|
1265
|
+
var size = _a.size;
|
|
1266
|
+
switch (size) {
|
|
1267
|
+
case 'small':
|
|
1268
|
+
return "\n font: ".concat(chip.sizes.small.font, ";\n padding: ").concat(chip.sizes.small.padding, ";\n ");
|
|
1269
|
+
case 'large':
|
|
1270
|
+
return "\n font: ".concat(chip.sizes.large.font, ";\n padding: ").concat(chip.sizes.large.padding, ";\n ");
|
|
1271
|
+
case 'medium':
|
|
1272
|
+
default:
|
|
1273
|
+
return "\n font: ".concat(chip.sizes.medium.font, ";\n padding: ").concat(chip.sizes.medium.padding, ";\n ");
|
|
1274
|
+
}
|
|
1275
|
+
};
|
|
1276
|
+
// Base styled component that only receives styling props
|
|
1277
|
+
var BaseChip = styled.span.withConfig({
|
|
1278
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1279
|
+
// Explicitly list props that should NOT be forwarded to the DOM
|
|
1280
|
+
var excludedProps = ['variant', 'size', 'disabled', 'clickable'];
|
|
1281
|
+
return !excludedProps.includes(prop);
|
|
1282
|
+
}
|
|
1283
|
+
})(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: max-content;\n border-radius: ", ";\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n transition: ", ";\n \n ", "\n ", "\n \n ", "\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n"], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: max-content;\n border-radius: ", ";\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n transition: ", ";\n \n ", "\n ", "\n \n ", "\n \n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n"
|
|
1284
|
+
// Wrapper component that handles prop filtering
|
|
1285
|
+
])), chip["default"].borderRadius, tokens.semantic.motion.interactive, getVariantStyles, getSizeStyles, function (_a) {
|
|
1286
|
+
var clickable = _a.clickable,
|
|
1287
|
+
disabled = _a.disabled;
|
|
1288
|
+
if (disabled) {
|
|
1289
|
+
return "\n opacity: 0.6;\n cursor: not-allowed;\n ";
|
|
1290
|
+
}
|
|
1291
|
+
if (clickable) {
|
|
1292
|
+
return "\n cursor: pointer;\n \n &:hover {\n opacity: 0.8;\n }\n \n &:active {\n opacity: 0.9;\n }\n ";
|
|
1293
|
+
}
|
|
1294
|
+
return '';
|
|
1295
|
+
}, chip.variants.interactive.backgroundColor);
|
|
1296
|
+
// Wrapper component that handles prop filtering
|
|
1297
|
+
var StyledChip = function StyledChip(_a) {
|
|
1298
|
+
var variant = _a.variant,
|
|
1299
|
+
size = _a.size,
|
|
1300
|
+
disabled = _a.disabled,
|
|
1301
|
+
clickable = _a.clickable,
|
|
1302
|
+
children = _a.children,
|
|
1303
|
+
htmlProps = __rest(_a, ["variant", "size", "disabled", "clickable", "children"]);
|
|
1304
|
+
// Filter out any remaining non-HTML props to ensure they don't reach the DOM
|
|
1305
|
+
var cleanHtmlProps = __rest(htmlProps, []);
|
|
1306
|
+
return /*#__PURE__*/React.createElement(BaseChip, _extends({
|
|
1307
|
+
variant: variant,
|
|
1308
|
+
size: size,
|
|
1309
|
+
disabled: disabled,
|
|
1310
|
+
clickable: clickable
|
|
1311
|
+
}, cleanHtmlProps), children);
|
|
1312
|
+
};
|
|
1313
|
+
var Chip = function Chip(_a) {
|
|
1314
|
+
var children = _a.children,
|
|
1315
|
+
_b = _a.variant,
|
|
1316
|
+
variant = _b === void 0 ? 'default' : _b,
|
|
1317
|
+
_e = _a.size,
|
|
1318
|
+
size = _e === void 0 ? 'medium' : _e,
|
|
1319
|
+
onClick = _a.onClick,
|
|
1320
|
+
_f = _a.disabled,
|
|
1321
|
+
disabled = _f === void 0 ? false : _f,
|
|
1322
|
+
dataTestId = _a["data-testid"],
|
|
1323
|
+
ariaLabel = _a["aria-label"],
|
|
1324
|
+
ariaDescribedBy = _a["aria-describedby"],
|
|
1325
|
+
role = _a.role,
|
|
1326
|
+
title = _a.title,
|
|
1327
|
+
// Legacy prop support
|
|
1328
|
+
props = __rest(_a, ["children", "variant", "size", "onClick", "disabled", 'data-testid', 'aria-label', 'aria-describedby', "role", "title"]);
|
|
1329
|
+
var isClickable = Boolean(onClick && !disabled);
|
|
1330
|
+
// Map legacy variants to new variants for backward compatibility
|
|
1331
|
+
var normalizedVariant = variant === 'light' ? 'default' : variant === 'dark' ? 'emphasis' : variant;
|
|
1332
|
+
// Support legacy title prop - prioritize children over title
|
|
1333
|
+
var content = children !== undefined ? children : title;
|
|
1334
|
+
// Remove styled-only props from the rest
|
|
1335
|
+
var _g = props;
|
|
1336
|
+
_g.variant;
|
|
1337
|
+
_g.size;
|
|
1338
|
+
_g.disabled;
|
|
1339
|
+
_g.clickable;
|
|
1340
|
+
var htmlProps = __rest(_g, ["variant", "size", "disabled", "clickable"]);
|
|
1341
|
+
var handleClick = function handleClick() {
|
|
1342
|
+
if (onClick && !disabled) {
|
|
1343
|
+
onClick();
|
|
1344
|
+
}
|
|
1345
|
+
};
|
|
1346
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
1347
|
+
if (isClickable && (event.key === 'Enter' || event.key === ' ')) {
|
|
1348
|
+
event.preventDefault();
|
|
1349
|
+
handleClick();
|
|
1350
|
+
}
|
|
1351
|
+
};
|
|
1352
|
+
return /*#__PURE__*/React.createElement(StyledChip, _extends({
|
|
1353
|
+
variant: normalizedVariant,
|
|
1354
|
+
size: size,
|
|
1355
|
+
disabled: disabled,
|
|
1356
|
+
clickable: isClickable,
|
|
1357
|
+
onClick: isClickable ? handleClick : undefined,
|
|
1358
|
+
onKeyDown: isClickable ? handleKeyDown : undefined,
|
|
1359
|
+
tabIndex: isClickable ? 0 : undefined,
|
|
1360
|
+
role: role || (isClickable ? 'button' : undefined),
|
|
1361
|
+
"aria-label": ariaLabel,
|
|
1362
|
+
"aria-describedby": ariaDescribedBy,
|
|
1363
|
+
"aria-disabled": disabled ? 'true' : undefined,
|
|
1364
|
+
"data-testid": dataTestId
|
|
1365
|
+
}, htmlProps), content);
|
|
1366
|
+
};
|
|
1367
|
+
// Legacy component for backward compatibility
|
|
1368
|
+
var LegacyChip = function LegacyChip(_a) {
|
|
1369
|
+
var title = _a.title,
|
|
1370
|
+
_b = _a.variant,
|
|
1371
|
+
variant = _b === void 0 ? 'light' : _b;
|
|
1372
|
+
// Map legacy variants to new variants
|
|
1373
|
+
var newVariant = variant === 'dark' ? 'emphasis' : 'default';
|
|
1374
|
+
return /*#__PURE__*/React.createElement(Chip, {
|
|
1375
|
+
variant: newVariant
|
|
1376
|
+
}, title);
|
|
1377
|
+
};
|
|
1378
|
+
var templateObject_1$8;
|
|
1379
|
+
|
|
1380
|
+
// Breakpoints using base tokens
|
|
1381
|
+
var breakpoints$1 = {
|
|
1382
|
+
xs: tokens.base.breakpoint.xs,
|
|
1383
|
+
sm: tokens.base.breakpoint.sm,
|
|
1384
|
+
md: tokens.base.breakpoint.md,
|
|
1385
|
+
lg: tokens.base.breakpoint.lg,
|
|
1386
|
+
xl: tokens.base.breakpoint.xl,
|
|
1387
|
+
'2xl': tokens.base.breakpoint['2xl']
|
|
1388
|
+
};
|
|
1389
|
+
// Media query helpers
|
|
1390
|
+
var media$1 = {
|
|
1391
|
+
xs: "@media (min-width: ".concat(breakpoints$1.xs, ")"),
|
|
1392
|
+
sm: "@media (min-width: ".concat(breakpoints$1.sm, ")"),
|
|
1393
|
+
md: "@media (min-width: ".concat(breakpoints$1.md, ")"),
|
|
1394
|
+
lg: "@media (min-width: ".concat(breakpoints$1.lg, ")"),
|
|
1395
|
+
xl: "@media (min-width: ".concat(breakpoints$1.xl, ")"),
|
|
1396
|
+
'2xl': "@media (min-width: ".concat(breakpoints$1['2xl'], ")")
|
|
1397
|
+
};
|
|
1398
|
+
|
|
1399
|
+
var spacing = tokens.semantic.spacing;
|
|
1400
|
+
var StyledContainer = styled.div(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n padding-left: ", ";\n padding-right: ", ";\n \n ", " {\n max-width: 640px;\n }\n \n ", " {\n max-width: 768px;\n }\n \n ", " {\n max-width: 1024px;\n }\n \n ", " {\n max-width: 1280px;\n }\n \n ", " {\n max-width: 1536px;\n }\n"], ["\n width: 100%;\n margin-left: auto;\n margin-right: auto;\n padding-left: ", ";\n padding-right: ", ";\n \n ", " {\n max-width: 640px;\n }\n \n ", " {\n max-width: 768px;\n }\n \n ", " {\n max-width: 1024px;\n }\n \n ", " {\n max-width: 1280px;\n }\n \n ", " {\n max-width: 1536px;\n }\n"])), spacing.layout['2xl'], spacing.layout['2xl'], media$1.sm, media$1.md, media$1.lg, media$1.xl, media$1['2xl']);
|
|
1401
|
+
var Container = function Container(_a) {
|
|
1402
|
+
var children = _a.children,
|
|
1403
|
+
props = __rest(_a, ["children"]);
|
|
1404
|
+
return /*#__PURE__*/React.createElement(StyledContainer, props, children);
|
|
1405
|
+
};
|
|
1406
|
+
var templateObject_1$7;
|
|
1407
|
+
|
|
1408
|
+
var base = tokens.base;
|
|
1409
|
+
var CoverImageWrapper = styled.div(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n margin: 0 auto;\n \n ", " {\n margin-left: 0;\n margin-right: 0;\n }\n"], ["\n margin: 0 auto;\n \n ", " {\n margin-left: 0;\n margin-right: 0;\n }\n"])), media$1.sm);
|
|
1410
|
+
var ImageLink = styled(Link)(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n display: block;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"], ["\n display: block;\n transition: opacity ", " ", ";\n \n &:hover {\n opacity: 0.8;\n }\n"])), base.duration.normal, base.easing.easeInOut);
|
|
1411
|
+
var StyledImage = styled(Image)(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n width: 100%;\n height: auto;\n border-radius: ", ";\n"], ["\n width: 100%;\n height: auto;\n border-radius: ", ";\n"])), base.border.radius[2]);
|
|
1412
|
+
var CoverImage = function CoverImage(_a) {
|
|
1413
|
+
var title = _a.title,
|
|
1414
|
+
src = _a.src,
|
|
1415
|
+
slug = _a.slug,
|
|
1416
|
+
_b = _a.width,
|
|
1417
|
+
width = _b === void 0 ? 1300 : _b,
|
|
1418
|
+
_c = _a.height,
|
|
1419
|
+
height = _c === void 0 ? 630 : _c,
|
|
1420
|
+
dataTestId = _a["data-testid"];
|
|
1421
|
+
var image = /*#__PURE__*/React.createElement(StyledImage, {
|
|
1422
|
+
src: src,
|
|
1423
|
+
alt: "Cover Image for ".concat(title),
|
|
1424
|
+
width: width,
|
|
1425
|
+
height: height,
|
|
1426
|
+
placeholder: "blur",
|
|
1427
|
+
blurDataURL: src,
|
|
1428
|
+
priority: !!slug
|
|
1429
|
+
});
|
|
1430
|
+
return /*#__PURE__*/React.createElement(CoverImageWrapper, {
|
|
1431
|
+
"data-testid": dataTestId
|
|
1432
|
+
}, slug ? /*#__PURE__*/React.createElement(ImageLink, {
|
|
1433
|
+
href: "/posts/".concat(slug),
|
|
1434
|
+
"aria-label": "Read more about ".concat(title)
|
|
1435
|
+
}, image) : image);
|
|
1436
|
+
};
|
|
1437
|
+
var templateObject_1$6, templateObject_2$1, templateObject_3$1;
|
|
1438
|
+
|
|
1439
|
+
var motion = tokens.semantic.motion,
|
|
1440
|
+
iconButton = tokens.component.iconButton;
|
|
1441
|
+
var IconButtonStyled = styled.button.withConfig({
|
|
1442
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1443
|
+
return !['$variant', '$size'].includes(prop);
|
|
1444
|
+
}
|
|
1445
|
+
})(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n background-color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: ", ";\n justify-content: ", ";\n align-items: ", ";\n height: max-content;\n cursor: pointer;\n position: relative;\n\n /* Size-specific dimensions from component tokens */\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n\n /* High contrast mode support */\n @media (prefers-contrast: high) {\n border: 1px solid;\n }\n\n /* Reduced motion support */\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n"], ["\n background-color: ", ";\n border: none;\n border-radius: ", ";\n transition: ", ";\n box-sizing: border-box;\n display: ", ";\n justify-content: ", ";\n align-items: ", ";\n height: max-content;\n cursor: pointer;\n position: relative;\n\n /* Size-specific dimensions from component tokens */\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n\n &:focus {\n outline: ", ";\n outline-offset: ", ";\n }\n\n &:disabled {\n background-color: ", ";\n cursor: not-allowed;\n }\n\n /* High contrast mode support */\n @media (prefers-contrast: high) {\n border: 1px solid;\n }\n\n /* Reduced motion support */\n @media (prefers-reduced-motion: reduce) {\n transition: none;\n }\n"])), function (_a) {
|
|
1446
|
+
var $variant = _a.$variant;
|
|
1447
|
+
switch ($variant) {
|
|
1448
|
+
case 'primary':
|
|
1449
|
+
return iconButton.primary.backgroundColor;
|
|
1450
|
+
case 'secondary':
|
|
1451
|
+
return iconButton.variants.secondary.backgroundColor;
|
|
1452
|
+
case 'naked':
|
|
1453
|
+
return iconButton.variants.naked.backgroundColor;
|
|
1454
|
+
default:
|
|
1455
|
+
return iconButton.primary.backgroundColor;
|
|
1456
|
+
}
|
|
1457
|
+
}, iconButton.primary.borderRadius, motion.transition.normal, iconButton.primary.display, iconButton.primary.justifyContent, iconButton.primary.alignItems, function (_a) {
|
|
1458
|
+
var $size = _a.$size;
|
|
1459
|
+
return iconButton.sizes[$size].minWidth;
|
|
1460
|
+
}, function (_a) {
|
|
1461
|
+
var $size = _a.$size;
|
|
1462
|
+
return iconButton.sizes[$size].minHeight;
|
|
1463
|
+
}, function (_a) {
|
|
1464
|
+
var $size = _a.$size;
|
|
1465
|
+
return iconButton.sizes[$size].padding;
|
|
1466
|
+
}, function (_a) {
|
|
1467
|
+
var $variant = _a.$variant;
|
|
1468
|
+
switch ($variant) {
|
|
1469
|
+
case 'primary':
|
|
1470
|
+
return iconButton.hover.backgroundColor;
|
|
1471
|
+
case 'secondary':
|
|
1472
|
+
return iconButton.variants.secondary.hover.backgroundColor;
|
|
1473
|
+
case 'naked':
|
|
1474
|
+
return iconButton.variants.naked.hover.backgroundColor;
|
|
1475
|
+
default:
|
|
1476
|
+
return iconButton.hover.backgroundColor;
|
|
1477
|
+
}
|
|
1478
|
+
}, iconButton.active.backgroundColor, iconButton.focus.outline, iconButton.focus.outlineOffset, iconButton.disabled.backgroundColor);
|
|
1479
|
+
var IconButton = function IconButton(_a) {
|
|
1480
|
+
var variant = _a.variant,
|
|
1481
|
+
_b = _a.size,
|
|
1482
|
+
size = _b === void 0 ? 'medium' : _b,
|
|
1483
|
+
url = _a.url,
|
|
1484
|
+
_c = _a.iconName,
|
|
1485
|
+
iconName = _c === void 0 ? 'close' : _c,
|
|
1486
|
+
onClick = _a.onClick,
|
|
1487
|
+
ariaLabel = _a["aria-label"],
|
|
1488
|
+
ariaDescribedBy = _a["aria-describedby"],
|
|
1489
|
+
ariaExpanded = _a["aria-expanded"],
|
|
1490
|
+
ariaPressed = _a["aria-pressed"],
|
|
1491
|
+
dataTestId = _a["data-testid"],
|
|
1492
|
+
disabled = _a.disabled,
|
|
1493
|
+
_d = _a.type,
|
|
1494
|
+
type = _d === void 0 ? 'button' : _d,
|
|
1495
|
+
htmlProps = __rest(_a, ["variant", "size", "url", "iconName", "onClick", 'aria-label', 'aria-describedby', 'aria-expanded', 'aria-pressed', 'data-testid', "disabled", "type"]);
|
|
1496
|
+
var handleClick = function handleClick(event) {
|
|
1497
|
+
// Prevent default if disabled
|
|
1498
|
+
if (disabled) {
|
|
1499
|
+
event.preventDefault();
|
|
1500
|
+
return;
|
|
1501
|
+
}
|
|
1502
|
+
if (onClick) {
|
|
1503
|
+
onClick();
|
|
1504
|
+
} else if (url && url.trim() !== '') {
|
|
1505
|
+
// Use proper navigation instead of direct href assignment
|
|
1506
|
+
if (url.startsWith('http') || url.startsWith('//')) {
|
|
1507
|
+
window.open(url, '_blank', 'noopener,noreferrer');
|
|
1508
|
+
} else {
|
|
1509
|
+
window.location.assign(url);
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
};
|
|
1513
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
1514
|
+
// Handle keyboard activation (Enter and Space)
|
|
1515
|
+
if (disabled) return;
|
|
1516
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
1517
|
+
event.preventDefault();
|
|
1518
|
+
handleClick(event);
|
|
1519
|
+
}
|
|
1520
|
+
};
|
|
1521
|
+
var iconSize = size === 'large' ? 'lg' : size === 'small' ? 'sm' : 'md';
|
|
1522
|
+
var getIconColor = function getIconColor(variant) {
|
|
1523
|
+
switch (variant) {
|
|
1524
|
+
case 'primary':
|
|
1525
|
+
return 'inverse';
|
|
1526
|
+
case 'secondary':
|
|
1527
|
+
return 'default';
|
|
1528
|
+
case 'naked':
|
|
1529
|
+
return 'default';
|
|
1530
|
+
default:
|
|
1531
|
+
return 'default';
|
|
1532
|
+
}
|
|
1533
|
+
};
|
|
1534
|
+
return /*#__PURE__*/React.createElement(IconButtonStyled, _extends({
|
|
1535
|
+
$variant: variant,
|
|
1536
|
+
$size: size,
|
|
1537
|
+
onClick: handleClick,
|
|
1538
|
+
onKeyDown: handleKeyDown,
|
|
1539
|
+
disabled: disabled,
|
|
1540
|
+
type: type,
|
|
1541
|
+
role: "button",
|
|
1542
|
+
"aria-label": ariaLabel,
|
|
1543
|
+
"aria-describedby": ariaDescribedBy,
|
|
1544
|
+
"aria-expanded": ariaExpanded,
|
|
1545
|
+
"aria-pressed": ariaPressed,
|
|
1546
|
+
"aria-disabled": disabled,
|
|
1547
|
+
tabIndex: disabled ? -1 : 0,
|
|
1548
|
+
"data-testid": dataTestId
|
|
1549
|
+
}, htmlProps), /*#__PURE__*/React.createElement(Icon, {
|
|
1550
|
+
name: iconName,
|
|
1551
|
+
size: iconSize,
|
|
1552
|
+
iconColor: getIconColor(variant),
|
|
1553
|
+
"aria-hidden": "true" // Hide icon from screen readers since button has aria-label
|
|
1554
|
+
}));
|
|
1555
|
+
};
|
|
1556
|
+
var templateObject_1$5;
|
|
1557
|
+
|
|
1558
|
+
var StyledSeparator = styled.div.withConfig({
|
|
1559
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1560
|
+
return !['$variant', '$size'].includes(prop);
|
|
1561
|
+
}
|
|
1562
|
+
})(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n border: none;\n border-top: 1px solid;\n \n /* Apply variant styles */\n ", "\n \n /* Apply size styles */\n ", "\n"], ["\n border: none;\n border-top: 1px solid;\n \n /* Apply variant styles */\n ", "\n \n /* Apply size styles */\n ", "\n"
|
|
1563
|
+
/**
|
|
1564
|
+
* SectionSeparator is an atomic component that provides visual separation between content sections.
|
|
1565
|
+
*
|
|
1566
|
+
* Features:
|
|
1567
|
+
* - Multiple variants (default, strong, minimal)
|
|
1568
|
+
* - Size variations for different spacing needs
|
|
1569
|
+
* - Semantic token usage for consistent styling
|
|
1570
|
+
* - Full accessibility support
|
|
1571
|
+
*
|
|
1572
|
+
* @example
|
|
1573
|
+
* ```tsx
|
|
1574
|
+
* <SectionSeparator />
|
|
1575
|
+
* <SectionSeparator variant="strong" size="xlarge" />
|
|
1576
|
+
* <SectionSeparator variant="minimal" />
|
|
1577
|
+
* ```
|
|
1578
|
+
*/])), function (_a) {
|
|
1579
|
+
var _b = _a.$variant,
|
|
1580
|
+
$variant = _b === void 0 ? 'default' : _b;
|
|
1581
|
+
switch ($variant) {
|
|
1582
|
+
case 'strong':
|
|
1583
|
+
return "border-top: ".concat(tokens.component.separator.variants.strong.border, ";");
|
|
1584
|
+
case 'minimal':
|
|
1585
|
+
return "border-top: ".concat(tokens.component.separator.variants.minimal.border, ";");
|
|
1586
|
+
case 'default':
|
|
1587
|
+
default:
|
|
1588
|
+
return "border-top: ".concat(tokens.component.separator.variants["default"].border, ";");
|
|
1589
|
+
}
|
|
1590
|
+
}, function (_a) {
|
|
1591
|
+
var _b = _a.$size,
|
|
1592
|
+
$size = _b === void 0 ? 'large' : _b,
|
|
1593
|
+
_c = _a.$variant,
|
|
1594
|
+
$variant = _c === void 0 ? 'default' : _c;
|
|
1595
|
+
if ($variant === 'minimal') {
|
|
1596
|
+
// Minimal variant always uses its predefined spacing
|
|
1597
|
+
return "margin: ".concat(tokens.component.separator.variants.minimal.margin, ";");
|
|
1598
|
+
}
|
|
1599
|
+
switch ($size) {
|
|
1600
|
+
case 'small':
|
|
1601
|
+
return "margin: ".concat(tokens.component.separator.sizes.small.margin, ";");
|
|
1602
|
+
case 'medium':
|
|
1603
|
+
return "margin: ".concat(tokens.component.separator.sizes.medium.margin, ";");
|
|
1604
|
+
case 'xlarge':
|
|
1605
|
+
return "margin: ".concat(tokens.component.separator.sizes.xlarge.margin, ";");
|
|
1606
|
+
case 'large':
|
|
1607
|
+
default:
|
|
1608
|
+
return "margin: ".concat(tokens.component.separator.sizes.large.margin, ";");
|
|
1609
|
+
}
|
|
1610
|
+
});
|
|
1611
|
+
/**
|
|
1612
|
+
* SectionSeparator is an atomic component that provides visual separation between content sections.
|
|
1613
|
+
*
|
|
1614
|
+
* Features:
|
|
1615
|
+
* - Multiple variants (default, strong, minimal)
|
|
1616
|
+
* - Size variations for different spacing needs
|
|
1617
|
+
* - Semantic token usage for consistent styling
|
|
1618
|
+
* - Full accessibility support
|
|
1619
|
+
*
|
|
1620
|
+
* @example
|
|
1621
|
+
* ```tsx
|
|
1622
|
+
* <SectionSeparator />
|
|
1623
|
+
* <SectionSeparator variant="strong" size="xlarge" />
|
|
1624
|
+
* <SectionSeparator variant="minimal" />
|
|
1625
|
+
* ```
|
|
1626
|
+
*/
|
|
1627
|
+
var SectionSeparator = function SectionSeparator(_a) {
|
|
1628
|
+
var _b = _a.variant,
|
|
1629
|
+
variant = _b === void 0 ? 'default' : _b,
|
|
1630
|
+
_c = _a.size,
|
|
1631
|
+
size = _c === void 0 ? 'large' : _c,
|
|
1632
|
+
dataTestId = _a["data-testid"];
|
|
1633
|
+
return /*#__PURE__*/React.createElement(StyledSeparator, {
|
|
1634
|
+
$variant: variant,
|
|
1635
|
+
$size: size,
|
|
1636
|
+
"data-testid": dataTestId,
|
|
1637
|
+
role: "separator",
|
|
1638
|
+
"aria-orientation": "horizontal"
|
|
1639
|
+
});
|
|
1640
|
+
};
|
|
1641
|
+
var templateObject_1$4;
|
|
1642
|
+
|
|
1643
|
+
var StyledStack = styled.div.withConfig({
|
|
1644
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1645
|
+
return !['$direction', '$gap', '$alignItems', '$justifyContent', '$wrap'].includes(prop);
|
|
1646
|
+
}
|
|
1647
|
+
})(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n display: flex;\n flex-direction: ", ";\n align-items: ", ";\n justify-content: ", ";\n gap: ", ";\n flex-wrap: ", ";\n"], ["\n display: flex;\n flex-direction: ", ";\n align-items: ", ";\n justify-content: ", ";\n gap: ", ";\n flex-wrap: ", ";\n"
|
|
1648
|
+
// Helper function to convert gap prop to CSS value
|
|
1649
|
+
])), function (_a) {
|
|
1650
|
+
var $direction = _a.$direction;
|
|
1651
|
+
return $direction;
|
|
1652
|
+
}, function (_a) {
|
|
1653
|
+
var $alignItems = _a.$alignItems;
|
|
1654
|
+
return $alignItems || 'initial';
|
|
1655
|
+
}, function (_a) {
|
|
1656
|
+
var $justifyContent = _a.$justifyContent;
|
|
1657
|
+
return $justifyContent || 'initial';
|
|
1658
|
+
}, function (_a) {
|
|
1659
|
+
var $gap = _a.$gap;
|
|
1660
|
+
return $gap;
|
|
1661
|
+
}, function (_a) {
|
|
1662
|
+
var $wrap = _a.$wrap;
|
|
1663
|
+
return $wrap ? 'wrap' : 'nowrap';
|
|
1664
|
+
});
|
|
1665
|
+
// Helper function to convert gap prop to CSS value
|
|
1666
|
+
var getGapValue = function getGapValue(gap) {
|
|
1667
|
+
// Get semantic layout spacing token
|
|
1668
|
+
var semanticSpacing = tokens.semantic.spacing.layout;
|
|
1669
|
+
if (gap in semanticSpacing) {
|
|
1670
|
+
return semanticSpacing[gap];
|
|
1671
|
+
}
|
|
1672
|
+
// Fallback to medium layout spacing if token not found
|
|
1673
|
+
return tokens.semantic.spacing.layout.md;
|
|
1674
|
+
};
|
|
1675
|
+
var Stack = function Stack(_a) {
|
|
1676
|
+
var children = _a.children,
|
|
1677
|
+
_b = _a.direction,
|
|
1678
|
+
direction = _b === void 0 ? 'row' : _b,
|
|
1679
|
+
_c = _a.gap,
|
|
1680
|
+
gap = _c === void 0 ? 'md' : _c,
|
|
1681
|
+
alignItems = _a.alignItems,
|
|
1682
|
+
justifyContent = _a.justifyContent,
|
|
1683
|
+
_d = _a.wrap,
|
|
1684
|
+
wrap = _d === void 0 ? false : _d,
|
|
1685
|
+
dataTestId = _a["data-testid"];
|
|
1686
|
+
var gapValue = getGapValue(gap);
|
|
1687
|
+
return /*#__PURE__*/React.createElement(StyledStack, {
|
|
1688
|
+
$direction: direction,
|
|
1689
|
+
$gap: gapValue,
|
|
1690
|
+
$alignItems: alignItems,
|
|
1691
|
+
$justifyContent: justifyContent,
|
|
1692
|
+
$wrap: wrap,
|
|
1693
|
+
"data-testid": dataTestId
|
|
1694
|
+
}, children);
|
|
1695
|
+
};
|
|
1696
|
+
var templateObject_1$3;
|
|
1697
|
+
|
|
1698
|
+
var _a$1 = tokens.semantic,
|
|
1699
|
+
typography$1 = _a$1.typography,
|
|
1700
|
+
color$1 = _a$1.color;
|
|
1701
|
+
var getTypographyStyles = function getTypographyStyles(variant) {
|
|
1702
|
+
var styles = {
|
|
1703
|
+
display: "font: ".concat(typography$1.display, "; letter-spacing: ").concat(tokens.base.letterSpacing[0], ";"),
|
|
1704
|
+
h1: "font: ".concat(typography$1.h1, "; letter-spacing: ").concat(tokens.base.letterSpacing[0], ";"),
|
|
1705
|
+
h2: "font: ".concat(typography$1.h2, "; letter-spacing: ").concat(tokens.base.letterSpacing[1], ";"),
|
|
1706
|
+
h3: "font: ".concat(typography$1.h3, "; letter-spacing: ").concat(tokens.base.letterSpacing[1], ";"),
|
|
1707
|
+
h4: "font: ".concat(typography$1.h4, "; letter-spacing: ").concat(tokens.base.letterSpacing[1], ";"),
|
|
1708
|
+
h5: "font: ".concat(typography$1.h5, "; letter-spacing: ").concat(tokens.base.letterSpacing[2], ";"),
|
|
1709
|
+
h6: "font: ".concat(typography$1.h6, "; letter-spacing: ").concat(tokens.base.letterSpacing[2], ";"),
|
|
1710
|
+
subtitle: "font: ".concat(typography$1.subtitle, ";"),
|
|
1711
|
+
body: "font: ".concat(typography$1.body, ";"),
|
|
1712
|
+
small: "font: ".concat(typography$1.small, ";"),
|
|
1713
|
+
overline: "font: ".concat(typography$1.overline, ";"),
|
|
1714
|
+
caption: "font: ".concat(typography$1.caption, "; text-transform: uppercase;"),
|
|
1715
|
+
button1: "font: ".concat(typography$1.button1, ";"),
|
|
1716
|
+
button2: "font: ".concat(typography$1.button2, ";"),
|
|
1717
|
+
button3: "font: ".concat(typography$1.button3, ";"),
|
|
1718
|
+
label: "font: ".concat(typography$1.label, ";")
|
|
1719
|
+
};
|
|
1720
|
+
return styles[variant] || styles.body;
|
|
1721
|
+
};
|
|
1722
|
+
var getTextColor = function getTextColor(colorVariant) {
|
|
1723
|
+
var colorMap = {
|
|
1724
|
+
"default": color$1.text["default"],
|
|
1725
|
+
emphasis: color$1.text.emphasis,
|
|
1726
|
+
subdued: color$1.text.subdued,
|
|
1727
|
+
inverse: color$1.text.inverse,
|
|
1728
|
+
disabled: color$1.text.disabled,
|
|
1729
|
+
interactive: color$1.text.interactive,
|
|
1730
|
+
error: color$1.text.error,
|
|
1731
|
+
success: color$1.text.success,
|
|
1732
|
+
warning: color$1.text.warning
|
|
1733
|
+
};
|
|
1734
|
+
return colorMap[colorVariant] || colorMap["default"];
|
|
1735
|
+
};
|
|
1736
|
+
var getDefaultElement = function getDefaultElement(variant) {
|
|
1737
|
+
var elementMap = {
|
|
1738
|
+
display: 'h1',
|
|
1739
|
+
h1: 'h1',
|
|
1740
|
+
h2: 'h2',
|
|
1741
|
+
h3: 'h3',
|
|
1742
|
+
h4: 'h4',
|
|
1743
|
+
h5: 'h5',
|
|
1744
|
+
h6: 'h6',
|
|
1745
|
+
subtitle: 'p',
|
|
1746
|
+
body: 'p',
|
|
1747
|
+
small: 'span',
|
|
1748
|
+
overline: 'span',
|
|
1749
|
+
caption: 'span',
|
|
1750
|
+
button1: 'span',
|
|
1751
|
+
button2: 'span',
|
|
1752
|
+
button3: 'span',
|
|
1753
|
+
label: 'span'
|
|
1754
|
+
};
|
|
1755
|
+
return elementMap[variant] || 'span';
|
|
1756
|
+
};
|
|
1757
|
+
var StyledTypography = styled.span.withConfig({
|
|
1758
|
+
shouldForwardProp: function shouldForwardProp(prop) {
|
|
1759
|
+
return !['$variant', '$color'].includes(prop);
|
|
1760
|
+
}
|
|
1761
|
+
})(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n ", "\n color: ", ";\n margin: 0;\n \n /* Ensure proper line height for readability */\n ", "\n"], ["\n ", "\n color: ", ";\n margin: 0;\n \n /* Ensure proper line height for readability */\n ", "\n"
|
|
1762
|
+
/**
|
|
1763
|
+
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
1764
|
+
*
|
|
1765
|
+
* Features:
|
|
1766
|
+
* - Semantic variants (h1-h6, body, subtitle, etc.)
|
|
1767
|
+
* - Color variants for different contexts
|
|
1768
|
+
* - Automatic semantic HTML element selection
|
|
1769
|
+
* - Manual element override support
|
|
1770
|
+
* - Direct semantic token usage (no component tokens needed)
|
|
1771
|
+
* - Full accessibility support
|
|
1772
|
+
*
|
|
1773
|
+
* @example
|
|
1774
|
+
* ```tsx
|
|
1775
|
+
* <Typography variant="h1">Main Heading</Typography>
|
|
1776
|
+
* <Typography variant="body" color="subdued">Body text</Typography>
|
|
1777
|
+
* <Typography variant="caption" as="figcaption">Image caption</Typography>
|
|
1778
|
+
* ```
|
|
1779
|
+
*/])), function (_a) {
|
|
1780
|
+
var $variant = _a.$variant;
|
|
1781
|
+
return getTypographyStyles($variant);
|
|
1782
|
+
}, function (_a) {
|
|
1783
|
+
var $color = _a.$color;
|
|
1784
|
+
return getTextColor($color);
|
|
1785
|
+
}, function (_a) {
|
|
1786
|
+
var $variant = _a.$variant;
|
|
1787
|
+
if (['body', 'subtitle', 'small'].includes($variant)) {
|
|
1788
|
+
return 'line-height: 1.5;';
|
|
1789
|
+
}
|
|
1790
|
+
return '';
|
|
1791
|
+
});
|
|
1792
|
+
/**
|
|
1793
|
+
* Typography is an atomic component for rendering text with semantic meaning and consistent styling.
|
|
1794
|
+
*
|
|
1795
|
+
* Features:
|
|
1796
|
+
* - Semantic variants (h1-h6, body, subtitle, etc.)
|
|
1797
|
+
* - Color variants for different contexts
|
|
1798
|
+
* - Automatic semantic HTML element selection
|
|
1799
|
+
* - Manual element override support
|
|
1800
|
+
* - Direct semantic token usage (no component tokens needed)
|
|
1801
|
+
* - Full accessibility support
|
|
1802
|
+
*
|
|
1803
|
+
* @example
|
|
1804
|
+
* ```tsx
|
|
1805
|
+
* <Typography variant="h1">Main Heading</Typography>
|
|
1806
|
+
* <Typography variant="body" color="subdued">Body text</Typography>
|
|
1807
|
+
* <Typography variant="caption" as="figcaption">Image caption</Typography>
|
|
1808
|
+
* ```
|
|
1809
|
+
*/
|
|
1810
|
+
var Typography = function Typography(_a) {
|
|
1811
|
+
var _b = _a.variant,
|
|
1812
|
+
variant = _b === void 0 ? 'body' : _b,
|
|
1813
|
+
children = _a.children,
|
|
1814
|
+
_c = _a.color,
|
|
1815
|
+
color = _c === void 0 ? 'default' : _c,
|
|
1816
|
+
as = _a.as,
|
|
1817
|
+
dataTestId = _a["data-testid"];
|
|
1818
|
+
// $variant and $color are only used for styled-components prop filtering
|
|
1819
|
+
var defaultElement = getDefaultElement(variant);
|
|
1820
|
+
var elementType = as || defaultElement;
|
|
1821
|
+
return /*#__PURE__*/React.createElement(StyledTypography, {
|
|
1822
|
+
as: elementType,
|
|
1823
|
+
$variant: variant,
|
|
1824
|
+
$color: color,
|
|
1825
|
+
"data-testid": dataTestId
|
|
1826
|
+
}, children);
|
|
1827
|
+
};
|
|
1828
|
+
var templateObject_1$2;
|
|
1829
|
+
|
|
1830
|
+
// Breakpoints using base tokens
|
|
1831
|
+
var breakpoints = {
|
|
1832
|
+
xs: tokens.base.breakpoint.xs,
|
|
1833
|
+
sm: tokens.base.breakpoint.sm,
|
|
1834
|
+
md: tokens.base.breakpoint.md,
|
|
1835
|
+
lg: tokens.base.breakpoint.lg,
|
|
1836
|
+
xl: tokens.base.breakpoint.xl,
|
|
1837
|
+
'2xl': tokens.base.breakpoint['2xl']
|
|
1838
|
+
};
|
|
1839
|
+
// Media query helpers
|
|
1840
|
+
var media = {
|
|
1841
|
+
xs: "@media (min-width: ".concat(breakpoints.xs, ")"),
|
|
1842
|
+
sm: "@media (min-width: ".concat(breakpoints.sm, ")"),
|
|
1843
|
+
md: "@media (min-width: ".concat(breakpoints.md, ")"),
|
|
1844
|
+
lg: "@media (min-width: ".concat(breakpoints.lg, ")"),
|
|
1845
|
+
xl: "@media (min-width: ".concat(breakpoints.xl, ")"),
|
|
1846
|
+
'2xl': "@media (min-width: ".concat(breakpoints['2xl'], ")")
|
|
1847
|
+
};
|
|
1848
|
+
var GridContainer = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: grid;\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n \n ", "\n ", "\n ", "\n"], ["\n display: grid;\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n \n ", "\n ", "\n ", "\n"])), function (props) {
|
|
1849
|
+
return props.$cols;
|
|
1850
|
+
}, function (props) {
|
|
1851
|
+
return props.$gap && css(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["gap: ", ";"], ["gap: ", ";"])), props.$gap);
|
|
1852
|
+
}, function (props) {
|
|
1853
|
+
return props.$gapX && css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["column-gap: ", ";"], ["column-gap: ", ";"])), props.$gapX);
|
|
1854
|
+
}, function (props) {
|
|
1855
|
+
return props.$gapY && css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["row-gap: ", ";"], ["row-gap: ", ";"])), props.$gapY);
|
|
1856
|
+
});
|
|
1857
|
+
var Grid = function Grid(_a) {
|
|
1858
|
+
var _b = _a.cols,
|
|
1859
|
+
cols = _b === void 0 ? 12 : _b,
|
|
1860
|
+
gap = _a.gap,
|
|
1861
|
+
gapX = _a.gapX,
|
|
1862
|
+
gapY = _a.gapY,
|
|
1863
|
+
className = _a.className,
|
|
1864
|
+
children = _a.children;
|
|
1865
|
+
return /*#__PURE__*/React.createElement(GridContainer, {
|
|
1866
|
+
$cols: cols,
|
|
1867
|
+
$gap: gap ? tokens.base.spacing[gap] : undefined,
|
|
1868
|
+
$gapX: gapX ? tokens.base.spacing[gapX] : undefined,
|
|
1869
|
+
$gapY: gapY ? tokens.base.spacing[gapY] : undefined,
|
|
1870
|
+
className: className
|
|
1871
|
+
}, children);
|
|
1872
|
+
};
|
|
1873
|
+
var GridColContainer = styled.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n"], ["\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n"])), function (props) {
|
|
1874
|
+
return props.$span && css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["grid-column: span ", " / span ", ";"], ["grid-column: span ", " / span ", ";"])), props.$span, props.$span);
|
|
1875
|
+
}, function (props) {
|
|
1876
|
+
return props.$order && css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["order: ", ";"], ["order: ", ";"])), props.$order);
|
|
1877
|
+
}, function (props) {
|
|
1878
|
+
return props.$spanSm && css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "], ["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "])), media.sm, props.$spanSm, props.$spanSm);
|
|
1879
|
+
}, function (props) {
|
|
1880
|
+
return props.$spanMd && css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "], ["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "])), media.md, props.$spanMd, props.$spanMd);
|
|
1881
|
+
}, function (props) {
|
|
1882
|
+
return props.$spanLg && css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "], ["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "])), media.lg, props.$spanLg, props.$spanLg);
|
|
1883
|
+
}, function (props) {
|
|
1884
|
+
return props.$spanXl && css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "], ["\n ", " {\n grid-column: span ", " / span ", ";\n }\n "])), media.xl, props.$spanXl, props.$spanXl);
|
|
1885
|
+
}, function (props) {
|
|
1886
|
+
return props.$orderSm && css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.sm, props.$orderSm);
|
|
1887
|
+
}, function (props) {
|
|
1888
|
+
return props.$orderMd && css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.md, props.$orderMd);
|
|
1889
|
+
}, function (props) {
|
|
1890
|
+
return props.$orderLg && css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.lg, props.$orderLg);
|
|
1891
|
+
}, function (props) {
|
|
1892
|
+
return props.$orderXl && css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n ", " {\n order: ", ";\n }\n "], ["\n ", " {\n order: ", ";\n }\n "])), media.xl, props.$orderXl);
|
|
1893
|
+
});
|
|
1894
|
+
var GridCol = function GridCol(_a) {
|
|
1895
|
+
var span = _a.span,
|
|
1896
|
+
spanSm = _a.spanSm,
|
|
1897
|
+
spanMd = _a.spanMd,
|
|
1898
|
+
spanLg = _a.spanLg,
|
|
1899
|
+
spanXl = _a.spanXl,
|
|
1900
|
+
order = _a.order,
|
|
1901
|
+
orderSm = _a.orderSm,
|
|
1902
|
+
orderMd = _a.orderMd,
|
|
1903
|
+
orderLg = _a.orderLg,
|
|
1904
|
+
orderXl = _a.orderXl,
|
|
1905
|
+
className = _a.className,
|
|
1906
|
+
children = _a.children;
|
|
1907
|
+
return /*#__PURE__*/React.createElement(GridColContainer, {
|
|
1908
|
+
$span: span,
|
|
1909
|
+
$spanSm: spanSm,
|
|
1910
|
+
$spanMd: spanMd,
|
|
1911
|
+
$spanLg: spanLg,
|
|
1912
|
+
$spanXl: spanXl,
|
|
1913
|
+
$order: order,
|
|
1914
|
+
$orderSm: orderSm,
|
|
1915
|
+
$orderMd: orderMd,
|
|
1916
|
+
$orderLg: orderLg,
|
|
1917
|
+
$orderXl: orderXl,
|
|
1918
|
+
className: className
|
|
1919
|
+
}, children);
|
|
1920
|
+
};
|
|
1921
|
+
var ResponsiveGridContainer = styled.div(templateObject_35 || (templateObject_35 = __makeTemplateObject(["\n display: grid;\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n \n ", "\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n // Responsive gap support\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n // Responsive column gap support\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n // Responsive row gap support\n ", "\n \n ", "\n \n ", "\n \n ", "\n"], ["\n display: grid;\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n \n ", "\n ", "\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n ", "\n \n // Responsive gap support\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n // Responsive column gap support\n ", "\n \n ", "\n \n ", "\n \n ", "\n \n // Responsive row gap support\n ", "\n \n ", "\n \n ", "\n \n ", "\n"])), function (props) {
|
|
1922
|
+
return props.$cols;
|
|
1923
|
+
}, function (props) {
|
|
1924
|
+
return props.$gap && css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["gap: ", ";"], ["gap: ", ";"])), props.$gap);
|
|
1925
|
+
}, function (props) {
|
|
1926
|
+
return props.$gapX && css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["column-gap: ", ";"], ["column-gap: ", ";"])), props.$gapX);
|
|
1927
|
+
}, function (props) {
|
|
1928
|
+
return props.$gapY && css(templateObject_18 || (templateObject_18 = __makeTemplateObject(["row-gap: ", ";"], ["row-gap: ", ";"])), props.$gapY);
|
|
1929
|
+
}, function (props) {
|
|
1930
|
+
return props.$colsSm && css(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n ", " {\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n }\n "], ["\n ", " {\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n }\n "])), media.sm, props.$colsSm);
|
|
1931
|
+
}, function (props) {
|
|
1932
|
+
return props.$colsMd && css(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n ", " {\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n }\n "], ["\n ", " {\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n }\n "])), media.md, props.$colsMd);
|
|
1933
|
+
}, function (props) {
|
|
1934
|
+
return props.$colsLg && css(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n ", " {\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n }\n "], ["\n ", " {\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n }\n "])), media.lg, props.$colsLg);
|
|
1935
|
+
}, function (props) {
|
|
1936
|
+
return props.$colsXl && css(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n ", " {\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n }\n "], ["\n ", " {\n grid-template-columns: repeat(", ", minmax(0, 1fr));\n }\n "])), media.xl, props.$colsXl);
|
|
1937
|
+
}, function (props) {
|
|
1938
|
+
return props.$gapSm && css(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n ", " {\n gap: ", ";\n }\n "], ["\n ", " {\n gap: ", ";\n }\n "])), media.sm, props.$gapSm);
|
|
1939
|
+
}, function (props) {
|
|
1940
|
+
return props.$gapMd && css(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n ", " {\n gap: ", ";\n }\n "], ["\n ", " {\n gap: ", ";\n }\n "])), media.md, props.$gapMd);
|
|
1941
|
+
}, function (props) {
|
|
1942
|
+
return props.$gapLg && css(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n ", " {\n gap: ", ";\n }\n "], ["\n ", " {\n gap: ", ";\n }\n "])), media.lg, props.$gapLg);
|
|
1943
|
+
}, function (props) {
|
|
1944
|
+
return props.$gapXl && css(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n ", " {\n gap: ", ";\n }\n "], ["\n ", " {\n gap: ", ";\n }\n "])), media.xl, props.$gapXl);
|
|
1945
|
+
}, function (props) {
|
|
1946
|
+
return props.$gapXSm && css(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n ", " {\n column-gap: ", ";\n }\n "], ["\n ", " {\n column-gap: ", ";\n }\n "])), media.sm, props.$gapXSm);
|
|
1947
|
+
}, function (props) {
|
|
1948
|
+
return props.$gapXMd && css(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n ", " {\n column-gap: ", ";\n }\n "], ["\n ", " {\n column-gap: ", ";\n }\n "])), media.md, props.$gapXMd);
|
|
1949
|
+
}, function (props) {
|
|
1950
|
+
return props.$gapXLg && css(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n ", " {\n column-gap: ", ";\n }\n "], ["\n ", " {\n column-gap: ", ";\n }\n "])), media.lg, props.$gapXLg);
|
|
1951
|
+
}, function (props) {
|
|
1952
|
+
return props.$gapXXl && css(templateObject_30 || (templateObject_30 = __makeTemplateObject(["\n ", " {\n column-gap: ", ";\n }\n "], ["\n ", " {\n column-gap: ", ";\n }\n "])), media.xl, props.$gapXXl);
|
|
1953
|
+
}, function (props) {
|
|
1954
|
+
return props.$gapYSm && css(templateObject_31 || (templateObject_31 = __makeTemplateObject(["\n ", " {\n row-gap: ", ";\n }\n "], ["\n ", " {\n row-gap: ", ";\n }\n "])), media.sm, props.$gapYSm);
|
|
1955
|
+
}, function (props) {
|
|
1956
|
+
return props.$gapYMd && css(templateObject_32 || (templateObject_32 = __makeTemplateObject(["\n ", " {\n row-gap: ", ";\n }\n "], ["\n ", " {\n row-gap: ", ";\n }\n "])), media.md, props.$gapYMd);
|
|
1957
|
+
}, function (props) {
|
|
1958
|
+
return props.$gapYLg && css(templateObject_33 || (templateObject_33 = __makeTemplateObject(["\n ", " {\n row-gap: ", ";\n }\n "], ["\n ", " {\n row-gap: ", ";\n }\n "])), media.lg, props.$gapYLg);
|
|
1959
|
+
}, function (props) {
|
|
1960
|
+
return props.$gapYXl && css(templateObject_34 || (templateObject_34 = __makeTemplateObject(["\n ", " {\n row-gap: ", ";\n }\n "], ["\n ", " {\n row-gap: ", ";\n }\n "])), media.xl, props.$gapYXl);
|
|
1961
|
+
});
|
|
1962
|
+
var ResponsiveGrid = function ResponsiveGrid(_a) {
|
|
1963
|
+
var cols = _a.cols,
|
|
1964
|
+
colsSm = _a.colsSm,
|
|
1965
|
+
colsMd = _a.colsMd,
|
|
1966
|
+
colsLg = _a.colsLg,
|
|
1967
|
+
colsXl = _a.colsXl,
|
|
1968
|
+
gap = _a.gap,
|
|
1969
|
+
gapSm = _a.gapSm,
|
|
1970
|
+
gapMd = _a.gapMd,
|
|
1971
|
+
gapLg = _a.gapLg,
|
|
1972
|
+
gapXl = _a.gapXl,
|
|
1973
|
+
gapX = _a.gapX,
|
|
1974
|
+
gapXSm = _a.gapXSm,
|
|
1975
|
+
gapXMd = _a.gapXMd,
|
|
1976
|
+
gapXLg = _a.gapXLg,
|
|
1977
|
+
gapXXl = _a.gapXXl,
|
|
1978
|
+
gapY = _a.gapY,
|
|
1979
|
+
gapYSm = _a.gapYSm,
|
|
1980
|
+
gapYMd = _a.gapYMd,
|
|
1981
|
+
gapYLg = _a.gapYLg,
|
|
1982
|
+
gapYXl = _a.gapYXl,
|
|
1983
|
+
className = _a.className,
|
|
1984
|
+
children = _a.children;
|
|
1985
|
+
return /*#__PURE__*/React.createElement(ResponsiveGridContainer, {
|
|
1986
|
+
$cols: cols,
|
|
1987
|
+
$colsSm: colsSm,
|
|
1988
|
+
$colsMd: colsMd,
|
|
1989
|
+
$colsLg: colsLg,
|
|
1990
|
+
$colsXl: colsXl,
|
|
1991
|
+
$gap: gap ? tokens.base.spacing[gap] : undefined,
|
|
1992
|
+
$gapSm: gapSm ? tokens.base.spacing[gapSm] : undefined,
|
|
1993
|
+
$gapMd: gapMd ? tokens.base.spacing[gapMd] : undefined,
|
|
1994
|
+
$gapLg: gapLg ? tokens.base.spacing[gapLg] : undefined,
|
|
1995
|
+
$gapXl: gapXl ? tokens.base.spacing[gapXl] : undefined,
|
|
1996
|
+
$gapX: gapX ? tokens.base.spacing[gapX] : undefined,
|
|
1997
|
+
$gapXSm: gapXSm ? tokens.base.spacing[gapXSm] : undefined,
|
|
1998
|
+
$gapXMd: gapXMd ? tokens.base.spacing[gapXMd] : undefined,
|
|
1999
|
+
$gapXLg: gapXLg ? tokens.base.spacing[gapXLg] : undefined,
|
|
2000
|
+
$gapXXl: gapXXl ? tokens.base.spacing[gapXXl] : undefined,
|
|
2001
|
+
$gapY: gapY ? tokens.base.spacing[gapY] : undefined,
|
|
2002
|
+
$gapYSm: gapYSm ? tokens.base.spacing[gapYSm] : undefined,
|
|
2003
|
+
$gapYMd: gapYMd ? tokens.base.spacing[gapYMd] : undefined,
|
|
2004
|
+
$gapYLg: gapYLg ? tokens.base.spacing[gapYLg] : undefined,
|
|
2005
|
+
$gapYXl: gapYXl ? tokens.base.spacing[gapYXl] : undefined,
|
|
2006
|
+
className: className
|
|
2007
|
+
}, children);
|
|
2008
|
+
};
|
|
2009
|
+
var templateObject_1$1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35;
|
|
2010
|
+
|
|
2011
|
+
var _a = tokens.semantic,
|
|
2012
|
+
typography = _a.typography,
|
|
2013
|
+
color = _a.color;
|
|
2014
|
+
var TimeStyled = styled.time(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font: ", ";\n color: ", ";\n"], ["\n font: ", ";\n color: ", ";\n"])), typography.label, color.text.subdued);
|
|
2015
|
+
var DateFormatter = function DateFormatter(_a) {
|
|
2016
|
+
var dateString = _a.dateString,
|
|
2017
|
+
_b = _a.formatString,
|
|
2018
|
+
formatString = _b === void 0 ? 'yyyy' : _b;
|
|
2019
|
+
var date = parseISO(dateString);
|
|
2020
|
+
return /*#__PURE__*/React.createElement(TimeStyled, {
|
|
2021
|
+
dateTime: dateString
|
|
2022
|
+
}, format(date, formatString));
|
|
2023
|
+
};
|
|
2024
|
+
var templateObject_1;
|
|
2025
|
+
|
|
2026
|
+
export { Avatar, Box, Button, Chip, Container, CoverImage, DateFormatter, Grid, GridCol, Icon, IconButton, LegacyChip, ResponsiveGrid, SectionSeparator, Stack, Typography, tokens };
|
|
2027
|
+
//# sourceMappingURL=index.esm.js.map
|