neba 1.17.0 → 1.18.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.
- package/dist/a2ui/adapter-catalog.json +1 -1
- package/dist/a2ui/catalog.json +2 -2
- package/dist/a2ui/index.d.ts +2 -0
- package/dist/a2ui/schema.d.ts +11 -1
- package/dist/a2ui/schema.js +1 -1
- package/dist/components/alert/Alert.js +1 -1
- package/dist/components/animate-counter/AnimateCounter.d.ts +6 -0
- package/dist/components/animate-counter/AnimateCounter.js +1 -1
- package/dist/components/animate-headline/AnimateHeadline.js +1 -1
- package/dist/components/animate-scramble/AnimateScramble.d.ts +9 -3
- package/dist/components/animate-scramble/AnimateScramble.js +1 -1
- package/dist/components/animate-split/AnimateSplit.d.ts +7 -1
- package/dist/components/animate-split/AnimateSplit.js +1 -1
- package/dist/components/animate-typing/AnimateTyping.d.ts +6 -0
- package/dist/components/animate-typing/AnimateTyping.js +1 -1
- package/dist/components/app-logo/AppLogo.js +1 -1
- package/dist/components/approval/Approval.js +1 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts +16 -0
- package/dist/components/breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/calendar/Calendar.js +1 -1
- package/dist/components/card/Card.js +1 -1
- package/dist/components/carousel/Carousel.d.ts +3 -2
- package/dist/components/carousel/Carousel.js +1 -1
- package/dist/components/chat-bubble/ChatBubble.d.ts +6 -0
- package/dist/components/chat-bubble/ChatBubble.js +1 -1
- package/dist/components/code-block/CodeBlock.d.ts +2 -2
- package/dist/components/code-block/CodeBlock.js +1 -1
- package/dist/components/code-block/index.d.ts +2 -1
- package/dist/components/code-block/index.js +1 -1
- package/dist/components/color-picker/ColorPicker.js +1 -1
- package/dist/components/combobox/Combobox.js +1 -1
- package/dist/components/context-window/ContextWindow.js +1 -1
- package/dist/components/data-table/DataTable.d.ts +13 -1
- package/dist/components/data-table/DataTable.js +1 -1
- package/dist/components/date-picker/DatePicker.js +1 -1
- package/dist/components/date-range-picker/DateRangePicker.js +1 -1
- package/dist/components/date-time-picker/DateTimePicker.js +1 -1
- package/dist/components/drawer/Drawer.d.ts +21 -0
- package/dist/components/drawer/Drawer.js +1 -1
- package/dist/components/empty/Empty.js +1 -1
- package/dist/components/file-picker/FilePicker.d.ts +0 -8
- package/dist/components/file-picker/FilePicker.js +1 -1
- package/dist/components/file-picker/formatFileSize.d.ts +8 -0
- package/dist/components/file-picker/formatFileSize.js +1 -0
- package/dist/components/file-picker/index.d.ts +2 -1
- package/dist/components/file-picker/index.js +1 -1
- package/dist/components/floating-bottom-navigation/FloatingBottomNavigation.js +1 -1
- package/dist/components/gallery/Gallery.d.ts +45 -3
- package/dist/components/gallery/Gallery.js +1 -1
- package/dist/components/gallery/GalleryViewer.js +1 -1
- package/dist/components/gauge-chart/GaugeChart.js +1 -1
- package/dist/components/heatmap-chart/HeatmapChart.js +1 -1
- package/dist/components/how-to-steps/HowToSteps.d.ts +14 -0
- package/dist/components/how-to-steps/HowToSteps.js +1 -1
- package/dist/components/image/Image.d.ts +31 -6
- package/dist/components/image/Image.js +1 -1
- package/dist/components/menu/Menu.d.ts +17 -0
- package/dist/components/menu/Menu.js +1 -1
- package/dist/components/meter/Meter.js +1 -1
- package/dist/components/mockup/Mockup.js +1 -1
- package/dist/components/number-field/NumberField.js +1 -1
- package/dist/components/page-layout/PageLayout.js +1 -1
- package/dist/components/panes/Panes.js +1 -1
- package/dist/components/pie-chart/PieChart.js +1 -1
- package/dist/components/pill/Pill.js +1 -1
- package/dist/components/progress-box/ProgressBox.js +1 -1
- package/dist/components/progress-circular/ProgressCircular.js +1 -1
- package/dist/components/progress-linear/ProgressLinear.js +1 -1
- package/dist/components/prompt-input/PromptInput.js +1 -1
- package/dist/components/provider/NebaProvider.d.ts +0 -20
- package/dist/components/provider/NebaProvider.js +1 -1
- package/dist/components/provider/colorSchemeScript.d.ts +23 -0
- package/dist/components/provider/colorSchemeScript.js +1 -0
- package/dist/components/provider/index.d.ts +2 -1
- package/dist/components/provider/index.js +1 -1
- package/dist/components/reasoning/Reasoning.d.ts +21 -0
- package/dist/components/reasoning/Reasoning.js +1 -1
- package/dist/components/scatter-chart/ScatterChart.js +1 -1
- package/dist/components/scroll-zone/ScrollZone.js +1 -1
- package/dist/components/segmented-button/SegmentedButton.js +1 -1
- package/dist/components/select/Select.js +1 -1
- package/dist/components/sidebar/Sidebar.d.ts +13 -0
- package/dist/components/sidebar/Sidebar.js +1 -1
- package/dist/components/slider/Slider.js +1 -1
- package/dist/components/sources/Sources.d.ts +11 -0
- package/dist/components/sources/Sources.js +1 -1
- package/dist/components/spoiler/Spoiler.js +1 -1
- package/dist/components/statistic/Statistic.js +1 -1
- package/dist/components/streaming-text/StreamingText.d.ts +22 -11
- package/dist/components/streaming-text/StreamingText.js +1 -1
- package/dist/components/tabs/Tabs.d.ts +12 -1
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/text-link/TextLink.d.ts +7 -0
- package/dist/components/text-link/TextLink.js +1 -1
- package/dist/components/time-picker/TimePicker.js +1 -1
- package/dist/components/timeline-chart/TimelineChart.js +1 -1
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/tool-call/ToolCall.d.ts +11 -0
- package/dist/components/tool-call/ToolCall.js +1 -1
- package/dist/components/tour/Tour.js +1 -1
- package/dist/components/tree-view/TreeView.d.ts +13 -1
- package/dist/components/tree-view/TreeView.js +1 -1
- package/dist/components/typography/Typography.d.ts +7 -0
- package/dist/components/typography/Typography.js +1 -1
- package/dist/components/window-pane/WindowPane.js +1 -1
- package/dist/hooks/useElementSize.js +1 -1
- package/dist/internal/animate.js +1 -1
- package/dist/internal/calendar.d.ts +2 -2
- package/dist/internal/calendar.js +1 -1
- package/dist/internal/chart-frame.d.ts +59 -2
- package/dist/internal/chart-frame.js +1 -1
- package/dist/internal/chart-line.js +1 -1
- package/dist/internal/format.d.ts +7 -0
- package/dist/internal/format.js +1 -1
- package/dist/internal/highlight.d.ts +9 -0
- package/dist/internal/highlight.js +1 -1
- package/dist/internal/layout-effect.d.ts +17 -0
- package/dist/internal/layout-effect.js +1 -0
- package/dist/internal/media.d.ts +20 -0
- package/dist/internal/media.js +1 -1
- package/dist/internal/menu.d.ts +5 -0
- package/dist/internal/new-tab.d.ts +3 -1
- package/dist/internal/new-tab.js +1 -1
- package/dist/internal/observe.d.ts +4 -1
- package/dist/internal/observe.js +1 -1
- package/dist/internal/overrides.d.ts +55 -0
- package/dist/internal/overrides.js +1 -0
- package/dist/internal/page-layout.d.ts +26 -1
- package/dist/internal/page-layout.js +1 -1
- package/dist/internal/run.d.ts +6 -1
- package/dist/internal/run.js +1 -1
- package/dist/internal/sizer.d.ts +10 -0
- package/dist/internal/sizer.js +1 -1
- package/dist/internal/styles.d.ts +28 -2
- package/dist/internal/styles.js +1 -1
- package/dist/internal/text.d.ts +25 -3
- package/dist/internal/text.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +91 -72
- package/package.json +2 -2
package/dist/tailwind.css
CHANGED
|
@@ -1025,32 +1025,6 @@
|
|
|
1025
1025
|
background-image: linear-gradient(var(--n-soft-hover), var(--n-soft-hover));
|
|
1026
1026
|
}
|
|
1027
1027
|
|
|
1028
|
-
/* ---------------------------------------------------------------------------
|
|
1029
|
-
* Sheet titles
|
|
1030
|
-
*
|
|
1031
|
-
* A `title` is styled by the element the component renders around it — Card,
|
|
1032
|
-
* Alert and Dialog all do this — so a plain string needs nothing. But a sheet
|
|
1033
|
-
* that belongs in the document outline has to be given a real heading,
|
|
1034
|
-
* `title={<h2>…</h2>}`, and that heading arrives with the browser's own 1.5em
|
|
1035
|
-
* bold and its margins, which would ignore the type scale just set.
|
|
1036
|
-
*
|
|
1037
|
-
* This is in CSS rather than in Tailwind because the selector is the point:
|
|
1038
|
-
* `[&_:where(h1,h2,h3,h4,h5,h6)]:[font:inherit]` is expressible and nobody
|
|
1039
|
-
* would want to read it twice.
|
|
1040
|
-
*
|
|
1041
|
-
* The class is written twice for `neba-link`'s reason. One class plus a
|
|
1042
|
-
* `:where()` is one class, and `.prose h2` and `.vp-doc h2` are one class plus a
|
|
1043
|
-
* tag — so the browser's own bold was being replaced by the *article's*, and a
|
|
1044
|
-
* `<Card title={<h2>…</h2>}>` inside rendered Markdown came out at 24px where
|
|
1045
|
-
* the card asked for 15px. Two classes clears both and still loses to anything
|
|
1046
|
-
* a caller writes with two of their own.
|
|
1047
|
-
* ------------------------------------------------------------------------- */
|
|
1048
|
-
|
|
1049
|
-
.neba-title.neba-title :where(h1, h2, h3, h4, h5, h6) {
|
|
1050
|
-
font: inherit;
|
|
1051
|
-
margin: 0;
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
1028
|
/* ---------------------------------------------------------------------------
|
|
1055
1029
|
* ScrollArea's edge fade
|
|
1056
1030
|
*
|
|
@@ -1122,40 +1096,6 @@
|
|
|
1122
1096
|
--n-fade-end: var(--n-fade);
|
|
1123
1097
|
}
|
|
1124
1098
|
|
|
1125
|
-
/* ---------------------------------------------------------------------------
|
|
1126
|
-
* Links
|
|
1127
|
-
*
|
|
1128
|
-
* `<a>` is, with `<td>`, one of the two tags a host stylesheet still styles by
|
|
1129
|
-
* name — Tailwind Typography's `.prose a`, VitePress's own `.vp-doc a`, every
|
|
1130
|
-
* CSS framework ever written — and always as a class plus a type, which is a
|
|
1131
|
-
* specificity a one-class utility cannot reach. Table answered this by moving
|
|
1132
|
-
* its cell padding inline. A link cannot: half of what it draws only exists on
|
|
1133
|
-
* `:hover`, and inline styles have no `:hover`.
|
|
1134
|
-
*
|
|
1135
|
-
* So the selector is doubled instead. `.neba-link.neba-link` is two classes and
|
|
1136
|
-
* matches nothing extra, which puts these declarations above a host's `a` rule
|
|
1137
|
-
* and still below anything a caller writes with two classes of their own. Only
|
|
1138
|
-
* the invariants are here — the parts of a TextLink that no prop changes. The
|
|
1139
|
-
* colour and whether the line is drawn at all stay in the component, written
|
|
1140
|
-
* through the same doubled class.
|
|
1141
|
-
*
|
|
1142
|
-
* The thickness has a `max()` floor because a hairline that lands between two
|
|
1143
|
-
* device pixels is antialiased into a grey smudge: 0.055em is a real line from
|
|
1144
|
-
* about 18px up, and 1px below that.
|
|
1145
|
-
* ------------------------------------------------------------------------- */
|
|
1146
|
-
|
|
1147
|
-
.neba-link.neba-link {
|
|
1148
|
-
font-weight: inherit;
|
|
1149
|
-
text-decoration-thickness: max(1px, 0.055em);
|
|
1150
|
-
text-underline-offset: 0.2em;
|
|
1151
|
-
text-underline-position: from-font;
|
|
1152
|
-
text-decoration-color: var(--n-underline);
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
.neba-link.neba-link:hover {
|
|
1156
|
-
text-decoration-color: var(--n-underline-hover);
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
1099
|
/* ---------------------------------------------------------------------------
|
|
1160
1100
|
* Text a finger types into, on iOS
|
|
1161
1101
|
*
|
|
@@ -1168,7 +1108,8 @@
|
|
|
1168
1108
|
* `-webkit-touch-callout` is the property only WebKit on iOS and iPadOS has,
|
|
1169
1109
|
* which keeps every other browser, and desktop Safari, at the size the design
|
|
1170
1110
|
* set. `1em` is the size the field inherits from its shell, so a field already
|
|
1171
|
-
* over 16px keeps its own
|
|
1111
|
+
* over 16px keeps its own. The class is doubled because a host's `input` rule
|
|
1112
|
+
* is a class plus a tag, which one class would not clear.
|
|
1172
1113
|
* ------------------------------------------------------------------------- */
|
|
1173
1114
|
|
|
1174
1115
|
@supports (-webkit-touch-callout: none) {
|
|
@@ -2392,6 +2333,46 @@
|
|
|
2392
2333
|
min-inline-size: 0;
|
|
2393
2334
|
}
|
|
2394
2335
|
|
|
2336
|
+
/* ---------------------------------------------------------------------------
|
|
2337
|
+
* A segmented button before its tile is placed
|
|
2338
|
+
*
|
|
2339
|
+
* The tile that slides under the chosen segment is placed by measuring that
|
|
2340
|
+
* segment, which only a browser running the component can do. Until it has
|
|
2341
|
+
* been, the chosen segment carries the same fill itself, so a server-rendered
|
|
2342
|
+
* page says which one is taken from the first paint — and a `solid` set's
|
|
2343
|
+
* on-fill label has a fill under it — rather than drawing a dot in the corner
|
|
2344
|
+
* and a white label on the groove.
|
|
2345
|
+
*
|
|
2346
|
+
* On a pseudo-element rather than on the segment's own background, because the
|
|
2347
|
+
* background has a transition: the moment the tile is placed this goes and the
|
|
2348
|
+
* tile arrives in the same frame, where a background would fade out under it.
|
|
2349
|
+
* The root's `data-placed` is what says the tile is there, and `--n-seg-bg` and
|
|
2350
|
+
* `--n-seg-plate` are set inline per variant, as the tile's own classes are.
|
|
2351
|
+
* ------------------------------------------------------------------------- */
|
|
2352
|
+
|
|
2353
|
+
.neba-segmented:not([data-placed]) .neba-segment[data-checked]::before {
|
|
2354
|
+
content: '';
|
|
2355
|
+
position: absolute;
|
|
2356
|
+
inset: 0;
|
|
2357
|
+
z-index: -1;
|
|
2358
|
+
border-radius: inherit;
|
|
2359
|
+
background-color: var(--n-seg-bg);
|
|
2360
|
+
background-image: var(--neba-grain), var(--neba-sheen);
|
|
2361
|
+
background-blend-mode: overlay, normal;
|
|
2362
|
+
box-shadow: var(--neba-shadow-1), var(--n-seg-plate);
|
|
2363
|
+
backdrop-filter: var(--neba-blur);
|
|
2364
|
+
/* The segment's pointer light lives on this pseudo-element too, resting at
|
|
2365
|
+
nothing and fading in on hover. Until the tile is placed it is the fill,
|
|
2366
|
+
and once it is the light has it back with nothing to fade. */
|
|
2367
|
+
opacity: 1;
|
|
2368
|
+
transition: none;
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
.neba-segmented:not([data-placed]) .neba-segment[data-checked][data-disabled]::before {
|
|
2372
|
+
background-color: var(--neba-disabled-bg);
|
|
2373
|
+
box-shadow: none;
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2395
2376
|
/* ---------------------------------------------------------------------------
|
|
2396
2377
|
* Tree guides
|
|
2397
2378
|
*
|
|
@@ -2592,23 +2573,32 @@
|
|
|
2592
2573
|
/*
|
|
2593
2574
|
* The indeterminate bar: a short segment crossing the groove.
|
|
2594
2575
|
*
|
|
2595
|
-
* `inset-inline-start
|
|
2596
|
-
*
|
|
2597
|
-
*
|
|
2598
|
-
*
|
|
2576
|
+
* On `translate`, not on `inset-inline-start`. A box that moves by a layout
|
|
2577
|
+
* property is a layout shift as far as the browser is concerned, reported on
|
|
2578
|
+
* every frame for as long as it runs, and the CLS a consumer's page is scored on
|
|
2579
|
+
* adds them up — a placeholder sweeping on `inset-inline-start` scored 0.27 on
|
|
2580
|
+
* an idle page. `translate` moves the painted box and nothing else, so it is no
|
|
2581
|
+
* shift, and no layout pass either.
|
|
2582
|
+
*
|
|
2583
|
+
* The segment is pinned to the start edge and travels its own width times the
|
|
2584
|
+
* ratio below: from one width before the groove to the far end of it, which is
|
|
2585
|
+
* exactly the path the inset used to take. `translate` is physical, so the
|
|
2586
|
+
* direction comes from `--n-sweep-dir`, set under RTL further down.
|
|
2599
2587
|
*/
|
|
2600
2588
|
@keyframes neba-sweep {
|
|
2601
2589
|
from {
|
|
2602
|
-
|
|
2590
|
+
translate: calc(var(--n-sweep-dir, 1) * -100%) 0;
|
|
2603
2591
|
}
|
|
2604
2592
|
to {
|
|
2605
|
-
|
|
2593
|
+
/* 100% of the groove, in widths of a segment that is 45% of it. */
|
|
2594
|
+
translate: calc(var(--n-sweep-dir, 1) * 222.222%) 0;
|
|
2606
2595
|
}
|
|
2607
2596
|
}
|
|
2608
2597
|
|
|
2609
2598
|
.neba-sweep {
|
|
2610
2599
|
position: absolute;
|
|
2611
2600
|
inset-block: 0;
|
|
2601
|
+
inset-inline-start: 0;
|
|
2612
2602
|
inline-size: 45%;
|
|
2613
2603
|
animation: neba-sweep 1.15s var(--neba-ease) infinite;
|
|
2614
2604
|
}
|
|
@@ -2679,9 +2669,10 @@
|
|
|
2679
2669
|
/*
|
|
2680
2670
|
* The highlight travelling across a placeholder.
|
|
2681
2671
|
*
|
|
2682
|
-
* `
|
|
2683
|
-
*
|
|
2684
|
-
*
|
|
2672
|
+
* On `translate`, for the reason `neba-sweep` gives. This is the one that
|
|
2673
|
+
* mattered: a placeholder is drawn exactly while a page is loading, and is
|
|
2674
|
+
* often a large box, so the shifts it reported on `inset-inline-start` were the
|
|
2675
|
+
* largest thing in a consumer's CLS.
|
|
2685
2676
|
*
|
|
2686
2677
|
* A pseudo-element rather than a child, so a Skeleton is one element per shape
|
|
2687
2678
|
* and a stack of ten lines is ten nodes rather than twenty. The gradient is
|
|
@@ -2689,10 +2680,11 @@
|
|
|
2689
2680
|
*/
|
|
2690
2681
|
@keyframes neba-skeleton-sweep {
|
|
2691
2682
|
from {
|
|
2692
|
-
|
|
2683
|
+
translate: calc(var(--n-sweep-dir, 1) * -100%) 0;
|
|
2693
2684
|
}
|
|
2694
2685
|
to {
|
|
2695
|
-
|
|
2686
|
+
/* 100% of the placeholder, in widths of a highlight that is 60% of it. */
|
|
2687
|
+
translate: calc(var(--n-sweep-dir, 1) * 166.667%) 0;
|
|
2696
2688
|
}
|
|
2697
2689
|
}
|
|
2698
2690
|
|
|
@@ -2700,11 +2692,38 @@
|
|
|
2700
2692
|
content: '';
|
|
2701
2693
|
position: absolute;
|
|
2702
2694
|
inset-block: 0;
|
|
2695
|
+
inset-inline-start: 0;
|
|
2703
2696
|
inline-size: 60%;
|
|
2704
2697
|
background-image: linear-gradient(90deg, transparent, var(--n-panel-press), transparent);
|
|
2705
2698
|
animation: neba-skeleton-sweep 1.5s var(--neba-ease) infinite;
|
|
2706
2699
|
}
|
|
2707
2700
|
|
|
2701
|
+
/*
|
|
2702
|
+
* Under RTL the start edge is on the right, so both sweeps travel leftwards.
|
|
2703
|
+
*
|
|
2704
|
+
* `:dir()` decides wherever it exists: it resolves the nearest direction, a
|
|
2705
|
+
* `direction` set in CSS included, and the two rules for it come last so they
|
|
2706
|
+
* override the attribute. The attribute rule is for the browsers in the
|
|
2707
|
+
* supported range that have no `:dir()`, which then get every sweep inside a
|
|
2708
|
+
* `dir="rtl"` element running leftwards — an LTR island inside it as well. It
|
|
2709
|
+
* has to be a rule of its own: a selector list with a pseudo-class the browser
|
|
2710
|
+
* does not know is thrown away whole.
|
|
2711
|
+
*/
|
|
2712
|
+
[dir='rtl'] .neba-sweep,
|
|
2713
|
+
[dir='rtl'] .neba-skeleton {
|
|
2714
|
+
--n-sweep-dir: -1;
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
.neba-sweep:dir(rtl),
|
|
2718
|
+
.neba-skeleton:dir(rtl) {
|
|
2719
|
+
--n-sweep-dir: -1;
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2722
|
+
.neba-sweep:dir(ltr),
|
|
2723
|
+
.neba-skeleton:dir(ltr) {
|
|
2724
|
+
--n-sweep-dir: 1;
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2708
2727
|
/* The reduced-motion stand-in: the highlight stops travelling and the whole
|
|
2709
2728
|
placeholder breathes instead. Colour, which is the axis every other state in
|
|
2710
2729
|
the library already uses. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neba",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "A comprehensive React UI component library — buttons, fields, menus, dialogs, tables and much more — accessible and themeable, sharing one prop vocabulary and a translucent acrylic design language. ESM only, types included, dark mode built in.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
205
205
|
"@a2ui/react": "^0.11.0",
|
|
206
206
|
"@a2ui/web_core": "^0.11.0",
|
|
207
|
-
"zod": "^3.25.76"
|
|
207
|
+
"zod": "^3.25.76 || ^4.0.0"
|
|
208
208
|
},
|
|
209
209
|
"peerDependenciesMeta": {
|
|
210
210
|
"@types/react": {
|