nish-ui 3.2.0 → 3.3.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 (95) hide show
  1. package/README.md +7 -3
  2. package/dist/base-tailwind.css +30 -15
  3. package/dist/base.css +30 -15
  4. package/dist/elements-all.js +78 -78
  5. package/dist/elements-charts.js +39 -38
  6. package/dist/elements-data.d.ts +10 -0
  7. package/dist/elements-data.js +4 -5
  8. package/dist/elements-forms.js +5 -5
  9. package/dist/elements.d.ts +1 -0
  10. package/dist/elements.js +4 -4
  11. package/dist/esm/command-filter.js +55 -4
  12. package/dist/esm/components/accordion.js +3 -2
  13. package/dist/esm/components/app-shell.js +8 -4
  14. package/dist/esm/components/breadcrumbs.js +7 -3
  15. package/dist/esm/components/calendar-base.js +32 -5
  16. package/dist/esm/components/calendar-classes.js +14 -2
  17. package/dist/esm/components/canvas/follow-caption.js +31 -21
  18. package/dist/esm/components/canvas/follow.js +5 -6
  19. package/dist/esm/components/canvas/minimap.js +3 -3
  20. package/dist/esm/components/canvas/system-canvas.js +3 -1
  21. package/dist/esm/components/canvas/view.js +0 -2
  22. package/dist/esm/components/carousel.js +2 -3
  23. package/dist/esm/components/charts.js +18 -7
  24. package/dist/esm/components/combobox.js +18 -7
  25. package/dist/esm/components/command.js +23 -61
  26. package/dist/esm/components/context-menu.js +2 -1
  27. package/dist/esm/components/data-classes.js +5 -4
  28. package/dist/esm/components/data.js +19 -10
  29. package/dist/esm/components/display.js +20 -11
  30. package/dist/esm/components/drawer.js +17 -4
  31. package/dist/esm/components/error-boundary.js +3 -3
  32. package/dist/esm/components/feedback.js +3 -3
  33. package/dist/esm/components/file-dropzone.js +16 -6
  34. package/dist/esm/components/filters.js +42 -1
  35. package/dist/esm/components/flow.js +8 -5
  36. package/dist/esm/components/forms-classes.js +2 -0
  37. package/dist/esm/components/forms.js +2 -2
  38. package/dist/esm/components/hooks.js +47 -13
  39. package/dist/esm/components/hover-card.js +2 -1
  40. package/dist/esm/components/inbox.js +5 -1
  41. package/dist/esm/components/latest.js +4 -2
  42. package/dist/esm/components/layout.js +7 -4
  43. package/dist/esm/components/menu.js +10 -1
  44. package/dist/esm/components/modal.js +17 -4
  45. package/dist/esm/components/multi-select.js +5 -5
  46. package/dist/esm/components/nav.js +30 -11
  47. package/dist/esm/components/navigate.js +1 -1
  48. package/dist/esm/components/overlay-dialog.js +35 -1
  49. package/dist/esm/components/pagination.js +1 -1
  50. package/dist/esm/components/primitives.js +17 -4
  51. package/dist/esm/components/progress.js +2 -1
  52. package/dist/esm/components/resource.js +14 -4
  53. package/dist/esm/components/segmented.js +2 -0
  54. package/dist/esm/components/separator.js +6 -1
  55. package/dist/esm/components/service-tokens.js +18 -7
  56. package/dist/esm/components/settings.js +16 -0
  57. package/dist/esm/components/slider.js +5 -1
  58. package/dist/esm/components/split.js +4 -2
  59. package/dist/esm/components/strings.js +17 -4
  60. package/dist/esm/components/table.js +15 -3
  61. package/dist/esm/components/tag-input.js +5 -1
  62. package/dist/esm/components/time-field.js +15 -7
  63. package/dist/esm/components/toast-card.js +5 -3
  64. package/dist/esm/components/toast.js +4 -1
  65. package/dist/esm/components/tooltip.js +3 -2
  66. package/dist/esm/components/url-state.js +3 -1
  67. package/dist/esm/components/virtual-table.js +2 -2
  68. package/dist/esm/components/virtual.js +8 -4
  69. package/dist/esm/format.js +3 -2
  70. package/dist/esm/runtime.js +1 -1
  71. package/dist/esm/server/inbox/client.js +4 -0
  72. package/dist/esm/theme.js +38 -15
  73. package/dist/esm/tokens.mjs +1 -1
  74. package/dist/format.d.ts +5 -3
  75. package/dist/format.js +4 -3
  76. package/dist/inbox-client.d.ts +1 -1
  77. package/dist/inbox-client.js +4 -0
  78. package/dist/index.d.ts +61 -29
  79. package/dist/nish-components.css +59 -21
  80. package/dist/nish-components.min.css +1 -1
  81. package/dist/nish.css +30 -15
  82. package/dist/nish.min.css +1 -1
  83. package/dist/node/vite.js +1 -1
  84. package/dist/server/hono.d.ts +9 -2
  85. package/dist/server/hono.js +17 -4
  86. package/dist/server/index.d.ts +3 -3
  87. package/dist/server/index.js +7 -2
  88. package/dist/service-tokens.d.ts +4 -4
  89. package/dist/{spa-BfRDo38r.d.ts → spa-FwS7yZ8p.d.ts} +4 -3
  90. package/dist/system-canvas.d.ts +11 -10
  91. package/dist/theme.d.ts +30 -2
  92. package/dist/theme.global.js +45 -18
  93. package/dist/theme.js +45 -18
  94. package/package.json +3 -2
  95. package/dist/tokens.js +0 -425
