@akinon/ui-select 0.4.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import type { SelectProps } from './types';
3
+ /**
4
+ * Select component for Akinon UI.
5
+ *
6
+ * This component provides a versatile dropdown input for selecting options.
7
+ * It supports single or multiple selection modes, search functionality,
8
+ * custom rendering for options and labels, and advanced accessibility features.
9
+ *
10
+ * The Select component adheres to the Akinon design system, ensuring consistent
11
+ * styling and behavior. It is highly customizable and suitable for use in forms,
12
+ * filters, and other selection scenarios.
13
+ */
3
14
  export declare const Select: ({ ...restSelectProps }: SelectProps) => React.JSX.Element;
4
15
  export type * from './types';
5
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,MAAM,2BAA4B,WAAW,sBAEzD,CAAC;AAEF,mBAAmB,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,MAAM,2BAA4B,WAAW,sBA0DzD,CAAC;AAEF,mBAAmB,SAAS,CAAC"}
package/dist/cjs/index.js CHANGED
@@ -12,10 +12,61 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.Select = void 0;
15
+ const ui_theme_1 = require("@akinon/ui-theme");
16
+ const cssinjs_1 = require("@ant-design/cssinjs");
15
17
  const antd_1 = require("antd");
16
18
  const React = require("react");
19
+ /**
20
+ * Select component for Akinon UI.
21
+ *
22
+ * This component provides a versatile dropdown input for selecting options.
23
+ * It supports single or multiple selection modes, search functionality,
24
+ * custom rendering for options and labels, and advanced accessibility features.
25
+ *
26
+ * The Select component adheres to the Akinon design system, ensuring consistent
27
+ * styling and behavior. It is highly customizable and suitable for use in forms,
28
+ * filters, and other selection scenarios.
29
+ */
17
30
  const Select = (_a) => {
18
31
  var restSelectProps = __rest(_a, []);
19
- return React.createElement(antd_1.Select, Object.assign({ size: "large" }, restSelectProps));
32
+ const { getPrefixCls, theme } = React.useContext(antd_1.ConfigProvider.ConfigContext);
33
+ const { token, hashId } = (0, ui_theme_1.useToken)();
34
+ const selectToken = token.Select;
35
+ const selectPrefixCls = `${getPrefixCls()}-select`;
36
+ const dropdownPrefixCls = `${selectPrefixCls}-dropdown`;
37
+ const dropdownPrefixClsWithHash = `:where(.${hashId}).${dropdownPrefixCls}`;
38
+ const useStyle = (0, cssinjs_1.useStyleRegister)({
39
+ token: token,
40
+ path: ['Select'],
41
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
42
+ theme: theme
43
+ }, () => {
44
+ return {
45
+ [`${dropdownPrefixClsWithHash}`]: {
46
+ '&.akinon-select-dropdown': {
47
+ [`.${selectPrefixCls}-item`]: {
48
+ boxShadow: `inset 0 -1px 0 0 ${selectToken.selectItemBorderShadowColor}, inset 0 1px 0 0 ${selectToken.selectItemBorderShadowColor}`,
49
+ '&:nth-child(even)': {
50
+ backgroundColor: selectToken.selectItemBgColor,
51
+ [`&.${selectPrefixCls}-item-option-selected`]: {
52
+ backgroundColor: selectToken === null || selectToken === void 0 ? void 0 : selectToken.optionActiveBg
53
+ },
54
+ '&:hover': {
55
+ backgroundColor: selectToken.selectItemHoverBgColor
56
+ }
57
+ }
58
+ },
59
+ [`.${selectPrefixCls}-item-option-selected`]: {
60
+ backgroundColor: selectToken === null || selectToken === void 0 ? void 0 : selectToken.optionActiveBg,
61
+ color: selectToken.selectedOptionColor,
62
+ '&:hover': {
63
+ backgroundColor: selectToken === null || selectToken === void 0 ? void 0 : selectToken.optionActiveBg
64
+ }
65
+ }
66
+ }
67
+ }
68
+ };
69
+ });
70
+ return useStyle(React.createElement(antd_1.Select, Object.assign({ size: "large", popupMatchSelectWidth: true }, restSelectProps)));
20
71
  };
