neba 1.12.0 → 1.15.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/LICENSE +1 -1
- package/README.md +50 -56
- package/dist/a2ui/catalog.json +1466 -0
- package/dist/a2ui/components.d.ts +21 -0
- package/dist/a2ui/components.js +1 -0
- package/dist/a2ui/index.d.ts +62 -0
- package/dist/a2ui/index.js +1 -0
- package/dist/a2ui/schema.d.ts +47 -0
- package/dist/a2ui/schema.js +1 -0
- package/dist/components/accordion/Accordion.d.ts +23 -1
- package/dist/components/accordion/Accordion.js +1 -1
- package/dist/components/agent-steps/AgentSteps.d.ts +80 -0
- package/dist/components/agent-steps/AgentSteps.js +1 -0
- package/dist/components/agent-steps/index.d.ts +2 -0
- package/dist/components/agent-steps/index.js +1 -0
- package/dist/components/alert/Alert.js +1 -1
- package/dist/components/anchor/Anchor.d.ts +3 -2
- package/dist/components/anchor/Anchor.js +1 -1
- package/dist/components/animate-appear/AnimateAppear.js +1 -1
- package/dist/components/animate-blink/AnimateBlink.d.ts +3 -0
- package/dist/components/animate-blink/AnimateBlink.js +1 -1
- package/dist/components/animate-counter/AnimateCounter.d.ts +3 -1
- package/dist/components/animate-counter/AnimateCounter.js +1 -1
- package/dist/components/animate-fade/AnimateFade.js +1 -1
- package/dist/components/animate-float/AnimateFloat.js +1 -1
- package/dist/components/animate-grow/AnimateGrow.js +1 -1
- package/dist/components/animate-headline/AnimateHeadline.d.ts +9 -2
- package/dist/components/animate-headline/AnimateHeadline.js +1 -1
- package/dist/components/animate-lighting/AnimateLighting.d.ts +1 -1
- package/dist/components/animate-lighting/AnimateLighting.js +1 -1
- package/dist/components/animate-marquee/AnimateMarquee.d.ts +19 -8
- package/dist/components/animate-marquee/AnimateMarquee.js +1 -1
- package/dist/components/animate-reveal/AnimateReveal.js +1 -1
- package/dist/components/animate-rotate/AnimateRotate.js +1 -1
- package/dist/components/animate-scramble/AnimateScramble.d.ts +5 -3
- package/dist/components/animate-scramble/AnimateScramble.js +1 -1
- package/dist/components/animate-shake/AnimateShake.js +1 -1
- package/dist/components/animate-slide/AnimateSlide.js +1 -1
- package/dist/components/animate-split/AnimateSplit.d.ts +3 -1
- package/dist/components/animate-split/AnimateSplit.js +1 -1
- package/dist/components/animate-typing/AnimateTyping.d.ts +12 -4
- package/dist/components/animate-typing/AnimateTyping.js +1 -1
- package/dist/components/animate-zoom/AnimateZoom.js +1 -1
- package/dist/components/app-logo/AppLogo.js +1 -1
- package/dist/components/approval/Approval.d.ts +115 -0
- package/dist/components/approval/Approval.js +1 -0
- package/dist/components/approval/index.d.ts +2 -0
- package/dist/components/approval/index.js +1 -0
- package/dist/components/area-chart/AreaChart.js +1 -1
- package/dist/components/aspect-ratio/AspectRatio.d.ts +6 -4
- package/dist/components/aspect-ratio/AspectRatio.js +1 -1
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/badge/Badge.js +1 -1
- package/dist/components/bar-chart/BarChart.d.ts +1 -1
- package/dist/components/bar-chart/BarChart.js +1 -1
- package/dist/components/blockquote/Blockquote.js +1 -1
- package/dist/components/bottom-navigation/BottomNavigation.d.ts +12 -1
- package/dist/components/bottom-navigation/BottomNavigation.js +1 -1
- package/dist/components/box/Box.d.ts +5 -0
- package/dist/components/box/Box.js +1 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts +10 -0
- package/dist/components/breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/button/Button.d.ts +11 -0
- package/dist/components/button/Button.js +1 -1
- package/dist/components/button-group/ButtonGroup.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 +17 -0
- 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/chip/Chip.d.ts +3 -1
- package/dist/components/chip/Chip.js +1 -1
- package/dist/components/code-block/CodeBlock.d.ts +6 -3
- package/dist/components/code-block/CodeBlock.js +1 -1
- package/dist/components/collapsible/Collapsible.d.ts +11 -1
- package/dist/components/collapsible/Collapsible.js +1 -1
- package/dist/components/color-picker/ColorPicker.js +1 -1
- package/dist/components/combobox/Combobox.d.ts +29 -1
- package/dist/components/combobox/Combobox.js +1 -1
- package/dist/components/command-palette/CommandPalette.js +1 -1
- package/dist/components/confirm/Confirm.js +1 -1
- package/dist/components/container/Container.js +1 -1
- package/dist/components/context-window/ContextWindow.d.ts +103 -0
- package/dist/components/context-window/ContextWindow.js +1 -0
- package/dist/components/context-window/index.d.ts +2 -0
- package/dist/components/context-window/index.js +1 -0
- package/dist/components/data-list/DataList.js +1 -1
- package/dist/components/data-table/DataTable.d.ts +12 -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/dialog/Dialog.d.ts +12 -0
- package/dist/components/dialog/Dialog.js +1 -1
- package/dist/components/divider/Divider.js +1 -1
- package/dist/components/drawer/Drawer.d.ts +7 -0
- package/dist/components/drawer/Drawer.js +1 -1
- package/dist/components/empty/Empty.js +1 -1
- package/dist/components/fieldset/Fieldset.js +1 -1
- package/dist/components/file-picker/FilePicker.d.ts +12 -4
- package/dist/components/file-picker/FilePicker.js +1 -1
- package/dist/components/flex/Flex.d.ts +8 -2
- package/dist/components/flex/Flex.js +1 -1
- package/dist/components/floating-action-button/FloatingActionButton.d.ts +16 -1
- package/dist/components/floating-action-button/FloatingActionButton.js +1 -1
- package/dist/components/floating-bottom-navigation/FloatingBottomNavigation.js +1 -1
- package/dist/components/footer/Footer.d.ts +8 -0
- package/dist/components/footer/Footer.js +1 -1
- package/dist/components/form/Form.d.ts +4 -2
- package/dist/components/form/Form.js +1 -1
- package/dist/components/gallery/Gallery.d.ts +56 -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/grid/Grid.d.ts +11 -1
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/grid-container/GridContainer.js +1 -1
- package/dist/components/header/Header.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.js +1 -1
- package/dist/components/how-to-steps/HowToSteps.d.ts +26 -1
- package/dist/components/how-to-steps/HowToSteps.js +1 -1
- package/dist/components/icon/Icon.js +1 -1
- package/dist/components/icon-button/IconButton.d.ts +0 -20
- package/dist/components/icon-button/IconButton.js +1 -1
- package/dist/components/image/Image.d.ts +162 -8
- package/dist/components/image/Image.js +1 -1
- package/dist/components/image/index.d.ts +1 -1
- package/dist/components/inline-citation/InlineCitation.d.ts +53 -0
- package/dist/components/inline-citation/InlineCitation.js +1 -0
- package/dist/components/inline-citation/index.d.ts +2 -0
- package/dist/components/inline-citation/index.js +1 -0
- package/dist/components/list/List.js +1 -1
- package/dist/components/menu/Menu.d.ts +7 -4
- package/dist/components/menu/Menu.js +1 -1
- package/dist/components/menubar/Menubar.js +1 -1
- package/dist/components/meter/Meter.d.ts +13 -0
- package/dist/components/meter/Meter.js +1 -1
- package/dist/components/mockup/Mockup.js +1 -1
- package/dist/components/navigation-menu/NavigationMenu.d.ts +10 -1
- package/dist/components/navigation-menu/NavigationMenu.js +1 -1
- package/dist/components/number-field/NumberField.d.ts +20 -6
- package/dist/components/number-field/NumberField.js +1 -1
- package/dist/components/otp-field/OtpField.d.ts +7 -0
- package/dist/components/otp-field/OtpField.js +1 -1
- package/dist/components/overlay/Overlay.d.ts +1 -1
- package/dist/components/overlay/Overlay.js +1 -1
- package/dist/components/page-layout/PageLayout.d.ts +11 -0
- package/dist/components/page-layout/PageLayout.js +1 -1
- package/dist/components/pagination/Pagination.js +1 -1
- package/dist/components/panes/Panes.d.ts +11 -0
- package/dist/components/panes/Panes.js +1 -1
- package/dist/components/pie-chart/PieChart.d.ts +5 -3
- package/dist/components/pie-chart/PieChart.js +1 -1
- package/dist/components/pill/Pill.d.ts +8 -0
- package/dist/components/pill/Pill.js +1 -1
- package/dist/components/popconfirm/Popconfirm.d.ts +10 -3
- package/dist/components/popconfirm/Popconfirm.js +1 -1
- package/dist/components/popover/Popover.d.ts +8 -1
- package/dist/components/popover/Popover.js +1 -1
- package/dist/components/portal/Portal.js +1 -1
- package/dist/components/progress-box/ProgressBox.js +1 -1
- package/dist/components/progress-circular/ProgressCircular.d.ts +10 -1
- package/dist/components/progress-circular/ProgressCircular.js +1 -1
- package/dist/components/progress-linear/ProgressLinear.d.ts +7 -1
- package/dist/components/progress-linear/ProgressLinear.js +1 -1
- package/dist/components/prompt-input/PromptInput.d.ts +104 -0
- package/dist/components/prompt-input/PromptInput.js +1 -0
- package/dist/components/prompt-input/index.d.ts +2 -0
- package/dist/components/prompt-input/index.js +1 -0
- package/dist/components/provider/NebaProvider.d.ts +3 -3
- package/dist/components/provider/NebaProvider.js +1 -1
- package/dist/components/radio-group/RadioGroup.js +1 -1
- package/dist/components/rating/Rating.d.ts +4 -1
- package/dist/components/rating/Rating.js +1 -1
- package/dist/components/reasoning/Reasoning.d.ts +78 -0
- package/dist/components/reasoning/Reasoning.js +1 -0
- package/dist/components/reasoning/index.d.ts +2 -0
- package/dist/components/reasoning/index.js +1 -0
- package/dist/components/scatter-chart/ScatterChart.js +1 -1
- package/dist/components/scroll-area/ScrollArea.js +1 -1
- package/dist/components/scroll-zone/ScrollZone.d.ts +18 -7
- package/dist/components/scroll-zone/ScrollZone.js +1 -1
- package/dist/components/segmented-button/SegmentedButton.js +1 -1
- package/dist/components/select/Select.d.ts +13 -0
- package/dist/components/select/Select.js +1 -1
- package/dist/components/shortcut/Shortcut.js +1 -1
- package/dist/components/show/Show.d.ts +6 -5
- package/dist/components/show/Show.js +1 -1
- package/dist/components/sidebar/Sidebar.d.ts +7 -5
- package/dist/components/sidebar/Sidebar.js +1 -1
- package/dist/components/sidebar/SidebarTrigger.js +1 -1
- package/dist/components/skeleton/Skeleton.d.ts +1 -1
- package/dist/components/skeleton/Skeleton.js +1 -1
- package/dist/components/slider/Slider.d.ts +49 -2
- package/dist/components/slider/Slider.js +1 -1
- package/dist/components/sources/Sources.d.ts +78 -0
- package/dist/components/sources/Sources.js +1 -0
- package/dist/components/sources/index.d.ts +2 -0
- package/dist/components/sources/index.js +1 -0
- package/dist/components/sparkline/Sparkline.js +1 -1
- package/dist/components/spoiler/Spoiler.js +1 -1
- package/dist/components/stack/Stack.d.ts +2 -2
- package/dist/components/stack/Stack.js +1 -1
- package/dist/components/statistic/Statistic.js +1 -1
- package/dist/components/streaming-text/StreamingText.d.ts +75 -0
- package/dist/components/streaming-text/StreamingText.js +1 -0
- package/dist/components/streaming-text/index.d.ts +2 -0
- package/dist/components/streaming-text/index.js +1 -0
- package/dist/components/switch/Switch.js +1 -1
- package/dist/components/table/Table.d.ts +8 -2
- package/dist/components/table/Table.js +1 -1
- package/dist/components/tabs/Tabs.d.ts +18 -0
- 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/time-picker/TimePicker.js +1 -1
- package/dist/components/timeline/Timeline.d.ts +8 -0
- package/dist/components/timeline/Timeline.js +1 -1
- package/dist/components/timeline-chart/TimelineChart.js +1 -1
- package/dist/components/toast/Toast.d.ts +9 -3
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/toggle/Toggle.js +1 -1
- package/dist/components/toggle-group/ToggleGroup.js +1 -1
- package/dist/components/tool-call/ToolCall.d.ts +104 -0
- package/dist/components/tool-call/ToolCall.js +1 -0
- package/dist/components/tool-call/index.d.ts +2 -0
- package/dist/components/tool-call/index.js +1 -0
- package/dist/components/toolbar/Toolbar.d.ts +8 -0
- package/dist/components/toolbar/Toolbar.js +1 -1
- package/dist/components/tooltip/Tooltip.js +1 -1
- package/dist/components/tour/Tour.d.ts +2 -0
- package/dist/components/tour/Tour.js +1 -1
- package/dist/components/transfer/Transfer.js +1 -1
- package/dist/components/tree-select/TreeSelect.d.ts +2 -0
- package/dist/components/tree-select/TreeSelect.js +1 -1
- package/dist/components/tree-view/TreeView.d.ts +6 -0
- package/dist/components/tree-view/TreeView.js +1 -1
- package/dist/components/typography/Typography.js +1 -1
- package/dist/components/visually-hidden/VisuallyHidden.d.ts +9 -7
- package/dist/components/visually-hidden/VisuallyHidden.js +1 -1
- package/dist/components/window-pane/WindowPane.d.ts +2 -2
- package/dist/components/window-pane/WindowPane.js +1 -1
- package/dist/hooks/useElementSize.d.ts +3 -1
- package/dist/hooks/useElementSize.js +1 -1
- package/dist/hooks/useOnScreen.d.ts +3 -0
- package/dist/hooks/useOnScreen.js +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1 -1
- package/dist/internal/animate.d.ts +63 -16
- package/dist/internal/animate.js +1 -1
- package/dist/internal/cache.d.ts +24 -0
- package/dist/internal/cache.js +1 -0
- package/dist/internal/calendar.d.ts +21 -43
- package/dist/internal/calendar.js +1 -1
- package/dist/internal/chart-frame.d.ts +80 -25
- package/dist/internal/chart-frame.js +1 -1
- package/dist/internal/chart-line.js +1 -1
- package/dist/internal/chart.d.ts +55 -4
- package/dist/internal/chart.js +1 -1
- package/dist/internal/children.d.ts +15 -0
- package/dist/internal/children.js +1 -0
- package/dist/internal/color.d.ts +4 -0
- package/dist/internal/color.js +1 -1
- package/dist/internal/csv.d.ts +12 -1
- package/dist/internal/csv.js +1 -1
- package/dist/internal/data-table.d.ts +28 -10
- package/dist/internal/data-table.js +1 -1
- package/dist/internal/date.d.ts +12 -5
- package/dist/internal/date.js +1 -1
- package/dist/internal/defaults.d.ts +6 -1
- package/dist/internal/defaults.js +1 -1
- package/dist/internal/drag.d.ts +21 -7
- package/dist/internal/drag.js +1 -1
- package/dist/internal/drop.d.ts +61 -0
- package/dist/internal/drop.js +1 -0
- package/dist/internal/fieldset.d.ts +13 -0
- package/dist/internal/fieldset.js +1 -0
- package/dist/internal/format.d.ts +21 -7
- package/dist/internal/format.js +1 -1
- package/dist/internal/glow.d.ts +58 -0
- package/dist/internal/glow.js +1 -0
- package/dist/internal/grid.d.ts +16 -0
- package/dist/internal/grid.js +1 -1
- package/dist/internal/highlight.js +1 -1
- package/dist/internal/i18n.d.ts +302 -11
- package/dist/internal/i18n.js +1 -1
- package/dist/internal/icons.d.ts +38 -2
- package/dist/internal/icons.js +1 -1
- package/dist/internal/inert.d.ts +13 -0
- package/dist/internal/inert.js +1 -0
- package/dist/internal/initials.d.ts +8 -3
- package/dist/internal/initials.js +1 -1
- package/dist/internal/keys.d.ts +13 -0
- package/dist/internal/keys.js +1 -1
- package/dist/internal/link.d.ts +13 -14
- package/dist/internal/link.js +1 -1
- package/dist/internal/media.d.ts +9 -17
- package/dist/internal/media.js +1 -1
- package/dist/internal/menu.d.ts +6 -1
- package/dist/internal/mockup.d.ts +5 -4
- package/dist/internal/mockup.js +1 -1
- package/dist/internal/observe.d.ts +12 -0
- package/dist/internal/observe.js +1 -1
- package/dist/internal/page-layout.d.ts +10 -8
- package/dist/internal/page-layout.js +1 -1
- package/dist/internal/picker.d.ts +8 -3
- package/dist/internal/picker.js +1 -1
- package/dist/internal/progress.d.ts +35 -6
- package/dist/internal/progress.js +1 -1
- package/dist/internal/responsive.d.ts +0 -8
- package/dist/internal/responsive.js +1 -1
- package/dist/internal/run.d.ts +71 -0
- package/dist/internal/run.js +1 -0
- package/dist/internal/screen.d.ts +12 -0
- package/dist/internal/screen.js +1 -0
- package/dist/internal/styles.d.ts +245 -4
- package/dist/internal/styles.js +1 -1
- package/dist/internal/text.d.ts +3 -13
- package/dist/internal/text.js +1 -1
- package/dist/internal/wheel.d.ts +38 -0
- package/dist/internal/wheel.js +1 -0
- package/dist/internal/window.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 +632 -59
- package/dist/types.d.ts +34 -7
- package/dist/types.js +0 -8
- package/package.json +44 -10
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2025 CDGet
|
|
3
|
+
Copyright (c) 2025 CDGet (https://cdget.com).
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -4,38 +4,40 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://github.com/jooy2/neba/blob/main/LICENSE)   [](https://www.npmjs.com/package/neba) [](https://www.npmjs.com/package/neba)  [](https://github.com/jooy2) 
|
|
6
6
|
|
|
7
|
-
### 📘 [**neba.cdget.com**](https://neba.cdget.com)
|
|
8
|
-
|
|
9
|
-
[](https://neba.cdget.com/examples/overview)
|
|
10
|
-
|
|
11
7
|
Live previews and full props for every component. This README is just the quick start.
|
|
12
8
|
|
|
9
|
+

|
|
10
|
+
|
|
13
11
|
---
|
|
14
12
|
|
|
15
|
-
**Neba UI is a React component library for building application interfaces.**
|
|
13
|
+
**Neba UI is a React component library for building application interfaces.** About 140 components, from buttons and form fields through menus, dialogs, tables and charts. They are styled and accessible out of the box, and they agree with each other because they draw from one set of props.
|
|
16
14
|
|
|
17
15
|
You install one package, add one line to your CSS, and import components. There is nothing to configure, no theme object to assemble, and no per-component styling decisions to make before you can ship a screen.
|
|
18
16
|
|
|
19
|
-
- **A broad component set, still growing
|
|
20
|
-
- **One shared vocabulary
|
|
21
|
-
- **Accessible by construction
|
|
22
|
-
- **Dark mode with no work
|
|
23
|
-
- **A design language, not a theme file
|
|
24
|
-
- **ESM only**, TypeScript declarations included, and genuinely tree-shakeable
|
|
25
|
-
- **Two runtime dependencies
|
|
17
|
+
- **A broad component set, still growing**: enough to build a whole screen without reaching elsewhere.
|
|
18
|
+
- **One shared vocabulary**: `size`, `color`, `variant`, `density`, `elevation`. An `md` is the same height on every control; `primary` is the same colour everywhere.
|
|
19
|
+
- **Accessible by construction**: real roles, labels, focus management and keyboard support, not `div`s with click handlers.
|
|
20
|
+
- **Dark mode with no work**: follows the system, and can be forced either way per subtree.
|
|
21
|
+
- **A design language, not a theme file**: a translucent acrylic surface with a hairline edge, one deliberate motion signature, and shadows that are opt-in.
|
|
22
|
+
- **ESM only**, TypeScript declarations included, and genuinely tree-shakeable: every component compiles to its own module, and importing one costs about what one costs. A `Button` is ~5 kB gzipped including its Base UI parts, a `Chip` is ~3.5 kB, and a twelve-component app is ~70 kB; the whole library, all one hundred and eighty-five exports at once, is ~286 kB.
|
|
23
|
+
- **Two runtime dependencies**: Base UI, and `highlight.js`, which only [CodeBlock](https://neba.cdget.com/components/display/code-block) reaches and only through a dynamic import, so it never lands in a bundle that did not ask for it. React 18 or 19, Node.js 18 or later. The [A2UI](https://neba.cdget.com/guide/a2ui) renderer at `neba/a2ui` has three more, and they are optional peers: a project that never imports that subpath never meets them.
|
|
26
24
|
|
|
27
25
|
## Documentation
|
|
28
26
|
|
|
29
|
-
Everything is documented at **[neba.cdget.com](https://neba.cdget.com)**, where the previews are not screenshots
|
|
27
|
+
Everything is documented at **[neba.cdget.com](https://neba.cdget.com)**, where the previews are not screenshots. They are the components, running in the page.
|
|
30
28
|
|
|
31
29
|
| Page | What you will find |
|
|
32
30
|
| --- | --- |
|
|
33
31
|
| [**Getting started**](https://neba.cdget.com/guide/getting-started) | Install and setup, end to end. |
|
|
34
32
|
| [**All components**](https://neba.cdget.com/components/) | Every component, one page each: live previews and the full props table. |
|
|
35
|
-
| [**Examples**](https://neba.cdget.com/examples/overview) | A whole sample screen explained block by block, plus three concept screens
|
|
33
|
+
| [**Examples**](https://neba.cdget.com/examples/overview) | A whole sample screen explained block by block, plus three concept screens: a landing page, an admin dashboard and a sign-up flow. |
|
|
36
34
|
| [**Design language**](https://neba.cdget.com/design/design-language) | Why a Neba surface looks and behaves the way it does. |
|
|
37
35
|
| [**Prop conventions**](https://neba.cdget.com/design/prop-conventions) | The shared vocabulary every component draws from. |
|
|
38
36
|
| [**Color**](https://neba.cdget.com/design/color) | The token families, and how to theme them. |
|
|
37
|
+
| [**NebaProvider**](https://neba.cdget.com/guide/provider) | Defaults for a whole subtree, the colour scheme, and the direction. |
|
|
38
|
+
| [**Hooks**](https://neba.cdget.com/guide/hooks) | The hooks the library exports, and what each one is for. |
|
|
39
|
+
| [**Breakpoints**](https://neba.cdget.com/design/breakpoints) | The widths a responsive prop changes at, and which props take a map. |
|
|
40
|
+
| [**Browser support**](https://neba.cdget.com/browser-support) | The oldest browser versions the library works in. |
|
|
39
41
|
| [**Changelog**](https://neba.cdget.com/changelog) | What changed in each release, and the setup changes worth acting on. |
|
|
40
42
|
|
|
41
43
|
## Installation
|
|
@@ -48,7 +50,7 @@ npm install neba
|
|
|
48
50
|
pnpm add neba
|
|
49
51
|
```
|
|
50
52
|
|
|
51
|
-
`react` and `react-dom` are peer dependencies
|
|
53
|
+
`react` and `react-dom` are peer dependencies: React 18 or 19. Neba uses the copy your project already has, and npm 7 and later will install them alongside it if it has none.
|
|
52
54
|
|
|
53
55
|
### Setup
|
|
54
56
|
|
|
@@ -58,11 +60,11 @@ Add one line to your app's CSS entry point:
|
|
|
58
60
|
@import 'neba/styles.css';
|
|
59
61
|
```
|
|
60
62
|
|
|
61
|
-
`neba/styles.css` is finished CSS
|
|
63
|
+
`neba/styles.css` is finished CSS: the design tokens, the compiled rules for every utility class the components use, and a small reset whose every rule is specificity 0 so your own styles always win. [Tailwind CSS](https://tailwindcss.com) v4 builds this package; it does not have to be installed in yours.
|
|
62
64
|
|
|
63
65
|
That is the whole setup. No provider is required at the root, no theme object, no config file.
|
|
64
66
|
|
|
65
|
-
If your project already runs Tailwind v4, import `neba/tailwind.css` instead
|
|
67
|
+
If your project already runs Tailwind v4, import `neba/tailwind.css` instead: the token sheet, which registers the package as a style source so your own build generates the utilities in the same pass as your app's:
|
|
66
68
|
|
|
67
69
|
```css
|
|
68
70
|
@import 'tailwindcss';
|
|
@@ -88,11 +90,11 @@ export default function SignIn() {
|
|
|
88
90
|
|
|
89
91
|
### Next.js and React Server Components
|
|
90
92
|
|
|
91
|
-
Every component carries `'use client'`, so it can be imported straight into a Server Component
|
|
93
|
+
Every component carries `'use client'`, so it can be imported straight into a Server Component: no wrapper, no `transpilePackages` entry. The directive marks a boundary, not a page: the page stays a Server Component and only the components it renders reach the browser. The ordinary rule about that boundary still applies: an event handler defined in a Server Component cannot be passed across it.
|
|
92
94
|
|
|
93
95
|
The `neba` barrel and `neba/locales` are deliberately left unmarked, so a Server Component importing the barrel reaches the components behind it rather than a boundary of its own, and `registerMessages` stays a plain function. Bundlers that do not implement Server Components ignore the directive entirely.
|
|
94
96
|
|
|
95
|
-
A few components provide context and are mounted once, near the root, only if you use them
|
|
97
|
+
A few components provide context and are mounted once, near the root, only if you use them: `ToastProvider` (paired with the `useToast()` hook), `ConfirmProvider` (paired with `useConfirm()`, which throws without one) and `TooltipProvider`.
|
|
96
98
|
|
|
97
99
|
Every component is also its own entry point, named after its folder:
|
|
98
100
|
|
|
@@ -101,11 +103,11 @@ import { Button } from 'neba/button';
|
|
|
101
103
|
import { TextField } from 'neba/text-field';
|
|
102
104
|
```
|
|
103
105
|
|
|
104
|
-
Both forms produce the same bundle. The root barrel is the one to reach for; the subpath is there for a build that would rather not parse
|
|
106
|
+
Both forms produce the same bundle. The root barrel is the one to reach for; the subpath is there for a build that would rather not parse three hundred modules to keep five, and as an escape hatch for a bundler that does not honour `sideEffects`.
|
|
105
107
|
|
|
106
108
|
### Languages
|
|
107
109
|
|
|
108
|
-
Neba writes very little text of its own
|
|
110
|
+
Neba writes very little text of its own (a Button says what you hand it) but a few components have to invent a string: the label on a Dialog's close button, the word under a chat message that says it was read, the sentence a screen reader hears after a link that opens a new tab.
|
|
109
111
|
|
|
110
112
|
Those ship in English. Eighteen other languages are included in the package and none of them is in your bundle until you say so:
|
|
111
113
|
|
|
@@ -121,9 +123,9 @@ Call it once, at module scope, before your first render. Then a `locale` prop tr
|
|
|
121
123
|
<Dialog locale="ko" title="설정" showClose />
|
|
122
124
|
```
|
|
123
125
|
|
|
124
|
-
A registered language costs about
|
|
126
|
+
A registered language costs about 3.4 kB gzipped and you pay only for the ones you name. Tags are matched by script, then by region, then by language: registering `ko` answers `ko-KR`, and `zhHans` registered as `zh-hans` answers `zh-CN` and a bare `zh`. Available: `ko`, `ja`, `zhHans`, `zhHant`, `es`, `pt`, `fr`, `de`, `it`, `nl`, `pl`, `ru`, `tr`, `ar`, `hi`, `id`, `vi`, `th`, each also its own entry point (`neba/locales/ko`).
|
|
125
127
|
|
|
126
|
-
Anything the platform already knows
|
|
128
|
+
Anything the platform already knows (month names, weekday names, AM/PM, number and date formats) comes from `Intl` and needs no registration. And every string a component invents also has a prop that overrides it, so a language Neba does not carry is never a dead end.
|
|
127
129
|
|
|
128
130
|
### One place for your defaults
|
|
129
131
|
|
|
@@ -138,7 +140,7 @@ import { NebaProvider } from 'neba';
|
|
|
138
140
|
</NebaProvider>;
|
|
139
141
|
```
|
|
140
142
|
|
|
141
|
-
Optional, and every component works without it. It fills in `size`, `density`, `variant` and `locale` where a call site left them out
|
|
143
|
+
Optional, and every component works without it. It fills in `size`, `density`, `variant` and `locale` where a call site left them out (the call site always wins) owns the colour scheme (`useColorScheme()`, plus a `colorSchemeScript()` for the first-paint flash), and sets the writing direction. `color` and `elevation` are deliberately not defaultable; [the guide](https://neba.cdget.com/guide/provider) says why.
|
|
142
144
|
|
|
143
145
|
### Hooks
|
|
144
146
|
|
|
@@ -153,7 +155,7 @@ const desktop = useBreakpoint('lg');
|
|
|
153
155
|
useShortcut('Mod+K', onOpen);
|
|
154
156
|
```
|
|
155
157
|
|
|
156
|
-
`useDisclosure`, `useMediaQuery`, `useBreakpoint`, `usePrefersReducedMotion`, `useElementSize`, `useOnScreen`, `useShortcut`. Everything here is machinery the library needed for itself
|
|
158
|
+
`useDisclosure`, `useMediaQuery`, `useBreakpoint`, `useCurrentBreakpoint`, `useBreakpointValue`, `usePrefersReducedMotion`, `useElementSize`, `useOnScreen`, `useShortcut`. Everything here is machinery the library needed for itself: there is no general-purpose hook collection, and there is not going to be one. Full notes in [the hooks guide](https://neba.cdget.com/guide/hooks).
|
|
157
159
|
|
|
158
160
|
### The shared prop vocabulary
|
|
159
161
|
|
|
@@ -164,10 +166,10 @@ The reason a Neba screen looks composed rather than assembled is that the props
|
|
|
164
166
|
| `size` | `xs` `sm` `md` `lg` `xl` | The control's scale. `md` is the desktop default. |
|
|
165
167
|
| `color` | `primary` `secondary` `success` `warning` `danger` `info` | The semantic colour family. |
|
|
166
168
|
| `variant` | `solid` `outline` `text` | How much visual weight the surface carries. |
|
|
167
|
-
| `density` | `default` `compact` | Padding only
|
|
169
|
+
| `density` | `default` `compact` | Padding only: never the height, never the type scale, so a compact control still lines up with a default one. |
|
|
168
170
|
| `elevation` | `0` `1` `2` `3` | How far a surface floats off the page. `0` is the default and means no shadow at all. |
|
|
169
171
|
|
|
170
|
-
|
|
172
|
+
`align` is logical (`start`/`end` rather than `left`/`right`), so it flips under RTL. `side` names a physical edge (`top`, `right`, `bottom` or `left`) and does not flip. The full rules are in [**Prop conventions**](https://neba.cdget.com/design/prop-conventions).
|
|
171
173
|
|
|
172
174
|
```tsx
|
|
173
175
|
<Button size="sm" color="danger" variant="outline">Delete</Button>
|
|
@@ -176,37 +178,27 @@ Placement props are logical, not physical — `start`/`end` rather than `left`/`
|
|
|
176
178
|
|
|
177
179
|
### Components
|
|
178
180
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
**Surfaces** — Box, Card, Accordion, Collapsible, Tabs, Carousel, Toolbar, Pill, Spoiler, HowToSteps, ChatBubble, Drawer, Popover, Mockup, WindowPane, HoverCard
|
|
182
|
-
|
|
183
|
-
**Display** — Typography, TextLink, Blockquote, Highlight, Divider, Chip, Badge, Avatar, AppLogo, Icon, Image, Gallery, Shortcut, List, DataList, Table, DataTable, CodeBlock, Timeline, Breadcrumb, Anchor, TreeView, VisuallyHidden
|
|
184
|
-
|
|
185
|
-
**Charts** — Statistic, Sparkline, LineChart, AreaChart, BarChart, PieChart, ScatterChart, TimelineChart, HeatmapChart, GaugeChart
|
|
186
|
-
|
|
187
|
-
**Feedback** — Alert, Dialog, Confirm, Popconfirm, Toast, Tooltip, Overlay, Skeleton, Empty, ProgressLinear, ProgressCircular, ProgressBox, Meter, Tour
|
|
188
|
-
|
|
189
|
-
**Layout** — PageLayout (with Header, Footer and Sidebar), Container, Grid (with GridContainer), Flex, Panes, Stack, Show, AspectRatio, Portal, ScrollZone, ScrollArea
|
|
190
|
-
|
|
191
|
-
**Transitions** — AnimateFade, AnimateGrow, AnimateZoom, AnimateSlide, AnimateRotate, AnimateBlink, AnimateReveal, AnimateFloat, AnimateShake, AnimateAppear, AnimateSplit, AnimateTyping, AnimateScramble, AnimateCounter, AnimateLighting, AnimateMarquee, AnimateHeadline
|
|
192
|
-
|
|
193
|
-
**Recently added** — Gallery, Flex, Show, the six new `Animate*` (Reveal, Float, Shake, Split, Counter, Scramble), Stack, TreeSelect, Calendar, Image, Confirm, Popconfirm, VisuallyHidden, Portal, GaugeChart, CommandPalette, Tour, Transfer, Anchor, DataList, NavigationMenu, Menubar, Form (with Fieldset), ScrollArea, HoverCard, Meter, Toggle (with ToggleGroup), CodeBlock, HowToSteps, ScrollZone, FloatingBottomNavigation, WindowPane, Collapsible, Rating, BottomNavigation, FloatingActionButton, the charts (Sparkline, LineChart, AreaChart, BarChart, PieChart, ScatterChart, TimelineChart, HeatmapChart), DataTable, Empty, Mockup, the `Animate*` wrappers, ColorPicker, Drawer, Popover, Skeleton, AspectRatio
|
|
194
|
-
|
|
195
|
-
Each one has its own page — live previews, every prop, and the variations worth seeing — under [**All components**](https://neba.cdget.com/components/).
|
|
181
|
+
The components come in eight groups: inputs, surfaces, display, charts, feedback, layout, transitions and agent. Each one has its own page (live previews, every prop, and the variations worth seeing) under [**All components**](https://neba.cdget.com/components/).
|
|
196
182
|
|
|
197
183
|
### Theming and dark mode
|
|
198
184
|
|
|
199
|
-
Colours, radii, and surface strengths are CSS custom properties declared in the stylesheet you imported.
|
|
185
|
+
Colours, radii, and surface strengths are CSS custom properties declared in the stylesheet you imported. A colour family is five base values, and everything else in it is derived from them, so override those five in your own CSS and the whole library follows:
|
|
200
186
|
|
|
201
187
|
```css
|
|
202
188
|
:root {
|
|
203
|
-
--neba-primary-
|
|
189
|
+
--neba-primary-solid: oklch(50% 0.24 300);
|
|
190
|
+
--neba-primary-solid-hover: oklch(45.5% 0.232 300);
|
|
191
|
+
--neba-primary-solid-active: oklch(38% 0.204 300);
|
|
192
|
+
--neba-primary-on-solid: oklch(99% 0.004 300);
|
|
193
|
+
--neba-primary-accent: oklch(54% 0.26 300);
|
|
204
194
|
}
|
|
205
195
|
```
|
|
206
196
|
|
|
207
|
-
|
|
197
|
+
A derived token such as `--neba-primary-fill` is not meant to be overridden: it changes that one token and leaves the rest of the family on the old colour. [**Color**](https://neba.cdget.com/design/color) has the dark-theme values and scoped overrides.
|
|
198
|
+
|
|
199
|
+
Dark mode responds to `prefers-color-scheme` on its own. To force it, put `.dark` or `[data-theme='dark']` (or `'light'`) on any ancestor: it applies to that subtree, so a dark panel on a light page is one attribute.
|
|
208
200
|
|
|
209
|
-
Adding a whole new colour family
|
|
201
|
+
Adding a whole new colour family to the library takes an entry in `NebaColor`, five base values in each theme block and the derived tokens that mix them. [**Color**](https://neba.cdget.com/design/color#adding-a-family) lists every edit.
|
|
210
202
|
|
|
211
203
|
## Development
|
|
212
204
|
|
|
@@ -214,7 +206,7 @@ Clone the repository and install dependencies, then:
|
|
|
214
206
|
|
|
215
207
|
| Command | What it does |
|
|
216
208
|
| --- | --- |
|
|
217
|
-
| `npm run docs:dev` | Starts the documentation site (`docs/`) locally
|
|
209
|
+
| `npm run docs:dev` | Starts the documentation site (`docs/`) locally: every component, rendered live, with HMR. |
|
|
218
210
|
| `npm test` | Runs the test suite once. |
|
|
219
211
|
| `npm run test:watch` | Runs the test suite in watch mode. |
|
|
220
212
|
| `npm run typecheck` | Type-checks the library, the tests, and the docs. |
|
|
@@ -226,16 +218,16 @@ All commands are run from the repository root.
|
|
|
226
218
|
|
|
227
219
|
### Project structure
|
|
228
220
|
|
|
229
|
-
- `src
|
|
230
|
-
- `src/internal
|
|
231
|
-
- `test
|
|
232
|
-
- `docs
|
|
221
|
+
- `src/`: the library source. Each component lives in `src/components/{name}/` and is re-exported from `src/index.ts`.
|
|
222
|
+
- `src/internal/`: what the library shares with itself: the size and spacing tables, the surface and focus-ring generators, the icons more than one component draws. Shipped, but not part of the public API.
|
|
223
|
+
- `test/`: the test suite, mirroring the `src/` tree.
|
|
224
|
+
- `docs/`: the VitePress documentation site, in English and Korean. It renders the real components from `src/`, so it is also where components are developed and eyeballed.
|
|
233
225
|
|
|
234
226
|
There is no separate demo app: `npm run docs:dev` is the develop-and-eyeball loop.
|
|
235
227
|
|
|
236
228
|
### Tests
|
|
237
229
|
|
|
238
|
-
Tests run with [Vitest](https://vitest.dev) in browser mode, against a real headless browser driven by Playwright
|
|
230
|
+
Tests run with [Vitest](https://vitest.dev) in browser mode, against a real headless browser driven by Playwright. The components depend on browser APIs (`ResizeObserver`, the popover API, `dialog.showModal()`) that jsdom does not implement. Install the browser once before your first run:
|
|
239
231
|
|
|
240
232
|
```bash
|
|
241
233
|
npx playwright install chromium
|
|
@@ -249,11 +241,13 @@ VITEST_BROWSER=firefox npm test
|
|
|
249
241
|
|
|
250
242
|
CI runs the suite across Linux, Windows, and macOS in all three browser engines.
|
|
251
243
|
|
|
252
|
-
Tests ship with the component they cover, in the same commit. Add a test at the path mirroring its source
|
|
244
|
+
Tests ship with the component they cover, in the same commit. Add a test at the path mirroring its source: `src/components/button/Button.tsx` is covered by `test/components/button/Button.test.tsx`.
|
|
253
245
|
|
|
254
246
|
## Contributing
|
|
255
247
|
|
|
256
|
-
Anyone can contribute to the project by reporting new issues or submitting a pull request. For more information, please see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
248
|
+
Anyone can contribute to the project by reporting new issues or submitting a pull request. For more information, please see [CONTRIBUTING.md](CONTRIBUTING.md). Participation is subject to the [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
249
|
+
|
|
250
|
+
To report a security issue, please follow the process described in [SECURITY.md](SECURITY.md).
|
|
257
251
|
|
|
258
252
|
## License
|
|
259
253
|
|