@nuee/registry 0.4.1 → 0.5.0

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 (68) hide show
  1. package/dist/index.d.ts +4 -0
  2. package/dist/index.js +59 -15
  3. package/dist/items/accordion.json +1 -5
  4. package/dist/items/alert-dialog.json +1 -1
  5. package/dist/items/aspect-ratio.json +1 -1
  6. package/dist/items/attachment.json +1 -1
  7. package/dist/items/avatar.json +1 -1
  8. package/dist/items/badge.json +1 -1
  9. package/dist/items/banner.json +1 -1
  10. package/dist/items/breadcrumb.json +1 -5
  11. package/dist/items/bubble.json +1 -1
  12. package/dist/items/button-group.json +1 -1
  13. package/dist/items/button.json +5 -1
  14. package/dist/items/calendar.json +15 -0
  15. package/dist/items/card.json +1 -1
  16. package/dist/items/carousel.json +18 -0
  17. package/dist/items/checkbox.json +1 -5
  18. package/dist/items/collapsible.json +1 -5
  19. package/dist/items/combobox.json +1 -5
  20. package/dist/items/content-row.json +5 -1
  21. package/dist/items/context-menu.json +1 -1
  22. package/dist/items/date-picker.json +19 -0
  23. package/dist/items/dialog.json +1 -5
  24. package/dist/items/drawer.json +1 -1
  25. package/dist/items/dropdown-menu.json +1 -5
  26. package/dist/items/empty.json +1 -1
  27. package/dist/items/field.json +9 -2
  28. package/dist/items/heading.json +18 -0
  29. package/dist/items/hover-card.json +1 -1
  30. package/dist/items/input-group.json +1 -1
  31. package/dist/items/input-otp.json +1 -1
  32. package/dist/items/input.json +5 -1
  33. package/dist/items/kbd.json +1 -1
  34. package/dist/items/label.json +5 -1
  35. package/dist/items/link.json +1 -5
  36. package/dist/items/marker.json +1 -1
  37. package/dist/items/menubar.json +1 -1
  38. package/dist/items/message.json +5 -2
  39. package/dist/items/native-select.json +1 -5
  40. package/dist/items/navigation-menu.json +1 -5
  41. package/dist/items/pagination.json +1 -5
  42. package/dist/items/popover.json +1 -1
  43. package/dist/items/progress.json +1 -1
  44. package/dist/items/radio-group.json +1 -1
  45. package/dist/items/scroll-area.json +1 -1
  46. package/dist/items/select.json +1 -5
  47. package/dist/items/separator.json +1 -1
  48. package/dist/items/skeleton.json +1 -1
  49. package/dist/items/slider.json +1 -1
  50. package/dist/items/spinner.json +1 -1
  51. package/dist/items/switch.json +5 -1
  52. package/dist/items/table.json +1 -1
  53. package/dist/items/tabs.json +1 -1
  54. package/dist/items/textarea.json +1 -1
  55. package/dist/items/timeline.json +14 -0
  56. package/dist/items/toast.json +6 -6
  57. package/dist/items/toggle-group.json +1 -1
  58. package/dist/items/toggle.json +1 -1
  59. package/dist/items/tooltip.json +1 -1
  60. package/dist/items.d.ts +26 -11
  61. package/dist/items.js +51 -31
  62. package/dist/styles/reset.css +0 -1
  63. package/dist/tokens/color-palette.stylex.ts +5 -4
  64. package/dist/tokens/semantic.stylex.ts +35 -4
  65. package/dist/tokens/themes.stylex.ts +38 -26
  66. package/package.json +2 -2
  67. package/dist/items/message-scroller.json +0 -21
  68. package/dist/items/typography.json +0 -14
