@fibery/ui-kit 1.7.7 → 1.8.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.
- package/package.json +5 -5
- package/src/Select/index.tsx +4 -0
- package/src/Select/select-in-popover.tsx +15 -5
- package/src/icons/ast/FiberyMono.ts +8 -0
- package/src/icons/ast/RicheditorBlockCallout.ts +8 -0
- package/src/icons/ast/index.tsx +2 -0
- package/src/icons/react/FiberyMono.tsx +12 -0
- package/src/icons/react/RicheditorBlockCallout.tsx +12 -0
- package/src/icons/react/index.tsx +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/ui-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"private": false,
|
|
6
6
|
"files": [
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"react-windowed-select": "5.0.0",
|
|
59
59
|
"screenfull": "6.0.1",
|
|
60
60
|
"ua-parser-js": "0.7.24",
|
|
61
|
-
"@fibery/helpers": "1.0.
|
|
62
|
-
"@fibery/react": "1.0.
|
|
61
|
+
"@fibery/helpers": "1.0.3",
|
|
62
|
+
"@fibery/react": "1.0.1"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"react": "^18.2.0",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"svgo": "2.8.0",
|
|
93
93
|
"typescript": "5.0.3",
|
|
94
94
|
"unist-util-reduce": "0.2.2",
|
|
95
|
-
"@fibery/
|
|
96
|
-
"@fibery/
|
|
95
|
+
"@fibery/eslint-config": "8.3.0",
|
|
96
|
+
"@fibery/babel-preset": "7.2.0"
|
|
97
97
|
},
|
|
98
98
|
"jest": {
|
|
99
99
|
"testEnvironment": "jsdom",
|
package/src/Select/index.tsx
CHANGED
|
@@ -17,6 +17,8 @@ import BaseSelect, {
|
|
|
17
17
|
SingleValueProps,
|
|
18
18
|
StylesConfig,
|
|
19
19
|
ActionMeta,
|
|
20
|
+
OnChangeValue,
|
|
21
|
+
PropsValue,
|
|
20
22
|
} from "react-select";
|
|
21
23
|
import BaseCreatableSelect, {CreatableProps} from "react-select/creatable";
|
|
22
24
|
import WindowedSelect, {components, WindowedMenuList} from "react-windowed-select";
|
|
@@ -46,6 +48,8 @@ export type {
|
|
|
46
48
|
SingleValue,
|
|
47
49
|
MultiValue,
|
|
48
50
|
ActionMeta,
|
|
51
|
+
OnChangeValue,
|
|
52
|
+
PropsValue,
|
|
49
53
|
};
|
|
50
54
|
|
|
51
55
|
function GroupHeading<
|
|
@@ -14,7 +14,17 @@ import React, {
|
|
|
14
14
|
} from "react";
|
|
15
15
|
import {Popup} from "../Popup";
|
|
16
16
|
import {$TSFixMe} from "../tsfixme";
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
combineStyles,
|
|
19
|
+
GroupBase,
|
|
20
|
+
OptionsOrGroups,
|
|
21
|
+
Select as ReactSelect,
|
|
22
|
+
SelectProps,
|
|
23
|
+
StylesConfig,
|
|
24
|
+
OnChangeValue,
|
|
25
|
+
ActionMeta,
|
|
26
|
+
PropsValue,
|
|
27
|
+
} from "./index";
|
|
18
28
|
import {SelectControlSettingsProvider} from "./select-control-settings-context";
|
|
19
29
|
|
|
20
30
|
const offset = [0, space.xs] as [number, number];
|
|
@@ -102,7 +112,7 @@ type Ref = {
|
|
|
102
112
|
};
|
|
103
113
|
|
|
104
114
|
type Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = {
|
|
105
|
-
value?: Option
|
|
115
|
+
value?: PropsValue<Option>;
|
|
106
116
|
menuIsOpen?: boolean;
|
|
107
117
|
autoFocus?: boolean;
|
|
108
118
|
defaultMenuIsOpen?: boolean;
|
|
@@ -116,7 +126,7 @@ type Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = {
|
|
|
116
126
|
onFocus?: () => void;
|
|
117
127
|
isCollectionMode?: IsMulti;
|
|
118
128
|
isClearable?: boolean;
|
|
119
|
-
onChange: (
|
|
129
|
+
onChange: (newValue: OnChangeValue<Option, IsMulti>, actionMeta: ActionMeta<Option>) => void;
|
|
120
130
|
onMenuOpen: () => void;
|
|
121
131
|
onMenuClose: () => void | boolean;
|
|
122
132
|
renderValue?: () => ReactNode;
|
|
@@ -296,11 +306,11 @@ function SelectInPopoverInner<Option, IsMulti extends boolean, Group extends Gro
|
|
|
296
306
|
controlShouldRenderValue
|
|
297
307
|
closeMenuOnScroll={false}
|
|
298
308
|
closeMenuOnSelect={false}
|
|
299
|
-
onChange={(
|
|
309
|
+
onChange={(newValue, actionMeta) => {
|
|
300
310
|
if (hideOnChange) {
|
|
301
311
|
onHide();
|
|
302
312
|
}
|
|
303
|
-
onChange(
|
|
313
|
+
onChange(newValue, actionMeta);
|
|
304
314
|
}}
|
|
305
315
|
placeholder={placeholder}
|
|
306
316
|
onInputChange={onInputChange}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
// This icon file is generated automatically.
|
|
3
|
+
|
|
4
|
+
import { IconDefinition } from '../types';
|
|
5
|
+
|
|
6
|
+
const FiberyMono: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"viewBox":"0 0 20 20"},"children":[{"type":"element","tagName":"path","properties":{"d":"M16.735 6.544a1.788 1.788 0 0 1 .644 2.112 1.764 1.764 0 0 1-.758.888l-9.98 5.826a1.733 1.733 0 0 1-2.16-.328 1.778 1.778 0 0 1-.161-2.201l6.493-9.628a1.734 1.734 0 0 1 2.387-.407 1.786 1.786 0 0 1 .504 2.394l-3.74 5.557 3.519-4.354 2.135-.162c.396-.03.79.077 1.117.303ZM9.575 4.64l-1.15-1.252a1.733 1.733 0 0 0-2.157-.329c-.343.2-.609.513-.753.886-.145.373-.16.785-.044 1.168l.45 1.477 1.41.28-3.22.242a1.74 1.74 0 0 0-1.056.471 1.785 1.785 0 0 0-.318 2.181c.199.346.508.614.877.76l1.54.61 4.42-6.494Zm5.584 6.086-6.777 3.93.482 1.592c.137.45.445.826.856 1.046.411.22.892.266 1.337.128a1.76 1.76 0 0 0 1.034-.866c.218-.415.263-.902.127-1.351l-.288-.944-1.078-.866 3.497 1.386c.368.144.775.157 1.152.038a1.75 1.75 0 0 0 .926-.694 1.784 1.784 0 0 0-.162-2.195l-1.106-1.204Z"},"children":[]}],"metadata":""}]},"name":"fibery-mono"};
|
|
7
|
+
|
|
8
|
+
export default FiberyMono;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
|
|
2
|
+
// This icon file is generated automatically.
|
|
3
|
+
|
|
4
|
+
import { IconDefinition } from '../types';
|
|
5
|
+
|
|
6
|
+
const RicheditorBlockCallout: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"viewBox":"0 0 20 20"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","clipRule":"evenodd","d":"M4 4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H4Zm12 1.5H4a.5.5 0 0 0-.5.5v8a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM7.473 10H5.548C5.215 10 5 9.793 5 9.467V7.543C5 7.207 5.204 7 5.548 7h1.925c.323 0 .527.207.527.543v1.924c0 .326-.215.533-.527.533Z"},"children":[]}],"metadata":""}]},"name":"richeditor-block-callout"};
|
|
7
|
+
|
|
8
|
+
export default RicheditorBlockCallout;
|
package/src/icons/ast/index.tsx
CHANGED
|
@@ -56,6 +56,7 @@ export { default as ExtensionWorkflow } from './ExtensionWorkflow';
|
|
|
56
56
|
export { default as FavoritesChecked } from './FavoritesChecked';
|
|
57
57
|
export { default as FavoritesMenu } from './FavoritesMenu';
|
|
58
58
|
export { default as Favorites } from './Favorites';
|
|
59
|
+
export { default as FiberyMono } from './FiberyMono';
|
|
59
60
|
export { default as Fields } from './Fields';
|
|
60
61
|
export { default as FileUpload } from './FileUpload';
|
|
61
62
|
export { default as Filter } from './Filter';
|
|
@@ -100,6 +101,7 @@ export { default as Remove } from './Remove';
|
|
|
100
101
|
export { default as Reply } from './Reply';
|
|
101
102
|
export { default as Restore } from './Restore';
|
|
102
103
|
export { default as RicheditorActionsMore } from './RicheditorActionsMore';
|
|
104
|
+
export { default as RicheditorBlockCallout } from './RicheditorBlockCallout';
|
|
103
105
|
export { default as RicheditorBlockCode } from './RicheditorBlockCode';
|
|
104
106
|
export { default as RicheditorBlockEntity } from './RicheditorBlockEntity';
|
|
105
107
|
export { default as RicheditorBlockFile } from './RicheditorBlockFile';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import FiberyMonoSvg from '../ast/FiberyMono';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const FiberyMono = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={FiberyMonoSvg} />;
|
|
10
|
+
|
|
11
|
+
FiberyMono.displayName = 'FiberyMono';
|
|
12
|
+
export default FiberyMono;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import RicheditorBlockCalloutSvg from '../ast/RicheditorBlockCallout';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const RicheditorBlockCallout = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={RicheditorBlockCalloutSvg} />;
|
|
10
|
+
|
|
11
|
+
RicheditorBlockCallout.displayName = 'RicheditorBlockCallout';
|
|
12
|
+
export default RicheditorBlockCallout;
|
|
@@ -56,6 +56,7 @@ export { default as ExtensionWorkflow } from './ExtensionWorkflow';
|
|
|
56
56
|
export { default as FavoritesChecked } from './FavoritesChecked';
|
|
57
57
|
export { default as FavoritesMenu } from './FavoritesMenu';
|
|
58
58
|
export { default as Favorites } from './Favorites';
|
|
59
|
+
export { default as FiberyMono } from './FiberyMono';
|
|
59
60
|
export { default as Fields } from './Fields';
|
|
60
61
|
export { default as FileUpload } from './FileUpload';
|
|
61
62
|
export { default as Filter } from './Filter';
|
|
@@ -100,6 +101,7 @@ export { default as Remove } from './Remove';
|
|
|
100
101
|
export { default as Reply } from './Reply';
|
|
101
102
|
export { default as Restore } from './Restore';
|
|
102
103
|
export { default as RicheditorActionsMore } from './RicheditorActionsMore';
|
|
104
|
+
export { default as RicheditorBlockCallout } from './RicheditorBlockCallout';
|
|
103
105
|
export { default as RicheditorBlockCode } from './RicheditorBlockCode';
|
|
104
106
|
export { default as RicheditorBlockEntity } from './RicheditorBlockEntity';
|
|
105
107
|
export { default as RicheditorBlockFile } from './RicheditorBlockFile';
|