@rovula/ui 0.0.29 → 0.0.31
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/cjs/bundle.css +139 -69
- package/dist/cjs/bundle.js +3 -3
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/Dropdown/Dropdown.d.ts +12 -0
- package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +18 -0
- package/dist/cjs/types/components/InputFilter/InputFilter.d.ts +64 -0
- package/dist/cjs/types/components/InputFilter/InputFilter.stories.d.ts +370 -0
- package/dist/cjs/types/components/InputFilter/InputFilter.styles.d.ts +8 -0
- package/dist/cjs/types/components/Search/Search.d.ts +2 -20
- package/dist/cjs/types/components/Search/Search.stories.d.ts +26 -38
- package/dist/cjs/types/components/TextInput/TextInput.d.ts +10 -0
- package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +10 -0
- package/dist/cjs/types/components/TextInput/TextInput.styles.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/components/ActionButton/ActionButton.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/DatePicker/DatePicker.js +2 -1
- package/dist/components/Dropdown/Dropdown.js +34 -19
- package/dist/components/Dropdown/Dropdown.stories.js +1 -0
- package/dist/components/Dropdown/Dropdown.styles.js +1 -1
- package/dist/components/InputFilter/InputFilter.js +124 -0
- package/dist/components/InputFilter/InputFilter.stories.js +34 -0
- package/dist/components/InputFilter/InputFilter.styles.js +65 -0
- package/dist/components/RadioGroup/RadioGroup.js +5 -2
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/Search/Search.js +1 -1
- package/dist/components/Search/Search.stories.js +2 -1
- package/dist/components/TextInput/TextInput.js +23 -6
- package/dist/components/TextInput/TextInput.styles.js +94 -20
- package/dist/esm/bundle.css +139 -69
- package/dist/esm/bundle.js +3 -3
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/Dropdown/Dropdown.d.ts +12 -0
- package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +18 -0
- package/dist/esm/types/components/InputFilter/InputFilter.d.ts +64 -0
- package/dist/esm/types/components/InputFilter/InputFilter.stories.d.ts +370 -0
- package/dist/esm/types/components/InputFilter/InputFilter.styles.d.ts +8 -0
- package/dist/esm/types/components/Search/Search.d.ts +2 -20
- package/dist/esm/types/components/Search/Search.stories.d.ts +26 -38
- package/dist/esm/types/components/TextInput/TextInput.d.ts +10 -0
- package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +10 -0
- package/dist/esm/types/components/TextInput/TextInput.styles.d.ts +1 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/index.d.ts +82 -16
- package/dist/index.js +1 -0
- package/dist/src/theme/global.css +278 -161
- package/dist/theme/presets/colors.js +21 -0
- package/dist/theme/themes/xspector/color.css +13 -0
- package/dist/theme/themes/xspector/components/action-button.css +44 -42
- package/dist/theme/themes/xspector/state.css +1 -1
- package/dist/theme/tokens/color.css +13 -0
- package/dist/theme/tokens/components/action-button.css +42 -42
- package/package.json +1 -1
- package/src/components/ActionButton/ActionButton.stories.tsx +1 -1
- package/src/components/Checkbox/Checkbox.stories.tsx +1 -1
- package/src/components/Checkbox/Checkbox.tsx +4 -4
- package/src/components/DatePicker/DatePicker.tsx +4 -2
- package/src/components/Dropdown/Dropdown.stories.tsx +1 -0
- package/src/components/Dropdown/Dropdown.styles.ts +1 -1
- package/src/components/Dropdown/Dropdown.tsx +69 -38
- package/src/components/InputFilter/InputFilter.stories.tsx +72 -0
- package/src/components/InputFilter/InputFilter.styles.ts +74 -0
- package/src/components/InputFilter/InputFilter.tsx +314 -0
- package/src/components/RadioGroup/RadioGroup.stories.tsx +1 -1
- package/src/components/RadioGroup/RadioGroup.tsx +7 -9
- package/src/components/Search/Search.stories.tsx +3 -2
- package/src/components/Search/Search.tsx +13 -2
- package/src/components/TextInput/TextInput.styles.ts +94 -20
- package/src/components/TextInput/TextInput.tsx +53 -11
- package/src/index.ts +1 -0
- package/src/theme/presets/colors.js +21 -0
- package/src/theme/themes/xspector/color.css +13 -0
- package/src/theme/themes/xspector/components/action-button.css +44 -42
- package/src/theme/themes/xspector/state.css +1 -1
- package/src/theme/tokens/color.css +13 -0
- package/src/theme/tokens/components/action-button.css +42 -42
|
@@ -2,6 +2,7 @@ import { cva } from "class-variance-authority";
|
|
|
2
2
|
|
|
3
3
|
export const inputVariant = cva(
|
|
4
4
|
[
|
|
5
|
+
"truncate",
|
|
5
6
|
"border-0 outline-none",
|
|
6
7
|
"p-1 flex w-auto box-border",
|
|
7
8
|
"peer text-input-filled-text placeholder:text-transparent bg-transparent caret-primary",
|
|
@@ -76,47 +77,47 @@ export const inputVariant = cva(
|
|
|
76
77
|
{
|
|
77
78
|
hasSearchIcon: true,
|
|
78
79
|
size: "sm",
|
|
79
|
-
class: "ps-6",
|
|
80
|
+
class: "!ps-6",
|
|
80
81
|
},
|
|
81
82
|
{
|
|
82
83
|
hasSearchIcon: true,
|
|
83
84
|
size: "md",
|
|
84
|
-
class: "ps-9",
|
|
85
|
+
class: "!ps-9",
|
|
85
86
|
},
|
|
86
87
|
{
|
|
87
88
|
hasSearchIcon: true,
|
|
88
89
|
size: "lg",
|
|
89
|
-
class: "ps-11",
|
|
90
|
+
class: "!ps-11",
|
|
90
91
|
},
|
|
91
92
|
{
|
|
92
93
|
leftSectionIcon: true,
|
|
93
94
|
size: "sm",
|
|
94
|
-
class: "ps-[38px]",
|
|
95
|
+
class: "!ps-[38px]",
|
|
95
96
|
},
|
|
96
97
|
{
|
|
97
98
|
leftSectionIcon: true,
|
|
98
99
|
size: "md",
|
|
99
|
-
class: "ps-[46px]",
|
|
100
|
+
class: "!ps-[46px]",
|
|
100
101
|
},
|
|
101
102
|
{
|
|
102
103
|
leftSectionIcon: true,
|
|
103
104
|
size: "lg",
|
|
104
|
-
class: "ps-[72px]",
|
|
105
|
+
class: "!ps-[72px]",
|
|
105
106
|
},
|
|
106
107
|
{
|
|
107
108
|
rightSectionIcon: true,
|
|
108
109
|
size: "sm",
|
|
109
|
-
class: "pe-[38px]",
|
|
110
|
+
class: "!pe-[38px]",
|
|
110
111
|
},
|
|
111
112
|
{
|
|
112
113
|
rightSectionIcon: true,
|
|
113
114
|
size: "md",
|
|
114
|
-
class: "pe-[46px]",
|
|
115
|
+
class: "!pe-[46px]",
|
|
115
116
|
},
|
|
116
117
|
{
|
|
117
118
|
rightSectionIcon: true,
|
|
118
119
|
size: "lg",
|
|
119
|
-
class: "pe-[72px]",
|
|
120
|
+
class: "!pe-[72px]",
|
|
120
121
|
},
|
|
121
122
|
],
|
|
122
123
|
defaultVariants: {
|
|
@@ -142,34 +143,78 @@ export const labelVariant = cva(
|
|
|
142
143
|
{
|
|
143
144
|
variants: {
|
|
144
145
|
size: {
|
|
145
|
-
sm: [
|
|
146
|
+
sm: [],
|
|
147
|
+
md: [],
|
|
148
|
+
lg: [],
|
|
149
|
+
},
|
|
150
|
+
disabled: {
|
|
151
|
+
true: "text-input-default-text placeholder:text-input-default-text",
|
|
152
|
+
},
|
|
153
|
+
error: {
|
|
154
|
+
true: "ring-error",
|
|
155
|
+
},
|
|
156
|
+
hasSearchIcon: {
|
|
157
|
+
false: "",
|
|
158
|
+
},
|
|
159
|
+
isFloatingLabel: {
|
|
160
|
+
false: "hidden peer-placeholder-shown:block peer-focus:bg-transparent",
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
compoundVariants: [
|
|
164
|
+
// floating = true
|
|
165
|
+
{
|
|
166
|
+
isFloatingLabel: true,
|
|
167
|
+
size: "sm",
|
|
168
|
+
className: [
|
|
146
169
|
"left-3 -top-1.5 typography-label2 bg-input-label-bg",
|
|
147
170
|
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1 peer-placeholder-shown:bg-transparent",
|
|
148
171
|
"peer-focus:-top-1.5 peer-focus:typography-label2",
|
|
149
172
|
],
|
|
150
|
-
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
isFloatingLabel: true,
|
|
176
|
+
size: "md",
|
|
177
|
+
className: [
|
|
151
178
|
"left-3 -top-1.5 typography-label1 bg-input-label-bg",
|
|
152
179
|
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitile4 peer-placeholder-shown:bg-transparent",
|
|
153
180
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
154
181
|
],
|
|
155
|
-
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
isFloatingLabel: true,
|
|
185
|
+
size: "lg",
|
|
186
|
+
className: [
|
|
156
187
|
"left-4 -top-1.5 typography-label1 bg-input-label-bg",
|
|
157
188
|
"peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitile1 peer-placeholder-shown:bg-transparent",
|
|
158
189
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
159
190
|
],
|
|
160
191
|
},
|
|
161
|
-
|
|
162
|
-
|
|
192
|
+
// --------------
|
|
193
|
+
// flating = false
|
|
194
|
+
{
|
|
195
|
+
isFloatingLabel: false,
|
|
196
|
+
size: "sm",
|
|
197
|
+
className: [
|
|
198
|
+
"left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1",
|
|
199
|
+
],
|
|
163
200
|
},
|
|
164
|
-
|
|
165
|
-
|
|
201
|
+
{
|
|
202
|
+
isFloatingLabel: false,
|
|
203
|
+
size: "md",
|
|
204
|
+
className: [
|
|
205
|
+
"left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitile4",
|
|
206
|
+
],
|
|
166
207
|
},
|
|
167
|
-
|
|
168
|
-
|
|
208
|
+
{
|
|
209
|
+
isFloatingLabel: false,
|
|
210
|
+
size: "lg",
|
|
211
|
+
className: [
|
|
212
|
+
"left-4 peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitile1",
|
|
213
|
+
],
|
|
169
214
|
},
|
|
170
|
-
|
|
171
|
-
compoundVariants: [
|
|
215
|
+
// --------------
|
|
172
216
|
{
|
|
217
|
+
isFloatingLabel: true,
|
|
173
218
|
hasSearchIcon: true,
|
|
174
219
|
size: "sm",
|
|
175
220
|
className: [
|
|
@@ -179,6 +224,7 @@ export const labelVariant = cva(
|
|
|
179
224
|
],
|
|
180
225
|
},
|
|
181
226
|
{
|
|
227
|
+
isFloatingLabel: true,
|
|
182
228
|
hasSearchIcon: true,
|
|
183
229
|
size: "md",
|
|
184
230
|
className: [
|
|
@@ -188,6 +234,7 @@ export const labelVariant = cva(
|
|
|
188
234
|
],
|
|
189
235
|
},
|
|
190
236
|
{
|
|
237
|
+
isFloatingLabel: true,
|
|
191
238
|
hasSearchIcon: true,
|
|
192
239
|
size: "lg",
|
|
193
240
|
className: [
|
|
@@ -196,12 +243,38 @@ export const labelVariant = cva(
|
|
|
196
243
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
197
244
|
],
|
|
198
245
|
},
|
|
246
|
+
// floating = false and has search icon
|
|
247
|
+
{
|
|
248
|
+
isFloatingLabel: false,
|
|
249
|
+
hasSearchIcon: true,
|
|
250
|
+
size: "sm",
|
|
251
|
+
className: [
|
|
252
|
+
"left-6 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-small1",
|
|
253
|
+
],
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
isFloatingLabel: false,
|
|
257
|
+
hasSearchIcon: true,
|
|
258
|
+
size: "md",
|
|
259
|
+
className: [
|
|
260
|
+
"left-9 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitile4",
|
|
261
|
+
],
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
isFloatingLabel: false,
|
|
265
|
+
hasSearchIcon: true,
|
|
266
|
+
size: "lg",
|
|
267
|
+
className: [
|
|
268
|
+
"left-11 peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitile1",
|
|
269
|
+
],
|
|
270
|
+
},
|
|
199
271
|
],
|
|
200
272
|
defaultVariants: {
|
|
201
273
|
size: "md",
|
|
202
274
|
disabled: false,
|
|
203
275
|
error: false,
|
|
204
276
|
hasSearchIcon: false,
|
|
277
|
+
isFloatingLabel: true,
|
|
205
278
|
},
|
|
206
279
|
}
|
|
207
280
|
);
|
|
@@ -285,6 +358,7 @@ export const iconVariant = cva(
|
|
|
285
358
|
|
|
286
359
|
export const sectionIconWrapperVariant = cva(
|
|
287
360
|
[
|
|
361
|
+
"cursor-pointer",
|
|
288
362
|
"absolute items-center justify-center flex",
|
|
289
363
|
"border-l border-l-input-default-stroke peer-hover:border-l-input-active-stroke peer-focus:border-l-input-active-stroke peer-disabled:border-l-input-disable-stroke",
|
|
290
364
|
"fill-input-default-text peer-hover:fill-input-filled-text peer-focus:fill-input-filled-text peer-disabled:fill-input-disable-stroke",
|
|
@@ -2,6 +2,7 @@ import React, {
|
|
|
2
2
|
FC,
|
|
3
3
|
ReactNode,
|
|
4
4
|
forwardRef,
|
|
5
|
+
useCallback,
|
|
5
6
|
useImperativeHandle,
|
|
6
7
|
useRef,
|
|
7
8
|
} from "react";
|
|
@@ -34,12 +35,17 @@ export type InputProps = {
|
|
|
34
35
|
disabled?: boolean;
|
|
35
36
|
error?: boolean;
|
|
36
37
|
required?: boolean;
|
|
38
|
+
isFloatingLabel?: boolean;
|
|
39
|
+
keepCloseIconOnValue?: boolean;
|
|
37
40
|
hasClearIcon?: boolean;
|
|
38
41
|
hasSearchIcon?: boolean;
|
|
39
42
|
startIcon?: ReactNode;
|
|
40
43
|
endIcon?: ReactNode;
|
|
41
44
|
className?: string;
|
|
42
45
|
labelClassName?: string;
|
|
46
|
+
onClickStartIcon?: () => void;
|
|
47
|
+
onClickEndIcon?: () => void;
|
|
48
|
+
renderEndIcon?: () => ReactNode;
|
|
43
49
|
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">;
|
|
44
50
|
|
|
45
51
|
export const TextInput = forwardRef<HTMLInputElement, InputProps>(
|
|
@@ -57,11 +63,15 @@ export const TextInput = forwardRef<HTMLInputElement, InputProps>(
|
|
|
57
63
|
disabled = false,
|
|
58
64
|
error = false,
|
|
59
65
|
required = true,
|
|
66
|
+
isFloatingLabel = true,
|
|
67
|
+
keepCloseIconOnValue = false,
|
|
60
68
|
hasClearIcon = true,
|
|
61
69
|
hasSearchIcon = false,
|
|
62
70
|
startIcon,
|
|
63
71
|
endIcon,
|
|
64
72
|
labelClassName,
|
|
73
|
+
onClickEndIcon,
|
|
74
|
+
renderEndIcon,
|
|
65
75
|
...props
|
|
66
76
|
},
|
|
67
77
|
ref
|
|
@@ -87,6 +97,7 @@ export const TextInput = forwardRef<HTMLInputElement, InputProps>(
|
|
|
87
97
|
disabled,
|
|
88
98
|
error,
|
|
89
99
|
hasSearchIcon,
|
|
100
|
+
isFloatingLabel,
|
|
90
101
|
});
|
|
91
102
|
const helperTextClassname = helperTextVariant({ size, error, disabled });
|
|
92
103
|
const iconWrapperClassname = iconWrapperVariant({ size });
|
|
@@ -101,11 +112,26 @@ export const TextInput = forwardRef<HTMLInputElement, InputProps>(
|
|
|
101
112
|
|
|
102
113
|
useImperativeHandle(ref, () => inputRef?.current as HTMLInputElement);
|
|
103
114
|
|
|
104
|
-
const handleClearInput = () => {
|
|
115
|
+
const handleClearInput = useCallback(() => {
|
|
105
116
|
if (inputRef.current) {
|
|
106
117
|
inputRef.current.value = "";
|
|
118
|
+
|
|
119
|
+
if (props.onChange) {
|
|
120
|
+
const event = new Event("input", { bubbles: true });
|
|
121
|
+
props.onChange({ target: { value: "" } } as any);
|
|
122
|
+
}
|
|
107
123
|
}
|
|
108
|
-
};
|
|
124
|
+
}, [props.onChange]);
|
|
125
|
+
|
|
126
|
+
// TODO startIcon
|
|
127
|
+
const handleOnClickRightSectionIcon = useCallback(() => {
|
|
128
|
+
if (disabled) return;
|
|
129
|
+
|
|
130
|
+
onClickEndIcon?.();
|
|
131
|
+
if (inputRef.current) {
|
|
132
|
+
inputRef.current.focus();
|
|
133
|
+
}
|
|
134
|
+
}, [disabled, onClickEndIcon]);
|
|
109
135
|
|
|
110
136
|
return (
|
|
111
137
|
<div className={`inline-flex flex-col ${fullwidth ? "w-full" : ""}`}>
|
|
@@ -125,7 +151,13 @@ export const TextInput = forwardRef<HTMLInputElement, InputProps>(
|
|
|
125
151
|
className={cn(inputClassname, props.className)}
|
|
126
152
|
/>
|
|
127
153
|
{hasClearIcon && !hasRightSectionIcon && (
|
|
128
|
-
<div
|
|
154
|
+
<div
|
|
155
|
+
className={iconWrapperClassname}
|
|
156
|
+
style={{
|
|
157
|
+
display:
|
|
158
|
+
keepCloseIconOnValue && props.value ? "flex" : undefined,
|
|
159
|
+
}}
|
|
160
|
+
>
|
|
129
161
|
<XCircleIcon
|
|
130
162
|
type="button"
|
|
131
163
|
className={iconClassname}
|
|
@@ -133,9 +165,17 @@ export const TextInput = forwardRef<HTMLInputElement, InputProps>(
|
|
|
133
165
|
/>
|
|
134
166
|
</div>
|
|
135
167
|
)}
|
|
136
|
-
{hasRightSectionIcon &&
|
|
137
|
-
|
|
138
|
-
|
|
168
|
+
{hasRightSectionIcon &&
|
|
169
|
+
(renderEndIcon ? (
|
|
170
|
+
renderEndIcon()
|
|
171
|
+
) : (
|
|
172
|
+
<div
|
|
173
|
+
className={endIconWrapperClassname}
|
|
174
|
+
onClick={handleOnClickRightSectionIcon}
|
|
175
|
+
>
|
|
176
|
+
{endIcon}
|
|
177
|
+
</div>
|
|
178
|
+
))}
|
|
139
179
|
|
|
140
180
|
<label htmlFor={_id} className={cn(labelClassname, labelClassName)}>
|
|
141
181
|
{label}{" "}
|
|
@@ -152,11 +192,13 @@ export const TextInput = forwardRef<HTMLInputElement, InputProps>(
|
|
|
152
192
|
</div>
|
|
153
193
|
{(errorMessage || helperText) && (
|
|
154
194
|
<span className={helperTextClassname}>
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
195
|
+
<span className="h-full">
|
|
196
|
+
<ExclamationCircleIcon
|
|
197
|
+
width={16}
|
|
198
|
+
height={16}
|
|
199
|
+
className={error ? "fill-error" : ""}
|
|
200
|
+
/>
|
|
201
|
+
</span>
|
|
160
202
|
{errorMessage || helperText}
|
|
161
203
|
</span>
|
|
162
204
|
)}
|
package/src/index.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from "./components/DataTable/DataTable";
|
|
|
30
30
|
export * from "./components/Dialog/Dialog";
|
|
31
31
|
export * from "./components/AlertDialog/AlertDialog";
|
|
32
32
|
export * from "./components/Search/Search";
|
|
33
|
+
export * from "./components/InputFilter/InputFilter";
|
|
33
34
|
export * from "./components/Slider/Slider";
|
|
34
35
|
export * from "./components/Switch/Switch";
|
|
35
36
|
export * from "./components/DropdownMenu/DropdownMenu";
|
|
@@ -71,6 +71,27 @@ module.exports = {
|
|
|
71
71
|
"input-label-bg": withColorMixin("--input-color-label-bg"),
|
|
72
72
|
"input-error": withColorMixin("--input-color-error"),
|
|
73
73
|
|
|
74
|
+
"function-default-solid": withColorMixin("--function-default-solid"),
|
|
75
|
+
"function-default-hover": withColorMixin("--function-default-hover"),
|
|
76
|
+
"function-default-hover-bg": withColorMixin(
|
|
77
|
+
"--function-default-hover-bg"
|
|
78
|
+
),
|
|
79
|
+
"function-default-hover-bg": withColorMixin(
|
|
80
|
+
"--function-default-hover-bg"
|
|
81
|
+
),
|
|
82
|
+
"function-default-stroke": withColorMixin("--function-default-stroke"),
|
|
83
|
+
"function-default-icon": withColorMixin("--function-default-icon"),
|
|
84
|
+
"function-default-outline": withColorMixin(
|
|
85
|
+
"--function-default-outline-icon"
|
|
86
|
+
),
|
|
87
|
+
"function-active-solid": withColorMixin("--function-active-solid"),
|
|
88
|
+
"function-active-hover": withColorMixin("--function-active-hover"),
|
|
89
|
+
"function-active-hover-bg": withColorMixin(
|
|
90
|
+
"--function-active-hover-bg"
|
|
91
|
+
),
|
|
92
|
+
"function-active-stroke": withColorMixin("--function-active-stroke"),
|
|
93
|
+
"function-active-icon": withColorMixin("--function-active-icon"),
|
|
94
|
+
|
|
74
95
|
"base-bg": withColorMixin("--base-color-bg"),
|
|
75
96
|
"base-bg2": withColorMixin("--base-color-bg2"),
|
|
76
97
|
"base-bg3": withColorMixin("--base-color-bg3"),
|
|
@@ -11,6 +11,19 @@
|
|
|
11
11
|
--input-color-label-bg: #2d2e30;
|
|
12
12
|
--input-color-error: #ff4d35;
|
|
13
13
|
|
|
14
|
+
/* Function button */
|
|
15
|
+
--function-default-solid: #ececec;
|
|
16
|
+
--function-default-hover: #fafafa;
|
|
17
|
+
--function-default-hover-bg: rgba(250 250 250 / 0.08);
|
|
18
|
+
--function-default-stroke: rgba(158 158 158 / 0.24);
|
|
19
|
+
--function-default-icon: #212b36;
|
|
20
|
+
--function-default-outline-icon: #9e9e9e;
|
|
21
|
+
--function-active-solid: #b1a400;
|
|
22
|
+
--function-active-hover: #ddcd00;
|
|
23
|
+
--function-active-hover-bg: rgba(221 205 0 / 0.08);
|
|
24
|
+
--function-active-stroke: rgba(177 164 0 / 0.48);
|
|
25
|
+
--function-active-icon: #212b36;
|
|
26
|
+
|
|
14
27
|
--text-dark: #212b36;
|
|
15
28
|
--text-medium: #637381;
|
|
16
29
|
--text-light: #919eab;
|
|
@@ -12,34 +12,34 @@
|
|
|
12
12
|
/* ------------------------------------------------------------------ */
|
|
13
13
|
|
|
14
14
|
/* Default State */
|
|
15
|
-
--action-button-solid-default-bg: var(--
|
|
16
|
-
--action-button-solid-default-border: var(--
|
|
17
|
-
--action-button-solid-default-text: var(--
|
|
15
|
+
--action-button-solid-default-bg: var(--function-default-solid);
|
|
16
|
+
--action-button-solid-default-border: var(--function-default-solid);
|
|
17
|
+
--action-button-solid-default-text: var(--function-default-icon);
|
|
18
18
|
|
|
19
19
|
/* Hover State */
|
|
20
|
-
--action-button-solid-hover-bg: var(--
|
|
21
|
-
--action-button-solid-hover-border: var(--
|
|
22
|
-
--action-button-solid-hover-text: var(--
|
|
20
|
+
--action-button-solid-hover-bg: var(--function-default-hover);
|
|
21
|
+
--action-button-solid-hover-border: var(--function-default-hover);
|
|
22
|
+
--action-button-solid-hover-text: var(--function-default-icon);
|
|
23
23
|
|
|
24
24
|
/* Pressed State */
|
|
25
|
-
--action-button-solid-pressed-bg: var(--
|
|
26
|
-
--action-button-solid-pressed-border: var(--
|
|
27
|
-
--action-button-solid-pressed-text: var(--
|
|
25
|
+
--action-button-solid-pressed-bg: var(--function-default-solid);
|
|
26
|
+
--action-button-solid-pressed-border: var(--function-default-solid);
|
|
27
|
+
--action-button-solid-pressed-text: var(--function-default-icon);
|
|
28
28
|
|
|
29
29
|
/* Active State */
|
|
30
|
-
--action-button-solid-active-bg: var(--
|
|
31
|
-
--action-button-solid-active-border: var(--
|
|
32
|
-
--action-button-solid-active-text: var(--
|
|
30
|
+
--action-button-solid-active-bg: var(--function-active-solid);
|
|
31
|
+
--action-button-solid-active-border: var(--function-active-solid);
|
|
32
|
+
--action-button-solid-active-text: var(--function-active-icon);
|
|
33
33
|
|
|
34
34
|
/* Active Hover State */
|
|
35
|
-
--action-button-solid-active-hover-bg: var(--
|
|
36
|
-
--action-button-solid-active-hover-border: var(--
|
|
37
|
-
--action-button-solid-active-hover-text: var(--
|
|
35
|
+
--action-button-solid-active-hover-bg: var(--function-active-hover);
|
|
36
|
+
--action-button-solid-active-hover-border: var(--function-active-hover);
|
|
37
|
+
--action-button-solid-active-hover-text: var(--function-active-icon);
|
|
38
38
|
|
|
39
39
|
/* Active Pressed State */
|
|
40
|
-
--action-button-solid-active-pressed-bg: var(--
|
|
41
|
-
--action-button-solid-active-pressed-border: var(--
|
|
42
|
-
--action-button-solid-active-pressed-text: var(--
|
|
40
|
+
--action-button-solid-active-pressed-bg: var(--function-active-solid);
|
|
41
|
+
--action-button-solid-active-pressed-border: var(--function-active-solid);
|
|
42
|
+
--action-button-solid-active-pressed-text: var(--function-active-icon);
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
/* ------------------------------------------------------------------ */
|
|
@@ -47,52 +47,54 @@
|
|
|
47
47
|
/* ------------------------------------------------------------------ */
|
|
48
48
|
|
|
49
49
|
/* Default State */
|
|
50
|
-
--action-button-outline-default-border: var(--
|
|
51
|
-
--action-button-outline-default-text: var(--
|
|
50
|
+
--action-button-outline-default-border: var(--function-default-stroke);
|
|
51
|
+
--action-button-outline-default-text: var(--function-default-outline-icon);
|
|
52
52
|
|
|
53
53
|
/* Hover State */
|
|
54
|
-
--action-button-outline-hover-bg:
|
|
55
|
-
--action-button-outline-hover-border: var(--
|
|
56
|
-
--action-button-outline-hover-text: var(--
|
|
54
|
+
--action-button-outline-hover-bg: var(--function-default-hover-bg);
|
|
55
|
+
--action-button-outline-hover-border: var(--function-default-hover);
|
|
56
|
+
--action-button-outline-hover-text: var(--function-default-hover);
|
|
57
57
|
|
|
58
58
|
/* Pressed State */
|
|
59
|
-
--action-button-outline-pressed-bg: var(--
|
|
60
|
-
--action-button-outline-pressed-border: var(--
|
|
61
|
-
--action-button-outline-pressed-text: var(--
|
|
59
|
+
--action-button-outline-pressed-bg: var(--function-default-hover-bg);
|
|
60
|
+
--action-button-outline-pressed-border: var(--function-default-stroke);
|
|
61
|
+
--action-button-outline-pressed-text: var(--function-default-outline-icon);
|
|
62
62
|
|
|
63
63
|
/* Active State */
|
|
64
|
-
--action-button-outline-active-border: var(--
|
|
65
|
-
--action-button-outline-active-text: var(--
|
|
64
|
+
--action-button-outline-active-border: var(--function-active-stroke);
|
|
65
|
+
--action-button-outline-active-text: var(--function-active-solid);
|
|
66
66
|
|
|
67
67
|
/* Active Hover State */
|
|
68
|
-
--action-button-outline-active-hover-bg: var(--
|
|
69
|
-
--action-button-outline-active-hover-border: var(--
|
|
70
|
-
--action-button-outline-active-hover-text: var(--
|
|
68
|
+
--action-button-outline-active-hover-bg: var(--function-active-hover-bg);;
|
|
69
|
+
--action-button-outline-active-hover-border: var(--function-active-hover);
|
|
70
|
+
--action-button-outline-active-hover-text: var(--function-active-hover);
|
|
71
71
|
|
|
72
72
|
/* Active Pressed State */
|
|
73
|
-
--action-button-outline-active-pressed-bg: var(--
|
|
74
|
-
--action-button-outline-active-pressed-border: var(--
|
|
75
|
-
--action-button-outline-active-pressed-text: var(--
|
|
73
|
+
--action-button-outline-active-pressed-bg: var(--function-active-hover-bg);;
|
|
74
|
+
--action-button-outline-active-pressed-border: var(--function-active-stroke);
|
|
75
|
+
--action-button-outline-active-pressed-text: var(--function-active-solid);
|
|
76
76
|
|
|
77
77
|
/* ------------------------------------------------------------------ */
|
|
78
78
|
/* Icon Mode Tokens */
|
|
79
79
|
/* ------------------------------------------------------------------ */
|
|
80
80
|
|
|
81
81
|
/* Default State */
|
|
82
|
-
--action-button-icon-default-text: var(--
|
|
82
|
+
--action-button-icon-default-text: var(--function-default-outline-icon);
|
|
83
83
|
|
|
84
84
|
/* Hover State */
|
|
85
|
-
--action-button-icon-hover-bg: var(--
|
|
86
|
-
--action-button-icon-hover-text: var(--
|
|
85
|
+
--action-button-icon-hover-bg: var(--function-default-hover-bg);
|
|
86
|
+
--action-button-icon-hover-text: var(--function-default-hover);
|
|
87
87
|
|
|
88
88
|
/* Pressed State */
|
|
89
|
-
--action-button-icon-pressed-text: var(--
|
|
89
|
+
--action-button-icon-pressed-text: var(--function-default-outline-icon);
|
|
90
90
|
|
|
91
91
|
/* Active State */
|
|
92
|
-
--action-button-icon-active-text: var(--
|
|
92
|
+
--action-button-icon-active-text: var(--function-active-solid);
|
|
93
93
|
|
|
94
94
|
/* Active Hover State */
|
|
95
|
-
--action-button-icon-active-hover-bg:
|
|
96
|
-
--action-button-icon-active-hover-text: var(--
|
|
97
|
-
|
|
95
|
+
--action-button-icon-active-hover-bg: var(--function-active-hover-bg);
|
|
96
|
+
--action-button-icon-active-hover-text: var(--function-active-hover);
|
|
97
|
+
|
|
98
|
+
/* Active Pressed State */
|
|
99
|
+
--action-button-icon-active-pressed-text: var(--function-active-solid);
|
|
98
100
|
}
|
|
@@ -11,6 +11,19 @@
|
|
|
11
11
|
--input-color-label-bg: #ffffff;/* #2d2e30; */
|
|
12
12
|
--input-color-error: #ed2f15;
|
|
13
13
|
|
|
14
|
+
/* Function button */
|
|
15
|
+
--function-default-solid: #1e3249;
|
|
16
|
+
--function-default-hover: #35475b;
|
|
17
|
+
--function-default-hover-bg: rgba(30 50 73 / 0.08);
|
|
18
|
+
--function-default-stroke: rgba(30 50 73 / 0.48);
|
|
19
|
+
--function-default-icon: #ffffff;
|
|
20
|
+
--function-default-outline-icon: #1e3249;
|
|
21
|
+
--function-active-solid: #9b8f00;
|
|
22
|
+
--function-active-hover: #b1a400;
|
|
23
|
+
--function-active-hover-bg: rgba(221 205 0 / 0.08);
|
|
24
|
+
--function-active-stroke: rgba(177 164 0 / 0.48);
|
|
25
|
+
--function-active-icon: #ffffff;
|
|
26
|
+
|
|
14
27
|
--text-dark: #18283a;
|
|
15
28
|
--text-medium: #4b5b6d;
|
|
16
29
|
--text-light: #8e98a4;
|