@lobehub/ui 1.41.0 → 1.43.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/es/Form/components/FormItem.d.ts +3 -0
- package/es/Form/components/FormItem.js +7 -4
- package/es/Form/components/FormTitle.d.ts +2 -1
- package/es/Form/components/FormTitle.js +11 -3
- package/es/Form/components/style.d.ts +2 -2
- package/es/Form/components/style.js +11 -8
- package/es/Form/index.d.ts +3 -2
- package/es/Form/index.js +11 -6
- package/es/Form/style.js +3 -2
- package/es/SideNav/index.js +7 -7
- package/es/Swatches/style.js +2 -2
- package/es/ThemeProvider/GlobalStyle/antdOverride.js +1 -1
- package/es/ThemeSwitch/index.d.ts +6 -0
- package/es/ThemeSwitch/index.js +73 -45
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/styles/algorithms/generateColorPalette.js +2 -1
- package/es/styles/algorithms/generateCustomTheme.d.ts +9 -0
- package/es/styles/algorithms/generateCustomTheme.js +30 -0
- package/es/styles/customTheme.d.ts +28 -0
- package/es/styles/customTheme.js +32 -0
- package/es/styles/index.d.ts +3 -0
- package/es/styles/index.js +4 -1
- package/es/styles/neutralColors.d.ts +9 -0
- package/es/styles/neutralColors.js +32 -0
- package/package.json +1 -1
|
@@ -3,6 +3,9 @@ import { FormItemProps as AntdFormItemProps } from 'antd';
|
|
|
3
3
|
export interface FormItemProps extends AntdFormItemProps {
|
|
4
4
|
desc?: string;
|
|
5
5
|
divider?: boolean;
|
|
6
|
+
hidden?: boolean;
|
|
7
|
+
minWidth?: string | number;
|
|
8
|
+
tag?: string;
|
|
6
9
|
}
|
|
7
10
|
declare const FormItem: import("react").NamedExoticComponent<FormItemProps>;
|
|
8
11
|
export default FormItem;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["desc", "className", "label", "children", "divider"];
|
|
3
|
+
var _excluded = ["desc", "tag", "minWidth", "className", "label", "children", "divider"];
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
import { Form } from 'antd';
|
|
@@ -14,21 +14,24 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
14
14
|
var Item = Form.Item;
|
|
15
15
|
var FormItem = /*#__PURE__*/memo(function (_ref) {
|
|
16
16
|
var desc = _ref.desc,
|
|
17
|
+
tag = _ref.tag,
|
|
18
|
+
minWidth = _ref.minWidth,
|
|
17
19
|
className = _ref.className,
|
|
18
20
|
label = _ref.label,
|
|
19
21
|
children = _ref.children,
|
|
20
22
|
divider = _ref.divider,
|
|
21
23
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
-
var _useStyles = useStyles(),
|
|
24
|
+
var _useStyles = useStyles(minWidth),
|
|
23
25
|
cx = _useStyles.cx,
|
|
24
26
|
styles = _useStyles.styles;
|
|
25
27
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
26
28
|
children: [divider && /*#__PURE__*/_jsx(FormDivider, {}), /*#__PURE__*/_jsx(Item, _objectSpread(_objectSpread({
|
|
27
29
|
className: cx(styles.item, className),
|
|
28
|
-
label:
|
|
30
|
+
label: /*#__PURE__*/_jsx(FormTitle, {
|
|
29
31
|
desc: desc,
|
|
32
|
+
tag: tag,
|
|
30
33
|
title: String(label)
|
|
31
|
-
})
|
|
34
|
+
})
|
|
32
35
|
}, props), {}, {
|
|
33
36
|
children: children
|
|
34
37
|
}))]
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DivProps } from "../../types";
|
|
3
3
|
export interface FormTitleProps extends DivProps {
|
|
4
|
-
desc
|
|
4
|
+
desc?: string;
|
|
5
|
+
tag?: string;
|
|
5
6
|
title: string;
|
|
6
7
|
}
|
|
7
8
|
declare const FormTitle: import("react").NamedExoticComponent<FormTitleProps>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { Tag } from 'antd';
|
|
1
2
|
import { memo } from 'react';
|
|
3
|
+
import { Flexbox } from 'react-layout-kit';
|
|
2
4
|
import { useStyles } from "./style";
|
|
3
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
7
|
var FormTitle = /*#__PURE__*/memo(function (_ref) {
|
|
6
8
|
var className = _ref.className,
|
|
9
|
+
tag = _ref.tag,
|
|
7
10
|
title = _ref.title,
|
|
8
11
|
desc = _ref.desc;
|
|
9
12
|
var _useStyles = useStyles(),
|
|
@@ -11,9 +14,14 @@ var FormTitle = /*#__PURE__*/memo(function (_ref) {
|
|
|
11
14
|
styles = _useStyles.styles;
|
|
12
15
|
return /*#__PURE__*/_jsxs("div", {
|
|
13
16
|
className: cx(styles.formTitle, className),
|
|
14
|
-
children: [/*#__PURE__*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
18
|
+
align: 'center',
|
|
19
|
+
direction: 'horizontal',
|
|
20
|
+
gap: 8,
|
|
21
|
+
children: [title, tag && /*#__PURE__*/_jsx(Tag, {
|
|
22
|
+
children: tag
|
|
23
|
+
})]
|
|
24
|
+
}), desc && /*#__PURE__*/_jsx("small", {
|
|
17
25
|
children: desc
|
|
18
26
|
})]
|
|
19
27
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const useStyles: (props?:
|
|
1
|
+
export declare const useStyles: (props?: string | number | undefined) => import("antd-style").ReturnStyles<{
|
|
2
2
|
footer: import("antd-style").SerializedStyles;
|
|
3
3
|
formTitle: import("antd-style").SerializedStyles;
|
|
4
|
-
group:
|
|
4
|
+
group: string;
|
|
5
5
|
item: import("antd-style").SerializedStyles;
|
|
6
6
|
title: import("antd-style").SerializedStyles;
|
|
7
7
|
}>;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
|
-
|
|
4
|
+
import { isNumber } from 'lodash-es';
|
|
5
|
+
export var useStyles = createStyles(function (_ref, itemMinWidth) {
|
|
5
6
|
var css = _ref.css,
|
|
6
|
-
|
|
7
|
+
cx = _ref.cx,
|
|
8
|
+
token = _ref.token,
|
|
9
|
+
isDarkMode = _ref.isDarkMode;
|
|
7
10
|
return {
|
|
8
|
-
footer: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
9
|
-
formTitle: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n
|
|
10
|
-
group: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
11
|
-
item: css(
|
|
12
|
-
title: css(
|
|
11
|
+
footer: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n "]))),
|
|
12
|
+
formTitle: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n\n display: flex;\n flex-direction: column;\n gap: 6px;\n\n text-align: left;\n\n > div {\n font-weight: 500;\n line-height: 1;\n }\n\n > small {\n display: block;\n\n line-height: 1;\n color: ", ";\n word-wrap: break-word;\n white-space: pre-wrap;\n }\n\n .ant-tag {\n font-family: ", ";\n }\n "])), token.colorTextDescription, token.fontFamilyCode),
|
|
13
|
+
group: cx(isDarkMode && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ant-collapse-content {\n background: transparent;\n }\n\n .ant-collapse-header {\n background: ", ";\n }\n "])), token.colorFillTertiary), css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .ant-collapse-header {\n border-radius: 0 !important;\n }\n\n .ant-collapse-content-box {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .ant-form-item-label {\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n "])))),
|
|
14
|
+
item: css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: 8px 0;\n\n .ant-row {\n justify-content: space-between;\n\n > div {\n flex: unset !important;\n flex-grow: unset !important;\n }\n }\n\n ", "\n "])), itemMinWidth && css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .ant-form-item-control {\n width: ", ";\n }\n "])), isNumber(itemMinWidth) ? "".concat(itemMinWidth, "px") : itemMinWidth)),
|
|
15
|
+
title: css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n gap: 8px;\n align-items: center;\n\n font-size: 16px;\n font-weight: 600;\n\n .anticon {\n color: ", ";\n }\n "])), token.colorPrimary)
|
|
13
16
|
};
|
|
14
17
|
});
|
package/es/Form/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormProps as AntFormProps } from 'antd';
|
|
1
|
+
import { FormProps as AntFormProps, type FormInstance } from 'antd';
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
3
|
import { type ReactNode } from 'react';
|
|
4
4
|
import { FormItemProps } from './components/FormItem';
|
|
@@ -10,7 +10,8 @@ export interface ItemGroup {
|
|
|
10
10
|
export interface FormProps extends AntFormProps {
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
footer?: ReactNode;
|
|
13
|
+
itemMinWidth?: FormItemProps['minWidth'];
|
|
13
14
|
items?: ItemGroup[];
|
|
14
15
|
}
|
|
15
|
-
declare const Form: import("react").
|
|
16
|
+
declare const Form: import("react").ForwardRefExoticComponent<FormProps & import("react").RefAttributes<FormInstance<any>>>;
|
|
16
17
|
export default Form;
|
package/es/Form/index.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "footer", "items", "children"];
|
|
3
|
+
var _excluded = ["className", "itemMinWidth", "footer", "items", "children"];
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
import { Form as AntForm } from 'antd';
|
|
7
|
-
import {
|
|
7
|
+
import { forwardRef } from 'react';
|
|
8
8
|
import FormFooter from "./components/FormFooter";
|
|
9
9
|
import FormGroup from "./components/FormGroup";
|
|
10
10
|
import FormItem from "./components/FormItem";
|
|
11
11
|
import { useStyles } from "./style";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
var Form = /*#__PURE__*/
|
|
14
|
+
var Form = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
15
15
|
var className = _ref.className,
|
|
16
|
+
itemMinWidth = _ref.itemMinWidth,
|
|
16
17
|
footer = _ref.footer,
|
|
17
18
|
items = _ref.items,
|
|
18
19
|
children = _ref.children,
|
|
@@ -23,15 +24,19 @@ var Form = /*#__PURE__*/memo(function (_ref) {
|
|
|
23
24
|
return /*#__PURE__*/_jsxs(AntForm, _objectSpread(_objectSpread({
|
|
24
25
|
className: cx(styles.form, className),
|
|
25
26
|
colon: false,
|
|
26
|
-
layout: "horizontal"
|
|
27
|
+
layout: "horizontal",
|
|
28
|
+
ref: ref
|
|
27
29
|
}, props), {}, {
|
|
28
30
|
children: [items === null || items === void 0 ? void 0 : items.map(function (group, groupIndex) {
|
|
29
31
|
return /*#__PURE__*/_jsx(FormGroup, {
|
|
30
32
|
icon: group === null || group === void 0 ? void 0 : group.icon,
|
|
31
33
|
title: group.title,
|
|
32
|
-
children: group.children.
|
|
34
|
+
children: group.children.filter(function (item) {
|
|
35
|
+
return !item.hidden;
|
|
36
|
+
}).map(function (item, itemIndex) {
|
|
33
37
|
return /*#__PURE__*/_jsx(FormItem, _objectSpread({
|
|
34
|
-
divider: itemIndex !== 0
|
|
38
|
+
divider: itemIndex !== 0,
|
|
39
|
+
minWidth: itemMinWidth
|
|
35
40
|
}, item), itemIndex);
|
|
36
41
|
})
|
|
37
42
|
}, groupIndex);
|
package/es/Form/style.js
CHANGED
|
@@ -2,9 +2,10 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLit
|
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
3
|
import { createStyles } from 'antd-style';
|
|
4
4
|
export var useStyles = createStyles(function (_ref) {
|
|
5
|
-
var css = _ref.css
|
|
5
|
+
var css = _ref.css,
|
|
6
|
+
token = _ref.token;
|
|
6
7
|
return {
|
|
7
8
|
footer: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n "]))),
|
|
8
|
-
form: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n .ant-form-item {\n margin: 0 !important;\n }\n\n .ant-form-item .ant-form-item-label > label {\n height: unset;\n }\n\n .ant-row {\n position: relative;\n flex-wrap: nowrap;\n }\n\n .ant-form-item-label {\n position: relative;\n flex: 1;\n max-width: 100%;\n }\n\n .ant-form-item-control {\n position: relative;\n flex: 0;\n min-width: unset !important;\n }\n "])))
|
|
9
|
+
form: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 16px;\n\n .ant-form-item {\n margin: 0 !important;\n }\n\n .ant-form-item .ant-form-item-label > label {\n height: unset;\n }\n\n .ant-row {\n position: relative;\n flex-wrap: nowrap;\n }\n\n .ant-form-item-label {\n position: relative;\n flex: 1;\n max-width: 100%;\n }\n\n .ant-form-item-control {\n position: relative;\n flex: 0;\n min-width: unset !important;\n }\n\n .ant-collapse-item {\n overflow: hidden !important;\n border-radius: ", "px !important;\n }\n "])), token.borderRadius)
|
|
9
10
|
};
|
|
10
11
|
});
|
package/es/SideNav/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
3
3
|
var _excluded = ["className", "avatar", "topActions", "bottomActions"];
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
import { Space } from 'antd';
|
|
7
6
|
import { memo } from 'react';
|
|
7
|
+
import { Flexbox } from 'react-layout-kit';
|
|
8
8
|
import { useStyles } from "./style";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -20,20 +20,20 @@ var SideNav = /*#__PURE__*/memo(function (_ref) {
|
|
|
20
20
|
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
|
|
21
21
|
className: cx(styles, className)
|
|
22
22
|
}, props), {}, {
|
|
23
|
-
children: [/*#__PURE__*/_jsxs(
|
|
23
|
+
children: [/*#__PURE__*/_jsxs(Flexbox, {
|
|
24
24
|
align: "center",
|
|
25
25
|
direction: "vertical",
|
|
26
|
-
|
|
27
|
-
children: [avatar, /*#__PURE__*/_jsx(
|
|
26
|
+
gap: 16,
|
|
27
|
+
children: [avatar, /*#__PURE__*/_jsx(Flexbox, {
|
|
28
28
|
align: "center",
|
|
29
29
|
direction: "vertical",
|
|
30
|
-
|
|
30
|
+
gap: 8,
|
|
31
31
|
children: topActions
|
|
32
32
|
})]
|
|
33
|
-
}), /*#__PURE__*/_jsx(
|
|
33
|
+
}), /*#__PURE__*/_jsx(Flexbox, {
|
|
34
34
|
align: "center",
|
|
35
35
|
direction: "vertical",
|
|
36
|
-
|
|
36
|
+
gap: 4,
|
|
37
37
|
children: bottomActions
|
|
38
38
|
})]
|
|
39
39
|
}));
|
package/es/Swatches/style.js
CHANGED
|
@@ -5,7 +5,7 @@ export var useStyles = createStyles(function (_ref, size) {
|
|
|
5
5
|
var css = _ref.css,
|
|
6
6
|
token = _ref.token;
|
|
7
7
|
return {
|
|
8
|
-
active: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-shadow:
|
|
9
|
-
container: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: pointer;\n\n width: ", "px;\n height: ", "px;\n\n background: ", ";\n border-radius: 50%;\n box-shadow:
|
|
8
|
+
active: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-shadow: 0 0 0 2px ", ";\n "])), token.colorTextTertiary),
|
|
9
|
+
container: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: pointer;\n\n width: ", "px;\n height: ", "px;\n\n background: ", ";\n border-radius: 50%;\n box-shadow: 0 0 0 1px ", ";\n\n transition:\n scale 400ms ", ",\n box-shadow 100ms ", ";\n\n &:hover {\n box-shadow: 0 0 0 3px ", ";\n }\n\n &:active {\n scale: 0.8;\n }\n "])), size, size, token.colorBgContainer, token.colorBorderSecondary, token.motionEaseOut, token.motionEaseOut, token.colorText)
|
|
10
10
|
};
|
|
11
11
|
});
|
|
@@ -2,5 +2,5 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLit
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from 'antd-style';
|
|
4
4
|
export default (function (token) {
|
|
5
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-tooltip-inner {\n display: flex;\n align-items: center;\n justify-content: center;\n\n min-height: unset;\n padding: 4px 8px;\n\n color: ", ";\n\n background-color: ", ";\n border-radius: ", "px;\n }\n\n .ant-tooltip-arrow {\n &::before,\n &::after {\n background: ", ";\n }\n }\n"])), token.colorBgLayout, token.colorText, token.borderRadiusSM, token.colorText);
|
|
5
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-tooltip-inner {\n display: flex;\n align-items: center;\n justify-content: center;\n\n min-height: unset;\n padding: 4px 8px;\n\n color: ", " !important;\n\n background-color: ", " !important;\n border-radius: ", "px !important;\n }\n\n .ant-tooltip-arrow {\n &::before,\n &::after {\n background: ", " !important;\n }\n }\n\n .ant-switch-handle::before {\n background: ", " !important;\n }\n"])), token.colorBgLayout, token.colorText, token.borderRadiusSM, token.colorText, token.colorBgContainer);
|
|
6
6
|
});
|
|
@@ -3,6 +3,11 @@ import { type ActionIconSize } from "..";
|
|
|
3
3
|
import { ThemeMode } from 'antd-style';
|
|
4
4
|
import { DivProps } from "../types";
|
|
5
5
|
export interface ThemeSwitchProps extends DivProps {
|
|
6
|
+
labels?: {
|
|
7
|
+
auto: string;
|
|
8
|
+
dark: string;
|
|
9
|
+
light: string;
|
|
10
|
+
};
|
|
6
11
|
/**
|
|
7
12
|
* @description Callback function when the theme mode is switched
|
|
8
13
|
* @type {(themeMode: ThemeMode) => void}
|
|
@@ -22,6 +27,7 @@ export interface ThemeSwitchProps extends DivProps {
|
|
|
22
27
|
* @type ThemeMode
|
|
23
28
|
*/
|
|
24
29
|
themeMode: ThemeMode;
|
|
30
|
+
type?: 'icon' | 'select';
|
|
25
31
|
}
|
|
26
32
|
declare const ThemeSwitch: import("react").NamedExoticComponent<ThemeSwitchProps>;
|
|
27
33
|
export default ThemeSwitch;
|
package/es/ThemeSwitch/index.js
CHANGED
|
@@ -1,60 +1,88 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["size", "themeMode", "onThemeSwitch"];
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
1
|
import { ActionIcon, Icon } from "./..";
|
|
7
|
-
import { Dropdown } from 'antd';
|
|
2
|
+
import { Dropdown, Select } from 'antd';
|
|
8
3
|
import { Monitor, Moon, Sun } from 'lucide-react';
|
|
9
|
-
import { memo } from 'react';
|
|
4
|
+
import { memo, useMemo } from 'react';
|
|
5
|
+
import { Flexbox } from 'react-layout-kit';
|
|
10
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
8
|
var icons = {
|
|
12
9
|
auto: Monitor,
|
|
13
10
|
dark: Moon,
|
|
14
11
|
light: Sun
|
|
15
12
|
};
|
|
16
|
-
var items = [{
|
|
17
|
-
icon: /*#__PURE__*/_jsx(Icon, {
|
|
18
|
-
icon: icons.auto,
|
|
19
|
-
size: "small"
|
|
20
|
-
}),
|
|
21
|
-
key: 'auto',
|
|
22
|
-
label: 'System'
|
|
23
|
-
}, {
|
|
24
|
-
icon: /*#__PURE__*/_jsx(Icon, {
|
|
25
|
-
icon: icons.light,
|
|
26
|
-
size: "small"
|
|
27
|
-
}),
|
|
28
|
-
key: 'light',
|
|
29
|
-
label: 'Light'
|
|
30
|
-
}, {
|
|
31
|
-
icon: /*#__PURE__*/_jsx(Icon, {
|
|
32
|
-
icon: icons.dark,
|
|
33
|
-
size: "small"
|
|
34
|
-
}),
|
|
35
|
-
key: 'dark',
|
|
36
|
-
label: 'Dark'
|
|
37
|
-
}];
|
|
38
13
|
var ThemeSwitch = /*#__PURE__*/memo(function (_ref) {
|
|
39
14
|
var _ref$size = _ref.size,
|
|
40
15
|
size = _ref$size === void 0 ? 'site' : _ref$size,
|
|
41
16
|
themeMode = _ref.themeMode,
|
|
42
17
|
onThemeSwitch = _ref.onThemeSwitch,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
icon:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
18
|
+
_ref$type = _ref.type,
|
|
19
|
+
type = _ref$type === void 0 ? 'icon' : _ref$type,
|
|
20
|
+
_ref$labels = _ref.labels,
|
|
21
|
+
labels = _ref$labels === void 0 ? {
|
|
22
|
+
auto: 'System',
|
|
23
|
+
dark: 'Dark',
|
|
24
|
+
light: 'Light'
|
|
25
|
+
} : _ref$labels,
|
|
26
|
+
className = _ref.className,
|
|
27
|
+
style = _ref.style;
|
|
28
|
+
var items = useMemo(function () {
|
|
29
|
+
return [{
|
|
30
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
31
|
+
icon: icons.auto,
|
|
32
|
+
size: "small"
|
|
33
|
+
}),
|
|
34
|
+
key: 'auto',
|
|
35
|
+
label: labels.auto
|
|
36
|
+
}, {
|
|
37
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
38
|
+
icon: icons.light,
|
|
39
|
+
size: "small"
|
|
40
|
+
}),
|
|
41
|
+
key: 'light',
|
|
42
|
+
label: labels.light
|
|
43
|
+
}, {
|
|
44
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
45
|
+
icon: icons.dark,
|
|
46
|
+
size: "small"
|
|
47
|
+
}),
|
|
48
|
+
key: 'dark',
|
|
49
|
+
label: labels.dark
|
|
50
|
+
}];
|
|
51
|
+
}, [labels]);
|
|
52
|
+
if (type === 'select') {
|
|
53
|
+
return /*#__PURE__*/_jsx(Select, {
|
|
54
|
+
className: className,
|
|
55
|
+
defaultValue: themeMode,
|
|
56
|
+
onChange: onThemeSwitch,
|
|
57
|
+
options: items.map(function (item) {
|
|
58
|
+
return {
|
|
59
|
+
label: /*#__PURE__*/_jsxs(Flexbox, {
|
|
60
|
+
direction: 'horizontal',
|
|
61
|
+
gap: 8,
|
|
62
|
+
children: [item.icon, item.label]
|
|
63
|
+
}),
|
|
64
|
+
value: item.key
|
|
65
|
+
};
|
|
66
|
+
}),
|
|
67
|
+
style: style
|
|
68
|
+
});
|
|
69
|
+
} else {
|
|
70
|
+
var menuProps = {
|
|
71
|
+
items: items,
|
|
72
|
+
onClick: function onClick(e) {
|
|
73
|
+
return onThemeSwitch(e.key);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
return /*#__PURE__*/_jsx(Dropdown, {
|
|
77
|
+
menu: menuProps,
|
|
78
|
+
trigger: ['click'],
|
|
79
|
+
children: /*#__PURE__*/_jsx(ActionIcon, {
|
|
80
|
+
className: className,
|
|
81
|
+
icon: icons[themeMode],
|
|
82
|
+
size: size,
|
|
83
|
+
style: style
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
}
|
|
59
87
|
});
|
|
60
88
|
export default ThemeSwitch;
|
package/es/index.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export { default as SideNav, type SideNavProps } from './SideNav';
|
|
|
47
47
|
export { default as Snippet, type SnippetProps } from './Snippet';
|
|
48
48
|
export { default as Spotlight, type SpotlightProps } from './Spotlight';
|
|
49
49
|
export { default as StroyBook, type StroyBookProps, useControls, useCreateStore, } from './StroyBook';
|
|
50
|
-
export
|
|
50
|
+
export * from './styles';
|
|
51
51
|
export { default as Swatches, type SwatchesProps } from './Swatches';
|
|
52
52
|
export { default as TabsNav, type TabsNavProps } from './TabsNav';
|
|
53
53
|
export { default as ThemeProvider } from './ThemeProvider';
|
package/es/index.js
CHANGED
|
@@ -46,7 +46,7 @@ export { default as SideNav } from "./SideNav";
|
|
|
46
46
|
export { default as Snippet } from "./Snippet";
|
|
47
47
|
export { default as Spotlight } from "./Spotlight";
|
|
48
48
|
export { default as StroyBook, useControls, useCreateStore } from "./StroyBook";
|
|
49
|
-
export
|
|
49
|
+
export * from "./styles";
|
|
50
50
|
export { default as Swatches } from "./Swatches";
|
|
51
51
|
export { default as TabsNav } from "./TabsNav";
|
|
52
52
|
export { default as ThemeProvider } from "./ThemeProvider";
|
|
@@ -6,7 +6,8 @@ export var generateColorPalette = function generateColorPalette(_ref) {
|
|
|
6
6
|
scale = _ref.scale,
|
|
7
7
|
appearance = _ref.appearance;
|
|
8
8
|
var name = capitalize(type);
|
|
9
|
-
|
|
9
|
+
var isDarkMode = appearance === 'dark';
|
|
10
|
+
return _ref2 = {}, _defineProperty(_ref2, "color".concat(name, "Bg"), scale[appearance][1]), _defineProperty(_ref2, "color".concat(name, "BgHover"), scale[appearance][2]), _defineProperty(_ref2, "color".concat(name, "Border"), scale[appearance][4]), _defineProperty(_ref2, "color".concat(name, "BorderHover"), scale[appearance][isDarkMode ? 5 : 3]), _defineProperty(_ref2, "color".concat(name, "Hover"), scale[appearance][isDarkMode ? 10 : 8]), _defineProperty(_ref2, "color".concat(name), scale[appearance][9]), _defineProperty(_ref2, "color".concat(name, "Active"), scale[appearance][isDarkMode ? 7 : 10]), _defineProperty(_ref2, "color".concat(name, "TextHover"), scale[appearance][isDarkMode ? 10 : 8]), _defineProperty(_ref2, "color".concat(name, "Text"), scale[appearance][9]), _defineProperty(_ref2, "color".concat(name, "TextActive"), scale[appearance][isDarkMode ? 7 : 10]), _ref2;
|
|
10
11
|
};
|
|
11
12
|
export var generateColorNeutralPalette = function generateColorNeutralPalette(_ref3) {
|
|
12
13
|
var scale = _ref3.scale,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AliasToken } from 'antd/es/theme/interface';
|
|
2
|
+
import { type NeutralColors, type PrimaryColors } from '../customTheme';
|
|
3
|
+
interface generateCustomThemeProps {
|
|
4
|
+
isDarkMode: boolean;
|
|
5
|
+
neutralColor?: NeutralColors | '';
|
|
6
|
+
primaryColor?: PrimaryColors | '';
|
|
7
|
+
}
|
|
8
|
+
export declare const generateCustomTheme: ({ primaryColor, neutralColor, isDarkMode, }: generateCustomThemeProps) => Partial<AliasToken>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
import { colorScales } from "../colors";
|
|
5
|
+
import { neutralColorScales } from "../neutralColors";
|
|
6
|
+
import { generateColorNeutralPalette, generateColorPalette } from "./generateColorPalette";
|
|
7
|
+
export var generateCustomTheme = function generateCustomTheme(_ref) {
|
|
8
|
+
var primaryColor = _ref.primaryColor,
|
|
9
|
+
neutralColor = _ref.neutralColor,
|
|
10
|
+
isDarkMode = _ref.isDarkMode;
|
|
11
|
+
var appearance = isDarkMode ? 'dark' : 'light';
|
|
12
|
+
var primaryTokens = {};
|
|
13
|
+
var neutralTokens = {};
|
|
14
|
+
if (primaryColor) {
|
|
15
|
+
var scale = colorScales[primaryColor];
|
|
16
|
+
primaryTokens = generateColorPalette({
|
|
17
|
+
appearance: appearance,
|
|
18
|
+
scale: scale,
|
|
19
|
+
type: 'Primary'
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
if (neutralColor) {
|
|
23
|
+
var _scale = neutralColorScales[neutralColor];
|
|
24
|
+
neutralTokens = generateColorNeutralPalette({
|
|
25
|
+
appearance: appearance,
|
|
26
|
+
scale: _scale
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return _objectSpread(_objectSpread({}, primaryTokens), neutralTokens);
|
|
30
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const primaryColors: {
|
|
2
|
+
blue: string;
|
|
3
|
+
cyan: string;
|
|
4
|
+
geekblue: string;
|
|
5
|
+
gold: string;
|
|
6
|
+
green: string;
|
|
7
|
+
lime: string;
|
|
8
|
+
magenta: string;
|
|
9
|
+
orange: string;
|
|
10
|
+
purple: string;
|
|
11
|
+
red: string;
|
|
12
|
+
volcano: string;
|
|
13
|
+
yellow: string;
|
|
14
|
+
};
|
|
15
|
+
export declare type PrimaryColorsObj = typeof primaryColors;
|
|
16
|
+
export declare type PrimaryColors = keyof PrimaryColorsObj;
|
|
17
|
+
export declare const primaryColorsSwatches: string[];
|
|
18
|
+
export declare const neutralColors: {
|
|
19
|
+
mauve: string;
|
|
20
|
+
olive: string;
|
|
21
|
+
sage: string;
|
|
22
|
+
sand: string;
|
|
23
|
+
slate: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const neutralColorsSwatches: string[];
|
|
26
|
+
export declare type NeutralColorsObj = typeof neutralColors;
|
|
27
|
+
export declare type NeutralColors = keyof NeutralColorsObj;
|
|
28
|
+
export declare const findCustomThemeName: (type: 'primary' | 'neutral', value: string) => string | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { colorScales } from "./colors";
|
|
2
|
+
import { neutralColorScales } from "./neutralColors";
|
|
3
|
+
export var primaryColors = {
|
|
4
|
+
blue: colorScales.blue.dark[9],
|
|
5
|
+
cyan: colorScales.cyan.dark[9],
|
|
6
|
+
geekblue: colorScales.geekblue.dark[9],
|
|
7
|
+
gold: colorScales.gold.dark[9],
|
|
8
|
+
green: colorScales.green.dark[9],
|
|
9
|
+
lime: colorScales.lime.dark[9],
|
|
10
|
+
magenta: colorScales.magenta.dark[9],
|
|
11
|
+
orange: colorScales.orange.dark[9],
|
|
12
|
+
purple: colorScales.purple.dark[9],
|
|
13
|
+
red: colorScales.red.dark[9],
|
|
14
|
+
volcano: colorScales.volcano.dark[9],
|
|
15
|
+
yellow: colorScales.yellow.dark[9]
|
|
16
|
+
};
|
|
17
|
+
export var primaryColorsSwatches = [primaryColors.red, primaryColors.orange, primaryColors.gold, primaryColors.yellow, primaryColors.lime, primaryColors.green, primaryColors.cyan, primaryColors.blue, primaryColors.geekblue, primaryColors.purple, primaryColors.magenta, primaryColors.volcano];
|
|
18
|
+
export var neutralColors = {
|
|
19
|
+
mauve: neutralColorScales.mauve.dark[9],
|
|
20
|
+
olive: neutralColorScales.olive.dark[9],
|
|
21
|
+
sage: neutralColorScales.sage.dark[9],
|
|
22
|
+
sand: neutralColorScales.sand.dark[9],
|
|
23
|
+
slate: neutralColorScales.slate.dark[9]
|
|
24
|
+
};
|
|
25
|
+
export var neutralColorsSwatches = [neutralColors.mauve, neutralColors.slate, neutralColors.sage, neutralColors.olive, neutralColors.sand];
|
|
26
|
+
export var findCustomThemeName = function findCustomThemeName(type, value) {
|
|
27
|
+
var res = type === 'primary' ? primaryColors : neutralColors;
|
|
28
|
+
var result = Object.entries(res).find(function (item) {
|
|
29
|
+
return item[1] === value;
|
|
30
|
+
});
|
|
31
|
+
return result === null || result === void 0 ? void 0 : result[0];
|
|
32
|
+
};
|
package/es/styles/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { generateCustomStylish as lobeCustomStylish } from './algorithms/generateCustomStylish';
|
|
2
|
+
export { generateCustomTheme as lobeCustomTheme } from './algorithms/generateCustomTheme';
|
|
2
3
|
export { generateCustomToken as lobeCustomToken } from './algorithms/generateCustomToken';
|
|
3
4
|
export { generateTheme as lobeTheme } from './algorithms/generateTheme';
|
|
5
|
+
export { colorScales as colors } from './colors';
|
|
6
|
+
export * from './customTheme';
|
package/es/styles/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { generateCustomStylish as lobeCustomStylish } from "./algorithms/generateCustomStylish";
|
|
2
|
+
export { generateCustomTheme as lobeCustomTheme } from "./algorithms/generateCustomTheme";
|
|
2
3
|
export { generateCustomToken as lobeCustomToken } from "./algorithms/generateCustomToken";
|
|
3
|
-
export { generateTheme as lobeTheme } from "./algorithms/generateTheme";
|
|
4
|
+
export { generateTheme as lobeTheme } from "./algorithms/generateTheme";
|
|
5
|
+
export { colorScales as colors } from "./colors";
|
|
6
|
+
export * from "./customTheme";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ColorScaleItem } from './colors';
|
|
2
|
+
export interface NeutralColorScales {
|
|
3
|
+
mauve: ColorScaleItem;
|
|
4
|
+
olive: ColorScaleItem;
|
|
5
|
+
sage: ColorScaleItem;
|
|
6
|
+
sand: ColorScaleItem;
|
|
7
|
+
slate: ColorScaleItem;
|
|
8
|
+
}
|
|
9
|
+
export declare const neutralColorScales: NeutralColorScales;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export var neutralColorScales = {
|
|
2
|
+
mauve: {
|
|
3
|
+
dark: ['#1c1b1e', '#252528', '#2f2f32', '#3a393d', '#454448', '#504f53', '#5b5a5f', '#67666a', '#737177', '#7f7d83', '#bbb9bd', '#fcf8fb', '#ffffff'],
|
|
4
|
+
darkA: ['rgba(233, 225, 250, 0.12)', 'rgba(231, 231, 250, 0.16)', 'rgba(235, 235, 250, 0.2)', 'rgba(242, 237, 254, 0.24)', 'rgba(238, 234, 248, 0.29)', 'rgba(242, 239, 252, 0.33)', 'rgba(239, 237, 250, 0.38)', 'rgba(245, 243, 252, 0.42)', 'rgba(245, 240, 253, 0.47)', 'rgba(244, 240, 252, 0.52)', 'rgba(253, 250, 255, 0.74)', 'rgba(255, 251, 254, 0.99)', '#ffffff'],
|
|
5
|
+
light: ['#fcf8fb', '#edeaed', '#dfdcdf', '#d1ced2', '#c2c0c4', '#b4b2b7', '#a7a4a9', '#99979c', '#8c8a90', '#7f7d83', '#4a494d', '#1c1b1e', '#111'],
|
|
6
|
+
lightA: ['rgba(155, 22, 122, 0.03)', 'rgba(55, 22, 55, 0.09)', 'rgba(26, 5, 26, 0.14)', 'rgba(25, 10, 30, 0.2)', 'rgba(11, 3, 19, 0.25)', 'rgba(13, 7, 23, 0.31)', 'rgba(11, 2, 16, 0.36)', 'rgba(6, 1, 14, 0.41)', 'rgba(5, 1, 14, 0.46)', 'rgba(4, 0, 12, 0.51)', 'rgba(4, 2, 8, 0.72)', 'rgba(3, 2, 5, 0.9)', '#111']
|
|
7
|
+
},
|
|
8
|
+
olive: {
|
|
9
|
+
dark: ['#1a1c1b', '#232624', '#2d302e', '#383a38', '#424542', '#4d504d', '#585c58', '#646763', '#70736e', '#7c7f79', '#b9bab5', '#faf9f4', '#ffffff'],
|
|
10
|
+
darkA: ['rgba(236, 255, 245, 0.11)', 'rgba(233, 253, 240, 0.15)', 'rgba(237, 253, 242, 0.19)', 'rgba(243, 252, 243, 0.23)', 'rgba(236, 246, 236, 0.28)', 'rgba(241, 250, 241, 0.32)', 'rgba(238, 249, 238, 0.37)', 'rgba(244, 251, 241, 0.41)', 'rgba(243, 250, 239, 0.46)', 'rgba(248, 254, 242, 0.5)', 'rgba(253, 255, 248, 0.73)', 'rgba(255, 254, 249, 0.98)', '#ffffff'],
|
|
11
|
+
light: ['#faf9f4', '#ecebe6', '#ddddd7', '#cfcfc9', '#c0c1bb', '#b2b4ae', '#a4a6a0', '#969993', '#898c86', '#7c7f79', '#484b48', '#1a1c1b', '#111'],
|
|
12
|
+
lightA: ['rgba(155, 135, 35, 0.05)', 'rgba(65, 55, 5, 0.1)', 'rgba(43, 43, 5, 0.16)', 'rgba(37, 37, 10, 0.22)', 'rgba(22, 25, 3, 0.27)', 'rgba(14, 21, 2, 0.32)', 'rgba(16, 21, 5, 0.38)', 'rgba(11, 18, 4, 0.43)', 'rgba(9, 15, 3, 0.48)', 'rgba(8, 13, 2, 0.53)', 'rgba(1, 5, 1, 0.72)', 'rgba(1, 3, 2, 0.9)', '#111']
|
|
13
|
+
},
|
|
14
|
+
sage: {
|
|
15
|
+
dark: ['#1a1c1b', '#232625', '#2d302f', '#373a39', '#424543', '#4d504e', '#585c59', '#636765', '#6f7370', '#7a7f7c', '#b8bab7', '#f9f9f7', '#ffffff'],
|
|
16
|
+
darkA: ['rgba(236, 255, 245, 0.11)', 'rgba(233, 253, 247, 0.15)', 'rgba(237, 253, 247, 0.19)', 'rgba(239, 252, 248, 0.23)', 'rgba(236, 246, 239, 0.28)', 'rgba(241, 250, 244, 0.32)', 'rgba(238, 249, 241, 0.37)', 'rgba(241, 251, 246, 0.41)', 'rgba(241, 250, 243, 0.46)', 'rgba(244, 254, 248, 0.5)', 'rgba(252, 255, 251, 0.73)', 'rgba(254, 254, 252, 0.98)', '#ffffff'],
|
|
17
|
+
light: ['#f9f9f7', '#eaebe8', '#dcddda', '#cdcfcc', '#bfc1be', '#b1b4b0', '#a3a6a3', '#959996', '#888c89', '#7a7f7c', '#474b49', '#1a1c1b', '#111'],
|
|
18
|
+
lightA: ['rgba(105, 105, 55, 0.04)', 'rgba(45, 55, 25, 0.1)', 'rgba(22, 28, 8, 0.15)', 'rgba(5, 15, 0, 0.2)', 'rgba(9, 17, 5, 0.26)', 'rgba(3, 13, 0, 0.31)', 'rgba(6, 14, 6, 0.37)', 'rgba(3, 12, 5, 0.42)', 'rgba(2, 10, 4, 0.47)', 'rgba(4, 13, 8, 0.53)', 'rgba(3, 8, 6, 0.73)', 'rgba(1, 3, 2, 0.9)', '#111']
|
|
19
|
+
},
|
|
20
|
+
sand: {
|
|
21
|
+
dark: ['#1c1c18', '#262521', '#30302b', '#3a3a35', '#45453f', '#505049', '#5c5b54', '#67675f', '#73726a', '#7f7e76', '#bcbab2', '#fcf9f3', '#ffffff'],
|
|
22
|
+
darkA: ['rgba(255, 255, 218, 0.11)', 'rgba(253, 247, 220, 0.15)', 'rgba(253, 253, 226, 0.19)', 'rgba(252, 252, 230, 0.23)', 'rgba(246, 246, 225, 0.28)', 'rgba(250, 250, 228, 0.32)', 'rgba(249, 246, 227, 0.37)', 'rgba(251, 251, 232, 0.41)', 'rgba(250, 248, 230, 0.46)', 'rgba(254, 252, 236, 0.5)', 'rgba(254, 251, 241, 0.74)', 'rgba(255, 252, 245, 0.99)', '#ffffff'],
|
|
23
|
+
light: ['#fcf9f3', '#edebe4', '#dfddd5', '#d1cfc7', '#c3c1b9', '#b5b3ab', '#a7a69d', '#999890', '#8c8b83', '#7f7e76', '#4b4a44', '#1c1c18', '#111'],
|
|
24
|
+
lightA: ['rgba(195, 135, 15, 0.05)', 'rgba(91, 73, 10, 0.11)', 'rgba(67, 55, 8, 0.17)', 'rgba(46, 37, 0, 0.22)', 'rgba(41, 34, 5, 0.28)', 'rgba(31, 25, 0, 0.33)', 'rgba(29, 27, 4, 0.39)', 'rgba(23, 21, 3, 0.44)', 'rgba(20, 18, 2, 0.49)', 'rgba(18, 16, 1, 0.54)', 'rgba(12, 10, 2, 0.74)', 'rgba(6, 6, 1, 0.91)', '#111']
|
|
25
|
+
},
|
|
26
|
+
slate: {
|
|
27
|
+
dark: ['#1b1c1d', '#242527', '#2e2f32', '#383a3c', '#434547', '#4e5052', '#595b5e', '#64676a', '#707276', '#7b7e82', '#b8babc', '#f9f9fa', '#ffffff'],
|
|
28
|
+
darkA: ['rgba(225, 233, 242, 0.12)', 'rgba(225, 231, 244, 0.16)', 'rgba(230, 235, 250, 0.2)', 'rgba(233, 242, 250, 0.24)', 'rgba(239, 246, 254, 0.28)', 'rgba(236, 242, 248, 0.33)', 'rgba(241, 246, 254, 0.37)', 'rgba(238, 245, 252, 0.42)', 'rgba(238, 243, 251, 0.47)', 'rgba(241, 247, 255, 0.51)', 'rgba(249, 251, 254, 0.74)', 'rgba(254, 254, 255, 0.98)', '#ffffff'],
|
|
29
|
+
light: ['#f9f9fa', '#ebebec', '#dcddde', '#cecfd0', '#bfc1c3', '#b1b3b5', '#a4a6a8', '#96989b', '#898b8e', '#7b7e82', '#484a4d', '#1b1c1d', '#111'],
|
|
30
|
+
lightA: ['rgba(55, 55, 88, 0.03)', 'rgba(5, 5, 17, 0.08)', 'rgba(5, 12, 19, 0.14)', 'rgba(10, 15, 20, 0.2)', 'rgba(9, 17, 24, 0.26)', 'rgba(3, 10, 16, 0.31)', 'rgba(2, 8, 13, 0.36)', 'rgba(5, 10, 17, 0.42)', 'rgba(4, 8, 15, 0.47)', 'rgba(1, 7, 15, 0.52)', 'rgba(1, 4, 8, 0.72)', 'rgba(2, 3, 4, 0.9)', '#111']
|
|
31
|
+
}
|
|
32
|
+
};
|