@smart-react-components/ui 2.1.0-alpha-10 → 2.1.0-alpha-12
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/ColorPicker/index.js +3 -3
- package/Table/Tr.js +11 -7
- package/components/ColorPicker/ColorPickerElement.d.ts +2 -1
- package/components/ColorPicker/ColorPickerElement.js +8 -5
- package/components/ColorPicker/ConsoleSection/ConsoleSectionElement.d.ts +2 -0
- package/components/ColorPicker/ConsoleSection/ConsoleSectionElement.js +9 -6
- package/components/ColorPicker/ConsoleSection/index.d.ts +2 -1
- package/components/ColorPicker/ConsoleSection/index.js +2 -2
- package/components/ColorPicker/PaletteSection/PaletteItemElement.d.ts +2 -1
- package/components/ColorPicker/PaletteSection/PaletteItemElement.js +9 -6
- package/components/ColorPicker/PaletteSection/PaletteList.d.ts +2 -1
- package/components/ColorPicker/PaletteSection/PaletteList.js +3 -3
- package/components/ColorPicker/PaletteSection/index.d.ts +2 -1
- package/components/ColorPicker/PaletteSection/index.js +4 -3
- package/components/ColorPicker/PickerSection/DraggerElement.js +9 -6
- package/components/ColorPicker/PickerSection/MajorDraggerElement.js +7 -4
- package/components/DatePicker/DatePicker/DatePickerHeader.d.ts +3 -1
- package/components/DatePicker/DatePicker/DatePickerHeader.js +1 -1
- package/components/DatePicker/DatePicker/DatePickerHeaderElement.d.ts +3 -1
- package/components/DatePicker/DatePicker/DatePickerHeaderElement.js +6 -3
- package/components/DatePicker/DatePicker/DatePickerItemElement.js +17 -14
- package/components/DatePicker/DatePicker/DatePickerWeekItemElement.js +17 -14
- package/components/DatePicker/DatePicker/index.js +1 -1
- package/components/DatePicker/DatePickerHeaderElement.js +13 -10
- package/components/DatePicker/TimePicker/TimePickerElement.js +20 -15
- package/components/Table/TableElement.js +42 -36
- package/package.json +7 -7
package/ColorPicker/index.js
CHANGED
|
@@ -63,12 +63,12 @@ const ColorPicker = props => {
|
|
|
63
63
|
updateValue,
|
|
64
64
|
value,
|
|
65
65
|
} },
|
|
66
|
-
react_1.default.createElement(ColorPickerElement_1.default, Object.assign({}, (0, element_props_1.default)(props, [intrinsic_styled_core_props_1.default]), { colorPickerSize: props.size, colorPickerSizeSm: props.sizeSm, colorPickerSizeMd: props.sizeMd, colorPickerSizeLg: props.sizeLg, colorPickerSizeXl: props.sizeXl, isOutline: props.isOutline }),
|
|
66
|
+
react_1.default.createElement(ColorPickerElement_1.default, Object.assign({}, (0, element_props_1.default)(props, [intrinsic_styled_core_props_1.default]), { colorPickerSize: props.size, colorPickerSizeSm: props.sizeSm, colorPickerSizeMd: props.sizeMd, colorPickerSizeLg: props.sizeLg, colorPickerSizeXl: props.sizeXl, isOutline: props.isOutline, palette: props.palette }),
|
|
67
67
|
react_1.default.createElement(PickerSection_1.default, { hasOpacityPicker: props.hasOpacityPicker, onDrag: handleDrag }),
|
|
68
68
|
(props.hasConsole || props.hasButtons) && (react_1.default.createElement(core_1.Hr, { border: "none", background: "transparent", width: "100%" })),
|
|
69
|
-
props.hasConsole && (react_1.default.createElement(ConsoleSection_1.default, { format: props.format, initialValue: initialValue, onRef: v => { consoleSection.current = v; } })),
|
|
69
|
+
props.hasConsole && (react_1.default.createElement(ConsoleSection_1.default, { format: props.format, initialValue: initialValue, onRef: v => { consoleSection.current = v; }, palette: props.palette })),
|
|
70
70
|
props.hasButtons && (react_1.default.createElement(ButtonsSection_1.default, { cancelLabel: props.cancelLabel, isSoft: props.isSoft, onCancel: handleCancel, onSave: handleSave, palette: props.palette, saveLabel: props.saveLabel })),
|
|
71
|
-
props.hasPalette && (react_1.default.createElement(PaletteSection_1.default, { canAddColorToPalette: props.canAddColorToPalette, format: props.format, paletteColors: props.paletteColors, setPaletteColors: props.setPaletteColors })))));
|
|
71
|
+
props.hasPalette && (react_1.default.createElement(PaletteSection_1.default, { canAddColorToPalette: props.canAddColorToPalette, format: props.format, palette: props.palette, paletteColors: props.paletteColors, setPaletteColors: props.setPaletteColors })))));
|
|
72
72
|
};
|
|
73
73
|
ColorPicker.defaultProps = {
|
|
74
74
|
format: color_picker_1.ColorPickerFormat.HEX,
|
package/Table/Tr.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const Tr_1 = __importDefault(require("@smart-react-components/core/Element/Tr"));
|
|
7
7
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
8
|
exports.default = (0, styled_components_1.default)(Tr_1.default)(({ theme, hasHover, isEven, isSoft, palette, startIndex = 0 }) => {
|
|
9
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
|
|
9
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74;
|
|
10
10
|
return `
|
|
11
11
|
${palette
|
|
12
12
|
? `
|
|
@@ -15,12 +15,12 @@ exports.default = (0, styled_components_1.default)(Tr_1.default)(({ theme, hasHo
|
|
|
15
15
|
? `
|
|
16
16
|
background: ${!isEven ? ((_c = (_b = (_a = theme.$.palette[palette].table) === null || _a === void 0 ? void 0 : _a.odd) === null || _b === void 0 ? void 0 : _b.background) !== null && _c !== void 0 ? _c : theme.$.palette[palette].background) : ((_f = (_e = (_d = theme.$.palette[palette].table) === null || _d === void 0 ? void 0 : _d.even) === null || _e === void 0 ? void 0 : _e.background) !== null && _f !== void 0 ? _f : theme.$.palette[palette].dynamic)};
|
|
17
17
|
border-color: ${!isEven ? ((_j = (_h = (_g = theme.$.palette[palette].table) === null || _g === void 0 ? void 0 : _g.odd) === null || _h === void 0 ? void 0 : _h.border) !== null && _j !== void 0 ? _j : theme.$.palette[palette].dynamicest) : ((_m = (_l = (_k = theme.$.palette[palette].table) === null || _k === void 0 ? void 0 : _k.even) === null || _l === void 0 ? void 0 : _l.border) !== null && _m !== void 0 ? _m : theme.$.palette[palette].dynamicest)};
|
|
18
|
-
color: ${!isEven ? ((_q = (_p = (_o = theme.$.palette[palette]) === null || _o === void 0 ? void 0 : _o.
|
|
18
|
+
color: ${!isEven ? ((_r = (_q = (_p = (_o = theme.$.palette[palette]) === null || _o === void 0 ? void 0 : _o.table) === null || _p === void 0 ? void 0 : _p.odd) === null || _q === void 0 ? void 0 : _q.font) !== null && _r !== void 0 ? _r : theme.$.palette[palette].font) : ((_v = (_u = (_t = (_s = theme.$.palette[palette]) === null || _s === void 0 ? void 0 : _s.table) === null || _t === void 0 ? void 0 : _t.even) === null || _u === void 0 ? void 0 : _u.font) !== null && _v !== void 0 ? _v : theme.$.palette[palette].font)};
|
|
19
19
|
`
|
|
20
20
|
: `
|
|
21
|
-
background: ${!isEven ? theme.$.palette[palette].softBackground : theme.$.palette[palette].softDynamic};
|
|
22
|
-
border-color: ${theme.$.palette[palette].softDynamicest};
|
|
23
|
-
color: ${theme.$.palette[palette].softFont};
|
|
21
|
+
background: ${!isEven ? ((_z = (_y = (_x = (_w = theme.$.palette[palette].table) === null || _w === void 0 ? void 0 : _w.odd) === null || _x === void 0 ? void 0 : _x.soft) === null || _y === void 0 ? void 0 : _y.background) !== null && _z !== void 0 ? _z : theme.$.palette[palette].softBackground) : ((_3 = (_2 = (_1 = (_0 = theme.$.palette[palette].table) === null || _0 === void 0 ? void 0 : _0.even) === null || _1 === void 0 ? void 0 : _1.soft) === null || _2 === void 0 ? void 0 : _2.background) !== null && _3 !== void 0 ? _3 : theme.$.palette[palette].softDynamic)};
|
|
22
|
+
border-color: ${!isEven ? ((_7 = (_6 = (_5 = (_4 = theme.$.palette[palette].table) === null || _4 === void 0 ? void 0 : _4.odd) === null || _5 === void 0 ? void 0 : _5.soft) === null || _6 === void 0 ? void 0 : _6.border) !== null && _7 !== void 0 ? _7 : theme.$.palette[palette].softDynamicest) : ((_10 = (_9 = (_8 = theme.$.palette[palette].table) === null || _8 === void 0 ? void 0 : _8.even.soft) === null || _9 === void 0 ? void 0 : _9.border) !== null && _10 !== void 0 ? _10 : theme.$.palette[palette].softDynamicest)};
|
|
23
|
+
color: ${!isEven ? ((_14 = (_13 = (_12 = (_11 = theme.$.palette[palette].table) === null || _11 === void 0 ? void 0 : _11.odd) === null || _12 === void 0 ? void 0 : _12.soft) === null || _13 === void 0 ? void 0 : _13.font) !== null && _14 !== void 0 ? _14 : theme.$.palette[palette].softFont) : ((_18 = (_17 = (_16 = (_15 = theme.$.palette[palette].table) === null || _15 === void 0 ? void 0 : _15.even) === null || _16 === void 0 ? void 0 : _16.soft) === null || _17 === void 0 ? void 0 : _17.font) !== null && _18 !== void 0 ? _18 : theme.$.palette[palette].softFont)};
|
|
24
24
|
`}
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -29,10 +29,14 @@ exports.default = (0, styled_components_1.default)(Tr_1.default)(({ theme, hasHo
|
|
|
29
29
|
&:hover > *:nth-child(n+${startIndex}) {
|
|
30
30
|
${!isSoft
|
|
31
31
|
? `
|
|
32
|
-
background: ${!isEven ? ((
|
|
32
|
+
background: ${!isEven ? ((_22 = (_21 = (_20 = (_19 = theme.$.palette[palette].table) === null || _19 === void 0 ? void 0 : _19.odd) === null || _20 === void 0 ? void 0 : _20.hover) === null || _21 === void 0 ? void 0 : _21.background) !== null && _22 !== void 0 ? _22 : theme.$.palette[palette].dynamicer) : ((_26 = (_25 = (_24 = (_23 = theme.$.palette[palette].table) === null || _23 === void 0 ? void 0 : _23.even) === null || _24 === void 0 ? void 0 : _24.hover) === null || _25 === void 0 ? void 0 : _25.background) !== null && _26 !== void 0 ? _26 : theme.$.palette[palette].dynamicer)};
|
|
33
|
+
border: ${!isEven ? ((_30 = (_29 = (_28 = (_27 = theme.$.palette[palette].table) === null || _27 === void 0 ? void 0 : _27.odd) === null || _28 === void 0 ? void 0 : _28.hover) === null || _29 === void 0 ? void 0 : _29.border) !== null && _30 !== void 0 ? _30 : theme.$.palette[palette].dynamicest) : ((_34 = (_33 = (_32 = (_31 = theme.$.palette[palette].table) === null || _31 === void 0 ? void 0 : _31.even) === null || _32 === void 0 ? void 0 : _32.hover) === null || _33 === void 0 ? void 0 : _33.border) !== null && _34 !== void 0 ? _34 : theme.$.palette[palette].dynamicest)};
|
|
34
|
+
color: ${!isEven ? ((_39 = (_38 = (_37 = (_36 = (_35 = theme.$.palette[palette]) === null || _35 === void 0 ? void 0 : _35.table) === null || _36 === void 0 ? void 0 : _36.odd) === null || _37 === void 0 ? void 0 : _37.hover) === null || _38 === void 0 ? void 0 : _38.font) !== null && _39 !== void 0 ? _39 : theme.$.palette[palette].font) : ((_44 = (_43 = (_42 = (_41 = (_40 = theme.$.palette[palette]) === null || _40 === void 0 ? void 0 : _40.table) === null || _41 === void 0 ? void 0 : _41.even) === null || _42 === void 0 ? void 0 : _42.hover) === null || _43 === void 0 ? void 0 : _43.font) !== null && _44 !== void 0 ? _44 : theme.$.palette[palette].font)};
|
|
33
35
|
`
|
|
34
36
|
: `
|
|
35
|
-
background: ${theme.$.palette[palette].softDynamicer};
|
|
37
|
+
background: ${!isEven ? ((_49 = (_48 = (_47 = (_46 = (_45 = theme.$.palette[palette].table) === null || _45 === void 0 ? void 0 : _45.odd) === null || _46 === void 0 ? void 0 : _46.soft) === null || _47 === void 0 ? void 0 : _47.hover) === null || _48 === void 0 ? void 0 : _48.background) !== null && _49 !== void 0 ? _49 : theme.$.palette[palette].softDynamicer) : ((_54 = (_53 = (_52 = (_51 = (_50 = theme.$.palette[palette].table) === null || _50 === void 0 ? void 0 : _50.even) === null || _51 === void 0 ? void 0 : _51.soft) === null || _52 === void 0 ? void 0 : _52.hover) === null || _53 === void 0 ? void 0 : _53.background) !== null && _54 !== void 0 ? _54 : theme.$.palette[palette].softDynamicer)};
|
|
38
|
+
border: ${!isEven ? ((_59 = (_58 = (_57 = (_56 = (_55 = theme.$.palette[palette].table) === null || _55 === void 0 ? void 0 : _55.odd) === null || _56 === void 0 ? void 0 : _56.soft) === null || _57 === void 0 ? void 0 : _57.hover) === null || _58 === void 0 ? void 0 : _58.border) !== null && _59 !== void 0 ? _59 : theme.$.palette[palette].softDynamicest) : ((_64 = (_63 = (_62 = (_61 = (_60 = theme.$.palette[palette].table) === null || _60 === void 0 ? void 0 : _60.even) === null || _61 === void 0 ? void 0 : _61.soft) === null || _62 === void 0 ? void 0 : _62.hover) === null || _63 === void 0 ? void 0 : _63.border) !== null && _64 !== void 0 ? _64 : theme.$.palette[palette].softDynamicest)};
|
|
39
|
+
color: ${!isEven ? ((_69 = (_68 = (_67 = (_66 = (_65 = theme.$.palette[palette].table) === null || _65 === void 0 ? void 0 : _65.odd) === null || _66 === void 0 ? void 0 : _66.soft) === null || _67 === void 0 ? void 0 : _67.hover) === null || _68 === void 0 ? void 0 : _68.font) !== null && _69 !== void 0 ? _69 : theme.$.palette[palette].softFont) : ((_74 = (_73 = (_72 = (_71 = (_70 = theme.$.palette[palette].table) === null || _70 === void 0 ? void 0 : _70.even) === null || _71 === void 0 ? void 0 : _71.soft) === null || _72 === void 0 ? void 0 : _72.hover) === null || _73 === void 0 ? void 0 : _73.font) !== null && _74 !== void 0 ? _74 : theme.$.palette[palette].softFont)};
|
|
36
40
|
`}
|
|
37
41
|
}
|
|
38
42
|
`
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { StyledProps } from '@smart-react-components/core/styled-props';
|
|
2
|
-
import { ResponsiveProp, SizeProp } from '@smart-react-components/core/types';
|
|
2
|
+
import { PaletteProp, ResponsiveProp, SizeProp } from '@smart-react-components/core/types';
|
|
3
3
|
interface Props extends StyledProps, ResponsiveProp<'colorPickerSize', SizeProp> {
|
|
4
4
|
isOutline: boolean;
|
|
5
|
+
palette: PaletteProp;
|
|
5
6
|
}
|
|
6
7
|
declare const _default: import("styled-components").StyledComponent<"div", any, StyledProps & Props, never>;
|
|
7
8
|
export default _default;
|
|
@@ -14,13 +14,16 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs({
|
|
|
14
14
|
margin-top: ${t.$.size.colorPicker[v].space};
|
|
15
15
|
}
|
|
16
16
|
`,
|
|
17
|
-
})(({ theme, isOutline }) =>
|
|
17
|
+
})(({ theme, isOutline, palette }) => {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
return `
|
|
18
20
|
border-radius: ${theme.$.radius.colorPicker};
|
|
19
21
|
box-sizing: border-box;
|
|
20
22
|
|
|
21
23
|
${!isOutline
|
|
22
|
-
|
|
23
|
-
background: ${theme.$.color.dynamic.gray};
|
|
24
|
+
? `
|
|
25
|
+
background: ${(_b = (_a = theme.$.palette[palette].colorPicker) === null || _a === void 0 ? void 0 : _a.background) !== null && _b !== void 0 ? _b : theme.$.color.dynamic.gray};
|
|
24
26
|
`
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
: ''}
|
|
28
|
+
`;
|
|
29
|
+
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { StyledProps } from '@smart-react-components/core/styled-props';
|
|
2
|
+
import { PaletteProp } from '@smart-react-components/core/types';
|
|
2
3
|
interface Props extends StyledProps {
|
|
3
4
|
isDisabled: boolean;
|
|
5
|
+
palette: PaletteProp;
|
|
4
6
|
}
|
|
5
7
|
declare const _default: import("styled-components").StyledComponent<"section", any, StyledProps & Props, never>;
|
|
6
8
|
export default _default;
|
|
@@ -7,25 +7,28 @@ const Section_1 = __importDefault(require("@smart-react-components/core/Element/
|
|
|
7
7
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
8
|
const InputAddonElement_1 = __importDefault(require("../../Input/InputAddonElement"));
|
|
9
9
|
const InputElement_1 = __importDefault(require("../../Input/InputElement"));
|
|
10
|
-
exports.default = (0, styled_components_1.default)(Section_1.default)(({ theme, isDisabled }) =>
|
|
10
|
+
exports.default = (0, styled_components_1.default)(Section_1.default)(({ theme, isDisabled, palette }) => {
|
|
11
|
+
var _a, _b, _c, _d;
|
|
12
|
+
return `
|
|
11
13
|
background-clip: content-box;
|
|
12
14
|
background-image: url('${theme.$.media.opacityBackground}');
|
|
13
15
|
border-radius: ${theme.$.radius.input.rectangle};
|
|
14
16
|
|
|
15
17
|
${InputElement_1.default},
|
|
16
18
|
${InputAddonElement_1.default} {
|
|
17
|
-
color: ${theme.$.color.light.background};
|
|
19
|
+
color: ${(_b = (_a = theme.$.palette[palette].colorPicker) === null || _a === void 0 ? void 0 : _a.lightFont) !== null && _b !== void 0 ? _b : theme.$.color.light.background};
|
|
18
20
|
transition: none;
|
|
19
21
|
|
|
20
22
|
&[data-src-is-dark="true"] {
|
|
21
|
-
color: ${theme.$.color.dark.background};
|
|
23
|
+
color: ${(_d = (_c = theme.$.palette[palette].colorPicker) === null || _c === void 0 ? void 0 : _c.darkFont) !== null && _d !== void 0 ? _d : theme.$.color.dark.background};
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
${isDisabled
|
|
26
|
-
|
|
28
|
+
? `
|
|
27
29
|
opacity: ${theme.$.opacity.buttonDisabled};
|
|
28
30
|
pointer-events: none;
|
|
29
31
|
`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
: ''}
|
|
33
|
+
`;
|
|
34
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Color, Nullable } from '@smart-react-components/core/types';
|
|
1
|
+
import { Color, Nullable, PaletteProp } from '@smart-react-components/core/types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ColorPickerFormat, ConsoleRef } from '../../../types/color-picker';
|
|
4
4
|
interface Props {
|
|
5
5
|
format: ColorPickerFormat;
|
|
6
6
|
initialValue: Nullable<Color>;
|
|
7
|
+
palette: PaletteProp;
|
|
7
8
|
onRef: (v: ConsoleRef) => void;
|
|
8
9
|
}
|
|
9
10
|
declare const ConsoleSection: React.FC<Props>;
|
|
@@ -11,7 +11,7 @@ const Input_1 = __importDefault(require("../../../Input"));
|
|
|
11
11
|
const InputAddon_1 = __importDefault(require("../../../Input/InputAddon"));
|
|
12
12
|
const color_picker_1 = require("../../../util/color-picker");
|
|
13
13
|
const ConsoleSectionElement_1 = __importDefault(require("./ConsoleSectionElement"));
|
|
14
|
-
const ConsoleSection = ({ format, initialValue, onRef }) => {
|
|
14
|
+
const ConsoleSection = ({ format, initialValue, onRef, palette }) => {
|
|
15
15
|
var _a;
|
|
16
16
|
const { colorPickerSize, colorPickerSizeSm, colorPickerSizeMd, colorPickerSizeLg, colorPickerSizeXl, isDisabled, updateValue, value } = react_1.default.useContext(ColorPickerProps_1.default);
|
|
17
17
|
const clearButtonEl = react_1.default.useRef(null);
|
|
@@ -43,7 +43,7 @@ const ConsoleSection = ({ format, initialValue, onRef }) => {
|
|
|
43
43
|
react_1.default.useEffect(() => {
|
|
44
44
|
handleChange(value);
|
|
45
45
|
}, [value]);
|
|
46
|
-
return (react_1.default.createElement(ConsoleSectionElement_1.default, { isDisabled: isDisabled },
|
|
46
|
+
return (react_1.default.createElement(ConsoleSectionElement_1.default, { isDisabled: isDisabled, palette: palette },
|
|
47
47
|
react_1.default.createElement(Input_1.default, Object.assign({ hasBorder: false, leftAddon: (react_1.default.createElement(InputAddon_1.default, Object.assign({ elementProps: {
|
|
48
48
|
'data-src-is-dark': initialValue ? String((0, color_picker_1.isLight)(initialValue, true)) : true,
|
|
49
49
|
style: {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { StyledProps } from '@smart-react-components/core/styled-props';
|
|
2
|
-
import { ResponsiveProp, SizeProp } from '@smart-react-components/core/types';
|
|
2
|
+
import { PaletteProp, ResponsiveProp, SizeProp } from '@smart-react-components/core/types';
|
|
3
3
|
interface Props extends StyledProps, ResponsiveProp<'colorPickerSize', SizeProp> {
|
|
4
4
|
isDisabled: boolean;
|
|
5
|
+
palette: PaletteProp;
|
|
5
6
|
}
|
|
6
7
|
declare const _default: import("styled-components").StyledComponent<"li", any, StyledProps & Props, never>;
|
|
7
8
|
export default _default;
|
|
@@ -18,9 +18,11 @@ exports.default = (0, styled_components_1.default)(Li_1.default).attrs(({
|
|
|
18
18
|
width: ${t.$.size.icon[v]};
|
|
19
19
|
}
|
|
20
20
|
`,
|
|
21
|
-
}))(({ theme, isDisabled }) =>
|
|
21
|
+
}))(({ theme, isDisabled, palette }) => {
|
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
23
|
+
return `
|
|
22
24
|
align-items: center;
|
|
23
|
-
border-color: ${theme.$.vars.isDarkMode ? theme.$.color.gray700 : theme.$.color.gray400};
|
|
25
|
+
border-color: ${theme.$.vars.isDarkMode ? ((_b = (_a = theme.$.palette[palette].colorPicker) === null || _a === void 0 ? void 0 : _a.paletteDarkBorder) !== null && _b !== void 0 ? _b : theme.$.color.gray700) : ((_d = (_c = theme.$.palette[palette].colorPicker) === null || _c === void 0 ? void 0 : _c.paletteLightBorder) !== null && _d !== void 0 ? _d : theme.$.color.gray400)};
|
|
24
26
|
border-radius: ${theme.$.radius.colorPicker};
|
|
25
27
|
display: flex;
|
|
26
28
|
justify-content: center;
|
|
@@ -32,12 +34,13 @@ exports.default = (0, styled_components_1.default)(Li_1.default).attrs(({
|
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
${Svg_1.default} {
|
|
35
|
-
fill: ${theme.$.vars.isDarkMode ? theme.$.color.gray600 : theme.$.color.gray500};
|
|
37
|
+
fill: ${theme.$.vars.isDarkMode ? ((_f = (_e = theme.$.palette[palette].colorPicker) === null || _e === void 0 ? void 0 : _e.paletteDarkIcon) !== null && _f !== void 0 ? _f : theme.$.color.gray600) : ((_h = (_g = theme.$.palette[palette].colorPicker) === null || _g === void 0 ? void 0 : _g.paletteLightIcon) !== null && _h !== void 0 ? _h : theme.$.color.gray500)};
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
${isDisabled
|
|
39
|
-
|
|
41
|
+
? `
|
|
40
42
|
opacity: ${theme.$.opacity.buttonDisabled};
|
|
41
43
|
`
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
: ''}
|
|
45
|
+
`;
|
|
46
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { SetState } from '@smart-react-components/core/types';
|
|
1
|
+
import { PaletteProp, SetState } from '@smart-react-components/core/types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ColorPickerFormat } from '../../../ColorPicker';
|
|
4
4
|
interface Props {
|
|
5
5
|
canAddColorToPalette: boolean;
|
|
6
6
|
format: ColorPickerFormat;
|
|
7
|
+
palette: PaletteProp;
|
|
7
8
|
paletteColors: string[];
|
|
8
9
|
setPaletteColors: SetState<string[]>;
|
|
9
10
|
}
|
|
@@ -14,7 +14,7 @@ const color_picker_1 = require("../../../util/color-picker");
|
|
|
14
14
|
const props_1 = require("../../../util/props");
|
|
15
15
|
const PaletteItemElement_1 = __importDefault(require("./PaletteItemElement"));
|
|
16
16
|
const PaletteListContainerElement_1 = __importDefault(require("./PaletteListContainerElement"));
|
|
17
|
-
const PaletteList = ({ canAddColorToPalette, format, paletteColors, setPaletteColors }) => {
|
|
17
|
+
const PaletteList = ({ canAddColorToPalette, format, palette, paletteColors, setPaletteColors }) => {
|
|
18
18
|
const theme = (0, styled_components_1.useTheme)();
|
|
19
19
|
const { colorPickerSize, colorPickerSizeSm, colorPickerSizeMd, colorPickerSizeLg, colorPickerSizeXl, isDisabled, updateValue, value } = react_1.default.useContext(ColorPickerProps_1.default);
|
|
20
20
|
const handleAddItemClick = () => {
|
|
@@ -32,9 +32,9 @@ const PaletteList = ({ canAddColorToPalette, format, paletteColors, setPaletteCo
|
|
|
32
32
|
marginTop: v => `-$size.colorPicker.${v}.space`,
|
|
33
33
|
paddingTop: v => `$size.colorPicker.${v}.space`,
|
|
34
34
|
}), { display: "flex", flexWrap: "wrap", listStyle: "none" }),
|
|
35
|
-
canAddColorToPalette && (react_1.default.createElement(PaletteItemElement_1.default, Object.assign({ border: "solid 1px", colorPickerSize: colorPickerSize, colorPickerSizeSm: colorPickerSizeSm, colorPickerSizeMd: colorPickerSizeMd, colorPickerSizeLg: colorPickerSizeLg, colorPickerSizeXl: colorPickerSizeXl, isDisabled: isDisabled }, (!isDisabled && { onClick: handleAddItemClick })),
|
|
35
|
+
canAddColorToPalette && (react_1.default.createElement(PaletteItemElement_1.default, Object.assign({ border: "solid 1px", colorPickerSize: colorPickerSize, colorPickerSizeSm: colorPickerSizeSm, colorPickerSizeMd: colorPickerSizeMd, colorPickerSizeLg: colorPickerSizeLg, colorPickerSizeXl: colorPickerSizeXl, palette: palette, isDisabled: isDisabled }, (!isDisabled && { onClick: handleAddItemClick })),
|
|
36
36
|
react_1.default.createElement(Add_1.default, null))),
|
|
37
|
-
paletteColors.map(item => (react_1.default.createElement(PaletteItemElement_1.default, Object.assign({ backgroundImage: "url('{media.opacityBackground}')", colorPickerSize: colorPickerSize, colorPickerSizeSm: colorPickerSizeSm, colorPickerSizeMd: colorPickerSizeMd, colorPickerSizeLg: colorPickerSizeLg, colorPickerSizeXl: colorPickerSizeXl, key: item, isDisabled: isDisabled }, (!isDisabled && { onClick: () => updateValue(item) })),
|
|
37
|
+
paletteColors.map(item => (react_1.default.createElement(PaletteItemElement_1.default, Object.assign({ backgroundImage: "url('{media.opacityBackground}')", colorPickerSize: colorPickerSize, colorPickerSizeSm: colorPickerSizeSm, colorPickerSizeMd: colorPickerSizeMd, colorPickerSizeLg: colorPickerSizeLg, colorPickerSizeXl: colorPickerSizeXl, key: item, isDisabled: isDisabled, palette: palette }, (!isDisabled && { onClick: () => updateValue(item) })),
|
|
38
38
|
react_1.default.createElement("div", { style: { background: item } })))))));
|
|
39
39
|
};
|
|
40
40
|
exports.default = PaletteList;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { SetState } from '@smart-react-components/core/types';
|
|
1
|
+
import { PaletteProp, SetState } from '@smart-react-components/core/types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ColorPickerFormat } from '../../../ColorPicker';
|
|
4
4
|
interface Props {
|
|
5
5
|
canAddColorToPalette: boolean;
|
|
6
6
|
format: ColorPickerFormat;
|
|
7
|
+
palette: PaletteProp;
|
|
7
8
|
paletteColors?: string[];
|
|
8
9
|
setPaletteColors?: SetState<string[]>;
|
|
9
10
|
}
|
|
@@ -12,15 +12,16 @@ const ColorPickerProps_1 = __importDefault(require("../../../context/ColorPicker
|
|
|
12
12
|
const ArrowMultipleDown_1 = __importDefault(require("../../../icons/ArrowMultipleDown"));
|
|
13
13
|
const props_1 = require("../../../util/props");
|
|
14
14
|
const PaletteList_1 = __importDefault(require("./PaletteList"));
|
|
15
|
-
const PaletteSection = ({ canAddColorToPalette, format, paletteColors, setPaletteColors }) => {
|
|
15
|
+
const PaletteSection = ({ canAddColorToPalette, format, palette, paletteColors, setPaletteColors }) => {
|
|
16
|
+
var _a, _b, _c, _d;
|
|
16
17
|
const theme = (0, styled_components_1.useTheme)();
|
|
17
18
|
const { colorPickerSize, colorPickerSizeSm, colorPickerSizeMd, colorPickerSizeLg, colorPickerSizeXl, isDisabled } = react_1.default.useContext(ColorPickerProps_1.default);
|
|
18
19
|
const [localPaletteColors, setLocalPaletteColors] = react_1.default.useState(() => color_picker_1.defaultPaletteColors);
|
|
19
20
|
const [status, setStatus] = react_1.default.useState(() => false);
|
|
20
21
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
21
22
|
react_1.default.createElement(Section_1.default, null,
|
|
22
|
-
react_1.default.createElement(ArrowMultipleDown_1.default, Object.assign({}, (0, props_1.applyResponsiveStyledProp)({ colorPickerSize, colorPickerSizeSm, colorPickerSizeMd, colorPickerSizeLg, colorPickerSizeXl }, 'colorPickerSize', 'iconSize', v => `$size.icon.${v}`), { display: "block", fill: theme.$.vars.isDarkMode ? '$color.gray600' : '$color.gray500', margin: "auto" }, (!isDisabled && { onClick: () => setStatus(!status) })))),
|
|
23
|
+
react_1.default.createElement(ArrowMultipleDown_1.default, Object.assign({}, (0, props_1.applyResponsiveStyledProp)({ colorPickerSize, colorPickerSizeSm, colorPickerSizeMd, colorPickerSizeLg, colorPickerSizeXl }, 'colorPickerSize', 'iconSize', v => `$size.icon.${v}`), { display: "block", fill: theme.$.vars.isDarkMode ? ((_b = (_a = theme.$.palette[palette].colorPicker) === null || _a === void 0 ? void 0 : _a.paletteDarkIcon) !== null && _b !== void 0 ? _b : '$color.gray600') : ((_d = (_c = theme.$.palette[palette].colorPicker) === null || _c === void 0 ? void 0 : _c.paletteLightIcon) !== null && _d !== void 0 ? _d : '$color.gray500'), margin: "auto" }, (!isDisabled && { onClick: () => setStatus(!status) })))),
|
|
23
24
|
react_1.default.createElement(CSSTransition_1.default, { className: "src-fade", duration: 150, status: status },
|
|
24
|
-
react_1.default.createElement(PaletteList_1.default, { canAddColorToPalette: canAddColorToPalette, format: format, paletteColors: paletteColors !== null && paletteColors !== void 0 ? paletteColors : localPaletteColors, setPaletteColors: setPaletteColors !== null && setPaletteColors !== void 0 ? setPaletteColors : setLocalPaletteColors }))));
|
|
25
|
+
react_1.default.createElement(PaletteList_1.default, { canAddColorToPalette: canAddColorToPalette, format: format, palette: palette, paletteColors: paletteColors !== null && paletteColors !== void 0 ? paletteColors : localPaletteColors, setPaletteColors: setPaletteColors !== null && setPaletteColors !== void 0 ? setPaletteColors : setLocalPaletteColors }))));
|
|
25
26
|
};
|
|
26
27
|
exports.default = PaletteSection;
|
|
@@ -5,20 +5,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const Span_1 = __importDefault(require("@smart-react-components/core/Element/Span"));
|
|
7
7
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
8
|
-
exports.default = (0, styled_components_1.default)(Span_1.default)(({ theme, isDisabled }) =>
|
|
9
|
-
|
|
8
|
+
exports.default = (0, styled_components_1.default)(Span_1.default)(({ theme, isDisabled, palette }) => {
|
|
9
|
+
var _a, _b, _c, _d;
|
|
10
|
+
return `
|
|
11
|
+
border: solid 2px ${(_b = (_a = theme.$.palette[palette].colorPicker) === null || _a === void 0 ? void 0 : _a.lightFont) !== null && _b !== void 0 ? _b : theme.$.color.light.background};
|
|
10
12
|
border-radius: 100%;
|
|
11
13
|
box-shadow: 0 0 5px rgba(0,0,0,.5);
|
|
12
14
|
box-sizing: border-box;
|
|
13
15
|
position: absolute;
|
|
14
16
|
|
|
15
17
|
&[data-src-is-dark="true"] {
|
|
16
|
-
border-color: ${theme.$.color.dark.background};
|
|
18
|
+
border-color: ${(_d = (_c = theme.$.palette[palette].colorPicker) === null || _c === void 0 ? void 0 : _c.darkFont) !== null && _d !== void 0 ? _d : theme.$.color.dark.background};
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
${isDisabled
|
|
20
|
-
|
|
22
|
+
? `
|
|
21
23
|
opacity: ${theme.$.opacity.buttonDisabled};
|
|
22
24
|
`
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
: ''}
|
|
26
|
+
`;
|
|
27
|
+
});
|
|
@@ -10,9 +10,11 @@ exports.default = (0, styled_components_1.default)(DraggerElement_1.default).att
|
|
|
10
10
|
height: ${t.$.size.colorPicker[v].majorDraggerSize};
|
|
11
11
|
width: ${t.$.size.colorPicker[v].majorDraggerSize};
|
|
12
12
|
`,
|
|
13
|
-
})(({ theme }) =>
|
|
13
|
+
})(({ theme, palette }) => {
|
|
14
|
+
var _a, _b, _c, _d;
|
|
15
|
+
return `
|
|
14
16
|
&::after {
|
|
15
|
-
border: solid 4px ${theme.$.color.light.background};
|
|
17
|
+
border: solid 4px ${(_b = (_a = theme.$.palette[palette].colorPicker) === null || _a === void 0 ? void 0 : _a.lightFont) !== null && _b !== void 0 ? _b : theme.$.color.light.background};
|
|
16
18
|
border-radius: 100%;
|
|
17
19
|
content: "";
|
|
18
20
|
left: calc(50% - 4px);
|
|
@@ -21,6 +23,7 @@ exports.default = (0, styled_components_1.default)(DraggerElement_1.default).att
|
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
&[data-src-is-dark="true"]::after {
|
|
24
|
-
border-color: ${theme.$.color.dark.background};
|
|
26
|
+
border-color: ${(_d = (_c = theme.$.palette[palette].colorPicker) === null || _c === void 0 ? void 0 : _c.darkFont) !== null && _d !== void 0 ? _d : theme.$.color.dark.background};
|
|
25
27
|
}
|
|
26
|
-
|
|
28
|
+
`;
|
|
29
|
+
});
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { SizeProps, SetState } from '@smart-react-components/core/types';
|
|
1
|
+
import { SizeProps, SetState, PaletteProp } from '@smart-react-components/core/types';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { DatePickerSelectedDatePicker } from '../../../constants/date-picker';
|
|
4
4
|
export interface Props extends SizeProps {
|
|
5
|
+
isSoft: boolean;
|
|
6
|
+
palette: PaletteProp;
|
|
5
7
|
selectedDate: Date;
|
|
6
8
|
selectedPicker: DatePickerSelectedDatePicker;
|
|
7
9
|
setSelectedDate: SetState<Date>;
|
|
@@ -58,7 +58,7 @@ const DatePickerHeader = props => {
|
|
|
58
58
|
break;
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
-
return (react_1.default.createElement(DatePickerHeaderElement_1.default, Object.assign({}, (0, props_1.applyResponsiveStyledProp)(props, 'size', 'datePickerSize', v => v)),
|
|
61
|
+
return (react_1.default.createElement(DatePickerHeaderElement_1.default, Object.assign({ isSoft: props.isSoft, palette: props.palette }, (0, props_1.applyResponsiveStyledProp)(props, 'size', 'datePickerSize', v => v)),
|
|
62
62
|
react_1.default.createElement("div", { onClick: changeSelectedPicker }, value),
|
|
63
63
|
react_1.default.createElement("div", null,
|
|
64
64
|
react_1.default.createElement("div", null,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { StyledProps } from '@smart-react-components/core/styled-props';
|
|
2
|
-
import { ResponsiveProp, SizeProp } from '@smart-react-components/core/types';
|
|
2
|
+
import { PaletteProp, ResponsiveProp, SizeProp } from '@smart-react-components/core/types';
|
|
3
3
|
interface Props extends StyledProps, ResponsiveProp<'datePickerSize', SizeProp> {
|
|
4
|
+
isSoft: boolean;
|
|
5
|
+
palette: PaletteProp;
|
|
4
6
|
}
|
|
5
7
|
declare const _default: import("styled-components").StyledComponent<"header", any, StyledProps & Props, never>;
|
|
6
8
|
export default _default;
|
|
@@ -27,7 +27,9 @@ exports.default = (0, styled_components_1.default)(Header_1.default).attrs({
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
`,
|
|
30
|
-
})(({ theme }) =>
|
|
30
|
+
})(({ theme, isSoft, palette }) => {
|
|
31
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
32
|
+
return `
|
|
31
33
|
align-items: center;
|
|
32
34
|
display: flex;
|
|
33
35
|
justify-content: space-between;
|
|
@@ -47,8 +49,9 @@ exports.default = (0, styled_components_1.default)(Header_1.default).attrs({
|
|
|
47
49
|
justify-content: center;
|
|
48
50
|
|
|
49
51
|
svg {
|
|
50
|
-
fill: ${theme.$.color.gray600};
|
|
52
|
+
fill: ${!isSoft ? ((_c = (_b = (_a = theme.$.palette[palette].datePicker) === null || _a === void 0 ? void 0 : _a.date) === null || _b === void 0 ? void 0 : _b.icon) !== null && _c !== void 0 ? _c : theme.$.color.gray600) : ((_g = (_f = (_e = (_d = theme.$.palette[palette].datePicker) === null || _d === void 0 ? void 0 : _d.soft) === null || _e === void 0 ? void 0 : _e.date) === null || _f === void 0 ? void 0 : _f.icon) !== null && _g !== void 0 ? _g : theme.$.color.gray600)};
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
|
-
|
|
56
|
+
`;
|
|
57
|
+
});
|
|
@@ -11,7 +11,9 @@ exports.default = (0, styled_components_1.default)(Li_1.default).attrs({
|
|
|
11
11
|
margin: ${t.$.size.datePicker[v].itemSpace} ${t.$.size.datePicker[v].itemSpace};
|
|
12
12
|
width: ${t.$.size.datePicker[v].itemSize};
|
|
13
13
|
`,
|
|
14
|
-
})(({ theme, palette, isActive, isNotCurrentDate, isSoft }) =>
|
|
14
|
+
})(({ theme, palette, isActive, isNotCurrentDate, isSoft }) => {
|
|
15
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
16
|
+
return `
|
|
15
17
|
align-items: center;
|
|
16
18
|
border-radius: ${theme.$.radius.datePickerItem};
|
|
17
19
|
display: flex;
|
|
@@ -19,27 +21,28 @@ exports.default = (0, styled_components_1.default)(Li_1.default).attrs({
|
|
|
19
21
|
justify-content: center;
|
|
20
22
|
|
|
21
23
|
${isActive
|
|
22
|
-
|
|
24
|
+
? `
|
|
23
25
|
font-weight: ${theme.$.fontWeight.datePicker};
|
|
24
26
|
|
|
25
27
|
${isSoft
|
|
26
|
-
|
|
27
|
-
background: ${theme.$.palette[palette].soft};
|
|
28
|
-
color: ${theme.$.palette[palette].softFont};
|
|
28
|
+
? `
|
|
29
|
+
background: ${(_e = (_d = (_c = (_b = (_a = theme.$.palette[palette].datePicker) === null || _a === void 0 ? void 0 : _a.soft) === null || _b === void 0 ? void 0 : _b.date) === null || _c === void 0 ? void 0 : _c.active) === null || _d === void 0 ? void 0 : _d.background) !== null && _e !== void 0 ? _e : theme.$.palette[palette].soft};
|
|
30
|
+
color: ${(_k = (_j = (_h = (_g = (_f = theme.$.palette[palette].datePicker) === null || _f === void 0 ? void 0 : _f.soft) === null || _g === void 0 ? void 0 : _g.date) === null || _h === void 0 ? void 0 : _h.active) === null || _j === void 0 ? void 0 : _j.font) !== null && _k !== void 0 ? _k : theme.$.palette[palette].softFont};
|
|
29
31
|
`
|
|
30
|
-
|
|
31
|
-
background: ${theme.$.palette[palette].main};
|
|
32
|
-
color: ${theme.$.palette[palette].font};
|
|
32
|
+
: `
|
|
33
|
+
background: ${(_p = (_o = (_m = (_l = theme.$.palette[palette].datePicker) === null || _l === void 0 ? void 0 : _l.date) === null || _m === void 0 ? void 0 : _m.active) === null || _o === void 0 ? void 0 : _o.background) !== null && _p !== void 0 ? _p : theme.$.palette[palette].main};
|
|
34
|
+
color: ${(_t = (_s = (_r = (_q = theme.$.palette[palette].datePicker) === null || _q === void 0 ? void 0 : _q.date) === null || _r === void 0 ? void 0 : _r.active) === null || _s === void 0 ? void 0 : _s.background) !== null && _t !== void 0 ? _t : theme.$.palette[palette].font};
|
|
33
35
|
`}
|
|
34
36
|
`
|
|
35
|
-
|
|
37
|
+
: `
|
|
36
38
|
${isNotCurrentDate
|
|
37
|
-
|
|
38
|
-
color: ${theme.$.color.gray600};
|
|
39
|
+
? `
|
|
40
|
+
color: ${!isSoft ? ((_w = (_v = (_u = theme.$.palette[palette].datePicker) === null || _u === void 0 ? void 0 : _u.date) === null || _v === void 0 ? void 0 : _v.icon) !== null && _w !== void 0 ? _w : theme.$.color.gray600) : ((_0 = (_z = (_y = (_x = theme.$.palette[palette].datePicker) === null || _x === void 0 ? void 0 : _x.soft) === null || _y === void 0 ? void 0 : _y.date) === null || _z === void 0 ? void 0 : _z.icon) !== null && _0 !== void 0 ? _0 : theme.$.color.gray600)};
|
|
39
41
|
`
|
|
40
|
-
|
|
41
|
-
color: ${theme.$.color.dynamic.font};
|
|
42
|
+
: `
|
|
43
|
+
color: ${!isSoft ? ((_3 = (_2 = (_1 = theme.$.palette[palette].datePicker) === null || _1 === void 0 ? void 0 : _1.date) === null || _2 === void 0 ? void 0 : _2.font) !== null && _3 !== void 0 ? _3 : theme.$.color.dynamic.font) : ((_7 = (_6 = (_5 = (_4 = theme.$.palette[palette].datePicker) === null || _4 === void 0 ? void 0 : _4.soft) === null || _5 === void 0 ? void 0 : _5.date) === null || _6 === void 0 ? void 0 : _6.font) !== null && _7 !== void 0 ? _7 : theme.$.color.dynamic.font)};
|
|
42
44
|
font-weight: ${theme.$.fontWeight.datePicker};
|
|
43
45
|
`}
|
|
44
46
|
`}
|
|
45
|
-
|
|
47
|
+
`;
|
|
48
|
+
});
|
|
@@ -11,7 +11,9 @@ exports.default = (0, styled_components_1.default)(Li_1.default).attrs({
|
|
|
11
11
|
margin: ${t.$.size.datePicker[v].itemWeekSpace.y} ${t.$.size.datePicker[v].itemWeekSpace.x};
|
|
12
12
|
width: ${t.$.size.datePicker[v].itemWeekSize};
|
|
13
13
|
`,
|
|
14
|
-
})(({ theme, palette, isActive, isNotCurrentDate, isSoft }) =>
|
|
14
|
+
})(({ theme, palette, isActive, isNotCurrentDate, isSoft }) => {
|
|
15
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
|
|
16
|
+
return `
|
|
15
17
|
align-items: center;
|
|
16
18
|
border-radius: ${theme.$.radius.datePickerItem};
|
|
17
19
|
display: flex;
|
|
@@ -19,27 +21,28 @@ exports.default = (0, styled_components_1.default)(Li_1.default).attrs({
|
|
|
19
21
|
justify-content: center;
|
|
20
22
|
|
|
21
23
|
${isActive
|
|
22
|
-
|
|
24
|
+
? `
|
|
23
25
|
font-weight: ${theme.$.fontWeight.datePicker};
|
|
24
26
|
|
|
25
27
|
${isSoft
|
|
26
|
-
|
|
27
|
-
background: ${theme.$.palette[palette].soft};
|
|
28
|
-
color: ${theme.$.palette[palette].softFont};
|
|
28
|
+
? `
|
|
29
|
+
background: ${(_e = (_d = (_c = (_b = (_a = theme.$.palette[palette].datePicker) === null || _a === void 0 ? void 0 : _a.soft) === null || _b === void 0 ? void 0 : _b.date) === null || _c === void 0 ? void 0 : _c.active) === null || _d === void 0 ? void 0 : _d.background) !== null && _e !== void 0 ? _e : theme.$.palette[palette].soft};
|
|
30
|
+
color: ${(_k = (_j = (_h = (_g = (_f = theme.$.palette[palette].datePicker) === null || _f === void 0 ? void 0 : _f.soft) === null || _g === void 0 ? void 0 : _g.date) === null || _h === void 0 ? void 0 : _h.active) === null || _j === void 0 ? void 0 : _j.font) !== null && _k !== void 0 ? _k : theme.$.palette[palette].softFont};
|
|
29
31
|
`
|
|
30
|
-
|
|
31
|
-
background: ${theme.$.palette[palette].main};
|
|
32
|
-
color: ${theme.$.palette[palette].font};
|
|
32
|
+
: `
|
|
33
|
+
background: ${(_p = (_o = (_m = (_l = theme.$.palette[palette].datePicker) === null || _l === void 0 ? void 0 : _l.date) === null || _m === void 0 ? void 0 : _m.active) === null || _o === void 0 ? void 0 : _o.background) !== null && _p !== void 0 ? _p : theme.$.palette[palette].main};
|
|
34
|
+
color: ${(_t = (_s = (_r = (_q = theme.$.palette[palette].datePicker) === null || _q === void 0 ? void 0 : _q.date) === null || _r === void 0 ? void 0 : _r.active) === null || _s === void 0 ? void 0 : _s.background) !== null && _t !== void 0 ? _t : theme.$.palette[palette].font};
|
|
33
35
|
`}
|
|
34
36
|
`
|
|
35
|
-
|
|
37
|
+
: `
|
|
36
38
|
${isNotCurrentDate
|
|
37
|
-
|
|
38
|
-
color: ${theme.$.color.gray600};
|
|
39
|
+
? `
|
|
40
|
+
color: ${!isSoft ? ((_w = (_v = (_u = theme.$.palette[palette].datePicker) === null || _u === void 0 ? void 0 : _u.date) === null || _v === void 0 ? void 0 : _v.icon) !== null && _w !== void 0 ? _w : theme.$.color.gray600) : ((_0 = (_z = (_y = (_x = theme.$.palette[palette].datePicker) === null || _x === void 0 ? void 0 : _x.soft) === null || _y === void 0 ? void 0 : _y.date) === null || _z === void 0 ? void 0 : _z.icon) !== null && _0 !== void 0 ? _0 : theme.$.color.gray600)};
|
|
39
41
|
`
|
|
40
|
-
|
|
41
|
-
color: ${theme.$.color.dynamic.font};
|
|
42
|
+
: `
|
|
43
|
+
color: ${!isSoft ? ((_3 = (_2 = (_1 = theme.$.palette[palette].datePicker) === null || _1 === void 0 ? void 0 : _1.date) === null || _2 === void 0 ? void 0 : _2.font) !== null && _3 !== void 0 ? _3 : theme.$.color.dynamic.font) : ((_7 = (_6 = (_5 = (_4 = theme.$.palette[palette].datePicker) === null || _4 === void 0 ? void 0 : _4.soft) === null || _5 === void 0 ? void 0 : _5.date) === null || _6 === void 0 ? void 0 : _6.font) !== null && _7 !== void 0 ? _7 : theme.$.color.dynamic.font)};
|
|
42
44
|
font-weight: ${theme.$.fontWeight.datePicker};
|
|
43
45
|
`}
|
|
44
46
|
`}
|
|
45
|
-
|
|
47
|
+
`;
|
|
48
|
+
});
|
|
@@ -16,7 +16,7 @@ const YearPicker_1 = __importDefault(require("./YearPicker"));
|
|
|
16
16
|
const DatePicker = props => {
|
|
17
17
|
const prevSelectedPicker = (0, usePrevious_1.default)(props.selectedPicker);
|
|
18
18
|
return (react_1.default.createElement(Section_1.default, Object.assign({}, (0, props_1.applyResponsiveStyledProp)(props, 'size', 'height', v => `$size.datePicker.${v}.bodyHeight`)),
|
|
19
|
-
react_1.default.createElement(DatePickerHeader_1.default, Object.assign({}, (0, props_1.applyResponsiveStyledProp)(props, 'size', 'size', v => v), { selectedDate: props.selectedDate, selectedPicker: props.selectedPicker, setSelectedDate: props.setSelectedDate, setSelectedPicker: props.setSelectedPicker, value: props.selectedDate })),
|
|
19
|
+
react_1.default.createElement(DatePickerHeader_1.default, Object.assign({}, (0, props_1.applyResponsiveStyledProp)(props, 'size', 'size', v => v), { isSoft: props.isSoft, palette: props.palette, selectedDate: props.selectedDate, selectedPicker: props.selectedPicker, setSelectedDate: props.setSelectedDate, setSelectedPicker: props.setSelectedPicker, value: props.selectedDate })),
|
|
20
20
|
react_1.default.createElement(CSSTransitionSwitch_1.default, { active: props.selectedPicker, className: (props.selectedPicker === date_picker_1.DatePickerSelectedDatePicker.WEEK || (props.selectedPicker === date_picker_1.DatePickerSelectedDatePicker.MONTH && prevSelectedPicker === date_picker_1.DatePickerSelectedDatePicker.YEAR)) ? 'src-in-out' : 'src-out-in', duration: 150 },
|
|
21
21
|
react_1.default.createElement(WeekPicker_1.default, Object.assign({ key: date_picker_1.DatePickerSelectedDatePicker.WEEK }, (0, props_1.applyResponsiveStyledProp)(props, 'size', 'size', v => v), { isSoft: props.isSoft, palette: props.palette, selectedDate: props.selectedDate, selectedPicker: props.selectedPicker, setValue: props.setValue, value: props.value })),
|
|
22
22
|
react_1.default.createElement(MonthPicker_1.default, Object.assign({ key: date_picker_1.DatePickerSelectedDatePicker.MONTH }, (0, props_1.applyResponsiveStyledProp)(props, 'size', 'size', v => v), { isSoft: props.isSoft, palette: props.palette, selectedDate: props.selectedDate, selectedPicker: props.selectedPicker, setSelectedDate: props.setSelectedDate, setSelectedPicker: props.setSelectedPicker, value: props.value })),
|
|
@@ -25,7 +25,9 @@ exports.default = (0, styled_components_1.default)(Header_1.default).attrs({
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
`,
|
|
28
|
-
})(({ isSoft, palette, theme }) =>
|
|
28
|
+
})(({ isSoft, palette, theme }) => {
|
|
29
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
|
|
30
|
+
return `
|
|
29
31
|
align-items: center;
|
|
30
32
|
border-top-left-radius: ${theme.$.radius.datePicker};
|
|
31
33
|
border-top-right-radius: ${theme.$.radius.datePicker};
|
|
@@ -33,13 +35,13 @@ exports.default = (0, styled_components_1.default)(Header_1.default).attrs({
|
|
|
33
35
|
justify-content: space-between;
|
|
34
36
|
|
|
35
37
|
${!isSoft
|
|
36
|
-
|
|
37
|
-
background: ${theme.$.palette[palette].main};
|
|
38
|
-
color: ${theme.$.palette[palette].font};
|
|
38
|
+
? `
|
|
39
|
+
background: ${(_c = (_b = (_a = theme.$.palette[palette].datePicker) === null || _a === void 0 ? void 0 : _a.header) === null || _b === void 0 ? void 0 : _b.background) !== null && _c !== void 0 ? _c : theme.$.palette[palette].main};
|
|
40
|
+
color: ${(_f = (_e = (_d = theme.$.palette[palette].datePicker) === null || _d === void 0 ? void 0 : _d.header) === null || _e === void 0 ? void 0 : _e.font) !== null && _f !== void 0 ? _f : theme.$.palette[palette].font};
|
|
39
41
|
`
|
|
40
|
-
|
|
41
|
-
background: ${theme.$.palette[palette].soft};
|
|
42
|
-
color: ${theme.$.palette[palette].softFont};
|
|
42
|
+
: `
|
|
43
|
+
background: ${(_k = (_j = (_h = (_g = theme.$.palette[palette].datePicker) === null || _g === void 0 ? void 0 : _g.soft) === null || _h === void 0 ? void 0 : _h.header) === null || _j === void 0 ? void 0 : _j.background) !== null && _k !== void 0 ? _k : theme.$.palette[palette].soft};
|
|
44
|
+
color: ${(_p = (_o = (_m = (_l = theme.$.palette[palette].datePicker) === null || _l === void 0 ? void 0 : _l.soft) === null || _m === void 0 ? void 0 : _m.header) === null || _o === void 0 ? void 0 : _o.background) !== null && _p !== void 0 ? _p : theme.$.palette[palette].softFont};
|
|
43
45
|
`}
|
|
44
46
|
|
|
45
47
|
> div {
|
|
@@ -53,12 +55,12 @@ exports.default = (0, styled_components_1.default)(Header_1.default).attrs({
|
|
|
53
55
|
position: relative;
|
|
54
56
|
|
|
55
57
|
> svg {
|
|
56
|
-
fill: ${!isSoft ? theme.$.palette[palette].darker : theme.$.palette[palette].softDynamicer};
|
|
58
|
+
fill: ${!isSoft ? ((_s = (_r = (_q = theme.$.palette[palette].datePicker) === null || _q === void 0 ? void 0 : _q.header) === null || _r === void 0 ? void 0 : _r.icon) !== null && _s !== void 0 ? _s : theme.$.palette[palette].darker) : ((_w = (_v = (_u = (_t = theme.$.palette[palette].datePicker) === null || _t === void 0 ? void 0 : _t.soft) === null || _u === void 0 ? void 0 : _u.header) === null || _v === void 0 ? void 0 : _v.icon) !== null && _w !== void 0 ? _w : theme.$.palette[palette].softDynamicer)};
|
|
57
59
|
position: absolute;
|
|
58
60
|
transition: 150ms ease-in-out;
|
|
59
61
|
|
|
60
62
|
&:hover {
|
|
61
|
-
fill: ${!isSoft ? theme.$.palette[palette].darkest : theme.$.palette[palette].softDynamicest};
|
|
63
|
+
fill: ${!isSoft ? ((_0 = (_z = (_y = (_x = theme.$.palette[palette].datePicker) === null || _x === void 0 ? void 0 : _x.header) === null || _y === void 0 ? void 0 : _y.hover) === null || _z === void 0 ? void 0 : _z.icon) !== null && _0 !== void 0 ? _0 : theme.$.palette[palette].darkest) : ((_5 = (_4 = (_3 = (_2 = (_1 = theme.$.palette[palette].datePicker) === null || _1 === void 0 ? void 0 : _1.soft) === null || _2 === void 0 ? void 0 : _2.header) === null || _3 === void 0 ? void 0 : _3.hover) === null || _4 === void 0 ? void 0 : _4.icon) !== null && _5 !== void 0 ? _5 : theme.$.palette[palette].softDynamicest)};
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
&.src-fade-show {
|
|
@@ -79,4 +81,5 @@ exports.default = (0, styled_components_1.default)(Header_1.default).attrs({
|
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
|
-
|
|
84
|
+
`;
|
|
85
|
+
});
|
|
@@ -24,7 +24,9 @@ exports.default = (0, styled_components_1.default)(Section_1.default).attrs({
|
|
|
24
24
|
width: ${t.$.size.datePicker[v].timeArrowSize};
|
|
25
25
|
}
|
|
26
26
|
`,
|
|
27
|
-
})(({ theme, isSoft, palette }) =>
|
|
27
|
+
})(({ theme, isSoft, palette }) => {
|
|
28
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30;
|
|
29
|
+
return `
|
|
28
30
|
align-items: center;
|
|
29
31
|
display: flex;
|
|
30
32
|
flex-direction: column;
|
|
@@ -43,26 +45,28 @@ exports.default = (0, styled_components_1.default)(Section_1.default).attrs({
|
|
|
43
45
|
text-align: center;
|
|
44
46
|
|
|
45
47
|
${!isSoft
|
|
46
|
-
|
|
47
|
-
background: ${theme.$.palette[palette].main};
|
|
48
|
-
border-color: ${theme.$.palette[palette].dynamic};
|
|
49
|
-
color: ${theme.$.palette[palette].font};
|
|
48
|
+
? `
|
|
49
|
+
background: ${(_c = (_b = (_a = theme.$.palette[palette].datePicker) === null || _a === void 0 ? void 0 : _a.time) === null || _b === void 0 ? void 0 : _b.background) !== null && _c !== void 0 ? _c : theme.$.palette[palette].main};
|
|
50
|
+
border-color: ${(_f = (_e = (_d = theme.$.palette[palette].datePicker) === null || _d === void 0 ? void 0 : _d.time) === null || _e === void 0 ? void 0 : _e.border) !== null && _f !== void 0 ? _f : theme.$.palette[palette].dynamic};
|
|
51
|
+
color: ${(_j = (_h = (_g = theme.$.palette[palette].datePicker) === null || _g === void 0 ? void 0 : _g.time) === null || _h === void 0 ? void 0 : _h.font) !== null && _j !== void 0 ? _j : theme.$.palette[palette].font};
|
|
50
52
|
|
|
51
53
|
&:active,
|
|
52
54
|
&:focus {
|
|
53
|
-
background: ${theme.$.palette[palette].dark};
|
|
54
|
-
border-color: ${theme.$.palette[palette].dynamicer};
|
|
55
|
+
background: ${(_o = (_m = (_l = (_k = theme.$.palette[palette].datePicker) === null || _k === void 0 ? void 0 : _k.time) === null || _l === void 0 ? void 0 : _l.active) === null || _m === void 0 ? void 0 : _m.background) !== null && _o !== void 0 ? _o : theme.$.palette[palette].dark};
|
|
56
|
+
border-color: ${(_s = (_r = (_q = (_p = theme.$.palette[palette].datePicker) === null || _p === void 0 ? void 0 : _p.time) === null || _q === void 0 ? void 0 : _q.active) === null || _r === void 0 ? void 0 : _r.border) !== null && _s !== void 0 ? _s : theme.$.palette[palette].dynamicer};
|
|
57
|
+
color: ${(_w = (_v = (_u = (_t = theme.$.palette[palette].datePicker) === null || _t === void 0 ? void 0 : _t.time) === null || _u === void 0 ? void 0 : _u.active) === null || _v === void 0 ? void 0 : _v.font) !== null && _w !== void 0 ? _w : theme.$.palette[palette].font};
|
|
55
58
|
}
|
|
56
59
|
`
|
|
57
|
-
|
|
58
|
-
background: ${theme.$.palette[palette].soft};
|
|
59
|
-
border-color: ${theme.$.palette[palette].softDynamic};
|
|
60
|
-
color: ${theme.$.palette[palette].softFont};
|
|
60
|
+
: `
|
|
61
|
+
background: ${(_0 = (_z = (_y = (_x = theme.$.palette[palette].datePicker) === null || _x === void 0 ? void 0 : _x.soft) === null || _y === void 0 ? void 0 : _y.time) === null || _z === void 0 ? void 0 : _z.background) !== null && _0 !== void 0 ? _0 : theme.$.palette[palette].soft};
|
|
62
|
+
border-color: ${(_4 = (_3 = (_2 = (_1 = theme.$.palette[palette].datePicker) === null || _1 === void 0 ? void 0 : _1.soft) === null || _2 === void 0 ? void 0 : _2.time) === null || _3 === void 0 ? void 0 : _3.border) !== null && _4 !== void 0 ? _4 : theme.$.palette[palette].softDynamic};
|
|
63
|
+
color: ${(_8 = (_7 = (_6 = (_5 = theme.$.palette[palette].datePicker) === null || _5 === void 0 ? void 0 : _5.soft) === null || _6 === void 0 ? void 0 : _6.time) === null || _7 === void 0 ? void 0 : _7.font) !== null && _8 !== void 0 ? _8 : theme.$.palette[palette].softFont};
|
|
61
64
|
|
|
62
65
|
&:active,
|
|
63
66
|
&:focus {
|
|
64
|
-
background: ${theme.$.palette[palette].softDynamic};
|
|
65
|
-
border-color: ${theme.$.palette[palette].softDynamicer};
|
|
67
|
+
background: ${(_13 = (_12 = (_11 = (_10 = (_9 = theme.$.palette[palette].datePicker) === null || _9 === void 0 ? void 0 : _9.soft) === null || _10 === void 0 ? void 0 : _10.time) === null || _11 === void 0 ? void 0 : _11.active) === null || _12 === void 0 ? void 0 : _12.background) !== null && _13 !== void 0 ? _13 : theme.$.palette[palette].softDynamic};
|
|
68
|
+
border-color: ${(_18 = (_17 = (_16 = (_15 = (_14 = theme.$.palette[palette].datePicker) === null || _14 === void 0 ? void 0 : _14.soft) === null || _15 === void 0 ? void 0 : _15.time) === null || _16 === void 0 ? void 0 : _16.active) === null || _17 === void 0 ? void 0 : _17.border) !== null && _18 !== void 0 ? _18 : theme.$.palette[palette].softDynamicer};
|
|
69
|
+
color: ${(_23 = (_22 = (_21 = (_20 = (_19 = theme.$.palette[palette].datePicker) === null || _19 === void 0 ? void 0 : _19.soft) === null || _20 === void 0 ? void 0 : _20.time) === null || _21 === void 0 ? void 0 : _21.active) === null || _22 === void 0 ? void 0 : _22.font) !== null && _23 !== void 0 ? _23 : theme.$.palette[palette].softFont};
|
|
66
70
|
}
|
|
67
71
|
`}
|
|
68
72
|
|
|
@@ -73,6 +77,7 @@ exports.default = (0, styled_components_1.default)(Section_1.default).attrs({
|
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
svg {
|
|
76
|
-
fill: ${theme.$.color.gray600};
|
|
80
|
+
fill: ${!isSoft ? ((_26 = (_25 = (_24 = theme.$.palette[palette].datePicker) === null || _24 === void 0 ? void 0 : _24.time) === null || _25 === void 0 ? void 0 : _25.icon) !== null && _26 !== void 0 ? _26 : theme.$.color.gray600) : ((_30 = (_29 = (_28 = (_27 = theme.$.palette[palette].datePicker) === null || _27 === void 0 ? void 0 : _27.soft) === null || _28 === void 0 ? void 0 : _28.time) === null || _29 === void 0 ? void 0 : _29.icon) !== null && _30 !== void 0 ? _30 : theme.$.color.gray600)};
|
|
77
81
|
}
|
|
78
|
-
|
|
82
|
+
`;
|
|
83
|
+
});
|
|
@@ -18,7 +18,7 @@ exports.default = (0, styled_components_1.default)(Table_1.default).attrs({
|
|
|
18
18
|
}
|
|
19
19
|
`,
|
|
20
20
|
})(({ theme, hasBorderX, hasBorderY, hasHeadBackground, hasHover, isBlock, isSoft, isStriped, palette, shape, stripedOrientation }) => {
|
|
21
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16;
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95;
|
|
22
22
|
return `
|
|
23
23
|
border-collapse: separate;
|
|
24
24
|
border-spacing: 0;
|
|
@@ -92,18 +92,8 @@ exports.default = (0, styled_components_1.default)(Table_1.default).attrs({
|
|
|
92
92
|
? `
|
|
93
93
|
> thead > tr > * {
|
|
94
94
|
background: ${(_m = (_l = (_k = theme.$.palette[palette].table) === null || _k === void 0 ? void 0 : _k.even) === null || _l === void 0 ? void 0 : _l.background) !== null && _m !== void 0 ? _m : theme.$.palette[palette].dynamic};
|
|
95
|
-
|
|
96
|
-
${((
|
|
97
|
-
? `
|
|
98
|
-
border-color: ${(_r = (_q = theme.$.palette[palette].table) === null || _q === void 0 ? void 0 : _q.even) === null || _r === void 0 ? void 0 : _r.border};
|
|
99
|
-
`
|
|
100
|
-
: ''}
|
|
101
|
-
|
|
102
|
-
${((_t = (_s = theme.$.palette[palette].table) === null || _s === void 0 ? void 0 : _s.even) === null || _t === void 0 ? void 0 : _t.font)
|
|
103
|
-
? `
|
|
104
|
-
color: ${(_v = (_u = theme.$.palette[palette].table) === null || _u === void 0 ? void 0 : _u.even) === null || _v === void 0 ? void 0 : _v.font};
|
|
105
|
-
`
|
|
106
|
-
: ''}
|
|
95
|
+
border-color: ${(_q = (_p = (_o = theme.$.palette[palette].table) === null || _o === void 0 ? void 0 : _o.even) === null || _p === void 0 ? void 0 : _p.border) !== null && _q !== void 0 ? _q : theme.$.palette[palette].dynamicest};
|
|
96
|
+
color: ${(_t = (_s = (_r = theme.$.palette[palette].table) === null || _r === void 0 ? void 0 : _r.even) === null || _s === void 0 ? void 0 : _s.font) !== null && _t !== void 0 ? _t : theme.$.palette[palette].font};
|
|
107
97
|
}
|
|
108
98
|
`
|
|
109
99
|
: ''}
|
|
@@ -111,19 +101,9 @@ exports.default = (0, styled_components_1.default)(Table_1.default).attrs({
|
|
|
111
101
|
${isStriped
|
|
112
102
|
? `
|
|
113
103
|
> tbody > tr:nth-child(${stripedOrientation}) > * {
|
|
114
|
-
background: ${(
|
|
115
|
-
|
|
116
|
-
${((
|
|
117
|
-
? `
|
|
118
|
-
border-color: ${(_2 = (_1 = theme.$.palette[palette].table) === null || _1 === void 0 ? void 0 : _1.even) === null || _2 === void 0 ? void 0 : _2.border};
|
|
119
|
-
`
|
|
120
|
-
: ''}
|
|
121
|
-
|
|
122
|
-
${((_4 = (_3 = theme.$.palette[palette].table) === null || _3 === void 0 ? void 0 : _3.even) === null || _4 === void 0 ? void 0 : _4.font)
|
|
123
|
-
? `
|
|
124
|
-
border-color: ${(_6 = (_5 = theme.$.palette[palette].table) === null || _5 === void 0 ? void 0 : _5.even) === null || _6 === void 0 ? void 0 : _6.font};
|
|
125
|
-
`
|
|
126
|
-
: ''}
|
|
104
|
+
background: ${(_w = (_v = (_u = theme.$.palette[palette].table) === null || _u === void 0 ? void 0 : _u.even) === null || _v === void 0 ? void 0 : _v.background) !== null && _w !== void 0 ? _w : theme.$.palette[palette].dynamic};
|
|
105
|
+
border-color: ${(_z = (_y = (_x = theme.$.palette[palette].table) === null || _x === void 0 ? void 0 : _x.even) === null || _y === void 0 ? void 0 : _y.border) !== null && _z !== void 0 ? _z : theme.$.palette[palette].dynamicest};
|
|
106
|
+
color: ${(_2 = (_1 = (_0 = theme.$.palette[palette].table) === null || _0 === void 0 ? void 0 : _0.even) === null || _1 === void 0 ? void 0 : _1.font) !== null && _2 !== void 0 ? _2 : theme.$.palette[palette].font};
|
|
127
107
|
}
|
|
128
108
|
`
|
|
129
109
|
: ''}
|
|
@@ -136,13 +116,17 @@ exports.default = (0, styled_components_1.default)(Table_1.default).attrs({
|
|
|
136
116
|
}
|
|
137
117
|
|
|
138
118
|
&:hover > * {
|
|
139
|
-
background: ${(
|
|
119
|
+
background: ${(_6 = (_5 = (_4 = (_3 = theme.$.palette[palette].table) === null || _3 === void 0 ? void 0 : _3.odd) === null || _4 === void 0 ? void 0 : _4.hover) === null || _5 === void 0 ? void 0 : _5.background) !== null && _6 !== void 0 ? _6 : theme.$.palette[palette].dynamicer};
|
|
120
|
+
border-color: ${(_10 = (_9 = (_8 = (_7 = theme.$.palette[palette].table) === null || _7 === void 0 ? void 0 : _7.odd) === null || _8 === void 0 ? void 0 : _8.hover) === null || _9 === void 0 ? void 0 : _9.border) !== null && _10 !== void 0 ? _10 : theme.$.palette[palette].dynamicest};
|
|
121
|
+
color: ${(_14 = (_13 = (_12 = (_11 = theme.$.palette[palette].table) === null || _11 === void 0 ? void 0 : _11.odd) === null || _12 === void 0 ? void 0 : _12.hover) === null || _13 === void 0 ? void 0 : _13.font) !== null && _14 !== void 0 ? _14 : theme.$.palette[palette].font};
|
|
140
122
|
}
|
|
141
123
|
|
|
142
|
-
${(isStriped && ((
|
|
124
|
+
${(isStriped && ((_17 = (_16 = (_15 = theme.$.palette[palette].table) === null || _15 === void 0 ? void 0 : _15.even) === null || _16 === void 0 ? void 0 : _16.hover) === null || _17 === void 0 ? void 0 : _17.background))
|
|
143
125
|
? `
|
|
144
126
|
> tbody > tr:nth-child(${stripedOrientation}) > * {
|
|
145
|
-
background: ${(
|
|
127
|
+
background: ${(_21 = (_20 = (_19 = (_18 = theme.$.palette[palette].table) === null || _18 === void 0 ? void 0 : _18.even) === null || _19 === void 0 ? void 0 : _19.hover) === null || _20 === void 0 ? void 0 : _20.background) !== null && _21 !== void 0 ? _21 : theme.$.palette[palette].dynamicer};
|
|
128
|
+
border-color: ${(_25 = (_24 = (_23 = (_22 = theme.$.palette[palette].table) === null || _22 === void 0 ? void 0 : _22.even) === null || _23 === void 0 ? void 0 : _23.hover) === null || _24 === void 0 ? void 0 : _24.border) !== null && _25 !== void 0 ? _25 : theme.$.palette[palette].dynamicest};
|
|
129
|
+
color: ${(_29 = (_28 = (_27 = (_26 = theme.$.palette[palette].table) === null || _26 === void 0 ? void 0 : _26.even) === null || _27 === void 0 ? void 0 : _27.hover) === null || _28 === void 0 ? void 0 : _28.font) !== null && _29 !== void 0 ? _29 : theme.$.palette[palette].font};
|
|
146
130
|
}
|
|
147
131
|
`
|
|
148
132
|
: ''}
|
|
@@ -152,15 +136,17 @@ exports.default = (0, styled_components_1.default)(Table_1.default).attrs({
|
|
|
152
136
|
`
|
|
153
137
|
: `
|
|
154
138
|
> * > tr > * {
|
|
155
|
-
background: ${theme.$.palette[palette].softBackground};
|
|
156
|
-
border-color: ${theme.$.palette[palette].softDynamicest};
|
|
157
|
-
color: ${theme.$.palette[palette].softFont};
|
|
139
|
+
background: ${(_33 = (_32 = (_31 = (_30 = theme.$.palette[palette].table) === null || _30 === void 0 ? void 0 : _30.odd) === null || _31 === void 0 ? void 0 : _31.soft) === null || _32 === void 0 ? void 0 : _32.background) !== null && _33 !== void 0 ? _33 : theme.$.palette[palette].softBackground};
|
|
140
|
+
border-color: ${(_37 = (_36 = (_35 = (_34 = theme.$.palette[palette].table) === null || _34 === void 0 ? void 0 : _34.odd) === null || _35 === void 0 ? void 0 : _35.soft) === null || _36 === void 0 ? void 0 : _36.border) !== null && _37 !== void 0 ? _37 : theme.$.palette[palette].softDynamicest};
|
|
141
|
+
color: ${(_41 = (_40 = (_39 = (_38 = theme.$.palette[palette].table) === null || _38 === void 0 ? void 0 : _38.odd) === null || _39 === void 0 ? void 0 : _39.soft) === null || _40 === void 0 ? void 0 : _40.font) !== null && _41 !== void 0 ? _41 : theme.$.palette[palette].softFont};
|
|
158
142
|
}
|
|
159
143
|
|
|
160
144
|
${hasHeadBackground
|
|
161
145
|
? `
|
|
162
146
|
> thead > tr > * {
|
|
163
|
-
background: ${theme.$.palette[palette].softDynamic};
|
|
147
|
+
background: ${(_44 = (_43 = (_42 = theme.$.palette[palette].table.even) === null || _42 === void 0 ? void 0 : _42.soft) === null || _43 === void 0 ? void 0 : _43.background) !== null && _44 !== void 0 ? _44 : theme.$.palette[palette].softDynamic};
|
|
148
|
+
border-color: ${(_47 = (_46 = (_45 = theme.$.palette[palette].table.even) === null || _45 === void 0 ? void 0 : _45.soft) === null || _46 === void 0 ? void 0 : _46.border) !== null && _47 !== void 0 ? _47 : theme.$.palette[palette].softDynamicest};
|
|
149
|
+
color: ${(_50 = (_49 = (_48 = theme.$.palette[palette].table.even) === null || _48 === void 0 ? void 0 : _48.soft) === null || _49 === void 0 ? void 0 : _49.font) !== null && _50 !== void 0 ? _50 : theme.$.palette[palette].softFont};
|
|
164
150
|
}
|
|
165
151
|
`
|
|
166
152
|
: ''}
|
|
@@ -168,15 +154,35 @@ exports.default = (0, styled_components_1.default)(Table_1.default).attrs({
|
|
|
168
154
|
${isStriped
|
|
169
155
|
? `
|
|
170
156
|
> tbody > tr:nth-child(${stripedOrientation}) > * {
|
|
171
|
-
background: ${theme.$.palette[palette].softDynamic};
|
|
157
|
+
background: ${(_54 = (_53 = (_52 = (_51 = theme.$.palette[palette].table) === null || _51 === void 0 ? void 0 : _51.even) === null || _52 === void 0 ? void 0 : _52.soft) === null || _53 === void 0 ? void 0 : _53.background) !== null && _54 !== void 0 ? _54 : theme.$.palette[palette].softDynamic};
|
|
158
|
+
border-color: ${(_58 = (_57 = (_56 = (_55 = theme.$.palette[palette].table) === null || _55 === void 0 ? void 0 : _55.even) === null || _56 === void 0 ? void 0 : _56.soft) === null || _57 === void 0 ? void 0 : _57.border) !== null && _58 !== void 0 ? _58 : theme.$.palette[palette].softDynamicest};
|
|
159
|
+
color: ${(_62 = (_61 = (_60 = (_59 = theme.$.palette[palette].table) === null || _59 === void 0 ? void 0 : _59.even) === null || _60 === void 0 ? void 0 : _60.soft) === null || _61 === void 0 ? void 0 : _61.font) !== null && _62 !== void 0 ? _62 : theme.$.palette[palette].softFont};
|
|
172
160
|
}
|
|
173
161
|
`
|
|
174
162
|
: ''}
|
|
175
163
|
|
|
176
164
|
${hasHover
|
|
177
165
|
? `
|
|
178
|
-
> tbody > tr
|
|
179
|
-
|
|
166
|
+
> tbody > tr {
|
|
167
|
+
> * {
|
|
168
|
+
transition: background 150ms 0s ease-in-out;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&:hover > * {
|
|
172
|
+
background: ${(_67 = (_66 = (_65 = (_64 = (_63 = theme.$.palette[palette].table) === null || _63 === void 0 ? void 0 : _63.odd) === null || _64 === void 0 ? void 0 : _64.soft) === null || _65 === void 0 ? void 0 : _65.hover) === null || _66 === void 0 ? void 0 : _66.background) !== null && _67 !== void 0 ? _67 : theme.$.palette[palette].softDynamicer};
|
|
173
|
+
border-color: ${(_72 = (_71 = (_70 = (_69 = (_68 = theme.$.palette[palette].table) === null || _68 === void 0 ? void 0 : _68.odd) === null || _69 === void 0 ? void 0 : _69.soft) === null || _70 === void 0 ? void 0 : _70.hover) === null || _71 === void 0 ? void 0 : _71.border) !== null && _72 !== void 0 ? _72 : theme.$.palette[palette].softDynamicest};
|
|
174
|
+
color: ${(_77 = (_76 = (_75 = (_74 = (_73 = theme.$.palette[palette].table) === null || _73 === void 0 ? void 0 : _73.odd) === null || _74 === void 0 ? void 0 : _74.soft) === null || _75 === void 0 ? void 0 : _75.hover) === null || _76 === void 0 ? void 0 : _76.font) !== null && _77 !== void 0 ? _77 : theme.$.palette[palette].softFont};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
${(isStriped && ((_80 = (_79 = (_78 = theme.$.palette[palette].table) === null || _78 === void 0 ? void 0 : _78.even) === null || _79 === void 0 ? void 0 : _79.hover) === null || _80 === void 0 ? void 0 : _80.background))
|
|
178
|
+
? `
|
|
179
|
+
> tbody > tr:nth-child(${stripedOrientation}) > * {
|
|
180
|
+
background: ${(_85 = (_84 = (_83 = (_82 = (_81 = theme.$.palette[palette].table) === null || _81 === void 0 ? void 0 : _81.even) === null || _82 === void 0 ? void 0 : _82.soft) === null || _83 === void 0 ? void 0 : _83.hover) === null || _84 === void 0 ? void 0 : _84.background) !== null && _85 !== void 0 ? _85 : theme.$.palette[palette].softDynamicer};
|
|
181
|
+
border-color: ${(_90 = (_89 = (_88 = (_87 = (_86 = theme.$.palette[palette].table) === null || _86 === void 0 ? void 0 : _86.even) === null || _87 === void 0 ? void 0 : _87.soft) === null || _88 === void 0 ? void 0 : _88.hover) === null || _89 === void 0 ? void 0 : _89.border) !== null && _90 !== void 0 ? _90 : theme.$.palette[palette].softDynamicest};
|
|
182
|
+
color: ${(_95 = (_94 = (_93 = (_92 = (_91 = theme.$.palette[palette].table) === null || _91 === void 0 ? void 0 : _91.even) === null || _92 === void 0 ? void 0 : _92.hover) === null || _93 === void 0 ? void 0 : _93.soft) === null || _94 === void 0 ? void 0 : _94.font) !== null && _95 !== void 0 ? _95 : theme.$.palette[palette].softFont};
|
|
183
|
+
}
|
|
184
|
+
`
|
|
185
|
+
: ''}
|
|
180
186
|
}
|
|
181
187
|
`
|
|
182
188
|
: ''}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smart-react-components/ui",
|
|
3
|
-
"version": "2.1.0-alpha-
|
|
3
|
+
"version": "2.1.0-alpha-12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"description": "SRC UI includes React and Styled components.",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"test": "jest"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@smart-react-components/core": "2.1.0-alpha-
|
|
68
|
-
"@smart-react-components/router": "2.1.0-alpha-
|
|
69
|
-
"@smart-react-components/transition": "2.1.0-alpha-
|
|
67
|
+
"@smart-react-components/core": "2.1.0-alpha-16",
|
|
68
|
+
"@smart-react-components/router": "2.1.0-alpha-9",
|
|
69
|
+
"@smart-react-components/transition": "2.1.0-alpha-9",
|
|
70
70
|
"@testing-library/react": "13.4.0",
|
|
71
71
|
"@types/jest": "29.0.1",
|
|
72
72
|
"@types/react": "18.0.19",
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"typescript": "4.8.3"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@smart-react-components/core": "^2.1.0-alpha-
|
|
87
|
-
"@smart-react-components/router": "^2.1.0-alpha-
|
|
88
|
-
"@smart-react-components/transition": "^2.1.0-alpha-
|
|
86
|
+
"@smart-react-components/core": "^2.1.0-alpha-16",
|
|
87
|
+
"@smart-react-components/router": "^2.1.0-alpha-9",
|
|
88
|
+
"@smart-react-components/transition": "^2.1.0-alpha-9",
|
|
89
89
|
"react": "^18.2.0",
|
|
90
90
|
"react-dom": "^18.2.0",
|
|
91
91
|
"styled-components": "^5.3.5"
|