21
72
  exports.Select = Select;
@@ -0,0 +1,254 @@
1
+ /**
2
+ * Base option type for Select components.
3
+ */
4
+ export interface BaseOptionType {
5
+ /**
6
+ * Whether the option is disabled.
7
+ */
8
+ disabled?: boolean;
9
+
10
+ /**
11
+ * Additional CSS class for the option.
12
+ */
13
+ className?: string;
14
+
15
+ /**
16
+ * Descriptive title for the option.
17
+ */
18
+ title?: string;
19
+
20
+ /**
21
+ * Additional custom properties for the option.
22
+ */
23
+ [name: string]: unknown;
24
+ }
25
+
26
+ /**
27
+ * Default option type with additional attributes.
28
+ */
29
+ export interface DefaultOptionType extends BaseOptionType {
30
+ /**
31
+ * The label displayed for the option.
32
+ */
33
+ label?: React.ReactNode;
34
+
35
+ /**
36
+ * The value associated with the option.
37
+ */
38
+ value?: string | number | null;
39
+
40
+ /**
41
+ * Nested child options for hierarchical structures.
42
+ */
43
+ children?: Omit<DefaultOptionType, 'children'>[];
44
+ }
45
+
46
+ /**
47
+ * Generic handler type for select events.
48
+ * @param value - The selected value.
49
+ * @param option - The corresponding option.
50
+ */
51
+ export type SelectHandler<ValueType, OptionType> = (
52
+ value: ValueType,
53
+ option: OptionType
54
+ ) => void;
55
+
56
+ /**
57
+ * Extracts the element type from an array type.
58
+ */
59
+ export type ArrayElementType<T> = T extends (infer E)[] ? E : T;
60
+
61
+ /**
62
+ * Props for the Select component.
63
+ */
64
+ export interface SelectProps<
65
+ ValueType = string | number | boolean,
66
+ OptionType extends BaseOptionType = DefaultOptionType
67
+ > extends BaseSelectPropsWithoutPrivate {
68
+ /**
69
+ * Placeholder text displayed when no value is selected.
70
+ */
71
+ placeholder?: string;
72
+
73
+ /**
74
+ * Whether to show a clear button to remove the selection.
75
+ */
76
+ allowClear?: boolean;
77
+
78
+ /**
79
+ * Unique identifier for the select component.
80
+ */
81
+ id?: string;
82
+
83
+ /**
84
+ * Custom field names for options.
85
+ */
86
+ fieldNames?: FieldNames;
87
+
88
+ /**
89
+ * Current search value for the options.
90
+ */
91
+ searchValue?: string;
92
+
93
+ /**
94
+ * Callback triggered when the search value changes.
95
+ * @param value - The current search value.
96
+ */
97
+ onSearch?: (value: string) => void;
98
+
99
+ /**
100
+ * Whether to clear the search value after selection.
101
+ */
102
+ autoClearSearchValue?: boolean;
103
+
104
+ /**
105
+ * Whether the popup width matches the select width.
106
+ */
107
+ popupMatchSelectWidth?: boolean | number;
108
+
109
+ /**
110
+ * Callback triggered when an option is selected.
111
+ */
112
+ onSelect?: SelectHandler<ArrayElementType<ValueType>, OptionType>;
113
+
114
+ /**
115
+ * Callback triggered when an option is deselected.
116
+ */
117
+ onDeselect?: SelectHandler<ArrayElementType<ValueType>, OptionType>;
118
+
119
+ /**
120
+ * Custom filter function for options.
121
+ */
122
+ filterOption?: boolean | FilterFunc<OptionType>;
123
+
124
+ /**
125
+ * Custom sorting function for options.
126
+ */
127
+ filterSort?: (optionA: OptionType, optionB: OptionType) => number;
128
+
129
+ /**
130
+ * The property used for option filtering.
131
+ */
132
+ optionFilterProp?: string;
133
+
134
+ /**
135
+ * The property used for option labeling.
136
+ */
137
+ optionLabelProp?: string;
138
+
139
+ /**
140
+ * Size of the select input.
141
+ */
142
+ size?: 'small' | 'middle' | 'large';
143
+
144
+ /**
145
+ * Whether the select is in a loading state.
146
+ */
147
+ loading?: boolean;
148
+
149
+ /**
150
+ * List of options for the select component.
151
+ */
152
+ options?: OptionType[];
153
+
154
+ /**
155
+ * Custom render function for options.
156
+ */
157
+ optionRender?: (
158
+ oriOption: FlattenOptionData<BaseOptionType>,
159
+ info: {
160
+ index: number;
161
+ }
162
+ ) => React.ReactNode;
163
+
164
+ /**
165
+ * Whether to make the first option active by default.
166
+ */
167
+ defaultActiveFirstOption?: boolean;
168
+
169
+ /**
170
+ * Whether to enable virtual scrolling for options.
171
+ */
172
+ virtual?: boolean;
173
+
174
+ /**
175
+ * Text direction of the select component.
176
+ */
177
+ direction?: 'ltr' | 'rtl';
178
+
179
+ /**
180
+ * Height of the options list.
181
+ */
182
+ listHeight?: number;
183
+
184
+ /**
185
+ * Height of individual list items.
186
+ */
187
+ listItemHeight?: number;
188
+
189
+ /**
190
+ * Custom render function for the selected label.
191
+ */
192
+ labelRender?: (props: LabelInValueType) => React.ReactNode;
193
+
194
+ /**
195
+ * Custom icon for selected menu items.
196
+ */
197
+ menuItemSelectedIcon?: RenderNode;
198
+
199
+ /**
200
+ * The mode of the select component (e.g., combobox, multiple, or tags).
201
+ */
202
+ mode?: 'combobox' | 'multiple' | 'tags';
203
+
204
+ /**
205
+ * Whether the value includes label information.
206
+ */
207
+ labelInValue?: boolean;
208
+
209
+ /**
210
+ * The current value of the select component.
211
+ */
212
+ value?: ValueType | null;
213
+
214
+ /**
215
+ * The default value of the select component.
216
+ */
217
+ defaultValue?: ValueType | null;
218
+
219
+ /**
220
+ * Maximum number of selected items.
221
+ */
222
+ maxCount?: number;
223
+
224
+ /**
225
+ * Callback triggered when the value changes.
226
+ */
227
+ onChange?: (value: ValueType, option?: OptionType | OptionType[]) => void;
228
+
229
+ /**
230
+ * Additional CSS class for the root element.
231
+ */
232
+ rootClassName?: string;
233
+
234
+ /**
235
+ * Icon displayed as the suffix for the select input.
236
+ */
237
+ suffixIcon?: React.ReactNode;
238
+
239
+ /**
240
+ * Whether the select is disabled.
241
+ */
242
+ disabled?: boolean;
243
+
244
+ /**
245
+ * Whether to show the dropdown arrow.
246
+ */
247
+ showArrow?: boolean;
248
+
249
+ /**
250
+ * Style variant of the select component.
251
+ * @default "outlined"
252
+ */
253
+ variant?: 'outlined' | 'borderless' | 'filled';
254
+ }
@@ -1,5 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import type { SelectProps } from './types';
3
+ /**
4
+ * Select component for Akinon UI.
5
+ *
6
+ * This component provides a versatile dropdown input for selecting options.
7
+ * It supports single or multiple selection modes, search functionality,
8
+ * custom rendering for options and labels, and advanced accessibility features.
9
+ *
10
+ * The Select component adheres to the Akinon design system, ensuring consistent
11
+ * styling and behavior. It is highly customizable and suitable for use in forms,
12
+ * filters, and other selection scenarios.
13
+ */
3
14
  export declare const Select: ({ ...restSelectProps }: SelectProps) => React.JSX.Element;
