@noya-app/noya-designsystem 0.1.50 → 0.1.52

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 (56) hide show
  1. package/.turbo/turbo-build.log +10 -13
  2. package/CHANGELOG.md +19 -0
  3. package/dist/index.css +1 -1
  4. package/dist/index.d.mts +314 -203
  5. package/dist/index.d.ts +314 -203
  6. package/dist/index.js +6473 -12656
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.mjs +8399 -14605
  9. package/dist/index.mjs.map +1 -1
  10. package/package.json +15 -12
  11. package/postcss.config.js +7 -0
  12. package/src/components/ActionMenu.tsx +12 -5
  13. package/src/components/Banner.tsx +2 -2
  14. package/src/components/BaseToolbar.tsx +6 -2
  15. package/src/components/Breadcrumbs.tsx +32 -2
  16. package/src/components/Button.tsx +30 -19
  17. package/src/components/Chip.tsx +3 -0
  18. package/src/components/Collection.tsx +12 -3
  19. package/src/components/ColorSwatch.tsx +42 -0
  20. package/src/components/ColorSwatchControl.tsx +92 -0
  21. package/src/components/ComboboxMenu.tsx +10 -1
  22. package/src/components/Dialog.tsx +1 -1
  23. package/src/components/FillInputField.tsx +1 -1
  24. package/src/components/Grid.tsx +22 -12
  25. package/src/components/GridView.tsx +1 -1
  26. package/src/components/LabeledField.tsx +4 -1
  27. package/src/components/List.tsx +37 -26
  28. package/src/components/ListView.tsx +7 -4
  29. package/src/components/MediaThumbnail.tsx +63 -15
  30. package/src/components/Popover.tsx +1 -1
  31. package/src/components/SearchCompletionMenu.tsx +12 -12
  32. package/src/components/SegmentedControl.tsx +2 -2
  33. package/src/components/SelectionToolbar.tsx +70 -0
  34. package/src/components/Switch.tsx +1 -1
  35. package/src/components/Text.tsx +2 -2
  36. package/src/components/Toast.tsx +13 -7
  37. package/src/components/Toolbar.tsx +33 -11
  38. package/src/components/Tooltip.tsx +4 -2
  39. package/src/components/catppuccin/fileIcons.ts +2430 -0
  40. package/src/components/connected-users-menu/ConnectedUsersMenuLayout.tsx +3 -1
  41. package/src/components/file-explorer/FileExplorerLayout.tsx +12 -2
  42. package/src/components/internal/Menu.tsx +5 -4
  43. package/src/components/internal/MenuViewport.tsx +2 -0
  44. package/src/components/internal/TextInput.tsx +7 -2
  45. package/src/components/pipeline/PipelineResultLayout.tsx +18 -0
  46. package/src/contexts/DialogContext.tsx +20 -5
  47. package/src/index.css +103 -34
  48. package/src/index.tsx +3 -0
  49. package/src/theme/index.ts +7 -2
  50. package/src/theme/themeUtils.ts +10 -3
  51. package/src/utils/classNames.ts +4 -3
  52. package/src/utils/combobox.ts +18 -13
  53. package/src/utils/moveTreeItem.ts +4 -4
  54. package/tailwind.config.ts +2 -239
  55. package/tailwind.d.ts +1 -1
  56. package/tsup.config.ts +1 -4
@@ -1,246 +1,9 @@
1
+ import noyaConfig from "@noya-app/noya-tailwind-config";
1
2
  import containerQueries from "@tailwindcss/container-queries";
2
3
  import type { Config } from "tailwindcss";
3
4
 
