@semcore/select 4.53.0-prerelease.4 → 4.53.0-prerelease.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport DropdownMenu, {\n DropdownMenuContext,\n DropdownMenuItemProps,\n DropdownMenuProps,\n DropdownMenuHandlers,\n DropdownMenuTriggerProps,\n} from '@semcore/dropdown-menu';\nimport Dropdown from '@semcore/dropdown';\nimport { ButtonTrigger, BaseTriggerProps, ButtonTriggerProps } from '@semcore/base-trigger';\nimport Divider from '@semcore/divider';\nimport Input, { InputValueProps } from '@semcore/input';\nimport { BoxProps, Flex } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface ISelectInputSearch extends SelectInputSearch, UnknownProperties {}\nexport type SelectInputSearch = InputValueProps & {};\n\nexport type OptionValue = string | number;\nexport type SelectValue = string | number | Array<string | number> | null;\n\nexport type SelectOption = {\n value: OptionValue;\n children?: React.ReactNode;\n label?: React.ReactNode;\n};\n\n/** @deprecated */\nexport interface ISelectProps<T extends SelectValue = SelectValue> extends SelectProps<T> {}\nexport type SelectProps<T extends SelectValue = SelectValue> = DropdownMenuProps &\n BaseTriggerProps & {\n /**\n * Options array\n */\n options?: SelectOption[];\n /**\n * The value or values array selected by default when using multiselect\n * @type SelectValue\n */\n defaultValue?: T;\n /**\n * The selected value or values array when using multiselect\n * @type SelectValue\n */\n value?: T;\n /**\n * Callback on value change\n * @type (value: SelectValue, e: React.SyntheticEvent) => boolean | void\n */\n onChange?:\n | ((value: T, e: React.SyntheticEvent) => boolean | void)\n | React.Dispatch<React.SetStateAction<T>>;\n /**\n * Trigger placeholder at not selected value\n */\n placeholder?: React.ReactNode;\n /**\n * Trigger state\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disables select\n */\n disabled?: boolean;\n /**\n * If provided, adds a hidden <input /> tag with the given name for enhancing accessibility.\n */\n name?: string;\n locale?: string;\n /**\n * If enabled, after opening select popper view will be scrolled to selected option or, if there are multiple selected options, to the first selected option.\n * @default true\n */\n scrollToSelected?: boolean;\n };\n\n/** @deprecated */\nexport interface ISelectOption extends SelectOption, UnknownProperties {}\n\n/** @deprecated */\nexport interface ISelectOptionProps extends SelectOptionProps, UnknownProperties {}\nexport type SelectOptionProps = DropdownMenuItemProps & {\n /**\n * Enables selected state\n */\n selected?: boolean;\n /** Value of the option */\n value: string | number;\n};\n\n/** @deprecated */\nexport interface ISelectOptionCheckboxProps extends SelectOptionCheckboxProps, UnknownProperties {}\nexport type SelectOptionCheckboxProps = BoxProps & {\n /** Checkbox theme */\n theme?: string;\n /** Visual indeterminate state */\n indeterminate?: boolean;\n\n selected?: boolean;\n};\n\ndeclare const InputSearch: Intergalactic.Component<'div', SelectInputSearch> & {\n SearchIcon: typeof Input.Addon;\n Value: typeof Input.Value;\n Clear: typeof Input.Addon;\n};\n\n/** @deprecated */\nexport interface ISelectContext extends SelectContext, UnknownProperties {}\nexport type SelectContext = DropdownMenuContext & {\n getOptionProps: PropGetterFn;\n getOptionCheckboxProps: PropGetterFn;\n getDividerProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface ISelectHandlers extends SelectHandlers, UnknownProperties {}\nexport type SelectHandlers = DropdownMenuHandlers & {\n value: (index: SelectValue) => void;\n};\n\ntype IntergalacticSelectComponent<PropsExtending = {}> = (<\n Value extends SelectValue,\n Tag extends Intergalactic.Tag = 'div',\n>(\n props: Intergalactic.InternalTypings.ComponentProps<\n Tag,\n 'div',\n SelectProps<Value>,\n SelectContext,\n [handlers: SelectHandlers]\n > &\n PropsExtending,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', SelectProps>;\n\ndeclare const Select: IntergalacticSelectComponent & {\n Trigger: Intergalactic.Component<\n typeof Dropdown.Trigger,\n DropdownMenuTriggerProps & ButtonTriggerProps,\n {},\n [handlers: SelectHandlers]\n > & {\n Addon: typeof ButtonTrigger.Addon;\n Text: typeof ButtonTrigger.Text;\n };\n Popper: typeof DropdownMenu.Popper;\n List: typeof DropdownMenu.List;\n Menu: typeof DropdownMenu.Menu;\n Group: typeof Dropdown.Group;\n Option: Intergalactic.Component<\n 'option',\n SelectOptionProps,\n SelectContext,\n [handlers: SelectHandlers]\n > & {\n Addon: typeof DropdownMenu.Item.Addon;\n Checkbox: Intergalactic.Component<'div', SelectOptionCheckboxProps>;\n Content: typeof Flex;\n Hint: typeof Flex;\n };\n /**\n * @deprecated Use Select.Group\n */\n OptionTitle: typeof DropdownMenu.ItemTitle;\n /**\n * @deprecated Use Select.Option.Hint or Select.Group with subTitle property\n */\n OptionHint: typeof DropdownMenu.ItemHint;\n Divider: typeof Divider;\n InputSearch: typeof InputSearch;\n Input: typeof InputSearch;\n};\n\ndeclare const wrapSelect: <PropsExtending extends {}>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticSelectComponent>\n > &\n PropsExtending,\n ) => React.ReactNode,\n) => IntergalacticSelectComponent<PropsExtending>;\n\nexport { InputSearch, wrapSelect };\nexport default Select;\n"],"mappings":""}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { BoxProps, Flex } from '@semcore/base-components';\nimport type { ButtonTrigger, BaseTriggerProps, ButtonTriggerProps, LinkTriggerProps } from '@semcore/base-trigger';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type Divider from '@semcore/divider';\nimport type Dropdown from '@semcore/dropdown';\nimport type {\n DropdownMenuContext,\n DropdownMenuItemProps,\n DropdownMenuProps,\n DropdownMenuHandlers,\n DropdownMenuTriggerProps,\n} from '@semcore/dropdown-menu';\nimport type DropdownMenu from '@semcore/dropdown-menu';\nimport type { InputValueProps } from '@semcore/input';\nimport type Input from '@semcore/input';\nimport type { Text } from '@semcore/typography';\nimport type React from 'react';\n\nexport type SelectInputSearch = InputValueProps & {};\n\nexport type OptionValue = string | number;\nexport type SelectValue = string | number | Array<string | number> | null;\n\nexport type SelectOption = {\n value: OptionValue;\n children?: React.ReactNode;\n label?: React.ReactNode;\n};\n\nexport type SelectProps<T extends SelectValue = SelectValue> = Intergalactic.InternalTypings.EfficientOmit<DropdownMenuProps, 'size'> &\n Intergalactic.InternalTypings.EfficientOmit<BaseTriggerProps, 'size'> & {\n /**\n * Options array\n */\n options?: SelectOption[];\n /**\n * The value or values array selected by default when using multiselect\n * @type SelectValue\n */\n defaultValue?: T;\n /**\n * The selected value or values array when using multiselect\n * @type SelectValue\n */\n value?: T;\n /**\n * Callback on value change\n * @type (value: SelectValue, e: React.SyntheticEvent) => boolean | void\n */\n onChange?:\n | ((value: T, e: React.SyntheticEvent) => boolean | void)\n | React.Dispatch<React.SetStateAction<T>>;\n /**\n * Trigger placeholder at not selected value\n */\n placeholder?: React.ReactNode;\n /**\n * Trigger state\n */\n state?: 'normal' | 'valid' | 'invalid';\n /**\n * Disables select\n */\n disabled?: boolean;\n /**\n * If provided, adds a hidden <input /> tag with the given name for enhancing accessibility.\n */\n name?: string;\n /** Specifies the locale for i18n support */\n locale?: string;\n /**\n * If enabled, after opening select popper view will be scrolled to selected option or, if there are multiple selected options, to the first selected option.\n * @default true\n */\n scrollToSelected?: boolean;\n } & ({\n tag?: never;\n /**\n * Default type for size from BaseTriggerProps if there is no customization via `tag`.\n */\n size?: BaseTriggerProps['size'];\n } | {});\n\nexport type SelectOptionProps = DropdownMenuItemProps & {\n /**\n * Enables selected state\n */\n selected?: boolean;\n /** Value of the option */\n value: string | number;\n};\n\nexport type SelectOptionCheckboxProps = BoxProps & {\n /** Checkbox theme */\n theme?: string;\n /** Visual indeterminate state */\n indeterminate?: boolean;\n /** Controls the selected state */\n selected?: boolean;\n};\n\ndeclare const InputSearch: Intergalactic.Component<'div', SelectInputSearch> & {\n SearchIcon: typeof Input.Addon;\n Value: typeof Input.Value;\n Clear: typeof Input.Addon;\n};\n\nexport type SelectContext = DropdownMenuContext & {\n getOptionProps: PropGetterFn;\n getOptionCheckboxProps: PropGetterFn;\n getDividerProps: PropGetterFn;\n};\n\nexport type SelectHandlers = DropdownMenuHandlers & {\n value: (index: SelectValue) => void;\n};\n\ntype IntergalacticSelectComponent<PropsExtending = {}> = (<\n Value extends SelectValue,\n Tag extends Intergalactic.Tag = 'div',\n>(\n props: Intergalactic.InternalTypings.ComponentProps<\n Tag,\n 'div',\n SelectProps<Value>,\n SelectContext,\n [handlers: SelectHandlers]\n > &\n PropsExtending,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\nIntergalactic.InternalTypings.ComponentAdditive<'div', 'div', SelectProps>;\n\ndeclare const Select: IntergalacticSelectComponent & {\n Trigger: Intergalactic.Component<\n typeof Dropdown.Trigger,\n DropdownMenuTriggerProps & (ButtonTriggerProps | LinkTriggerProps),\n {},\n [handlers: SelectHandlers]\n > & {\n Addon: typeof ButtonTrigger.Addon;\n Text: typeof ButtonTrigger.Text;\n };\n Popper: typeof DropdownMenu.Popper;\n List: typeof DropdownMenu.List;\n Menu: typeof DropdownMenu.Menu;\n Group: typeof Dropdown.Group;\n Option: Intergalactic.Component<\n 'option',\n SelectOptionProps,\n SelectContext,\n [handlers: SelectHandlers]\n > & {\n Addon: typeof DropdownMenu.Item.Addon;\n Checkbox: Intergalactic.Component<'div', SelectOptionCheckboxProps>;\n Content: typeof Flex;\n Text: typeof Text;\n Hint: typeof Flex;\n };\n Divider: typeof Divider;\n InputSearch: typeof InputSearch;\n Input: typeof InputSearch;\n};\n\ndeclare const wrapSelect: <PropsExtending extends {}>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticSelectComponent>\n > &\n PropsExtending,\n ) => React.ReactNode,\n) => IntergalacticSelectComponent<PropsExtending>;\n\nexport { InputSearch, wrapSelect };\nexport default Select;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","InputSearch"],"sources":["../../src/index.js"],"sourcesContent":["export { default as InputSearch } from './InputSearch';\nexport { default } from './Select';\nexport * from './Select';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,WAAW,QAAQ,eAAe;AACtD,SAASD,OAAO,QAAQ,UAAU;AAClC,cAAc,UAAU"}
1
+ {"version":3,"file":"index.js","names":["default","InputSearch"],"sources":["../../src/index.js"],"sourcesContent":["export { default as InputSearch } from './InputSearch';\nexport { default } from './Select';\nexport * from './Select';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,WAAW,QAAQ,eAAe;AACtD,SAASD,OAAO,QAAQ,UAAU;AAClC,cAAc,UAAU","ignoreList":[]}
@@ -6,12 +6,12 @@ import it from './it.json';
6
6
  import ja from './ja.json';
7
7
  import ko from './ko.json';
8
8
  import nl from './nl.json';
9
+ import pl from './pl.json';
9
10
  import pt from './pt.json';
11
+ import sv from './sv.json';
10
12
  import tr from './tr.json';
11
13
  import vi from './vi.json';
12
14
  import zh from './zh.json';
13
- import pl from './pl.json';
14
- import sv from './sv.json';
15
15
  export var localizedMessages = {
16
16
  de: de,
17
17
  en: en,
@@ -1 +1 @@
1
- {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","nl","pt","tr","vi","zh","pl","sv","localizedMessages"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pt from './pt.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\nimport pl from './pl.json';\nimport sv from './sv.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,IAAMC,iBAAiB,GAAG;EAC/Bd,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA;AACF,CAAC"}
1
+ {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","nl","pl","pt","sv","tr","vi","zh","localizedMessages"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pl from './pl.json';\nimport pt from './pt.json';\nimport sv from './sv.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,IAAMC,iBAAiB,GAAG;EAC/Bd,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFC,EAAE,EAAFA,EAAE;EACFL,EAAE,EAAFA,EAAE;EACFE,EAAE,EAAFA;AACF,CAAC","ignoreList":[]}
@@ -1,61 +1,58 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/esm/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
4
+ import _callSuper from "@babel/runtime/helpers/esm/callSuper";
5
5
  import _inherits from "@babel/runtime/helpers/esm/inherits";
6
- import _createSuper from "@babel/runtime/helpers/esm/createSuper";
7
6
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
8
- import { sstyled } from "@semcore/utils/lib/core/index";
9
- import createComponent, { sstyled as sstyled$1, assignProps, Component } from "@semcore/core";
10
- import React from "react";
11
- import SearchM from "@semcore/icon/Search/m";
7
+ import { sstyled, assignProps, Component, createComponent } from "@semcore/core";
8
+ import { ButtonLink } from "@semcore/button";
9
+ import i18nEnhance from "@semcore/core/lib/utils/enhances/i18nEnhance";
12
10
  import CloseM from "@semcore/icon/Close/m";
11
+ import SearchM from "@semcore/icon/Search/m";
13
12
  import Input from "@semcore/input";
14
- import { ButtonLink } from "@semcore/button";
13
+ import React from "react";
15
14
  import { selectContext } from "./context.mjs";
16
- import i18nEnhance from "@semcore/utils/lib/enhances/i18nEnhance";
17
15
  import { localizedMessages } from "./translations/__intergalactic-dynamic-locales.mjs";
18
16
  /*!__reshadow-styles__:"./style/input-search.shadow.css"*/
19
17
  var style = (
20
18
  /*__reshadow_css_start__*/
21
19
  (sstyled.insert(
22
20
  /*__inner_css_start__*/
23
- ".___SInputSearch_q1zk7_gg_._size_m_q1zk7_gg_{height:32px}.___SSearchClear_q1zk7_gg_{padding:0 var(--intergalactic-spacing-2x, 8px)}.___SSearchClear_q1zk7_gg_.__hide_q1zk7_gg_{visibility:hidden}.___SOutline_q1zk7_gg_{top:-1px;left:-1px;width:100%;border-radius:var(--intergalactic-control-rounded, 6px) var(--intergalactic-control-rounded, 6px)0 0;box-sizing:content-box}",
21
+ ".___SInputSearch_1glfy_gg_._size_m_1glfy_gg_{height:32px}.___SSearchClear_1glfy_gg_{padding:0 var(--intergalactic-spacing-2x, 8px)}.___SSearchClear_1glfy_gg_.__hide_1glfy_gg_{visibility:hidden}.___SOutline_1glfy_gg_{top:-1px;left:-1px;width:100%;border-radius:var(--intergalactic-control-rounded, 6px) var(--intergalactic-control-rounded, 6px)0 0;box-sizing:content-box}",
24
22
  /*__inner_css_end__*/
25
- "q1zk7_gg_"
23
+ "1glfy_gg_"
26
24
  ), /*__reshadow_css_end__*/
27
25
  {
28
- "__SInputSearch": "___SInputSearch_q1zk7_gg_",
29
- "_size_m": "_size_m_q1zk7_gg_",
30
- "__SSearchClear": "___SSearchClear_q1zk7_gg_",
31
- "_hide": "__hide_q1zk7_gg_",
32
- "__SOutline": "___SOutline_q1zk7_gg_"
26
+ "__SInputSearch": "___SInputSearch_1glfy_gg_",
27
+ "_size_m": "_size_m_1glfy_gg_",
28
+ "__SSearchClear": "___SSearchClear_1glfy_gg_",
29
+ "_hide": "__hide_1glfy_gg_",
30
+ "__SOutline": "___SOutline_1glfy_gg_"
33
31
  })
34
32
  );
35
- var InputSearchRoot = /* @__PURE__ */ function(_Component) {
36
- _inherits(InputSearchRoot2, _Component);
37
- var _super = _createSuper(InputSearchRoot2);
33
+ var InputSearchRoot = /* @__PURE__ */ (function(_Component) {
38
34
  function InputSearchRoot2() {
39
35
  var _this;
40
36
  _classCallCheck(this, InputSearchRoot2);
41
37
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
42
38
  args[_key] = arguments[_key];
43
39
  }
44
- _this = _super.call.apply(_super, [this].concat(args));
45
- _defineProperty(_assertThisInitialized(_this), "inputRef", /* @__PURE__ */ React.createRef());
46
- _defineProperty(_assertThisInitialized(_this), "closeIconRef", /* @__PURE__ */ React.createRef());
47
- _defineProperty(_assertThisInitialized(_this), "handleClear", function(e) {
40
+ _this = _callSuper(this, InputSearchRoot2, [].concat(args));
41
+ _defineProperty(_this, "inputRef", /* @__PURE__ */ React.createRef());
42
+ _defineProperty(_this, "closeIconRef", /* @__PURE__ */ React.createRef());
43
+ _defineProperty(_this, "handleClear", function(e) {
48
44
  _this.handlers.value("", e);
49
45
  setTimeout(function() {
50
46
  if (document.activeElement === document.body || document.activeElement === _this.closeIconRef.current) {
51
47
  var _this$inputRef$curren;
52
- (_this$inputRef$curren = _this.inputRef.current) === null || _this$inputRef$curren === void 0 ? void 0 : _this$inputRef$curren.focus();
48
+ (_this$inputRef$curren = _this.inputRef.current) === null || _this$inputRef$curren === void 0 || _this$inputRef$curren.focus();
53
49
  }
54
50
  }, 0);
55
51
  });
56
52
  return _this;
57
53
  }
58
- _createClass(InputSearchRoot2, [{
54
+ _inherits(InputSearchRoot2, _Component);
55
+ return _createClass(InputSearchRoot2, [{
59
56
  key: "uncontrolledProps",
60
57
  value: function uncontrolledProps() {
61
58
  return {
@@ -65,25 +62,27 @@ var InputSearchRoot = /* @__PURE__ */ function(_Component) {
65
62
  }, {
66
63
  key: "getValueProps",
67
64
  value: function getValueProps() {
68
- var getI18nText = this.asProps.getI18nText;
65
+ var _this$asProps = this.asProps, value = _this$asProps.value, onChange = _this$asProps.onChange, getI18nText = _this$asProps.getI18nText, hasChildren = _this$asProps.children;
69
66
  return {
70
- autoFocus: true,
71
- ref: this.inputRef,
72
- placeholder: getI18nText("Select.InputSearch.Value:placeholder"),
67
+ value,
68
+ "onChange": hasChildren ? onChange : void 0,
69
+ "autoFocus": true,
70
+ "ref": this.inputRef,
71
+ "placeholder": getI18nText("Select.InputSearch.Value:placeholder"),
73
72
  "aria-label": getI18nText("Select.InputSearch.Value:aria-label")
74
73
  };
75
74
  }
76
75
  }, {
77
76
  key: "getClearProps",
78
77
  value: function getClearProps() {
79
- var _this$asProps = this.asProps, value = _this$asProps.value, getI18nText = _this$asProps.getI18nText;
78
+ var _this$asProps2 = this.asProps, value = _this$asProps2.value, getI18nText = _this$asProps2.getI18nText;
80
79
  return {
81
- ref: this.closeIconRef,
80
+ "ref": this.closeIconRef,
82
81
  /* hide through css because the width of the input changes */
83
- hide: !value,
82
+ "hide": !value,
84
83
  "aria-hidden": !value,
85
84
  "aria-label": getI18nText("clearSearch"),
86
- onClick: this.handleClear
85
+ "onClick": this.handleClear
87
86
  };
88
87
  }
89
88
  }, {
@@ -92,15 +91,14 @@ var InputSearchRoot = /* @__PURE__ */ function(_Component) {
92
91
  var _ref = this.asProps, _ref5;
93
92
  var Value = InputSearch.Value;
94
93
  var SInputSearch = Input;
95
- var _this$asProps2 = this.asProps, size = _this$asProps2.size, styles = _this$asProps2.styles, hasChildren = _this$asProps2.children, Children = _this$asProps2.Children;
96
- return _ref5 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SInputSearch, _ref5.cn("SInputSearch", {
94
+ var _this$asProps3 = this.asProps, size = _this$asProps3.size, styles = _this$asProps3.styles, hasChildren = _this$asProps3.children, Children = _this$asProps3.Children;
95
+ return _ref5 = sstyled(styles), /* @__PURE__ */ React.createElement(SInputSearch, _ref5.cn("SInputSearch", {
97
96
  "size": size || this.context.size || "m",
98
97
  "styles": styles
99
98
  }), hasChildren ? /* @__PURE__ */ React.createElement(Children, _ref5.cn("Children", {})) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InputSearch.SearchIcon, null), /* @__PURE__ */ React.createElement(Value, _ref5.cn("Value", _objectSpread({}, assignProps({}, _ref)))), /* @__PURE__ */ React.createElement(InputSearch.Clear, null)));
100
99
  }
101
100
  }]);
102
- return InputSearchRoot2;
103
- }(Component);
101
+ })(Component);
104
102
  _defineProperty(InputSearchRoot, "displayName", "InputSearch");
105
103
  _defineProperty(InputSearchRoot, "style", style);
106
104
  _defineProperty(InputSearchRoot, "enhance", [i18nEnhance(localizedMessages)]);
@@ -110,27 +108,27 @@ _defineProperty(InputSearchRoot, "defaultProps", {
110
108
  locale: "en"
111
109
  });
112
110
  _defineProperty(InputSearchRoot, "contextType", selectContext);
113
- var SearchIcon = function SearchIcon2(props) {
111
+ function SearchIcon(props) {
114
112
  var _ref2 = arguments[0], _ref6;
115
113
  var SSearchIcon = Input.Addon;
116
114
  var styles = props.styles;
117
- return _ref6 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SSearchIcon, _ref6.cn("SSearchIcon", _objectSpread({}, assignProps({}, _ref2))), /* @__PURE__ */ React.createElement(SearchM, _ref6.cn("SearchM", {})));
118
- };
119
- var SearchValue = function SearchValue2(props) {
115
+ return _ref6 = sstyled(styles), /* @__PURE__ */ React.createElement(SSearchIcon, _ref6.cn("SSearchIcon", _objectSpread({}, assignProps({}, _ref2))), /* @__PURE__ */ React.createElement(SearchM, _ref6.cn("SearchM", {})));
116
+ }
117
+ function SearchValue(props) {
120
118
  var _ref3 = arguments[0], _ref7;
121
119
  var SSearchValue = Input.Value;
122
120
  var styles = props.styles;
123
- return _ref7 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SSearchValue, _ref7.cn("SSearchValue", _objectSpread({}, assignProps({}, _ref3))));
124
- };
125
- var SearchClear = function SearchClear2(props) {
121
+ return _ref7 = sstyled(styles), /* @__PURE__ */ React.createElement(SSearchValue, _ref7.cn("SSearchValue", _objectSpread({}, assignProps({}, _ref3))));
122
+ }
123
+ function SearchClear(props) {
126
124
  var _ref4 = arguments[0], _ref8;
127
125
  var SSearchClear = ButtonLink;
128
126
  var styles = props.styles;
129
- return _ref8 = sstyled$1(styles), /* @__PURE__ */ React.createElement(SSearchClear, _ref8.cn("SSearchClear", _objectSpread({}, assignProps({
127
+ return _ref8 = sstyled(styles), /* @__PURE__ */ React.createElement(SSearchClear, _ref8.cn("SSearchClear", _objectSpread({}, assignProps({
130
128
  "addonLeft": CloseM,
131
129
  "use": "secondary"
132
130
  }, _ref4))));
133
- };
131
+ }
134
132
  var InputSearch = createComponent(InputSearchRoot, {
135
133
  SearchIcon,
136
134
  Value: SearchValue,