@firecms/ui 3.0.1 → 3.1.0-canary.02232f4

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.
Files changed (77) hide show
  1. package/README.md +9 -7
  2. package/dist/components/BooleanSwitchWithLabel.d.ts +2 -1
  3. package/dist/components/Card.d.ts +1 -1
  4. package/dist/components/Chip.d.ts +1 -1
  5. package/dist/components/ColorPicker.d.ts +30 -0
  6. package/dist/components/DateTimeField.d.ts +7 -0
  7. package/dist/components/Dialog.d.ts +2 -1
  8. package/dist/components/FileUpload.d.ts +1 -1
  9. package/dist/components/Menu.d.ts +2 -1
  10. package/dist/components/Menubar.d.ts +2 -1
  11. package/dist/components/MultiSelect.d.ts +2 -1
  12. package/dist/components/ResizablePanels.d.ts +16 -0
  13. package/dist/components/SearchBar.d.ts +11 -1
  14. package/dist/components/SearchableSelect.d.ts +48 -0
  15. package/dist/components/Select.d.ts +2 -1
  16. package/dist/components/Sheet.d.ts +1 -0
  17. package/dist/components/Tabs.d.ts +8 -1
  18. package/dist/components/ToggleButtonGroup.d.ts +30 -0
  19. package/dist/components/Tooltip.d.ts +18 -2
  20. package/dist/components/index.d.ts +4 -0
  21. package/dist/hooks/PortalContainerContext.d.ts +31 -0
  22. package/dist/hooks/index.d.ts +1 -0
  23. package/dist/hooks/useOutsideAlerter.d.ts +1 -1
  24. package/dist/icons/FirestoreIcon.d.ts +6 -0
  25. package/dist/icons/components/DatabaseIcon.d.ts +6 -0
  26. package/dist/icons/index.d.ts +2 -0
  27. package/dist/index.css +57 -6
  28. package/dist/index.es.js +2846 -1165
  29. package/dist/index.es.js.map +1 -1
  30. package/dist/index.umd.js +2846 -1165
  31. package/dist/index.umd.js.map +1 -1
  32. package/dist/styles.d.ts +11 -11
  33. package/package.json +7 -7
  34. package/src/components/BooleanSwitch.tsx +3 -3
  35. package/src/components/BooleanSwitchWithLabel.tsx +4 -0
  36. package/src/components/Button.tsx +6 -5
  37. package/src/components/Card.tsx +7 -7
  38. package/src/components/Checkbox.tsx +1 -1
  39. package/src/components/Chip.tsx +4 -3
  40. package/src/components/ColorPicker.tsx +134 -0
  41. package/src/components/DateTimeField.tsx +129 -35
  42. package/src/components/DebouncedTextField.tsx +3 -3
  43. package/src/components/Dialog.tsx +25 -16
  44. package/src/components/DialogActions.tsx +1 -1
  45. package/src/components/ExpandablePanel.tsx +1 -1
  46. package/src/components/FileUpload.tsx +25 -24
  47. package/src/components/IconButton.tsx +3 -2
  48. package/src/components/Menu.tsx +44 -30
  49. package/src/components/Menubar.tsx +14 -3
  50. package/src/components/MultiSelect.tsx +113 -77
  51. package/src/components/Popover.tsx +11 -3
  52. package/src/components/ResizablePanels.tsx +181 -0
  53. package/src/components/SearchBar.tsx +37 -19
  54. package/src/components/SearchableSelect.tsx +335 -0
  55. package/src/components/Select.tsx +86 -73
  56. package/src/components/Separator.tsx +2 -2
  57. package/src/components/Sheet.tsx +12 -3
  58. package/src/components/Skeleton.tsx +4 -2
  59. package/src/components/Slider.tsx +4 -4
  60. package/src/components/Table.tsx +1 -1
  61. package/src/components/Tabs.tsx +150 -37
  62. package/src/components/TextField.tsx +19 -8
  63. package/src/components/TextareaAutosize.tsx +77 -212
  64. package/src/components/ToggleButtonGroup.tsx +67 -0
  65. package/src/components/Tooltip.tsx +16 -8
  66. package/src/components/index.tsx +4 -0
  67. package/src/hooks/PortalContainerContext.tsx +48 -0
  68. package/src/hooks/index.ts +1 -0
  69. package/src/hooks/useInjectStyles.tsx +12 -3
  70. package/src/hooks/useOutsideAlerter.tsx +1 -1
  71. package/src/icons/FirestoreIcon.tsx +47 -0
  72. package/src/icons/components/DatabaseIcon.tsx +10 -0
  73. package/src/icons/index.ts +2 -0
  74. package/src/index.css +57 -6
  75. package/src/styles.ts +11 -11
  76. package/src/util/cls.ts +1 -1
  77. package/tailwind.config.js +2 -3
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { Icon, IconProps } from "../Icon";
3
+ /**
4
+ * @group Icons
5
+ */
6
+ export const DatabaseIcon = React.forwardRef<HTMLSpanElement, IconProps>((props, ref) => {
7
+ return <Icon {...props} iconKey={"database"} ref={ref}/>
8
+ });
9
+
10
+ DatabaseIcon.displayName = "DatabaseIcon";
@@ -3,6 +3,7 @@ export * from "./cool_icon_keys";
3
3
  export * from "./Icon";
4
4
  export * from "./GitHubIcon";
5
5
  export * from "./HandleIcon";
6
+ export * from "./FirestoreIcon";
6
7
  export * from "./components/_10kIcon";
7
8
  export * from "./components/_10mpIcon";
8
9
  export * from "./components/_11mpIcon";
@@ -522,6 +523,7 @@ export * from "./components/DataThresholdingIcon";
522
523
  export * from "./components/DataUsageIcon";
523
524
  export * from "./components/DatasetIcon";
524
525
  export * from "./components/DatasetLinkedIcon";
526
+ export * from "./components/DatabaseIcon";
525
527
  export * from "./components/DateRangeIcon";
526
528
  export * from "./components/DeblurIcon";
527
529
  export * from "./components/DeckIcon";
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-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-transparent
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 border border-surface-200 border-opacity-40 dark:border-transparent rounded-md dark:bg-surface-950 dark:border-surface-700 dark:border-opacity-40";
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
@@ -2,7 +2,7 @@ import { type ClassValue, clsx } from "clsx";
2
2
  import { twMerge } from "tailwind-merge";
3
3
 
4
4
  export function cls(...classes: ClassValue[]) {
5
- return twMerge(clsx(classes))
5
+ return twMerge(clsx(classes));
6
6
  }
7
7
 
8
8
  /**
@@ -36,9 +36,8 @@ export default {
36
36
  ]
37
37
  },
38
38
  colors: {
39
- "primary": "var(--fcms-primary)",
40
- "primary-bg": "var(--fcms-primary-bg)",
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)"