@haiilo/catalyst 0.10.5 → 0.11.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 (41) 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-c4a1e283.entry.js → p-aa382647.entry.js} +4 -4
  5. package/dist/catalyst/p-aa382647.entry.js.map +1 -0
  6. package/dist/catalyst/scss/index.scss +52 -0
  7. package/dist/cjs/cat-alert_21.cjs.entry.js +85 -97
  8. package/dist/cjs/cat-alert_21.cjs.entry.js.map +1 -1
  9. package/dist/cjs/catalyst.cjs.js +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/collection/collection-manifest.json +1 -1
  12. package/dist/collection/components/cat-badge/cat-badge.css +15 -15
  13. package/dist/collection/components/cat-input/cat-input.js +1 -1
  14. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  15. package/dist/collection/components/cat-radio/cat-radio.css +1 -0
  16. package/dist/collection/components/cat-radio/cat-radio.js +1 -2
  17. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
  18. package/dist/collection/components/cat-radio-group/cat-radio-group.js +49 -7
  19. package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
  20. package/dist/collection/components/cat-select/cat-select.js +84 -205
  21. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  22. package/dist/collection/scss/index.scss +52 -0
  23. package/dist/components/cat-badge.js +1 -1
  24. package/dist/components/cat-badge.js.map +1 -1
  25. package/dist/components/cat-input.js.map +1 -1
  26. package/dist/components/cat-radio-group.js +13 -7
  27. package/dist/components/cat-radio-group.js.map +1 -1
  28. package/dist/components/cat-radio.js +2 -3
  29. package/dist/components/cat-radio.js.map +1 -1
  30. package/dist/components/cat-select.js +77 -97
  31. package/dist/components/cat-select.js.map +1 -1
  32. package/dist/esm/cat-alert_21.entry.js +85 -97
  33. package/dist/esm/cat-alert_21.entry.js.map +1 -1
  34. package/dist/esm/catalyst.js +1 -1
  35. package/dist/esm/loader.js +1 -1
  36. package/dist/types/components/cat-input/cat-input.d.ts +1 -1
  37. package/dist/types/components/cat-radio-group/cat-radio-group.d.ts +13 -0
  38. package/dist/types/components/cat-select/cat-select.d.ts +13 -28
  39. package/dist/types/components.d.ts +37 -37
  40. package/package.json +2 -2
  41. package/dist/catalyst/p-c4a1e283.entry.js.map +0 -1
@@ -13,7 +13,7 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["cat-textarea",[[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]}]]],["cat-alert_21",[[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":[2],"maxLength":[2,"max-length"],"min":[2],"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-modal",{"size":[1],"isVisible":[32],"show":[64]}],[1,"cat-select",{"label":[1],"labelHidden":[4,"label-hidden"],"required":[4],"choices":[16],"value":[1025],"disabled":[4],"multiple":[4],"placeholder":[1],"position":[1],"noSearch":[4,"no-search"],"hint":[1],"hasSlottedLabel":[32],"setValue":[64],"setChoices":[64],"clearChoices":[64],"clearInput":[64]}],[1,"cat-tabs",{"activeTab":[1,"active-tab"],"tabsAlign":[1,"tabs-align"],"activeTabId":[32]},[[0,"keydown","onKeydown"]]],[0,"cat-toast-demo"],[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-alert",{"color":[1]}],[1,"cat-badge",{"variant":[1],"color":[1],"size":[1],"round":[4],"pulse":[4]}],[1,"cat-card"],[1,"cat-checkbox",{"checked":[4],"disabled":[4],"indeterminate":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1025],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-menu",{"placement":[1]},[[0,"catClick","clickHandler"]]],[1,"cat-radio",{"checked":[1028],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1025],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-radio-group",{"name":[1],"disabled":[4],"a11yLabel":[1,"a11y-label"],"labelLeft":[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"]]],[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-tab",{"label":[1],"icon":[1],"iconOnly":[8,"icon-only"],"iconRight":[4,"icon-right"],"url":[1],"urlTarget":[1,"url-target"],"deactivated":[4]},[[0,"click","onClick"]]],[1,"cat-toggle",{"checked":[4],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1025],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-tooltip",{"content":[1],"disabled":[4],"placement":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"longTouchDuration":[2,"long-touch-duration"]},[[0,"keydown","handleKeyDown"]]],[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"],"_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"]}]]]], options);
16
+ return bootstrapLazy([["cat-textarea",[[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]}]]],["cat-alert_21",[[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":[2],"maxLength":[2,"max-length"],"min":[2],"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-modal",{"size":[1],"isVisible":[32],"show":[64]}],[1,"cat-select",{"label":[1],"labelHidden":[4,"label-hidden"],"required":[4],"items":[16],"value":[1032],"disabled":[4],"multiple":[4],"placeholder":[1],"position":[1],"search":[4],"hint":[1],"hasSlottedLabel":[32]}],[1,"cat-tabs",{"activeTab":[1,"active-tab"],"tabsAlign":[1,"tabs-align"],"activeTabId":[32]},[[0,"keydown","onKeydown"]]],[0,"cat-toast-demo"],[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-alert",{"color":[1]}],[1,"cat-badge",{"variant":[1],"color":[1],"size":[1],"round":[4],"pulse":[4]}],[1,"cat-card"],[1,"cat-checkbox",{"checked":[4],"disabled":[4],"indeterminate":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1025],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-menu",{"placement":[1]},[[0,"catClick","clickHandler"]]],[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"]]],[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-tab",{"label":[1],"icon":[1],"iconOnly":[8,"icon-only"],"iconRight":[4,"icon-right"],"url":[1],"urlTarget":[1,"url-target"],"deactivated":[4]},[[0,"click","onClick"]]],[1,"cat-toggle",{"checked":[4],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1025],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-tooltip",{"content":[1],"disabled":[4],"placement":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"longTouchDuration":[2,"long-touch-duration"]},[[0,"keydown","handleKeyDown"]]],[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"],"_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"]}]]]], options);
17
17
  });
