@eleventheye/asui 2.1.15 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apptypes/ASUI.types.d.ts +25 -2
- package/dist/apptypes/ASUI.types.d.ts.map +1 -1
- package/dist/apptypes/ASUI.types.js +2 -2
- package/dist/asbutton/ASButton.js +2 -2
- package/dist/asbutton/styles.d.ts.map +1 -1
- package/dist/asbutton/styles.js +1 -1
- package/dist/asdropdown/ASDropdown.d.ts +5 -0
- package/dist/asdropdown/ASDropdown.d.ts.map +1 -0
- package/dist/asdropdown/ASDropdown.js +24 -0
- package/dist/asdropdown/ASDropdown.types.d.ts +14 -0
- package/dist/asdropdown/ASDropdown.types.d.ts.map +1 -0
- package/dist/asdropdown/ASDropdown.types.js +2 -0
- package/dist/asdropdown/index.d.ts +3 -0
- package/dist/asdropdown/index.d.ts.map +1 -0
- package/dist/asdropdown/index.js +6 -0
- package/dist/asdropdown/styles.d.ts +17 -0
- package/dist/asdropdown/styles.d.ts.map +1 -0
- package/dist/asdropdown/styles.js +120 -0
- package/dist/asloader/ASLoader.d.ts.map +1 -1
- package/dist/asloader/ASLoader.js +11 -11
- package/dist/asloader/ASLoader.types.d.ts +1 -0
- package/dist/asloader/ASLoader.types.d.ts.map +1 -1
- package/dist/asloader/styles.d.ts +6 -6
- package/dist/asloader/styles.d.ts.map +1 -1
- package/dist/asloader/styles.js +14 -14
- package/dist/astextfield/ASTextField.js +1 -1
- package/dist/astheme/ASThemeDefault.d.ts.map +1 -1
- package/dist/astheme/ASThemeDefault.js +22 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const ComponentSize: {
|
|
2
2
|
readonly Small: "ASSmall";
|
|
3
3
|
readonly Medium: "ASMedium";
|
|
4
4
|
readonly Large: "ASLarge";
|
|
5
5
|
};
|
|
6
|
-
export type ASComponentSize = (typeof
|
|
6
|
+
export type ASComponentSize = (typeof ComponentSize)[keyof typeof ComponentSize];
|
|
7
7
|
type ASPaddingSizeTuple = [ASComponentSize, ASComponentSize];
|
|
8
8
|
type ASPaddingSizeTriple = [ASComponentSize, ASComponentSize, ASComponentSize];
|
|
9
9
|
type ASPaddingSizeQuad = [ASComponentSize, ASComponentSize, ASComponentSize, ASComponentSize];
|
|
@@ -136,8 +136,31 @@ export type ASTextFieldTheme = {
|
|
|
136
136
|
placeholderColor: string;
|
|
137
137
|
iconTextShadow: string;
|
|
138
138
|
};
|
|
139
|
+
export type ASDropdownTheme = {
|
|
140
|
+
dropdownCaratColor: string;
|
|
141
|
+
dropdownGradientDown: string;
|
|
142
|
+
dropdownGradientUp: string;
|
|
143
|
+
dropdownShadowHoverASSmall: string;
|
|
144
|
+
dropdownShadowHoverASMedium: string;
|
|
145
|
+
dropdownShadowHoverASLarge: string;
|
|
146
|
+
dropdownShadowActiveASSmall: string;
|
|
147
|
+
dropdownShadowActiveASMedium: string;
|
|
148
|
+
dropdownShadowActiveASLarge: string;
|
|
149
|
+
dropdownShadowNormal: string;
|
|
150
|
+
dropdownShadowHover: string;
|
|
151
|
+
dropdownOutline: string;
|
|
152
|
+
dropdownTextShadow: string;
|
|
153
|
+
dropdownTextShadowHover: string;
|
|
154
|
+
dropdownBg: string;
|
|
155
|
+
dropdownBgDisabled: string;
|
|
156
|
+
dropdownColor: string;
|
|
157
|
+
dropdownColorHover: string;
|
|
158
|
+
dropdownColorSelected: string;
|
|
159
|
+
dropdownColorDisabled: string;
|
|
160
|
+
};
|
|
139
161
|
export interface ASTheme {
|
|
140
162
|
textfield: ASTextFieldTheme;
|
|
163
|
+
dropdown: ASDropdownTheme;
|
|
141
164
|
button: ASButtonTheme;
|
|
142
165
|
loader: ASLoaderTheme;
|
|
143
166
|
colors: ASColorTheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ASUI.types.d.ts","sourceRoot":"","sources":["../../src/apptypes/ASUI.types.ts"],"names":[],"mappings":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B,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,QAAQ,EAAE,eAAe,CAAC;IAC1B,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,EAAE,YAAY,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LoaderType = exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.LoaderType = exports.ComponentSize = void 0;
|
|
4
|
+
exports.ComponentSize = {
|
|
5
5
|
Small: 'ASSmall',
|
|
6
6
|
Medium: 'ASMedium',
|
|
7
7
|
Large: 'ASLarge',
|
|
@@ -7,7 +7,7 @@ const ASUI_types_1 = require("../apptypes/ASUI.types");
|
|
|
7
7
|
const asloader_1 = tslib_1.__importDefault(require("../asloader"));
|
|
8
8
|
const astheme_1 = tslib_1.__importDefault(require("../astheme"));
|
|
9
9
|
const styles_1 = require("./styles");
|
|
10
|
-
const ASButton = ({ className = '', onClick = () => undefined, selected = false, toggle = false, size = ASUI_types_1.
|
|
10
|
+
const ASButton = ({ className = '', onClick = () => undefined, selected = false, toggle = false, size = ASUI_types_1.ComponentSize.Medium, paddingSize = [ASUI_types_1.ComponentSize.Medium, ASUI_types_1.ComponentSize.Medium], theme = astheme_1.default, disabled = false, isLoading = false, children, text, id, style, ...props }) => {
|
|
11
11
|
const [isSelected, setIsSelected] = (0, react_1.useState)(selected);
|
|
12
12
|
(0, react_1.useEffect)(() => {
|
|
13
13
|
setIsSelected(selected);
|
|
@@ -27,6 +27,6 @@ const ASButton = ({ className = '', onClick = () => undefined, selected = false,
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.ASButtonStyled, { theme: theme, role: "button", ref: onEnableDisableHandler, size: size, "aria-disabled": isLoading ? 'true' : disabled.toString(), className: `${className} ${size} ${isSelected ? 'Selected' : ''}`, "data-buttontext": isLoading ? '' : children ?? text, onClick: onClickHandler, style: style, id: id, ...props, children: (0, jsx_runtime_1.jsxs)(styles_1.ButtonPadding, { size: size, children: [(0, jsx_runtime_1.jsx)(asloader_1.default, { size: ASUI_types_1.
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.ASButtonStyled, { theme: theme, role: "button", ref: onEnableDisableHandler, size: size, "aria-disabled": isLoading ? 'true' : disabled.toString(), className: `${className} ${size} ${isSelected ? 'Selected' : ''}`, "data-buttontext": isLoading ? '' : children ?? text, onClick: onClickHandler, style: style, id: id, ...props, children: (0, jsx_runtime_1.jsxs)(styles_1.ButtonPadding, { size: size, children: [(0, jsx_runtime_1.jsx)(asloader_1.default, { size: ASUI_types_1.ComponentSize.Small, loaderType: ASUI_types_1.LoaderType.Spin, showLoader: isLoading }), !isLoading && (children ?? text), isLoading && (0, jsx_runtime_1.jsx)(styles_1.ASButtonHidden, { children: children ?? text })] }) }));
|
|
31
31
|
};
|
|
32
32
|
exports.default = ASButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/asbutton/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/asbutton/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAiB,MAAM,wBAAwB,CAAC;AAEjF,eAAO,MAAM,cAAc;WAAuB,OAAO;UAAQ,eAAe;YAsH/E,CAAC;AAEF,eAAO,MAAM,aAAa;WAAuB,eAAe;YAG/D,CAAC;AAEF,eAAO,MAAM,cAAc,6NAG1B,CAAC"}
|
package/dist/asbutton/styles.js
CHANGED
|
@@ -124,7 +124,7 @@ exports.ASButtonStyled = styled_components_1.default.div `
|
|
|
124
124
|
}
|
|
125
125
|
`;
|
|
126
126
|
exports.ButtonPadding = styled_components_1.default.div `
|
|
127
|
-
padding: ${({ size }) => size === ASUI_types_1.
|
|
127
|
+
padding: ${({ size }) => size === ASUI_types_1.ComponentSize.Large ? '5px 50px' : size === ASUI_types_1.ComponentSize.Medium ? '2px 30px' : '0 10px'};
|
|
128
128
|
`;
|
|
129
129
|
exports.ASButtonHidden = styled_components_1.default.div `
|
|
130
130
|
opacity: 0;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ASDropdown.d.ts","sourceRoot":"","sources":["../../src/asdropdown/ASDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAI/C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAiDzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const ASUI_types_1 = require("../apptypes/ASUI.types");
|
|
7
|
+
const astheme_1 = tslib_1.__importDefault(require("../astheme"));
|
|
8
|
+
const styles_1 = require("./styles");
|
|
9
|
+
const ASDropdown = ({ className = '', theme = astheme_1.default, value = '', onChange = () => undefined, options = [], size = ASUI_types_1.ComponentSize.Medium, placeholder = '', Icon = undefined, disabled = false, ...props }) => {
|
|
10
|
+
const genericId = (0, react_1.useId)();
|
|
11
|
+
const baseCls = `${size} ${className}`;
|
|
12
|
+
const iconSize = size === ASUI_types_1.ComponentSize.Large ? 28 : size === ASUI_types_1.ComponentSize.Medium ? 24 : 20;
|
|
13
|
+
const iconColor = disabled ? theme.dropdown.dropdownColorDisabled : theme.dropdown.dropdownColor;
|
|
14
|
+
const [selectedValue, setSelectedValue] = (0, react_1.useState)(value || placeholder);
|
|
15
|
+
const onChangeHandler = (val) => {
|
|
16
|
+
setSelectedValue(val);
|
|
17
|
+
onChange(val);
|
|
18
|
+
};
|
|
19
|
+
if (placeholder && !value) {
|
|
20
|
+
options = [placeholder, ...options];
|
|
21
|
+
}
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.ASDropdownStyled, { theme: theme, className: baseCls, "$withIcon": !!Icon, style: props.style, "aria-disabled": disabled, children: [!!Icon && (0, jsx_runtime_1.jsx)(Icon, { className: "IconLayout", size: iconSize, fillColor: iconColor }), (0, jsx_runtime_1.jsx)(styles_1.ASDropdownSelect, { theme: theme, id: props.id ?? genericId, value: selectedValue, onChange: (e) => onChangeHandler(e.target.value), disabled: !!disabled, children: options.map((option) => ((0, jsx_runtime_1.jsx)(styles_1.ASDropdownOption, { theme: theme, value: option, children: option }, option))) })] }));
|
|
23
|
+
};
|
|
24
|
+
exports.default = ASDropdown;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ASComponentSize } from '../apptypes/ASUI.types';
|
|
2
|
+
import ASThemeDefault from '../astheme';
|
|
3
|
+
import ASIcon from '../icons/ASIcon';
|
|
4
|
+
export type ASDropdownProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
theme?: typeof ASThemeDefault;
|
|
7
|
+
value?: string;
|
|
8
|
+
onChange?: (value: string) => void;
|
|
9
|
+
size?: ASComponentSize;
|
|
10
|
+
options?: string[];
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
Icon?: typeof ASIcon;
|
|
13
|
+
} & Pick<React.HTMLProps<HTMLDivElement>, 'style' | 'id' | 'disabled'>;
|
|
14
|
+
//# sourceMappingURL=ASDropdown.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ASDropdown.types.d.ts","sourceRoot":"","sources":["../../src/asdropdown/ASDropdown.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,cAAc,MAAM,YAAY,CAAC;AACxC,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,MAAM,eAAe,GAAG;IAK5B,SAAS,CAAC,EAAE,MAAM,CAAC;IAMnB,KAAK,CAAC,EAAE,OAAO,cAAc,CAAC;IAM9B,KAAK,CAAC,EAAE,MAAM,CAAC;IAMf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IASnC,IAAI,CAAC,EAAE,eAAe,CAAC;IAQvB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAQnB,WAAW,CAAC,EAAE,MAAM,CAAC;IAQrB,IAAI,CAAC,EAAE,OAAO,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/asdropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var ASDropdown_1 = require("./ASDropdown");
|
|
6
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return tslib_1.__importDefault(ASDropdown_1).default; } });
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ASTheme } from '../apptypes/ASUI.types';
|
|
2
|
+
interface ASDropdownStyledProps {
|
|
3
|
+
theme: ASTheme;
|
|
4
|
+
$withIcon?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const ASDropdownStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ASDropdownStyledProps>> & string;
|
|
7
|
+
export declare const ASDropdownSelect: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, {
|
|
8
|
+
theme: ASTheme;
|
|
9
|
+
}>> & string;
|
|
10
|
+
export declare const ASDropdownOption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, {
|
|
11
|
+
theme: ASTheme;
|
|
12
|
+
}>> & string;
|
|
13
|
+
export declare const ASDropdownOptions: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>, {
|
|
14
|
+
theme: ASTheme;
|
|
15
|
+
}>> & string;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/asdropdown/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,UAAU,qBAAqB;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,0PAmE5B,CAAC;AAEF,eAAO,MAAM,gBAAgB;WAA0B,OAAO;YAoC7D,CAAC;AAEF,eAAO,MAAM,gBAAgB;WAA0B,OAAO;YAI7D,CAAC;AAEF,eAAO,MAAM,iBAAiB;WAA4B,OAAO;YAIhE,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ASDropdownOptions = exports.ASDropdownOption = exports.ASDropdownSelect = exports.ASDropdownStyled = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
6
|
+
exports.ASDropdownStyled = styled_components_1.default.div `
|
|
7
|
+
position: relative;
|
|
8
|
+
display: inline-block;
|
|
9
|
+
width: 100%;
|
|
10
|
+
|
|
11
|
+
&.ASSmall {
|
|
12
|
+
select {
|
|
13
|
+
font-size: 1.05rem;
|
|
14
|
+
padding: ${({ $withIcon }) => ($withIcon ? '5px 30px' : '5px 30px 5px 15px')};
|
|
15
|
+
}
|
|
16
|
+
&:after {
|
|
17
|
+
scale: 0.8;
|
|
18
|
+
transform: translate(20%, -45%);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.ASMedium select {
|
|
23
|
+
font-size: 1.35rem;
|
|
24
|
+
padding: ${({ $withIcon }) => ($withIcon ? '5px 35px' : '7px 35px 7px 15px')};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.ASLarge select {
|
|
28
|
+
font-size: 1.55rem;
|
|
29
|
+
padding: ${({ $withIcon }) => ($withIcon ? '10px 40px' : '10px 40px 10px 20px')};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.IconLayout {
|
|
33
|
+
position: absolute;
|
|
34
|
+
z-index: 1;
|
|
35
|
+
top: 50%;
|
|
36
|
+
transform: translateY(-50%);
|
|
37
|
+
left: 3%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&::after {
|
|
41
|
+
content: '';
|
|
42
|
+
position: absolute;
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
top: 50%;
|
|
45
|
+
right: 10px;
|
|
46
|
+
transform: translate(0, -35%);
|
|
47
|
+
width: 20px;
|
|
48
|
+
height: 20px;
|
|
49
|
+
background-color: ${({ theme }) => theme.dropdown.dropdownCaratColor};
|
|
50
|
+
clip-path: polygon(25% 0, 0 25%, 50% 67%, 100% 25%, 75% 0, 50% 24%);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
& select:hover {
|
|
54
|
+
background: ${({ theme }) => theme.dropdown.dropdownGradientDown};
|
|
55
|
+
background-color: ${({ theme }) => theme.dropdown.dropdownBg};
|
|
56
|
+
text-shadow: ${({ theme }) => theme.dropdown.dropdownTextShadowHover};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:hover::after {
|
|
60
|
+
background-color: ${({ theme }) => theme.dropdown.dropdownColorHover};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
& select:disabled {
|
|
64
|
+
background: ${({ theme }) => theme.dropdown.dropdownBgDisabled};
|
|
65
|
+
color: ${({ theme }) => theme.dropdown.dropdownColorDisabled};
|
|
66
|
+
text-shadow: none;
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&[aria-disabled='true']::after {
|
|
71
|
+
background-color: ${({ theme }) => theme.dropdown.dropdownColorDisabled};
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
74
|
+
exports.ASDropdownSelect = styled_components_1.default.select `
|
|
75
|
+
font-family: inherit;
|
|
76
|
+
font-weight: 600;
|
|
77
|
+
display: inline-block;
|
|
78
|
+
width: 100%;
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
background: ${({ theme }) => theme.dropdown.dropdownGradientUp};
|
|
81
|
+
background-color: ${({ theme }) => theme.dropdown.dropdownBg};
|
|
82
|
+
outline: 1px solid ${({ theme }) => theme.dropdown.dropdownOutline};
|
|
83
|
+
border-radius: 40px;
|
|
84
|
+
border: none;
|
|
85
|
+
color: ${({ theme }) => theme.dropdown.dropdownColor};
|
|
86
|
+
text-shadow: ${({ theme }) => theme.dropdown.dropdownTextShadow};
|
|
87
|
+
appearance: none;
|
|
88
|
+
-webkit-appearance: none;
|
|
89
|
+
-moz-appearance: none;
|
|
90
|
+
|
|
91
|
+
[popover] {
|
|
92
|
+
// top: 25px !important;
|
|
93
|
+
|
|
94
|
+
&:popover-open {
|
|
95
|
+
position: absolute;
|
|
96
|
+
margin-top: 50px;
|
|
97
|
+
width: 200px;
|
|
98
|
+
height: 100px;
|
|
99
|
+
position: absolute;
|
|
100
|
+
inset: unset;
|
|
101
|
+
bottom: 5px;
|
|
102
|
+
right: 5px;
|
|
103
|
+
margin: 0;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&::-ms-expand {
|
|
108
|
+
display: none;
|
|
109
|
+
}
|
|
110
|
+
`;
|
|
111
|
+
exports.ASDropdownOption = styled_components_1.default.option `
|
|
112
|
+
fontFamily: inherit,
|
|
113
|
+
fontSize: '20px',
|
|
114
|
+
fontWeight: '600',
|
|
115
|
+
`;
|
|
116
|
+
exports.ASDropdownOptions = styled_components_1.default.optgroup `
|
|
117
|
+
background: yellow;
|
|
118
|
+
background-color: gold;
|
|
119
|
+
appearance: 'none';
|
|
120
|
+
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ASLoader.d.ts","sourceRoot":"","sources":["../../src/asloader/ASLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,
|
|
1
|
+
{"version":3,"file":"ASLoader.d.ts","sourceRoot":"","sources":["../../src/asloader/ASLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAA+D,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAWjH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAgErC,CAAC;AA0CF,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -9,7 +9,7 @@ const ASUI_types_1 = require("../apptypes/ASUI.types");
|
|
|
9
9
|
Object.defineProperty(exports, "LoaderType", { enumerable: true, get: function () { return ASUI_types_1.LoaderType; } });
|
|
10
10
|
const styles_1 = require("../asloader/styles");
|
|
11
11
|
const astheme_1 = tslib_1.__importDefault(require("../astheme"));
|
|
12
|
-
const ASLoader = ({ className = '', loaderType = ASUI_types_1.LoaderType.Grow, size = ASUI_types_1.
|
|
12
|
+
const ASLoader = ({ className = '', loaderClassName = '', loaderType = ASUI_types_1.LoaderType.Grow, size = ASUI_types_1.ComponentSize.Medium, isModal = false, theme = astheme_1.default.loader, ...props }) => {
|
|
13
13
|
const [localLoaderType, setLoaderType] = (0, react_1.useState)(loaderType);
|
|
14
14
|
const [loaderSizeCls, setLoaderSizeCls] = (0, react_1.useState)(size);
|
|
15
15
|
(0, react_1.useEffect)(() => {
|
|
@@ -23,30 +23,30 @@ const ASLoader = ({ className = '', loaderType = ASUI_types_1.LoaderType.Grow, s
|
|
|
23
23
|
const renderLoader = () => {
|
|
24
24
|
switch (localLoaderType) {
|
|
25
25
|
case ASUI_types_1.LoaderType.Spin:
|
|
26
|
-
return (0, jsx_runtime_1.jsx)(ASLoaderSpin, { size: loaderSizeCls, theme: theme, className:
|
|
26
|
+
return (0, jsx_runtime_1.jsx)(ASLoaderSpin, { size: loaderSizeCls, theme: theme, className: loaderClassName });
|
|
27
27
|
case ASUI_types_1.LoaderType.Dots:
|
|
28
|
-
return (0, jsx_runtime_1.jsx)(ASLoaderDots, { size: loaderSizeCls, theme: theme, className:
|
|
28
|
+
return (0, jsx_runtime_1.jsx)(ASLoaderDots, { size: loaderSizeCls, theme: theme, className: loaderClassName });
|
|
29
29
|
case ASUI_types_1.LoaderType.Grow:
|
|
30
30
|
default:
|
|
31
|
-
return (0, jsx_runtime_1.jsx)(ASLoaderGrow, { size: loaderSizeCls, theme: theme, className:
|
|
31
|
+
return (0, jsx_runtime_1.jsx)(ASLoaderGrow, { size: loaderSizeCls, theme: theme, className: loaderClassName });
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
const renderLoaderModal = () => {
|
|
35
35
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.showLoader &&
|
|
36
|
-
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(styles_1.ASLoaderModalContainer, { className: className, theme: theme, children: renderLoader() }) }), document.body) }));
|
|
36
|
+
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(styles_1.ASLoaderModalContainer, { className: className, theme: theme, style: props.style, children: renderLoader() }) }), document.body) }));
|
|
37
37
|
};
|
|
38
38
|
const renderLoaderNonModal = () => {
|
|
39
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.showLoader && ((0, jsx_runtime_1.jsx)(styles_1.ASLoaderNonModalContainer, { className: className, theme: theme, children: renderLoader() })) }));
|
|
39
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.showLoader && ((0, jsx_runtime_1.jsx)(styles_1.ASLoaderNonModalContainer, { className: className, theme: theme, style: props.style, children: renderLoader() })) }));
|
|
40
40
|
};
|
|
41
41
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isModal ? renderLoaderModal() : renderLoaderNonModal() });
|
|
42
42
|
};
|
|
43
43
|
exports.default = ASLoader;
|
|
44
|
-
const ASLoaderGrow = ({ size = ASUI_types_1.
|
|
45
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.ASLoaderGrowStyled, { className: `${size}`, size: size, theme: theme, children: (0, jsx_runtime_1.jsx)(styles_1.ASLoaderText, { size: size, theme: theme, children: "LOADING" }) }));
|
|
44
|
+
const ASLoaderGrow = ({ className = '', size = ASUI_types_1.ComponentSize.Large, theme = astheme_1.default, }) => {
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.ASLoaderGrowStyled, { className: `${size} ${className}`, size: size, theme: theme, children: (0, jsx_runtime_1.jsx)(styles_1.ASLoaderText, { size: size, theme: theme, children: "LOADING" }) }));
|
|
46
46
|
};
|
|
47
|
-
const ASLoaderDots = ({ size = ASUI_types_1.
|
|
48
|
-
return (0, jsx_runtime_1.jsx)(styles_1.ASLoaderDotsStyled, { className: size
|
|
47
|
+
const ASLoaderDots = ({ size = ASUI_types_1.ComponentSize.Large, theme = astheme_1.default.loader, className = '', }) => {
|
|
48
|
+
return (0, jsx_runtime_1.jsx)(styles_1.ASLoaderDotsStyled, { className: `${size} ${className}`, size: size, theme: theme });
|
|
49
49
|
};
|
|
50
|
-
const ASLoaderSpin = ({ className = '', size = ASUI_types_1.
|
|
50
|
+
const ASLoaderSpin = ({ className = '', size = ASUI_types_1.ComponentSize.Large, theme = astheme_1.default.loader, }) => {
|
|
51
51
|
return ((0, jsx_runtime_1.jsx)(styles_1.ASLoaderSpinStyled, { className: className, size: size, theme: theme, children: (0, jsx_runtime_1.jsx)(styles_1.ASLoaderInnerSpinStyled, { size: size, theme: theme }) }));
|
|
52
52
|
};
|
|
@@ -2,6 +2,7 @@ import { CSSProperties } from 'react';
|
|
|
2
2
|
import { ASComponentSize, ASLoaderTheme, ASLoaderType } from '../apptypes/ASUI.types';
|
|
3
3
|
export interface ASLoaderProps {
|
|
4
4
|
className?: string;
|
|
5
|
+
loaderClassName?: string;
|
|
5
6
|
showLoader?: boolean;
|
|
6
7
|
size?: ASComponentSize;
|
|
7
8
|
loaderType?: ASLoaderType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ASLoader.types.d.ts","sourceRoot":"","sources":["../../src/asloader/ASLoader.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtF,MAAM,WAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"ASLoader.types.d.ts","sourceRoot":"","sources":["../../src/asloader/ASLoader.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtF,MAAM,WAAW,aAAa;IAM5B,SAAS,CAAC,EAAE,MAAM,CAAC;IAOnB,eAAe,CAAC,EAAE,MAAM,CAAC;IAQzB,UAAU,CAAC,EAAE,OAAO,CAAC;IASrB,IAAI,CAAC,EAAE,eAAe,CAAC;IASvB,UAAU,CAAC,EAAE,YAAY,CAAC;IAQ1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAOlB,KAAK,CAAC,EAAE,aAAa,CAAC;IAQtB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ASComponentSize, ASLoaderTheme } from '../apptypes/ASUI.types';
|
|
2
2
|
export declare const ASLoaderModalContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
3
|
theme: ASLoaderTheme;
|
|
4
4
|
}>> & string;
|
|
5
5
|
export declare const ASLoaderNonModalContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
6
|
export declare const ASLoaderText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
7
|
-
size:
|
|
7
|
+
size: ASComponentSize;
|
|
8
8
|
theme: ASLoaderTheme;
|
|
9
9
|
}>> & string;
|
|
10
10
|
export declare const ASLoaderGrowStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
11
|
-
size:
|
|
11
|
+
size: ASComponentSize;
|
|
12
12
|
theme: ASLoaderTheme;
|
|
13
13
|
}>> & string;
|
|
14
14
|
export declare const ASLoaderDotsStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
15
|
-
size:
|
|
15
|
+
size: ASComponentSize;
|
|
16
16
|
theme: ASLoaderTheme;
|
|
17
17
|
}>> & string;
|
|
18
18
|
export declare const ASLoaderSpinStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
19
|
-
size:
|
|
19
|
+
size: ASComponentSize;
|
|
20
20
|
}>> & string;
|
|
21
21
|
export declare const ASLoaderInnerSpinStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
22
|
-
size:
|
|
22
|
+
size: ASComponentSize;
|
|
23
23
|
theme: ASLoaderTheme;
|
|
24
24
|
}>> & string;
|
|
25
25
|
export declare const StorybookLoaderWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/asloader/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/asloader/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAiB,MAAM,wBAAwB,CAAC;AA2BvF,eAAO,MAAM,sBAAsB;WAAuB,aAAa;YAOtE,CAAC;AAEF,eAAO,MAAM,yBAAyB,6NAKrC,CAAC;AAEF,eAAO,MAAM,YAAY;UAAuB,eAAe;WAAS,aAAa;YAcpF,CAAC;AAGF,eAAO,MAAM,kBAAkB;UAAsB,eAAe;WAAS,aAAa;YAqBzF,CAAC;AAEF,eAAO,MAAM,kBAAkB;UAAsB,eAAe;WAAS,aAAa;YAkBzF,CAAC;AAEF,eAAO,MAAM,kBAAkB;UAAsB,eAAe;YAOnE,CAAC;AAEF,eAAO,MAAM,uBAAuB;UAAsB,eAAe;WAAS,aAAa;YA2B9F,CAAC;AAEF,eAAO,MAAM,sBAAsB,6NAGlC,CAAC"}
|
package/dist/asloader/styles.js
CHANGED
|
@@ -50,9 +50,9 @@ exports.ASLoaderText = styled_components_1.default.span `
|
|
|
50
50
|
top: 50%;
|
|
51
51
|
transform: translate(-50%, -50%);
|
|
52
52
|
|
|
53
|
-
font-size: ${({ size }) =>
|
|
54
|
-
font-weight: ${({ size }) => (size === ASUI_types_1.
|
|
55
|
-
letter-spacing: ${({ size }) => (size === ASUI_types_1.
|
|
53
|
+
font-size: ${({ size }) => size === ASUI_types_1.ComponentSize.Large ? '2.5rem' : size === ASUI_types_1.ComponentSize.Medium ? '1.85rem' : '1.25rem'};
|
|
54
|
+
font-weight: ${({ size }) => (size === ASUI_types_1.ComponentSize.Large ? '700' : size === ASUI_types_1.ComponentSize.Medium ? '500' : '500')};
|
|
55
|
+
letter-spacing: ${({ size }) => (size === ASUI_types_1.ComponentSize.Small ? '0.1rem' : '0.2rem')};
|
|
56
56
|
`;
|
|
57
57
|
exports.ASLoaderGrowStyled = styled_components_1.default.div `
|
|
58
58
|
position: relative;
|
|
@@ -73,8 +73,8 @@ exports.ASLoaderGrowStyled = styled_components_1.default.div `
|
|
|
73
73
|
animation: ${loaderGrow} 2s infinite alternate;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
width: ${({ size }) => (size === ASUI_types_1.
|
|
77
|
-
height: ${({ size }) => (size === ASUI_types_1.
|
|
76
|
+
width: ${({ size }) => (size === ASUI_types_1.ComponentSize.Large ? '200px' : size === ASUI_types_1.ComponentSize.Medium ? '160px' : '120px')};
|
|
77
|
+
height: ${({ size }) => (size === ASUI_types_1.ComponentSize.Large ? '44px' : size === ASUI_types_1.ComponentSize.Medium ? '34px' : '24px')};
|
|
78
78
|
`;
|
|
79
79
|
exports.ASLoaderDotsStyled = styled_components_1.default.div `
|
|
80
80
|
width: 64px;
|
|
@@ -90,17 +90,17 @@ exports.ASLoaderDotsStyled = styled_components_1.default.div `
|
|
|
90
90
|
top: 50%;
|
|
91
91
|
transform: translate(-50%, -50%);
|
|
92
92
|
|
|
93
|
-
width: ${({ size }) => (size === ASUI_types_1.
|
|
94
|
-
height: ${({ size }) => (size === ASUI_types_1.
|
|
95
|
-
background-size: ${({ size }) => size === ASUI_types_1.
|
|
93
|
+
width: ${({ size }) => (size === ASUI_types_1.ComponentSize.Large ? '64px' : size === ASUI_types_1.ComponentSize.Medium ? '32px' : '16px')};
|
|
94
|
+
height: ${({ size }) => (size === ASUI_types_1.ComponentSize.Large ? '64px' : size === ASUI_types_1.ComponentSize.Medium ? '32px' : '16px')};
|
|
95
|
+
background-size: ${({ size }) => size === ASUI_types_1.ComponentSize.Large ? '24px 24px' : size === ASUI_types_1.ComponentSize.Medium ? '12px 12px' : '6px 6px'};
|
|
96
96
|
`;
|
|
97
97
|
exports.ASLoaderSpinStyled = styled_components_1.default.div `
|
|
98
98
|
position: relative;
|
|
99
99
|
left: 50%;
|
|
100
100
|
top: 50%;
|
|
101
101
|
transform: translate(-50%, -50%);
|
|
102
|
-
width: ${({ size }) => (size === ASUI_types_1.
|
|
103
|
-
height: ${({ size }) => (size === ASUI_types_1.
|
|
102
|
+
width: ${({ size }) => (size === ASUI_types_1.ComponentSize.Large ? '100px' : size === ASUI_types_1.ComponentSize.Medium ? '50px' : '30px')};
|
|
103
|
+
height: ${({ size }) => (size === ASUI_types_1.ComponentSize.Large ? '100px' : size === ASUI_types_1.ComponentSize.Medium ? '50px' : '30px')};
|
|
104
104
|
`;
|
|
105
105
|
exports.ASLoaderInnerSpinStyled = styled_components_1.default.div `
|
|
106
106
|
display: grid;
|
|
@@ -109,9 +109,9 @@ exports.ASLoaderInnerSpinStyled = styled_components_1.default.div `
|
|
|
109
109
|
border-radius: 50%;
|
|
110
110
|
border-color: ${({ theme }) => theme.loaderSpinBorderColor};
|
|
111
111
|
animation: ${loaderSpin} 6s infinite linear;
|
|
112
|
-
width: ${({ size }) => (size === ASUI_types_1.
|
|
113
|
-
height: ${({ size }) => (size === ASUI_types_1.
|
|
114
|
-
border-width: ${({ size }) => (size === ASUI_types_1.
|
|
112
|
+
width: ${({ size }) => (size === ASUI_types_1.ComponentSize.Large ? '84px' : size === ASUI_types_1.ComponentSize.Medium ? '42px' : '26px')};
|
|
113
|
+
height: ${({ size }) => (size === ASUI_types_1.ComponentSize.Large ? '84px' : size === ASUI_types_1.ComponentSize.Medium ? '42px' : '26px')};
|
|
114
|
+
border-width: ${({ size }) => (size === ASUI_types_1.ComponentSize.Large ? '8px' : size === ASUI_types_1.ComponentSize.Medium ? '4px' : '2px')};
|
|
115
115
|
|
|
116
116
|
&::before,
|
|
117
117
|
&::after {
|
|
@@ -120,7 +120,7 @@ exports.ASLoaderInnerSpinStyled = styled_components_1.default.div `
|
|
|
120
120
|
border: inherit;
|
|
121
121
|
border-radius: 50%;
|
|
122
122
|
border-color: ${({ theme }) => theme.loaderSpinBorderBeforeColor};
|
|
123
|
-
margin: ${({ size }) => (size === ASUI_types_1.
|
|
123
|
+
margin: ${({ size }) => (size === ASUI_types_1.ComponentSize.Large ? '16px' : size === ASUI_types_1.ComponentSize.Medium ? '8px' : '4px')};
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
&::before {
|
|
@@ -7,7 +7,7 @@ const ASUI_types_1 = require("../apptypes/ASUI.types");
|
|
|
7
7
|
const astheme_1 = tslib_1.__importDefault(require("../astheme"));
|
|
8
8
|
const icons_1 = require("../icons");
|
|
9
9
|
const styles_1 = require("./styles");
|
|
10
|
-
const ASTextField = ({ className = '', theme = astheme_1.default, value = '', onChange = () => undefined, size = ASUI_types_1.
|
|
10
|
+
const ASTextField = ({ className = '', theme = astheme_1.default, value = '', onChange = () => undefined, size = ASUI_types_1.ComponentSize.Medium, type = 'text', showClearButton = false, showSearchIcon = false, disableAutofill = false, ...props }) => {
|
|
11
11
|
const passwordTypeRef = (0, react_1.useRef)(false);
|
|
12
12
|
const genericId = (0, react_1.useId)();
|
|
13
13
|
const textFieldId = props.id || genericId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ASThemeDefault.d.ts","sourceRoot":"","sources":["../../src/astheme/ASThemeDefault.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAwEjD,QAAA,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"ASThemeDefault.d.ts","sourceRoot":"","sources":["../../src/astheme/ASThemeDefault.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAwEjD,QAAA,MAAM,cAAc,EAAE,OAgFrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -122,6 +122,28 @@ const ASThemeDefault = {
|
|
|
122
122
|
placeholderColor: colors.mainGray66,
|
|
123
123
|
iconTextShadow: colors.mainGray97,
|
|
124
124
|
},
|
|
125
|
+
dropdown: {
|
|
126
|
+
dropdownCaratColor: colors.mainGray33,
|
|
127
|
+
dropdownGradientDown: `linear-gradient(to bottom, ${colors.yellow30} 0%, ${colors.mainYellow} 100%)`,
|
|
128
|
+
dropdownGradientUp: `linear-gradient(to top, ${colors.yellow30} 0%, ${colors.mainYellow} 100%)`,
|
|
129
|
+
dropdownShadowHoverASSmall: `inset 0 0 5px 0 ${colors.mainGray47}`,
|
|
130
|
+
dropdownShadowHoverASMedium: `inset 0 0 10px 0 ${colors.mainGray47}`,
|
|
131
|
+
dropdownShadowHoverASLarge: `inset 0 0 15px 0 ${colors.mainGray47}`,
|
|
132
|
+
dropdownShadowActiveASSmall: `inset 0 0 5px 1px ${colors.mainBlack}`,
|
|
133
|
+
dropdownShadowActiveASMedium: `inset 0 0 8px 2px ${colors.mainBlack}`,
|
|
134
|
+
dropdownShadowActiveASLarge: `inset 0 0 11px 3px ${colors.mainBlack}`,
|
|
135
|
+
dropdownShadowNormal: `inset 0 0 1px 0 ${colors.yellow30}`,
|
|
136
|
+
dropdownShadowHover: `inset 0 0 1px 0 ${colors.yellow80}`,
|
|
137
|
+
dropdownOutline: colors.mainYellow,
|
|
138
|
+
dropdownTextShadow: '-1px -1px 1px rgba(255, 255, 255, 0.3), 1px 1px 1px rgba(0, 0, 0, 0.2)',
|
|
139
|
+
dropdownTextShadowHover: '-1px -1px 1px rgba(255, 255, 255, 0.3), 0 0 1px rgba(0, 0, 0, 0.2)',
|
|
140
|
+
dropdownBg: colors.yellow30,
|
|
141
|
+
dropdownBgDisabled: colors.mainGray33,
|
|
142
|
+
dropdownColor: colors.mainGray58,
|
|
143
|
+
dropdownColorHover: colors.mainGray41,
|
|
144
|
+
dropdownColorSelected: colors.mainGray33,
|
|
145
|
+
dropdownColorDisabled: colors.mainGray99,
|
|
146
|
+
},
|
|
125
147
|
borderRadius: '35px',
|
|
126
148
|
};
|
|
127
149
|
exports.default = ASThemeDefault;
|