4
5
  const config = {
5
- content: ["./src/**/*.{ts,tsx}"],
6
- corePlugins: {
7
- // disables @tailwind base global styles
8
- preflight: false,
9
- },
10
- theme: {
11
- extend: {
12
- colors: {
13
- "logo-fill": "var(--n-logo-fill)",
14
- "logo-highlight": "var(--n-logo-highlight)",
15
- background: "var(--n-background)",
16
- text: "var(--n-text)",
17
- "text-muted": "var(--n-text-muted)",
18
- "text-subtle": "var(--n-text-subtle)",
19
- "text-disabled": "var(--n-text-disabled)",
20
- "text-decorative-light": "var(--n-text-decorative-light)",
21
- "divider-subtle": "var(--n-divider-subtle)",
22
- divider: "var(--n-divider)",
23
- "divider-strong": "var(--n-divider-strong)",
24
- primary: "var(--n-primary)",
25
- "primary-light": "var(--n-primary-light)",
26
- "primary-pastel": "var(--n-primary-pastel)",
27
- secondary: "var(--n-secondary)",
28
- "secondary-light": "var(--n-secondary-light)",
29
- "secondary-pastel": "var(--n-secondary-pastel)",
30
- "secondary-bright": "var(--n-secondary-bright)",
31
- "input-background": "var(--n-input-background)",
32
- "input-background-light": "var(--n-input-background-light)",
33
- "list-view-hover-background": "var(--n-list-view-hover-background)",
34
- "list-view-thumbnail-background":
35
- "var(--n-list-view-thumbnail-background)",
36
- "code-background": "var(--n-code-background)",
37
- "code-background-dark": "var(--n-code-background-dark)",
38
- "selected-background": "var(--n-selected-background)",
39
- "breadcrumb-text": "var(--n-breadcrumb-text)",
40
- "breadcrumb-text-hover": "var(--n-breadcrumb-text-hover)",
41
- "breadcrumb-icon": "var(--n-breadcrumb-icon)",
42
- "canvas-background": "var(--n-canvas-background)",
43
- "canvas-grid": "var(--n-canvas-grid)",
44
- "sidebar-background": "var(--n-sidebar-background)",
45
- "sidebar-background-transparent":
46
- "var(--n-sidebar-background-transparent)",
47
- "popover-background": "var(--n-popover-background)",
48
- "popover-divider": "var(--n-popover-divider)",
49
- "listview-raised-background": "var(--n-listview-raised-background)",
50
- "listview-editing-background": "var(--n-listview-editing-background)",
51
- "slider-thumb-background": "var(--n-slider-thumb-background)",
52
- "slider-border": "var(--n-slider-border)",
53
- "segmented-control-item": "var(--n-segmented-control-item)",
54
- mask: "var(--n-mask)",
55
- "transparent-checker": "var(--n-transparent-checker)",
56
- scrollbar: "var(--n-scrollbar)",
57
- "placeholder-dots": "var(--n-placeholder-dots)",
58
- "drag-outline": "var(--n-drag-outline)",
59
- "active-background": "var(--n-active-background)",
60
- "thumbnail-background": "var(--n-thumbnail-background)",
61
- "thumbnail-shadow": "var(--n-thumbnail-shadow)",
62
- "inline-code-text": "var(--n-inline-code-text)",
63
- "inline-code-background": "var(--n-inline-code-background)",
64
- "text-link": "var(--n-text-link)",
65
- "text-link-focused": "var(--n-text-link-focused)",
66
- icon: "var(--n-icon)",
67
- "icon-selected": "var(--n-icon-selected)",
68
- warning: "var(--n-warning)",
69
- dot: "var(--n-dot)",
70
- "row-highlight": "var(--n-row-highlight)",
71
- "table-row-background": "var(--n-table-row-background)",
72
- "chip-primary-bg": "var(--n-chip-primary-bg)",
73
- "chip-secondary-bg": "var(--n-chip-secondary-bg)",
74
- "chip-error-bg": "var(--n-chip-error-bg)",
75
- "chip-default-bg": "var(--n-chip-default-bg)",
76
- "chip-primary-shadow": "var(--n-chip-primary-shadow)",
77
- "chip-secondary-shadow": "var(--n-chip-secondary-shadow)",
78
- "chip-error-shadow": "var(--n-chip-error-shadow)",
79
- "chip-default-shadow": "var(--n-chip-default-shadow)",
80
- "floating-button": "var(--n-floating-button)",
81
- "block-border": "var(--n-block-border)",
82
- "block-highlight": "var(--n-block-highlight)",
83
- },
84
- fontFamily: {
85
- sans: [
86
- "__Inter_6b0edc",
87
- "__Inter_Fallback_6b0edc",
88
- "-apple-system",
89
- "BlinkMacSystemFont",
90
- "Helvetica Neue",
91
- "Segoe UI",
92
- "Roboto",
93
- "Helvetica",
94
- "Arial",
95
- "sans-serif",
96
- ],
97
- mono: ["Menlo", "Monaco", "Consolas", "Courier New", "monospace"],
98
- },
99
- // Type scale
100
- // The last one, 0.85, I just eyeballed
101
- // old: typeScale = [3.052, 2.441, 1.953, 1.563, 1.25, 1, 0.85]; // Major third
102
- fontSize: {
103
- title: [
104
- "3.052rem", // 48.83px
105
- {
106
- lineHeight: "1.4",
107
- letterSpacing: "-0.05em",
108
- },
109
- ],
110
- subtitle: [
111
- "1.563rem", // 25px
112
- {
113
- lineHeight: "1.75",
114
- letterSpacing: "-0.05em",
115
- },
116
- ],
117
- heading1: [
118
- "1.953rem", // 31.25px
119
- {
120
- lineHeight: "1.6",
121
- letterSpacing: "-0.025em",
122
- },
123
- ],
124
- heading2: [
125
- "1.563rem", // 25px
126
- {
127
- lineHeight: "1.5",
128
- letterSpacing: "-0.025em",
129
- },
130
- ],
131
- heading3: [
132
- "1.25rem", // 20px
133
- {
134
- lineHeight: "1.4",
135
- letterSpacing: "-0.025em",
136
- },
137
- ],
138
- heading4: [
139
- "1rem", // 16px
140
- {
141
- lineHeight: "1.4",
142
- },
143
- ],
144
- heading5: [
145
- "0.85rem", // 13.6px
146
- {
147
- lineHeight: "1.4",
148
- },
149
- ],
150
- body: [
151
- "1", // 16px (1 = 1rem)
152
- {
153
- lineHeight: "1.4",
154
- },
155
- ],
156
- small: [
157
- "1", // 16px (1 = 1rem)
158
- {
159
- lineHeight: "19px",
160
- },
161
- ],
162
- code: [
163
- "90%", // 14.4px
164
- {
165
- lineHeight: "1.5",
166
- },
167
- ],
168
- button: [
169
- "0.8rem", // 12.8px
170
- {
171
- lineHeight: "1.4",
172
- letterSpacing: "-0.2px",
173
- },
174
- ],
175
- label: [
176
- "0.62rem", // 9.92px
177
- {
178
- lineHeight: "19px",
179
- letterSpacing: "-0.3px",
180
- },
181
- ],
182
- },
183
- spacing: {
184
- nano: "2px",
185
- micro: "4px",
186
- small: "8px",
187
- medium: "16px",
188
- large: "32px",
189
- xlarge: "64px",
190
- xxlarge: "128px",
191
- "inset-top": "var(--n-inset-top)",
192
- "sidebar-width": "var(--n-sidebar-width)",
193
- "toolbar-height": "var(--n-toolbar-height)",
194
- "toolbar-separator": "var(--n-toolbar-separator)",
195
- "inspector-h-separator": "var(--n-inspector-h-separator)",
196
- "inspector-v-separator": "var(--n-inspector-v-separator)",
197
- "dialog-padding": "var(--n-dialog-padding)",
198
- "input-height": "var(--n-input-height)",
199
- },
200
- keyframes: {
201
- spin: {
202
- "0%": { transform: "rotate(0deg)" },
203
- "100%": { transform: "rotate(360deg)" },
204
- },
205
- shimmer: {
206
- "0%": {
207
- backgroundPosition: "-200% 0",
208
- },
209
- "100%": {
210
- backgroundPosition: "200% 0",
211
- },
212
- },
213
- },
214
- animation: {
215
- spin: "spin 1s linear infinite",
216
- shimmer: "shimmer 6s infinite linear",
217
- },
218
- zIndex: {
219
- interactable: "var(--n-interactable-z-index)",
220
- label: "var(--n-label-z-index)",
221
- menu: "var(--n-menu-z-index)",
222
- },
223
- },
224
- },
225
- safelist: [
226
- "group",
227
- "group-hover:flex",
228
- "bg-row-highlight",
229
- "left-5",
230
- "right-6",
231
- "m-[0_-24px_0_-20px]",
232
- "p-[0_24px_0_20px]",
233
- "left-0",
234
- "border-divider-strong",
235
- "decoration-text-decorative-light",
236
- "underline",
237
- "-left-2.5",
238
- "-mr-2",
239
- "border-gray-200",
240
- "gap-1.5",
241
- "gap-toolbar-separator",
242
- "-mr-1",
243
- ],
6
+ ...noyaConfig,
244
7
  plugins: [containerQueries],
245
8
  } satisfies Config;
