@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
@@ -4,6 +4,8 @@ import { EventEmitter } from '../../stencil-public-runtime';
4
4
  * is short. As well as plain text, Input supports various types of text,
5
5
  * including passwords and numbers.
6
6
  *
7
+ * @slot hint - Optional hint element to be displayed with the input.
8
+ * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.
7
9
  * @part label - The label content.
8
10
  * @part prefix - The text prefix.
9
11
  * @part suffix - The text suffix.
@@ -12,7 +14,8 @@ export declare class CatInput {
12
14
  private readonly i18n;
13
15
  private readonly id;
14
16
  private input;
15
- private inputValue;
17
+ hostElement: HTMLElement;
18
+ hasSlottedLabel: boolean;
16
19
  /**
17
20
  * Hint for form autofill feature.
18
21
  */
@@ -26,9 +29,9 @@ export declare class CatInput {
26
29
  */
27
30
  disabled: boolean;
28
31
  /**
29
- * Optional hint text to be displayed with the input.
32
+ * Optional hint text(s) to be displayed with the input.
30
33
  */
31
- hint?: string;
34
+ hint?: string | string[];
32
35
  /**
33
36
  * The name of an icon to be displayed in the input.
34
37
  */
@@ -109,8 +112,6 @@ export declare class CatInput {
109
112
  * Emitted when the input loses focus.
110
113
  */
111
114
  catBlur: EventEmitter<FocusEvent>;
112
- onValueChange(value?: string | number): void;
113
- componentWillLoad(): void;
114
115
  componentWillRender(): void;
115
116
  /**
116
117
  * Sets focus on the input. Use this method instead of `input.focus()`.
@@ -124,6 +125,7 @@ export declare class CatInput {
124
125
  */
125
126
  clear(): Promise<void>;
126
127
  render(): any;
128
+ private get hintSection();
127
129
  private onInput;
128
130
  private onFocus;
129
131
  private onBlur;
@@ -3,11 +3,15 @@ import { EventEmitter } from '../../stencil-public-runtime';
3
3
  * Radio Buttons are graphical interface elements that allow user to choose
4
4
  * only one of a predefined set of mutually exclusive options.
5
5
  *
6
+ * @slot hint - Optional hint element to be displayed with the radio.
7
+ * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.
6
8
  * @part label - The label content.
7
9
  */
8
10
  export declare class CatRadio {
9
11
  private readonly id;
10
12
  private input;
13
+ hostElement: HTMLElement;
14
+ hasSlottedLabel: boolean;
11
15
  /**
12
16
  * Whether this radio is checked.
13
17
  */
@@ -36,6 +40,10 @@ export declare class CatRadio {
36
40
  * The value of the radio component.
37
41
  */
38
42
  value?: string;
43
+ /**
44
+ * Optional hint text(s) to be displayed with the radio.
45
+ */
46
+ hint?: string | string[];
39
47
  /**
40
48
  * Emitted when the radio is changed.
41
49
  */
@@ -57,6 +65,7 @@ export declare class CatRadio {
57
65
  */
58
66
  setFocus(options?: FocusOptions): Promise<void>;
59
67
  render(): any;
68
+ private get hintSection();
60
69
  private onChange;
61
70
  private onFocus;
62
71
  private onBlur;
@@ -8,20 +8,20 @@ export declare class CatScrollable {
8
8
  private readonly init;
9
9
  private readonly destroyed;
10
10
  private scrolled;
11
- /** Flags to enable/disable scroll shadowX. */
12
- shadowX: boolean;
13
- /** Flags to enable/disable scroll shadowY. */
14
- shadowY: boolean;
15
- /** Flags to enable/disable overflowX. */
16
- overflowX: boolean;
17
- /** Flags to enable/disable overflowY. */
18
- overflowY: boolean;
19
- /** Flag to enable/disable overscroll behavior. */
20
- overscroll: boolean;
11
+ /** Flags to disable/enable scroll shadowX. */
12
+ noShadowX: boolean;
13
+ /** Flags to disable/enable scroll shadowY. */
14
+ noShadowY: boolean;
15
+ /** Flags to disable/enable overflowX. */
16
+ noOverflowX: boolean;
17
+ /** Flags to disable/enable overflowY. */
18
+ noOverflowY: boolean;
19
+ /** Flag to disable/enable overscroll behavior. */
20
+ noOverscroll: boolean;
21
21
  /**
22
- * Flag to fire an initial event after content initialization.
22
+ * Flag to not fire an initial event after content initialization.
23
23
  */
24
- scrolledInit: boolean;
24
+ noScrolledInit: boolean;
25
25
  /**
26
26
  * Buffer to be used to calculate the scroll distance.
27
27
  */
@@ -0,0 +1,43 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { Breakpoint } from '../../utils/breakpoints';
3
+ /**
4
+ * A single tab inside a tabs component.
5
+ */
6
+ export declare class CatTab {
7
+ hostElement: HTMLElement;
8
+ /**
9
+ * The label of the tab.
10
+ */
11
+ label: string;
12
+ /**
13
+ * The name of an icon to be displayed in the tab.
14
+ */
15
+ icon?: string;
16
+ /**
17
+ * Hide the actual button content and only display the tab.
18
+ */
19
+ iconOnly: boolean | Breakpoint;
20
+ /**
21
+ * Display the icon on the right.
22
+ */
23
+ iconRight: boolean;
24
+ /**
25
+ * A destination to link to, rendered in the href attribute of a link.
26
+ */
27
+ url?: string;
28
+ /**
29
+ * Specifies where to open the linked document.
30
+ */
31
+ urlTarget?: '_blank' | '_self';
32
+ /**
33
+ * Specifies that the tab should be deactivated.
34
+ */
35
+ deactivated: boolean;
36
+ /**
37
+ * Emitted when tab is clicked.
38
+ */
39
+ tabClick: EventEmitter<MouseEvent>;
40
+ connectedCallback(): void;
41
+ onClick(event: MouseEvent): void;
42
+ render(): any;
43
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Tabs are used to display multiple panels to be contained within a single
3
+ * window, using tabs as a navigational element.
4
+ *
5
+ * @part tab - The header of the tab.
6
+ */
7
+ export declare class CatTabs {
8
+ private tabs;
9
+ private buttons;
10
+ hostElement: HTMLElement;
11
+ activeTabId?: string;
12
+ /**
13
+ * The ID of the active tab.
14
+ */
15
+ activeTab: string;
16
+ /**
17
+ * The alignment of the tabs.
18
+ */
19
+ tabsAlign: 'left' | 'center' | 'right' | 'justify';
20
+ onActiveTabChanged(newActiveTab: string): void;
21
+ componentWillLoad(): void;
22
+ onKeydown(event: KeyboardEvent): void;
23
+ render(): any;
24
+ private updateButtonsRef;
25
+ }
@@ -4,19 +4,23 @@ import { EventEmitter } from '../../stencil-public-runtime';
4
4
  * rows. Used when the expected user input is long. For shorter input, use the
5
5
  * input component.
6
6
  *
7
+ * @slot hint - Optional hint element to be displayed with the textarea.
8
+ * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.
7
9
  * @part label - The label content.
8
10
  */
9
11
  export declare class CatTextarea {
10
12
  private readonly id;
11
13
  private textarea;
14
+ hostElement: HTMLElement;
15
+ hasSlottedLabel: boolean;
12
16
  /**
13
17
  * Whether the textarea is disabled.
14
18
  */
15
19
  disabled: boolean;
16
20
  /**
17
- * Optional hint text to be displayed with the textarea.
21
+ * Optional hint text(s) to be displayed with the textarea.
18
22
  */
19
- hint?: string;
23
+ hint?: string | string[];
20
24
  /**
21
25
  * The label for the textarea.
22
26
  */
@@ -79,6 +83,7 @@ export declare class CatTextarea {
79
83
  */
80
84
  setFocus(options?: FocusOptions): Promise<void>;
81
85
  render(): any;
86
+ private get hintSection();
82
87
  private onInput;
83
88
  private onFocus;
84
89
  private onBlur;
@@ -3,12 +3,16 @@ import { EventEmitter } from '../../stencil-public-runtime';
3
3
  * Toggles are graphical interface switches that give user control over a
4
4
  * feature or option that can be turned on or off.
5
5
  *
6
+ * @slot hint - Optional hint element to be displayed with the toggle.
7
+ * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.
6
8
  * @part toggle - The toggle element.
7
9
  * @part label - The label content.
8
10
  */
9
11
  export declare class CatToggle {
10
12
  private readonly id;
11
13
  private input;
14
+ hostElement: HTMLElement;
15
+ hasSlottedLabel: boolean;
12
16
  /**
13
17
  * Checked state of the toggle.
14
18
  */
@@ -37,6 +41,10 @@ export declare class CatToggle {
37
41
  * The value of the toggle
38
42
  */
39
43
  value?: string;
44
+ /**
45
+ * Optional hint text(s) to be displayed with the toggle.
46
+ */
47
+ hint?: string | string[];
40
48
  /**
41
49
  * Emitted when the checked status of the toggle is changed.
42
50
  */
@@ -58,6 +66,7 @@ export declare class CatToggle {
58
66
  */
59
67
  setFocus(options?: FocusOptions): Promise<void>;
60
68
  render(): any;
69
+ private get hintSection();
61
70
  private onInput;
62
71
  private onFocus;
63
72
  private onBlur;
@@ -43,4 +43,5 @@ export declare class CatTooltip {
43
43
  private hideListener;
44
44
  private touchStartListener;
45
45
  private touchEndListener;
46
+ private windowTouchStartListener;
46
47
  }