@firecms/ui 3.0.0-beta.8 → 3.0.0-beta.9

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 (59) hide show
  1. package/dist/components/BooleanSwitch.d.ts +1 -1
  2. package/dist/components/Checkbox.d.ts +1 -1
  3. package/dist/components/Chip.d.ts +3 -2
  4. package/dist/components/DateTimeField.d.ts +2 -3
  5. package/dist/components/Dialog.d.ts +4 -1
  6. package/dist/components/Menu.d.ts +4 -1
  7. package/dist/components/Menubar.d.ts +19 -9
  8. package/dist/components/MultiSelect.d.ts +31 -16
  9. package/dist/components/Popover.d.ts +2 -1
  10. package/dist/components/RadioGroup.d.ts +1 -0
  11. package/dist/components/Select.d.ts +5 -9
  12. package/dist/components/Separator.d.ts +2 -1
  13. package/dist/components/Sheet.d.ts +4 -0
  14. package/dist/components/Table.d.ts +10 -10
  15. package/dist/components/Tooltip.d.ts +6 -2
  16. package/dist/components/_MultiSelect.d.ts +0 -0
  17. package/dist/icons/Icon.d.ts +1 -1
  18. package/dist/index.css +77 -0
  19. package/dist/index.es.js +13036 -13690
  20. package/dist/index.es.js.map +1 -1
  21. package/dist/index.umd.js +19684 -49
  22. package/dist/index.umd.js.map +1 -1
  23. package/dist/styles.d.ts +3 -3
  24. package/package.json +109 -106
  25. package/src/components/Avatar.tsx +0 -2
  26. package/src/components/BooleanSwitch.tsx +11 -11
  27. package/src/components/BooleanSwitchWithLabel.tsx +4 -4
  28. package/src/components/Button.tsx +6 -8
  29. package/src/components/Card.tsx +2 -2
  30. package/src/components/Checkbox.tsx +5 -5
  31. package/src/components/Chip.tsx +7 -4
  32. package/src/components/DateTimeField.tsx +30 -41
  33. package/src/components/Dialog.tsx +11 -2
  34. package/src/components/ExpandablePanel.tsx +3 -3
  35. package/src/components/FileUpload.tsx +1 -2
  36. package/src/components/IconButton.tsx +1 -3
  37. package/src/components/InputLabel.tsx +4 -2
  38. package/src/components/Menu.tsx +38 -26
  39. package/src/components/Menubar.tsx +42 -7
  40. package/src/components/MultiSelect.tsx +333 -164
  41. package/src/components/Popover.tsx +15 -13
  42. package/src/components/RadioGroup.tsx +1 -0
  43. package/src/components/SearchBar.tsx +1 -2
  44. package/src/components/Select.tsx +98 -119
  45. package/src/components/Separator.tsx +10 -4
  46. package/src/components/Sheet.tsx +39 -22
  47. package/src/components/Skeleton.tsx +1 -1
  48. package/src/components/Table.tsx +48 -30
  49. package/src/components/Tabs.tsx +2 -3
  50. package/src/components/TextField.tsx +2 -6
  51. package/src/components/Tooltip.tsx +26 -11
  52. package/src/components/Typography.tsx +14 -16
  53. package/src/components/_MultiSelect.tsx +222 -0
  54. package/src/icons/Icon.tsx +2 -2
  55. package/src/icons/icon_keys.ts +114 -1301
  56. package/src/index.css +77 -0
  57. package/src/scripts/generateIconKeys.ts +20 -10
  58. package/src/styles.ts +3 -3
  59. package/tailwind.config.js +3 -3
package/src/index.css ADDED
@@ -0,0 +1,77 @@
1
+ /* Chrome, Safari and Opera */
2
+ .no-scrollbar::-webkit-scrollbar {
3
+ display: none;
4
+ }
5
+
6
+ .no-scrollbar {
7
+ -ms-overflow-style: none; /* IE and Edge */
8
+ scrollbar-width: none; /* Firefox */
9
+ }
10
+
11
+ .typography-h1 {
12
+ @apply text-6xl font-headers font-light;
13
+ }
14
+
15
+ .typography-h2 {
16
+ @apply text-5xl font-headers font-light;
17
+ }
18
+
19
+ .typography-h3 {
20
+ @apply text-4xl font-headers font-normal;
21
+ }
22
+
23
+ .typography-h4 {
24
+ @apply text-3xl font-headers font-normal;
25
+ }
26
+
27
+ .typography-h5 {
28
+ @apply text-2xl font-headers font-normal;
29
+ }
30
+
31
+ .typography-h6 {
32
+ @apply text-xl font-headers font-medium;
33
+ }
34
+
35
+ .typography-subtitle1 {
36
+ @apply text-lg font-headers font-medium;
37
+ }
38
+
39
+ .typography-subtitle2 {
40
+ @apply text-base font-headers font-medium;
41
+ }
42
+
43
+ .typography-body1 {
44
+ }
45
+
46
+ .typography-body2 {
47
+ @apply text-sm;
48
+ }
49
+
50
+ .typography-caption {
51
+ @apply text-xs;
52
+ }
53
+
54
+ .typography-label {
55
+ @apply text-sm font-medium;
56
+ }
57
+
58
+ .typography-inherit {
59
+ @apply text-inherit;
60
+ }
61
+
62
+ .typography-button {
63
+ @apply text-sm font-medium;
64
+ }
65
+
66
+
67
+ :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
73
+ }
74
+
75
+ body {
76
+ @apply w-full min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col items-center justify-center;
77
+ }
@@ -2,17 +2,27 @@ import fs from "fs";
2
2
  import path from "path";
