@telesign/boreal-web-components 0.1.0-alpha.0 → 0.1.0-alpha.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 (91) hide show
  1. package/README.md +202 -0
  2. package/components-build/bds-banner.js +1 -1
  3. package/components-build/{my-component.d.ts → bds-button.d.ts} +4 -4
  4. package/components-build/bds-button.js +1 -0
  5. package/components-build/bds-typography.js +1 -1
  6. package/components-build/index.js +1 -1
  7. package/components-build/p-Ba6iHqJA.js +1 -0
  8. package/components-build/p-DQR-jjOl.js +1 -0
  9. package/custom-elements.json +352 -94
  10. package/dist/boreal-web-components/boreal-web-components.esm.js +1 -1
  11. package/dist/boreal-web-components/boreal-web-components.js +1 -1
  12. package/dist/boreal-web-components/p-08bd6bed.system.entry.js +1 -0
  13. package/dist/boreal-web-components/p-1575fe61.system.entry.js +1 -0
  14. package/dist/boreal-web-components/p-657c12a3.system.entry.js +1 -0
  15. package/dist/boreal-web-components/p-66bb3c44.entry.js +1 -0
  16. package/dist/boreal-web-components/p-742f39ef.entry.js +1 -0
  17. package/dist/boreal-web-components/p-BG1kmb4c.system.js +1 -0
  18. package/dist/boreal-web-components/p-B_tL_RWF.system.js +2 -0
  19. package/dist/boreal-web-components/p-Ba6iHqJA.js +1 -0
  20. package/dist/boreal-web-components/p-DIvR9Mw7.system.js +1 -0
  21. package/dist/boreal-web-components/p-DKPZ4_C0.system.js +1 -0
  22. package/dist/boreal-web-components/p-DQR-jjOl.js +1 -0
  23. package/dist/boreal-web-components/p-DQvmq159.js +2 -0
  24. package/dist/boreal-web-components/p-e4a075ba.entry.js +1 -0
  25. package/dist/cjs/{attributes-RPVEtBdj.js → attributes-D0WPida0.js} +0 -9
  26. package/dist/cjs/bds-banner.cjs.entry.js +4 -3
  27. package/dist/cjs/bds-button.cjs.entry.js +185 -0
  28. package/dist/cjs/bds-typography.cjs.entry.js +10 -9
  29. package/dist/cjs/boreal-web-components.cjs.js +2 -2
  30. package/dist/cjs/{index-Cdb66Tqj.js → index-C9JKWXwa.js} +41 -4
  31. package/dist/cjs/loader.cjs.js +2 -2
  32. package/dist/cjs/states-C03fKOhs.js +12 -0
  33. package/dist/collection/collection-manifest.json +1 -1
  34. package/dist/collection/components/actions/bds-button/bds-button.css +479 -0
  35. package/dist/collection/components/actions/bds-button/bds-button.js +459 -0
  36. package/dist/collection/components/actions/bds-button/types/IButton.js +1 -0
  37. package/dist/collection/components/actions/bds-button/types/enum.js +15 -0
  38. package/dist/collection/components/actions/bds-button/types/types.js +1 -0
  39. package/dist/collection/components/titles-text/bds-typography/bds-typography.js +5 -5
  40. package/dist/collection/components/titles-text/bds-typography/utils/bds-typography-utils.js +5 -5
  41. package/dist/collection/types/coreColors.js +6 -0
  42. package/dist/collection/types/states.js +1 -1
  43. package/dist/collection/utils/helpers/validateProps.js +16 -0
  44. package/dist/esm/{attributes-B9wshZ_4.js → attributes-Ba6iHqJA.js} +1 -8
  45. package/dist/esm/bds-banner.entry.js +3 -2
  46. package/dist/esm/bds-button.entry.js +183 -0
  47. package/dist/esm/bds-typography.entry.js +10 -9
  48. package/dist/esm/boreal-web-components.js +3 -3
  49. package/dist/esm/{index-DgFiTd6X.js → index-DQvmq159.js} +41 -4
  50. package/dist/esm/loader.js +3 -3
  51. package/dist/esm/states-DQR-jjOl.js +9 -0
  52. package/dist/{boreal-web-components/p-B9wshZ_4.js → esm-es5/attributes-Ba6iHqJA.js} +1 -1
  53. package/dist/esm-es5/bds-banner.entry.js +1 -1
  54. package/dist/esm-es5/bds-button.entry.js +1 -0
  55. package/dist/esm-es5/bds-typography.entry.js +1 -1
  56. package/dist/esm-es5/boreal-web-components.js +1 -1
  57. package/dist/esm-es5/index-DQvmq159.js +2 -0
  58. package/dist/esm-es5/loader.js +1 -1
  59. package/dist/esm-es5/states-DQR-jjOl.js +1 -0
  60. package/dist/types/components/actions/bds-button/bds-button.d.ts +90 -0
  61. package/dist/types/components/actions/bds-button/types/IButton.d.ts +14 -0
  62. package/dist/types/components/actions/bds-button/types/enum.d.ts +16 -0
  63. package/dist/types/components/actions/bds-button/types/types.d.ts +5 -0
  64. package/dist/types/components/titles-text/bds-typography/types/ITypography.d.ts +2 -2
  65. package/dist/types/components/titles-text/bds-typography/utils/bds-typography-utils.d.ts +2 -2
  66. package/dist/types/components.d.ts +269 -50
  67. package/dist/types/types/coreColors.d.ts +8 -0
  68. package/dist/types/types/states.d.ts +2 -2
  69. package/dist/types/utils/helpers/validateProps.d.ts +11 -0
  70. package/package.json +4 -3
  71. package/components-build/my-component.js +0 -1
  72. package/components-build/p-B9wshZ_4.js +0 -1
  73. package/dist/boreal-web-components/p-412d037b.system.entry.js +0 -1
  74. package/dist/boreal-web-components/p-527a761b.entry.js +0 -1
  75. package/dist/boreal-web-components/p-5666a22a.system.entry.js +0 -1
  76. package/dist/boreal-web-components/p-BQdH0ijK.system.js +0 -2
  77. package/dist/boreal-web-components/p-CMd-Mv-5.system.js +0 -1
  78. package/dist/boreal-web-components/p-CaVEtaG3.system.js +0 -1
  79. package/dist/boreal-web-components/p-DgFiTd6X.js +0 -2
  80. package/dist/boreal-web-components/p-b818618b.entry.js +0 -1
  81. package/dist/boreal-web-components/p-d596406b.entry.js +0 -1
  82. package/dist/boreal-web-components/p-e37e7dba.system.entry.js +0 -1
  83. package/dist/cjs/my-component.cjs.entry.js +0 -29
  84. package/dist/collection/components/my-component/my-component.css +0 -3
  85. package/dist/collection/components/my-component/my-component.js +0 -95
  86. package/dist/esm/my-component.entry.js +0 -27
  87. package/dist/esm-es5/attributes-B9wshZ_4.js +0 -1
  88. package/dist/esm-es5/index-DgFiTd6X.js +0 -2
  89. package/dist/esm-es5/my-component.entry.js +0 -1
  90. package/dist/types/components/my-component/my-component.d.ts +0 -16
  91. package/readme.md +0 -111
