@haiilo/catalyst 0.12.0 → 0.14.1

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 (107) 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/index.esm.js +1 -1
  5. package/dist/catalyst/p-153d4fb8.js +3 -0
  6. package/dist/catalyst/p-153d4fb8.js.map +1 -0
  7. package/dist/catalyst/{p-14edfc2b.entry.js → p-57d68cab.entry.js} +5 -5
  8. package/dist/catalyst/p-57d68cab.entry.js.map +1 -0
  9. package/dist/catalyst/p-933b6a7a.js +10 -0
  10. package/dist/catalyst/p-933b6a7a.js.map +1 -0
  11. package/dist/catalyst/scss/core/_toast.scss +22 -12
  12. package/dist/catalyst/scss/utils/_sizing.mixins.scss +0 -4
  13. package/dist/cjs/{cat-alert_21.cjs.entry.js → cat-alert_22.cjs.entry.js} +173 -42
  14. package/dist/cjs/cat-alert_22.cjs.entry.js.map +1 -0
  15. package/dist/cjs/{cat-notification-c2859ed7.js → cat-notification-6a438ad1.js} +374 -58
  16. package/dist/cjs/cat-notification-6a438ad1.js.map +1 -0
  17. package/dist/cjs/catalyst.cjs.js +2 -2
  18. package/dist/cjs/{index-936b777e.js → index-158dcabf.js} +15 -1
  19. package/dist/cjs/index-158dcabf.js.map +1 -0
  20. package/dist/cjs/index.cjs.js +1 -2
  21. package/dist/cjs/index.cjs.js.map +1 -1
  22. package/dist/cjs/loader.cjs.js +2 -2
  23. package/dist/collection/components/cat-alert/cat-alert.css +24 -14
  24. package/dist/collection/components/cat-alert/cat-alert.js +49 -1
  25. package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
  26. package/dist/collection/components/cat-input/cat-input.js +17 -12
  27. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  28. package/dist/collection/components/cat-input/input-type.js +2 -0
  29. package/dist/collection/components/cat-input/input-type.js.map +1 -0
  30. package/dist/collection/components/cat-notification/cat-notification.js +43 -44
  31. package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
  32. package/dist/collection/components/cat-select/cat-select.js +1 -3
  33. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  34. package/dist/collection/components/cat-tab/cat-tab.js +7 -7
  35. package/dist/collection/components/cat-tab/cat-tab.js.map +1 -1
  36. package/dist/collection/components/cat-tabs/cat-tabs.js +19 -2
  37. package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
  38. package/dist/collection/components/cat-toast-demo/cat-toast-demo.js +12 -1
  39. package/dist/collection/components/cat-toast-demo/cat-toast-demo.js.map +1 -1
  40. package/dist/collection/scss/core/_toast.scss +22 -12
  41. package/dist/collection/scss/utils/_sizing.mixins.scss +0 -4
  42. package/dist/components/cat-alert.js +23 -4
  43. package/dist/components/cat-alert.js.map +1 -1
  44. package/dist/components/cat-avatar.js.map +1 -1
  45. package/dist/components/cat-badge.js.map +1 -1
  46. package/dist/components/cat-button2.js.map +1 -1
  47. package/dist/components/cat-icon2.js.map +1 -1
  48. package/dist/components/cat-input.js +3 -3
  49. package/dist/components/cat-input.js.map +1 -1
  50. package/dist/components/cat-radio.js.map +1 -1
  51. package/dist/components/cat-select.js +1 -3
  52. package/dist/components/cat-select.js.map +1 -1
  53. package/dist/components/cat-skeleton.js.map +1 -1
  54. package/dist/components/cat-spinner2.js.map +1 -1
  55. package/dist/components/cat-tab.js +7 -7
  56. package/dist/components/cat-tab.js.map +1 -1
  57. package/dist/components/cat-tabs.js +19 -2
  58. package/dist/components/cat-tabs.js.map +1 -1
  59. package/dist/components/cat-textarea.js.map +1 -1
  60. package/dist/components/cat-toast-demo.js +55 -45
  61. package/dist/components/cat-toast-demo.js.map +1 -1
  62. package/dist/esm/{cat-alert_21.entry.js → cat-alert_22.entry.js} +158 -28
  63. package/dist/esm/cat-alert_22.entry.js.map +1 -0
  64. package/dist/esm/{cat-notification-3da6ddb1.js → cat-notification-5b6a2cd9.js} +360 -47
  65. package/dist/esm/cat-notification-5b6a2cd9.js.map +1 -0
  66. package/dist/esm/catalyst.js +2 -2
  67. package/dist/esm/{index-41ceb7da.js → index-62388101.js} +15 -2
  68. package/dist/esm/index-62388101.js.map +1 -0
  69. package/dist/esm/index.js +1 -2
  70. package/dist/esm/index.js.map +1 -1
  71. package/dist/esm/loader.js +2 -2
  72. package/dist/types/components/cat-alert/cat-alert.d.ts +9 -0
  73. package/dist/types/components/cat-input/cat-input.d.ts +6 -5
  74. package/dist/types/components/cat-input/input-type.d.ts +1 -0
  75. package/dist/types/components/cat-notification/cat-notification.d.ts +9 -4
  76. package/dist/types/components/cat-tabs/cat-tabs.d.ts +5 -1
  77. package/dist/types/components.d.ts +27 -10
  78. package/package.json +4 -4
  79. package/dist/catalyst/p-14edfc2b.entry.js.map +0 -1
  80. package/dist/catalyst/p-2ad6f8d8.js +0 -2
  81. package/dist/catalyst/p-2ad6f8d8.js.map +0 -1
  82. package/dist/catalyst/p-5ba5e33c.entry.js +0 -2
  83. package/dist/catalyst/p-5ba5e33c.entry.js.map +0 -1
  84. package/dist/catalyst/p-659073b5.js +0 -3
  85. package/dist/catalyst/p-659073b5.js.map +0 -1
  86. package/dist/catalyst/p-6fce43dd.js +0 -2
  87. package/dist/catalyst/p-6fce43dd.js.map +0 -1
  88. package/dist/catalyst/p-8121572a.js +0 -10
  89. package/dist/catalyst/p-8121572a.js.map +0 -1
  90. package/dist/cjs/cat-alert_21.cjs.entry.js.map +0 -1
  91. package/dist/cjs/cat-form-hint-25fdfed5.js +0 -22
  92. package/dist/cjs/cat-form-hint-25fdfed5.js.map +0 -1
  93. package/dist/cjs/cat-notification-c2859ed7.js.map +0 -1
  94. package/dist/cjs/cat-textarea.cjs.entry.js +0 -92
  95. package/dist/cjs/cat-textarea.cjs.entry.js.map +0 -1
  96. package/dist/cjs/index-936b777e.js.map +0 -1
  97. package/dist/cjs/loglevel-b5d158ad.js +0 -324
  98. package/dist/cjs/loglevel-b5d158ad.js.map +0 -1
  99. package/dist/esm/cat-alert_21.entry.js.map +0 -1
  100. package/dist/esm/cat-form-hint-790d1e46.js +0 -20
  101. package/dist/esm/cat-form-hint-790d1e46.js.map +0 -1
  102. package/dist/esm/cat-notification-3da6ddb1.js.map +0 -1
  103. package/dist/esm/cat-textarea.entry.js +0 -88
  104. package/dist/esm/cat-textarea.entry.js.map +0 -1
  105. package/dist/esm/index-41ceb7da.js.map +0 -1
  106. package/dist/esm/loglevel-c8b59c3a.js +0 -319
  107. package/dist/esm/loglevel-c8b59c3a.js.map +0 -1
