@rescui/select 0.15.1-RUI-280-Update-select-component-026338d06.52 → 0.15.1-RUI-280-Update-select-component-separate-components-e772abaa1.56

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.
@@ -2,8 +2,11 @@
2
2
  import React, { useRef } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import cn from 'classnames';
5
- import { useSelectState } from 'react-stately';
6
- import { useSelect, useButton, useFocusRing, mergeProps, HiddenSelect } from 'react-aria';
5
+ import { useSelectState } from '@react-stately/select';
6
+ import { useSelect, HiddenSelect } from '@react-aria/select';
7
+ import { useButton } from '@react-aria/button';
8
+ import { useFocusRing } from '@react-aria/focus';
9
+ import { mergeProps } from '@react-aria/utils';
7
10
  import { useThemeWithUndefined } from '@rescui/ui-contexts';
8
11
  import { ErrorMessage } from '@rescui/form-field';
9
12
  import { optionType, optionsGroupType, noOptionsMessageType } from './common-prop-types.js';
@@ -4,7 +4,9 @@ import PropTypes from 'prop-types';
4
4
  import cn from 'classnames';
5
5
  import { useThemeWithUndefined } from '@rescui/ui-contexts';
6
6
  import { ErrorMessage } from '@rescui/form-field';
7
- import { useField, useFocusRing, mergeProps } from 'react-aria';
7
+ import { useField } from '@react-aria/label';
8
+ import { useFocusRing } from '@react-aria/focus';
9
+ import { mergeProps } from '@react-aria/utils';
8
10
  import { nativeOptionType, nativeOptionsGroupType, noOptionsMessageType } from './common-prop-types.js';
9
11
  import { FormTriggerWrapper } from './parts/form-trigger-wrapper.js';
10
12
  import { isOptionAGroup } from './utils/is-option-a-group.js';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
- import { useFocusRing } from 'react-aria';
3
+ import { useFocusRing } from '@react-aria/focus';
4
4
  import CloseOutlineIcon from '../_virtual/close-outline.js';
5
5
  import LoadingOutlineIcon from '../_virtual/loading-outline.js';
6
6
  import DownOutlineIcon from '../_virtual/down-outline.js';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { AriaListBoxOptions } from 'react-aria';
3
- import type { ListState } from 'react-stately';
2
+ import type { ListState } from '@react-stately/list';
3
+ import type { AriaListBoxOptions } from '@react-aria/listbox';
4
4
  import type { SelectSize, SelectMode } from '../types';
