@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
@@ -33,7 +33,7 @@ function SliderThumb(props: {
|
|
33
33
|
<SliderPrimitive.Thumb
|
34
34
|
className={cls({
|
35
35
|
"border-primary bg-primary hover:bg-primary-dark outline-none": !props.props.disabled,
|
36
|
-
"border-
|
36
|
+
"border-surface-accent-300 bg-surface-accent-300 dark:border-surface-700 dark:bg-surface-700": props.props.disabled
|
37
37
|
},
|
38
38
|
props.classes,
|
39
39
|
"focus-visible:ring-4 focus-visible:ring-primary focus-visible:ring-opacity-50",
|
@@ -47,7 +47,7 @@ function SliderThumb(props: {
|
|
47
47
|
className={cls(
|
48
48
|
"TooltipContent",
|
49
49
|
"max-w-lg leading-relaxed",
|
50
|
-
"z-50 rounded px-3 py-2 text-xs leading-none bg-
|
50
|
+
"z-50 rounded px-3 py-2 text-xs leading-none bg-surface-accent-700 dark:bg-surface-accent-800 bg-opacity-90 font-medium text-surface-accent-50 shadow-2xl select-none duration-400 ease-in transform opacity-100",
|
51
51
|
)}>
|
52
52
|
{props.props.value?.[props.index]}
|
53
53
|
</TooltipPrimitive.Content>
|
@@ -83,12 +83,12 @@ const Slider = React.forwardRef<
|
|
83
83
|
>
|
84
84
|
<SliderPrimitive.Track
|
85
85
|
style={{ height: size === "small" ? 4 : 8 }}
|
86
|
-
className={"relative w-full grow overflow-hidden rounded-full bg-
|
86
|
+
className={"relative w-full grow overflow-hidden rounded-full bg-surface-accent-300 bg-opacity-40 dark:bg-surface-700 dark:bg-opacity-40"}>
|
87
87
|
|
88
88
|
<SliderPrimitive.Range
|
89
89
|
className={cls("absolute h-full", {
|
90
90
|
"bg-primary": !props.disabled,
|
91
|
-
"bg-
|
91
|
+
"bg-surface-accent-300 dark:bg-surface-700": props.disabled,
|
92
92
|
})}
|
93
93
|
/>
|
94
94
|
</SliderPrimitive.Track>
|
package/src/components/Table.tsx
CHANGED
@@ -15,7 +15,7 @@ export const Table = ({
|
|
15
15
|
...rest
|
16
16
|
}: TableProps) => (
|
17
17
|
<table
|
18
|
-
className={cls("text-left text-
|
18
|
+
className={cls("text-left text-surface-800 dark:text-white rounded-md overflow-x-auto", className)}
|
19
19
|
style={style}
|
20
20
|
{...rest}
|
21
21
|
>
|
@@ -34,7 +34,7 @@ export const TableBody = ({
|
|
34
34
|
...rest
|
35
35
|
}: TableBodyProps) => (
|
36
36
|
<tbody
|
37
|
-
className={cls("bg-white dark:bg-
|
37
|
+
className={cls("bg-white dark:bg-surface-950 text-sm divide-y divide-surface-100 dark:divide-surface-700 dark:divide-opacity-70", className)}
|
38
38
|
{...rest}
|
39
39
|
>
|
40
40
|
{children}
|
@@ -55,8 +55,8 @@ export const TableHeader = ({
|
|
55
55
|
<tr
|
56
56
|
className={cls(
|
57
57
|
defaultBorderMixin,
|
58
|
-
"text-sm font-medium text-
|
59
|
-
"bg-
|
58
|
+
"text-sm font-medium text-surface-700 dark:text-surface-accent-300",
|
59
|
+
"bg-surface-accent-50 border-b dark:bg-surface-900",
|
60
60
|
className
|
61
61
|
)}
|
62
62
|
>
|
@@ -83,8 +83,8 @@ export const TableRow = ({
|
|
83
83
|
onClick={onClick}
|
84
84
|
style={style}
|
85
85
|
className={cls(
|
86
|
-
"bg-white dark:bg-
|
87
|
-
onClick ? "hover:bg-
|
86
|
+
"bg-white dark:bg-surface-950",
|
87
|
+
onClick ? "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800 cursor-pointer" : "",
|
88
88
|
className
|
89
89
|
)}
|
90
90
|
{...rest}
|
package/src/components/Tabs.tsx
CHANGED
@@ -18,7 +18,7 @@ export function Tabs({
|
|
18
18
|
|
19
19
|
return <TabsPrimitive.Root value={value} onValueChange={onValueChange}>
|
20
20
|
<TabsPrimitive.List className={cls(
|
21
|
-
"flex text-sm font-medium text-center text-
|
21
|
+
"flex text-sm font-medium text-center text-surface-accent-800 dark:text-white max-w-full overflow-auto no-scrollbar",
|
22
22
|
className)
|
23
23
|
}>
|
24
24
|
{children}
|
@@ -45,15 +45,15 @@ export function Tab({
|
|
45
45
|
"border-b-2 border-transparent",
|
46
46
|
"data-[state=active]:border-secondary",
|
47
47
|
disabled
|
48
|
-
? "text-
|
49
|
-
: cls("text-
|
50
|
-
"data-[state=active]:text-
|
51
|
-
"hover:text-
|
52
|
-
// disabled ? "text-
|
53
|
-
// "data-[state=active]:bg-
|
48
|
+
? "text-surface-accent-400 dark:text-surface-accent-500"
|
49
|
+
: cls("text-surface-accent-700 dark:text-surface-accent-300",
|
50
|
+
"data-[state=active]:text-surface-accent-900 data-[state=active]:dark:text-white",
|
51
|
+
"hover:text-surface-accent-800 dark:hover:text-surface-accent-200"),
|
52
|
+
// disabled ? "text-surface-accent-400 dark:text-surface-accent-500" : "data-[state=active]:text-primary",
|
53
|
+
// "data-[state=active]:bg-surface-accent-50 data-[state=active]:dark:bg-surface-accent-800",
|
54
54
|
className)}>
|
55
55
|
<div className={cls("uppercase inline-block p-2 px-4 m-2 rounded",
|
56
|
-
"hover:bg-
|
56
|
+
"hover:bg-surface-accent-200 hover:bg-opacity-75 dark:hover:bg-surface-accent-800")}>
|
57
57
|
{children}
|
58
58
|
</div>
|
59
59
|
</TabsPrimitive.Trigger>;
|
@@ -111,7 +111,7 @@ export function TextField<T extends string | number>({
|
|
111
111
|
className={cls(
|
112
112
|
invisible ? focusedInvisibleMixin : "",
|
113
113
|
"rounded-md resize-none w-full outline-none p-[32px] text-base bg-transparent min-h-[64px] px-3 pt-8",
|
114
|
-
disabled && "border border-transparent outline-none opacity-50 text-
|
114
|
+
disabled && "border border-transparent outline-none opacity-50 text-surface-accent-600 dark:text-surface-accent-500"
|
115
115
|
)}
|
116
116
|
/>
|
117
117
|
: <input
|
@@ -129,7 +129,7 @@ export function TextField<T extends string | number>({
|
|
129
129
|
label ? (size === "medium" ? "pt-8 pb-2" : "pt-4 pb-2") : "py-2",
|
130
130
|
focused ? "text-text-primary dark:text-text-primary-dark" : "",
|
131
131
|
endAdornment ? "pr-10" : "pr-3",
|
132
|
-
disabled && "border border-transparent outline-none opacity-50 dark:opacity-50 text-
|
132
|
+
disabled && "border border-transparent outline-none opacity-50 dark:opacity-50 text-surface-accent-800 dark:text-white",
|
133
133
|
inputClassName
|
134
134
|
)}
|
135
135
|
placeholder={focused || hasValue || !label ? placeholder : undefined}
|
@@ -64,14 +64,14 @@ export const Tooltip = ({
|
|
64
64
|
<TooltipPrimitive.Content
|
65
65
|
className={cls("TooltipContent",
|
66
66
|
"max-w-lg leading-relaxed",
|
67
|
-
"z-50 rounded px-3 py-2 text-xs leading-none bg-
|
67
|
+
"z-50 rounded px-3 py-2 text-xs leading-none bg-surface-accent-700 dark:bg-surface-accent-800 bg-opacity-90 font-medium text-surface-accent-50 shadow-2xl select-none duration-400 ease-in transform opacity-100",
|
68
68
|
tooltipClassName)}
|
69
69
|
style={tooltipStyle}
|
70
70
|
sideOffset={sideOffset === undefined ? 4 : sideOffset}
|
71
71
|
align={align}
|
72
72
|
side={side}>
|
73
73
|
{title}
|
74
|
-
{/*<TooltipPrimitive.Arrow className="fill-
|
74
|
+
{/*<TooltipPrimitive.Arrow className="fill-surface-accent-600"/>*/}
|
75
75
|
</TooltipPrimitive.Content>
|
76
76
|
</TooltipPrimitive.Portal>
|
77
77
|
</TooltipPrimitive.Root>
|
@@ -3,7 +3,7 @@ import { cls } from "../../util";
|
|
3
3
|
|
4
4
|
export function SelectInputLabel({ children, error }: { children: React.ReactNode, error?: boolean }) {
|
5
5
|
return <div className={cls("text-sm font-medium ml-3.5 mb-1",
|
6
|
-
error ? "text-red-500 dark:text-red-600" : "text-
|
6
|
+
error ? "text-red-500 dark:text-red-600" : "text-surface-accent-500 dark:text-surface-accent-300",)}>
|
7
7
|
{children}
|
8
8
|
</div>;
|
9
9
|
}
|
package/src/styles.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
export const focusedDisabled = "focus-visible:ring-0 focus-visible:ring-offset-0";
|
2
|
-
export const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-
|
2
|
+
export const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-surface-accent-100 focus:dark:bg-surface-800 focus:dark:bg-opacity-60";
|
3
3
|
export const focusedClasses = "z-30 outline-none ring-2 ring-primary ring-opacity-75 ring-offset-2 ring-offset-transparent ";
|
4
|
-
export const fieldBackgroundMixin = "bg-opacity-50 bg-
|
5
|
-
export const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-
|
6
|
-
export const fieldBackgroundDisabledMixin = "dark:bg-
|
7
|
-
export const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-
|
8
|
-
export const defaultBorderMixin = "border-
|
9
|
-
export const paperMixin = "bg-white rounded-md dark:bg-
|
10
|
-
export const cardMixin = "bg-white border border-
|
4
|
+
export const fieldBackgroundMixin = "bg-opacity-50 bg-surface-accent-200 dark:bg-surface-800 dark:bg-opacity-60";
|
5
|
+
export const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-surface-accent-100 dark:bg-surface-800 dark:bg-opacity-0";
|
6
|
+
export const fieldBackgroundDisabledMixin = "dark:bg-surface-800 bg-opacity-50 dark:bg-opacity-90";
|
7
|
+
export const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-surface-700 dark:hover:bg-opacity-40";
|
8
|
+
export const defaultBorderMixin = "border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40";
|
9
|
+
export 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 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 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 const cardSelectedMixin = "bg-primary-bg dark:bg-primary-bg bg-opacity-30 dark:bg-opacity-10 ring-1 ring-primary ring-opacity-75";
|
package/tailwind.config.js
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
import typography from "@tailwindcss/typography";
|
2
|
+
|
1
3
|
export default {
|
2
4
|
darkMode: ["selector", "[data-theme=\"dark\"]"],
|
3
5
|
mode: "jit",
|
@@ -7,7 +9,7 @@ export default {
|
|
7
9
|
"./node_modules/@firecms/**/*.{js,ts,jsx,tsx}"
|
8
10
|
],
|
9
11
|
plugins: [
|
10
|
-
|
12
|
+
typography
|
11
13
|
],
|
12
14
|
theme: {
|
13
15
|
extend: {
|
@@ -34,35 +36,46 @@ export default {
|
|
34
36
|
]
|
35
37
|
},
|
36
38
|
colors: {
|
37
|
-
primary: "var(--fcms-primary)",
|
38
|
-
"primary-dark": "var(--fcms-primary-dark)",
|
39
|
+
"primary": "var(--fcms-primary)",
|
39
40
|
"primary-bg": "var(--fcms-primary-bg)",
|
40
|
-
secondary: "var(--fcms-secondary)",
|
41
|
-
field: {
|
42
|
-
disabled: "rgb(224 224 226)",
|
41
|
+
"secondary": "var(--fcms-secondary)",
|
42
|
+
"field": {
|
43
|
+
"disabled": "rgb(224 224 226)",
|
43
44
|
"disabled-dark": "rgb(35 35 37)"
|
44
45
|
},
|
45
|
-
text: {
|
46
|
-
primary: "rgba(0, 0, 0, 0.87)",
|
46
|
+
"text": {
|
47
|
+
"primary": "rgba(0, 0, 0, 0.87)",
|
48
|
+
"secondary": "rgba(0, 0, 0, 0.55)",
|
49
|
+
"disabled": "rgba(0, 0, 0, 0.38)",
|
47
50
|
"primary-dark": "#ffffff",
|
48
|
-
secondary: "rgba(
|
49
|
-
"
|
50
|
-
disabled: "rgba(0, 0, 0, 0.38)",
|
51
|
-
"disabled-dark": "rgba(255, 255, 255, 0.5)",
|
52
|
-
label: "rgb(131, 131, 131)"
|
51
|
+
"secondary-dark": "rgba(255, 255, 255, 0.60)",
|
52
|
+
"disabled-dark": "rgba(255, 255, 255, 0.48)"
|
53
53
|
},
|
54
|
-
|
55
|
-
50: "#f8f8fc",
|
56
|
-
100: "#E7E7EB",
|
57
|
-
200: "#CFCFD6",
|
58
|
-
300: "#B7B7BF",
|
59
|
-
400: "#A0A0A9",
|
60
|
-
500: "#87878F",
|
61
|
-
600: "#6B6B74",
|
62
|
-
700: "#454552",
|
63
|
-
800: "#292934",
|
64
|
-
900: "#18181C",
|
65
|
-
950: "#101013"
|
54
|
+
"surface": {
|
55
|
+
"50": "#f8f8fc",
|
56
|
+
"100": "#E7E7EB",
|
57
|
+
"200": "#CFCFD6",
|
58
|
+
"300": "#B7B7BF",
|
59
|
+
"400": "#A0A0A9",
|
60
|
+
"500": "#87878F",
|
61
|
+
"600": "#6B6B74",
|
62
|
+
"700": "#454552",
|
63
|
+
"800": "#292934",
|
64
|
+
"900": "#18181C",
|
65
|
+
"950": "#101013"
|
66
|
+
},
|
67
|
+
"surface-accent": {
|
68
|
+
"50": "#f8fafc",
|
69
|
+
"100": "#f1f5f9",
|
70
|
+
"200": "#e2e8f0",
|
71
|
+
"300": "#cbd5e1",
|
72
|
+
"400": "#94a3b8",
|
73
|
+
"500": "#64748b",
|
74
|
+
"600": "#475569",
|
75
|
+
"700": "#334155",
|
76
|
+
"800": "#1e293b",
|
77
|
+
"900": "#0f172a",
|
78
|
+
"950": "#020617"
|
66
79
|
}
|
67
80
|
}
|
68
81
|
}
|