neba 1.6.0 → 1.8.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 +37 -6
- package/dist/components/accordion/Accordion.d.ts +1 -1
- package/dist/components/accordion/Accordion.js +1 -1
- package/dist/components/accordion/index.d.ts +2 -2
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/alert/Alert.d.ts +1 -1
- package/dist/components/alert/Alert.js +1 -1
- package/dist/components/alert/index.d.ts +2 -2
- package/dist/components/alert/index.js +1 -1
- package/dist/components/animate-appear/AnimateAppear.d.ts +1 -1
- package/dist/components/animate-appear/AnimateAppear.js +1 -1
- package/dist/components/animate-appear/index.d.ts +2 -2
- package/dist/components/animate-appear/index.js +1 -1
- package/dist/components/animate-blink/AnimateBlink.d.ts +1 -1
- package/dist/components/animate-blink/AnimateBlink.js +1 -1
- package/dist/components/animate-blink/index.d.ts +2 -2
- package/dist/components/animate-blink/index.js +1 -1
- package/dist/components/animate-fade/AnimateFade.d.ts +1 -1
- package/dist/components/animate-fade/AnimateFade.js +1 -1
- package/dist/components/animate-fade/index.d.ts +2 -2
- package/dist/components/animate-fade/index.js +1 -1
- package/dist/components/animate-grow/AnimateGrow.d.ts +1 -1
- package/dist/components/animate-grow/AnimateGrow.js +1 -1
- package/dist/components/animate-grow/index.d.ts +2 -2
- package/dist/components/animate-grow/index.js +1 -1
- package/dist/components/animate-headline/AnimateHeadline.d.ts +1 -1
- package/dist/components/animate-headline/AnimateHeadline.js +1 -1
- package/dist/components/animate-headline/index.d.ts +2 -2
- package/dist/components/animate-headline/index.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-lighting/index.d.ts +2 -2
- package/dist/components/animate-lighting/index.js +1 -1
- package/dist/components/animate-marquee/AnimateMarquee.d.ts +1 -1
- package/dist/components/animate-marquee/AnimateMarquee.js +1 -1
- package/dist/components/animate-marquee/index.d.ts +2 -2
- package/dist/components/animate-marquee/index.js +1 -1
- package/dist/components/animate-rotate/AnimateRotate.d.ts +1 -1
- package/dist/components/animate-rotate/AnimateRotate.js +1 -1
- package/dist/components/animate-rotate/index.d.ts +2 -2
- package/dist/components/animate-rotate/index.js +1 -1
- package/dist/components/animate-slide/AnimateSlide.d.ts +1 -1
- package/dist/components/animate-slide/AnimateSlide.js +1 -1
- package/dist/components/animate-slide/index.d.ts +2 -2
- package/dist/components/animate-slide/index.js +1 -1
- package/dist/components/animate-typing/AnimateTyping.d.ts +1 -1
- package/dist/components/animate-typing/AnimateTyping.js +1 -1
- package/dist/components/animate-typing/index.d.ts +2 -2
- package/dist/components/animate-typing/index.js +1 -1
- package/dist/components/animate-zoom/AnimateZoom.d.ts +1 -1
- package/dist/components/animate-zoom/AnimateZoom.js +1 -1
- package/dist/components/animate-zoom/index.d.ts +2 -2
- package/dist/components/animate-zoom/index.js +1 -1
- package/dist/components/app-logo/AppLogo.d.ts +148 -0
- package/dist/components/app-logo/AppLogo.js +1 -0
- package/dist/components/app-logo/index.d.ts +2 -0
- package/dist/components/app-logo/index.js +1 -0
- package/dist/components/area-chart/AreaChart.d.ts +3 -3
- package/dist/components/area-chart/AreaChart.js +1 -1
- package/dist/components/area-chart/index.d.ts +2 -2
- package/dist/components/area-chart/index.js +1 -1
- package/dist/components/aspect-ratio/AspectRatio.d.ts +1 -1
- package/dist/components/aspect-ratio/AspectRatio.js +1 -1
- package/dist/components/aspect-ratio/index.d.ts +2 -2
- package/dist/components/aspect-ratio/index.js +1 -1
- package/dist/components/avatar/Avatar.d.ts +1 -1
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/badge/Badge.d.ts +1 -1
- package/dist/components/badge/Badge.js +1 -1
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/badge/index.js +1 -1
- package/dist/components/bar-chart/BarChart.d.ts +2 -2
- package/dist/components/bar-chart/BarChart.js +1 -1
- package/dist/components/bar-chart/index.d.ts +2 -2
- package/dist/components/bar-chart/index.js +1 -1
- package/dist/components/blockquote/Blockquote.d.ts +1 -1
- package/dist/components/blockquote/Blockquote.js +1 -1
- package/dist/components/blockquote/index.d.ts +2 -2
- package/dist/components/blockquote/index.js +1 -1
- package/dist/components/bottom-navigation/BottomNavigation.d.ts +3 -3
- package/dist/components/bottom-navigation/BottomNavigation.js +1 -1
- package/dist/components/bottom-navigation/index.d.ts +1 -1
- package/dist/components/bottom-navigation/index.js +1 -1
- package/dist/components/box/Box.d.ts +1 -1
- package/dist/components/box/Box.js +1 -1
- package/dist/components/box/index.d.ts +2 -2
- package/dist/components/box/index.js +1 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/components/breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/breadcrumb/index.d.ts +2 -2
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button/Button.d.ts +1 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/index.js +1 -1
- package/dist/components/button-group/ButtonGroup.d.ts +1 -1
- package/dist/components/button-group/ButtonGroup.js +1 -1
- package/dist/components/button-group/index.d.ts +2 -2
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/card/Card.d.ts +1 -1
- package/dist/components/card/Card.js +1 -1
- package/dist/components/card/index.d.ts +2 -2
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/Carousel.d.ts +1 -1
- package/dist/components/carousel/Carousel.js +1 -1
- package/dist/components/carousel/index.d.ts +2 -2
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chat-bubble/ChatBubble.d.ts +1 -1
- package/dist/components/chat-bubble/ChatBubble.js +1 -1
- package/dist/components/chat-bubble/index.d.ts +2 -2
- package/dist/components/chat-bubble/index.js +1 -1
- package/dist/components/checkbox/Checkbox.d.ts +1 -1
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/chip/Chip.d.ts +1 -1
- package/dist/components/chip/Chip.js +1 -1
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/chip/index.js +1 -1
- package/dist/components/code-block/CodeBlock.d.ts +170 -0
- package/dist/components/code-block/CodeBlock.js +1 -0
- package/dist/components/code-block/index.d.ts +2 -0
- package/dist/components/code-block/index.js +1 -0
- package/dist/components/collapsible/Collapsible.d.ts +1 -1
- package/dist/components/collapsible/Collapsible.js +1 -1
- package/dist/components/collapsible/index.d.ts +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/color-picker/ColorPicker.d.ts +3 -3
- package/dist/components/color-picker/ColorPicker.js +1 -1
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/Combobox.d.ts +1 -1
- package/dist/components/combobox/Combobox.js +1 -1
- package/dist/components/combobox/index.d.ts +2 -2
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/container/Container.d.ts +1 -1
- package/dist/components/container/Container.js +1 -1
- package/dist/components/container/index.d.ts +2 -2
- package/dist/components/container/index.js +1 -1
- package/dist/components/data-table/DataTable.d.ts +1 -1
- package/dist/components/data-table/DataTable.js +1 -1
- package/dist/components/data-table/index.d.ts +2 -2
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +3 -3
- package/dist/components/date-picker/DatePicker.js +1 -1
- package/dist/components/date-picker/index.d.ts +2 -2
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/DateRangePicker.d.ts +3 -3
- package/dist/components/date-range-picker/DateRangePicker.js +1 -1
- package/dist/components/date-range-picker/index.d.ts +2 -2
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/DateTimePicker.d.ts +4 -4
- package/dist/components/date-time-picker/DateTimePicker.js +1 -1
- package/dist/components/date-time-picker/index.d.ts +2 -2
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dialog/Dialog.d.ts +1 -1
- package/dist/components/dialog/Dialog.js +1 -1
- package/dist/components/dialog/index.d.ts +2 -2
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/divider/Divider.d.ts +1 -1
- package/dist/components/divider/Divider.js +1 -1
- package/dist/components/divider/index.d.ts +2 -2
- package/dist/components/divider/index.js +1 -1
- package/dist/components/drawer/Drawer.d.ts +1 -1
- package/dist/components/drawer/Drawer.js +1 -1
- package/dist/components/drawer/index.d.ts +2 -2
- package/dist/components/drawer/index.js +1 -1
- package/dist/components/empty/Empty.d.ts +1 -1
- package/dist/components/empty/Empty.js +1 -1
- package/dist/components/empty/index.d.ts +2 -2
- package/dist/components/empty/index.js +1 -1
- package/dist/components/file-picker/FilePicker.d.ts +1 -1
- package/dist/components/file-picker/FilePicker.js +1 -1
- package/dist/components/file-picker/index.d.ts +2 -2
- package/dist/components/file-picker/index.js +1 -1
- package/dist/components/floating-action-button/FloatingActionButton.d.ts +1 -1
- package/dist/components/floating-action-button/FloatingActionButton.js +1 -1
- package/dist/components/floating-action-button/index.d.ts +1 -1
- package/dist/components/floating-action-button/index.js +1 -1
- package/dist/components/floating-bottom-navigation/FloatingBottomNavigation.d.ts +2 -2
- package/dist/components/floating-bottom-navigation/FloatingBottomNavigation.js +1 -1
- package/dist/components/floating-bottom-navigation/index.d.ts +2 -2
- package/dist/components/floating-bottom-navigation/index.js +1 -1
- package/dist/components/footer/Footer.d.ts +85 -0
- package/dist/components/footer/Footer.js +1 -0
- package/dist/components/footer/index.d.ts +2 -0
- package/dist/components/footer/index.js +1 -0
- package/dist/components/grid/Grid.d.ts +1 -1
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/grid/index.d.ts +2 -2
- package/dist/components/grid/index.js +1 -1
- package/dist/components/grid-container/GridContainer.d.ts +1 -1
- package/dist/components/grid-container/GridContainer.js +1 -1
- package/dist/components/grid-container/index.d.ts +2 -2
- package/dist/components/grid-container/index.js +1 -1
- package/dist/components/header/Header.d.ts +114 -0
- package/dist/components/header/Header.js +1 -0
- package/dist/components/header/index.d.ts +2 -0
- package/dist/components/header/index.js +1 -0
- package/dist/components/heatmap-chart/HeatmapChart.d.ts +3 -3
- package/dist/components/heatmap-chart/HeatmapChart.js +1 -1
- package/dist/components/heatmap-chart/index.d.ts +2 -2
- package/dist/components/heatmap-chart/index.js +1 -1
- package/dist/components/highlight/Highlight.d.ts +2 -2
- package/dist/components/highlight/Highlight.js +1 -1
- package/dist/components/highlight/index.d.ts +2 -2
- package/dist/components/highlight/index.js +1 -1
- package/dist/components/how-to-steps/HowToSteps.d.ts +167 -0
- package/dist/components/how-to-steps/HowToSteps.js +1 -0
- package/dist/components/how-to-steps/index.d.ts +2 -0
- package/dist/components/how-to-steps/index.js +1 -0
- package/dist/components/icon/Icon.d.ts +1 -1
- package/dist/components/icon/Icon.js +1 -1
- package/dist/components/icon/index.d.ts +2 -2
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon-button/IconButton.d.ts +1 -1
- package/dist/components/icon-button/IconButton.js +1 -1
- package/dist/components/icon-button/index.d.ts +2 -2
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/line-chart/LineChart.d.ts +3 -3
- package/dist/components/line-chart/LineChart.js +1 -1
- package/dist/components/line-chart/index.d.ts +2 -2
- package/dist/components/line-chart/index.js +1 -1
- package/dist/components/list/List.d.ts +1 -1
- package/dist/components/list/List.js +1 -1
- package/dist/components/list/index.d.ts +2 -2
- package/dist/components/list/index.js +1 -1
- package/dist/components/menu/Menu.d.ts +1 -1
- package/dist/components/menu/Menu.js +1 -1
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/menu/index.js +1 -1
- package/dist/components/mockup/Mockup.d.ts +3 -3
- package/dist/components/mockup/Mockup.js +1 -1
- package/dist/components/mockup/index.d.ts +2 -2
- package/dist/components/mockup/index.js +1 -1
- package/dist/components/number-field/NumberField.d.ts +1 -1
- package/dist/components/number-field/NumberField.js +1 -1
- package/dist/components/number-field/index.d.ts +2 -2
- package/dist/components/number-field/index.js +1 -1
- package/dist/components/otp-field/OtpField.d.ts +1 -1
- package/dist/components/otp-field/OtpField.js +1 -1
- package/dist/components/otp-field/index.d.ts +2 -2
- package/dist/components/otp-field/index.js +1 -1
- package/dist/components/overlay/Overlay.d.ts +1 -1
- package/dist/components/overlay/Overlay.js +1 -1
- package/dist/components/overlay/index.d.ts +2 -2
- package/dist/components/overlay/index.js +1 -1
- package/dist/components/page-layout/PageLayout.d.ts +144 -0
- package/dist/components/page-layout/PageLayout.js +1 -0
- package/dist/components/page-layout/index.d.ts +2 -0
- package/dist/components/page-layout/index.js +1 -0
- package/dist/components/pagination/Pagination.d.ts +1 -1
- package/dist/components/pagination/Pagination.js +1 -1
- package/dist/components/pagination/index.d.ts +2 -2
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/panes/Panes.d.ts +1 -1
- package/dist/components/panes/Panes.js +1 -1
- package/dist/components/panes/index.d.ts +2 -2
- package/dist/components/panes/index.js +1 -1
- package/dist/components/pie-chart/PieChart.d.ts +2 -2
- package/dist/components/pie-chart/PieChart.js +1 -1
- package/dist/components/pie-chart/index.d.ts +2 -2
- package/dist/components/pie-chart/index.js +1 -1
- package/dist/components/pill/Pill.d.ts +1 -1
- package/dist/components/pill/Pill.js +1 -1
- package/dist/components/pill/index.d.ts +2 -2
- package/dist/components/pill/index.js +1 -1
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/popover/Popover.js +1 -1
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/index.js +1 -1
- package/dist/components/progress-box/ProgressBox.d.ts +2 -2
- package/dist/components/progress-box/ProgressBox.js +1 -1
- package/dist/components/progress-box/index.d.ts +2 -2
- package/dist/components/progress-box/index.js +1 -1
- package/dist/components/progress-circular/ProgressCircular.d.ts +2 -2
- package/dist/components/progress-circular/ProgressCircular.js +1 -1
- package/dist/components/progress-circular/index.d.ts +2 -2
- package/dist/components/progress-circular/index.js +1 -1
- package/dist/components/progress-linear/ProgressLinear.d.ts +2 -2
- package/dist/components/progress-linear/ProgressLinear.js +1 -1
- package/dist/components/progress-linear/index.d.ts +2 -2
- package/dist/components/progress-linear/index.js +1 -1
- package/dist/components/radio-group/RadioGroup.d.ts +1 -1
- package/dist/components/radio-group/RadioGroup.js +1 -1
- package/dist/components/radio-group/index.d.ts +2 -2
- package/dist/components/radio-group/index.js +1 -1
- package/dist/components/rating/Rating.d.ts +1 -1
- package/dist/components/rating/Rating.js +1 -1
- package/dist/components/rating/index.d.ts +1 -1
- package/dist/components/rating/index.js +1 -1
- package/dist/components/scatter-chart/ScatterChart.d.ts +2 -2
- package/dist/components/scatter-chart/ScatterChart.js +1 -1
- package/dist/components/scatter-chart/index.d.ts +2 -2
- package/dist/components/scatter-chart/index.js +1 -1
- package/dist/components/scroll-zone/ScrollZone.d.ts +1 -1
- package/dist/components/scroll-zone/ScrollZone.js +1 -1
- package/dist/components/scroll-zone/index.d.ts +2 -2
- package/dist/components/scroll-zone/index.js +1 -1
- package/dist/components/segmented-button/SegmentedButton.d.ts +1 -1
- package/dist/components/segmented-button/SegmentedButton.js +1 -1
- package/dist/components/segmented-button/index.d.ts +2 -2
- package/dist/components/segmented-button/index.js +1 -1
- package/dist/components/select/Select.d.ts +1 -1
- package/dist/components/select/Select.js +1 -1
- package/dist/components/select/index.d.ts +2 -2
- package/dist/components/select/index.js +1 -1
- package/dist/components/shortcut/Shortcut.d.ts +1 -1
- package/dist/components/shortcut/Shortcut.js +1 -1
- package/dist/components/shortcut/index.d.ts +2 -2
- package/dist/components/shortcut/index.js +1 -1
- package/dist/components/sidebar/Sidebar.d.ts +144 -0
- package/dist/components/sidebar/Sidebar.js +1 -0
- package/dist/components/sidebar/SidebarTrigger.d.ts +36 -0
- package/dist/components/sidebar/SidebarTrigger.js +1 -0
- package/dist/components/sidebar/index.d.ts +4 -0
- package/dist/components/sidebar/index.js +1 -0
- package/dist/components/skeleton/Skeleton.d.ts +1 -1
- package/dist/components/skeleton/Skeleton.js +1 -1
- package/dist/components/skeleton/index.d.ts +2 -2
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/slider/Slider.d.ts +1 -1
- package/dist/components/slider/Slider.js +1 -1
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/slider/index.js +1 -1
- package/dist/components/sparkline/Sparkline.d.ts +1 -1
- package/dist/components/sparkline/Sparkline.js +1 -1
- package/dist/components/sparkline/index.d.ts +2 -2
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/spoiler/Spoiler.d.ts +1 -1
- package/dist/components/spoiler/Spoiler.js +1 -1
- package/dist/components/spoiler/index.d.ts +2 -2
- package/dist/components/spoiler/index.js +1 -1
- package/dist/components/statistic/Statistic.d.ts +2 -2
- package/dist/components/statistic/Statistic.js +1 -1
- package/dist/components/statistic/index.d.ts +2 -2
- package/dist/components/statistic/index.js +1 -1
- package/dist/components/switch/Switch.d.ts +1 -1
- package/dist/components/switch/Switch.js +1 -1
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/switch/index.js +1 -1
- package/dist/components/table/Table.d.ts +2 -2
- package/dist/components/table/Table.js +1 -1
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table/index.js +1 -1
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/text-field/TextField.d.ts +1 -1
- package/dist/components/text-field/TextField.js +1 -1
- package/dist/components/text-field/index.d.ts +2 -2
- package/dist/components/text-field/index.js +1 -1
- package/dist/components/text-link/TextLink.d.ts +1 -1
- package/dist/components/text-link/TextLink.js +1 -1
- package/dist/components/text-link/index.d.ts +2 -2
- package/dist/components/text-link/index.js +1 -1
- package/dist/components/time-picker/TimePicker.d.ts +2 -2
- package/dist/components/time-picker/TimePicker.js +1 -1
- package/dist/components/time-picker/index.d.ts +2 -2
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/timeline/Timeline.d.ts +1 -1
- package/dist/components/timeline/Timeline.js +1 -1
- package/dist/components/timeline/index.d.ts +2 -2
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/timeline-chart/TimelineChart.d.ts +2 -2
- package/dist/components/timeline-chart/TimelineChart.js +1 -1
- package/dist/components/timeline-chart/index.d.ts +2 -2
- package/dist/components/timeline-chart/index.js +1 -1
- package/dist/components/toast/Toast.d.ts +1 -1
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/toast/index.d.ts +2 -2
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toolbar/Toolbar.d.ts +1 -1
- package/dist/components/toolbar/Toolbar.js +1 -1
- package/dist/components/toolbar/index.d.ts +2 -2
- package/dist/components/toolbar/index.js +1 -1
- package/dist/components/tooltip/Tooltip.d.ts +1 -1
- package/dist/components/tooltip/Tooltip.js +1 -1
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tree-view/TreeView.d.ts +1 -1
- package/dist/components/tree-view/TreeView.js +1 -1
- package/dist/components/tree-view/index.d.ts +2 -2
- package/dist/components/tree-view/index.js +1 -1
- package/dist/components/typography/Typography.d.ts +1 -1
- package/dist/components/typography/Typography.js +1 -1
- package/dist/components/typography/index.d.ts +2 -2
- package/dist/components/typography/index.js +1 -1
- package/dist/components/window-pane/WindowPane.d.ts +3 -3
- package/dist/components/window-pane/WindowPane.js +1 -1
- package/dist/components/window-pane/index.d.ts +2 -2
- package/dist/components/window-pane/index.js +1 -1
- package/dist/index.d.ts +99 -92
- package/dist/index.js +1 -1
- package/dist/internal/animate.d.ts +1 -1
- package/dist/internal/bottom-navigation.d.ts +5 -4
- package/dist/internal/bottom-navigation.js +1 -1
- package/dist/internal/button-group.d.ts +1 -1
- package/dist/internal/button-group.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 +3 -3
- package/dist/internal/chart-frame.js +1 -1
- package/dist/internal/chart-line.d.ts +2 -2
- package/dist/internal/chart-line.js +1 -1
- package/dist/internal/chart.d.ts +4 -3
- package/dist/internal/chart.js +1 -1
- package/dist/internal/color.d.ts +2 -2
- package/dist/internal/data-table.d.ts +1 -1
- package/dist/internal/date.d.ts +4 -5
- package/dist/internal/date.js +1 -1
- package/dist/internal/grid.d.ts +1 -1
- package/dist/internal/highlight.d.ts +97 -0
- package/dist/internal/highlight.js +1 -0
- package/dist/internal/i18n.d.ts +427 -229
- 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/initials.d.ts +24 -0
- package/dist/internal/initials.js +1 -0
- package/dist/internal/menu.d.ts +1 -1
- package/dist/internal/menu.js +1 -1
- package/dist/internal/mockup.d.ts +1 -1
- package/dist/internal/page-layout.d.ts +143 -0
- package/dist/internal/page-layout.js +1 -0
- package/dist/internal/picker.d.ts +2 -2
- package/dist/internal/picker.js +1 -1
- package/dist/internal/progress.d.ts +1 -1
- package/dist/internal/styles.d.ts +12 -1
- package/dist/internal/styles.js +1 -1
- package/dist/internal/window.d.ts +1 -1
- package/dist/internal/window.js +1 -1
- package/dist/locales/ar.d.ts +14 -0
- package/dist/locales/ar.js +1 -0
- package/dist/locales/de.d.ts +14 -0
- package/dist/locales/de.js +1 -0
- package/dist/locales/es.d.ts +14 -0
- package/dist/locales/es.js +1 -0
- package/dist/locales/fr.d.ts +14 -0
- package/dist/locales/fr.js +1 -0
- package/dist/locales/hi.d.ts +14 -0
- package/dist/locales/hi.js +1 -0
- package/dist/locales/id.d.ts +14 -0
- package/dist/locales/id.js +1 -0
- package/dist/locales/index.d.ts +45 -0
- package/dist/locales/index.js +1 -0
- package/dist/locales/it.d.ts +14 -0
- package/dist/locales/it.js +1 -0
- package/dist/locales/ja.d.ts +14 -0
- package/dist/locales/ja.js +1 -0
- package/dist/locales/ko.d.ts +14 -0
- package/dist/locales/ko.js +1 -0
- package/dist/locales/nl.d.ts +14 -0
- package/dist/locales/nl.js +1 -0
- package/dist/locales/pl.d.ts +14 -0
- package/dist/locales/pl.js +1 -0
- package/dist/locales/pt.d.ts +14 -0
- package/dist/locales/pt.js +1 -0
- package/dist/locales/ru.d.ts +14 -0
- package/dist/locales/ru.js +1 -0
- package/dist/locales/th.d.ts +14 -0
- package/dist/locales/th.js +1 -0
- package/dist/locales/tr.d.ts +14 -0
- package/dist/locales/tr.js +1 -0
- package/dist/locales/vi.d.ts +14 -0
- package/dist/locales/vi.js +1 -0
- package/dist/locales/zh-hans.d.ts +17 -0
- package/dist/locales/zh-hans.js +1 -0
- package/dist/locales/zh-hant.d.ts +17 -0
- package/dist/locales/zh-hant.js +1 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +473 -0
- package/package.json +40 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type BoxProps } from '../box/Box';
|
|
2
|
+
import { type BoxProps } from '../box/Box.js';
|
|
3
3
|
export interface CardProps extends Omit<BoxProps, 'title' | 'padded'> {
|
|
4
4
|
/**
|
|
5
5
|
* The card's heading. A plain string is styled as the title; pass a real
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as l,Fragment as t}from"react/jsx-runtime";import*as n from"react";import{Box as a,boxPaddingXClasses as
|
|
1
|
+
import{jsx as e,jsxs as l,Fragment as t}from"react/jsx-runtime";import*as n from"react";import{Box as a,boxPaddingXClasses as s,boxPaddingYClasses as r}from"../box/Box.js";import{hasContent as i,metaTextClasses as o,sheetBodyClasses as c,sheetHeaderGapClasses as d,sheetSectionGapClasses as m,sheetTitleClasses as f}from"../../internal/styles.js";export const Card=/*@__PURE__*/n.forwardRef(function({size:n="md",density:u="default",title:x,subtitle:h,headerAction:N,footer:p,dividers:$=!1,className:b,children:j,...v},y){const k=s[u][n],g=r[u][n],w=$?`${k} ${g}`:k,B=i(x)||i(h)||i(N),z=l(t,{children:[i(x)||i(h)?l("div",{className:`flex min-w-0 flex-1 flex-col ${d[n]}`,children:[i(x)?e("div",{className:`neba-title font-semibold ${f[n]}`,children:x}):null,i(h)?e("div",{className:`text-(--neba-muted-fg) ${o[n]}`,children:h}):null]}):null,i(N)?e("div",{className:"ml-auto shrink-0",children:N}):null]}),A=[B?{key:"header",className:"flex items-start gap-3",content:z}:null,i(j)?{key:"content",className:c[n],content:j}:null,i(p)?{key:"footer",className:`flex flex-wrap items-center gap-2 ${c[n]}`,content:p}:null].filter(e=>null!==e);return e(a,{ref:y,size:n,density:u,padded:!1,className:["flex flex-col",$?"":`${g} ${m[n]}`,b??""].filter(Boolean).join(" "),...v,children:A.map((l,t)=>e("div",{className:[w,l.className,$&&t>0?"border-t [border-color:var(--n-line)]":""].filter(Boolean).join(" "),children:l.content},l.key))})});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Card } from './Card';
|
|
2
|
-
export type { CardProps } from './Card';
|
|
1
|
+
export { Card } from './Card.js';
|
|
2
|
+
export type { CardProps } from './Card.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Card}from"./Card";
|
|
1
|
+
export{Card}from"./Card.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { NebaElevation, NebaStyleProps } from '../../types';
|
|
2
|
+
import type { NebaElevation, NebaStyleProps } from '../../types.js';
|
|
3
3
|
export interface CarouselProps extends NebaStyleProps, Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'defaultValue' | 'onChange'> {
|
|
4
4
|
/**
|
|
5
5
|
* Drop shadow depth of the frame. `0` — the default — is flat.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{IconButton as n}from"../icon-button/IconButton";import{
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{IconButton as n}from"../icon-button/IconButton.js";import{carouselMessages as a,fillMessage as o,useMessages as i}from"../../internal/i18n.js";import{ChevronIcon as l}from"../../internal/icons.js";import{radiusClasses as s,srOnlyClasses as c,surfaceClasses as u,surfaceSlots as d,transitionClasses as f}from"../../internal/styles.js";const m={solid:[u,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[u,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"},p={xs:"start-1 end-1",sm:"start-1.5 end-1.5",md:"start-2 end-2",lg:"start-3 end-3",xl:"start-4 end-4"},b={xs:{rest:"h-1 w-1",current:"h-1 w-3",gap:"gap-1"},sm:{rest:"h-1 w-1",current:"h-1 w-3.5",gap:"gap-1"},md:{rest:"h-1.5 w-1.5",current:"h-1.5 w-4",gap:"gap-1.5"},lg:{rest:"h-1.5 w-1.5",current:"h-1.5 w-5",gap:"gap-2"},xl:{rest:"h-2 w-2",current:"h-2 w-6",gap:"gap-2"}};export const Carousel=/*@__PURE__*/t.forwardRef(function({variant:u="outline",size:v="md",color:h="primary",density:g="default",elevation:w=0,value:x,defaultValue:j=0,onValueChange:y,loop:N=!0,autoPlay:k=!1,interval:M=5e3,arrows:C=!0,indicators:R=!0,locale:I,label:L,previousLabel:S,nextLabel:$,slideLabel:_,className:z,style:B,children:E,...P},V){const T=i(a,I),W=_??((e,r)=>o(T.slide,{index:String(e),total:String(r)})),A=t.Children.toArray(E),F=A.length,[q,D]=t.useState(j),G=Math.min(Math.max(x??q,0),Math.max(F-1,0)),H=t.useRef(null),J=t.useRef([]),K=t.useRef(!1),O=t.useRef(!1),Q=t.useRef(!1),[U,X]=t.useState(!1),Y=t.useCallback((e,r=!1)=>{if(0===F)return;const t=N?(e%F+F)%F:Math.min(Math.max(e,0),F-1);K.current=r,void 0===x&&D(t),t!==G&&y?.(t)},[F,N,x,G,y]);t.useEffect(()=>{if(K.current)return void(K.current=!1);if(!O.current)return void(O.current=!0);J.current[G]?.scrollIntoView({block:"nearest",inline:"start"}),Q.current=!0;const e=window.setTimeout(()=>{Q.current=!1},700);return()=>window.clearTimeout(e)},[G]);t.useEffect(()=>{if(!k||U||F<2)return;if(window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;const e=window.setInterval(()=>{document.hidden||Y(G+1)},M);return()=>window.clearInterval(e)},[k,U,F,M,G,Y]);const Z=G<=0,ee=G>=F-1;return r("div",{ref:V,role:"region","aria-roledescription":"carousel","aria-label":L??T.label,className:["flex flex-col",z??""].filter(Boolean).join(" "),style:{...d(h,w),...B},onPointerEnter:()=>X(!0),onPointerLeave:()=>X(!1),onFocus:()=>X(!0),onBlur:()=>X(!1),...P,children:[r("div",{className:["relative min-w-0 overflow-hidden",s[v],m[u],f].join(" "),children:[e("div",{ref:H,tabIndex:0,role:"group","aria-label":L??T.label,className:["flex min-w-0 snap-x snap-mandatory overflow-x-auto scroll-smooth","motion-reduce:scroll-auto","[scrollbar-width:none] [&::-webkit-scrollbar]:hidden","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]"].join(" "),onScroll:()=>{const e=H.current;if(Q.current||!e||0===e.clientWidth)return;const r=Math.round(Math.abs(e.scrollLeft)/e.clientWidth);r!==G&&r>=0&&r<F&&Y(r,!0)},children:A.map((r,t)=>e("div",{ref:e=>{J.current[t]=e},role:"group","aria-roledescription":"slide","aria-label":W(t+1,F),className:"w-full shrink-0 grow-0 basis-full snap-start",children:r},t))}),C&&F>1?r("div",{className:`pointer-events-none absolute inset-y-0 flex items-center ${p[v]}`,children:[e(n,{variant:"solid",size:v,color:h,density:g,elevation:1,label:S??T.previous,disabled:!N&&Z,className:"pointer-events-auto",icon:e("span",{className:"flex items-center rotate-90 rtl:-rotate-90",children:e(l,{})}),onClick:()=>Y(G-1)}),e("span",{className:"flex-1"}),e(n,{variant:"solid",size:v,color:h,density:g,elevation:1,label:$??T.next,disabled:!N&&ee,className:"pointer-events-auto",icon:e("span",{className:"flex items-center -rotate-90 rtl:rotate-90",children:e(l,{})}),onClick:()=>Y(G+1)})]}):null]}),R&&F>1?e("div",{className:`flex shrink-0 items-center justify-center pt-2 ${b[v].gap}`,children:A.map((r,t)=>e("button",{type:"button","aria-label":W(t+1,F),"aria-current":t===G?"true":void 0,className:["cursor-pointer rounded-full","[transition-property:width,background-color]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2",t===G?`${b[v].current} bg-(--n-accent)`:`${b[v].rest} bg-(--n-line-hover) hover:bg-(--n-accent)`].join(" "),onClick:()=>Y(t)},t))}):null,e("span",{className:c,"aria-live":k?"off":"polite",children:F>0?W(G+1,F):""})]})});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Carousel } from './Carousel';
|
|
2
|
-
export type { CarouselProps } from './Carousel';
|
|
1
|
+
export { Carousel } from './Carousel.js';
|
|
2
|
+
export type { CarouselProps } from './Carousel.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Carousel}from"./Carousel";
|
|
1
|
+
export{Carousel}from"./Carousel.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as r from"react";import{useMessages as
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as r from"react";import{chatMessages as a,useMessages as l}from"../../internal/i18n.js";import{CheckIcon as i,ClockIcon as t,DangerIcon as o,LinkIcon as s}from"../../internal/icons.js";import{controlSlots as c,hasContent as d,metaTextClasses as m,radiusClasses as p,sheetBodyClasses as u,sheetHeaderGapClasses as b,srOnlyClasses as f,surfaceClasses as v,transitionClasses as x}from"../../internal/styles.js";const h={default:{xs:"px-2 py-1",sm:"px-2.5 py-1.5",md:"px-3 py-2",lg:"px-3.5 py-2.5",xl:"px-4 py-3"},compact:{xs:"px-1.5 py-0.5",sm:"px-2 py-1",md:"px-2.5 py-1.5",lg:"px-3 py-1.5",xl:"px-3.5 py-2"}},g={start:"[border-start-start-radius:0.25rem]",end:"[border-start-end-radius:0.25rem]"},y={solid:[v,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[v,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-(--n-soft) [box-shadow:var(--n-elev)]"};function w(){return n("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e("path",{d:"m1.5 8.5 2.75 2.75L9.5 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M7 10.75 8.25 12l5.25-5.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}const N={sending:e(t,{}),sent:e(i,{}),delivered:e(w,{}),read:e(w,{}),failed:e(o,{})},k={sending:"text-(--neba-muted-fg)",sent:"text-(--neba-muted-fg)",delivered:"text-(--neba-muted-fg)",read:"text-(--n-accent)",failed:"text-(--neba-danger-accent)"},_=["block overflow-hidden rounded-(--neba-radius-sm) border no-underline","[border-color:color-mix(in_oklab,currentColor_18%,transparent)]","[background-color:color-mix(in_oklab,currentColor_7%,transparent)]","hover:[background-color:color-mix(in_oklab,currentColor_12%,transparent)]","[transition-property:background-color] [transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),j=["shrink-0 opacity-0","[transition:opacity_var(--neba-duration)_var(--neba-ease)]","group-hover/bubble:opacity-100 group-focus-within/bubble:opacity-100","[@media(hover:none)]:opacity-100"].join(" ");export const ChatBubble=/*@__PURE__*/r.forwardRef(function({side:r="start",name:i,time:t,avatar:o,status:s,statusLabel:v,typing:w=!1,media:_,preview:z,actions:B,locale:W,variant:M="outline",size:R="md",color:T="primary",density:$="default",elevation:q=0,className:A,style:D,children:E,...F},G){const H=l(a,W),I="end"===r,J=d(i)||d(t),K=w||d(E)||Boolean(z),O=["flex min-w-0 flex-col overflow-hidden",p[R],g[r],y[M],x].join(" "),P=s?v??H[s]:"";return n("div",{ref:G,className:["group/bubble flex w-full items-start gap-2",I?"flex-row-reverse":"",A??""].filter(Boolean).join(" "),style:{...c(T,q,M),...D},...F,children:[d(o)?e("div",{className:"shrink-0",children:o}):null,n("div",{className:["flex min-w-0 max-w-[min(100%,32rem)] flex-col",b[R],I?"items-end":"items-start"].join(" "),children:[J?n("div",{className:`flex items-baseline gap-2 ${m[R]}`,children:[d(i)?e("span",{className:"font-semibold",children:i}):null,d(t)?e("span",{className:"text-(--neba-muted-fg)",children:t}):null]}):null,n("div",{className:"flex min-w-0 items-center gap-1 "+(I?"flex-row-reverse":""),children:[n("div",{className:O,children:[d(_)?e("div",{className:"[&_img]:block [&_img]:w-full [&_video]:block [&_video]:w-full",children:_}):null,K?n("div",{className:[h[$][R],"flex min-w-0 flex-col gap-2",u[R]].join(" "),children:[w?e(C,{label:H.typing}):d(E)?e("div",{className:"min-w-0 break-words whitespace-pre-line",children:E}):null,z?e(L,{preview:z}):null]}):null]}),d(B)?e("div",{className:j,children:B}):null]}),s?n("div",{className:["flex items-center gap-1",m[R],k[s],"[&_svg]:size-[1.15em] [&_svg]:shrink-0"].join(" "),children:[N[s],e("span",{className:f,children:P})]}):null]})]})});function C({label:r}){return n("div",{className:"flex items-center gap-1 py-[0.35em]",role:"status",children:[[0,1,2].map(n=>e("span",{"aria-hidden":"true",className:"neba-typing-dot size-[0.45em] rounded-full",style:{"--n-i":n}},n)),e("span",{className:f,children:r})]})}function L({preview:r}){const{url:a,title:l,description:i,image:t,site:o,newTab:c=!1}=r;return n("a",{href:a,target:c?"_blank":void 0,rel:c?"noopener noreferrer":void 0,className:_,children:[t?e("img",{src:t,alt:"",className:"block h-28 w-full object-cover"}):null,n("div",{className:"flex flex-col gap-0.5 p-2",children:[d(o)?n("span",{className:"flex items-center gap-1 text-[0.85em] opacity-70 [&_svg]:size-[1em] [&_svg]:shrink-0",children:[e(s,{}),e("span",{className:"truncate",children:o})]}):null,d(l)?e("span",{className:"font-semibold",children:l}):null,d(i)?e("span",{className:"line-clamp-2 text-[0.9em] opacity-80",children:i}):null]})]})}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ChatBubble } from './ChatBubble';
|
|
2
|
-
export type { ChatBubbleLinkPreview, ChatBubbleProps, ChatBubbleSide, ChatBubbleStatus } from './ChatBubble';
|
|
1
|
+
export { ChatBubble } from './ChatBubble.js';
|
|
2
|
+
export type { ChatBubbleLinkPreview, ChatBubbleProps, ChatBubbleSide, ChatBubbleStatus } from './ChatBubble.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ChatBubble}from"./ChatBubble";
|
|
1
|
+
export{ChatBubble}from"./ChatBubble.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Checkbox as BaseUICheckbox } from '@base-ui/react/checkbox';
|
|
3
|
-
import type { NebaColor, NebaSize } from '../../types';
|
|
3
|
+
import type { NebaColor, NebaSize } from '../../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Base UI's own props, minus the ones this component owns: `className` and
|
|
6
6
|
* `style` land on the field wrapper rather than on the tick, and `render` would
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as r from"react";import{Checkbox as a}from"@base-ui/react/checkbox";import{Field as i}from"@base-ui/react/field";import{controlTextClasses as l,metaTextClasses as t,surfaceClasses as o,tickRadiusClasses as s,tickRowLeadingClasses as d,tickSizeClasses as c,transitionClasses as b}from"../../internal/styles";const h=["relative inline-flex shrink-0 items-center justify-center border","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",b,"active:[transition-duration:0ms]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),f=[o,"cursor-pointer bg-(--n-panel) [border-color:var(--n-line)]","hover:bg-(--n-panel-hover) hover:[border-color:var(--n-line-hover)]","data-[checked]:bg-(--n-fill) data-[checked]:text-(--n-on-solid)","data-[checked]:[border-color:transparent]","data-[checked]:hover:bg-(--n-fill-hover)","data-[indeterminate]:bg-(--n-fill) data-[indeterminate]:text-(--n-on-solid)","data-[indeterminate]:[border-color:transparent]"].join(" "),m=[o,"cursor-default bg-(--n-panel) [border-color:var(--n-line)]","[filter:saturate(0.55)]","data-[checked]:bg-(--n-fill) data-[checked]:text-(--n-on-solid)","data-[checked]:[border-color:transparent]"].join(" "),u=["cursor-not-allowed bg-transparent [border-color:var(--neba-disabled-border)]","text-(--neba-disabled-fg) shadow-none","data-[checked]:bg-(--neba-disabled-bg)","data-[indeterminate]:bg-(--neba-disabled-bg)"].join(" ");function v(){return e("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"size-full",children:e("path",{d:"M2 6.2 4.6 8.8 10 3.4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function p(){return e("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"size-full",children:e("path",{d:"M2.5 6h7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}export const Checkbox
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as r from"react";import{Checkbox as a}from"@base-ui/react/checkbox";import{Field as i}from"@base-ui/react/field";import{controlTextClasses as l,metaTextClasses as t,surfaceClasses as o,tickRadiusClasses as s,tickRowLeadingClasses as d,tickSizeClasses as c,transitionClasses as b}from"../../internal/styles.js";const h=["relative inline-flex shrink-0 items-center justify-center border","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",b,"active:[transition-duration:0ms]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),f=[o,"cursor-pointer bg-(--n-panel) [border-color:var(--n-line)]","hover:bg-(--n-panel-hover) hover:[border-color:var(--n-line-hover)]","data-[checked]:bg-(--n-fill) data-[checked]:text-(--n-on-solid)","data-[checked]:[border-color:transparent]","data-[checked]:hover:bg-(--n-fill-hover)","data-[indeterminate]:bg-(--n-fill) data-[indeterminate]:text-(--n-on-solid)","data-[indeterminate]:[border-color:transparent]"].join(" "),m=[o,"cursor-default bg-(--n-panel) [border-color:var(--n-line)]","[filter:saturate(0.55)]","data-[checked]:bg-(--n-fill) data-[checked]:text-(--n-on-solid)","data-[checked]:[border-color:transparent]"].join(" "),u=["cursor-not-allowed bg-transparent [border-color:var(--neba-disabled-border)]","text-(--neba-disabled-fg) shadow-none","data-[checked]:bg-(--neba-disabled-bg)","data-[indeterminate]:bg-(--neba-disabled-bg)"].join(" ");function v(){return e("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"size-full",children:e("path",{d:"M2 6.2 4.6 8.8 10 3.4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function p(){return e("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"size-full",children:e("path",{d:"M2.5 6h7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}export const Checkbox=/*@__PURE__*/r.forwardRef(function({size:r="md",color:o="primary",label:b,description:g,error:x,invalid:k,disabled:j=!1,readOnly:N=!1,className:$,style:y,...w},z){const C=null!=x&&!1!==x&&""!==x,L=k??C,B=L?"danger":o,R={"--n-fill":`var(--neba-${B}-fill)`,"--n-fill-hover":`var(--neba-${B}-fill-hover)`,"--n-on-solid":`var(--neba-${B}-on-solid)`,"--n-accent":`var(--neba-${B}-accent)`,"--n-panel":"var(--neba-panel)","--n-panel-hover":"var(--neba-panel-hover)","--n-line":`var(--neba-${B}-line)`,"--n-line-hover":`var(--neba-${B}-line-hover)`,"--n-ring":`var(--neba-${B}-ring)`},M=[h,c[r],s[r],j?u:N?m:f].join(" ");return n(i.Root,{disabled:j,invalid:L,className:["inline-flex flex-col gap-1 align-top",$??""].filter(Boolean).join(" "),style:{...R,...y},children:[n("div",{className:`flex items-start gap-2 ${l[r]} ${d}`,children:[e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e(a.Root,{ref:z,className:M,disabled:j,readOnly:N,...w,children:e(a.Indicator,{className:"flex size-[70%] items-center justify-center",children:w.indeterminate?e(p,{}):e(v,{})})})}),b||g?n("span",{className:"flex min-w-0 flex-col gap-0.5",children:[b?e(i.Label,{className:["leading-[1.4]",j?"text-(--neba-disabled-fg)":"cursor-pointer text-(--neba-fg)"].join(" "),children:b}):null,g?e(i.Description,{className:`${t[r]} text-(--neba-muted-fg)`,children:g}):null]}):null]}),C?e(i.Error,{match:!0,className:`${t[r]} text-(--n-accent)`,children:x}):null]})});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Checkbox } from './Checkbox';
|
|
2
|
-
export type { CheckboxProps } from './Checkbox';
|
|
1
|
+
export { Checkbox } from './Checkbox.js';
|
|
2
|
+
export type { CheckboxProps } from './Checkbox.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Checkbox}from"./Checkbox";
|
|
1
|
+
export{Checkbox}from"./Checkbox.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { NebaElevation, NebaStyleProps, NebaTransition } from '../../types';
|
|
2
|
+
import type { NebaElevation, NebaStyleProps, NebaTransition } from '../../types.js';
|
|
3
3
|
export interface ChipProps extends NebaStyleProps, Omit<React.ComponentPropsWithoutRef<'span'>, 'color'> {
|
|
4
4
|
/**
|
|
5
5
|
* Drop shadow depth. `0` (the default) is flat. A chip is a token sitting on
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as n,jsxs as t}from"react/jsx-runtime";import*as l from"react";import{useMessages as
|
|
1
|
+
import{jsx as e,Fragment as n,jsxs as t}from"react/jsx-runtime";import*as l from"react";import{actionMessages as o,useMessages as i}from"../../internal/i18n.js";import{CloseIcon as r}from"../../internal/icons.js";import{transitionProps as s}from"../../internal/animate.js";import{chipRemoveClasses as a,controlHeightClasses as c,controlSlots as d,controlTextClasses as m,disabledClasses as p,focusRingClasses as b,gapClasses as f,iconClasses as u,paddingXClasses as h,pressTransitionClasses as v,radiusClasses as x,surfaceClasses as g,transitionClasses as j}from"../../internal/styles.js";const y={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg"},w={solid:[g,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[g,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-accent) bg-(--n-soft)"},N={solid:"bg-(--n-fill-active)",outline:"bg-(--n-panel-press) [border-color:var(--n-line-hover)]",text:"bg-(--n-soft-press)"},k={solid:"hover:bg-(--n-fill-hover) active:bg-(--n-fill-active)",outline:"hover:bg-(--n-panel-hover) hover:[border-color:var(--n-line-hover)] active:bg-(--n-panel-press)",text:"hover:bg-(--n-soft-hover) active:bg-(--n-soft-press)"},C=["relative inline-flex max-w-full shrink-0 select-none items-center","align-middle font-medium leading-none whitespace-nowrap","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",j,v,u].join(" "),$=["flex min-w-0 flex-1 cursor-pointer items-center justify-center self-stretch rounded-[inherit]",b].join(" ");export const Chip=/*@__PURE__*/l.forwardRef(function({variant:l="outline",size:b="md",color:u="primary",density:v="default",elevation:g=0,startIcon:j,endIcon:B,count:I,onDelete:z,locale:D,deleteLabel:F,transition:L,selected:R=!1,disabled:q=!1,className:A,style:E,children:G,onClick:H,...J},K){const M=i(o,D),O=Boolean(H)&&!q,P=y[b],Q=s(L),S=h[v][P],T=[C,c[P],m[P],f[P],x[P],q?p[l]:w[l],!q&&R?N[l]:"",O?k[l]:"",O?"ps-0":S,z?"pe-1":O?"pe-0":"",Q.className,A??""].filter(Boolean).join(" "),U=t(n,{children:[j,null!=G&&!1!==G?e("span",{className:"min-w-0 truncate",children:G}):null,B,null!=I&&!1!==I?e("span",{className:["ms-0.5 inline-flex shrink-0 items-center justify-center rounded-full px-1.5 py-px","text-[0.85em] leading-none font-semibold tabular-nums","solid"===l?"bg-(--neba-glow-on-fill) text-(--n-on-solid)":"bg-(--n-soft-press) text-(--n-accent)"].join(" "),children:I}):null]});return t("span",{ref:K,className:T,style:{...d(u,g,l),...Q.style,...E},"aria-disabled":!(!q||O)||void 0,...J,children:[O?e("button",{type:"button","aria-pressed":R,className:`${$} ${f[P]} ${S}`,onClick:H,children:U}):U,z?e("button",{type:"button","aria-label":F??M.remove,disabled:q,className:a,onClick:z,children:e(r,{})}):null]})});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Chip } from './Chip';
|
|
2
|
-
export type { ChipProps } from './Chip';
|
|
1
|
+
export { Chip } from './Chip.js';
|
|
2
|
+
export type { ChipProps } from './Chip.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Chip}from"./Chip";
|
|
1
|
+
export{Chip}from"./Chip.js";
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { NebaColor, NebaDensity, NebaElevation, NebaSize } from '../../types.js';
|
|
3
|
+
export { registerLanguage } from '../../internal/highlight.js';
|
|
4
|
+
/**
|
|
5
|
+
* Which palette the block wears.
|
|
6
|
+
*
|
|
7
|
+
* The four house themes come first. `dark` is the default and is the only one
|
|
8
|
+
* that is not a preference: code has been read on a dark ground since
|
|
9
|
+
* terminals, and a block that matched the page would be the one element on it
|
|
10
|
+
* whose colours were chosen by something other than the code. `auto` is the
|
|
11
|
+
* opt-out, and `mono` has no hue in it at all.
|
|
12
|
+
*
|
|
13
|
+
* The eight after them are ports, kept at their published values. They exist
|
|
14
|
+
* because a code block is the one component whose colours a reader already has
|
|
15
|
+
* an opinion about: someone who writes in One Dark all day reads a Dracula
|
|
16
|
+
* block as a different product's documentation.
|
|
17
|
+
*
|
|
18
|
+
* The type is open on purpose. A theme is a set of `--n-code-*` custom
|
|
19
|
+
* properties under a `[data-code-theme]` selector and nothing else, so a
|
|
20
|
+
* consumer who writes one in their own stylesheet has a theme — with nothing to
|
|
21
|
+
* register, nothing to import, and no cost to anybody who did not.
|
|
22
|
+
*/
|
|
23
|
+
export type CodeBlockTheme = 'dark' | 'light' | 'auto' | 'mono' | 'one-dark' | 'dracula' | 'monokai' | 'nord' | 'night-owl' | 'gruvbox' | 'github' | 'solarized-light';
|
|
24
|
+
export interface CodeBlockProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'title' | 'prefix' | 'children' | 'onCopy'> {
|
|
25
|
+
/**
|
|
26
|
+
* The code. Trailing whitespace is trimmed off the end of the block — a
|
|
27
|
+
* template literal is almost always written with a newline before its closing
|
|
28
|
+
* backtick, and that newline is a blank line at the bottom of every block.
|
|
29
|
+
*/
|
|
30
|
+
code: string;
|
|
31
|
+
/**
|
|
32
|
+
* What it is written in — `ts`, `bash`, `yml`, `dockerfile`. The common
|
|
33
|
+
* spellings and file extensions are understood, so a value copied off a
|
|
34
|
+
* fenced code block works as-is.
|
|
35
|
+
*
|
|
36
|
+
* A language nothing here knows is drawn plain rather than refused; teach it
|
|
37
|
+
* one with `registerLanguage`.
|
|
38
|
+
*/
|
|
39
|
+
language?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The palette. Independent of the page's light and dark, except on `auto`.
|
|
42
|
+
*
|
|
43
|
+
* Any other string works too, and is how a project brings its own: write
|
|
44
|
+
* `[data-code-theme='ours'] { --n-code-bg: …; --n-code-keyword: … }` in your
|
|
45
|
+
* own CSS and pass the name. Sixteen slots, five of which are derived from
|
|
46
|
+
* the other two and need no declaration.
|
|
47
|
+
* @default 'dark'
|
|
48
|
+
*/
|
|
49
|
+
theme?: CodeBlockTheme | (string & {});
|
|
50
|
+
/** The type scale and the air around the code. @default 'md' */
|
|
51
|
+
size?: NebaSize;
|
|
52
|
+
/** @default 'primary' */
|
|
53
|
+
color?: NebaColor;
|
|
54
|
+
/** @default 'default' */
|
|
55
|
+
density?: NebaDensity;
|
|
56
|
+
/** Drop shadow depth. `0` (the default) is flat. @default 0 */
|
|
57
|
+
elevation?: NebaElevation;
|
|
58
|
+
/**
|
|
59
|
+
* Colours the code.
|
|
60
|
+
*
|
|
61
|
+
* Off, nothing is fetched at all: the grammar engine is behind a dynamic
|
|
62
|
+
* import, so a block that does not highlight costs no more than the text in
|
|
63
|
+
* it. On, the block draws plain on the first frame and colours itself when
|
|
64
|
+
* the grammar lands — a few milliseconds, and never a blank space where the
|
|
65
|
+
* code should be.
|
|
66
|
+
* @default true
|
|
67
|
+
*/
|
|
68
|
+
highlight?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* The bar over the code, and the master switch for it: with it off there is
|
|
71
|
+
* no bar and none of `showLanguage`, `copyable` or `rawToggle` draws
|
|
72
|
+
* anything, whatever they say.
|
|
73
|
+
* @default true
|
|
74
|
+
*/
|
|
75
|
+
toolbar?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* A name at the start of the bar — a file path, usually. Takes the place the
|
|
78
|
+
* language would otherwise have; both can be shown at once.
|
|
79
|
+
*/
|
|
80
|
+
title?: React.ReactNode;
|
|
81
|
+
/** Names the language at the start of the bar. @default true */
|
|
82
|
+
showLanguage?: boolean;
|
|
83
|
+
/** The button that puts the code on the clipboard. @default true */
|
|
84
|
+
copyable?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* The toggle that drops the colouring and shows the characters as they are.
|
|
87
|
+
* Off by default: it is a second control on a bar that usually wants one, and
|
|
88
|
+
* it means nothing at all when `highlight` is off.
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
rawToggle?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Lines to mark: a tinted row with a rule down its leading edge.
|
|
94
|
+
*
|
|
95
|
+
* A number is one line, a string is a list of lines and ranges —
|
|
96
|
+
* `'4'`, `'4-9'`, `'1,4-9,12'` — and an array is any mix of the two. They
|
|
97
|
+
* are counted the way the gutter counts, so `startLine={286}` means
|
|
98
|
+
* `highlightLines={288}` marks the line the gutter calls 288.
|
|
99
|
+
*
|
|
100
|
+
* The tint is mixed from the theme's own ink rather than from the page's
|
|
101
|
+
* colour family, so it is legible on all twelve palettes and never the one
|
|
102
|
+
* colour on a Dracula block that nobody chose.
|
|
103
|
+
*/
|
|
104
|
+
highlightLines?: number | string | Array<number | string>;
|
|
105
|
+
/** Numbers down the side. @default false */
|
|
106
|
+
lineNumbers?: boolean;
|
|
107
|
+
/** What the first line is numbered. @default 1 */
|
|
108
|
+
startLine?: number;
|
|
109
|
+
/**
|
|
110
|
+
* A shell prompt in front of every line that has something on it — `$`, `#`,
|
|
111
|
+
* `C:\>`, `>>>`.
|
|
112
|
+
*
|
|
113
|
+
* It is drawn but never *present*: the symbol is generated content, so it
|
|
114
|
+
* cannot be selected, cannot be found by find-in-page and is not what `copy`
|
|
115
|
+
* puts on the clipboard. A transcript stays a transcript and still pastes
|
|
116
|
+
* into a shell.
|
|
117
|
+
*/
|
|
118
|
+
prompt?: string;
|
|
119
|
+
/** Wraps long lines instead of scrolling them sideways. @default false */
|
|
120
|
+
wrap?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* How tall the block may get before the code scrolls inside it. A number is
|
|
123
|
+
* pixels; any CSS length works. Left out, the block is as tall as the code.
|
|
124
|
+
*/
|
|
125
|
+
maxHeight?: number | string;
|
|
126
|
+
/** The typeface. Defaults to the page's own monospace stack. */
|
|
127
|
+
fontFamily?: string;
|
|
128
|
+
/** Overrides the size the `size` ladder chose. A number is pixels. */
|
|
129
|
+
fontSize?: number | string;
|
|
130
|
+
/** Overrides the leading. A bare number is a ratio, as in CSS. */
|
|
131
|
+
lineHeight?: number | string;
|
|
132
|
+
/** Tracking. A number is pixels; `-0.01em` and the like work too. */
|
|
133
|
+
letterSpacing?: number | string;
|
|
134
|
+
/**
|
|
135
|
+
* Which language the block's own words are in — the copy button, the raw
|
|
136
|
+
* toggle, the name of the region. A BCP 47 tag such as `ko`, `pt-BR` or
|
|
137
|
+
* `zh-Hant`; unsupported tags fall back to English.
|
|
138
|
+
*/
|
|
139
|
+
locale?: string;
|
|
140
|
+
/** The copy button's label. Defaults to the `locale`'s word for it. */
|
|
141
|
+
copyLabel?: string;
|
|
142
|
+
/** And what it says once the code is on the clipboard. */
|
|
143
|
+
copiedLabel?: string;
|
|
144
|
+
/** The raw toggle's label. */
|
|
145
|
+
rawLabel?: string;
|
|
146
|
+
/** Fires with the copied text once the clipboard has taken it. */
|
|
147
|
+
onCopy?: (code: string) => void;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* A viewer for one line of code or a thousand.
|
|
151
|
+
*
|
|
152
|
+
* Everything it draws above the code is optional and off one prop each, because
|
|
153
|
+
* the same component has to be a snippet inside a sentence — no bar, no
|
|
154
|
+
* numbers, no chrome — and the full transcript at the top of a README, and
|
|
155
|
+
* those are the same block with different things turned on rather than two
|
|
156
|
+
* components.
|
|
157
|
+
*
|
|
158
|
+
* The colouring is highlight.js, and it is the one thing in the library reached
|
|
159
|
+
* through a dynamic import: the grammars are forty kilobytes and there are
|
|
160
|
+
* thirty-four of them, so they arrive as their own chunk, one language at a
|
|
161
|
+
* time, and only for a block that asked to be coloured. See
|
|
162
|
+
* `internal/highlight.ts` for why that is a `dependencies` entry rather than an
|
|
163
|
+
* optional peer.
|
|
164
|
+
*
|
|
165
|
+
* The block is rendered as lines rather than as one run of text — even with no
|
|
166
|
+
* numbers and no prompt — because a line is what carries a number, a prompt and
|
|
167
|
+
* a place in the scroll, and a component that switched between two renderings
|
|
168
|
+
* would have two sets of wrapping behaviour to keep in step.
|
|
169
|
+
*/
|
|
170
|
+
export declare const CodeBlock: React.ForwardRefExoticComponent<CodeBlockProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{CheckIcon as o,CodeIcon as l,CopyIcon as r}from"../../internal/icons.js";import{codeMessages as a,useMessages as i}from"../../internal/i18n.js";import{canonicalLanguage as s,highlight as c,plainLines as d}from"../../internal/highlight.js";import{cx as p,hasContent as m,metaTextClasses as u,radiusClasses as x,srOnlyClasses as f,surfaceSlots as g,toLength as h,transitionClasses as y}from"../../internal/styles.js";export{registerLanguage}from"../../internal/highlight.js";const v={xs:"text-[0.6875rem]/[1.55]",sm:"text-[0.75rem]/[1.6]",md:"text-[0.8125rem]/[1.65]",lg:"text-[0.875rem]/[1.7]",xl:"text-[1rem]/[1.7]"},b={default:{xs:"py-2",sm:"py-3",md:"py-3.5",lg:"py-4",xl:"py-5"},compact:{xs:"py-1.5",sm:"py-2",md:"py-2.5",lg:"py-3",xl:"py-3.5"}},w={default:{xs:"px-2",sm:"px-3",md:"px-3.5",lg:"px-4",xl:"px-5"},compact:{xs:"px-1.5",sm:"px-2",md:"px-2.5",lg:"px-3",xl:"px-3.5"}},N={default:{xs:"px-2.5 py-1",sm:"px-3.5 py-1",md:"px-4 py-1.5",lg:"px-4.5 py-2",xl:"px-5.5 py-2"},compact:{xs:"px-2 py-0.5",sm:"px-2.5 py-0.5",md:"px-3 py-1",lg:"px-3.5 py-1",xl:"px-4 py-1.5"}};export const CodeBlock=/*@__PURE__*/n.forwardRef(function({code:k,language:S,theme:j="dark",size:L="md",color:M="primary",density:T="default",elevation:_=0,highlight:C=!0,toolbar:F=!0,title:R,showLanguage:A=!0,copyable:z=!0,rawToggle:H=!1,highlightLines:K,lineNumbers:E=!1,startLine:$=1,prompt:D,wrap:B=!1,maxHeight:I,fontFamily:q,fontSize:G,lineHeight:J,letterSpacing:O,locale:P,copyLabel:Q,copiedLabel:U,rawLabel:V,onCopy:W,className:X,style:Y,...Z},ee){const te=i(a,P),ne=n.useMemo(()=>k.replace(/\r\n?/g,"\n").replace(/\s+$/,""),[k]),oe=s(S),[le,re]=n.useState(!1),[ae,ie]=n.useState(null),[se,ce]=n.useState(null),de=C&&!le&&null!==oe;n.useEffect(()=>{if(!de||!oe)return void ce(null);let e=!1;return c(ne,oe).then(t=>{e||ce(t)},()=>{e||ce(null)}),()=>{e=!0}},[ne,oe,de]);const pe=n.useMemo(()=>de&&se?se:d(ne),[de,se,ne]),me=`${String($+Math.max(pe.length-1,0)).length}ch`,ue=n.useRef(void 0);n.useEffect(()=>()=>clearTimeout(ue.current),[]);const xe=n.useMemo(()=>function(e){const t=new Set;if(void 0===e)return t;for(const n of Array.isArray(e)?e:[e])if("number"!=typeof n)for(const e of n.split(",")){const n=/^\s*(\d+)\s*(?:-\s*(\d+)\s*)?$/.exec(e);if(!n)continue;const o=Number(n[1]),l=void 0===n[2]?o:Number(n[2]);for(let e=Math.min(o,l);e<=Math.max(o,l);e+=1)t.add(e)}else Number.isFinite(n)&&t.add(Math.trunc(n));return t}(K),[K]),fe=n.useRef(null),ge=Q??te.copy,he=U??te.copied,ye=V??te.raw,ve=p("inline-flex shrink-0 cursor-pointer items-center gap-1 border-0 bg-transparent","px-1.5 py-1 text-(--n-code-dim) hover:text-(--n-code-fg) hover:bg-(--n-code-hover)",x.xs,u[L],"[&_svg]:pointer-events-none [&_svg]:size-[1.15em] [&_svg]:shrink-0",y,"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"),be=m(R)?void 0:oe??te.code,we=e("div",{role:"region","aria-label":"string"==typeof R?R:be,tabIndex:0,onKeyDown:e=>{if("a"!==e.key&&"A"!==e.key)return;if(!e.metaKey&&!e.ctrlKey||e.altKey)return;const t=fe.current,n="undefined"==typeof window?null:window.getSelection();if(!t||!n)return;e.preventDefault();const o=document.createRange();o.selectNodeContents(t),n.removeAllRanges(),n.addRange(o)},className:p("min-h-0 overflow-auto",b[T][L],"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:-outline-offset-2"),style:void 0===I?void 0:{maxHeight:h(I)},children:e("pre",{ref:fe,className:p("m-0 bg-transparent p-0 font-mono",B?"w-full":"w-max min-w-full"),children:pe.map((t,o)=>{const l=$+o;return e("div",{className:p("neba-code-line",w[T][L]),"data-line":E?l:void 0,"data-mark":xe.has(l)?"":void 0,"data-prompt":D&&t.length>0?D:void 0,children:e("code",{children:t.map((t,o)=>t.token?e("span",{className:t.token,children:t.text},o):e(n.Fragment,{children:t.text},o))})},o)})})});return t("div",{ref:ee,className:p("neba-code flex min-w-0 flex-col overflow-hidden",x[L],"border bg-(--n-code-bg) text-(--n-code-fg) [border-color:var(--n-code-rule)]","[box-shadow:var(--n-elev)]",y,X),"data-code-theme":j,"data-code-wrap":B?"true":void 0,style:{...g(M,_),"--n-code-gutter":me,...q?{fontFamily:q}:null,...void 0===G?null:{fontSize:h(G)},...void 0===J?null:{lineHeight:J},...void 0===O?null:{letterSpacing:h(O)},...Y},...Z,children:[F&&(A||z||H||m(R))?t("div",{className:p("flex min-w-0 items-center gap-1 border-b [border-color:var(--n-code-rule)]",N[T][L]),children:[m(R)?e("span",{className:p("min-w-0 truncate font-mono",u[L]),children:R}):null,A&&oe?e("span",{className:p("min-w-0 truncate font-mono tracking-wide text-(--n-code-dim) uppercase select-none",u[L]),children:oe}):null,e("span",{className:"flex-1"}),H&&C?e("button",{type:"button","aria-pressed":le,"aria-label":ye,title:ye,onClick:()=>re(e=>!e),className:p(ve,le?"text-(--n-code-fg) bg-(--n-code-hover)":""),children:e(l,{})}):null,z?t("button",{type:"button",onClick:async()=>{const e=await async function(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.append(t),t.select();const n=document.execCommand("copy");return t.remove(),n}catch{return!1}}(ne);clearTimeout(ue.current),ie(e),ue.current=setTimeout(()=>ie(null),2e3),e&&W?.(ne)},className:ve,children:[e(ae?o:r,{}),e("span",{children:null===ae?ge:ae?he:te.copyFailed})]}):null]}):null,e("div",{className:p("flex min-h-0 flex-col",v[L]),children:we}),e("span",{"aria-live":"polite",className:f,children:null===ae?"":ae?he:te.copyFailed})]})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{CodeBlock,registerLanguage}from"./CodeBlock.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { NebaElevation, NebaStyleProps } from '../../types';
|
|
2
|
+
import type { NebaElevation, NebaStyleProps } from '../../types.js';
|
|
3
3
|
export interface CollapsibleProps extends NebaStyleProps, Omit<React.ComponentPropsWithoutRef<'div'>, 'color' | 'title' | 'onChange'> {
|
|
4
4
|
/** Whether the panel is showing. Pass it to drive the Collapsible yourself. */
|
|
5
5
|
open?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as a from"react";import{Collapsible as t}from"@base-ui/react/collapsible";import{boxPaddingXClasses as l,boxPaddingYClasses as i}from"../box/Box";import{ChevronIcon as r}from"../../internal/icons";import{gapClasses as
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as a from"react";import{Collapsible as t}from"@base-ui/react/collapsible";import{boxPaddingXClasses as l,boxPaddingYClasses as i}from"../box/Box.js";import{ChevronIcon as r}from"../../internal/icons.js";import{gapClasses as s,hasContent as o,iconClasses as d,metaTextClasses as c,radiusClasses as p,sheetBodyClasses as f,sheetHeaderGapClasses as m,sheetTitleClasses as b,surfaceClasses as h,surfaceSlots as u,transitionClasses as x}from"../../internal/styles.js";const g={solid:[h,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[h,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"};export const Collapsible=/*@__PURE__*/a.forwardRef(function({variant:a="outline",size:h="md",color:v="primary",density:j="default",elevation:N=0,open:w,defaultOpen:y=!1,onOpenChange:_,title:k,subtitle:C,startIcon:O,action:$,trigger:B,indicator:F=!0,disabled:M=!1,padded:R=!0,hiddenUntilFound:T=!1,keepMounted:U=!1,className:z,style:I,children:P,...q},A){const D=l[j][h],E=i[j][h];return n(t.Root,{ref:A,open:w,defaultOpen:y,onOpenChange:e=>_?.(e),disabled:M,className:["flex flex-col overflow-hidden",p[h],g[a],x,z??""].filter(Boolean).join(" "),style:{...u(v,N),...I},...q,children:[B?e(t.Trigger,{render:B}):n("div",{className:"flex w-full items-center",children:[n(t.Trigger,{className:["flex min-w-0 flex-1 cursor-pointer items-center text-start",D,E,s[h],x,d,"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]","hover:bg-(--n-soft)","data-[panel-open]:text-(--n-accent)","disabled:cursor-not-allowed disabled:bg-transparent disabled:text-(--neba-disabled-fg)"].join(" "),children:[o(O)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)",children:O}):null,n("span",{className:`flex min-w-0 flex-1 flex-col ${m[h]}`,children:[o(k)?e("span",{className:`truncate font-semibold ${b[h]}`,children:k}):null,o(C)?e("span",{className:`truncate text-(--neba-muted-fg) ${c[h]}`,children:C}):null]}),F?e("span",{className:["flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)","[transition:rotate_var(--neba-duration)_var(--neba-ease)]","data-[panel-open]:rotate-180"].join(" "),children:e(r,{})}):null]}),o($)?e("span",{className:`flex shrink-0 items-center ${D}`,children:$}):null]}),e(t.Panel,{hiddenUntilFound:T,keepMounted:U,className:["h-(--collapsible-panel-height) overflow-hidden","[transition:height_var(--neba-duration)_var(--neba-ease)]","motion-reduce:[transition-duration:0ms]","data-[starting-style]:h-0 data-[ending-style]:h-0"].join(" "),children:e("div",{className:["min-w-0 text-(--neba-muted-fg)",f[h],R?D:"",R?B?E:"compact"===j?"pb-2":"pb-4":""].filter(Boolean).join(" "),children:P})})]})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './Collapsible';
|
|
1
|
+
export * from './Collapsible.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./Collapsible";
|
|
1
|
+
export*from"./Collapsible.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { ColorFormat } from '../../internal/color';
|
|
3
|
-
import type { NebaElevation, NebaStyleProps } from '../../types';
|
|
2
|
+
import type { ColorFormat } from '../../internal/color.js';
|
|
3
|
+
import type { NebaElevation, NebaStyleProps } from '../../types.js';
|
|
4
4
|
/** The names for the parts of the picker that have no text on them. */
|
|
5
5
|
export interface ColorPickerLabels {
|
|
6
6
|
/** The saturation/brightness square. */
|
|
@@ -97,6 +97,6 @@ export interface ColorPickerProps extends NebaStyleProps, Omit<React.ComponentPr
|
|
|
97
97
|
*
|
|
98
98
|
* There is no colour library under this. The conversions are in
|
|
99
99
|
* `internal/color.ts`, which is a hundred lines of arithmetic — the whole
|
|
100
|
-
* reason
|
|
100
|
+
* reason no colour library comes with it.
|
|
101
101
|
*/
|
|
102
102
|
export declare const ColorPicker: React.ForwardRefExoticComponent<ColorPickerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as r from"react";import{defaultPickerLabels as l}from"../../internal/calendar";import{PickerShell as n}from"../../internal/picker";import{CheckIcon as t}from"../../internal/icons";import{useMessages as
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as r from"react";import{defaultPickerLabels as l}from"../../internal/calendar.js";import{PickerShell as n}from"../../internal/picker.js";import{CheckIcon as t}from"../../internal/icons.js";import{colorMessages as o,useMessages as s}from"../../internal/i18n.js";import{checkerBackground as i,clamp as d,cssColor as h,defaultSwatches as c,formatColor as u,parseColor as f,readableInk as p}from"../../internal/color.js";import{controlTextClasses as b,cx as m,focusRingClasses as g,metaTextClasses as v,radiusClasses as x,stackGapClasses as y,surfaceSlots as w}from"../../internal/styles.js";const N={xs:"w-40",sm:"w-44",md:"w-52",lg:"w-60",xl:"w-72"},k={xs:"h-24",sm:"h-28",md:"h-32",lg:"h-40",xl:"h-48"},C={xs:"h-2.5",sm:"h-3",md:"h-3.5",lg:"h-4",xl:"h-5"},_={xs:"gap-1.5",sm:"gap-2",md:"gap-2.5",lg:"gap-3",xl:"gap-3.5"},j={xs:10,sm:12,md:14,lg:16,xl:18},z=["relative overflow-hidden border","[border-color:var(--neba-border)]","[box-shadow:var(--neba-plate-glass)]"].join(" "),I=["pointer-events-none absolute rounded-full border-2 border-white","[box-shadow:0_0_0_1px_rgba(0,0,0,0.35),0_1px_3px_rgba(0,0,0,0.4)]"].join(" ");function T(e){const a=e.currentTarget.getBoundingClientRect();return{x:0===a.width?0:d((e.clientX-a.left)/a.width,0,1),y:0===a.height?0:d((e.clientY-a.top)/a.height,0,1)}}function A(e){const a=e.shiftKey?10:1;switch(e.key){case"ArrowLeft":return{x:-a,y:0};case"ArrowRight":return{x:a,y:0};case"ArrowUp":return{x:0,y:a};case"ArrowDown":return{x:0,y:-a};default:return null}}function D({hsv:r,alphaValue:l,onChange:n,text:o,onTextChange:s,withAlpha:c,swatches:b,editable:y,size:w,inert:D,labels:M}){const O=j[w],P=-O/2,V=h({h:r.h,s:100,v:100}),$=h(r),L=e=>({onPointerDown:a=>{D||(a.currentTarget.setPointerCapture(a.pointerId),e(a))},onPointerMove:a=>{!D&&a.currentTarget.hasPointerCapture(a.pointerId)&&e(a)}}),S=(e,a,r,l)=>({role:"slider",tabIndex:D?-1:0,"aria-label":e,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":Math.round(a),"aria-orientation":"horizontal","aria-disabled":D||void 0,onKeyDown:e=>{const a=A(e);!D&&a&&0!==a.x&&(e.preventDefault(),l(a.x))}});return a("div",{className:m("flex flex-col",N[w],_[w]),children:[e("div",{...L(e=>{const{x:a,y:t}=T(e);n({hsv:{h:r.h,s:100*a,v:100*(1-t)},alpha:l})}),role:"slider",tabIndex:D?-1:0,"aria-label":M.area,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(r.s),"aria-valuetext":`${Math.round(r.s)}%, ${Math.round(r.v)}%`,"aria-disabled":D||void 0,onKeyDown:e=>{const a=A(e);!D&&a&&(e.preventDefault(),n({hsv:{h:r.h,s:d(r.s+a.x,0,100),v:d(r.v+a.y,0,100)},alpha:l}))},className:m(z,k[w],x[w],g,D?"cursor-default":"cursor-crosshair touch-none"),style:{backgroundColor:V,backgroundImage:"linear-gradient(to top, #000000, rgba(0, 0, 0, 0)), linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0))"},children:e("span",{className:I,style:{width:O,height:O,left:`${r.s}%`,top:100-r.v+"%",marginLeft:P,marginTop:P,backgroundColor:$}})}),e("div",{...L(e=>n({hsv:{...r,h:360*T(e).x},alpha:l})),...S(M.hue,r.h,360,e=>n({hsv:{...r,h:(r.h+2*e+360)%360},alpha:l})),className:m(z,C[w],"rounded-full",g,D?"cursor-default":"cursor-pointer touch-none"),style:{backgroundImage:"linear-gradient(to right, #ff0000 0%, #ffff00 16.66%, #00ff00 33.33%, #00ffff 50%, #0000ff 66.66%, #ff00ff 83.33%, #ff0000 100%)"},children:e("span",{className:I,style:{width:O,height:O,left:r.h/360*100+"%",top:"50%",marginLeft:P,marginTop:P,backgroundColor:V}})}),c?a("div",{...L(e=>n({hsv:r,alpha:T(e).x})),...S(M.alpha,100*l,100,e=>n({hsv:r,alpha:d(l+e/100,0,1)})),className:m(z,C[w],"rounded-full",g,D?"cursor-default":"cursor-pointer touch-none"),style:i,children:[e("span",{"aria-hidden":"true",className:"absolute inset-0",style:{backgroundImage:`linear-gradient(to right, ${h(r,0)}, ${$})`}}),e("span",{className:I,style:{width:O,height:O,left:100*l+"%",top:"50%",marginLeft:P,marginTop:P,backgroundColor:h(r,l)}})]}):null,y?a("div",{className:m("flex items-center",_[w]),children:[e("span",{"aria-hidden":"true",className:m("shrink-0 rounded-full border","[border-color:var(--neba-border)]"),style:{width:O+6,height:O+6,...i},children:e("span",{className:"block size-full rounded-full",style:{backgroundColor:h(r,l)}})}),e("input",{type:"text",value:o,readOnly:D,spellCheck:!1,autoComplete:"off","aria-label":M.value,onChange:e=>s(e.target.value),className:m("min-w-0 flex-1 border bg-transparent px-1.5 py-1 font-mono lowercase","[border-color:var(--neba-border)]",x.xs,v[w],"text-(--neba-fg)","[outline:none] focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1")})]}):null,b&&b.length>0?e("div",{role:"group","aria-label":M.swatches,className:"grid grid-cols-8 gap-1",children:b.map(a=>{const o=f(a),s=null!==o&&u(o.hsv,o.alpha,"hex")===u(r,l,"hex");return e("button",{type:"button",disabled:D,"aria-label":a,"aria-pressed":s,onClick:()=>{o&&n(o)},className:m("flex aspect-square items-center justify-center rounded-full border","[border-color:color-mix(in_oklab,var(--neba-fg)_18%,transparent)]","[transition:box-shadow_var(--neba-duration)_var(--neba-ease)]",g,"[outline:none]",D?"cursor-default":"cursor-pointer hover:[box-shadow:var(--neba-shadow-1)]","[&_svg]:size-3"),style:{backgroundColor:a},children:s&&o?e("span",{style:{color:p(o.hsv)},children:e(t,{})}):null},a)})}):null]})}function M(e,a){return"hex"===e?[a?"#ffffffff":"#ffffff"]:"rgb"===e?[a?"rgba(255, 255, 255, 0.55)":"rgb(255, 255, 255)"]:[a?"hsla(360, 100%, 100%, 0.55)":"hsl(360, 100%, 100%)"]}const O={h:217,s:87,v:82};export const ColorPicker=/*@__PURE__*/r.forwardRef(function({value:t,defaultValue:d="#1a58d1",onValueChange:p,format:g="hex",alpha:x=!1,swatches:N=c,inline:k=!1,editable:C=!0,label:_,description:j,error:z,invalid:I,required:T=!1,disabled:A=!1,readOnly:P=!1,fullWidth:V=!1,clearable:$=!1,name:L,open:S,defaultOpen:q=!1,onOpenChange:K,locale:R,labels:B,variant:W="outline",size:E="md",color:U="primary",density:X="default",elevation:Y=0,className:F,style:G,...H},J){const Q=s(o,R),Z=r.useMemo(()=>({...Q,...B}),[Q,B]),[ee,ae]=r.useState(d),re=t??ee,[le,ne]=r.useState(q),te=S??le,[oe,se]=r.useState(()=>f(re)??{hsv:O,alpha:1}),[ie,de]=r.useState(()=>re||""),he=u(oe.hsv,x?oe.alpha:1,g),ce=""===re;r.useEffect(()=>{const e=f(re);e?u(e.hsv,x?e.alpha:1,g)!==he&&(de(re),se(e)):de(re)},[re,he,x,g]);const ue=(e,a)=>{se(e);const r=u(e.hsv,x?e.alpha:1,g);de(a??r),void 0===t&&ae(r),p?.(r)},fe=A||P,pe=e(D,{hsv:oe.hsv,alphaValue:oe.alpha,onChange:ue,text:ie,onTextChange:e=>{de(e);const a=f(e);a&&ue(a,e)},withAlpha:x,swatches:N,editable:C,size:E,inert:fe,labels:Z}),be=L?e("input",{type:"hidden",name:L,value:ce?"":he}):null;if(k){const r=I??Boolean(z)?"danger":U;return a("div",{ref:J,className:m("flex flex-col",y[E],F),style:{...w(r,Y),...G},...H,children:[_?e("span",{className:m(v[E],"font-medium",A?"text-(--neba-disabled-fg)":"text-(--neba-fg)"),children:_}):null,pe,j?e("span",{className:m(v[E],"text-(--neba-muted-fg)"),children:j}):null,z?e("span",{className:m(v[E],"text-(--n-accent)"),children:z}):null,be]})}return e("div",{ref:J,className:V?"w-full":"inline-block",...H,children:e(n,{variant:W,size:E,color:U,density:X,elevation:Y,style:G,label:_,description:j,error:z,invalid:I,required:T,disabled:A,readOnly:P,fullWidth:V,className:F,startIcon:e("span",{"aria-hidden":"true",className:m("block size-[1.15em] shrink-0 rounded-full border","[border-color:color-mix(in_oklab,var(--neba-fg)_18%,transparent)]"),style:i,children:e("span",{className:"block size-full rounded-full",style:{backgroundColor:ce?"transparent":h(oe.hsv,x?oe.alpha:1)}})}),display:ce?Z.empty:he,samples:M(g,x),empty:ce,clearable:$,onClear:()=>{void 0===t&&ae(""),de(""),p?.("")},open:te,onOpenChange:e=>{void 0===S&&ne(e),K?.(e)},labels:{...l,clear:Z.clear},hiddenValues:L?[{name:L,value:ce?"":he}]:void 0,children:e("div",{className:b[E],children:pe})})})});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ColorPicker } from './ColorPicker';
|
|
2
|
-
export type { ColorPickerLabels, ColorPickerProps } from './ColorPicker';
|
|
1
|
+
export { ColorPicker } from './ColorPicker.js';
|
|
2
|
+
export type { ColorPickerLabels, ColorPickerProps } from './ColorPicker.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ColorPicker}from"./ColorPicker";
|
|
1
|
+
export{ColorPicker}from"./ColorPicker.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { NebaElevation, NebaStyleProps } from '../../types';
|
|
2
|
+
import type { NebaElevation, NebaStyleProps } from '../../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* What a Combobox's value may be — the same two types a [Select](../select)
|
|
5
5
|
* submits, and for the same reason: a form control's value is what a form
|