@tidbcloud/uikit 2.0.0-beta.69 → 2.0.0-beta.70

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
@@ -1,5 +1,11 @@
1
1
  # @tidbcloud/uikit
2
2
 
3
+ ## 2.0.0-beta.70
4
+
5
+ ### Patch Changes
6
+
7
+ - Update creatable select and multi-select
8
+
3
9
  ## 2.0.0-beta.69
4
10
 
5
11
  ### Patch Changes
@@ -9,7 +9,7 @@ const reactHookForm = require("react-hook-form");
9
9
  ;/* empty css */
10
10
  ;/* empty css */
11
11
  ;/* empty css */
12
- const MultiSelect = require("../../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/MultiSelect/MultiSelect.cjs");
12
+ const index = require("../../primitive/Select/index.cjs");
13
13
  const FormMultiSelect = ({
14
14
  name,
15
15
  rules,
@@ -27,7 +27,7 @@ const FormMultiSelect = ({
27
27
  rules,
28
28
  render: ({ field: { onChange, value } }) => {
29
29
  return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
30
- MultiSelect.MultiSelect,
30
+ index.MultiSelect,
31
31
  {
32
32
  value,
33
33
  data,
@@ -7,7 +7,7 @@ import { useFormContext, Controller } from "react-hook-form";
7
7
  /* empty css */
8
8
  /* empty css */
9
9
  /* empty css */
10
- import { MultiSelect } from "../../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/MultiSelect/MultiSelect.js";
10
+ import { MultiSelect } from "../../primitive/Select/index.js";
11
11
  const FormMultiSelect = ({
12
12
  name,
13
13
  rules,
@@ -4,6 +4,7 @@ const jsxRuntime = require("../../node_modules/.pnpm/react@18.3.1/node_modules/r
4
4
  const React = require("react");
5
5
  const useUncontrolled = require("../../node_modules/.pnpm/@mantine_hooks@7.13.2_react@18.3.1/node_modules/@mantine/hooks/esm/use-uncontrolled/use-uncontrolled.cjs");
6
6
  const Select$1 = require("../../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/Select/Select.cjs");
7
+ const MultiSelect$1 = require("../../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/MultiSelect/MultiSelect.cjs");
7
8
  const defaultGetCreateLabel = (query) => `+ Create ${query}`;
8
9
  const CREATE_VALUE_PREFIX = "$create:";
9
10
  const defaultGetCreateValue = (query) => `${CREATE_VALUE_PREFIX}${query}`;
@@ -54,11 +55,17 @@ function Select(props) {
54
55
  return nextItems;
55
56
  }, []);
56
57
  const handleOptionSubmit = React.useCallback((value2) => {
58
+ var _a, _b;
57
59
  if (creatable && value2.startsWith(CREATE_VALUE_PREFIX) && typeof onCreate === "function") {
58
60
  const createdItem = onCreate(value2.slice(CREATE_VALUE_PREFIX.length));
59
- setValue(createdItem.value, createdItem);
60
- setSearchValue("");
61
- close();
61
+ if (createdItem) {
62
+ setValue(createdItem.value, createdItem);
63
+ setSearchValue("");
64
+ close();
65
+ (_a = props.onOptionSubmit) == null ? void 0 : _a.call(props, createdItem.value);
66
+ }
67
+ } else {
68
+ (_b = props.onOptionSubmit) == null ? void 0 : _b.call(props, value2);
62
69
  }
63
70
  }, []);
64
71
  return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
@@ -78,4 +85,85 @@ function Select(props) {
78
85
  }
79
86
  );
80
87
  }
88
+ function MultiSelect(props) {
89
+ const {
90
+ creatable = false,
91
+ getCreateLabel = defaultGetCreateLabel,
92
+ searchable,
93
+ onCreate,
94
+ filter,
95
+ onChange,
96
+ ...rest
97
+ } = props;
98
+ if (creatable && typeof onCreate !== "function") {
99
+ throw new Error("`onCreate` is required when `creatable` is true");
100
+ }
101
+ const [dropdownOpened, setDropdownOpened] = useUncontrolled.useUncontrolled({
102
+ value: props.dropdownOpened,
103
+ onChange: (value2) => setDropdownOpened(value2),
104
+ defaultValue: false
105
+ });
106
+ const close = React.useCallback(() => setDropdownOpened(false), []);
107
+ const open = React.useCallback(() => setDropdownOpened(true), []);
108
+ const [value, setValue] = useUncontrolled.useUncontrolled({
109
+ value: props.value,
110
+ onChange: props.onChange,
111
+ defaultValue: []
112
+ });
113
+ const [searchValue, setSearchValue] = useUncontrolled.useUncontrolled({
114
+ value: props.searchValue,
115
+ onChange: props.onSearchChange,
116
+ defaultValue: ""
117
+ });
118
+ const defaultOptionsFilter = React.useCallback(({ options, search }) => {
119
+ const splittedSearch = search.toLowerCase().trim().split(" ");
120
+ const nextItems = options.filter((option) => {
121
+ const words = option.label.toLowerCase().trim().split(" ");
122
+ return splittedSearch.every((searchWord) => words.some((word) => word.includes(searchWord)));
123
+ });
124
+ if (nextItems.length === 0) {
125
+ return [
126
+ {
127
+ label: getCreateLabel(search),
128
+ value: defaultGetCreateValue(search)
129
+ }
130
+ ];
131
+ }
132
+ return nextItems;
133
+ }, []);
134
+ const handleOptionSubmit = React.useCallback(
135
+ (val) => {
136
+ var _a, _b;
137
+ if (creatable && val.startsWith(CREATE_VALUE_PREFIX) && typeof onCreate === "function") {
138
+ const createdItem = onCreate(val.slice(CREATE_VALUE_PREFIX.length));
139
+ if (createdItem) {
140
+ setValue([...value, createdItem.value]);
141
+ setSearchValue("");
142
+ close();
143
+ (_a = props.onOptionSubmit) == null ? void 0 : _a.call(props, createdItem.value);
144
+ }
145
+ } else {
146
+ (_b = props.onOptionSubmit) == null ? void 0 : _b.call(props, val);
147
+ }
148
+ },
149
+ [value]
150
+ );
151
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
152
+ MultiSelect$1.MultiSelect,
153
+ {
154
+ ...rest,
155
+ value,
156
+ onChange: setValue,
157
+ searchable: searchable || creatable,
158
+ searchValue,
159
+ onSearchChange: setSearchValue,
160
+ filter: creatable ? defaultOptionsFilter : filter,
161
+ onOptionSubmit: handleOptionSubmit,
162
+ dropdownOpened,
163
+ onDropdownClose: close,
164
+ onDropdownOpen: open
165
+ }
166
+ );
167
+ }
168
+ exports.MultiSelect = MultiSelect;
81
169
  exports.Select = Select;
@@ -1,7 +1,13 @@
1
- import { SelectProps as MantineSelectProps, ComboboxItem } from '@mantine/core';
1
+ import { SelectProps as MantineSelectProps, MultiSelectProps as MantineMultiSelectProps, ComboboxItem } from '@mantine/core';
2
2
  export interface SelectProps extends MantineSelectProps {
3
3
  creatable?: boolean;
4
4
  getCreateLabel?: (query: string) => string;
5
- onCreate?: (query: string) => ComboboxItem;
5
+ onCreate?: (query: string) => ComboboxItem | null | undefined;
6
6
  }
7
7
  export declare function Select(props: SelectProps): import("react/jsx-runtime").JSX.Element;
8
+ export interface MultiSelectProps extends MantineMultiSelectProps {
9
+ creatable?: boolean;
10
+ getCreateLabel?: (query: string) => string;
11
+ onCreate?: (query: string) => ComboboxItem | null | undefined;
12
+ }
13
+ export declare function MultiSelect(props: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,13 @@
1
- import { SelectProps as MantineSelectProps, ComboboxItem } from '@mantine/core';
1
+ import { SelectProps as MantineSelectProps, MultiSelectProps as MantineMultiSelectProps, ComboboxItem } from '@mantine/core';
2
2
  export interface SelectProps extends MantineSelectProps {
3
3
  creatable?: boolean;
4
4
  getCreateLabel?: (query: string) => string;
5
- onCreate?: (query: string) => ComboboxItem;
5
+ onCreate?: (query: string) => ComboboxItem | null | undefined;
6
6
  }
7
7
  export declare function Select(props: SelectProps): import("react/jsx-runtime").JSX.Element;
8
+ export interface MultiSelectProps extends MantineMultiSelectProps {
9
+ creatable?: boolean;
10
+ getCreateLabel?: (query: string) => string;
11
+ onCreate?: (query: string) => ComboboxItem | null | undefined;
12
+ }
13
+ export declare function MultiSelect(props: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
@@ -2,6 +2,7 @@ import { j as jsxRuntimeExports } from "../../node_modules/.pnpm/react@18.3.1/no
2
2
  import { useCallback } from "react";
3
3
  import { useUncontrolled } from "../../node_modules/.pnpm/@mantine_hooks@7.13.2_react@18.3.1/node_modules/@mantine/hooks/esm/use-uncontrolled/use-uncontrolled.js";
4
4
  import { Select as Select$1 } from "../../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/Select/Select.js";
5
+ import { MultiSelect as MultiSelect$1 } from "../../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/MultiSelect/MultiSelect.js";
5
6
  const defaultGetCreateLabel = (query) => `+ Create ${query}`;
6
7
  const CREATE_VALUE_PREFIX = "$create:";
7
8
  const defaultGetCreateValue = (query) => `${CREATE_VALUE_PREFIX}${query}`;
@@ -52,11 +53,17 @@ function Select(props) {
52
53
  return nextItems;
53
54
  }, []);
54
55
  const handleOptionSubmit = useCallback((value2) => {
56
+ var _a, _b;
55
57
  if (creatable && value2.startsWith(CREATE_VALUE_PREFIX) && typeof onCreate === "function") {
56
58
  const createdItem = onCreate(value2.slice(CREATE_VALUE_PREFIX.length));
57
- setValue(createdItem.value, createdItem);
58
- setSearchValue("");
59
- close();
59
+ if (createdItem) {
60
+ setValue(createdItem.value, createdItem);
61
+ setSearchValue("");
62
+ close();
63
+ (_a = props.onOptionSubmit) == null ? void 0 : _a.call(props, createdItem.value);
64
+ }
65
+ } else {
66
+ (_b = props.onOptionSubmit) == null ? void 0 : _b.call(props, value2);
60
67
  }
61
68
  }, []);
62
69
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -76,6 +83,87 @@ function Select(props) {
76
83
  }
77
84
  );
78
85
  }
86
+ function MultiSelect(props) {
87
+ const {
88
+ creatable = false,
89
+ getCreateLabel = defaultGetCreateLabel,
90
+ searchable,
91
+ onCreate,
92
+ filter,
93
+ onChange,
94
+ ...rest
95
+ } = props;
96
+ if (creatable && typeof onCreate !== "function") {
97
+ throw new Error("`onCreate` is required when `creatable` is true");
98
+ }
99
+ const [dropdownOpened, setDropdownOpened] = useUncontrolled({
100
+ value: props.dropdownOpened,
101
+ onChange: (value2) => setDropdownOpened(value2),
102
+ defaultValue: false
103
+ });
104
+ const close = useCallback(() => setDropdownOpened(false), []);
105
+ const open = useCallback(() => setDropdownOpened(true), []);
106
+ const [value, setValue] = useUncontrolled({
107
+ value: props.value,
108
+ onChange: props.onChange,
109
+ defaultValue: []
110
+ });
111
+ const [searchValue, setSearchValue] = useUncontrolled({
112
+ value: props.searchValue,
113
+ onChange: props.onSearchChange,
114
+ defaultValue: ""
115
+ });
116
+ const defaultOptionsFilter = useCallback(({ options, search }) => {
117
+ const splittedSearch = search.toLowerCase().trim().split(" ");
118
+ const nextItems = options.filter((option) => {
119
+ const words = option.label.toLowerCase().trim().split(" ");
120
+ return splittedSearch.every((searchWord) => words.some((word) => word.includes(searchWord)));
121
+ });
122
+ if (nextItems.length === 0) {
123
+ return [
124
+ {
125
+ label: getCreateLabel(search),
126
+ value: defaultGetCreateValue(search)
127
+ }
128
+ ];
129
+ }
130
+ return nextItems;
131
+ }, []);
132
+ const handleOptionSubmit = useCallback(
133
+ (val) => {
134
+ var _a, _b;
135
+ if (creatable && val.startsWith(CREATE_VALUE_PREFIX) && typeof onCreate === "function") {
136
+ const createdItem = onCreate(val.slice(CREATE_VALUE_PREFIX.length));
137
+ if (createdItem) {
138
+ setValue([...value, createdItem.value]);
139
+ setSearchValue("");
140
+ close();
141
+ (_a = props.onOptionSubmit) == null ? void 0 : _a.call(props, createdItem.value);
142
+ }
143
+ } else {
144
+ (_b = props.onOptionSubmit) == null ? void 0 : _b.call(props, val);
145
+ }
146
+ },
147
+ [value]
148
+ );
149
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
150
+ MultiSelect$1,
151
+ {
152
+ ...rest,
153
+ value,
154
+ onChange: setValue,
155
+ searchable: searchable || creatable,
156
+ searchValue,
157
+ onSearchChange: setSearchValue,
158
+ filter: creatable ? defaultOptionsFilter : filter,
159
+ onOptionSubmit: handleOptionSubmit,
160
+ dropdownOpened,
161
+ onDropdownClose: close,
162
+ onDropdownOpen: open
163
+ }
164
+ );
165
+ }
79
166
  export {
167
+ MultiSelect,
80
168
  Select
81
169
  };
@@ -48,7 +48,6 @@ const Switch = require("../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5
48
48
  const Textarea = require("../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/Textarea/Textarea.cjs");
49
49
  const Autocomplete = require("../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/Autocomplete/Autocomplete.cjs");
50
50
  const Combobox = require("../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/Combobox/Combobox.cjs");
51
- const MultiSelect = require("../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/MultiSelect/MultiSelect.cjs");
52
51
  const Pill = require("../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/Pill/Pill.cjs");
53
52
  const PillsInput = require("../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/PillsInput/PillsInput.cjs");
54
53
  const TagsInput = require("../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/TagsInput/TagsInput.cjs");
@@ -140,6 +139,7 @@ exports.notifier = index$1.notifier;
140
139
  exports.TYPOGRAPHY_STYLES_MAP = index$2.TYPOGRAPHY_STYLES_MAP;
141
140
  exports.Typography = index$2.Typography;
142
141
  exports.MediaQuery = index$3.MediaQuery;
142
+ exports.MultiSelect = index$4.MultiSelect;
143
143
  exports.Select = index$4.Select;
144
144
  exports.AppShell = AppShell.AppShell;
145
145
  exports.AspectRatio = AspectRatio.AspectRatio;
@@ -177,7 +177,6 @@ exports.Switch = Switch.Switch;
177
177
  exports.Textarea = Textarea.Textarea;
178
178
  exports.Autocomplete = Autocomplete.Autocomplete;
179
179
  exports.Combobox = Combobox.Combobox;
180
- exports.MultiSelect = MultiSelect.MultiSelect;
181
180
  exports.Pill = Pill.Pill;
182
181
  exports.PillsInput = PillsInput.PillsInput;
183
182
  exports.TagsInput = TagsInput.TagsInput;
@@ -29,8 +29,8 @@ declare module '@mantine/core' {
29
29
  }
30
30
  }
31
31
  export type ColorScheme = 'light' | 'dark';
32
- export type { AppShellProps, AppShellNavbarProps, AppShellMainProps, AppShellFooterProps, AppShellAsideProps, AppShellHeaderProps, AppShellSectionProps, AspectRatioProps, CenterProps, ContainerProps, FlexProps, GridProps, GroupProps, SimpleGridProps, SpaceProps, StackProps, CheckboxProps, CheckboxGroupProps, ChipProps, ChipGroupProps, ColorInputProps, ColorPickerProps, FieldsetProps, FileInputProps, InputProps, InputWrapperProps, InputErrorProps, InputLabelProps, InputPlaceholderProps, InputBaseProps, JsonInputProps, NativeSelectProps, NumberInputProps, PasswordInputProps, PinInputProps, RadioProps, RadioGroupProps, RadioCardProps, RatingProps, SegmentedControlProps, SegmentedControlItem, SliderProps, RangeSliderProps, SwitchProps, TextareaProps, AutocompleteProps, ComboboxProps, ComboboxItem, ComboboxData, MultiSelectProps, PillProps, PillsInputProps, OptionsFilter, TagsInputProps, ActionIconProps, ButtonProps, CloseButtonProps, CopyButtonProps, FileButtonProps, UnstyledButtonProps, AnchorProps, BreadcrumbsProps, BurgerProps, NavLinkProps, PaginationProps, StepperProps, TabsProps, TreeProps, AlertProps, LoaderProps, NotificationProps, ProgressProps, RingProgressProps, SemiCircleProgressProps, SkeletonProps, AffixProps, DialogProps, DrawerProps, FloatingIndicatorProps, HoverCardProps, LoadingOverlayProps, MenuProps, ModalProps, OverlayProps, PopoverProps, TooltipProps, AccordionProps, AvatarProps, BackgroundImageProps, BadgeProps, CardProps, CardSectionProps, ColorSwatchProps, ImageProps, IndicatorProps, KbdProps, NumberFormatterProps, SpoilerProps, ThemeIconProps, TimelineProps, BlockquoteProps, CodeProps, HighlightProps, ListProps, MarkProps, TableProps, TextProps, TitleProps, TypographyStylesProviderProps, BoxProps, CollapseProps, DividerProps, FocusTrapProps, PaperProps, PortalProps, ScrollAreaProps, TransitionProps, VisuallyHiddenProps, ColorSchemeScriptProps, MantineSize, ElementProps } from '../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/lib';
33
- export { AppShell, AspectRatio, Center, Container, Flex, Grid, Group, SimpleGrid, Space, Stack, Checkbox, Chip, ColorInput, ColorPicker, HueSlider, AlphaSlider, Fieldset, FileInput, Input, InputBase, JsonInput, NativeSelect, NumberInput, PasswordInput, PinInput, Radio, RadioGroup, RadioCard, Rating, SegmentedControl, Slider, RangeSlider, Switch, Textarea, Autocomplete, Combobox, MultiSelect, Pill, PillsInput, TagsInput, ActionIcon, Button, CloseButton, CopyButton, FileButton, UnstyledButton, Anchor, Breadcrumbs, Burger, NavLink, Pagination, Stepper, Tabs, Tree, Alert, Loader, Notification, Progress, RingProgress, SemiCircleProgress, Skeleton, Affix, Dialog, Drawer, FloatingIndicator, HoverCard, LoadingOverlay, Menu, Modal, Overlay, Popover, Tooltip, Accordion, Avatar, BackgroundImage, Badge, Card, ColorSwatch, Image, Indicator, Kbd, NumberFormatter, Spoiler, ThemeIcon, Timeline, Blockquote, Code, Highlight, List, Mark, Table, Text, Title, TypographyStylesProvider, Box, Collapse, Divider, FocusTrap, Paper, Portal, ScrollArea, Transition, VisuallyHidden, ColorSchemeScript, useInputProps, useMantineTheme, useCombobox, useComputedColorScheme } from '../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/lib';
32
+ export type { AppShellProps, AppShellNavbarProps, AppShellMainProps, AppShellFooterProps, AppShellAsideProps, AppShellHeaderProps, AppShellSectionProps, AspectRatioProps, CenterProps, ContainerProps, FlexProps, GridProps, GroupProps, SimpleGridProps, SpaceProps, StackProps, CheckboxProps, CheckboxGroupProps, ChipProps, ChipGroupProps, ColorInputProps, ColorPickerProps, FieldsetProps, FileInputProps, InputProps, InputWrapperProps, InputErrorProps, InputLabelProps, InputPlaceholderProps, InputBaseProps, JsonInputProps, NativeSelectProps, NumberInputProps, PasswordInputProps, PinInputProps, RadioProps, RadioGroupProps, RadioCardProps, RatingProps, SegmentedControlProps, SegmentedControlItem, SliderProps, RangeSliderProps, SwitchProps, TextareaProps, AutocompleteProps, ComboboxProps, ComboboxItem, ComboboxData, PillProps, PillsInputProps, OptionsFilter, TagsInputProps, ActionIconProps, ButtonProps, CloseButtonProps, CopyButtonProps, FileButtonProps, UnstyledButtonProps, AnchorProps, BreadcrumbsProps, BurgerProps, NavLinkProps, PaginationProps, StepperProps, TabsProps, TreeProps, AlertProps, LoaderProps, NotificationProps, ProgressProps, RingProgressProps, SemiCircleProgressProps, SkeletonProps, AffixProps, DialogProps, DrawerProps, FloatingIndicatorProps, HoverCardProps, LoadingOverlayProps, MenuProps, ModalProps, OverlayProps, PopoverProps, TooltipProps, AccordionProps, AvatarProps, BackgroundImageProps, BadgeProps, CardProps, CardSectionProps, ColorSwatchProps, ImageProps, IndicatorProps, KbdProps, NumberFormatterProps, SpoilerProps, ThemeIconProps, TimelineProps, BlockquoteProps, CodeProps, HighlightProps, ListProps, MarkProps, TableProps, TextProps, TitleProps, TypographyStylesProviderProps, BoxProps, CollapseProps, DividerProps, FocusTrapProps, PaperProps, PortalProps, ScrollAreaProps, TransitionProps, VisuallyHiddenProps, ColorSchemeScriptProps, MantineSize, ElementProps } from '../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/lib';
33
+ export { AppShell, AspectRatio, Center, Container, Flex, Grid, Group, SimpleGrid, Space, Stack, Checkbox, Chip, ColorInput, ColorPicker, HueSlider, AlphaSlider, Fieldset, FileInput, Input, InputBase, JsonInput, NativeSelect, NumberInput, PasswordInput, PinInput, Radio, RadioGroup, RadioCard, Rating, SegmentedControl, Slider, RangeSlider, Switch, Textarea, Autocomplete, Combobox, Pill, PillsInput, TagsInput, ActionIcon, Button, CloseButton, CopyButton, FileButton, UnstyledButton, Anchor, Breadcrumbs, Burger, NavLink, Pagination, Stepper, Tabs, Tree, Alert, Loader, Notification, Progress, RingProgress, SemiCircleProgress, Skeleton, Affix, Dialog, Drawer, FloatingIndicator, HoverCard, LoadingOverlay, Menu, Modal, Overlay, Popover, Tooltip, Accordion, Avatar, BackgroundImage, Badge, Card, ColorSwatch, Image, Indicator, Kbd, NumberFormatter, Spoiler, ThemeIcon, Timeline, Blockquote, Code, Highlight, List, Mark, Table, Text, Title, TypographyStylesProvider, Box, Collapse, Divider, FocusTrap, Paper, Portal, ScrollArea, Transition, VisuallyHidden, ColorSchemeScript, useInputProps, useMantineTheme, useCombobox, useComputedColorScheme } from '../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/lib';
34
34
  export { useColorScheme } from '../hooks/useColorScheme.js';
35
35
  export { Dropzone, MIME_TYPES, MS_EXCEL_MIME_TYPE, MS_POWERPOINT_MIME_TYPE, MS_WORD_MIME_TYPE, EXE_MIME_TYPE, PDF_MIME_TYPE, IMAGE_MIME_TYPE } from '@mantine/dropzone';
36
36
  export type { DropzoneAcceptProps, DropzoneFullScreenProps, DropzoneFullScreenStylesNames, DropzoneIdleProps, DropzoneProps, DropzoneRejectProps, DropzoneStylesNames } from '@mantine/dropzone';
@@ -44,6 +44,6 @@ export { TextInput, type TextInputProps } from './TextInput/index.js';
44
44
  export { notifier } from './notifier/index.js';
45
45
  export { Typography, TYPOGRAPHY_STYLES_MAP, type TypographyProps } from './Typography/index.js';
46
46
  export { MediaQuery, type MediaQueryProps } from './MediaQuery/index.js';
47
- export { Select, type SelectProps } from './Select/index.js';
47
+ export { Select, type SelectProps, MultiSelect, type MultiSelectProps } from './Select/index.js';
48
48
  export { CodeHighlight, CodeHighlightTabs } from '@mantine/code-highlight';
49
49
  export type { CodeHighlightProps, CodeHighlightTabsProps } from '@mantine/code-highlight';
@@ -29,8 +29,8 @@ declare module '@mantine/core' {
29
29
  }
30
30
  }
31
31
  export type ColorScheme = 'light' | 'dark';
32
- export type { AppShellProps, AppShellNavbarProps, AppShellMainProps, AppShellFooterProps, AppShellAsideProps, AppShellHeaderProps, AppShellSectionProps, AspectRatioProps, CenterProps, ContainerProps, FlexProps, GridProps, GroupProps, SimpleGridProps, SpaceProps, StackProps, CheckboxProps, CheckboxGroupProps, ChipProps, ChipGroupProps, ColorInputProps, ColorPickerProps, FieldsetProps, FileInputProps, InputProps, InputWrapperProps, InputErrorProps, InputLabelProps, InputPlaceholderProps, InputBaseProps, JsonInputProps, NativeSelectProps, NumberInputProps, PasswordInputProps, PinInputProps, RadioProps, RadioGroupProps, RadioCardProps, RatingProps, SegmentedControlProps, SegmentedControlItem, SliderProps, RangeSliderProps, SwitchProps, TextareaProps, AutocompleteProps, ComboboxProps, ComboboxItem, ComboboxData, MultiSelectProps, PillProps, PillsInputProps, OptionsFilter, TagsInputProps, ActionIconProps, ButtonProps, CloseButtonProps, CopyButtonProps, FileButtonProps, UnstyledButtonProps, AnchorProps, BreadcrumbsProps, BurgerProps, NavLinkProps, PaginationProps, StepperProps, TabsProps, TreeProps, AlertProps, LoaderProps, NotificationProps, ProgressProps, RingProgressProps, SemiCircleProgressProps, SkeletonProps, AffixProps, DialogProps, DrawerProps, FloatingIndicatorProps, HoverCardProps, LoadingOverlayProps, MenuProps, ModalProps, OverlayProps, PopoverProps, TooltipProps, AccordionProps, AvatarProps, BackgroundImageProps, BadgeProps, CardProps, CardSectionProps, ColorSwatchProps, ImageProps, IndicatorProps, KbdProps, NumberFormatterProps, SpoilerProps, ThemeIconProps, TimelineProps, BlockquoteProps, CodeProps, HighlightProps, ListProps, MarkProps, TableProps, TextProps, TitleProps, TypographyStylesProviderProps, BoxProps, CollapseProps, DividerProps, FocusTrapProps, PaperProps, PortalProps, ScrollAreaProps, TransitionProps, VisuallyHiddenProps, ColorSchemeScriptProps, MantineSize, ElementProps } from '../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/lib';
33
- export { AppShell, AspectRatio, Center, Container, Flex, Grid, Group, SimpleGrid, Space, Stack, Checkbox, Chip, ColorInput, ColorPicker, HueSlider, AlphaSlider, Fieldset, FileInput, Input, InputBase, JsonInput, NativeSelect, NumberInput, PasswordInput, PinInput, Radio, RadioGroup, RadioCard, Rating, SegmentedControl, Slider, RangeSlider, Switch, Textarea, Autocomplete, Combobox, MultiSelect, Pill, PillsInput, TagsInput, ActionIcon, Button, CloseButton, CopyButton, FileButton, UnstyledButton, Anchor, Breadcrumbs, Burger, NavLink, Pagination, Stepper, Tabs, Tree, Alert, Loader, Notification, Progress, RingProgress, SemiCircleProgress, Skeleton, Affix, Dialog, Drawer, FloatingIndicator, HoverCard, LoadingOverlay, Menu, Modal, Overlay, Popover, Tooltip, Accordion, Avatar, BackgroundImage, Badge, Card, ColorSwatch, Image, Indicator, Kbd, NumberFormatter, Spoiler, ThemeIcon, Timeline, Blockquote, Code, Highlight, List, Mark, Table, Text, Title, TypographyStylesProvider, Box, Collapse, Divider, FocusTrap, Paper, Portal, ScrollArea, Transition, VisuallyHidden, ColorSchemeScript, useInputProps, useMantineTheme, useCombobox, useComputedColorScheme } from '../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/lib';
32
+ export type { AppShellProps, AppShellNavbarProps, AppShellMainProps, AppShellFooterProps, AppShellAsideProps, AppShellHeaderProps, AppShellSectionProps, AspectRatioProps, CenterProps, ContainerProps, FlexProps, GridProps, GroupProps, SimpleGridProps, SpaceProps, StackProps, CheckboxProps, CheckboxGroupProps, ChipProps, ChipGroupProps, ColorInputProps, ColorPickerProps, FieldsetProps, FileInputProps, InputProps, InputWrapperProps, InputErrorProps, InputLabelProps, InputPlaceholderProps, InputBaseProps, JsonInputProps, NativeSelectProps, NumberInputProps, PasswordInputProps, PinInputProps, RadioProps, RadioGroupProps, RadioCardProps, RatingProps, SegmentedControlProps, SegmentedControlItem, SliderProps, RangeSliderProps, SwitchProps, TextareaProps, AutocompleteProps, ComboboxProps, ComboboxItem, ComboboxData, PillProps, PillsInputProps, OptionsFilter, TagsInputProps, ActionIconProps, ButtonProps, CloseButtonProps, CopyButtonProps, FileButtonProps, UnstyledButtonProps, AnchorProps, BreadcrumbsProps, BurgerProps, NavLinkProps, PaginationProps, StepperProps, TabsProps, TreeProps, AlertProps, LoaderProps, NotificationProps, ProgressProps, RingProgressProps, SemiCircleProgressProps, SkeletonProps, AffixProps, DialogProps, DrawerProps, FloatingIndicatorProps, HoverCardProps, LoadingOverlayProps, MenuProps, ModalProps, OverlayProps, PopoverProps, TooltipProps, AccordionProps, AvatarProps, BackgroundImageProps, BadgeProps, CardProps, CardSectionProps, ColorSwatchProps, ImageProps, IndicatorProps, KbdProps, NumberFormatterProps, SpoilerProps, ThemeIconProps, TimelineProps, BlockquoteProps, CodeProps, HighlightProps, ListProps, MarkProps, TableProps, TextProps, TitleProps, TypographyStylesProviderProps, BoxProps, CollapseProps, DividerProps, FocusTrapProps, PaperProps, PortalProps, ScrollAreaProps, TransitionProps, VisuallyHiddenProps, ColorSchemeScriptProps, MantineSize, ElementProps } from '../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/lib';
33
+ export { AppShell, AspectRatio, Center, Container, Flex, Grid, Group, SimpleGrid, Space, Stack, Checkbox, Chip, ColorInput, ColorPicker, HueSlider, AlphaSlider, Fieldset, FileInput, Input, InputBase, JsonInput, NativeSelect, NumberInput, PasswordInput, PinInput, Radio, RadioGroup, RadioCard, Rating, SegmentedControl, Slider, RangeSlider, Switch, Textarea, Autocomplete, Combobox, Pill, PillsInput, TagsInput, ActionIcon, Button, CloseButton, CopyButton, FileButton, UnstyledButton, Anchor, Breadcrumbs, Burger, NavLink, Pagination, Stepper, Tabs, Tree, Alert, Loader, Notification, Progress, RingProgress, SemiCircleProgress, Skeleton, Affix, Dialog, Drawer, FloatingIndicator, HoverCard, LoadingOverlay, Menu, Modal, Overlay, Popover, Tooltip, Accordion, Avatar, BackgroundImage, Badge, Card, ColorSwatch, Image, Indicator, Kbd, NumberFormatter, Spoiler, ThemeIcon, Timeline, Blockquote, Code, Highlight, List, Mark, Table, Text, Title, TypographyStylesProvider, Box, Collapse, Divider, FocusTrap, Paper, Portal, ScrollArea, Transition, VisuallyHidden, ColorSchemeScript, useInputProps, useMantineTheme, useCombobox, useComputedColorScheme } from '../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/lib';
34
34
  export { useColorScheme } from '../hooks/useColorScheme.js';
35
35
  export { Dropzone, MIME_TYPES, MS_EXCEL_MIME_TYPE, MS_POWERPOINT_MIME_TYPE, MS_WORD_MIME_TYPE, EXE_MIME_TYPE, PDF_MIME_TYPE, IMAGE_MIME_TYPE } from '@mantine/dropzone';
36
36
  export type { DropzoneAcceptProps, DropzoneFullScreenProps, DropzoneFullScreenStylesNames, DropzoneIdleProps, DropzoneProps, DropzoneRejectProps, DropzoneStylesNames } from '@mantine/dropzone';
@@ -44,6 +44,6 @@ export { TextInput, type TextInputProps } from './TextInput/index.js';
44
44
  export { notifier } from './notifier/index.js';
45
45
  export { Typography, TYPOGRAPHY_STYLES_MAP, type TypographyProps } from './Typography/index.js';
46
46
  export { MediaQuery, type MediaQueryProps } from './MediaQuery/index.js';
47
- export { Select, type SelectProps } from './Select/index.js';
47
+ export { Select, type SelectProps, MultiSelect, type MultiSelectProps } from './Select/index.js';
48
48
  export { CodeHighlight, CodeHighlightTabs } from '@mantine/code-highlight';
49
49
  export type { CodeHighlightProps, CodeHighlightTabsProps } from '@mantine/code-highlight';
@@ -9,7 +9,7 @@ import { Dropzone } from "../node_modules/.pnpm/@mantine_dropzone@7.13.2_@mantin
9
9
  import { notifier } from "./notifier/index.js";
10
10
  import { TYPOGRAPHY_STYLES_MAP, Typography } from "./Typography/index.js";
11
11
  import { MediaQuery } from "./MediaQuery/index.js";
12
- import { Select } from "./Select/index.js";
12
+ import { MultiSelect, Select } from "./Select/index.js";
13
13
  import { AppShell } from "../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/AppShell/AppShell.js";
14
14
  import { AspectRatio } from "../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/AspectRatio/AspectRatio.js";
15
15
  import { Center } from "../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/Center/Center.js";
@@ -46,7 +46,6 @@ import { Switch } from "../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5
46
46
  import { Textarea } from "../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/Textarea/Textarea.js";
47
47
  import { Autocomplete } from "../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/Autocomplete/Autocomplete.js";
48
48
  import { Combobox } from "../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/Combobox/Combobox.js";
49
- import { MultiSelect } from "../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/MultiSelect/MultiSelect.js";
50
49
  import { Pill } from "../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/Pill/Pill.js";
51
50
  import { PillsInput } from "../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/PillsInput/PillsInput.js";
52
51
  import { TagsInput } from "../node_modules/.pnpm/@mantine_core@7.13.2_patch_hash_v5k5cxye7xaihpcgowhgciky7a_@mantine_hooks@7.13.2_react@18.3.1_hlfamvk7n3o6ychyvm5cyru4yu/node_modules/@mantine/core/esm/components/TagsInput/TagsInput.js";
@@ -593,6 +593,11 @@ const theme = createTheme.createTheme({
593
593
  "& > svg": {
594
594
  color: `${themeColor(theme2, "carbon", 7)} !important`
595
595
  }
596
+ },
597
+ option: {
598
+ "&[data-checked]": {
599
+ fontWeight: 700
600
+ }
596
601
  }
597
602
  };
598
603
  }
@@ -591,6 +591,11 @@ const theme = createTheme({
591
591
  "& > svg": {
592
592
  color: `${themeColor(theme2, "carbon", 7)} !important`
593
593
  }
594
+ },
595
+ option: {
596
+ "&[data-checked]": {
597
+ fontWeight: 700
598
+ }
594
599
  }
595
600
  };
596
601
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tidbcloud/uikit",
3
- "version": "2.0.0-beta.69",
3
+ "version": "2.0.0-beta.70",
4
4
  "description": "tidbcloud uikit",
5
5
  "type": "module",
6
6
  "main": "dist/primitive/index.cjs",