@nesso-how/ui 1.0.0-alpha.31 → 1.0.0-alpha.32

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 CHANGED
@@ -29,24 +29,24 @@ Keep React and React DOM external in your plugin bundle. Import your own layout
29
29
  Install React/React DOM and configure [Tailwind CSS 4](https://tailwindcss.com/docs/installation) in your application. Import the package's source CSS after Tailwind in your main stylesheet:
30
30
 
31
31
  ```css
32
- @import "tailwindcss";
33
- @import "@nesso-how/ui/styles.css";
32
+ @import 'tailwindcss';
33
+ @import '@nesso-how/ui/styles.css';
34
34
  ```
35
35
 
36
36
  Your build must compile this CSS; it is not a precompiled stylesheet. Supply the theme CSS variables on your document or component container: colors such as `--background`, `--foreground`, and `--border`; `--font-sans` and `--font-mono`; `--radius-control` and `--radius-object` with length units; and `--duration-state` with time units. No theme values or font files are included. See the [theme schema](https://github.com/nesso-how/nesso/blob/main/packages/plugin/src/definitions.ts) for all color tokens and [Paper's theme](https://github.com/nesso-how/nesso/blob/main/plugins/paper-theme/src/index.ts) for example values.
37
37
 
38
38
  ## Components
39
39
 
40
- | Area | Exports |
41
- | --- | --- |
42
- | Buttons and inputs | `Button`, `IconButton`, `Input`, `Label`, `PreferenceSelect`, `ColorPicker` |
43
- | Forms and rows | `Field`, `FieldHint`, `ListRow`, `ListRowButton`, `ListRowDetail`, `ListRowTitle`, `RevealActions`, `PromptForm` |
44
- | Menus and popovers | `Menu`, `MenuItem`, `MenuPopup`, `MenuRadioItem`, `Popover`, `PopoverPopup` |
40
+ | Area | Exports |
41
+ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------- |
42
+ | Buttons and inputs | `Button`, `IconButton`, `Input`, `Label`, `PreferenceSelect`, `ColorPicker` |
43
+ | Forms and rows | `Field`, `FieldHint`, `ListRow`, `ListRowButton`, `ListRowDetail`, `ListRowTitle`, `RevealActions`, `PromptForm` |
44
+ | Menus and popovers | `Menu`, `MenuItem`, `MenuPopup`, `MenuRadioItem`, `Popover`, `PopoverPopup` |
45
45
  | Search and suggestions | `Combobox`, `ComboboxItem`, `ComboboxPopup`, `Autocomplete`, `AutocompleteClear`, `AutocompleteItem`, `AutocompletePopup` |
46
- | Dialogs | `Dialog`, `DialogActions`, `DialogPopup`, `ConfirmDialog`, `TextPromptDialog` |
47
- | Panels and disclosure | `SidePanel`, `PanelHeader`, `SectionHeading`, `Collapsible`, `Tabs` |
48
- | Feedback | `Banner`, `ToastViewport`, `Spinner` |
49
- | Labels and icons | `Kbd`, `ContextLabel`, `ActionIcon` |
46
+ | Dialogs | `Dialog`, `DialogActions`, `DialogPopup`, `ConfirmDialog`, `TextPromptDialog` |
47
+ | Panels and disclosure | `SidePanel`, `PanelHeader`, `SectionHeading`, `Collapsible`, `Tabs` |
48
+ | Feedback | `Banner`, `ToastViewport`, `Spinner` |
49
+ | Labels and icons | `Kbd`, `ContextLabel`, `ActionIcon` |
50
50
 
51
51
  `Button` supports `default`, `outline`, and `ghost` variants. `SidePanel` supports controlled resizing and collapse. `Spinner` accepts an accessible `label` and respects reduced motion. State, content, and event handling remain yours to provide.
52
52
 
package/dist/index.d.ts CHANGED
@@ -48,10 +48,10 @@ export declare function Spinner({ label, className }: {
48
48
  export declare function useMediaQuery(query: string): boolean;
49
49
  //#endregion
50
50
  //#region src/input.d.ts
51
- declare function Input({ className, type, ...props }: ComponentProps<"input">): import("react").JSX.Element;
51
+ declare function Input({ className, type, ...props }: ComponentProps<'input'>): import("react").JSX.Element;
52
52
  //#endregion
53
53
  //#region src/label.d.ts
54
- declare function Label({ className, ...props }: ComponentProps<"label">): import("react").JSX.Element;
54
+ declare function Label({ className, ...props }: ComponentProps<'label'>): import("react").JSX.Element;
55
55
  //#endregion
56
56
  //#region src/kbd.d.ts
57
57
  export declare function Kbd({ className, ...props }: ComponentProps<'kbd'>): import("react").JSX.Element;
@@ -252,6 +252,7 @@ declare const icons: {
252
252
  readonly 'file-down': LucideIcon;
253
253
  readonly 'file-up': LucideIcon;
254
254
  readonly folder: LucideIcon;
255
+ readonly glasses: LucideIcon;
255
256
  readonly globe: LucideIcon;
256
257
  readonly layers: LucideIcon;
257
258
  readonly pencil: LucideIcon;
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { cva } from "class-variance-authority";
3
3
  import { cn } from "cn";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
6
- import { ArrowRight, BookOpen, Check, ChevronDown, ChevronLeft, ChevronRight, CircleHelp, ClipboardPaste, Copy, Download, FileDown, FileUp, Folder, Globe, Info, Layers, Minus, Pencil, Play, Plus, RefreshCw, RotateCcw, Scissors, Search, Share2, Sparkles, TriangleAlert, Upload, X, Zap } from "lucide-react";
6
+ import { ArrowRight, BookOpen, Check, ChevronDown, ChevronLeft, ChevronRight, CircleHelp, ClipboardPaste, Copy, Download, FileDown, FileUp, Folder, Glasses, Globe, Info, Layers, Minus, Pencil, Play, Plus, RefreshCw, RotateCcw, Scissors, Search, Share2, Sparkles, TriangleAlert, Upload, X, Zap } from "lucide-react";
7
7
  import { Input as Input$1 } from "@base-ui/react/input";
8
8
  import { Dialog, Dialog as Dialog$1 } from "@base-ui/react/dialog";
9
9
  import { Combobox } from "@base-ui/react/combobox";
@@ -1064,6 +1064,7 @@ const icons = {
1064
1064
  "file-down": FileDown,
1065
1065
  "file-up": FileUp,
1066
1066
  folder: Folder,
1067
+ glasses: Glasses,
1067
1068
  globe: Globe,
1068
1069
  layers: Layers,
1069
1070
  pencil: Pencil,
package/dist/styles.css CHANGED
@@ -29,7 +29,9 @@
29
29
  .nesso-input,
30
30
  .nesso-option {
31
31
  border-radius: var(--radius-control);
32
- transition: background-color var(--duration-state), border-color var(--duration-state);
32
+ transition:
33
+ background-color var(--duration-state),
34
+ border-color var(--duration-state);
33
35
  }
34
36
 
35
37
  .nesso-button:focus-visible,
@@ -55,11 +57,37 @@
55
57
  background: var(--hover);
56
58
  }
57
59
 
58
- .nesso-color-hue { appearance: none; background: transparent; --hue-track: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
59
- .nesso-color-hue::-webkit-slider-runnable-track { height: 8px; border-radius: 2px; background: var(--hue-track); }
60
- .nesso-color-hue::-moz-range-track { height: 8px; border-radius: 2px; background: var(--hue-track); }
61
- .nesso-color-hue::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -2px; border: 1px solid var(--primary); border-radius: 50%; background: var(--background); }
62
- .nesso-color-hue::-moz-range-thumb { width: 10px; height: 10px; border: 1px solid var(--primary); border-radius: 50%; background: var(--background); }
60
+ .nesso-color-hue {
61
+ appearance: none;
62
+ background: transparent;
63
+ --hue-track: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
64
+ }
65
+ .nesso-color-hue::-webkit-slider-runnable-track {
66
+ height: 8px;
67
+ border-radius: 2px;
68
+ background: var(--hue-track);
69
+ }
70
+ .nesso-color-hue::-moz-range-track {
71
+ height: 8px;
72
+ border-radius: 2px;
73
+ background: var(--hue-track);
74
+ }
75
+ .nesso-color-hue::-webkit-slider-thumb {
76
+ appearance: none;
77
+ width: 12px;
78
+ height: 12px;
79
+ margin-top: -2px;
80
+ border: 1px solid var(--primary);
81
+ border-radius: 50%;
82
+ background: var(--background);
83
+ }
84
+ .nesso-color-hue::-moz-range-thumb {
85
+ width: 10px;
86
+ height: 10px;
87
+ border: 1px solid var(--primary);
88
+ border-radius: 50%;
89
+ background: var(--background);
90
+ }
63
91
 
64
92
  @media (pointer: coarse) {
65
93
  .nesso-button,
@@ -72,48 +100,183 @@
72
100
  }
73
101
 
74
102
  @layer components {
75
- .nesso-panel-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; height: 49px; padding: 0 14px 0 20px; border-bottom: 1px solid var(--border); }
76
- .nesso-panel-actions { display: flex; flex-shrink: 0; gap: 2px; color: var(--muted-foreground); }
77
- .nesso-panel-actions button { width: 26px; height: 28px; }
78
-
79
- .side-panel { position: relative; flex-shrink: 0; width: var(--panel-size); height: 100%; transition: width var(--duration-state) linear; }
80
- .side-panel[data-open='false'] { width: 0; }
81
- .side-panel-content { position: absolute; inset-block: 0; width: var(--panel-size); overflow: hidden; background: var(--background); transition: transform var(--duration-state) linear; }
82
- .side-panel[data-side='left'] > .side-panel-content { left: 0; border-right: 1px solid var(--border); }
83
- .side-panel[data-side='right'] > .side-panel-content { right: 0; border-left: 1px solid var(--border); }
84
- .side-panel[data-side='left'][data-open='false'] > .side-panel-content { transform: translateX(-100%); }
85
- .side-panel[data-side='right'][data-open='false'] > .side-panel-content { transform: translateX(100%); }
86
- .side-panel > .panel-toggle { position: absolute; z-index: 30; top: 50%; }
87
- .side-panel[data-side='left'] > .panel-toggle { left: 100%; translate: -50% -50%; }
88
- .side-panel[data-side='right'] > .panel-toggle { right: 100%; translate: 50% -50%; }
89
- .side-panel[data-open='false'] > .panel-toggle { translate: 0 -50%; }
90
- .side-panel-resize { position: absolute; z-index: 20; inset-block: 0; width: 9px; cursor: col-resize; touch-action: none; }
91
- .side-panel-resize:focus-visible { outline: 2px solid var(--ring); outline-offset: -4px; }
92
- .side-panel[data-side='left'] > .side-panel-resize { right: -4px; }
93
- .side-panel[data-side='right'] > .side-panel-resize { left: -4px; }
94
- .side-panel[data-open='false'] > .side-panel-resize { display: none; }
95
- .side-panel[data-resizing] { user-select: none; }
96
- .side-panel[data-resizing], .side-panel[data-resizing] > .side-panel-content { transition: none; }
97
-
98
- .panel-toggle { position: relative; isolation: isolate; display: grid; place-items: center; width: 28px; height: 52px; flex-shrink: 0; padding: 0; border: 0; color: color-mix(in srgb, var(--foreground) 70%, var(--muted-foreground)); background: transparent; cursor: pointer; }
99
- .panel-toggle::before { content: ''; position: absolute; z-index: -1; inset: 10px 6px; border-radius: var(--radius-control); background: var(--background); box-shadow: 0 1px 3px #00000014, 0 0 0 1px var(--border); }
100
- .panel-toggle svg { width: 13px; height: 13px; stroke-width: 2; pointer-events: none; }
101
- .panel-toggle:hover { color: var(--foreground); }
102
- .panel-toggle:hover::before { background: linear-gradient(var(--hover), var(--hover)), var(--background); }
103
- .panel-toggle:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; border-radius: var(--radius-control); }
104
- .panel-toggle[data-side='left'][aria-expanded='false'] { padding-right: 6px; }
105
- .panel-toggle[data-side='left'][aria-expanded='false']::before { inset: 10px 6px 10px 0; border-radius: 0 var(--radius-control) var(--radius-control) 0; }
106
- .panel-toggle[data-side='right'][aria-expanded='false'] { padding-left: 6px; }
107
- .panel-toggle[data-side='right'][aria-expanded='false']::before { inset: 10px 0 10px 6px; border-radius: var(--radius-control) 0 0 var(--radius-control); }
108
-
109
- @media (pointer: coarse) {
110
- .panel-toggle { width: 44px; }
111
- .panel-toggle::before { inset-inline: 14px; }
112
- .panel-toggle[data-side='left'][aria-expanded='false'] { padding-right: 22px; }
113
- .panel-toggle[data-side='left'][aria-expanded='false']::before { right: 22px; left: 0; }
114
- .panel-toggle[data-side='right'][aria-expanded='false'] { padding-left: 22px; }
115
- .panel-toggle[data-side='right'][aria-expanded='false']::before { left: 22px; right: 0; }
116
- }
103
+ .nesso-panel-header {
104
+ display: flex;
105
+ flex-shrink: 0;
106
+ align-items: center;
107
+ justify-content: space-between;
108
+ gap: 12px;
109
+ height: 49px;
110
+ padding: 0 14px 0 20px;
111
+ border-bottom: 1px solid var(--border);
112
+ }
113
+ .nesso-panel-actions {
114
+ display: flex;
115
+ flex-shrink: 0;
116
+ gap: 2px;
117
+ color: var(--muted-foreground);
118
+ }
119
+ .nesso-panel-actions button {
120
+ width: 26px;
121
+ height: 28px;
122
+ }
123
+
124
+ .side-panel {
125
+ position: relative;
126
+ flex-shrink: 0;
127
+ width: var(--panel-size);
128
+ height: 100%;
129
+ transition: width var(--duration-state) linear;
130
+ }
131
+ .side-panel[data-open='false'] {
132
+ width: 0;
133
+ }
134
+ .side-panel-content {
135
+ position: absolute;
136
+ inset-block: 0;
137
+ width: var(--panel-size);
138
+ overflow: hidden;
139
+ background: var(--background);
140
+ transition: transform var(--duration-state) linear;
141
+ }
142
+ .side-panel[data-side='left'] > .side-panel-content {
143
+ left: 0;
144
+ border-right: 1px solid var(--border);
145
+ }
146
+ .side-panel[data-side='right'] > .side-panel-content {
147
+ right: 0;
148
+ border-left: 1px solid var(--border);
149
+ }
150
+ .side-panel[data-side='left'][data-open='false'] > .side-panel-content {
151
+ transform: translateX(-100%);
152
+ }
153
+ .side-panel[data-side='right'][data-open='false'] > .side-panel-content {
154
+ transform: translateX(100%);
155
+ }
156
+ .side-panel > .panel-toggle {
157
+ position: absolute;
158
+ z-index: 30;
159
+ top: 50%;
160
+ }
161
+ .side-panel[data-side='left'] > .panel-toggle {
162
+ left: 100%;
163
+ translate: -50% -50%;
164
+ }
165
+ .side-panel[data-side='right'] > .panel-toggle {
166
+ right: 100%;
167
+ translate: 50% -50%;
168
+ }
169
+ .side-panel[data-open='false'] > .panel-toggle {
170
+ translate: 0 -50%;
171
+ }
172
+ .side-panel-resize {
173
+ position: absolute;
174
+ z-index: 20;
175
+ inset-block: 0;
176
+ width: 9px;
177
+ cursor: col-resize;
178
+ touch-action: none;
179
+ }
180
+ .side-panel-resize:focus-visible {
181
+ outline: 2px solid var(--ring);
182
+ outline-offset: -4px;
183
+ }
184
+ .side-panel[data-side='left'] > .side-panel-resize {
185
+ right: -4px;
186
+ }
187
+ .side-panel[data-side='right'] > .side-panel-resize {
188
+ left: -4px;
189
+ }
190
+ .side-panel[data-open='false'] > .side-panel-resize {
191
+ display: none;
192
+ }
193
+ .side-panel[data-resizing] {
194
+ user-select: none;
195
+ }
196
+ .side-panel[data-resizing],
197
+ .side-panel[data-resizing] > .side-panel-content {
198
+ transition: none;
199
+ }
200
+
201
+ .panel-toggle {
202
+ position: relative;
203
+ isolation: isolate;
204
+ display: grid;
205
+ place-items: center;
206
+ width: 28px;
207
+ height: 52px;
208
+ flex-shrink: 0;
209
+ padding: 0;
210
+ border: 0;
211
+ color: color-mix(in srgb, var(--foreground) 70%, var(--muted-foreground));
212
+ background: transparent;
213
+ cursor: pointer;
214
+ }
215
+ .panel-toggle::before {
216
+ content: '';
217
+ position: absolute;
218
+ z-index: -1;
219
+ inset: 10px 6px;
220
+ border-radius: var(--radius-control);
221
+ background: var(--background);
222
+ box-shadow:
223
+ 0 1px 3px #00000014,
224
+ 0 0 0 1px var(--border);
225
+ }
226
+ .panel-toggle svg {
227
+ width: 13px;
228
+ height: 13px;
229
+ stroke-width: 2;
230
+ pointer-events: none;
231
+ }
232
+ .panel-toggle:hover {
233
+ color: var(--foreground);
234
+ }
235
+ .panel-toggle:hover::before {
236
+ background: linear-gradient(var(--hover), var(--hover)), var(--background);
237
+ }
238
+ .panel-toggle:focus-visible {
239
+ outline: 2px solid var(--ring);
240
+ outline-offset: -2px;
241
+ border-radius: var(--radius-control);
242
+ }
243
+ .panel-toggle[data-side='left'][aria-expanded='false'] {
244
+ padding-right: 6px;
245
+ }
246
+ .panel-toggle[data-side='left'][aria-expanded='false']::before {
247
+ inset: 10px 6px 10px 0;
248
+ border-radius: 0 var(--radius-control) var(--radius-control) 0;
249
+ }
250
+ .panel-toggle[data-side='right'][aria-expanded='false'] {
251
+ padding-left: 6px;
252
+ }
253
+ .panel-toggle[data-side='right'][aria-expanded='false']::before {
254
+ inset: 10px 0 10px 6px;
255
+ border-radius: var(--radius-control) 0 0 var(--radius-control);
256
+ }
257
+
258
+ @media (pointer: coarse) {
259
+ .panel-toggle {
260
+ width: 44px;
261
+ }
262
+ .panel-toggle::before {
263
+ inset-inline: 14px;
264
+ }
265
+ .panel-toggle[data-side='left'][aria-expanded='false'] {
266
+ padding-right: 22px;
267
+ }
268
+ .panel-toggle[data-side='left'][aria-expanded='false']::before {
269
+ right: 22px;
270
+ left: 0;
271
+ }
272
+ .panel-toggle[data-side='right'][aria-expanded='false'] {
273
+ padding-left: 22px;
274
+ }
275
+ .panel-toggle[data-side='right'][aria-expanded='false']::before {
276
+ left: 22px;
277
+ right: 0;
278
+ }
279
+ }
117
280
  }
118
281
 
119
282
  @media (prefers-reduced-motion: reduce) {
@@ -125,13 +288,38 @@
125
288
  }
126
289
  }
127
290
 
128
- .nesso-spinner { display: grid; grid-template-columns: repeat(2, 8px); gap: 4px; }
129
- .nesso-spinner > span { width: 8px; height: 8px; background: currentColor; opacity: .25; animation: nesso-spinner-pulse 1.2s ease-in-out infinite; }
130
- .nesso-spinner > span:nth-child(2) { animation-delay: -.9s; }
131
- .nesso-spinner > span:nth-child(3) { animation-delay: -.3s; }
132
- .nesso-spinner > span:nth-child(4) { animation-delay: -.6s; }
291
+ .nesso-spinner {
292
+ display: grid;
293
+ grid-template-columns: repeat(2, 8px);
294
+ gap: 4px;
295
+ }
296
+ .nesso-spinner > span {
297
+ width: 8px;
298
+ height: 8px;
299
+ background: currentColor;
300
+ opacity: 0.25;
301
+ animation: nesso-spinner-pulse 1.2s ease-in-out infinite;
302
+ }
303
+ .nesso-spinner > span:nth-child(2) {
304
+ animation-delay: -0.9s;
305
+ }
306
+ .nesso-spinner > span:nth-child(3) {
307
+ animation-delay: -0.3s;
308
+ }
309
+ .nesso-spinner > span:nth-child(4) {
310
+ animation-delay: -0.6s;
311
+ }
133
312
 
134
- @keyframes nesso-spinner-pulse { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
313
+ @keyframes nesso-spinner-pulse {
314
+ 0%,
315
+ 60%,
316
+ 100% {
317
+ opacity: 0.25;
318
+ }
319
+ 30% {
320
+ opacity: 1;
321
+ }
322
+ }
135
323
 
136
324
  .toast-viewport {
137
325
  position: fixed;
@@ -151,8 +339,19 @@
151
339
  display: none;
152
340
  }
153
341
 
154
- .toast-stack { display: flex; flex-direction: column-reverse; gap: 8px; }
155
- .toast-queue { margin: 0 0 8px; text-align: center; color: var(--muted-foreground); font-family: var(--font-mono); font-size: 10px; line-height: 16px; }
342
+ .toast-stack {
343
+ display: flex;
344
+ flex-direction: column-reverse;
345
+ gap: 8px;
346
+ }
347
+ .toast-queue {
348
+ margin: 0 0 8px;
349
+ text-align: center;
350
+ color: var(--muted-foreground);
351
+ font-family: var(--font-mono);
352
+ font-size: 10px;
353
+ line-height: 16px;
354
+ }
156
355
 
157
356
  .nesso-toast {
158
357
  position: relative;
@@ -172,40 +371,158 @@
172
371
  animation: toast-enter 180ms ease-out both;
173
372
  }
174
373
 
175
- .nesso-toast[data-tone='warning'] { border-color: var(--node-border); }
176
- .nesso-toast[data-leaving] { animation: toast-exit 140ms ease-in both; pointer-events: none; }
177
- .toast-icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; stroke-width: 1.5; }
178
- .toast-content { min-width: 0; flex: 1; overflow-wrap: anywhere; }
179
- .toast-label { display: block; color: var(--muted-foreground); font-family: var(--font-mono); font-size: 10px; line-height: 16px; }
180
- .toast-title { margin: 4px 0 0; font-size: 13px; font-weight: 500; line-height: 19px; }
181
- .toast-description { margin: 4px 0 0; color: var(--muted-foreground); font-size: 12px; line-height: 18px; }
182
- .toast-actions { display: flex; flex-basis: 100%; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 2px; }
183
- .toast-close { flex-shrink: 0; margin: -6px -6px 0 0; color: var(--muted-foreground); }
184
- .toast-progress { position: absolute; inset: auto 0 0; height: 2px; background: var(--foreground); opacity: 0.2; transform-origin: left; animation: toast-progress var(--toast-duration) linear forwards; }
374
+ .nesso-toast[data-tone='warning'] {
375
+ border-color: var(--node-border);
376
+ }
377
+ .nesso-toast[data-leaving] {
378
+ animation: toast-exit 140ms ease-in both;
379
+ pointer-events: none;
380
+ }
381
+ .toast-icon {
382
+ width: 16px;
383
+ height: 16px;
384
+ flex-shrink: 0;
385
+ margin-top: 1px;
386
+ stroke-width: 1.5;
387
+ }
388
+ .toast-content {
389
+ min-width: 0;
390
+ flex: 1;
391
+ overflow-wrap: anywhere;
392
+ }
393
+ .toast-label {
394
+ display: block;
395
+ color: var(--muted-foreground);
396
+ font-family: var(--font-mono);
397
+ font-size: 10px;
398
+ line-height: 16px;
399
+ }
400
+ .toast-title {
401
+ margin: 4px 0 0;
402
+ font-size: 13px;
403
+ font-weight: 500;
404
+ line-height: 19px;
405
+ }
406
+ .toast-description {
407
+ margin: 4px 0 0;
408
+ color: var(--muted-foreground);
409
+ font-size: 12px;
410
+ line-height: 18px;
411
+ }
412
+ .toast-actions {
413
+ display: flex;
414
+ flex-basis: 100%;
415
+ flex-wrap: wrap;
416
+ justify-content: flex-end;
417
+ gap: 6px;
418
+ margin-top: 2px;
419
+ }
420
+ .toast-close {
421
+ flex-shrink: 0;
422
+ margin: -6px -6px 0 0;
423
+ color: var(--muted-foreground);
424
+ }
425
+ .toast-progress {
426
+ position: absolute;
427
+ inset: auto 0 0;
428
+ height: 2px;
429
+ background: var(--foreground);
430
+ opacity: 0.2;
431
+ transform-origin: left;
432
+ animation: toast-progress var(--toast-duration) linear forwards;
433
+ }
185
434
 
186
- @keyframes toast-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
187
- @keyframes toast-exit { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(4px); } }
188
- @keyframes toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
435
+ @keyframes toast-enter {
436
+ from {
437
+ opacity: 0;
438
+ transform: translateY(6px);
439
+ }
440
+ to {
441
+ opacity: 1;
442
+ transform: translateY(0);
443
+ }
444
+ }
445
+ @keyframes toast-exit {
446
+ from {
447
+ opacity: 1;
448
+ transform: translateY(0);
449
+ }
450
+ to {
451
+ opacity: 0;
452
+ transform: translateY(4px);
453
+ }
454
+ }
455
+ @keyframes toast-progress {
456
+ from {
457
+ transform: scaleX(1);
458
+ }
459
+ to {
460
+ transform: scaleX(0);
461
+ }
462
+ }
189
463
 
190
464
  @media (max-width: 640px) {
191
- .toast-viewport { width: calc(100% - 24px); bottom: max(76px, env(safe-area-inset-bottom)); max-height: calc(100% - 104px); }
192
- .toast-viewport { left: 12px; right: 12px; transform: none; }
465
+ .toast-viewport {
466
+ width: calc(100% - 24px);
467
+ bottom: max(76px, env(safe-area-inset-bottom));
468
+ max-height: calc(100% - 104px);
469
+ }
470
+ .toast-viewport {
471
+ left: 12px;
472
+ right: 12px;
473
+ transform: none;
474
+ }
193
475
  }
194
476
 
195
477
  @media (prefers-reduced-motion: reduce) {
196
- .nesso-spinner > span { animation: none; opacity: .65; }
197
- .nesso-toast { animation: none; }
198
- .toast-progress { display: none; }
478
+ .nesso-spinner > span {
479
+ animation: none;
480
+ opacity: 0.65;
481
+ }
482
+ .nesso-toast {
483
+ animation: none;
484
+ }
485
+ .toast-progress {
486
+ display: none;
487
+ }
199
488
  }
200
489
 
201
- .nesso-button, .nesso-input, .nesso-option { font-size: 13px; line-height: 20px; }
202
- .nesso-section-heading { font-size: 11px; line-height: 16px; }
490
+ .nesso-button,
491
+ .nesso-input,
492
+ .nesso-option {
493
+ font-size: 13px;
494
+ line-height: 20px;
495
+ }
496
+ .nesso-section-heading {
497
+ font-size: 11px;
498
+ line-height: 16px;
499
+ }
203
500
 
204
- .nesso-field { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(160px, 236px); align-items: center; gap: 16px; }
205
- .nesso-field > button:disabled { opacity: 1; color: var(--muted-foreground); background: var(--canvas); }
206
- .nesso-field > label { font-size: 12px; }
207
- .nesso-field-hint { margin-top: 6px; color: var(--muted-foreground); font-size: 11px; line-height: 16px; min-height: 16px; }
501
+ .nesso-field {
502
+ display: grid;
503
+ grid-template-columns: minmax(100px, 1fr) minmax(160px, 236px);
504
+ align-items: center;
505
+ gap: 16px;
506
+ }
507
+ .nesso-field > button:disabled {
508
+ opacity: 1;
509
+ color: var(--muted-foreground);
510
+ background: var(--canvas);
511
+ }
512
+ .nesso-field > label {
513
+ font-size: 12px;
514
+ }
515
+ .nesso-field-hint {
516
+ margin-top: 6px;
517
+ color: var(--muted-foreground);
518
+ font-size: 11px;
519
+ line-height: 16px;
520
+ min-height: 16px;
521
+ }
208
522
 
209
523
  @media (max-width: 640px) {
210
- .nesso-field { grid-template-columns: minmax(90px, 1fr) minmax(140px, 1.3fr); gap: 12px; }
524
+ .nesso-field {
525
+ grid-template-columns: minmax(90px, 1fr) minmax(140px, 1.3fr);
526
+ gap: 12px;
527
+ }
211
528
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nesso-how/ui",
3
- "version": "1.0.0-alpha.31",
3
+ "version": "1.0.0-alpha.32",
4
4
  "description": "Reusable React primitives and shared styles for Nesso, usable in the app and in isolated plugin panels",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -8,11 +8,11 @@
8
8
  "url": "git+https://github.com/nesso-how/nesso.git",
9
9
  "directory": "packages/ui"
10
10
  },
11
- "type": "module",
12
- "sideEffects": false,
13
11
  "files": [
14
12
  "dist"
15
13
  ],
14
+ "type": "module",
15
+ "sideEffects": false,
16
16
  "types": "./dist/index.d.ts",
17
17
  "exports": {
18
18
  ".": {
@@ -30,14 +30,14 @@
30
30
  "cn": "^0.4.0",
31
31
  "lucide-react": "^1.48.0"
32
32
  },
33
- "peerDependencies": {
34
- "react": "^19.2.8",
35
- "react-dom": "^19.2.8"
36
- },
37
33
  "devDependencies": {
38
34
  "@types/react": "^19.2.18",
39
35
  "tsdown": "^0.23.1"
40
36
  },
37
+ "peerDependencies": {
38
+ "react": "^19.2.8",
39
+ "react-dom": "^19.2.8"
40
+ },
41
41
  "scripts": {
42
42
  "build": "tsc -p tsconfig.json && tsdown"
43
43
  }