bromcom-ui-next 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/LICENSE +21 -0
  2. package/dist/bromcom-ui/bromcom-ui.css +1 -0
  3. package/dist/bromcom-ui/bromcom-ui.esm.js +2 -0
  4. package/dist/bromcom-ui/bromcom-ui.esm.js.map +1 -0
  5. package/dist/bromcom-ui/global/global.js +40 -0
  6. package/dist/bromcom-ui/index.esm.js +2 -0
  7. package/dist/bromcom-ui/index.esm.js.map +1 -0
  8. package/dist/bromcom-ui/p-27c997d8.js +3 -0
  9. package/dist/bromcom-ui/p-27c997d8.js.map +1 -0
  10. package/dist/bromcom-ui/p-341d46a8.entry.js +2 -0
  11. package/dist/bromcom-ui/p-341d46a8.entry.js.map +1 -0
  12. package/dist/bromcom-ui/p-40643b53.js +2 -0
  13. package/dist/bromcom-ui/p-40643b53.js.map +1 -0
  14. package/dist/bromcom-ui/p-5fcf77f9.js +2 -0
  15. package/dist/bromcom-ui/p-5fcf77f9.js.map +1 -0
  16. package/dist/bromcom-ui/p-997f314c.entry.js +2 -0
  17. package/dist/bromcom-ui/p-997f314c.entry.js.map +1 -0
  18. package/dist/bromcom-ui/p-b36f4f44.js +7 -0
  19. package/dist/bromcom-ui/p-b36f4f44.js.map +1 -0
  20. package/dist/bromcom-ui/p-dcb9df00.entry.js +2 -0
  21. package/dist/bromcom-ui/p-dcb9df00.entry.js.map +1 -0
  22. package/dist/bromcom-ui/p-f0c61f8c.entry.js +2 -0
  23. package/dist/bromcom-ui/p-f0c61f8c.entry.js.map +1 -0
  24. package/dist/cjs/app-globals-e8faea0d.js +43 -0
  25. package/dist/cjs/app-globals-e8faea0d.js.map +1 -0
  26. package/dist/cjs/bcm-accordion_4.cjs.entry.js +623 -0
  27. package/dist/cjs/bcm-accordion_4.cjs.entry.js.map +1 -0
  28. package/dist/cjs/bcm-alert.cjs.entry.js +99 -0
  29. package/dist/cjs/bcm-alert.cjs.entry.js.map +1 -0
  30. package/dist/cjs/bcm-avatar.cjs.entry.js +89 -0
  31. package/dist/cjs/bcm-avatar.cjs.entry.js.map +1 -0
  32. package/dist/cjs/bcm-text.cjs.entry.js +119 -0
  33. package/dist/cjs/bcm-text.cjs.entry.js.map +1 -0
  34. package/dist/cjs/bromcom-ui.cjs.js +27 -0
  35. package/dist/cjs/bromcom-ui.cjs.js.map +1 -0
  36. package/dist/cjs/index-310db2a6.js +2584 -0
  37. package/dist/cjs/index-310db2a6.js.map +1 -0
  38. package/dist/cjs/index-638f2d15.js +1441 -0
  39. package/dist/cjs/index-638f2d15.js.map +1 -0
  40. package/dist/cjs/index-a4eea4bb.js +84 -0
  41. package/dist/cjs/index-a4eea4bb.js.map +1 -0
  42. package/dist/cjs/index.cjs.js +4 -0
  43. package/dist/cjs/index.cjs.js.map +1 -0
  44. package/dist/cjs/loader.cjs.js +17 -0
  45. package/dist/cjs/loader.cjs.js.map +1 -0
  46. package/dist/collection/collection-manifest.json +18 -0
  47. package/dist/collection/components/accordion/accordion.component.js +399 -0
  48. package/dist/collection/components/accordion/accordion.component.js.map +1 -0
  49. package/dist/collection/components/accordion/accordion.css +1 -0
  50. package/dist/collection/components/accordion/types.js +2 -0
  51. package/dist/collection/components/accordion/types.js.map +1 -0
  52. package/dist/collection/components/accordion-group/accordion-group.component.js +269 -0
  53. package/dist/collection/components/accordion-group/accordion-group.component.js.map +1 -0
  54. package/dist/collection/components/accordion-group/accordion-group.css +1 -0
  55. package/dist/collection/components/accordion-group/types.js +2 -0
  56. package/dist/collection/components/accordion-group/types.js.map +1 -0
  57. package/dist/collection/components/alert/alert.component.js +241 -0
  58. package/dist/collection/components/alert/alert.component.js.map +1 -0
  59. package/dist/collection/components/alert/alert.css +1 -0
  60. package/dist/collection/components/alert/types.js +2 -0
  61. package/dist/collection/components/alert/types.js.map +1 -0
  62. package/dist/collection/components/avatar/avatar.component.js +290 -0
  63. package/dist/collection/components/avatar/avatar.component.js.map +1 -0
  64. package/dist/collection/components/avatar/avatar.css +1 -0
  65. package/dist/collection/components/avatar/types.js +2 -0
  66. package/dist/collection/components/avatar/types.js.map +1 -0
  67. package/dist/collection/components/button/button.component.js +628 -0
  68. package/dist/collection/components/button/button.component.js.map +1 -0
  69. package/dist/collection/components/button/button.css +1 -0
  70. package/dist/collection/components/button/types.js +142 -0
  71. package/dist/collection/components/button/types.js.map +1 -0
  72. package/dist/collection/components/chip/chip.component.js +308 -0
  73. package/dist/collection/components/chip/chip.component.js.map +1 -0
  74. package/dist/collection/components/chip/chip.css +1 -0
  75. package/dist/collection/components/chip/types.js +7 -0
  76. package/dist/collection/components/chip/types.js.map +1 -0
  77. package/dist/collection/components/text/text.component.js +176 -0
  78. package/dist/collection/components/text/text.component.js.map +1 -0
  79. package/dist/collection/components/text/text.css +1 -0
  80. package/dist/collection/components/text/text.types.js +2 -0
  81. package/dist/collection/components/text/text.types.js.map +1 -0
  82. package/dist/collection/components/text/text.utils.js +18 -0
  83. package/dist/collection/components/text/text.utils.js.map +1 -0
  84. package/dist/collection/global/global.js +40 -0
  85. package/dist/collection/index.js +2 -0
  86. package/dist/collection/index.js.map +1 -0
  87. package/dist/collection/styles/theme-variables.js +355 -0
  88. package/dist/collection/styles/theme-variables.js.map +1 -0
  89. package/dist/components/bcm-accordion-group.d.ts +11 -0
  90. package/dist/components/bcm-accordion-group.js +113 -0
  91. package/dist/components/bcm-accordion-group.js.map +1 -0
  92. package/dist/components/bcm-accordion.d.ts +11 -0
  93. package/dist/components/bcm-accordion.js +152 -0
  94. package/dist/components/bcm-accordion.js.map +1 -0
  95. package/dist/components/bcm-alert.d.ts +11 -0
  96. package/dist/components/bcm-alert.js +120 -0
  97. package/dist/components/bcm-alert.js.map +1 -0
  98. package/dist/components/bcm-avatar.d.ts +11 -0
  99. package/dist/components/bcm-avatar.js +115 -0
  100. package/dist/components/bcm-avatar.js.map +1 -0
  101. package/dist/components/bcm-button.d.ts +11 -0
  102. package/dist/components/bcm-button.js +334 -0
  103. package/dist/components/bcm-button.js.map +1 -0
  104. package/dist/components/bcm-chip.d.ts +11 -0
  105. package/dist/components/bcm-chip.js +152 -0
  106. package/dist/components/bcm-chip.js.map +1 -0
  107. package/dist/components/bcm-text.d.ts +11 -0
  108. package/dist/components/bcm-text.js +138 -0
  109. package/dist/components/bcm-text.js.map +1 -0
  110. package/dist/components/index.d.ts +33 -0
  111. package/dist/components/index.js +38 -0
  112. package/dist/components/index.js.map +1 -0
  113. package/dist/components/p-0adcc84f.js +1222 -0
  114. package/dist/components/p-0adcc84f.js.map +1 -0
  115. package/dist/components/p-5fcf77f9.js +2582 -0
  116. package/dist/components/p-5fcf77f9.js.map +1 -0
  117. package/dist/components/p-b36f4f44.js +82 -0
  118. package/dist/components/p-b36f4f44.js.map +1 -0
  119. package/dist/esm/app-globals-f781c325.js +41 -0
  120. package/dist/esm/app-globals-f781c325.js.map +1 -0
  121. package/dist/esm/bcm-accordion_4.entry.js +616 -0
  122. package/dist/esm/bcm-accordion_4.entry.js.map +1 -0
  123. package/dist/esm/bcm-alert.entry.js +95 -0
  124. package/dist/esm/bcm-alert.entry.js.map +1 -0
  125. package/dist/esm/bcm-avatar.entry.js +85 -0
  126. package/dist/esm/bcm-avatar.entry.js.map +1 -0
  127. package/dist/esm/bcm-text.entry.js +115 -0
  128. package/dist/esm/bcm-text.entry.js.map +1 -0
  129. package/dist/esm/bromcom-ui.js +22 -0
  130. package/dist/esm/bromcom-ui.js.map +1 -0
  131. package/dist/esm/index-ce2fac11.js +1412 -0
  132. package/dist/esm/index-ce2fac11.js.map +1 -0
  133. package/dist/esm/index-f0e9d579.js +82 -0
  134. package/dist/esm/index-f0e9d579.js.map +1 -0
  135. package/dist/esm/index-f3b17e60.js +2582 -0
  136. package/dist/esm/index-f3b17e60.js.map +1 -0
  137. package/dist/esm/index.js +3 -0
  138. package/dist/esm/index.js.map +1 -0
  139. package/dist/esm/loader.js +13 -0
  140. package/dist/esm/loader.js.map +1 -0
  141. package/dist/index.cjs.js +1 -0
  142. package/dist/index.js +1 -0
  143. package/dist/types/components/accordion/accordion.component.d.ts +137 -0
  144. package/dist/types/components/accordion/types.d.ts +16 -0
  145. package/dist/types/components/accordion-group/accordion-group.component.d.ts +95 -0
  146. package/dist/types/components/accordion-group/types.d.ts +13 -0
  147. package/dist/types/components/alert/alert.component.d.ts +28 -0
  148. package/dist/types/components/alert/types.d.ts +3 -0
  149. package/dist/types/components/avatar/avatar.component.d.ts +24 -0
  150. package/dist/types/components/avatar/types.d.ts +3 -0
  151. package/dist/types/components/button/button.component.d.ts +52 -0
  152. package/dist/types/components/button/types.d.ts +15 -0
  153. package/dist/types/components/chip/chip.component.d.ts +48 -0
  154. package/dist/types/components/chip/types.d.ts +9 -0
  155. package/dist/types/components/text/text.component.d.ts +12 -0
  156. package/dist/types/components/text/text.types.d.ts +3 -0
  157. package/dist/types/components/text/text.utils.d.ts +2 -0
  158. package/dist/types/components.d.ts +1116 -0
  159. package/dist/types/index.d.ts +10 -0
  160. package/dist/types/stencil-public-runtime.d.ts +1680 -0
  161. package/dist/types/styles/theme-variables.d.ts +384 -0
  162. package/loader/cdn.js +1 -0
  163. package/loader/index.cjs.js +1 -0
  164. package/loader/index.d.ts +24 -0
  165. package/loader/index.es2017.js +1 -0
  166. package/loader/index.js +2 -0
  167. package/loader/package.json +11 -0
  168. package/package.json +49 -0
  169. package/readme.md +170 -0
