@uxf/ui 11.35.0 → 11.37.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/_tokens/generated/figma-colors.js +118 -0
- package/bin/generate-css-tokens.js +116 -0
- package/button/README.md +1 -1
- package/button/button.d.ts +1 -0
- package/button/button.stories.js +1 -1
- package/components.d.ts +5 -0
- package/components.js +5 -0
- package/css/badge.css +1 -1
- package/css/button.css +65 -48
- package/css/colors-dark.css +118 -0
- package/css/colors-light.css +118 -0
- package/css/colors-primitives.css +312 -0
- package/css/figma-colors.css +540 -0
- package/css/icon-button.css +9 -0
- package/css/modal-header.css +4 -4
- package/css/radio-group.css +1 -1
- package/css/text-link.css +1 -1
- package/css/toggle.css +1 -1
- package/dropzone/README.md +2 -2
- package/figma-colors.js +118 -0
- package/icon-button/README.md +9 -0
- package/icon-button/icon-button.d.ts +9 -0
- package/icon-button/icon-button.js +15 -0
- package/icon-button/icon-button.spec.d.ts +1 -0
- package/icon-button/icon-button.spec.js +9 -0
- package/icon-button/icon-button.stories.d.ts +2 -0
- package/icon-button/icon-button.stories.js +58 -0
- package/icon-button/index.d.ts +2 -0
- package/icon-button/index.js +5 -0
- package/modal-header/README.md +1 -0
- package/package.json +44 -38
- package/readmes.d.ts +1 -0
- package/readmes.js +58 -56
- package/scripts/generate-tw-tokens.js +1 -0
- package/tabs/components/tabs-button.js +1 -1
- package/toggle/toggle.stories.js +7 -7
- package/tokens/figma-colors.js +118 -0
- package/tw-tokens/tw-colors.d.ts +115 -0
- package/tw-tokens/tw-colors.js +115 -0
- package/tw-tokens/tw-containers.js +1 -7
- package/tw-tokens/tw-screens.js +1 -7
- package/utils/storybook-config.d.ts +5 -0
- package/utils/storybook-config.js +5 -0
- package/utils/tailwind-config.js +7 -0
- package/css/colors.css +0 -99
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
const figmaColors = {
|
|
2
|
+
base_border_border: "var(--uxf-color-base-border-border)",
|
|
3
|
+
base_border_input: "var(--uxf-color-base-border-input)",
|
|
4
|
+
base_border_inverted_border: "var(--uxf-color-base-border-inverted-border)",
|
|
5
|
+
base_border_inverted_input: "var(--uxf-color-base-border-inverted-input)",
|
|
6
|
+
base_icon_disabled: "var(--uxf-color-base-icon-disabled)",
|
|
7
|
+
base_icon_high_emphasis: "var(--uxf-color-base-icon-high-emphasis)",
|
|
8
|
+
base_icon_low_emphasis: "var(--uxf-color-base-icon-low-emphasis)",
|
|
9
|
+
base_icon_medium_emphasis: "var(--uxf-color-base-icon-medium-emphasis)",
|
|
10
|
+
base_icon_inverted_low_emphasis: "var(--uxf-color-base-icon-inverted-low-emphasis)",
|
|
11
|
+
base_icon_inverted_disabled: "var(--uxf-color-base-icon-inverted-disabled)",
|
|
12
|
+
base_icon_inverted_high_emphasis: "var(--uxf-color-base-icon-inverted-high-emphasis)",
|
|
13
|
+
base_shadow_shadow_md: "var(--uxf-color-base-shadow-shadow-md)",
|
|
14
|
+
base_shadow_shadow_sm: "var(--uxf-color-base-shadow-shadow-sm)",
|
|
15
|
+
base_surface_background: "var(--uxf-color-base-surface-background)",
|
|
16
|
+
base_surface_disabled: "var(--uxf-color-base-surface-disabled)",
|
|
17
|
+
base_surface_input: "var(--uxf-color-base-surface-input)",
|
|
18
|
+
base_surface_input_disabled: "var(--uxf-color-base-surface-input-disabled)",
|
|
19
|
+
base_surface_input_hover: "var(--uxf-color-base-surface-input-hover)",
|
|
20
|
+
base_surface_main: "var(--uxf-color-base-surface-main)",
|
|
21
|
+
base_surface_main_hover: "var(--uxf-color-base-surface-main-hover)",
|
|
22
|
+
base_surface_popup: "var(--uxf-color-base-surface-popup)",
|
|
23
|
+
base_surface_tooltip: "var(--uxf-color-base-surface-tooltip)",
|
|
24
|
+
base_surface_inverted_default: "var(--uxf-color-base-surface-inverted-default)",
|
|
25
|
+
base_surface_inverted_default_hover: "var(--uxf-color-base-surface-inverted-default-hover)",
|
|
26
|
+
base_surface_inverted_disabled: "var(--uxf-color-base-surface-inverted-disabled)",
|
|
27
|
+
base_surface_inverted_main: "var(--uxf-color-base-surface-inverted-main)",
|
|
28
|
+
base_surface_inverted_main_hover: "var(--uxf-color-base-surface-inverted-main-hover)",
|
|
29
|
+
base_text_disabled: "var(--uxf-color-base-text-disabled)",
|
|
30
|
+
base_text_high_emphasis: "var(--uxf-color-base-text-high-emphasis)",
|
|
31
|
+
base_text_link: "var(--uxf-color-base-text-link)",
|
|
32
|
+
base_text_link_pressed: "var(--uxf-color-base-text-link-pressed)",
|
|
33
|
+
base_text_low_emphasis: "var(--uxf-color-base-text-low-emphasis)",
|
|
34
|
+
base_text_inverted_disabled: "var(--uxf-color-base-text-inverted-disabled)",
|
|
35
|
+
base_text_inverted_high_emphasis: "var(--uxf-color-base-text-inverted-high-emphasis)",
|
|
36
|
+
base_text_inverted_link: "var(--uxf-color-base-text-inverted-link)",
|
|
37
|
+
base_text_inverted_low_emphasis: "var(--uxf-color-base-text-inverted-low-emphasis)",
|
|
38
|
+
brand_border: "var(--uxf-color-brand-border)",
|
|
39
|
+
brand_icon: "var(--uxf-color-brand-icon)",
|
|
40
|
+
brand_icon_on_muted: "var(--uxf-color-brand-icon-on-muted)",
|
|
41
|
+
brand_text: "var(--uxf-color-brand-text)",
|
|
42
|
+
brand_text_on_muted: "var(--uxf-color-brand-text-on-muted)",
|
|
43
|
+
brand_surface_bolder: "var(--uxf-color-brand-surface-bolder)",
|
|
44
|
+
brand_surface_bolder_hover: "var(--uxf-color-brand-surface-bolder-hover)",
|
|
45
|
+
brand_surface_default: "var(--uxf-color-brand-surface-default)",
|
|
46
|
+
brand_surface_default_hover: "var(--uxf-color-brand-surface-default-hover)",
|
|
47
|
+
brand_surface_muted: "var(--uxf-color-brand-surface-muted)",
|
|
48
|
+
brand_surface_muted_hover: "var(--uxf-color-brand-surface-muted-hover)",
|
|
49
|
+
brand_surface_subtle: "var(--uxf-color-brand-surface-subtle)",
|
|
50
|
+
brand_surface_subtle_hover: "var(--uxf-color-brand-surface-subtle-hover)",
|
|
51
|
+
info_border: "var(--uxf-color-info-border)",
|
|
52
|
+
info_icon: "var(--uxf-color-info-icon)",
|
|
53
|
+
info_icon_on_muted: "var(--uxf-color-info-icon-on-muted)",
|
|
54
|
+
info_text: "var(--uxf-color-info-text)",
|
|
55
|
+
info_text_on_muted: "var(--uxf-color-info-text-on-muted)",
|
|
56
|
+
info_surface_default: "var(--uxf-color-info-surface-default)",
|
|
57
|
+
info_surface_default_hover: "var(--uxf-color-info-surface-default-hover)",
|
|
58
|
+
info_surface_muted: "var(--uxf-color-info-surface-muted)",
|
|
59
|
+
info_surface_muted_hover: "var(--uxf-color-info-surface-muted-hover)",
|
|
60
|
+
info_surface_subtle: "var(--uxf-color-info-surface-subtle)",
|
|
61
|
+
info_surface_subtle_hover: "var(--uxf-color-info-surface-subtle-hover)",
|
|
62
|
+
inverted_border: "var(--uxf-color-inverted-border)",
|
|
63
|
+
inverted_icon: "var(--uxf-color-inverted-icon)",
|
|
64
|
+
inverted_icon_on_muted: "var(--uxf-color-inverted-icon-on-muted)",
|
|
65
|
+
inverted_text_default: "var(--uxf-color-inverted-text-default)",
|
|
66
|
+
inverted_text_disabled: "var(--uxf-color-inverted-text-disabled)",
|
|
67
|
+
inverted_text_muted: "var(--uxf-color-inverted-text-muted)",
|
|
68
|
+
inverted_text_on_muted: "var(--uxf-color-inverted-text-on-muted)",
|
|
69
|
+
negative_border: "var(--uxf-color-negative-border)",
|
|
70
|
+
negative_icon: "var(--uxf-color-negative-icon)",
|
|
71
|
+
negative_icon_on_muted: "var(--uxf-color-negative-icon-on-muted)",
|
|
72
|
+
negative_text: "var(--uxf-color-negative-text)",
|
|
73
|
+
negative_text_on_muted: "var(--uxf-color-negative-text-on-muted)",
|
|
74
|
+
negative_surface_default: "var(--uxf-color-negative-surface-default)",
|
|
75
|
+
negative_surface_default_hover: "var(--uxf-color-negative-surface-default-hover)",
|
|
76
|
+
negative_surface_muted: "var(--uxf-color-negative-surface-muted)",
|
|
77
|
+
negative_surface_muted_hover: "var(--uxf-color-negative-surface-muted-hover)",
|
|
78
|
+
negative_surface_subtle: "var(--uxf-color-negative-surface-subtle)",
|
|
79
|
+
negative_surface_subtle_hover: "var(--uxf-color-negative-surface-subtle-hover)",
|
|
80
|
+
neutral_border: "var(--uxf-color-neutral-border)",
|
|
81
|
+
neutral_icon: "var(--uxf-color-neutral-icon)",
|
|
82
|
+
neutral_icon_on_muted: "var(--uxf-color-neutral-icon-on-muted)",
|
|
83
|
+
neutral_text: "var(--uxf-color-neutral-text)",
|
|
84
|
+
neutral_text_on_muted: "var(--uxf-color-neutral-text-on-muted)",
|
|
85
|
+
neutral_surface_bolder: "var(--uxf-color-neutral-surface-bolder)",
|
|
86
|
+
neutral_surface_bolder_hover: "var(--uxf-color-neutral-surface-bolder-hover)",
|
|
87
|
+
neutral_surface_default: "var(--uxf-color-neutral-surface-default)",
|
|
88
|
+
neutral_surface_default_hover: "var(--uxf-color-neutral-surface-default-hover)",
|
|
89
|
+
neutral_surface_muted: "var(--uxf-color-neutral-surface-muted)",
|
|
90
|
+
neutral_surface_muted_hover: "var(--uxf-color-neutral-surface-muted-hover)",
|
|
91
|
+
neutral_surface_subtle: "var(--uxf-color-neutral-surface-subtle)",
|
|
92
|
+
neutral_surface_subtle_hover: "var(--uxf-color-neutral-surface-subtle-hover)",
|
|
93
|
+
positive_border: "var(--uxf-color-positive-border)",
|
|
94
|
+
positive_icon: "var(--uxf-color-positive-icon)",
|
|
95
|
+
positive_icon_on_muted: "var(--uxf-color-positive-icon-on-muted)",
|
|
96
|
+
positive_text: "var(--uxf-color-positive-text)",
|
|
97
|
+
positive_text_on_muted: "var(--uxf-color-positive-text-on-muted)",
|
|
98
|
+
positive_surface_default: "var(--uxf-color-positive-surface-default)",
|
|
99
|
+
positive_surface_default_hover: "var(--uxf-color-positive-surface-default-hover)",
|
|
100
|
+
positive_surface_muted: "var(--uxf-color-positive-surface-muted)",
|
|
101
|
+
positive_surface_muted_hover: "var(--uxf-color-positive-surface-muted-hover)",
|
|
102
|
+
positive_surface_subtle: "var(--uxf-color-positive-surface-subtle)",
|
|
103
|
+
positive_surface_subtle_hover: "var(--uxf-color-positive-surface-subtle-hover)",
|
|
104
|
+
warning_border: "var(--uxf-color-warning-border)",
|
|
105
|
+
warning_icon: "var(--uxf-color-warning-icon)",
|
|
106
|
+
warning_icon_on_muted: "var(--uxf-color-warning-icon-on-muted)",
|
|
107
|
+
warning_text: "var(--uxf-color-warning-text)",
|
|
108
|
+
warning_text_on_muted: "var(--uxf-color-warning-text-on-muted)",
|
|
109
|
+
warning_surface_default: "var(--uxf-color-warning-surface-default)",
|
|
110
|
+
warning_surface_default_hover: "var(--uxf-color-warning-surface-default-hover)",
|
|
111
|
+
warning_surface_muted: "var(--uxf-color-warning-surface-muted)",
|
|
112
|
+
warning_surface_muted_hover: "var(--uxf-color-warning-surface-muted-hover)",
|
|
113
|
+
warning_surface_subtle: "var(--uxf-color-warning-surface-subtle)",
|
|
114
|
+
warning_surface_subtle_hover: "var(--uxf-color-warning-surface-subtle-hover)",
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
module.exports = { figmaColors }
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
|
|
5
|
+
// helper functions
|
|
6
|
+
|
|
7
|
+
function throwError(message) {
|
|
8
|
+
throw new Error(message);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function getOption(name) {
|
|
12
|
+
const args = process.argv.slice(2);
|
|
13
|
+
const optionArg = args.find((arg) => arg.startsWith(`--${name}=`));
|
|
14
|
+
|
|
15
|
+
if (optionArg) {
|
|
16
|
+
return optionArg.split("=")[1];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function indentLines(cssContent, indentCount) {
|
|
23
|
+
return cssContent
|
|
24
|
+
.split("\n")
|
|
25
|
+
.map((line) => line.trim())
|
|
26
|
+
.map((line) => " ".repeat(indentCount) + line)
|
|
27
|
+
.join("\n")
|
|
28
|
+
.trim();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// script
|
|
32
|
+
|
|
33
|
+
try {
|
|
34
|
+
const sourceDirectory =
|
|
35
|
+
getOption("source") ?? throwError('Argument --source="/path/to/source-directory" is required.');
|
|
36
|
+
const outputDirectory =
|
|
37
|
+
getOption("output") ?? throwError('Argument --output="/path/to/output-directory/" is required.');
|
|
38
|
+
|
|
39
|
+
const colorsLightFile = path.join(sourceDirectory, "colors-light.css");
|
|
40
|
+
const colorsDarkFile = path.join(sourceDirectory, "colors-dark.css");
|
|
41
|
+
const primitivesFile = path.join(sourceDirectory, "colors-primitives.css");
|
|
42
|
+
|
|
43
|
+
// Check if the necessary files exist
|
|
44
|
+
if (!fs.existsSync(colorsLightFile) || !fs.existsSync(colorsDarkFile) || !fs.existsSync(primitivesFile)) {
|
|
45
|
+
console.error("Error: One or more required CSS files are missing in the source directory.");
|
|
46
|
+
console.error("Ensure the following files are present in the source directory:");
|
|
47
|
+
console.error(" - colors-light.css");
|
|
48
|
+
console.error(" - colors-dark.css");
|
|
49
|
+
console.error(" - colors-primitives.css");
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!fs.existsSync(outputDirectory)) {
|
|
54
|
+
fs.mkdirSync(outputDirectory, { recursive: true });
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const removeComments = (cssContent) => {
|
|
58
|
+
return cssContent.replace(/\/\*[\s\S]*?\*\//g, "").trim();
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const primitives = removeComments(fs.readFileSync(primitivesFile, "utf-8"));
|
|
62
|
+
const colorsLight = removeComments(fs.readFileSync(colorsLightFile, "utf-8"));
|
|
63
|
+
const colorsDark = removeComments(fs.readFileSync(colorsDarkFile, "utf-8"));
|
|
64
|
+
|
|
65
|
+
const UXF_PREFIX = "--uxf-color-";
|
|
66
|
+
const ROOT_REGEXP = /:root\s*{\s*|}\s*$/g;
|
|
67
|
+
const PREFIX_REGEXP = /^\s*--/gm;
|
|
68
|
+
|
|
69
|
+
const cleanedPrimitives = primitives.replace(ROOT_REGEXP, "");
|
|
70
|
+
const cleanedColorsLight = colorsLight.replace(ROOT_REGEXP, "").replace(PREFIX_REGEXP, "" + UXF_PREFIX);
|
|
71
|
+
const cleanedColorsDark = colorsDark.replace(ROOT_REGEXP, "").replace(PREFIX_REGEXP, "" + UXF_PREFIX);
|
|
72
|
+
|
|
73
|
+
const mergedTokens = `/* this file is generated automatically, do not change anything manually in the contents of this file */
|
|
74
|
+
:root {
|
|
75
|
+
${indentLines(cleanedPrimitives, 4)}
|
|
76
|
+
|
|
77
|
+
${indentLines(cleanedColorsLight, 4)}
|
|
78
|
+
|
|
79
|
+
.dark {
|
|
80
|
+
${indentLines(cleanedColorsDark, 8)}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
`;
|
|
84
|
+
|
|
85
|
+
fs.writeFileSync(path.join(outputDirectory, "figma-colors.css"), mergedTokens, "utf-8");
|
|
86
|
+
|
|
87
|
+
const extractVariables = (cssContent) => {
|
|
88
|
+
const variableRegex = /(--[a-zA-Z0-9-]+):/g;
|
|
89
|
+
return [...cssContent.matchAll(variableRegex)].map((match) => match[1]);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const lightVariables = extractVariables(colorsLight);
|
|
93
|
+
|
|
94
|
+
const tailwindConfig = lightVariables.reduce((config, variable) => {
|
|
95
|
+
const variableWithPrefix = variable.replace(/--/g, UXF_PREFIX);
|
|
96
|
+
const tailwindKey = variable.replace("--", "").replace(/-/g, "_");
|
|
97
|
+
config[tailwindKey] = `var(${variableWithPrefix})`;
|
|
98
|
+
return config;
|
|
99
|
+
}, {});
|
|
100
|
+
|
|
101
|
+
const tailwindConfigString = `const figmaColors = {
|
|
102
|
+
${Object.entries(tailwindConfig)
|
|
103
|
+
.map(([key, value]) => ` ${key}: "${value}",`)
|
|
104
|
+
.join("\n")}
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
module.exports = { figmaColors }
|
|
109
|
+
`;
|
|
110
|
+
|
|
111
|
+
fs.writeFileSync(path.join(outputDirectory, "figma-colors.js"), tailwindConfigString, "utf-8");
|
|
112
|
+
|
|
113
|
+
console.log(`CSS tokens and Tailwind config colors generated successfully in ${outputDirectory} folder!`);
|
|
114
|
+
} catch (e) {
|
|
115
|
+
console.error(e.message);
|
|
116
|
+
}
|
package/button/README.md
CHANGED
package/button/button.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface ButtonProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement
|
|
|
9
9
|
as?: NextLink | "a";
|
|
10
10
|
color?: ButtonColor;
|
|
11
11
|
isFullWidth?: boolean;
|
|
12
|
+
/** @deprecated use IconButton component instead */
|
|
12
13
|
isIconButton?: boolean;
|
|
13
14
|
size?: ButtonSize;
|
|
14
15
|
variant?: ButtonVariant;
|
package/button/button.stories.js
CHANGED
|
@@ -47,7 +47,7 @@ function Basic() {
|
|
|
47
47
|
"variant=",
|
|
48
48
|
variant))),
|
|
49
49
|
react_1.default.createElement("div", null),
|
|
50
|
-
config.variants.flatMap((variant) => config.sizes.map((size) => (react_1.default.createElement("div", { className: "text-center text-xs text-gray-400", key: variant },
|
|
50
|
+
config.variants.flatMap((variant) => config.sizes.map((size) => (react_1.default.createElement("div", { className: "text-center text-xs text-gray-400", key: `${variant}${size}` },
|
|
51
51
|
"size=",
|
|
52
52
|
size))))),
|
|
53
53
|
config.colors.map((color) => (react_1.default.createElement("div", { className: color === "inverted" ? "min-w-fit bg-[#1F2A37] dark:bg-white" : undefined, key: color },
|
package/components.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ import * as fileInputStories from "./file-input/file-input.stories";
|
|
|
27
27
|
import * as flashMessagesStories from "./flash-messages/flash-messages.stories";
|
|
28
28
|
import * as formComponentStories from "./form-component/form-component.stories";
|
|
29
29
|
import * as iconStories from "./icon/icon.stories";
|
|
30
|
+
import * as iconButtonStories from "./icon-button/icon-button.stories";
|
|
30
31
|
import * as imageGalleryStories from "./image-gallery/image-gallery.stories";
|
|
31
32
|
import * as inputStories from "./input/input.stories";
|
|
32
33
|
import * as labelStories from "./label/label.stories";
|
|
@@ -172,6 +173,10 @@ export declare const components: {
|
|
|
172
173
|
readonly title: "Icon";
|
|
173
174
|
readonly stories: typeof iconStories;
|
|
174
175
|
};
|
|
176
|
+
readonly "icon-button": {
|
|
177
|
+
readonly title: "IconButton";
|
|
178
|
+
readonly stories: typeof iconButtonStories;
|
|
179
|
+
};
|
|
175
180
|
readonly "image-gallery": {
|
|
176
181
|
readonly title: "ImageGallery";
|
|
177
182
|
readonly stories: typeof imageGalleryStories;
|
package/components.js
CHANGED
|
@@ -54,6 +54,7 @@ const fileInputStories = __importStar(require("./file-input/file-input.stories")
|
|
|
54
54
|
const flashMessagesStories = __importStar(require("./flash-messages/flash-messages.stories"));
|
|
55
55
|
const formComponentStories = __importStar(require("./form-component/form-component.stories"));
|
|
56
56
|
const iconStories = __importStar(require("./icon/icon.stories"));
|
|
57
|
+
const iconButtonStories = __importStar(require("./icon-button/icon-button.stories"));
|
|
57
58
|
const imageGalleryStories = __importStar(require("./image-gallery/image-gallery.stories"));
|
|
58
59
|
const inputStories = __importStar(require("./input/input.stories"));
|
|
59
60
|
const labelStories = __importStar(require("./label/label.stories"));
|
|
@@ -199,6 +200,10 @@ exports.components = {
|
|
|
199
200
|
title: "Icon",
|
|
200
201
|
stories: iconStories
|
|
201
202
|
},
|
|
203
|
+
"icon-button": {
|
|
204
|
+
title: "IconButton",
|
|
205
|
+
stories: iconButtonStories
|
|
206
|
+
},
|
|
202
207
|
"image-gallery": {
|
|
203
208
|
title: "ImageGallery",
|
|
204
209
|
stories: imageGalleryStories
|
package/css/badge.css
CHANGED
package/css/button.css
CHANGED
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
&:hover {
|
|
47
47
|
background-color: var(--uxf-button-background-color-hover);
|
|
48
|
+
color: var(--uxf-button-text-color-hover);
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
&__text {
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
width: 100%;
|
|
58
59
|
}
|
|
59
60
|
|
|
61
|
+
/* Deprecated class, replaced with .uxf-icon-button class. Should be removed, when it will be possible */
|
|
60
62
|
&--icon-button {
|
|
61
63
|
flex-shrink: 0;
|
|
62
64
|
padding: 0;
|
|
@@ -87,6 +89,7 @@
|
|
|
87
89
|
width: var(--uxf-button-loading-size);
|
|
88
90
|
}
|
|
89
91
|
|
|
92
|
+
/* Deprecated class, replaced with .uxf-icon-button class. Should be removed, when it will be possible */
|
|
90
93
|
&.uxf-button--icon-button::after {
|
|
91
94
|
margin-left: 0;
|
|
92
95
|
}
|
|
@@ -126,137 +129,151 @@
|
|
|
126
129
|
/* VARIANTS */
|
|
127
130
|
|
|
128
131
|
&--variant-default {
|
|
129
|
-
--uxf-button-text-color:
|
|
132
|
+
--uxf-button-text-color: theme("colors.base_text_inverted_high_emphasis");
|
|
133
|
+
--uxf-button-text-color-hover: theme("colors.base_text_inverted_high_emphasis");
|
|
130
134
|
|
|
131
135
|
&.uxf-button--color-default {
|
|
132
|
-
--uxf-button-background-color:
|
|
133
|
-
--uxf-button-background-color-hover:
|
|
136
|
+
--uxf-button-background-color: theme("colors.primary_surface_default");
|
|
137
|
+
--uxf-button-background-color-hover: theme("colors.primary_surface_default_hover");
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
&.uxf-button--color-positive {
|
|
137
|
-
--uxf-button-background-color:
|
|
138
|
-
--uxf-button-background-color-hover:
|
|
141
|
+
--uxf-button-background-color: theme("colors.positive_surface_default");
|
|
142
|
+
--uxf-button-background-color-hover: theme("colors.positive_surface_default_hover");
|
|
139
143
|
}
|
|
140
144
|
|
|
141
145
|
&.uxf-button--color-negative {
|
|
142
|
-
--uxf-button-background-color:
|
|
143
|
-
--uxf-button-background-color-hover:
|
|
146
|
+
--uxf-button-background-color: theme("colors.negative_surface_default");
|
|
147
|
+
--uxf-button-background-color-hover: theme("colors.negative_surface_default_hover");
|
|
144
148
|
}
|
|
145
149
|
|
|
146
150
|
&.uxf-button--color-warning {
|
|
147
|
-
--uxf-button-background-color:
|
|
148
|
-
--uxf-button-background-color-hover:
|
|
151
|
+
--uxf-button-background-color: theme("colors.warning_surface_default");
|
|
152
|
+
--uxf-button-background-color-hover: theme("colors.warning_surface_default_hover");
|
|
149
153
|
}
|
|
150
154
|
|
|
151
155
|
&.uxf-button--color-info {
|
|
152
|
-
--uxf-button-background-color:
|
|
153
|
-
--uxf-button-background-color-hover:
|
|
156
|
+
--uxf-button-background-color: theme("colors.info_surface_default");
|
|
157
|
+
--uxf-button-background-color-hover: theme("colors.info_surface_default_hover");
|
|
154
158
|
}
|
|
155
159
|
|
|
156
160
|
&.uxf-button--color-inverted {
|
|
157
|
-
--uxf-button-background-color:
|
|
158
|
-
--uxf-button-background-color-hover:
|
|
159
|
-
--uxf-button-text-color:
|
|
161
|
+
--uxf-button-background-color: theme("colors.base_surface_main");
|
|
162
|
+
--uxf-button-background-color-hover: theme("colors.base_surface_main_hover");
|
|
163
|
+
--uxf-button-text-color: theme("colors.base_text_high_emphasis");
|
|
164
|
+
--uxf-button-text-color-hover: theme("colors.base_text_high_emphasis");
|
|
160
165
|
|
|
161
166
|
&.is-disabled {
|
|
162
|
-
--uxf-button-background-color:
|
|
163
|
-
--uxf-button-text-color:
|
|
167
|
+
--uxf-button-background-color: theme("colors.base_surface_input_disabled");
|
|
168
|
+
--uxf-button-text-color: theme("colors.base_text_disabled");
|
|
164
169
|
}
|
|
165
170
|
}
|
|
166
171
|
|
|
167
172
|
&.uxf-button--is-disabled {
|
|
168
173
|
--uxf-button-text-color: theme("colors.white");
|
|
169
|
-
--uxf-button-background-color:
|
|
174
|
+
--uxf-button-background-color: theme("colors.base_surface_disabled");
|
|
170
175
|
}
|
|
171
176
|
}
|
|
172
177
|
|
|
173
178
|
&--variant-secondary {
|
|
174
|
-
--uxf-button-background-color-hover:
|
|
175
|
-
--uxf-button-background-color:
|
|
179
|
+
--uxf-button-background-color-hover: theme("colors.base_surface_main_hover");
|
|
180
|
+
--uxf-button-background-color: theme("colors.base_surface_main");
|
|
176
181
|
|
|
177
182
|
border-style: solid;
|
|
178
183
|
border-width: 1px;
|
|
179
184
|
|
|
180
185
|
&.uxf-button--color-default {
|
|
181
|
-
--uxf-button-border-color:
|
|
182
|
-
--uxf-button-text-color:
|
|
186
|
+
--uxf-button-border-color: theme("colors.base_border_input");
|
|
187
|
+
--uxf-button-text-color: theme("colors.base_text_high_emphasis");
|
|
188
|
+
--uxf-button-text-color-hover: theme("colors.base_text_high_emphasis");
|
|
183
189
|
}
|
|
184
190
|
|
|
185
191
|
&.uxf-button--color-positive {
|
|
186
|
-
--uxf-button-border-color:
|
|
187
|
-
--uxf-button-text-color:
|
|
192
|
+
--uxf-button-border-color: theme("colors.positive_border");
|
|
193
|
+
--uxf-button-text-color: theme("colors.positive_text");
|
|
194
|
+
--uxf-button-text-color-hover: theme("colors.positive_text");
|
|
188
195
|
}
|
|
189
196
|
|
|
190
197
|
&.uxf-button--color-negative {
|
|
191
|
-
--uxf-button-border-color:
|
|
192
|
-
--uxf-button-text-color:
|
|
198
|
+
--uxf-button-border-color: theme("colors.negative_border");
|
|
199
|
+
--uxf-button-text-color: theme("colors.negative_text");
|
|
200
|
+
--uxf-button-text-color-hover: theme("colors.negative_text");
|
|
193
201
|
}
|
|
194
202
|
|
|
195
203
|
&.uxf-button--color-warning {
|
|
196
|
-
--uxf-button-border-color:
|
|
197
|
-
--uxf-button-text-color:
|
|
204
|
+
--uxf-button-border-color: theme("colors.warning_border");
|
|
205
|
+
--uxf-button-text-color: theme("colors.warning_text");
|
|
206
|
+
--uxf-button-text-color-hover: theme("colors.warning_text");
|
|
198
207
|
}
|
|
199
208
|
|
|
200
209
|
&.uxf-button--color-info {
|
|
201
|
-
--uxf-button-border-color:
|
|
202
|
-
--uxf-button-text-color:
|
|
210
|
+
--uxf-button-border-color: theme("colors.info_border");
|
|
211
|
+
--uxf-button-text-color: theme("colors.info_text");
|
|
212
|
+
--uxf-button-text-color-hover: theme("colors.info_text");
|
|
203
213
|
}
|
|
204
214
|
|
|
205
215
|
&.uxf-button--color-inverted {
|
|
206
|
-
--uxf-button-border-color:
|
|
207
|
-
--uxf-button-text-color:
|
|
208
|
-
--uxf-button-
|
|
209
|
-
--uxf-button-background-color
|
|
216
|
+
--uxf-button-border-color: theme("colors.base_border_inverted_border");
|
|
217
|
+
--uxf-button-text-color: theme("colors.base_text_inverted_high_emphasis");
|
|
218
|
+
--uxf-button-text-color-hover: theme("colors.base_text_inverted_high_emphasis");
|
|
219
|
+
--uxf-button-background-color: theme("colors.base_surface_inverted_main");
|
|
220
|
+
--uxf-button-background-color-hover: theme("colors.base_surface_inverted_main_hover");
|
|
210
221
|
|
|
211
222
|
&.uxf-button--is-disabled {
|
|
212
|
-
--uxf-button-text-color:
|
|
213
|
-
--uxf-button-background-color:
|
|
223
|
+
--uxf-button-text-color: theme("colors.base_text_inverted_disabled");
|
|
224
|
+
--uxf-button-background-color: theme("colors.base_surface_inverted_main");
|
|
214
225
|
}
|
|
215
226
|
}
|
|
216
227
|
|
|
217
228
|
&.uxf-button--is-disabled {
|
|
218
|
-
--uxf-button-border-color:
|
|
219
|
-
--uxf-button-text-color:
|
|
220
|
-
--uxf-button-background-color:
|
|
229
|
+
--uxf-button-border-color: theme("colors.base_border_input");
|
|
230
|
+
--uxf-button-text-color: theme("colors.base_text_disabled");
|
|
231
|
+
--uxf-button-background-color: theme("colors.base_surface_input_disabled");
|
|
221
232
|
}
|
|
222
233
|
}
|
|
223
234
|
|
|
224
235
|
&--variant-text {
|
|
225
|
-
--uxf-button-background-color-hover:
|
|
236
|
+
--uxf-button-background-color-hover: theme("colors.base_surface_main_hover");
|
|
226
237
|
|
|
227
238
|
box-shadow: none;
|
|
228
239
|
|
|
229
240
|
&.uxf-button--color-default {
|
|
230
|
-
--uxf-button-text-color:
|
|
241
|
+
--uxf-button-text-color: theme("colors.base_text_high_emphasis");
|
|
242
|
+
--uxf-button-text-color-hover: theme("colors.base_text_high_emphasis");
|
|
231
243
|
}
|
|
232
244
|
|
|
233
245
|
&.uxf-button--color-positive {
|
|
234
|
-
--uxf-button-text-color:
|
|
246
|
+
--uxf-button-text-color: theme("colors.positive_text");
|
|
247
|
+
--uxf-button-text-color-hover: theme("colors.positive_text");
|
|
235
248
|
}
|
|
236
249
|
|
|
237
250
|
&.uxf-button--color-negative {
|
|
238
|
-
--uxf-button-text-color:
|
|
251
|
+
--uxf-button-text-color: theme("colors.negative_text");
|
|
252
|
+
--uxf-button-text-color-hover: theme("colors.negative_text");
|
|
239
253
|
}
|
|
240
254
|
|
|
241
255
|
&.uxf-button--color-warning {
|
|
242
|
-
--uxf-button-text-color:
|
|
256
|
+
--uxf-button-text-color: theme("colors.warning_text");
|
|
257
|
+
--uxf-button-text-color-hover: theme("colors.warning_text");
|
|
243
258
|
}
|
|
244
259
|
|
|
245
260
|
&.uxf-button--color-info {
|
|
246
|
-
--uxf-button-text-color:
|
|
261
|
+
--uxf-button-text-color: theme("colors.info_text");
|
|
262
|
+
--uxf-button-text-color-hover: theme("colors.info_text");
|
|
247
263
|
}
|
|
248
264
|
|
|
249
265
|
&.uxf-button--color-inverted {
|
|
250
|
-
--uxf-button-text-color:
|
|
251
|
-
--uxf-button-
|
|
266
|
+
--uxf-button-text-color: theme("colors.base_text_inverted_high_emphasis");
|
|
267
|
+
--uxf-button-text-color-hover: theme("colors.base_text_inverted_high_emphasis");
|
|
268
|
+
--uxf-button-background-color-hover: theme("colors.base_surface_inverted_main_hover");
|
|
252
269
|
|
|
253
270
|
&.uxf-button--is-disabled {
|
|
254
|
-
--uxf-button-text-color:
|
|
271
|
+
--uxf-button-text-color: theme("colors.base_text_inverted_disabled");
|
|
255
272
|
}
|
|
256
273
|
}
|
|
257
274
|
|
|
258
275
|
&.uxf-button--is-disabled {
|
|
259
|
-
--uxf-button-text-color:
|
|
276
|
+
--uxf-button-text-color: theme("colors.base_text_disabled");
|
|
260
277
|
}
|
|
261
278
|
}
|
|
262
279
|
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/* Color tokens */
|
|
2
|
+
:root {
|
|
3
|
+
/* Dark */
|
|
4
|
+
/* color */
|
|
5
|
+
--base-border-border: hsl(0 0 100% / 0.12);
|
|
6
|
+
--base-border-input: hsl(0 0 100% / 0.2);
|
|
7
|
+
--base-border-inverted-border: hsl(218 28% 17% / 0.12);
|
|
8
|
+
--base-border-inverted-input: hsl(218 28% 17% / 0.2);
|
|
9
|
+
--base-icon-disabled: hsl(0 0 100% / 0.5);
|
|
10
|
+
--base-icon-high-emphasis: var(--base-white);
|
|
11
|
+
--base-icon-low-emphasis: hsl(0 0 100% / 0.75);
|
|
12
|
+
--base-icon-medium-emphasis: hsl(0 0 100% / 0.75);
|
|
13
|
+
--base-icon-inverted-low-emphasis: var(--grayneutral-900);
|
|
14
|
+
--base-icon-inverted-disabled: var(--grayneutral-900);
|
|
15
|
+
--base-icon-inverted-high-emphasis: var(--grayneutral-900);
|
|
16
|
+
--base-shadow-shadow-md: hsl(0 0 100% / 0);
|
|
17
|
+
--base-shadow-shadow-sm: hsl(0 0 100% / 0);
|
|
18
|
+
--base-surface-background: var(--grayneutral-800);
|
|
19
|
+
--base-surface-disabled: hsl(0 0 100% / 0.2);
|
|
20
|
+
--base-surface-input: var(--grayneutral-900);
|
|
21
|
+
--base-surface-input-disabled: var(--grayneutral-600);
|
|
22
|
+
--base-surface-input-hover: var(--grayneutral-800);
|
|
23
|
+
--base-surface-main: var(--grayneutral-900);
|
|
24
|
+
--base-surface-main-hover: var(--grayneutral-800);
|
|
25
|
+
--base-surface-popup: var(--grayneutral-800);
|
|
26
|
+
--base-surface-tooltip: var(--grayneutral-50);
|
|
27
|
+
--base-surface-inverted-default: hsl(218 28% 17%);
|
|
28
|
+
--base-surface-inverted-default-hover: hsl(218 28% 17% / 0.9);
|
|
29
|
+
--base-surface-inverted-disabled: var(--grayneutral-500);
|
|
30
|
+
--base-surface-inverted-main: hsl(218 28% 17% / 0.08);
|
|
31
|
+
--base-surface-inverted-main-hover: hsl(218 28% 17% / 0.16);
|
|
32
|
+
--base-text-disabled: hsl(0 0 100% / 0.6);
|
|
33
|
+
--base-text-high-emphasis: hsl(0 0 100%);
|
|
34
|
+
--base-text-link: var(--base-white);
|
|
35
|
+
--base-text-link-pressed: var(--base-white);
|
|
36
|
+
--base-text-low-emphasis: hsl(0 0 100% / 0.8);
|
|
37
|
+
--base-text-inverted-disabled: hsl(218 28% 17% / 0.7);
|
|
38
|
+
--base-text-inverted-high-emphasis: var(--grayneutral-900);
|
|
39
|
+
--base-text-inverted-link: var(--grayneutral-900);
|
|
40
|
+
--base-text-inverted-low-emphasis: hsl(218 28% 17% / 0.8);
|
|
41
|
+
--brand-border: var(--bluedark-600);
|
|
42
|
+
--brand-icon: var(--bluedark-400);
|
|
43
|
+
--brand-icon-on-muted: var(--bluedark-300);
|
|
44
|
+
--brand-text: var(--base-white);
|
|
45
|
+
--brand-text-on-muted: var(--bluedark-200);
|
|
46
|
+
--brand-surface-bolder: var(--bluedark-200);
|
|
47
|
+
--brand-surface-bolder-hover: var(--bluedark-100);
|
|
48
|
+
--brand-surface-default: var(--bluedark-400);
|
|
49
|
+
--brand-surface-default-hover: var(--bluedark-300);
|
|
50
|
+
--brand-surface-muted: var(--bluedark-800);
|
|
51
|
+
--brand-surface-muted-hover: var(--bluedark-700);
|
|
52
|
+
--brand-surface-subtle: var(--bluedark-900);
|
|
53
|
+
--brand-surface-subtle-hover: var(--bluedark-800);
|
|
54
|
+
--info-border: var(--grayblue-600);
|
|
55
|
+
--info-icon: var(--grayblue-300);
|
|
56
|
+
--info-icon-on-muted: var(--grayblue-300);
|
|
57
|
+
--info-text: var(--grayblue-300);
|
|
58
|
+
--info-text-on-muted: var(--grayblue-200);
|
|
59
|
+
--info-surface-default: var(--grayblue-300);
|
|
60
|
+
--info-surface-default-hover: var(--grayblue-200);
|
|
61
|
+
--info-surface-muted: var(--grayblue-800);
|
|
62
|
+
--info-surface-muted-hover: var(--grayblue-700);
|
|
63
|
+
--info-surface-subtle: var(--grayblue-900);
|
|
64
|
+
--info-surface-subtle-hover: var(--grayblue-800);
|
|
65
|
+
--inverted-border: hsl(0 0 100%);
|
|
66
|
+
--inverted-icon: hsl(0 0 100%);
|
|
67
|
+
--inverted-icon-on-muted: hsl(0 0 100%);
|
|
68
|
+
--inverted-text-default: hsl(0 0 100%);
|
|
69
|
+
--inverted-text-disabled: hsl(0 0 100%);
|
|
70
|
+
--inverted-text-muted: hsl(0 0 100%);
|
|
71
|
+
--inverted-text-on-muted: hsl(0 0 100%);
|
|
72
|
+
--negative-border: var(--error-600);
|
|
73
|
+
--negative-icon: var(--error-400);
|
|
74
|
+
--negative-icon-on-muted: var(--error-200);
|
|
75
|
+
--negative-text: var(--error-300);
|
|
76
|
+
--negative-text-on-muted: var(--error-200);
|
|
77
|
+
--negative-surface-default: var(--error-400);
|
|
78
|
+
--negative-surface-default-hover: var(--error-300);
|
|
79
|
+
--negative-surface-muted: var(--error-800);
|
|
80
|
+
--negative-surface-muted-hover: var(--error-700);
|
|
81
|
+
--negative-surface-subtle: var(--error-900);
|
|
82
|
+
--negative-surface-subtle-hover: var(--error-800);
|
|
83
|
+
--neutral-border: var(--grayneutral-600);
|
|
84
|
+
--neutral-icon: var(--grayneutral-400);
|
|
85
|
+
--neutral-icon-on-muted: var(--grayneutral-200);
|
|
86
|
+
--neutral-text: var(--grayneutral-300);
|
|
87
|
+
--neutral-text-on-muted: var(--grayneutral-200);
|
|
88
|
+
--neutral-surface-bolder: hsl(0 0 100%);
|
|
89
|
+
--neutral-surface-bolder-hover: hsl(0 0 100%);
|
|
90
|
+
--neutral-surface-default: var(--grayneutral-400);
|
|
91
|
+
--neutral-surface-default-hover: var(--grayneutral-300);
|
|
92
|
+
--neutral-surface-muted: var(--grayneutral-700);
|
|
93
|
+
--neutral-surface-muted-hover: var(--grayneutral-600);
|
|
94
|
+
--neutral-surface-subtle: var(--grayneutral-800);
|
|
95
|
+
--neutral-surface-subtle-hover: var(--grayneutral-700);
|
|
96
|
+
--positive-border: var(--success-600);
|
|
97
|
+
--positive-icon: var(--success-400);
|
|
98
|
+
--positive-icon-on-muted: var(--success-300);
|
|
99
|
+
--positive-text: var(--success-300);
|
|
100
|
+
--positive-text-on-muted: var(--success-200);
|
|
101
|
+
--positive-surface-default: var(--green-400);
|
|
102
|
+
--positive-surface-default-hover: var(--green-300);
|
|
103
|
+
--positive-surface-muted: var(--green-800);
|
|
104
|
+
--positive-surface-muted-hover: var(--green-700);
|
|
105
|
+
--positive-surface-subtle: var(--green-900);
|
|
106
|
+
--positive-surface-subtle-hover: var(--green-800);
|
|
107
|
+
--warning-border: var(--warning-600);
|
|
108
|
+
--warning-icon: var(--warning-400);
|
|
109
|
+
--warning-icon-on-muted: var(--warning-300);
|
|
110
|
+
--warning-text: var(--warning-300);
|
|
111
|
+
--warning-text-on-muted: var(--warning-200);
|
|
112
|
+
--warning-surface-default: var(--warning-400);
|
|
113
|
+
--warning-surface-default-hover: var(--warning-300);
|
|
114
|
+
--warning-surface-muted: var(--warning-800);
|
|
115
|
+
--warning-surface-muted-hover: var(--warning-700);
|
|
116
|
+
--warning-surface-subtle: var(--warning-900);
|
|
117
|
+
--warning-surface-subtle-hover: var(--warning-800);
|
|
118
|
+
}
|