246
9
 
package/tailwind.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  // Get the config from your actual config file
2
- import tailwindConfig from "./tailwind.config";
2
+ import tailwindConfig from "@noya-app/noya-tailwind-config";
3
3
 
4
4
  type ExtractThemeTypes<T> = T extends { theme: { extend: infer E } }
5
5
  ? E
package/tsup.config.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { exec } from "child_process";
2
- import fixReactVirtualized from "esbuild-plugin-react-virtualized";
3
2
  import { defineConfig } from "tsup";
4
3
  import { promisify } from "util";
5
4
 
@@ -11,13 +10,11 @@ export default defineConfig({
11
10
  format: ["cjs", "esm"],
12
11
  dts: true,
13
12
  sourcemap: true,
14
- noExternal: ["react-virtualized"],
15
- esbuildPlugins: [fixReactVirtualized],
16
13
  async onSuccess() {
17
14
  // Build Tailwind CSS after successful tsup build
18
15
  try {
19
16
  const { stdout, stderr } = await execAsync(
20
- "tailwindcss -i ./src/index.css -o ./dist/index.css --minify"
17
+ "tailwindcss -i ./src/index.css -o ./dist/index.css --minify --postcss"
21
18
  );
22
19
  if (stdout) console.info(stdout);
23
20
  if (stderr) console.error(stderr);