@nesso-how/ui 1.0.0-alpha.30 → 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 +11 -11
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/styles.css +398 -81
- package/package.json +7 -7
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
|
|
33
|
-
@import
|
|
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
|
|
41
|
-
|
|
|
42
|
-
| Buttons and inputs
|
|
43
|
-
| Forms and rows
|
|
44
|
-
| Menus and popovers
|
|
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
|
|
47
|
-
| Panels and disclosure
|
|
48
|
-
| Feedback
|
|
49
|
-
| Labels and icons
|
|
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<
|
|
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<
|
|
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:
|
|
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 {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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 {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
.side-panel
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
.panel-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
.panel-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
.panel
|
|
115
|
-
|
|
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 {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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 {
|
|
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 {
|
|
155
|
-
|
|
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'] {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
.toast-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
.toast-
|
|
183
|
-
|
|
184
|
-
|
|
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 {
|
|
187
|
-
|
|
188
|
-
|
|
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 {
|
|
192
|
-
|
|
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 {
|
|
197
|
-
|
|
198
|
-
|
|
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,
|
|
202
|
-
.nesso-
|
|
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 {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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 {
|
|
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.
|
|
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
|
}
|