@haiilo/catalyst 0.5.13 → 0.7.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 (125) hide show
  1. package/dist/catalyst/catalyst.css +1 -1
  2. package/dist/catalyst/catalyst.esm.js +1 -1
  3. package/dist/catalyst/catalyst.esm.js.map +1 -1
  4. package/dist/catalyst/p-12486027.js.map +1 -1
  5. package/dist/catalyst/p-12b96af6.js +2 -0
  6. package/dist/catalyst/p-12b96af6.js.map +1 -0
  7. package/dist/catalyst/p-4c9cd203.entry.js +2 -0
  8. package/dist/catalyst/p-4c9cd203.entry.js.map +1 -0
  9. package/dist/catalyst/p-5616e2cd.js +2 -0
  10. package/dist/catalyst/p-5616e2cd.js.map +1 -0
  11. package/dist/catalyst/p-9d2eab4f.entry.js +10 -0
  12. package/dist/catalyst/p-9d2eab4f.entry.js.map +1 -0
  13. package/dist/cjs/app-globals-aa29ad72.js.map +1 -1
  14. package/dist/cjs/{cat-alert_15.cjs.entry.js → cat-alert_18.cjs.entry.js} +277 -65
  15. package/dist/cjs/cat-alert_18.cjs.entry.js.map +1 -0
  16. package/dist/cjs/cat-form-hint-93a6936b.js +22 -0
  17. package/dist/cjs/cat-form-hint-93a6936b.js.map +1 -0
  18. package/dist/cjs/cat-textarea.cjs.entry.js +12 -12
  19. package/dist/cjs/cat-textarea.cjs.entry.js.map +1 -1
  20. package/dist/cjs/catalyst.cjs.js +2 -2
  21. package/dist/cjs/{index-5d72f0e4.js → index-499bad41.js} +44 -1
  22. package/dist/cjs/index-499bad41.js.map +1 -0
  23. package/dist/cjs/loader.cjs.js +2 -2
  24. package/dist/collection/collection-manifest.json +3 -0
  25. package/dist/collection/components/cat-avatar/cat-avatar.css +81 -0
  26. package/dist/collection/components/cat-avatar/cat-avatar.js +225 -0
  27. package/dist/collection/components/cat-avatar/cat-avatar.js.map +1 -0
  28. package/dist/collection/components/cat-badge/cat-badge.css +5 -5
  29. package/dist/collection/components/cat-button/cat-button.js +8 -8
  30. package/dist/collection/components/cat-button/cat-button.js.map +1 -1
  31. package/dist/collection/components/cat-checkbox/cat-checkbox.css +14 -0
  32. package/dist/collection/components/cat-checkbox/cat-checkbox.js +43 -11
  33. package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
  34. package/dist/collection/components/cat-form-hint/cat-form-hint.js +16 -0
  35. package/dist/collection/components/cat-form-hint/cat-form-hint.js.map +1 -0
  36. package/dist/collection/components/cat-input/cat-input.css +12 -6
  37. package/dist/collection/components/cat-input/cat-input.js +23 -25
  38. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  39. package/dist/collection/components/cat-radio/cat-radio.css +14 -0
  40. package/dist/collection/components/cat-radio/cat-radio.js +40 -8
  41. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
  42. package/dist/collection/components/cat-scrollable/cat-scrollable.js +44 -44
  43. package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
  44. package/dist/collection/components/cat-tab/cat-tab.css +12 -0
  45. package/dist/collection/components/cat-tab/cat-tab.js +203 -0
  46. package/dist/collection/components/cat-tab/cat-tab.js.map +1 -0
  47. package/dist/collection/components/cat-tabs/cat-tabs.css +33 -0
  48. package/dist/collection/components/cat-tabs/cat-tabs.js +122 -0
  49. package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -0
  50. package/dist/collection/components/cat-textarea/cat-textarea.css +12 -6
  51. package/dist/collection/components/cat-textarea/cat-textarea.js +23 -18
  52. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  53. package/dist/collection/components/cat-toggle/cat-toggle.css +14 -0
  54. package/dist/collection/components/cat-toggle/cat-toggle.js +39 -7
  55. package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
  56. package/dist/collection/components/cat-tooltip/cat-tooltip.js +13 -8
  57. package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
  58. package/dist/collection/utils/load-img.js +16 -0
  59. package/dist/collection/utils/load-img.js.map +1 -0
  60. package/dist/components/cat-avatar.d.ts +11 -0
  61. package/dist/components/cat-avatar.js +125 -0
  62. package/dist/components/cat-avatar.js.map +1 -0
  63. package/dist/components/cat-badge.js +1 -1
  64. package/dist/components/cat-badge.js.map +1 -1
  65. package/dist/components/cat-button2.js +5 -5
  66. package/dist/components/cat-button2.js.map +1 -1
  67. package/dist/components/cat-checkbox.js +15 -5
  68. package/dist/components/cat-checkbox.js.map +1 -1
  69. package/dist/components/cat-form-hint.js +20 -0
  70. package/dist/components/cat-form-hint.js.map +1 -0
  71. package/dist/components/cat-input.js +15 -18
  72. package/dist/components/cat-input.js.map +1 -1
  73. package/dist/components/cat-radio.js +15 -5
  74. package/dist/components/cat-radio.js.map +1 -1
  75. package/dist/components/cat-scrollable.js +23 -23
  76. package/dist/components/cat-scrollable.js.map +1 -1
  77. package/dist/components/cat-tab.d.ts +11 -0
  78. package/dist/components/cat-tab.js +70 -0
  79. package/dist/components/cat-tab.js.map +1 -0
  80. package/dist/components/cat-tabs.d.ts +11 -0
  81. package/dist/components/cat-tabs.js +107 -0
  82. package/dist/components/cat-tabs.js.map +1 -0
  83. package/dist/components/cat-textarea.js +13 -12
  84. package/dist/components/cat-textarea.js.map +1 -1
  85. package/dist/components/cat-toggle.js +15 -5
  86. package/dist/components/cat-toggle.js.map +1 -1
  87. package/dist/components/cat-tooltip.js +13 -8
  88. package/dist/components/cat-tooltip.js.map +1 -1
  89. package/dist/components/index.js.map +1 -1
  90. package/dist/esm/app-globals-cf55f7f5.js.map +1 -1
  91. package/dist/esm/{cat-alert_15.entry.js → cat-alert_18.entry.js} +275 -66
  92. package/dist/esm/cat-alert_18.entry.js.map +1 -0
  93. package/dist/esm/cat-form-hint-dc443c7c.js +20 -0
  94. package/dist/esm/cat-form-hint-dc443c7c.js.map +1 -0
  95. package/dist/esm/cat-textarea.entry.js +12 -12
  96. package/dist/esm/cat-textarea.entry.js.map +1 -1
  97. package/dist/esm/catalyst.js +2 -2
  98. package/dist/esm/{index-fd12be19.js → index-039e6f5f.js} +44 -2
  99. package/dist/esm/index-039e6f5f.js.map +1 -0
  100. package/dist/esm/loader.js +2 -2
  101. package/dist/types/components/cat-avatar/cat-avatar.d.ts +46 -0
  102. package/dist/types/components/cat-button/cat-button.d.ts +2 -2
  103. package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +9 -0
  104. package/dist/types/components/cat-form-hint/cat-form-hint.d.ts +19 -0
  105. package/dist/types/components/cat-input/cat-input.d.ts +7 -5
  106. package/dist/types/components/cat-radio/cat-radio.d.ts +9 -0
  107. package/dist/types/components/cat-scrollable/cat-scrollable.d.ts +12 -12
  108. package/dist/types/components/cat-tab/cat-tab.d.ts +43 -0
  109. package/dist/types/components/cat-tabs/cat-tabs.d.ts +25 -0
  110. package/dist/types/components/cat-textarea/cat-textarea.d.ts +7 -2
  111. package/dist/types/components/cat-toggle/cat-toggle.d.ts +9 -0
  112. package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +1 -0
  113. package/dist/types/components.d.ts +255 -52
  114. package/dist/types/utils/load-img.d.ts +8 -0
  115. package/package.json +2 -2
  116. package/dist/catalyst/p-a8629c54.entry.js +0 -2
  117. package/dist/catalyst/p-a8629c54.entry.js.map +0 -1
  118. package/dist/catalyst/p-bfc656ca.js +0 -2
  119. package/dist/catalyst/p-bfc656ca.js.map +0 -1
  120. package/dist/catalyst/p-e6491f33.entry.js +0 -10
  121. package/dist/catalyst/p-e6491f33.entry.js.map +0 -1
  122. package/dist/cjs/cat-alert_15.cjs.entry.js.map +0 -1
  123. package/dist/cjs/index-5d72f0e4.js.map +0 -1
  124. package/dist/esm/cat-alert_15.entry.js.map +0 -1
  125. package/dist/esm/index-fd12be19.js.map +0 -1