package/README.md CHANGED
@@ -293,6 +293,10 @@ Entry points:
293
293
  | `nish-ui/tailwind-core.css` | The same without the component scan |
294
294
  | `nish-ui/nish.css` | The theme and base styles without Tailwind |
295
295
  | `nish-ui/nish-components.css` | `.nish-btn`, `.nish-card` and the other classes |
296
+ | `nish-ui/nish.min.css`, `nish-ui/nish-components.min.css` | The same two files, minified |
297
+ | `nish-ui/tokens.css` | Only the design tokens as CSS variables (`--nish-*`) |
298
+ | `nish-ui/fonts.css` | Only the `@font-face` rules for the bundled fonts |
299
+ | `nish-ui/base.css` | Only the base element styles; `nish.css` is these three together |
296
300
  | `nish-ui/theme` | Theme switching and static-page helpers, React-free |
297
301
  | `nish-ui/format` | Money, percent, date formatters (locale-aware) |
298
302
  | `nish-ui/chart` | Chart colors for any library |
@@ -331,10 +335,10 @@ Measured with esbuild (minified, React external) from `dist/esm` on every pull r
331
335
  | Import | Gzip |
332
336
  |---|---|
333
337
  | `cn` | under 10 KB |
334
- | `Button` | under 11 KB |
338
+ | `Button` | under 10 KB |
335
339
  | `AppShell` | under 34 KB |
336
- | `useMediaQuery` | under 1.5 KB |
337
- | `nish-ui/theme` | under 12 KB |
340
+ | `useMediaQuery` | under 1 KB |
341
+ | `nish-ui/theme` | under 9 KB |
338
342
  | `nish-ui/format` | under 4 KB |
339
343
 
340
344
  The JavaScript is one file per source module with `/* @__PURE__ */` annotations and a
@@ -53,10 +53,15 @@
53
53
  .nish-scroll-fade[data-at-end='false'] {
54
54
  --nish-fade-end: transparent;
55
55
  }