18
18
 
19
19
  //# sourceMappingURL=catalyst.js.map
@@ -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-textarea",[[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]}]]],["cat-alert_21",[[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":[2],"maxLength":[2,"max-length"],"min":[2],"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-modal",{"size":[1],"isVisible":[32],"show":[64]}],[1,"cat-select",{"label":[1],"labelHidden":[4,"label-hidden"],"required":[4],"choices":[16],"value":[1025],"disabled":[4],"multiple":[4],"placeholder":[1],"position":[1],"noSearch":[4,"no-search"],"hint":[1],"hasSlottedLabel":[32],"setValue":[64],"setChoices":[64],"clearChoices":[64],"clearInput":[64]}],[1,"cat-tabs",{"activeTab":[1,"active-tab"],"tabsAlign":[1,"tabs-align"],"activeTabId":[32]},[[0,"keydown","onKeydown"]]],[0,"cat-toast-demo"],[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-alert",{"color":[1]}],[1,"cat-badge",{"variant":[1],"color":[1],"size":[1],"round":[4],"pulse":[4]}],[1,"cat-card"],[1,"cat-checkbox",{"checked":[4],"disabled":[4],"indeterminate":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1025],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-menu",{"placement":[1]},[[0,"catClick","clickHandler"]]],[1,"cat-radio",{"checked":[1028],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1025],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-radio-group",{"name":[1],"disabled":[4],"a11yLabel":[1,"a11y-label"],"labelLeft":[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"]]],[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-tab",{"label":[1],"icon":[1],"iconOnly":[8,"icon-only"],"iconRight":[4,"icon-right"],"url":[1],"urlTarget":[1,"url-target"],"deactivated":[4]},[[0,"click","onClick"]]],[1,"cat-toggle",{"checked":[4],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1025],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-tooltip",{"content":[1],"disabled":[4],"placement":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"longTouchDuration":[2,"long-touch-duration"]},[[0,"keydown","handleKeyDown"]]],[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"],"_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"]}]]]], options);
13
+ return bootstrapLazy([["cat-textarea",[[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]}]]],["cat-alert_21",[[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":[2],"maxLength":[2,"max-length"],"min":[2],"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-modal",{"size":[1],"isVisible":[32],"show":[64]}],[1,"cat-select",{"label":[1],"labelHidden":[4,"label-hidden"],"required":[4],"items":[16],"value":[1032],"disabled":[4],"multiple":[4],"placeholder":[1],"position":[1],"search":[4],"hint":[1],"hasSlottedLabel":[32]}],[1,"cat-tabs",{"activeTab":[1,"active-tab"],"tabsAlign":[1,"tabs-align"],"activeTabId":[32]},[[0,"keydown","onKeydown"]]],[0,"cat-toast-demo"],[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-alert",{"color":[1]}],[1,"cat-badge",{"variant":[1],"color":[1],"size":[1],"round":[4],"pulse":[4]}],[1,"cat-card"],[1,"cat-checkbox",{"checked":[4],"disabled":[4],"indeterminate":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1025],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-menu",{"placement":[1]},[[0,"catClick","clickHandler"]]],[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"]]],[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-tab",{"label":[1],"icon":[1],"iconOnly":[8,"icon-only"],"iconRight":[4,"icon-right"],"url":[1],"urlTarget":[1,"url-target"],"deactivated":[4]},[[0,"click","onClick"]]],[1,"cat-toggle",{"checked":[4],"disabled":[4],"label":[1],"labelHidden":[4,"label-hidden"],"name":[1],"required":[4],"value":[1025],"hint":[1],"labelLeft":[4,"label-left"],"hasSlottedLabel":[32],"setFocus":[64]}],[1,"cat-tooltip",{"content":[1],"disabled":[4],"placement":[1],"showDelay":[2,"show-delay"],"hideDelay":[2,"hide-delay"],"longTouchDuration":[2,"long-touch-duration"]},[[0,"keydown","handleKeyDown"]]],[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"],"_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"]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -97,7 +97,7 @@ export declare class CatInput {
97
97
  */
98
98
  type: 'text' | 'email' | 'password' | 'tel' | 'url' | 'search' | 'number';
99
99
  /**
100
- * The initial value of the control.
100
+ * The value of the control.
101
101
  */
102
102
  value?: string | number;
103
103
  /**
@@ -1,3 +1,7 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ /**
3
+ * A group of radio buttons.
4
+ */
1
5
  export declare class CatRadioGroup {
2
6
  private catRadioGroup;
3
7
  hostElement: HTMLElement;
@@ -5,6 +9,10 @@ export declare class CatRadioGroup {
5
9
  * The name of the radio group component.
6
10
  */
7
11
  name?: string;
12
+ /**
13
+ * The value of the radio group.
14
+ */
15
+ value?: string;
8
16
  /**
9
17
  * Whether this radio group is disabled.
10
18
  */
@@ -18,7 +26,12 @@ export declare class CatRadioGroup {
18
26
  * Whether the label of the radios should appear to the left of them.
19
27
  */
20
28
  labelLeft: boolean;
29
+ /**
30
+ * Emitted when the value is changed.
31
+ */
32
+ catChange: EventEmitter;
21
33
  onNameChanged(newName?: string): void;
34
+ onValueChanged(newValue?: string): void;
22
35
  onDisabledChanged(disabled: boolean): void;
23
36
  onLabelLeftChanged(labelLeft: boolean): void;
24
37
  componentDidLoad(): void;
@@ -1,5 +1,9 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
- import { Choice, Group, Item } from 'choices.js';
2
+ import { Choice } from 'choices.js';
3
+ /**
4
+ * A single option in the select.
5
+ */
6
+ export declare type CatSelectItem = Pick<Choice, 'label' | 'value' | 'customProperties'>;
3
7
  /**
4
8
  * Select lets user choose one option from an options menu. Consider using
5
9
  * select when you have 6 or more options. Select component supports any content
@@ -12,6 +16,7 @@ import { Choice, Group, Item } from 'choices.js';
12
16
  export declare class CatSelect {
13
17
  private readonly i18n;
14
18
  private readonly id;
19
+ private resetItemsOnNextValueChange;
15
20
  private choice?;
16
21
  private choiceInner?;
17
22
  private choiceDropdown?;
@@ -34,11 +39,11 @@ export declare class CatSelect {
34
39
  /**
35
40
  * The available options for the input.
36
41
  */
37
- choices: Choice[];
42
+ items: CatSelectItem[];
38
43
  /**
39
- * The pre-selected items for the input.
44
+ * The value of the select.
40
45
  */
41
- value?: string | string[] | Choice | Choice[];
46
+ value?: any;
42
47
  /**
43
48
  * Disable the select.
44
49
  */
@@ -60,7 +65,7 @@ export declare class CatSelect {
60
65
  /**
61
66
  * Enable search for the select.
62
67
  */
63
- noSearch: boolean;
68
+ search: boolean;
64
69
  /**
65
70
  * Optional hint text(s) to be displayed with the select.
66
71
  */
@@ -77,38 +82,18 @@ export declare class CatSelect {
77
82
  * Emitted when scrolled to the bottom.
78
83
  */
79
84
  catScrolledBottom: EventEmitter;
80
- setChoicesHandler(choices: Choice[]): void;
81
- setValueHandler(value?: string[] | Choice[]): void;
85
+ setChoicesHandler(items: CatSelectItem[]): void;
86
+ setValueHandler(value?: any): void;
82
87
  componentWillRender(): void;
83
88
  componentDidLoad(): void;
84
89
  disconnectedCallback(): void;
85
- /**
86
- * Set value of input based on an array of objects or strings. This behaves
87
- * exactly the same as passing items via the items option but can be called
88
- * after initialisation.
89
- */
90
- setValue(args: Array<string> | Array<Item>): Promise<this>;
91
- /**
92
- * Set choices of select input via an array of objects (or function that
93
- * returns array of object or promise of it), a value field name and a label
94
- * field name.
95
- */
96
- setChoices(choices: Array<Choice> | Array<Group>, value?: string, label?: string, replaceChoices?: boolean): Promise<this>;
97
- /**
98
- * Clear all choices from select.
99
- */
100
- clearChoices(): Promise<this>;
101
- /**
102
- * Clear input of any user inputted text.
103
- */
104
- clearInput(): Promise<this>;
105
90
  render(): any;
106
91
  private init;
107
92
  private get hintSection();
108
93
  private onChange;
94
+ private onChoice;
109
95
  private onSearch;
110
96
  private onScrolledBottom;
111
- private onChoice;
112
97
  private showDropdownHandler;
113
98
  private createRemoveItemButton;
114
99
  private updateRemoveItemButtonVisibility;
@@ -7,7 +7,7 @@
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { Breakpoint } from "./utils/breakpoints";
9
9
  import { Placement } from "@floating-ui/dom";
10
- import { Choice, Group, Item } from "choices.js";
10
+ import { CatSelectItem } from "./components/cat-select/cat-select";
11
11
  export namespace Components {
12
12
  interface CatAlert {
13
13
  /**
@@ -304,7 +304,7 @@ export namespace Components {
304
304
  */
305
305
  "type": 'text' | 'email' | 'password' | 'tel' | 'url' | 'search' | 'number';
306
306
  /**
307
- * The initial value of the control.
307
+ * The value of the control.
308
308
  */
309
309
  "value"?: string | number;
310
310
  }
@@ -384,6 +384,10 @@ export namespace Components {
384
384
  * The name of the radio group component.
385
385
  */
386
386
  "name"?: string;
387
+ /**
388
+ * The value of the radio group.
389
+ */
390
+ "value"?: string;
387
391
  }
388
392
  interface CatScrollable {
389
393
  /**
@@ -416,18 +420,6 @@ export namespace Components {
416
420
  "scrolledBuffer": number;
417
421
  }
418
422
  interface CatSelect {
419
- /**
420
- * The available options for the input.
421
- */
422
- "choices": Choice[];
423
- /**
424
- * Clear all choices from select.
425
- */
426
- "clearChoices": () => Promise<this>;
427
- /**
428
- * Clear input of any user inputted text.
429
- */
430
- "clearInput": () => Promise<this>;
431
423
  /**
432
424
  * Disable the select.
433
425
  */
@@ -436,6 +428,10 @@ export namespace Components {
436
428
  * Optional hint text(s) to be displayed with the select.
437
429
  */
438
430
  "hint"?: string | string[];
431
+ /**
432
+ * The available options for the input.
433
+ */
434
+ "items": CatSelectItem[];
439
435
  /**
440
436
  * The label for the select.
441
437
  */
@@ -448,10 +444,6 @@ export namespace Components {
448
444
  * Enable multiple selection.
449
445
  */
450
446
  "multiple": boolean;
451
- /**
452
- * Enable search for the select.
453
- */
454
- "noSearch": boolean;
455
447
  /**
456
448
  * The placeholder for the select.
457
449
  */
@@ -465,17 +457,13 @@ export namespace Components {
465
457
  */
466
458
  "required": boolean;
467
459
  /**
468
- * Set choices of select input via an array of objects (or function that returns array of object or promise of it), a value field name and a label field name.
469
- */
470
- "setChoices": (choices: Array<Choice> | Array<Group>, value?: string | undefined, label?: string | undefined, replaceChoices?: boolean | undefined) => Promise<this>;
471
- /**
472
- * Set value of input based on an array of objects or strings. This behaves exactly the same as passing items via the items option but can be called after initialisation.
460
+ * Enable search for the select.
473
461
  */
474
- "setValue": (args: Array<string> | Array<Item>) => Promise<this>;
462
+ "search": boolean;
475
463
  /**
476
- * The pre-selected items for the input.
464
+ * The value of the select.
477
465
  */
478
- "value"?: string | string[] | Choice | Choice[];
466
+ "value"?: any;
479
467
  }
480
468
  interface CatSkeleton {
481
469
  /**
@@ -692,6 +680,10 @@ export interface CatRadioCustomEvent<T> extends CustomEvent<T> {
692
680
  detail: T;
693
681
  target: HTMLCatRadioElement;
694
682
  }
683
+ export interface CatRadioGroupCustomEvent<T> extends CustomEvent<T> {
684
+ detail: T;
685
+ target: HTMLCatRadioGroupElement;
686
+ }
695
687
  export interface CatScrollableCustomEvent<T> extends CustomEvent<T> {
696
688
  detail: T;
697
689
  target: HTMLCatScrollableElement;
@@ -1183,7 +1175,7 @@ declare namespace LocalJSX {
1183
1175
  */
1184
1176
  "type"?: 'text' | 'email' | 'password' | 'tel' | 'url' | 'search' | 'number';
1185
1177
  /**
1186
- * The initial value of the control.
1178
+ * The value of the control.
1187
1179
  */
1188
1180
  "value"?: string | number;
1189
1181
  }
@@ -1274,6 +1266,14 @@ declare namespace LocalJSX {
1274
1266
  * The name of the radio group component.
1275
1267
  */
1276
1268
  "name"?: string;
1269
+ /**
1270
+ * Emitted when the value is changed.
1271
+ */
1272
+ "onCatChange"?: (event: CatRadioGroupCustomEvent<any>) => void;
1273
+ /**
1274
+ * The value of the radio group.
1275
+ */
1276
+ "value"?: string;
1277
1277
  }
1278
1278
  interface CatScrollable {
1279
1279
  /**
@@ -1322,10 +1322,6 @@ declare namespace LocalJSX {
1322
1322
  "scrolledBuffer"?: number;
1323
1323
  }
1324
1324
  interface CatSelect {
1325
- /**
1326
- * The available options for the input.
1327
- */
1328
- "choices"?: Choice[];
1329
1325
  /**
1330
1326
  * Disable the select.
1331
1327
  */
@@ -1334,6 +1330,10 @@ declare namespace LocalJSX {
1334
1330
  * Optional hint text(s) to be displayed with the select.
1335
1331
  */
1336
1332
  "hint"?: string | string[];
1333
+ /**
1334
+ * The available options for the input.
1335
+ */
1336
+ "items"?: CatSelectItem[];
1337
1337
  /**
1338
1338
  * The label for the select.
1339
1339
  */
@@ -1346,10 +1346,6 @@ declare namespace LocalJSX {
1346
1346
  * Enable multiple selection.
1347
1347
  */
1348
1348
  "multiple"?: boolean;
1349
- /**
1350
- * Enable search for the select.
1351
- */
1352
- "noSearch"?: boolean;
1353
1349
  /**
1354
1350
  * Emitted when the value is changed.
1355
1351
  */
@@ -1375,9 +1371,13 @@ declare namespace LocalJSX {
1375
1371
  */
1376
1372
  "required"?: boolean;
1377
1373
  /**
1378
- * The pre-selected items for the input.
1374
+ * Enable search for the select.
1375
+ */
1376
+ "search"?: boolean;
1377
+ /**
1378
+ * The value of the select.
1379
1379
  */
1380
- "value"?: string | string[] | Choice | Choice[];
1380
+ "value"?: any;
1381
1381
  }
1382
1382
  interface CatSkeleton {
1383
1383
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haiilo/catalyst",
3
- "version": "0.10.5",
3
+ "version": "0.11.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.10.5",
46
+ "@haiilo/catalyst-tokens": "0.11.0",
47
47
  "@stencil/core": "2.17.0",
48
48
  "autosize": "5.0.1",
49
49
  "choices.js": "10.1.0",