@@ -14,6 +14,40 @@ export namespace Components {
14
14
  */
15
15
  "color": 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
16
16
  }
17
+ interface CatAvatar {
18
+ /**
19
+ * An icon to be used instead of the initials.
20
+ */
21
+ "icon"?: string;
22
+ /**
23
+ * Custom initials for the avatar.
24
+ */
25
+ "initials"?: string;
26
+ /**
27
+ * The label of the avatar.
28
+ */
29
+ "label": string;
30
+ /**
31
+ * Use round avatar edges.
32
+ */
33
+ "round": boolean;
34
+ /**
35
+ * The size of the avatar.
36
+ */
37
+ "size": 'xs' | 's' | 'm' | 'l' | 'xl';
38
+ /**
39
+ * An optional avatar image.
40
+ */
41
+ "src"?: string;
42
+ /**
43
+ * A destination to link to, rendered in the href attribute of a link.
44
+ */
45
+ "url"?: string;
46
+ /**
47
+ * Specifies where to open the linked document.
48
+ */
49
+ "urlTarget"?: '_blank' | '_self';
50
+ }
17
51
  interface CatBadge {
18
52
  /**
19
53
  * The color palette of the badge.
@@ -57,10 +91,6 @@ export namespace Components {
57
91
  * Specifies that the button should be disabled. A disabled button is unusable and un-clickable. Corresponds with the native HTML disabled attribute.
58
92
  */
59
93
  "disabled": boolean;
60
- /**
61
- * Ellipse overflowing button content.
62
- */
63
- "ellipsed": boolean;
64
94
  /**
65
95
  * The name of an icon to be displayed in the button.
66
96
  */
@@ -81,6 +111,10 @@ export namespace Components {
81
111
  * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute.
82
112
  */
83
113
  "name"?: string;
114
+ /**
115
+ * Disables ellipse overflowing button content.
116
+ */
117
+ "noEllipsis": boolean;
84
118
  /**
85
119
  * Use round button edges.
86
120
  */
@@ -126,6 +160,10 @@ export namespace Components {
126
160
  * Disabled state of the checkbox
127
161
  */
128
162
  "disabled": boolean;
163
+ /**
164
+ * Optional hint text(s) to be displayed with the checkbox.
165
+ */
166
+ "hint"?: string | string[];
129
167
  /**
130
168
  * Indeterminate state of the checkbox
131
169
  */
@@ -188,9 +226,9 @@ export namespace Components {
188
226
  */
189
227
  "disabled": boolean;
190
228
  /**
191
- * Optional hint text to be displayed with the input.
229
+ * Optional hint text(s) to be displayed with the input.
192
230
  */
193
- "hint"?: string;
231
+ "hint"?: string | string[];
194
232
  /**
195
233
  * The name of an icon to be displayed in the input.
196
234
  */
@@ -280,6 +318,10 @@ export namespace Components {
280
318
  * Whether this radio is disabled.
281
319
  */
282
320
  "disabled": boolean;
321
+ /**
322
+ * Optional hint text(s) to be displayed with the radio.
323
+ */
324
+ "hint"?: string | string[];
283
325
  /**
284
326
  * The label of the radio that is visible.
285
327
  */
@@ -308,33 +350,33 @@ export namespace Components {
308
350
  }
309
351
  interface CatScrollable {
310
352
  /**
311
- * Flags to enable/disable overflowX.
353
+ * Flags to disable/enable overflowX.
312
354
  */
313
- "overflowX": boolean;
355
+ "noOverflowX": boolean;
314
356
  /**
315
- * Flags to enable/disable overflowY.
357
+ * Flags to disable/enable overflowY.
316
358
  */
317
- "overflowY": boolean;
359
+ "noOverflowY": boolean;
318
360
  /**
319
- * Flag to enable/disable overscroll behavior.
361
+ * Flag to disable/enable overscroll behavior.
320
362
  */
321
- "overscroll": boolean;
363
+ "noOverscroll": boolean;
322
364
  /**
323
- * Buffer to be used to calculate the scroll distance.
365
+ * Flag to not fire an initial event after content initialization.
324
366
  */
325
- "scrolledBuffer": number;
367
+ "noScrolledInit": boolean;
326
368
  /**
327
- * Flag to fire an initial event after content initialization.
369
+ * Flags to disable/enable scroll shadowX.
328
370
  */
329
- "scrolledInit": boolean;
371
+ "noShadowX": boolean;
330
372
  /**
331
- * Flags to enable/disable scroll shadowX.
373
+ * Flags to disable/enable scroll shadowY.
332
374
  */
333
- "shadowX": boolean;
375
+ "noShadowY": boolean;
334
376
  /**
335
- * Flags to enable/disable scroll shadowY.
377
+ * Buffer to be used to calculate the scroll distance.
336
378
  */
337
- "shadowY": boolean;
379
+ "scrolledBuffer": number;
338
380
  }
339
381
  interface CatSkeleton {
340
382
  /**
@@ -364,15 +406,55 @@ export namespace Components {
364
406
  */
365
407
  "size": 'xs' | 's' | 'm' | 'l' | 'xl' | 'inline';
366
408
  }
409
+ interface CatTab {
410
+ /**
411
+ * Specifies that the tab should be deactivated.
412
+ */
413
+ "deactivated": boolean;
414
+ /**
415
+ * The name of an icon to be displayed in the tab.
416
+ */
417
+ "icon"?: string;
418
+ /**
419
+ * Hide the actual button content and only display the tab.
420
+ */
421
+ "iconOnly": boolean | Breakpoint;
422
+ /**
423
+ * Display the icon on the right.
424
+ */
425
+ "iconRight": boolean;
426
+ /**
427
+ * The label of the tab.
428
+ */
429
+ "label": string;
430
+ /**
431
+ * A destination to link to, rendered in the href attribute of a link.
432
+ */
433
+ "url"?: string;
434
+ /**
435
+ * Specifies where to open the linked document.
436
+ */
437
+ "urlTarget"?: '_blank' | '_self';
438
+ }
439
+ interface CatTabs {
440
+ /**
441
+ * The ID of the active tab.
442
+ */
443
+ "activeTab": string;
444
+ /**
445
+ * The alignment of the tabs.
446
+ */
447
+ "tabsAlign": 'left' | 'center' | 'right' | 'justify';
448
+ }
367
449
  interface CatTextarea {
368
450
  /**
369
451
  * Whether the textarea is disabled.
370
452
  */
371
453
  "disabled": boolean;
372
454
  /**
373
- * Optional hint text to be displayed with the textarea.
455
+ * Optional hint text(s) to be displayed with the textarea.
374
456
  */
375
- "hint"?: string;
457
+ "hint"?: string | string[];
376
458
  /**
377
459
  * The label for the textarea.
378
460
  */
@@ -430,6 +512,10 @@ export namespace Components {
430
512
  * Disabled state of the toggle.
431
513
  */
432
514
  "disabled": boolean;
515
+ /**
516
+ * Optional hint text(s) to be displayed with the toggle.
517
+ */
518
+ "hint"?: string | string[];
433
519
  /**
434
520
  * The label of the toggle that is visible.
435
521
  */
@@ -490,6 +576,12 @@ declare global {
490
576
  prototype: HTMLCatAlertElement;
491
577
  new (): HTMLCatAlertElement;
492
578
  };
579
+ interface HTMLCatAvatarElement extends Components.CatAvatar, HTMLStencilElement {
580
+ }
581
+ var HTMLCatAvatarElement: {
582
+ prototype: HTMLCatAvatarElement;
583
+ new (): HTMLCatAvatarElement;
584
+ };
493
585
  interface HTMLCatBadgeElement extends Components.CatBadge, HTMLStencilElement {
494
586
  }
495
587
  var HTMLCatBadgeElement: {
@@ -556,6 +648,18 @@ declare global {
556
648
  prototype: HTMLCatSpinnerElement;
557
649
  new (): HTMLCatSpinnerElement;
558
650
  };
651
+ interface HTMLCatTabElement extends Components.CatTab, HTMLStencilElement {
652
+ }
653
+ var HTMLCatTabElement: {
654
+ prototype: HTMLCatTabElement;
655
+ new (): HTMLCatTabElement;
656
+ };
657
+ interface HTMLCatTabsElement extends Components.CatTabs, HTMLStencilElement {
658
+ }
659
+ var HTMLCatTabsElement: {
660
+ prototype: HTMLCatTabsElement;
661
+ new (): HTMLCatTabsElement;
662
+ };
559
663
  interface HTMLCatTextareaElement extends Components.CatTextarea, HTMLStencilElement {
560
664
  }
561
665
  var HTMLCatTextareaElement: {
@@ -582,6 +686,7 @@ declare global {
582
686
  };
583
687
  interface HTMLElementTagNameMap {
584
688
  "cat-alert": HTMLCatAlertElement;
689
+ "cat-avatar": HTMLCatAvatarElement;
585
690
  "cat-badge": HTMLCatBadgeElement;
586
691
  "cat-button": HTMLCatButtonElement;
587
692
  "cat-card": HTMLCatCardElement;
@@ -593,6 +698,8 @@ declare global {
593
698
  "cat-scrollable": HTMLCatScrollableElement;
594
699
  "cat-skeleton": HTMLCatSkeletonElement;
595
700
  "cat-spinner": HTMLCatSpinnerElement;
701
+ "cat-tab": HTMLCatTabElement;
702
+ "cat-tabs": HTMLCatTabsElement;
596
703
  "cat-textarea": HTMLCatTextareaElement;
597
704
  "cat-toast-demo": HTMLCatToastDemoElement;
598
705
  "cat-toggle": HTMLCatToggleElement;
@@ -606,6 +713,40 @@ declare namespace LocalJSX {
606
713
  */
607
714
  "color"?: 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
608
715
  }
716
+ interface CatAvatar {
717
+ /**
718
+ * An icon to be used instead of the initials.
719
+ */
720
+ "icon"?: string;
721
+ /**
722
+ * Custom initials for the avatar.
723
+ */
724
+ "initials"?: string;
725
+ /**
726
+ * The label of the avatar.
727
+ */
728
+ "label"?: string;
729
+ /**
730
+ * Use round avatar edges.
731
+ */
732
+ "round"?: boolean;
733
+ /**
734
+ * The size of the avatar.
735
+ */
736
+ "size"?: 'xs' | 's' | 'm' | 'l' | 'xl';
737
+ /**
738
+ * An optional avatar image.
739
+ */
740
+ "src"?: string;
741
+ /**
742
+ * A destination to link to, rendered in the href attribute of a link.
743
+ */
744
+ "url"?: string;
745
+ /**
746
+ * Specifies where to open the linked document.
747
+ */
748
+ "urlTarget"?: '_blank' | '_self';
749
+ }
609
750
  interface CatBadge {
610
751
  /**
611
752
  * The color palette of the badge.
@@ -649,10 +790,6 @@ declare namespace LocalJSX {
649
790
  * Specifies that the button should be disabled. A disabled button is unusable and un-clickable. Corresponds with the native HTML disabled attribute.
650
791
  */
651
792
  "disabled"?: boolean;
652
- /**
653
- * Ellipse overflowing button content.
654
- */
655
- "ellipsed"?: boolean;
656
793
  /**
657
794
  * The name of an icon to be displayed in the button.
658
795
  */
@@ -673,6 +810,10 @@ declare namespace LocalJSX {
673
810
  * The name of the button, which gets paired with the button's value when submitted as part of a form. Corresponds with the native HTML name attribute.
674
811
  */
675
812
  "name"?: string;
813
+ /**
814
+ * Disables ellipse overflowing button content.
815
+ */
816
+ "noEllipsis"?: boolean;
676
817
  /**
677
818
  * Emitted when the button loses focus.
678
819
  */
@@ -725,6 +866,10 @@ declare namespace LocalJSX {
725
866
  * Disabled state of the checkbox
726
867
  */
727
868
  "disabled"?: boolean;
869
+ /**
870
+ * Optional hint text(s) to be displayed with the checkbox.
871
+ */
872
+ "hint"?: string | string[];
728
873
  /**
729
874
  * Indeterminate state of the checkbox
730
875
  */
@@ -790,9 +935,9 @@ declare namespace LocalJSX {
790
935
  */
791
936
  "disabled"?: boolean;
792
937
  /**
793
- * Optional hint text to be displayed with the input.
938
+ * Optional hint text(s) to be displayed with the input.
794
939
  */
795
- "hint"?: string;
940
+ "hint"?: string | string[];
796
941
  /**
797
942
  * The name of an icon to be displayed in the input.
798
943
  */
@@ -897,6 +1042,10 @@ declare namespace LocalJSX {
897
1042
  * Whether this radio is disabled.
898
1043
  */
899
1044
  "disabled"?: boolean;
1045
+ /**
1046
+ * Optional hint text(s) to be displayed with the radio.
1047
+ */
1048
+ "hint"?: string | string[];
900
1049
  /**
901
1050
  * The label of the radio that is visible.
902
1051
  */
@@ -932,49 +1081,49 @@ declare namespace LocalJSX {
932
1081
  }
933
1082
  interface CatScrollable {
934
1083
  /**
935
- * Emitted when the content is fully scrolled to the bottom.
1084
+ * Flags to disable/enable overflowX.
936
1085
  */
937
- "onScrolledBottom"?: (event: CustomEvent<void>) => void;
1086
+ "noOverflowX"?: boolean;
938
1087
  /**
939
- * Emitted when the content is fully scrolled to the left.
1088
+ * Flags to disable/enable overflowY.
940
1089
  */
941
- "onScrolledLeft"?: (event: CustomEvent<void>) => void;
1090
+ "noOverflowY"?: boolean;
942
1091
  /**
943
- * Emitted when the content is fully scrolled to the right.
1092
+ * Flag to disable/enable overscroll behavior.
944
1093
  */
945
- "onScrolledRight"?: (event: CustomEvent<void>) => void;
1094
+ "noOverscroll"?: boolean;
946
1095
  /**
947
- * Emitted when the content is fully scrolled to the top.
1096
+ * Flag to not fire an initial event after content initialization.
948
1097
  */
949
- "onScrolledTop"?: (event: CustomEvent<void>) => void;
1098
+ "noScrolledInit"?: boolean;
950
1099
  /**
951
- * Flags to enable/disable overflowX.
1100
+ * Flags to disable/enable scroll shadowX.
952
1101
  */
953
- "overflowX"?: boolean;
1102
+ "noShadowX"?: boolean;
954
1103
  /**
955
- * Flags to enable/disable overflowY.
1104
+ * Flags to disable/enable scroll shadowY.
956
1105
  */
957
- "overflowY"?: boolean;
1106
+ "noShadowY"?: boolean;
958
1107
  /**
959
- * Flag to enable/disable overscroll behavior.
1108
+ * Emitted when the content is fully scrolled to the bottom.
960
1109
  */
961
- "overscroll"?: boolean;
1110
+ "onScrolledBottom"?: (event: CustomEvent<void>) => void;
962
1111
  /**
963
- * Buffer to be used to calculate the scroll distance.
1112
+ * Emitted when the content is fully scrolled to the left.
964
1113
  */
965
- "scrolledBuffer"?: number;
1114
+ "onScrolledLeft"?: (event: CustomEvent<void>) => void;
966
1115
  /**
967
- * Flag to fire an initial event after content initialization.
1116
+ * Emitted when the content is fully scrolled to the right.
968
1117
  */
969
- "scrolledInit"?: boolean;
1118
+ "onScrolledRight"?: (event: CustomEvent<void>) => void;
970
1119
  /**
971
- * Flags to enable/disable scroll shadowX.
1120
+ * Emitted when the content is fully scrolled to the top.
972
1121
  */
973
- "shadowX"?: boolean;
1122
+ "onScrolledTop"?: (event: CustomEvent<void>) => void;
974
1123
  /**
975
- * Flags to enable/disable scroll shadowY.
1124
+ * Buffer to be used to calculate the scroll distance.
976
1125
  */
977
- "shadowY"?: boolean;
1126
+ "scrolledBuffer"?: number;
978
1127
  }
979
1128
  interface CatSkeleton {
980
1129
  /**
@@ -1004,15 +1153,59 @@ declare namespace LocalJSX {
1004
1153
  */
1005
1154
  "size"?: 'xs' | 's' | 'm' | 'l' | 'xl' | 'inline';
1006
1155
  }
1156
+ interface CatTab {
1157
+ /**
1158
+ * Specifies that the tab should be deactivated.
1159
+ */
1160
+ "deactivated"?: boolean;
1161
+ /**
1162
+ * The name of an icon to be displayed in the tab.
1163
+ */
1164
+ "icon"?: string;
1165
+ /**
1166
+ * Hide the actual button content and only display the tab.
1167
+ */
1168
+ "iconOnly"?: boolean | Breakpoint;
1169
+ /**
1170
+ * Display the icon on the right.
1171
+ */
1172
+ "iconRight"?: boolean;
1173
+ /**
1174
+ * The label of the tab.
1175
+ */
1176
+ "label"?: string;
1177
+ /**
1178
+ * Emitted when tab is clicked.
1179
+ */
1180
+ "onTabClick"?: (event: CustomEvent<MouseEvent>) => void;
1181
+ /**
1182
+ * A destination to link to, rendered in the href attribute of a link.
1183
+ */
1184
+ "url"?: string;
1185
+ /**
1186
+ * Specifies where to open the linked document.
1187
+ */
1188
+ "urlTarget"?: '_blank' | '_self';
1189
+ }
1190
+ interface CatTabs {
1191
+ /**
1192
+ * The ID of the active tab.
1193
+ */
1194
+ "activeTab"?: string;
1195
+ /**
1196
+ * The alignment of the tabs.
1197
+ */
1198
+ "tabsAlign"?: 'left' | 'center' | 'right' | 'justify';
1199
+ }
1007
1200
  interface CatTextarea {
1008
1201
  /**
1009
1202
  * Whether the textarea is disabled.
1010
1203
  */
1011
1204
  "disabled"?: boolean;
1012
1205
  /**
1013
- * Optional hint text to be displayed with the textarea.
1206
+ * Optional hint text(s) to be displayed with the textarea.
1014
1207
  */
1015
- "hint"?: string;
1208
+ "hint"?: string | string[];
1016
1209
  /**
1017
1210
  * The label for the textarea.
1018
1211
  */
@@ -1077,6 +1270,10 @@ declare namespace LocalJSX {
1077
1270
  * Disabled state of the toggle.
1078
1271
  */
1079
1272
  "disabled"?: boolean;
1273
+ /**
1274
+ * Optional hint text(s) to be displayed with the toggle.
1275
+ */
1276
+ "hint"?: string | string[];
1080
1277
  /**
1081
1278
  * The label of the toggle that is visible.
1082
1279
  */
@@ -1138,6 +1335,7 @@ declare namespace LocalJSX {
1138
1335
  }
1139
1336
  interface IntrinsicElements {
1140
1337
  "cat-alert": CatAlert;
1338
+ "cat-avatar": CatAvatar;
1141
1339
  "cat-badge": CatBadge;
1142
1340
  "cat-button": CatButton;
1143
1341
  "cat-card": CatCard;
@@ -1149,6 +1347,8 @@ declare namespace LocalJSX {
1149
1347
  "cat-scrollable": CatScrollable;
1150
1348
  "cat-skeleton": CatSkeleton;
1151
1349
  "cat-spinner": CatSpinner;
1350
+ "cat-tab": CatTab;
1351
+ "cat-tabs": CatTabs;
1152
1352
  "cat-textarea": CatTextarea;
1153
1353
  "cat-toast-demo": CatToastDemo;
1154
1354
  "cat-toggle": CatToggle;
@@ -1160,6 +1360,7 @@ declare module "@stencil/core" {
1160
1360
  export namespace JSX {
1161
1361
  interface IntrinsicElements {
1162
1362
  "cat-alert": LocalJSX.CatAlert & JSXBase.HTMLAttributes<HTMLCatAlertElement>;
1363
+ "cat-avatar": LocalJSX.CatAvatar & JSXBase.HTMLAttributes<HTMLCatAvatarElement>;
1163
1364
  "cat-badge": LocalJSX.CatBadge & JSXBase.HTMLAttributes<HTMLCatBadgeElement>;
1164
1365
  "cat-button": LocalJSX.CatButton & JSXBase.HTMLAttributes<HTMLCatButtonElement>;
1165
1366
  "cat-card": LocalJSX.CatCard & JSXBase.HTMLAttributes<HTMLCatCardElement>;
@@ -1171,6 +1372,8 @@ declare module "@stencil/core" {
1171
1372
  "cat-scrollable": LocalJSX.CatScrollable & JSXBase.HTMLAttributes<HTMLCatScrollableElement>;
1172
1373
  "cat-skeleton": LocalJSX.CatSkeleton & JSXBase.HTMLAttributes<HTMLCatSkeletonElement>;
1173
1374
  "cat-spinner": LocalJSX.CatSpinner & JSXBase.HTMLAttributes<HTMLCatSpinnerElement>;
1375
+ "cat-tab": LocalJSX.CatTab & JSXBase.HTMLAttributes<HTMLCatTabElement>;
1376
+ "cat-tabs": LocalJSX.CatTabs & JSXBase.HTMLAttributes<HTMLCatTabsElement>;
1174
1377
  "cat-textarea": LocalJSX.CatTextarea & JSXBase.HTMLAttributes<HTMLCatTextareaElement>;
1175
1378
  "cat-toast-demo": LocalJSX.CatToastDemo & JSXBase.HTMLAttributes<HTMLCatToastDemoElement>;
1176
1379
  "cat-toggle": LocalJSX.CatToggle & JSXBase.HTMLAttributes<HTMLCatToggleElement>;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Loads an image and wraps the result in a promise.
3
+ *
4
+ * @param src the image URL
5
+ * @returns a promise
6
+ */
7
+ declare const loadImg: (src: string) => Promise<Event>;
8
+ export default loadImg;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haiilo/catalyst",
3
- "version": "0.5.13",
3
+ "version": "0.7.0",
4
4
  "description": "Catalyst Design System",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@floating-ui/dom": "0.4.1",
46
- "@haiilo/catalyst-tokens": "^0.5.13",
46
+ "@haiilo/catalyst-tokens": "0.7.0",
47
47
  "@stencil/core": "2.15.0",
48
48
  "autosize": "^5.0.1",
49
49
  "focus-trap": "6.8.1",
@@ -1,2 +0,0 @@
1
- import{r as t,c as n,h as e,H as o}from"./p-bfc656ca.js";import{l as i}from"./p-7c06183a.js";var r,a,s="function"==typeof Map?new Map:(r=[],a=[],{has:function(t){return r.indexOf(t)>-1},get:function(t){return a[r.indexOf(t)]},set:function(t,n){-1===r.indexOf(t)&&(r.push(t),a.push(n))},delete:function(t){var n=r.indexOf(t);n>-1&&(r.splice(n,1),a.splice(n,1))}}),l=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(r){l=function(t){var n=document.createEvent("Event");return n.initEvent(t,!0,!1),n}}function u(t){var n=s.get(t);n&&n.destroy()}function h(t){var n=s.get(t);n&&n.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(t){return t}).destroy=function(t){return t},c.update=function(t){return t}):((c=function(t,n){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!s.has(t)){var n,e=null,o=null,i=null,r=function(){t.clientWidth!==o&&c()},a=function(n){window.removeEventListener("resize",r,!1),t.removeEventListener("input",c,!1),t.removeEventListener("keyup",c,!1),t.removeEventListener("autosize:destroy",a,!1),t.removeEventListener("autosize:update",c,!1),Object.keys(n).forEach((function(e){t.style[e]=n[e]})),s.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",a,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",c,!1),window.addEventListener("resize",r,!1),t.addEventListener("input",c,!1),t.addEventListener("autosize:update",c,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",s.set(t,{destroy:a,update:c}),"vertical"===(n=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),e="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(e)&&(e=0),c()}function u(n){var e=t.style.width;t.style.width="0px",t.style.width=e,t.style.overflowY=n}function h(){if(0!==t.scrollHeight){var n=function(t){for(var n=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&n.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return n}(t),i=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+e+"px",o=t.clientWidth,n.forEach((function(t){t.node.scrollTop=t.scrollTop})),i&&(document.documentElement.scrollTop=i)}}function c(){h();var n=Math.round(parseFloat(t.style.height)),e=window.getComputedStyle(t,null),o="content-box"===e.boxSizing?Math.round(parseFloat(e.height)):t.offsetHeight;if(o<n?"hidden"===e.overflowY&&(u("scroll"),h(),o="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==e.overflowY&&(u("hidden"),h(),o="content-box"===e.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),i!==o){i=o;var r=l("autosize:resized");try{t.dispatchEvent(r)}catch(t){}}}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],u),t},c.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],h),t});var d=c;const p=":host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;margin-bottom:1rem}:host([hidden]){display:none}label{align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-optional{margin-left:0.25rem;font-size:0.75rem;line-height:1rem;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}textarea{margin:0;padding:0.625rem 0.75rem;min-height:2.5rem;font:inherit;background:white;border-radius:0.25rem;border:none;box-shadow:0 0 0 1px #d7dbe0;transition:box-shadow 0.13s linear}textarea:disabled{background:#f8f8fb;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135));resize:none}textarea:hover:not(:disabled){box-shadow:0 0 0 2px #d7dbe0}textarea:focus{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}textarea::placeholder{color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.input-hint{font-size:0.875rem;line-height:1rem;margin:0}";let f=0;const m=class{constructor(e){t(this,e);this.catChange=n(this,"catChange",7);this.catFocus=n(this,"catFocus",7);this.catBlur=n(this,"catBlur",7);this.id=`cat-textarea-${f++}`;this.disabled=false;this.label="";this.labelHidden=false;this.name="";this.readonly=false;this.required=false;this.rows=3}componentWillRender(){if(!this.label){i.error("[A11y] Missing ARIA label on textarea",this)}}componentDidLoad(){d(this.textarea)}async setFocus(t){this.textarea.focus(t)}render(){return e(o,null,this.label&&e("label",{htmlFor:this.id,class:{hidden:this.labelHidden}},e("span",{part:"label"},this.label,!this.required&&e("span",{class:"input-optional","aria-hidden":"true"},"(Optional)"))),e("textarea",{ref:t=>this.textarea=t,id:this.id,disabled:this.disabled,maxlength:this.maxLength,minlength:this.minLength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,rows:this.rows,value:this.value,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)}),this.hint&&e("p",{class:"input-hint"},this.hint))}onInput(t){this.catChange.emit(t)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}};m.style=p;export{m as cat_textarea};
2
- //# sourceMappingURL=p-a8629c54.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../node_modules/autosize/dist/autosize.esm.js","src/components/cat-textarea/cat-textarea.scss?tag=cat-textarea&encapsulation=shadow","src/components/cat-textarea/cat-textarea.tsx"],"names":["e","t","n","Map","has","indexOf","get","set","o","push","delete","splice","Event","bubbles","document","createEvent","initEvent","r","destroy","i","update","l","window","getComputedStyle","Array","prototype","forEach","call","length","nodeName","d","clientWidth","c","a","removeEventListener","Object","keys","style","bind","height","resize","overflowY","overflowX","wordWrap","addEventListener","boxSizing","parseFloat","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth","isNaN","u","width","s","scrollHeight","parentNode","Element","scrollTop","node","documentElement","Math","round","offsetHeight","dispatchEvent","catTextareaCss","nextUniqueId","CatTextarea","[object Object]","hostRef","this","id","disabled","label","labelHidden","name","readonly","required","rows","log","error","autosize","textarea","options","focus","h","Host","htmlFor","class","hidden","part","aria-hidden","ref","el","maxlength","maxLength","minlength","minLength","placeholder","value","onInput","onFocus","onBlur","hint","event","catChange","emit","catFocus","catBlur"],"mappings":"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","sourcesContent":["var e,t,n=\"function\"==typeof Map?new Map:(e=[],t=[],{has:function(t){return e.indexOf(t)>-1},get:function(n){return t[e.indexOf(n)]},set:function(n,o){-1===e.indexOf(n)&&(e.push(n),t.push(o))},delete:function(n){var o=e.indexOf(n);o>-1&&(e.splice(o,1),t.splice(o,1))}}),o=function(e){return new Event(e,{bubbles:!0})};try{new Event(\"test\")}catch(e){o=function(e){var t=document.createEvent(\"Event\");return t.initEvent(e,!0,!1),t}}function r(e){var t=n.get(e);t&&t.destroy()}function i(e){var t=n.get(e);t&&t.update()}var l=null;\"undefined\"==typeof window||\"function\"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return function(e){if(e&&e.nodeName&&\"TEXTAREA\"===e.nodeName&&!n.has(e)){var t,r=null,i=null,l=null,d=function(){e.clientWidth!==i&&c()},a=function(t){window.removeEventListener(\"resize\",d,!1),e.removeEventListener(\"input\",c,!1),e.removeEventListener(\"keyup\",c,!1),e.removeEventListener(\"autosize:destroy\",a,!1),e.removeEventListener(\"autosize:update\",c,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),n.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener(\"autosize:destroy\",a,!1),\"onpropertychange\"in e&&\"oninput\"in e&&e.addEventListener(\"keyup\",c,!1),window.addEventListener(\"resize\",d,!1),e.addEventListener(\"input\",c,!1),e.addEventListener(\"autosize:update\",c,!1),e.style.overflowX=\"hidden\",e.style.wordWrap=\"break-word\",n.set(e,{destroy:a,update:c}),\"vertical\"===(t=window.getComputedStyle(e,null)).resize?e.style.resize=\"none\":\"both\"===t.resize&&(e.style.resize=\"horizontal\"),r=\"content-box\"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(r)&&(r=0),c()}function u(t){var n=e.style.width;e.style.width=\"0px\",e.style.width=n,e.style.overflowY=t}function s(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),n=document.documentElement&&document.documentElement.scrollTop;e.style.height=\"\",e.style.height=e.scrollHeight+r+\"px\",i=e.clientWidth,t.forEach(function(e){e.node.scrollTop=e.scrollTop}),n&&(document.documentElement.scrollTop=n)}}function c(){s();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r=\"content-box\"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?\"hidden\"===n.overflowY&&(u(\"scroll\"),s(),r=\"content-box\"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):\"hidden\"!==n.overflowY&&(u(\"hidden\"),s(),r=\"content-box\"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),l!==r){l=r;var i=o(\"autosize:resized\");try{e.dispatchEvent(i)}catch(e){}}}}(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e});var d=l;export default d;\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n @include cat-body('m');\n margin-bottom: $cat-body-margin-bottom;\n}\n\n:host([hidden]) {\n display: none;\n}\n\nlabel {\n align-self: flex-start;\n\n &.hidden {\n @include cat-visually-hidden;\n }\n}\n\n.input-optional {\n margin-left: 0.25rem;\n @include cat-body('xs');\n color: cat-token('color.ui.font.muted');\n}\n\ntextarea {\n margin: 0;\n padding: 0.625rem 0.75rem;\n min-height: cat-size('m');\n font: inherit;\n background: cat-token('color.ui.background.input');\n border-radius: cat-border-radius('m');\n border: none;\n box-shadow: 0 0 0 1px cat-token('color.ui.border.input');\n transition: box-shadow cat-token('time.transition.s') linear;\n\n &:disabled {\n background: cat-token('color.ui.background.inputDisabled');\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n resize: none;\n }\n\n &:hover:not(:disabled) {\n box-shadow: 0 0 0 2px cat-token('color.ui.border.input');\n }\n\n &:focus {\n outline: 2px solid cat-token('color.ui.border.focus');\n }\n\n &::placeholder {\n color: cat-token('color.ui.font.muted');\n }\n}\n\n.input-hint {\n @include cat-body('s');\n margin: 0;\n}\n","import { Component, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';\nimport log from 'loglevel';\nimport autosize from 'autosize';\n\nlet nextUniqueId = 0;\n\n/**\n * Textarea specifies a control that allows user to write text over multiple\n * rows. Used when the expected user input is long. For shorter input, use the\n * input component.\n *\n * @part label - The label content.\n */\n@Component({\n tag: 'cat-textarea',\n styleUrl: 'cat-textarea.scss',\n shadow: true\n})\nexport class CatTextarea {\n private readonly id = `cat-textarea-${nextUniqueId++}`;\n private textarea!: HTMLTextAreaElement;\n\n /**\n * Whether the textarea is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text to be displayed with the textarea.\n */\n @Prop() hint?: string;\n\n /**\n * The label for the textarea.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum length (number of characters) for textual values.\n */\n @Prop() maxLength?: number;\n\n /**\n * A minimum length (number of characters) for textual values.\n */\n @Prop() minLength?: number;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name = '';\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * Specifies the initial number of lines in the textarea.\n */\n @Prop() rows = 3;\n\n /**\n * The initial value of the control.\n */\n @Prop() value?: string | number;\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the textarea received focus.\n */\n @Event() catFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the textarea loses focus.\n */\n @Event() catBlur!: EventEmitter<FocusEvent>;\n\n componentWillRender(): void {\n if (!this.label) {\n log.error('[A11y] Missing ARIA label on textarea', this);\n }\n }\n\n componentDidLoad(): void {\n autosize(this.textarea);\n }\n\n /**\n * Sets focus on the textarea. Use this method instead of `textarea.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async setFocus(options?: FocusOptions): Promise<void> {\n this.textarea.focus(options);\n }\n\n // /**\n // * Clear the input.\n // */\n // @Method()\n // async clear(): Promise<void> {\n // this.inputValue = '';\n // }\n\n render() {\n return (\n <Host>\n {this.label && (\n <label htmlFor={this.id} class={{ hidden: this.labelHidden }}>\n <span part=\"label\">\n {this.label}\n {!this.required && (\n <span class=\"input-optional\" aria-hidden=\"true\">\n (Optional)\n </span>\n )}\n </span>\n </label>\n )}\n <textarea\n ref={el => (this.textarea = el as HTMLTextAreaElement)}\n id={this.id}\n disabled={this.disabled}\n maxlength={this.maxLength}\n minlength={this.minLength}\n name={this.name}\n placeholder={this.placeholder}\n readonly={this.readonly}\n required={this.required}\n rows={this.rows}\n value={this.value}\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n ></textarea>\n {this.hint && <p class=\"input-hint\">{this.hint}</p>}\n </Host>\n );\n }\n\n private onInput(event: Event) {\n // this.inputValue = πthis.input.value;\n this.catChange.emit(event);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- const t="catalyst";let e;let n;let s=false;let l=false;const o=typeof window!=="undefined"?window:{};const c=o.document||{head:{}};const i={t:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)};const f=t=>Promise.resolve(t);const r=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replace==="function"}catch(t){}return false})();const u=(t,e,n,s)=>{if(n){n.map((([n,s,l])=>{const o=t;const c=a(e,l);const f=d(n);i.ael(o,s,c,f);(e.o=e.o||[]).push((()=>i.rel(o,s,c,f)))}))}};const a=(t,e)=>n=>{try{{if(t.t&256){t.i[e](n)}else{(t.u=t.u||[]).push([e,n])}}}catch(t){pt(t)}};const d=t=>(t&2)!==0;const h="{visibility:hidden}.hydrated{visibility:inherit}";const p=(t,e="")=>{{return()=>{}}};const y=(t,e)=>{{return()=>{}}};const m=new WeakMap;const $=(t,e,n)=>{let s=$t.get(t);if(r&&n){s=s||new CSSStyleSheet;s.replace(e)}else{s=e}$t.set(t,s)};const b=(t,e,n,s)=>{let l=g(e);let o=$t.get(l);t=t.nodeType===11?t:c;if(o){if(typeof o==="string"){t=t.head||t;let e=m.get(t);let n;if(!e){m.set(t,e=new Set)}if(!e.has(l)){{{n=c.createElement("style");n.innerHTML=o}t.insertBefore(n,t.querySelector("link"))}if(e){e.add(l)}}}else if(!t.adoptedStyleSheets.includes(o)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,o]}}return l};const w=t=>{const e=t.h;const n=t.p;const s=e.t;const l=p("attachStyles",e.m);const o=b(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);if(s&10){n["s-sc"]=o;n.classList.add(o+"-h")}l()};const g=(t,e)=>"sc-"+t.m;const S={};const j="http://www.w3.org/2000/svg";const O="http://www.w3.org/1999/xhtml";const v=t=>t!=null;const k=t=>{t=typeof t;return t==="object"||t==="function"};const C=(t,e,...n)=>{let s=null;let l=false;let o=false;let c=[];const i=e=>{for(let n=0;n<e.length;n++){s=e[n];if(Array.isArray(s)){i(s)}else if(s!=null&&typeof s!=="boolean"){if(l=typeof t!=="function"&&!k(s)){s=String(s)}if(l&&o){c[c.length-1].$+=s}else{c.push(l?M(null,s):s)}o=l}}};i(n);if(e){{const t=e.className||e.class;if(t){e.class=typeof t!=="object"?t:Object.keys(t).filter((e=>t[e])).join(" ")}}}const f=M(t,null);f.g=e;if(c.length>0){f.S=c}return f};const M=(t,e)=>{const n={t:0,j:t,$:e,O:null,S:null};{n.g=null}return n};const P={};const x=t=>t&&t.j===P;const L=(t,e,n,s,l,c)=>{if(n!==s){let f=ht(t,e);let r=e.toLowerCase();if(e==="class"){const e=t.classList;const l=U(n);const o=U(s);e.remove(...l.filter((t=>t&&!o.includes(t))));e.add(...o.filter((t=>t&&!l.includes(t))))}else if(e==="style"){{for(const e in n){if(!s||s[e]==null){if(e.includes("-")){t.style.removeProperty(e)}else{t.style[e]=""}}}}for(const e in s){if(!n||s[e]!==n[e]){if(e.includes("-")){t.style.setProperty(e,s[e])}else{t.style[e]=s[e]}}}}else if(e==="ref"){if(s){s(t)}}else if(!f&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"){e=e.slice(3)}else if(ht(o,r)){e=r.slice(2)}else{e=r[2]+e.slice(3)}if(n){i.rel(t,e,n,false)}if(s){i.ael(t,e,s,false)}}else{const o=k(s);if((f||o&&s!==null)&&!l){try{if(!t.tagName.includes("-")){let l=s==null?"":s;if(e==="list"){f=false}else if(n==null||t[e]!=l){t[e]=l}}else{t[e]=s}}catch(t){}}if(s==null||s===false){if(s!==false||t.getAttribute(e)===""){{t.removeAttribute(e)}}}else if((!f||c&4||l)&&!o){s=s===true?"":s;{t.setAttribute(e,s)}}}}};const R=/\s/;const U=t=>!t?[]:t.split(R);const W=(t,e,n,s)=>{const l=e.O.nodeType===11&&e.O.host?e.O.host:e.O;const o=t&&t.g||S;const c=e.g||S;{for(s in o){if(!(s in c)){L(l,s,o[s],undefined,n,e.t)}}}for(s in c){L(l,s,o[s],c[s],n,e.t)}};const E=(t,n,l,o)=>{let i=n.S[l];let f=0;let r;let u;if(i.$!==null){r=i.O=c.createTextNode(i.$)}else{if(!s){s=i.j==="svg"}r=i.O=c.createElementNS(s?j:O,i.j);if(s&&i.j==="foreignObject"){s=false}{W(null,i,s)}if(v(e)&&r["s-si"]!==e){r.classList.add(r["s-si"]=e)}if(i.S){for(f=0;f<i.S.length;++f){u=E(t,i,f);if(u){r.appendChild(u)}}}{if(i.j==="svg"){s=false}else if(r.tagName==="foreignObject"){s=true}}}return r};const N=(t,e,s,l,o,c)=>{let i=t;let f;if(i.shadowRoot&&i.tagName===n){i=i.shadowRoot}for(;o<=c;++o){if(l[o]){f=E(null,s,o);if(f){l[o].O=f;i.insertBefore(f,e)}}}};const T=(t,e,n,s,l)=>{for(;e<=n;++e){if(s=t[e]){l=s.O;H(s);l.remove()}}};const A=(t,e,n,s)=>{let l=0;let o=0;let c=e.length-1;let i=e[0];let f=e[c];let r=s.length-1;let u=s[0];let a=s[r];let d;while(l<=c&&o<=r){if(i==null){i=e[++l]}else if(f==null){f=e[--c]}else if(u==null){u=s[++o]}else if(a==null){a=s[--r]}else if(D(i,u)){F(i,u);i=e[++l];u=s[++o]}else if(D(f,a)){F(f,a);f=e[--c];a=s[--r]}else if(D(i,a)){F(i,a);t.insertBefore(i.O,f.O.nextSibling);i=e[++l];a=s[--r]}else if(D(f,u)){F(f,u);t.insertBefore(f.O,i.O);f=e[--c];u=s[++o]}else{{d=E(e&&e[o],n,o);u=s[++o]}if(d){{i.O.parentNode.insertBefore(d,i.O)}}}}if(l>c){N(t,s[r+1]==null?null:s[r+1].O,n,s,o,r)}else if(o>r){T(e,l,c)}};const D=(t,e)=>{if(t.j===e.j){return true}return false};const F=(t,e)=>{const n=e.O=t.O;const l=t.S;const o=e.S;const c=e.j;const i=e.$;if(i===null){{s=c==="svg"?true:c==="foreignObject"?false:s}{if(c==="slot");else{W(t,e,s)}}if(l!==null&&o!==null){A(n,l,e,o)}else if(o!==null){if(t.$!==null){n.textContent=""}N(n,null,e,o,0,o.length-1)}else if(l!==null){T(l,0,l.length-1)}if(s&&c==="svg"){s=false}}else if(t.$!==i){n.data=i}};const H=t=>{{t.g&&t.g.ref&&t.g.ref(null);t.S&&t.S.map(H)}};const q=(t,s)=>{const l=t.p;const o=t.v||M(null,null);const c=x(s)?s:C(null,null,s);n=l.tagName;c.j=null;c.t|=4;t.v=c;c.O=o.O=l.shadowRoot||l;{e=l["s-sc"]}F(o,c)};const I=t=>ut(t).p;const V=(t,e,n)=>{const s=I(t);return{emit:t=>_(s,e,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:t})}};const _=(t,e,n)=>{const s=i.ce(e,n);t.dispatchEvent(s);return s};const z=(t,e)=>{if(e&&!t.k&&e["s-p"]){e["s-p"].push(new Promise((e=>t.k=e)))}};const B=(t,e)=>{{t.t|=16}if(t.t&4){t.t|=512;return}z(t,t.C);const n=()=>G(t,e);return vt(n)};const G=(t,e)=>{const n=p("scheduleUpdate",t.h.m);const s=t.i;let l;if(e){{t.t|=256;if(t.u){t.u.map((([t,e])=>Y(s,t,e)));t.u=null}}{l=Y(s,"componentWillLoad")}}{l=Z(l,(()=>Y(s,"componentWillRender")))}n();return Z(l,(()=>J(t,s,e)))};const J=async(t,e,n)=>{const s=t.p;const l=p("update",t.h.m);const o=s["s-rc"];if(n){w(t)}const c=p("render",t.h.m);{K(t,e)}if(o){o.map((t=>t()));s["s-rc"]=undefined}c();l();{const e=s["s-p"];const n=()=>Q(t);if(e.length===0){n()}else{Promise.all(e).then(n);t.t|=4;e.length=0}}};const K=(t,e,n)=>{try{e=e.render();{t.t&=~16}{t.t|=2}{{{q(t,e)}}}}catch(e){pt(e,t.p)}return null};const Q=t=>{const e=t.h.m;const n=t.p;const s=p("postUpdate",e);const l=t.i;const o=t.C;{Y(l,"componentDidRender")}if(!(t.t&64)){t.t|=64;{tt(n)}{Y(l,"componentDidLoad")}s();{t.M(n);if(!o){X()}}}else{s()}{t.P(n)}{if(t.k){t.k();t.k=undefined}if(t.t&512){Ot((()=>B(t,false)))}t.t&=~(4|512)}};const X=e=>{{tt(c.documentElement)}Ot((()=>_(o,"appload",{detail:{namespace:t}})))};const Y=(t,e,n)=>{if(t&&t[e]){try{return t[e](n)}catch(t){pt(t)}}return undefined};const Z=(t,e)=>t&&t.then?t.then(e):e();const tt=t=>t.classList.add("hydrated");const et=(t,e)=>{if(t!=null&&!k(t)){if(e&4){return t==="false"?false:t===""||!!t}if(e&2){return parseFloat(t)}if(e&1){return String(t)}return t}return t};const nt=(t,e)=>ut(t).L.get(e);const st=(t,e,n,s)=>{const l=ut(t);const o=l.p;const c=l.L.get(e);const i=l.t;const f=l.i;n=et(n,s.R[e][0]);const r=Number.isNaN(c)&&Number.isNaN(n);const u=n!==c&&!r;if((!(i&8)||c===undefined)&&u){l.L.set(e,n);if(f){if(s.U&&i&128){const t=s.U[e];if(t){t.map((t=>{try{f[t](n,c,e)}catch(t){pt(t,o)}}))}}if((i&(2|16))===2){B(l,false)}}}};const lt=(t,e,n)=>{if(e.R){if(t.watchers){e.U=t.watchers}const s=Object.entries(e.R);const l=t.prototype;s.map((([t,[s]])=>{if(s&31||n&2&&s&32){Object.defineProperty(l,t,{get(){return nt(this,t)},set(n){st(this,t,n,e)},configurable:true,enumerable:true})}else if(n&1&&s&64){Object.defineProperty(l,t,{value(...e){const n=ut(this);return n.W.then((()=>n.i[t](...e)))}})}}));if(n&1){const e=new Map;l.attributeChangedCallback=function(t,n,s){i.jmp((()=>{const n=e.get(t);if(this.hasOwnProperty(n)){s=this[n];delete this[n]}else if(l.hasOwnProperty(n)&&typeof this[n]==="number"&&this[n]==s){return}this[n]=s===null&&typeof this[n]==="boolean"?false:s}))};t.observedAttributes=s.filter((([t,e])=>e[0]&15)).map((([t,n])=>{const s=n[1]||t;e.set(s,t);return s}))}}return t};const ot=async(t,e,n,s,l)=>{if((e.t&32)===0){{e.t|=32;l=mt(n);if(l.then){const t=y();l=await l;t()}if(!l.isProxied){{n.U=l.watchers}lt(l,n,2);l.isProxied=true}const t=p("createInstance",n.m);{e.t|=8}try{new l(e)}catch(t){pt(t)}{e.t&=~8}{e.t|=128}t()}if(l.style){let t=l.style;const e=g(n);if(!$t.has(e)){const s=p("registerStyles",n.m);$(e,t,!!(n.t&1));s()}}}const o=e.C;const c=()=>B(e,true);if(o&&o["s-rc"]){o["s-rc"].push(c)}else{c()}};const ct=t=>{if((i.t&1)===0){const e=ut(t);const n=e.h;const s=p("connectedCallback",n.m);if(!(e.t&1)){e.t|=1;{let n=t;while(n=n.parentNode||n.host){if(n["s-p"]){z(e,e.C=n);break}}}if(n.R){Object.entries(n.R).map((([e,[n]])=>{if(n&31&&t.hasOwnProperty(e)){const n=t[e];delete t[e];t[e]=n}}))}{ot(t,e,n)}}else{u(t,e,n.N)}s()}};const it=t=>{if((i.t&1)===0){const e=ut(t);const n=e.i;{if(e.o){e.o.map((t=>t()));e.o=undefined}}{Y(n,"disconnectedCallback")}}};const ft=(t,e={})=>{const n=p();const s=[];const l=e.exclude||[];const f=o.customElements;const r=c.head;const u=r.querySelector("meta[charset]");const a=c.createElement("style");const d=[];let y;let m=true;Object.assign(i,e);i.l=new URL(e.resourcesUrl||"./",c.baseURI).href;t.map((t=>{t[1].map((e=>{const n={t:e[0],m:e[1],R:e[2],N:e[3]};{n.R=e[2]}{n.N=e[3]}{n.U={}}const o=n.m;const c=class extends HTMLElement{constructor(t){super(t);t=this;dt(t,n);if(n.t&1){{{t.attachShadow({mode:"open"})}}}}connectedCallback(){if(y){clearTimeout(y);y=null}if(m){d.push(this)}else{i.jmp((()=>ct(this)))}}disconnectedCallback(){i.jmp((()=>it(this)))}componentOnReady(){return ut(this).T}};n.A=t[0];if(!l.includes(o)&&!f.get(o)){s.push(o);f.define(o,lt(c,n,1))}}))}));{a.innerHTML=s+h;a.setAttribute("data-styles","");r.insertBefore(a,u?u.nextSibling:r.firstChild)}m=false;if(d.length){d.map((t=>t.connectedCallback()))}else{{i.jmp((()=>y=setTimeout(X,30)))}}n()};const rt=new WeakMap;const ut=t=>rt.get(t);const at=(t,e)=>rt.set(e.i=t,e);const dt=(t,e)=>{const n={t:0,p:t,h:e,L:new Map};{n.W=new Promise((t=>n.P=t))}{n.T=new Promise((t=>n.M=t));t["s-p"]=[];t["s-rc"]=[]}u(t,n,e.N);return rt.set(t,n)};const ht=(t,e)=>e in t;const pt=(t,e)=>(0,console.error)(t,e);const yt=new Map;const mt=(t,e,n)=>{const s=t.m.replace(/-/g,"_");const l=t.A;const o=yt.get(l);if(o){return o[s]}return import(`./${l}.entry.js${""}`).then((t=>{{yt.set(l,t)}return t[s]}),pt)};const $t=new Map;const bt=[];const wt=[];const gt=(t,e)=>n=>{t.push(n);if(!l){l=true;if(e&&i.t&4){Ot(jt)}else{i.raf(jt)}}};const St=t=>{for(let e=0;e<t.length;e++){try{t[e](performance.now())}catch(t){pt(t)}}t.length=0};const jt=()=>{St(bt);{St(wt);if(l=bt.length>0){i.raf(jt)}}};const Ot=t=>f().then(t);const vt=gt(wt,true);export{P as H,ft as b,V as c,C as h,f as p,at as r};
2
- //# sourceMappingURL=p-bfc656ca.js.map