@rovula/ui 0.0.65 → 0.0.67
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 +993 -979
- package/dist/cjs/bundle.js +3 -3
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/ActionButton/ActionButton.d.ts +6 -6
- package/dist/cjs/types/components/ActionButton/ActionButton.stories.d.ts +97 -96
- package/dist/cjs/types/components/AlertDialog/AlertDialog.stories.d.ts +1 -1
- package/dist/cjs/types/components/Avatar/Avatar.stories.d.ts +7 -7
- package/dist/cjs/types/components/Avatar/AvatarGroup.stories.d.ts +1 -1
- package/dist/cjs/types/components/Button/Button.d.ts +9 -9
- package/dist/cjs/types/components/Button/Buttons.stories.d.ts +139 -138
- package/dist/cjs/types/components/Calendar/Calendar.stories.d.ts +213 -388
- package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +92 -91
- package/dist/cjs/types/components/Collapsible/Collapsible.d.ts +3 -3
- package/dist/cjs/types/components/DataTable/DataTable.stories.d.ts +1 -1
- package/dist/cjs/types/components/DatePicker/DatePicker.stories.d.ts +224 -399
- package/dist/cjs/types/components/Dialog/Dialog.d.ts +2 -2
- package/dist/cjs/types/components/Dialog/Dialog.stories.d.ts +1 -1
- package/dist/cjs/types/components/Dropdown/Dropdown.d.ts +21 -21
- package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +134 -134
- package/dist/cjs/types/components/DropdownMenu/DropdownMenu.d.ts +3 -3
- package/dist/cjs/types/components/DropdownMenu/DropdownMenu.stories.d.ts +1 -1
- package/dist/cjs/types/components/Icon/Icon.stories.d.ts +294 -294
- package/dist/cjs/types/components/Input/Input.d.ts +8 -8
- package/dist/cjs/types/components/Input/Input.stories.d.ts +225 -225
- package/dist/cjs/types/components/InputFilter/InputFilter.d.ts +18 -18
- package/dist/cjs/types/components/InputFilter/InputFilter.stories.d.ts +127 -127
- package/dist/cjs/types/components/Label/Label.stories.d.ts +87 -86
- package/dist/cjs/types/components/Loading/Loading.stories.d.ts +10 -10
- package/dist/cjs/types/components/Navbar/Navbar.stories.d.ts +1 -1
- package/dist/cjs/types/components/Popover/Popover.stories.d.ts +1 -1
- package/dist/cjs/types/components/ProgressBar/ProgressBar.stories.d.ts +9 -9
- package/dist/cjs/types/components/RadioGroup/RadioGroup.stories.d.ts +85 -84
- package/dist/cjs/types/components/Search/Search.stories.d.ts +114 -114
- package/dist/cjs/types/components/Slider/Slider.stories.d.ts +85 -83
- package/dist/cjs/types/components/Switch/Switch.stories.d.ts +92 -91
- package/dist/cjs/types/components/Table/Table.d.ts +2 -2
- package/dist/cjs/types/components/Table/Table.stories.d.ts +87 -86
- package/dist/cjs/types/components/Tabs/Tabs.d.ts +6 -0
- package/dist/cjs/types/components/Tabs/Tabs.stories.d.ts +57 -31
- package/dist/cjs/types/components/Text/Text.stories.d.ts +3 -3
- package/dist/cjs/types/components/TextInput/TextInput.d.ts +21 -21
- package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +128 -128
- package/dist/cjs/types/components/Toast/Toast.stories.d.ts +91 -90
- package/dist/cjs/types/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/cjs/types/icons/type.d.ts +0 -1
- package/dist/components/Dropdown/Dropdown.js +8 -10
- package/dist/components/Tabs/Tabs.js +24 -15
- package/dist/components/Tabs/Tabs.stories.js +12 -0
- package/dist/esm/bundle.css +993 -979
- package/dist/esm/bundle.js +3 -3
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/ActionButton/ActionButton.d.ts +6 -6
- package/dist/esm/types/components/ActionButton/ActionButton.stories.d.ts +97 -96
- package/dist/esm/types/components/AlertDialog/AlertDialog.stories.d.ts +1 -1
- package/dist/esm/types/components/Avatar/Avatar.stories.d.ts +7 -7
- package/dist/esm/types/components/Avatar/AvatarGroup.stories.d.ts +1 -1
- package/dist/esm/types/components/Button/Button.d.ts +9 -9
- package/dist/esm/types/components/Button/Buttons.stories.d.ts +139 -138
- package/dist/esm/types/components/Calendar/Calendar.stories.d.ts +213 -388
- package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +92 -91
- package/dist/esm/types/components/Collapsible/Collapsible.d.ts +3 -3
- package/dist/esm/types/components/DataTable/DataTable.stories.d.ts +1 -1
- package/dist/esm/types/components/DatePicker/DatePicker.stories.d.ts +224 -399
- package/dist/esm/types/components/Dialog/Dialog.d.ts +2 -2
- package/dist/esm/types/components/Dialog/Dialog.stories.d.ts +1 -1
- package/dist/esm/types/components/Dropdown/Dropdown.d.ts +21 -21
- package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +134 -134
- package/dist/esm/types/components/DropdownMenu/DropdownMenu.d.ts +3 -3
- package/dist/esm/types/components/DropdownMenu/DropdownMenu.stories.d.ts +1 -1
- package/dist/esm/types/components/Icon/Icon.stories.d.ts +294 -294
- package/dist/esm/types/components/Input/Input.d.ts +8 -8
- package/dist/esm/types/components/Input/Input.stories.d.ts +225 -225
- package/dist/esm/types/components/InputFilter/InputFilter.d.ts +18 -18
- package/dist/esm/types/components/InputFilter/InputFilter.stories.d.ts +127 -127
- package/dist/esm/types/components/Label/Label.stories.d.ts +87 -86
- package/dist/esm/types/components/Loading/Loading.stories.d.ts +10 -10
- package/dist/esm/types/components/Navbar/Navbar.stories.d.ts +1 -1
- package/dist/esm/types/components/Popover/Popover.stories.d.ts +1 -1
- package/dist/esm/types/components/ProgressBar/ProgressBar.stories.d.ts +9 -9
- package/dist/esm/types/components/RadioGroup/RadioGroup.stories.d.ts +85 -84
- package/dist/esm/types/components/Search/Search.stories.d.ts +114 -114
- package/dist/esm/types/components/Slider/Slider.stories.d.ts +85 -83
- package/dist/esm/types/components/Switch/Switch.stories.d.ts +92 -91
- package/dist/esm/types/components/Table/Table.d.ts +2 -2
- package/dist/esm/types/components/Table/Table.stories.d.ts +87 -86
- package/dist/esm/types/components/Tabs/Tabs.d.ts +6 -0
- package/dist/esm/types/components/Tabs/Tabs.stories.d.ts +57 -31
- package/dist/esm/types/components/Text/Text.stories.d.ts +3 -3
- package/dist/esm/types/components/TextInput/TextInput.d.ts +21 -21
- package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +128 -128
- package/dist/esm/types/components/Toast/Toast.stories.d.ts +91 -90
- package/dist/esm/types/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/esm/types/icons/type.d.ts +0 -1
- package/dist/index.d.ts +99 -93
- package/dist/src/theme/global.css +998 -981
- package/package.json +2 -1
- package/src/components/Dropdown/Dropdown.tsx +9 -11
- package/src/components/Tabs/Tabs.stories.tsx +38 -0
- package/src/components/Tabs/Tabs.tsx +31 -9
- package/dist/theme/global.css +0 -30
- package/dist/theme/main-preset.js +0 -283
- package/dist/theme/plugins/utilities/typography.js +0 -93
- package/dist/theme/presets/colors.js +0 -136
- package/dist/theme/theme.d.ts +0 -69
- package/dist/theme/themes/xspector/baseline.css +0 -9
- package/dist/theme/themes/xspector/color.css +0 -81
- package/dist/theme/themes/xspector/components/action-button.css +0 -100
- package/dist/theme/themes/xspector/components/dropdown-menu.css +0 -28
- package/dist/theme/themes/xspector/components/loading.css +0 -11
- package/dist/theme/themes/xspector/components/switch.css +0 -30
- package/dist/theme/themes/xspector/palette.css +0 -122
- package/dist/theme/themes/xspector/state.css +0 -89
- package/dist/theme/themes/xspector/transparent.css +0 -68
- package/dist/theme/themes/xspector/typography.css +0 -27
- package/dist/theme/tokens/baseline.css +0 -12
- package/dist/theme/tokens/color.css +0 -78
- package/dist/theme/tokens/components/action-button.css +0 -127
- package/dist/theme/tokens/components/button.css +0 -512
- package/dist/theme/tokens/components/dropdown-menu.css +0 -27
- package/dist/theme/tokens/components/loading.css +0 -11
- package/dist/theme/tokens/components/navbar.css +0 -8
- package/dist/theme/tokens/components/progress-bar.css +0 -8
- package/dist/theme/tokens/components/switch.css +0 -30
- package/dist/theme/tokens/palette.css +0 -122
- package/dist/theme/tokens/state.css +0 -82
- package/dist/theme/tokens/transparent.css +0 -68
- package/dist/theme/tokens/typography.css +0 -199
- package/dist/theme/tokens/variables.css +0 -28
- package/dist/theme/utils.js +0 -109
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rovula/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.67",
|
|
4
4
|
"main": "dist/cjs/bundle.js",
|
|
5
5
|
"module": "dist/esm/bundle.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
"@radix-ui/react-dropdown-menu": "^2.1.1",
|
|
83
83
|
"@radix-ui/react-label": "^2.0.2",
|
|
84
84
|
"@radix-ui/react-popover": "^1.1.1",
|
|
85
|
+
"@radix-ui/react-portal": "^1.1.3",
|
|
85
86
|
"@radix-ui/react-radio-group": "^1.1.3",
|
|
86
87
|
"@radix-ui/react-slider": "^1.2.0",
|
|
87
88
|
"@radix-ui/react-slot": "^1.1.0",
|
|
@@ -82,7 +82,7 @@ const Dropdown = forwardRef<HTMLInputElement, DropdownProps>(
|
|
|
82
82
|
error = false,
|
|
83
83
|
filterMode = false,
|
|
84
84
|
required = true,
|
|
85
|
-
modal =
|
|
85
|
+
modal = false,
|
|
86
86
|
onChangeText,
|
|
87
87
|
onSelect,
|
|
88
88
|
renderOptions: customRenderOptions,
|
|
@@ -158,6 +158,8 @@ const Dropdown = forwardRef<HTMLInputElement, DropdownProps>(
|
|
|
158
158
|
);
|
|
159
159
|
}, [options, filterMode, textValue]);
|
|
160
160
|
|
|
161
|
+
const usePortal = isInsideDialog ? false : modal;
|
|
162
|
+
|
|
161
163
|
const updateDropdownPosition = useCallback(() => {
|
|
162
164
|
if (inputRef.current && dropdownRef.current) {
|
|
163
165
|
const rect = inputRef.current.getBoundingClientRect();
|
|
@@ -169,8 +171,6 @@ const Dropdown = forwardRef<HTMLInputElement, DropdownProps>(
|
|
|
169
171
|
spaceBelow < dropdownHeight && spaceAbove > spaceBelow;
|
|
170
172
|
setIsAbove(shouldOpenAbove);
|
|
171
173
|
|
|
172
|
-
const usePortal = isInsideDialog ? false : modal;
|
|
173
|
-
|
|
174
174
|
if (usePortal) {
|
|
175
175
|
setDropdownStyles({
|
|
176
176
|
position: "absolute",
|
|
@@ -179,7 +179,7 @@ const Dropdown = forwardRef<HTMLInputElement, DropdownProps>(
|
|
|
179
179
|
: `${rect.bottom}px`,
|
|
180
180
|
left: `${rect.left}px`,
|
|
181
181
|
width: `${rect.width}px`,
|
|
182
|
-
zIndex: 9999,
|
|
182
|
+
zIndex: 9999,
|
|
183
183
|
});
|
|
184
184
|
} else {
|
|
185
185
|
setDropdownStyles({
|
|
@@ -187,22 +187,20 @@ const Dropdown = forwardRef<HTMLInputElement, DropdownProps>(
|
|
|
187
187
|
top: shouldOpenAbove ? `-${dropdownHeight}px` : "100%",
|
|
188
188
|
left: "0",
|
|
189
189
|
width: "100%",
|
|
190
|
-
zIndex:
|
|
190
|
+
zIndex: 9999,
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
}, [modal, isInsideDialog]);
|
|
194
|
+
}, [modal, isInsideDialog, usePortal]);
|
|
195
195
|
|
|
196
196
|
useEffect(() => {
|
|
197
197
|
if (isFocused) {
|
|
198
198
|
updateDropdownPosition();
|
|
199
199
|
window.addEventListener("resize", updateDropdownPosition);
|
|
200
|
-
window.addEventListener("scroll", updateDropdownPosition, true);
|
|
201
200
|
}
|
|
202
201
|
|
|
203
202
|
return () => {
|
|
204
203
|
window.removeEventListener("resize", updateDropdownPosition);
|
|
205
|
-
window.removeEventListener("scroll", updateDropdownPosition, true);
|
|
206
204
|
};
|
|
207
205
|
}, [isFocused, updateDropdownPosition]);
|
|
208
206
|
|
|
@@ -221,7 +219,7 @@ const Dropdown = forwardRef<HTMLInputElement, DropdownProps>(
|
|
|
221
219
|
<ul
|
|
222
220
|
className={cn(
|
|
223
221
|
"absolute mt-1 w-full bg-base-popup border border-base-popup text-base-popup-foreground rounded-md shadow-md z-[9999] max-h-60 overflow-y-auto",
|
|
224
|
-
isAbove ? "bottom-full mb-1" : "top-full mt-1",
|
|
222
|
+
!usePortal && (isAbove ? "bottom-full mb-1" : "top-full mt-1"),
|
|
225
223
|
optionContainerClassName
|
|
226
224
|
)}
|
|
227
225
|
style={dropdownStyles}
|
|
@@ -337,7 +335,7 @@ const Dropdown = forwardRef<HTMLInputElement, DropdownProps>(
|
|
|
337
335
|
);
|
|
338
336
|
|
|
339
337
|
return (
|
|
340
|
-
<div className={`relative
|
|
338
|
+
<div className={`relative ${fullwidth ? "w-full" : ""}`}>
|
|
341
339
|
<TextInput
|
|
342
340
|
hasClearIcon={false}
|
|
343
341
|
endIcon={
|
|
@@ -372,7 +370,7 @@ const Dropdown = forwardRef<HTMLInputElement, DropdownProps>(
|
|
|
372
370
|
onKeyDown={handleOnKeyDown}
|
|
373
371
|
/>
|
|
374
372
|
{isFocused &&
|
|
375
|
-
(
|
|
373
|
+
(usePortal ? (
|
|
376
374
|
<Portal.Root container={document.body}>
|
|
377
375
|
{renderOptions()}
|
|
378
376
|
</Portal.Root>
|
|
@@ -314,3 +314,41 @@ export const Controller = {
|
|
|
314
314
|
);
|
|
315
315
|
},
|
|
316
316
|
} satisfies StoryObj;
|
|
317
|
+
|
|
318
|
+
export const CustomClassname = {
|
|
319
|
+
args: {
|
|
320
|
+
initialTab: 0,
|
|
321
|
+
tabs: tabs.map((tab, i) => ({
|
|
322
|
+
...tab,
|
|
323
|
+
disabled: i !== 0,
|
|
324
|
+
activeClassName: "text-green-500",
|
|
325
|
+
// className: "text-red-500",
|
|
326
|
+
disableClassName: i === 1 && "text-pink-200",
|
|
327
|
+
activeDisableClassName: "text-red-500",
|
|
328
|
+
})),
|
|
329
|
+
},
|
|
330
|
+
render: (args) => {
|
|
331
|
+
const props: any = {
|
|
332
|
+
...args,
|
|
333
|
+
};
|
|
334
|
+
return (
|
|
335
|
+
<div className="flex flex-row gap-4">
|
|
336
|
+
<Tabs
|
|
337
|
+
tabs={tabs}
|
|
338
|
+
{...props}
|
|
339
|
+
tabButtonDisableClassName="text-red-500"
|
|
340
|
+
tabButtonActiveDisableClassName="text-blue-500"
|
|
341
|
+
tabBarContainerClassName="border-red-500"
|
|
342
|
+
/>
|
|
343
|
+
<Tabs
|
|
344
|
+
tabs={tabs}
|
|
345
|
+
{...props}
|
|
346
|
+
disabled
|
|
347
|
+
tabButtonDisableClassName="text-red-500"
|
|
348
|
+
tabButtonActiveDisableClassName="text-blue-500"
|
|
349
|
+
tabBarContainerClassName="border-blue-500"
|
|
350
|
+
/>
|
|
351
|
+
</div>
|
|
352
|
+
);
|
|
353
|
+
},
|
|
354
|
+
} satisfies StoryObj;
|
|
@@ -13,6 +13,10 @@ type Tab = {
|
|
|
13
13
|
content: React.ReactNode;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
isLoading?: boolean;
|
|
16
|
+
activeClassName?: string;
|
|
17
|
+
disableClassName?: string;
|
|
18
|
+
activeDisableClassName?: string;
|
|
19
|
+
className?: string;
|
|
16
20
|
};
|
|
17
21
|
|
|
18
22
|
type TabsProps = {
|
|
@@ -30,6 +34,8 @@ type TabsProps = {
|
|
|
30
34
|
tabBarWrapperClassName?: string;
|
|
31
35
|
tabButtonClassName?: string;
|
|
32
36
|
tabButtonActiveClassName?: string;
|
|
37
|
+
tabButtonActiveDisableClassName?: string;
|
|
38
|
+
tabButtonDisableClassName?: string;
|
|
33
39
|
tabContentClassName?: string;
|
|
34
40
|
addTabButtonWrapperClassName?: string;
|
|
35
41
|
borderSliderClassName?: string;
|
|
@@ -58,6 +64,8 @@ const Tabs: React.FC<TabsProps> = ({
|
|
|
58
64
|
tabBarWrapperClassName,
|
|
59
65
|
tabButtonClassName,
|
|
60
66
|
tabButtonActiveClassName,
|
|
67
|
+
tabButtonActiveDisableClassName,
|
|
68
|
+
tabButtonDisableClassName,
|
|
61
69
|
tabContentClassName,
|
|
62
70
|
addTabButtonWrapperClassName,
|
|
63
71
|
borderSliderClassName,
|
|
@@ -132,12 +140,15 @@ const Tabs: React.FC<TabsProps> = ({
|
|
|
132
140
|
return (
|
|
133
141
|
<div className={cn("w-full", className)}>
|
|
134
142
|
<div
|
|
135
|
-
className={cn(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
className={cn(
|
|
144
|
+
" relative flex flex-row w-full",
|
|
145
|
+
{
|
|
146
|
+
[`border-b-[1px] border-base-stroke`]: enableBorderLine,
|
|
147
|
+
"border-state-disable-outline": disabled,
|
|
148
|
+
"flex-1": tabMode === "justify",
|
|
149
|
+
},
|
|
150
|
+
tabBarContainerClassName
|
|
151
|
+
)}
|
|
141
152
|
>
|
|
142
153
|
{leftAction}
|
|
143
154
|
<div
|
|
@@ -178,12 +189,23 @@ const Tabs: React.FC<TabsProps> = ({
|
|
|
178
189
|
"text-foreground": index === activeTab,
|
|
179
190
|
"text-text-grey-medium hover:text-text-grey-dark active:text-text-dark":
|
|
180
191
|
index !== activeTab,
|
|
192
|
+
// -- disabled
|
|
181
193
|
"text-state-disable-solid pointer-events-none":
|
|
182
194
|
disabled || tab.disabled,
|
|
195
|
+
[tab.disableClassName ?? tabButtonDisableClassName ?? ""]:
|
|
196
|
+
disabled || tab.disabled,
|
|
197
|
+
// --
|
|
183
198
|
"text-state-disable-outline":
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
[
|
|
199
|
+
index === activeTab && (disabled || tab.disabled),
|
|
200
|
+
// -- active disabled --
|
|
201
|
+
[tab.activeDisableClassName ??
|
|
202
|
+
tabButtonActiveDisableClassName ??
|
|
203
|
+
""]: index === activeTab && (disabled || tab.disabled),
|
|
204
|
+
// -- class name
|
|
205
|
+
[tab.className ?? tabButtonClassName ?? ""]: true,
|
|
206
|
+
// -- active --
|
|
207
|
+
[tab.activeClassName ?? tabButtonActiveClassName ?? ""]:
|
|
208
|
+
index === activeTab,
|
|
187
209
|
"flex-1": tabMode === "justify",
|
|
188
210
|
}
|
|
189
211
|
)}
|
package/dist/theme/global.css
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
@import "./tokens/baseline.css";
|
|
3
|
-
@import "./themes/xspector/baseline.css";
|
|
4
|
-
|
|
5
|
-
@tailwind base;
|
|
6
|
-
@tailwind components;
|
|
7
|
-
@tailwind utilities;
|
|
8
|
-
|
|
9
|
-
@layer base {
|
|
10
|
-
* {
|
|
11
|
-
/* @apply border-border; */
|
|
12
|
-
}
|
|
13
|
-
body {
|
|
14
|
-
/* @apply bg-background text-foreground; */
|
|
15
|
-
/* @apply bg-[var(--backgroud)] text-[var(--foreground)]; */
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* hide input number arrow */
|
|
19
|
-
/* Chrome, Safari, Edge, Opera */
|
|
20
|
-
input::-webkit-outer-spin-button,
|
|
21
|
-
input::-webkit-inner-spin-button {
|
|
22
|
-
-webkit-appearance: none;
|
|
23
|
-
margin: 0;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* Firefox */
|
|
27
|
-
input[type=number] {
|
|
28
|
-
-moz-appearance: textfield;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
const { fontFamily } = require("tailwindcss/defaultTheme");
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
darkMode: "class",
|
|
5
|
-
theme: {
|
|
6
|
-
container: {
|
|
7
|
-
center: true,
|
|
8
|
-
padding: "2rem",
|
|
9
|
-
screens: {
|
|
10
|
-
"2xl": "1400px",
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
extend: {
|
|
14
|
-
fontSize: {
|
|
15
|
-
h1: [
|
|
16
|
-
"var(--h1-size, 64px)",
|
|
17
|
-
{
|
|
18
|
-
lineHeight: "var(--h1-line-height, 80px)",
|
|
19
|
-
fontWeight: "var(--h1-weight, 700)",
|
|
20
|
-
fontFamily: "var(--h1-family, 'Poppins')",
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
h2: [
|
|
24
|
-
"var(--h2-size, 48px)",
|
|
25
|
-
{
|
|
26
|
-
lineHeight: "var(--h2-line-height, 60px)",
|
|
27
|
-
fontWeight: "var(--h2-weight, 700)",
|
|
28
|
-
fontFamily: "var(--h2-family, 'Poppins')",
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
h3: [
|
|
32
|
-
"var(--h3-size, 32px)",
|
|
33
|
-
{
|
|
34
|
-
lineHeight: "var(--h3-line-height, 48px)",
|
|
35
|
-
fontWeight: "var(--h3-weight, 700)",
|
|
36
|
-
fontFamily: "var(--h3-family, 'Poppins')",
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
h4: [
|
|
40
|
-
"var(--h4-size, 24px)",
|
|
41
|
-
{
|
|
42
|
-
lineHeight: "var(--h4-line-height, 32px)",
|
|
43
|
-
fontWeight: "var(--h4-weight, 700)",
|
|
44
|
-
fontFamily: "var(--h4-family, 'Poppins')",
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
h5: [
|
|
48
|
-
"var(--h5-size, 20px)",
|
|
49
|
-
{
|
|
50
|
-
lineHeight: "var(--h5-line-height, 28px)",
|
|
51
|
-
fontWeight: "var(--h5-weight, 700)",
|
|
52
|
-
fontFamily: "var(--h5-family, 'Poppins')",
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
h6: [
|
|
56
|
-
"var(--h6-size, 18px)",
|
|
57
|
-
{
|
|
58
|
-
lineHeight: "var(--h6-line-height, 24px)",
|
|
59
|
-
fontWeight: "var(--h6-weight, 700)",
|
|
60
|
-
fontFamily: "var(--h6-family, 'Poppins')",
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
subtitile1: [
|
|
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
|
-
subtitile2: [
|
|
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
|
-
subtitile3: [
|
|
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
|
-
subtitile4: [
|
|
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
|
-
subtitile5: [
|
|
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
|
-
subtitile6: [
|
|
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
|
-
body1: [
|
|
112
|
-
"var(--body1-size, 16px)",
|
|
113
|
-
{
|
|
114
|
-
lineHeight: "var(--body1-line-height, 20px)",
|
|
115
|
-
fontWeight: "var(--body1-weight, 400)",
|
|
116
|
-
fontFamily: "var(--body1-family, 'Poppins')",
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
body2: [
|
|
120
|
-
"var(--body2-size, 16px)",
|
|
121
|
-
{
|
|
122
|
-
lineHeight: "var(--body2-line-height, 20px)",
|
|
123
|
-
fontWeight: "var(--body2-weight, 500)",
|
|
124
|
-
fontFamily: "var(--body2-family, 'Poppins')",
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
body3: [
|
|
128
|
-
"var(--body3-size, 14px)",
|
|
129
|
-
{
|
|
130
|
-
lineHeight: "var(--body3-line-height, 18px)",
|
|
131
|
-
fontWeight: "var(--body3-weight, 400)",
|
|
132
|
-
fontFamily: "var(--body3-family, 'Poppins')",
|
|
133
|
-
},
|
|
134
|
-
],
|
|
135
|
-
body4: [
|
|
136
|
-
"var(--body4-size, 14px)",
|
|
137
|
-
{
|
|
138
|
-
lineHeight: "var(--body4-line-height, 18px)",
|
|
139
|
-
fontWeight: "var(--body4-weight, 500)",
|
|
140
|
-
fontFamily: "var(--body4-family, 'Poppins')",
|
|
141
|
-
},
|
|
142
|
-
],
|
|
143
|
-
small1: [
|
|
144
|
-
"var(--small1-size, 12px)",
|
|
145
|
-
{
|
|
146
|
-
lineHeight: "var(--small1-line-height, 14px)",
|
|
147
|
-
fontWeight: "var(--small1-weight, 400)",
|
|
148
|
-
fontFamily: "var(--small1-family, 'Poppins')",
|
|
149
|
-
},
|
|
150
|
-
],
|
|
151
|
-
small2: [
|
|
152
|
-
"var(--small2-size, 12px)",
|
|
153
|
-
{
|
|
154
|
-
lineHeight: "var(--small2-line-height, 14px)",
|
|
155
|
-
fontWeight: "var(--small2-weight, 500)",
|
|
156
|
-
fontFamily: "var(--small2-family, 'Poppins')",
|
|
157
|
-
},
|
|
158
|
-
],
|
|
159
|
-
small3: [
|
|
160
|
-
"var(--small3-size, 12px)",
|
|
161
|
-
{
|
|
162
|
-
lineHeight: "var(--small3-line-height, 14px)",
|
|
163
|
-
fontWeight: "var(--small3-weight, 600)",
|
|
164
|
-
fontFamily: "var(--small3-family, 'Poppins')",
|
|
165
|
-
},
|
|
166
|
-
],
|
|
167
|
-
small4: [
|
|
168
|
-
"var(--small4-size, 10px)",
|
|
169
|
-
{
|
|
170
|
-
lineHeight: "var(--small4-line-height, 12px)",
|
|
171
|
-
fontWeight: "var(--small4-weight, 400)",
|
|
172
|
-
fontFamily: "var(--small4-family, 'Poppins')",
|
|
173
|
-
},
|
|
174
|
-
],
|
|
175
|
-
small5: [
|
|
176
|
-
"var(--small5-size, 10px)",
|
|
177
|
-
{
|
|
178
|
-
lineHeight: "var(--small5-line-height, 12px)",
|
|
179
|
-
fontWeight: "var(--small5-weight, 500)",
|
|
180
|
-
fontFamily: "var(--small5-family, 'Poppins')",
|
|
181
|
-
},
|
|
182
|
-
],
|
|
183
|
-
small6: [
|
|
184
|
-
"var(--small5-size, 10px)",
|
|
185
|
-
{
|
|
186
|
-
lineHeight: "var(--small6-line-height, 12px)",
|
|
187
|
-
fontWeight: "var(--small6-weight, 600)",
|
|
188
|
-
fontFamily: "var(--small6-family, 'Poppins')",
|
|
189
|
-
},
|
|
190
|
-
],
|
|
191
|
-
small7: [
|
|
192
|
-
"var(--small7-size, 8px)",
|
|
193
|
-
{
|
|
194
|
-
lineHeight: "var(--small7-line-height, 10px)",
|
|
195
|
-
fontWeight: "var(--small7-weight, 600)",
|
|
196
|
-
fontFamily: "var(--small7-family, 'Poppins')",
|
|
197
|
-
},
|
|
198
|
-
],
|
|
199
|
-
small8: [
|
|
200
|
-
"var(--small8-size, 8px)",
|
|
201
|
-
{
|
|
202
|
-
lineHeight: "var(--small8-line-height, 10px)",
|
|
203
|
-
fontWeight: "var(--small8-weight, 700)",
|
|
204
|
-
fontFamily: "var(--small8-family, 'Poppins')",
|
|
205
|
-
},
|
|
206
|
-
],
|
|
207
|
-
small9: [
|
|
208
|
-
"var(--small9-size, 8px)",
|
|
209
|
-
{
|
|
210
|
-
lineHeight: "var(--small9-line-height, 10px)",
|
|
211
|
-
fontWeight: "var(--small9-weight, 400)",
|
|
212
|
-
fontFamily: "var(--small9-family, 'Poppins')",
|
|
213
|
-
},
|
|
214
|
-
],
|
|
215
|
-
label1: [
|
|
216
|
-
"var(--label-label1-size, 12px)",
|
|
217
|
-
{
|
|
218
|
-
lineHeight: "var(--label-label1-line-height, 12px)",
|
|
219
|
-
fontWeight: "var(--label-label1-weight, 400)",
|
|
220
|
-
fontFamily: "var(--label-label1-family, 'Poppins')",
|
|
221
|
-
},
|
|
222
|
-
],
|
|
223
|
-
label2: [
|
|
224
|
-
"var(--label-label2-size, 10px)",
|
|
225
|
-
{
|
|
226
|
-
lineHeight: "var(--label-label2-line-height, 10px)",
|
|
227
|
-
fontWeight: "var(--label-label2-weight, 400)",
|
|
228
|
-
fontFamily: "var(--label-label2-family, 'Poppins')",
|
|
229
|
-
},
|
|
230
|
-
],
|
|
231
|
-
buttonL: [
|
|
232
|
-
"var(--button-button-l-size, 16px)",
|
|
233
|
-
{
|
|
234
|
-
lineHeight: "var(--button-button-l-line-height, 24px)",
|
|
235
|
-
fontWeight: "var(--button-button-l-weight, 700)",
|
|
236
|
-
fontFamily: "var(--button-button-l-family, 'Poppins')",
|
|
237
|
-
},
|
|
238
|
-
],
|
|
239
|
-
buttonMS: [
|
|
240
|
-
"var(--button-button-ms-size, 14px)",
|
|
241
|
-
{
|
|
242
|
-
lineHeight: "var(--button-button-ms-line-height, 22px)",
|
|
243
|
-
fontWeight: "var(--button-button-ms-weight, 700)",
|
|
244
|
-
fontFamily: "var(--button-button-ms-family, 'Poppins')",
|
|
245
|
-
},
|
|
246
|
-
],
|
|
247
|
-
},
|
|
248
|
-
borderRadius: {
|
|
249
|
-
xl: "var(--radius-radius-xl)",
|
|
250
|
-
lg: "var(--radius-radius-l)",
|
|
251
|
-
md: "var(--radius-radius-m)",
|
|
252
|
-
sm: "var(--radius-radius-s)",
|
|
253
|
-
xs: "var(--radius-radius-xs)",
|
|
254
|
-
},
|
|
255
|
-
spacing: {
|
|
256
|
-
xxs: "var(--spacing-spacing-xxs)",
|
|
257
|
-
xs: "var(--spacing-spacing-xs)",
|
|
258
|
-
sm: "var(--spacing-spacing-s)",
|
|
259
|
-
md: "var(--spacing-spacing-m)",
|
|
260
|
-
lg: "var(--spacing-spacing-l)",
|
|
261
|
-
xl: "var(--spacing-spacing-xl)",
|
|
262
|
-
xxl: "var(--spacing-spacing-xxl)",
|
|
263
|
-
xxxl: "var(--spacing-spacing-xxxl)",
|
|
264
|
-
},
|
|
265
|
-
keyframes: {
|
|
266
|
-
"accordion-down": {
|
|
267
|
-
from: { height: "0" },
|
|
268
|
-
to: { height: "var(--radix-accordion-content-height)" },
|
|
269
|
-
},
|
|
270
|
-
"accordion-up": {
|
|
271
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
272
|
-
to: { height: "0" },
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
animation: {
|
|
276
|
-
"accordion-down": "accordion-down 0.2s ease-out",
|
|
277
|
-
"accordion-up": "accordion-up 0.2s ease-out",
|
|
278
|
-
},
|
|
279
|
-
},
|
|
280
|
-
},
|
|
281
|
-
presets: [require("./presets/colors"), require("tailwindcss-animate")],
|
|
282
|
-
plugins: [require("./plugins/utilities/typography")],
|
|
283
|
-
};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
const plugin = require("tailwindcss/plugin");
|
|
2
|
-
|
|
3
|
-
module.exports = plugin(function ({ addUtilities }) {
|
|
4
|
-
addUtilities({
|
|
5
|
-
".typography-h1": {
|
|
6
|
-
"@apply text-h1": {},
|
|
7
|
-
},
|
|
8
|
-
".typography-h2": {
|
|
9
|
-
"@apply text-h2": {},
|
|
10
|
-
},
|
|
11
|
-
".typography-h3": {
|
|
12
|
-
"@apply text-h3": {},
|
|
13
|
-
},
|
|
14
|
-
".typography-h4": {
|
|
15
|
-
"@apply text-h4": {},
|
|
16
|
-
},
|
|
17
|
-
".typography-h5": {
|
|
18
|
-
"@apply text-h5": {},
|
|
19
|
-
},
|
|
20
|
-
".typography-h6": {
|
|
21
|
-
"@apply text-h6": {},
|
|
22
|
-
},
|
|
23
|
-
".typography-subtitile1": {
|
|
24
|
-
"@apply text-subtitile1": {},
|
|
25
|
-
},
|
|
26
|
-
".typography-subtitile2": {
|
|
27
|
-
"@apply text-subtitile2": {},
|
|
28
|
-
},
|
|
29
|
-
".typography-subtitile3": {
|
|
30
|
-
"@apply text-subtitile3": {},
|
|
31
|
-
},
|
|
32
|
-
".typography-subtitile4": {
|
|
33
|
-
"@apply text-subtitile4": {},
|
|
34
|
-
},
|
|
35
|
-
".typography-subtitile5": {
|
|
36
|
-
"@apply text-subtitile5": {},
|
|
37
|
-
},
|
|
38
|
-
".typography-subtitile6": {
|
|
39
|
-
"@apply text-subtitile6": {},
|
|
40
|
-
},
|
|
41
|
-
".typography-body1": {
|
|
42
|
-
"@apply text-body1": {},
|
|
43
|
-
},
|
|
44
|
-
".typography-body2": {
|
|
45
|
-
"@apply text-body2": {},
|
|
46
|
-
},
|
|
47
|
-
".typography-body3": {
|
|
48
|
-
"@apply text-body3": {},
|
|
49
|
-
},
|
|
50
|
-
".typography-body4": {
|
|
51
|
-
"@apply text-body4": {},
|
|
52
|
-
},
|
|
53
|
-
".typography-small1": {
|
|
54
|
-
"@apply text-small1": {},
|
|
55
|
-
},
|
|
56
|
-
".typography-small2": {
|
|
57
|
-
"@apply text-small2": {},
|
|
58
|
-
},
|
|
59
|
-
".typography-small3": {
|
|
60
|
-
"@apply text-small3": {},
|
|
61
|
-
},
|
|
62
|
-
".typography-small4": {
|
|
63
|
-
"@apply text-small4": {},
|
|
64
|
-
},
|
|
65
|
-
".typography-small5": {
|
|
66
|
-
"@apply text-small5": {},
|
|
67
|
-
},
|
|
68
|
-
".typography-small6": {
|
|
69
|
-
"@apply text-small6": {},
|
|
70
|
-
},
|
|
71
|
-
".typography-small7": {
|
|
72
|
-
"@apply text-small7": {},
|
|
73
|
-
},
|
|
74
|
-
".typography-small8": {
|
|
75
|
-
"@apply text-small8": {},
|
|
76
|
-
},
|
|
77
|
-
".typography-small9": {
|
|
78
|
-
"@apply text-small9": {},
|
|
79
|
-
},
|
|
80
|
-
".typography-label1": {
|
|
81
|
-
"@apply text-label1": {},
|
|
82
|
-
},
|
|
83
|
-
".typography-label2": {
|
|
84
|
-
"@apply text-label2": {},
|
|
85
|
-
},
|
|
86
|
-
".typography-buttonL": {
|
|
87
|
-
"@apply text-buttonL": {},
|
|
88
|
-
},
|
|
89
|
-
".typography-buttonMS": {
|
|
90
|
-
"@apply text-buttonMS": {},
|
|
91
|
-
},
|
|
92
|
-
});
|
|
93
|
-
});
|