@@ -6,8 +6,10 @@
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { IBanner } from "./components/feedback/bds-banner/types/IBanner";
9
+ import { IButton } from "./components/actions/bds-button/types/IButton";
9
10
  import { ITypography } from "./components/titles-text/bds-typography/types/ITypography";
10
11
  export { IBanner } from "./components/feedback/bds-banner/types/IBanner";
12
+ export { IButton } from "./components/actions/bds-button/types/IButton";
11
13
  export { ITypography } from "./components/titles-text/bds-typography/types/ITypography";
12
14
  export namespace Components {
13
15
  /**
@@ -43,6 +45,85 @@ export namespace Components {
43
45
  */
44
46
  "variant": IBanner['variant'];
45
47
  }
48
+ /**
49
+ * Button component for user interactions, form submissions, supporting various styles, sizes, and states.
50
+ * @summary A versatile button component that can be customized with different colors, sizes, variants and states to fit various use cases in the application.
51
+ * @attr {string} label - The accessible name for the button, used for screen readers. It should be provided by the user for accessibility purposes.
52
+ * @attr {boolean} disabled - Disables the button when true, preventing user interaction and applying disabled styles.
53
+ * @attr {string} name - The name attribute for the button, useful for form submissions.
54
+ * @attr {string} type - The type of the button, which can be 'button', 'submit', or 'reset'. Default is 'button'.
55
+ * @attr {string} color - The color theme of the button, which can be 'default', 'primary', 'success', or 'error'. Default is 'default'.
56
+ * @attr {string} variant - The visual style of the button, which can be 'default', 'outline', or 'plain'. Default is 'default'.
57
+ * @attr {string} size - The size of the button, which can be 'small', 'medium', or 'large'. Default is 'medium'.
58
+ * @attr {boolean} loading - Indicates whether the button is in a loading state, which can be used to show a loading spinner and disable the button. Default is false.
59
+ * @attr {boolean} disclosure - Indicates if the button should show a chevron down at the end of the content.
60
+ * @property {string} label - The accessible name for the button, used for screen readers. It should be provided by the user for accessibility purposes.
61
+ * @property {boolean} disabled - Disables the button when true, preventing user interaction and applying disabled styles.
62
+ * @property {string} name - The name attribute for the button, useful for form submissions.
63
+ * @property {string} type - The type of the button, which can be 'button', 'submit', or 'reset'. Default is 'button'.
64
+ * @property {string} color - The color theme of the button, which can be 'default', 'primary', 'success', or 'error'. Default is 'default'.
65
+ * @property {string} variant - The visual style of the button, which can be 'default', 'outline', or 'plain'. Default is 'default'.
66
+ * @property {string} size - The size of the button, which can be 'small', 'medium', or 'large'. Default is 'medium'.
67
+ * @property {boolean} loading - Indicates whether the button is in a loading state, which can be used to show a loading spinner and disable the button. Default is false.
68
+ * @property {boolean} disclosure - Indicates if the button should show a chevron down at the end of the content.
69
+ * @default 'button' - Default type value
70
+ * @default 'default' - Default color value
71
+ * @default 'default' - Default variant value
72
+ * @default 'medium' - Default size value
73
+ * @default 'default' - Default status value
74
+ * @default false - Default disabled value
75
+ * @default '' - Default label value
76
+ * @default '' - Default name value
77
+ * @default false - Default loading value
78
+ * @default false - Default disclosure value
79
+ */
80
+ interface BdsButton {
81
+ /**
82
+ * color is a string attribute. The color theme of the button, which can be 'default', 'primary', 'success', or 'error'. Default is 'default'.
83
+ * @default CORE_COLORS.DEFAULT
84
+ */
85
+ "color": IButton['color'];
86
+ /**
87
+ * disabled is a boolean attribute. Disables the button when true, preventing user interaction and applying disabled styles.
88
+ * @default false
89
+ */
90
+ "disabled": IButton['disabled'];
91
+ /**
92
+ * disclosure is a boolean attribute. Used to show a chevron down at the of the content
93
+ * @default false
94
+ */
95
+ "disclosure": IButton['disclosure'];
96
+ /**
97
+ * The accessible name for the button, used for screen readers. It should be provided by the user for accessibility purposes.
98
+ * @default ''
99
+ */
100
+ "label": IButton['label'];
101
+ /**
102
+ * loading is a boolean attribute. Indicates whether the button is in a loading state, which can be used to show a loading spinner and disable the button. Default is false.
103
+ * @default false
104
+ */
105
+ "loading": IButton['loading'];
106
+ /**
107
+ * name is a string attribute. The name attribute for the button, useful for form submissions.
108
+ * @default ''
109
+ */
110
+ "name": IButton['name'];
111
+ /**
112
+ * size is a string attribute. The size of the button, which can be 'small', 'medium', or 'large'. Default is 'medium'.
113
+ * @default BUTTON_SIZES.MEDIUM
114
+ */
115
+ "size": IButton['size'];
116
+ /**
117
+ * type is a string attribute. The type of the button, which can be 'button', 'submit', or 'reset'. Default is 'button'.
118
+ * @default BUTTON_TYPES.BUTTON
119
+ */
120
+ "type": IButton['type'];
121
+ /**
122
+ * variant is a string attribute. The visual style of the button, which can be 'default', 'outline', or 'plain'. Default is 'default'.
123
+ * @default BUTTON_VARIANTS.DEFAULT
124
+ */
125
+ "variant": IButton['variant'];
126
+ }
46
127
  /**
47
128
  * Typography component for displaying text with various styles, sizes, and interactive features.
48
129
  * @summary A comprehensive typography component that supports multiple text variants, sizes, alignments, states, and link functionality.
@@ -148,7 +229,7 @@ export namespace Components {
148
229
  "size": ITypography['size'];
149
230
  /**
150
231
  * Visual state (if supported by variant).
151
- * @default STATES.DEFAULT
232
+ * @default COMPONENT_STATES.DEFAULT
152
233
  */
153
234
  "state": ITypography['state'];
154
235
  /**
@@ -167,28 +248,15 @@ export namespace Components {
167
248
  */
168
249
  "variant": ITypography['variant'];
169
250
  }
170
- interface MyComponent {
171
- /**
172
- * The first name
173
- * @default ''
174
- */
175
- "first": string;
176
- /**
177
- * The last name
178
- * @default ''
179
- */
180
- "last": string;
181
- /**
182
- * The middle name
183
- * @default ''
184
- */
185
- "middle": string;
186
- }
187
251
  }