@@ -0,0 +1,628 @@
1
+ import { h, Host } from "@stencil/core";
2
+ import { variantOptions } from "./types";
3
+ import { tv } from "tailwind-variants";
4
+ export class BcmButton {
5
+ constructor() {
6
+ /** Defines the main visual style of the button */
7
+ this.kind = 'primary';
8
+ /** Controls the button size */
9
+ this.size = 'medium';
10
+ /** Defines the button's status/state color */
11
+ this.status = 'default';
12
+ /** Icon placement (prefix/suffix) */
13
+ this.iconPosition = 'prefix';
14
+ /** Icon-only button mode */
15
+ this.iconOnly = false;
16
+ /** Full width button */
17
+ this.fullWidth = false;
18
+ /** HTML button type */
19
+ this.type = 'button';
20
+ /** Loading state */
21
+ this.loading = false;
22
+ /** Disabled state */
23
+ this.disabled = false;
24
+ /** Active state */
25
+ this.active = false;
26
+ this.handleClick = (event) => {
27
+ if (!this.disabled && !this.loading) {
28
+ this.bcmClick.emit(event);
29
+ }
30
+ };
31
+ this.handleFocus = (event) => {
32
+ this.bcmFocus.emit(event);
33
+ };
34
+ this.handleBlur = (event) => {
35
+ this.bcmBlur.emit(event);
36
+ };
37
+ this.buttonClass = tv({
38
+ base: 'bcm-button appearance-none inline-flex items-center justify-center border rounded',
39
+ variants: {
40
+ size: {
41
+ small: 'text-size-4 py-px px-2 min-h-6',
42
+ medium: 'text-size-5 py-0.5 px-3 min-h-8',
43
+ large: 'text-size-6 py-1 px-3 min-h-10',
44
+ },
45
+ kind: {
46
+ primary: 'kind-primary',
47
+ ghost: 'kind-ghost',
48
+ text: 'kind-text',
49
+ outline: 'kind-outline',
50
+ },
51
+ fullWidth: {
52
+ true: 'full-width w-full',
53
+ },
54
+ disabled: {
55
+ true: 'disabled cursor-not-allowed bg-[--bcm-ui-color-background-disabled-default] text-color-disabled border-color-disabled',
56
+ false: [
57
+ 'cursor-pointer',
58
+ 'bg-[--bcm-button-bg] text-[--bcm-button-text] border-[--bcm-button-border]',
59
+ 'hover:bg-[--bcm-button-bg-hover]',
60
+ 'active:bg-[--bcm-button-bg-active]',
61
+ 'focus-visible:ring',
62
+ ],
63
+ },
64
+ loading: {
65
+ true: '',
66
+ },
67
+ },
68
+ defaultVariants: {
69
+ size: 'medium',
70
+ kind: 'primary',
71
+ fullWidth: false,
72
+ disabled: false,
73
+ loading: false,
74
+ },
75
+ }, {
76
+ twMerge: false,
77
+ });
78
+ }
79
+ get buttonText() {
80
+ return this.text || (this.variant ? variantOptions[this.variant].text : '');
81
+ }
82
+ get buttonIcon() {
83
+ if (this.variant && variantOptions[this.variant].icon) {
84
+ return {
85
+ icon: variantOptions[this.variant].icon,
86
+ position: variantOptions[this.variant].iconPosition || 'prefix',
87
+ };
88
+ }
89
+ return {
90
+ icon: this.icon,
91
+ position: this.iconPosition,
92
+ };
93
+ }
94
+ get buttonStatus() {
95
+ return this.variant ? variantOptions[this.variant].status : this.status;
96
+ }
97
+ get buttonStyles() {
98
+ const status = this.buttonStatus === 'default' ? 'primary' : this.buttonStatus;
99
+ const kindStyleMap = {
100
+ primary: {
101
+ '--bcm-button-bg': `var(--bcm-ui-color-background-${status}-default)`,
102
+ '--bcm-button-bg-hover': `var(--bcm-ui-color-background-${status}-hover)`,
103
+ '--bcm-button-bg-active': `var(--bcm-ui-color-background-${status}-active)`,
104
+ '--bcm-button-border': 'transparent',
105
+ '--bcm-button-text': 'var(--bcm-ui-color-text-base)',
106
+ },
107
+ outline: {
108
+ '--bcm-button-bg': 'var(--bcm-ui-color-background-default-default)',
109
+ '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
110
+ '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
111
+ '--bcm-button-border': `var(--bcm-ui-color-border-${this.buttonStatus})`,
112
+ '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,
113
+ },
114
+ ghost: {
115
+ '--bcm-button-bg': 'transparent',
116
+ '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
117
+ '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
118
+ '--bcm-button-border': 'transparent',
119
+ '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,
120
+ },
121
+ text: {
122
+ '--bcm-button-bg': 'transparent',
123
+ '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',
124
+ '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',
125
+ '--bcm-button-border': 'transparent',
126
+ '--bcm-button-text': `var(--bcm-ui-color-text-${status})`,
127
+ },
128
+ };
129
+ return kindStyleMap[this.kind];
130
+ }
131
+ render() {
132
+ const { icon, position } = this.buttonIcon;
133
+ return (h(Host, { key: '271947a40a1f166d146ea106530b76744b06650a' }, h("button", { key: '10407570f7bbf2a5293714d040aae3f9404f2be5', type: this.type, disabled: this.disabled || this.loading, "aria-label": this.label, "aria-expanded": this.expanded, "aria-controls": this.controls, "aria-disabled": this.disabled, onClick: this.handleClick, onFocus: this.handleFocus, onBlur: this.handleBlur, style: this.buttonStyles, class: this.buttonClass({
134
+ size: this.size,
135
+ kind: this.kind,
136
+ fullWidth: this.fullWidth,
137
+ disabled: this.disabled,
138
+ loading: this.loading,
139
+ }) }, this.loading && h("slot", { key: '551abf095e2594ad1e7a8723c14342528cc5bc0c', name: "loading" }), h("span", { key: '36ff02f068fd14ee868977ce819f9dce3c6c881e' }, h("slot", { key: '6e87ba2465b6ef1fa4349640d7b9c10ed7d9b662', name: "prefix" }, position === 'prefix' && icon && h("i", { key: '51062786f476b57af571db5ecb974a35af565a5a', class: ' leading-none ' + icon }))), h("slot", { key: 'a32959e426991f1a117632426688eb997b1e4c27' }, this.buttonText), h("span", { key: 'b6b98cbf6708cef4f4f1fa4f652ab2f680071a45' }, h("slot", { key: 'e2f919eaa52fab225fe625776f03abf526a784b9', name: "suffix" }, position === 'suffix' && icon && h("i", { key: '52b4885d3485aa282cbc1a48d773941d535e1c3c', class: ' leading-none ' + icon }))))));
140
+ }
141
+ static get is() { return "bcm-button"; }
142
+ static get encapsulation() { return "shadow"; }
143
+ static get originalStyleUrls() {
144
+ return {
145
+ "$": ["button.css"]
146
+ };
147
+ }
148
+ static get styleUrls() {
149
+ return {
150
+ "$": ["button.css"]
151
+ };
152
+ }
153
+ static get properties() {
154
+ return {
155
+ "kind": {
156
+ "type": "string",
157
+ "mutable": false,
158
+ "complexType": {
159
+ "original": "ButtonKind",
160
+ "resolved": "\"ghost\" | \"outline\" | \"primary\" | \"text\"",
161
+ "references": {
162
+ "ButtonKind": {
163
+ "location": "import",
164
+ "path": "./types",
165
+ "id": "src/components/button/types.ts::ButtonKind"
166
+ }
167
+ }
168
+ },
169
+ "required": false,
170
+ "optional": false,
171
+ "docs": {
172
+ "tags": [],
173
+ "text": "Defines the main visual style of the button"
174
+ },
175
+ "getter": false,
176
+ "setter": false,
177
+ "attribute": "kind",
178
+ "reflect": false,
179
+ "defaultValue": "'primary'"
180
+ },
181
+ "size": {
182
+ "type": "string",
183
+ "mutable": false,
184
+ "complexType": {
185
+ "original": "ButtonSize",
186
+ "resolved": "\"large\" | \"medium\" | \"small\"",
187
+ "references": {
188
+ "ButtonSize": {
189
+ "location": "import",
190
+ "path": "./types",
191
+ "id": "src/components/button/types.ts::ButtonSize"
192
+ }
193
+ }
194
+ },
195
+ "required": false,
196
+ "optional": false,
197
+ "docs": {
198
+ "tags": [],
199
+ "text": "Controls the button size"
200
+ },
201
+ "getter": false,
202
+ "setter": false,
203
+ "attribute": "size",
204
+ "reflect": false,
205
+ "defaultValue": "'medium'"
206
+ },
207
+ "status": {
208
+ "type": "string",
209
+ "mutable": false,
210
+ "complexType": {
211
+ "original": "ButtonStatus",
212
+ "resolved": "\"default\" | \"error\" | \"info\" | \"success\" | \"warning\"",
213
+ "references": {
214
+ "ButtonStatus": {
215
+ "location": "import",
216
+ "path": "./types",
217
+ "id": "src/components/button/types.ts::ButtonStatus"
218
+ }
219
+ }
220
+ },
221
+ "required": false,
222
+ "optional": false,
223
+ "docs": {
224
+ "tags": [],
225
+ "text": "Defines the button's status/state color"
226
+ },
227
+ "getter": false,
228
+ "setter": false,
229
+ "attribute": "status",
230
+ "reflect": false,
231
+ "defaultValue": "'default'"
232
+ },
233
+ "variant": {
234
+ "type": "string",
235
+ "mutable": false,
236
+ "complexType": {
237
+ "original": "ButtonVariant",
238
+ "resolved": "string",
239
+ "references": {
240
+ "ButtonVariant": {
241
+ "location": "import",
242
+ "path": "./types",
243
+ "id": "src/components/button/types.ts::ButtonVariant"
244
+ }
245
+ }
246
+ },
247
+ "required": false,
248
+ "optional": true,
249
+ "docs": {
250
+ "tags": [],
251
+ "text": "Predefined button variants"
252
+ },
253
+ "getter": false,
254
+ "setter": false,
255
+ "attribute": "variant",
256
+ "reflect": false
257
+ },
258
+ "icon": {
259
+ "type": "string",
260
+ "mutable": false,
261
+ "complexType": {
262
+ "original": "string",
263
+ "resolved": "string",
264
+ "references": {}
265
+ },
266
+ "required": false,
267
+ "optional": true,
268
+ "docs": {
269
+ "tags": [],
270
+ "text": "Icon class name"
271
+ },
272
+ "getter": false,
273
+ "setter": false,
274
+ "attribute": "icon",
275
+ "reflect": false
276
+ },
277
+ "iconPosition": {
278
+ "type": "string",
279
+ "mutable": false,
280
+ "complexType": {
281
+ "original": "IconPosition",
282
+ "resolved": "\"prefix\" | \"suffix\"",
283
+ "references": {
284
+ "IconPosition": {
285
+ "location": "import",
286
+ "path": "./types",
287
+ "id": "src/components/button/types.ts::IconPosition"
288
+ }
289
+ }
290
+ },
291
+ "required": false,
292
+ "optional": false,
293
+ "docs": {
294
+ "tags": [],
295
+ "text": "Icon placement (prefix/suffix)"
296
+ },
297
+ "getter": false,
298
+ "setter": false,
299
+ "attribute": "icon-position",
300
+ "reflect": false,
301
+ "defaultValue": "'prefix'"
302
+ },
303
+ "iconOnly": {
304
+ "type": "boolean",
305
+ "mutable": false,
306
+ "complexType": {
307
+ "original": "boolean",
308
+ "resolved": "boolean",
309
+ "references": {}
310
+ },
311
+ "required": false,
312
+ "optional": false,
313
+ "docs": {
314
+ "tags": [],
315
+ "text": "Icon-only button mode"
316
+ },
317
+ "getter": false,
318
+ "setter": false,
319
+ "attribute": "icon-only",
320
+ "reflect": false,
321
+ "defaultValue": "false"
322
+ },
323
+ "fullWidth": {
324
+ "type": "boolean",
325
+ "mutable": false,
326
+ "complexType": {
327
+ "original": "boolean",
328
+ "resolved": "boolean",
329
+ "references": {}
330
+ },
331
+ "required": false,
332
+ "optional": false,
333
+ "docs": {
334
+ "tags": [],
335
+ "text": "Full width button"
336
+ },
337
+ "getter": false,
338
+ "setter": false,
339
+ "attribute": "full-width",
340
+ "reflect": true,
341
+ "defaultValue": "false"
342
+ },
343
+ "type": {
344
+ "type": "string",
345
+ "mutable": false,
346
+ "complexType": {
347
+ "original": "ButtonType",
348
+ "resolved": "\"button\" | \"reset\" | \"submit\"",
349
+ "references": {
350
+ "ButtonType": {
351
+ "location": "import",
352
+ "path": "./types",
353
+ "id": "src/components/button/types.ts::ButtonType"
354
+ }
355
+ }
356
+ },
357
+ "required": false,
358
+ "optional": false,
359
+ "docs": {
360
+ "tags": [],
361
+ "text": "HTML button type"
362
+ },
363
+ "getter": false,
364
+ "setter": false,
365
+ "attribute": "type",
366
+ "reflect": false,
367
+ "defaultValue": "'button'"
368
+ },
369
+ "loading": {
370
+ "type": "boolean",
371
+ "mutable": false,
372
+ "complexType": {
373
+ "original": "boolean",
374
+ "resolved": "boolean",
375
+ "references": {}
376
+ },
377
+ "required": false,
378
+ "optional": false,
379
+ "docs": {
380
+ "tags": [],
381
+ "text": "Loading state"
382
+ },
383
+ "getter": false,
384
+ "setter": false,
385
+ "attribute": "loading",
386
+ "reflect": false,
387
+ "defaultValue": "false"
388
+ },
389
+ "disabled": {
390
+ "type": "boolean",
391
+ "mutable": false,
392
+ "complexType": {
393
+ "original": "boolean",
394
+ "resolved": "boolean",
395
+ "references": {}
396
+ },
397
+ "required": false,
398
+ "optional": false,
399
+ "docs": {
400
+ "tags": [],
401
+ "text": "Disabled state"
402
+ },
403
+ "getter": false,
404
+ "setter": false,
405
+ "attribute": "disabled",
406
+ "reflect": false,
407
+ "defaultValue": "false"
408
+ },
409
+ "text": {
410
+ "type": "string",
411
+ "mutable": false,
412
+ "complexType": {
413
+ "original": "string",
414
+ "resolved": "string",
415
+ "references": {}
416
+ },
417
+ "required": false,
418
+ "optional": true,
419
+ "docs": {
420
+ "tags": [],
421
+ "text": "Button text content"
422
+ },
423
+ "getter": false,
424
+ "setter": false,
425
+ "attribute": "text",
426
+ "reflect": false
427
+ },
428
+ "active": {
429
+ "type": "boolean",
430
+ "mutable": false,
431
+ "complexType": {
432
+ "original": "boolean",
433
+ "resolved": "boolean",
434
+ "references": {}
435
+ },
436
+ "required": false,
437
+ "optional": false,
438
+ "docs": {
439
+ "tags": [],
440
+ "text": "Active state"
441
+ },
442
+ "getter": false,
443
+ "setter": false,
444
+ "attribute": "active",
445
+ "reflect": false,
446
+ "defaultValue": "false"
447
+ },
448
+ "form": {
449
+ "type": "string",
450
+ "mutable": false,
451
+ "complexType": {
452
+ "original": "string",
453
+ "resolved": "string",
454
+ "references": {}
455
+ },
456
+ "required": false,
457
+ "optional": false,
458
+ "docs": {
459
+ "tags": [],
460
+ "text": "Form association"
461
+ },
462
+ "getter": false,
463
+ "setter": false,
464
+ "attribute": "form",
465
+ "reflect": false
466
+ },
467
+ "value": {
468
+ "type": "string",
469
+ "mutable": false,
470
+ "complexType": {
471
+ "original": "string",
472
+ "resolved": "string",
473
+ "references": {}
474
+ },
475
+ "required": false,
476
+ "optional": false,
477
+ "docs": {
478
+ "tags": [],
479
+ "text": ""
480
+ },
481
+ "getter": false,
482
+ "setter": false,
483
+ "attribute": "value",
484
+ "reflect": false
485
+ },
486
+ "name": {
487
+ "type": "string",
488
+ "mutable": false,
489
+ "complexType": {
490
+ "original": "string",
491
+ "resolved": "string",
492
+ "references": {}
493
+ },
494
+ "required": false,
495
+ "optional": false,
496
+ "docs": {
497
+ "tags": [],
498
+ "text": ""
499
+ },
500
+ "getter": false,
501
+ "setter": false,
502
+ "attribute": "name",
503
+ "reflect": false
504
+ },
505
+ "label": {
506
+ "type": "string",
507
+ "mutable": false,
508
+ "complexType": {
509
+ "original": "string",
510
+ "resolved": "string",
511
+ "references": {}
512
+ },
513
+ "required": false,
514
+ "optional": false,
515
+ "docs": {
516
+ "tags": [],
517
+ "text": "Screen reader label"
518
+ },
519
+ "getter": false,
520
+ "setter": false,
521
+ "attribute": "label",
522
+ "reflect": false
523
+ },
524
+ "expanded": {
525
+ "type": "string",
526
+ "mutable": false,
527
+ "complexType": {
528
+ "original": "string",
529
+ "resolved": "string",
530
+ "references": {}
531
+ },
532
+ "required": false,
533
+ "optional": true,
534
+ "docs": {
535
+ "tags": [],
536
+ "text": "Expanded state for expandable content"
537
+ },
538
+ "getter": false,
539
+ "setter": false,
540
+ "attribute": "expanded",
541
+ "reflect": false
542
+ },
543
+ "controls": {
544
+ "type": "string",
545
+ "mutable": false,
546
+ "complexType": {
547
+ "original": "string",
548
+ "resolved": "string",
549
+ "references": {}
550
+ },
551
+ "required": false,
552
+ "optional": false,
553
+ "docs": {
554
+ "tags": [],
555
+ "text": "ID of controlled element"
556
+ },
557
+ "getter": false,
558
+ "setter": false,
559
+ "attribute": "controls",
560
+ "reflect": false
561
+ }
562
+ };
563
+ }
564
+ static get events() {
565
+ return [{
566
+ "method": "bcmClick",
567
+ "name": "bcmClick",
568
+ "bubbles": false,
569
+ "cancelable": true,
570
+ "composed": false,
571
+ "docs": {
572
+ "tags": [],
573
+ "text": ""
574
+ },
575
+ "complexType": {
576
+ "original": "MouseEvent",
577
+ "resolved": "MouseEvent",
578
+ "references": {
579
+ "MouseEvent": {
580
+ "location": "global",
581
+ "id": "global::MouseEvent"
582
+ }
583
+ }
584
+ }
585
+ }, {
586
+ "method": "bcmFocus",
587
+ "name": "bcmFocus",
588
+ "bubbles": false,
589
+ "cancelable": true,
590
+ "composed": false,
591
+ "docs": {
592
+ "tags": [],
593
+ "text": ""
594
+ },
595
+ "complexType": {
596
+ "original": "FocusEvent",
597
+ "resolved": "FocusEvent",
598
+ "references": {
599
+ "FocusEvent": {
600
+ "location": "global",
601
+ "id": "global::FocusEvent"
602
+ }
603
+ }
604
+ }
605
+ }, {
606
+ "method": "bcmBlur",
607
+ "name": "bcmBlur",
608
+ "bubbles": false,
609
+ "cancelable": true,
610
+ "composed": false,
611
+ "docs": {
612
+ "tags": [],
613
+ "text": ""
614
+ },
615
+ "complexType": {
616
+ "original": "FocusEvent",
617
+ "resolved": "FocusEvent",
618
+ "references": {
619
+ "FocusEvent": {
620
+ "location": "global",
621
+ "id": "global::FocusEvent"
622
+ }
623
+ }
624
+ }
625
+ }];
626
+ }
627
+ }
628
+ //# sourceMappingURL=button.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.component.js","sourceRoot":"","sources":["../../../src/components/button/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAiF,cAAc,EAAE,MAAM,SAAS,CAAC;AACxH,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAOvC,MAAM,OAAO,SAAS;IALtB;QAME,kDAAkD;QAElD,SAAI,GAAe,SAAS,CAAC;QAE7B,+BAA+B;QAE/B,SAAI,GAAe,QAAQ,CAAC;QAE5B,8CAA8C;QAE9C,WAAM,GAAiB,SAAS,CAAC;QAUjC,qCAAqC;QAErC,iBAAY,GAAiB,QAAQ,CAAC;QAEtC,4BAA4B;QAE5B,aAAQ,GAAG,KAAK,CAAC;QAEjB,wBAAwB;QAExB,cAAS,GAAG,KAAK,CAAC;QAElB,uBAAuB;QAEvB,SAAI,GAAe,QAAQ,CAAC;QAE5B,oBAAoB;QAEpB,YAAO,GAAG,KAAK,CAAC;QAEhB,qBAAqB;QAErB,aAAQ,GAAG,KAAK,CAAC;QAMjB,mBAAmB;QAEnB,WAAM,GAAG,KAAK,CAAC;QA6CP,gBAAW,GAAG,CAAC,KAAiB,EAAE,EAAE;YAC1C,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;gBACpC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC,CAAC;QAEM,gBAAW,GAAG,CAAC,KAAiB,EAAE,EAAE;YAC1C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC,CAAC;QAEM,eAAU,GAAG,CAAC,KAAiB,EAAE,EAAE;YACzC,IAAI,CAAC,OAAO,CAAC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AAgB,GAAG,IAAI,GAAM,CAAQ,CAChG,CACA,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Event, EventEmitter, Host } from '@stencil/core';\nimport { ButtonKind, ButtonSize, ButtonType, ButtonStatus, ButtonVariant, IconPosition, variantOptions } from './types';\nimport { tv } from 'tailwind-variants';\n\n@Component({\n tag: 'bcm-button',\n styleUrl: 'button.css',\n shadow: true,\n})\nexport class BcmButton {\n /** Defines the main visual style of the button */\n @Prop()\n kind: ButtonKind = 'primary';\n\n /** Controls the button size */\n @Prop()\n size: ButtonSize = 'medium';\n\n /** Defines the button's status/state color */\n @Prop()\n status: ButtonStatus = 'default';\n\n /** Predefined button variants */\n @Prop()\n variant?: ButtonVariant;\n\n /** Icon class name */\n @Prop()\n icon?: string;\n\n /** Icon placement (prefix/suffix) */\n @Prop()\n iconPosition: IconPosition = 'prefix';\n\n /** Icon-only button mode */\n @Prop()\n iconOnly = false;\n\n /** Full width button */\n @Prop({ attribute: 'full-width', reflect: true })\n fullWidth = false;\n\n /** HTML button type */\n @Prop()\n type: ButtonType = 'button';\n\n /** Loading state */\n @Prop()\n loading = false;\n\n /** Disabled state */\n @Prop()\n disabled = false;\n\n /** Button text content */\n @Prop()\n text?: string;\n\n /** Active state */\n @Prop()\n active = false;\n\n /** Form association */\n @Prop()\n form: string;\n\n @Prop()\n value: string;\n\n @Prop()\n name: string;\n\n /** Screen reader label */\n @Prop()\n label: string;\n\n /** Expanded state for expandable content */\n @Prop()\n expanded?: string;\n\n /** ID of controlled element */\n @Prop()\n controls: string;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmClick: EventEmitter<MouseEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmFocus: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmBlur: EventEmitter<FocusEvent>;\n\n private handleClick = (event: MouseEvent) => {\n if (!this.disabled && !this.loading) {\n this.bcmClick.emit(event);\n }\n };\n\n private handleFocus = (event: FocusEvent) => {\n this.bcmFocus.emit(event);\n };\n\n private handleBlur = (event: FocusEvent) => {\n this.bcmBlur.emit(event);\n };\n\n private get buttonText(): string {\n return this.text || (this.variant ? variantOptions[this.variant].text : '');\n }\n\n private get buttonIcon(): { icon?: string; position: IconPosition } {\n if (this.variant && variantOptions[this.variant].icon) {\n return {\n icon: variantOptions[this.variant].icon,\n position: variantOptions[this.variant].iconPosition || 'prefix',\n };\n }\n\n return {\n icon: this.icon,\n position: this.iconPosition,\n };\n }\n\n private get buttonStatus(): ButtonStatus {\n return this.variant ? variantOptions[this.variant].status : this.status;\n }\n\n private get buttonStyles() {\n const status = this.buttonStatus === 'default' ? 'primary' : this.buttonStatus;\n\n const kindStyleMap = {\n primary: {\n '--bcm-button-bg': `var(--bcm-ui-color-background-${status}-default)`,\n '--bcm-button-bg-hover': `var(--bcm-ui-color-background-${status}-hover)`,\n '--bcm-button-bg-active': `var(--bcm-ui-color-background-${status}-active)`,\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': 'var(--bcm-ui-color-text-base)',\n },\n outline: {\n '--bcm-button-bg': 'var(--bcm-ui-color-background-default-default)',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': `var(--bcm-ui-color-border-${this.buttonStatus})`,\n '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,\n },\n ghost: {\n '--bcm-button-bg': 'transparent',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': `var(--bcm-ui-color-text-${this.buttonStatus})`,\n },\n text: {\n '--bcm-button-bg': 'transparent',\n '--bcm-button-bg-hover': 'var(--bcm-ui-color-background-default-hover)',\n '--bcm-button-bg-active': 'var(--bcm-ui-color-background-default-active)',\n '--bcm-button-border': 'transparent',\n '--bcm-button-text': `var(--bcm-ui-color-text-${status})`,\n },\n };\n\n return kindStyleMap[this.kind];\n }\n\n private buttonClass = tv(\n {\n base: 'bcm-button appearance-none inline-flex items-center justify-center border rounded',\n variants: {\n size: {\n small: 'text-size-4 py-px px-2 min-h-6',\n medium: 'text-size-5 py-0.5 px-3 min-h-8',\n large: 'text-size-6 py-1 px-3 min-h-10',\n },\n kind: {\n primary: 'kind-primary',\n ghost: 'kind-ghost',\n text: 'kind-text',\n outline: 'kind-outline',\n },\n fullWidth: {\n true: 'full-width w-full',\n },\n disabled: {\n true: 'disabled cursor-not-allowed bg-[--bcm-ui-color-background-disabled-default] text-color-disabled border-color-disabled',\n false: [\n 'cursor-pointer',\n 'bg-[--bcm-button-bg] text-[--bcm-button-text] border-[--bcm-button-border]',\n 'hover:bg-[--bcm-button-bg-hover]',\n 'active:bg-[--bcm-button-bg-active]',\n 'focus-visible:ring',\n ],\n },\n loading: {\n true: '',\n },\n },\n defaultVariants: {\n size: 'medium',\n kind: 'primary',\n fullWidth: false,\n disabled: false,\n loading: false,\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const { icon, position } = this.buttonIcon;\n\n return (\n <Host>\n <button\n type={this.type}\n disabled={this.disabled || this.loading}\n aria-label={this.label}\n aria-expanded={this.expanded}\n aria-controls={this.controls}\n aria-disabled={this.disabled}\n onClick={this.handleClick}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n style={this.buttonStyles}\n class={this.buttonClass({\n size: this.size,\n kind: this.kind,\n fullWidth: this.fullWidth,\n disabled: this.disabled,\n loading: this.loading,\n })}\n >\n {this.loading && <slot name=\"loading\"></slot>}\n <span>\n <slot name=\"prefix\">{position === 'prefix' && icon && <i class={' leading-none ' + icon}></i>}</slot>\n </span>\n <slot>{this.buttonText}</slot>\n <span>\n <slot name=\"suffix\">{position === 'suffix' && icon && <i class={' leading-none ' + icon}></i>}</slot>\n </span>\n </button>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid oklch(.928 .006 264.531);box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:oklch(.707 .022 261.325);opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:host{display:inline-block}:host([full-width]){width:100%}.static{position:static}.inline-flex{display:inline-flex}.min-h-10{min-height:2.5rem}.min-h-6{min-height:1.5rem}.min-h-8{min-height:2rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.appearance-none{appearance:none}.items-center{align-items:center}.justify-center{justify-content:center}.rounded{border-radius:.25rem}.border{border-width:1px}.border-\[--bcm-button-border\]{border-color:var(--bcm-button-border)}.bg-\[--bcm-button-bg\]{background-color:var(--bcm-button-bg)}.bg-\[--bcm-ui-color-background-disabled-default\]{background-color:var(--bcm-ui-color-background-disabled-default)}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-px{padding-bottom:1px;padding-top:1px}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.leading-none{line-height:1}.text-\[--bcm-button-text\]{color:var(--bcm-button-text)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.hover\:bg-\[--bcm-button-bg-hover\]:hover{background-color:var(--bcm-button-bg-hover)}.focus-visible\:ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.active\:bg-\[--bcm-button-bg-active\]:active{background-color:var(--bcm-button-bg-active)}