@boostdev/design-system-components 1.1.1 → 1.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 (206) hide show
  1. package/dist/client.cjs +50 -50
  2. package/dist/client.css +456 -456
  3. package/dist/client.js +50 -50
  4. package/dist/index.cjs +50 -50
  5. package/dist/index.css +456 -456
  6. package/dist/index.js +50 -50
  7. package/dist/web-components/chunk-2QA62WCQ.js +48 -0
  8. package/dist/web-components/chunk-4BX6AWXX.js +146 -0
  9. package/dist/web-components/chunk-57TRNCWQ.js +93 -0
  10. package/dist/web-components/chunk-5IPHEONG.js +139 -0
  11. package/dist/web-components/chunk-5R6IFELV.js +63 -0
  12. package/dist/web-components/chunk-5TFWOPLH.js +49 -0
  13. package/dist/web-components/chunk-6I3CFC26.js +89 -0
  14. package/dist/web-components/chunk-6T3RKUKG.js +65 -0
  15. package/dist/web-components/chunk-7FMR53BW.js +127 -0
  16. package/dist/web-components/chunk-A67LCT7C.js +134 -0
  17. package/dist/web-components/chunk-AGKJTMJI.js +56 -0
  18. package/dist/web-components/chunk-BQLZ7I4G.js +56 -0
  19. package/dist/web-components/chunk-CAPI25CU.js +53 -0
  20. package/dist/web-components/chunk-CJ5ZOO42.js +229 -0
  21. package/dist/web-components/chunk-CR5PGUHV.js +109 -0
  22. package/dist/web-components/chunk-ECW3HHWA.js +185 -0
  23. package/dist/web-components/chunk-HGBNDR22.js +98 -0
  24. package/dist/web-components/chunk-IK3PTFZ4.js +133 -0
  25. package/dist/web-components/chunk-IQGLIQSO.js +188 -0
  26. package/dist/web-components/chunk-ITHLKR7Q.js +105 -0
  27. package/dist/web-components/chunk-K5CE6HSB.js +169 -0
  28. package/dist/web-components/chunk-L3XHOMN6.js +111 -0
  29. package/dist/{web-components.js → web-components/chunk-LGEZYFUU.js} +62 -844
  30. package/dist/web-components/chunk-LSC4N56Q.js +168 -0
  31. package/dist/web-components/chunk-LY62SAVN.js +64 -0
  32. package/dist/web-components/chunk-O4UFI2RX.js +244 -0
  33. package/dist/web-components/chunk-O7I63SQX.js +124 -0
  34. package/dist/web-components/chunk-OHUTLSIQ.js +69 -0
  35. package/dist/web-components/chunk-OQTRTMAB.js +27 -0
  36. package/dist/web-components/chunk-OTX4COSV.js +187 -0
  37. package/dist/web-components/chunk-PY62FTRW.js +179 -0
  38. package/dist/web-components/chunk-Q4T5BJT6.js +94 -0
  39. package/dist/web-components/chunk-QDRH46TF.js +281 -0
  40. package/dist/web-components/chunk-QDST57JC.js +119 -0
  41. package/dist/web-components/chunk-QPOKHLMQ.js +45 -0
  42. package/dist/web-components/chunk-SOQQ7RVJ.js +88 -0
  43. package/dist/web-components/chunk-UFFCKVZE.js +149 -0
  44. package/dist/web-components/chunk-VM3YHGQ2.js +152 -0
  45. package/dist/web-components/chunk-VMMVWLXL.js +53 -0
  46. package/dist/web-components/chunk-VSS5ITNE.js +109 -0
  47. package/dist/web-components/chunk-XIENXR7H.js +118 -0
  48. package/dist/web-components/chunk-Y4MAXTMA.js +80 -0
  49. package/dist/web-components/chunk-YLVTEY23.js +165 -0
  50. package/dist/web-components/globals.d.ts +2 -0
  51. package/dist/web-components/globals.js +1 -0
  52. package/dist/web-components/index.d.ts +41 -0
  53. package/dist/web-components/index.js +165 -0
  54. package/dist/web-components/interaction/bds-accordion-item.d.ts +54 -0
  55. package/dist/web-components/interaction/bds-accordion-item.js +7 -0
  56. package/dist/web-components/interaction/bds-accordion.d.ts +50 -0
  57. package/dist/web-components/interaction/bds-accordion.js +7 -0
  58. package/dist/web-components/interaction/bds-button.d.ts +100 -0
  59. package/dist/web-components/interaction/bds-button.js +7 -0
  60. package/dist/web-components/interaction/bds-collapsible.d.ts +52 -0
  61. package/dist/web-components/interaction/bds-collapsible.js +7 -0
  62. package/dist/web-components/interaction/bds-dialog.d.ts +56 -0
  63. package/dist/web-components/interaction/bds-dialog.js +7 -0
  64. package/dist/web-components/interaction/bds-drawer.d.ts +64 -0
  65. package/dist/web-components/interaction/bds-drawer.js +7 -0
  66. package/dist/web-components/interaction/bds-popover.d.ts +62 -0
  67. package/dist/web-components/interaction/bds-popover.js +7 -0
  68. package/dist/web-components/interaction/bds-skip-link.d.ts +36 -0
  69. package/dist/web-components/interaction/bds-skip-link.js +7 -0
  70. package/dist/web-components/interaction/bds-tab-panel.d.ts +26 -0
  71. package/dist/web-components/interaction/bds-tab-panel.js +7 -0
  72. package/dist/web-components/interaction/bds-tab.d.ts +45 -0
  73. package/dist/web-components/interaction/bds-tab.js +7 -0
  74. package/dist/web-components/interaction/bds-tabs.d.ts +46 -0
  75. package/dist/web-components/interaction/bds-tabs.js +7 -0
  76. package/dist/web-components/interaction/bds-toast-provider.d.ts +57 -0
  77. package/dist/web-components/interaction/bds-toast-provider.js +7 -0
  78. package/dist/web-components/interaction/bds-tooltip.d.ts +50 -0
  79. package/dist/web-components/interaction/bds-tooltip.js +7 -0
  80. package/dist/web-components/interaction/form/bds-checkbox.d.ts +70 -0
  81. package/dist/web-components/interaction/form/bds-checkbox.js +7 -0
  82. package/dist/web-components/interaction/form/bds-combobox.d.ts +84 -0
  83. package/dist/web-components/interaction/form/bds-combobox.js +7 -0
  84. package/dist/web-components/interaction/form/bds-file-input.d.ts +62 -0
  85. package/dist/web-components/interaction/form/bds-file-input.js +7 -0
  86. package/dist/web-components/interaction/form/bds-number-input.d.ts +68 -0
  87. package/dist/web-components/interaction/form/bds-number-input.js +7 -0
  88. package/dist/web-components/interaction/form/bds-radio.d.ts +68 -0
  89. package/dist/web-components/interaction/form/bds-radio.js +7 -0
  90. package/dist/web-components/interaction/form/bds-segmented-control.d.ts +71 -0
  91. package/dist/web-components/interaction/form/bds-segmented-control.js +7 -0
  92. package/dist/web-components/interaction/form/bds-select.d.ts +79 -0
  93. package/dist/web-components/interaction/form/bds-select.js +7 -0
  94. package/dist/web-components/interaction/form/bds-slider.d.ts +70 -0
  95. package/dist/web-components/interaction/form/bds-slider.js +7 -0
  96. package/dist/web-components/interaction/form/bds-switch.d.ts +67 -0
  97. package/dist/web-components/interaction/form/bds-switch.js +7 -0
  98. package/dist/web-components/interaction/form/bds-textarea.d.ts +70 -0
  99. package/dist/web-components/interaction/form/bds-textarea.js +7 -0
  100. package/dist/web-components/ui/bds-alert.d.ts +66 -0
  101. package/dist/web-components/ui/bds-alert.js +7 -0
  102. package/dist/web-components/ui/bds-avatar.d.ts +50 -0
  103. package/dist/web-components/ui/bds-avatar.js +7 -0
  104. package/dist/web-components/ui/bds-badge.d.ts +35 -0
  105. package/dist/web-components/ui/bds-badge.js +7 -0
  106. package/dist/web-components/ui/bds-breadcrumb.d.ts +35 -0
  107. package/dist/web-components/ui/bds-breadcrumb.js +7 -0
  108. package/dist/web-components/ui/bds-card.d.ts +72 -0
  109. package/dist/web-components/ui/bds-card.js +7 -0
  110. package/dist/web-components/ui/bds-description-list.d.ts +42 -0
  111. package/dist/web-components/ui/bds-description-list.js +7 -0
  112. package/dist/web-components/ui/bds-icon-wrapper.d.ts +39 -0
  113. package/dist/web-components/ui/bds-icon-wrapper.js +7 -0
  114. package/dist/web-components/ui/bds-link.d.ts +59 -0
  115. package/dist/web-components/ui/bds-link.js +7 -0
  116. package/dist/web-components/ui/bds-loading.d.ts +32 -0
  117. package/dist/web-components/ui/bds-loading.js +7 -0
  118. package/dist/web-components/ui/bds-notification-banner.d.ts +61 -0
  119. package/dist/web-components/ui/bds-notification-banner.js +7 -0
  120. package/dist/web-components/ui/bds-progress-circle.d.ts +53 -0
  121. package/dist/web-components/ui/bds-progress-circle.js +7 -0
  122. package/dist/web-components/ui/bds-progress.d.ts +54 -0
  123. package/dist/web-components/ui/bds-progress.js +7 -0
  124. package/dist/web-components/ui/bds-rating.d.ts +36 -0
  125. package/dist/web-components/ui/bds-rating.js +7 -0
  126. package/dist/web-components/ui/bds-section-header.d.ts +53 -0
  127. package/dist/web-components/ui/bds-section-header.js +8 -0
  128. package/dist/web-components/ui/bds-separator.d.ts +32 -0
  129. package/dist/web-components/ui/bds-separator.js +7 -0
  130. package/dist/web-components/ui/bds-skeleton.d.ts +22 -0
  131. package/dist/web-components/ui/bds-skeleton.js +7 -0
  132. package/dist/web-components/ui/bds-typography.d.ts +44 -0
  133. package/dist/web-components/ui/bds-typography.js +8 -0
  134. package/package.json +169 -4
  135. package/src/web-components/index.ts +47 -0
  136. package/src/web-components/interaction/bds-accordion-item.spec.ts +75 -0
  137. package/src/web-components/interaction/bds-accordion-item.ts +181 -0
  138. package/src/web-components/interaction/bds-accordion.spec.ts +73 -0
  139. package/src/web-components/interaction/bds-accordion.ts +99 -0
  140. package/src/web-components/interaction/bds-collapsible.spec.ts +56 -0
  141. package/src/web-components/interaction/bds-collapsible.ts +170 -0
  142. package/src/web-components/interaction/bds-dialog.spec.ts +119 -0
  143. package/src/web-components/interaction/bds-dialog.ts +224 -0
  144. package/src/web-components/interaction/bds-drawer.spec.ts +113 -0
  145. package/src/web-components/interaction/bds-drawer.ts +266 -0
  146. package/src/web-components/interaction/bds-skip-link.spec.ts +42 -0
  147. package/src/web-components/interaction/bds-skip-link.ts +74 -0
  148. package/src/web-components/interaction/bds-tab-panel.spec.ts +32 -0
  149. package/src/web-components/interaction/bds-tab-panel.ts +38 -0
  150. package/src/web-components/interaction/bds-tab.spec.ts +71 -0
  151. package/src/web-components/interaction/bds-tab.ts +110 -0
  152. package/src/web-components/interaction/bds-tabs.spec.ts +120 -0
  153. package/src/web-components/interaction/bds-tabs.ts +152 -0
  154. package/src/web-components/interaction/bds-tooltip.spec.ts +49 -0
  155. package/src/web-components/interaction/bds-tooltip.ts +127 -0
  156. package/src/web-components/interaction/form/bds-checkbox.spec.ts +63 -0
  157. package/src/web-components/interaction/form/bds-checkbox.ts +168 -0
  158. package/src/web-components/interaction/form/bds-combobox.spec.ts +117 -0
  159. package/src/web-components/interaction/form/bds-combobox.ts +336 -0
  160. package/src/web-components/interaction/form/bds-file-input.spec.ts +58 -0
  161. package/src/web-components/interaction/form/bds-file-input.ts +209 -0
  162. package/src/web-components/interaction/form/bds-number-input.spec.ts +87 -0
  163. package/src/web-components/interaction/form/bds-number-input.ts +221 -0
  164. package/src/web-components/interaction/form/bds-radio.spec.ts +70 -0
  165. package/src/web-components/interaction/form/bds-radio.ts +157 -0
  166. package/src/web-components/interaction/form/bds-segmented-control.spec.ts +74 -0
  167. package/src/web-components/interaction/form/bds-segmented-control.ts +211 -0
  168. package/src/web-components/interaction/form/bds-select.spec.ts +74 -0
  169. package/src/web-components/interaction/form/bds-select.ts +190 -0
  170. package/src/web-components/interaction/form/bds-slider.spec.ts +41 -0
  171. package/src/web-components/interaction/form/bds-slider.ts +162 -0
  172. package/src/web-components/interaction/form/bds-switch.spec.ts +62 -0
  173. package/src/web-components/interaction/form/bds-switch.ts +166 -0
  174. package/src/web-components/interaction/form/bds-textarea.spec.ts +55 -0
  175. package/src/web-components/interaction/form/bds-textarea.ts +143 -0
  176. package/src/web-components/ui/bds-avatar.spec.ts +75 -0
  177. package/src/web-components/ui/bds-avatar.ts +122 -0
  178. package/src/web-components/ui/bds-breadcrumb.spec.ts +55 -0
  179. package/src/web-components/ui/bds-breadcrumb.ts +114 -0
  180. package/src/web-components/ui/bds-card.spec.ts +70 -0
  181. package/src/web-components/ui/bds-card.ts +156 -0
  182. package/src/web-components/ui/bds-description-list.spec.ts +36 -0
  183. package/src/web-components/ui/bds-description-list.ts +79 -0
  184. package/src/web-components/ui/bds-icon-wrapper.spec.ts +21 -0
  185. package/src/web-components/ui/bds-icon-wrapper.ts +68 -0
  186. package/src/web-components/ui/bds-link.spec.ts +72 -0
  187. package/src/web-components/ui/bds-link.ts +138 -0
  188. package/src/web-components/ui/bds-loading.spec.ts +38 -0
  189. package/src/web-components/ui/bds-loading.ts +76 -0
  190. package/src/web-components/ui/bds-notification-banner.spec.ts +82 -0
  191. package/src/web-components/ui/bds-notification-banner.ts +185 -0
  192. package/src/web-components/ui/bds-progress-circle.spec.ts +58 -0
  193. package/src/web-components/ui/bds-progress-circle.ts +142 -0
  194. package/src/web-components/ui/bds-progress.spec.ts +66 -0
  195. package/src/web-components/ui/bds-progress.ts +127 -0
  196. package/src/web-components/ui/bds-rating.spec.ts +70 -0
  197. package/src/web-components/ui/bds-rating.ts +80 -0
  198. package/src/web-components/ui/bds-section-header.spec.ts +57 -0
  199. package/src/web-components/ui/bds-section-header.ts +96 -0
  200. package/src/web-components/ui/bds-separator.spec.ts +50 -0
  201. package/src/web-components/ui/bds-separator.ts +66 -0
  202. package/src/web-components/ui/bds-skeleton.spec.ts +22 -0
  203. package/src/web-components/ui/bds-skeleton.ts +55 -0
  204. package/src/web-components/ui/bds-typography.spec.ts +76 -0
  205. package/src/web-components/ui/bds-typography.ts +112 -0
  206. package/dist/web-components.d.ts +0 -304
