@semcore/select 3.10.3 → 4.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [3.10.3] - 2023-06-30
5
+ ## [4.0.0] - 2023-07-15
6
6
 
7
- ### Changed
7
+ ### Break
8
8
 
9
- - Version patch update due to children dependencies update (`@semcore/base-trigger` [3.12.1 ~> 3.12.2], `@semcore/checkbox` [6.5.8 ~> 6.5.9], `@semcore/divider` [3.2.32 ~> 3.2.33], `@semcore/dropdown-menu` [3.9.6 ~> 3.9.7], `@semcore/flex-box` [4.7.32 ~> 4.7.33], `@semcore/icon` [3.16.0 ~> 3.16.1], `@semcore/input` [3.7.1 ~> 3.7.2], `@semcore/utils` [3.54.0 ~> 3.54.1]).
9
+ - Strict, backward incompatible typings.
10
10
 
11
11
  ## [3.10.2] - 2023-06-28
12
12
 
@@ -22,12 +22,12 @@ var _context = require("./context");
22
22
  var _i18nEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/i18nEnhance"));
23
23
  var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
24
24
  /*__reshadow-styles__:"./style/input-search.shadow.css"*/
25
- var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SInputSearch_eh8xa_gg_._size_m_eh8xa_gg_{height:32px}.___SClose_eh8xa_gg_.__hide_eh8xa_gg_{visibility:hidden}.___SOutline_eh8xa_gg_{top:-1px;left:-1px;width:100%;border-radius:var(--intergalactic-control-rounded, 6px) var(--intergalactic-control-rounded, 6px)0 0}" /*__inner_css_end__*/, "eh8xa_gg_") /*__reshadow_css_end__*/, {
26
- "__SInputSearch": "___SInputSearch_eh8xa_gg_",
27
- "_size_m": "_size_m_eh8xa_gg_",
28
- "__SClose": "___SClose_eh8xa_gg_",
29
- "_hide": "__hide_eh8xa_gg_",
30
- "__SOutline": "___SOutline_eh8xa_gg_"
25
+ var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SInputSearch_fmjeo_gg_._size_m_fmjeo_gg_{height:32px}.___SClose_fmjeo_gg_.__hide_fmjeo_gg_{visibility:hidden}.___SOutline_fmjeo_gg_{top:-1px;left:-1px;width:100%;border-radius:var(--intergalactic-control-rounded, 6px) var(--intergalactic-control-rounded, 6px)0 0}" /*__inner_css_end__*/, "fmjeo_gg_") /*__reshadow_css_end__*/, {
26
+ "__SInputSearch": "___SInputSearch_fmjeo_gg_",
27
+ "_size_m": "_size_m_fmjeo_gg_",
28
+ "__SClose": "___SClose_fmjeo_gg_",
29
+ "_hide": "__hide_fmjeo_gg_",
30
+ "__SOutline": "___SOutline_fmjeo_gg_"
31
31
  });