3
3
  import { fileURLToPath } from "url";
4
4
 
5
+ const extractIconKeys = (cssData: string): string[] => {
6
+ const iconKeys: string[] = [];
7
+ console.log("cssData", cssData);
8
+ const regex = /\.mi-(.*?)::before/g;
9
+ let match;
10
+
11
+ while ((match = regex.exec(cssData)) !== null) {
12
+ if (match[1]) {
13
+ iconKeys.push(match[1].replaceAll("-", "_"));
14
+ }
15
+ }
16
+
17
+ return iconKeys;
18
+ };
19
+
5
20
  //https://github.com/google/material-design-icons/blob/master/variablefont/MaterialSymbolsRounded%5BFILL%2CGRAD%2Copsz%2Cwght%5D.codepoints
6
- export function generateIconKeys() {
7
- return fetch("https://raw.githubusercontent.com/google/material-design-icons/master/variablefont/MaterialSymbolsRounded%5BFILL%2CGRAD%2Copsz%2Cwght%5D.codepoints")
8
- .then((response) => response.text())
9
- .then((text) => {
10
- const lines = text.split("\n");
11
- const words = lines.map((line) => line.split(" ")[0]);
12
- const keys = words.filter(Boolean).filter((word) => word !== "addchart");
13
- saveIconKeys(keys);
14
- return keys;
15
- });
21
+ export async function generateIconKeys() {
22
+ const cssData = await fs.promises.readFile("../../node_modules/material-icons/css/material-icons.css", 'utf-8');
23
+ const keys = extractIconKeys(cssData);
24
+ saveIconKeys(keys);
25
+ return keys;
16
26
  }
17
27
 
18
28
  function saveIconKeys(keys: string[]) {
package/src/styles.ts CHANGED
@@ -1,10 +1,10 @@
1
- export const focusedMixin = "focus-visible: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";
1
+ export const focusedDisabled = "focus-visible:ring-0 focus-visible:ring-offset-0";
2
2
  export const focusedInvisibleMixin = "focus:bg-opacity-70 focus:bg-slate-100 focus:dark:bg-gray-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
4
  export const fieldBackgroundMixin = "bg-opacity-50 bg-slate-200 dark:bg-gray-800 dark:bg-opacity-60";
5
5
  export const fieldBackgroundInvisibleMixin = "bg-opacity-0 bg-slate-100 dark:bg-gray-800 dark:bg-opacity-0";
6
- export const fieldBackgroundDisabledMixin = "dark:bg-gray-800 bg-opacity-80 dark:bg-opacity-90";
7
- export const fieldBackgroundHoverMixin = "hover:bg-opacity-70 dark:hover:bg-gray-700 dark:hover:bg-opacity-60";
6
+ export const fieldBackgroundDisabledMixin = "dark:bg-gray-800 bg-opacity-50 dark:bg-opacity-90";
7
+ export const fieldBackgroundHoverMixin = "hover:bg-opacity-50 dark:hover:bg-gray-700 dark:hover:bg-opacity-40";
8
8
  export const defaultBorderMixin = "border-gray-100 dark:border-gray-800 dark:border-opacity-80";
9
9
  export const paperMixin = "bg-white rounded-md dark:bg-gray-950 border dark:border-gray-800 dark:border-opacity-80 border-gray-100";
10
10
  export const cardMixin = "bg-white border border-gray-100 dark:border-transparent rounded-md dark:bg-gray-950 dark:border-gray-800 dark:border-opacity-50 m-1 -p-1";
@@ -58,9 +58,9 @@ export default {
58
58
  300: "#B7B7BF",
59
59
  400: "#A0A0A9",
60
60
  500: "#87878F",
61
- 600: "#6C6C75",
62
- 700: "#505058",
63
- 800: "#35353A",
61
+ 600: "#6B6B74",
62
+ 700: "#454552",
63
+ 800: "#292934",
64
64
  900: "#18181C",
65
65
  950: "#101013"
66
66
  }