package/dist/items.js CHANGED
@@ -1,6 +1,11 @@
1
1
  export const registryItems = {
2
+ heading: {
3
+ files: ["heading.tsx", "typography.ts"],
4
+ dependencies: ["@nuee/tokens", "@stylexjs/stylex"],
5
+ registryDependencies: [],
6
+ },
2
7
  accordion: {
3
- files: ["Icon.tsx", "accordion.tsx"],
8
+ files: ["accordion.tsx"],
4
9
  dependencies: ["@base-ui/react", "@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
5
10
  registryDependencies: [],
6
11
  },
@@ -35,7 +40,7 @@ export const registryItems = {
35
40
  registryDependencies: [],
36
41
  },
37
42
  breadcrumb: {
38
- files: ["Icon.tsx", "breadcrumb.tsx"],
43
+ files: ["breadcrumb.tsx"],
39
44
  dependencies: ["@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
40
45
  registryDependencies: [],
41
46
  },
@@ -45,7 +50,7 @@ export const registryItems = {
45
50
  registryDependencies: [],
46
51
  },
47
52
  button: {
48
- files: ["button.tsx"],
53
+ files: ["button.tsx", "control-layout.ts"],
49
54
  dependencies: ["@base-ui/react", "@nuee/tokens", "@stylexjs/stylex"],
50
55
  registryDependencies: [],
51
56
  },
@@ -59,18 +64,33 @@ export const registryItems = {
59
64
  dependencies: ["@nuee/tokens", "@stylexjs/stylex"],
60
65
  registryDependencies: [],
61
66
  },
67
+ calendar: {
68
+ files: ["calendar.tsx"],
69
+ dependencies: ["@daypicker/react", "@nuee/tokens", "@stylexjs/stylex"],
70
+ registryDependencies: [],
71
+ },
72
+ carousel: {
73
+ files: ["carousel.tsx"],
74
+ dependencies: [
75
+ "@nuee/tokens",
76
+ "@phosphor-icons/react",
77
+ "@stylexjs/stylex",
78
+ "embla-carousel-react",
79
+ ],
80
+ registryDependencies: ["button"],
81
+ },
62
82
  checkbox: {
63
- files: ["Icon.tsx", "checkbox.tsx"],
83
+ files: ["checkbox.tsx"],
64
84
  dependencies: ["@base-ui/react", "@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
65
85
  registryDependencies: [],
66
86
  },
67
87
  collapsible: {
68
- files: ["Icon.tsx", "collapsible.tsx"],
88
+ files: ["collapsible.tsx"],
69
89
  dependencies: ["@base-ui/react", "@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
70
90
  registryDependencies: [],
71
91
  },
72
92
  combobox: {
73
- files: ["Icon.tsx", "combobox.tsx"],
93
+ files: ["combobox.tsx"],
74
94
  dependencies: ["@base-ui/react", "@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
75
95
  registryDependencies: [],
76
96
  },
@@ -80,17 +100,22 @@ export const registryItems = {
80
100
  registryDependencies: ["dropdown-menu"],
81
101
  },
82
102
  dialog: {
83
- files: ["Icon.tsx", "dialog.tsx"],
103
+ files: ["dialog.tsx"],
84
104
  dependencies: ["@base-ui/react", "@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
85
105
  registryDependencies: [],
86
106
  },
107
+ "date-picker": {
108
+ files: ["date-picker.tsx"],
109
+ dependencies: ["@base-ui/react", "@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
110
+ registryDependencies: ["calendar", "popover"],
111
+ },
87
112
  drawer: {
88
113
  files: ["drawer.tsx"],
89
114
  dependencies: ["@base-ui/react", "@nuee/tokens", "@stylexjs/stylex"],
90
115
  registryDependencies: [],
91
116
  },
92
117
  "dropdown-menu": {
93
- files: ["Icon.tsx", "dropdown-menu.tsx"],
118
+ files: ["dropdown-menu.tsx"],
94
119
  dependencies: ["@base-ui/react", "@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
95
120
  registryDependencies: [],
96
121
  },
@@ -100,9 +125,9 @@ export const registryItems = {
100
125
  registryDependencies: [],
101
126
  },
102
127
  field: {
103
- files: ["field.tsx"],
128
+ files: ["field.tsx", "typography.ts"],
104
129
  dependencies: ["@base-ui/react", "@nuee/tokens", "@stylexjs/stylex"],
105
- registryDependencies: [],
130
+ registryDependencies: ["checkbox", "input"],
106
131
  },
107
132
  "hover-card": {
108
133
  files: ["hover-card.tsx"],
@@ -110,7 +135,7 @@ export const registryItems = {
110
135
  registryDependencies: [],
111
136
  },
112
137
  input: {
113
- files: ["input.tsx"],
138
+ files: ["input.tsx", "control-layout.ts"],
114
139
  dependencies: ["@base-ui/react", "@nuee/tokens", "@stylexjs/stylex"],
115
140
  registryDependencies: [],
116
141
  },
@@ -125,7 +150,7 @@ export const registryItems = {
125
150
  registryDependencies: [],
126
151
  },
127
152
  "content-row": {
128
- files: ["content-row.tsx"],
153
+ files: ["content-row.tsx", "typography.ts"],
129
154
  dependencies: ["@nuee/tokens", "@stylexjs/stylex"],
130
155
  registryDependencies: [],
131
156
  },
@@ -135,12 +160,12 @@ export const registryItems = {
135
160
  registryDependencies: [],
136
161
  },
137
162
  label: {
138
- files: ["label.tsx"],
163
+ files: ["label.tsx", "typography.ts"],
139
164
  dependencies: ["@nuee/tokens", "@stylexjs/stylex"],
140
165
  registryDependencies: [],
141
166
  },
142
167
  link: {
143
- files: ["Icon.tsx", "link.tsx"],
168
+ files: ["link.tsx"],
144
169
  dependencies: ["@base-ui/react", "@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
145
170
  registryDependencies: [],
146
171
  },
@@ -157,25 +182,20 @@ export const registryItems = {
157
182
  message: {
158
183
  files: ["message.tsx"],
159
184
  dependencies: ["@nuee/tokens", "@stylexjs/stylex"],
160
- registryDependencies: [],
161
- },
162
- "message-scroller": {
163
- files: ["Icon.tsx", "message-scroller.tsx"],
164
- dependencies: ["@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
165
- registryDependencies: ["button"],
185
+ registryDependencies: ["avatar", "bubble"],
166
186
  },
167
187
  "native-select": {
168
- files: ["Icon.tsx", "native-select.tsx"],
188
+ files: ["native-select.tsx"],
169
189
  dependencies: ["@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
170
190
  registryDependencies: [],
171
191
  },
172
192
  "navigation-menu": {
173
- files: ["Icon.tsx", "navigation-menu.tsx"],
193
+ files: ["navigation-menu.tsx"],
174
194
  dependencies: ["@base-ui/react", "@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
175
195
  registryDependencies: [],
176
196
  },
177
197
  pagination: {
178
- files: ["Icon.tsx", "pagination.tsx"],
198
+ files: ["pagination.tsx"],
179
199
  dependencies: ["@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
180
200
  registryDependencies: [],
181
201
  },
@@ -200,7 +220,7 @@ export const registryItems = {
200
220
  registryDependencies: [],
201
221
  },
202
222
  select: {
203
- files: ["Icon.tsx", "select.tsx"],
223
+ files: ["select.tsx"],
204
224
  dependencies: ["@base-ui/react", "@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
205
225
  registryDependencies: [],
206
226
  },
@@ -225,10 +245,15 @@ export const registryItems = {
225
245
  registryDependencies: [],
226
246
  },
227
247
  switch: {
228
- files: ["switch.tsx"],
248
+ files: ["switch.tsx", "control-layout.ts"],
229
249
  dependencies: ["@base-ui/react", "@nuee/tokens", "@stylexjs/stylex"],
230
250
  registryDependencies: [],
231
251
  },
252
+ timeline: {
253
+ files: ["timeline.tsx"],
254
+ dependencies: ["@nuee/tokens", "@stylexjs/stylex"],
255
+ registryDependencies: [],
256
+ },
232
257
  table: {
233
258
  files: ["table.tsx"],
234
259
  dependencies: ["@nuee/tokens", "@stylexjs/stylex"],
@@ -245,7 +270,7 @@ export const registryItems = {
245
270
  registryDependencies: [],
246
271
  },
247
272
  toast: {
248
- files: ["Icon.tsx", "toast.tsx", "toast.stylex.ts"],
273
+ files: ["toast.tsx", "toast.stylex.ts", "typography.ts"],
249
274
  dependencies: ["@base-ui/react", "@nuee/tokens", "@phosphor-icons/react", "@stylexjs/stylex"],
250
275
  registryDependencies: [],
251
276
  },
@@ -264,9 +289,4 @@ export const registryItems = {
264
289
  dependencies: ["@base-ui/react", "@nuee/tokens", "@stylexjs/stylex"],
265
290
  registryDependencies: [],
266
291
  },
267
- typography: {
268
- files: ["typography.tsx"],
269
- dependencies: ["@nuee/tokens", "@stylexjs/stylex"],
270
- registryDependencies: [],
271
- },
272
292
  };
@@ -37,7 +37,6 @@
37
37
  input,
38
38
  textarea,
39
39
  select {
40
- color: inherit;
41
40
  font: inherit;
42
41
  }
43
42
 
@@ -26,7 +26,7 @@ export const colorPalette = stylex.defineVars({
26
26
  primaryContrast: "oklch(24.353% 0 0)",
27
27
  primaryContrastDark: "oklch(93.846% 0.0041 121.56)",
28
28
  redWeak: "oklch(88.842% 0.0501 22.71)",
29
- redWeakDark: "oklch(79.615% 0.1170 24.47 / 24%)",
29
+ redWeakDark: "oklch(79.615% 0.1170 24.47 / 32%)",
30
30
  redMuted: "oklch(82.720% 0.0510 21.28)",
31
31
  redMutedDark: "oklch(71.697% 0.1767 23.77)",
32
32
  redSolid: "oklch(39.780% 0.1604 22.34)",
@@ -45,7 +45,7 @@ export const colorPalette = stylex.defineVars({
45
45
  orangeContrast: "oklch(39.668% 0.0989 54.41)",
46
46
  orangeContrastDark: "oklch(87.437% 0.0803 57.28)",
47
47
  yellowWeak: "oklch(89.932% 0.0846 84.60)",
48
- yellowWeakDark: "oklch(78.635% 0.1457 89.67 / 24%)",
48
+ yellowWeakDark: "oklch(78.635% 0.1457 89.67 / 32%)",
49
49
  yellowMuted: "oklch(82.759% 0.0996 85.33)",
50
50
  yellowMutedDark: "oklch(69.931% 0.1403 90)",
51
51
  yellowSolid: "oklch(39.679% 0.0811 89.57)",
@@ -55,7 +55,7 @@ export const colorPalette = stylex.defineVars({
55
55
  yellowFeedback: "oklch(48.284% 0.0987 90.04)",
56
56
  yellowBadge: "oklch(87.026% 0.1672 89.94)",
57
57
  greenWeak: "oklch(88.883% 0.0603 141.35)",
58
- greenWeakDark: "oklch(77.164% 0.1234 143.03 / 24%)",
58
+ greenWeakDark: "oklch(77.164% 0.1234 143.03 / 32%)",
59
59
  greenMuted: "oklch(82.794% 0.0607 140.55)",
60
60
  greenMutedDark: "oklch(68.460% 0.1219 143.49)",
61
61
  greenSolid: "oklch(39.780% 0.1319 141.35)",
@@ -74,7 +74,7 @@ export const colorPalette = stylex.defineVars({
74
74
  cyanContrast: "oklch(39.727% 0.0705 215.91)",
75
75
  cyanContrastDark: "oklch(86.361% 0.0691 217.16)",
76
76
  blueWeak: "oklch(88.873% 0.0494 253.08)",
77
- blueWeakDark: "oklch(78.788% 0.1067 269.17 / 24%)",
77
+ blueWeakDark: "oklch(78.788% 0.1067 269.17 / 32%)",
78
78
  blueMuted: "oklch(82.782% 0.0497 254.11)",
79
79
  blueMutedDark: "oklch(70.325% 0.1529 263.59)",
80
80
  blueSolid: "oklch(39.777% 0.1328 255.38)",
@@ -104,6 +104,7 @@ export const colorPalette = stylex.defineVars({
104
104
  alphaBlack10: "oklch(0% 0 0 / 10%)",
105
105
  alphaBlack20: "oklch(0% 0 0 / 20%)",
106
106
  alphaBlack30: "oklch(0% 0 0 / 30%)",
107
+ alphaBlack40: "oklch(0% 0 0 / 40%)",
107
108
  alphaBlack50: "oklch(0% 0 0 / 50%)",
108
109
  alphaBlack80: "oklch(0% 0 0 / 80%)",
109
110
  alphaWhite5: "oklch(100% 0 0 / 5%)",
@@ -6,11 +6,16 @@ export const colorVars = stylex.defineVars({
6
6
  bgCanvas: colorPalette.neutral100,
7
7
  bgSurface: colorPalette.neutral0,
8
8
  bgSurfacePressed: "oklch(97% 0 0)",
9
+ bgInverse: colorPalette.neutral950,
9
10
  bgSubtle: colorPalette.neutral50,
10
11
  bgRaised: colorPalette.neutral0,
11
12
  bgRaisedPressed: "oklch(97% 0 0)",
13
+ bgCurrent: colorPalette.alphaBlack6,
14
+ bgOverlay: colorPalette.alphaBlack40,
15
+ bgSkeleton: colorPalette.neutral200,
12
16
  bgActionPrimary: colorPalette.primarySolid,
13
17
  bgActionDestructive: colorPalette.redFeedback,
18
+ bgMessageOutgoing: colorPalette.primarySolid,
14
19
  bgFeedbackInfo: colorPalette.blueWeak,
15
20
  bgFeedbackSuccess: colorPalette.greenWeak,
16
21
  bgFeedbackWarning: colorPalette.yellowWeak,
@@ -18,10 +23,11 @@ export const colorVars = stylex.defineVars({
18
23
  fgPrimary: colorPalette.neutral950,
19
24
  fgSecondary: colorPalette.neutral600,
20
25
  fgTertiary: colorPalette.neutral500,
21
- fgDisabled: colorPalette.alphaBlack50,
26
+ fgDisabled: colorPalette.neutral500,
22
27
  fgInverse: colorPalette.neutral0,
23
28
  fgOnActionPrimary: colorPalette.neutral0,
24
29
  fgOnActionDestructive: colorPalette.neutral0,
30
+ fgOnMessageOutgoing: colorPalette.neutral0,
25
31
  fgAction: colorPalette.primarySolid,
26
32
  fgFeedbackInfo: colorPalette.blueSolid,
27
33
  fgFeedbackSuccess: colorPalette.greenFeedback,
@@ -37,16 +43,19 @@ export const colorVars = stylex.defineVars({
37
43
  strokeFeedbackError: colorPalette.redMuted,
38
44
  interactionDefault: "transparent",
39
45
  interactionHover: colorPalette.alphaBlack6,
40
- interactionPressed: "oklch(97% 0 0)",
46
+ // Translucent state layers preserve the underlying surface; press is stronger than hover.
47
+ interactionPressed: colorPalette.alphaBlack10,
41
48
  interactionSolidHover: colorPalette.alphaWhite10,
42
49
  interactionSolidPressed: colorPalette.alphaWhite20,
43
- interactionSelected: "oklch(97% 0 0)",
50
+ // Persistent selected surface for segmented controls, matching the explicit light theme.
51
+ interactionSelected: colorPalette.neutral0,
44
52
  interactionDisabled: colorPalette.alphaBlack8,
45
53
  interactionFocus: colorPalette.blueBadge,
46
54
  });
47
55
 
48
56
  export const spacingVars = stylex.defineVars({
49
57
  space0: "0",
58
+ space0_5: "0.125rem",
50
59
  space1: "0.25rem",
51
60
  space2: "0.5rem",
52
61
  space3: "0.75rem",
@@ -59,13 +68,19 @@ export const spacingVars = stylex.defineVars({
59
68
  });
60
69
 
61
70
  export const sizeVars = stylex.defineVars({
71
+ controlXs: "1.5rem",
62
72
  controlSm: "2rem",
63
73
  controlMd: "2.25rem",
64
74
  controlLg: "2.5rem",
75
+ iconXs: "0.75rem",
65
76
  iconSm: "0.875rem",
66
77
  iconMd: "1rem",
78
+ iconLg: "1.25rem",
79
+ contentXs: "18rem",
67
80
  contentSm: "24rem",
68
81
  contentMd: "32rem",
82
+ trackSm: "0.375rem",
83
+ trackMd: "0.5rem",
69
84
  touchTarget: "2.75rem",
70
85
  stroke: "0.0625rem",
71
86
  focusRing: "0.125rem",
@@ -75,6 +90,7 @@ export const radiusVars = stylex.defineVars({
75
90
  sm: "0.375rem",
76
91
  md: "0.5rem",
77
92
  lg: "0.75rem",
93
+ xl: "1rem",
78
94
  full: "9999px",
79
95
  });
80
96
 
@@ -84,8 +100,20 @@ export const shadowVars = stylex.defineVars({
84
100
  overlay: "0 4px 16px oklch(0% 0 0 / 12%)",
85
101
  });
86
102
 
103
+ export const layerVars = stylex.defineVars({
104
+ modalBackdrop: "50",
105
+ modal: "51",
106
+ popup: "60",
107
+ notification: "70",
108
+ });
109
+
87
110
  export const typographyVars = stylex.defineVars({
111
+ /** @deprecated Use fontFamilyBody or fontFamilyHeading instead. */
88
112
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',
113
+ fontFamilyBody:
114
+ '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',
115
+ fontFamilyHeading:
116
+ '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',
89
117
  fontSizeXs: "0.75rem",
90
118
  fontSizeSm: "0.875rem",
91
119
  fontSizeMd: "1rem",
@@ -99,13 +127,16 @@ export const typographyVars = stylex.defineVars({
99
127
  });
100
128
 
101
129
  export const opacityVars = stylex.defineVars({
102
- disabled: "0.8",
130
+ disabled: "0.6",
103
131
  });
104
132
 
105
133
  export const motionVars = stylex.defineVars({
134
+ durationInstant: "0.01ms",
106
135
  durationFast: "120ms",
107
136
  durationNormal: "180ms",
108
137
  durationSlow: "240ms",
138
+ durationLoading: "700ms",
139
+ durationLoadingReduced: "1.5s",
109
140
  easingStandard: "cubic-bezier(0.2, 0, 0, 1)",
110
141
  easingEnter: "cubic-bezier(0.16, 1, 0.3, 1)",
111
142
  easingExit: "cubic-bezier(0.4, 0, 1, 1)",
@@ -7,11 +7,16 @@ export const lightColorTheme = stylex.createTheme(colorVars, {
7
7
  bgCanvas: colorPalette.neutral100,
8
8
  bgSurface: colorPalette.neutral0,
9
9
  bgSurfacePressed: "oklch(97% 0 0)",
10
+ bgInverse: colorPalette.neutral950,
10
11
  bgSubtle: colorPalette.neutral50,
11
12
  bgRaised: colorPalette.neutral0,
12
13
  bgRaisedPressed: "oklch(97% 0 0)",
14
+ bgCurrent: colorPalette.alphaBlack6,
15
+ bgOverlay: colorPalette.alphaBlack40,
16
+ bgSkeleton: colorPalette.neutral200,
13
17
  bgActionPrimary: colorPalette.primarySolid,
14
18
  bgActionDestructive: colorPalette.redFeedback,
19
+ bgMessageOutgoing: colorPalette.primarySolid,
15
20
  bgFeedbackInfo: colorPalette.blueWeak,
16
21
  bgFeedbackSuccess: colorPalette.greenWeak,
17
22
  bgFeedbackWarning: colorPalette.yellowWeak,
@@ -19,10 +24,11 @@ export const lightColorTheme = stylex.createTheme(colorVars, {
19
24
  fgPrimary: colorPalette.neutral950,
20
25
  fgSecondary: colorPalette.neutral600,
21
26
  fgTertiary: colorPalette.neutral500,
22
- fgDisabled: colorPalette.alphaBlack50,
27
+ fgDisabled: colorPalette.neutral500,
23
28
  fgInverse: colorPalette.neutral0,
24
29
  fgOnActionPrimary: colorPalette.neutral0,
25
30
  fgOnActionDestructive: colorPalette.neutral0,
31
+ fgOnMessageOutgoing: colorPalette.neutral0,
26
32
  fgAction: colorPalette.primarySolid,
27
33
  fgFeedbackInfo: colorPalette.blueSolid,
28
34
  fgFeedbackSuccess: colorPalette.greenFeedback,
@@ -38,43 +44,49 @@ export const lightColorTheme = stylex.createTheme(colorVars, {
38
44
  strokeFeedbackError: colorPalette.redMuted,
39
45
  interactionDefault: "transparent",
40
46
  interactionHover: colorPalette.alphaBlack6,
41
- interactionPressed: "oklch(97% 0 0)",
47
+ interactionPressed: colorPalette.alphaBlack10,
42
48
  interactionSolidHover: colorPalette.alphaWhite10,
43
49
  interactionSolidPressed: colorPalette.alphaWhite20,
44
- interactionSelected: "oklch(97% 0 0)",
50
+ interactionSelected: colorPalette.neutral0,
45
51
  interactionDisabled: colorPalette.alphaBlack8,
46
52
  interactionFocus: colorPalette.blueBadge,
47
53
  });
48
54
 
49
55
  export const darkColorTheme = stylex.createTheme(colorVars, {
50
56
  bgCanvas: colorPalette.neutral950,
51
- bgSurface: colorPalette.alphaWhite5,
52
- bgSurfacePressed: colorPalette.alphaWhite10,
53
- bgSubtle: colorPalette.alphaWhite8,
54
- bgRaised: colorPalette.neutral850,
55
- bgRaisedPressed: colorPalette.neutral800,
56
- bgActionPrimary: colorPalette.primarySolidDark,
57
+ bgSurface: colorPalette.neutral900,
58
+ bgSurfacePressed: colorPalette.neutral800,
59
+ bgInverse: colorPalette.neutral800,
60
+ bgSubtle: colorPalette.neutral850,
61
+ bgRaised: colorPalette.neutral800,
62
+ bgRaisedPressed: colorPalette.neutral700,
63
+ bgCurrent: colorPalette.alphaWhite8,
64
+ bgOverlay: colorPalette.alphaBlack40,
65
+ bgSkeleton: colorPalette.neutral700,
66
+ bgActionPrimary: colorPalette.neutral100,
57
67
  bgActionDestructive: colorPalette.redFeedback,
68
+ bgMessageOutgoing: colorPalette.neutral100,
58
69
  bgFeedbackInfo: colorPalette.blueWeakDark,
59
70
  bgFeedbackSuccess: colorPalette.greenWeakDark,
60
71
  bgFeedbackWarning: colorPalette.yellowWeakDark,
61
72
  bgFeedbackError: colorPalette.redWeakDark,
62
- fgPrimary: colorPalette.neutral50,
63
- fgSecondary: colorPalette.neutral300,
64
- fgTertiary: colorPalette.neutral400,
65
- fgDisabled: colorPalette.alphaWhite50,
66
- fgInverse: colorPalette.neutral950,
73
+ fgPrimary: colorPalette.neutral100,
74
+ fgSecondary: colorPalette.neutral400,
75
+ fgTertiary: colorPalette.neutral500,
76
+ fgDisabled: colorPalette.neutral500,
77
+ fgInverse: colorPalette.neutral200,
67
78
  fgOnActionPrimary: colorPalette.neutral950,
68
- fgOnActionDestructive: colorPalette.neutral0,
69
- fgAction: colorPalette.primaryContrastDark,
79
+ fgOnActionDestructive: colorPalette.neutral200,
80
+ fgOnMessageOutgoing: colorPalette.neutral950,
81
+ fgAction: colorPalette.primarySolidDark,
70
82
  fgFeedbackInfo: colorPalette.blueContrastDark,
71
83
  fgFeedbackSuccess: colorPalette.greenContrastDark,
72
84
  fgFeedbackWarning: colorPalette.yellowContrastDark,
73
85
  fgFeedbackError: colorPalette.redContrastDark,
74
- strokeDefault: colorPalette.neutral700,
75
- strokeStrong: colorPalette.neutral600,
76
- strokeFocus: colorPalette.blueSolidDark,
77
- strokeAction: colorPalette.primarySolidDark,
86
+ strokeDefault: colorPalette.neutral800,
87
+ strokeStrong: colorPalette.neutral700,
88
+ strokeFocus: colorPalette.blueBadge,
89
+ strokeAction: colorPalette.neutral100,
78
90
  strokeFeedbackInfo: colorPalette.blueMutedDark,
79
91
  strokeFeedbackSuccess: colorPalette.greenMutedDark,
80
92
  strokeFeedbackWarning: colorPalette.yellowMutedDark,
@@ -84,9 +96,9 @@ export const darkColorTheme = stylex.createTheme(colorVars, {
84
96
  interactionPressed: colorPalette.alphaWhite10,
85
97
  interactionSolidHover: colorPalette.alphaBlack10,
86
98
  interactionSolidPressed: colorPalette.alphaBlack20,
87
- interactionSelected: colorPalette.primaryWeakDark,
88
- interactionDisabled: colorPalette.alphaWhite10,
89
- interactionFocus: colorPalette.blueSolidDark,
99
+ interactionSelected: colorPalette.neutral800,
100
+ interactionDisabled: colorPalette.neutral700,
101
+ interactionFocus: colorPalette.blueBadge,
90
102
  });
91
103
 
92
104
  export const lightShadowTheme = stylex.createTheme(shadowVars, {
@@ -96,7 +108,7 @@ export const lightShadowTheme = stylex.createTheme(shadowVars, {
96
108
  });
97
109
 
98
110
  export const darkShadowTheme = stylex.createTheme(shadowVars, {
99
- subtle: "0 1px 4px oklch(0% 0 0 / 50%)",
100
- floating: "0 2px 10px oklch(0% 0 0 / 68%)",
101
- overlay: "0 4px 16px oklch(0% 0 0 / 80%)",
111
+ subtle: "0 0 0 1px oklch(100% 0 0 / 6%), 0 1px 4px oklch(0% 0 0 / 36%)",
112
+ floating: "0 0 0 1px oklch(100% 0 0 / 8%), 0 8px 24px oklch(0% 0 0 / 52%)",
113
+ overlay: "0 0 0 1px oklch(100% 0 0 / 10%), 0 16px 40px oklch(0% 0 0 / 64%)",
102
114
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuee/registry",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "access": "public"
19
19
  },
20
20
  "devDependencies": {
21
- "@types/node": "^22.20.1",
21
+ "@types/node": "26.4.1",
22
22
  "typescript": "7.0.2"
23
23
  },
24
24
  "scripts": {
@@ -1,21 +0,0 @@
1
- {
2
- "name": "message-scroller",
3
- "primaryExport": "MessageScroller",
4
- "files": [
5
- {
6
- "content": "import type { Icon as PhosphorIcon, IconProps as PhosphorIconProps } from \"@phosphor-icons/react\";\nimport {\n ArrowDownIcon,\n ArrowSquareOutIcon,\n ArrowsDownUpIcon,\n ArrowUpIcon,\n CalendarIcon,\n CaretDoubleLeftIcon,\n CaretDoubleRightIcon,\n CaretDownIcon,\n CaretLeftIcon,\n CaretRightIcon,\n CaretUpIcon,\n CaretUpDownIcon,\n CheckCircleIcon,\n CheckIcon,\n ChecksIcon,\n ClockIcon,\n ColumnsIcon,\n CopyIcon,\n DotsThreeIcon,\n EyeSlashIcon,\n FileIcon,\n FolderIcon,\n FunnelIcon,\n GitBranchIcon,\n InfoIcon,\n ListIcon,\n MagnifyingGlassIcon,\n MicrophoneIcon,\n PaperclipIcon,\n DownloadSimpleIcon,\n StopIcon,\n WarningIcon,\n WrenchIcon,\n XCircleIcon,\n XIcon,\n} from \"@phosphor-icons/react\";\n\nexport const iconRegistry = {\n close: XIcon,\n chevronDown: CaretDownIcon,\n chevronLeft: CaretLeftIcon,\n chevronRight: CaretRightIcon,\n chevronUp: CaretUpIcon,\n chevronsLeft: CaretDoubleLeftIcon,\n chevronsRight: CaretDoubleRightIcon,\n caretUpDown: CaretUpDownIcon,\n check: CheckIcon,\n success: CheckCircleIcon,\n error: XCircleIcon,\n warning: WarningIcon,\n info: InfoIcon,\n calendar: CalendarIcon,\n clock: ClockIcon,\n externalLink: ArrowSquareOutIcon,\n menu: ListIcon,\n moreHorizontal: DotsThreeIcon,\n search: MagnifyingGlassIcon,\n arrowUp: ArrowUpIcon,\n arrowDown: ArrowDownIcon,\n arrowsUpDown: ArrowsDownUpIcon,\n funnel: FunnelIcon,\n eyeSlash: EyeSlashIcon,\n viewColumns: ColumnsIcon,\n copy: CopyIcon,\n checkDouble: ChecksIcon,\n wrench: WrenchIcon,\n stop: StopIcon,\n microphone: MicrophoneIcon,\n folder: FolderIcon,\n file: FileIcon,\n paperclip: PaperclipIcon,\n download: DownloadSimpleIcon,\n branch: GitBranchIcon,\n} satisfies Record<string, PhosphorIcon>;\n\nexport type IconName = keyof typeof iconRegistry;\n\nexport type IconProps = PhosphorIconProps & {\n name: IconName;\n};\n\nexport function Icon({ name, weight = \"regular\", ...props }: IconProps) {\n const IconComponent = iconRegistry[name];\n\n return <IconComponent {...props} weight={weight} />;\n}\n",
7
- "path": "Icon.tsx"
8
- },
9
- {
10
- "content": "import * as stylex from \"@stylexjs/stylex\";\nimport { type ComponentProps, type ReactNode, useEffect, useRef, useState } from \"react\";\n\nimport { Button } from \"./button\";\nimport { Icon } from \"./Icon\";\nimport { colorVars, motionVars, radiusVars, spacingVars } from \"@nuee/tokens/semantic.stylex\";\n\nconst styles = stylex.create({\n root: { minHeight: 0, overflow: \"hidden\", position: \"relative\" },\n viewport: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: spacingVars.space4,\n height: \"100%\",\n overflowY: \"auto\",\n overscrollBehavior: \"contain\",\n scrollBehavior: \"smooth\",\n scrollbarColor: `${colorVars.strokeStrong} transparent`,\n \"@media (prefers-reduced-motion: reduce)\": { scrollBehavior: \"auto\" },\n },\n action: {\n borderRadius: radiusVars.full,\n bottom: spacingVars.space3,\n left: \"50%\",\n minWidth: \"2rem\",\n opacity: 1,\n position: \"absolute\",\n transform: \"translateX(-50%)\",\n transitionDuration: motionVars.durationNormal,\n transitionProperty: \"opacity, transform\",\n },\n});\n\nexport type MessageScrollerProps = ComponentProps<\"div\"> & {\n children: ReactNode;\n /** Keeps the latest message in view when new messages are added. @default true */\n followOutput?: boolean;\n scrollLabel?: string;\n xstyle?: stylex.StyleXStyles;\n};\n\nexport function MessageScroller({\n children,\n followOutput = true,\n scrollLabel = \"Scroll to latest message\",\n xstyle,\n ...props\n}: MessageScrollerProps) {\n const viewportRef = useRef<HTMLDivElement>(null);\n const [isAtEnd, setIsAtEnd] = useState(true);\n\n useEffect(() => {\n if (followOutput && isAtEnd)\n viewportRef.current?.scrollTo({ top: viewportRef.current.scrollHeight });\n }, [children, followOutput, isAtEnd]);\n\n const resolved = stylex.props(styles.root, xstyle);\n return (\n <div {...props} {...resolved}>\n <div\n ref={viewportRef}\n {...stylex.props(styles.viewport)}\n onScroll={(event) => {\n const target = event.currentTarget;\n setIsAtEnd(target.scrollHeight - target.scrollTop - target.clientHeight < 4);\n }}\n >\n {children}\n </div>\n {!isAtEnd ? (\n <Button\n aria-label={scrollLabel}\n size=\"sm\"\n variant=\"secondary\"\n xstyle={styles.action}\n onClick={() =>\n viewportRef.current?.scrollTo({\n behavior: \"smooth\",\n top: viewportRef.current.scrollHeight,\n })\n }\n >\n <Icon name=\"arrowDown\" />\n </Button>\n ) : null}\n </div>\n );\n}\n",
11
- "path": "message-scroller.tsx"
12
- }
13
- ],
14
- "dependencies": [
15
- "@phosphor-icons/react",
16
- "@stylexjs/stylex"
17
- ],
18
- "registryDependencies": [
19
- "button"
20
- ]
21
- }
@@ -1,14 +0,0 @@
1
- {
2
- "name": "typography",
3
- "primaryExport": "Typography",
4
- "files": [
5
- {
6
- "content": "import * as stylex from \"@stylexjs/stylex\";\nimport { createElement, type HTMLAttributes } from \"react\";\n\nimport { colorVars, radiusVars, spacingVars, typographyVars } from \"@nuee/tokens/semantic.stylex\";\n\nconst styles = stylex.create({\n root: { color: colorVars.fgPrimary, fontFamily: typographyVars.fontFamily, margin: 0 },\n display: {\n fontSize: \"2rem\",\n fontWeight: typographyVars.fontWeightSemibold,\n letterSpacing: \"-0.025em\",\n lineHeight: typographyVars.lineHeightTight,\n },\n title: {\n fontSize: typographyVars.fontSizeXl,\n fontWeight: typographyVars.fontWeightSemibold,\n letterSpacing: \"-0.015em\",\n lineHeight: typographyVars.lineHeightTight,\n },\n heading: {\n fontSize: typographyVars.fontSizeLg,\n fontWeight: typographyVars.fontWeightMedium,\n lineHeight: typographyVars.lineHeightTight,\n },\n body: {\n fontSize: typographyVars.fontSizeMd,\n fontWeight: typographyVars.fontWeightRegular,\n lineHeight: typographyVars.lineHeightNormal,\n },\n label: {\n fontSize: typographyVars.fontSizeSm,\n fontWeight: typographyVars.fontWeightMedium,\n lineHeight: typographyVars.lineHeightNormal,\n },\n caption: {\n color: colorVars.fgSecondary,\n fontSize: typographyVars.fontSizeXs,\n fontWeight: typographyVars.fontWeightRegular,\n lineHeight: typographyVars.lineHeightNormal,\n },\n code: {\n backgroundColor: colorVars.bgSubtle,\n borderRadius: radiusVars.sm,\n fontFamily: \"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace\",\n fontSize: typographyVars.fontSizeSm,\n lineHeight: typographyVars.lineHeightNormal,\n paddingBlock: spacingVars.space1,\n paddingInline: spacingVars.space2,\n },\n});\n\ntype TypographyElement = \"blockquote\" | \"code\" | \"h1\" | \"h2\" | \"h3\" | \"p\" | \"span\";\ntype TypographyVariant = \"body\" | \"caption\" | \"code\" | \"display\" | \"heading\" | \"label\" | \"title\";\n\nconst defaultElementMap: Record<TypographyVariant, TypographyElement> = {\n body: \"p\",\n caption: \"span\",\n code: \"code\",\n display: \"h1\",\n heading: \"h3\",\n label: \"span\",\n title: \"h2\",\n};\n\nexport type TypographyProps = HTMLAttributes<HTMLElement> & {\n as?: TypographyElement;\n variant?: TypographyVariant;\n xstyle?: stylex.StyleXStyles;\n};\n\nexport function Typography({ as, variant = \"body\", xstyle, ...props }: TypographyProps) {\n const element = as ?? defaultElementMap[variant];\n return createElement(element, {\n ...props,\n ...stylex.props(styles.root, styles[variant], xstyle),\n });\n}\n",
7
- "path": "typography.tsx"
8
- }
9
- ],
10
- "dependencies": [
11
- "@stylexjs/stylex"
12
- ],
13
- "registryDependencies": []
14
- }