32
32
  var sizeToIcon = {
33
33
  m: [_m["default"], _m2["default"]],
package/lib/cjs/Select.js CHANGED
@@ -36,13 +36,13 @@ var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynam
36
36
  var _useFocusLock = require("@semcore/utils/lib/use/useFocusLock");
37
37
  var _excluded = ["Children", "options", "multiselect", "value"];
38
38
  /*__reshadow-styles__:"./style/select.shadow.css"*/
39
- var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SOptionCheckbox_1wlyc_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-right:var(--intergalactic-spacing-2x, 8px);margin-bottom:auto;position:relative;flex-shrink:0;width:16px;height:16px}.___SOptionCheckbox_1wlyc_gg_::before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--intergalactic-bg-primary-neutral, #ffffff);border:1px solid;border-radius:var(--intergalactic-addon-rounded, 4px);border-color:var(--intergalactic-border-primary, #c4c7cf)}.___SOptionCheckbox_1wlyc_gg_::after{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;margin:0 var(--intergalactic-spacing-05x, 2px);background-repeat:no-repeat;background-position:center center;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iNyIgdmlld0JveD0iMCAwIDEwIDciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04LjI1IDFMNCA1LjI1TDEuNzUgMyIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==)}.___SOptionCheckbox_1wlyc_gg_._size_l_1wlyc_gg_{width:20px;height:20px}.___SOptionCheckbox_1wlyc_gg_._size_l_1wlyc_gg_::after{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMSAxLjVMNC43NSA3Ljc1TDEgNCIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==)}.___SOptionCheckbox_1wlyc_gg_.__checked_1wlyc_gg_:before{background-color:var(--intergalactic-control-primary-info, #008ff8);border-color:var(--intergalactic-control-primary-info, #008ff8)}.___SOptionCheckbox_1wlyc_gg_.__theme_1wlyc_gg_:before{border-color:var(--theme_1wlyc)}.___SOptionCheckbox_1wlyc_gg_.__theme_1wlyc_gg_.__checked_1wlyc_gg_:before{background-color:var(--theme_1wlyc);border-color:var(--theme_1wlyc)}.___SOptionCheckbox_1wlyc_gg_.__selected_1wlyc_gg_{background-color:var(--intergalactic-dropdown-menu-item-selected, rgba(196, 229, 254, 0.7))}@media (hover:hover){.___SOptionCheckbox_1wlyc_gg_.__selected_1wlyc_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-selected-hover, #c4e5fe)}}" /*__inner_css_end__*/, "1wlyc_gg_") /*__reshadow_css_end__*/, {
40
- "__SOptionCheckbox": "___SOptionCheckbox_1wlyc_gg_",
41
- "_size_l": "_size_l_1wlyc_gg_",
42
- "_checked": "__checked_1wlyc_gg_",
43
- "_theme": "__theme_1wlyc_gg_",
44
- "--theme": "--theme_1wlyc",
45
- "_selected": "__selected_1wlyc_gg_"
39
+ var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SOptionCheckbox_1htee_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-right:var(--intergalactic-spacing-2x, 8px);margin-bottom:auto;position:relative;flex-shrink:0;width:16px;height:16px}.___SOptionCheckbox_1htee_gg_::before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--intergalactic-bg-primary-neutral, #ffffff);border:1px solid;border-radius:var(--intergalactic-addon-rounded, 4px);border-color:var(--intergalactic-border-primary, #c4c7cf)}.___SOptionCheckbox_1htee_gg_::after{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;margin:0 var(--intergalactic-spacing-05x, 2px);background-repeat:no-repeat;background-position:center center;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iNyIgdmlld0JveD0iMCAwIDEwIDciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04LjI1IDFMNCA1LjI1TDEuNzUgMyIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==)}.___SOptionCheckbox_1htee_gg_._size_l_1htee_gg_{width:20px;height:20px}.___SOptionCheckbox_1htee_gg_._size_l_1htee_gg_::after{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMSAxLjVMNC43NSA3Ljc1TDEgNCIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==)}.___SOptionCheckbox_1htee_gg_.__checked_1htee_gg_:before{background-color:var(--intergalactic-control-primary-info, #008ff8);border-color:var(--intergalactic-control-primary-info, #008ff8)}.___SOptionCheckbox_1htee_gg_.__theme_1htee_gg_:before{border-color:var(--theme_1htee)}.___SOptionCheckbox_1htee_gg_.__theme_1htee_gg_.__checked_1htee_gg_:before{background-color:var(--theme_1htee);border-color:var(--theme_1htee)}.___SOptionCheckbox_1htee_gg_.__selected_1htee_gg_{background-color:var(--intergalactic-dropdown-menu-item-selected, rgba(196, 229, 254, 0.7))}@media (hover:hover){.___SOptionCheckbox_1htee_gg_.__selected_1htee_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-selected-hover, #c4e5fe)}}" /*__inner_css_end__*/, "1htee_gg_") /*__reshadow_css_end__*/, {
40
+ "__SOptionCheckbox": "___SOptionCheckbox_1htee_gg_",
41
+ "_size_l": "_size_l_1htee_gg_",
42
+ "_checked": "__checked_1htee_gg_",
43
+ "_theme": "__theme_1htee_gg_",
44
+ "--theme": "--theme_1htee",
45
+ "_selected": "__selected_1htee_gg_"
46
46
  });