5
5
  export declare type ListBoxProps<T extends object> = {
6
6
  listBoxRef?: React.RefObject<HTMLUListElement>;
@@ -1,7 +1,9 @@
1
1
  import React, { useRef } from 'react';
2
2
  import cn from 'classnames';
3
- import { useListState, Item } from 'react-stately';
4
- import { useListBox, useOption, mergeProps, useListBoxSection } from 'react-aria';
3
+ import { useListState } from '@react-stately/list';
4
+ import { Item } from '@react-stately/collections';
5
+ import { useListBox, useOption, useListBoxSection } from '@react-aria/listbox';
6
+ import { mergeProps } from '@react-aria/utils';
5
7
  import styles from '../styles/list-box.p.module.css.js';
6
8
  import { calculateMaxHeightByItems } from '../utils/calculate-max-height-by-items.js';
7
9
  import { getRealItemsCnt } from '../utils/get-real-items-cnt.js';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { SelectState } from 'react-stately';
2
+ import type { SelectState } from '@react-stately/select';
3
3
  export interface MultiTriggerProps<T extends object> {
4
4
  state: SelectState<T, 'multiple'>;
5
5
  valueProps: object;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { AriaPopoverProps } from 'react-aria';
3
- import type { OverlayTriggerState } from 'react-stately';
2
+ import type { OverlayTriggerState } from '@react-stately/overlays';
3
+ import type { AriaPopoverProps } from '@react-aria/overlays';
4
4
  import type { SelectMode } from '../types';
5
5
  export interface PopoverProps extends Omit<AriaPopoverProps, 'popoverRef' | 'isNonModal'> {
6
6
  children: React.ReactNode;
@@ -1,6 +1,8 @@
1
1
  import React, { useRef } from 'react';
2
2
  import cn from 'classnames';
3
- import { usePopover, useInteractOutside, Overlay, mergeProps, DismissButton } from 'react-aria';
3
+ import { usePopover, Overlay, DismissButton } from '@react-aria/overlays';
4
+ import { useInteractOutside } from '@react-aria/interactions';
5
+ import { mergeProps } from '@react-aria/utils';
4
6
  import styles from '../styles/popover.p.module.css.js';
5
7
  const MODE_STYLES = {
6
8
  classic: styles.classic,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { AriaListBoxOptions } from 'react-aria';
2
+ import type { AriaListBoxOptions } from '@react-aria/listbox';
3
3
  import type { Theme } from '@rescui/ui-contexts';
4
4
  import type { CommonState, SelectMode, SelectSize, AriaPlacement } from '../types';
5
5
  export declare type PopupContentProps<T extends object> = {
@@ -1,7 +1,10 @@
1
1
  import React, { useRef } from 'react';
2
2
  import cn from 'classnames';
3
- import { useSelectState } from 'react-stately';
4
- import { useSelect, useButton, useFocusRing, mergeProps, HiddenSelect } from 'react-aria';
3
+ import { useSelectState } from '@react-stately/select';
4
+ import { useSelect, HiddenSelect } from '@react-aria/select';
5
+ import { useButton } from '@react-aria/button';
6
+ import { useFocusRing } from '@react-aria/focus';
7
+ import { mergeProps } from '@react-aria/utils';
5
8
  import { PopupContent } from './parts/popup-content.js';
6
9
  import { Icons } from './parts/icons.js';
7
10
  import { FormTriggerWrapper } from './parts/form-trigger-wrapper.js';
@@ -1,8 +1,12 @@
1
1
  import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
2
2
  import React, { useRef } from 'react';
3
3
  import cn from 'classnames';
4
- import { useComboBoxState } from 'react-stately';
5
- import { useComboBox, useButton, useFocusRing, mergeProps, HiddenSelect } from 'react-aria';
4
+ import { useComboBoxState } from '@react-stately/combobox';
5
+ import { HiddenSelect } from '@react-aria/select';
6
+ import { useComboBox } from '@react-aria/combobox';
7
+ import { useButton } from '@react-aria/button';
8
+ import { useFocusRing } from '@react-aria/focus';
9
+ import { mergeProps } from '@react-aria/utils';
6
10
  import { PopupContent } from './parts/popup-content.js';
7
11
  import { Icons } from './parts/icons.js';
8
12
  import { FormTriggerWrapper } from './parts/form-trigger-wrapper.js';
@@ -1,27 +1,27 @@
1
1
  var styles = {
2
- "themeLight": "_themeLight_ml8w5m_6",
3
- "themeDark": "_themeDark_ml8w5m_9",
4
- "sizeS": "_sizeS_ml8w5m_13",
5
- "sizeM": "_sizeM_ml8w5m_16",
6
- "sizeL": "_sizeL_ml8w5m_19",
7
- "classic": "_classic_ml8w5m_23",
8
- "rock": "_rock_ml8w5m_26",
9
- "root": "_root_ml8w5m_30",
10
- "trigger": "_trigger_ml8w5m_36",
11
- "error": "_error_ml8w5m_69",
12
- "enabled": "_enabled_ml8w5m_74",
13
- "disabled": "_disabled_ml8w5m_78",
14
- "canBeMultiline": "_canBeMultiline_ml8w5m_119",
15
- "iconsWrapper": "_iconsWrapper_ml8w5m_123",
16
- "triggerText": "_triggerText_ml8w5m_138",
17
- "searchInput": "_searchInput_ml8w5m_144",
18
- "labelNotSelected": "_labelNotSelected_ml8w5m_188",
19
- "multi": "_multi_ml8w5m_202",
20
- "tagsContainer": "_tagsContainer_ml8w5m_218",
21
- "tag": "_tag_ml8w5m_218",
22
- "filledTag": "_filledTag_ml8w5m_240",
23
- "toggle": "_toggle_ml8w5m_248",
24
- "icon": "_icon_ml8w5m_123",
25
- "clearIcon": "_clearIcon_ml8w5m_315"
2
+ "themeLight": "_themeLight_1mkgp3r_6",
3
+ "themeDark": "_themeDark_1mkgp3r_9",
4
+ "sizeS": "_sizeS_1mkgp3r_13",
5
+ "sizeM": "_sizeM_1mkgp3r_16",
6
+ "sizeL": "_sizeL_1mkgp3r_19",
7
+ "classic": "_classic_1mkgp3r_23",
8
+ "rock": "_rock_1mkgp3r_26",
9
+ "root": "_root_1mkgp3r_30",
10
+ "trigger": "_trigger_1mkgp3r_36",
11
+ "error": "_error_1mkgp3r_69",
12
+ "enabled": "_enabled_1mkgp3r_74",
13
+ "disabled": "_disabled_1mkgp3r_78",
14
+ "canBeMultiline": "_canBeMultiline_1mkgp3r_119",
15
+ "iconsWrapper": "_iconsWrapper_1mkgp3r_123",
16
+ "triggerText": "_triggerText_1mkgp3r_138",
17
+ "searchInput": "_searchInput_1mkgp3r_144",
18
+ "labelNotSelected": "_labelNotSelected_1mkgp3r_188",
19
+ "multi": "_multi_1mkgp3r_202",
20
+ "tagsContainer": "_tagsContainer_1mkgp3r_218",
21
+ "tag": "_tag_1mkgp3r_218",
22
+ "filledTag": "_filledTag_1mkgp3r_240",
23
+ "toggle": "_toggle_1mkgp3r_248",
24
+ "icon": "_icon_1mkgp3r_123",
25
+ "clearIcon": "_clearIcon_1mkgp3r_315"
26
26
  };
27
27
  export { styles as default };
@@ -1,15 +1,15 @@
1
1
  var styles = {
2
- "themeLight": "_themeLight_1kfr4zx_6",
3
- "themeDark": "_themeDark_1kfr4zx_9",
4
- "sizeS": "_sizeS_1kfr4zx_13",
5
- "sizeM": "_sizeM_1kfr4zx_16",
6
- "sizeL": "_sizeL_1kfr4zx_19",
7
- "main": "_main_1kfr4zx_23",
8
- "label": "_label_1kfr4zx_27",
9
- "disabled": "_disabled_1kfr4zx_33",
10
- "footer": "_footer_1kfr4zx_38",
11
- "errorMessage": "_errorMessage_1kfr4zx_45",
12
- "error": "_error_1kfr4zx_45",
13
- "note": "_note_1kfr4zx_54"
2
+ "themeLight": "_themeLight_1dwk8s0_6",
3
+ "themeDark": "_themeDark_1dwk8s0_9",
4
+ "sizeS": "_sizeS_1dwk8s0_13",
5
+ "sizeM": "_sizeM_1dwk8s0_16",
6
+ "sizeL": "_sizeL_1dwk8s0_19",
7
+ "main": "_main_1dwk8s0_23",
8
+ "label": "_label_1dwk8s0_27",
9
+ "disabled": "_disabled_1dwk8s0_33",
10
+ "footer": "_footer_1dwk8s0_38",
11
+ "errorMessage": "_errorMessage_1dwk8s0_45",
12
+ "error": "_error_1dwk8s0_45",
13
+ "note": "_note_1dwk8s0_54"
14
14
  };
15
15
  export { styles as default };
@@ -1,16 +1,16 @@
1
1
  var styles = {
2
- "sizeS": "_sizeS_s1h2lh_6",
3
- "sizeM": "_sizeM_s1h2lh_9",
4
- "sizeL": "_sizeL_s1h2lh_12",
5
- "modeClassic": "_modeClassic_s1h2lh_16",
6
- "modeRock": "_modeRock_s1h2lh_19",
7
- "listBox": "_listBox_s1h2lh_23",
8
- "item": "_item_s1h2lh_36",
9
- "selected": "_selected_s1h2lh_82",
10
- "disabled": "_disabled_s1h2lh_93",
11
- "checkIcon": "_checkIcon_s1h2lh_100",
12
- "visible": "_visible_s1h2lh_107",
13
- "divider": "_divider_s1h2lh_114",
14
- "groupHeader": "_groupHeader_s1h2lh_128"
2
+ "sizeS": "_sizeS_xturi0_6",
3
+ "sizeM": "_sizeM_xturi0_9",
4
+ "sizeL": "_sizeL_xturi0_12",
5
+ "modeClassic": "_modeClassic_xturi0_16",
6
+ "modeRock": "_modeRock_xturi0_19",
7
+ "listBox": "_listBox_xturi0_23",
8
+ "item": "_item_xturi0_36",
9
+ "selected": "_selected_xturi0_82",
10
+ "disabled": "_disabled_xturi0_93",
11
+ "checkIcon": "_checkIcon_xturi0_100",
12
+ "visible": "_visible_xturi0_107",
13
+ "divider": "_divider_xturi0_114",
14
+ "groupHeader": "_groupHeader_xturi0_128"
15
15
  };
16
16
  export { styles as default };
@@ -1,17 +1,17 @@
1
1
  var styles = {
2
- "themeLight": "_themeLight_13zihya_6",
3
- "themeDark": "_themeDark_13zihya_9",
4
- "sizeS": "_sizeS_13zihya_13",
5
- "sizeM": "_sizeM_13zihya_16",
6
- "sizeL": "_sizeL_13zihya_19",
7
- "trigger": "_trigger_13zihya_23",
8
- "error": "_error_13zihya_61",
9
- "enabled": "_enabled_13zihya_66",
10
- "disabled": "_disabled_13zihya_70",
11
- "iconsWrapper": "_iconsWrapper_13zihya_103",
12
- "triggerText": "_triggerText_13zihya_118",
13
- "labelNotSelected": "_labelNotSelected_13zihya_144",
14
- "toggle": "_toggle_13zihya_155",
15
- "icon": "_icon_13zihya_103"
2
+ "themeLight": "_themeLight_1ru28db_6",
3
+ "themeDark": "_themeDark_1ru28db_9",
4
+ "sizeS": "_sizeS_1ru28db_13",
5
+ "sizeM": "_sizeM_1ru28db_16",
6
+ "sizeL": "_sizeL_1ru28db_19",
7
+ "trigger": "_trigger_1ru28db_23",
8
+ "error": "_error_1ru28db_61",
9
+ "enabled": "_enabled_1ru28db_66",
10
+ "disabled": "_disabled_1ru28db_70",
11
+ "iconsWrapper": "_iconsWrapper_1ru28db_103",
12
+ "triggerText": "_triggerText_1ru28db_118",
13
+ "labelNotSelected": "_labelNotSelected_1ru28db_144",
14
+ "toggle": "_toggle_1ru28db_155",
15
+ "icon": "_icon_1ru28db_103"
16
16
  };
17
17
  export { styles as default };
@@ -1,9 +1,9 @@
1
1
  var styles = {
2
- "sizeS": "_sizeS_1d2tn9z_6",
3
- "sizeM": "_sizeM_1d2tn9z_9",
4
- "sizeL": "_sizeL_1d2tn9z_12",
5
- "main": "_main_1d2tn9z_16",
6
- "wrapper": "_wrapper_1d2tn9z_20",
7
- "select": "_select_1d2tn9z_24"
2
+ "sizeS": "_sizeS_4fpmyy_6",
3
+ "sizeM": "_sizeM_4fpmyy_9",
4
+ "sizeL": "_sizeL_4fpmyy_12",
5
+ "main": "_main_4fpmyy_16",
6
+ "wrapper": "_wrapper_4fpmyy_20",
7
+ "select": "_select_4fpmyy_24"
8
8
  };
9
9
  export { styles as default };
@@ -1,10 +1,10 @@
1
1
  var styles = {
2
- "classic": "_classic_1cb1cqj_32",
3
- "rock": "_rock_1cb1cqj_35",
4
- "popover": "_popover_1cb1cqj_39",
5
- "contentWrapper": "_contentWrapper_1cb1cqj_46",
6
- "fadeInBottomToTop": "_fadeInBottomToTop_1cb1cqj_1",
7
- "fadeInTopToBottom": "_fadeInTopToBottom_1cb1cqj_1",
8
- "observable": "_observable_1cb1cqj_62"
2
+ "classic": "_classic_fve5ja_32",
3
+ "rock": "_rock_fve5ja_35",
4
+ "popover": "_popover_fve5ja_39",
5
+ "contentWrapper": "_contentWrapper_fve5ja_46",
6
+ "fadeInBottomToTop": "_fadeInBottomToTop_fve5ja_1",
7
+ "fadeInTopToBottom": "_fadeInTopToBottom_fve5ja_1",
8
+ "observable": "_observable_fve5ja_62"
9
9
  };
10
10
  export { styles as default };
package/lib/types.d.ts CHANGED
@@ -2,11 +2,12 @@ import React from 'react';
2
2
  import type { Theme } from '@rescui/ui-contexts';
3
3
  import type { AriaComboBoxProps } from '@react-aria/combobox';
4
4
  import type { AriaSelectProps } from '@react-aria/select';
5
- import type { AriaPositionProps, AriaFieldProps } from 'react-aria';
5
+ import type { AriaPositionProps } from '@react-aria/overlays';
6
+ import type { AriaFieldProps } from '@react-aria/label';
6
7
  import type { SelectState } from '@react-stately/select';
7
8
  import type { ComboBoxState } from '@react-stately/combobox';
8
- import type { Key } from 'react-stately';
9
- export type { Key } from 'react-stately';
9
+ import type { Key } from '@react-types/shared';
10
+ export type { Key } from '@react-types/shared';
10
11
  export declare type Placement = 'auto-start' | 'auto' | 'auto-end' | 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start';
11
12
  export declare type AriaPlacement = AriaPositionProps['placement'];
12
13
  export declare type SelectSize = 'l' | 'm' | 's';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rescui/select",
3
- "version": "0.15.1-RUI-280-Update-select-component-026338d06.52+026338d06",
3
+ "version": "0.15.1-RUI-280-Update-select-component-separate-components-e772abaa1.56+e772abaa1",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
@@ -16,16 +16,25 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@babel/runtime-corejs3": "^7.26.0",
19
- "@rescui/dropdown": "0.9.5-RUI-280-Update-select-component-026338d06.52+026338d06",
20
- "@rescui/form-field": "0.1.1-RUI-280-Update-select-component-026338d06.52+026338d06",
21
- "@rescui/menu": "0.13.3-RUI-280-Update-select-component-026338d06.52+026338d06",
22
- "@rescui/tag": "0.13.5-RUI-280-Update-select-component-026338d06.52+026338d06",
23
- "@rescui/use-resize-observer": "0.3.1-RUI-280-Update-select-component-026338d06.164+026338d06",
24
- "classnames": "^2.2.6",
25
- "react-aria": "^3.47.0",
26
- "react-aria-components": "^1.16.0",
27
- "react-stately": "^3.45.0",
28
- "scroll-into-view-if-needed": "2.2.20"
19
+ "@react-aria/button": "^3.15.0",
20
+ "@react-aria/combobox": "^3.16.0",
21
+ "@react-aria/focus": "^3.22.0",
22
+ "@react-aria/interactions": "^3.28.0",
23
+ "@react-aria/label": "^3.8.0",
24
+ "@react-aria/listbox": "^3.16.0",
25
+ "@react-aria/overlays": "^3.32.0",
26
+ "@react-aria/select": "^3.18.0",
27
+ "@react-aria/utils": "^3.34.0",
28
+ "@react-stately/collections": "^3.13.0",
29
+ "@react-stately/combobox": "^3.14.0",
30
+ "@react-stately/list": "^3.14.0",
31
+ "@react-stately/overlays": "^3.7.0",
32
+ "@react-stately/select": "^3.10.0",
33
+ "@react-types/shared": "^3.34.0",
34
+ "@rescui/form-field": "0.1.1-RUI-280-Update-select-component-separate-components-e772abaa1.56+e772abaa1",
35
+ "@rescui/tag": "0.13.5-RUI-280-Update-select-component-separate-components-e772abaa1.56+e772abaa1",
36
+ "@rescui/use-resize-observer": "0.3.1-RUI-280-Update-select-component-separate-components-e772abaa1.168+e772abaa1",
37
+ "classnames": "^2.2.6"
29
38
  },
30
39
  "peerDependencies": {
31
40
  "@rescui/ui-contexts": "^0.6.0",
@@ -33,9 +42,9 @@
33
42
  "react": ">=16.8.0 <20"
34
43
  },
35
44
  "devDependencies": {
36
- "@rescui/colors": "0.3.1-RUI-280-Update-select-component-026338d06.52+026338d06",
45
+ "@rescui/colors": "0.3.1-RUI-280-Update-select-component-separate-components-e772abaa1.56+e772abaa1",
37
46
  "@rescui/scripts": "0.5.1",
38
- "@rescui/typography": "0.24.5-RUI-280-Update-select-component-026338d06.52+026338d06",
47
+ "@rescui/typography": "0.24.5-RUI-280-Update-select-component-separate-components-e772abaa1.56+e772abaa1",
39
48
  "@rescui/visual-regression": "0.1.4",
40
49
  "sniffr": "^1.2.0"
41
50
  },
@@ -44,5 +53,5 @@
44
53
  "build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
45
54
  },
46
55
  "nx": {},
47
- "gitHead": "026338d06dba5f4f8b42762b25aca5fb1f28fffb"
56
+ "gitHead": "e772abaa1615818504b1d498233bec348bcb7bb5"
48
57
  }