@rovula/ui 0.1.4 → 0.1.6
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 +57 -15
- package/dist/cjs/bundle.js +5 -5
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/Text/Text.d.ts +25 -1
- package/dist/cjs/types/components/Text/Text.stories.d.ts +1 -1
- package/dist/cjs/types/utils/colors.d.ts +1 -1
- package/dist/components/Avatar/Avatar.styles.js +2 -2
- package/dist/components/Button/Buttons.stories.js +1 -1
- package/dist/components/Calendar/Calendar.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +2 -2
- package/dist/components/DropdownMenu/DropdownMenu.js +4 -4
- package/dist/components/Footer/Footer.js +1 -1
- package/dist/components/Input/Input.styles.js +2 -2
- package/dist/components/InputFilter/InputFilter.js +2 -2
- package/dist/components/Label/Label.styles.js +4 -4
- package/dist/components/Menu/Menu.js +2 -2
- package/dist/components/Navbar/Navbar.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +2 -2
- package/dist/components/PasswordInput/PasswordInput.stories.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Text/Text.js +11 -1
- package/dist/components/Text/Text.stories.js +6 -6
- package/dist/components/TextArea/TextArea.styles.js +6 -6
- package/dist/components/TextInput/TextInput.stories.js +1 -1
- package/dist/components/TextInput/TextInput.styles.js +22 -22
- package/dist/components/Toast/Toast.js +2 -2
- package/dist/esm/bundle.css +57 -15
- package/dist/esm/bundle.js +5 -5
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/Text/Text.d.ts +25 -1
- package/dist/esm/types/components/Text/Text.stories.d.ts +1 -1
- package/dist/esm/types/utils/colors.d.ts +1 -1
- package/dist/index.d.ts +26 -2
- package/dist/src/theme/global.css +169 -103
- package/dist/utils/colors.js +1 -1
- package/package.json +1 -1
- package/src/components/Avatar/Avatar.styles.ts +2 -2
- package/src/components/Button/Buttons.stories.tsx +2 -2
- package/src/components/Calendar/Calendar.tsx +1 -1
- package/src/components/Dropdown/Dropdown.tsx +2 -2
- package/src/components/DropdownMenu/DropdownMenu.tsx +6 -6
- package/src/components/Footer/Footer.tsx +1 -1
- package/src/components/Input/Input.styles.tsx +2 -2
- package/src/components/InputFilter/InputFilter.tsx +2 -2
- package/src/components/Label/Label.styles.ts +4 -4
- package/src/components/Menu/Menu.tsx +2 -2
- package/src/components/Navbar/Navbar.tsx +1 -1
- package/src/components/PasswordInput/PasswordInput.stories.tsx +1 -1
- package/src/components/PasswordInput/PasswordInput.tsx +2 -2
- package/src/components/Tabs/Tabs.tsx +1 -1
- package/src/components/Text/Text.stories.tsx +6 -6
- package/src/components/Text/Text.tsx +36 -1
- package/src/components/TextArea/TextArea.styles.ts +6 -6
- package/src/components/TextInput/TextInput.stories.tsx +3 -1
- package/src/components/TextInput/TextInput.styles.ts +31 -34
- package/src/components/Toast/Toast.tsx +2 -2
- package/src/theme/THEME_MAPPING.md +5 -5
- package/src/theme/global.css +1 -1
- package/src/theme/main-preset.js +49 -0
- package/src/theme/plugins/utilities/typography.js +40 -6
- package/src/theme/presets/colors.js +1 -1
- package/src/theme/themes/skyller/color.css +1 -1
- package/src/theme/themes/skyller/state.css +11 -11
- package/src/theme/themes/variable.css +78 -63
- package/src/theme/themes/xspector/color.css +1 -1
- package/src/theme/themes/xspector/state.css +11 -11
- package/src/theme/tokens/color.css +1 -1
- package/src/utils/colors.ts +1 -1
|
@@ -28,7 +28,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
|
|
|
28
28
|
ref={ref}
|
|
29
29
|
className={cn(
|
|
30
30
|
// "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-primary data-[state=open]:bg-primary",
|
|
31
|
-
"relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-4 typography-
|
|
31
|
+
"relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-4 typography-subtitle4 outline-none transition-colors data-[disabled]:pointer-events-none",
|
|
32
32
|
"bg-[var(--dropdown-menu-default-bg)] text-[var(--dropdown-menu-default-text)]",
|
|
33
33
|
"active:opacity-75",
|
|
34
34
|
"focus:!bg-[var(--dropdown-menu-hover-bg)] focus:!text-[var(--dropdown-menu-hover-text)]",
|
|
@@ -96,7 +96,7 @@ const DropdownMenuItem = React.forwardRef<
|
|
|
96
96
|
<DropdownMenuPrimitive.Item
|
|
97
97
|
ref={ref}
|
|
98
98
|
className={cn(
|
|
99
|
-
"relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-xxl typography-
|
|
99
|
+
"relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-xxl typography-subtitle4 outline-none transition-colors data-[disabled]:pointer-events-none",
|
|
100
100
|
"bg-[var(--dropdown-menu-default-bg)] text-[var(--dropdown-menu-default-text)]",
|
|
101
101
|
"active:opacity-75",
|
|
102
102
|
"focus:!bg-[var(--dropdown-menu-hover-bg)] focus:!text-[var(--dropdown-menu-hover-text)]",
|
|
@@ -116,11 +116,11 @@ const DropdownMenuCheckboxItem = React.forwardRef<
|
|
|
116
116
|
<DropdownMenuPrimitive.CheckboxItem
|
|
117
117
|
ref={ref}
|
|
118
118
|
className={cn(
|
|
119
|
-
"relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-xxl typography-
|
|
119
|
+
"relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-xxl typography-subtitle4 outline-none transition-colors data-[disabled]:pointer-events-none",
|
|
120
120
|
"bg-[var(--dropdown-menu-default-bg)] text-[var(--dropdown-menu-default-text)]",
|
|
121
121
|
"active:opacity-75",
|
|
122
122
|
"focus:!bg-[var(--dropdown-menu-hover-bg)] focus:!text-[var(--dropdown-menu-hover-text)]",
|
|
123
|
-
"data-[state='checked']:bg-[var(--dropdown-menu-selected-bg)] data-[state='checked']:text-[var(--dropdown-menu-selected-text)] data-[state='checked']:typography-
|
|
123
|
+
"data-[state='checked']:bg-[var(--dropdown-menu-selected-bg)] data-[state='checked']:text-[var(--dropdown-menu-selected-text)] data-[state='checked']:typography-subtitle5",
|
|
124
124
|
"data-[disabled]:!bg-[var(--dropdown-menu-disabled-bg)] data-[disabled]:!text-[var(--dropdown-menu-disabled-text)]",
|
|
125
125
|
className
|
|
126
126
|
)}
|
|
@@ -145,11 +145,11 @@ const DropdownMenuRadioItem = React.forwardRef<
|
|
|
145
145
|
<DropdownMenuPrimitive.RadioItem
|
|
146
146
|
ref={ref}
|
|
147
147
|
className={cn(
|
|
148
|
-
"relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-xxl typography-
|
|
148
|
+
"relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-xxl typography-subtitle4 outline-none transition-colors data-[disabled]:pointer-events-none",
|
|
149
149
|
"bg-[var(--dropdown-menu-default-bg)] text-[var(--dropdown-menu-default-text)]",
|
|
150
150
|
"active:opacity-75",
|
|
151
151
|
"focus:!bg-[var(--dropdown-menu-hover-bg)] focus:!text-[var(--dropdown-menu-hover-text)]",
|
|
152
|
-
"data-[state='checked']:bg-[var(--dropdown-menu-selected-bg)] data-[state='checked']:text-[var(--dropdown-menu-selected-text)] data-[state='checked']:typography-
|
|
152
|
+
"data-[state='checked']:bg-[var(--dropdown-menu-selected-bg)] data-[state='checked']:text-[var(--dropdown-menu-selected-text)] data-[state='checked']:typography-subtitle5",
|
|
153
153
|
"data-[disabled]:!bg-[var(--dropdown-menu-disabled-bg)] data-[disabled]:!text-[var(--dropdown-menu-disabled-text)]",
|
|
154
154
|
className
|
|
155
155
|
)}
|
|
@@ -46,7 +46,7 @@ const Footer: FC<FooterProps> = ({
|
|
|
46
46
|
return (
|
|
47
47
|
<footer
|
|
48
48
|
className={cn(
|
|
49
|
-
"relative w-full px-4 py-6 box-border overflow-hidden typography-
|
|
49
|
+
"relative w-full px-4 py-6 box-border overflow-hidden typography-subtitle2 border-solid border-t-2 text-[var(--footer-text-color)] border-t-[var(--footer-border-color)]",
|
|
50
50
|
isSimple ? "h-[var(--footer-height-simple)]" : "h-[var(--footer-height)]",
|
|
51
51
|
{ position },
|
|
52
52
|
className
|
|
@@ -10,8 +10,8 @@ export const inputVariants = cva(
|
|
|
10
10
|
variants: {
|
|
11
11
|
size: {
|
|
12
12
|
sm: "p-2 px-3 typography-small1",
|
|
13
|
-
md: "py-2 px-3 typography-
|
|
14
|
-
lg: "p-4 typography-
|
|
13
|
+
md: "py-2 px-3 typography-subtitle4",
|
|
14
|
+
lg: "p-4 typography-subtitle1",
|
|
15
15
|
},
|
|
16
16
|
rounded: {
|
|
17
17
|
none: "rounded-none",
|
|
@@ -179,7 +179,7 @@ const InputFilter = forwardRef<HTMLInputElement, InputFilterProps>(
|
|
|
179
179
|
value: option.value,
|
|
180
180
|
label: option.label,
|
|
181
181
|
handleOnClick: () => handleOptionClick(option),
|
|
182
|
-
className: `p-4 typography-
|
|
182
|
+
className: `p-4 typography-subtitle4 hover:bg-gray-100 cursor-pointer flex items-center gap-3 ${selectedOptions.some(
|
|
183
183
|
(selected) => selected.value === option.value
|
|
184
184
|
)
|
|
185
185
|
? "bg-gray-200"
|
|
@@ -193,7 +193,7 @@ const InputFilter = forwardRef<HTMLInputElement, InputFilterProps>(
|
|
|
193
193
|
<li
|
|
194
194
|
key={option.value}
|
|
195
195
|
onMouseDown={() => handleOptionClick(option)}
|
|
196
|
-
className={`p-4 typography-
|
|
196
|
+
className={`p-4 typography-subtitle4 hover:bg-primary-hover-bg cursor-pointer flex items-center gap-3 ${selectedOptions.some(
|
|
197
197
|
(selected) => selected.value === option.value
|
|
198
198
|
)
|
|
199
199
|
? "bg-base-popup-highlight"
|
|
@@ -8,8 +8,8 @@ export const labelVariant = cva(
|
|
|
8
8
|
variants: {
|
|
9
9
|
size: {
|
|
10
10
|
sm: "typography-small1",
|
|
11
|
-
md: "typography-
|
|
12
|
-
lg: "typography-
|
|
11
|
+
md: "typography-subtitle2",
|
|
12
|
+
lg: "typography-subtitle1",
|
|
13
13
|
},
|
|
14
14
|
disabled: {
|
|
15
15
|
true: "text-input-text-disabled ring-input-stroke-disabled placeholder:text-input-text-disabled peer-disabled:cursor-not-allowed",
|
|
@@ -37,7 +37,7 @@ export const labelVariant = cva(
|
|
|
37
37
|
isFloatable: true,
|
|
38
38
|
className: [
|
|
39
39
|
"left-3 -top-1.5 typography-label1 bg-input-label-background",
|
|
40
|
-
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-
|
|
40
|
+
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent",
|
|
41
41
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
42
42
|
],
|
|
43
43
|
},
|
|
@@ -46,7 +46,7 @@ export const labelVariant = cva(
|
|
|
46
46
|
isFloatable: true,
|
|
47
47
|
className: [
|
|
48
48
|
"left-4 -top-1.5 typography-label1 bg-input-label-background",
|
|
49
|
-
"peer-placeholder-shown:top-4 peer-placeholder-shown:typography-
|
|
49
|
+
"peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent",
|
|
50
50
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
51
51
|
],
|
|
52
52
|
},
|
|
@@ -159,12 +159,12 @@ export const MenuItem = forwardRef<HTMLDivElement, MenuItemProps>(
|
|
|
159
159
|
<div
|
|
160
160
|
ref={ref}
|
|
161
161
|
className={cn(
|
|
162
|
-
"relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-4 typography-
|
|
162
|
+
"relative flex gap-3 cursor-pointer select-none box-border items-center py-4 pl-9 pr-4 typography-subtitle4 outline-none transition-colors",
|
|
163
163
|
"bg-[var(--dropdown-menu-default-bg)] text-[var(--dropdown-menu-default-text)]",
|
|
164
164
|
"active:opacity-75",
|
|
165
165
|
"hover:bg-[var(--dropdown-menu-hover-bg)] hover:text-[var(--dropdown-menu-hover-text)]",
|
|
166
166
|
{
|
|
167
|
-
"bg-[var(--dropdown-menu-selected-bg)] text-[var(--dropdown-menu-selected-text)] typography-
|
|
167
|
+
"bg-[var(--dropdown-menu-selected-bg)] text-[var(--dropdown-menu-selected-text)] typography-subtitle5":
|
|
168
168
|
isChecked,
|
|
169
169
|
"pointer-events-none opacity-50": option.disabled,
|
|
170
170
|
"text-red-500": option.danger,
|
|
@@ -57,7 +57,7 @@ const Navbar: FC<NavbarProps> = ({
|
|
|
57
57
|
return (
|
|
58
58
|
<header
|
|
59
59
|
className={cn(
|
|
60
|
-
"relative w-full px-4 py-6 h-[var(--navbar-height)] box-border overflow-hidden typography-
|
|
60
|
+
"relative w-full px-4 py-6 h-[var(--navbar-height)] box-border overflow-hidden typography-subtitle2 border-solid border-b-2 text-[rgb(var(--navbar-text-color))] border-b-[rgb(var(--navbar-border-color))] transition-shadow duration-200",
|
|
61
61
|
{ position },
|
|
62
62
|
scrollShadow && isScrolled && "shadow-[var(--navbar-shadow-scrolled)]",
|
|
63
63
|
className
|
|
@@ -26,8 +26,8 @@ export const PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>(
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const toggleIcon = visible
|
|
29
|
-
? showIcon ?? <Icon name="eye" type="lucide" size="inherit" className="size-full
|
|
30
|
-
: hideIcon ?? <Icon name="eye-closed" type="lucide" size="inherit" className="size-full
|
|
29
|
+
? showIcon ?? <Icon name="eye" type="lucide" size="inherit" className="size-full" aria-label="Hide password" />
|
|
30
|
+
: hideIcon ?? <Icon name="eye-closed" type="lucide" size="inherit" className="size-full" aria-label="Show password" />;
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
33
|
<TextInput
|
|
@@ -184,7 +184,7 @@ const Tabs: React.FC<TabsProps> = ({
|
|
|
184
184
|
disabled={disabled || tab.disabled}
|
|
185
185
|
id={`tab-${index}`}
|
|
186
186
|
className={cn(
|
|
187
|
-
"flex justify-center flex-row items-center py-3 cursor-pointer transition-colors duration-300 box-border gap-1 flex-shrink-0 typography-
|
|
187
|
+
"flex justify-center flex-row items-center py-3 cursor-pointer transition-colors duration-300 box-border gap-1 flex-shrink-0 typography-subtitle6",
|
|
188
188
|
{
|
|
189
189
|
"text-foreground": index === activeTab,
|
|
190
190
|
"text-text-grey-medium hover:text-text-grey-dark active:text-text-dark":
|
|
@@ -30,12 +30,12 @@ const variant: any = [
|
|
|
30
30
|
"h4",
|
|
31
31
|
"h5",
|
|
32
32
|
"h6",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
33
|
+
"subtitle1",
|
|
34
|
+
"subtitle2",
|
|
35
|
+
"subtitle3",
|
|
36
|
+
"subtitle4",
|
|
37
|
+
"subtitle5",
|
|
38
|
+
"subtitle6",
|
|
39
39
|
"body1",
|
|
40
40
|
"body2",
|
|
41
41
|
"body3",
|
|
@@ -10,11 +10,35 @@ export type TextProps = {
|
|
|
10
10
|
| "h4"
|
|
11
11
|
| "h5"
|
|
12
12
|
| "h6"
|
|
13
|
+
| "subtitle1"
|
|
14
|
+
| "subtitle2"
|
|
15
|
+
| "subtitle3"
|
|
16
|
+
| "subtitle4"
|
|
17
|
+
| "subtitle5"
|
|
18
|
+
| "subtitle6"
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Use subtitle1 instead.
|
|
21
|
+
*/
|
|
13
22
|
| "subtitile1"
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Use subtitle2 instead.
|
|
25
|
+
*/
|
|
14
26
|
| "subtitile2"
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use subtitle3 instead.
|
|
29
|
+
*/
|
|
15
30
|
| "subtitile3"
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use subtitle4 instead.
|
|
33
|
+
*/
|
|
16
34
|
| "subtitile4"
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Use subtitle5 instead.
|
|
37
|
+
*/
|
|
17
38
|
| "subtitile5"
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use subtitle6 instead.
|
|
41
|
+
*/
|
|
18
42
|
| "subtitile6"
|
|
19
43
|
| "body1"
|
|
20
44
|
| "body2"
|
|
@@ -62,6 +86,15 @@ const textVariants = cva(["text-foreground"], {
|
|
|
62
86
|
},
|
|
63
87
|
});
|
|
64
88
|
|
|
89
|
+
const deprecatedSubtitleVariantMap: Record<string, string> = {
|
|
90
|
+
subtitile1: "subtitle1",
|
|
91
|
+
subtitile2: "subtitle2",
|
|
92
|
+
subtitile3: "subtitle3",
|
|
93
|
+
subtitile4: "subtitle4",
|
|
94
|
+
subtitile5: "subtitle5",
|
|
95
|
+
subtitile6: "subtitle6",
|
|
96
|
+
};
|
|
97
|
+
|
|
65
98
|
// montserrat: ["Montserrat", "sans-serif"],
|
|
66
99
|
// poppins: ["Poppins", "sans-serif"], font-montserrat, font-poppins
|
|
67
100
|
// TODO font, fontBold, elipt
|
|
@@ -78,11 +111,13 @@ const Text = forwardRef<React.ElementRef<React.ElementType>, TextProps>(
|
|
|
78
111
|
},
|
|
79
112
|
ref
|
|
80
113
|
) => {
|
|
114
|
+
const normalizedVariant = deprecatedSubtitleVariantMap[variant] ?? variant;
|
|
115
|
+
|
|
81
116
|
return (
|
|
82
117
|
<Tag
|
|
83
118
|
ref={ref}
|
|
84
119
|
className={cn(
|
|
85
|
-
`typography-${
|
|
120
|
+
`typography-${normalizedVariant}`,
|
|
86
121
|
textVariants({ color }),
|
|
87
122
|
className
|
|
88
123
|
)}
|
|
@@ -9,8 +9,8 @@ export const textareaVariant = cva(
|
|
|
9
9
|
variants: {
|
|
10
10
|
size: {
|
|
11
11
|
sm: "p-2 px-3 typography-small1",
|
|
12
|
-
md: "py-2 px-3 typography-
|
|
13
|
-
lg: "p-4 typography-
|
|
12
|
+
md: "py-2 px-3 typography-subtitle4",
|
|
13
|
+
lg: "p-4 typography-subtitle1",
|
|
14
14
|
},
|
|
15
15
|
rounded: {
|
|
16
16
|
none: "rounded-none",
|
|
@@ -120,7 +120,7 @@ export const labelVariant = cva(
|
|
|
120
120
|
size: "md",
|
|
121
121
|
className: [
|
|
122
122
|
"left-3 -top-1.5 typography-label1 bg-input-label-bg",
|
|
123
|
-
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-
|
|
123
|
+
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent",
|
|
124
124
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
125
125
|
],
|
|
126
126
|
},
|
|
@@ -129,7 +129,7 @@ export const labelVariant = cva(
|
|
|
129
129
|
size: "lg",
|
|
130
130
|
className: [
|
|
131
131
|
"left-4 -top-1.5 typography-label1 bg-input-label-bg",
|
|
132
|
-
"peer-placeholder-shown:top-4 peer-placeholder-shown:typography-
|
|
132
|
+
"peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent",
|
|
133
133
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
134
134
|
],
|
|
135
135
|
},
|
|
@@ -146,14 +146,14 @@ export const labelVariant = cva(
|
|
|
146
146
|
isFloatingLabel: false,
|
|
147
147
|
size: "md",
|
|
148
148
|
className: [
|
|
149
|
-
"left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-
|
|
149
|
+
"left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4",
|
|
150
150
|
],
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
isFloatingLabel: false,
|
|
154
154
|
size: "lg",
|
|
155
155
|
className: [
|
|
156
|
-
"left-4 peer-placeholder-shown:top-4 peer-placeholder-shown:typography-
|
|
156
|
+
"left-4 peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1",
|
|
157
157
|
],
|
|
158
158
|
},
|
|
159
159
|
],
|
|
@@ -226,7 +226,7 @@ const KeepFooterSpaceDemo = () => {
|
|
|
226
226
|
/>
|
|
227
227
|
Show error message
|
|
228
228
|
</label>
|
|
229
|
-
<div className="flex flex-col">
|
|
229
|
+
<div className="flex flex-col gap-4">
|
|
230
230
|
<div>
|
|
231
231
|
<h4 className="text-sm font-medium mb-2 text-text-grey-dark">
|
|
232
232
|
With keepFooterSpace (layout stays stable)
|
|
@@ -235,6 +235,7 @@ const KeepFooterSpaceDemo = () => {
|
|
|
235
235
|
id="with-keep"
|
|
236
236
|
label="Email"
|
|
237
237
|
keepFooterSpace
|
|
238
|
+
size="lg"
|
|
238
239
|
error={hasError}
|
|
239
240
|
errorMessage={hasError ? "Please enter a valid email address" : undefined}
|
|
240
241
|
/>
|
|
@@ -246,6 +247,7 @@ const KeepFooterSpaceDemo = () => {
|
|
|
246
247
|
<TextInput
|
|
247
248
|
id="no-keep"
|
|
248
249
|
label="Email"
|
|
250
|
+
size="lg"
|
|
249
251
|
error={hasError}
|
|
250
252
|
errorMessage={hasError ? "Please enter a valid email address" : undefined}
|
|
251
253
|
/>
|
|
@@ -11,8 +11,8 @@ export const inputVariant = cva(
|
|
|
11
11
|
variants: {
|
|
12
12
|
size: {
|
|
13
13
|
sm: "p-2 px-3 typography-small1",
|
|
14
|
-
md: "py-2 px-3 typography-
|
|
15
|
-
lg: "p-4 typography-
|
|
14
|
+
md: "py-2 px-3 typography-subtitle4",
|
|
15
|
+
lg: "p-4 typography-subtitle1",
|
|
16
16
|
},
|
|
17
17
|
rounded: {
|
|
18
18
|
none: "rounded-none",
|
|
@@ -140,7 +140,7 @@ export const inputVariant = cva(
|
|
|
140
140
|
|
|
141
141
|
export const labelVariant = cva(
|
|
142
142
|
[
|
|
143
|
-
"absolute block duration-450 transition-all px-[2px] text-input-default-text",
|
|
143
|
+
"absolute block select-none duration-450 transition-all px-[2px] text-input-default-text",
|
|
144
144
|
"peer-focus:text-input-default-text peer-focus:bg-input-label-bg", // TODO bg
|
|
145
145
|
],
|
|
146
146
|
{
|
|
@@ -182,7 +182,7 @@ export const labelVariant = cva(
|
|
|
182
182
|
size: "md",
|
|
183
183
|
className: [
|
|
184
184
|
"left-3 -top-1.5 typography-label1 bg-input-label-bg",
|
|
185
|
-
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-
|
|
185
|
+
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent",
|
|
186
186
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
187
187
|
],
|
|
188
188
|
},
|
|
@@ -191,7 +191,7 @@ export const labelVariant = cva(
|
|
|
191
191
|
size: "lg",
|
|
192
192
|
className: [
|
|
193
193
|
"left-4 -top-1.5 typography-label1 bg-input-label-bg",
|
|
194
|
-
"peer-placeholder-shown:top-4 peer-placeholder-shown:typography-
|
|
194
|
+
"peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent",
|
|
195
195
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
196
196
|
],
|
|
197
197
|
},
|
|
@@ -208,14 +208,14 @@ export const labelVariant = cva(
|
|
|
208
208
|
isFloatingLabel: false,
|
|
209
209
|
size: "md",
|
|
210
210
|
className: [
|
|
211
|
-
"left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-
|
|
211
|
+
"left-3 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4",
|
|
212
212
|
],
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
215
|
isFloatingLabel: false,
|
|
216
216
|
size: "lg",
|
|
217
217
|
className: [
|
|
218
|
-
"left-4 peer-placeholder-shown:top-4 peer-placeholder-shown:typography-
|
|
218
|
+
"left-4 peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1",
|
|
219
219
|
],
|
|
220
220
|
},
|
|
221
221
|
// --------------
|
|
@@ -235,7 +235,7 @@ export const labelVariant = cva(
|
|
|
235
235
|
size: "md",
|
|
236
236
|
className: [
|
|
237
237
|
"left-9 -top-1.5 typography-label1 bg-input-label-bg",
|
|
238
|
-
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-
|
|
238
|
+
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent",
|
|
239
239
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
240
240
|
],
|
|
241
241
|
},
|
|
@@ -245,7 +245,7 @@ export const labelVariant = cva(
|
|
|
245
245
|
size: "lg",
|
|
246
246
|
className: [
|
|
247
247
|
"left-11 -top-1.5 typography-label1 bg-input-label-bg",
|
|
248
|
-
"peer-placeholder-shown:top-4 peer-placeholder-shown:typography-
|
|
248
|
+
"peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent",
|
|
249
249
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
250
250
|
],
|
|
251
251
|
},
|
|
@@ -263,7 +263,7 @@ export const labelVariant = cva(
|
|
|
263
263
|
hasSearchIcon: true,
|
|
264
264
|
size: "md",
|
|
265
265
|
className: [
|
|
266
|
-
"left-9 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-
|
|
266
|
+
"left-9 peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4",
|
|
267
267
|
],
|
|
268
268
|
},
|
|
269
269
|
{
|
|
@@ -271,7 +271,7 @@ export const labelVariant = cva(
|
|
|
271
271
|
hasSearchIcon: true,
|
|
272
272
|
size: "lg",
|
|
273
273
|
className: [
|
|
274
|
-
"left-11 peer-placeholder-shown:top-4 peer-placeholder-shown:typography-
|
|
274
|
+
"left-11 peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1",
|
|
275
275
|
],
|
|
276
276
|
},
|
|
277
277
|
|
|
@@ -292,7 +292,7 @@ export const labelVariant = cva(
|
|
|
292
292
|
size: "md",
|
|
293
293
|
className: [
|
|
294
294
|
"left-[46px] -top-1.5 typography-label1 bg-input-label-bg",
|
|
295
|
-
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-
|
|
295
|
+
"peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4 peer-placeholder-shown:bg-transparent",
|
|
296
296
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
297
297
|
],
|
|
298
298
|
},
|
|
@@ -302,7 +302,7 @@ export const labelVariant = cva(
|
|
|
302
302
|
size: "lg",
|
|
303
303
|
className: [
|
|
304
304
|
"left-[72px] -top-1.5 typography-label1 bg-input-label-bg",
|
|
305
|
-
"peer-placeholder-shown:top-4 peer-placeholder-shown:typography-
|
|
305
|
+
"peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1 peer-placeholder-shown:bg-transparent",
|
|
306
306
|
"peer-focus:-top-1.5 peer-focus:typography-label1",
|
|
307
307
|
],
|
|
308
308
|
},
|
|
@@ -320,7 +320,7 @@ export const labelVariant = cva(
|
|
|
320
320
|
hasLeftSectionIcon: true,
|
|
321
321
|
size: "md",
|
|
322
322
|
className: [
|
|
323
|
-
"left-[46px] peer-placeholder-shown:top-2 peer-placeholder-shown:typography-
|
|
323
|
+
"left-[46px] peer-placeholder-shown:top-2 peer-placeholder-shown:typography-subtitle4",
|
|
324
324
|
],
|
|
325
325
|
},
|
|
326
326
|
{
|
|
@@ -328,7 +328,7 @@ export const labelVariant = cva(
|
|
|
328
328
|
hasLeftSectionIcon: true,
|
|
329
329
|
size: "lg",
|
|
330
330
|
className: [
|
|
331
|
-
"left-[72px] peer-placeholder-shown:top-4 peer-placeholder-shown:typography-
|
|
331
|
+
"left-[72px] peer-placeholder-shown:top-4 peer-placeholder-shown:typography-subtitle1",
|
|
332
332
|
],
|
|
333
333
|
},
|
|
334
334
|
],
|
|
@@ -349,8 +349,8 @@ export const helperTextVariant = cva(
|
|
|
349
349
|
variants: {
|
|
350
350
|
size: {
|
|
351
351
|
sm: "mt-1",
|
|
352
|
-
md: "mt-
|
|
353
|
-
lg: "mt-
|
|
352
|
+
md: "mt-1",
|
|
353
|
+
lg: "mt-1",
|
|
354
354
|
},
|
|
355
355
|
disabled: {
|
|
356
356
|
true: "text-input-disable-text",
|
|
@@ -374,10 +374,10 @@ export const helperTextVariant = cva(
|
|
|
374
374
|
|
|
375
375
|
const iconInteractiveColorStateClasses = [
|
|
376
376
|
"fill-input-default-text",
|
|
377
|
-
"peer-hover:fill-input-filled-text peer-focus:fill-input-filled-text peer-active:fill-input-filled-text",
|
|
377
|
+
"hover:fill-input-filled-text peer-hover:fill-input-filled-text peer-focus:fill-input-filled-text peer-active:fill-input-filled-text",
|
|
378
378
|
"peer-disabled:fill-input-disable-stroke",
|
|
379
379
|
"[&_svg]:text-input-default-text",
|
|
380
|
-
"peer-hover:[&_svg]:text-input-filled-text peer-focus:[&_svg]:text-input-filled-text peer-active:[&_svg]:text-input-filled-text",
|
|
380
|
+
"hover:[&_svg]:text-input-filled-text peer-hover:[&_svg]:text-input-filled-text peer-focus:[&_svg]:text-input-filled-text peer-active:[&_svg]:text-input-filled-text",
|
|
381
381
|
"peer-disabled:[&_svg]:text-input-disable-stroke",
|
|
382
382
|
];
|
|
383
383
|
|
|
@@ -419,21 +419,18 @@ export const inlineStartIconWrapperVariant = cva(
|
|
|
419
419
|
},
|
|
420
420
|
);
|
|
421
421
|
|
|
422
|
-
export const iconActionVariant = cva(
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
md: "size-4",
|
|
429
|
-
lg: "size-5",
|
|
430
|
-
},
|
|
431
|
-
},
|
|
432
|
-
defaultVariants: {
|
|
433
|
-
size: "md",
|
|
422
|
+
export const iconActionVariant = cva(["cursor-pointer z-50 select-none"], {
|
|
423
|
+
variants: {
|
|
424
|
+
size: {
|
|
425
|
+
sm: "size-3",
|
|
426
|
+
md: "size-4",
|
|
427
|
+
lg: "size-5",
|
|
434
428
|
},
|
|
435
429
|
},
|
|
436
|
-
|
|
430
|
+
defaultVariants: {
|
|
431
|
+
size: "md",
|
|
432
|
+
},
|
|
433
|
+
});
|
|
437
434
|
|
|
438
435
|
export const segmentedIconWrapperVariant = cva(
|
|
439
436
|
[
|
|
@@ -462,11 +459,11 @@ export const segmentedIconWrapperVariant = cva(
|
|
|
462
459
|
position: {
|
|
463
460
|
start: [
|
|
464
461
|
"inset-y-0 left-0 ",
|
|
465
|
-
"border-r border-r-input-default-stroke peer-hover:border-r-input-active-stroke peer-focus:border-r-input-active-stroke peer-disabled:border-r-input-disable-stroke",
|
|
462
|
+
"border-r border-r-input-default-stroke hover:border-r-input-active-stroke peer-hover:border-r-input-active-stroke peer-focus:border-r-input-active-stroke peer-disabled:border-r-input-disable-stroke",
|
|
466
463
|
],
|
|
467
464
|
end: [
|
|
468
465
|
"inset-y-0 right-0 ",
|
|
469
|
-
"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",
|
|
466
|
+
"border-l border-l-input-default-stroke hover:border-l-input-active-stroke peer-hover:border-l-input-active-stroke peer-focus:border-l-input-active-stroke peer-disabled:border-l-input-disable-stroke",
|
|
470
467
|
],
|
|
471
468
|
},
|
|
472
469
|
},
|
|
@@ -81,7 +81,7 @@ const ToastTitle = React.forwardRef<
|
|
|
81
81
|
>(({ className, ...props }, ref) => (
|
|
82
82
|
<ToastPrimitives.Title
|
|
83
83
|
ref={ref}
|
|
84
|
-
className={cn("typography-
|
|
84
|
+
className={cn("typography-subtitle6", className)}
|
|
85
85
|
{...props}
|
|
86
86
|
/>
|
|
87
87
|
));
|
|
@@ -93,7 +93,7 @@ const ToastDescription = React.forwardRef<
|
|
|
93
93
|
>(({ className, ...props }, ref) => (
|
|
94
94
|
<ToastPrimitives.Description
|
|
95
95
|
ref={ref}
|
|
96
|
-
className={cn("typography-
|
|
96
|
+
className={cn("typography-subtitle4 text-grey-light", className)}
|
|
97
97
|
{...props}
|
|
98
98
|
/>
|
|
99
99
|
));
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
| base-bg2 | --base-color-bg2 | --base-bg-bg2-{theme} |
|
|
154
154
|
| base-bg3 | --base-color-bg3 | --base-bg-bg3-{theme} |
|
|
155
155
|
| base-popup | --base-color-popup | - |
|
|
156
|
-
| base-popup-highlight | --base-color-popup-
|
|
156
|
+
| base-popup-highlight | --base-color-popup-highlight | --base-modal-modal-highlight-{theme} |
|
|
157
157
|
| base-popup-curtain | --base-color-popup-curtain | --base-modal-modal-curtain-{theme} |
|
|
158
158
|
| base-popup-foreground | --base-color-popup-foreground | - |
|
|
159
159
|
| base-stroke | --base-color-workspace-stroke | --base-bg-stroke1-{theme} |
|
|
@@ -194,10 +194,10 @@
|
|
|
194
194
|
| **Function** | `--function-{state}-{property}-{theme}` | --function-default-solid-skyller |
|
|
195
195
|
| **Common** | `--common-{color}-{theme}` | --common-white-skyller |
|
|
196
196
|
|
|
197
|
-
### 3.3
|
|
198
|
-
- `
|
|
199
|
-
- `
|
|
200
|
-
- `
|
|
197
|
+
### 3.3 Spelling updates in variable.css
|
|
198
|
+
- `tertiary`
|
|
199
|
+
- `background`
|
|
200
|
+
- `highlight`
|
|
201
201
|
|
|
202
202
|
---
|
|
203
203
|
|
package/src/theme/global.css
CHANGED
package/src/theme/main-preset.js
CHANGED
|
@@ -60,6 +60,55 @@ module.exports = {
|
|
|
60
60
|
fontFamily: "var(--h6-family, 'Poppins')",
|
|
61
61
|
},
|
|
62
62
|
],
|
|
63
|
+
subtitle1: [
|
|
64
|
+
"var(--subtitle1-size, 16px)",
|
|
65
|
+
{
|
|
66
|
+
lineHeight: "var(--subtitle1-line-height, 24px)",
|
|
67
|
+
fontWeight: "var(--subtitle1-weight, 400)",
|
|
68
|
+
fontFamily: "var(--subtitle1-family, 'Poppins')",
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
subtitle2: [
|
|
72
|
+
"var(--subtitle2-size, 16px)",
|
|
73
|
+
{
|
|
74
|
+
lineHeight: "var(--subtitle2-line-height, 24px)",
|
|
75
|
+
fontWeight: "var(--subtitle2-weight, 500)",
|
|
76
|
+
fontFamily: "var(--subtitle2-family, 'Poppins')",
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
subtitle3: [
|
|
80
|
+
"var(--subtitle3-size, 16px)",
|
|
81
|
+
{
|
|
82
|
+
lineHeight: "var(--subtitle3-line-height, 24px)",
|
|
83
|
+
fontWeight: "var(--subtitle3-weight, 600)",
|
|
84
|
+
fontFamily: "var(--subtitle3-family, 'Poppins')",
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
subtitle4: [
|
|
88
|
+
"var(--subtitle4-size, 14px)",
|
|
89
|
+
{
|
|
90
|
+
lineHeight: "var(--subtitle4-line-height, 22px)",
|
|
91
|
+
fontWeight: "var(--subtitle4-weight, 400)",
|
|
92
|
+
fontFamily: "var(--subtitle4-family, 'Poppins')",
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
subtitle5: [
|
|
96
|
+
"var(--subtitle5-size, 14px)",
|
|
97
|
+
{
|
|
98
|
+
lineHeight: "var(--subtitle5-line-height, 22px)",
|
|
99
|
+
fontWeight: "var(--subtitle5-weight, 500)",
|
|
100
|
+
fontFamily: "var(--subtitle5-family, 'Poppins')",
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
subtitle6: [
|
|
104
|
+
"var(--subtitle6-size, 14px)",
|
|
105
|
+
{
|
|
106
|
+
lineHeight: "var(--subtitle6-line-height, 22px)",
|
|
107
|
+
fontWeight: "var(--subtitle6-weight, 600)",
|
|
108
|
+
fontFamily: "var(--subtitle6-family, 'Poppins')",
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
// Deprecated aliases, kept for backward compatibility.
|
|
63
112
|
subtitile1: [
|
|
64
113
|
"var(--subtitle1-size, 16px)",
|
|
65
114
|
{
|