47
47
  function isSelectedOption(value, valueOption) {
48
48
  return Array.isArray(value) ? value.includes(valueOption) : valueOption === value;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ComponentProps } from 'react';\nimport { CProps, Merge, PropGetterFn, ReturnEl } from '@semcore/core';\nimport DropdownMenu, {\n IDropdownMenuContext,\n IDropdownMenuItemProps,\n IDropdownMenuProps,\n IDropdownMenuHandlers,\n} from '@semcore/dropdown-menu';\nimport { ButtonTrigger, IBaseTriggerProps } from '@semcore/base-trigger';\nimport Divider from '@semcore/divider';\nimport { IInputValueProps } from '@semcore/input';\nimport { IBoxProps } from '@semcore/flex-box';\n\nexport interface ISelectInputSearch extends IInputValueProps {}\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 interface ISelectProps<T extends SelectValue = SelectValue>\n extends IDropdownMenuProps,\n IBaseTriggerProps {\n /**\n * Multiple select\n */\n multiselect?: boolean;\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?: (value: T, e: React.SyntheticEvent) => boolean | void;\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 * Input name\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\nexport interface ISelectOption {\n value?: string | number;\n [key: string]: any;\n}\n\nexport interface ISelectOptionProps extends IDropdownMenuItemProps {\n /** Value of the option */\n value: string | number;\n}\n\nexport interface ISelectOptionCheckboxProps extends ISelectOptionProps {\n /** Checkbox theme */\n theme?: string;\n}\n\ndeclare const InputSearch: <T>(props: ISelectInputSearch & T) => ReturnEl;\n\nexport interface ISelectContext extends IDropdownMenuContext {\n getOptionProps: PropGetterFn;\n getOptionCheckboxProps: PropGetterFn;\n getDividerProps: PropGetterFn;\n}\n\nexport interface ISelectHandlers extends IDropdownMenuHandlers {\n value: (index: SelectValue) => void;\n}\n\ndeclare const Select: (<T, V extends SelectValue = SelectValue>(\n props: CProps<ISelectProps<V> & T, ISelectContext, ISelectHandlers>,\n) => ReturnEl) & {\n Trigger: (<T>(\n props: Merge<\n ComponentProps<typeof DropdownMenu.Trigger>,\n ComponentProps<typeof ButtonTrigger>\n > &\n T,\n ) => ReturnEl) & {\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 Option: (<T>(\n props: CProps<ISelectOptionProps & T, ISelectContext, ISelectHandlers>,\n ) => ReturnEl) & {\n Addon: typeof DropdownMenu.Item.Addon;\n Checkbox: <T>(\n props: CProps<IBoxProps & { theme?: string; selected?: boolean } & T>,\n ) => ReturnEl;\n };\n OptionTitle: typeof DropdownMenu.ItemTitle;\n OptionHint: typeof DropdownMenu.ItemHint;\n Divider: typeof Divider;\n InputSearch: typeof InputSearch;\n Input: typeof InputSearch;\n};\n\nexport { InputSearch };\nexport default Select;\n"],"mappings":""}
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 { ButtonTrigger, BaseTriggerProps, ButtonTriggerProps } from '@semcore/base-trigger';\nimport Divider from '@semcore/divider';\nimport { InputValueProps } from '@semcore/input';\nimport { BoxProps } 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 * Multiple select\n */\n multiselect?: boolean;\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 * Input name\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 /** Value of the option */\n value: string | number;\n};\n\n/** @deprecated */\nexport interface ISelectOptionCheckboxProps extends SelectOptionCheckboxProps, UnknownProperties {}\nexport type SelectOptionCheckboxProps = SelectOptionProps & {\n /** Checkbox theme */\n theme?: string;\n};\n\ndeclare const InputSearch: Intergalactic.Component<'div', SelectInputSearch>;\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 = (<\n Value extends SelectValue,\n Tag extends Intergalactic.Tag = 'div',\n>(\n props: Intergalactic.InternalTypings.ComponentProps<\n Tag,\n SelectProps<Value>,\n SelectContext,\n [handlers: SelectHandlers]\n >,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<'div'>;\n\ndeclare const Select: IntergalacticSelectComponent & {\n Trigger: Intergalactic.Component<\n 'div',\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 Option: Intergalactic.Component<\n 'option',\n SelectOptionProps,\n SelectContext,\n [handlers: SelectHandlers]\n > & {\n Addon: typeof DropdownMenu.Item.Addon;\n Checkbox: Intergalactic.Component<'div', BoxProps & { theme?: string; selected?: boolean }>;\n };\n OptionTitle: typeof DropdownMenu.ItemTitle;\n OptionHint: typeof DropdownMenu.ItemHint;\n Divider: typeof Divider;\n InputSearch: typeof InputSearch;\n Input: typeof InputSearch;\n};\n\nexport { InputSearch };\nexport default Select;\n"],"mappings":""}
@@ -16,12 +16,12 @@ import { selectContext } from './context';
16
16
  import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
17
17
  import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
18
18
  /*__reshadow-styles__:"./style/input-search.shadow.css"*/
19
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SInputSearch_eh8xa_gg_._size_m_eh8xa_gg_{height:32px}.___SClose_eh8xa_gg_.__hide_eh8xa_gg_{visibility:hidden}.___SOutline_eh8xa_gg_{top:-1px;left:-1px;width:100%;border-radius:var(--intergalactic-control-rounded, 6px) var(--intergalactic-control-rounded, 6px)0 0}" /*__inner_css_end__*/, "eh8xa_gg_") /*__reshadow_css_end__*/, {
20
- "__SInputSearch": "___SInputSearch_eh8xa_gg_",
21
- "_size_m": "_size_m_eh8xa_gg_",
22
- "__SClose": "___SClose_eh8xa_gg_",
23
- "_hide": "__hide_eh8xa_gg_",
24
- "__SOutline": "___SOutline_eh8xa_gg_"
19
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SInputSearch_fmjeo_gg_._size_m_fmjeo_gg_{height:32px}.___SClose_fmjeo_gg_.__hide_fmjeo_gg_{visibility:hidden}.___SOutline_fmjeo_gg_{top:-1px;left:-1px;width:100%;border-radius:var(--intergalactic-control-rounded, 6px) var(--intergalactic-control-rounded, 6px)0 0}" /*__inner_css_end__*/, "fmjeo_gg_") /*__reshadow_css_end__*/, {
20
+ "__SInputSearch": "___SInputSearch_fmjeo_gg_",
21
+ "_size_m": "_size_m_fmjeo_gg_",
22
+ "__SClose": "___SClose_fmjeo_gg_",
23
+ "_hide": "__hide_fmjeo_gg_",
24
+ "__SOutline": "___SOutline_fmjeo_gg_"
25
25
  });
26
26
  var sizeToIcon = {
27
27
  m: [SearchM, CloseM],
package/lib/es6/Select.js CHANGED
@@ -33,13 +33,13 @@ import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
33
33
  import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
34
34
  import { setFocus } from '@semcore/utils/lib/use/useFocusLock';
35
35
  /*__reshadow-styles__:"./style/select.shadow.css"*/
36
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SOptionCheckbox_1wlyc_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-right:var(--intergalactic-spacing-2x, 8px);margin-bottom:auto;position:relative;flex-shrink:0;width:16px;height:16px}.___SOptionCheckbox_1wlyc_gg_::before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--intergalactic-bg-primary-neutral, #ffffff);border:1px solid;border-radius:var(--intergalactic-addon-rounded, 4px);border-color:var(--intergalactic-border-primary, #c4c7cf)}.___SOptionCheckbox_1wlyc_gg_::after{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;margin:0 var(--intergalactic-spacing-05x, 2px);background-repeat:no-repeat;background-position:center center;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iNyIgdmlld0JveD0iMCAwIDEwIDciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04LjI1IDFMNCA1LjI1TDEuNzUgMyIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==)}.___SOptionCheckbox_1wlyc_gg_._size_l_1wlyc_gg_{width:20px;height:20px}.___SOptionCheckbox_1wlyc_gg_._size_l_1wlyc_gg_::after{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMSAxLjVMNC43NSA3Ljc1TDEgNCIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==)}.___SOptionCheckbox_1wlyc_gg_.__checked_1wlyc_gg_:before{background-color:var(--intergalactic-control-primary-info, #008ff8);border-color:var(--intergalactic-control-primary-info, #008ff8)}.___SOptionCheckbox_1wlyc_gg_.__theme_1wlyc_gg_:before{border-color:var(--theme_1wlyc)}.___SOptionCheckbox_1wlyc_gg_.__theme_1wlyc_gg_.__checked_1wlyc_gg_:before{background-color:var(--theme_1wlyc);border-color:var(--theme_1wlyc)}.___SOptionCheckbox_1wlyc_gg_.__selected_1wlyc_gg_{background-color:var(--intergalactic-dropdown-menu-item-selected, rgba(196, 229, 254, 0.7))}@media (hover:hover){.___SOptionCheckbox_1wlyc_gg_.__selected_1wlyc_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-selected-hover, #c4e5fe)}}" /*__inner_css_end__*/, "1wlyc_gg_") /*__reshadow_css_end__*/, {
37
- "__SOptionCheckbox": "___SOptionCheckbox_1wlyc_gg_",
38
- "_size_l": "_size_l_1wlyc_gg_",
39
- "_checked": "__checked_1wlyc_gg_",
40
- "_theme": "__theme_1wlyc_gg_",
41
- "--theme": "--theme_1wlyc",
42
- "_selected": "__selected_1wlyc_gg_"
36
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SOptionCheckbox_1htee_gg_{margin-top:var(--intergalactic-spacing-05x, 2px);margin-right:var(--intergalactic-spacing-2x, 8px);margin-bottom:auto;position:relative;flex-shrink:0;width:16px;height:16px}.___SOptionCheckbox_1htee_gg_::before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--intergalactic-bg-primary-neutral, #ffffff);border:1px solid;border-radius:var(--intergalactic-addon-rounded, 4px);border-color:var(--intergalactic-border-primary, #c4c7cf)}.___SOptionCheckbox_1htee_gg_::after{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;margin:0 var(--intergalactic-spacing-05x, 2px);background-repeat:no-repeat;background-position:center center;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iNyIgdmlld0JveD0iMCAwIDEwIDciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04LjI1IDFMNCA1LjI1TDEuNzUgMyIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==)}.___SOptionCheckbox_1htee_gg_._size_l_1htee_gg_{width:20px;height:20px}.___SOptionCheckbox_1htee_gg_._size_l_1htee_gg_::after{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOSIgdmlld0JveD0iMCAwIDEyIDkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xMSAxLjVMNC43NSA3Ljc1TDEgNCIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==)}.___SOptionCheckbox_1htee_gg_.__checked_1htee_gg_:before{background-color:var(--intergalactic-control-primary-info, #008ff8);border-color:var(--intergalactic-control-primary-info, #008ff8)}.___SOptionCheckbox_1htee_gg_.__theme_1htee_gg_:before{border-color:var(--theme_1htee)}.___SOptionCheckbox_1htee_gg_.__theme_1htee_gg_.__checked_1htee_gg_:before{background-color:var(--theme_1htee);border-color:var(--theme_1htee)}.___SOptionCheckbox_1htee_gg_.__selected_1htee_gg_{background-color:var(--intergalactic-dropdown-menu-item-selected, rgba(196, 229, 254, 0.7))}@media (hover:hover){.___SOptionCheckbox_1htee_gg_.__selected_1htee_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-selected-hover, #c4e5fe)}}" /*__inner_css_end__*/, "1htee_gg_") /*__reshadow_css_end__*/, {
37
+ "__SOptionCheckbox": "___SOptionCheckbox_1htee_gg_",
38
+ "_size_l": "_size_l_1htee_gg_",
39
+ "_checked": "__checked_1htee_gg_",
40
+ "_theme": "__theme_1htee_gg_",
41
+ "--theme": "--theme_1htee",
42
+ "_selected": "__selected_1htee_gg_"
43
43
  });