188
252
  export interface BdsBannerCustomEvent<T> extends CustomEvent<T> {
189
253
  detail: T;
190
254
  target: HTMLBdsBannerElement;
191
255
  }
256
+ export interface BdsButtonCustomEvent<T> extends CustomEvent<T> {
257
+ detail: T;
258
+ target: HTMLBdsButtonElement;
259
+ }
192
260
  declare global {
193
261
  interface HTMLBdsBannerElementEventMap {
194
262
  "close": void;
@@ -219,6 +287,55 @@ declare global {
219
287
  prototype: HTMLBdsBannerElement;
220
288
  new (): HTMLBdsBannerElement;
221
289
  };
290
+ interface HTMLBdsButtonElementEventMap {
291
+ "bdsClick": UIEvent;
292
+ }
293
+ /**
294
+ * Button component for user interactions, form submissions, supporting various styles, sizes, and states.
295
+ * @summary A versatile button component that can be customized with different colors, sizes, variants and states to fit various use cases in the application.
296
+ * @attr {string} label - The accessible name for the button, used for screen readers. It should be provided by the user for accessibility purposes.
297
+ * @attr {boolean} disabled - Disables the button when true, preventing user interaction and applying disabled styles.
298
+ * @attr {string} name - The name attribute for the button, useful for form submissions.
299
+ * @attr {string} type - The type of the button, which can be 'button', 'submit', or 'reset'. Default is 'button'.
300
+ * @attr {string} color - The color theme of the button, which can be 'default', 'primary', 'success', or 'error'. Default is 'default'.
301
+ * @attr {string} variant - The visual style of the button, which can be 'default', 'outline', or 'plain'. Default is 'default'.
302
+ * @attr {string} size - The size of the button, which can be 'small', 'medium', or 'large'. Default is 'medium'.
303
+ * @attr {boolean} loading - Indicates whether the button is in a loading state, which can be used to show a loading spinner and disable the button. Default is false.
304
+ * @attr {boolean} disclosure - Indicates if the button should show a chevron down at the end of the content.
305
+ * @property {string} label - The accessible name for the button, used for screen readers. It should be provided by the user for accessibility purposes.
306
+ * @property {boolean} disabled - Disables the button when true, preventing user interaction and applying disabled styles.
307
+ * @property {string} name - The name attribute for the button, useful for form submissions.
308
+ * @property {string} type - The type of the button, which can be 'button', 'submit', or 'reset'. Default is 'button'.
309
+ * @property {string} color - The color theme of the button, which can be 'default', 'primary', 'success', or 'error'. Default is 'default'.
310
+ * @property {string} variant - The visual style of the button, which can be 'default', 'outline', or 'plain'. Default is 'default'.
311
+ * @property {string} size - The size of the button, which can be 'small', 'medium', or 'large'. Default is 'medium'.
312
+ * @property {boolean} loading - Indicates whether the button is in a loading state, which can be used to show a loading spinner and disable the button. Default is false.
313
+ * @property {boolean} disclosure - Indicates if the button should show a chevron down at the end of the content.
314
+ * @default 'button' - Default type value
315
+ * @default 'default' - Default color value
316
+ * @default 'default' - Default variant value
317
+ * @default 'medium' - Default size value
318
+ * @default 'default' - Default status value
319
+ * @default false - Default disabled value
320
+ * @default '' - Default label value
321
+ * @default '' - Default name value
322
+ * @default false - Default loading value
323
+ * @default false - Default disclosure value
324
+ */
325
+ interface HTMLBdsButtonElement extends Components.BdsButton, HTMLStencilElement {
326
+ addEventListener<K extends keyof HTMLBdsButtonElementEventMap>(type: K, listener: (this: HTMLBdsButtonElement, ev: BdsButtonCustomEvent<HTMLBdsButtonElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
327
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
328
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
329
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
330
+ removeEventListener<K extends keyof HTMLBdsButtonElementEventMap>(type: K, listener: (this: HTMLBdsButtonElement, ev: BdsButtonCustomEvent<HTMLBdsButtonElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
331
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
332
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
333
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
334
+ }
335
+ var HTMLBdsButtonElement: {
336
+ prototype: HTMLBdsButtonElement;
337
+ new (): HTMLBdsButtonElement;
338
+ };
222
339
  /**
223
340
  * Typography component for displaying text with various styles, sizes, and interactive features.
224
341
  * @summary A comprehensive typography component that supports multiple text variants, sizes, alignments, states, and link functionality.
@@ -272,16 +389,10 @@ declare global {
272
389
  prototype: HTMLBdsTypographyElement;
273
390
  new (): HTMLBdsTypographyElement;
274
391
  };
275
- interface HTMLMyComponentElement extends Components.MyComponent, HTMLStencilElement {
276
- }
277
- var HTMLMyComponentElement: {
278
- prototype: HTMLMyComponentElement;
279
- new (): HTMLMyComponentElement;
280
- };
281
392
  interface HTMLElementTagNameMap {
282
393
  "bds-banner": HTMLBdsBannerElement;
394
+ "bds-button": HTMLBdsButtonElement;
283
395
  "bds-typography": HTMLBdsTypographyElement;
284
- "my-component": HTMLMyComponentElement;
285
396
  }
286
397
  }
287
398
  declare namespace LocalJSX {
@@ -318,6 +429,93 @@ declare namespace LocalJSX {
318
429
  */
319
430
  "variant"?: IBanner['variant'];
320
431
  }
432
+ /**
433
+ * Button component for user interactions, form submissions, supporting various styles, sizes, and states.
434
+ * @summary A versatile button component that can be customized with different colors, sizes, variants and states to fit various use cases in the application.
435
+ * @attr {string} label - The accessible name for the button, used for screen readers. It should be provided by the user for accessibility purposes.
436
+ * @attr {boolean} disabled - Disables the button when true, preventing user interaction and applying disabled styles.
437
+ * @attr {string} name - The name attribute for the button, useful for form submissions.
438
+ * @attr {string} type - The type of the button, which can be 'button', 'submit', or 'reset'. Default is 'button'.
439
+ * @attr {string} color - The color theme of the button, which can be 'default', 'primary', 'success', or 'error'. Default is 'default'.
440
+ * @attr {string} variant - The visual style of the button, which can be 'default', 'outline', or 'plain'. Default is 'default'.
441
+ * @attr {string} size - The size of the button, which can be 'small', 'medium', or 'large'. Default is 'medium'.
442
+ * @attr {boolean} loading - Indicates whether the button is in a loading state, which can be used to show a loading spinner and disable the button. Default is false.
443
+ * @attr {boolean} disclosure - Indicates if the button should show a chevron down at the end of the content.
444
+ * @property {string} label - The accessible name for the button, used for screen readers. It should be provided by the user for accessibility purposes.
445
+ * @property {boolean} disabled - Disables the button when true, preventing user interaction and applying disabled styles.
446
+ * @property {string} name - The name attribute for the button, useful for form submissions.
447
+ * @property {string} type - The type of the button, which can be 'button', 'submit', or 'reset'. Default is 'button'.
448
+ * @property {string} color - The color theme of the button, which can be 'default', 'primary', 'success', or 'error'. Default is 'default'.
449
+ * @property {string} variant - The visual style of the button, which can be 'default', 'outline', or 'plain'. Default is 'default'.
450
+ * @property {string} size - The size of the button, which can be 'small', 'medium', or 'large'. Default is 'medium'.
451
+ * @property {boolean} loading - Indicates whether the button is in a loading state, which can be used to show a loading spinner and disable the button. Default is false.
452
+ * @property {boolean} disclosure - Indicates if the button should show a chevron down at the end of the content.
453
+ * @default 'button' - Default type value
454
+ * @default 'default' - Default color value
455
+ * @default 'default' - Default variant value
456
+ * @default 'medium' - Default size value
457
+ * @default 'default' - Default status value
458
+ * @default false - Default disabled value
459
+ * @default '' - Default label value
460
+ * @default '' - Default name value
461
+ * @default false - Default loading value
462
+ * @default false - Default disclosure value
463
+ */
464
+ interface BdsButton {
465
+ /**
466
+ * color is a string attribute. The color theme of the button, which can be 'default', 'primary', 'success', or 'error'. Default is 'default'.
467
+ * @default CORE_COLORS.DEFAULT
468
+ */
469
+ "color"?: IButton['color'];
470
+ /**
471
+ * disabled is a boolean attribute. Disables the button when true, preventing user interaction and applying disabled styles.
472
+ * @default false
473
+ */
474
+ "disabled"?: IButton['disabled'];
475
+ /**
476
+ * disclosure is a boolean attribute. Used to show a chevron down at the of the content
477
+ * @default false
478
+ */
479
+ "disclosure"?: IButton['disclosure'];
480
+ /**
481
+ * The `id` of a `<form>` element to associate this element with.
482
+ */
483
+ "form"?: string;
484
+ /**
485
+ * The accessible name for the button, used for screen readers. It should be provided by the user for accessibility purposes.
486
+ * @default ''
487
+ */
488
+ "label"?: IButton['label'];
489
+ /**
490
+ * loading is a boolean attribute. Indicates whether the button is in a loading state, which can be used to show a loading spinner and disable the button. Default is false.
491
+ * @default false
492
+ */
493
+ "loading"?: IButton['loading'];
494
+ /**
495
+ * name is a string attribute. The name attribute for the button, useful for form submissions.
496
+ * @default ''
497
+ */
498
+ "name"?: IButton['name'];
499
+ /**
500
+ * emit event to click
501
+ */
502
+ "onBdsClick"?: (event: BdsButtonCustomEvent<UIEvent>) => void;
503
+ /**
504
+ * size is a string attribute. The size of the button, which can be 'small', 'medium', or 'large'. Default is 'medium'.
505
+ * @default BUTTON_SIZES.MEDIUM
506
+ */
507
+ "size"?: IButton['size'];
508
+ /**
509
+ * type is a string attribute. The type of the button, which can be 'button', 'submit', or 'reset'. Default is 'button'.
510
+ * @default BUTTON_TYPES.BUTTON
511
+ */
512
+ "type"?: IButton['type'];
513
+ /**
514
+ * variant is a string attribute. The visual style of the button, which can be 'default', 'outline', or 'plain'. Default is 'default'.
515
+ * @default BUTTON_VARIANTS.DEFAULT
516
+ */
517
+ "variant"?: IButton['variant'];
518
+ }
321
519
  /**
322
520
  * Typography component for displaying text with various styles, sizes, and interactive features.
323
521
  * @summary A comprehensive typography component that supports multiple text variants, sizes, alignments, states, and link functionality.
@@ -423,7 +621,7 @@ declare namespace LocalJSX {
423
621
  "size"?: ITypography['size'];
424
622
  /**
425
623
  * Visual state (if supported by variant).
426
- * @default STATES.DEFAULT
624
+ * @default COMPONENT_STATES.DEFAULT
427
625
  */
428
626
  "state"?: ITypography['state'];
429
627
  /**
@@ -442,29 +640,23 @@ declare namespace LocalJSX {
442
640
  */
443
641
  "variant"?: ITypography['variant'];
444
642
  }
445
- interface MyComponent {
446
- /**
447
- * The first name
448
- * @default ''
449
- */
450
- "first"?: string;
451
- /**
452
- * The last name
453
- * @default ''
454
- */
455
- "last"?: string;
456
- /**
457
- * The middle name
458
- * @default ''
459
- */
460
- "middle"?: string;
461
- }
462
643
 
463
644
  interface BdsBannerAttributes {
464
645
  "idComponent": string;
465
646
  "variant": IBanner['variant'];
466
647
  "enableClose": IBanner['enableClose'];
467
648
  }
649
+ interface BdsButtonAttributes {
650
+ "label": IButton['label'];
651
+ "disabled": IButton['disabled'];
652
+ "name": IButton['name'];
653
+ "type": IButton['type'];
654
+ "color": IButton['color'];
655
+ "variant": IButton['variant'];
656
+ "size": IButton['size'];
657
+ "loading": IButton['loading'];
658
+ "disclosure": IButton['disclosure'];
659
+ }
468
660
  interface BdsTypographyAttributes {
469
661
  "variant": ITypography['variant'];
470
662
  "size": ITypography['size'];
@@ -482,16 +674,11 @@ declare namespace LocalJSX {
482
674
  "isDownloadable": ITypography['isDownloadable'];
483
675
  "filename": ITypography['filename'];
484
676
  }
485
- interface MyComponentAttributes {
486
- "first": string;
487
- "middle": string;
488
- "last": string;
489
- }
490
677
 
491
678
  interface IntrinsicElements {
492
679
  "bds-banner": Omit<BdsBanner, keyof BdsBannerAttributes> & { [K in keyof BdsBanner & keyof BdsBannerAttributes]?: BdsBanner[K] } & { [K in keyof BdsBanner & keyof BdsBannerAttributes as `attr:${K}`]?: BdsBannerAttributes[K] } & { [K in keyof BdsBanner & keyof BdsBannerAttributes as `prop:${K}`]?: BdsBanner[K] };
680
+ "bds-button": Omit<BdsButton, keyof BdsButtonAttributes> & { [K in keyof BdsButton & keyof BdsButtonAttributes]?: BdsButton[K] } & { [K in keyof BdsButton & keyof BdsButtonAttributes as `attr:${K}`]?: BdsButtonAttributes[K] } & { [K in keyof BdsButton & keyof BdsButtonAttributes as `prop:${K}`]?: BdsButton[K] };
493
681
  "bds-typography": Omit<BdsTypography, keyof BdsTypographyAttributes> & { [K in keyof BdsTypography & keyof BdsTypographyAttributes]?: BdsTypography[K] } & { [K in keyof BdsTypography & keyof BdsTypographyAttributes as `attr:${K}`]?: BdsTypographyAttributes[K] } & { [K in keyof BdsTypography & keyof BdsTypographyAttributes as `prop:${K}`]?: BdsTypography[K] };
494
- "my-component": Omit<MyComponent, keyof MyComponentAttributes> & { [K in keyof MyComponent & keyof MyComponentAttributes]?: MyComponent[K] } & { [K in keyof MyComponent & keyof MyComponentAttributes as `attr:${K}`]?: MyComponentAttributes[K] } & { [K in keyof MyComponent & keyof MyComponentAttributes as `prop:${K}`]?: MyComponent[K] };
495
682
  }
496
683
  }
497
684
  export { LocalJSX as JSX };
@@ -511,6 +698,39 @@ declare module "@stencil/core" {
511
698
  * @method closeBanner - Programmatic method to close the banner and emit the `close` event.
512
699
  */
513
700
  "bds-banner": LocalJSX.IntrinsicElements["bds-banner"] & JSXBase.HTMLAttributes<HTMLBdsBannerElement>;
701
+ /**
702
+ * Button component for user interactions, form submissions, supporting various styles, sizes, and states.
703
+ * @summary A versatile button component that can be customized with different colors, sizes, variants and states to fit various use cases in the application.
704
+ * @attr {string} label - The accessible name for the button, used for screen readers. It should be provided by the user for accessibility purposes.
705
+ * @attr {boolean} disabled - Disables the button when true, preventing user interaction and applying disabled styles.
706
+ * @attr {string} name - The name attribute for the button, useful for form submissions.
707
+ * @attr {string} type - The type of the button, which can be 'button', 'submit', or 'reset'. Default is 'button'.
708
+ * @attr {string} color - The color theme of the button, which can be 'default', 'primary', 'success', or 'error'. Default is 'default'.
709
+ * @attr {string} variant - The visual style of the button, which can be 'default', 'outline', or 'plain'. Default is 'default'.
710
+ * @attr {string} size - The size of the button, which can be 'small', 'medium', or 'large'. Default is 'medium'.
711
+ * @attr {boolean} loading - Indicates whether the button is in a loading state, which can be used to show a loading spinner and disable the button. Default is false.
712
+ * @attr {boolean} disclosure - Indicates if the button should show a chevron down at the end of the content.
713
+ * @property {string} label - The accessible name for the button, used for screen readers. It should be provided by the user for accessibility purposes.
714
+ * @property {boolean} disabled - Disables the button when true, preventing user interaction and applying disabled styles.
715
+ * @property {string} name - The name attribute for the button, useful for form submissions.
716
+ * @property {string} type - The type of the button, which can be 'button', 'submit', or 'reset'. Default is 'button'.
717
+ * @property {string} color - The color theme of the button, which can be 'default', 'primary', 'success', or 'error'. Default is 'default'.
718
+ * @property {string} variant - The visual style of the button, which can be 'default', 'outline', or 'plain'. Default is 'default'.
719
+ * @property {string} size - The size of the button, which can be 'small', 'medium', or 'large'. Default is 'medium'.
720
+ * @property {boolean} loading - Indicates whether the button is in a loading state, which can be used to show a loading spinner and disable the button. Default is false.
721
+ * @property {boolean} disclosure - Indicates if the button should show a chevron down at the end of the content.
722
+ * @default 'button' - Default type value
723
+ * @default 'default' - Default color value
724
+ * @default 'default' - Default variant value
725
+ * @default 'medium' - Default size value
726
+ * @default 'default' - Default status value
727
+ * @default false - Default disabled value
728
+ * @default '' - Default label value
729
+ * @default '' - Default name value
730
+ * @default false - Default loading value
731
+ * @default false - Default disclosure value
732
+ */
733
+ "bds-button": LocalJSX.IntrinsicElements["bds-button"] & JSXBase.HTMLAttributes<HTMLBdsButtonElement>;
514
734
  /**
515
735
  * Typography component for displaying text with various styles, sizes, and interactive features.
516
736
  * @summary A comprehensive typography component that supports multiple text variants, sizes, alignments, states, and link functionality.
@@ -559,7 +779,6 @@ declare module "@stencil/core" {
559
779
  * @default '' - Default tooltipText value
560
780
  */
561
781
  "bds-typography": LocalJSX.IntrinsicElements["bds-typography"] & JSXBase.HTMLAttributes<HTMLBdsTypographyElement>;
562
- "my-component": LocalJSX.IntrinsicElements["my-component"] & JSXBase.HTMLAttributes<HTMLMyComponentElement>;
563
782
  }
564
783
  }
565
784
  }
@@ -0,0 +1,8 @@
1
+ export declare const CORE_COLORS: {
2
+ readonly DEFAULT: "default";
3
+ readonly PRIMARY: "primary";
4
+ readonly SUCCESS: "success";
5
+ readonly ERROR: "error";
6
+ };
7
+ export type CoreColors = (typeof CORE_COLORS)[keyof typeof CORE_COLORS];
8
+ //# sourceMappingURL=coreColors.d.ts.map
@@ -1,4 +1,4 @@
1
- export declare const STATES: {
1
+ export declare const COMPONENT_STATES: {
2
2
  readonly DEFAULT: "default";
3
3
  readonly ERROR: "error";
4
4
  readonly DISABLED: "disabled";
@@ -7,7 +7,7 @@ export declare const STATES: {
7
7
  readonly FOCUS: "focus";
8
8
  readonly VISITED: "visited";
9
9
  };
10
- export type State = (typeof STATES)[keyof typeof STATES];
10
+ export type ComponentState = (typeof COMPONENT_STATES)[keyof typeof COMPONENT_STATES];
11
11
  export declare const PROCESS_STATUS: {
12
12
  readonly NEUTRAL: "neutral";
13
13
  readonly PENDING: "pending";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Validates a component prop against a list of accepted values.
3
+ * If the current value is invalid, the prop is reset to the fallback and a warning is issued.
4
+ *
5
+ * @param acceptedValues - The list of valid values for the prop.
6
+ * @param fallbackValue - The value to apply when the current value is invalid.
7
+ * @param element - The host element whose property will be corrected.
8
+ * @param propertyName - The name of the prop to validate.
9
+ */
10
+ export declare function validatePropValue<T extends string>(acceptedValues: readonly T[], fallbackValue: T, element: HTMLElement, propertyName: string): void;
11
+ //# sourceMappingURL=validateProps.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telesign/boreal-web-components",
3
- "version": "0.1.0-alpha.0",
3
+ "version": "0.1.0-alpha.2",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -19,8 +19,9 @@
19
19
  "require": "./loader/index.cjs",
20
20
  "types": "./loader/index.d.ts"
21
21
  },
22
- "./components/*": {
23
- "import": "./components-build/*"
22
+ "./components/*.js": {
23
+ "import": "./components-build/*.js",
24
+ "types": "./components-build/*.d.ts"
24
25
  },
25
26
  "./types": {
26
27
  "import": "./dist/collection/types/index.js",
@@ -1 +0,0 @@
1
- import{p as t,H as e,h as s,t as o}from"./index.js";const n=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.first="",this.middle="",this.last=""}render(){return s("div",{key:"2f3775c7b3d8475826a01101110bd2876a57f2cb"}," Hello, World! I'm Stencil 'Don't call me a framework' JS")}static get style(){return":host{display:block}"}},[0,"my-component",{first:[1],middle:[1],last:[1]}]),m=n,c=function(){"undefined"!=typeof customElements&&["my-component"].forEach((t=>{"my-component"===t&&(customElements.get(o(t))||customElements.define(o(t),n))}))};export{m as MyComponent,c as defineCustomElement}
@@ -1 +0,0 @@
1
- const a={DEFAULT:"default",ERROR:"error",DISABLED:"disabled"},i={INFO:"info"},r=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colindextext","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowindextext","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],e=a=>((a,i=[])=>{const r={};return i.forEach((i=>{if(a.hasAttribute(i)){const e=a.getAttribute(i);null!==e&&(r[i]=e),a.removeAttribute(i)}})),r})(a,r);export{i as S,a,e as i}
@@ -1 +0,0 @@
1
- System.register(["./p-BQdH0ijK.system.js"],(function(t){"use strict";var n,e;return{setters:[function(t){n=t.r;e=t.h}],execute:function(){var i=function(){return":host{display:block}"};var r=t("my_component",function(){function t(t){n(this,t);this.first="";this.middle="";this.last=""}t.prototype.render=function(){return e("div",{key:"2f3775c7b3d8475826a01101110bd2876a57f2cb"}," Hello, World! I'm Stencil 'Don't call me a framework' JS")};return t}());r.style=i()}}}));
@@ -1 +0,0 @@
1
- import{r as t,h as e,a,g as r}from"./p-DgFiTd6X.js";import{a as o,i}from"./p-B9wshZ_4.js";const h="md",l={link:{states:[o.DISABLED],size:["sm",h]},label:{states:[o.DISABLED],isRequired:!0,canUseTooltip:!0},heading:{canUseTooltip:!0},subheading:{canUseTooltip:!0},helper:{states:[o.ERROR]},display:{size:["xs","sm",h,"lg","xl"]}},s=class{constructor(e){t(this,e),this.inheritedAttributes={},this.variant="display",this.size=h,this.state=o.DEFAULT,this.customClass="",this.element="p",this.align="start",this.ellipsis=!1,this.maxLines=1,this.tooltipText="",this.isRequired=!1,this.htmlFor=void 0,this.href=null,this.target=null,this.isDownloadable=!1,this.filename="download",this.sanitizedHref=""}async updateSanitizedHref(){if("a"===this.getTagName&&null!==this.href){const{sanitizeUrl:t}=await import("./p-noyWJ11s.js").then((function(t){return t.i}));this.sanitizedHref=t(this.href)}else this.sanitizedHref=""}async componentWillLoad(){"a"===this.getTagName&&null!==this.href&&await this.updateSanitizedHref(),this.inheritedAttributes={...i(this.el)}}get getTagName(){return"link"===this.variant?"a":this.element.toLowerCase()}getVariantConfig(){return l[this.variant]??{}}getAccessibilityTags(){const{isRequired:t=null}=this.getVariantConfig(),e=["a","label"].includes(this.getTagName);return{"aria-required":this.isRequired&&t,"aria-disabled":this.state===o.DISABLED&&e}}getVariantStateStyles(){const t=this.getVariantConfig();return{[`bds-typography--${this.variant}`]:!0,[`bds-typography--align-${this.align}`]:!0,[`bds-typography--${this.state}`]:!(!t?.states||!t?.states.includes(this.state)),[`bds-typography--size-${this.size}`]:!(!t?.size||!t?.size.includes(this.size)),"bds-typography--required":!(!t?.isRequired||!this.isRequired),"bds-typography--ellipsis":this.ellipsis&&this.maxLines<=1,"bds-typography--ellipsis-multiline":this.ellipsis&&this.maxLines>1,[this.customClass]:""!==this.customClass}}render(){const t=this.getTagName,r={...(i=this,h=t,{a:{href:i.state!==o.DISABLED?i.sanitizedHref:null,target:i.target,download:i.isDownloadable?i.filename:null,rel:"_blank"===i.target?"noopener noreferrer":void 0},label:{htmlFor:i.htmlFor}}[h]||{}),...this.inheritedAttributes,...this.getAccessibilityTags()};var i,h;const l=this.getVariantStateStyles(),{canUseTooltip:s=null,isRequired:p=null}=this.getVariantConfig();return e(a,{key:"6091692b1cb6bf1d3295f0834c8d25425633d65a",class:"bds-typography"},e(t,{key:"0cc91c35fa1cc36c99101a79fae0c8b5cf44de43",class:l,style:{webkitLineClamp:this.maxLines},...r},e("slot",{key:"973848fba8211cb5ef869e0e48fb1806bd5efdec"}),this.isRequired&&p&&e("em",{key:"dd89574e9dedd55905ae4c7bcd57604f26fbd03b",class:"bds-typography__required-indicator","aria-hidden":"true"},"*"),this.tooltipText&&s&&e("em",{key:"473b0de17bd095b97d54d24d2f3aa75f8a8e4922",class:"bds-typography__info-icon bds-icon-info-circle"})))}get el(){return r(this)}static get watchers(){return{href:[{updateSanitizedHref:0}]}}};s.style=".bds-typography{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:var(--boreal-typography-font-family-primary);font-weight:var(--boreal-typography-font-weight-regular)}.bds-typography__required-indicator{color:var(--boreal-icon-danger-base);font-weight:var(--boreal-typography-font-weight-regular)}.bds-typography__info-icon{color:var(--boreal-icon-default-light)}.bds-typography--heading,.bds-typography--subheading{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-3xs)}.bds-typography--label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-3xs)}.bds-typography--display{display:block}.bds-typography--caption,.bds-typography--helper,.bds-typography--link{display:inline-block}.bds-typography--caption{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-default-light)}.bds-typography--helper{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-sm);color:var(--boreal-text-default-light)}.bds-typography--link{font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-primary-base);text-decoration:none}.bds-typography--link:hover{text-decoration:underline}.bds-typography--link:visited{color:var(--boreal-text-primary-base)}.bds-typography--link:active{color:var(--boreal-text-primary-dark)}.bds-typography--link.bds-typography--size-sm{font-size:var(--boreal-typography-font-size-xs)}.bds-typography--link.bds-typography--size-md{font-size:var(--boreal-typography-font-size-sm)}.bds-typography--code{font-family:var(--boreal-typography-font-family-secondary);font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default);line-height:var(--boreal-typography-line-height-md);overflow-wrap:break-word;background-color:var(--boreal-bg-neutral);padding:var(--boreal-spacing-3xs) var(--boreal-spacing-xs);border-radius:var(--boreal-radius-xs);display:inline;box-decoration-break:clone;-webkit-box-decoration-break:clone}.bds-typography--label{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-default-darker)}.bds-typography--display{font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default)}.bds-typography--display.bds-typography--size-sm{font-size:var(--boreal-typography-font-size-xl);line-height:var(--boreal-typography-line-height-xl)}.bds-typography--display.bds-typography--size-md{font-size:var(--boreal-typography-font-size-2xl);line-height:var(--boreal-typography-line-height-2xl)}.bds-typography--display.bds-typography--size-lg{font-size:var(--boreal-typography-font-size-3xl);line-height:var(--boreal-typography-line-height-3xl);font-weight:var(--boreal-typography-font-weight-light)}.bds-typography--display.bds-typography--size-xl{font-size:var(--boreal-typography-font-size-4xl);line-height:var(--boreal-typography-line-height-4xl);font-weight:var(--boreal-typography-font-weight-light)}.bds-typography--heading{font-size:var(--boreal-typography-font-size-lg);line-height:var(--boreal-typography-line-height-lg);font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default)}.bds-typography h1.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-4xl);line-height:var(--boreal-typography-line-height-4xl)}.bds-typography h2.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-3xl);line-height:var(--boreal-typography-line-height-3xl)}.bds-typography h3.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-2xl);line-height:var(--boreal-typography-line-height-2xl)}.bds-typography h4.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-xl);line-height:var(--boreal-typography-line-height-xl)}.bds-typography h5.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-lg);line-height:var(--boreal-typography-line-height-lg)}.bds-typography h6.bds-typography--heading{font-size:var(--boreal-typography-font-size-md);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-md)}.bds-typography--subheading{font-size:var(--boreal-typography-font-size-md);line-height:var(--boreal-typography-line-height-md);font-weight:var(--boreal-typography-font-weight-semibold)}.bds-typography--align-start{text-align:start}.bds-typography--align-center{text-align:center}.bds-typography--align-end{text-align:end}.bds-typography--align-inherit{text-align:inherit}.bds-typography--error{color:var(--boreal-text-danger-base)}.bds-typography--disabled{color:var(--boreal-text-disabled);pointer-events:none;cursor:not-allowed}.bds-typography--disabled .bds-typography__required-indicator{color:var(--boreal-text-danger-light)}.bds-typography--ellipsis{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.bds-typography--ellipsis-multiline{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;width:100%}";export{s as bds_typography}
@@ -1 +0,0 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,r=1,a=arguments.length;r<a;r++){e=arguments[r];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i))t[i]=e[i]}return t};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(t,e,r,a){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,o){function n(t){try{h(a.next(t))}catch(t){o(t)}}function l(t){try{h(a["throw"](t))}catch(t){o(t)}}function h(t){t.done?r(t.value):i(t.value).then(n,l)}h((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},a,i,o,n=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return n.next=l(0),n["throw"]=l(1),n["return"]=l(2),typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function l(t){return function(e){return h([t,e])}}function h(l){if(a)throw new TypeError("Generator is already executing.");while(n&&(n=0,l[0]&&(r=0)),r)try{if(a=1,i&&(o=l[0]&2?i["return"]:l[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;if(i=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:r.label++;return{value:l[1],done:false};case 5:r.label++;i=l[1];l=[0];continue;case 7:l=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1];o=l;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(l);break}if(o[2])r.ops.pop();r.trys.pop();continue}l=e.call(t,r)}catch(t){l=[6,t];i=0}finally{a=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-BQdH0ijK.system.js","./p-CaVEtaG3.system.js"],(function(t,e){"use strict";var r,a,i,o,n,l;return{setters:[function(t){r=t.r;a=t.h;i=t.a;o=t.g},function(t){n=t.a;l=t.i}],execute:function(){var h={START:"start"};var s={XS:"xs",S:"sm",M:"md",L:"lg",XL:"xl"};var p={DISPLAY:"display",LINK:"link"};var y={P:"p",A:"a"};var g="download";var b={link:{states:[n.DISABLED],size:[s.S,s.M]},label:{states:[n.DISABLED],isRequired:true,canUseTooltip:true},heading:{canUseTooltip:true},subheading:{canUseTooltip:true},helper:{states:[n.ERROR]},display:{size:[s.XS,s.S,s.M,s.L,s.XL]}};var d=function(t,e){var r={a:{href:t.state!==n.DISABLED?t.sanitizedHref:null,target:t.target,download:t.isDownloadable?t.filename:null,rel:t.target==="_blank"?"noopener noreferrer":undefined},label:{htmlFor:t.htmlFor}};return r[e]||{}};var f=function(){return".bds-typography{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:var(--boreal-typography-font-family-primary);font-weight:var(--boreal-typography-font-weight-regular)}.bds-typography__required-indicator{color:var(--boreal-icon-danger-base);font-weight:var(--boreal-typography-font-weight-regular)}.bds-typography__info-icon{color:var(--boreal-icon-default-light)}.bds-typography--heading,.bds-typography--subheading{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-3xs)}.bds-typography--label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:var(--boreal-spacing-3xs)}.bds-typography--display{display:block}.bds-typography--caption,.bds-typography--helper,.bds-typography--link{display:inline-block}.bds-typography--caption{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-default-light)}.bds-typography--helper{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-sm);color:var(--boreal-text-default-light)}.bds-typography--link{font-size:var(--boreal-typography-font-size-sm);font-weight:var(--boreal-typography-font-weight-regular);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-primary-base);text-decoration:none}.bds-typography--link:hover{text-decoration:underline}.bds-typography--link:visited{color:var(--boreal-text-primary-base)}.bds-typography--link:active{color:var(--boreal-text-primary-dark)}.bds-typography--link.bds-typography--size-sm{font-size:var(--boreal-typography-font-size-xs)}.bds-typography--link.bds-typography--size-md{font-size:var(--boreal-typography-font-size-sm)}.bds-typography--code{font-family:var(--boreal-typography-font-family-secondary);font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default);line-height:var(--boreal-typography-line-height-md);overflow-wrap:break-word;background-color:var(--boreal-bg-neutral);padding:var(--boreal-spacing-3xs) var(--boreal-spacing-xs);border-radius:var(--boreal-radius-xs);display:inline;box-decoration-break:clone;-webkit-box-decoration-break:clone}.bds-typography--label{font-size:var(--boreal-typography-font-size-xs);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-md);color:var(--boreal-text-default-darker)}.bds-typography--display{font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default)}.bds-typography--display.bds-typography--size-sm{font-size:var(--boreal-typography-font-size-xl);line-height:var(--boreal-typography-line-height-xl)}.bds-typography--display.bds-typography--size-md{font-size:var(--boreal-typography-font-size-2xl);line-height:var(--boreal-typography-line-height-2xl)}.bds-typography--display.bds-typography--size-lg{font-size:var(--boreal-typography-font-size-3xl);line-height:var(--boreal-typography-line-height-3xl);font-weight:var(--boreal-typography-font-weight-light)}.bds-typography--display.bds-typography--size-xl{font-size:var(--boreal-typography-font-size-4xl);line-height:var(--boreal-typography-line-height-4xl);font-weight:var(--boreal-typography-font-weight-light)}.bds-typography--heading{font-size:var(--boreal-typography-font-size-lg);line-height:var(--boreal-typography-line-height-lg);font-weight:var(--boreal-typography-font-weight-regular);color:var(--boreal-text-default)}.bds-typography h1.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-4xl);line-height:var(--boreal-typography-line-height-4xl)}.bds-typography h2.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-3xl);line-height:var(--boreal-typography-line-height-3xl)}.bds-typography h3.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-2xl);line-height:var(--boreal-typography-line-height-2xl)}.bds-typography h4.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-xl);line-height:var(--boreal-typography-line-height-xl)}.bds-typography h5.bds-typography--heading{font-weight:var(--boreal-typography-font-weight-regular);font-size:var(--boreal-typography-font-size-lg);line-height:var(--boreal-typography-line-height-lg)}.bds-typography h6.bds-typography--heading{font-size:var(--boreal-typography-font-size-md);font-weight:var(--boreal-typography-font-weight-semibold);line-height:var(--boreal-typography-line-height-md)}.bds-typography--subheading{font-size:var(--boreal-typography-font-size-md);line-height:var(--boreal-typography-line-height-md);font-weight:var(--boreal-typography-font-weight-semibold)}.bds-typography--align-start{text-align:start}.bds-typography--align-center{text-align:center}.bds-typography--align-end{text-align:end}.bds-typography--align-inherit{text-align:inherit}.bds-typography--error{color:var(--boreal-text-danger-base)}.bds-typography--disabled{color:var(--boreal-text-disabled);pointer-events:none;cursor:not-allowed}.bds-typography--disabled .bds-typography__required-indicator{color:var(--boreal-text-danger-light)}.bds-typography--ellipsis{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.bds-typography--ellipsis-multiline{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;white-space:normal;width:100%}"};var u=t("bds_typography",function(){function t(t){r(this,t);this.inheritedAttributes={};this.variant=p.DISPLAY;this.size=s.M;this.state=n.DEFAULT;this.customClass="";this.element=y.P;this.align=h.START;this.ellipsis=false;this.maxLines=1;this.tooltipText="";this.isRequired=false;this.htmlFor=undefined;this.href=null;this.target=null;this.isDownloadable=false;this.filename=g;this.sanitizedHref=""}t.prototype.updateSanitizedHref=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:if(!(this.getTagName==="a"&&this.href!==null))return[3,2];return[4,e.import("./p-B-PpI2Xv.system.js").then((function(t){return t.i}))];case 1:t=r.sent().sanitizeUrl;this.sanitizedHref=t(this.href);return[3,3];case 2:this.sanitizedHref="";r.label=3;case 3:return[2]}}))}))};t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!(this.getTagName===y.A&&this.href!==null))return[3,2];return[4,this.updateSanitizedHref()];case 1:t.sent();t.label=2;case 2:this.inheritedAttributes=__assign({},l(this.el));return[2]}}))}))};Object.defineProperty(t.prototype,"getTagName",{get:function(){if(this.variant===p.LINK)return y.A;return this.element.toLowerCase()},enumerable:false,configurable:true});t.prototype.getVariantConfig=function(){var t;return(t=b[this.variant])!==null&&t!==void 0?t:{}};t.prototype.getAccessibilityTags=function(){var t=this.getVariantConfig().isRequired,e=t===void 0?null:t;var r=["a","label"].includes(this.getTagName);return{"aria-required":this.isRequired&&e,"aria-disabled":this.state===n.DISABLED&&r}};t.prototype.getVariantStateStyles=function(){var t;var e=this.getVariantConfig();return t={},t["bds-typography--".concat(this.variant)]=true,t["bds-typography--align-".concat(this.align)]=true,t["bds-typography--".concat(this.state)]=!!((e===null||e===void 0?void 0:e.states)&&(e===null||e===void 0?void 0:e.states.includes(this.state))),t["bds-typography--size-".concat(this.size)]=!!((e===null||e===void 0?void 0:e.size)&&(e===null||e===void 0?void 0:e.size.includes(this.size))),t["bds-typography--required"]=!!((e===null||e===void 0?void 0:e.isRequired)&&this.isRequired),t["bds-typography--ellipsis"]=this.ellipsis&&this.maxLines<=1,t["bds-typography--ellipsis-multiline"]=this.ellipsis&&this.maxLines>1,t[this.customClass]=this.customClass!=="",t};t.prototype.render=function(){var t=this.getTagName;var e=__assign(__assign(__assign({},d(this,t)),this.inheritedAttributes),this.getAccessibilityTags());var r=this.getVariantStateStyles();var o=this.getVariantConfig(),n=o.canUseTooltip,l=n===void 0?null:n,h=o.isRequired,s=h===void 0?null:h;return a(i,{key:"6091692b1cb6bf1d3295f0834c8d25425633d65a",class:"bds-typography"},a(t,__assign({key:"0cc91c35fa1cc36c99101a79fae0c8b5cf44de43",class:r,style:{webkitLineClamp:this.maxLines}},e),a("slot",{key:"973848fba8211cb5ef869e0e48fb1806bd5efdec"}),this.isRequired&&s&&a("em",{key:"dd89574e9dedd55905ae4c7bcd57604f26fbd03b",class:"bds-typography__required-indicator","aria-hidden":"true"},"*"),this.tooltipText&&l&&a("em",{key:"473b0de17bd095b97d54d24d2f3aa75f8a8e4922",class:"bds-typography__info-icon bds-icon-info-circle"})))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{href:[{updateSanitizedHref:0}]}},enumerable:false,configurable:true});return t}());u.style=f()}}}));