@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,168 @@
1
+ import {
2
+ A,
3
+ T,
4
+ i,
5
+ i2
6
+ } from "./chunk-LGEZYFUU.js";
7
+
8
+ // src/web-components/ui/bds-alert.ts
9
+ var BdsAlert = class extends i2 {
10
+ static styles = i`
11
+ :host {
12
+ display: block;
13
+ }
14
+
15
+ .alert {
16
+ display: flex;
17
+ align-items: flex-start;
18
+ gap: var(--bds-space_s);
19
+ padding: var(--bds-space_m);
20
+ border-radius: var(--bds-border_radius--s);
21
+ border-inline-start: var(--bds-space_s) solid var(--alert_border, var(--bds-color_blue));
22
+ background-color: var(--alert_bg, var(--bds-color_blue--subtle));
23
+ color: var(--alert_text, var(--bds-color_on-blue--subtle));
24
+ font-size: var(--bds-font_size--body);
25
+ line-height: var(--bds-font_line-height--body);
26
+ }
27
+
28
+ /* Variant colours */
29
+ :host([variant='info']) .alert {
30
+ --alert_bg: var(--bds-color_blue--subtle);
31
+ --alert_text: var(--bds-color_on-blue--subtle);
32
+ --alert_border: var(--bds-color_blue);
33
+ }
34
+
35
+ :host([variant='success']) .alert {
36
+ --alert_bg: var(--bds-color_success--subtle);
37
+ --alert_text: var(--bds-color_on-success--subtle);
38
+ --alert_border: var(--bds-color_success);
39
+ }
40
+
41
+ :host([variant='warning']) .alert {
42
+ --alert_bg: var(--bds-color_orange--subtle);
43
+ --alert_text: var(--bds-color_on-orange--subtle);
44
+ --alert_border: var(--bds-color_warning);
45
+ }
46
+
47
+ :host([variant='error']) .alert {
48
+ --alert_bg: rgb(from var(--bds-color_error) r g b / 12%);
49
+ --alert_text: var(--bds-color_on-bg);
50
+ --alert_border: var(--bds-color_error);
51
+ }
52
+
53
+ /* Icon slot wrapper — hidden unless slot has content */
54
+ .icon {
55
+ display: none;
56
+ align-items: center;
57
+ flex-shrink: 0;
58
+ margin-block-start: 0.1em;
59
+ }
60
+
61
+ .icon.has-content {
62
+ display: flex;
63
+ }
64
+
65
+ /* Content area */
66
+ .content {
67
+ flex: 1;
68
+ display: flex;
69
+ flex-direction: column;
70
+ gap: var(--bds-space_xxs);
71
+ }
72
+
73
+ .title {
74
+ font-weight: var(--bds-font_weight--semibold);
75
+ font-size: var(--bds-font_size--body);
76
+ }
77
+
78
+ /* Dismiss button */
79
+ .dismiss {
80
+ all: unset;
81
+ display: flex;
82
+ align-items: center;
83
+ justify-content: center;
84
+ flex-shrink: 0;
85
+ cursor: pointer;
86
+ color: currentcolor;
87
+ transition: var(--bds-animation_transition);
88
+ border-radius: 50%;
89
+ --bdc_color: currentcolor;
90
+ outline: var(--bdc-outline_width) solid var(--bdc_color);
91
+ outline-offset: var(--bdc-outline_offset);
92
+ }
93
+
94
+ .dismiss svg {
95
+ width: 1rem;
96
+ height: 1rem;
97
+ }
98
+
99
+ .dismiss:focus-visible {
100
+ outline: var(--bds-outline_default);
101
+ outline-offset: var(--bds-outline_offset);
102
+ }
103
+
104
+ @media (hover: hover) and (pointer: fine) {
105
+ .dismiss:hover {
106
+ opacity: 0.7;
107
+ }
108
+ }
109
+ `;
110
+ static properties = {
111
+ variant: { type: String, reflect: true },
112
+ title: { type: String },
113
+ dismissible: { type: Boolean, reflect: true },
114
+ _iconFilled: { state: true }
115
+ };
116
+ constructor() {
117
+ super();
118
+ this.variant = "info";
119
+ this.title = "";
120
+ this.dismissible = false;
121
+ this._iconFilled = false;
122
+ }
123
+ _onIconSlotChange(e) {
124
+ const slot = e.target;
125
+ this._iconFilled = slot.assignedNodes({ flatten: true }).length > 0;
126
+ }
127
+ get _isUrgent() {
128
+ return this.variant === "error" || this.variant === "warning";
129
+ }
130
+ _handleDismiss() {
131
+ this.dispatchEvent(new CustomEvent("bds-dismiss", { bubbles: true, composed: true }));
132
+ }
133
+ render() {
134
+ return T`
135
+ <div
136
+ class="alert"
137
+ role=${this._isUrgent ? "alert" : "status"}
138
+ aria-live=${this._isUrgent ? "assertive" : "polite"}
139
+ aria-atomic="true"
140
+ >
141
+ <span class="icon ${this._iconFilled ? "has-content" : ""}" aria-hidden="true">
142
+ <slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
143
+ </span>
144
+ <div class="content">
145
+ ${this.title ? T`<strong class="title">${this.title}</strong>` : A}
146
+ <div><slot></slot></div>
147
+ </div>
148
+ ${this.dismissible ? T`
149
+ <button
150
+ type="button"
151
+ class="dismiss"
152
+ @click=${this._handleDismiss}
153
+ aria-label="Dismiss alert"
154
+ >
155
+ <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
156
+ <path stroke-linecap="round" stroke-linejoin="round" d="M18 6L6 18M6 6l12 12" />
157
+ </svg>
158
+ </button>
159
+ ` : A}
160
+ </div>
161
+ `;
162
+ }
163
+ };
164
+ customElements.define("bds-alert", BdsAlert);
165
+
166
+ export {
167
+ BdsAlert
168
+ };
@@ -0,0 +1,64 @@
1
+ import {
2
+ T,
3
+ i,
4
+ i2
5
+ } from "./chunk-LGEZYFUU.js";
6
+
7
+ // src/web-components/ui/bds-rating.ts
8
+ var STAR_PATH = "M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z";
9
+ var BdsRating = class extends i2 {
10
+ static styles = i`
11
+ :host {
12
+ display: inline-flex;
13
+ }
14
+
15
+ .rating {
16
+ display: inline-flex;
17
+ gap: var(--bds-space_xxxs);
18
+ color: var(--bds-color_bg);
19
+ }
20
+
21
+ .star {
22
+ inline-size: 1.5em;
23
+ block-size: 1.5em;
24
+ }
25
+
26
+ .star.--filled {
27
+ color: var(--bds-color_warning);
28
+ }
29
+ `;
30
+ static properties = {
31
+ value: { type: Number },
32
+ max: { type: Number }
33
+ };
34
+ constructor() {
35
+ super();
36
+ this.value = 0;
37
+ this.max = 5;
38
+ }
39
+ render() {
40
+ return T`
41
+ <div
42
+ class="rating"
43
+ role="img"
44
+ aria-label="${this.value} out of ${this.max} stars"
45
+ >
46
+ ${Array.from({ length: this.max }, (_, i3) => T`
47
+ <svg
48
+ class="star ${i3 < this.value ? "--filled" : ""}"
49
+ aria-hidden="true"
50
+ fill="currentColor"
51
+ viewBox="0 0 24 24"
52
+ >
53
+ <path d=${STAR_PATH} />
54
+ </svg>
55
+ `)}
56
+ </div>
57
+ `;
58
+ }
59
+ };
60
+ customElements.define("bds-rating", BdsRating);
61
+
62
+ export {
63
+ BdsRating
64
+ };
@@ -0,0 +1,244 @@
1
+ import {
2
+ A,
3
+ T,
4
+ i,
5
+ i2
6
+ } from "./chunk-LGEZYFUU.js";
7
+
8
+ // src/web-components/interaction/bds-button.ts
9
+ var BdsButton = class extends i2 {
10
+ static styles = i`
11
+ @keyframes fadeZoom {
12
+ 0%, 100% { opacity: 1; transform: scale(1); }
13
+ 50% { opacity: 0.75; transform: scale(1.15); }
14
+ }
15
+
16
+ @keyframes pulse {
17
+ 0% { transform: scale(1); box-shadow: 0 0 0 0 rgb(from var(--button_pulse-color, var(--button_color, var(--bds-color_green))) r g b / 50%); }
18
+ 70% { transform: scale(1.01); box-shadow: 0 0 0 var(--bds-space_m) rgb(from var(--button_pulse-color, var(--button_color, var(--bds-color_green))) r g b / 0%); }
19
+ 100% { transform: scale(1); box-shadow: 0 0 0 0 rgb(from var(--button_pulse-color, var(--button_color, var(--bds-color_green))) r g b / 0%); }
20
+ }
21
+
22
+ :host {
23
+ display: inline-flex;
24
+ }
25
+
26
+ .button,
27
+ .button[href] {
28
+ all: unset;
29
+ position: relative;
30
+ font: inherit;
31
+ padding-inline: var(--bds-space_l);
32
+ display: inline-flex;
33
+ gap: var(--bds-space_xs);
34
+ border-radius: var(--button_border_radius--s, var(--bds-border_radius--s));
35
+ align-items: center;
36
+ cursor: pointer;
37
+ justify-content: center;
38
+ height: var(--button_height, 3em);
39
+ font-size: var(--button_font-size, inherit);
40
+ white-space: nowrap;
41
+ line-height: 1;
42
+
43
+ --button_color: var(--bds-color_green);
44
+ --button_on-color: var(--bds-color_on-green);
45
+
46
+ background-color: var(--button_bg, var(--button_color));
47
+ color: var(--button_text, var(--button_on-color));
48
+ border: var(--button_border, none);
49
+ --bdc_color: transparent;
50
+
51
+ outline: var(--bdc-outline_width) solid var(--bdc_color);
52
+ outline-offset: var(--bdc-outline_offset);
53
+ transition: var(--bds-animation_transition),
54
+ --bdc_color var(--bds-animation_transition-duration) var(--bds-animation_easing);
55
+ }
56
+
57
+ .button[href] {
58
+ text-decoration: none;
59
+ }
60
+
61
+ /* Variants */
62
+ .button.ghost {
63
+ --button_bg: transparent;
64
+ --button_text: var(--button_color);
65
+ --bdc_color: var(--button_color);
66
+ }
67
+
68
+ /* Sizes */
69
+ .button.small {
70
+ --button_height: 2.25em;
71
+ --button_font-size: var(--bds-font_size--body--s);
72
+ --button_border_radius--s: var(--bds-border_radius--xs);
73
+ padding-inline: var(--bds-space_m);
74
+ }
75
+
76
+ .button.medium {
77
+ --button_height: 3em;
78
+ padding-inline: var(--bds-space_l);
79
+ }
80
+
81
+ .button.large {
82
+ --button_font-size: var(--bds-font_size--heading-3);
83
+ --button_border_radius--s: var(--bds-border_radius--m);
84
+ padding-inline: var(--bds-space_xl);
85
+ }
86
+
87
+ /* Pulse */
88
+ .button.has-pulse {
89
+ animation: pulse 3s infinite;
90
+ }
91
+
92
+ /* SVG icon colour */
93
+ .button svg {
94
+ --icon__stroke: currentcolor;
95
+ fill: currentcolor;
96
+ color: currentcolor;
97
+ flex-shrink: 0;
98
+ }
99
+
100
+ /* Icon slots — hidden by default, shown when slot has content */
101
+ .icon-start,
102
+ .icon-end {
103
+ display: none;
104
+ align-items: center;
105
+ }
106
+
107
+ .icon-start.has-content {
108
+ display: flex;
109
+ margin-inline-start: calc(var(--bds-space_s) * -1);
110
+ transition: var(--bds-animation_transition);
111
+ }
112
+
113
+ .icon-end.has-content {
114
+ display: flex;
115
+ margin-inline-end: calc(var(--bds-space_s) * -1);
116
+ transition: var(--bds-animation_transition);
117
+ }
118
+
119
+ /* Hover icon animation */
120
+ @media (hover: hover) and (pointer: fine) {
121
+ .button:hover .icon-start svg,
122
+ .button:hover .icon-end svg {
123
+ animation: fadeZoom 2s ease-out infinite;
124
+ }
125
+
126
+ /* Default hover */
127
+ .button.default:hover {
128
+ --button_bg: var(--bds-color_bg);
129
+ --button_text: var(--bds-color_interactive);
130
+ --button_pulse-color: var(--bds-color_interactive);
131
+ --bdc_color: currentcolor;
132
+ }
133
+
134
+ /* Ghost hover */
135
+ .button.ghost:hover {
136
+ --button_bg: var(--button_color);
137
+ --button_text: var(--button_on-color);
138
+ --bdc_color: transparent;
139
+ }
140
+ }
141
+
142
+ /* Focus visible */
143
+ .button:focus-visible {
144
+ outline: var(--bds-outline_default);
145
+ outline-offset: var(--bds-outline_offset);
146
+ border-radius: var(--bds-border_radius--s);
147
+ }
148
+
149
+ /* Disabled */
150
+ .button:disabled,
151
+ .button[aria-disabled='true'] {
152
+ opacity: 0.5;
153
+ cursor: not-allowed;
154
+ pointer-events: none;
155
+ }
156
+ `;
157
+ static properties = {
158
+ variant: { type: String, reflect: true },
159
+ size: { type: String, reflect: true },
160
+ disabled: { type: Boolean, reflect: true },
161
+ href: { type: String },
162
+ target: { type: String },
163
+ rel: { type: String },
164
+ hasPulse: { type: Boolean, attribute: "has-pulse", reflect: true },
165
+ type: { type: String },
166
+ ariaLabel: { type: String, attribute: "aria-label" },
167
+ // Internal state
168
+ _iconStartFilled: { state: true },
169
+ _iconEndFilled: { state: true }
170
+ };
171
+ constructor() {
172
+ super();
173
+ this.variant = "default";
174
+ this.size = "medium";
175
+ this.disabled = false;
176
+ this.hasPulse = false;
177
+ this.type = "button";
178
+ this.ariaLabel = null;
179
+ this._iconStartFilled = false;
180
+ this._iconEndFilled = false;
181
+ }
182
+ _onIconSlotChange(e, position) {
183
+ const slot = e.target;
184
+ const filled = slot.assignedNodes({ flatten: true }).length > 0;
185
+ if (position === "start") {
186
+ this._iconStartFilled = filled;
187
+ } else {
188
+ this._iconEndFilled = filled;
189
+ }
190
+ }
191
+ get _classes() {
192
+ return `button ${this.variant} ${this.size}${this.hasPulse ? " has-pulse" : ""}`;
193
+ }
194
+ _handleAnchorClick(e) {
195
+ if (this.disabled) {
196
+ e.preventDefault();
197
+ }
198
+ }
199
+ _iconSlot(position) {
200
+ const filled = position === "start" ? this._iconStartFilled : this._iconEndFilled;
201
+ return T`
202
+ <span class="icon-${position} ${filled ? "has-content" : ""}">
203
+ <slot name="icon-${position}" @slotchange=${(e) => this._onIconSlotChange(e, position)}></slot>
204
+ </span>
205
+ `;
206
+ }
207
+ render() {
208
+ if (this.href) {
209
+ return T`
210
+ <a
211
+ class=${this._classes}
212
+ href=${this.disabled ? A : this.href}
213
+ target=${this.target ?? A}
214
+ rel=${this.rel ?? A}
215
+ aria-disabled=${this.disabled ? "true" : A}
216
+ tabindex=${this.disabled ? "-1" : A}
217
+ aria-label=${this.ariaLabel ?? A}
218
+ @click=${this._handleAnchorClick}
219
+ >
220
+ ${this._iconSlot("start")}
221
+ <slot></slot>
222
+ ${this._iconSlot("end")}
223
+ </a>
224
+ `;
225
+ }
226
+ return T`
227
+ <button
228
+ class=${this._classes}
229
+ type=${this.type}
230
+ ?disabled=${this.disabled}
231
+ aria-label=${this.ariaLabel ?? A}
232
+ >
233
+ ${this._iconSlot("start")}
234
+ <slot></slot>
235
+ ${this._iconSlot("end")}
236
+ </button>
237
+ `;
238
+ }
239
+ };
240
+ customElements.define("bds-button", BdsButton);
241
+
242
+ export {
243
+ BdsButton
244
+ };
@@ -0,0 +1,124 @@
1
+ import {
2
+ T,
3
+ i,
4
+ i2
5
+ } from "./chunk-LGEZYFUU.js";
6
+
7
+ // src/web-components/interaction/form/bds-radio.ts
8
+ var BdsRadio = class extends i2 {
9
+ static formAssociated = true;
10
+ static styles = i`
11
+ :host {
12
+ display: inline-flex;
13
+ align-items: flex-start;
14
+ gap: var(--bds-space_xs);
15
+ cursor: pointer;
16
+ font-size: var(--bds-font_size--body);
17
+ font-family: var(--bds-font_family--body);
18
+ color: var(--bds-color_on-bg);
19
+ }
20
+
21
+ :host([disabled]) {
22
+ opacity: 0.5;
23
+ cursor: not-allowed;
24
+ pointer-events: none;
25
+ }
26
+
27
+ .input {
28
+ --inputSize: calc(var(--bds-space_s) * 2);
29
+ margin-block-start: 0.25em;
30
+ inline-size: var(--inputSize);
31
+ block-size: var(--inputSize);
32
+ flex-shrink: 0;
33
+ --bdc_color: currentcolor;
34
+ --bdc-outline_radius: 50%;
35
+
36
+ outline: var(--bdc-outline_width) solid var(--bdc_color);
37
+ outline-offset: var(--bdc-outline_offset);
38
+ border-radius: 50%;
39
+ box-shadow: var(--radio_shadow, var(--bdc-outline_shadow));
40
+ border: none;
41
+ appearance: none;
42
+ background-color: var(--radio_color_bg, var(--bds-color_bg));
43
+ cursor: pointer;
44
+ position: relative;
45
+ transition: --bdc_color 0.3s ease, background-color 0.3s ease;
46
+ }
47
+
48
+ .input:checked {
49
+ background-color: var(--radio_color-active, var(--bdc-color_active));
50
+ --bdc_color: var(--radio_color-active, var(--bdc-color_active));
51
+ }
52
+
53
+ .input:checked::after {
54
+ content: '';
55
+ position: absolute;
56
+ inset: 25%;
57
+ border-radius: 50%;
58
+ background-color: var(--radio_color-on-active, var(--bdc-color_on-active));
59
+ }
60
+
61
+ .input:focus-visible {
62
+ outline: var(--bds-outline_default);
63
+ outline-offset: var(--bds-outline_offset);
64
+ }
65
+
66
+ label {
67
+ cursor: pointer;
68
+ flex: 1;
69
+ }
70
+ `;
71
+ static properties = {
72
+ name: { type: String, reflect: true },
73
+ value: { type: String },
74
+ checked: { type: Boolean, reflect: true },
75
+ required: { type: Boolean, reflect: true },
76
+ disabled: { type: Boolean, reflect: true }
77
+ };
78
+ _internals;
79
+ _uid = Math.random().toString(36).slice(2, 8);
80
+ constructor() {
81
+ super();
82
+ this._internals = this.attachInternals();
83
+ this.name = "";
84
+ this.value = "";
85
+ this.checked = false;
86
+ this.required = false;
87
+ this.disabled = false;
88
+ }
89
+ updated(changed) {
90
+ super.updated(changed);
91
+ if (changed.has("checked") || changed.has("value")) {
92
+ this._internals.setFormValue?.(this.checked ? this.value : null);
93
+ }
94
+ }
95
+ formResetCallback() {
96
+ this.checked = false;
97
+ this._internals.setFormValue?.(null);
98
+ }
99
+ _handleChange(e) {
100
+ this.checked = e.target.checked;
101
+ }
102
+ render() {
103
+ const id = `bds-radio-${this._uid}`;
104
+ return T`
105
+ <input
106
+ id=${id}
107
+ type="radio"
108
+ class="input"
109
+ name=${this.name}
110
+ value=${this.value}
111
+ .checked=${this.checked}
112
+ ?required=${this.required}
113
+ ?disabled=${this.disabled}
114
+ @change=${this._handleChange}
115
+ />
116
+ <label for=${id}><slot></slot></label>
117
+ `;
118
+ }
119
+ };
120
+ customElements.define("bds-radio", BdsRadio);
121
+
122
+ export {
123
+ BdsRadio
124
+ };
@@ -0,0 +1,69 @@
1
+ import {
2
+ T,
3
+ i,
4
+ i2
5
+ } from "./chunk-LGEZYFUU.js";
6
+
7
+ // src/web-components/ui/bds-badge.ts
8
+ var BdsBadge = class extends i2 {
9
+ static styles = i`
10
+ :host {
11
+ display: inline-flex;
12
+ }
13
+
14
+ .badge {
15
+ display: inline-flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ padding: var(--bds-space_xxs) var(--bds-space_xs);
19
+ border-radius: var(--badge_radius, 2em);
20
+ font-size: var(--badge_font-size, var(--bds-font_size--body--s));
21
+ font-weight: var(--bds-font_weight--semibold);
22
+ line-height: 1;
23
+ white-space: nowrap;
24
+ background-color: var(--badge_bg, var(--bds-color_blue));
25
+ color: var(--badge_text, var(--bds-color_on-blue));
26
+ }
27
+
28
+ /* Variant overrides */
29
+ :host([variant='primary']) .badge {
30
+ --badge_bg: var(--bds-color_interactive);
31
+ --badge_text: var(--bds-color_on-interactive);
32
+ }
33
+
34
+ :host([variant='secondary']) .badge {
35
+ --badge_bg: var(--bds-color_bg);
36
+ --badge_text: var(--bds-color_on-bg);
37
+ }
38
+
39
+ :host([variant='success']) .badge {
40
+ --badge_bg: var(--bds-color_success);
41
+ --badge_text: var(--bds-color_on-success);
42
+ }
43
+
44
+ :host([variant='error']) .badge {
45
+ --badge_bg: var(--bds-color_error);
46
+ --badge_text: var(--bds-color_on-error);
47
+ }
48
+
49
+ :host([variant='warning']) .badge {
50
+ --badge_bg: var(--bds-color_warning);
51
+ --badge_text: var(--bds-color_on-warning);
52
+ }
53
+ `;
54
+ static properties = {
55
+ variant: { type: String, reflect: true }
56
+ };
57
+ constructor() {
58
+ super();
59
+ this.variant = "primary";
60
+ }
61
+ render() {
62
+ return T`<span class="badge"><slot></slot></span>`;
63
+ }
64
+ };
65
+ customElements.define("bds-badge", BdsBadge);
66
+
67
+ export {
68
+ BdsBadge
69
+ };
@@ -0,0 +1,27 @@
1
+ import {
2
+ T,
3
+ i,
4
+ i2
5
+ } from "./chunk-LGEZYFUU.js";
6
+
7
+ // src/web-components/interaction/bds-tab-panel.ts
8
+ var BdsTabPanel = class extends i2 {
9
+ static styles = i`
10
+ :host {
11
+ display: block;
12
+ padding-block-start: var(--bds-space_m);
13
+ }
14
+
15
+ :host([hidden]) {
16
+ display: none;
17
+ }
18
+ `;
19
+ render() {
20
+ return T`<slot></slot>`;
21
+ }
22
+ };
23
+ customElements.define("bds-tab-panel", BdsTabPanel);
24
+
25
+ export {
26
+ BdsTabPanel
27
+ };