@beaubrain/web-design-system 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +99 -66
  2. package/dist/assets/web-design-system.css +1 -0
  3. package/dist/components/Base/index.d.ts +11 -0
  4. package/dist/components/Button/button.defs.d.ts +119 -0
  5. package/dist/components/Button/button.helpers.d.ts +5 -0
  6. package/dist/components/Button/index.d.ts +117 -0
  7. package/dist/components/Flex/flex.defs.d.ts +281 -0
  8. package/dist/components/Flex/flex.helpers.d.ts +2 -0
  9. package/dist/components/Flex/index.d.ts +15 -0
  10. package/dist/components/Grid/grid.defs.d.ts +312 -0
  11. package/dist/components/Grid/grid.helpers.d.ts +4 -0
  12. package/dist/components/Grid/index.d.ts +15 -0
  13. package/dist/components/Outlet/Outlet.test.d.ts +1 -0
  14. package/dist/components/Outlet/index.d.ts +15 -0
  15. package/dist/components/Spinner/index.d.ts +67 -0
  16. package/dist/components/Spinner/spinner.defs.d.ts +60 -0
  17. package/dist/components/Text/index.d.ts +21 -0
  18. package/dist/components/Text/text.defs.d.ts +93 -0
  19. package/dist/components/VisuallyHidden/index.d.ts +17 -0
  20. package/dist/components/index.d.ts +7 -0
  21. package/dist/core/defs/as-child.defs.d.ts +6 -0
  22. package/dist/core/defs/color.defs.d.ts +20 -0
  23. package/dist/core/defs/gap.defs.d.ts +22 -0
  24. package/dist/core/defs/height.defs.d.ts +21 -0
  25. package/dist/core/defs/index.d.ts +15 -0
  26. package/dist/core/defs/layout.defs.d.ts +194 -0
  27. package/dist/core/defs/leading-trim.defs.d.ts +9 -0
  28. package/dist/core/defs/margin.defs.d.ts +48 -0
  29. package/dist/core/defs/padding.defs.d.ts +49 -0
  30. package/dist/core/defs/prop-defs.d.ts +55 -0
  31. package/dist/core/defs/radius.defs.d.ts +14 -0
  32. package/dist/core/defs/text-align.defs.d.ts +8 -0
  33. package/dist/core/defs/text-wrap.defs.d.ts +8 -0
  34. package/dist/core/defs/truncate.defs.d.ts +7 -0
  35. package/dist/core/defs/weight.defs.d.ts +8 -0
  36. package/dist/core/defs/width.defs.d.ts +21 -0
  37. package/dist/core/react/component-props.d.ts +4 -0
  38. package/dist/core/react/extract-props.d.ts +11 -0
  39. package/dist/core/react/get-styles.d.ts +18 -0
  40. package/dist/core/react/index.d.ts +4 -0
  41. package/dist/core/react/merge-styles.d.ts +5 -0
  42. package/dist/core/react/props.d.ts +6 -0
  43. package/dist/core/react/ref.d.ts +5 -0
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.js +698 -0
  46. package/package.json +1 -1
