@nyxwire/vue 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +148 -2
- package/dist/components/actions/alert/NwAlert.vue.d.ts +37 -0
- package/dist/components/actions/alert/NwAlertDescription.vue.d.ts +17 -0
- package/dist/components/actions/alert/NwAlertTitle.vue.d.ts +17 -0
- package/dist/components/actions/alert/index.d.ts +6 -0
- package/dist/components/actions/aspect-ratio/NwAspectRatio.vue.d.ts +17 -0
- package/dist/components/actions/aspect-ratio/index.d.ts +2 -0
- package/dist/components/actions/avatar/NwAvatar.vue.d.ts +29 -0
- package/dist/components/actions/avatar/NwAvatarFallback.vue.d.ts +15 -0
- package/dist/components/actions/avatar/NwAvatarGroup.vue.d.ts +14 -0
- package/dist/components/actions/avatar/NwAvatarImage.vue.d.ts +11 -0
- package/dist/components/actions/avatar/context.d.ts +3 -0
- package/dist/components/actions/avatar/index.d.ts +9 -0
- package/dist/components/actions/badge/NwBadge.vue.d.ts +23 -0
- package/dist/components/actions/badge/index.d.ts +2 -0
- package/dist/components/actions/button/NwButton.vue.d.ts +29 -0
- package/dist/components/actions/button/NwButtonGroup.vue.d.ts +19 -0
- package/dist/components/actions/button/index.d.ts +4 -0
- package/dist/components/actions/card/NwCard.vue.d.ts +25 -0
- package/dist/components/actions/card/NwCardContent.vue.d.ts +17 -0
- package/dist/components/actions/card/NwCardDescription.vue.d.ts +17 -0
- package/dist/components/actions/card/NwCardFooter.vue.d.ts +17 -0
- package/dist/components/actions/card/NwCardHeader.vue.d.ts +17 -0
- package/dist/components/actions/card/NwCardTitle.vue.d.ts +17 -0
- package/dist/components/actions/card/index.d.ts +12 -0
- package/dist/components/actions/chip/NwChip.vue.d.ts +24 -0
- package/dist/components/actions/chip/index.d.ts +1 -0
- package/dist/components/actions/code/NwCode.vue.d.ts +20 -0
- package/dist/components/actions/code/index.d.ts +1 -0
- package/dist/components/actions/data-table/NwDataTable.vue.d.ts +37 -0
- package/dist/components/actions/data-table/index.d.ts +1 -0
- package/dist/components/actions/empty/NwEmpty.vue.d.ts +19 -0
- package/dist/components/actions/empty/index.d.ts +1 -0
- package/dist/components/actions/hud-panel/NwHudPanel.vue.d.ts +45 -0
- package/dist/components/actions/hud-panel/index.d.ts +2 -0
- package/dist/components/actions/icon-button/NwIconButton.vue.d.ts +21 -0
- package/dist/components/actions/icon-button/index.d.ts +1 -0
- package/dist/components/actions/index.d.ts +28 -0
- package/dist/components/actions/kbd/NwKbd.vue.d.ts +18 -0
- package/dist/components/actions/kbd/NwKeyHint.vue.d.ts +22 -0
- package/dist/components/actions/kbd/index.d.ts +5 -0
- package/dist/components/actions/layout/NwLayout.vue.d.ts +18 -0
- package/dist/components/actions/layout/index.d.ts +1 -0
- package/dist/components/actions/link/NwLink.vue.d.ts +27 -0
- package/dist/components/actions/link/index.d.ts +3 -0
- package/dist/components/actions/list/NwList.vue.d.ts +19 -0
- package/dist/components/actions/list/index.d.ts +1 -0
- package/dist/components/actions/meter/NwMeter.vue.d.ts +15 -0
- package/dist/components/actions/meter/index.d.ts +1 -0
- package/dist/components/actions/neon-text/NwNeonText.vue.d.ts +26 -0
- package/dist/components/actions/neon-text/index.d.ts +3 -0
- package/dist/components/actions/progress/NwProgress.vue.d.ts +21 -0
- package/dist/components/actions/progress/index.d.ts +2 -0
- package/dist/components/actions/rating/NwRating.vue.d.ts +21 -0
- package/dist/components/actions/rating/index.d.ts +2 -0
- package/dist/components/actions/separator/NwSeparator.vue.d.ts +12 -0
- package/dist/components/actions/separator/index.d.ts +2 -0
- package/dist/components/actions/skeleton/NwSkeleton.vue.d.ts +21 -0
- package/dist/components/actions/skeleton/index.d.ts +3 -0
- package/dist/components/actions/spinner/NwSpinner.vue.d.ts +17 -0
- package/dist/components/actions/spinner/index.d.ts +3 -0
- package/dist/components/actions/stat/NwStat.vue.d.ts +8 -0
- package/dist/components/actions/stat/index.d.ts +1 -0
- package/dist/components/actions/stat-bar/NwStatBar.vue.d.ts +35 -0
- package/dist/components/actions/stat-bar/index.d.ts +2 -0
- package/dist/components/actions/table/NwTable.vue.d.ts +24 -0
- package/dist/components/actions/table/NwTableBody.vue.d.ts +17 -0
- package/dist/components/actions/table/NwTableCaption.vue.d.ts +17 -0
- package/dist/components/actions/table/NwTableCell.vue.d.ts +17 -0
- package/dist/components/actions/table/NwTableFooter.vue.d.ts +17 -0
- package/dist/components/actions/table/NwTableHead.vue.d.ts +21 -0
- package/dist/components/actions/table/NwTableHeader.vue.d.ts +17 -0
- package/dist/components/actions/table/NwTableRow.vue.d.ts +19 -0
- package/dist/components/actions/table/context.d.ts +4 -0
- package/dist/components/actions/table/index.d.ts +16 -0
- package/dist/components/actions/toggle/NwToggle.vue.d.ts +22 -0
- package/dist/components/actions/toggle/NwToggleGroup.vue.d.ts +23 -0
- package/dist/components/actions/toggle/NwToggleGroupItem.vue.d.ts +18 -0
- package/dist/components/actions/toggle/context.d.ts +7 -0
- package/dist/components/actions/toggle/index.d.ts +7 -0
- package/dist/components/actions/toolbar/NwToolbar.vue.d.ts +15 -0
- package/dist/components/actions/toolbar/NwToolbarButton.vue.d.ts +22 -0
- package/dist/components/actions/toolbar/NwToolbarLink.vue.d.ts +15 -0
- package/dist/components/actions/toolbar/NwToolbarSeparator.vue.d.ts +8 -0
- package/dist/components/actions/toolbar/NwToolbarToggleGroup.vue.d.ts +25 -0
- package/dist/components/actions/toolbar/NwToolbarToggleItem.vue.d.ts +18 -0
- package/dist/components/actions/toolbar/index.d.ts +12 -0
- package/dist/components/color/color-area/NwColorArea.vue.d.ts +30 -0
- package/dist/components/color/color-area/NwColorAreaThumb.vue.d.ts +20 -0
- package/dist/components/color/color-area/index.d.ts +4 -0
- package/dist/components/color/color-field/NwColorField.vue.d.ts +20 -0
- package/dist/components/color/color-field/index.d.ts +2 -0
- package/dist/components/color/color-picker/NwColorPicker.vue.d.ts +46 -0
- package/dist/components/color/color-picker/index.d.ts +2 -0
- package/dist/components/color/color-slider/NwColorSlider.vue.d.ts +19 -0
- package/dist/components/color/color-slider/NwColorSliderTrack.vue.d.ts +21 -0
- package/dist/components/color/color-slider/index.d.ts +4 -0
- package/dist/components/color/color-swatch/NwColorSwatch.vue.d.ts +23 -0
- package/dist/components/color/color-swatch/index.d.ts +2 -0
- package/dist/components/color/color-swatch-picker/NwColorSwatchPicker.vue.d.ts +38 -0
- package/dist/components/color/color-swatch-picker/NwColorSwatchPickerItem.vue.d.ts +29 -0
- package/dist/components/color/color-swatch-picker/index.d.ts +4 -0
- package/dist/components/color/index.d.ts +6 -0
- package/dist/components/datetime/calendar/NwCalendar.vue.d.ts +36 -0
- package/dist/components/datetime/calendar/NwCalendarCell.vue.d.ts +20 -0
- package/dist/components/datetime/calendar/index.d.ts +3 -0
- package/dist/components/datetime/calendar/parts.d.ts +14 -0
- package/dist/components/datetime/date-field/NwDateField.vue.d.ts +36 -0
- package/dist/components/datetime/date-field/index.d.ts +3 -0
- package/dist/components/datetime/date-field/parts.d.ts +19 -0
- package/dist/components/datetime/date-picker/NwDatePicker.vue.d.ts +36 -0
- package/dist/components/datetime/date-picker/index.d.ts +3 -0
- package/dist/components/datetime/date-picker/parts.d.ts +21 -0
- package/dist/components/datetime/date-range-field/NwDateRangeField.vue.d.ts +42 -0
- package/dist/components/datetime/date-range-field/index.d.ts +3 -0
- package/dist/components/datetime/date-range-field/parts.d.ts +19 -0
- package/dist/components/datetime/date-range-picker/NwDateRangePicker.vue.d.ts +41 -0
- package/dist/components/datetime/date-range-picker/index.d.ts +3 -0
- package/dist/components/datetime/date-range-picker/parts.d.ts +21 -0
- package/dist/components/datetime/index.d.ts +12 -0
- package/dist/components/datetime/month-cell-trigger.d.ts +13 -0
- package/dist/components/datetime/month-picker/NwMonthPicker.vue.d.ts +31 -0
- package/dist/components/datetime/month-picker/index.d.ts +3 -0
- package/dist/components/datetime/month-picker/parts.d.ts +12 -0
- package/dist/components/datetime/month-range-picker/NwMonthRangePicker.vue.d.ts +33 -0
- package/dist/components/datetime/month-range-picker/index.d.ts +3 -0
- package/dist/components/datetime/month-range-picker/parts.d.ts +12 -0
- package/dist/components/datetime/range-calendar/NwRangeCalendar.vue.d.ts +40 -0
- package/dist/components/datetime/range-calendar/NwRangeCalendarCell.vue.d.ts +20 -0
- package/dist/components/datetime/range-calendar/index.d.ts +3 -0
- package/dist/components/datetime/range-calendar/parts.d.ts +14 -0
- package/dist/components/datetime/styled.d.ts +12 -0
- package/dist/components/datetime/time-field/NwTimeField.vue.d.ts +36 -0
- package/dist/components/datetime/time-field/index.d.ts +3 -0
- package/dist/components/datetime/time-field/parts.d.ts +19 -0
- package/dist/components/datetime/time-range-field/NwTimeRangeField.vue.d.ts +42 -0
- package/dist/components/datetime/time-range-field/index.d.ts +3 -0
- package/dist/components/datetime/time-range-field/parts.d.ts +19 -0
- package/dist/components/datetime/year-picker/NwYearPicker.vue.d.ts +31 -0
- package/dist/components/datetime/year-picker/index.d.ts +3 -0
- package/dist/components/datetime/year-picker/parts.d.ts +12 -0
- package/dist/components/datetime/year-range-picker/NwYearRangePicker.vue.d.ts +33 -0
- package/dist/components/datetime/year-range-picker/index.d.ts +3 -0
- package/dist/components/datetime/year-range-picker/parts.d.ts +12 -0
- package/dist/components/forms/checkbox/NwCheckbox.vue.d.ts +28 -0
- package/dist/components/forms/checkbox/NwCheckboxGroup.vue.d.ts +19 -0
- package/dist/components/forms/checkbox/index.d.ts +4 -0
- package/dist/components/forms/choice-label/ChoiceLabel.vue.d.ts +22 -0
- package/dist/components/forms/editable/NwEditable.vue.d.ts +30 -0
- package/dist/components/forms/editable/NwEditableArea.vue.d.ts +15 -0
- package/dist/components/forms/editable/NwEditableCancelTrigger.vue.d.ts +19 -0
- package/dist/components/forms/editable/NwEditableEditTrigger.vue.d.ts +19 -0
- package/dist/components/forms/editable/NwEditableInput.vue.d.ts +21 -0
- package/dist/components/forms/editable/NwEditablePreview.vue.d.ts +15 -0
- package/dist/components/forms/editable/NwEditableSubmitTrigger.vue.d.ts +19 -0
- package/dist/components/forms/editable/index.d.ts +14 -0
- package/dist/components/forms/field/FieldScope.vue.d.ts +15 -0
- package/dist/components/forms/field/NwField.vue.d.ts +30 -0
- package/dist/components/forms/field/NwFieldDescription.vue.d.ts +15 -0
- package/dist/components/forms/field/NwFieldError.vue.d.ts +17 -0
- package/dist/components/forms/field/NwFieldLabel.vue.d.ts +15 -0
- package/dist/components/forms/field/index.d.ts +10 -0
- package/dist/components/forms/field/useNwFieldControl.d.ts +21 -0
- package/dist/components/forms/form/NwForm.vue.d.ts +23 -0
- package/dist/components/forms/form/index.d.ts +2 -0
- package/dist/components/forms/index.d.ts +15 -0
- package/dist/components/forms/input/NwInput.vue.d.ts +28 -0
- package/dist/components/forms/input/index.d.ts +2 -0
- package/dist/components/forms/input-group/NwInputGroup.vue.d.ts +21 -0
- package/dist/components/forms/input-group/NwInputGroupAddon.vue.d.ts +17 -0
- package/dist/components/forms/input-group/index.d.ts +4 -0
- package/dist/components/forms/label/NwLabel.vue.d.ts +15 -0
- package/dist/components/forms/label/index.d.ts +2 -0
- package/dist/components/forms/number-field/NwNumberField.vue.d.ts +30 -0
- package/dist/components/forms/number-field/NwNumberFieldDecrement.vue.d.ts +19 -0
- package/dist/components/forms/number-field/NwNumberFieldIncrement.vue.d.ts +19 -0
- package/dist/components/forms/number-field/NwNumberFieldInput.vue.d.ts +17 -0
- package/dist/components/forms/number-field/context.d.ts +4 -0
- package/dist/components/forms/number-field/index.d.ts +8 -0
- package/dist/components/forms/pin-input/NwPinInput.vue.d.ts +30 -0
- package/dist/components/forms/pin-input/NwPinInputInput.vue.d.ts +17 -0
- package/dist/components/forms/pin-input/index.d.ts +4 -0
- package/dist/components/forms/radio-group/NwRadioGroup.vue.d.ts +26 -0
- package/dist/components/forms/radio-group/NwRadioGroupItem.vue.d.ts +25 -0
- package/dist/components/forms/radio-group/index.d.ts +4 -0
- package/dist/components/forms/slider/NwSlider.vue.d.ts +29 -0
- package/dist/components/forms/slider/index.d.ts +2 -0
- package/dist/components/forms/switch/NwSwitch.vue.d.ts +18 -0
- package/dist/components/forms/switch/index.d.ts +2 -0
- package/dist/components/forms/tag-group/NwTagGroup.vue.d.ts +23 -0
- package/dist/components/forms/tag-group/NwTagGroupItem.vue.d.ts +18 -0
- package/dist/components/forms/tag-group/NwTagGroupItemDelete.vue.d.ts +19 -0
- package/dist/components/forms/tag-group/NwTagGroupItemText.vue.d.ts +15 -0
- package/dist/components/forms/tag-group/index.d.ts +8 -0
- package/dist/components/forms/tags-input/NwTagsInput.vue.d.ts +34 -0
- package/dist/components/forms/tags-input/NwTagsInputClear.vue.d.ts +19 -0
- package/dist/components/forms/tags-input/NwTagsInputInput.vue.d.ts +15 -0
- package/dist/components/forms/tags-input/NwTagsInputItem.vue.d.ts +15 -0
- package/dist/components/forms/tags-input/NwTagsInputItemDelete.vue.d.ts +19 -0
- package/dist/components/forms/tags-input/NwTagsInputItemText.vue.d.ts +15 -0
- package/dist/components/forms/tags-input/index.d.ts +12 -0
- package/dist/components/forms/textarea/NwTextarea.vue.d.ts +18 -0
- package/dist/components/forms/textarea/index.d.ts +2 -0
- package/dist/components/navigation/accordion/NwAccordion.vue.d.ts +37 -0
- package/dist/components/navigation/accordion/NwAccordionContent.vue.d.ts +22 -0
- package/dist/components/navigation/accordion/NwAccordionItem.vue.d.ts +22 -0
- package/dist/components/navigation/accordion/NwAccordionTrigger.vue.d.ts +20 -0
- package/dist/components/navigation/accordion/index.d.ts +5 -0
- package/dist/components/navigation/breadcrumb/NwBreadcrumb.vue.d.ts +30 -0
- package/dist/components/navigation/breadcrumb/NwBreadcrumbEllipsis.vue.d.ts +24 -0
- package/dist/components/navigation/breadcrumb/NwBreadcrumbItem.vue.d.ts +22 -0
- package/dist/components/navigation/breadcrumb/NwBreadcrumbLink.vue.d.ts +23 -0
- package/dist/components/navigation/breadcrumb/NwBreadcrumbList.vue.d.ts +22 -0
- package/dist/components/navigation/breadcrumb/NwBreadcrumbPage.vue.d.ts +22 -0
- package/dist/components/navigation/breadcrumb/NwBreadcrumbSeparator.vue.d.ts +22 -0
- package/dist/components/navigation/breadcrumb/index.d.ts +7 -0
- package/dist/components/navigation/collapsible/NwCollapsible.vue.d.ts +26 -0
- package/dist/components/navigation/collapsible/NwCollapsibleContent.vue.d.ts +24 -0
- package/dist/components/navigation/collapsible/NwCollapsibleTrigger.vue.d.ts +20 -0
- package/dist/components/navigation/collapsible/index.d.ts +3 -0
- package/dist/components/navigation/index.d.ts +13 -0
- package/dist/components/navigation/navbar/NwNavbar.vue.d.ts +26 -0
- package/dist/components/navigation/navbar/NwNavbarActions.vue.d.ts +22 -0
- package/dist/components/navigation/navbar/NwNavbarBrand.vue.d.ts +23 -0
- package/dist/components/navigation/navbar/NwNavbarLink.vue.d.ts +25 -0
- package/dist/components/navigation/navbar/index.d.ts +4 -0
- package/dist/components/navigation/navigation-menu/NwNavigationMenu.vue.d.ts +26 -0
- package/dist/components/navigation/navigation-menu/NwNavigationMenuContent.vue.d.ts +30 -0
- package/dist/components/navigation/navigation-menu/NwNavigationMenuIndicator.vue.d.ts +20 -0
- package/dist/components/navigation/navigation-menu/NwNavigationMenuItem.vue.d.ts +20 -0
- package/dist/components/navigation/navigation-menu/NwNavigationMenuLink.vue.d.ts +29 -0
- package/dist/components/navigation/navigation-menu/NwNavigationMenuList.vue.d.ts +20 -0
- package/dist/components/navigation/navigation-menu/NwNavigationMenuSub.vue.d.ts +26 -0
- package/dist/components/navigation/navigation-menu/NwNavigationMenuTrigger.vue.d.ts +20 -0
- package/dist/components/navigation/navigation-menu/NwNavigationMenuViewport.vue.d.ts +20 -0
- package/dist/components/navigation/navigation-menu/index.d.ts +9 -0
- package/dist/components/navigation/pagination/NwPagination.vue.d.ts +38 -0
- package/dist/components/navigation/pagination/NwPaginationEllipsis.vue.d.ts +20 -0
- package/dist/components/navigation/pagination/NwPaginationFirst.vue.d.ts +23 -0
- package/dist/components/navigation/pagination/NwPaginationLast.vue.d.ts +23 -0
- package/dist/components/navigation/pagination/NwPaginationList.vue.d.ts +27 -0
- package/dist/components/navigation/pagination/NwPaginationListItem.vue.d.ts +20 -0
- package/dist/components/navigation/pagination/NwPaginationNext.vue.d.ts +23 -0
- package/dist/components/navigation/pagination/NwPaginationPrev.vue.d.ts +23 -0
- package/dist/components/navigation/pagination/index.d.ts +8 -0
- package/dist/components/navigation/scroll-area/NwScrollArea.vue.d.ts +20 -0
- package/dist/components/navigation/scroll-area/NwScrollAreaCorner.vue.d.ts +20 -0
- package/dist/components/navigation/scroll-area/NwScrollAreaScrollbar.vue.d.ts +20 -0
- package/dist/components/navigation/scroll-area/NwScrollAreaThumb.vue.d.ts +20 -0
- package/dist/components/navigation/scroll-area/NwScrollAreaViewport.vue.d.ts +20 -0
- package/dist/components/navigation/scroll-area/index.d.ts +5 -0
- package/dist/components/navigation/sidenav/NwSidenav.vue.d.ts +27 -0
- package/dist/components/navigation/sidenav/NwSidenavGroup.vue.d.ts +21 -0
- package/dist/components/navigation/sidenav/NwSidenavItem.vue.d.ts +22 -0
- package/dist/components/navigation/sidenav/NwSidenavLink.vue.d.ts +25 -0
- package/dist/components/navigation/sidenav/NwSidenavList.vue.d.ts +22 -0
- package/dist/components/navigation/sidenav/index.d.ts +5 -0
- package/dist/components/navigation/splitter/NwSplitterGroup.vue.d.ts +26 -0
- package/dist/components/navigation/splitter/NwSplitterPanel.vue.d.ts +34 -0
- package/dist/components/navigation/splitter/NwSplitterResizeHandle.vue.d.ts +27 -0
- package/dist/components/navigation/splitter/index.d.ts +3 -0
- package/dist/components/navigation/stepper/NwStepper.vue.d.ts +47 -0
- package/dist/components/navigation/stepper/NwStepperDescription.vue.d.ts +20 -0
- package/dist/components/navigation/stepper/NwStepperIndicator.vue.d.ts +26 -0
- package/dist/components/navigation/stepper/NwStepperItem.vue.d.ts +22 -0
- package/dist/components/navigation/stepper/NwStepperSeparator.vue.d.ts +20 -0
- package/dist/components/navigation/stepper/NwStepperTitle.vue.d.ts +20 -0
- package/dist/components/navigation/stepper/NwStepperTrigger.vue.d.ts +20 -0
- package/dist/components/navigation/stepper/index.d.ts +7 -0
- package/dist/components/navigation/tabs/NwTabs.vue.d.ts +46 -0
- package/dist/components/navigation/tabs/NwTabsContent.vue.d.ts +20 -0
- package/dist/components/navigation/tabs/NwTabsIndicator.vue.d.ts +20 -0
- package/dist/components/navigation/tabs/NwTabsList.vue.d.ts +20 -0
- package/dist/components/navigation/tabs/NwTabsTrigger.vue.d.ts +20 -0
- package/dist/components/navigation/tabs/index.d.ts +6 -0
- package/dist/components/navigation/tree/NwTree.vue.d.ts +32 -0
- package/dist/components/navigation/tree/NwTreeItem.vue.d.ts +36 -0
- package/dist/components/navigation/tree/index.d.ts +2 -0
- package/dist/components/overlays/alert-dialog/NwAlertDialog.vue.d.ts +24 -0
- package/dist/components/overlays/alert-dialog/NwAlertDialogAction.vue.d.ts +24 -0
- package/dist/components/overlays/alert-dialog/NwAlertDialogCancel.vue.d.ts +21 -0
- package/dist/components/overlays/alert-dialog/NwAlertDialogContent.vue.d.ts +39 -0
- package/dist/components/overlays/alert-dialog/NwAlertDialogDescription.vue.d.ts +20 -0
- package/dist/components/overlays/alert-dialog/NwAlertDialogFooter.vue.d.ts +23 -0
- package/dist/components/overlays/alert-dialog/NwAlertDialogHeader.vue.d.ts +22 -0
- package/dist/components/overlays/alert-dialog/NwAlertDialogTitle.vue.d.ts +20 -0
- package/dist/components/overlays/alert-dialog/NwAlertDialogTrigger.vue.d.ts +18 -0
- package/dist/components/overlays/alert-dialog/index.d.ts +10 -0
- package/dist/components/overlays/command-palette/NwCommandPalette.vue.d.ts +49 -0
- package/dist/components/overlays/command-palette/index.d.ts +1 -0
- package/dist/components/overlays/context-menu/NwContextMenu.vue.d.ts +24 -0
- package/dist/components/overlays/context-menu/NwContextMenuCheckboxItem.vue.d.ts +30 -0
- package/dist/components/overlays/context-menu/NwContextMenuContent.vue.d.ts +38 -0
- package/dist/components/overlays/context-menu/NwContextMenuGroup.vue.d.ts +20 -0
- package/dist/components/overlays/context-menu/NwContextMenuItem.vue.d.ts +31 -0
- package/dist/components/overlays/context-menu/NwContextMenuLabel.vue.d.ts +25 -0
- package/dist/components/overlays/context-menu/NwContextMenuRadioGroup.vue.d.ts +22 -0
- package/dist/components/overlays/context-menu/NwContextMenuRadioItem.vue.d.ts +27 -0
- package/dist/components/overlays/context-menu/NwContextMenuSeparator.vue.d.ts +8 -0
- package/dist/components/overlays/context-menu/NwContextMenuSub.vue.d.ts +24 -0
- package/dist/components/overlays/context-menu/NwContextMenuSubContent.vue.d.ts +43 -0
- package/dist/components/overlays/context-menu/NwContextMenuSubTrigger.vue.d.ts +25 -0
- package/dist/components/overlays/context-menu/NwContextMenuTrigger.vue.d.ts +18 -0
- package/dist/components/overlays/context-menu/index.d.ts +14 -0
- package/dist/components/overlays/dialog/NwDialog.vue.d.ts +24 -0
- package/dist/components/overlays/dialog/NwDialogBody.vue.d.ts +23 -0
- package/dist/components/overlays/dialog/NwDialogClose.vue.d.ts +18 -0
- package/dist/components/overlays/dialog/NwDialogContent.vue.d.ts +44 -0
- package/dist/components/overlays/dialog/NwDialogDescription.vue.d.ts +20 -0
- package/dist/components/overlays/dialog/NwDialogFooter.vue.d.ts +23 -0
- package/dist/components/overlays/dialog/NwDialogHeader.vue.d.ts +22 -0
- package/dist/components/overlays/dialog/NwDialogTitle.vue.d.ts +20 -0
- package/dist/components/overlays/dialog/NwDialogTrigger.vue.d.ts +18 -0
- package/dist/components/overlays/dialog/index.d.ts +10 -0
- package/dist/components/overlays/drawer/NwDrawer.vue.d.ts +29 -0
- package/dist/components/overlays/drawer/NwDrawerClose.vue.d.ts +18 -0
- package/dist/components/overlays/drawer/NwDrawerContent.vue.d.ts +44 -0
- package/dist/components/overlays/drawer/NwDrawerDescription.vue.d.ts +20 -0
- package/dist/components/overlays/drawer/NwDrawerHandle.vue.d.ts +21 -0
- package/dist/components/overlays/drawer/NwDrawerHeader.vue.d.ts +22 -0
- package/dist/components/overlays/drawer/NwDrawerTitle.vue.d.ts +20 -0
- package/dist/components/overlays/drawer/NwDrawerTrigger.vue.d.ts +18 -0
- package/dist/components/overlays/drawer/index.d.ts +10 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenu.vue.d.ts +26 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenuCheckboxItem.vue.d.ts +30 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenuContent.vue.d.ts +40 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenuGroup.vue.d.ts +20 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenuItem.vue.d.ts +31 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenuLabel.vue.d.ts +25 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenuRadioGroup.vue.d.ts +22 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenuRadioItem.vue.d.ts +27 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenuSeparator.vue.d.ts +8 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenuShortcut.vue.d.ts +20 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenuSub.vue.d.ts +24 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenuSubContent.vue.d.ts +43 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenuSubTrigger.vue.d.ts +25 -0
- package/dist/components/overlays/dropdown-menu/NwDropdownMenuTrigger.vue.d.ts +18 -0
- package/dist/components/overlays/dropdown-menu/index.d.ts +15 -0
- package/dist/components/overlays/hover-card/NwHoverCard.vue.d.ts +23 -0
- package/dist/components/overlays/hover-card/NwHoverCardContent.vue.d.ts +30 -0
- package/dist/components/overlays/hover-card/NwHoverCardTrigger.vue.d.ts +18 -0
- package/dist/components/overlays/hover-card/index.d.ts +4 -0
- package/dist/components/overlays/index.d.ts +12 -0
- package/dist/components/overlays/menubar/NwMenubar.vue.d.ts +27 -0
- package/dist/components/overlays/menubar/NwMenubarCheckboxItem.vue.d.ts +30 -0
- package/dist/components/overlays/menubar/NwMenubarContent.vue.d.ts +41 -0
- package/dist/components/overlays/menubar/NwMenubarGroup.vue.d.ts +20 -0
- package/dist/components/overlays/menubar/NwMenubarItem.vue.d.ts +31 -0
- package/dist/components/overlays/menubar/NwMenubarLabel.vue.d.ts +25 -0
- package/dist/components/overlays/menubar/NwMenubarMenu.vue.d.ts +18 -0
- package/dist/components/overlays/menubar/NwMenubarRadioGroup.vue.d.ts +22 -0
- package/dist/components/overlays/menubar/NwMenubarRadioItem.vue.d.ts +27 -0
- package/dist/components/overlays/menubar/NwMenubarSeparator.vue.d.ts +8 -0
- package/dist/components/overlays/menubar/NwMenubarSub.vue.d.ts +24 -0
- package/dist/components/overlays/menubar/NwMenubarSubContent.vue.d.ts +43 -0
- package/dist/components/overlays/menubar/NwMenubarSubTrigger.vue.d.ts +25 -0
- package/dist/components/overlays/menubar/NwMenubarTrigger.vue.d.ts +20 -0
- package/dist/components/overlays/menubar/index.d.ts +15 -0
- package/dist/components/overlays/popover/NwPopover.vue.d.ts +24 -0
- package/dist/components/overlays/popover/NwPopoverAnchor.vue.d.ts +18 -0
- package/dist/components/overlays/popover/NwPopoverClose.vue.d.ts +18 -0
- package/dist/components/overlays/popover/NwPopoverContent.vue.d.ts +52 -0
- package/dist/components/overlays/popover/NwPopoverTrigger.vue.d.ts +18 -0
- package/dist/components/overlays/popover/index.d.ts +6 -0
- package/dist/components/overlays/sheet/NwSheetContent.vue.d.ts +45 -0
- package/dist/components/overlays/sheet/index.d.ts +10 -0
- package/dist/components/overlays/toast/NwToast.vue.d.ts +107 -0
- package/dist/components/overlays/toast/NwToastAction.vue.d.ts +21 -0
- package/dist/components/overlays/toast/NwToastClose.vue.d.ts +24 -0
- package/dist/components/overlays/toast/NwToastDescription.vue.d.ts +20 -0
- package/dist/components/overlays/toast/NwToastTitle.vue.d.ts +20 -0
- package/dist/components/overlays/toast/NwToaster.vue.d.ts +21 -0
- package/dist/components/overlays/toast/index.d.ts +8 -0
- package/dist/components/overlays/toast/useToast.d.ts +45 -0
- package/dist/components/overlays/tooltip/NwTooltip.vue.d.ts +24 -0
- package/dist/components/overlays/tooltip/NwTooltipContent.vue.d.ts +33 -0
- package/dist/components/overlays/tooltip/NwTooltipTrigger.vue.d.ts +18 -0
- package/dist/components/overlays/tooltip/index.d.ts +3 -0
- package/dist/components/selection/autocomplete/NwAutocomplete.vue.d.ts +37 -0
- package/dist/components/selection/autocomplete/NwAutocompleteAnchor.vue.d.ts +20 -0
- package/dist/components/selection/autocomplete/NwAutocompleteCancel.vue.d.ts +23 -0
- package/dist/components/selection/autocomplete/NwAutocompleteContent.vue.d.ts +35 -0
- package/dist/components/selection/autocomplete/NwAutocompleteEmpty.vue.d.ts +20 -0
- package/dist/components/selection/autocomplete/NwAutocompleteGroup.vue.d.ts +20 -0
- package/dist/components/selection/autocomplete/NwAutocompleteInput.vue.d.ts +27 -0
- package/dist/components/selection/autocomplete/NwAutocompleteItem.vue.d.ts +26 -0
- package/dist/components/selection/autocomplete/NwAutocompleteLabel.vue.d.ts +20 -0
- package/dist/components/selection/autocomplete/NwAutocompleteSeparator.vue.d.ts +8 -0
- package/dist/components/selection/autocomplete/NwAutocompleteTrigger.vue.d.ts +23 -0
- package/dist/components/selection/autocomplete/index.d.ts +11 -0
- package/dist/components/selection/combobox/NwCombobox.vue.d.ts +37 -0
- package/dist/components/selection/combobox/NwComboboxAnchor.vue.d.ts +20 -0
- package/dist/components/selection/combobox/NwComboboxCancel.vue.d.ts +23 -0
- package/dist/components/selection/combobox/NwComboboxContent.vue.d.ts +35 -0
- package/dist/components/selection/combobox/NwComboboxEmpty.vue.d.ts +20 -0
- package/dist/components/selection/combobox/NwComboboxGroup.vue.d.ts +20 -0
- package/dist/components/selection/combobox/NwComboboxInput.vue.d.ts +27 -0
- package/dist/components/selection/combobox/NwComboboxItem.vue.d.ts +26 -0
- package/dist/components/selection/combobox/NwComboboxLabel.vue.d.ts +20 -0
- package/dist/components/selection/combobox/NwComboboxSeparator.vue.d.ts +8 -0
- package/dist/components/selection/combobox/NwComboboxTrigger.vue.d.ts +23 -0
- package/dist/components/selection/combobox/index.d.ts +11 -0
- package/dist/components/selection/index.d.ts +4 -0
- package/dist/components/selection/listbox/NwListbox.vue.d.ts +38 -0
- package/dist/components/selection/listbox/NwListboxContent.vue.d.ts +20 -0
- package/dist/components/selection/listbox/NwListboxFilter.vue.d.ts +27 -0
- package/dist/components/selection/listbox/NwListboxGroup.vue.d.ts +20 -0
- package/dist/components/selection/listbox/NwListboxGroupLabel.vue.d.ts +20 -0
- package/dist/components/selection/listbox/NwListboxItem.vue.d.ts +26 -0
- package/dist/components/selection/listbox/index.d.ts +6 -0
- package/dist/components/selection/select/NwSelect.vue.d.ts +29 -0
- package/dist/components/selection/select/NwSelectContent.vue.d.ts +32 -0
- package/dist/components/selection/select/NwSelectGroup.vue.d.ts +20 -0
- package/dist/components/selection/select/NwSelectItem.vue.d.ts +24 -0
- package/dist/components/selection/select/NwSelectLabel.vue.d.ts +20 -0
- package/dist/components/selection/select/NwSelectScrollDownButton.vue.d.ts +20 -0
- package/dist/components/selection/select/NwSelectScrollUpButton.vue.d.ts +20 -0
- package/dist/components/selection/select/NwSelectSeparator.vue.d.ts +8 -0
- package/dist/components/selection/select/NwSelectTrigger.vue.d.ts +23 -0
- package/dist/components/selection/select/NwSelectValue.vue.d.ts +20 -0
- package/dist/components/selection/select/index.d.ts +10 -0
- package/dist/docs/api.json +320 -0
- package/dist/docs/components/accordion.md +123 -0
- package/dist/docs/components/alert-dialog.md +199 -0
- package/dist/docs/components/alert.md +106 -0
- package/dist/docs/components/aspect-ratio.md +57 -0
- package/dist/docs/components/autocomplete.md +282 -0
- package/dist/docs/components/avatar.md +118 -0
- package/dist/docs/components/badge.md +66 -0
- package/dist/docs/components/breadcrumb.md +162 -0
- package/dist/docs/components/button.md +97 -0
- package/dist/docs/components/calendar.md +115 -0
- package/dist/docs/components/card.md +161 -0
- package/dist/docs/components/checkbox.md +117 -0
- package/dist/docs/components/chip.md +76 -0
- package/dist/docs/components/code.md +56 -0
- package/dist/docs/components/collapsible.md +92 -0
- package/dist/docs/components/color-area.md +95 -0
- package/dist/docs/components/color-field.md +81 -0
- package/dist/docs/components/color-picker.md +81 -0
- package/dist/docs/components/color-slider.md +95 -0
- package/dist/docs/components/color-swatch-picker.md +108 -0
- package/dist/docs/components/color-swatch.md +58 -0
- package/dist/docs/components/combobox.md +295 -0
- package/dist/docs/components/command-palette.md +83 -0
- package/dist/docs/components/context-menu.md +325 -0
- package/dist/docs/components/data-table.md +98 -0
- package/dist/docs/components/date-field.md +87 -0
- package/dist/docs/components/date-picker.md +136 -0
- package/dist/docs/components/date-range-field.md +87 -0
- package/dist/docs/components/date-range-picker.md +142 -0
- package/dist/docs/components/dialog.md +226 -0
- package/dist/docs/components/drawer.md +223 -0
- package/dist/docs/components/dropdown-menu.md +365 -0
- package/dist/docs/components/editable.md +171 -0
- package/dist/docs/components/empty.md +55 -0
- package/dist/docs/components/field.md +151 -0
- package/dist/docs/components/form.md +88 -0
- package/dist/docs/components/hover-card.md +116 -0
- package/dist/docs/components/hud-panel.md +163 -0
- package/dist/docs/components/icon-button.md +69 -0
- package/dist/docs/components/input-group.md +84 -0
- package/dist/docs/components/input.md +74 -0
- package/dist/docs/components/kbd.md +62 -0
- package/dist/docs/components/key-hint.md +62 -0
- package/dist/docs/components/layout.md +64 -0
- package/dist/docs/components/link.md +64 -0
- package/dist/docs/components/list.md +56 -0
- package/dist/docs/components/listbox.md +186 -0
- package/dist/docs/components/menubar.md +360 -0
- package/dist/docs/components/meter.md +62 -0
- package/dist/docs/components/month-picker.md +89 -0
- package/dist/docs/components/month-range-picker.md +91 -0
- package/dist/docs/components/navbar.md +115 -0
- package/dist/docs/components/navigation-menu.md +207 -0
- package/dist/docs/components/number-field.md +119 -0
- package/dist/docs/components/pagination.md +199 -0
- package/dist/docs/components/pin-input.md +102 -0
- package/dist/docs/components/popover.md +167 -0
- package/dist/docs/components/progress.md +65 -0
- package/dist/docs/components/provider.md +58 -0
- package/dist/docs/components/radio-group.md +102 -0
- package/dist/docs/components/range-calendar.md +120 -0
- package/dist/docs/components/rating.md +66 -0
- package/dist/docs/components/scroll-area.md +127 -0
- package/dist/docs/components/select.md +250 -0
- package/dist/docs/components/separator.md +63 -0
- package/dist/docs/components/sheet.md +204 -0
- package/dist/docs/components/sidenav.md +124 -0
- package/dist/docs/components/skeleton.md +68 -0
- package/dist/docs/components/slider.md +79 -0
- package/dist/docs/components/spinner.md +50 -0
- package/dist/docs/components/splitter-group.md +119 -0
- package/dist/docs/components/stat.md +58 -0
- package/dist/docs/components/stepper.md +177 -0
- package/dist/docs/components/switch.md +62 -0
- package/dist/docs/components/table.md +191 -0
- package/dist/docs/components/tabs.md +144 -0
- package/dist/docs/components/tag-group.md +128 -0
- package/dist/docs/components/tags-input.md +154 -0
- package/dist/docs/components/textarea.md +50 -0
- package/dist/docs/components/time-field.md +88 -0
- package/dist/docs/components/time-range-field.md +88 -0
- package/dist/docs/components/toaster.md +176 -0
- package/dist/docs/components/toggle.md +121 -0
- package/dist/docs/components/toolbar.md +163 -0
- package/dist/docs/components/tooltip.md +117 -0
- package/dist/docs/components/tree.md +125 -0
- package/dist/docs/components/year-picker.md +87 -0
- package/dist/docs/components/year-range-picker.md +93 -0
- package/dist/docs/composables.md +320 -0
- package/dist/docs/families/actions.md +39 -0
- package/dist/docs/families/color.md +16 -0
- package/dist/docs/families/datetime.md +187 -0
- package/dist/docs/families/forms.md +34 -0
- package/dist/docs/families/navigation.md +26 -0
- package/dist/docs/families/overlays.md +29 -0
- package/dist/docs/families/selection.md +14 -0
- package/dist/docs/foundations/accessibility.md +71 -0
- package/dist/docs/foundations/color-roles.md +114 -0
- package/dist/docs/foundations/effects-motion.md +150 -0
- package/dist/docs/foundations/flavors.md +156 -0
- package/dist/docs/foundations/icons.md +45 -0
- package/dist/docs/foundations/palette.md +180 -0
- package/dist/docs/foundations/spacing-elevation.md +168 -0
- package/dist/docs/foundations/typography.md +80 -0
- package/dist/docs/index.md +239 -0
- package/dist/docs/manifest.json +1777 -0
- package/dist/foundations/NwFlavorSelect.vue.d.ts +19 -0
- package/dist/foundations/NwProvider.vue.d.ts +39 -0
- package/dist/foundations/context.d.ts +13 -0
- package/dist/foundations/flavors.d.ts +15 -0
- package/dist/foundations/index.d.ts +7 -0
- package/dist/foundations/useFlavor.d.ts +46 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +14762 -0
- package/dist/plugin.d.ts +2 -0
- package/dist/tailwind.css +1 -0
- package/dist/theme/accordion.d.ts +9 -0
- package/dist/theme/actions-shared.d.ts +30 -0
- package/dist/theme/alert-dialog.d.ts +28 -0
- package/dist/theme/alert.d.ts +19 -0
- package/dist/theme/aspect-ratio.d.ts +5 -0
- package/dist/theme/autocomplete.d.ts +85 -0
- package/dist/theme/avatar.d.ts +50 -0
- package/dist/theme/badge.d.ts +7 -0
- package/dist/theme/breadcrumb.d.ts +9 -0
- package/dist/theme/button-group.d.ts +7 -0
- package/dist/theme/button.d.ts +12 -0
- package/dist/theme/calendar.d.ts +17 -0
- package/dist/theme/card.d.ts +49 -0
- package/dist/theme/checkbox.d.ts +43 -0
- package/dist/theme/chip.d.ts +5 -0
- package/dist/theme/code.d.ts +6 -0
- package/dist/theme/collapsible.d.ts +5 -0
- package/dist/theme/color-area.d.ts +6 -0
- package/dist/theme/color-field.d.ts +19 -0
- package/dist/theme/color-picker.d.ts +9 -0
- package/dist/theme/color-shared.d.ts +9 -0
- package/dist/theme/color-slider.d.ts +9 -0
- package/dist/theme/color-swatch-picker.d.ts +9 -0
- package/dist/theme/color-swatch.d.ts +27 -0
- package/dist/theme/combobox.d.ts +58 -0
- package/dist/theme/command-palette.d.ts +7 -0
- package/dist/theme/data-table.d.ts +6 -0
- package/dist/theme/date-field.d.ts +28 -0
- package/dist/theme/date-picker.d.ts +53 -0
- package/dist/theme/date-range-field.d.ts +75 -0
- package/dist/theme/date-range-picker.d.ts +86 -0
- package/dist/theme/dialog.d.ts +31 -0
- package/dist/theme/drawer.d.ts +11 -0
- package/dist/theme/editable.d.ts +49 -0
- package/dist/theme/empty.d.ts +6 -0
- package/dist/theme/field.d.ts +16 -0
- package/dist/theme/flavor-select.d.ts +5 -0
- package/dist/theme/form.d.ts +9 -0
- package/dist/theme/forms-shared.d.ts +19 -0
- package/dist/theme/hover-card.d.ts +15 -0
- package/dist/theme/hud-panel.d.ts +71 -0
- package/dist/theme/icon-button.d.ts +2 -0
- package/dist/theme/input-group.d.ts +22 -0
- package/dist/theme/input.d.ts +38 -0
- package/dist/theme/kbd.d.ts +12 -0
- package/dist/theme/key-hint.d.ts +13 -0
- package/dist/theme/label.d.ts +3 -0
- package/dist/theme/layout.d.ts +9 -0
- package/dist/theme/link.d.ts +9 -0
- package/dist/theme/list.d.ts +6 -0
- package/dist/theme/listbox.d.ts +56 -0
- package/dist/theme/menu.d.ts +33 -0
- package/dist/theme/menubar.d.ts +5 -0
- package/dist/theme/meter.d.ts +4 -0
- package/dist/theme/month-picker.d.ts +29 -0
- package/dist/theme/month-range-picker.d.ts +46 -0
- package/dist/theme/navbar.d.ts +7 -0
- package/dist/theme/navigation-menu.d.ts +13 -0
- package/dist/theme/navigation.d.ts +10 -0
- package/dist/theme/neon-text.d.ts +26 -0
- package/dist/theme/number-field.d.ts +45 -0
- package/dist/theme/overlays.d.ts +35 -0
- package/dist/theme/pagination.d.ts +6 -0
- package/dist/theme/pin-input.d.ts +52 -0
- package/dist/theme/popover.d.ts +31 -0
- package/dist/theme/progress.d.ts +39 -0
- package/dist/theme/provider.d.ts +9 -0
- package/dist/theme/radio-group.d.ts +52 -0
- package/dist/theme/range-calendar.d.ts +29 -0
- package/dist/theme/rating.d.ts +32 -0
- package/dist/theme/scroll-area.d.ts +7 -0
- package/dist/theme/select.d.ts +36 -0
- package/dist/theme/selection.d.ts +36 -0
- package/dist/theme/separator.d.ts +28 -0
- package/dist/theme/shared.d.ts +87 -0
- package/dist/theme/sheet.d.ts +28 -0
- package/dist/theme/sidenav.d.ts +8 -0
- package/dist/theme/skeleton.d.ts +14 -0
- package/dist/theme/slider.d.ts +27 -0
- package/dist/theme/spinner.d.ts +24 -0
- package/dist/theme/splitter.d.ts +7 -0
- package/dist/theme/stat-bar.d.ts +45 -0
- package/dist/theme/stat.d.ts +7 -0
- package/dist/theme/stepper.d.ts +12 -0
- package/dist/theme/switch.d.ts +44 -0
- package/dist/theme/table.d.ts +28 -0
- package/dist/theme/tabs.d.ts +8 -0
- package/dist/theme/tag-group.d.ts +7 -0
- package/dist/theme/tags-input.d.ts +25 -0
- package/dist/theme/textarea.d.ts +53 -0
- package/dist/theme/time-field.d.ts +43 -0
- package/dist/theme/time-range-field.d.ts +57 -0
- package/dist/theme/toast.d.ts +45 -0
- package/dist/theme/toggle-group.d.ts +6 -0
- package/dist/theme/toggle.d.ts +15 -0
- package/dist/theme/toolbar.d.ts +21 -0
- package/dist/theme/tooltip.d.ts +5 -0
- package/dist/theme/tree.d.ts +7 -0
- package/dist/theme/year-picker.d.ts +29 -0
- package/dist/theme/year-range-picker.d.ts +46 -0
- package/dist/types.d.ts +36 -0
- package/dist/utils/cn.d.ts +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/tv.d.ts +1 -0
- package/package.json +76 -3
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# NwButton + NwButtonGroup
|
|
2
|
+
|
|
3
|
+
Part of [Actions & HUD](../families/actions.md).
|
|
4
|
+
|
|
5
|
+
`NwButton` renders Reka `Primitive` as a native button by default. `NwButtonGroup` is a labelled `div` with `role="group"` that joins adjacent buttons without introducing roving focus.
|
|
6
|
+
|
|
7
|
+
```vue title="ButtonDemo.vue"
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { ref } from 'vue'
|
|
10
|
+
import { NwButton, NwButtonGroup, NwProvider } from '@nyxwire/vue'
|
|
11
|
+
const deployed = ref(false)
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<NwProvider>
|
|
16
|
+
<div class="flex flex-wrap items-center gap-4">
|
|
17
|
+
<NwButton cut glow="sm" @click="deployed = !deployed">{{
|
|
18
|
+
deployed ? 'Roll back' : 'Deploy relay'
|
|
19
|
+
}}</NwButton>
|
|
20
|
+
<NwButtonGroup label="Relay actions">
|
|
21
|
+
<NwButton variant="outline" intent="neutral">Preview</NwButton>
|
|
22
|
+
<NwButton variant="outline" intent="neutral">Diff</NwButton>
|
|
23
|
+
<NwButton variant="outline" intent="danger" disabled>Purge</NwButton>
|
|
24
|
+
</NwButtonGroup>
|
|
25
|
+
<NwButton variant="soft" intent="secondary" wire>Wire edge</NwButton>
|
|
26
|
+
<NwButton variant="ghost" intent="tertiary" size="sm">Ghost</NwButton>
|
|
27
|
+
<NwButton loading>Syncing</NwButton>
|
|
28
|
+
<span role="status" class="text-sm text-fg-muted" data-demo-result>{{
|
|
29
|
+
deployed ? 'Relay deployed to north edge' : 'No active deployment'
|
|
30
|
+
}}</span>
|
|
31
|
+
</div>
|
|
32
|
+
</NwProvider>
|
|
33
|
+
</template>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Anatomy
|
|
37
|
+
|
|
38
|
+
```vue
|
|
39
|
+
<NwButtonGroup>
|
|
40
|
+
<NwButton />
|
|
41
|
+
<NwButton />
|
|
42
|
+
</NwButtonGroup>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
| Component / prop | Type | Default | Effect |
|
|
46
|
+
| ----------------------- | ----------------------------------------------------- | -------------- | ---------------------------------------------------------------------- |
|
|
47
|
+
| Button `variant` | `'solid' \| 'soft' \| 'outline' \| 'ghost' \| 'link'` | `'solid'` | Surface treatment |
|
|
48
|
+
| Button `intent` | Intent | `'primary'` | Semantic color |
|
|
49
|
+
| Button `size` | `'xs' \| 'sm' \| 'md' \| 'lg'` | `'md'` | Control height |
|
|
50
|
+
| Button `cut`, `wire` | `boolean` | `false` | Chamfered corners / gradient edge |
|
|
51
|
+
| Button `glow` | `'sm' \| 'md' \| 'lg'` | unset | Neon bloom in the intent color; hovering adds a small glow regardless |
|
|
52
|
+
| Button `icon`, `block` | `boolean` | `false` | Square icon control / full width |
|
|
53
|
+
| Button `loading` | `boolean` | `false` | Disables, sets `aria-busy`, overlays a spinner while keeping the label |
|
|
54
|
+
| Button `disabled` | `boolean` | `false` | Native `disabled`; `aria-disabled` when rendered as another element |
|
|
55
|
+
| Button `as`, `as-child` | `PrimitiveProps` | `'button'` | Rendered element |
|
|
56
|
+
| Button `type` | `'button' \| 'submit' \| 'reset'` | `'button'` | Native button type, set only when the element is a button |
|
|
57
|
+
| Group `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Attached-button direction, mirrored in `data-orientation` |
|
|
58
|
+
| Group `label` | `string` | unset | Accessible group name |
|
|
59
|
+
|
|
60
|
+
Tab reaches each enabled button; Enter and Space activate native buttons. Icon-only buttons need an accessible name, which [`NwIconButton`](icon-button.md) enforces. With `as="a"` or `as-child`, the child keeps its own semantics and you handle disabled activation: `aria-disabled` alone does not stop a click.
|
|
61
|
+
|
|
62
|
+
## API
|
|
63
|
+
|
|
64
|
+
Generated from the component sources. Every component also takes `class`, `style` and the other attributes Vue falls through.
|
|
65
|
+
|
|
66
|
+
### NwButton
|
|
67
|
+
|
|
68
|
+
| Prop | Type | Default | Description |
|
|
69
|
+
| --- | --- | --- | --- |
|
|
70
|
+
| `icon` | `boolean` | | Square icon-only button; name it with aria-label. |
|
|
71
|
+
| `block` | `boolean` | | Fills the width of its container. |
|
|
72
|
+
| `loading` | `boolean` | | Sets aria-busy and disables the button; a spinner covers the label, which stays for assistive tech. |
|
|
73
|
+
| `disabled` | `boolean` | | |
|
|
74
|
+
| `type` | `"button" \| "submit" \| "reset"` | `"button"` | |
|
|
75
|
+
| `asChild` | `boolean` | | Change the default rendered element for the one passed as a child, merging their props and behavior. |
|
|
76
|
+
| `as` | `AsTag \| Component` | `"button"` | The element or component this component should render as. |
|
|
77
|
+
| `intent` | `NwIntent` | | |
|
|
78
|
+
| `variant` | `NwVariant` | | |
|
|
79
|
+
| `size` | `NwSize` | | |
|
|
80
|
+
| `cut` | `boolean` | | |
|
|
81
|
+
| `wire` | `boolean` | | |
|
|
82
|
+
| `glow` | `NwGlow` | | |
|
|
83
|
+
|
|
84
|
+
| Slot | Props |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| `default` | |
|
|
87
|
+
|
|
88
|
+
### NwButtonGroup
|
|
89
|
+
|
|
90
|
+
| Prop | Type | Default | Description |
|
|
91
|
+
| --- | --- | --- | --- |
|
|
92
|
+
| `orientation` | `"vertical" \| "horizontal"` | `"horizontal"` | |
|
|
93
|
+
| `label` | `string` | | Accessible name of the group. |
|
|
94
|
+
|
|
95
|
+
| Slot | Props |
|
|
96
|
+
| --- | --- |
|
|
97
|
+
| `default` | |
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# NwCalendar
|
|
2
|
+
|
|
3
|
+
Part of [Date & time](../families/datetime.md).
|
|
4
|
+
|
|
5
|
+
`NwCalendar` wraps Reka `CalendarRoot` and fills its default slot with a header (previous, heading, next), a weekday row and one date grid per visible month. Use it when the calendar stays on screen. Selecting a date in the demo updates the readout below it.
|
|
6
|
+
|
|
7
|
+
```vue title="CalendarDemo.vue"
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { shallowRef } from 'vue'
|
|
10
|
+
import { NwCalendar, NwProvider, type NwCalendarProps } from '@nyxwire/vue'
|
|
11
|
+
|
|
12
|
+
const value = shallowRef<NwCalendarProps['modelValue']>()
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<NwProvider locale="en-US">
|
|
17
|
+
<div class="grid gap-3">
|
|
18
|
+
<NwCalendar v-model="value" calendar-label="Relay maintenance date" />
|
|
19
|
+
<p class="m-0 text-sm text-fg-muted" role="status">
|
|
20
|
+
Maintenance: {{ value?.toString() ?? 'none' }}
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
</NwProvider>
|
|
24
|
+
</template>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Anatomy
|
|
28
|
+
|
|
29
|
+
```vue
|
|
30
|
+
<NwCalendar>
|
|
31
|
+
<NwCalendarHeader>
|
|
32
|
+
<NwCalendarPrev /><NwCalendarHeading /><NwCalendarNext />
|
|
33
|
+
</NwCalendarHeader>
|
|
34
|
+
<NwCalendarGrid>
|
|
35
|
+
<NwCalendarGridHead><NwCalendarGridRow><NwCalendarHeadCell /></NwCalendarGridRow></NwCalendarGridHead>
|
|
36
|
+
<NwCalendarGridBody><NwCalendarGridRow>
|
|
37
|
+
<NwCalendarCell><NwCalendarCellTrigger /></NwCalendarCell>
|
|
38
|
+
</NwCalendarGridRow></NwCalendarGridBody>
|
|
39
|
+
</NwCalendarGrid>
|
|
40
|
+
</NwCalendar>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
| Prop | Type | Default | Effect |
|
|
44
|
+
| -------------------------------------- | ---------------------------------- | ------- | --------------------------------------------- |
|
|
45
|
+
| `disableDaysOutsideCurrentView` | `boolean` | `true` | Disables dates outside the displayed month |
|
|
46
|
+
| `modelValue` | `DateValue \| DateValue[] \| null` | unset | Selected date(s) |
|
|
47
|
+
| `defaultValue` | `DateValue` | unset | Initial selection |
|
|
48
|
+
| `multiple` | `boolean` | `false` | Multiple selected dates |
|
|
49
|
+
| `numberOfMonths` | `number` | `1` | Visible months |
|
|
50
|
+
| `calendarLabel` | `string` | unset | Accessible calendar label |
|
|
51
|
+
| `minValue`, `maxValue` | `DateValue` | unset | Selectable bounds |
|
|
52
|
+
| `isDateDisabled`, `isDateUnavailable` | `(date: DateValue) => boolean` | unset | Date restrictions |
|
|
53
|
+
| `disabled`, `readonly`, `initialFocus` | `boolean` | `false` | Interaction lock / read-only / focus on mount |
|
|
54
|
+
|
|
55
|
+
The other `CalendarRootProps` and emits pass through. `placeholder` sets which month is shown, independently of the selection; `defaultPlaceholder` sets the first one shown. The uncomposed `NwCalendarRoot` is exported too. `NwCalendarCell` marks a cell `aria-disabled` and `data-disabled` when its date is disabled, unavailable or outside the current view, so those days dim and ignore the pointer.
|
|
56
|
+
|
|
57
|
+
**Keyboard and accessibility.** ArrowLeft and ArrowRight move one day, ArrowUp and ArrowDown one week, PageUp and PageDown one month, and Home and End go to the start or end of the week. Enter or Space selects the focused day. Dates outside the bounds and unavailable dates cannot be selected. The previous and next buttons are named "Previous month" and "Next month". Pass `calendar-label` to name the grid, and set the provider's `locale` to control weekday names and the first day of the week.
|
|
58
|
+
|
|
59
|
+
## API
|
|
60
|
+
|
|
61
|
+
Generated from the component sources. Every component also takes `class`, `style` and the other attributes Vue falls through.
|
|
62
|
+
|
|
63
|
+
### NwCalendar
|
|
64
|
+
|
|
65
|
+
| Prop | Type | Default | Description |
|
|
66
|
+
| --- | --- | --- | --- |
|
|
67
|
+
| `defaultValue` | `DateValue` | | The default value for the calendar |
|
|
68
|
+
| `defaultPlaceholder` | `DateValue` | | The default placeholder date |
|
|
69
|
+
| `placeholder` | `DateValue` | | The placeholder date, which is used to determine what month to display when no date is selected |
|
|
70
|
+
| `pagedNavigation` | `boolean` | | This property causes the previous and next buttons to navigate by the number of months displayed at once, rather than one month |
|
|
71
|
+
| `preventDeselect` | `boolean` | | Whether or not to prevent the user from deselecting a date without selecting another date first |
|
|
72
|
+
| `weekStartsOn` | `WeekStartsOn` | | The day of the week to start the calendar on |
|
|
73
|
+
| `weekdayFormat` | `WeekDayFormat` | | The format to use for the weekday strings provided via the weekdays slot prop |
|
|
74
|
+
| `calendarLabel` | `string` | | The accessible label for the calendar |
|
|
75
|
+
| `fixedWeeks` | `boolean` | | Whether or not to always display 6 weeks in the calendar |
|
|
76
|
+
| `maxValue` | `DateValue` | | The maximum date that can be selected |
|
|
77
|
+
| `minValue` | `DateValue` | | The minimum date that can be selected |
|
|
78
|
+
| `locale` | `string` | | The locale to use for formatting dates |
|
|
79
|
+
| `numberOfMonths` | `number` | | The number of months to display at once |
|
|
80
|
+
| `disabled` | `boolean` | | Whether the calendar is disabled |
|
|
81
|
+
| `readonly` | `boolean` | | Whether the calendar is readonly |
|
|
82
|
+
| `initialFocus` | `boolean` | | If true, the calendar will focus the selected day, today, or the first day of the month depending on what is visible when the calendar is mounted |
|
|
83
|
+
| `isDateDisabled` | `Matcher` | | A function that returns whether or not a date is disabled |
|
|
84
|
+
| `isDateUnavailable` | `Matcher` | | A function that returns whether or not a date is unavailable |
|
|
85
|
+
| `dir` | `Direction` | | The reading direction of the calendar when applicable. |
|
|
86
|
+
| `nextPage` | `((placeholder: DateValue) => DateValue)` | | A function that returns the next page of the calendar. |
|
|
87
|
+
| `prevPage` | `((placeholder: DateValue) => DateValue)` | | A function that returns the previous page of the calendar. |
|
|
88
|
+
| `modelValue` | `DateValue \| DateValue[] \| null` | | The controlled selected date value of the calendar. |
|
|
89
|
+
| `multiple` | `boolean` | | Whether multiple dates can be selected |
|
|
90
|
+
| `disableDaysOutsideCurrentView` | `boolean` | `true` | Whether or not to disable days outside the current view. |
|
|
91
|
+
| `asChild` | `boolean` | | Change the default rendered element for the one passed as a child, merging their props and behavior. |
|
|
92
|
+
| `as` | `AsTag \| Component` | | The element or component this component should render as. |
|
|
93
|
+
|
|
94
|
+
| Event | Payload | Description |
|
|
95
|
+
| --- | --- | --- |
|
|
96
|
+
| `update:modelValue` | `[date: DateValue \| undefined]` | |
|
|
97
|
+
| `update:placeholder` | `[date: DateValue]` | |
|
|
98
|
+
|
|
99
|
+
| Slot | Props |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| `default` | `{ date: DateValue; grid: Grid<DateValue>[]; weekDays: string[]; weekStartsOn: WeekStartsOn; locale: string; fixedWeeks: boolean; modelValue: DateValue \| DateValue[] \| undefined; }` |
|
|
102
|
+
|
|
103
|
+
### NwCalendarCell
|
|
104
|
+
|
|
105
|
+
Same component as `NwDatePickerCell`.
|
|
106
|
+
|
|
107
|
+
| Prop | Type | Default | Description |
|
|
108
|
+
| --- | --- | --- | --- |
|
|
109
|
+
| `date` | `DateValue` | required | The date value for the cell |
|
|
110
|
+
| `asChild` | `boolean` | | Change the default rendered element for the one passed as a child, merging their props and behavior. |
|
|
111
|
+
| `as` | `AsTag \| Component` | | The element or component this component should render as. |
|
|
112
|
+
|
|
113
|
+
| Slot | Props |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| `default` | |
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# NwCard
|
|
2
|
+
|
|
3
|
+
Part of [Actions & HUD](../families/actions.md).
|
|
4
|
+
|
|
5
|
+
`NwCard` and its parts render Reka `Primitive` for a composed content surface. The default card is a `div`, not a button.
|
|
6
|
+
|
|
7
|
+
```vue title="CardDemo.vue"
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { ref } from 'vue'
|
|
10
|
+
import {
|
|
11
|
+
NwBadge,
|
|
12
|
+
NwButton,
|
|
13
|
+
NwCard,
|
|
14
|
+
NwCardContent,
|
|
15
|
+
NwCardDescription,
|
|
16
|
+
NwCardFooter,
|
|
17
|
+
NwCardHeader,
|
|
18
|
+
NwCardTitle,
|
|
19
|
+
NwProvider,
|
|
20
|
+
} from '@nyxwire/vue'
|
|
21
|
+
|
|
22
|
+
const plans = [
|
|
23
|
+
{ id: 'edge', name: 'Edge relay', price: '$12 / mo', detail: 'One region, 10k requests a day.' },
|
|
24
|
+
{ id: 'mesh', name: 'Mesh relay', price: '$48 / mo', detail: 'Every region, failover, metrics.' },
|
|
25
|
+
] as const
|
|
26
|
+
const chosen = ref<string>('edge')
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<NwProvider>
|
|
31
|
+
<div class="grid w-full gap-4 sm:grid-cols-2">
|
|
32
|
+
<NwCard
|
|
33
|
+
v-for="plan in plans"
|
|
34
|
+
:key="plan.id"
|
|
35
|
+
:selected="chosen === plan.id"
|
|
36
|
+
:cut="plan.id === 'mesh'"
|
|
37
|
+
:wire="plan.id === 'mesh'"
|
|
38
|
+
>
|
|
39
|
+
<NwCardHeader>
|
|
40
|
+
<NwCardTitle>{{ plan.name }}</NwCardTitle>
|
|
41
|
+
<NwCardDescription>{{ plan.detail }}</NwCardDescription>
|
|
42
|
+
</NwCardHeader>
|
|
43
|
+
<NwCardContent>
|
|
44
|
+
<span class="font-mono text-lg text-fg">{{ plan.price }}</span>
|
|
45
|
+
</NwCardContent>
|
|
46
|
+
<NwCardFooter>
|
|
47
|
+
<NwButton
|
|
48
|
+
size="sm"
|
|
49
|
+
:variant="chosen === plan.id ? 'solid' : 'outline'"
|
|
50
|
+
:aria-pressed="chosen === plan.id"
|
|
51
|
+
@click="chosen = plan.id"
|
|
52
|
+
>{{ chosen === plan.id ? 'Selected' : 'Choose' }}</NwButton
|
|
53
|
+
>
|
|
54
|
+
<NwBadge v-if="plan.id === 'mesh'" intent="secondary">Popular</NwBadge>
|
|
55
|
+
</NwCardFooter>
|
|
56
|
+
</NwCard>
|
|
57
|
+
<NwCard variant="glass" class="sm:col-span-2">
|
|
58
|
+
<NwCardContent class="text-fg-muted">Glass card: blurred translucent fill.</NwCardContent>
|
|
59
|
+
</NwCard>
|
|
60
|
+
</div>
|
|
61
|
+
</NwProvider>
|
|
62
|
+
</template>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Anatomy
|
|
66
|
+
|
|
67
|
+
```vue
|
|
68
|
+
<NwCard>
|
|
69
|
+
<NwCardHeader>
|
|
70
|
+
<NwCardTitle />
|
|
71
|
+
<NwCardDescription />
|
|
72
|
+
</NwCardHeader>
|
|
73
|
+
<NwCardContent />
|
|
74
|
+
<NwCardFooter />
|
|
75
|
+
</NwCard>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
| Prop | Type | Default | Effect |
|
|
79
|
+
| ------------- | ------------------------------------------------- | ----------- | --------------------------------------------------------- |
|
|
80
|
+
| `variant` | `'default' \| 'flat' \| 'glass' \| 'interactive'` | `'default'` | Panel, sunken, blurred translucent, or hover-lift surface |
|
|
81
|
+
| `selected` | `boolean` | `false` | Primary edge and glow, and `data-selected` |
|
|
82
|
+
| `cut`, `wire` | `boolean` | `false` | Chamfered corners / gradient edge |
|
|
83
|
+
| `glow` | `'sm' \| 'md' \| 'lg'` | unset | Primary bloom |
|
|
84
|
+
| `as` | `PrimitiveProps['as']` | `'div'` | Root element |
|
|
85
|
+
|
|
86
|
+
`NwCardTitle` defaults to `h3` and `NwCardDescription` to `p`; choose `as` to fit the document outline. `variant="interactive"` only changes styling and adds a focus ring: when the whole card is actionable, render it `as="a"` or `as="button"` and do not nest other controls. `selected` is visual plus a data attribute; expose the selection on the control that sets it, as the demo does with `aria-pressed`.
|
|
87
|
+
|
|
88
|
+
## API
|
|
89
|
+
|
|
90
|
+
Generated from the component sources. Every component also takes `class`, `style` and the other attributes Vue falls through.
|
|
91
|
+
|
|
92
|
+
### NwCard
|
|
93
|
+
|
|
94
|
+
| Prop | Type | Default | Description |
|
|
95
|
+
| --- | --- | --- | --- |
|
|
96
|
+
| `variant` | `"default" \| "flat" \| "glass" \| "interactive"` | | |
|
|
97
|
+
| `selected` | `boolean` | | |
|
|
98
|
+
| `cut` | `boolean` | | Cut corners on the top-right and bottom-left. |
|
|
99
|
+
| `wire` | `boolean` | | Wire gradient edge. |
|
|
100
|
+
| `glow` | `NwGlow` | | |
|
|
101
|
+
| `asChild` | `boolean` | | Change the default rendered element for the one passed as a child, merging their props and behavior. |
|
|
102
|
+
| `as` | `AsTag \| Component` | `"div"` | The element or component this component should render as. |
|
|
103
|
+
|
|
104
|
+
| Slot | Props |
|
|
105
|
+
| --- | --- |
|
|
106
|
+
| `default` | |
|
|
107
|
+
|
|
108
|
+
### NwCardContent
|
|
109
|
+
|
|
110
|
+
| Prop | Type | Default | Description |
|
|
111
|
+
| --- | --- | --- | --- |
|
|
112
|
+
| `asChild` | `boolean` | | Change the default rendered element for the one passed as a child, merging their props and behavior. |
|
|
113
|
+
| `as` | `AsTag \| Component` | `"div"` | The element or component this component should render as. |
|
|
114
|
+
|
|
115
|
+
| Slot | Props |
|
|
116
|
+
| --- | --- |
|
|
117
|
+
| `default` | |
|
|
118
|
+
|
|
119
|
+
### NwCardDescription
|
|
120
|
+
|
|
121
|
+
| Prop | Type | Default | Description |
|
|
122
|
+
| --- | --- | --- | --- |
|
|
123
|
+
| `asChild` | `boolean` | | Change the default rendered element for the one passed as a child, merging their props and behavior. |
|
|
124
|
+
| `as` | `AsTag \| Component` | `"p"` | The element or component this component should render as. |
|
|
125
|
+
|
|
126
|
+
| Slot | Props |
|
|
127
|
+
| --- | --- |
|
|
128
|
+
| `default` | |
|
|
129
|
+
|
|
130
|
+
### NwCardFooter
|
|
131
|
+
|
|
132
|
+
| Prop | Type | Default | Description |
|
|
133
|
+
| --- | --- | --- | --- |
|
|
134
|
+
| `asChild` | `boolean` | | Change the default rendered element for the one passed as a child, merging their props and behavior. |
|
|
135
|
+
| `as` | `AsTag \| Component` | `"div"` | The element or component this component should render as. |
|
|
136
|
+
|
|
137
|
+
| Slot | Props |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| `default` | |
|
|
140
|
+
|
|
141
|
+
### NwCardHeader
|
|
142
|
+
|
|
143
|
+
| Prop | Type | Default | Description |
|
|
144
|
+
| --- | --- | --- | --- |
|
|
145
|
+
| `asChild` | `boolean` | | Change the default rendered element for the one passed as a child, merging their props and behavior. |
|
|
146
|
+
| `as` | `AsTag \| Component` | `"div"` | The element or component this component should render as. |
|
|
147
|
+
|
|
148
|
+
| Slot | Props |
|
|
149
|
+
| --- | --- |
|
|
150
|
+
| `default` | |
|
|
151
|
+
|
|
152
|
+
### NwCardTitle
|
|
153
|
+
|
|
154
|
+
| Prop | Type | Default | Description |
|
|
155
|
+
| --- | --- | --- | --- |
|
|
156
|
+
| `asChild` | `boolean` | | Change the default rendered element for the one passed as a child, merging their props and behavior. |
|
|
157
|
+
| `as` | `AsTag \| Component` | `"h3"` | The element or component this component should render as. |
|
|
158
|
+
|
|
159
|
+
| Slot | Props |
|
|
160
|
+
| --- | --- |
|
|
161
|
+
| `default` | |
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# NwCheckbox + NwCheckboxGroup
|
|
2
|
+
|
|
3
|
+
Part of [Forms](../families/forms.md).
|
|
4
|
+
|
|
5
|
+
`NwCheckbox` composes Reka `CheckboxRoot` and `CheckboxIndicator` in a chamfered box: a check when checked, a dash when indeterminate. `NwCheckboxGroup` wraps `CheckboxGroupRoot` for a collection of selected values.
|
|
6
|
+
|
|
7
|
+
```vue title="CheckboxDemo.vue"
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { computed, ref } from 'vue'
|
|
10
|
+
import { NwCheckbox, NwCheckboxGroup, NwProvider } from '@nyxwire/vue'
|
|
11
|
+
|
|
12
|
+
const alerts = ['latency', 'loss', 'faults'] as const
|
|
13
|
+
const enabled = ref<string[]>(['latency'])
|
|
14
|
+
const allEnabled = computed(() =>
|
|
15
|
+
enabled.value.length === 0
|
|
16
|
+
? false
|
|
17
|
+
: enabled.value.length === alerts.length
|
|
18
|
+
? true
|
|
19
|
+
: 'indeterminate',
|
|
20
|
+
)
|
|
21
|
+
function toggleAll(value: boolean | 'indeterminate') {
|
|
22
|
+
enabled.value = value === true ? [...alerts] : []
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<NwProvider>
|
|
28
|
+
<div class="grid gap-3">
|
|
29
|
+
<NwCheckbox :model-value="allEnabled" label="Every alert" @update:model-value="toggleAll" />
|
|
30
|
+
<NwCheckboxGroup v-model="enabled" aria-label="Alerts" class="ps-6">
|
|
31
|
+
<NwCheckbox value="latency" label="Latency above 100 ms" />
|
|
32
|
+
<NwCheckbox value="loss" label="Packet loss" intent="warning" />
|
|
33
|
+
<NwCheckbox value="faults" label="Hardware faults" intent="danger" />
|
|
34
|
+
</NwCheckboxGroup>
|
|
35
|
+
<p class="m-0 text-sm text-fg-muted">Enabled: {{ enabled.join(', ') || 'none' }}</p>
|
|
36
|
+
</div>
|
|
37
|
+
</NwProvider>
|
|
38
|
+
</template>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Anatomy
|
|
42
|
+
|
|
43
|
+
```vue
|
|
44
|
+
<NwCheckboxGroup>
|
|
45
|
+
<NwCheckbox value="latency" label="Latency above 100 ms" />
|
|
46
|
+
<NwCheckbox value="loss" label="Packet loss" />
|
|
47
|
+
</NwCheckboxGroup>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
| Component / prop | Type | Default | Effect |
|
|
51
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------- | ----------- | ---------------------------------------------------------- |
|
|
52
|
+
| Checkbox `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | 16px, 18px or 22px box |
|
|
53
|
+
| Checkbox `intent` | `'primary' \| 'secondary' \| 'tertiary' \| 'neutral' \| 'info' \| 'success' \| 'warning' \| 'danger'` | `'primary'` | Checked fill and glow |
|
|
54
|
+
| Checkbox `invalid` | `boolean` | `false` | `aria-invalid`, danger edge |
|
|
55
|
+
| Checkbox `label` | `string` | unset | Renders a visible label after the box, tied to it by `for` |
|
|
56
|
+
| Group `orientation` | `'horizontal' \| 'vertical'` | vertical | Column, or a wrapping row |
|
|
57
|
+
|
|
58
|
+
Checkbox uses Reka's `modelValue` and `defaultValue`, `'indeterminate'` included, announced as `aria-checked="mixed"`. The demo derives the parent's mixed state from the group: clicking it checks or clears every alert. The default slot replaces the mark and receives Reka's `state`.
|
|
59
|
+
|
|
60
|
+
Space toggles an enabled checkbox; clicking its label does too. Group items need distinct `value`s. A group's `aria-label` names the set, not each checkbox: give every box a `label`, a wrapping label or an `aria-label`. Disabled checkboxes cannot toggle and their label dims.
|
|
61
|
+
|
|
62
|
+
## API
|
|
63
|
+
|
|
64
|
+
Generated from the component sources. Every component also takes `class`, `style` and the other attributes Vue falls through.
|
|
65
|
+
|
|
66
|
+
### NwCheckbox
|
|
67
|
+
|
|
68
|
+
| Prop | Type | Default | Description |
|
|
69
|
+
| --- | --- | --- | --- |
|
|
70
|
+
| `size` | `"sm" \| "md" \| "lg"` | | |
|
|
71
|
+
| `intent` | `"info" \| "primary" \| "secondary" \| "tertiary" \| "neutral" \| "success" \| "warning" \| "danger"` | | |
|
|
72
|
+
| `invalid` | `boolean` | | |
|
|
73
|
+
| `label` | `string` | | Renders a visible label after the box. |
|
|
74
|
+
| `defaultValue` | `boolean \| "indeterminate"` | | The value of the checkbox when it is initially rendered. |
|
|
75
|
+
| `modelValue` | `boolean \| "indeterminate" \| null` | | The controlled value of the checkbox. |
|
|
76
|
+
| `disabled` | `boolean` | | When `true`, prevents the user from interacting with the checkbox |
|
|
77
|
+
| `value` | `AcceptableValue` | | The value given as data when submitted with a `name`. |
|
|
78
|
+
| `id` | `string` | | Id of the element |
|
|
79
|
+
| `trueValue` | `boolean` | | The value used when the checkbox is checked. |
|
|
80
|
+
| `falseValue` | `boolean` | | The value used when the checkbox is unchecked. |
|
|
81
|
+
| `asChild` | `boolean` | | Change the default rendered element for the one passed as a child, merging their props and behavior. |
|
|
82
|
+
| `as` | `AsTag \| Component` | | The element or component this component should render as. |
|
|
83
|
+
| `name` | `string` | | The name of the field. |
|
|
84
|
+
| `required` | `boolean` | | When `true`, indicates that the user must set the value before the owning form can be submitted. |
|
|
85
|
+
|
|
86
|
+
| Event | Payload | Description |
|
|
87
|
+
| --- | --- | --- |
|
|
88
|
+
| `update:modelValue` | `[value: boolean \| "indeterminate"]` | |
|
|
89
|
+
|
|
90
|
+
| Slot | Props |
|
|
91
|
+
| --- | --- |
|
|
92
|
+
| `default` | `{ modelValue: boolean \| "indeterminate"; state: CheckedState; }` |
|
|
93
|
+
|
|
94
|
+
### NwCheckboxGroup
|
|
95
|
+
|
|
96
|
+
| Prop | Type | Default | Description |
|
|
97
|
+
| --- | --- | --- | --- |
|
|
98
|
+
| `defaultValue` | `AcceptableValue[]` | | The value of the checkbox when it is initially rendered. |
|
|
99
|
+
| `modelValue` | `AcceptableValue[]` | | The controlled value of the checkbox. |
|
|
100
|
+
| `rovingFocus` | `boolean` | | When `false`, navigating through the items using arrow keys will be disabled. |
|
|
101
|
+
| `disabled` | `boolean` | | When `true`, prevents the user from interacting with the checkboxes |
|
|
102
|
+
| `max` | `number \| null` | | The maximum number of values that can be selected. |
|
|
103
|
+
| `dir` | `Direction$5` | | The direction of navigation between items. |
|
|
104
|
+
| `orientation` | `Orientation$1` | | The orientation of the group. |
|
|
105
|
+
| `asChild` | `boolean` | | Change the default rendered element for the one passed as a child, merging their props and behavior. |
|
|
106
|
+
| `as` | `AsTag \| Component` | | The element or component this component should render as. |
|
|
107
|
+
| `loop` | `boolean` | | Whether keyboard navigation should loop around |
|
|
108
|
+
| `name` | `string` | | The name of the field. |
|
|
109
|
+
| `required` | `boolean` | | When `true`, indicates that the user must set the value before the owning form can be submitted. |
|
|
110
|
+
|
|
111
|
+
| Event | Payload | Description |
|
|
112
|
+
| --- | --- | --- |
|
|
113
|
+
| `update:modelValue` | `[value: AcceptableValue[]]` | |
|
|
114
|
+
|
|
115
|
+
| Slot | Props |
|
|
116
|
+
| --- | --- |
|
|
117
|
+
| `default` | |
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# NwChip
|
|
2
|
+
|
|
3
|
+
Part of [Actions & HUD](../families/actions.md).
|
|
4
|
+
|
|
5
|
+
`NwChip` is a removable tag: a `span` with the badge face and, when `removeLabel` is set, a native remove button that emits `remove`.
|
|
6
|
+
|
|
7
|
+
```vue title="ChipDemo.vue"
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { ref } from 'vue'
|
|
10
|
+
import { NwButton, NwChip, NwProvider } from '@nyxwire/vue'
|
|
11
|
+
const initial = ['eu-west', 'us-east', 'ap-south']
|
|
12
|
+
const regions = ref([...initial])
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<NwProvider>
|
|
17
|
+
<div class="flex flex-wrap items-center gap-2">
|
|
18
|
+
<NwChip
|
|
19
|
+
v-for="region in regions"
|
|
20
|
+
:key="region"
|
|
21
|
+
intent="primary"
|
|
22
|
+
:remove-label="`Remove ${region}`"
|
|
23
|
+
@remove="regions = regions.filter((item) => item !== region)"
|
|
24
|
+
>{{ region }}</NwChip
|
|
25
|
+
>
|
|
26
|
+
<NwChip intent="neutral" variant="outline" remove-label="Remove pinned" disabled
|
|
27
|
+
>pinned</NwChip
|
|
28
|
+
>
|
|
29
|
+
<NwButton
|
|
30
|
+
v-if="regions.length < initial.length"
|
|
31
|
+
size="xs"
|
|
32
|
+
variant="ghost"
|
|
33
|
+
intent="neutral"
|
|
34
|
+
@click="regions = [...initial]"
|
|
35
|
+
>Reset</NwButton
|
|
36
|
+
>
|
|
37
|
+
<span class="text-sm text-fg-muted" aria-live="polite" data-demo-result
|
|
38
|
+
>{{ regions.length }} regions selected</span
|
|
39
|
+
>
|
|
40
|
+
</div>
|
|
41
|
+
</NwProvider>
|
|
42
|
+
</template>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
| Prop | Type | Default | Effect |
|
|
46
|
+
| ------------- | --------- | ----------------------------- | ------------------------------------------------------------ |
|
|
47
|
+
| Appearance | see above | `'neutral'`, `'soft'`, `'sm'` | Tone, surface, size and motifs |
|
|
48
|
+
| `removeLabel` | `string` | unset | Shows the remove button and names it (`aria-label`, `title`) |
|
|
49
|
+
| `disabled` | `boolean` | `false` | Disables the remove button |
|
|
50
|
+
|
|
51
|
+
The chip does not remove itself: handle `remove` and drop the item from your state. Tab reaches each remove button and Enter or Space activates it. Name each button after its chip (`Remove eu-west`), since several identical "Remove" buttons are ambiguous. For editable tag lists with keyboard entry, use `NwTagsInput` from [Forms](../families/forms.md).
|
|
52
|
+
|
|
53
|
+
## API
|
|
54
|
+
|
|
55
|
+
Generated from the component sources. Every component also takes `class`, `style` and the other attributes Vue falls through.
|
|
56
|
+
|
|
57
|
+
### NwChip
|
|
58
|
+
|
|
59
|
+
| Prop | Type | Default | Description |
|
|
60
|
+
| --- | --- | --- | --- |
|
|
61
|
+
| `intent` | `NwIntent` | | |
|
|
62
|
+
| `variant` | `NwVariant` | | |
|
|
63
|
+
| `size` | `NwSize` | | |
|
|
64
|
+
| `cut` | `boolean` | | |
|
|
65
|
+
| `wire` | `boolean` | | |
|
|
66
|
+
| `glow` | `NwGlow` | | |
|
|
67
|
+
| `removeLabel` | `string` | | |
|
|
68
|
+
| `disabled` | `boolean` | | |
|
|
69
|
+
|
|
70
|
+
| Event | Payload | Description |
|
|
71
|
+
| --- | --- | --- |
|
|
72
|
+
| `remove` | `[]` | |
|
|
73
|
+
|
|
74
|
+
| Slot | Props |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| `default` | |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# NwCode
|
|
2
|
+
|
|
3
|
+
Part of [Actions & HUD](../families/actions.md).
|
|
4
|
+
|
|
5
|
+
`NwCode` renders inline code, or with `block` a `pre` that keeps whitespace and scrolls horizontally.
|
|
6
|
+
|
|
7
|
+
```vue title="CodeDemo.vue"
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { ref } from 'vue'
|
|
10
|
+
import { NwButton, NwCode, NwProvider } from '@nyxwire/vue'
|
|
11
|
+
const format = ref<'env' | 'json'>('env')
|
|
12
|
+
const samples = {
|
|
13
|
+
env: 'RELAY_REGION=eu-west\nRELAY_TIMEOUT=5000\nRELAY_TLS=strict',
|
|
14
|
+
json: '{\n "region": "eu-west",\n "timeout": 5000,\n "tls": "strict"\n}',
|
|
15
|
+
} as const
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<NwProvider>
|
|
20
|
+
<div class="flex w-full flex-col gap-3">
|
|
21
|
+
<p class="m-0 text-sm text-fg-muted">
|
|
22
|
+
Set <NwCode>RELAY_REGION</NwCode> before running <NwCode>nyxwire deploy</NwCode>.
|
|
23
|
+
</p>
|
|
24
|
+
<NwCode block data-demo-result>{{ samples[format] }}</NwCode>
|
|
25
|
+
<NwButton
|
|
26
|
+
size="sm"
|
|
27
|
+
variant="outline"
|
|
28
|
+
intent="neutral"
|
|
29
|
+
class="self-start"
|
|
30
|
+
@click="format = format === 'env' ? 'json' : 'env'"
|
|
31
|
+
>Show as {{ format === 'env' ? 'JSON' : '.env' }}</NwButton
|
|
32
|
+
>
|
|
33
|
+
</div>
|
|
34
|
+
</NwProvider>
|
|
35
|
+
</template>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
| Prop | Type | Default | Effect |
|
|
39
|
+
| ------- | --------- | ------- | ----------------------------------------------------------- |
|
|
40
|
+
| `block` | `boolean` | `false` | `<pre tabindex="0"><code>` block instead of inline `<code>` |
|
|
41
|
+
|
|
42
|
+
The block is a tab stop so keyboard users can scroll long lines. It does not highlight syntax; for highlighted listings in Astro, use Expressive Code like the source panels on this page.
|
|
43
|
+
|
|
44
|
+
## API
|
|
45
|
+
|
|
46
|
+
Generated from the component sources. Every component also takes `class`, `style` and the other attributes Vue falls through.
|
|
47
|
+
|
|
48
|
+
### NwCode
|
|
49
|
+
|
|
50
|
+
| Prop | Type | Default | Description |
|
|
51
|
+
| --- | --- | --- | --- |
|
|
52
|
+
| `block` | `boolean` | | |
|
|
53
|
+
|
|
54
|
+
| Slot | Props |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `default` | |
|