4
15
  export type * from './types';
5
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,MAAM,2BAA4B,WAAW,sBAEzD,CAAC;AAEF,mBAAmB,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,MAAM,2BAA4B,WAAW,sBA0DzD,CAAC;AAEF,mBAAmB,SAAS,CAAC"}
package/dist/esm/index.js CHANGED
@@ -9,9 +9,60 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import { Select as AntSelect } from 'antd';
12
+ import { useToken } from '@akinon/ui-theme';
13
+ import { useStyleRegister } from '@ant-design/cssinjs';
14
+ import { ConfigProvider, Select as AntSelect } from 'antd';
13
15
  import * as React from 'react';
16
+ /**
17
+ * Select component for Akinon UI.
18
+ *
19
+ * This component provides a versatile dropdown input for selecting options.
20
+ * It supports single or multiple selection modes, search functionality,
21
+ * custom rendering for options and labels, and advanced accessibility features.
22
+ *
23
+ * The Select component adheres to the Akinon design system, ensuring consistent
24
+ * styling and behavior. It is highly customizable and suitable for use in forms,
25
+ * filters, and other selection scenarios.
26
+ */
14
27
  export const Select = (_a) => {
15
28
  var restSelectProps = __rest(_a, []);
16
- return React.createElement(AntSelect, Object.assign({ size: "large" }, restSelectProps));
29
+ const { getPrefixCls, theme } = React.useContext(ConfigProvider.ConfigContext);
30
+ const { token, hashId } = useToken();
31
+ const selectToken = token.Select;
32
+ const selectPrefixCls = `${getPrefixCls()}-select`;
33
+ const dropdownPrefixCls = `${selectPrefixCls}-dropdown`;
34
+ const dropdownPrefixClsWithHash = `:where(.${hashId}).${dropdownPrefixCls}`;
35
+ const useStyle = useStyleRegister({
36
+ token: token,
37
+ path: ['Select'],
38
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
39
+ theme: theme
40
+ }, () => {
41
+ return {
42
+ [`${dropdownPrefixClsWithHash}`]: {
43
+ '&.akinon-select-dropdown': {
44
+ [`.${selectPrefixCls}-item`]: {
45
+ boxShadow: `inset 0 -1px 0 0 ${selectToken.selectItemBorderShadowColor}, inset 0 1px 0 0 ${selectToken.selectItemBorderShadowColor}`,
46
+ '&:nth-child(even)': {
47
+ backgroundColor: selectToken.selectItemBgColor,
48
+ [`&.${selectPrefixCls}-item-option-selected`]: {
49
+ backgroundColor: selectToken === null || selectToken === void 0 ? void 0 : selectToken.optionActiveBg
50
+ },
51
+ '&:hover': {
52
+ backgroundColor: selectToken.selectItemHoverBgColor
53
+ }
54
+ }
55
+ },
56
+ [`.${selectPrefixCls}-item-option-selected`]: {
57
+ backgroundColor: selectToken === null || selectToken === void 0 ? void 0 : selectToken.optionActiveBg,
58
+ color: selectToken.selectedOptionColor,
59
+ '&:hover': {
60
+ backgroundColor: selectToken === null || selectToken === void 0 ? void 0 : selectToken.optionActiveBg
61
+ }
62
+ }
63
+ }
64
+ }
65
+ };
66
+ });
67
+ return useStyle(React.createElement(AntSelect, Object.assign({ size: "large", popupMatchSelectWidth: true }, restSelectProps)));
17
68
  };
