@homecode/ui 4.18.63 → 4.18.65
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/dist/esm/src/components/Icon/Icon.js +3 -1
- package/dist/esm/src/components/Icon/icons/clearAll.svg.js +17 -0
- package/dist/esm/src/components/Icon/icons/flyover.svg.js +17 -0
- package/dist/esm/src/components/Icon/icons/index.js +3 -0
- package/dist/esm/src/components/Icon/icons/star.svg.js +18 -0
- package/dist/esm/src/components/Input/Input.js +3 -3
- package/dist/esm/src/components/InputFile/InputFile.js +1 -1
- package/dist/esm/src/components/Select/Select.js +15 -15
- package/dist/esm/types/src/components/Icon/Icon.types.d.ts +2 -1
- package/dist/esm/types/src/components/Icon/icons/index.d.ts +3 -0
- package/dist/esm/types/src/components/Select/Select.d.ts +2 -2
- package/package.json +1 -1
|
@@ -6,12 +6,14 @@ import ICONS from './icons/index.js';
|
|
|
6
6
|
|
|
7
7
|
const icons = ICONS;
|
|
8
8
|
function Icon(props) {
|
|
9
|
-
const { className, type, size, ...rest } = props;
|
|
9
|
+
const { className, icon: CustomIcon, type, size, ...rest } = props;
|
|
10
10
|
const iconProps = {
|
|
11
11
|
className: cn(S.root, S[`size-${size}`], className),
|
|
12
12
|
role: 'img',
|
|
13
13
|
...rest,
|
|
14
14
|
};
|
|
15
|
+
if (CustomIcon)
|
|
16
|
+
return jsx(CustomIcon, { ...iconProps });
|
|
15
17
|
const localIcon = ICONS[type];
|
|
16
18
|
if (!localIcon) {
|
|
17
19
|
console.warn(`Icon: type="${type}" is unknown`);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
var SvgClearAll = function SvgClearAll(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
fill: "currentColor",
|
|
8
|
+
viewBox: "0 0 24 24"
|
|
9
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
10
|
+
d: "M.178 18.875v-2.628h18.39v2.628zm2.627-5.255v-2.627h18.391v2.627zm2.627-5.255V5.738h18.391v2.627Z",
|
|
11
|
+
style: {
|
|
12
|
+
strokeWidth: 0.0328412
|
|
13
|
+
}
|
|
14
|
+
}));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { SvgClearAll as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
var SvgFlyover = function SvgFlyover(props) {
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
fill: "currentColor",
|
|
8
|
+
viewBox: "0 0 24 24"
|
|
9
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
10
|
+
d: "M.287 10.947V8.262a39.4 39.4 0 0 1 5.831-1.1 54 54 0 0 1 5.92-.323q2.996 0 5.919.323 2.923.324 5.83 1.1v2.685a23 23 0 0 0-1.174-.291l-1.175-.26v4.206h-2.35V9.944a49 49 0 0 0-7.05-.518q-1.762 0-3.525.114-1.763.113-3.526.372v4.69h-2.35v-4.238a46 46 0 0 0-2.35.583m4.7 12.711 1.704-12.27q.529-.065 1.205-.114.675-.048 1.204-.08L7.337 23.657ZM8.513.37h2.35l-.588 5.05q-.528.031-1.19.08-.66.048-1.19.113Zm2.35 23.288h2.35v-5.175h-2.35zm0-7.763h2.35V11.13h-2.35ZM13.213.37h2.35l.616 5.243q-.528-.032-1.19-.097-.66-.064-1.189-.097Zm3.525 23.288-1.763-12.465q.53.033 1.204.097.675.066 1.205.13l1.704 12.238z",
|
|
11
|
+
style: {
|
|
12
|
+
strokeWidth: 0.0308243
|
|
13
|
+
}
|
|
14
|
+
}));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { SvgFlyover as default };
|
|
@@ -10,6 +10,7 @@ var ICONS = {
|
|
|
10
10
|
chevronDown: () => import('./chevronDown.svg.js'),
|
|
11
11
|
chevronRight: () => import('./chevronRight.svg.js'),
|
|
12
12
|
chevronLeft: () => import('./chevronLeft.svg.js'),
|
|
13
|
+
clearAll: () => import('./clearAll.svg.js'),
|
|
13
14
|
delete: () => import('./delete.svg.js'),
|
|
14
15
|
draft: () => import('./draft.svg.js'),
|
|
15
16
|
edit: () => import('./edit.svg.js'),
|
|
@@ -22,6 +23,7 @@ var ICONS = {
|
|
|
22
23
|
fullscreen: () => import('./fullscreen.svg.js'),
|
|
23
24
|
fullscreenExit: () => import('./fullscreenExit.svg.js'),
|
|
24
25
|
function: () => import('./function.svg.js'),
|
|
26
|
+
flyover: () => import('./flyover.svg.js'),
|
|
25
27
|
gear: () => import('./gear.svg.js'),
|
|
26
28
|
geolocation: () => import('./geolocation.svg.js'),
|
|
27
29
|
group: () => import('./group.svg.js'),
|
|
@@ -52,6 +54,7 @@ var ICONS = {
|
|
|
52
54
|
settings: () => import('./settings.svg.js'),
|
|
53
55
|
shoppingBag: () => import('./shoppingBag.svg.js'),
|
|
54
56
|
sparks: () => import('./sparks.svg.js'),
|
|
57
|
+
star: () => import('./star.svg.js'),
|
|
55
58
|
syncArrows: () => import('./syncArrows.svg.js'),
|
|
56
59
|
table: () => import('./table.svg.js'),
|
|
57
60
|
telegram: () => import('./telegram.svg.js'),
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
var _path;
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
|
+
var SvgStar = function SvgStar(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
viewBox: "0 0 24 24"
|
|
9
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
stroke: "currentColor",
|
|
12
|
+
strokeLinecap: "round",
|
|
13
|
+
strokeLinejoin: "round",
|
|
14
|
+
d: "m12 1.5 2.7 6.3 6.3.9-4.8 4.5 1.5 6.8-5.7-3.2L6.3 20l1.5-6.8L3 8.7l6.3-.9z"
|
|
15
|
+
})));
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { SvgStar as default };
|
|
@@ -14,12 +14,12 @@ import { generateUID } from '../../tools/uid.js';
|
|
|
14
14
|
import S from './Input.styl.js';
|
|
15
15
|
import '../ButtonGroup/ButtonGroup.styl.js';
|
|
16
16
|
import '../Calendar/Calendar.styl.js';
|
|
17
|
-
import '
|
|
18
|
-
import 'lodash.pick';
|
|
17
|
+
import '../../tools/dom.js';
|
|
19
18
|
import 'timen';
|
|
20
19
|
import '../Portal/Portal.js';
|
|
21
20
|
import '../Paranja/Paranja.styl.js';
|
|
22
|
-
import '
|
|
21
|
+
import 'compareq';
|
|
22
|
+
import 'lodash.pick';
|
|
23
23
|
import debounce from '../../tools/debounce.js';
|
|
24
24
|
import '../Popup/Popup.styl.js';
|
|
25
25
|
import '../../tools/queryParams.js';
|
|
@@ -21,9 +21,9 @@ import 'lodash.omit';
|
|
|
21
21
|
import '../RequiredStar/RequiredStar.styl.js';
|
|
22
22
|
import 'nanoid';
|
|
23
23
|
import '../Input/Input.styl.js';
|
|
24
|
+
import '../../tools/dom.js';
|
|
24
25
|
import '../Portal/Portal.js';
|
|
25
26
|
import '../Paranja/Paranja.styl.js';
|
|
26
|
-
import '../../tools/dom.js';
|
|
27
27
|
import '../Popup/Popup.styl.js';
|
|
28
28
|
import '../../tools/queryParams.js';
|
|
29
29
|
import '../Select/Select.styl.js';
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import * as Select_helpers from './Select.helpers.js';
|
|
3
|
+
import { mapById, buildOptionsTree, isMultiple, renderLabel } from './Select.helpers.js';
|
|
2
4
|
import { Component, createRef } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import pick from 'lodash.pick';
|
|
6
|
-
import omit from 'lodash.omit';
|
|
7
|
-
import { createStore } from 'justorm/react';
|
|
8
|
-
import Time from 'timen';
|
|
9
|
-
import { Icon } from '../Icon/Icon.js';
|
|
5
|
+
import { INTERACTION_MODE, getInteractionMode } from '../../tools/dom.js';
|
|
6
|
+
import { AssistiveText } from '../AssistiveText/AssistiveText.js';
|
|
10
7
|
import { Button } from '../Button/Button.js';
|
|
8
|
+
import { Icon } from '../Icon/Icon.js';
|
|
11
9
|
import { Input } from '../Input/Input.js';
|
|
12
10
|
import { Label } from '../Label/Label.js';
|
|
13
11
|
import { Popup } from '../Popup/Popup.js';
|
|
14
|
-
import { Scroll } from '../Scroll/Scroll.js';
|
|
15
12
|
import { RequiredStar } from '../RequiredStar/RequiredStar.js';
|
|
16
|
-
import { AssistiveText } from '../AssistiveText/AssistiveText.js';
|
|
17
|
-
import { INTERACTION_MODE, getInteractionMode } from '../../tools/dom.js';
|
|
18
|
-
import throttle from '../../tools/throttle.js';
|
|
19
|
-
import * as Select_helpers from './Select.helpers.js';
|
|
20
|
-
import { mapById, buildOptionsTree, isMultiple, renderLabel } from './Select.helpers.js';
|
|
21
13
|
import S from './Select.styl.js';
|
|
14
|
+
import { Scroll } from '../Scroll/Scroll.js';
|
|
15
|
+
import Time from 'timen';
|
|
16
|
+
import cn from 'classnames';
|
|
17
|
+
import compare from 'compareq';
|
|
18
|
+
import { createStore } from 'justorm/react';
|
|
19
|
+
import omit from 'lodash.omit';
|
|
20
|
+
import pick from 'lodash.pick';
|
|
21
|
+
import throttle from '../../tools/throttle.js';
|
|
22
22
|
|
|
23
23
|
const SelectHelpers = Select_helpers;
|
|
24
24
|
class Select extends Component {
|
|
@@ -378,8 +378,8 @@ class Select extends Component {
|
|
|
378
378
|
getInputVal() {
|
|
379
379
|
const { isFocused, selected } = this.store;
|
|
380
380
|
const searchValue = this.props.searchValue ?? this.store.searchVal;
|
|
381
|
-
if (isFocused
|
|
382
|
-
return searchValue;
|
|
381
|
+
if (isFocused)
|
|
382
|
+
return searchValue ?? '';
|
|
383
383
|
const selectedPlain = Object.entries(selected).reduce((acc, entry) => {
|
|
384
384
|
const parentId = this.coerceType(entry[0]);
|
|
385
385
|
const val = entry[1];
|
|
@@ -3,6 +3,7 @@ import CUSTOM_ICONS from './icons';
|
|
|
3
3
|
export type IconSize = 'xs' | Size;
|
|
4
4
|
export type IconType = keyof typeof CUSTOM_ICONS;
|
|
5
5
|
export type Props = ComponentType & {
|
|
6
|
-
|
|
6
|
+
icon?: React.ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
7
|
+
type?: IconType;
|
|
7
8
|
size: IconSize;
|
|
8
9
|
};
|
|
@@ -10,6 +10,7 @@ declare const _default: {
|
|
|
10
10
|
chevronDown: () => Promise<any>;
|
|
11
11
|
chevronRight: () => Promise<any>;
|
|
12
12
|
chevronLeft: () => Promise<any>;
|
|
13
|
+
clearAll: () => Promise<any>;
|
|
13
14
|
delete: () => Promise<any>;
|
|
14
15
|
draft: () => Promise<any>;
|
|
15
16
|
edit: () => Promise<any>;
|
|
@@ -22,6 +23,7 @@ declare const _default: {
|
|
|
22
23
|
fullscreen: () => Promise<any>;
|
|
23
24
|
fullscreenExit: () => Promise<any>;
|
|
24
25
|
function: () => Promise<any>;
|
|
26
|
+
flyover: () => Promise<any>;
|
|
25
27
|
gear: () => Promise<any>;
|
|
26
28
|
geolocation: () => Promise<any>;
|
|
27
29
|
group: () => Promise<any>;
|
|
@@ -52,6 +54,7 @@ declare const _default: {
|
|
|
52
54
|
settings: () => Promise<any>;
|
|
53
55
|
shoppingBag: () => Promise<any>;
|
|
54
56
|
sparks: () => Promise<any>;
|
|
57
|
+
star: () => Promise<any>;
|
|
55
58
|
syncArrows: () => Promise<any>;
|
|
56
59
|
table: () => Promise<any>;
|
|
57
60
|
telegram: () => Promise<any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import * as H from './Select.helpers';
|
|
2
|
+
import * as T from './Select.types';
|
|
1
3
|
import { Component, ReactNode } from 'react';
|
|
2
4
|
import { Input } from 'uilib/components/Input/Input';
|
|
3
|
-
import * as T from './Select.types';
|
|
4
|
-
import * as H from './Select.helpers';
|
|
5
5
|
export declare const SelectHelpers: typeof H;
|
|
6
6
|
export declare class Select extends Component<T.Props, T.State> {
|
|
7
7
|
store: any;
|