@@ -1,4 +1,5 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
+ import { InputType } from './input-type';
2
3
  /**
3
4
  * Inputs are used to allow users to provide text input when the expected input
4
5
  * is short. As well as plain text, Input supports various types of text,
@@ -49,17 +50,17 @@ export declare class CatInput {
49
50
  */
50
51
  labelHidden: boolean;
51
52
  /**
52
- * A maximum value for numeric values.
53
+ * A maximum value for date, time and numeric values.
53
54
  */
54
- max?: number;
55
+ max?: number | string;
55
56
  /**
56
57
  * A maximum length (number of characters) for textual values.
57
58
  */
58
59
  maxLength?: number;
59
60
  /**
60
- * A minimum value for numeric values.
61
+ * A minimum value for date, time and numeric values.
61
62
  */
62
- min?: number;
63
+ min?: number | string;
63
64
  /**
64
65
  * A minimum length (number of characters) for textual values.
65
66
  */
@@ -95,7 +96,7 @@ export declare class CatInput {
95
96
  /**
96
97
  * Type of form control.
97
98
  */
98
- type: 'text' | 'email' | 'password' | 'tel' | 'url' | 'search' | 'number';
99
+ type: InputType;
99
100
  /**
100
101
  * The value of the control.
101
102
  */
@@ -0,0 +1 @@
1
+ export declare type InputType = 'button' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'month' | 'number' | 'password' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week';
@@ -1,7 +1,9 @@
1
1
  export declare enum TypeIcons {
2
2
  'success' = "check-circle-filled",
3
- 'error' = "sparkle-filled",
4
- 'info' = "sparkle-filled"
3
+ 'error' = "cross-circle-filled",
4
+ 'info' = "danger-filled",
5
+ 'primary' = "star-circle-filled",
6
+ 'secondary' = "info-circle-filled"
5
7
  }
6
8
  export declare const ToastPositions: {
7
9
  [key: string]: {
@@ -29,7 +31,7 @@ export interface ToastOptions {
29
31
  /**
30
32
  * Type of toast
31
33
  */
32
- type: 'success' | 'info' | 'error';
34
+ type: 'success' | 'info' | 'error' | 'primary' | 'secondary';
33
35
  /**
34
36
  * Invoked when the toast is clicked
35
37
  */
@@ -41,11 +43,14 @@ export interface ToastOptions {
41
43
  }
42
44
  declare class CatNotificationService {
43
45
  private static DURATION;
44
- toastHTMLTemplate(title: string, message?: string, options?: Partial<ToastOptions>): HTMLElement;
45
46
  error(title: string, message?: string, options?: Partial<ToastOptions>): void;
46
47
  success(title: string, message?: string, options?: Partial<ToastOptions>): void;
47
48
  info(title: string, message?: string, options?: Partial<ToastOptions>): void;
49
+ primary(title: string, message?: string, options?: Partial<ToastOptions>): void;
50
+ secondary(title: string, message?: string, options?: Partial<ToastOptions>): void;
51
+ private toastHTMLTemplate;
48
52
  private getPosition;
53
+ private extractOptions;
49
54
  }
50
55
  export declare const NotificationsService: CatNotificationService;
51
56
  export {};
@@ -5,9 +5,10 @@
5
5
  * @part tab - The header of the tab.
6
6
  */
7
7
  export declare class CatTabs {
8
- private tabs;
9
8
  private buttons;
9
+ private mutationObserver?;
10
10
  hostElement: HTMLElement;
11
+ tabs: HTMLCatTabElement[];
11
12
  activeTabId?: string;
12
13
  /**
13
14
  * The ID of the active tab.
@@ -19,7 +20,10 @@ export declare class CatTabs {
19
20
  tabsAlign: 'left' | 'center' | 'right' | 'justify';
20
21
  onActiveTabChanged(newActiveTab: string): void;
21
22
  componentWillLoad(): void;
23
+ componentDidLoad(): void;
24
+ disconnectedCallback(): void;
22
25
  onKeydown(event: KeyboardEvent): void;
23
26
  render(): any;
24
27
  private updateButtonsRef;
28
+ private syncTabs;
25
29
  }
@@ -6,6 +6,7 @@
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { Breakpoint } from "./utils/breakpoints";
9
+ import { InputType } from "./components/cat-input/input-type";
9
10
  import { Placement } from "@floating-ui/dom";
10
11
  import { CatSelectItem } from "./components/cat-select/cat-select";
11
12
  export namespace Components {
@@ -14,6 +15,14 @@ export namespace Components {
14
15
  * The color palette of the alert.
15
16
  */
16
17
  "color": 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
18
+ /**
19
+ * The name of an icon to be displayed in the alert.
20
+ */
21
+ "icon"?: string;
22
+ /**
23
+ * Whether the icon of the alert is deactivated.
24
+ */
25
+ "noIcon": boolean;
17
26
  }
18
27
  interface CatAvatar {
19
28
  /**
@@ -251,17 +260,17 @@ export namespace Components {
251
260
  */
252
261
  "labelHidden": boolean;
253
262
  /**
254
- * A maximum value for numeric values.
263
+ * A maximum value for date, time and numeric values.
255
264
  */
256
- "max"?: number;
265
+ "max"?: number | string;
257
266
  /**
258
267
  * A maximum length (number of characters) for textual values.
259
268
  */
260
269
  "maxLength"?: number;
261
270
  /**
262
- * A minimum value for numeric values.
271
+ * A minimum value for date, time and numeric values.
263
272
  */
264
- "min"?: number;
273
+ "min"?: number | string;
265
274
  /**
266
275
  * A minimum length (number of characters) for textual values.
267
276
  */
@@ -302,7 +311,7 @@ export namespace Components {
302
311
  /**
303
312
  * Type of form control.
304
313
  */
305
- "type": 'text' | 'email' | 'password' | 'tel' | 'url' | 'search' | 'number';
314
+ "type": InputType;
306
315
  /**
307
316
  * The value of the control.
308
317
  */
@@ -868,6 +877,14 @@ declare namespace LocalJSX {
868
877
  * The color palette of the alert.
869
878
  */
870
879
  "color"?: 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
880
+ /**
881
+ * The name of an icon to be displayed in the alert.
882
+ */
883
+ "icon"?: string;
884
+ /**
885
+ * Whether the icon of the alert is deactivated.
886
+ */
887
+ "noIcon"?: boolean;
871
888
  }
872
889
  interface CatAvatar {
873
890
  /**
@@ -1115,17 +1132,17 @@ declare namespace LocalJSX {
1115
1132
  */
1116
1133
  "labelHidden"?: boolean;
1117
1134
  /**
1118
- * A maximum value for numeric values.
1135
+ * A maximum value for date, time and numeric values.
1119
1136
  */
1120
- "max"?: number;
1137
+ "max"?: number | string;
1121
1138
  /**
1122
1139
  * A maximum length (number of characters) for textual values.
1123
1140
  */
1124
1141
  "maxLength"?: number;
1125
1142
  /**
1126
- * A minimum value for numeric values.
1143
+ * A minimum value for date, time and numeric values.
1127
1144
  */
1128
- "min"?: number;
1145
+ "min"?: number | string;
1129
1146
  /**
1130
1147
  * A minimum length (number of characters) for textual values.
1131
1148
  */
@@ -1173,7 +1190,7 @@ declare namespace LocalJSX {
1173
1190
  /**
1174
1191
  * Type of form control.
1175
1192
  */
1176
- "type"?: 'text' | 'email' | 'password' | 'tel' | 'url' | 'search' | 'number';
1193
+ "type"?: InputType;
1177
1194
  /**
1178
1195
  * The value of the control.
1179
1196
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haiilo/catalyst",
3
- "version": "0.12.0",
3
+ "version": "0.14.1",
4
4
  "description": "Catalyst Design System",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,12 +38,12 @@
38
38
  "reset": "rm -rf ./dist ./loader ./www ./node_modules"
39
39
  },
40
40
  "peerDependencies": {
41
- "@haiilo/catalyst-icons": ">=0.3.1",
41
+ "@haiilo/catalyst-icons": ">=0.3.9",
42
42
  "rxjs": "^7.5.5"
43
43
  },
44
44
  "dependencies": {
45
45
  "@floating-ui/dom": "0.4.1",
46
- "@haiilo/catalyst-tokens": "0.12.0",
46
+ "@haiilo/catalyst-tokens": "0.14.1",
47
47
  "@stencil/core": "2.17.0",
48
48
  "autosize": "5.0.1",
49
49
  "choices.js": "10.1.0",
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@babel/core": "^7.16.5",
58
- "@haiilo/catalyst-icons": "^0.3.1",
58
+ "@haiilo/catalyst-icons": "^0.3.9",
59
59
  "@stencil/angular-output-target": "^0.4.0",
60
60
  "@stencil/react-output-target": "^0.3.1",
61
61
  "@stencil/sass": "^1.5.2",