@@ -0,0 +1,254 @@
1
+ /**
2
+ * Base option type for Select components.
3
+ */
4
+ export interface BaseOptionType {
5
+ /**
6
+ * Whether the option is disabled.
7
+ */
8
+ disabled?: boolean;
9
+
10
+ /**
11
+ * Additional CSS class for the option.
12
+ */
13
+ className?: string;
14
+
15
+ /**
16
+ * Descriptive title for the option.
17
+ */
18
+ title?: string;
19
+
20
+ /**
21
+ * Additional custom properties for the option.
22
+ */
23
+ [name: string]: unknown;
24
+ }
25
+
26
+ /**
27
+ * Default option type with additional attributes.
28
+ */
29
+ export interface DefaultOptionType extends BaseOptionType {
30
+ /**
31
+ * The label displayed for the option.
32
+ */
33
+ label?: React.ReactNode;
34
+
35
+ /**
36
+ * The value associated with the option.
37
+ */
38
+ value?: string | number | null;
39
+
40
+ /**
41
+ * Nested child options for hierarchical structures.
42
+ */
43
+ children?: Omit<DefaultOptionType, 'children'>[];
44
+ }
45
+
46
+ /**
47
+ * Generic handler type for select events.
48
+ * @param value - The selected value.
49
+ * @param option - The corresponding option.
50
+ */
51
+ export type SelectHandler<ValueType, OptionType> = (
52
+ value: ValueType,
53
+ option: OptionType
54
+ ) => void;
55
+
56
+ /**
57
+ * Extracts the element type from an array type.
58
+ */
59
+ export type ArrayElementType<T> = T extends (infer E)[] ? E : T;
60
+
61
+ /**
62
+ * Props for the Select component.
63
+ */
64
+ export interface SelectProps<
65
+ ValueType = string | number | boolean,
66
+ OptionType extends BaseOptionType = DefaultOptionType
67
+ > extends BaseSelectPropsWithoutPrivate {
68
+ /**
69
+ * Placeholder text displayed when no value is selected.
70
+ */
71
+ placeholder?: string;
72
+
73
+ /**
74
+ * Whether to show a clear button to remove the selection.
75
+ */
76
+ allowClear?: boolean;
77
+
78
+ /**
79
+ * Unique identifier for the select component.
80
+ */
81
+ id?: string;
82
+
83
+ /**
84
+ * Custom field names for options.
85
+ */
86
+ fieldNames?: FieldNames;
87
+
88
+ /**
89
+ * Current search value for the options.
90
+ */
91
+ searchValue?: string;
92
+
93
+ /**
94
+ * Callback triggered when the search value changes.
95
+ * @param value - The current search value.
96
+ */
97
+ onSearch?: (value: string) => void;
98
+
99
+ /**
100
+ * Whether to clear the search value after selection.
101
+ */
102
+ autoClearSearchValue?: boolean;
103
+
104
+ /**
105
+ * Whether the popup width matches the select width.
106
+ */
107
+ popupMatchSelectWidth?: boolean | number;
108
+
109
+ /**
110
+ * Callback triggered when an option is selected.
111
+ */
112
+ onSelect?: SelectHandler<ArrayElementType<ValueType>, OptionType>;
113
+
114
+ /**
115
+ * Callback triggered when an option is deselected.
116
+ */
117
+ onDeselect?: SelectHandler<ArrayElementType<ValueType>, OptionType>;
118
+
119
+ /**
120
+ * Custom filter function for options.
121
+ */
122
+ filterOption?: boolean | FilterFunc<OptionType>;
123
+
124
+ /**
125
+ * Custom sorting function for options.
126
+ */
127
+ filterSort?: (optionA: OptionType, optionB: OptionType) => number;
128
+
129
+ /**
130
+ * The property used for option filtering.
131
+ */
132
+ optionFilterProp?: string;
133
+
134
+ /**
135
+ * The property used for option labeling.
136
+ */
137
+ optionLabelProp?: string;
138
+
139
+ /**
140
+ * Size of the select input.
141
+ */
142
+ size?: 'small' | 'middle' | 'large';
143
+
144
+ /**
145
+ * Whether the select is in a loading state.
146
+ */
147
+ loading?: boolean;
148
+
149
+ /**
150
+ * List of options for the select component.
151
+ */
152
+ options?: OptionType[];
153
+
154
+ /**
155
+ * Custom render function for options.
156
+ */
157
+ optionRender?: (
158
+ oriOption: FlattenOptionData<BaseOptionType>,
159
+ info: {
160
+ index: number;
161
+ }
162
+ ) => React.ReactNode;
163
+
164
+ /**
165
+ * Whether to make the first option active by default.
166
+ */
167
+ defaultActiveFirstOption?: boolean;
168
+
169
+ /**
170
+ * Whether to enable virtual scrolling for options.
171
+ */
172
+ virtual?: boolean;
173
+
174
+ /**
175
+ * Text direction of the select component.
176
+ */
177
+ direction?: 'ltr' | 'rtl';
178
+
179
+ /**
180
+ * Height of the options list.
181
+ */
182
+ listHeight?: number;
183
+
184
+ /**
185
+ * Height of individual list items.
186
+ */
187
+ listItemHeight?: number;
188
+
189
+ /**
190
+ * Custom render function for the selected label.
191
+ */
192
+ labelRender?: (props: LabelInValueType) => React.ReactNode;
193
+
194
+ /**
195
+ * Custom icon for selected menu items.
196
+ */
197
+ menuItemSelectedIcon?: RenderNode;
198
+
199
+ /**
200
+ * The mode of the select component (e.g., combobox, multiple, or tags).
201
+ */
202
+ mode?: 'combobox' | 'multiple' | 'tags';
203
+
204
+ /**
205
+ * Whether the value includes label information.
206
+ */
207
+ labelInValue?: boolean;
208
+
209
+ /**
210
+ * The current value of the select component.
211
+ */
212
+ value?: ValueType | null;
213
+
214
+ /**
215
+ * The default value of the select component.
216
+ */
217
+ defaultValue?: ValueType | null;
218
+
219
+ /**
220
+ * Maximum number of selected items.
221
+ */
222
+ maxCount?: number;
223
+
224
+ /**
225
+ * Callback triggered when the value changes.
226
+ */
227
+ onChange?: (value: ValueType, option?: OptionType | OptionType[]) => void;
228
+
229
+ /**
230
+ * Additional CSS class for the root element.
231
+ */
232
+ rootClassName?: string;
233
+
234
+ /**
235
+ * Icon displayed as the suffix for the select input.
236
+ */
237
+ suffixIcon?: React.ReactNode;
238
+
239
+ /**
240
+ * Whether the select is disabled.
241
+ */
242
+ disabled?: boolean;
243
+
244
+ /**
245
+ * Whether to show the dropdown arrow.
246
+ */
247
+ showArrow?: boolean;
248
+
249
+ /**
250
+ * Style variant of the select component.
251
+ * @default "outlined"
252
+ */
253
+ variant?: 'outlined' | 'borderless' | 'filled';
254
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/ui-select",
3
- "version": "0.4.0",
3
+ "version": "1.0.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/esm/index.js",
@@ -9,14 +9,15 @@
9
9
  "dist"
10
10
  ],
