@firecms/ui 3.0.1 → 3.1.0-canary.9e89e98
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/README.md +9 -7
- package/dist/components/Card.d.ts +1 -1
- package/dist/components/ColorPicker.d.ts +30 -0
- package/dist/components/DateTimeField.d.ts +7 -0
- package/dist/components/Dialog.d.ts +2 -1
- package/dist/components/FileUpload.d.ts +1 -1
- package/dist/components/Menu.d.ts +2 -1
- package/dist/components/Menubar.d.ts +2 -1
- package/dist/components/MultiSelect.d.ts +1 -0
- package/dist/components/SearchBar.d.ts +11 -1
- package/dist/components/Select.d.ts +1 -0
- package/dist/components/Sheet.d.ts +1 -0
- package/dist/components/ToggleButtonGroup.d.ts +30 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/hooks/PortalContainerContext.d.ts +31 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/index.css +57 -6
- package/dist/index.es.js +1603 -935
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1603 -935
- package/dist/index.umd.js.map +1 -1
- package/dist/styles.d.ts +11 -11
- package/package.json +3 -3
- package/src/components/BooleanSwitch.tsx +3 -3
- package/src/components/Button.tsx +5 -5
- package/src/components/Card.tsx +7 -7
- package/src/components/Checkbox.tsx +1 -1
- package/src/components/ColorPicker.tsx +134 -0
- package/src/components/DateTimeField.tsx +123 -34
- package/src/components/Dialog.tsx +25 -16
- package/src/components/DialogActions.tsx +1 -1
- package/src/components/ExpandablePanel.tsx +1 -1
- package/src/components/FileUpload.tsx +25 -24
- package/src/components/IconButton.tsx +3 -2
- package/src/components/Menu.tsx +44 -30
- package/src/components/Menubar.tsx +14 -3
- package/src/components/MultiSelect.tsx +87 -68
- package/src/components/Popover.tsx +11 -3
- package/src/components/SearchBar.tsx +37 -19
- package/src/components/Select.tsx +30 -17
- package/src/components/Separator.tsx +2 -2
- package/src/components/Sheet.tsx +12 -3
- package/src/components/Slider.tsx +4 -4
- package/src/components/Table.tsx +1 -1
- package/src/components/Tabs.tsx +14 -17
- package/src/components/TextField.tsx +19 -8
- package/src/components/ToggleButtonGroup.tsx +67 -0
- package/src/components/Tooltip.tsx +9 -2
- package/src/components/index.tsx +2 -0
- package/src/hooks/PortalContainerContext.tsx +48 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useInjectStyles.tsx +12 -3
- package/src/index.css +57 -6
- package/src/styles.ts +11 -11
- package/src/util/cls.ts +1 -1
- package/tailwind.config.js +2 -3
package/src/index.css
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
|
+
@theme {
|
|
2
|
+
/* Font Families */
|
|
3
|
+
--font-sans: 'Rubik', 'Roboto', 'Helvetica', 'Arial', sans-serif;
|
|
4
|
+
--font-headers: 'Rubik', 'Roboto', 'Helvetica', 'Arial', sans-serif;
|
|
5
|
+
--font-mono: 'JetBrains Mono', 'Space Mono', 'Lucida Console', monospace;
|
|
6
|
+
|
|
7
|
+
/* Colors */
|
|
8
|
+
--color-primary: #0070F4;
|
|
9
|
+
--color-primary-light: oklch(from var(--color-primary) calc(l + 0.15) c h);
|
|
10
|
+
--color-primary-dark: oklch(from var(--color-primary) calc(l - 0.15) c h);
|
|
11
|
+
--color-secondary: #FF5B79;
|
|
12
|
+
--color-secondary-light: oklch(from var(--color-secondary) calc(l + 0.15) c h);
|
|
13
|
+
--color-secondary-dark: oklch(from var(--color-secondary) calc(l - 0.15) c h);
|
|
14
|
+
|
|
15
|
+
--color-primary-bg: oklch(from var(--color-primary) l c h / 0.1);
|
|
16
|
+
--color-secondary-bg: oklch(from var(--color-secondary) l c h / 0.1);
|
|
17
|
+
|
|
18
|
+
/* Field Colors */
|
|
19
|
+
--color-field-disabled: rgb(224 224 226);
|
|
20
|
+
--color-field-disabled-dark: rgb(35 35 37);
|
|
21
|
+
|
|
22
|
+
/* Text Colors */
|
|
23
|
+
--color-text-primary: rgba(0, 0, 0, 0.87);
|
|
24
|
+
--color-text-secondary: rgba(0, 0, 0, 0.52);
|
|
25
|
+
--color-text-disabled: rgba(0, 0, 0, 0.38);
|
|
26
|
+
--color-text-primary-dark: #ffffff;
|
|
27
|
+
--color-text-secondary-dark: rgba(255, 255, 255, 0.6);
|
|
28
|
+
--color-text-disabled-dark: rgba(255, 255, 255, 0.48);
|
|
29
|
+
|
|
30
|
+
/* Surface Colors */
|
|
31
|
+
--color-surface-50: #f8f8fc;
|
|
32
|
+
--color-surface-100: #e7e7eb;
|
|
33
|
+
--color-surface-200: #cfcfd6;
|
|
34
|
+
--color-surface-300: #b7b7bf;
|
|
35
|
+
--color-surface-400: #a0a0a9;
|
|
36
|
+
--color-surface-500: #87878f;
|
|
37
|
+
--color-surface-600: #6b6b74;
|
|
38
|
+
--color-surface-700: #454552;
|
|
39
|
+
--color-surface-800: #292934;
|
|
40
|
+
--color-surface-900: #18181c;
|
|
41
|
+
--color-surface-950: #101013;
|
|
42
|
+
|
|
43
|
+
/* Surface Accent Colors */
|
|
44
|
+
--color-surface-accent-50: #f8fafc;
|
|
45
|
+
--color-surface-accent-100: #f1f5f9;
|
|
46
|
+
--color-surface-accent-200: #e2e8f0;
|
|
47
|
+
--color-surface-accent-300: #cbd5e1;
|
|
48
|
+
--color-surface-accent-400: #94a3b8;
|
|
49
|
+
--color-surface-accent-500: #64748b;
|
|
50
|
+
--color-surface-accent-600: #475569;
|
|
51
|
+
--color-surface-accent-700: #334155;
|
|
52
|
+
--color-surface-accent-800: #1e293b;
|
|
53
|
+
--color-surface-accent-900: #0f172a;
|
|
54
|
+
--color-surface-accent-950: #020617;
|
|
55
|
+
}
|
|
56
|
+
|
|
1
57
|
/* Chrome, Safari and Opera */
|
|
2
58
|
.no-scrollbar::-webkit-scrollbar {
|
|
3
59
|
display: none;
|
|
@@ -63,12 +119,7 @@
|
|
|
63
119
|
@apply text-sm font-semibold uppercase;
|
|
64
120
|
}
|
|
65
121
|
|
|
66
|
-
|
|
67
122
|
:focus-visible {
|
|
68
|
-
@apply outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
a {
|
|
72
|
-
@apply text-blue-600 dark:text-blue-400 dark:hover:text-blue-600 hover:text-blue-800
|
|
123
|
+
@apply outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-transparent
|
|
73
124
|
}
|
|
74
125
|
|
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-surface-accent-100 focus:dark:bg-surface-800 focus:dark:bg-opacity-60";
|
|
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-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
|
|
11
|
-
export const cardClickableMixin = "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800 hover:ring-2 hover:ring-primary cursor-pointer";
|
|
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";
|
|
2
|
+
export const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-surface-accent-100 focus:dark:bg-surface-800 focus:dark:bg-opacity-60 focus:bg-surface-accent-100/70 dark:focus:bg-surface-800/60";
|
|
3
|
+
export const focusedClasses = "z-30 outline-hidden outline-none ring-2 ring-primary ring-opacity-75 ring-primary/75 ring-offset-2 ring-offset-transparent ";
|
|
4
|
+
export const fieldBackgroundMixin = "bg-opacity-50 bg-surface-accent-200 bg-surface-accent-200/50 dark:bg-surface-800 dark:bg-opacity-60 dark:bg-surface-800/60";
|
|
5
|
+
export const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-surface-accent-100 dark:bg-surface-800 dark:bg-opacity-0 bg-surface-accent-200/0 dark:bg-surface-800/0";
|
|
6
|
+
export const fieldBackgroundDisabledMixin = "dark:bg-surface-800 bg-opacity-50 dark:bg-opacity-90 bg-surface-accent-200/50 dark:bg-surface-800/90";
|
|
7
|
+
export const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-surface-700 dark:hover:bg-opacity-40 hover:bg-surface-accent-200/70 hover:dark:bg-surface-700/40";
|
|
8
|
+
export const defaultBorderMixin = "border-surface-200 border-opacity-40 dark:border-surface-700 dark:border-opacity-40 border-surface-200/40 dark:border-surface-700/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 border-surface-200/40 dark:border-surface-700/40";
|
|
10
|
+
export const cardMixin = "bg-white dark:bg-surface-950 rounded-md border border-surface-200/40 dark:border-surface-700/40 m-1 -p-1";
|
|
11
|
+
export const cardClickableMixin = "hover:bg-surface-accent-100 dark:hover:bg-surface-accent-800 hover:ring-2 hover:ring-primary cursor-pointer hover:bg-primary/20 dark:hover:bg-primary/10 ";
|
|
12
|
+
export const cardSelectedMixin = "bg-primary-bg dark:bg-primary-bg bg-opacity-30 bg-primary-bg/30 dark:bg-opacity-10 dark:bg-primary-bg/10 ring-1 ring-primary ring-opacity-75 ring-primary/75 bg-primary/10 dark:bg-primary/10 ring-1 ring-primary/75";
|
package/src/util/cls.ts
CHANGED
package/tailwind.config.js
CHANGED
|
@@ -36,9 +36,8 @@ export default {
|
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
38
|
colors: {
|
|
39
|
-
"primary": "var(--
|
|
40
|
-
"
|
|
41
|
-
"secondary": "var(--fcms-secondary)",
|
|
39
|
+
"primary": "var(--color-primary)",
|
|
40
|
+
"secondary": "var(--color-secondary)",
|
|
42
41
|
"field": {
|
|
43
42
|
"disabled": "rgb(224 224 226)",
|
|
44
43
|
"disabled-dark": "rgb(35 35 37)"
|