neba 1.8.1 → 1.9.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/README.md +7 -7
- package/dist/components/accordion/Accordion.js +1 -1
- package/dist/components/alert/Alert.js +1 -1
- package/dist/components/anchor/Anchor.d.ts +73 -0
- package/dist/components/anchor/Anchor.js +1 -0
- package/dist/components/anchor/index.d.ts +2 -0
- package/dist/components/anchor/index.js +1 -0
- package/dist/components/animate-marquee/AnimateMarquee.js +1 -1
- package/dist/components/app-logo/AppLogo.js +1 -1
- package/dist/components/aspect-ratio/AspectRatio.js +1 -1
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/avatar-group/AvatarGroup.d.ts +47 -0
- package/dist/components/avatar-group/AvatarGroup.js +1 -0
- package/dist/components/avatar-group/index.d.ts +2 -0
- package/dist/components/avatar-group/index.js +1 -0
- package/dist/components/badge/Badge.js +1 -1
- package/dist/components/blockquote/Blockquote.js +1 -1
- package/dist/components/box/Box.js +1 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/button-group/ButtonGroup.js +1 -1
- package/dist/components/card/Card.js +1 -1
- package/dist/components/carousel/Carousel.js +1 -1
- package/dist/components/chat-bubble/ChatBubble.js +1 -1
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/combobox/Combobox.js +1 -1
- package/dist/components/command-palette/CommandPalette.d.ts +88 -0
- package/dist/components/command-palette/CommandPalette.js +1 -0
- package/dist/components/command-palette/index.d.ts +2 -0
- package/dist/components/command-palette/index.js +1 -0
- package/dist/components/container/Container.js +1 -1
- package/dist/components/data-list/DataList.d.ts +55 -0
- package/dist/components/data-list/DataList.js +1 -0
- package/dist/components/data-list/index.d.ts +2 -0
- package/dist/components/data-list/index.js +1 -0
- package/dist/components/data-table/DataTable.js +1 -1
- package/dist/components/dialog/Dialog.js +1 -1
- package/dist/components/divider/Divider.js +1 -1
- package/dist/components/drawer/Drawer.js +1 -1
- package/dist/components/empty/Empty.js +1 -1
- package/dist/components/fieldset/Fieldset.d.ts +33 -0
- package/dist/components/fieldset/Fieldset.js +1 -0
- package/dist/components/fieldset/index.d.ts +2 -0
- package/dist/components/fieldset/index.js +1 -0
- package/dist/components/file-picker/FilePicker.js +1 -1
- package/dist/components/floating-bottom-navigation/FloatingBottomNavigation.js +1 -1
- package/dist/components/form/Form.d.ts +58 -0
- package/dist/components/form/Form.js +1 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.js +1 -0
- package/dist/components/gauge-chart/GaugeChart.d.ts +62 -0
- package/dist/components/gauge-chart/GaugeChart.js +1 -0
- package/dist/components/gauge-chart/index.d.ts +2 -0
- package/dist/components/gauge-chart/index.js +1 -0
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/grid-container/GridContainer.js +1 -1
- package/dist/components/heatmap-chart/HeatmapChart.js +1 -1
- package/dist/components/highlight/Highlight.js +1 -1
- package/dist/components/hover-card/HoverCard.d.ts +78 -0
- package/dist/components/hover-card/HoverCard.js +1 -0
- package/dist/components/hover-card/index.d.ts +2 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/how-to-steps/HowToSteps.d.ts +11 -25
- package/dist/components/how-to-steps/HowToSteps.js +1 -1
- package/dist/components/icon/Icon.js +1 -1
- package/dist/components/list/List.js +1 -1
- package/dist/components/menu/Menu.d.ts +16 -4
- package/dist/components/menu/Menu.js +1 -1
- package/dist/components/menubar/Menubar.d.ts +56 -0
- package/dist/components/menubar/Menubar.js +1 -0
- package/dist/components/menubar/index.d.ts +2 -0
- package/dist/components/menubar/index.js +1 -0
- package/dist/components/meter/Meter.d.ts +52 -0
- package/dist/components/meter/Meter.js +1 -0
- package/dist/components/meter/index.d.ts +2 -0
- package/dist/components/meter/index.js +1 -0
- package/dist/components/mockup/Mockup.js +1 -1
- package/dist/components/navigation-menu/NavigationMenu.d.ts +100 -0
- package/dist/components/navigation-menu/NavigationMenu.js +1 -0
- package/dist/components/navigation-menu/index.d.ts +2 -0
- package/dist/components/navigation-menu/index.js +1 -0
- package/dist/components/number-field/NumberField.js +1 -1
- package/dist/components/otp-field/OtpField.js +1 -1
- package/dist/components/overlay/Overlay.js +1 -1
- package/dist/components/page-layout/PageLayout.js +1 -1
- package/dist/components/pagination/Pagination.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/popover/Popover.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/radio-group/RadioGroup.js +1 -1
- package/dist/components/rating/Rating.js +1 -1
- package/dist/components/scroll-area/ScrollArea.d.ts +50 -0
- package/dist/components/scroll-area/ScrollArea.js +1 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/scroll-zone/ScrollZone.d.ts +35 -17
- 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/shortcut/Shortcut.js +1 -1
- package/dist/components/sidebar/Sidebar.js +1 -1
- package/dist/components/skeleton/Skeleton.js +1 -1
- package/dist/components/slider/Slider.js +1 -1
- package/dist/components/spoiler/Spoiler.js +1 -1
- package/dist/components/statistic/Statistic.js +1 -1
- package/dist/components/switch/Switch.js +1 -1
- package/dist/components/table/Table.js +1 -1
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/text-field/TextField.js +1 -1
- package/dist/components/text-link/TextLink.js +1 -1
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/toggle/Toggle.d.ts +53 -0
- package/dist/components/toggle/Toggle.js +1 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/index.js +1 -0
- package/dist/components/toggle-group/ToggleGroup.d.ts +51 -0
- package/dist/components/toggle-group/ToggleGroup.js +1 -0
- package/dist/components/toggle-group/index.d.ts +2 -0
- package/dist/components/toggle-group/index.js +1 -0
- package/dist/components/toolbar/Toolbar.js +1 -1
- package/dist/components/tooltip/Tooltip.js +1 -1
- package/dist/components/tour/Tour.d.ts +82 -0
- package/dist/components/tour/Tour.js +1 -0
- package/dist/components/tour/index.d.ts +2 -0
- package/dist/components/tour/index.js +1 -0
- package/dist/components/transfer/Transfer.d.ts +52 -0
- package/dist/components/transfer/Transfer.js +1 -0
- package/dist/components/transfer/index.d.ts +2 -0
- package/dist/components/transfer/index.js +1 -0
- package/dist/components/tree-view/TreeView.js +1 -1
- package/dist/components/typography/Typography.js +1 -1
- package/dist/components/window-pane/WindowPane.js +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.js +1 -1
- package/dist/internal/animate.d.ts +7 -1
- package/dist/internal/animate.js +1 -1
- package/dist/internal/avatar-group.d.ts +22 -0
- package/dist/internal/avatar-group.js +1 -0
- package/dist/internal/button-group.d.ts +6 -2
- package/dist/internal/chart-frame.d.ts +18 -1
- package/dist/internal/chart-frame.js +1 -1
- package/dist/internal/data-table.d.ts +0 -14
- package/dist/internal/data-table.js +1 -1
- package/dist/internal/drag.d.ts +62 -0
- package/dist/internal/drag.js +1 -0
- package/dist/internal/highlight.js +1 -1
- package/dist/internal/i18n.d.ts +82 -0
- package/dist/internal/i18n.js +1 -1
- package/dist/internal/link.d.ts +19 -0
- package/dist/internal/link.js +1 -0
- package/dist/internal/media.d.ts +29 -0
- package/dist/internal/media.js +1 -0
- package/dist/internal/observe.d.ts +42 -0
- package/dist/internal/observe.js +1 -0
- package/dist/internal/page-layout.js +1 -1
- package/dist/internal/picker.js +1 -1
- package/dist/internal/progress.d.ts +5 -0
- package/dist/internal/search.d.ts +33 -0
- package/dist/internal/search.js +1 -0
- package/dist/internal/styles.d.ts +39 -0
- package/dist/internal/styles.js +1 -1
- package/dist/locales/ar.js +1 -1
- package/dist/locales/de.js +1 -1
- package/dist/locales/es.js +1 -1
- package/dist/locales/fr.js +1 -1
- package/dist/locales/hi.js +1 -1
- package/dist/locales/id.js +1 -1
- package/dist/locales/it.js +1 -1
- package/dist/locales/ja.js +1 -1
- package/dist/locales/ko.js +1 -1
- package/dist/locales/nl.js +1 -1
- package/dist/locales/pl.js +1 -1
- package/dist/locales/pt.js +1 -1
- package/dist/locales/ru.js +1 -1
- package/dist/locales/th.js +1 -1
- package/dist/locales/tr.js +1 -1
- package/dist/locales/vi.js +1 -1
- package/dist/locales/zh-hans.js +1 -1
- package/dist/locales/zh-hant.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +104 -0
- package/dist/types.d.ts +16 -0
- package/package.json +2 -2
package/dist/tailwind.css
CHANGED
|
@@ -812,6 +812,77 @@
|
|
|
812
812
|
margin: 0;
|
|
813
813
|
}
|
|
814
814
|
|
|
815
|
+
/* ---------------------------------------------------------------------------
|
|
816
|
+
* ScrollArea's edge fade
|
|
817
|
+
*
|
|
818
|
+
* The content is faded out at each edge that has more behind it, and only at
|
|
819
|
+
* those edges: at the top of a list there is nothing above, so there is no fade
|
|
820
|
+
* above. Which edges those are is Base UI's answer — it writes
|
|
821
|
+
* `data-overflow-y-start` and its three siblings onto the root — so all this
|
|
822
|
+
* does is turn four attributes into four lengths.
|
|
823
|
+
*
|
|
824
|
+
* A **mask** rather than a gradient painted over the content, because a
|
|
825
|
+
* gradient has to fade *to* a colour and there is no such colour here: a scroll
|
|
826
|
+
* area usually sits on a translucent acrylic sheet, and anything opaque drawn
|
|
827
|
+
* over its edges would be a bar of paint across the backdrop.
|
|
828
|
+
*
|
|
829
|
+
* Two masks composited rather than one, because the two axes are independent
|
|
830
|
+
* and a single gradient cannot fade in two directions. `intersect` is what makes
|
|
831
|
+
* the corner where both apply come out as the darker of the two rather than the
|
|
832
|
+
* sum, which would punch a hole.
|
|
833
|
+
*
|
|
834
|
+
* The horizontal pair is mapped through `:dir()` because a gradient's `to right`
|
|
835
|
+
* is physical and `data-overflow-x-start` is logical — under RTL the start of
|
|
836
|
+
* the axis is the right-hand edge.
|
|
837
|
+
* ------------------------------------------------------------------------- */
|
|
838
|
+
|
|
839
|
+
.neba-scroll-fade {
|
|
840
|
+
--n-fade-start: 0px;
|
|
841
|
+
--n-fade-end: 0px;
|
|
842
|
+
--n-fade-top: 0px;
|
|
843
|
+
--n-fade-bottom: 0px;
|
|
844
|
+
--n-fade-left: var(--n-fade-start);
|
|
845
|
+
--n-fade-right: var(--n-fade-end);
|
|
846
|
+
|
|
847
|
+
mask-image:
|
|
848
|
+
linear-gradient(
|
|
849
|
+
to bottom,
|
|
850
|
+
transparent 0,
|
|
851
|
+
black var(--n-fade-top),
|
|
852
|
+
black calc(100% - var(--n-fade-bottom)),
|
|
853
|
+
transparent 100%
|
|
854
|
+
),
|
|
855
|
+
linear-gradient(
|
|
856
|
+
to right,
|
|
857
|
+
transparent 0,
|
|
858
|
+
black var(--n-fade-left),
|
|
859
|
+
black calc(100% - var(--n-fade-right)),
|
|
860
|
+
transparent 100%
|
|
861
|
+
);
|
|
862
|
+
mask-composite: intersect;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.neba-scroll-fade:dir(rtl) {
|
|
866
|
+
--n-fade-left: var(--n-fade-end);
|
|
867
|
+
--n-fade-right: var(--n-fade-start);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
[data-overflow-y-start] > .neba-scroll-fade {
|
|
871
|
+
--n-fade-top: var(--n-fade);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
[data-overflow-y-end] > .neba-scroll-fade {
|
|
875
|
+
--n-fade-bottom: var(--n-fade);
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
[data-overflow-x-start] > .neba-scroll-fade {
|
|
879
|
+
--n-fade-start: var(--n-fade);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
[data-overflow-x-end] > .neba-scroll-fade {
|
|
883
|
+
--n-fade-end: var(--n-fade);
|
|
884
|
+
}
|
|
885
|
+
|
|
815
886
|
/* ---------------------------------------------------------------------------
|
|
816
887
|
* Links
|
|
817
888
|
*
|
|
@@ -1496,6 +1567,39 @@
|
|
|
1496
1567
|
pointer-events: none;
|
|
1497
1568
|
}
|
|
1498
1569
|
|
|
1570
|
+
/* ---------------------------------------------------------------------------
|
|
1571
|
+
* The target under a small control
|
|
1572
|
+
*
|
|
1573
|
+
* A tick is 18px because it is sized against the text beside it, and a finger
|
|
1574
|
+
* is not. WCAG 2.5.8 asks for 24 CSS pixels in both directions, and a Checkbox,
|
|
1575
|
+
* a Radio, a Switch and the × that removes a Chip are all under it at most
|
|
1576
|
+
* steps of the ladder — a bare Checkbox in a table's tick column is the worst
|
|
1577
|
+
* case, because there is no label beside it to press instead.
|
|
1578
|
+
*
|
|
1579
|
+
* What is drawn does not change by a pixel. An empty `::before` grows the box
|
|
1580
|
+
* the pointer is tested against, and only where it is short of the minimum:
|
|
1581
|
+
* `100%` on `top`/`bottom` resolves against the containing block's height and
|
|
1582
|
+
* on `left`/`right` against its width, so one declaration widens each axis by
|
|
1583
|
+
* exactly what that axis lacks. A Switch, already 44px wide at `lg`, grows only
|
|
1584
|
+
* upward and downward. The `min(0px, …)` is what keeps it from ever shrinking
|
|
1585
|
+
* a control that is already big enough.
|
|
1586
|
+
*
|
|
1587
|
+
* `--n-hit` is the floor, so a component that needs the 44px of a touch-first
|
|
1588
|
+
* design can ask for it without a second rule.
|
|
1589
|
+
*
|
|
1590
|
+
* It lives here rather than in a Tailwind arbitrary variant for the reason the
|
|
1591
|
+
* layer below does: `before:[inset:min(0px,calc((1.5rem_-_100%)/-2))]` is
|
|
1592
|
+
* expressible and nobody should have to read it.
|
|
1593
|
+
* ------------------------------------------------------------------------- */
|
|
1594
|
+
|
|
1595
|
+
.neba-hit::before {
|
|
1596
|
+
content: '';
|
|
1597
|
+
position: absolute;
|
|
1598
|
+
inset: min(0px, calc((var(--n-hit, 1.5rem) - 100%) / -2));
|
|
1599
|
+
/* Nothing is painted here. The box exists to be pressed. */
|
|
1600
|
+
border-radius: inherit;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1499
1603
|
/* ---------------------------------------------------------------------------
|
|
1500
1604
|
* Interaction light
|
|
1501
1605
|
*
|
package/dist/types.d.ts
CHANGED
|
@@ -455,6 +455,22 @@ export interface NebaChartLegend {
|
|
|
455
455
|
/** Draws each series' current value beside its name. @default false */
|
|
456
456
|
showValue?: boolean;
|
|
457
457
|
}
|
|
458
|
+
/**
|
|
459
|
+
* A point on a scale, and the colour family a reading takes once it has reached
|
|
460
|
+
* it.
|
|
461
|
+
*
|
|
462
|
+
* The one place in the library where a semantic colour is *computed*, and the
|
|
463
|
+
* reason it is here rather than in whichever component needed it first: a Meter
|
|
464
|
+
* and a GaugeChart are the same reading in two shapes, and a page carrying both
|
|
465
|
+
* must not disagree about where amber starts. Left to the caller that would be
|
|
466
|
+
* a ternary at every call site, and the fourth one would.
|
|
467
|
+
*/
|
|
468
|
+
export interface NebaThreshold {
|
|
469
|
+
/** The value from which this family applies, in the reading's own units. */
|
|
470
|
+
from: number;
|
|
471
|
+
/** What the bar, or the arc, turns at and above that point. */
|
|
472
|
+
color: NebaColor;
|
|
473
|
+
}
|
|
458
474
|
/** Style props shared by most components; spread into their own prop types. */
|
|
459
475
|
export interface NebaStyleProps {
|
|
460
476
|
/** @default 'solid' */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neba",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.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",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"react-dom": "^19.2.8",
|
|
155
155
|
"tailwindcss": "^4.3.3",
|
|
156
156
|
"terser-glob": "^1.2.1",
|
|
157
|
-
"tsx": "^4.23.
|
|
157
|
+
"tsx": "^4.23.13",
|
|
158
158
|
"typescript": "^6.0.3",
|
|
159
159
|
"typescript-eslint": "^8.68.0",
|
|
160
160
|
"vite": "^8.2.2",
|