@haiilo/catalyst 2.0.3 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/catalyst/catalyst.esm.js +1 -1
  2. package/dist/catalyst/catalyst.esm.js.map +1 -1
  3. package/dist/catalyst/p-50031766.entry.js +2 -0
  4. package/dist/catalyst/p-50031766.entry.js.map +1 -0
  5. package/dist/catalyst/p-53a1db22.js +3 -0
  6. package/dist/catalyst/p-53a1db22.js.map +1 -0
  7. package/dist/catalyst/p-5bfc70e3.entry.js +2 -0
  8. package/dist/catalyst/{p-270fd91d.entry.js.map → p-5bfc70e3.entry.js.map} +1 -1
  9. package/dist/cjs/cat-alert_22.cjs.entry.js +99 -15
  10. package/dist/cjs/cat-alert_22.cjs.entry.js.map +1 -1
  11. package/dist/cjs/cat-modal.cjs.entry.js +2 -2
  12. package/dist/cjs/cat-modal.cjs.entry.js.map +1 -1
  13. package/dist/cjs/catalyst.cjs.js +2 -2
  14. package/dist/cjs/{index-b2134f1b.js → index-e540e911.js} +1 -4
  15. package/dist/cjs/index-e540e911.js.map +1 -0
  16. package/dist/cjs/loader.cjs.js +2 -2
  17. package/dist/collection/components/cat-button/cat-button.js +50 -4
  18. package/dist/collection/components/cat-button/cat-button.js.map +1 -1
  19. package/dist/collection/components/cat-checkbox/cat-checkbox.js +50 -4
  20. package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
  21. package/dist/collection/components/cat-input/cat-input.js +50 -4
  22. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  23. package/dist/collection/components/cat-radio/cat-radio.js +50 -4
  24. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
  25. package/dist/collection/components/cat-radio-group/cat-radio-group.js +1 -1
  26. package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
  27. package/dist/collection/components/cat-tabs/cat-tabs.js +1 -1
  28. package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
  29. package/dist/collection/components/cat-textarea/cat-textarea.js +50 -4
  30. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  31. package/dist/collection/components/cat-toggle/cat-toggle.js +50 -4
  32. package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
  33. package/dist/components/cat-button2.js +19 -3
  34. package/dist/components/cat-button2.js.map +1 -1
  35. package/dist/components/cat-checkbox2.js +19 -3
  36. package/dist/components/cat-checkbox2.js.map +1 -1
  37. package/dist/components/cat-input.js +19 -3
  38. package/dist/components/cat-input.js.map +1 -1
  39. package/dist/components/cat-radio-group.js +1 -1
  40. package/dist/components/cat-radio-group.js.map +1 -1
  41. package/dist/components/cat-radio.js +19 -3
  42. package/dist/components/cat-radio.js.map +1 -1
  43. package/dist/components/cat-tabs.js +1 -1
  44. package/dist/components/cat-tabs.js.map +1 -1
  45. package/dist/components/cat-textarea.js +19 -3
  46. package/dist/components/cat-textarea.js.map +1 -1
  47. package/dist/components/cat-toggle.js +19 -3
  48. package/dist/components/cat-toggle.js.map +1 -1
  49. package/dist/esm/cat-alert_22.entry.js +99 -15
  50. package/dist/esm/cat-alert_22.entry.js.map +1 -1
  51. package/dist/esm/cat-modal.entry.js +2 -2
  52. package/dist/esm/cat-modal.entry.js.map +1 -1
  53. package/dist/esm/catalyst.js +2 -2
  54. package/dist/esm/{index-033048ed.js → index-c2a28ebb.js} +2 -4
  55. package/dist/esm/index-c2a28ebb.js.map +1 -0
  56. package/dist/esm/loader.js +2 -2
  57. package/dist/types/components/cat-button/cat-button.d.ts +12 -2
  58. package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +12 -2
  59. package/dist/types/components/cat-input/cat-input.d.ts +12 -2
  60. package/dist/types/components/cat-radio/cat-radio.d.ts +12 -2
  61. package/dist/types/components/cat-textarea/cat-textarea.d.ts +12 -2
  62. package/dist/types/components/cat-toggle/cat-toggle.d.ts +12 -2
  63. package/dist/types/components.d.ts +78 -30
  64. package/package.json +2 -2
  65. package/dist/catalyst/p-270fd91d.entry.js +0 -2
  66. package/dist/catalyst/p-3a489c97.entry.js +0 -2
  67. package/dist/catalyst/p-3a489c97.entry.js.map +0 -1
  68. package/dist/catalyst/p-692e49d6.js +0 -3
  69. package/dist/catalyst/p-692e49d6.js.map +0 -1
  70. package/dist/cjs/index-b2134f1b.js.map +0 -1
  71. package/dist/esm/index-033048ed.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-033048ed.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-c2a28ebb.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Esm v2.17.4 | MIT Licensed | https://stenciljs.com
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["cat-alert_22",[[1,"cat-select-demo"],[1,"cat-input",{"autoComplete":[1,"auto-complete"],"clearable":[4],"disabled":[4],"hint":[1],"icon":[1],"iconRight":[4,"icon-right"],"label":[1],"labelHidden":[4,"label-hidden"],"max":[8],"maxLength":[2,"max-length"],"min":[8],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"textPrefix":[1,"text-prefix"],"textSuffix":[1,"text-suffix"],"readonly":[4],"required":[4],"round":[4],"type":[1],"value":[1032],"hasSlottedLabel":[32],"setFocus":[64],"clear":[64]}],[1,"cat-pagination",{"page":[1026],"pageCount":[2,"page-count"],"activePadding":[2,"active-padding"],"sidePadding":[2,"side-padding"],"size":[1],"variant":[1],"round":[4],"compact":[4],"iconPrev":[1,"icon-prev"],"iconNext":[1,"icon-next"]}],[1,"cat-tabs",{"activeTab":[1,"active-tab"],"tabsAlign":[1,"tabs-align"],"tabs":[32],"activeTabId":[32]},[[0,"keydown","onKeydown"]]],[1,"cat-alert",{"color":[1],"icon":[1],"noIcon":[4,"no-icon"]}],[1,"cat-badge",{"variant":[1],"color":[1],"size":[1],"round":[4],"pulse":[4]}],[1,"cat-card"],[1,"cat-radio",{"checked":[1028],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-radio-group",{"name":[1],"value":[1025],"disabled":[4],"a11yLabel":[1,"a11y-label"],"labelLeft":[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"blur","onBlur"]]],[1,"cat-tab",{"label":[513],"icon":[513],"iconOnly":[520,"icon-only"],"iconRight":[516,"icon-right"],"url":[513],"urlTarget":[513,"url-target"],"deactivated":[516]},[[0,"click","onClick"]]],[1,"cat-textarea",{"disabled":[4],"hint":[1],"label":[1],"labelHidden":[4,"label-hidden"],"maxLength":[2,"max-length"],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"rows":[2],"value":[1032],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-toggle",{"checked":[1028],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1032],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-tooltip",{"content":[1],"disabled":[4],"placement":[1],"round":[4],"size":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"longTouchDuration":[2,"long-touch-duration"]},[[0,"keydown","handleKeyDown"]]],[1,"cat-select",{"multiple":[4],"debounce":[2],"placement":[1],"value":[1025],"disabled":[4],"placeholder":[1],"hint":[1],"label":[1],"name":[1],"labelHidden":[4,"label-hidden"],"required":[4],"clearable":[4],"tags":[4],"tagHint":[1,"tag-hint"],"connector":[32],"state":[32],"hasSlottedLabel":[32],"connect":[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]]],[1,"cat-dropdown",{"placement":[1],"noAutoClose":[4,"no-auto-close"],"overflow":[4],"close":[64]},[[0,"catClick","clickHandler"]]],[1,"cat-avatar",{"size":[1],"round":[4],"label":[1],"initials":[1],"src":[1],"icon":[1],"url":[1],"urlTarget":[1,"url-target"],"backgroundImage":[32]}],[1,"cat-checkbox",{"checked":[1028],"disabled":[4],"indeterminate":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1032],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-scrollable",{"noShadowX":[4,"no-shadow-x"],"noShadowY":[4,"no-shadow-y"],"noOverflowX":[4,"no-overflow-x"],"noOverflowY":[4,"no-overflow-y"],"noOverscroll":[4,"no-overscroll"],"noScrolledInit":[4,"no-scrolled-init"],"scrolledBuffer":[2,"scrolled-buffer"]}],[1,"cat-skeleton",{"effect":[1],"variant":[1],"size":[1],"lines":[2]}],[1,"cat-button",{"variant":[1],"color":[1],"active":[4],"size":[1],"name":[1],"value":[1],"disabled":[4],"loading":[4],"submit":[4],"noEllipsis":[4,"no-ellipsis"],"round":[4],"url":[1],"urlTarget":[1,"url-target"],"icon":[1],"iconOnly":[8,"icon-only"],"iconRight":[4,"icon-right"],"buttonId":[1,"button-id"],"a11yLabel":[1,"a11y-label"],"a11yCurrent":[1,"a11y-current"],"_iconOnly":[32],"setFocus":[64]},[[0,"click","haltDisabledEvents"]]],[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}],[1,"cat-icon",{"icon":[1],"size":[1],"a11yLabel":[1,"a11y-label"]}]]],["cat-modal",[[1,"cat-modal",{"size":[1],"isVisible":[32],"show":[64]}]]]], options);
13
+ return bootstrapLazy([["cat-alert_22",[[1,"cat-select-demo"],[1,"cat-input",{"autoComplete":[1,"auto-complete"],"clearable":[4],"disabled":[4],"hint":[1],"icon":[1],"iconRight":[4,"icon-right"],"label":[1],"labelHidden":[4,"label-hidden"],"max":[8],"maxLength":[2,"max-length"],"min":[8],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"textPrefix":[1,"text-prefix"],"textSuffix":[1,"text-suffix"],"readonly":[4],"required":[4],"round":[4],"type":[1],"value":[1032],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64],"clear":[64]}],[1,"cat-pagination",{"page":[1026],"pageCount":[2,"page-count"],"activePadding":[2,"active-padding"],"sidePadding":[2,"side-padding"],"size":[1],"variant":[1],"round":[4],"compact":[4],"iconPrev":[1,"icon-prev"],"iconNext":[1,"icon-next"]}],[1,"cat-tabs",{"activeTab":[1,"active-tab"],"tabsAlign":[1,"tabs-align"],"tabs":[32],"activeTabId":[32]},[[0,"keydown","onKeydown"]]],[1,"cat-alert",{"color":[1],"icon":[1],"noIcon":[4,"no-icon"]}],[1,"cat-badge",{"variant":[1],"color":[1],"size":[1],"round":[4],"pulse":[4]}],[1,"cat-card"],[1,"cat-radio",{"checked":[1028],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]}],[1,"cat-radio-group",{"name":[1],"value":[1025],"disabled":[4],"a11yLabel":[1,"a11y-label"],"labelLeft":[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"blur","onBlur"]]],[1,"cat-tab",{"label":[513],"icon":[513],"iconOnly":[520,"icon-only"],"iconRight":[516,"icon-right"],"url":[513],"urlTarget":[513,"url-target"],"deactivated":[516]},[[0,"click","onClick"]]],[1,"cat-textarea",{"disabled":[4],"hint":[1],"label":[1],"labelHidden":[4,"label-hidden"],"maxLength":[2,"max-length"],"minLength":[2,"min-length"],"name":[1],"placeholder":[1],"readonly":[4],"required":[4],"rows":[2],"value":[1032],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]}],[1,"cat-toggle",{"checked":[1028],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1032],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]}],[1,"cat-tooltip",{"content":[1],"disabled":[4],"placement":[1],"round":[4],"size":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"longTouchDuration":[2,"long-touch-duration"]},[[0,"keydown","handleKeyDown"]]],[1,"cat-select",{"multiple":[4],"debounce":[2],"placement":[1],"value":[1025],"disabled":[4],"placeholder":[1],"hint":[1],"label":[1],"name":[1],"labelHidden":[4,"label-hidden"],"required":[4],"clearable":[4],"tags":[4],"tagHint":[1,"tag-hint"],"connector":[32],"state":[32],"hasSlottedLabel":[32],"connect":[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]]],[1,"cat-dropdown",{"placement":[1],"noAutoClose":[4,"no-auto-close"],"overflow":[4],"close":[64]},[[0,"catClick","clickHandler"]]],[1,"cat-avatar",{"size":[1],"round":[4],"label":[1],"initials":[1],"src":[1],"icon":[1],"url":[1],"urlTarget":[1,"url-target"],"backgroundImage":[32]}],[1,"cat-checkbox",{"checked":[1028],"disabled":[4],"indeterminate":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1032],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]}],[1,"cat-scrollable",{"noShadowX":[4,"no-shadow-x"],"noShadowY":[4,"no-shadow-y"],"noOverflowX":[4,"no-overflow-x"],"noOverflowY":[4,"no-overflow-y"],"noOverscroll":[4,"no-overscroll"],"noScrolledInit":[4,"no-scrolled-init"],"scrolledBuffer":[2,"scrolled-buffer"]}],[1,"cat-skeleton",{"effect":[1],"variant":[1],"size":[1],"lines":[2]}],[1,"cat-button",{"variant":[1],"color":[1],"active":[4],"size":[1],"name":[1],"value":[1],"disabled":[4],"loading":[4],"submit":[4],"noEllipsis":[4,"no-ellipsis"],"round":[4],"url":[1],"urlTarget":[1,"url-target"],"icon":[1],"iconOnly":[8,"icon-only"],"iconRight":[4,"icon-right"],"buttonId":[1,"button-id"],"a11yLabel":[1,"a11y-label"],"a11yCurrent":[1,"a11y-current"],"_iconOnly":[32],"doFocus":[64],"doBlur":[64],"doClick":[64]},[[0,"click","haltDisabledEvents"]]],[1,"cat-spinner",{"size":[1],"a11yLabel":[1,"a11y-label"]}],[1,"cat-icon",{"icon":[1],"size":[1],"a11yLabel":[1,"a11y-label"]}]]],["cat-modal",[[1,"cat-modal",{"size":[1],"isVisible":[32],"show":[64]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -119,12 +119,22 @@ export declare class CatButton {
119
119
  componentWillRender(): void;
120
120
  haltDisabledEvents(event: Event): void;
121
121
  /**
122
- * Sets focus on the button. Use this method instead of `button.focus()`.
122
+ * Programmatically move focus to the button. Use this method instead of
123
+ * `button.focus()`.
123
124
  *
124
125
  * @param options An optional object providing options to control aspects of
125
126
  * the focusing process.
126
127
  */
127
- setFocus(options?: FocusOptions): Promise<void>;
128
+ doFocus(options?: FocusOptions): Promise<void>;
129
+ /**
130
+ * Programmatically remove focus from the button. Use this method instead of
131
+ * `button.blur()`.
132
+ */
133
+ doBlur(): Promise<void>;
134
+ /**
135
+ * Programmatically simulate a click on the button.
136
+ */
137
+ doClick(): Promise<void>;
128
138
  render(): any;
129
139
  private get iconSize();
130
140
  private get spinnerSize();
@@ -68,12 +68,22 @@ export declare class CatCheckbox {
68
68
  componentDidLoad(): void;
69
69
  componentWillRender(): void;
70
70
  /**
71
- * Sets focus on the checkbox. Use this method instead of `checkbox.focus()`.
71
+ * Programmatically move focus to the checkbox. Use this method instead of
72
+ * `input.focus()`.
72
73
  *
73
74
  * @param options An optional object providing options to control aspects of
74
75
  * the focusing process.
75
76
  */
76
- setFocus(options?: FocusOptions): Promise<void>;
77
+ doFocus(options?: FocusOptions): Promise<void>;
78
+ /**
79
+ * Programmatically remove focus from the checkbox. Use this method instead of
80
+ * `input.blur()`.
81
+ */
82
+ doBlur(): Promise<void>;
83
+ /**
84
+ * Programmatically simulate a click on the checkbox.
85
+ */
86
+ doClick(): Promise<void>;
77
87
  render(): any;
78
88
  private get hintSection();
79
89
  private onInput;
@@ -114,12 +114,22 @@ export declare class CatInput {
114
114
  catBlur: EventEmitter<FocusEvent>;
115
115
  componentWillRender(): void;
116
116
  /**
117
- * Sets focus on the input. Use this method instead of `input.focus()`.
117
+ * Programmatically move focus to the input. Use this method instead of
118
+ * `input.focus()`.
118
119
  *
119
120
  * @param options An optional object providing options to control aspects of
120
121
  * the focusing process.
121
122
  */
122
- setFocus(options?: FocusOptions): Promise<void>;
123
+ doFocus(options?: FocusOptions): Promise<void>;
124
+ /**
125
+ * Programmatically remove focus from the input. Use this method instead of
126
+ * `input.blur()`.
127
+ */
128
+ doBlur(): Promise<void>;
129
+ /**
130
+ * Programmatically simulate a click on the input.
131
+ */
132
+ doClick(): Promise<void>;
123
133
  /**
124
134
  * Clear the input.
125
135
  */
@@ -62,12 +62,22 @@ export declare class CatRadio {
62
62
  catBlur: EventEmitter<FocusEvent>;
63
63
  componentWillRender(): void;
64
64
  /**
65
- * Sets focus on the radio. Use this method instead of `radio.focus()`.
65
+ * Programmatically move focus to the radio button. Use this method instead of
66
+ * `input.focus()`.
66
67
  *
67
68
  * @param options An optional object providing options to control aspects of
68
69
  * the focusing process.
69
70
  */
70
- setFocus(options?: FocusOptions): Promise<void>;
71
+ doFocus(options?: FocusOptions): Promise<void>;
72
+ /**
73
+ * Programmatically remove focus from the radio button. Use this method
74
+ * instead of `input.blur()`.
75
+ */
76
+ doBlur(): Promise<void>;
77
+ /**
78
+ * Programmatically simulate a click on the radio button.
79
+ */
80
+ doClick(): Promise<void>;
71
81
  render(): any;
72
82
  private get hintSection();
73
83
  private onChange;
@@ -76,12 +76,22 @@ export declare class CatTextarea {
76
76
  componentWillRender(): void;
77
77
  componentDidLoad(): void;
78
78
  /**
79
- * Sets focus on the textarea. Use this method instead of `textarea.focus()`.
79
+ * Programmatically move focus to the textarea. Use this method instead of
80
+ * `textarea.focus()`.
80
81
  *
81
82
  * @param options An optional object providing options to control aspects of
82
83
  * the focusing process.
83
84
  */
84
- setFocus(options?: FocusOptions): Promise<void>;
85
+ doFocus(options?: FocusOptions): Promise<void>;
86
+ /**
87
+ * Programmatically remove focus from the textarea. Use this method instead of
88
+ * `textarea.blur()`.
89
+ */
90
+ doBlur(): Promise<void>;
91
+ /**
92
+ * Programmatically simulate a click on the textarea.
93
+ */
94
+ doClick(): Promise<void>;
85
95
  render(): any;
86
96
  private get hintSection();
87
97
  private onInput;
@@ -63,12 +63,22 @@ export declare class CatToggle {
63
63
  catBlur: EventEmitter<FocusEvent>;
64
64
  componentWillRender(): void;
65
65
  /**
66
- * Sets focus on the toggle. Use this method instead of `toggle.focus()`.
66
+ * Programmatically move focus to the toggle. Use this method instead of
67
+ * `input.focus()`.
67
68
  *
68
69
  * @param options An optional object providing options to control aspects of
69
70
  * the focusing process.
70
71
  */
71
- setFocus(options?: FocusOptions): Promise<void>;
72
+ doFocus(options?: FocusOptions): Promise<void>;
73
+ /**
74
+ * Programmatically remove focus from the toggle. Use this method instead of
75
+ * `input.blur()`.
76
+ */
77
+ doBlur(): Promise<void>;
78
+ /**
79
+ * Programmatically simulate a click on the toggle.
80
+ */
81
+ doClick(): Promise<void>;
72
82
  render(): any;
73
83
  private get hintSection();
74
84
  private onInput;
@@ -106,6 +106,19 @@ export namespace Components {
106
106
  * Specifies that the button should be disabled. A disabled button is unusable and un-clickable. Corresponds with the native HTML disabled attribute.
107
107
  */
108
108
  "disabled": boolean;
109
+ /**
110
+ * Programmatically remove focus from the button. Use this method instead of `button.blur()`.
111
+ */
112
+ "doBlur": () => Promise<void>;
113
+ /**
114
+ * Programmatically simulate a click on the button.
115
+ */
116
+ "doClick": () => Promise<void>;
117
+ /**
118
+ * Programmatically move focus to the button. Use this method instead of `button.focus()`.
119
+ * @param options An optional object providing options to control aspects of the focusing process.
120
+ */
121
+ "doFocus": (options?: FocusOptions | undefined) => Promise<void>;
109
122
  /**
110
123
  * The name of an icon to be displayed in the button.
111
124
  */
@@ -134,11 +147,6 @@ export namespace Components {
134
147
  * Use round button edges.
135
148
  */
136
149
  "round": boolean;
137
- /**
138
- * Sets focus on the button. Use this method instead of `button.focus()`.
139
- * @param options An optional object providing options to control aspects of the focusing process.
140
- */
141
- "setFocus": (options?: FocusOptions | undefined) => Promise<void>;
142
150
  /**
143
151
  * The size of the button.
144
152
  */
@@ -175,6 +183,19 @@ export namespace Components {
175
183
  * Disabled state of the checkbox
176
184
  */
177
185
  "disabled": boolean;
186
+ /**
187
+ * Programmatically remove focus from the checkbox. Use this method instead of `input.blur()`.
188
+ */
189
+ "doBlur": () => Promise<void>;
190
+ /**
191
+ * Programmatically simulate a click on the checkbox.
192
+ */
193
+ "doClick": () => Promise<void>;
194
+ /**
195
+ * Programmatically move focus to the checkbox. Use this method instead of `input.focus()`.
196
+ * @param options An optional object providing options to control aspects of the focusing process.
197
+ */
198
+ "doFocus": (options?: FocusOptions | undefined) => Promise<void>;
178
199
  /**
179
200
  * Optional hint text(s) to be displayed with the checkbox.
180
201
  */
@@ -203,11 +224,6 @@ export namespace Components {
203
224
  * Required state of the checkbox
204
225
  */
205
226
  "required": boolean;
206
- /**
207
- * Sets focus on the checkbox. Use this method instead of `checkbox.focus()`.
208
- * @param options An optional object providing options to control aspects of the focusing process.
209
- */
210
- "setFocus": (options?: FocusOptions | undefined) => Promise<void>;
211
227
  /**
212
228
  * The value of the checkbox
213
229
  */
@@ -262,6 +278,19 @@ export namespace Components {
262
278
  * Whether the input is disabled.
263
279
  */
264
280
  "disabled": boolean;
281
+ /**
282
+ * Programmatically remove focus from the input. Use this method instead of `input.blur()`.
283
+ */
284
+ "doBlur": () => Promise<void>;
285
+ /**
286
+ * Programmatically simulate a click on the input.
287
+ */
288
+ "doClick": () => Promise<void>;
289
+ /**
290
+ * Programmatically move focus to the input. Use this method instead of `input.focus()`.
291
+ * @param options An optional object providing options to control aspects of the focusing process.
292
+ */
293
+ "doFocus": (options?: FocusOptions | undefined) => Promise<void>;
265
294
  /**
266
295
  * Optional hint text(s) to be displayed with the input.
267
296
  */
@@ -318,11 +347,6 @@ export namespace Components {
318
347
  * Use round input edges.
319
348
  */
320
349
  "round": boolean;
321
- /**
322
- * Sets focus on the input. Use this method instead of `input.focus()`.
323
- * @param options An optional object providing options to control aspects of the focusing process.
324
- */
325
- "setFocus": (options?: FocusOptions | undefined) => Promise<void>;
326
350
  /**
327
351
  * A textual prefix to be displayed in the input.
328
352
  */
@@ -401,6 +425,19 @@ export namespace Components {
401
425
  * Whether this radio is disabled.
402
426
  */
403
427
  "disabled": boolean;
428
+ /**
429
+ * Programmatically remove focus from the radio button. Use this method instead of `input.blur()`.
430
+ */
431
+ "doBlur": () => Promise<void>;
432
+ /**
433
+ * Programmatically simulate a click on the radio button.
434
+ */
435
+ "doClick": () => Promise<void>;
436
+ /**
437
+ * Programmatically move focus to the radio button. Use this method instead of `input.focus()`.
438
+ * @param options An optional object providing options to control aspects of the focusing process.
439
+ */
440
+ "doFocus": (options?: FocusOptions | undefined) => Promise<void>;
404
441
  /**
405
442
  * Optional hint text(s) to be displayed with the radio.
406
443
  */
@@ -425,11 +462,6 @@ export namespace Components {
425
462
  * Whether the radio is required.
426
463
  */
427
464
  "required": boolean;
428
- /**
429
- * Sets focus on the radio. Use this method instead of `radio.focus()`.
430
- * @param options An optional object providing options to control aspects of the focusing process.
431
- */
432
- "setFocus": (options?: FocusOptions | undefined) => Promise<void>;
433
465
  /**
434
466
  * The value of the radio component.
435
467
  */
@@ -625,6 +657,19 @@ export namespace Components {
625
657
  * Whether the textarea is disabled.
626
658
  */
627
659
  "disabled": boolean;
660
+ /**
661
+ * Programmatically remove focus from the textarea. Use this method instead of `textarea.blur()`.
662
+ */
663
+ "doBlur": () => Promise<void>;
664
+ /**
665
+ * Programmatically simulate a click on the textarea.
666
+ */
667
+ "doClick": () => Promise<void>;
668
+ /**
669
+ * Programmatically move focus to the textarea. Use this method instead of `textarea.focus()`.
670
+ * @param options An optional object providing options to control aspects of the focusing process.
671
+ */
672
+ "doFocus": (options?: FocusOptions | undefined) => Promise<void>;
628
673
  /**
629
674
  * Optional hint text(s) to be displayed with the textarea.
630
675
  */
@@ -665,11 +710,6 @@ export namespace Components {
665
710
  * Specifies the initial number of lines in the textarea.
666
711
  */
667
712
  "rows": number;
668
- /**
669
- * Sets focus on the textarea. Use this method instead of `textarea.focus()`.
670
- * @param options An optional object providing options to control aspects of the focusing process.
671
- */
672
- "setFocus": (options?: FocusOptions | undefined) => Promise<void>;
673
713
  /**
674
714
  * The initial value of the control.
675
715
  */
@@ -684,6 +724,19 @@ export namespace Components {
684
724
  * Disabled state of the toggle.
685
725
  */
686
726
  "disabled": boolean;
727
+ /**
728
+ * Programmatically remove focus from the toggle. Use this method instead of `input.blur()`.
729
+ */
730
+ "doBlur": () => Promise<void>;
731
+ /**
732
+ * Programmatically simulate a click on the toggle.
733
+ */
734
+ "doClick": () => Promise<void>;
735
+ /**
736
+ * Programmatically move focus to the toggle. Use this method instead of `input.focus()`.
737
+ * @param options An optional object providing options to control aspects of the focusing process.
738
+ */
739
+ "doFocus": (options?: FocusOptions | undefined) => Promise<void>;
687
740
  /**
688
741
  * Optional hint text(s) to be displayed with the toggle.
689
742
  */
@@ -708,11 +761,6 @@ export namespace Components {
708
761
  * Required state of the toggle.
709
762
  */
710
763
  "required": boolean;
711
- /**
712
- * Sets focus on the toggle. Use this method instead of `toggle.focus()`.
713
- * @param options An optional object providing options to control aspects of the focusing process.
714
- */
715
- "setFocus": (options?: FocusOptions | undefined) => Promise<void>;
716
764
  /**
717
765
  * The value of the toggle
718
766
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haiilo/catalyst",
3
- "version": "2.0.3",
3
+ "version": "2.1.0",
4
4
  "description": "Catalyst Design System",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@floating-ui/dom": "1.0.3",
48
- "@haiilo/catalyst-tokens": "2.0.3",
48
+ "@haiilo/catalyst-tokens": "2.1.0",
49
49
  "@stencil/core": "2.17.4",
50
50
  "autosize": "5.0.1",
51
51
  "autosize-input": "1.0.2",
@@ -1,2 +0,0 @@
1
- import{r as t,a as i,h as a,g as o}from"./p-692e49d6.js";import{c as s,f as e}from"./p-60a20ebe.js";const d=":host{display:block}:host([hidden]){display:none}.modal-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgb(rgb(var(--cat-bg-backdrop, 0, 0, 0)), var(--cat-opacity-backdrop, 0.6));z-index:2;display:flex}.modal-wrapper[aria-hidden=true]{display:none}.modal{margin:auto;z-index:2;position:relative;background-color:white;border-radius:var(--cat-border-radius-l, 0.5rem);max-width:100%;padding:32px}.modal-header{display:flex;justify-content:end;align-self:stretch}.modal-header .close-button::part(button){box-shadow:unset}.modal-content{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch;margin:16px 0}.modal-s{width:400px}.modal-m{width:600px}.modal-l{width:800px}";const l=class{constructor(i){t(this,i);this.isVisible=false;this.size="m"}componentDidLoad(){if(this.modal){this.trap=s(this.modal,{tabbableOptions:{getShadowRoot:true},initialFocus:e(this.closeButton),allowOutsideClick:true,clickOutsideDeactivates:t=>!this.modal||!t.composedPath().includes(this.modal),onDeactivate:()=>this.isVisible=false,setReturnFocus:t=>t instanceof i?e(t):t})}}componentDidUpdate(){var t;if(this.isVisible)(t=this.trap)===null||t===void 0?void 0:t.activate();this.updateAccessibility(this.hostElement)}async show(){this.isVisible=true}render(){return a("div",{"aria-modal":true,role:"dialog","aria-hidden":!this.isVisible?"true":"false",class:"modal-wrapper"},a("div",{ref:t=>this.modal=t,class:{modal:true,[`modal-${this.size}`]:Boolean(this.size)}},a("div",{class:"modal-header"},a("cat-button",{ref:t=>this.closeButton=t,icon:"cross-outlined",class:"close-button",size:"s",iconOnly:true,a11yLabel:"close",onCatClick:this.onClick.bind(this)})),a("div",{class:"modal-content"},a("slot",null))))}onClick(){var t;(t=this.trap)===null||t===void 0?void 0:t.deactivate()}updateAccessibility(t){if(t.parentElement){Array.from(t.parentElement.children).forEach((i=>{if(i!==t){this.isVisible?i.setAttribute("aria-hidden","true"):i.removeAttribute("aria-hidden")}}));if(t.parentElement!==document.body){this.updateAccessibility(t.parentElement)}}}get hostElement(){return o(this)}};l.style=d;export{l as cat_modal};
2
- //# sourceMappingURL=p-270fd91d.entry.js.map