@haiilo/catalyst 0.10.8 → 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 (38) 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-e5c5e21d.entry.js → p-aa382647.entry.js} +4 -4
  4. package/dist/catalyst/p-aa382647.entry.js.map +1 -0
  5. package/dist/catalyst/scss/index.scss +1 -1
  6. package/dist/cjs/cat-alert_21.cjs.entry.js +74 -92
  7. package/dist/cjs/cat-alert_21.cjs.entry.js.map +1 -1
  8. package/dist/cjs/catalyst.cjs.js +1 -1
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/collection/collection-manifest.json +1 -1
  11. package/dist/collection/components/cat-badge/cat-badge.css +15 -15
  12. package/dist/collection/components/cat-input/cat-input.js +1 -1
  13. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  14. package/dist/collection/components/cat-radio/cat-radio.css +1 -0
  15. package/dist/collection/components/cat-radio-group/cat-radio-group.js +5 -4
  16. package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
  17. package/dist/collection/components/cat-select/cat-select.js +84 -205
  18. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  19. package/dist/collection/scss/index.scss +1 -1
  20. package/dist/components/cat-badge.js +1 -1
  21. package/dist/components/cat-badge.js.map +1 -1
  22. package/dist/components/cat-input.js.map +1 -1
  23. package/dist/components/cat-radio-group.js +0 -2
  24. package/dist/components/cat-radio-group.js.map +1 -1
  25. package/dist/components/cat-radio.js +1 -1
  26. package/dist/components/cat-radio.js.map +1 -1
  27. package/dist/components/cat-select.js +77 -97
  28. package/dist/components/cat-select.js.map +1 -1
  29. package/dist/esm/cat-alert_21.entry.js +74 -92
  30. package/dist/esm/cat-alert_21.entry.js.map +1 -1
  31. package/dist/esm/catalyst.js +1 -1
  32. package/dist/esm/loader.js +1 -1
  33. package/dist/types/components/cat-input/cat-input.d.ts +1 -1
  34. package/dist/types/components/cat-radio-group/cat-radio-group.d.ts +9 -0
  35. package/dist/types/components/cat-select/cat-select.d.ts +13 -28
  36. package/dist/types/components.d.ts +30 -37
  37. package/package.json +2 -2
  38. package/dist/catalyst/p-e5c5e21d.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":[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);
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":[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);
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,4 +1,7 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
+ /**
3
+ * A group of radio buttons.
4
+ */
2
5
  export declare class CatRadioGroup {
3
6
  private catRadioGroup;
4
7
  hostElement: HTMLElement;
@@ -6,6 +9,9 @@ export declare class CatRadioGroup {
6
9
  * The name of the radio group component.
7
10
  */
8
11
  name?: string;
12
+ /**
13
+ * The value of the radio group.
14
+ */
9
15
  value?: string;
10
16
  /**
11
17
  * Whether this radio group is disabled.
@@ -20,6 +26,9 @@ export declare class CatRadioGroup {
20
26
  * Whether the label of the radios should appear to the left of them.
21
27
  */
22
28
  labelLeft: boolean;
29
+ /**
30
+ * Emitted when the value is changed.
31
+ */
23
32
  catChange: EventEmitter;
24
33
  onNameChanged(newName?: string): void;
25
34
  onValueChanged(newValue?: string): 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,9 @@ 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
+ */
387
390
  "value"?: string;
388
391
  }
389
392
  interface CatScrollable {
@@ -417,18 +420,6 @@ export namespace Components {
417
420
  "scrolledBuffer": number;
418
421
  }
419
422
  interface CatSelect {
420
- /**
421
- * The available options for the input.
422
- */
423
- "choices": Choice[];
424
- /**
425
- * Clear all choices from select.
426
- */
427
- "clearChoices": () => Promise<this>;
428
- /**
429
- * Clear input of any user inputted text.
430
- */
431
- "clearInput": () => Promise<this>;
432
423
  /**
433
424
  * Disable the select.
434
425
  */
@@ -437,6 +428,10 @@ export namespace Components {
437
428
  * Optional hint text(s) to be displayed with the select.
438
429
  */
439
430
  "hint"?: string | string[];
431
+ /**
432
+ * The available options for the input.
433
+ */
434
+ "items": CatSelectItem[];
440
435
  /**
441
436
  * The label for the select.
442
437
  */
@@ -449,10 +444,6 @@ export namespace Components {
449
444
  * Enable multiple selection.
450
445
  */
451
446
  "multiple": boolean;
452
- /**
453
- * Enable search for the select.
454
- */
455
- "noSearch": boolean;
456
447
  /**
457
448
  * The placeholder for the select.
458
449
  */
@@ -466,17 +457,13 @@ export namespace Components {
466
457
  */
467
458
  "required": boolean;
468
459
  /**
469
- * 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.
470
- */
471
- "setChoices": (choices: Array<Choice> | Array<Group>, value?: string | undefined, label?: string | undefined, replaceChoices?: boolean | undefined) => Promise<this>;
472
- /**
473
- * 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.
474
461
  */
475
- "setValue": (args: Array<string> | Array<Item>) => Promise<this>;
462
+ "search": boolean;
476
463
  /**
477
- * The pre-selected items for the input.
464
+ * The value of the select.
478
465
  */
479
- "value"?: string | string[] | Choice | Choice[];
466
+ "value"?: any;
480
467
  }
481
468
  interface CatSkeleton {
482
469
  /**
@@ -1188,7 +1175,7 @@ declare namespace LocalJSX {
1188
1175
  */
1189
1176
  "type"?: 'text' | 'email' | 'password' | 'tel' | 'url' | 'search' | 'number';
1190
1177
  /**
1191
- * The initial value of the control.
1178
+ * The value of the control.
1192
1179
  */
1193
1180
  "value"?: string | number;
1194
1181
  }
@@ -1279,7 +1266,13 @@ declare namespace LocalJSX {
1279
1266
  * The name of the radio group component.
1280
1267
  */
1281
1268
  "name"?: string;
1269
+ /**
1270
+ * Emitted when the value is changed.
1271
+ */
1282
1272
  "onCatChange"?: (event: CatRadioGroupCustomEvent<any>) => void;
1273
+ /**
1274
+ * The value of the radio group.
1275
+ */
1283
1276
  "value"?: string;
1284
1277
  }
1285
1278
  interface CatScrollable {
@@ -1329,10 +1322,6 @@ declare namespace LocalJSX {
1329
1322
  "scrolledBuffer"?: number;
1330
1323
  }
1331
1324
  interface CatSelect {
1332
- /**
1333
- * The available options for the input.
1334
- */
1335
- "choices"?: Choice[];
1336
1325
  /**
1337
1326
  * Disable the select.
1338
1327
  */
@@ -1341,6 +1330,10 @@ declare namespace LocalJSX {
1341
1330
  * Optional hint text(s) to be displayed with the select.
1342
1331
  */
1343
1332
  "hint"?: string | string[];
1333
+ /**
1334
+ * The available options for the input.
1335
+ */
1336
+ "items"?: CatSelectItem[];
1344
1337
  /**
1345
1338
  * The label for the select.
1346
1339
  */
@@ -1353,10 +1346,6 @@ declare namespace LocalJSX {
1353
1346
  * Enable multiple selection.
1354
1347
  */
1355
1348
  "multiple"?: boolean;
1356
- /**
1357
- * Enable search for the select.
1358
- */
1359
- "noSearch"?: boolean;
1360
1349
  /**
1361
1350
  * Emitted when the value is changed.
1362
1351
  */
@@ -1382,9 +1371,13 @@ declare namespace LocalJSX {
1382
1371
  */
1383
1372
  "required"?: boolean;
1384
1373
  /**
1385
- * The pre-selected items for the input.
1374
+ * Enable search for the select.
1375
+ */
1376
+ "search"?: boolean;
1377
+ /**
1378
+ * The value of the select.
1386
1379
  */
1387
- "value"?: string | string[] | Choice | Choice[];
1380
+ "value"?: any;
1388
1381
  }
1389
1382
  interface CatSkeleton {
1390
1383
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haiilo/catalyst",
3
- "version": "0.10.8",
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",