@@ -0,0 +1,187 @@
1
+ import {
2
+ T,
3
+ i,
4
+ i2
5
+ } from "./chunk-LGEZYFUU.js";
6
+
7
+ // src/web-components/interaction/form/bds-number-input.ts
8
+ var BdsNumberInput = class extends i2 {
9
+ static formAssociated = true;
10
+ static styles = i`
11
+ :host {
12
+ display: block;
13
+ }
14
+
15
+ :host([disabled]) {
16
+ opacity: 0.5;
17
+ pointer-events: none;
18
+ }
19
+
20
+ .row {
21
+ display: flex;
22
+ align-items: center;
23
+ }
24
+
25
+ .input {
26
+ flex: 1;
27
+ font-family: var(--bds-font_family--body);
28
+ font-size: var(--bds-font_size--body);
29
+ padding: var(--bds-space_s);
30
+ border: none;
31
+ --bdc_color: currentcolor;
32
+ --bdc-outline_radius: var(--bds-border_radius--xs);
33
+
34
+ outline: var(--bdc-outline_width) solid var(--bdc_color);
35
+ outline-offset: var(--bdc-outline_offset);
36
+ border-radius: var(--number-input_radius, var(--bdc-outline_radius));
37
+ box-shadow: var(--number-input_shadow, var(--bdc-outline_shadow));
38
+ background-color: var(--number-input_color_bg, var(--bds-color_bg));
39
+ color: var(--number-input_color, var(--bds-color_on-bg));
40
+ text-align: center;
41
+ -moz-appearance: textfield;
42
+ min-inline-size: 0;
43
+ }
44
+
45
+ .input::-webkit-inner-spin-button,
46
+ .input::-webkit-outer-spin-button {
47
+ appearance: none;
48
+ margin: 0;
49
+ }
50
+
51
+ .input:focus {
52
+ --bdc_color: var(--bdc_color--focus);
53
+ }
54
+
55
+ .input:focus-visible {
56
+ outline: var(--bds-outline_default);
57
+ outline-offset: var(--bds-outline_offset);
58
+ }
59
+
60
+ .stepper {
61
+ all: unset;
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: center;
65
+ inline-size: 2rem;
66
+ block-size: 2rem;
67
+ border-radius: var(--bds-border_radius--xs);
68
+ cursor: pointer;
69
+ flex-shrink: 0;
70
+ color: var(--bds-color_on-bg);
71
+ transition: var(--bds-animation_transition);
72
+ }
73
+
74
+ .stepper:focus-visible {
75
+ outline: var(--bds-outline_default);
76
+ outline-offset: var(--bds-outline_offset);
77
+ }
78
+
79
+ .stepper:disabled {
80
+ opacity: 0.4;
81
+ cursor: not-allowed;
82
+ }
83
+
84
+ @media (hover: hover) and (pointer: fine) {
85
+ .stepper:not(:disabled):hover {
86
+ background-color: var(--bds-color_bg--subtle);
87
+ }
88
+ }
89
+
90
+ .stepper svg {
91
+ inline-size: 1rem;
92
+ block-size: 1rem;
93
+ }
94
+ `;
95
+ static properties = {
96
+ name: { type: String, reflect: true },
97
+ value: { type: Number },
98
+ min: { type: Number },
99
+ max: { type: Number },
100
+ step: { type: Number },
101
+ disabled: { type: Boolean, reflect: true }
102
+ };
103
+ _internals;
104
+ constructor() {
105
+ super();
106
+ this._internals = this.attachInternals();
107
+ this.name = "";
108
+ this.value = 0;
109
+ this.min = void 0;
110
+ this.max = void 0;
111
+ this.step = 1;
112
+ this.disabled = false;
113
+ }
114
+ updated(changed) {
115
+ super.updated(changed);
116
+ if (changed.has("value")) {
117
+ this._internals.setFormValue?.(String(this.value));
118
+ }
119
+ }
120
+ formResetCallback() {
121
+ this.value = 0;
122
+ this._internals.setFormValue?.("0");
123
+ }
124
+ _clamp(v) {
125
+ let result = v;
126
+ if (this.min !== void 0) result = Math.max(this.min, result);
127
+ if (this.max !== void 0) result = Math.min(this.max, result);
128
+ return result;
129
+ }
130
+ _adjust(delta) {
131
+ const next = this._clamp(this.value + delta);
132
+ this.value = next;
133
+ this.dispatchEvent(new Event("input", { bubbles: true, composed: true }));
134
+ }
135
+ _handleChange(e) {
136
+ const v = parseFloat(e.target.value);
137
+ this.value = this._clamp(isNaN(v) ? 0 : v);
138
+ }
139
+ render() {
140
+ const atMin = this.min !== void 0 && this.value <= this.min;
141
+ const atMax = this.max !== void 0 && this.value >= this.max;
142
+ return T`
143
+ <div class="row">
144
+ <button
145
+ type="button"
146
+ class="stepper"
147
+ aria-label="Decrease"
148
+ tabindex="-1"
149
+ ?disabled=${this.disabled || atMin}
150
+ @click=${() => this._adjust(-this.step)}
151
+ >
152
+ <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
153
+ <path stroke-linecap="round" stroke-linejoin="round" d="M5 12h14" />
154
+ </svg>
155
+ </button>
156
+ <input
157
+ type="number"
158
+ class="input"
159
+ name=${this.name}
160
+ .value=${String(this.value)}
161
+ min=${this.min ?? ""}
162
+ max=${this.max ?? ""}
163
+ step=${this.step}
164
+ ?disabled=${this.disabled}
165
+ @change=${this._handleChange}
166
+ />
167
+ <button
168
+ type="button"
169
+ class="stepper"
170
+ aria-label="Increase"
171
+ tabindex="-1"
172
+ ?disabled=${this.disabled || atMax}
173
+ @click=${() => this._adjust(this.step)}
174
+ >
175
+ <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
176
+ <path stroke-linecap="round" stroke-linejoin="round" d="M12 5v14M5 12h14" />
177
+ </svg>
178
+ </button>
179
+ </div>
180
+ `;
181
+ }
182
+ };
183
+ customElements.define("bds-number-input", BdsNumberInput);
184
+
185
+ export {
186
+ BdsNumberInput
187
+ };
@@ -0,0 +1,179 @@
1
+ import {
2
+ T,
3
+ i,
4
+ i2
5
+ } from "./chunk-LGEZYFUU.js";
6
+
7
+ // src/web-components/interaction/form/bds-file-input.ts
8
+ var BdsFileInput = class extends i2 {
9
+ static formAssociated = true;
10
+ static styles = i`
11
+ :host {
12
+ display: block;
13
+ }
14
+
15
+ :host([disabled]) {
16
+ opacity: 0.5;
17
+ pointer-events: none;
18
+ }
19
+
20
+ .zone {
21
+ display: flex;
22
+ flex-direction: column;
23
+ align-items: center;
24
+ justify-content: center;
25
+ gap: var(--bds-space_s);
26
+ padding: var(--bds-space_xl);
27
+ border-radius: var(--bds-border_radius--m);
28
+ border: 2px dashed var(--file-input_border-color, var(--bds-color_bg--subtle));
29
+ background-color: var(--file-input_color_bg, var(--bds-color_bg));
30
+ color: var(--bds-color_on-bg);
31
+ font-family: var(--bds-font_family--body);
32
+ font-size: var(--bds-font_size--body);
33
+ cursor: pointer;
34
+ text-align: center;
35
+ transition: var(--bds-animation_transition);
36
+ }
37
+
38
+ .zone.--dragging {
39
+ border-color: var(--bds-color_interactive);
40
+ background-color: var(--bds-color_bg--subtle);
41
+ }
42
+
43
+ .zone-input {
44
+ position: absolute;
45
+ opacity: 0;
46
+ inline-size: 0;
47
+ block-size: 0;
48
+ overflow: hidden;
49
+ }
50
+
51
+ .zone-label {
52
+ display: flex;
53
+ flex-direction: column;
54
+ align-items: center;
55
+ gap: var(--bds-space_xs);
56
+ cursor: pointer;
57
+ }
58
+
59
+ .icon {
60
+ inline-size: 2.5rem;
61
+ block-size: 2.5rem;
62
+ color: var(--bds-color_on-bg--subtle);
63
+ }
64
+
65
+ .icon svg {
66
+ inline-size: 100%;
67
+ block-size: 100%;
68
+ }
69
+
70
+ .hint {
71
+ font-size: var(--bds-font_size--body--s);
72
+ color: var(--bds-color_on-bg--subtle);
73
+ }
74
+
75
+ @media (hover: hover) and (pointer: fine) {
76
+ .zone:hover {
77
+ border-color: var(--bds-color_interactive);
78
+ background-color: var(--bds-color_bg--subtle);
79
+ }
80
+ }
81
+ `;
82
+ static properties = {
83
+ name: { type: String, reflect: true },
84
+ accept: { type: String },
85
+ multiple: { type: Boolean, reflect: true },
86
+ disabled: { type: Boolean, reflect: true }
87
+ };
88
+ _internals;
89
+ _isDragging = false;
90
+ _uid = Math.random().toString(36).slice(2, 8);
91
+ constructor() {
92
+ super();
93
+ this._internals = this.attachInternals();
94
+ this.name = "";
95
+ this.accept = "";
96
+ this.multiple = false;
97
+ this.disabled = false;
98
+ }
99
+ formResetCallback() {
100
+ this._internals.setFormValue?.(null);
101
+ const input = this.shadowRoot?.querySelector("input");
102
+ if (input) input.value = "";
103
+ }
104
+ _handleFiles(files) {
105
+ if (!files || files.length === 0) return;
106
+ const formData = new FormData();
107
+ Array.from(files).forEach((file) => formData.append(this.name, file));
108
+ this._internals.setFormValue?.(formData);
109
+ this.dispatchEvent(new CustomEvent("bds-change", {
110
+ bubbles: true,
111
+ composed: true,
112
+ detail: files
113
+ }));
114
+ }
115
+ _handleInputChange(e) {
116
+ this._handleFiles(e.target.files);
117
+ }
118
+ _handleClick() {
119
+ this.shadowRoot?.querySelector("input")?.click();
120
+ }
121
+ _handleDragover(e) {
122
+ e.preventDefault();
123
+ if (!this._isDragging) {
124
+ this._isDragging = true;
125
+ this.requestUpdate();
126
+ }
127
+ }
128
+ _handleDragleave() {
129
+ this._isDragging = false;
130
+ this.requestUpdate();
131
+ }
132
+ _handleDrop(e) {
133
+ e.preventDefault();
134
+ this._isDragging = false;
135
+ this.requestUpdate();
136
+ this._handleFiles(e.dataTransfer?.files ?? null);
137
+ }
138
+ render() {
139
+ const id = `bds-file-${this._uid}`;
140
+ return T`
141
+ <input
142
+ id=${id}
143
+ type="file"
144
+ class="zone-input"
145
+ name=${this.name}
146
+ accept=${this.accept}
147
+ ?multiple=${this.multiple}
148
+ ?disabled=${this.disabled}
149
+ @change=${this._handleInputChange}
150
+ />
151
+ <div
152
+ class="zone ${this._isDragging ? "--dragging" : ""}"
153
+ role="button"
154
+ tabindex=${this.disabled ? "-1" : "0"}
155
+ aria-label="Upload file"
156
+ @click=${this._handleClick}
157
+ @keydown=${(e) => (e.key === "Enter" || e.key === " ") && this._handleClick()}
158
+ @dragover=${this._handleDragover}
159
+ @dragleave=${this._handleDragleave}
160
+ @drop=${this._handleDrop}
161
+ >
162
+ <span class="icon" aria-hidden="true">
163
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
164
+ <path stroke-linecap="round" stroke-linejoin="round" d="M12 16.5V9.75m0 0-3 3m3-3 3 3M6.75 19.5a4.5 4.5 0 01-1.41-8.775 5.25 5.25 0 0110.338-2.329 3 3 0 013.83 3.849A3.75 3.75 0 0118 19.5H6.75z" />
165
+ </svg>
166
+ </span>
167
+ <span class="zone-label">
168
+ <slot>Drag &amp; drop or click to browse</slot>
169
+ </span>
170
+ <span class="hint">${this.accept ? `Accepted: ${this.accept}` : "Any file type"}</span>
171
+ </div>
172
+ `;
173
+ }
174
+ };
175
+ customElements.define("bds-file-input", BdsFileInput);
176
+
177
+ export {
178
+ BdsFileInput
179
+ };
@@ -0,0 +1,94 @@
1
+ import {
2
+ T,
3
+ i,
4
+ i2
5
+ } from "./chunk-LGEZYFUU.js";
6
+
7
+ // src/web-components/ui/bds-breadcrumb.ts
8
+ var BdsBreadcrumb = class extends i2 {
9
+ static styles = i`
10
+ :host {
11
+ display: block;
12
+ }
13
+
14
+ .breadcrumb {
15
+ font-size: var(--bds-font_size--body--s);
16
+ }
17
+
18
+ .list {
19
+ display: flex;
20
+ flex-wrap: wrap;
21
+ align-items: center;
22
+ gap: var(--bds-space_xxs);
23
+ list-style: none;
24
+ margin: 0;
25
+ padding: 0;
26
+ }
27
+
28
+ .item {
29
+ display: flex;
30
+ align-items: center;
31
+ gap: var(--bds-space_xxs);
32
+ }
33
+
34
+ .link {
35
+ color: var(--bds-color_interactive_on-bg);
36
+ text-decoration: none;
37
+ transition: var(--bds-animation_transition);
38
+ }
39
+
40
+ .link:focus-visible {
41
+ outline: var(--bds-outline_default);
42
+ outline-offset: var(--bds-outline_offset);
43
+ border-radius: var(--bds-border_radius--xs);
44
+ }
45
+
46
+ @media (hover: hover) and (pointer: fine) {
47
+ .link:hover {
48
+ text-decoration: underline;
49
+ text-underline-offset: 0.2em;
50
+ }
51
+ }
52
+
53
+ .separator {
54
+ color: var(--bds-color_on-bg--subtle);
55
+ user-select: none;
56
+ }
57
+
58
+ .current {
59
+ color: var(--bds-color_on-bg--subtle);
60
+ font-weight: var(--bds-font_weight--semibold);
61
+ }
62
+ `;
63
+ static properties = {
64
+ items: { type: Array }
65
+ };
66
+ constructor() {
67
+ super();
68
+ this.items = [];
69
+ }
70
+ render() {
71
+ return T`
72
+ <nav class="breadcrumb" aria-label="Breadcrumb">
73
+ <ol class="list">
74
+ ${this.items.map((item, index) => {
75
+ const isLast = index === this.items.length - 1;
76
+ return T`
77
+ <li class="item">
78
+ ${isLast ? T`<span class="current" aria-current="page">${item.label}</span>` : T`
79
+ <a class="link" href=${item.href ?? "#"}>${item.label}</a>
80
+ <span class="separator" aria-hidden="true">›</span>
81
+ `}
82
+ </li>
83
+ `;
84
+ })}
85
+ </ol>
86
+ </nav>
87
+ `;
88
+ }
89
+ };
90
+ customElements.define("bds-breadcrumb", BdsBreadcrumb);
91
+
92
+ export {
93
+ BdsBreadcrumb
94
+ };