11
11
  "dependencies": {
12
- "antd": "5.17.0"
12
+ "antd": "5.22.6"
13
13
  },
14
14
  "devDependencies": {
15
15
  "clean-package": "2.2.0",
16
16
  "copyfiles": "^2.4.1",
17
17
  "rimraf": "^5.0.5",
18
- "typescript": "^5.2.2",
19
- "@akinon/typescript-config": "0.3.0"
18
+ "typescript": "*",
19
+ "@akinon/ui-theme": "1.0.0",
20
+ "@akinon/typescript-config": "1.0.0"
20
21
  },
21
22
  "peerDependencies": {
22
23
  "react": ">=18",
@@ -36,7 +37,7 @@
36
37
  "build": "pnpm run build:esm && pnpm run build:commonjs && pnpm run copy:files",
37
38
  "build:esm": "tsc --outDir dist/esm",
38
39
  "build:commonjs": "tsc --module commonjs --outDir dist/cjs",
39
- "copy:files": "copyfiles -u 1 src/**/*.css dist/esm && copyfiles -u 1 src/**/*.css dist/cjs",
40
+ "copy:files": "copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/esm && copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/cjs",
40
41
  "clean": "rimraf dist/",
41
42
  "typecheck": "tsc --noEmit"
42
43
  }