@nqlib/nqui 0.3.3 → 0.4.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 +20 -2
- package/dist/button-CYFTFDKe.cjs +1 -0
- package/dist/button-nJvDl3w8.js +44 -0
- package/dist/calendar.cjs.js +1 -0
- package/dist/calendar.es.js +6 -0
- package/dist/carousel-DEyyJi49.js +179 -0
- package/dist/carousel-Dhhz8m5V.cjs +1 -0
- package/dist/carousel.cjs.js +1 -0
- package/dist/carousel.es.js +8 -0
- package/dist/command-palette-UHk8zZOg.cjs +45 -0
- package/dist/command-palette-d-TrdBsM.js +1778 -0
- package/dist/command.cjs.js +1 -0
- package/dist/command.es.js +13 -0
- package/dist/components/custom/color-picker.d.ts.map +1 -1
- package/dist/components/custom/command-palette.d.ts.map +1 -1
- package/dist/components/custom/enhanced-checkbox.d.ts +1 -1
- package/dist/components/custom/enhanced-checkbox.d.ts.map +1 -1
- package/dist/components/custom/enhanced-combobox.d.ts +1 -1
- package/dist/components/custom/enhanced-combobox.d.ts.map +1 -1
- package/dist/components/custom/enhanced-radio-group.d.ts.map +1 -1
- package/dist/components/custom/enhanced-scroll-area.d.ts +12 -0
- package/dist/components/custom/enhanced-scroll-area.d.ts.map +1 -1
- package/dist/components/custom/enhanced-tabs.d.ts.map +1 -1
- package/dist/components/debug/debug-panel.d.ts.map +1 -1
- package/dist/components/debug/magnifier.d.ts.map +1 -1
- package/dist/components/debug/ui-tester.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/button-group.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/combobox.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/item.d.ts +1 -1
- package/dist/components/ui/separator.d.ts +34 -1
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +8 -2
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/drawer-BcIxWRN8.cjs +1 -0
- package/dist/drawer-CU4lkcz7.js +119 -0
- package/dist/drawer.cjs.js +1 -0
- package/dist/drawer.es.js +13 -0
- package/dist/enhanced-calendar-5PA8CeF7.cjs +61 -0
- package/dist/enhanced-calendar-BENbxw7_.js +375 -0
- package/dist/entries/calendar.d.ts +9 -0
- package/dist/entries/calendar.d.ts.map +1 -0
- package/dist/entries/carousel.d.ts +7 -0
- package/dist/entries/carousel.d.ts.map +1 -0
- package/dist/entries/command.d.ts +9 -0
- package/dist/entries/command.d.ts.map +1 -0
- package/dist/entries/drawer.d.ts +7 -0
- package/dist/entries/drawer.d.ts.map +1 -0
- package/dist/entries/sonner.d.ts +8 -0
- package/dist/entries/sonner.d.ts.map +1 -0
- package/dist/entries/sortable.d.ts +7 -0
- package/dist/entries/sortable.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +2 -3
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/use-as-ref.d.ts +1 -1
- package/dist/hooks/use-as-ref.d.ts.map +1 -1
- package/dist/hooks/use-intersection-observer.d.ts +13 -0
- package/dist/hooks/use-intersection-observer.d.ts.map +1 -0
- package/dist/index.d.ts +13 -37
- package/dist/index.d.ts.map +1 -1
- package/dist/keyboard-BapbM2wb.cjs +1 -0
- package/dist/keyboard-pkY42Y3a.js +39 -0
- package/dist/nqui.cjs.js +171 -802
- package/dist/nqui.es.js +15298 -72451
- package/dist/sonner-Co6YpYVs.js +546 -0
- package/dist/sonner-DbQhVp8m.cjs +330 -0
- package/dist/sonner.cjs.js +1 -0
- package/dist/sonner.es.js +6 -0
- package/dist/sortable-Cj3cdxGc.cjs +5 -0
- package/dist/sortable-wG_cXiUk.js +366 -0
- package/dist/sortable.cjs.js +1 -0
- package/dist/sortable.es.js +8 -0
- package/dist/styles.css +21 -9
- package/dist/utils-B6yFEsav.js +8 -0
- package/dist/utils-IjLH3w2e.cjs +1 -0
- package/docs/components/README.md +282 -92
- package/docs/components/nqui-button-group.md +24 -5
- package/docs/components/nqui-checkbox.md +2 -2
- package/docs/components/nqui-code-block.md +6 -4
- package/docs/components/nqui-code-editor.md +1 -1
- package/docs/components/nqui-combobox.md +9 -1
- package/docs/components/nqui-data-table.md +46 -0
- package/docs/components/nqui-input-group.md +14 -6
- package/docs/components/nqui-radio-group.md +9 -1
- package/docs/components/nqui-sandbox.md +1 -1
- package/docs/components/nqui-select.md +13 -10
- package/docs/components/nqui-separator.md +33 -1
- package/docs/components/nqui-snippet.md +1 -1
- package/docs/components/nqui-table.md +43 -0
- package/docs/components/nqui-toggle-group.md +49 -5
- package/docs/components/nqui-toggle.md +25 -2
- package/docs/internal-notes/APP_BUILDER_PACKAGE.md +86 -0
- package/docs/internal-notes/INSTALLATION.md +161 -108
- package/docs/internal-notes/PEER_DEPENDENCIES.md +105 -0
- package/docs/internal-notes/PUBLISHING.md +72 -0
- package/docs/internal-notes/SKILLS-ARCHITECTURE.md +105 -0
- package/package.json +103 -17
- package/scripts/cli.js +44 -0
- package/scripts/help.js +1 -0
- package/scripts/init-css.js +15 -0
- package/scripts/init-cursor.js +169 -0
- package/scripts/install-peers.js +43 -0
- package/scripts/peer-deps.js +27 -0
- package/scripts/post-install.js +73 -0
- package/scripts/publish-npmjs.js +17 -3
- package/scripts/resolve-target-dir.js +99 -0
- package/scripts/skill-templates.js +109 -0
- package/dist/App.d.ts +0 -3
- package/dist/App.d.ts.map +0 -1
- package/dist/assets/svg/auth-lines.d.ts +0 -4
- package/dist/assets/svg/auth-lines.d.ts.map +0 -1
- package/dist/assets/svg/logo.d.ts +0 -4
- package/dist/assets/svg/logo.d.ts.map +0 -1
- package/dist/components/AppLayout.d.ts +0 -5
- package/dist/components/AppLayout.d.ts.map +0 -1
- package/dist/components/app-builder/AppBuilder.d.ts +0 -15
- package/dist/components/app-builder/AppBuilder.d.ts.map +0 -1
- package/dist/components/app-builder/context/app-builder-context.d.ts +0 -31
- package/dist/components/app-builder/context/app-builder-context.d.ts.map +0 -1
- package/dist/components/app-builder/core/AlignmentToolbar.d.ts +0 -5
- package/dist/components/app-builder/core/AlignmentToolbar.d.ts.map +0 -1
- package/dist/components/app-builder/core/AppCanvas.d.ts +0 -9
- package/dist/components/app-builder/core/AppCanvas.d.ts.map +0 -1
- package/dist/components/app-builder/core/CanvasToolbar.d.ts +0 -7
- package/dist/components/app-builder/core/CanvasToolbar.d.ts.map +0 -1
- package/dist/components/app-builder/core/DraggableWidget.d.ts +0 -12
- package/dist/components/app-builder/core/DraggableWidget.d.ts.map +0 -1
- package/dist/components/app-builder/core/WidgetConfigurator.d.ts +0 -6
- package/dist/components/app-builder/core/WidgetConfigurator.d.ts.map +0 -1
- package/dist/components/app-builder/core/WidgetPalette.d.ts +0 -6
- package/dist/components/app-builder/core/WidgetPalette.d.ts.map +0 -1
- package/dist/components/app-builder/core/WidgetRenderer.d.ts +0 -3
- package/dist/components/app-builder/core/WidgetRenderer.d.ts.map +0 -1
- package/dist/components/app-builder/core/index.d.ts +0 -8
- package/dist/components/app-builder/core/index.d.ts.map +0 -1
- package/dist/components/app-builder/essentials/button.d.ts +0 -3
- package/dist/components/app-builder/essentials/button.d.ts.map +0 -1
- package/dist/components/app-builder/essentials/container.d.ts +0 -3
- package/dist/components/app-builder/essentials/container.d.ts.map +0 -1
- package/dist/components/app-builder/essentials/index.d.ts +0 -3
- package/dist/components/app-builder/essentials/index.d.ts.map +0 -1
- package/dist/components/app-builder/hooks/index.d.ts +0 -3
- package/dist/components/app-builder/hooks/index.d.ts.map +0 -1
- package/dist/components/app-builder/hooks/use-app-builder.d.ts +0 -3
- package/dist/components/app-builder/hooks/use-app-builder.d.ts.map +0 -1
- package/dist/components/app-builder/hooks/use-canvas-state.d.ts +0 -24
- package/dist/components/app-builder/hooks/use-canvas-state.d.ts.map +0 -1
- package/dist/components/app-builder/index.d.ts +0 -19
- package/dist/components/app-builder/index.d.ts.map +0 -1
- package/dist/components/app-builder/registry/create-registry.d.ts +0 -10
- package/dist/components/app-builder/registry/create-registry.d.ts.map +0 -1
- package/dist/components/app-builder/registry/default-registry.d.ts +0 -6
- package/dist/components/app-builder/registry/default-registry.d.ts.map +0 -1
- package/dist/components/app-builder/registry/index.d.ts +0 -4
- package/dist/components/app-builder/registry/index.d.ts.map +0 -1
- package/dist/components/app-builder/registry/registry-helpers.d.ts +0 -22
- package/dist/components/app-builder/registry/registry-helpers.d.ts.map +0 -1
- package/dist/components/app-builder/types.d.ts +0 -64
- package/dist/components/app-builder/types.d.ts.map +0 -1
- package/dist/components/app-builder/utils/collision-detection.d.ts +0 -26
- package/dist/components/app-builder/utils/collision-detection.d.ts.map +0 -1
- package/dist/components/app-builder/utils/index.d.ts +0 -2
- package/dist/components/app-builder/utils/index.d.ts.map +0 -1
- package/dist/components/app-sidebar.d.ts +0 -4
- package/dist/components/app-sidebar.d.ts.map +0 -1
- package/dist/components/blocks/chart-compositions/chart-composition-01.d.ts +0 -2
- package/dist/components/blocks/chart-compositions/chart-composition-01.d.ts.map +0 -1
- package/dist/components/blocks/chart-compositions/chart-composition-02.d.ts +0 -2
- package/dist/components/blocks/chart-compositions/chart-composition-02.d.ts.map +0 -1
- package/dist/components/blocks/chart-compositions/chart-composition-03.d.ts +0 -2
- package/dist/components/blocks/chart-compositions/chart-composition-03.d.ts.map +0 -1
- package/dist/components/blocks/chart-compositions/index.d.ts +0 -4
- package/dist/components/blocks/chart-compositions/index.d.ts.map +0 -1
- package/dist/components/blocks/index.d.ts +0 -3
- package/dist/components/blocks/index.d.ts.map +0 -1
- package/dist/components/blocks/tables/index.d.ts +0 -4
- package/dist/components/blocks/tables/index.d.ts.map +0 -1
- package/dist/components/blocks/tables/table-01.d.ts +0 -2
- package/dist/components/blocks/tables/table-01.d.ts.map +0 -1
- package/dist/components/blocks/tables/table-02.d.ts +0 -2
- package/dist/components/blocks/tables/table-02.d.ts.map +0 -1
- package/dist/components/blocks/tables/table-03.d.ts +0 -2
- package/dist/components/blocks/tables/table-03.d.ts.map +0 -1
- package/dist/components/chart/area-chart/AreaChart.d.ts +0 -57
- package/dist/components/chart/area-chart/AreaChart.d.ts.map +0 -1
- package/dist/components/chart/area-chart/index.d.ts +0 -3
- package/dist/components/chart/area-chart/index.d.ts.map +0 -1
- package/dist/components/chart/bar-chart/BarChart.d.ts +0 -62
- package/dist/components/chart/bar-chart/BarChart.d.ts.map +0 -1
- package/dist/components/chart/bar-chart/index.d.ts +0 -3
- package/dist/components/chart/bar-chart/index.d.ts.map +0 -1
- package/dist/components/chart/bar-list/BarList.d.ts +0 -23
- package/dist/components/chart/bar-list/BarList.d.ts.map +0 -1
- package/dist/components/chart/bar-list/index.d.ts +0 -3
- package/dist/components/chart/bar-list/index.d.ts.map +0 -1
- package/dist/components/chart/category-bar/CategoryBar.d.ts +0 -15
- package/dist/components/chart/category-bar/CategoryBar.d.ts.map +0 -1
- package/dist/components/chart/category-bar/index.d.ts +0 -3
- package/dist/components/chart/category-bar/index.d.ts.map +0 -1
- package/dist/components/chart/combo-chart/ComboChart.d.ts +0 -67
- package/dist/components/chart/combo-chart/ComboChart.d.ts.map +0 -1
- package/dist/components/chart/combo-chart/index.d.ts +0 -3
- package/dist/components/chart/combo-chart/index.d.ts.map +0 -1
- package/dist/components/chart/donut-chart/DonutChart.d.ts +0 -37
- package/dist/components/chart/donut-chart/DonutChart.d.ts.map +0 -1
- package/dist/components/chart/donut-chart/index.d.ts +0 -3
- package/dist/components/chart/donut-chart/index.d.ts.map +0 -1
- package/dist/components/chart/index.d.ts +0 -19
- package/dist/components/chart/index.d.ts.map +0 -1
- package/dist/components/chart/line-chart/LineChart.d.ts +0 -55
- package/dist/components/chart/line-chart/LineChart.d.ts.map +0 -1
- package/dist/components/chart/line-chart/index.d.ts +0 -3
- package/dist/components/chart/line-chart/index.d.ts.map +0 -1
- package/dist/components/chart/progress-circle/ProgressCircle.d.ts +0 -92
- package/dist/components/chart/progress-circle/ProgressCircle.d.ts.map +0 -1
- package/dist/components/chart/progress-circle/index.d.ts +0 -3
- package/dist/components/chart/progress-circle/index.d.ts.map +0 -1
- package/dist/components/chart/spark-chart/SparkChart.d.ts +0 -40
- package/dist/components/chart/spark-chart/SparkChart.d.ts.map +0 -1
- package/dist/components/chart/spark-chart/index.d.ts +0 -3
- package/dist/components/chart/spark-chart/index.d.ts.map +0 -1
- package/dist/components/component-example.d.ts +0 -2
- package/dist/components/component-example.d.ts.map +0 -1
- package/dist/components/custom/enhanced-separator.d.ts +0 -36
- package/dist/components/custom/enhanced-separator.d.ts.map +0 -1
- package/dist/components/custom/segmented-control.d.ts +0 -48
- package/dist/components/custom/segmented-control.d.ts.map +0 -1
- package/dist/components/example.d.ts +0 -7
- package/dist/components/example.d.ts.map +0 -1
- package/dist/components/login-form.d.ts +0 -2
- package/dist/components/login-form.d.ts.map +0 -1
- package/dist/components/nav-user.d.ts +0 -8
- package/dist/components/nav-user.d.ts.map +0 -1
- package/dist/components/pm/gantt/contexts.d.ts +0 -13
- package/dist/components/pm/gantt/contexts.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-columns.d.ts +0 -7
- package/dist/components/pm/gantt/gantt-columns.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-demo.d.ts +0 -2
- package/dist/components/pm/gantt/gantt-demo.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-dependencies.d.ts +0 -23
- package/dist/components/pm/gantt/gantt-dependencies.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-features.d.ts +0 -9
- package/dist/components/pm/gantt/gantt-features.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-header.d.ts +0 -5
- package/dist/components/pm/gantt/gantt-header.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-markers.d.ts +0 -11
- package/dist/components/pm/gantt/gantt-markers.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-modals.d.ts +0 -5
- package/dist/components/pm/gantt/gantt-modals.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-provider.d.ts +0 -5
- package/dist/components/pm/gantt/gantt-provider.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-setting-modal.d.ts +0 -4
- package/dist/components/pm/gantt/gantt-setting-modal.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-sidebar.d.ts +0 -7
- package/dist/components/pm/gantt/gantt-sidebar.d.ts.map +0 -1
- package/dist/components/pm/gantt/gantt-toolbar.d.ts +0 -29
- package/dist/components/pm/gantt/gantt-toolbar.d.ts.map +0 -1
- package/dist/components/pm/gantt/index.d.ts +0 -16
- package/dist/components/pm/gantt/index.d.ts.map +0 -1
- package/dist/components/pm/gantt/types.d.ts +0 -299
- package/dist/components/pm/gantt/types.d.ts.map +0 -1
- package/dist/components/pm/gantt/utils.d.ts +0 -29
- package/dist/components/pm/gantt/utils.d.ts.map +0 -1
- package/dist/components/pm/index.d.ts +0 -13
- package/dist/components/pm/index.d.ts.map +0 -1
- package/dist/components/pm/mockdata.d.ts +0 -13
- package/dist/components/pm/mockdata.d.ts.map +0 -1
- package/dist/components/pm/pm-column-templates.d.ts +0 -30
- package/dist/components/pm/pm-column-templates.d.ts.map +0 -1
- package/dist/components/pm/pm-data-utils.d.ts +0 -82
- package/dist/components/pm/pm-data-utils.d.ts.map +0 -1
- package/dist/components/pm/pm-definition.d.ts +0 -75
- package/dist/components/pm/pm-definition.d.ts.map +0 -1
- package/dist/components/pm/pm-theme-context.d.ts +0 -17
- package/dist/components/pm/pm-theme-context.d.ts.map +0 -1
- package/dist/components/pm/pm-types.d.ts +0 -81
- package/dist/components/pm/pm-types.d.ts.map +0 -1
- package/dist/components/pm/project-table-view.d.ts +0 -17
- package/dist/components/pm/project-table-view.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-cell-variants.d.ts +0 -14
- package/dist/components/pm/table/data-grid-cell-variants.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-cell-wrapper.d.ts +0 -9
- package/dist/components/pm/table/data-grid-cell-wrapper.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-cell.d.ts +0 -5
- package/dist/components/pm/table/data-grid-cell.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-column-header.d.ts +0 -10
- package/dist/components/pm/table/data-grid-column-header.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-context-menu.d.ts +0 -10
- package/dist/components/pm/table/data-grid-context-menu.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-filter-menu.d.ts +0 -10
- package/dist/components/pm/table/data-grid-filter-menu.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-keyboard-shortcuts.d.ts +0 -12
- package/dist/components/pm/table/data-grid-keyboard-shortcuts.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-paste-dialog.d.ts +0 -9
- package/dist/components/pm/table/data-grid-paste-dialog.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-row-height-menu.d.ts +0 -10
- package/dist/components/pm/table/data-grid-row-height-menu.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-row.d.ts +0 -27
- package/dist/components/pm/table/data-grid-row.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-search.d.ts +0 -8
- package/dist/components/pm/table/data-grid-search.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-select-column.d.ts +0 -11
- package/dist/components/pm/table/data-grid-select-column.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-skeleton.d.ts +0 -12
- package/dist/components/pm/table/data-grid-skeleton.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-sort-menu.d.ts +0 -10
- package/dist/components/pm/table/data-grid-sort-menu.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid-view-menu.d.ts +0 -10
- package/dist/components/pm/table/data-grid-view-menu.d.ts.map +0 -1
- package/dist/components/pm/table/data-grid.d.ts +0 -11
- package/dist/components/pm/table/data-grid.d.ts.map +0 -1
- package/dist/components/shadcn-studio/blocks/login-page-05/login-form.d.ts +0 -3
- package/dist/components/shadcn-studio/blocks/login-page-05/login-form.d.ts.map +0 -1
- package/dist/components/shadcn-studio/blocks/login-page-05/login-page-05.d.ts +0 -3
- package/dist/components/shadcn-studio/blocks/login-page-05/login-page-05.d.ts.map +0 -1
- package/dist/components/shadcn-studio/logo.d.ts +0 -5
- package/dist/components/shadcn-studio/logo.d.ts.map +0 -1
- package/dist/components/showcase/app-builder/app-builder-context.d.ts +0 -16
- package/dist/components/showcase/app-builder/app-builder-context.d.ts.map +0 -1
- package/dist/components/showcase/app-builder/app-canvas.d.ts +0 -11
- package/dist/components/showcase/app-builder/app-canvas.d.ts.map +0 -1
- package/dist/components/showcase/app-builder/widget-configurator.d.ts +0 -10
- package/dist/components/showcase/app-builder/widget-configurator.d.ts.map +0 -1
- package/dist/components/showcase/app-builder/widget-palette.d.ts +0 -6
- package/dist/components/showcase/app-builder/widget-palette.d.ts.map +0 -1
- package/dist/components/showcase/app-builder/widget-registry.d.ts +0 -29
- package/dist/components/showcase/app-builder/widget-registry.d.ts.map +0 -1
- package/dist/components/showcase/app-builder/widget-renderer.d.ts +0 -7
- package/dist/components/showcase/app-builder/widget-renderer.d.ts.map +0 -1
- package/dist/components/table/DataTable.d.ts +0 -71
- package/dist/components/table/DataTable.d.ts.map +0 -1
- package/dist/components/table/Table.d.ts +0 -12
- package/dist/components/table/Table.d.ts.map +0 -1
- package/dist/components/table/data-table-helpers.d.ts +0 -49
- package/dist/components/table/data-table-helpers.d.ts.map +0 -1
- package/dist/components/table/index.d.ts +0 -5
- package/dist/components/table/index.d.ts.map +0 -1
- package/dist/components/theme-toggle.d.ts +0 -2
- package/dist/components/theme-toggle.d.ts.map +0 -1
- package/dist/components/ui/chart.d.ts +0 -41
- package/dist/components/ui/chart.d.ts.map +0 -1
- package/dist/components/ui/shadcn-io/code-block/index.d.ts +0 -67
- package/dist/components/ui/shadcn-io/code-block/index.d.ts.map +0 -1
- package/dist/components/ui/shadcn-io/code-block/server.d.ts +0 -10
- package/dist/components/ui/shadcn-io/code-block/server.d.ts.map +0 -1
- package/dist/components/ui/shadcn-io/code-editor/index.d.ts +0 -35
- package/dist/components/ui/shadcn-io/code-editor/index.d.ts.map +0 -1
- package/dist/components/ui/shadcn-io/sandbox/index.d.ts +0 -38
- package/dist/components/ui/shadcn-io/sandbox/index.d.ts.map +0 -1
- package/dist/components/ui/shadcn-io/snippet/index.d.ts +0 -21
- package/dist/components/ui/shadcn-io/snippet/index.d.ts.map +0 -1
- package/dist/hooks/use-chart-highlight.d.ts +0 -43
- package/dist/hooks/use-chart-highlight.d.ts.map +0 -1
- package/dist/hooks/use-data-grid.d.ts +0 -59
- package/dist/hooks/use-data-grid.d.ts.map +0 -1
- package/dist/hooks/use-on-window-resize.d.ts +0 -2
- package/dist/hooks/use-on-window-resize.d.ts.map +0 -1
- package/dist/lib/data-grid-filters.d.ts +0 -29
- package/dist/lib/data-grid-filters.d.ts.map +0 -1
- package/dist/lib/data-grid.d.ts +0 -47
- package/dist/lib/data-grid.d.ts.map +0 -1
- package/dist/main.d.ts +0 -3
- package/dist/main.d.ts.map +0 -1
- package/dist/mockdata/chartData.d.ts +0 -71
- package/dist/mockdata/chartData.d.ts.map +0 -1
- package/dist/mockdata/toc.d.ts +0 -23
- package/dist/mockdata/toc.d.ts.map +0 -1
- package/dist/pages/AppBuilder.d.ts +0 -2
- package/dist/pages/AppBuilder.d.ts.map +0 -1
- package/dist/pages/ChartShowcase.d.ts +0 -2
- package/dist/pages/ChartShowcase.d.ts.map +0 -1
- package/dist/pages/ComponentShowcase.d.ts +0 -2
- package/dist/pages/ComponentShowcase.d.ts.map +0 -1
- package/dist/pages/DataTableShowcase.d.ts +0 -2
- package/dist/pages/DataTableShowcase.d.ts.map +0 -1
- package/dist/pages/Drafts.d.ts +0 -2
- package/dist/pages/Drafts.d.ts.map +0 -1
- package/dist/pages/GanttShowcase.d.ts +0 -2
- package/dist/pages/GanttShowcase.d.ts.map +0 -1
- package/dist/pages/Inbox.d.ts +0 -2
- package/dist/pages/Inbox.d.ts.map +0 -1
- package/dist/pages/Junk.d.ts +0 -2
- package/dist/pages/Junk.d.ts.map +0 -1
- package/dist/pages/Sent.d.ts +0 -2
- package/dist/pages/Sent.d.ts.map +0 -1
- package/dist/pages/Settings.d.ts +0 -2
- package/dist/pages/Settings.d.ts.map +0 -1
- package/dist/pages/Trash.d.ts +0 -2
- package/dist/pages/Trash.d.ts.map +0 -1
- package/dist/pages/gantt-data.d.ts +0 -16
- package/dist/pages/gantt-data.d.ts.map +0 -1
- package/dist/stories/mockData.d.ts +0 -157
- package/dist/stories/mockData.d.ts.map +0 -1
- package/dist/types/data-grid.d.ts +0 -179
- package/dist/types/data-grid.d.ts.map +0 -1
- package/dist/utils/chart-colors.d.ts +0 -62
- package/dist/utils/chart-colors.d.ts.map +0 -1
- package/dist/utils/chart-highlight.d.ts +0 -34
- package/dist/utils/chart-highlight.d.ts.map +0 -1
- package/dist/utils/chart-utils.d.ts +0 -2
- package/dist/utils/chart-utils.d.ts.map +0 -1
- package/dist/utils/focus-ring.d.ts +0 -2
- package/dist/utils/focus-ring.d.ts.map +0 -1
- package/dist/utils/get-y-axis-domain.d.ts +0 -2
- package/dist/utils/get-y-axis-domain.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -10
- package/dist/utils/index.d.ts.map +0 -1
- package/docs/components/nqui-segmented-control.md +0 -18
|
@@ -1,119 +1,309 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nqui-components
|
|
3
|
+
description: Component implementation guide for nqui. AI skill for implementing nqui components correctly. Use when building UI with @nqlib/nqui or contributing components.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# nqui Component Instructions
|
|
2
7
|
|
|
3
|
-
Implementation guides for each component. Optimized for AI/LLM consumption.
|
|
8
|
+
Implementation guides for each component. **AI Skill:** Optimized for AI/LLM consumption when implementing nqui in apps or extending the library.
|
|
4
9
|
|
|
5
10
|
**Import:** `import { X } from "@nqlib/nqui"`
|
|
6
11
|
**CSS:** `@import "@nqlib/nqui/styles"` (via `npx @nqlib/nqui init-css`)
|
|
7
12
|
|
|
8
|
-
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
9
16
|
|
|
10
17
|
| Dependency | Version | Notes |
|
|
11
18
|
|------------|---------|-------|
|
|
12
|
-
| **
|
|
13
|
-
| **
|
|
19
|
+
| **React** | 18+ or 19 | nqui supports React 18 and 19 via `^18.0.0 \|\| ^19.0.0` peer. |
|
|
20
|
+
| **Tailwind CSS** | ^4.x | Required. Vite: `@tailwindcss/vite`. Next.js: `@source` directives in CSS. |
|
|
14
21
|
| **tw-animate-css** | — | `@import "tw-animate-css"` in your CSS (added by init-css). |
|
|
15
|
-
| **Radix UI** | — | Bundled
|
|
22
|
+
| **Radix UI** | — | Bundled (Dialog, Select, etc.). |
|
|
23
|
+
| **Hugeicons** | @hugeicons/react, @hugeicons/core-free-icons | Required for icon display in components. |
|
|
24
|
+
|
|
25
|
+
**Optional peers** (per component): `react-day-picker` (Calendar), `sonner` (Toaster), `react-resizable-panels` (Resizable), `@tanstack/react-table` (DataTable). **Code display** (CodeBlock, Snippet, etc.): use `@nqlib/nqcode` with `shiki`, `@shikijs/transformers`.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Shared Conventions (AI Implementation Rules)
|
|
30
|
+
|
|
31
|
+
- **Control sizes:** `sm`=h-6, `default`=h-7, `lg`=h-8. Button, Toggle, ToggleGroup, Input, Select use this scale. See `.cursor/skills/nqui-design-system/SKILL.md`.
|
|
32
|
+
- **CSS vars required:** nqui uses `--primary`, `--background`, `--foreground`, etc. Run `npx @nqlib/nqui init-css`.
|
|
33
|
+
- **Enhanced vs Core:** Button, Badge, Checkbox, Select, etc. default to enhanced (3D, animations). Use `CoreButton`, `CoreBadge`, etc. for base shadcn. Separator: single component with `variant` prop (no CoreSeparator).
|
|
34
|
+
- **Grouped controls:** ButtonGroup, ToggleGroup share border; ToggleGroup uses item dividers (`border-foreground/20`) or `ToggleGroupSeparator`.
|
|
35
|
+
- **Toolbar context:** Always show Toggle/ToggleGroup in realistic context (document toolbar, chart settings, etc.). Reference: `src/pages/ComponentShowcase.tsx`.
|
|
36
|
+
- **Style injection:** Checkbox, Rating, Combobox inject `<style>` at mount → client-only guard for SSR.
|
|
37
|
+
- **OKLCH:** ColorPicker expects OKLCH strings (`oklch(0.5 0.15 240)`), not hex.
|
|
38
|
+
- **SidebarProvider:** Must wrap entire layout (sidebar + content).
|
|
39
|
+
- **Z-index:** Use CSS vars from `styles/elevation.css` (e.g. `z-[var(--z-modal)]`). Never hardcode `z-10`, `z-50`, etc.
|
|
40
|
+
- **Keyboard:** Use `Keys`, `isMod`, `shouldIgnoreKeyboardShortcut` from `@/lib/keyboard` for custom shortcuts.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## When to Use (Selection & Action Components)
|
|
45
|
+
|
|
46
|
+
Use these rules to choose the right component. **Selection** = user picks from options. **Action** = user triggers a command.
|
|
47
|
+
|
|
48
|
+
### App Design Rule: Inline/Toolbar → ToggleGroup
|
|
49
|
+
|
|
50
|
+
**For toolbars, headers, and inline controls:** Always use ToggleGroup (never RadioGroup). Examples: view mode (List/Grid), scale (Linear/Log), format (Bold/Italic). Use RadioGroup only for form context (settings modal, stacked preference list).
|
|
51
|
+
|
|
52
|
+
**Context-first design:** Place toolbars in realistic app context (document editor with content area, chart panel with labels). Never show Toggle/ToggleGroup floating alone. Canonical implementation: `src/pages/ComponentShowcase.tsx` → Toggle & ToggleGroup section.
|
|
53
|
+
|
|
54
|
+
### Single selection (pick one of N)
|
|
55
|
+
|
|
56
|
+
| If... | Use |
|
|
57
|
+
|-------|-----|
|
|
58
|
+
| 2–4 options, inline, want primary fill on selected | **ToggleGroup** `type="single" variant="segmented"` |
|
|
59
|
+
| 2–5 options, inline, neutral/muted styling | **ToggleGroup** `type="single"` |
|
|
60
|
+
| 5+ options OR limited space | **Select** (dropdown) |
|
|
61
|
+
| Form context, stacked or horizontal list | **RadioGroup** |
|
|
62
|
+
| Need search/filter over options | **Combobox** (single) |
|
|
16
63
|
|
|
17
|
-
|
|
64
|
+
### Multiple selection (pick zero or more)
|
|
18
65
|
|
|
19
|
-
|
|
66
|
+
| If... | Use |
|
|
67
|
+
|-------|-----|
|
|
68
|
+
| 2–5 options, inline (e.g. bold/italic/underline) | **ToggleGroup** `type="multiple"` |
|
|
69
|
+
| Form context, list of options | **Checkbox** (each option) |
|
|
70
|
+
| Many options, need search | **Combobox** `multiSelect` |
|
|
20
71
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
72
|
+
### Actions (trigger, not select)
|
|
73
|
+
|
|
74
|
+
| If... | Use |
|
|
75
|
+
|-------|-----|
|
|
76
|
+
| Single action (save, submit, etc.) | **Button** |
|
|
77
|
+
| Related actions side-by-side (Undo/Redo, align) | **ButtonGroup** |
|
|
78
|
+
| On/off state for one thing (bold, mute) | **Toggle** |
|
|
79
|
+
|
|
80
|
+
### Quick decision
|
|
81
|
+
|
|
82
|
+
- **ToggleGroup segmented** → 1 selection only, 2–4 options, primary fill on selected. Example: Linear/Log scale.
|
|
83
|
+
- **ToggleGroup single** → 1 selection, neutral/muted styling.
|
|
84
|
+
- **ToggleGroup multiple** → Multiple selection, e.g. format toolbar.
|
|
85
|
+
- **Select** → 1 selection, many options or no space for inline.
|
|
86
|
+
- **ButtonGroup** → Actions, not selection. Each item does something (click = action).
|
|
87
|
+
|
|
88
|
+
---
|
|
26
89
|
|
|
27
90
|
## Buttons & Actions
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
91
|
+
|
|
92
|
+
| Component | Doc | When to Use |
|
|
93
|
+
|-----------|-----|-------------|
|
|
94
|
+
| Button | [nqui-button.md](./nqui-button.md) | Single action (submit, cancel, icon). Not for selection. |
|
|
95
|
+
| ButtonGroup | [nqui-button-group.md](./nqui-button-group.md) | Related actions side-by-side (toolbar). Each triggers an action. Not for selection. |
|
|
96
|
+
| Toggle | [nqui-toggle.md](./nqui-toggle.md) | One on/off state. E.g. bold in editor. Not a group. |
|
|
97
|
+
| ToggleGroup | [nqui-toggle-group.md](./nqui-toggle-group.md) | **Single** or **multiple** selection. `type="single"` = 1 of N; `type="multiple"` = 0+ of N. Use `variant="segmented"` for primary fill on selected (e.g. view mode, scale type). |
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Forms – When to Use
|
|
102
|
+
|
|
103
|
+
| If... | Use |
|
|
104
|
+
|-------|-----|
|
|
105
|
+
| Free text, single line | **Input** |
|
|
106
|
+
| Free text, multiple lines | **Textarea** |
|
|
107
|
+
| Input with icon/button (search, units) | **InputGroup** |
|
|
108
|
+
| Single choice, 5+ options or no space | **Select** |
|
|
109
|
+
| Single choice, need search | **Combobox** (single) |
|
|
110
|
+
| Single choice, form, small option set | **RadioGroup** |
|
|
111
|
+
| Multiple choice, need search | **Combobox** `multiSelect` |
|
|
112
|
+
| One boolean (agree, subscribe) | **Checkbox** |
|
|
113
|
+
| On/off setting (dark mode, notifications) | **Switch** |
|
|
114
|
+
| Numeric range (volume, opacity) | **Slider** |
|
|
115
|
+
| OTP, verification code | **InputOTP** |
|
|
116
|
+
| Color from swatches | **ColorPicker** |
|
|
117
|
+
| Hue/saturation in color picker | **ColorSlider** |
|
|
118
|
+
| Wrap label + error + input | **Field** |
|
|
119
|
+
|
|
120
|
+
---
|
|
35
121
|
|
|
36
122
|
## Forms
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
123
|
+
|
|
124
|
+
| Component | Doc | When to Use |
|
|
125
|
+
|-----------|-----|-------------|
|
|
126
|
+
| Input | [nqui-input.md](./nqui-input.md) | Single-line text. Email, search, name. |
|
|
127
|
+
| InputGroup | [nqui-input-group.md](./nqui-input-group.md) | Input + addon (icon, button, unit). |
|
|
128
|
+
| Textarea | [nqui-textarea.md](./nqui-textarea.md) | Multi-line text. |
|
|
129
|
+
| Select | [nqui-select.md](./nqui-select.md) | **1 selection** from 5+ options. Dropdown. Use when options don't fit inline or space is tight. |
|
|
130
|
+
| NativeSelect | [nqui-native-select.md](./nqui-native-select.md) | Native `<select>` – simpler, accessible fallback. |
|
|
131
|
+
| Checkbox | [nqui-checkbox.md](./nqui-checkbox.md) | **1 boolean** (agree, subscribe). Or multiple checkboxes for multi-select list. |
|
|
132
|
+
| RadioGroup | [nqui-radio-group.md](./nqui-radio-group.md) | **1 selection** from options in form context. Stacked or inline. |
|
|
133
|
+
| Switch | [nqui-switch.md](./nqui-switch.md) | On/off setting (not formatting). |
|
|
134
|
+
| Slider | [nqui-slider.md](./nqui-slider.md) | Numeric range. |
|
|
135
|
+
| Rating | [nqui-rating.md](./nqui-rating.md) | Star/score (1–5). |
|
|
136
|
+
| InputOTP | [nqui-input-otp.md](./nqui-input-otp.md) | OTP/verification. |
|
|
137
|
+
| Field | [nqui-field.md](./nqui-field.md) | Label + description + error wrapper. |
|
|
138
|
+
| Combobox | [nqui-combobox.md](./nqui-combobox.md) | **Searchable** select. Single or `multiSelect`. Use when user types to filter. |
|
|
139
|
+
| ColorPicker | [nqui-color-picker.md](./nqui-color-picker.md) | Color selection. OKLCH. |
|
|
140
|
+
| ColorSlider | [nqui-color-slider.md](./nqui-color-slider.md) | Hue/saturation (used in ColorPicker). |
|
|
141
|
+
| Label | [nqui-label.md](./nqui-label.md) | Form label. |
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Display – When to Use
|
|
146
|
+
|
|
147
|
+
| If... | Use |
|
|
148
|
+
|-------|-----|
|
|
149
|
+
| Status, count, tag | **Badge** |
|
|
150
|
+
| User/org image | **Avatar** |
|
|
151
|
+
| Inline message (info, warn, error) | **Alert** |
|
|
152
|
+
| Empty list/table | **Empty** |
|
|
153
|
+
| Loading placeholder | **Skeleton** |
|
|
154
|
+
| Loading spinner | **Spinner** |
|
|
155
|
+
| Progress bar | **Progress** |
|
|
156
|
+
| Divider, section split | **Separator** |
|
|
157
|
+
| Content container | **Card** |
|
|
158
|
+
| List row (avatar + title + actions) | **Item** |
|
|
159
|
+
| Show keyboard shortcut | **Kbd** |
|
|
160
|
+
| Activity blocks (e.g. heatmap) | **Tracker** |
|
|
161
|
+
| Glass effect | **FrostedGlass** |
|
|
162
|
+
|
|
163
|
+
---
|
|
55
164
|
|
|
56
165
|
## Display
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
166
|
+
|
|
167
|
+
| Component | Doc | When to Use |
|
|
168
|
+
|-----------|-----|----------|
|
|
169
|
+
| Badge | [nqui-badge.md](./nqui-badge.md) | Status, count, tag. |
|
|
170
|
+
| Avatar | [nqui-avatar.md](./nqui-avatar.md) | User/profile image. |
|
|
171
|
+
| Alert | [nqui-alert.md](./nqui-alert.md) | Inline message (info, warning, error). |
|
|
172
|
+
| Empty | [nqui-empty.md](./nqui-empty.md) | Empty state when no data. |
|
|
173
|
+
| Skeleton | [nqui-skeleton.md](./nqui-skeleton.md) | Loading placeholder. |
|
|
174
|
+
| Spinner | [nqui-spinner.md](./nqui-spinner.md) | Loading indicator. |
|
|
175
|
+
| Progress | [nqui-progress.md](./nqui-progress.md) | Progress bar. |
|
|
176
|
+
| Separator | [nqui-separator.md](./nqui-separator.md) | Divider. `variant` for fade, solid, decorative. |
|
|
177
|
+
| Card | [nqui-card.md](./nqui-card.md) | Content container. |
|
|
178
|
+
| Item | [nqui-item.md](./nqui-item.md) | List row: media + title + description + actions. |
|
|
179
|
+
| Kbd | [nqui-kbd.md](./nqui-kbd.md) | Keyboard shortcut display. |
|
|
180
|
+
| Tracker | [nqui-tracker.md](./nqui-tracker.md) | Activity blocks (heatmap). |
|
|
181
|
+
| FrostedGlass | [nqui-frosted-glass.md](./nqui-frosted-glass.md) | Glass effect. |
|
|
182
|
+
| NquiLogo | [nqui-logo.md](./nqui-logo.md) | Theme-aware logo. |
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Data & Tables – When to Use
|
|
187
|
+
|
|
188
|
+
| If... | Use |
|
|
189
|
+
|-------|-----|
|
|
190
|
+
| Static table, no sort/filter | **Table** |
|
|
191
|
+
| Table with sort, filter, paginate, select | **DataTable** |
|
|
192
|
+
| List of items (avatar + title + actions) | **Item** |
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Data & Tables
|
|
197
|
+
|
|
198
|
+
| Component | Doc | When to Use |
|
|
199
|
+
|-----------|-----|-------------|
|
|
200
|
+
| Table | [nqui-table.md](./nqui-table.md) | Static table. TableHeader, TableBody, TableRow, TableCell. |
|
|
201
|
+
| DataTable | [nqui-data-table.md](./nqui-data-table.md) | Sort, filter, paginate, select, edit. Requires `@tanstack/react-table`. |
|
|
202
|
+
| Item | [nqui-item.md](./nqui-item.md) | List row with media, title, description, actions. |
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Files & Code Display
|
|
207
|
+
|
|
208
|
+
| Component | Doc | Use Case |
|
|
209
|
+
|-----------|-----|----------|
|
|
210
|
+
| CodeBlock | [nqui-code-block.md](./nqui-code-block.md) | From `@nqlib/nqcode`. Syntax-highlighted code, multi-file, copy. Peer: shiki. |
|
|
211
|
+
| Snippet | [nqui-snippet.md](./nqui-snippet.md) | From `@nqlib/nqcode`. Tabbed code, copy. |
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Navigation – When to Use
|
|
216
|
+
|
|
217
|
+
| If... | Use |
|
|
218
|
+
|-------|-----|
|
|
219
|
+
| Breadcrumb path | **Breadcrumb** |
|
|
220
|
+
| Tabbed panels | **Tabs** |
|
|
221
|
+
| Menu from trigger (avatar, ⋮) | **DropdownMenu** |
|
|
222
|
+
| Right-click menu | **ContextMenu** |
|
|
223
|
+
| Horizontal app menu | **Menubar** |
|
|
224
|
+
| Mega nav / complex nav | **NavigationMenu** |
|
|
225
|
+
| Page 1, 2, 3... | **Pagination** |
|
|
226
|
+
| Search + command list | **Command** / **CommandPalette** |
|
|
227
|
+
| Doc section links | **TableOfContents** |
|
|
228
|
+
|
|
229
|
+
---
|
|
73
230
|
|
|
74
231
|
## Navigation & Menus
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
232
|
+
|
|
233
|
+
| Component | Doc | When to Use |
|
|
234
|
+
|-----------|-----|----------|
|
|
235
|
+
| Breadcrumb | [nqui-breadcrumb.md](./nqui-breadcrumb.md) | Path navigation (Home > Products > Item). |
|
|
236
|
+
| Tabs | [nqui-tabs.md](./nqui-tabs.md) | Switch between panels (Settings, Profile). |
|
|
237
|
+
| DropdownMenu | [nqui-dropdown-menu.md](./nqui-dropdown-menu.md) | Menu from trigger click (avatar, ⋮). |
|
|
238
|
+
| ContextMenu | [nqui-context-menu.md](./nqui-context-menu.md) | Right-click menu. |
|
|
239
|
+
| Menubar | [nqui-menubar.md](./nqui-menubar.md) | Horizontal app menu (File, Edit). |
|
|
240
|
+
| NavigationMenu | [nqui-navigation-menu.md](./nqui-navigation-menu.md) | Mega menu with sub-panels. |
|
|
241
|
+
| Pagination | [nqui-pagination.md](./nqui-pagination.md) | Page 1, 2, 3... navigation. |
|
|
242
|
+
| Command | [nqui-command.md](./nqui-command.md) | Searchable command list. |
|
|
243
|
+
| CommandPalette | [nqui-command-palette.md](./nqui-command-palette.md) | Full Cmd+K palette. |
|
|
244
|
+
| TableOfContents | [nqui-table-of-contents.md](./nqui-table-of-contents.md) | Doc section links from headings. |
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Overlays – When to Use
|
|
249
|
+
|
|
250
|
+
| If... | Use |
|
|
251
|
+
|-------|-----|
|
|
252
|
+
| Modal, blocks page, user must respond | **Dialog** |
|
|
253
|
+
| Confirm/cancel (delete, leave) | **AlertDialog** |
|
|
254
|
+
| Panel from side (mobile-first) | **Sheet** |
|
|
255
|
+
| Panel from bottom, mobile | **Drawer** (vaul) |
|
|
256
|
+
| Floating content near trigger (picker, menu) | **Popover** |
|
|
257
|
+
| Hover to show extra info | **Tooltip** (short) or **HoverCard** (rich) |
|
|
258
|
+
| Non-blocking notification | **Toaster** (sonner) |
|
|
259
|
+
|
|
260
|
+
---
|
|
87
261
|
|
|
88
262
|
## Overlays & Dialogs
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
263
|
+
|
|
264
|
+
| Component | Doc | When to Use |
|
|
265
|
+
|-----------|-----|-------------|
|
|
266
|
+
| Dialog | [nqui-dialog.md](./nqui-dialog.md) | Modal. Blocks interaction until dismissed. |
|
|
267
|
+
| AlertDialog | [nqui-alert-dialog.md](./nqui-alert-dialog.md) | Confirm/cancel. Delete, leave page. |
|
|
268
|
+
| Drawer | [nqui-drawer.md](./nqui-drawer.md) | Slide from bottom. Mobile-friendly. |
|
|
269
|
+
| Sheet | [nqui-sheet.md](./nqui-sheet.md) | Panel from side. |
|
|
270
|
+
| Popover | [nqui-popover.md](./nqui-popover.md) | Floating content anchored to trigger. |
|
|
271
|
+
| HoverCard | [nqui-hover-card.md](./nqui-hover-card.md) | Rich preview on hover. |
|
|
272
|
+
| Tooltip | [nqui-tooltip.md](./nqui-tooltip.md) | Short hint on hover. |
|
|
273
|
+
| Toaster | [nqui-toaster.md](./nqui-toaster.md) | Toast notifications. Requires `sonner`. |
|
|
274
|
+
|
|
275
|
+
---
|
|
99
276
|
|
|
100
277
|
## Layout
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
278
|
+
|
|
279
|
+
| Component | Doc | Use Case |
|
|
280
|
+
|-----------|-----|----------|
|
|
281
|
+
| Accordion | [nqui-accordion.md](./nqui-accordion.md) | Collapsible sections. |
|
|
282
|
+
| Collapsible | [nqui-collapsible.md](./nqui-collapsible.md) | Single collapsible. |
|
|
283
|
+
| ScrollArea | [nqui-scroll-area.md](./nqui-scroll-area.md) | Custom scroll with fade mask. |
|
|
284
|
+
| AspectRatio | [nqui-aspect-ratio.md](./nqui-aspect-ratio.md) | Fixed aspect container. |
|
|
285
|
+
| Carousel | [nqui-carousel.md](./nqui-carousel.md) | Image/content carousel. Requires `embla-carousel-react`. |
|
|
286
|
+
| Resizable | [nqui-resizable.md](./nqui-resizable.md) | Resizable panels. Requires `react-resizable-panels`. |
|
|
287
|
+
| Sidebar | [nqui-sidebar.md](./nqui-sidebar.md) | App sidebar. `SidebarProvider` wraps layout. |
|
|
288
|
+
| Sortable | [nqui-sortable.md](./nqui-sortable.md) | Drag-to-reorder. Import from `@nqlib/nqui/sortable`. |
|
|
289
|
+
|
|
290
|
+
---
|
|
111
291
|
|
|
112
292
|
## Advanced
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
293
|
+
|
|
294
|
+
| Component | Doc | Use Case |
|
|
295
|
+
|-----------|-----|----------|
|
|
296
|
+
| Calendar | [nqui-calendar.md](./nqui-calendar.md) | Date picker. Requires `react-day-picker`, `date-fns`. Import from `@nqlib/nqui/calendar`. |
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## AI Implementation Checklist
|
|
301
|
+
|
|
302
|
+
1. **Choose component** – Use "When to Use" tables above. Selection vs action? Single vs multiple? Option count?
|
|
303
|
+
2. **Read doc** – Open `nqui-<name>.md` for import and patterns.
|
|
304
|
+
3. **Size** – Use `sm`/`default`/`lg` per design system. No custom heights.
|
|
305
|
+
4. **Enhanced vs Core** – Prefer default (enhanced); use `Core*` when plain style needed.
|
|
306
|
+
5. **Toolbar/context** – Place Toggle/ToggleGroup in realistic context (document toolbar, chart panel). Reference: `src/pages/ComponentShowcase.tsx`.
|
|
307
|
+
6. **SSR** – Wrap style-injecting components (Checkbox, Rating, Combobox) in client boundary if SSR.
|
|
308
|
+
7. **Z-index** – Use `var(--z-modal)`, `var(--z-popover)`, etc.
|
|
309
|
+
8. **Keyboard** – Use `shouldIgnoreKeyboardShortcut` for global listeners.
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# nqui ButtonGroup
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> **Related actions** side-by-side. Each item triggers an action. Not for selection.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- **Actions** (not selection) – each click does something
|
|
8
|
+
- **Related** – Undo/Redo, align left/center/right (as actions)
|
|
9
|
+
- **Layout:** Inline, shared border
|
|
10
|
+
|
|
11
|
+
**Choose ButtonGroup when:** User triggers actions (Undo, Redo, Copy). Each button performs a command. Not for picking a mode or state.
|
|
12
|
+
|
|
13
|
+
**Use ToggleGroup instead** when user is *selecting* a value (mode, scale, alignment as state). ButtonGroup = actions. ToggleGroup = selection.
|
|
14
|
+
|
|
15
|
+
**Examples:** Undo | Redo, Left | Center | Right (when each applies an action), Export | Print.
|
|
4
16
|
|
|
5
17
|
## Import
|
|
6
18
|
|
|
@@ -14,18 +26,25 @@ import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText } from "@nqlib/nqui"
|
|
|
14
26
|
<ButtonGroup>
|
|
15
27
|
<Button variant="outline">Left</Button>
|
|
16
28
|
<ButtonGroupSeparator />
|
|
29
|
+
<Button variant="outline">Middle</Button>
|
|
30
|
+
<ButtonGroupSeparator />
|
|
17
31
|
<Button variant="outline">Right</Button>
|
|
18
32
|
</ButtonGroup>
|
|
19
33
|
```
|
|
20
34
|
|
|
21
|
-
##
|
|
35
|
+
## With text (non-button)
|
|
22
36
|
|
|
23
37
|
```tsx
|
|
24
38
|
<ButtonGroup>
|
|
25
|
-
<Button variant="outline"><
|
|
39
|
+
<Button variant="outline"><HomeIcon /></Button>
|
|
26
40
|
<ButtonGroupSeparator />
|
|
27
|
-
<ButtonGroupText>
|
|
41
|
+
<ButtonGroupText>Text</ButtonGroupText>
|
|
28
42
|
<ButtonGroupSeparator />
|
|
29
|
-
<Button variant="outline"><
|
|
43
|
+
<Button variant="outline"><SettingsIcon /></Button>
|
|
30
44
|
</ButtonGroup>
|
|
31
45
|
```
|
|
46
|
+
|
|
47
|
+
## Notes
|
|
48
|
+
|
|
49
|
+
- Uses Button children. Shared border, separators with fade.
|
|
50
|
+
- `ButtonGroupText` for non-clickable label between buttons.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# nqui Checkbox
|
|
2
2
|
|
|
3
|
-
> Enhanced checkbox. Variants: square (default), round (
|
|
3
|
+
> Enhanced checkbox. Variants: square (default), round (circular).
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
@@ -30,5 +30,5 @@ import { Checkbox } from "@nqlib/nqui"
|
|
|
30
30
|
## Notes
|
|
31
31
|
|
|
32
32
|
- Injects `<style>` at mount. Use client-only guard for SSR.
|
|
33
|
-
-
|
|
33
|
+
- Square and round share the same animation (pulse + checkmark scale); round has no SVG filters.
|
|
34
34
|
- Use `CoreCheckbox` for plain Radix checkbox.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# nqui CodeBlock
|
|
2
2
|
|
|
3
|
-
> Syntax-highlighted code. Multi-file tabs, copy button.
|
|
3
|
+
> Syntax-highlighted code. Multi-file tabs, copy button. From `@nqlib/nqcode`.
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
import {
|
|
9
9
|
CodeBlock, CodeBlockHeader, CodeBlockFiles, CodeBlockFilename,
|
|
10
10
|
CodeBlockCopyButton, CodeBlockBody, CodeBlockItem, CodeBlockContent
|
|
11
|
-
} from "@nqlib/
|
|
11
|
+
} from "@nqlib/nqcode"
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
+
Requires: `@nqlib/nqui`, `shiki`, `@shikijs/transformers`
|
|
15
|
+
|
|
14
16
|
## Basic
|
|
15
17
|
|
|
16
18
|
```tsx
|
|
@@ -35,5 +37,5 @@ import {
|
|
|
35
37
|
|
|
36
38
|
## Notes
|
|
37
39
|
|
|
38
|
-
- Peer: shiki
|
|
39
|
-
- CodeBlockContentServer
|
|
40
|
+
- Peer: shiki, @shikijs/transformers for syntax highlighting.
|
|
41
|
+
- CodeBlockContentServer (async/RSC): `import { CodeBlockContentServer } from "@nqlib/nqcode/server"`
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# nqui Combobox
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> **Searchable** select. Single or multi-select. Use when user types to filter options.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- **Selection:** Single or multiple
|
|
8
|
+
- **Key feature:** User searches/filters options by typing
|
|
9
|
+
- **Options:** Many (dozens, hundreds)
|
|
10
|
+
|
|
11
|
+
**Choose Combobox when:** Options are too many to scroll, or user knows the name. Type to filter. Use Select when options are few and no search needed.
|
|
4
12
|
|
|
5
13
|
## Import
|
|
6
14
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# nqui DataTable
|
|
2
|
+
|
|
3
|
+
> Full-featured data table: sorting, filtering, pagination, row selection, inline editing.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
DataTable is in `packages/nqui/src/components/table/`. For app usage: `import { DataTable } from "@/components/table"`. Requires `@tanstack/react-table` peer. Not currently exported from main `@nqlib/nqui` entry.
|
|
8
|
+
|
|
9
|
+
## Peer Dependency
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @tanstack/react-table
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Basic
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
const columns: ColumnDef<User>[] = [
|
|
19
|
+
{ accessorKey: "name", header: "Name" },
|
|
20
|
+
{ accessorKey: "email", header: "Email" },
|
|
21
|
+
]
|
|
22
|
+
<DataTable columns={columns} data={users} />
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
| Prop | Default | Use |
|
|
28
|
+
|------|---------|-----|
|
|
29
|
+
| enableSorting | true | Column header sort |
|
|
30
|
+
| enableFiltering | true | Global search |
|
|
31
|
+
| enablePagination | true | Page controls |
|
|
32
|
+
| enableRowSelection | false | Checkboxes |
|
|
33
|
+
| enableEditing | false | Inline edit |
|
|
34
|
+
| pageSize | 10 | Rows per page |
|
|
35
|
+
|
|
36
|
+
## Use Case
|
|
37
|
+
|
|
38
|
+
- Admin panels, dashboards
|
|
39
|
+
- Tabular data with sort/filter/paginate
|
|
40
|
+
- When Table primitives aren't enough
|
|
41
|
+
|
|
42
|
+
## Notes
|
|
43
|
+
|
|
44
|
+
- DataTable lives in `components/table/`; may require path alias.
|
|
45
|
+
- Uses createColumnHelper, createSelectColumn from data-table-helpers.
|
|
46
|
+
- Keyboard: Arrow keys, Enter for navigation.
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
# nqui InputGroup
|
|
2
2
|
|
|
3
|
-
> Input with prefix/suffix. InputGroupText, InputGroupInput
|
|
3
|
+
> Input with prefix/suffix. Use InputGroupAddon + InputGroupText for addons, InputGroupInput for the control.
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
|
-
import { InputGroup, InputGroupText,
|
|
8
|
+
import { InputGroup, InputGroupAddon, InputGroupText, InputGroupInput } from "@nqlib/nqui"
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Basic
|
|
12
12
|
|
|
13
|
+
Wrap addons in `InputGroupAddon` with `align` to control position. Use `InputGroupInput` (not `Input`) so borders and padding align correctly.
|
|
14
|
+
|
|
13
15
|
```tsx
|
|
14
16
|
<InputGroup>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
+
<InputGroupAddon align="inline-start">
|
|
18
|
+
<InputGroupText>@</InputGroupText>
|
|
19
|
+
</InputGroupAddon>
|
|
20
|
+
<InputGroupInput placeholder="Username" />
|
|
17
21
|
</InputGroup>
|
|
18
22
|
<InputGroup>
|
|
19
|
-
<
|
|
20
|
-
<
|
|
23
|
+
<InputGroupInput placeholder="Amount" />
|
|
24
|
+
<InputGroupAddon align="inline-end">
|
|
25
|
+
<InputGroupText>.00</InputGroupText>
|
|
26
|
+
</InputGroupAddon>
|
|
21
27
|
</InputGroup>
|
|
22
28
|
```
|
|
29
|
+
|
|
30
|
+
Padding follows design system (px-3, py-1.5) for balanced addons and inputs.
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# nqui RadioGroup
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> **1 selection** from options. Form context. Stacked or horizontal.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- **Selection:** Single
|
|
8
|
+
- **Context:** Form (settings, preferences)
|
|
9
|
+
- **Layout:** Stacked list or horizontal row
|
|
10
|
+
|
|
11
|
+
**Choose RadioGroup when:** Form with single-choice question. Traditional form UX. **Do not use RadioGroup for toolbars or inline UI** — use ToggleGroup instead. Use Select for 5+ options or tight space.
|
|
4
12
|
|
|
5
13
|
## Import
|
|
6
14
|
|