@hypoth-ui/wc 0.1.1

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 (87) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +60 -0
  3. package/dist/button-MKQKTC5Q.js +10 -0
  4. package/dist/button-MKQKTC5Q.js.map +1 -0
  5. package/dist/chunk-4HLM6DBG.js +910 -0
  6. package/dist/chunk-4HLM6DBG.js.map +1 -0
  7. package/dist/chunk-55ID7LJL.js +3602 -0
  8. package/dist/chunk-55ID7LJL.js.map +1 -0
  9. package/dist/chunk-66HFYJD7.js +86 -0
  10. package/dist/chunk-66HFYJD7.js.map +1 -0
  11. package/dist/chunk-CZOXIJVS.js +70 -0
  12. package/dist/chunk-CZOXIJVS.js.map +1 -0
  13. package/dist/chunk-DHUM4Q5Y.js +495 -0
  14. package/dist/chunk-DHUM4Q5Y.js.map +1 -0
  15. package/dist/chunk-DNNI5BDE.js +1842 -0
  16. package/dist/chunk-DNNI5BDE.js.map +1 -0
  17. package/dist/chunk-GXKZ6E6K.js +99 -0
  18. package/dist/chunk-GXKZ6E6K.js.map +1 -0
  19. package/dist/chunk-H4GJJZ3N.js +51 -0
  20. package/dist/chunk-H4GJJZ3N.js.map +1 -0
  21. package/dist/chunk-JMPTFALJ.js +175 -0
  22. package/dist/chunk-JMPTFALJ.js.map +1 -0
  23. package/dist/chunk-MYQWCLUJ.js +45 -0
  24. package/dist/chunk-MYQWCLUJ.js.map +1 -0
  25. package/dist/chunk-QZSPWT7L.js +183 -0
  26. package/dist/chunk-QZSPWT7L.js.map +1 -0
  27. package/dist/chunk-TSKBQCTR.js +5137 -0
  28. package/dist/chunk-TSKBQCTR.js.map +1 -0
  29. package/dist/chunk-TXIIUVL3.js +130 -0
  30. package/dist/chunk-TXIIUVL3.js.map +1 -0
  31. package/dist/chunk-UM7WRO7W.js +237 -0
  32. package/dist/chunk-UM7WRO7W.js.map +1 -0
  33. package/dist/chunk-VPXL4RB3.js +202 -0
  34. package/dist/chunk-VPXL4RB3.js.map +1 -0
  35. package/dist/chunk-VX5CKSMN.js +39 -0
  36. package/dist/chunk-VX5CKSMN.js.map +1 -0
  37. package/dist/chunk-WQ5BEP3E.js +2845 -0
  38. package/dist/chunk-WQ5BEP3E.js.map +1 -0
  39. package/dist/chunk-YDQ434UH.js +60 -0
  40. package/dist/chunk-YDQ434UH.js.map +1 -0
  41. package/dist/chunk-ZWV4VI6D.js +153 -0
  42. package/dist/chunk-ZWV4VI6D.js.map +1 -0
  43. package/dist/core.d.ts +127 -0
  44. package/dist/core.js +38 -0
  45. package/dist/core.js.map +1 -0
  46. package/dist/data-display.d.ts +872 -0
  47. package/dist/data-display.js +57 -0
  48. package/dist/data-display.js.map +1 -0
  49. package/dist/ds-element-Db0LMfxI.d.ts +43 -0
  50. package/dist/feedback.d.ts +292 -0
  51. package/dist/feedback.js +31 -0
  52. package/dist/feedback.js.map +1 -0
  53. package/dist/form-controls.d.ts +1713 -0
  54. package/dist/form-controls.js +63 -0
  55. package/dist/form-controls.js.map +1 -0
  56. package/dist/icon-7IZTJ5WT.js +8 -0
  57. package/dist/icon-7IZTJ5WT.js.map +1 -0
  58. package/dist/index.d.ts +15 -0
  59. package/dist/index.js +423 -0
  60. package/dist/index.js.map +1 -0
  61. package/dist/input-LB6UR37A.js +10 -0
  62. package/dist/input-LB6UR37A.js.map +1 -0
  63. package/dist/layout.d.ts +504 -0
  64. package/dist/layout.js +34 -0
  65. package/dist/layout.js.map +1 -0
  66. package/dist/link-NHDJ6SFY.js +9 -0
  67. package/dist/link-NHDJ6SFY.js.map +1 -0
  68. package/dist/navigation.d.ts +255 -0
  69. package/dist/navigation.js +111 -0
  70. package/dist/navigation.js.map +1 -0
  71. package/dist/overlays.d.ts +1291 -0
  72. package/dist/overlays.js +106 -0
  73. package/dist/overlays.js.map +1 -0
  74. package/dist/primitives.d.ts +230 -0
  75. package/dist/primitives.js +26 -0
  76. package/dist/primitives.js.map +1 -0
  77. package/dist/registry-Bns0t11H.d.ts +233 -0
  78. package/dist/skeleton-MUdd2029.d.ts +109 -0
  79. package/dist/spinner-BWaNlc-Y.d.ts +45 -0
  80. package/dist/spinner-UIYDUVBZ.js +8 -0
  81. package/dist/spinner-UIYDUVBZ.js.map +1 -0
  82. package/dist/stepper-CCRwcQOe.d.ts +851 -0
  83. package/dist/text-MT3S3EMU.js +8 -0
  84. package/dist/text-MT3S3EMU.js.map +1 -0
  85. package/dist/visually-hidden-MW2XY4CS.js +8 -0
  86. package/dist/visually-hidden-MW2XY4CS.js.map +1 -0
  87. package/package.json +92 -0