44
44
  function isSelectedOption(value, valueOption) {
45
45
  return Array.isArray(value) ? value.includes(valueOption) : valueOption === value;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React, { ComponentProps } from 'react';\nimport { CProps, Merge, PropGetterFn, ReturnEl } from '@semcore/core';\nimport DropdownMenu, {\n IDropdownMenuContext,\n IDropdownMenuItemProps,\n IDropdownMenuProps,\n IDropdownMenuHandlers,\n} from '@semcore/dropdown-menu';\nimport { ButtonTrigger, IBaseTriggerProps } from '@semcore/base-trigger';\nimport Divider from '@semcore/divider';\nimport { IInputValueProps } from '@semcore/input';\nimport { IBoxProps } from '@semcore/flex-box';\n\nexport interface ISelectInputSearch extends IInputValueProps {}\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 interface ISelectProps<T extends SelectValue = SelectValue>\n extends IDropdownMenuProps,\n IBaseTriggerProps {\n /**\n * Multiple select\n */\n multiselect?: boolean;\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?: (value: T, e: React.SyntheticEvent) => boolean | void;\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 * Input name\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\nexport interface ISelectOption {\n value?: string | number;\n [key: string]: any;\n}\n\nexport interface ISelectOptionProps extends IDropdownMenuItemProps {\n /** Value of the option */\n value: string | number;\n}\n\nexport interface ISelectOptionCheckboxProps extends ISelectOptionProps {\n /** Checkbox theme */\n theme?: string;\n}\n\ndeclare const InputSearch: <T>(props: ISelectInputSearch & T) => ReturnEl;\n\nexport interface ISelectContext extends IDropdownMenuContext {\n getOptionProps: PropGetterFn;\n getOptionCheckboxProps: PropGetterFn;\n getDividerProps: PropGetterFn;\n}\n\nexport interface ISelectHandlers extends IDropdownMenuHandlers {\n value: (index: SelectValue) => void;\n}\n\ndeclare const Select: (<T, V extends SelectValue = SelectValue>(\n props: CProps<ISelectProps<V> & T, ISelectContext, ISelectHandlers>,\n) => ReturnEl) & {\n Trigger: (<T>(\n props: Merge<\n ComponentProps<typeof DropdownMenu.Trigger>,\n ComponentProps<typeof ButtonTrigger>\n > &\n T,\n ) => ReturnEl) & {\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 Option: (<T>(\n props: CProps<ISelectOptionProps & T, ISelectContext, ISelectHandlers>,\n ) => ReturnEl) & {\n Addon: typeof DropdownMenu.Item.Addon;\n Checkbox: <T>(\n props: CProps<IBoxProps & { theme?: string; selected?: boolean } & T>,\n ) => ReturnEl;\n };\n OptionTitle: typeof DropdownMenu.ItemTitle;\n OptionHint: typeof DropdownMenu.ItemHint;\n Divider: typeof Divider;\n InputSearch: typeof InputSearch;\n Input: typeof InputSearch;\n};\n\nexport { InputSearch };\nexport default Select;\n"],"mappings":""}
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 { ButtonTrigger, BaseTriggerProps, ButtonTriggerProps } from '@semcore/base-trigger';\nimport Divider from '@semcore/divider';\nimport { InputValueProps } from '@semcore/input';\nimport { BoxProps } 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 * Multiple select\n */\n multiselect?: boolean;\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 * Input name\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 /** Value of the option */\n value: string | number;\n};\n\n/** @deprecated */\nexport interface ISelectOptionCheckboxProps extends SelectOptionCheckboxProps, UnknownProperties {}\nexport type SelectOptionCheckboxProps = SelectOptionProps & {\n /** Checkbox theme */\n theme?: string;\n};\n\ndeclare const InputSearch: Intergalactic.Component<'div', SelectInputSearch>;\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 = (<\n Value extends SelectValue,\n Tag extends Intergalactic.Tag = 'div',\n>(\n props: Intergalactic.InternalTypings.ComponentProps<\n Tag,\n SelectProps<Value>,\n SelectContext,\n [handlers: SelectHandlers]\n >,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<'div'>;\n\ndeclare const Select: IntergalacticSelectComponent & {\n Trigger: Intergalactic.Component<\n 'div',\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 Option: Intergalactic.Component<\n 'option',\n SelectOptionProps,\n SelectContext,\n [handlers: SelectHandlers]\n > & {\n Addon: typeof DropdownMenu.Item.Addon;\n Checkbox: Intergalactic.Component<'div', BoxProps & { theme?: string; selected?: boolean }>;\n };\n OptionTitle: typeof DropdownMenu.ItemTitle;\n OptionHint: typeof DropdownMenu.ItemHint;\n Divider: typeof Divider;\n InputSearch: typeof InputSearch;\n Input: typeof InputSearch;\n};\n\nexport { InputSearch };\nexport default Select;\n"],"mappings":""}
@@ -1,17 +1,20 @@
1
- import React, { ComponentProps } from 'react';
2
- import { CProps, Merge, PropGetterFn, ReturnEl } from '@semcore/core';
1
+ import React from 'react';
2
+ import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
3
3
  import DropdownMenu, {
4
- IDropdownMenuContext,
5
- IDropdownMenuItemProps,
6
- IDropdownMenuProps,
7
- IDropdownMenuHandlers,
4
+ DropdownMenuContext,
5
+ DropdownMenuItemProps,
6
+ DropdownMenuProps,
7
+ DropdownMenuHandlers,
8
+ DropdownMenuTriggerProps,
8
9
  } from '@semcore/dropdown-menu';
9
- import { ButtonTrigger, IBaseTriggerProps } from '@semcore/base-trigger';
10
+ import { ButtonTrigger, BaseTriggerProps, ButtonTriggerProps } from '@semcore/base-trigger';
10
11
  import Divider from '@semcore/divider';
11
- import { IInputValueProps } from '@semcore/input';
12
- import { IBoxProps } from '@semcore/flex-box';
12
+ import { InputValueProps } from '@semcore/input';
13
+ import { BoxProps } from '@semcore/flex-box';
13
14
 
14
- export interface ISelectInputSearch extends IInputValueProps {}
15
+ /** @deprecated */
16
+ export interface ISelectInputSearch extends SelectInputSearch, UnknownProperties {}
17
+ export type SelectInputSearch = InputValueProps & {};
15
18
 
16
19
  export type OptionValue = string | number;
17
20
  export type SelectValue = string | number | Array<string | number> | null;
@@ -22,106 +25,126 @@ export type SelectOption = {
22
25
  label?: React.ReactNode;
23
26
  };
24
27
 
25
- export interface ISelectProps<T extends SelectValue = SelectValue>
26
- extends IDropdownMenuProps,
27
- IBaseTriggerProps {
28
- /**
29
- * Multiple select
30
- */
31
- multiselect?: boolean;
32
- /**
33
- * Options array
34
- */
35
- options?: SelectOption[];
36
- /**
37
- * The value or values array selected by default when using multiselect
38
- * @type SelectValue
39
- */
40
- defaultValue?: T;
41
- /**
42
- * The selected value or values array when using multiselect
43
- * @type SelectValue
44
- */
45
- value?: T;
46
- /**
47
- * Callback on value change
48
- * @type (value: SelectValue, e: React.SyntheticEvent) => boolean | void
49
- */
50
- onChange?: (value: T, e: React.SyntheticEvent) => boolean | void;
51
- /**
52
- * Trigger placeholder at not selected value
53
- */
54
- placeholder?: React.ReactNode;
55
- /**
56
- * Trigger state
57
- */
58
- state?: 'normal' | 'valid' | 'invalid';
59
- /**
60
- * Disables select
61
- */
62
- disabled?: boolean;
63
- /**
64
- * Input name
65
- */
66
- name?: string;
67
- locale?: string;
68
- /**
69
- * 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.
70
- * @default true
71
- */
72
- scrollToSelected?: boolean;
73
- }
28
+ /** @deprecated */
29
+ export interface ISelectProps<T extends SelectValue = SelectValue> extends SelectProps<T> {}
30
+ export type SelectProps<T extends SelectValue = SelectValue> = DropdownMenuProps &
31
+ BaseTriggerProps & {
32
+ /**
33
+ * Multiple select
34
+ */
35
+ multiselect?: boolean;
36
+ /**
37
+ * Options array
38
+ */
39
+ options?: SelectOption[];
40
+ /**
41
+ * The value or values array selected by default when using multiselect
42
+ * @type SelectValue
43
+ */
44
+ defaultValue?: T;
45
+ /**
46
+ * The selected value or values array when using multiselect
47
+ * @type SelectValue
48
+ */
49
+ value?: T;
50
+ /**
51
+ * Callback on value change
52
+ * @type (value: SelectValue, e: React.SyntheticEvent) => boolean | void
53
+ */
54
+ onChange?:
55
+ | ((value: T, e: React.SyntheticEvent) => boolean | void)
56
+ | React.Dispatch<React.SetStateAction<T>>;
57
+ /**
58
+ * Trigger placeholder at not selected value
59
+ */
60
+ placeholder?: React.ReactNode;
61
+ /**
62
+ * Trigger state
63
+ */
64
+ state?: 'normal' | 'valid' | 'invalid';
65
+ /**
66
+ * Disables select
67
+ */
68
+ disabled?: boolean;
69
+ /**
70
+ * Input name
71
+ */
72
+ name?: string;
73
+ locale?: string;
74
+ /**
75
+ * 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.
76
+ * @default true
77
+ */
78
+ scrollToSelected?: boolean;
79
+ };
74
80
 
75
- export interface ISelectOption {
76
- value?: string | number;
77
- [key: string]: any;
78
- }
81
+ /** @deprecated */
82
+ export interface ISelectOption extends SelectOption, UnknownProperties {}
79
83
 
80
- export interface ISelectOptionProps extends IDropdownMenuItemProps {
84
+ /** @deprecated */
85
+ export interface ISelectOptionProps extends SelectOptionProps, UnknownProperties {}
86
+ export type SelectOptionProps = DropdownMenuItemProps & {
81
87
  /** Value of the option */
82
88
  value: string | number;
83
- }
89
+ };
84
90
 
85
- export interface ISelectOptionCheckboxProps extends ISelectOptionProps {
91
+ /** @deprecated */
92
+ export interface ISelectOptionCheckboxProps extends SelectOptionCheckboxProps, UnknownProperties {}
93
+ export type SelectOptionCheckboxProps = SelectOptionProps & {
86
94
  /** Checkbox theme */
87
95
  theme?: string;
88
- }
96
+ };
89
97
 
90
- declare const InputSearch: <T>(props: ISelectInputSearch & T) => ReturnEl;
98
+ declare const InputSearch: Intergalactic.Component<'div', SelectInputSearch>;
91
99
 
92
- export interface ISelectContext extends IDropdownMenuContext {
100
+ /** @deprecated */
101
+ export interface ISelectContext extends SelectContext, UnknownProperties {}
102
+ export type SelectContext = DropdownMenuContext & {
93
103
  getOptionProps: PropGetterFn;
94
104
  getOptionCheckboxProps: PropGetterFn;
95
105
  getDividerProps: PropGetterFn;
96
- }
106
+ };
97
107
 
98
- export interface ISelectHandlers extends IDropdownMenuHandlers {
108
+ /** @deprecated */
109
+ export interface ISelectHandlers extends SelectHandlers, UnknownProperties {}
110
+ export type SelectHandlers = DropdownMenuHandlers & {
99
111
  value: (index: SelectValue) => void;
100
- }
112
+ };
113
+
114
+ type IntergalacticSelectComponent = (<
115
+ Value extends SelectValue,
116
+ Tag extends Intergalactic.Tag = 'div',
117
+ >(
118
+ props: Intergalactic.InternalTypings.ComponentProps<
119
+ Tag,
120
+ SelectProps<Value>,
121
+ SelectContext,
122
+ [handlers: SelectHandlers]
123
+ >,
124
+ ) => Intergalactic.InternalTypings.ComponentRenderingResults) &
125
+ Intergalactic.InternalTypings.ComponentAdditive<'div'>;
101
126
 
102
- declare const Select: (<T, V extends SelectValue = SelectValue>(
103
- props: CProps<ISelectProps<V> & T, ISelectContext, ISelectHandlers>,
104
- ) => ReturnEl) & {
105
- Trigger: (<T>(
106
- props: Merge<
107
- ComponentProps<typeof DropdownMenu.Trigger>,
108
- ComponentProps<typeof ButtonTrigger>
109
- > &
110
- T,
111
- ) => ReturnEl) & {
127
+ declare const Select: IntergalacticSelectComponent & {
128
+ Trigger: Intergalactic.Component<
129
+ 'div',
130
+ DropdownMenuTriggerProps & ButtonTriggerProps,
131
+ {},
132
+ [handlers: SelectHandlers]
133
+ > & {
112
134
  Addon: typeof ButtonTrigger.Addon;
113
135
  Text: typeof ButtonTrigger.Text;
114
136
  };
115
137
  Popper: typeof DropdownMenu.Popper;
116
138
  List: typeof DropdownMenu.List;
117
139
  Menu: typeof DropdownMenu.Menu;
118
- Option: (<T>(
119
- props: CProps<ISelectOptionProps & T, ISelectContext, ISelectHandlers>,
120
- ) => ReturnEl) & {
140
+ Option: Intergalactic.Component<
141
+ 'option',
142
+ SelectOptionProps,
143
+ SelectContext,
144
+ [handlers: SelectHandlers]
145
+ > & {
121
146
  Addon: typeof DropdownMenu.Item.Addon;
122
- Checkbox: <T>(
123
- props: CProps<IBoxProps & { theme?: string; selected?: boolean } & T>,
124
- ) => ReturnEl;
147
+ Checkbox: Intergalactic.Component<'div', BoxProps & { theme?: string; selected?: boolean }>;
125
148
  };
126
149
  OptionTitle: typeof DropdownMenu.ItemTitle;
127
150
  OptionHint: typeof DropdownMenu.ItemHint;
package/package.json CHANGED
@@ -1,25 +1,25 @@
1
1
  {
2
2
  "name": "@semcore/select",
3
3
  "description": "Semrush Select Component",
4
- "version": "3.10.3",
4
+ "version": "4.0.0-beta.1",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
8
8
  "author": "UI-kit team <ui-kit-team@semrush.com>",
9
9
  "license": "MIT",
10
10
  "dependencies": {
11
- "@semcore/base-trigger": "^3.0.0",
12
- "@semcore/checkbox": "^6",
13
- "@semcore/divider": "^3",
14
- "@semcore/dropdown-menu": "^3.0.0",
15
- "@semcore/flex-box": "^4",
16
- "@semcore/icon": "2.16 - 3",
17
- "@semcore/input": "^3.0.0",
18
- "@semcore/utils": "^3.15",
11
+ "@semcore/base-trigger": "4.0.0-beta.1",
12
+ "@semcore/checkbox": "7.0.0-beta.1",
13
+ "@semcore/divider": "4.0.0-beta.1",
14
+ "@semcore/dropdown-menu": "4.0.0-beta.1",
15
+ "@semcore/flex-box": "5.0.0-beta.1",
16
+ "@semcore/icon": "4.0.0-beta.1",
17
+ "@semcore/input": "4.0.0-beta.1",
18
+ "@semcore/utils": "4.0.0-beta.1",
19
19
  "classnames": "2.2.6"
20
20
  },
21
21
  "peerDependencies": {
22
- "@semcore/core": "^1.11",
22
+ "@semcore/core": "2.0.0-beta.1",
23
23
  "react": "16.8 - 18",
24
24
  "react-dom": "16.8 - 18"
25
25
  },
@@ -30,6 +30,7 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/react": "18.0.21",
33
+ "@types/classnames": "2.2.6",
33
34
  "@guidepup/playwright": "0.6.1",
34
35
  "@playwright/test": "1.25.1",
35
36
  "@semcore/testing-utils": "1.0.0"