package/dist/index.js ADDED
@@ -0,0 +1,698 @@
1
+ import { jsx as c, jsxs as z, Fragment as F } from "react/jsx-runtime";
2
+ import * as g from "react";
3
+ import p from "react";
4
+ function H(e) {
5
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6
+ }
7
+ var x = { exports: {} };
8
+ /*!
9
+ Copyright (c) 2018 Jed Watson.
10
+ Licensed under the MIT License (MIT), see
11
+ http://jedwatson.github.io/classnames
12
+ */
13
+ var E;
14
+ function k() {
15
+ return E || (E = 1, (function(e) {
16
+ (function() {
17
+ var t = {}.hasOwnProperty;
18
+ function n() {
19
+ for (var s = "", o = 0; o < arguments.length; o++) {
20
+ var l = arguments[o];
21
+ l && (s = r(s, a(l)));
22
+ }
23
+ return s;
24
+ }
25
+ function a(s) {
26
+ if (typeof s == "string" || typeof s == "number")
27
+ return s;
28
+ if (typeof s != "object")
29
+ return "";
30
+ if (Array.isArray(s))
31
+ return n.apply(null, s);
32
+ if (s.toString !== Object.prototype.toString && !s.toString.toString().includes("[native code]"))
33
+ return s.toString();
34
+ var o = "";
35
+ for (var l in s)
36
+ t.call(s, l) && s[l] && (o = r(o, l));
37
+ return o;
38
+ }
39
+ function r(s, o) {
40
+ return o ? s ? s + " " + o : s + o : s;
41
+ }
42
+ e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
43
+ })();
44
+ })(x)), x.exports;
45
+ }
46
+ var L = k();
47
+ const f = /* @__PURE__ */ H(L), Y = (e, t) => {
48
+ const n = { ...t };
49
+ for (const a in t) {
50
+ const r = e[a], s = t[a];
51
+ /^on[A-Z]/.test(a) ? r && s ? n[a] = (...l) => {
52
+ const i = s(...l);
53
+ return r(...l), i;
54
+ } : r && (n[a] = r) : a === "style" ? n[a] = { ...r, ...s } : a === "className" && (n[a] = [r, s].filter(Boolean).join(" "));
55
+ }
56
+ return { ...e, ...n };
57
+ }, j = (e, t) => {
58
+ if (typeof e == "function")
59
+ return e(t);
60
+ e != null && (e.current = t);
61
+ }, U = (...e) => (t) => {
62
+ let n = !1;
63
+ const a = e.map((r) => {
64
+ const s = j(r, t);
65
+ return !n && typeof s == "function" && (n = !0), { ref: r, cleanup: s };
66
+ });
67
+ if (n)
68
+ return () => {
69
+ for (const { ref: r, cleanup: s } of a)
70
+ typeof s == "function" ? s() : j(r, null);
71
+ };
72
+ }, q = (e) => {
73
+ const t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get;
74
+ return t && "isReactWarning" in t && t.isReactWarning ? e.ref : e.props.ref || e.ref;
75
+ }, R = (...e) => {
76
+ let t = {};
77
+ for (const n of e)
78
+ n && (t = { ...t, ...n });
79
+ return Object.keys(t).length ? t : void 0;
80
+ }, G = ({ className: e, customProperties: t, ...n }) => {
81
+ const a = T({
82
+ allowCustomValues: !0,
83
+ className: e,
84
+ ...n
85
+ }), r = J({
86
+ customProperties: t,
87
+ ...n
88
+ });
89
+ return [a, r];
90
+ }, X = (e, t, n) => {
91
+ const a = e ? "-" : "", r = n(t), s = r?.startsWith("-"), o = s ? "-" : "", l = s ? r?.substring(1) : r;
92
+ return `${o}${e}${a}${l}`;
93
+ }, T = ({
94
+ allowCustomValues: e = !1,
95
+ className: t,
96
+ value: n,
97
+ propValues: a,
98
+ parseValue: r = (s) => s
99
+ }) => {
100
+ if (n) {
101
+ if (typeof n == "string" && a.includes(n))
102
+ return X(t, n, r);
103
+ if (e)
104
+ return t;
105
+ }
106
+ }, J = ({
107
+ customProperties: e,
108
+ value: t,
109
+ propValues: n,
110
+ parseValue: a = (r) => r
111
+ }) => {
112
+ let r = {};
113
+ if (!(!t || typeof t == "string" && n.includes(t))) {
114
+ typeof t == "string" && (r = Object.fromEntries(e.map((s) => [s, t])));
115
+ for (const s in r) {
116
+ const o = r[s];
117
+ o !== void 0 && (r[s] = a(o));
118
+ }
119
+ return r;
120
+ }
121
+ }, M = (...e) => Object.assign({}, ...e), h = (e, ...t) => {
122
+ let n, a;
123
+ const r = { ...e }, s = M(...t);
124
+ for (const o in s) {
125
+ let l = r[o];
126
+ const i = s[o];
127
+ if (i.default !== void 0 && l === void 0 && (l = i.default), i.type === "enum" && ([i.default, ...i.values].includes(l) || (l = i.default)), r[o] = l, "className" in i && i.className) {
128
+ if (delete r[o], !l)
129
+ continue;
130
+ if (i.type === "enum") {
131
+ const u = T({
132
+ value: l,
133
+ className: i.className,
134
+ propValues: i.values,
135
+ parseValue: i.parseValue
136
+ });
137
+ n = f(n, u);
138
+ continue;
139
+ }
140
+ if (i.type === "string" || i.type === "enum | string") {
141
+ const u = i.type === "string" ? [] : i.values, [w, b] = G({
142
+ className: i.className,
143
+ customProperties: i.customProperties,
144
+ propValues: u,
145
+ value: l
146
+ });
147
+ a = R(a, b), n = f(n, w);
148
+ continue;
149
+ }
150
+ }
151
+ }
152
+ return r.className = f(n, e.className), r.style = R(a, e.style), r;
153
+ }, Z = (e) => {
154
+ const t = p.forwardRef((n, a) => {
155
+ const { children: r, ...s } = n;
156
+ if (p.isValidElement(r)) {
157
+ const o = q(r), l = Y(s, r.props);
158
+ return l.ref = a ? U(a, o) : o, p.cloneElement(r, l);
159
+ }
160
+ throw new Error(
161
+ `[${e}.OutletClone] Invalid children passed, expected a single valid React element.`
162
+ );
163
+ });
164
+ return t.displayName = `${e}.OutletClone`, t;
165
+ }, $ = (e) => {
166
+ const t = Z(e), n = p.forwardRef((a, r) => {
167
+ const { children: s, ...o } = a, l = p.Children.toArray(s), i = l.find(Q);
168
+ if (i) {
169
+ const u = i.props.children, w = l.map((b) => {
170
+ if (b === i) {
171
+ if (p.Children.count(u) > 1 || !p.isValidElement(u))
172
+ throw new Error(
173
+ `[${e}.Outlet] Invalid children passed, expected a single valid React element.`
174
+ );
175
+ return u.props.children;
176
+ } else
177
+ return b;
178
+ });
179
+ if (!p.isValidElement(u))
180
+ throw new Error(`[${e}.Outlet] Invalid children passed.`);
181
+ return /* @__PURE__ */ c(t, { ...o, ref: r, children: p.cloneElement(u, void 0, w) });
182
+ }
183
+ return /* @__PURE__ */ c(t, { ...o, ref: r, children: s });
184
+ });
185
+ return n.displayName = `${e}.Outlet`, n;
186
+ }, O = $("Outlet"), K = Symbol("bds.outlettable"), Q = (e) => p.isValidElement(e) && typeof e.type == "function" && "__bdsId" in e.type && e.type.__bdsId === K, v = {
187
+ asChild: {
188
+ type: "boolean"
189
+ }
190
+ }, S = ["gray50", "gray100", "gray200", "gray300", "gray400", "gray500", "gray600", "gray700", "gray800", "gray900", "gray1000", "gray1100", "gray1200", "gray1300", "gray1400", "gray1500", "blue50", "blue100", "blue200", "blue300", "blue400", "blue500", "blue600", "blue700", "blue800", "blue900", "blue1000", "blue1100", "blue1200", "blue1300", "blue1400", "green50", "green100", "green200", "green300", "green400", "green500", "green600", "green700", "green800", "green900", "green1000", "green1100", "green1200", "red50", "red100", "red200", "red300", "red400", "red500", "red600", "red700", "red800", "red900", "red1000", "red1100"], ee = {
191
+ color: {
192
+ type: "enum | string",
193
+ values: S,
194
+ className: "bd-color",
195
+ customProperties: ["--color"],
196
+ default: void 0
197
+ }
198
+ }, se = {
199
+ borderColor: {
200
+ type: "enum | string",
201
+ values: S,
202
+ className: "bd-br-color",
203
+ customProperties: ["--border-color"],
204
+ default: void 0
205
+ }
206
+ }, m = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], te = {
207
+ p: {
208
+ type: "enum | string",
209
+ values: m,
210
+ className: "bd-p",
211
+ customProperties: ["--p"]
212
+ },
213
+ px: {
214
+ type: "enum | string",
215
+ values: m,
216
+ className: "bd-px",
217
+ customProperties: ["--px"]
218
+ },
219
+ py: {
220
+ type: "enum | string",
221
+ values: m,
222
+ className: "bd-py",
223
+ customProperties: ["--py"]
224
+ },
225
+ pt: {
226
+ type: "enum | string",
227
+ values: m,
228
+ className: "bd-pt",
229
+ customProperties: ["--pt"]
230
+ },
231
+ pr: {
232
+ type: "enum | string",
233
+ values: m,
234
+ className: "bd-pr",
235
+ customProperties: ["--pr"]
236
+ },
237
+ pb: {
238
+ type: "enum | string",
239
+ values: m,
240
+ className: "bd-pb",
241
+ customProperties: ["--pb"]
242
+ },
243
+ pl: {
244
+ type: "enum | string",
245
+ values: m,
246
+ className: "bd-pl",
247
+ customProperties: ["--pl"]
248
+ }
249
+ }, B = {
250
+ width: {
251
+ type: "string",
252
+ className: "bd-w",
253
+ customProperties: ["--width"]
254
+ },
255
+ minWidth: {
256
+ type: "string",
257
+ className: "bd-min-w",
258
+ customProperties: ["--min-width"]
259
+ },
260
+ maxWidth: {
261
+ type: "string",
262
+ className: "bd-max-w",
263
+ customProperties: ["--max-width"]
264
+ }
265
+ }, re = {
266
+ height: {
267
+ type: "string",
268
+ className: "bd-h",
269
+ customProperties: ["--height"]
270
+ },
271
+ minHeight: {
272
+ type: "string",
273
+ className: "bd-min-h",
274
+ customProperties: ["--min-height"]
275
+ },
276
+ maxHeight: {
277
+ type: "string",
278
+ className: "bd-max-h",
279
+ customProperties: ["--max-height"]
280
+ }
281
+ }, ne = ["static", "relative", "absolute", "fixed", "sticky"], C = ["visible", "hidden", "clip", "scroll", "auto"], y = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"], ae = ["0", "1"], oe = ["0", "1"], le = ["start", "center", "end", "baseline", "stretch"], ie = ["start", "center", "end", "baseline", "stretch"], ce = {
282
+ ...B,
283
+ ...re,
284
+ ...te,
285
+ position: {
286
+ type: "enum",
287
+ className: "bd-position",
288
+ values: ne
289
+ },
290
+ inset: {
291
+ type: "enum | string",
292
+ className: "bd-inset",
293
+ customProperties: ["--inset"],
294
+ values: y
295
+ },
296
+ top: {
297
+ type: "enum | string",
298
+ className: "bd-top",
299
+ customProperties: ["--top"],
300
+ values: y
301
+ },
302
+ right: {
303
+ type: "enum | string",
304
+ className: "bd-right",
305
+ customProperties: ["--right"],
306
+ values: y
307
+ },
308
+ bottom: {
309
+ type: "enum | string",
310
+ className: "bd-bottom",
311
+ customProperties: ["--bottom"],
312
+ values: y
313
+ },
314
+ left: {
315
+ type: "enum | string",
316
+ className: "bd-left",
317
+ customProperties: ["--left"],
318
+ values: y
319
+ },
320
+ overflow: {
321
+ type: "enum",
322
+ className: "bd-overflow",
323
+ values: C
324
+ },
325
+ overflowX: {
326
+ type: "enum",
327
+ className: "bd-ox",
328
+ values: C
329
+ },
330
+ overflowY: {
331
+ type: "enum",
332
+ className: "bd-oy",
333
+ values: C
334
+ },
335
+ flexBasis: {
336
+ type: "string",
337
+ className: "bd-fb",
338
+ customProperties: ["--flex-basis"]
339
+ },
340
+ flexShrink: {
341
+ type: "enum | string",
342
+ className: "bd-fs",
343
+ customProperties: ["--flex-shrink"],
344
+ values: ae
345
+ },
346
+ flexGrow: {
347
+ type: "enum | string",
348
+ className: "bd-fg",
349
+ customProperties: ["--flex-grow"],
350
+ values: oe
351
+ },
352
+ gridArea: {
353
+ type: "string",
354
+ className: "bd-ga",
355
+ customProperties: ["--grid-area"]
356
+ },
357
+ gridColumn: {
358
+ type: "string",
359
+ className: "bd-gc",
360
+ customProperties: ["--grid-column"]
361
+ },
362
+ gridColumnStart: {
363
+ type: "string",
364
+ className: "bd-gcs",
365
+ customProperties: ["--grid-column-start"]
366
+ },
367
+ gridColumnEnd: {
368
+ type: "string",
369
+ className: "bd-gce",
370
+ customProperties: ["--grid-column-end"]
371
+ },
372
+ gridRow: {
373
+ type: "string",
374
+ className: "bd-gr",
375
+ customProperties: ["--grid-row"]
376
+ },
377
+ gridRowStart: {
378
+ type: "string",
379
+ className: "bd-grs",
380
+ customProperties: ["--grid-row-start"]
381
+ },
382
+ gridRowEnd: {
383
+ type: "string",
384
+ className: "bd-gre",
385
+ customProperties: ["--grid-row-end"]
386
+ },
387
+ alignSelf: {
388
+ type: "enum",
389
+ className: "bd-as",
390
+ values: le
391
+ },
392
+ justifySelf: {
393
+ type: "enum",
394
+ className: "bd-js",
395
+ values: ie
396
+ }
397
+ }, d = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "-10", "-11", "-12"], P = {
398
+ m: {
399
+ type: "enum | string",
400
+ values: d,
401
+ className: "bd-m",
402
+ customProperties: ["--m"]
403
+ },
404
+ mx: {
405
+ type: "enum | string",
406
+ values: d,
407
+ className: "bd-mx",
408
+ customProperties: ["--ml", "--mr"]
409
+ },
410
+ my: {
411
+ type: "enum | string",
412
+ values: d,
413
+ className: "bd-my",
414
+ customProperties: ["--mt", "--mb"]
415
+ },
416
+ mt: {
417
+ type: "enum | string",
418
+ values: d,
419
+ className: "bd-mt",
420
+ customProperties: ["--mt"]
421
+ },
422
+ mr: {
423
+ type: "enum | string",
424
+ values: d,
425
+ className: "bd-mr",
426
+ customProperties: ["--mr"]
427
+ },
428
+ mb: {
429
+ type: "enum | string",
430
+ values: d,
431
+ className: "bd-mb",
432
+ customProperties: ["--mb"]
433
+ },
434
+ ml: {
435
+ type: "enum | string",
436
+ values: d,
437
+ className: "bd-ml",
438
+ customProperties: ["--ml"]
439
+ }
440
+ }, ue = ["left", "center", "right"], pe = {
441
+ align: {
442
+ type: "enum",
443
+ values: ue,
444
+ className: "bd-ta"
445
+ }
446
+ }, me = ["wrap", "nowrap", "pretty", "balance"], de = {
447
+ wrap: {
448
+ type: "enum",
449
+ className: "bd-tw",
450
+ values: me
451
+ }
452
+ }, fe = ["light", "regular", "medium", "semibold", "bold"], I = {
453
+ weight: {
454
+ type: "enum",
455
+ values: fe,
456
+ className: "bd-weight"
457
+ }
458
+ }, ge = {
459
+ truncate: {
460
+ type: "boolean",
461
+ className: "bd-truncate"
462
+ }
463
+ }, ye = ["normal", "start", "end", "both"], be = {
464
+ trim: {
465
+ type: "enum",
466
+ className: "bd-lt",
467
+ values: ye,
468
+ default: "normal"
469
+ }
470
+ }, ve = ["none", "s", "m", "l", "full"], Ne = {
471
+ radius: {
472
+ type: "enum | string",
473
+ values: ve,
474
+ default: void 0,
475
+ className: "bd-radius",
476
+ customProperties: ["--radius"]
477
+ }
478
+ }, V = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], W = {
479
+ gap: {
480
+ type: "enum | string",
481
+ className: "bd-gap",
482
+ customProperties: ["--gap"],
483
+ values: V
484
+ },
485
+ gapX: {
486
+ type: "enum | string",
487
+ className: "bd-cg",
488
+ customProperties: ["--col-gap"],
489
+ values: V
490
+ },
491
+ gapY: {
492
+ type: "enum | string",
493
+ className: "bd-rg",
494
+ customProperties: ["--row-gap"],
495
+ values: V
496
+ }
497
+ }, he = ["span", "div", "label", "p"], Pe = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"], we = {
498
+ as: { type: "enum", values: he, default: "span" },
499
+ ...v,
500
+ size: {
501
+ type: "enum | string",
502
+ className: "bd-size",
503
+ values: Pe,
504
+ customProperties: ["--size"]
505
+ },
506
+ ...v,
507
+ ...P,
508
+ ...pe,
509
+ ...de,
510
+ ...I,
511
+ ...ge,
512
+ ...be,
513
+ ...ee
514
+ }, xe = g.forwardRef((e, t) => {
515
+ const {
516
+ children: n,
517
+ className: a,
518
+ asChild: r,
519
+ as: s = "span",
520
+ ...o
521
+ } = h(e, we);
522
+ return /* @__PURE__ */ c(O, { ...o, ref: t, className: f("bd-Text", a), children: r ? n : /* @__PURE__ */ c(s, { children: n }) });
523
+ });
524
+ xe.displayName = "Text";
525
+ const Ce = (e) => e === "between" ? "space-between" : e, Ve = ["div", "span"], De = ["none", "inline-flex", "flex"], Oe = ["row", "column", "row-reverse", "column-reverse"], Se = ["start", "center", "end", "baseline", "stretch"], Ee = ["start", "center", "end", "between"], je = ["nowrap", "wrap", "wrap-reverse"], Re = {
526
+ as: { type: "enum", values: Ve, default: "div" },
527
+ ...v,
528
+ display: {
529
+ type: "enum",
530
+ className: "bd-display",
531
+ values: De
532
+ },
533
+ direction: {
534
+ type: "enum",
535
+ className: "bd-fd",
536
+ values: Oe
537
+ },
538
+ align: {
539
+ type: "enum",
540
+ className: "bd-ai",
541
+ values: Se
542
+ },
543
+ justify: {
544
+ type: "enum",
545
+ className: "bd-jc",
546
+ values: Ee,
547
+ parseValue: Ce
548
+ },
549
+ wrap: {
550
+ type: "enum",
551
+ className: "bd-fw",
552
+ values: je
553
+ },
554
+ ...W,
555
+ ...ce,
556
+ ...P
557
+ }, N = g.forwardRef((e, t) => {
558
+ const { className: n, asChild: a, as: r = "div", ...s } = h(e, Re);
559
+ return /* @__PURE__ */ c(a ? O : r, { ...s, ref: t, className: f("bd-Flex", n) });
560
+ });
561
+ N.displayName = "Flex";
562
+ const ze = ["a", "button", "div", "input", "label", "span"], Te = ze.reduce((e, t) => {
563
+ const n = $(`Base.${t}`), a = g.forwardRef((r, s) => {
564
+ const { asChild: o, ...l } = r;
565
+ return /* @__PURE__ */ c(o ? n : t, { ...l, ref: s });
566
+ });
567
+ return a.displayName = `Base.${t}`, { ...e, [t]: a };
568
+ }, {}), $e = Object.freeze({
569
+ position: "absolute",
570
+ border: 0,
571
+ width: 1,
572
+ height: 1,
573
+ padding: 0,
574
+ margin: -1,
575
+ overflow: "hidden",
576
+ clip: "rect(0, 0, 0, 0)",
577
+ whiteSpace: "nowrap",
578
+ wordWrap: "normal"
579
+ }), _ = g.forwardRef(
580
+ (e, t) => /* @__PURE__ */ c(
581
+ Te.span,
582
+ {
583
+ ...e,
584
+ ref: t,
585
+ style: { ...$e, ...e.style }
586
+ }
587
+ )
588
+ );
589
+ _.displayName = "VisuallyHidden";
590
+ const Be = ["1", "2", "3"], Ie = {
591
+ size: { type: "enum", className: "bd-size", values: Be, default: "2" },
592
+ loading: { type: "boolean", default: !0 },
593
+ color: { type: "enum", className: "bd-color", values: S },
594
+ ...P
595
+ }, A = g.forwardRef((e, t) => {
596
+ const { className: n, children: a, loading: r, ...s } = h(
597
+ e,
598
+ Ie,
599
+ se
600
+ );
601
+ if (!r) return a;
602
+ const o = /* @__PURE__ */ c("span", { ...s, ref: t, className: f("bd-Spinner", n) });
603
+ return a === void 0 ? o : /* @__PURE__ */ z(N, { asChild: !0, position: "relative", align: "center", justify: "center", children: [
604
+ /* @__PURE__ */ c("span", { children: /* @__PURE__ */ c("span", { "aria-hidden": !0, style: { display: "contents", visibility: "hidden" }, inert: void 0, children: a }) }),
605
+ /* @__PURE__ */ c(N, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0", children: /* @__PURE__ */ c("span", { children: o }) })
606
+ ] });
607
+ });
608
+ A.displayName = "Spinner";
609
+ const We = ["1", "2", "3", "4", "5"], _e = [
610
+ "fill-primary",
611
+ "fill-secondary",
612
+ "outline-primary",
613
+ "outline-secondary",
614
+ "ghost"
615
+ ], D = {
616
+ ...v,
617
+ /**
618
+ * @description 버튼의 높이 기준
619
+ *
620
+ * 1="24px"
621
+ * 2="32px"
622
+ * 3="40px"
623
+ * 4="48px"
624
+ * 5="56px"
625
+ */
626
+ size: { type: "enum", className: "bd-size", values: We, default: "5" },
627
+ variant: { type: "enum", className: "bd-variant", values: _e, default: "fill-primary" },
628
+ ...B,
629
+ ...P,
630
+ ...W,
631
+ ...Ne,
632
+ ...I,
633
+ loading: { type: "boolean", className: "bd-loading", default: !1 }
634
+ }, Ae = (e) => {
635
+ switch (e) {
636
+ case "1":
637
+ return "1";
638
+ case "2":
639
+ case "3":
640
+ return "2";
641
+ case "4":
642
+ case "5":
643
+ return "3";
644
+ }
645
+ }, Fe = (e) => {
646
+ switch (e) {
647
+ case "fill-primary":
648
+ return;
649
+ case "fill-secondary":
650
+ case "outline-primary":
651
+ case "outline-secondary":
652
+ case "ghost":
653
+ return "blue1100";
654
+ default:
655
+ return;
656
+ }
657
+ }, He = g.forwardRef((e, t) => {
658
+ const { variant: n = D.variant.default, size: a = D.size.default } = e, {
659
+ className: r,
660
+ children: s,
661
+ asChild: o,
662
+ disabled: l = e.loading,
663
+ ...i
664
+ } = h(e, D);
665
+ return /* @__PURE__ */ c(
666
+ o ? O : "button",
667
+ {
668
+ "data-disabled": l || void 0,
669
+ "data-loading": e.loading || void 0,
670
+ disabled: l,
671
+ ...i,
672
+ ref: t,
673
+ className: f("bd-Button", r),
674
+ children: e.loading ? /* @__PURE__ */ z(F, { children: [
675
+ /* @__PURE__ */ c("span", { style: { display: "contents", visibility: "hidden" }, "aria-hidden": !0, children: s }),
676
+ /* @__PURE__ */ c(_, { children: s }),
677
+ /* @__PURE__ */ c(N, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0", children: /* @__PURE__ */ c("span", { children: /* @__PURE__ */ c(
678
+ A,
679
+ {
680
+ size: Ae(a),
681
+ color: Fe(n)
682
+ }
683
+ ) }) })
684
+ ] }) : s
685
+ }
686
+ );
687
+ });
688
+ He.displayName = "Button";
689
+ export {
690
+ Te as Base,
691
+ He as Button,
692
+ N as Flex,
693
+ O as OutletUI,
694
+ A as Spinner,
695
+ xe as Text,
696
+ $e as VISUALLY_HIDDEN_STYLES,
697
+ _ as VisuallyHidden
698
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beaubrain/web-design-system",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/beaubrain/web-design-system.git"