56
- .nish-no-scrollbar {
56
+ /* Scrolls, but draws no scrollbar: tab strips, chip rows, carousels. .nish-no-scrollbar is
57
+ the preferred name; .scrollbar-none is the same utility under its older name. */
58
+ .nish-no-scrollbar,
59
+ .scrollbar-none {
57
60
  scrollbar-width: none;
61
+ -ms-overflow-style: none;
58
62
  }
59
- .nish-no-scrollbar::-webkit-scrollbar {
63
+ .nish-no-scrollbar::-webkit-scrollbar,
64
+ .scrollbar-none::-webkit-scrollbar {
60
65
  display: none;
61
66
  }
62
67
  /* Bottom padding that clears bottom bars (the nav already includes the safe area). It is in
@@ -194,15 +199,6 @@
194
199
  white-space: nowrap;
195
200
  }
196
201
 
197
- /* Scrolls, but draws no scrollbar: tab strips, chip rows, carousels. */
198
- .scrollbar-none {
199
- scrollbar-width: none;
200
- -ms-overflow-style: none;
201
- }
202
- .scrollbar-none::-webkit-scrollbar {
203
- display: none;
204
- }
205
-
206
202
  /* First thing in <body>: <a class="nish-skip-link" href="#main">Skip to content</a>.
207
203
  Parked above the top edge (still read by screen readers) until a keyboard user tabs
208
204
  to it, then a pill at the top left. */
@@ -1103,7 +1099,12 @@
1103
1099
  .nish-prose :where(table) {
1104
1100
  width: 100%;
1105
1101
  border-collapse: collapse;
1106
- display: block;
1102
+ /* Stays display:table so the table role and row/column navigation survive (WebKit and
1103
+ VoiceOver drop them on display:block). Long words wrap instead of scrolling the page;
1104
+ a wide table can sit in a wrapper that scrolls: any element with data-nish-table-wrap. */
1105
+ overflow-wrap: anywhere;
1106
+ }
1107
+ .nish-prose :where([data-nish-table-wrap]) {
1107
1108
  overflow-x: auto;
1108
1109
  }
1109
1110
  .nish-prose :where(th, td) {
@@ -1141,14 +1142,15 @@
1141
1142
  @media (prefers-reduced-motion: reduce) {
1142
1143
  .nish-spin,
1143
1144
  [data-nish-spin],
1144
- .nish-spinner {
1145
+ .nish-spinner,
1146
+ .nish-btn[aria-busy='true']::after {
1145
1147
  animation: nish-pulse 1.6s ease-in-out infinite !important;
1146
1148
  animation-iteration-count: infinite !important;
1147
1149
  animation-duration: 1.6s !important;
1148
1150
  }
1149
1151
  }
1150
1152
 
1151
- /* SystemCanvas (src/components/canvas.tsx). The viewport is the graph paper: its
1153
+ /* SystemCanvas (src/components/canvas/system-canvas.tsx). The viewport is the graph paper: its
1152
1154
  background position and size follow the pan and zoom (the component writes them directly, no inherited
1153
1155
  variables). Every rule that moves, loops or fades is
1154
1156
  inside prefers-reduced-motion: no-preference; under reduced motion the active look is
@@ -1489,7 +1491,7 @@
1489
1491
  border-radius: 14px;
1490
1492
  border: 1px solid var(--nish-line);
1491
1493
  background: var(--nish-surface);
1492
- box-shadow: var(--nish-shadow-md, 0 4px 14px rgb(0 0 0 / 0.18));
1494
+ box-shadow: var(--nish-shadow-pop);
1493
1495
  cursor: default;
1494
1496
  }
1495
1497
  .nish-canvas-zoom {
@@ -1651,6 +1653,19 @@
1651
1653
  forced-color-adjust: none;
1652
1654
  background-color: GrayText;
1653
1655
  }
1656
+ /* Canvas live and active states are drawn with background, border colour and shadow,
1657
+ which forced colors flatten: redraw them with Highlight and a thicker border. */
1658
+ .nish-canvas-live {
1659
+ forced-color-adjust: none;
1660
+ background: Highlight;
1661
+ box-shadow: none;
1662
+ }
1663
+ .nish-canvas-group[data-live],
1664
+ .nish-canvas-node[data-active] {
1665
+ forced-color-adjust: none;
1666
+ border-color: Highlight;
1667
+ border-width: 2px;
1668
+ }
1654
1669
  }
1655
1670
 
1656
1671
  /* ThemeProvider sets data-nish-theme-switching on <html> for one frame while it swaps the
package/dist/base.css CHANGED
@@ -53,10 +53,15 @@
53
53
  .nish-scroll-fade[data-at-end='false'] {
54
54
  --nish-fade-end: transparent;
55
55
  }
56
- .nish-no-scrollbar {
56
+ /* Scrolls, but draws no scrollbar: tab strips, chip rows, carousels. .nish-no-scrollbar is
57
+ the preferred name; .scrollbar-none is the same utility under its older name. */
58
+ .nish-no-scrollbar,
59
+ .scrollbar-none {
57
60
  scrollbar-width: none;
61
+ -ms-overflow-style: none;
58
62
  }
59
- .nish-no-scrollbar::-webkit-scrollbar {
63
+ .nish-no-scrollbar::-webkit-scrollbar,
64
+ .scrollbar-none::-webkit-scrollbar {
60
65
  display: none;
61
66
  }
62
67
  /* Bottom padding that clears bottom bars (the nav already includes the safe area). It is in
@@ -194,15 +199,6 @@
194
199
  white-space: nowrap;
195
200
  }
196
201
 
197
- /* Scrolls, but draws no scrollbar: tab strips, chip rows, carousels. */
198
- .scrollbar-none {
199
- scrollbar-width: none;
200
- -ms-overflow-style: none;
201
- }
202
- .scrollbar-none::-webkit-scrollbar {
203
- display: none;
204
- }
205
-
206
202
  /* First thing in <body>: <a class="nish-skip-link" href="#main">Skip to content</a>.
207
203
  Parked above the top edge (still read by screen readers) until a keyboard user tabs
208
204
  to it, then a pill at the top left. */
@@ -1103,7 +1099,12 @@
1103
1099
  .nish-prose :where(table) {
1104
1100
  width: 100%;
1105
1101
  border-collapse: collapse;
1106
- display: block;
1102
+ /* Stays display:table so the table role and row/column navigation survive (WebKit and
1103
+ VoiceOver drop them on display:block). Long words wrap instead of scrolling the page;
1104
+ a wide table can sit in a wrapper that scrolls: any element with data-nish-table-wrap. */
1105
+ overflow-wrap: anywhere;
1106
+ }
1107
+ .nish-prose :where([data-nish-table-wrap]) {
1107
1108
  overflow-x: auto;
1108
1109
  }
1109
1110
  .nish-prose :where(th, td) {
@@ -1141,14 +1142,15 @@
1141
1142
  @media (prefers-reduced-motion: reduce) {
1142
1143
  .nish-spin,
1143
1144
  [data-nish-spin],
1144
- .nish-spinner {
1145
+ .nish-spinner,
1146
+ .nish-btn[aria-busy='true']::after {
1145
1147
  animation: nish-pulse 1.6s ease-in-out infinite !important;
1146
1148
  animation-iteration-count: infinite !important;
1147
1149
  animation-duration: 1.6s !important;
1148
1150
  }
1149
1151
  }
1150
1152
 
1151
- /* SystemCanvas (src/components/canvas.tsx). The viewport is the graph paper: its
1153
+ /* SystemCanvas (src/components/canvas/system-canvas.tsx). The viewport is the graph paper: its
1152
1154
  background position and size follow the pan and zoom (the component writes them directly, no inherited
1153
1155
  variables). Every rule that moves, loops or fades is
1154
1156
  inside prefers-reduced-motion: no-preference; under reduced motion the active look is
@@ -1489,7 +1491,7 @@
1489
1491
  border-radius: 14px;
1490
1492
  border: 1px solid var(--nish-line);
1491
1493
  background: var(--nish-surface);
1492
- box-shadow: var(--nish-shadow-md, 0 4px 14px rgb(0 0 0 / 0.18));
1494
+ box-shadow: var(--nish-shadow-pop);
1493
1495
  cursor: default;
1494
1496
  }
1495
1497
  .nish-canvas-zoom {
@@ -1651,6 +1653,19 @@
1651
1653
  forced-color-adjust: none;
1652
1654
  background-color: GrayText;
1653
1655
  }
1656
+ /* Canvas live and active states are drawn with background, border colour and shadow,
1657
+ which forced colors flatten: redraw them with Highlight and a thicker border. */
1658
+ .nish-canvas-live {
1659
+ forced-color-adjust: none;
1660
+ background: Highlight;
1661
+ box-shadow: none;
1662
+ }
1663
+ .nish-canvas-group[data-live],
1664
+ .nish-canvas-node[data-active] {
1665
+ forced-color-adjust: none;
1666
+ border-color: Highlight;
1667
+ border-width: 2px;
1668
+ }
1654
1669
  }
1655
1670
 
1656
1671
  /* ThemeProvider sets data-nish-theme-switching on <html> for one frame while it swaps the