@firecms/ui 3.0.0-canary.144 → 3.0.0-canary.145
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/index.es.js +104 -103
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +104 -103
- package/dist/index.umd.js.map +1 -1
- package/dist/styles.d.ts +8 -8
- package/package.json +2 -2
- package/src/components/Alert.tsx +2 -2
- package/src/components/Autocomplete.tsx +2 -2
- package/src/components/Avatar.tsx +4 -4
- package/src/components/Badge.tsx +1 -1
- package/src/components/BooleanSwitch.tsx +4 -4
- package/src/components/Button.tsx +6 -6
- package/src/components/Checkbox.tsx +5 -5
- package/src/components/Chip.tsx +2 -2
- package/src/components/CircularProgress.tsx +1 -1
- package/src/components/DateTimeField.tsx +3 -3
- package/src/components/Dialog.tsx +1 -1
- package/src/components/DialogActions.tsx +1 -1
- package/src/components/ExpandablePanel.tsx +1 -1
- package/src/components/IconButton.tsx +3 -3
- package/src/components/Label.tsx +2 -2
- package/src/components/Markdown.tsx +2 -2
- package/src/components/Menu.tsx +1 -1
- package/src/components/Menubar.tsx +9 -9
- package/src/components/MultiSelect.tsx +9 -9
- package/src/components/Popover.tsx +1 -1
- package/src/components/SearchBar.tsx +4 -3
- package/src/components/Select.tsx +6 -6
- package/src/components/Separator.tsx +2 -2
- package/src/components/Sheet.tsx +3 -3
- package/src/components/Skeleton.tsx +1 -1
- package/src/components/Slider.tsx +4 -4
- package/src/components/Table.tsx +6 -6
- package/src/components/Tabs.tsx +8 -8
- package/src/components/TextField.tsx +2 -2
- package/src/components/Tooltip.tsx +2 -2
- package/src/components/common/SelectInputLabel.tsx +1 -1
- package/src/styles.ts +8 -8
- package/tailwind.config.js +38 -25
package/dist/styles.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
export declare const focusedDisabled = "focus-visible:ring-0 focus-visible:ring-offset-0";
|
2
|
-
export declare const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-
|
2
|
+
export declare const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-surface-accent-100 focus:dark:bg-surface-800 focus:dark:bg-opacity-60";
|
3
3
|
export declare const focusedClasses = "z-30 outline-none ring-2 ring-primary ring-opacity-75 ring-offset-2 ring-offset-transparent ";
|
4
|
-
export declare const fieldBackgroundMixin = "bg-opacity-50 bg-
|
5
|
-
export declare const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-
|
6
|
-
export declare const fieldBackgroundDisabledMixin = "dark:bg-
|
7
|
-
export declare const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-
|
8
|
-
export declare const defaultBorderMixin = "border-
|
9
|
-
export declare const paperMixin = "bg-white rounded-md dark:bg-
|
10
|
-
export declare const cardMixin = "bg-white border border-
|
4
|
+
export declare const fieldBackgroundMixin = "bg-opacity-50 bg-surface-accent-200 dark:bg-surface-800 dark:bg-opacity-60";
|
5
|
+
export declare const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-surface-accent-100 dark:bg-surface-800 dark:bg-opacity-0";
|
6
|
+
export declare const fieldBackgroundDisabledMixin = "dark:bg-surface-800 bg-opacity-50 dark:bg-opacity-90";
|
7
|
+
export declare const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-surface-700 dark:hover:bg-opacity-40";
|
8
|
+
export declare const defaultBorderMixin = "border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40";
|
9
|
+
export declare const paperMixin = "bg-white rounded-md dark:bg-surface-950 border border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40";
|
10
|
+
export declare const cardMixin = "bg-white border border-surface-200 border-opacity-40 dark:border-transparent rounded-md dark:bg-surface-950 dark:border-surface-700 dark:border-opacity-40 m-1 -p-1";
|
11
11
|
export declare const cardClickableMixin = "hover:bg-primary-bg dark:hover:bg-primary-bg hover:bg-opacity-20 dark:hover:bg-opacity-20 hover:ring-2 hover:ring-primary cursor-pointer";
|
12
12
|
export declare const cardSelectedMixin = "bg-primary-bg dark:bg-primary-bg bg-opacity-30 dark:bg-opacity-10 ring-1 ring-primary ring-opacity-75";
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@firecms/ui",
|
3
3
|
"type": "module",
|
4
|
-
"version": "3.0.0-canary.
|
4
|
+
"version": "3.0.0-canary.145",
|
5
5
|
"description": "Awesome Firebase/Firestore-based headless open-source CMS",
|
6
6
|
"funding": {
|
7
7
|
"url": "https://github.com/sponsors/firecmsco"
|
@@ -107,7 +107,7 @@
|
|
107
107
|
"src",
|
108
108
|
"tailwind.config.js"
|
109
109
|
],
|
110
|
-
"gitHead": "
|
110
|
+
"gitHead": "e5d660f00c5806e1b63839c013af3c973f3dd47e",
|
111
111
|
"publishConfig": {
|
112
112
|
"access": "public"
|
113
113
|
}
|
package/src/components/Alert.tsx
CHANGED
@@ -34,7 +34,7 @@ const getColorClasses = (severity: string) => {
|
|
34
34
|
return "bg-emerald-50 dark:bg-emerald-800 dark:text-emerald-100 text-emerald-900";
|
35
35
|
case "base":
|
36
36
|
default:
|
37
|
-
return "bg-
|
37
|
+
return "bg-surface-accent-50 dark:bg-surface-accent-800 dark:text-white text-surface-accent-900";
|
38
38
|
}
|
39
39
|
};
|
40
40
|
|
@@ -61,7 +61,7 @@ export const Alert: React.FC<AlertProps> = ({
|
|
61
61
|
className)}>
|
62
62
|
<div className={"flex-grow"}>{children}</div>
|
63
63
|
{onDismiss && (
|
64
|
-
<button className="text-
|
64
|
+
<button className="text-surface-accent-400 hover:text-surface-accent-600 dark:text-surface-accent-500 dark:hover:text-surface-accent-400"
|
65
65
|
onClick={onDismiss}>
|
66
66
|
×
|
67
67
|
</button>
|
@@ -60,7 +60,7 @@ export function Autocomplete({
|
|
60
60
|
<div ref={autocompleteRef}
|
61
61
|
className={cls(
|
62
62
|
open ? paperMixin : "",
|
63
|
-
"bg-
|
63
|
+
"bg-surface-accent-50 dark:bg-surface-accent-900 py-2"
|
64
64
|
)}>
|
65
65
|
{children}
|
66
66
|
</div>
|
@@ -80,7 +80,7 @@ export function AutocompleteItem({
|
|
80
80
|
|
81
81
|
return (
|
82
82
|
<div
|
83
|
-
className="flex w-full items-center pr-6 pl-14 h-[48px] cursor-pointer hover:bg-
|
83
|
+
className="flex w-full items-center pr-6 pl-14 h-[48px] cursor-pointer hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800"
|
84
84
|
onClick={onClick}>
|
85
85
|
{children}
|
86
86
|
</div>
|
@@ -35,14 +35,14 @@ const AvatarInner: React.ForwardRefRenderFunction<HTMLButtonElement, AvatarProps
|
|
35
35
|
{...props}
|
36
36
|
className={cls(
|
37
37
|
"rounded-full flex items-center justify-center overflow-hidden",
|
38
|
-
"p-1 hover:bg-
|
38
|
+
"p-1 hover:bg-surface-accent-200 hover:dark:bg-surface-accent-700 w-12 h-12 min-w-12 min-h-12",
|
39
39
|
outerClassName
|
40
40
|
)}
|
41
41
|
>
|
42
42
|
{src && !isImageError ? (
|
43
43
|
<img
|
44
44
|
className={cls(
|
45
|
-
"bg-
|
45
|
+
"bg-surface-accent-100 dark:bg-surface-accent-800",
|
46
46
|
"w-full h-full object-cover rounded-full",
|
47
47
|
className
|
48
48
|
)}
|
@@ -53,9 +53,9 @@ const AvatarInner: React.ForwardRefRenderFunction<HTMLButtonElement, AvatarProps
|
|
53
53
|
) : (
|
54
54
|
<span
|
55
55
|
className={cls(
|
56
|
-
"bg-
|
56
|
+
"bg-surface-accent-100 dark:bg-surface-accent-800",
|
57
57
|
"flex items-center justify-center",
|
58
|
-
"w-full h-full py-1.5 text-lg font-medium text-
|
58
|
+
"w-full h-full py-1.5 text-lg font-medium text-surface-accent-900 dark:text-white rounded-full",
|
59
59
|
className
|
60
60
|
)}
|
61
61
|
>
|
package/src/components/Badge.tsx
CHANGED
@@ -43,8 +43,8 @@ export const BooleanSwitch = React.forwardRef(function BooleanSwitch({
|
|
43
43
|
size === "smallest" ? "w-[38px] h-[22px] min-w-[38px] min-h-[22px]" : "w-[42px] h-[26px] min-w-[42px] min-h-[26px]",
|
44
44
|
"outline-none rounded-full relative shadow-sm",
|
45
45
|
value ? (disabled
|
46
|
-
? "bg-white bg-opacity-54 dark:bg-
|
47
|
-
: "ring-secondary ring-1 bg-secondary dark:bg-secondary") : "bg-white bg-opacity-54 dark:bg-
|
46
|
+
? "bg-white bg-opacity-54 dark:bg-surface-accent-950 border-surface-accent-100 dark:border-surface-accent-700 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700"
|
47
|
+
: "ring-secondary ring-1 bg-secondary dark:bg-secondary") : "bg-white bg-opacity-54 dark:bg-surface-accent-900 ring-1 ring-surface-accent-200 dark:ring-surface-accent-700",
|
48
48
|
className
|
49
49
|
)}
|
50
50
|
{...props}
|
@@ -53,7 +53,7 @@ export const BooleanSwitch = React.forwardRef(function BooleanSwitch({
|
|
53
53
|
key={"knob"}
|
54
54
|
className={cls(
|
55
55
|
"block rounded-full transition-transform duration-100 transform will-change-auto",
|
56
|
-
disabled ? "bg-
|
56
|
+
disabled ? "bg-surface-accent-400 dark:bg-surface-accent-600" : "bg-surface-accent-400 dark:bg-surface-accent-600",
|
57
57
|
{
|
58
58
|
"w-[21px] h-[10px]": size === "small" || size === "medium",
|
59
59
|
"w-[19px] h-[8px]": size === "smallest",
|
@@ -67,7 +67,7 @@ export const BooleanSwitch = React.forwardRef(function BooleanSwitch({
|
|
67
67
|
key={"knob"}
|
68
68
|
className={cls(
|
69
69
|
"block rounded-full transition-transform duration-100 transform will-change-auto",
|
70
|
-
disabled ? "bg-
|
70
|
+
disabled ? "bg-surface-accent-300 dark:bg-surface-accent-700" : (value ? "bg-white" : "bg-surface-accent-600 dark:bg-surface-accent-400"),
|
71
71
|
{
|
72
72
|
"w-[21px] h-[21px]": size === "small" || size === "medium",
|
73
73
|
"w-[19px] h-[19px]": size === "smallest",
|
@@ -39,21 +39,21 @@ const ButtonInner = React.forwardRef<
|
|
39
39
|
"border border-primary bg-primary hover:bg-primary-dark focus:ring-primary shadow hover:ring-1 hover:ring-primary text-white hover:text-white": variant === "filled" && color === "primary" && !disabled,
|
40
40
|
"border border-secondary bg-secondary hover:bg-secondary-dark focus:ring-secondary shadow hover:ring-1 hover:ring-secondary text-white hover:text-white": variant === "filled" && color === "secondary" && !disabled,
|
41
41
|
"border border-red-500 bg-red-500 hover:bg-red-500 focus:ring-red-500 shadow hover:ring-1 hover:ring-red-600 text-white hover:text-white": variant === "filled" && color === "error" && !disabled,
|
42
|
-
"border border-
|
42
|
+
"border border-surface-accent-200 bg-surface-accent-200 hover:bg-surface-accent-300 focus:ring-surface-accent-400 shadow hover:ring-1 hover:ring-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark": variant === "filled" && color === "text" && !disabled,
|
43
43
|
// Text Variants
|
44
|
-
"border border-transparent text-primary hover:text-primary hover:bg-
|
44
|
+
"border border-transparent text-primary hover:text-primary hover:bg-surface-accent-200 dark:hover:bg-surface-900": variant === "text" && color === "primary" && !disabled,
|
45
45
|
"border border-transparent text-secondary hover:text-secondary hover:bg-secondary-bg": variant === "text" && color === "secondary" && !disabled,
|
46
46
|
"border border-transparent text-red-500 hover:text-red-500 hover:bg-red-500 hover:bg-opacity-10": variant === "text" && color === "error" && !disabled,
|
47
|
-
"border border-transparent text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark hover:bg-
|
47
|
+
"border border-transparent text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:dark:text-text-primary-dark hover:bg-surface-accent-200 hover:dark:bg-surface-700": variant === "text" && color === "text" && !disabled,
|
48
48
|
// Outlined Variants
|
49
49
|
"border border-primary text-primary hover:text-primary hover:bg-primary-bg": variant === "outlined" && color === "primary" && !disabled,
|
50
50
|
"border border-secondary text-secondary hover:text-secondary hover:bg-secondary-bg": variant === "outlined" && color === "secondary" && !disabled,
|
51
51
|
"border border-red-500 text-red-500 hover:text-red-500 hover:bg-red-500 hover:text-white": variant === "outlined" && color === "error" && !disabled,
|
52
|
-
"border border-
|
52
|
+
"border border-surface-accent-400 text-text-primary hover:text-text-primary dark:text-text-primary-dark hover:bg-surface-accent-200": variant === "outlined" && color === "text" && !disabled,
|
53
53
|
// Disabled states for all variants
|
54
54
|
"border border-transparent opacity-50": variant === "text" && disabled,
|
55
|
-
"border border-
|
56
|
-
"border border-
|
55
|
+
"border border-surface-500 opacity-50": variant === "outlined" && disabled,
|
56
|
+
"border border-surface-500 bg-surface-500 opacity-50": variant === "filled" && disabled,
|
57
57
|
});
|
58
58
|
|
59
59
|
const sizeClasses = cls(
|
@@ -71,7 +71,7 @@ export const Checkbox = ({
|
|
71
71
|
padding ? paddingClasses[size] : "",
|
72
72
|
outerSizeClasses[size],
|
73
73
|
"inline-flex items-center justify-center text-sm font-medium focus:outline-none transition-colors ease-in-out duration-150",
|
74
|
-
onCheckedChange ? "rounded-full hover:bg-
|
74
|
+
onCheckedChange ? "rounded-full hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-700 dark:hover:bg-opacity-75" : "",
|
75
75
|
onCheckedChange ? "cursor-pointer" : "cursor-default"
|
76
76
|
)}>
|
77
77
|
<div
|
@@ -79,12 +79,12 @@ export const Checkbox = ({
|
|
79
79
|
"border-2 relative transition-colors ease-in-out duration-150",
|
80
80
|
sizeClasses[size],
|
81
81
|
disabled
|
82
|
-
? (indeterminate || isChecked ? "bg-
|
83
|
-
: (indeterminate || isChecked ? colorClasses[color] : "bg-white dark:bg-
|
84
|
-
(indeterminate || isChecked) ? "text-
|
82
|
+
? (indeterminate || isChecked ? "bg-surface-accent-400 dark:bg-surface-accent-600" : "bg-surface-accent-400 dark:bg-surface-accent-600")
|
83
|
+
: (indeterminate || isChecked ? colorClasses[color] : "bg-white dark:bg-surface-900"),
|
84
|
+
(indeterminate || isChecked) ? "text-surface-accent-100 dark:text-surface-accent-900" : "",
|
85
85
|
disabled
|
86
86
|
? "border-transparent"
|
87
|
-
: (indeterminate || isChecked ? "border-transparent" : "border-
|
87
|
+
: (indeterminate || isChecked ? "border-transparent" : "border-surface-accent-800 dark:border-surface-accent-200")
|
88
88
|
)}>
|
89
89
|
<CheckboxPrimitive.Indicator asChild>
|
90
90
|
{indeterminate
|
package/src/components/Chip.tsx
CHANGED
@@ -46,9 +46,9 @@ export function Chip({
|
|
46
46
|
<div
|
47
47
|
className={cls("rounded-lg max-w-full w-max h-fit font-regular inline-flex gap-1",
|
48
48
|
"text-ellipsis",
|
49
|
-
onClick ? "cursor-pointer hover:bg-
|
49
|
+
onClick ? "cursor-pointer hover:bg-surface-accent-300 hover:dark:bg-surface-accent-700" : "",
|
50
50
|
sizeClassNames[size],
|
51
|
-
error || !usedColorScheme ? "bg-
|
51
|
+
error || !usedColorScheme ? "bg-surface-accent-200 dark:bg-surface-accent-800 text-surface-accent-800 dark:text-white" : "",
|
52
52
|
error ? "text-red-500 dark:text-red-400" : "",
|
53
53
|
className)}
|
54
54
|
onClick={onClick}
|
@@ -35,7 +35,7 @@ export function CircularProgress({
|
|
35
35
|
sizeClasses,
|
36
36
|
borderClasses,
|
37
37
|
"inline-block animate-spin rounded-full border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",
|
38
|
-
"text-primary
|
38
|
+
"text-primary dark:text-primary",
|
39
39
|
className)}
|
40
40
|
role="status">
|
41
41
|
<span
|
@@ -155,7 +155,7 @@ export const DateTimeField: React.FC<DateTimeFieldProps> = ({
|
|
155
155
|
label ? "pt-8 pb-2" : "py-2",
|
156
156
|
inputClassName,
|
157
157
|
disabled &&
|
158
|
-
"border border-transparent outline-none opacity-50 dark:opacity-50 text-
|
158
|
+
"border border-transparent outline-none opacity-50 dark:opacity-50 text-surface-accent-600 dark:text-surface-accent-500"
|
159
159
|
)}
|
160
160
|
/>
|
161
161
|
<IconButton
|
@@ -163,14 +163,14 @@ export const DateTimeField: React.FC<DateTimeFieldProps> = ({
|
|
163
163
|
e.stopPropagation();
|
164
164
|
inputRef.current?.showPicker();
|
165
165
|
}}
|
166
|
-
className="absolute right-3 top-1/2 transform -translate-y-1/2 !text-
|
166
|
+
className="absolute right-3 top-1/2 transform -translate-y-1/2 !text-surface-accent-500"
|
167
167
|
>
|
168
168
|
<CalendarMonthIcon color={"disabled"}/>
|
169
169
|
</IconButton>
|
170
170
|
{clearable && value && (
|
171
171
|
<IconButton
|
172
172
|
onClick={handleClear}
|
173
|
-
className="absolute right-14 top-1/2 transform -translate-y-1/2 text-
|
173
|
+
className="absolute right-14 top-1/2 transform -translate-y-1/2 text-surface-accent-400 "
|
174
174
|
>
|
175
175
|
<ClearIcon/>
|
176
176
|
</IconButton>
|
@@ -99,7 +99,7 @@ export const Dialog = ({
|
|
99
99
|
"outline-none focus:outline-none",
|
100
100
|
fullWidth && !fullScreen ? "w-11/12" : undefined,
|
101
101
|
fullHeight && !fullScreen ? "h-full" : undefined,
|
102
|
-
"text-
|
102
|
+
"text-surface-accent-900 dark:text-white",
|
103
103
|
"justify-center items-center",
|
104
104
|
fullScreen ? "h-screen w-screen" : "max-h-[90vh] shadow-xl",
|
105
105
|
"ease-in-out duration-200",
|
@@ -19,7 +19,7 @@ export function DialogActions({
|
|
19
19
|
defaultBorderMixin,
|
20
20
|
"py-3 px-4 border-t flex flex-row items-center justify-end bottom-0 right-0 left-0 text-right z-2 gap-2",
|
21
21
|
position,
|
22
|
-
"bg-white bg-opacity-60 dark:bg-
|
22
|
+
"bg-white bg-opacity-60 dark:bg-surface-900 dark:bg-opacity-60",
|
23
23
|
translucent ? "backdrop-blur-sm" : "",
|
24
24
|
className)}>
|
25
25
|
{children}
|
@@ -94,7 +94,7 @@ export function ExpandablePanel({
|
|
94
94
|
<Collapsible.Trigger
|
95
95
|
className={cls(
|
96
96
|
"rounded-t flex items-center justify-between w-full min-h-[52px]",
|
97
|
-
"hover:bg-
|
97
|
+
"hover:bg-surface-accent-200 hover:bg-opacity-20 dark:hover:bg-surface-800 dark:hover:bg-opacity-20",
|
98
98
|
invisible ? "border-b px-2" : "p-4",
|
99
99
|
open ? "py-6" : "py-4",
|
100
100
|
"transition-all duration-200",
|
@@ -14,10 +14,10 @@ export type IconButtonProps<C extends React.ElementType> =
|
|
14
14
|
}
|
15
15
|
|
16
16
|
const buttonClasses =
|
17
|
-
"hover:bg-
|
17
|
+
"hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800";
|
18
18
|
const baseClasses =
|
19
19
|
"inline-flex items-center justify-center p-2 text-sm font-medium focus:outline-none transition-colors ease-in-out duration-150";
|
20
|
-
const colorClasses = "text-
|
20
|
+
const colorClasses = "text-surface-accent-600 visited:text-surface-accent-600 dark:text-surface-accent-300 dark:visited:text-surface-300";
|
21
21
|
const sizeClasses = {
|
22
22
|
medium: "w-10 !h-10 min-w-10 min-h-10",
|
23
23
|
small: "w-8 !h-8 min-w-8 min-h-8",
|
@@ -41,7 +41,7 @@ const IconButtonInner = <C extends React.ElementType = "button">({
|
|
41
41
|
...props
|
42
42
|
}: IconButtonProps<C>, ref: React.ForwardedRef<HTMLButtonElement>) => {
|
43
43
|
|
44
|
-
const bgClasses = variant === "ghost" ? "bg-transparent" : "bg-
|
44
|
+
const bgClasses = variant === "ghost" ? "bg-transparent" : "bg-surface-accent-200 bg-opacity-50 dark:bg-surface-950 dark:bg-opacity-50";
|
45
45
|
const Component: React.ElementType<any> = component || "button";
|
46
46
|
return (
|
47
47
|
<Component
|
package/src/components/Label.tsx
CHANGED
@@ -20,8 +20,8 @@ const Label = React.forwardRef<
|
|
20
20
|
ref={ref}
|
21
21
|
onClick={onClick}
|
22
22
|
className={cls("text-sm font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
23
|
-
border && "border border-
|
24
|
-
onClick && "hover:cursor-pointer hover:bg-
|
23
|
+
border && "border border-surface-300 dark:border-surface-700 rounded-md px-3 py-1.5",
|
24
|
+
onClick && "hover:cursor-pointer hover:bg-surface-200 dark:hover:bg-surface-800",
|
25
25
|
defaultBorderMixin, className)}
|
26
26
|
{...props}
|
27
27
|
/>
|
@@ -13,8 +13,8 @@ export interface MarkdownProps {
|
|
13
13
|
}
|
14
14
|
|
15
15
|
const proseClasses = {
|
16
|
-
small: "prose-sm
|
17
|
-
medium: "prose
|
16
|
+
small: "prose-sm typography-body2",
|
17
|
+
medium: "prose typography-body1",
|
18
18
|
large: "prose-lg",
|
19
19
|
xl: "prose-xl",
|
20
20
|
"2xl": "prose-2xl"
|
package/src/components/Menu.tsx
CHANGED
@@ -66,7 +66,7 @@ export function MenuItem({
|
|
66
66
|
// Dynamically adjusting the class based on the "dense" prop
|
67
67
|
const classNames = cls(
|
68
68
|
onClick && "cursor-pointer",
|
69
|
-
"rounded-md text-sm font-medium text-
|
69
|
+
"rounded-md text-sm font-medium text-surface-accent-700 dark:text-surface-accent-300 hover:bg-surface-accent-100 dark:hover:bg-surface-accent-900 flex items-center gap-4",
|
70
70
|
dense ? "px-3 py-1.5" : "px-4 py-2"
|
71
71
|
);
|
72
72
|
|
@@ -16,7 +16,7 @@ export function Menubar({
|
|
16
16
|
return (
|
17
17
|
<MenubarPrimitive.Root
|
18
18
|
onSelect={onSelect}
|
19
|
-
className={cls("z-10 flex bg-white dark:bg-
|
19
|
+
className={cls("z-10 flex bg-white dark:bg-surface-950 p-[3px] rounded-sm shadow-sm", className)}>
|
20
20
|
{children}
|
21
21
|
</MenubarPrimitive.Root>
|
22
22
|
)
|
@@ -44,7 +44,7 @@ export function MenubarTrigger({
|
|
44
44
|
return (
|
45
45
|
<MenubarPrimitive.Trigger
|
46
46
|
onSelect={onSelect}
|
47
|
-
className={cls("py-2 px-3 outline-none select-none font-medium leading-none rounded text-text-primary dark:text-text-primary-dark text-[13px] flex items-center justify-between gap-[2px] data-[highlighted]:bg-
|
47
|
+
className={cls("py-2 px-3 outline-none select-none font-medium leading-none rounded text-text-primary dark:text-text-primary-dark text-[13px] flex items-center justify-between gap-[2px] data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-800 data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-800 hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-700 dark:hover:bg-opacity-50",
|
48
48
|
className)}>
|
49
49
|
{children}
|
50
50
|
</MenubarPrimitive.Trigger>
|
@@ -80,7 +80,7 @@ export function MenubarContent({
|
|
80
80
|
return (
|
81
81
|
<MenubarPrimitive.Content
|
82
82
|
onSelect={onSelect}
|
83
|
-
className={cls("min-w-[220px] bg-white dark:bg-
|
83
|
+
className={cls("min-w-[220px] bg-white dark:bg-surface-950 rounded-md p-[6px] shadow-[0px_10px_38px_-10px_rgba(22,_23,_24,_0.35),_0px_10px_20px_-15px_rgba(22,_23,_24,_0.2)] [animation-duration:_400ms] [animation-timing-function:_cubic-bezier(0.16,_1,_0.3,_1)] will-change-[transform,opacity]", className)}
|
84
84
|
align={align ?? "start"}
|
85
85
|
sideOffset={sideOffset ?? 5}
|
86
86
|
alignOffset={alignOffset ?? -3}
|
@@ -108,7 +108,7 @@ export function MenubarItem({
|
|
108
108
|
return (
|
109
109
|
<MenubarPrimitive.Item
|
110
110
|
onSelect={onSelect}
|
111
|
-
className={cls("group text-[13px] leading-none rounded flex items-center h-[32px] px-[10px] py-[2px] relative select-none outline-none data-[state=open]:bg-
|
111
|
+
className={cls("group text-[13px] leading-none rounded flex items-center h-[32px] px-[10px] py-[2px] relative select-none outline-none data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-800 data-[state=open]:text-text-primary data-[state=open]:dark:text-text-primary-dark data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-800 data-[disabled]:text-text-disabled data-[disabled]:dark:text-text-disabled-dark data-[disabled]:pointer-events-none",
|
112
112
|
leftPadding ? "pl-5" : "",
|
113
113
|
disabled ? "pointer-events-none text-text-secondary dark:text-text-secondary-dark" : "text-text-primary dark:text-text-primary-dark",
|
114
114
|
className)}
|
@@ -130,7 +130,7 @@ export function MenubarSeparator({
|
|
130
130
|
}) {
|
131
131
|
return (
|
132
132
|
<MenubarPrimitive.Separator
|
133
|
-
className={cls("h-[1px] bg-
|
133
|
+
className={cls("h-[1px] bg-surface-accent-100 dark:bg-surface-800 m-[5px]", className)}
|
134
134
|
{...rest}
|
135
135
|
>
|
136
136
|
{children}
|
@@ -166,7 +166,7 @@ export function MenubarSubTrigger({
|
|
166
166
|
return (
|
167
167
|
<MenubarPrimitive.SubTrigger
|
168
168
|
onSelect={onSelect}
|
169
|
-
className={cls("group text-[13px] leading-none text-text-primary dark:text-text-primary-dark rounded flex items-center h-[32px] px-[10px] py-[2px] relative select-none outline-none data-[state=open]:bg-
|
169
|
+
className={cls("group text-[13px] leading-none text-text-primary dark:text-text-primary-dark rounded flex items-center h-[32px] px-[10px] py-[2px] relative select-none outline-none data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-800 data-[state=open]:text-text-primary data-[state=open]:dark:text-text-primary-dark data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-800 data-[disabled]:text-text-disabled data-[disabled]:dark:text-text-disabled-dark data-[disabled]:pointer-events-none",
|
170
170
|
className)}
|
171
171
|
{...rest}
|
172
172
|
>
|
@@ -191,7 +191,7 @@ export function MenubarSubContent({
|
|
191
191
|
<MenubarPrimitive.SubContent
|
192
192
|
onSelect={onSelect}
|
193
193
|
alignOffset={alignOffset ?? -5}
|
194
|
-
className={cls("min-w-[220px] bg-white dark:bg-
|
194
|
+
className={cls("min-w-[220px] bg-white dark:bg-surface-950 rounded-md p-[6px] shadow-[0px_10px_38px_-10px_rgba(22,_23,_24,_0.35),_0px_10px_20px_-15px_rgba(22,_23,_24,_0.2)] [animation-duration:_400ms] [animation-timing-function:_cubic-bezier(0.16,_1,_0.3,_1)] will-change-[transform,opacity]",
|
195
195
|
className)}
|
196
196
|
{...rest}
|
197
197
|
>
|
@@ -217,7 +217,7 @@ export function MenubarCheckboxItem({
|
|
217
217
|
return (
|
218
218
|
<MenubarPrimitive.CheckboxItem
|
219
219
|
onSelect={onSelect}
|
220
|
-
className={cls("text-[13px] leading-none text-text-primary dark:text-text-primary-dark rounded flex items-center h-[32px] px-[10px] py-[2px] relative select-none pl-5 outline-none data-[highlighted]:bg-
|
220
|
+
className={cls("text-[13px] leading-none text-text-primary dark:text-text-primary-dark rounded flex items-center h-[32px] px-[10px] py-[2px] relative select-none pl-5 outline-none data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-800 data-[disabled]:text-text-disabled data-[disabled]:dark:text-text-disabled-dark data-[disabled]:pointer-events-none",
|
221
221
|
className)}
|
222
222
|
checked={checked}
|
223
223
|
onCheckedChange={onCheckedChange}
|
@@ -286,7 +286,7 @@ export function MenubarRadioItem({
|
|
286
286
|
return (
|
287
287
|
<MenubarPrimitive.RadioItem
|
288
288
|
onSelect={onSelect}
|
289
|
-
className={cls("text-[13px] leading-none text-text-primary dark:text-text-primary-dark rounded flex items-center h-[32px] px-[10px] py-[2px] relative select-none pl-5 outline-none data-[highlighted]:bg-
|
289
|
+
className={cls("text-[13px] leading-none text-text-primary dark:text-text-primary-dark rounded flex items-center h-[32px] px-[10px] py-[2px] relative select-none pl-5 outline-none data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-800 data-[disabled]:text-text-disabled data-[disabled]:dark:text-text-disabled-dark data-[disabled]:pointer-events-none",
|
290
290
|
className)}
|
291
291
|
value={value}
|
292
292
|
{...rest}>
|
@@ -270,7 +270,7 @@ export const MultiSelect = React.forwardRef<
|
|
270
270
|
</button>
|
271
271
|
</PopoverPrimitive.Trigger>
|
272
272
|
<PopoverPrimitive.Content
|
273
|
-
className={cls("z-50 relative overflow-hidden border bg-white dark:bg-
|
273
|
+
className={cls("z-50 relative overflow-hidden border bg-white dark:bg-surface-900 rounded-lg w-[400px]", defaultBorderMixin)}
|
274
274
|
align="start"
|
275
275
|
sideOffset={8}
|
276
276
|
onEscapeKeyDown={() => onPopoverOpenChange(false)}
|
@@ -306,8 +306,8 @@ export const MultiSelect = React.forwardRef<
|
|
306
306
|
"m-1",
|
307
307
|
"ring-offset-transparent",
|
308
308
|
"p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2",
|
309
|
-
"aria-[selected=true]:bg-
|
310
|
-
"cursor-pointer p-2 rounded aria-[selected=true]:bg-
|
309
|
+
"aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900",
|
310
|
+
"cursor-pointer p-2 rounded aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900"
|
311
311
|
)
|
312
312
|
}
|
313
313
|
>
|
@@ -359,13 +359,13 @@ export function MultiSelectItem({
|
|
359
359
|
}}
|
360
360
|
className={cls(
|
361
361
|
"flex flex-row items-center gap-1.5",
|
362
|
-
isSelected ? "bg-
|
362
|
+
isSelected ? "bg-surface-accent-200 dark:bg-surface-accent-950" : "",
|
363
363
|
"cursor-pointer",
|
364
364
|
"m-1",
|
365
365
|
"ring-offset-transparent",
|
366
366
|
"p-1 rounded aria-[selected=true]:outline-none aria-[selected=true]:ring-2 aria-[selected=true]:ring-primary aria-[selected=true]:ring-opacity-75 aria-[selected=true]:ring-offset-2",
|
367
|
-
"aria-[selected=true]:bg-
|
368
|
-
"cursor-pointer p-2 rounded aria-[selected=true]:bg-
|
367
|
+
"aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900",
|
368
|
+
"cursor-pointer p-2 rounded aria-[selected=true]:bg-surface-accent-100 aria-[selected=true]:dark:bg-surface-accent-900",
|
369
369
|
className
|
370
370
|
)}
|
371
371
|
>
|
@@ -385,9 +385,9 @@ function InnerCheckBox({ checked }: { checked: boolean }) {
|
|
385
385
|
className={cls(
|
386
386
|
"border-2 relative transition-colors ease-in-out duration-150",
|
387
387
|
"w-4 h-4 rounded flex items-center justify-center",
|
388
|
-
(checked ? "bg-primary" : "bg-white dark:bg-
|
389
|
-
(checked) ? "text-
|
390
|
-
(checked ? "border-transparent" : "border-
|
388
|
+
(checked ? "bg-primary" : "bg-white dark:bg-surface-accent-900"),
|
389
|
+
(checked) ? "text-surface-accent-100 dark:text-surface-accent-900" : "",
|
390
|
+
(checked ? "border-transparent" : "border-surface-accent-800 dark:border-surface-accent-200")
|
391
391
|
)}>
|
392
392
|
{checked && <Icon iconKey={"check"} size={16} className={"absolute"}/>}
|
393
393
|
</div>
|
@@ -72,7 +72,7 @@ export function Popover({
|
|
72
72
|
avoidCollisions={avoidCollisions}>
|
73
73
|
|
74
74
|
{children}
|
75
|
-
<PopoverPrimitive.Arrow className="fill-white dark:fill-
|
75
|
+
<PopoverPrimitive.Arrow className="fill-white dark:fill-surface-accent-950"/>
|
76
76
|
</PopoverPrimitive.Content>
|
77
77
|
</PopoverPrimitive.Portal>
|
78
78
|
</PopoverPrimitive.Root>;
|
@@ -63,13 +63,13 @@ export function SearchBar({
|
|
63
63
|
onClick={onClick}
|
64
64
|
className={cls("relative",
|
65
65
|
large ? "h-14" : "h-[42px]",
|
66
|
-
"bg-
|
66
|
+
"bg-surface-accent-50 dark:bg-surface-800 border",
|
67
67
|
defaultBorderMixin,
|
68
68
|
"rounded-lg",
|
69
69
|
className)}>
|
70
70
|
<div
|
71
71
|
className="absolute p-0 px-4 h-full pointer-events-none flex items-center justify-center top-0">
|
72
|
-
{loading ? <CircularProgress size={"small"}/> : <SearchIcon className={"text-
|
72
|
+
{loading ? <CircularProgress size={"small"}/> : <SearchIcon className={"text-text-disabled dark:text-text-disabled-dark"}/>}
|
73
73
|
</div>
|
74
74
|
<input
|
75
75
|
value={searchText ?? ""}
|
@@ -87,7 +87,8 @@ export function SearchBar({
|
|
87
87
|
onBlur={() => setActive(false)}
|
88
88
|
className={cls(
|
89
89
|
(disabled || loading) && "pointer-events-none",
|
90
|
-
"
|
90
|
+
"placeholder-text-disabled dark:placeholder-text-disabled-dark",
|
91
|
+
"relative flex items-center rounded-lg transition-all bg-transparent outline-none appearance-none border-none",
|
91
92
|
"pl-12 h-full text-current ",
|
92
93
|
expandable ? (active ? "w-[220px]" : "w-[180px]") : "",
|
93
94
|
innerClassName
|
@@ -115,7 +115,7 @@ export const Select = forwardRef<HTMLDivElement, SelectProps>(({
|
|
115
115
|
"select-none rounded-md text-sm",
|
116
116
|
error ? "text-red-500 dark:text-red-600" : "focus:text-text-primary dark:focus:text-text-primary-dark",
|
117
117
|
error ? "border border-red-500 dark:border-red-600" : "",
|
118
|
-
disabled ? "text-
|
118
|
+
disabled ? "text-surface-accent-600 dark:text-surface-accent-400" : "text-surface-accent-800 dark:text-white",
|
119
119
|
"relative flex flex-row items-center",
|
120
120
|
inputClassName
|
121
121
|
)}>
|
@@ -159,7 +159,7 @@ export const Select = forwardRef<HTMLDivElement, SelectProps>(({
|
|
159
159
|
</div>
|
160
160
|
<SelectPrimitive.Portal>
|
161
161
|
<SelectPrimitive.Content position={position}
|
162
|
-
className={cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-
|
162
|
+
className={cls(focusedDisabled, "z-50 relative overflow-hidden border bg-white dark:bg-surface-900 p-2 rounded-lg", defaultBorderMixin)}>
|
163
163
|
<SelectPrimitive.Viewport className={"p-1"}
|
164
164
|
style={{ maxHeight: "var(--radix-select-content-available-height)" }}>
|
165
165
|
{children}
|
@@ -191,10 +191,10 @@ export function SelectItem({
|
|
191
191
|
disabled={disabled}
|
192
192
|
className={cls(
|
193
193
|
"w-full",
|
194
|
-
"relative flex items-center p-2 rounded-md text-sm text-
|
194
|
+
"relative flex items-center p-2 rounded-md text-sm text-surface-accent-700 dark:text-surface-accent-300",
|
195
195
|
"focus:z-10",
|
196
|
-
"data-[state=checked]:bg-
|
197
|
-
"data-[state=checked]:focus:bg-
|
196
|
+
"data-[state=checked]:bg-surface-accent-100 data-[state=checked]:dark:bg-surface-accent-800 focus:bg-surface-accent-100 dark:focus:bg-surface-950",
|
197
|
+
"data-[state=checked]:focus:bg-surface-accent-200 data-[state=checked]:dark:focus:bg-surface-950",
|
198
198
|
disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
199
199
|
"[&>*]:w-full",
|
200
200
|
"overflow-visible",
|
@@ -222,7 +222,7 @@ export function SelectGroup({
|
|
222
222
|
return <>
|
223
223
|
<SelectPrimitive.Group
|
224
224
|
className={cls(
|
225
|
-
"text-xs text-
|
225
|
+
"text-xs text-surface-accent-900 dark:text-white uppercase tracking-wider font-bold mt-6 first:mt-2",
|
226
226
|
"px-2 py-2",
|
227
227
|
className
|
228
228
|
)}>
|
@@ -15,12 +15,12 @@ export function Separator({
|
|
15
15
|
<SeparatorPrimitive.Root
|
16
16
|
decorative={decorative}
|
17
17
|
orientation="horizontal"
|
18
|
-
className={cls("dark:bg-opacity-80 dark:bg-
|
18
|
+
className={cls("dark:bg-opacity-80 dark:bg-surface-800 bg-surface-100 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px my-4", className)}/>
|
19
19
|
);
|
20
20
|
else
|
21
21
|
return (
|
22
22
|
<SeparatorPrimitive.Root
|
23
|
-
className={cls("dark:bg-opacity-80 dark:bg-
|
23
|
+
className={cls("dark:bg-opacity-80 dark:bg-surface-800 bg-surface-100 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px mx-4", className)}
|
24
24
|
decorative={decorative}
|
25
25
|
orientation="vertical"
|
26
26
|
/>
|
package/src/components/Sheet.tsx
CHANGED
@@ -66,7 +66,7 @@ export const Sheet: React.FC<SheetProps> = ({
|
|
66
66
|
className={cls(
|
67
67
|
"fixed inset-0 transition-opacity z-20 ease-in-out duration-100 backdrop-blur-sm",
|
68
68
|
"bg-black bg-opacity-50",
|
69
|
-
"dark:bg-
|
69
|
+
"dark:bg-surface-900 dark:bg-opacity-60",
|
70
70
|
displayed && open ? "opacity-100" : "opacity-0",
|
71
71
|
overlayClassName
|
72
72
|
)}
|
@@ -82,11 +82,11 @@ export const Sheet: React.FC<SheetProps> = ({
|
|
82
82
|
defaultBorderMixin,
|
83
83
|
"transform-gpu",
|
84
84
|
"will-change-transform",
|
85
|
-
"text-
|
85
|
+
"text-surface-accent-900 dark:text-white",
|
86
86
|
"fixed transform z-20 transition-all ease-in-out",
|
87
87
|
!displayed ? "duration-150" : "duration-100",
|
88
88
|
"outline-none focus:outline-none",
|
89
|
-
transparent ? "" : "shadow-md bg-white dark:bg-
|
89
|
+
transparent ? "" : "shadow-md bg-white dark:bg-surface-950",
|
90
90
|
side === "top" || side === "bottom" ? "w-full" : "h-full",
|
91
91
|
side === "left" || side === "top" ? "left-0 top-0" : "right-0 bottom-0",
|
92
92
|
displayed && open ? "opacity-100" : "opacity-50",
|