@via-profit/ui-kit 0.1.0-rc.69 → 0.1.0-rc.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/Autocomplete/AutocompleteContainer.js +5 -9
- package/Autocomplete/index.js +10 -3
- package/Calendar/CalendarWeekDayLabel.d.ts +1 -1
- package/Menu/MenuContainer.js +8 -5
- package/PhoneField/templates.js +4 -4
- package/Selectbox/SelectboxButton.js +5 -25
- package/Selectbox/SelectboxButtonWrapper.d.ts +2 -0
- package/Selectbox/SelectboxButtonWrapper.js +26 -2
- package/Selectbox/SelectboxContainer.js +7 -1
- package/Selectbox/index.js +1 -1
- package/Typography/Base.d.ts +1 -1
- package/Typography/Blockquote.d.ts +1 -1
- package/Typography/List.d.ts +3 -3
- package/Typography/U.d.ts +1 -1
- package/package.json +1 -1
- package/Calendar/CalendarBottomBar.d.ts +0 -4
- package/Calendar/CalendarBottomBar.js +0 -28
- package/Calendar/CalendarMonthControl.d.ts +0 -6
- package/Calendar/CalendarMonthControl.js +0 -41
- package/Calendar/IconChevronLeft.d.ts +0 -3
- package/Calendar/IconChevronLeft.js +0 -9
- package/Selectbox/IconShow.d.ts +0 -3
- package/Selectbox/IconShow.js +0 -9
|
@@ -148,11 +148,9 @@ const Autocomplete = react_1.default.forwardRef((props, ref) => {
|
|
|
148
148
|
}
|
|
149
149
|
dispatch((0, context_1.actionSetPartial)({
|
|
150
150
|
currentValue: value,
|
|
151
|
-
inputValue:
|
|
151
|
+
inputValue: value === null
|
|
152
152
|
? ''
|
|
153
|
-
: value
|
|
154
|
-
? inputValue
|
|
155
|
-
: selectedItemToString(value),
|
|
153
|
+
: selectedItemToString(value),
|
|
156
154
|
}));
|
|
157
155
|
}, [value, multiple, currentValue, inputValue, dispatch, selectedItemToString]);
|
|
158
156
|
react_1.default.useEffect(() => {
|
|
@@ -287,11 +285,9 @@ const Autocomplete = react_1.default.forwardRef((props, ref) => {
|
|
|
287
285
|
}, closeOnSelect: multiple ? false : true, onRequestClose: evt => {
|
|
288
286
|
if (clearIfNotSelected) {
|
|
289
287
|
dispatch((0, context_1.actionSetPartial)({
|
|
290
|
-
inputValue:
|
|
291
|
-
?
|
|
292
|
-
:
|
|
293
|
-
? selectedItemToString(value)
|
|
294
|
-
: '',
|
|
288
|
+
inputValue: value !== null
|
|
289
|
+
? selectedItemToString(value)
|
|
290
|
+
: '',
|
|
295
291
|
}));
|
|
296
292
|
}
|
|
297
293
|
if ((evt === null || evt === void 0 ? void 0 : evt.target) !== anchorElement) {
|
package/Autocomplete/index.js
CHANGED
|
@@ -36,9 +36,16 @@ const AutocompleteContainer_1 = __importDefault(require("./AutocompleteContainer
|
|
|
36
36
|
const context_1 = require("./context");
|
|
37
37
|
__exportStar(require("./AutocompleteContainer"), exports);
|
|
38
38
|
const Autocomplete = react_1.default.forwardRef((props, ref) => {
|
|
39
|
-
const { children, items, isOpen, value } = props, restProps = __rest(props, ["children", "items", "isOpen", "value"]);
|
|
40
|
-
return (react_1.default.createElement(context_1.ContextProvider, { initialState: {
|
|
41
|
-
|
|
39
|
+
const { children, items, isOpen, multiple, selectedItemToString, value } = props, restProps = __rest(props, ["children", "items", "isOpen", "multiple", "selectedItemToString", "value"]);
|
|
40
|
+
return (react_1.default.createElement(context_1.ContextProvider, { initialState: {
|
|
41
|
+
filteredItems: items,
|
|
42
|
+
currentOpen: isOpen,
|
|
43
|
+
currentValue: value,
|
|
44
|
+
inputValue: value === null
|
|
45
|
+
? ''
|
|
46
|
+
: selectedItemToString(value),
|
|
47
|
+
} },
|
|
48
|
+
react_1.default.createElement(AutocompleteContainer_1.default, Object.assign({}, restProps, { items: items, isOpen: isOpen, multiple: multiple, selectedItemToString: selectedItemToString, value: value, ref: ref }), children)));
|
|
42
49
|
});
|
|
43
50
|
Autocomplete.displayName = 'Autocomplete';
|
|
44
51
|
exports.default = Autocomplete;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const _default: React.NamedExoticComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: React.ElementType<any
|
|
4
|
+
as?: React.ElementType<any> | undefined;
|
|
5
5
|
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>>;
|
|
6
6
|
export default _default;
|
package/Menu/MenuContainer.js
CHANGED
|
@@ -126,14 +126,17 @@ const MenuContainer = react_1.default.forwardRef((props, ref) => {
|
|
|
126
126
|
if (typeof onSelectItem === 'function') {
|
|
127
127
|
// For multiple
|
|
128
128
|
if (multiple) {
|
|
129
|
-
const
|
|
129
|
+
const selectedMap = new Map();
|
|
130
|
+
if (value !== null) {
|
|
131
|
+
value.forEach(v => selectedMap.set(JSON.stringify(v), v));
|
|
132
|
+
}
|
|
130
133
|
if (selectedIndexes.includes(index)) {
|
|
131
|
-
|
|
134
|
+
selectedMap.delete(JSON.stringify(item));
|
|
132
135
|
}
|
|
133
|
-
|
|
134
|
-
|
|
136
|
+
if (!selectedIndexes.includes(index)) {
|
|
137
|
+
selectedMap.set(JSON.stringify(item), item);
|
|
135
138
|
}
|
|
136
|
-
onSelectItem(Array.from(
|
|
139
|
+
onSelectItem(Array.from(selectedMap, ([_key, v]) => v));
|
|
137
140
|
}
|
|
138
141
|
else {
|
|
139
142
|
// For single
|
package/PhoneField/templates.js
CHANGED
|
@@ -15,8 +15,8 @@ const US_1 = __importDefault(require("../CountryFlags/US"));
|
|
|
15
15
|
const IL_1 = __importDefault(require("../CountryFlags/IL"));
|
|
16
16
|
exports.templates = [
|
|
17
17
|
// Russian template
|
|
18
|
-
['RU', react_1.default.createElement(RU_1.default, { key: "ru-1" }), '7', '+x (xxx) xxx-xx-xx', '+7 (987) 654-32-10', /^\+$/],
|
|
19
|
-
['RU', react_1.default.createElement(RU_1.default, { key: "ru-2" }), '7', '8 (xxx) xxx-xx-xx', '8 (987) 654-32-10', /^8[^1]{0,}/],
|
|
18
|
+
['RU', react_1.default.createElement(RU_1.default, { key: "ru-1" }), '7', '+x (xxx) xxx-xx-xx', '+7 (987) 654-32-10', /^\+$/],
|
|
19
|
+
['RU', react_1.default.createElement(RU_1.default, { key: "ru-2" }), '7', '8 (xxx) xxx-xx-xx', '8 (987) 654-32-10', /^8[^1]{0,}/],
|
|
20
20
|
[
|
|
21
21
|
'RU',
|
|
22
22
|
react_1.default.createElement(RU_1.default, { key: "ru-3" }),
|
|
@@ -24,7 +24,7 @@ exports.templates = [
|
|
|
24
24
|
'+7 (xxx) xxx-xx-xx',
|
|
25
25
|
'+7 (987) 654-32-10',
|
|
26
26
|
/^\+{0,1}7([0-5]|[8-9])[0-9][0-9]/,
|
|
27
|
-
],
|
|
27
|
+
],
|
|
28
28
|
// Other fucking countries
|
|
29
29
|
['BY', react_1.default.createElement(BY_1.default, { key: "by" }), '375', '+375 (xx) xxx-xx-xx', '+375 (98) 765-43-21', /^\+{0,1}375/],
|
|
30
30
|
['KZ', react_1.default.createElement(KZ_1.default, { key: "kz-1" }), '7', '+997 (xx) xxx-xx-xx', '+997 (98) 765-43-21', /^\+{0,1}997/],
|
|
@@ -35,7 +35,7 @@ exports.templates = [
|
|
|
35
35
|
'+7 (xxx) xxx-xx-xx',
|
|
36
36
|
'+7 (600) 765-43-21',
|
|
37
37
|
/^\+{0,1}7[6-7][0-9][0-9]/,
|
|
38
|
-
],
|
|
38
|
+
],
|
|
39
39
|
['UA', react_1.default.createElement(UA_1.default, { key: "ua" }), '380', '+380 (xx) xxx-xxxx', '+380 (98) 765-4321', /^\+{0,1}380/],
|
|
40
40
|
['JP', react_1.default.createElement(JP_1.default, { key: "jp" }), '81', '+81 (xx) xxx-xxxx', '+81 (98) 765-4321', /^\+{0,1}81/],
|
|
41
41
|
['US', react_1.default.createElement(US_1.default, { key: "us" }), '1', '+1 xxx xxx-xx-xx', '+1 987 654-32-10', /^\+{0,1}1/],
|
|
@@ -39,37 +39,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
const React = __importStar(require("react"));
|
|
41
41
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
42
|
-
const react_1 = require("@emotion/react");
|
|
43
42
|
const Button_1 = __importDefault(require("../Button"));
|
|
44
43
|
const ButtonTextWrapper_1 = __importDefault(require("../Button/ButtonTextWrapper"));
|
|
45
44
|
const StyledSelectboxButton = (0, styled_1.default)(Button_1.default) `
|
|
46
|
-
width: 100%;
|
|
47
45
|
flex: 1;
|
|
48
|
-
border: 1px solid;
|
|
49
|
-
outline: 1px solid transparent;
|
|
50
46
|
padding: 1em 1.2em;
|
|
51
|
-
border-color: ${({ theme }) => theme.isDark
|
|
52
|
-
? theme.color.textPrimary.darken(100).toString()
|
|
53
|
-
: theme.color.textPrimary.lighten(150).toString()};
|
|
54
|
-
width: ${({ $fullWidth }) => ($fullWidth ? '100%' : 'auto')};
|
|
55
47
|
font-size: 1em;
|
|
56
|
-
background
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
(0, react_1.css) `
|
|
62
|
-
border-color: ${props.theme.color.accentPrimary.lighten(10).toString()};
|
|
63
|
-
outline-color: ${props.theme.color.accentPrimary.lighten(10).toString()};
|
|
64
|
-
`};
|
|
65
|
-
${props => props.$error &&
|
|
66
|
-
(0, react_1.css) `
|
|
67
|
-
border-color: ${props.theme.color.error.toString()};
|
|
68
|
-
color: ${props.theme.color.error.toString()};
|
|
69
|
-
&:focus {
|
|
70
|
-
border-color: ${props.theme.color.error.lighten(0.6).toString()};
|
|
71
|
-
}
|
|
72
|
-
`}
|
|
48
|
+
background: none;
|
|
49
|
+
border-radius: inherit;
|
|
50
|
+
margin: 0;
|
|
51
|
+
border: 0;
|
|
52
|
+
width: 100%;
|
|
73
53
|
`;
|
|
74
54
|
const StyledButtonTextWrapper = (0, styled_1.default)(ButtonTextWrapper_1.default) `
|
|
75
55
|
flex: 1;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export type SelectboxButtonWrapperProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
readonly fullWidth?: boolean;
|
|
4
|
+
readonly error?: boolean;
|
|
4
5
|
};
|
|
5
6
|
declare const _default: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
6
7
|
readonly fullWidth?: boolean | undefined;
|
|
8
|
+
readonly error?: boolean | undefined;
|
|
7
9
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
8
10
|
export default _default;
|
|
@@ -39,16 +39,40 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
const React = __importStar(require("react"));
|
|
41
41
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
42
|
+
const react_1 = require("@emotion/react");
|
|
42
43
|
const Wrapper = styled_1.default.div `
|
|
43
44
|
min-width: 16em;
|
|
45
|
+
font-size: 0.9em;
|
|
44
46
|
text-align: left;
|
|
45
47
|
max-width: ${({ $fullWidth }) => ($fullWidth ? '100%' : '16em')};
|
|
46
48
|
display: flex;
|
|
47
49
|
align-items: stretch;
|
|
48
50
|
border-radius: ${({ theme }) => theme.shape.radiusFactor * 2}em;
|
|
51
|
+
border: 1px solid transparent;
|
|
52
|
+
|
|
53
|
+
border: 1px solid;
|
|
54
|
+
outline: 1px solid transparent;
|
|
55
|
+
|
|
56
|
+
border-color: ${({ theme }) => theme.isDark
|
|
57
|
+
? theme.color.textPrimary.darken(100).toString()
|
|
58
|
+
: theme.color.textPrimary.lighten(150).toString()};
|
|
59
|
+
width: ${({ $fullWidth }) => ($fullWidth ? '100%' : 'auto')};
|
|
60
|
+
|
|
61
|
+
background-color: ${({ theme }) => theme.color.surface.toString()};
|
|
62
|
+
color: ${({ theme }) => theme.color.textPrimary.toString()};
|
|
63
|
+
transition: all 180ms ease-out 0s;
|
|
64
|
+
|
|
65
|
+
${props => props.$error &&
|
|
66
|
+
(0, react_1.css) `
|
|
67
|
+
border-color: ${props.theme.color.error.toString()};
|
|
68
|
+
color: ${props.theme.color.error.toString()};
|
|
69
|
+
&:focus {
|
|
70
|
+
border-color: ${props.theme.color.error.lighten(0.6).toString()};
|
|
71
|
+
}
|
|
72
|
+
`}
|
|
49
73
|
`;
|
|
50
74
|
const SelectboxButtonWrapper = (props, ref) => {
|
|
51
|
-
const { fullWidth, children } = props, nativeProps = __rest(props, ["fullWidth", "children"]);
|
|
52
|
-
return (React.createElement(Wrapper, Object.assign({}, nativeProps, { "$fullWidth": Boolean(fullWidth), ref: ref }), children));
|
|
75
|
+
const { fullWidth, children, error } = props, nativeProps = __rest(props, ["fullWidth", "children", "error"]);
|
|
76
|
+
return (React.createElement(Wrapper, Object.assign({}, nativeProps, { "$fullWidth": Boolean(fullWidth), "$error": error, ref: ref }), children));
|
|
53
77
|
};
|
|
54
78
|
exports.default = React.forwardRef(SelectboxButtonWrapper);
|
|
@@ -15,8 +15,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
const react_1 = __importDefault(require("react"));
|
|
18
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
19
|
+
const StyledSelectboxContainer = styled_1.default.div `
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
flex-flow: column;
|
|
22
|
+
vertical-align: top;
|
|
23
|
+
`;
|
|
18
24
|
const SelectboxContainer = (props, ref) => {
|
|
19
25
|
const { children } = props, nativeProps = __rest(props, ["children"]);
|
|
20
|
-
return (react_1.default.createElement(
|
|
26
|
+
return (react_1.default.createElement(StyledSelectboxContainer, Object.assign({}, nativeProps, { ref: ref }), children));
|
|
21
27
|
};
|
|
22
28
|
exports.default = react_1.default.forwardRef(SelectboxContainer);
|
package/Selectbox/index.js
CHANGED
|
@@ -90,7 +90,7 @@ const Selectbox = react_1.default.forwardRef((props, ref) => {
|
|
|
90
90
|
typeof label !== 'undefined' && label !== null && (react_1.default.createElement(overridesMap.Label, { htmlFor: inputID, error: error },
|
|
91
91
|
label,
|
|
92
92
|
typeof requiredAsterisk !== 'undefined' && requiredAsterisk !== null && (react_1.default.createElement(overridesMap.Asterisk, null, typeof requiredAsterisk === 'boolean' ? '*' : requiredAsterisk)))),
|
|
93
|
-
react_1.default.createElement(overridesMap.ButtonWrapper, { fullWidth: fullWidth },
|
|
93
|
+
react_1.default.createElement(overridesMap.ButtonWrapper, { fullWidth: fullWidth, error: error },
|
|
94
94
|
react_1.default.createElement(overridesMap.Button, Object.assign({ fullWidth: fullWidth, error: error, endIcon: isLoading ? react_1.default.createElement(Spinner_1.default, null) : react_1.default.createElement(overridesMap.Icon, { isOpen: isOpen }), onClick: event => {
|
|
95
95
|
if (isOpen) {
|
|
96
96
|
onRequestClose(event);
|
package/Typography/Base.d.ts
CHANGED
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
declare const Base: import("@emotion/styled").StyledComponent<{
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
9
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
10
10
|
export default Base;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const Blockquote: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
5
|
}, import("react").DetailedHTMLProps<import("react").BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, {}>;
|
|
6
6
|
export default Blockquote;
|
package/Typography/List.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const Ul: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
|
|
6
6
|
export declare const Ol: import("@emotion/styled").StyledComponent<{
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
9
|
}, import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, {}>;
|
|
10
10
|
export declare const Li: import("@emotion/styled").StyledComponent<{
|
|
11
11
|
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any
|
|
12
|
+
as?: import("react").ElementType<any> | undefined;
|
|
13
13
|
}, import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
|
|
14
14
|
export default Ul;
|
package/Typography/U.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const U: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
6
6
|
export default U;
|
package/package.json
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
19
|
-
const Container = styled_1.default.div `
|
|
20
|
-
display: flex;
|
|
21
|
-
justify-content: space-between;
|
|
22
|
-
align-items: center;
|
|
23
|
-
`;
|
|
24
|
-
const CalendarBottomBar = (props, ref) => {
|
|
25
|
-
const { children } = props, restProps = __rest(props, ["children"]);
|
|
26
|
-
return (react_1.default.createElement(Container, Object.assign({}, restProps, { ref: ref }), children));
|
|
27
|
-
};
|
|
28
|
-
exports.default = react_1.default.forwardRef(CalendarBottomBar);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface CalendarMonthControlProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
-
readonly displayIcon: 'prev' | 'next';
|
|
4
|
-
}
|
|
5
|
-
declare const _default: React.ForwardRefExoticComponent<CalendarMonthControlProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
export default _default;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
19
|
-
const react_2 = require("@emotion/react");
|
|
20
|
-
const Button_1 = __importDefault(require("../Button"));
|
|
21
|
-
const IconChevronLeft_1 = __importDefault(require("./IconChevronLeft"));
|
|
22
|
-
const IconChevronRight_1 = __importDefault(require("./IconChevronRight"));
|
|
23
|
-
const StyledButton = (0, styled_1.default)(Button_1.default) `
|
|
24
|
-
color: ${({ theme }) => theme.color.accentSecondaryContrast.toString()};
|
|
25
|
-
&:hover {
|
|
26
|
-
color: ${({ theme }) => theme.color.accentSecondaryContrast.alpha(0.5).toString()};
|
|
27
|
-
background-color: ${({ theme }) => theme.color.accentSecondary.lighten(10).toString()};
|
|
28
|
-
}
|
|
29
|
-
&:active {
|
|
30
|
-
color: ${({ theme }) => theme.color.accentSecondaryContrast.alpha(0.9).toString()};
|
|
31
|
-
}
|
|
32
|
-
${({ disabled }) => disabled &&
|
|
33
|
-
(0, react_2.css) `
|
|
34
|
-
opacity: 0.5;
|
|
35
|
-
`};
|
|
36
|
-
`;
|
|
37
|
-
const CalendarMonthControl = (props, ref) => {
|
|
38
|
-
const { displayIcon } = props, restProps = __rest(props, ["displayIcon"]);
|
|
39
|
-
return (react_1.default.createElement(StyledButton, Object.assign({ variant: "plain", iconOnly: true, type: "button" }, restProps, { ref: ref }), displayIcon === 'next' ? react_1.default.createElement(IconChevronRight_1.default, null) : react_1.default.createElement(IconChevronLeft_1.default, null)));
|
|
40
|
-
};
|
|
41
|
-
exports.default = react_1.default.forwardRef(CalendarMonthControl);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const IconChevronLeft = (props, ref) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ref: ref }, props),
|
|
8
|
-
react_1.default.createElement("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 48, d: "M328 112 184 256l144 144" })));
|
|
9
|
-
exports.default = react_1.default.forwardRef(IconChevronLeft);
|
package/Selectbox/IconShow.d.ts
DELETED
package/Selectbox/IconShow.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const IconShow = (props, ref) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", version: "1.1", width: "1em", height: "1em", viewBox: "0 0 512 512" }, props, { ref: ref }),
|
|
8
|
-
react_1.default.createElement("path", { d: "m105.79 160.82a24 24 0 0 0-10.76 6.2109 24 24 0 0 0 0 33.941l144 144a24.002 24.002 0 0 0 33.941 0l144-144a24 24 0 0 0 0-33.941 24 24 0 0 0-33.941 0l-127.03 127.03-127.03-127.03a24 24 0 0 0-23.182-6.2109z", fill: "currentColor" })));
|
|
9
|
-
exports.default = react_1.default.forwardRef(IconShow);
|