@@ -0,0 +1,910 @@
1
+ import {
2
+ DSElement,
3
+ __decorateClass,
4
+ define
5
+ } from "./chunk-H4GJJZ3N.js";
6
+
7
+ // src/components/layout/flow.ts
8
+ import { html } from "lit";
9
+ import { property } from "lit/decorators.js";
10
+ import { classMap } from "lit/directives/class-map.js";
11
+
12
+ // src/types/layout-tokens.ts
13
+ var SPACING_TOKENS = [
14
+ "none",
15
+ "xs",
16
+ "sm",
17
+ "md",
18
+ "lg",
19
+ "xl",
20
+ "2xl",
21
+ "3xl"
22
+ ];
23
+ var BREAKPOINT_TOKENS = [
24
+ "xs",
25
+ "sm",
26
+ "md",
27
+ "lg",
28
+ "xl",
29
+ "2xl",
30
+ "3xl"
31
+ ];
32
+ var CONTAINER_SIZE_TOKENS = [
33
+ "sm",
34
+ "md",
35
+ "lg",
36
+ "xl",
37
+ "2xl",
38
+ "full"
39
+ ];
40
+ var SURFACE_TOKENS = [
41
+ "background",
42
+ "surface",
43
+ "surface-raised",
44
+ "surface-sunken",
45
+ "muted"
46
+ ];
47
+ var RADIUS_TOKENS = [
48
+ "none",
49
+ "sm",
50
+ "md",
51
+ "lg",
52
+ "xl",
53
+ "full"
54
+ ];
55
+ var FLEX_DIRECTION_VALUES = [
56
+ "row",
57
+ "column",
58
+ "row-reverse",
59
+ "column-reverse"
60
+ ];
61
+ var FLEX_ALIGN_VALUES = [
62
+ "start",
63
+ "center",
64
+ "end",
65
+ "stretch",
66
+ "baseline"
67
+ ];
68
+ var FLEX_JUSTIFY_VALUES = [
69
+ "start",
70
+ "center",
71
+ "end",
72
+ "between",
73
+ "around",
74
+ "evenly"
75
+ ];
76
+
77
+ // src/utils/responsive.ts
78
+ function parseResponsiveString(value) {
79
+ const parts = value.trim().split(/\s+/);
80
+ let base;
81
+ const overrides = {};
82
+ for (const part of parts) {
83
+ if (part.includes(":")) {
84
+ const [breakpoint, val] = part.split(":");
85
+ if (breakpoint === "base") {
86
+ base = val;
87
+ } else {
88
+ overrides[breakpoint] = val;
89
+ }
90
+ } else {
91
+ base = part;
92
+ }
93
+ }
94
+ return {
95
+ base,
96
+ overrides
97
+ };
98
+ }
99
+ function generateResponsiveClasses(component, property15, value) {
100
+ const parsed = parseResponsiveString(value);
101
+ const classes = [];
102
+ for (const [breakpoint, val] of Object.entries(parsed.overrides)) {
103
+ if (val) {
104
+ classes.push(`ds-${component}--${breakpoint}:${property15}-${val}`);
105
+ }
106
+ }
107
+ return classes;
108
+ }
109
+ function getBaseValue(value) {
110
+ const parsed = parseResponsiveString(value);
111
+ return parsed.base;
112
+ }
113
+ function isResponsiveValue(value) {
114
+ return value.includes(":");
115
+ }
116
+
117
+ // src/utils/token-validator.ts
118
+ function isDevelopment() {
119
+ if (typeof globalThis !== "undefined") {
120
+ const g = globalThis;
121
+ if (g.__DEV__ === true) return true;
122
+ }
123
+ if (typeof process !== "undefined" && process.env) {
124
+ return process.env.NODE_ENV === "development";
125
+ }
126
+ return false;
127
+ }
128
+ function validateToken(value, validTokens, propName, componentName) {
129
+ if (value === void 0 || value === null || value === "") {
130
+ return true;
131
+ }
132
+ const isValid = validTokens.includes(value);
133
+ if (!isValid && isDevelopment()) {
134
+ console.warn(
135
+ `[${componentName}] Invalid value "${value}" for prop "${propName}". Valid values are: ${validTokens.join(", ")}`
136
+ );
137
+ }
138
+ return isValid;
139
+ }
140
+ function validateResponsiveToken(value, validTokens, propName, componentName) {
141
+ if (value === void 0 || value === null || value === "") {
142
+ return true;
143
+ }
144
+ const parts = value.trim().split(/\s+/);
145
+ let allValid = true;
146
+ for (const part of parts) {
147
+ let tokenValue = part;
148
+ if (part.includes(":")) {
149
+ const [, val] = part.split(":");
150
+ tokenValue = val;
151
+ }
152
+ if (!validateToken(tokenValue, validTokens, propName, componentName)) {
153
+ allValid = false;
154
+ }
155
+ }
156
+ return allValid;
157
+ }
158
+
159
+ // src/components/layout/flow.ts
160
+ var DsFlow = class extends DSElement {
161
+ constructor() {
162
+ super(...arguments);
163
+ this.direction = "row";
164
+ this.gap = "none";
165
+ this.align = "stretch";
166
+ this.justify = "start";
167
+ this.wrap = "nowrap";
168
+ this.inline = false;
169
+ }
170
+ static {
171
+ this.styles = [];
172
+ }
173
+ connectedCallback() {
174
+ super.connectedCallback();
175
+ this.validateProps();
176
+ }
177
+ updated(changedProperties) {
178
+ super.updated(changedProperties);
179
+ if (changedProperties.has("direction") || changedProperties.has("gap") || changedProperties.has("align") || changedProperties.has("justify")) {
180
+ this.validateProps();
181
+ }
182
+ }
183
+ validateProps() {
184
+ validateResponsiveToken(this.direction, FLEX_DIRECTION_VALUES, "direction", "ds-flow");
185
+ validateResponsiveToken(this.gap, SPACING_TOKENS, "gap", "ds-flow");
186
+ validateToken(this.align, FLEX_ALIGN_VALUES, "align", "ds-flow");
187
+ validateToken(this.justify, FLEX_JUSTIFY_VALUES, "justify", "ds-flow");
188
+ }
189
+ render() {
190
+ const baseDirection = isResponsiveValue(this.direction) ? getBaseValue(this.direction) : this.direction;
191
+ const baseGap = isResponsiveValue(this.gap) ? getBaseValue(this.gap) : this.gap;
192
+ const directionClasses = isResponsiveValue(this.direction) ? generateResponsiveClasses("flow", "dir", this.direction) : [];
193
+ const gapClasses = isResponsiveValue(this.gap) ? generateResponsiveClasses("flow", "gap", this.gap) : [];
194
+ const classes = {
195
+ "ds-flow": true,
196
+ "ds-flow--inline": this.inline,
197
+ ...Object.fromEntries(directionClasses.map((c) => [c, true])),
198
+ ...Object.fromEntries(gapClasses.map((c) => [c, true]))
199
+ };
200
+ return html`
201
+ <div
202
+ class=${classMap(classes)}
203
+ data-direction=${baseDirection}
204
+ data-gap=${baseGap}
205
+ data-align=${this.align}
206
+ data-justify=${this.justify}
207
+ data-wrap=${this.wrap}
208
+ data-layout="flow"
209
+ >
210
+ <slot></slot>
211
+ </div>
212
+ `;
213
+ }
214
+ };
215
+ __decorateClass([
216
+ property({ type: String, reflect: true })
217
+ ], DsFlow.prototype, "direction", 2);
218
+ __decorateClass([
219
+ property({ type: String, reflect: true })
220
+ ], DsFlow.prototype, "gap", 2);
221
+ __decorateClass([
222
+ property({ type: String, reflect: true })
223
+ ], DsFlow.prototype, "align", 2);
224
+ __decorateClass([
225
+ property({ type: String, reflect: true })
226
+ ], DsFlow.prototype, "justify", 2);
227
+ __decorateClass([
228
+ property({ type: String, reflect: true })
229
+ ], DsFlow.prototype, "wrap", 2);
230
+ __decorateClass([
231
+ property({ type: Boolean, reflect: true })
232
+ ], DsFlow.prototype, "inline", 2);
233
+ define("ds-flow", DsFlow);
234
+
235
+ // src/components/layout/container.ts
236
+ import { html as html2 } from "lit";
237
+ import { property as property2 } from "lit/decorators.js";
238
+ import { classMap as classMap2 } from "lit/directives/class-map.js";
239
+ var DsContainer = class extends DSElement {
240
+ constructor() {
241
+ super(...arguments);
242
+ this.size = "lg";
243
+ this.padding = "md";
244
+ }
245
+ static {
246
+ this.styles = [];
247
+ }
248
+ connectedCallback() {
249
+ super.connectedCallback();
250
+ this.validateProps();
251
+ }
252
+ updated(changedProperties) {
253
+ super.updated(changedProperties);
254
+ if (changedProperties.has("size") || changedProperties.has("padding")) {
255
+ this.validateProps();
256
+ }
257
+ }
258
+ validateProps() {
259
+ validateToken(this.size, CONTAINER_SIZE_TOKENS, "size", "ds-container");
260
+ validateToken(this.padding, SPACING_TOKENS, "padding", "ds-container");
261
+ }
262
+ render() {
263
+ const classes = {
264
+ "ds-container": true
265
+ };
266
+ return html2`
267
+ <div
268
+ class=${classMap2(classes)}
269
+ data-size=${this.size}
270
+ data-padding=${this.padding}
271
+ data-layout="container"
272
+ >
273
+ <slot></slot>
274
+ </div>
275
+ `;
276
+ }
277
+ };
278
+ __decorateClass([
279
+ property2({ type: String, reflect: true })
280
+ ], DsContainer.prototype, "size", 2);
281
+ __decorateClass([
282
+ property2({ type: String, reflect: true })
283
+ ], DsContainer.prototype, "padding", 2);
284
+ define("ds-container", DsContainer);
285
+
286
+ // src/components/layout/grid.ts
287
+ import { html as html3 } from "lit";
288
+ import { property as property3 } from "lit/decorators.js";
289
+ import { classMap as classMap3 } from "lit/directives/class-map.js";
290
+ var COLUMN_VALUES = [
291
+ "1",
292
+ "2",
293
+ "3",
294
+ "4",
295
+ "5",
296
+ "6",
297
+ "7",
298
+ "8",
299
+ "9",
300
+ "10",
301
+ "11",
302
+ "12",
303
+ "auto-fit",
304
+ "auto-fill"
305
+ ];
306
+ var DsGrid = class extends DSElement {
307
+ constructor() {
308
+ super(...arguments);
309
+ this.columns = "1";
310
+ this.gap = "md";
311
+ }
312
+ static {
313
+ this.styles = [];
314
+ }
315
+ connectedCallback() {
316
+ super.connectedCallback();
317
+ this.validateProps();
318
+ }
319
+ updated(changedProperties) {
320
+ super.updated(changedProperties);
321
+ if (changedProperties.has("columns") || changedProperties.has("gap") || changedProperties.has("rowGap") || changedProperties.has("columnGap")) {
322
+ this.validateProps();
323
+ }
324
+ }
325
+ validateProps() {
326
+ validateResponsiveToken(this.columns, COLUMN_VALUES, "columns", "ds-grid");
327
+ validateResponsiveToken(this.gap, SPACING_TOKENS, "gap", "ds-grid");
328
+ if (this.rowGap) {
329
+ validateToken(this.rowGap, SPACING_TOKENS, "row-gap", "ds-grid");
330
+ }
331
+ if (this.columnGap) {
332
+ validateToken(this.columnGap, SPACING_TOKENS, "column-gap", "ds-grid");
333
+ }
334
+ }
335
+ render() {
336
+ const baseColumns = isResponsiveValue(this.columns) ? getBaseValue(this.columns) : this.columns;
337
+ const baseGap = isResponsiveValue(this.gap) ? getBaseValue(this.gap) : this.gap;
338
+ const columnsClasses = isResponsiveValue(this.columns) ? generateResponsiveClasses("grid", "cols", this.columns) : [];
339
+ const gapClasses = isResponsiveValue(this.gap) ? generateResponsiveClasses("grid", "gap", this.gap) : [];
340
+ const classes = {
341
+ "ds-grid": true,
342
+ ...Object.fromEntries(columnsClasses.map((c) => [c, true])),
343
+ ...Object.fromEntries(gapClasses.map((c) => [c, true]))
344
+ };
345
+ return html3`
346
+ <div
347
+ class=${classMap3(classes)}
348
+ data-columns=${baseColumns}
349
+ data-gap=${baseGap}
350
+ data-row-gap=${this.rowGap || ""}
351
+ data-column-gap=${this.columnGap || ""}
352
+ data-layout="grid"
353
+ >
354
+ <slot></slot>
355
+ </div>
356
+ `;
357
+ }
358
+ };
359
+ __decorateClass([
360
+ property3({ type: String, reflect: true })
361
+ ], DsGrid.prototype, "columns", 2);
362
+ __decorateClass([
363
+ property3({ type: String, reflect: true })
364
+ ], DsGrid.prototype, "gap", 2);
365
+ __decorateClass([
366
+ property3({ type: String, reflect: true, attribute: "row-gap" })
367
+ ], DsGrid.prototype, "rowGap", 2);
368
+ __decorateClass([
369
+ property3({ type: String, reflect: true, attribute: "column-gap" })
370
+ ], DsGrid.prototype, "columnGap", 2);
371
+ define("ds-grid", DsGrid);
372
+
373
+ // src/components/layout/box.ts
374
+ import { html as html4 } from "lit";
375
+ import { property as property4 } from "lit/decorators.js";
376
+ import { classMap as classMap4 } from "lit/directives/class-map.js";
377
+ var DsBox = class extends DSElement {
378
+ static {
379
+ this.styles = [];
380
+ }
381
+ connectedCallback() {
382
+ super.connectedCallback();
383
+ this.validateProps();
384
+ }
385
+ updated(changedProperties) {
386
+ super.updated(changedProperties);
387
+ if (changedProperties.has("p") || changedProperties.has("px") || changedProperties.has("py") || changedProperties.has("bg") || changedProperties.has("radius")) {
388
+ this.validateProps();
389
+ }
390
+ }
391
+ validateProps() {
392
+ if (this.p) {
393
+ validateToken(this.p, SPACING_TOKENS, "p", "ds-box");
394
+ }
395
+ if (this.px) {
396
+ validateToken(this.px, SPACING_TOKENS, "px", "ds-box");
397
+ }
398
+ if (this.py) {
399
+ validateToken(this.py, SPACING_TOKENS, "py", "ds-box");
400
+ }
401
+ if (this.bg) {
402
+ validateToken(this.bg, SURFACE_TOKENS, "bg", "ds-box");
403
+ }
404
+ if (this.radius) {
405
+ validateToken(this.radius, RADIUS_TOKENS, "radius", "ds-box");
406
+ }
407
+ }
408
+ render() {
409
+ const classes = {
410
+ "ds-box": true
411
+ };
412
+ return html4`
413
+ <div
414
+ class=${classMap4(classes)}
415
+ data-p=${this.p || ""}
416
+ data-px=${this.px || ""}
417
+ data-py=${this.py || ""}
418
+ data-bg=${this.bg || ""}
419
+ data-radius=${this.radius || ""}
420
+ data-layout="box"
421
+ >
422
+ <slot></slot>
423
+ </div>
424
+ `;
425
+ }
426
+ };
427
+ __decorateClass([
428
+ property4({ type: String, reflect: true })
429
+ ], DsBox.prototype, "p", 2);
430
+ __decorateClass([
431
+ property4({ type: String, reflect: true })
432
+ ], DsBox.prototype, "px", 2);
433
+ __decorateClass([
434
+ property4({ type: String, reflect: true })
435
+ ], DsBox.prototype, "py", 2);
436
+ __decorateClass([
437
+ property4({ type: String, reflect: true })
438
+ ], DsBox.prototype, "bg", 2);
439
+ __decorateClass([
440
+ property4({ type: String, reflect: true })
441
+ ], DsBox.prototype, "radius", 2);
442
+ define("ds-box", DsBox);
443
+
444
+ // src/components/layout/page.ts
445
+ import { html as html5 } from "lit";
446
+ import { property as property5 } from "lit/decorators.js";
447
+ import { classMap as classMap5 } from "lit/directives/class-map.js";
448
+ var MIN_HEIGHT_VALUES = ["viewport", "full"];
449
+ var DsPage = class extends DSElement {
450
+ constructor() {
451
+ super(...arguments);
452
+ this.bg = "background";
453
+ this.minHeight = "viewport";
454
+ }
455
+ static {
456
+ this.styles = [];
457
+ }
458
+ connectedCallback() {
459
+ super.connectedCallback();
460
+ this.validateProps();
461
+ }
462
+ updated(changedProperties) {
463
+ super.updated(changedProperties);
464
+ if (changedProperties.has("bg") || changedProperties.has("minHeight")) {
465
+ this.validateProps();
466
+ }
467
+ }
468
+ validateProps() {
469
+ validateToken(this.bg, SURFACE_TOKENS, "bg", "ds-page");
470
+ validateToken(this.minHeight, MIN_HEIGHT_VALUES, "min-height", "ds-page");
471
+ }
472
+ render() {
473
+ const classes = {
474
+ "ds-page": true
475
+ };
476
+ return html5`
477
+ <div
478
+ class=${classMap5(classes)}
479
+ data-bg=${this.bg}
480
+ data-min-height=${this.minHeight}
481
+ data-layout="page"
482
+ >
483
+ <slot></slot>
484
+ </div>
485
+ `;
486
+ }
487
+ };
488
+ __decorateClass([
489
+ property5({ type: String, reflect: true })
490
+ ], DsPage.prototype, "bg", 2);
491
+ __decorateClass([
492
+ property5({ type: String, reflect: true, attribute: "min-height" })
493
+ ], DsPage.prototype, "minHeight", 2);
494
+ define("ds-page", DsPage);
495
+
496
+ // src/components/layout/section.ts
497
+ import { html as html6 } from "lit";
498
+ import { property as property6 } from "lit/decorators.js";
499
+ import { classMap as classMap6 } from "lit/directives/class-map.js";
500
+ var DsSection = class extends DSElement {
501
+ constructor() {
502
+ super(...arguments);
503
+ this.spacing = "lg";
504
+ }
505
+ static {
506
+ this.styles = [];
507
+ }
508
+ connectedCallback() {
509
+ super.connectedCallback();
510
+ this.validateProps();
511
+ }
512
+ updated(changedProperties) {
513
+ super.updated(changedProperties);
514
+ if (changedProperties.has("spacing")) {
515
+ this.validateProps();
516
+ }
517
+ }
518
+ validateProps() {
519
+ validateToken(this.spacing, SPACING_TOKENS, "spacing", "ds-section");
520
+ }
521
+ render() {
522
+ const classes = {
523
+ "ds-section": true
524
+ };
525
+ return html6`
526
+ <section class=${classMap6(classes)} data-spacing=${this.spacing} data-layout="section">
527
+ <slot></slot>
528
+ </section>
529
+ `;
530
+ }
531
+ };
532
+ __decorateClass([
533
+ property6({ type: String, reflect: true })
534
+ ], DsSection.prototype, "spacing", 2);
535
+ define("ds-section", DsSection);
536
+
537
+ // src/components/layout/app-shell.ts
538
+ import { html as html7 } from "lit";
539
+ import { property as property7 } from "lit/decorators.js";
540
+ import { classMap as classMap7 } from "lit/directives/class-map.js";
541
+ var DsAppShell = class extends DSElement {
542
+ constructor() {
543
+ super(...arguments);
544
+ this.sidebarPosition = "none";
545
+ }
546
+ static {
547
+ this.styles = [];
548
+ }
549
+ render() {
550
+ const classes = {
551
+ "ds-app-shell": true
552
+ };
553
+ return html7`
554
+ <div
555
+ class=${classMap7(classes)}
556
+ data-sidebar=${this.sidebarPosition}
557
+ data-layout="app-shell"
558
+ >
559
+ <slot name="header"></slot>
560
+ ${this.sidebarPosition !== "none" ? html7`<slot name="sidebar"></slot>` : null}
561
+ <slot></slot>
562
+ <slot name="footer"></slot>
563
+ </div>
564
+ `;
565
+ }
566
+ };
567
+ __decorateClass([
568
+ property7({ type: String, reflect: true, attribute: "sidebar-position" })
569
+ ], DsAppShell.prototype, "sidebarPosition", 2);
570
+ define("ds-app-shell", DsAppShell);
571
+
572
+ // src/components/layout/header.ts
573
+ import { html as html8 } from "lit";
574
+ import { property as property8 } from "lit/decorators.js";
575
+ import { classMap as classMap8 } from "lit/directives/class-map.js";
576
+ var DsHeader = class extends DSElement {
577
+ constructor() {
578
+ super(...arguments);
579
+ this.sticky = false;
580
+ this.safeArea = false;
581
+ }
582
+ static {
583
+ this.styles = [];
584
+ }
585
+ render() {
586
+ const classes = {
587
+ "ds-header": true
588
+ };
589
+ return html8`
590
+ <header
591
+ class=${classMap8(classes)}
592
+ ?data-sticky=${this.sticky}
593
+ ?data-safe-area=${this.safeArea}
594
+ data-layout="header"
595
+ >
596
+ <slot></slot>
597
+ </header>
598
+ `;
599
+ }
600
+ };
601
+ __decorateClass([
602
+ property8({ type: Boolean, reflect: true })
603
+ ], DsHeader.prototype, "sticky", 2);
604
+ __decorateClass([
605
+ property8({ type: Boolean, reflect: true, attribute: "safe-area" })
606
+ ], DsHeader.prototype, "safeArea", 2);
607
+ define("ds-header", DsHeader);
608
+
609
+ // src/components/layout/footer.ts
610
+ import { html as html9 } from "lit";
611
+ import { property as property9 } from "lit/decorators.js";
612
+ import { classMap as classMap9 } from "lit/directives/class-map.js";
613
+ var DsFooter = class extends DSElement {
614
+ constructor() {
615
+ super(...arguments);
616
+ this.sticky = false;
617
+ this.safeArea = false;
618
+ }
619
+ static {
620
+ this.styles = [];
621
+ }
622
+ render() {
623
+ const classes = {
624
+ "ds-footer": true
625
+ };
626
+ return html9`
627
+ <footer
628
+ class=${classMap9(classes)}
629
+ ?data-sticky=${this.sticky}
630
+ ?data-safe-area=${this.safeArea}
631
+ data-layout="footer"
632
+ >
633
+ <slot></slot>
634
+ </footer>
635
+ `;
636
+ }
637
+ };
638
+ __decorateClass([
639
+ property9({ type: Boolean, reflect: true })
640
+ ], DsFooter.prototype, "sticky", 2);
641
+ __decorateClass([
642
+ property9({ type: Boolean, reflect: true, attribute: "safe-area" })
643
+ ], DsFooter.prototype, "safeArea", 2);
644
+ define("ds-footer", DsFooter);
645
+
646
+ // src/components/layout/main.ts
647
+ import { html as html10 } from "lit";
648
+ import { property as property10 } from "lit/decorators.js";
649
+ import { classMap as classMap10 } from "lit/directives/class-map.js";
650
+ var DsMain = class extends DSElement {
651
+ constructor() {
652
+ super(...arguments);
653
+ this.id = "main-content";
654
+ }
655
+ static {
656
+ this.styles = [];
657
+ }
658
+ render() {
659
+ const classes = {
660
+ "ds-main": true
661
+ };
662
+ return html10`
663
+ <main class=${classMap10(classes)} id=${this.id} tabindex="-1" data-layout="main">
664
+ <slot></slot>
665
+ </main>
666
+ `;
667
+ }
668
+ };
669
+ __decorateClass([
670
+ property10({ type: String, reflect: true })
671
+ ], DsMain.prototype, "id", 2);
672
+ define("ds-main", DsMain);
673
+
674
+ // src/components/layout/spacer.ts
675
+ import { html as html11 } from "lit";
676
+ import { property as property11 } from "lit/decorators.js";
677
+ import { classMap as classMap11 } from "lit/directives/class-map.js";
678
+ var AXIS_VALUES = ["horizontal", "vertical"];
679
+ var DsSpacer = class extends DSElement {
680
+ constructor() {
681
+ super(...arguments);
682
+ this.size = "md";
683
+ this.axis = "vertical";
684
+ }
685
+ static {
686
+ this.styles = [];
687
+ }
688
+ connectedCallback() {
689
+ super.connectedCallback();
690
+ this.validateProps();
691
+ }
692
+ updated(changedProperties) {
693
+ super.updated(changedProperties);
694
+ if (changedProperties.has("size") || changedProperties.has("axis")) {
695
+ this.validateProps();
696
+ }
697
+ }
698
+ validateProps() {
699
+ validateToken(this.size, SPACING_TOKENS, "size", "ds-spacer");
700
+ validateToken(this.axis, AXIS_VALUES, "axis", "ds-spacer");
701
+ }
702
+ render() {
703
+ const classes = {
704
+ "ds-spacer": true
705
+ };
706
+ return html11`
707
+ <div
708
+ class=${classMap11(classes)}
709
+ data-size=${this.size}
710
+ data-axis=${this.axis}
711
+ aria-hidden="true"
712
+ data-layout="spacer"
713
+ ></div>
714
+ `;
715
+ }
716
+ };
717
+ __decorateClass([
718
+ property11({ type: String, reflect: true })
719
+ ], DsSpacer.prototype, "size", 2);
720
+ __decorateClass([
721
+ property11({ type: String, reflect: true })
722
+ ], DsSpacer.prototype, "axis", 2);
723
+ define("ds-spacer", DsSpacer);
724
+
725
+ // src/components/layout/center.ts
726
+ import { html as html12 } from "lit";
727
+ import { property as property12 } from "lit/decorators.js";
728
+ import { classMap as classMap12 } from "lit/directives/class-map.js";
729
+ var DsCenter = class extends DSElement {
730
+ constructor() {
731
+ super(...arguments);
732
+ this.vertical = false;
733
+ }
734
+ static {
735
+ this.styles = [];
736
+ }
737
+ connectedCallback() {
738
+ super.connectedCallback();
739
+ this.validateProps();
740
+ }
741
+ updated(changedProperties) {
742
+ super.updated(changedProperties);
743
+ if (changedProperties.has("maxWidth")) {
744
+ this.validateProps();
745
+ }
746
+ }
747
+ validateProps() {
748
+ if (this.maxWidth) {
749
+ validateToken(this.maxWidth, CONTAINER_SIZE_TOKENS, "max-width", "ds-center");
750
+ }
751
+ }
752
+ render() {
753
+ const classes = {
754
+ "ds-center": true
755
+ };
756
+ return html12`
757
+ <div
758
+ class=${classMap12(classes)}
759
+ data-max-width=${this.maxWidth || ""}
760
+ ?data-vertical=${this.vertical}
761
+ data-layout="center"
762
+ >
763
+ <slot></slot>
764
+ </div>
765
+ `;
766
+ }
767
+ };
768
+ __decorateClass([
769
+ property12({ type: String, reflect: true, attribute: "max-width" })
770
+ ], DsCenter.prototype, "maxWidth", 2);
771
+ __decorateClass([
772
+ property12({ type: Boolean, reflect: true })
773
+ ], DsCenter.prototype, "vertical", 2);
774
+ define("ds-center", DsCenter);
775
+
776
+ // src/components/layout/split.ts
777
+ import { html as html13 } from "lit";
778
+ import { property as property13 } from "lit/decorators.js";
779
+ import { classMap as classMap13 } from "lit/directives/class-map.js";
780
+ var RATIO_VALUES = ["equal", "1:2", "2:1", "1:3", "3:1"];
781
+ var DsSplit = class extends DSElement {
782
+ constructor() {
783
+ super(...arguments);
784
+ this.collapseAt = "md";
785
+ this.gap = "md";
786
+ this.ratio = "equal";
787
+ }
788
+ static {
789
+ this.styles = [];
790
+ }
791
+ connectedCallback() {
792
+ super.connectedCallback();
793
+ this.validateProps();
794
+ }
795
+ updated(changedProperties) {
796
+ super.updated(changedProperties);
797
+ if (changedProperties.has("collapseAt") || changedProperties.has("gap") || changedProperties.has("ratio")) {
798
+ this.validateProps();
799
+ }
800
+ }
801
+ validateProps() {
802
+ validateToken(this.collapseAt, BREAKPOINT_TOKENS, "collapse-at", "ds-split");
803
+ validateToken(this.gap, SPACING_TOKENS, "gap", "ds-split");
804
+ validateToken(this.ratio, RATIO_VALUES, "ratio", "ds-split");
805
+ }
806
+ render() {
807
+ const ratioData = this.ratio.replace(":", "-");
808
+ const classes = {
809
+ "ds-split": true
810
+ };
811
+ return html13`
812
+ <div
813
+ class=${classMap13(classes)}
814
+ data-collapse-at=${this.collapseAt}
815
+ data-gap=${this.gap}
816
+ data-ratio=${ratioData}
817
+ data-layout="split"
818
+ >
819
+ <slot></slot>
820
+ </div>
821
+ `;
822
+ }
823
+ };
824
+ __decorateClass([
825
+ property13({ type: String, reflect: true, attribute: "collapse-at" })
826
+ ], DsSplit.prototype, "collapseAt", 2);
827
+ __decorateClass([
828
+ property13({ type: String, reflect: true })
829
+ ], DsSplit.prototype, "gap", 2);
830
+ __decorateClass([
831
+ property13({ type: String, reflect: true })
832
+ ], DsSplit.prototype, "ratio", 2);
833
+ define("ds-split", DsSplit);
834
+
835
+ // src/components/layout/wrap.ts
836
+ import { html as html14 } from "lit";
837
+ import { property as property14 } from "lit/decorators.js";
838
+ import { classMap as classMap14 } from "lit/directives/class-map.js";
839
+ var DsWrap = class extends DSElement {
840
+ constructor() {
841
+ super(...arguments);
842
+ this.gap = "sm";
843
+ this.align = "start";
844
+ }
845
+ static {
846
+ this.styles = [];
847
+ }
848
+ connectedCallback() {
849
+ super.connectedCallback();
850
+ this.validateProps();
851
+ }
852
+ updated(changedProperties) {
853
+ super.updated(changedProperties);
854
+ if (changedProperties.has("gap") || changedProperties.has("rowGap") || changedProperties.has("align")) {
855
+ this.validateProps();
856
+ }
857
+ }
858
+ validateProps() {
859
+ validateToken(this.gap, SPACING_TOKENS, "gap", "ds-wrap");
860
+ if (this.rowGap) {
861
+ validateToken(this.rowGap, SPACING_TOKENS, "row-gap", "ds-wrap");
862
+ }
863
+ const wrapAlignValues = ["start", "center", "end"];
864
+ validateToken(this.align, wrapAlignValues, "align", "ds-wrap");
865
+ }
866
+ render() {
867
+ const classes = {
868
+ "ds-wrap": true
869
+ };
870
+ return html14`
871
+ <div
872
+ class=${classMap14(classes)}
873
+ data-gap=${this.gap}
874
+ data-row-gap=${this.rowGap || ""}
875
+ data-align=${this.align}
876
+ data-layout="wrap"
877
+ >
878
+ <slot></slot>
879
+ </div>
880
+ `;
881
+ }
882
+ };
883
+ __decorateClass([
884
+ property14({ type: String, reflect: true })
885
+ ], DsWrap.prototype, "gap", 2);
886
+ __decorateClass([
887
+ property14({ type: String, reflect: true, attribute: "row-gap" })
888
+ ], DsWrap.prototype, "rowGap", 2);
889
+ __decorateClass([
890
+ property14({ type: String, reflect: true })
891
+ ], DsWrap.prototype, "align", 2);
892
+ define("ds-wrap", DsWrap);
893
+
894
+ export {
895
+ DsFlow,
896
+ DsContainer,
897
+ DsGrid,
898
+ DsBox,
899
+ DsPage,
900
+ DsSection,
901
+ DsAppShell,
902
+ DsHeader,
903
+ DsFooter,
904
+ DsMain,
905
+ DsSpacer,
906
+ DsCenter,
907
+ DsSplit,
908
+ DsWrap
909
+ };
910
+ //# sourceMappingURL=chunk-4HLM6DBG.js.map