@ostack.tech/ui 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/README.md +3 -0
- package/dist/ostack-ui.cjs +11095 -0
- package/dist/ostack-ui.cjs.map +1 -0
- package/dist/ostack-ui.css +4191 -0
- package/dist/ostack-ui.css.map +1 -0
- package/dist/ostack-ui.js +11077 -0
- package/dist/ostack-ui.js.map +1 -0
- package/dist/types/components/Alert/Alert.d.ts +82 -0
- package/dist/types/components/Alert/AlertTitle.d.ts +12 -0
- package/dist/types/components/Alert/index.d.ts +2 -0
- package/dist/types/components/AlertDialog/AlertDialog.d.ts +81 -0
- package/dist/types/components/AlertDialog/AlertDialogAction.d.ts +10 -0
- package/dist/types/components/AlertDialog/AlertDialogBody.d.ts +7 -0
- package/dist/types/components/AlertDialog/AlertDialogCancel.d.ts +10 -0
- package/dist/types/components/AlertDialog/AlertDialogContent.d.ts +45 -0
- package/dist/types/components/AlertDialog/AlertDialogDescription.d.ts +14 -0
- package/dist/types/components/AlertDialog/AlertDialogFooter.d.ts +7 -0
- package/dist/types/components/AlertDialog/AlertDialogHeader.d.ts +7 -0
- package/dist/types/components/AlertDialog/AlertDialogTitle.d.ts +7 -0
- package/dist/types/components/AlertDialog/AlertDialogTrigger.d.ts +7 -0
- package/dist/types/components/AlertDialog/index.d.ts +10 -0
- package/dist/types/components/Button/Button.d.ts +111 -0
- package/dist/types/components/Button/index.d.ts +1 -0
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +32 -0
- package/dist/types/components/ButtonGroup/index.d.ts +1 -0
- package/dist/types/components/Calendar/Calendar.d.ts +41 -0
- package/dist/types/components/Calendar/CalendarContext.d.ts +18 -0
- package/dist/types/components/Calendar/CalendarDay.d.ts +11 -0
- package/dist/types/components/Calendar/CalendarMonthCaption.d.ts +9 -0
- package/dist/types/components/Calendar/index.d.ts +1 -0
- package/dist/types/components/Card/Card.d.ts +70 -0
- package/dist/types/components/Card/CardBody.d.ts +12 -0
- package/dist/types/components/Card/CardFooter.d.ts +12 -0
- package/dist/types/components/Card/CardHeader.d.ts +12 -0
- package/dist/types/components/Card/CardTitle.d.ts +19 -0
- package/dist/types/components/Card/index.d.ts +5 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +67 -0
- package/dist/types/components/Checkbox/index.d.ts +1 -0
- package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts +85 -0
- package/dist/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +8 -0
- package/dist/types/components/CheckboxGroup/index.d.ts +1 -0
- package/dist/types/components/ClearContexts/ClearContexts.d.ts +31 -0
- package/dist/types/components/ClearContexts/index.d.ts +1 -0
- package/dist/types/components/CloseButton/CloseButton.d.ts +7 -0
- package/dist/types/components/CloseButton/index.d.ts +1 -0
- package/dist/types/components/Code/Code.d.ts +35 -0
- package/dist/types/components/Code/index.d.ts +1 -0
- package/dist/types/components/Collapsible/Collapsible.d.ts +25 -0
- package/dist/types/components/Collapsible/CollapsibleContent.d.ts +7 -0
- package/dist/types/components/Collapsible/CollapsibleContext.d.ts +11 -0
- package/dist/types/components/Collapsible/CollapsibleTrigger.d.ts +10 -0
- package/dist/types/components/Collapsible/index.d.ts +3 -0
- package/dist/types/components/CommandMenu/CommandMenu.d.ts +91 -0
- package/dist/types/components/CommandMenu/CommandMenuDialog.d.ts +45 -0
- package/dist/types/components/CommandMenu/CommandMenuGroup.d.ts +9 -0
- package/dist/types/components/CommandMenu/CommandMenuItem.d.ts +13 -0
- package/dist/types/components/CommandMenu/index.d.ts +4 -0
- package/dist/types/components/Container/Container.d.ts +66 -0
- package/dist/types/components/Container/index.d.ts +1 -0
- package/dist/types/components/ControlAddon/ControlAddon.d.ts +36 -0
- package/dist/types/components/ControlAddon/index.d.ts +1 -0
- package/dist/types/components/ControlCode/ControlCode.d.ts +22 -0
- package/dist/types/components/ControlCode/index.d.ts +1 -0
- package/dist/types/components/DataTable/DataTable.d.ts +256 -0
- package/dist/types/components/DataTable/DataTableApi.d.ts +37 -0
- package/dist/types/components/DataTable/DataTableBody.d.ts +9 -0
- package/dist/types/components/DataTable/DataTableCell.d.ts +9 -0
- package/dist/types/components/DataTable/DataTableColumn.d.ts +70 -0
- package/dist/types/components/DataTable/DataTableContent.d.ts +28 -0
- package/dist/types/components/DataTable/DataTableContext.d.ts +141 -0
- package/dist/types/components/DataTable/DataTableEmptyOrLoadingRows.d.ts +9 -0
- package/dist/types/components/DataTable/DataTableFilter.d.ts +7 -0
- package/dist/types/components/DataTable/DataTableFoot.d.ts +8 -0
- package/dist/types/components/DataTable/DataTableHead.d.ts +7 -0
- package/dist/types/components/DataTable/DataTablePagination.d.ts +18 -0
- package/dist/types/components/DataTable/DataTableRow.d.ts +11 -0
- package/dist/types/components/DataTable/DataTableRowsPerPage.d.ts +19 -0
- package/dist/types/components/DataTable/DataTableSelectionTrigger.d.ts +21 -0
- package/dist/types/components/DataTable/PagedDataTablePagination.d.ts +7 -0
- package/dist/types/components/DataTable/PagedDataTableRows.d.ts +2 -0
- package/dist/types/components/DataTable/ScrolledDataTablePagination.d.ts +7 -0
- package/dist/types/components/DataTable/ScrolledDataTableRows.d.ts +7 -0
- package/dist/types/components/DataTable/getRowKey.d.ts +4 -0
- package/dist/types/components/DataTable/index.d.ts +12 -0
- package/dist/types/components/DataTable/spliceWindow.d.ts +24 -0
- package/dist/types/components/DataTable/transformRows.d.ts +10 -0
- package/dist/types/components/DataTable/useDataTableSelectionColumn.d.ts +4 -0
- package/dist/types/components/DateInput/DateInput.d.ts +87 -0
- package/dist/types/components/DateInput/index.d.ts +1 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +27 -0
- package/dist/types/components/DatePicker/index.d.ts +1 -0
- package/dist/types/components/DateRangeInput/DateRangeInput.d.ts +197 -0
- package/dist/types/components/DateRangeInput/index.d.ts +1 -0
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +41 -0
- package/dist/types/components/DateRangePicker/index.d.ts +1 -0
- package/dist/types/components/Dialog/Dialog.d.ts +68 -0
- package/dist/types/components/Dialog/DialogBody.d.ts +7 -0
- package/dist/types/components/Dialog/DialogClose.d.ts +7 -0
- package/dist/types/components/Dialog/DialogContent.d.ts +45 -0
- package/dist/types/components/Dialog/DialogDescription.d.ts +13 -0
- package/dist/types/components/Dialog/DialogFooter.d.ts +7 -0
- package/dist/types/components/Dialog/DialogHeader.d.ts +16 -0
- package/dist/types/components/Dialog/DialogTitle.d.ts +7 -0
- package/dist/types/components/Dialog/DialogTrigger.d.ts +7 -0
- package/dist/types/components/Dialog/index.d.ts +9 -0
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +65 -0
- package/dist/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +24 -0
- package/dist/types/components/DropdownMenu/DropdownMenuContent.d.ts +20 -0
- package/dist/types/components/DropdownMenu/DropdownMenuGroup.d.ts +8 -0
- package/dist/types/components/DropdownMenu/DropdownMenuItem.d.ts +15 -0
- package/dist/types/components/DropdownMenu/DropdownMenuRadioGroup.d.ts +8 -0
- package/dist/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +16 -0
- package/dist/types/components/DropdownMenu/DropdownMenuSub.d.ts +3 -0
- package/dist/types/components/DropdownMenu/DropdownMenuSubContent.d.ts +13 -0
- package/dist/types/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +11 -0
- package/dist/types/components/DropdownMenu/DropdownMenuTrigger.d.ts +7 -0
- package/dist/types/components/DropdownMenu/index.d.ts +11 -0
- package/dist/types/components/ErrorBoundary/ErrorBoundary.d.ts +97 -0
- package/dist/types/components/ErrorBoundary/index.d.ts +2 -0
- package/dist/types/components/ErrorBoundary/useErrorBoundary.d.ts +1 -0
- package/dist/types/components/Feedback/Feedback.d.ts +22 -0
- package/dist/types/components/Feedback/index.d.ts +1 -0
- package/dist/types/components/FeedbackList/FeedbackList.d.ts +6 -0
- package/dist/types/components/FeedbackList/FeedbackListContext.d.ts +5 -0
- package/dist/types/components/FeedbackList/index.d.ts +2 -0
- package/dist/types/components/FeedbackPopover/FeedbackPopover.d.ts +34 -0
- package/dist/types/components/FeedbackPopover/FeedbackPopoverContext.d.ts +11 -0
- package/dist/types/components/FeedbackPopover/index.d.ts +2 -0
- package/dist/types/components/Field/Field.d.ts +20 -0
- package/dist/types/components/Field/FieldContext.d.ts +86 -0
- package/dist/types/components/Field/index.d.ts +2 -0
- package/dist/types/components/FieldGroup/FieldGroup.d.ts +30 -0
- package/dist/types/components/FieldGroup/FieldGroupBody.d.ts +12 -0
- package/dist/types/components/FieldGroup/FieldGroupContext.d.ts +10 -0
- package/dist/types/components/FieldGroup/FieldGroupHeader.d.ts +18 -0
- package/dist/types/components/FieldGroup/FieldGroupTitle.d.ts +19 -0
- package/dist/types/components/FieldGroup/index.d.ts +4 -0
- package/dist/types/components/Grid/Grid.d.ts +90 -0
- package/dist/types/components/Grid/index.d.ts +1 -0
- package/dist/types/components/Heading/Heading.d.ts +34 -0
- package/dist/types/components/Heading/index.d.ts +1 -0
- package/dist/types/components/HelperText/HelperText.d.ts +12 -0
- package/dist/types/components/HelperText/index.d.ts +1 -0
- package/dist/types/components/Icon/Icon.d.ts +57 -0
- package/dist/types/components/Icon/index.d.ts +1 -0
- package/dist/types/components/IconButton/IconButton.d.ts +101 -0
- package/dist/types/components/IconButton/index.d.ts +1 -0
- package/dist/types/components/Input/Input.d.ts +92 -0
- package/dist/types/components/Input/InputWithContainerRef.d.ts +14 -0
- package/dist/types/components/Input/index.d.ts +2 -0
- package/dist/types/components/Keyboard/Keyboard.d.ts +15 -0
- package/dist/types/components/Keyboard/index.d.ts +1 -0
- package/dist/types/components/Label/Label.d.ts +47 -0
- package/dist/types/components/Label/index.d.ts +1 -0
- package/dist/types/components/Link/Link.d.ts +58 -0
- package/dist/types/components/Link/LinkContext.d.ts +15 -0
- package/dist/types/components/Link/index.d.ts +1 -0
- package/dist/types/components/Mark/Mark.d.ts +41 -0
- package/dist/types/components/Mark/index.d.ts +1 -0
- package/dist/types/components/MenuList/MenuList.d.ts +48 -0
- package/dist/types/components/MenuList/MenuListContext.d.ts +11 -0
- package/dist/types/components/MenuList/MenuListGroup.d.ts +24 -0
- package/dist/types/components/MenuList/MenuListItem.d.ts +86 -0
- package/dist/types/components/MenuList/index.d.ts +3 -0
- package/dist/types/components/NumericInput/NumericInput.d.ts +86 -0
- package/dist/types/components/NumericInput/index.d.ts +1 -0
- package/dist/types/components/Output/Output.d.ts +25 -0
- package/dist/types/components/Output/index.d.ts +1 -0
- package/dist/types/components/Overlay/Overlay.d.ts +6 -0
- package/dist/types/components/Overlay/index.d.ts +1 -0
- package/dist/types/components/Popover/Popover.d.ts +27 -0
- package/dist/types/components/Popover/PopoverAnchor.d.ts +6 -0
- package/dist/types/components/Popover/PopoverClose.d.ts +7 -0
- package/dist/types/components/Popover/PopoverContent.d.ts +17 -0
- package/dist/types/components/Popover/PopoverTrigger.d.ts +10 -0
- package/dist/types/components/Popover/index.d.ts +5 -0
- package/dist/types/components/Portal/Portal.d.ts +13 -0
- package/dist/types/components/Portal/PortalContext.d.ts +10 -0
- package/dist/types/components/Portal/index.d.ts +2 -0
- package/dist/types/components/RadioGroup/Radio.d.ts +36 -0
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +83 -0
- package/dist/types/components/RadioGroup/index.d.ts +2 -0
- package/dist/types/components/Root/Root.d.ts +121 -0
- package/dist/types/components/Root/RootContext.d.ts +8 -0
- package/dist/types/components/Root/index.d.ts +2 -0
- package/dist/types/components/Select/Option.d.ts +13 -0
- package/dist/types/components/Select/OptionsGroup.d.ts +7 -0
- package/dist/types/components/Select/Select.d.ts +117 -0
- package/dist/types/components/Select/SelectContext.d.ts +61 -0
- package/dist/types/components/Select/SelectMultipleValue.d.ts +1 -0
- package/dist/types/components/Select/SelectSingleValue.d.ts +1 -0
- package/dist/types/components/Select/index.d.ts +3 -0
- package/dist/types/components/Separator/Separator.d.ts +7 -0
- package/dist/types/components/Separator/index.d.ts +1 -0
- package/dist/types/components/Slot/Slot.d.ts +7 -0
- package/dist/types/components/Slot/Slottable.d.ts +10 -0
- package/dist/types/components/Slot/index.d.ts +2 -0
- package/dist/types/components/Spinner/Spinner.d.ts +47 -0
- package/dist/types/components/Spinner/index.d.ts +1 -0
- package/dist/types/components/Stack/Stack.d.ts +42 -0
- package/dist/types/components/Stack/index.d.ts +1 -0
- package/dist/types/components/Stepper/Step.d.ts +17 -0
- package/dist/types/components/Stepper/StepContent.d.ts +9 -0
- package/dist/types/components/Stepper/StepList.d.ts +12 -0
- package/dist/types/components/Stepper/Stepper.d.ts +59 -0
- package/dist/types/components/Stepper/StepperContext.d.ts +9 -0
- package/dist/types/components/Stepper/index.d.ts +4 -0
- package/dist/types/components/Table/Table.d.ts +122 -0
- package/dist/types/components/Table/TableBody.d.ts +6 -0
- package/dist/types/components/Table/TableCell.d.ts +45 -0
- package/dist/types/components/Table/TableColumn.d.ts +83 -0
- package/dist/types/components/Table/TableContext.d.ts +60 -0
- package/dist/types/components/Table/TableFoot.d.ts +12 -0
- package/dist/types/components/Table/TableHead.d.ts +23 -0
- package/dist/types/components/Table/TableRow.d.ts +10 -0
- package/dist/types/components/Table/index.d.ts +8 -0
- package/dist/types/components/Tabs/Tab.d.ts +14 -0
- package/dist/types/components/Tabs/TabContent.d.ts +9 -0
- package/dist/types/components/Tabs/TabList.d.ts +11 -0
- package/dist/types/components/Tabs/Tabs.d.ts +51 -0
- package/dist/types/components/Tabs/TabsContext.d.ts +34 -0
- package/dist/types/components/Tabs/index.d.ts +4 -0
- package/dist/types/components/Tag/Badge.d.ts +21 -0
- package/dist/types/components/Tag/Tag.d.ts +92 -0
- package/dist/types/components/Tag/index.d.ts +2 -0
- package/dist/types/components/TextArea/TextArea.d.ts +21 -0
- package/dist/types/components/TextArea/index.d.ts +1 -0
- package/dist/types/components/Toast/Toast.d.ts +79 -0
- package/dist/types/components/Toast/ToastDescription.d.ts +3 -0
- package/dist/types/components/Toast/ToastProvider.d.ts +12 -0
- package/dist/types/components/Toast/ToastTitle.d.ts +7 -0
- package/dist/types/components/Toast/ToastViewport.d.ts +10 -0
- package/dist/types/components/Toast/index.d.ts +5 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +55 -0
- package/dist/types/components/Tooltip/TooltipProvider.d.ts +3 -0
- package/dist/types/components/Tooltip/index.d.ts +2 -0
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +3 -0
- package/dist/types/components/VisuallyHidden/index.d.ts +1 -0
- package/dist/types/index.d.ts +96 -0
- package/dist/types/locale/LocalizationObject.d.ts +49 -0
- package/dist/types/locale/defaultLocale.d.ts +3 -0
- package/dist/types/locale/en-GB.d.ts +3 -0
- package/dist/types/locale/en-US.d.ts +3 -0
- package/dist/types/locale/en.d.ts +3 -0
- package/dist/types/locale/fr-FR.d.ts +3 -0
- package/dist/types/locale/index.d.ts +6 -0
- package/dist/types/locale/pt-PT.d.ts +3 -0
- package/dist/types/providers/AlertDialogProvider/AlertDialogProvider.d.ts +7 -0
- package/dist/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +97 -0
- package/dist/types/providers/AlertDialogProvider/index.d.ts +3 -0
- package/dist/types/providers/AlertDialogProvider/useAlertDialog.d.ts +68 -0
- package/dist/types/providers/DocumentTitleProvider/DocumentTitle.d.ts +12 -0
- package/dist/types/providers/DocumentTitleProvider/DocumentTitleProvider.d.ts +25 -0
- package/dist/types/providers/DocumentTitleProvider/DocumentTitleProviderContext.d.ts +44 -0
- package/dist/types/providers/DocumentTitleProvider/index.d.ts +2 -0
- package/dist/types/providers/ErrorReportingProvider/ErrorReport.d.ts +35 -0
- package/dist/types/providers/ErrorReportingProvider/ErrorReportingContext.d.ts +7 -0
- package/dist/types/providers/ErrorReportingProvider/ErrorReportingProvider.d.ts +70 -0
- package/dist/types/providers/ErrorReportingProvider/index.d.ts +4 -0
- package/dist/types/providers/ErrorReportingProvider/useErrorReporter.d.ts +3 -0
- package/dist/types/providers/LocalizationProvider/LocalizationContext.d.ts +6 -0
- package/dist/types/providers/LocalizationProvider/LocalizationProvider.d.ts +10 -0
- package/dist/types/providers/LocalizationProvider/index.d.ts +3 -0
- package/dist/types/providers/LocalizationProvider/useLocale.d.ts +3 -0
- package/dist/types/providers/PrefixProvider/PrefixContext.d.ts +5 -0
- package/dist/types/providers/PrefixProvider/PrefixProvider.d.ts +9 -0
- package/dist/types/providers/PrefixProvider/index.d.ts +3 -0
- package/dist/types/providers/PrefixProvider/usePrefix.d.ts +10 -0
- package/dist/types/providers/ToastManagerProvider/ToastManagerContext.d.ts +35 -0
- package/dist/types/providers/ToastManagerProvider/ToastManagerProvider.d.ts +11 -0
- package/dist/types/providers/ToastManagerProvider/index.d.ts +3 -0
- package/dist/types/providers/ToastManagerProvider/useToastManager.d.ts +23 -0
- package/dist/types/utils/accent.d.ts +2 -0
- package/dist/types/utils/boolDataAttr.d.ts +4 -0
- package/dist/types/utils/breakpoints.d.ts +32 -0
- package/dist/types/utils/changeCase.d.ts +2 -0
- package/dist/types/utils/combineEventHandlers.d.ts +24 -0
- package/dist/types/utils/control.d.ts +23 -0
- package/dist/types/utils/cx.d.ts +14 -0
- package/dist/types/utils/filtering.d.ts +14 -0
- package/dist/types/utils/keyboardShortcut.d.ts +111 -0
- package/dist/types/utils/mergeAriaIds.d.ts +2 -0
- package/dist/types/utils/nativeControls.d.ts +2 -0
- package/dist/types/utils/numericStringUtils.d.ts +27 -0
- package/dist/types/utils/parseDateStrict.d.ts +7 -0
- package/dist/types/utils/promiseUtils.d.ts +7 -0
- package/dist/types/utils/setNativeValue.d.ts +7 -0
- package/dist/types/utils/sorting.d.ts +9 -0
- package/dist/types/utils/stringHash.d.ts +7 -0
- package/dist/types/utils/typeUtils.d.ts +2 -0
- package/dist/types/utils/useCombinedRef.d.ts +9 -0
- package/dist/types/utils/useConstant.d.ts +7 -0
- package/dist/types/utils/useControllableState.d.ts +3 -0
- package/dist/types/utils/useCssVars.d.ts +47 -0
- package/dist/types/utils/useDateTransformer.d.ts +53 -0
- package/dist/types/utils/useIntersectionObserver.d.ts +5 -0
- package/dist/types/utils/useLatestValues.d.ts +8 -0
- package/dist/types/utils/useLayoutEffect.d.ts +3 -0
- package/dist/types/utils/useMeasure.d.ts +5 -0
- package/dist/types/utils/useMediaQuery.d.ts +12 -0
- package/dist/types/utils/useNumericTransformer.d.ts +60 -0
- package/dist/types/utils/useResponsiveValues.d.ts +31 -0
- package/dist/types/utils/useScrollPosition.d.ts +15 -0
- package/dist/types/utils/useScrollbarSize.d.ts +8 -0
- package/dist/types/utils/useSpacing.d.ts +7 -0
- package/dist/types/utils/warnOnce.d.ts +6 -0
- package/dist/types/utils/zustandUtils.d.ts +4 -0
- package/package.json +75 -0
- package/scss/_utils.scss +59 -0
- package/scss/components/Alert/_Alert-variables.scss +5 -0
- package/scss/components/Alert/_Alert.scss +56 -0
- package/scss/components/Button/_Button-variables.scss +164 -0
- package/scss/components/Button/_Button.scss +136 -0
- package/scss/components/ButtonGroup/_ButtonGroup-variables.scss +41 -0
- package/scss/components/ButtonGroup/_ButtonGroup.scss +48 -0
- package/scss/components/Calendar/_Calendar-variables.scss +127 -0
- package/scss/components/Calendar/_Calendar.scss +341 -0
- package/scss/components/Card/_Card-variables.scss +202 -0
- package/scss/components/Card/_Card.scss +253 -0
- package/scss/components/Checkbox/_Checkbox-variables.scss +25 -0
- package/scss/components/Checkbox/_Checkbox.scss +106 -0
- package/scss/components/CheckboxGroup/_CheckboxGroup.scss +68 -0
- package/scss/components/CloseButton/_CloseButton-variables.scss +2 -0
- package/scss/components/CloseButton/_CloseButton.scss +14 -0
- package/scss/components/Code/_Code-variables.scss +16 -0
- package/scss/components/Code/_Code.scss +30 -0
- package/scss/components/Collapsible/_Collapsible-variables.scss +5 -0
- package/scss/components/Collapsible/_Collapsible.scss +56 -0
- package/scss/components/CommandMenu/_CommandMenu-variables.scss +66 -0
- package/scss/components/CommandMenu/_CommandMenu.scss +162 -0
- package/scss/components/Container/_Container-variables.scss +21 -0
- package/scss/components/Container/_Container.scss +46 -0
- package/scss/components/ControlAddon/_ControlAddon-variables.scss +303 -0
- package/scss/components/ControlAddon/_ControlAddon.scss +331 -0
- package/scss/components/ControlCode/_ControlCode-variables.scss +61 -0
- package/scss/components/ControlCode/_ControlCode.scss +68 -0
- package/scss/components/DataTable/_DataTable.scss +134 -0
- package/scss/components/DateInput/_DateInput.scss +11 -0
- package/scss/components/DateRangeInput/_DateRangeInput-variables.scss +37 -0
- package/scss/components/DateRangeInput/_DateRangeInput.scss +130 -0
- package/scss/components/Dialog/_Dialog-variables.scss +195 -0
- package/scss/components/Dialog/_Dialog.scss +142 -0
- package/scss/components/DropdownMenu/_DropdownMenu-variables.scss +3 -0
- package/scss/components/DropdownMenu/_DropdownMenu.scss +50 -0
- package/scss/components/Feedback/_Feedback-variables.scss +8 -0
- package/scss/components/Feedback/_Feedback.scss +21 -0
- package/scss/components/FeedbackList/_FeedbackList-variables.scss +6 -0
- package/scss/components/FeedbackList/_FeedbackList.scss +31 -0
- package/scss/components/FeedbackPopover/_FeedbackPopover-variables.scss +26 -0
- package/scss/components/FeedbackPopover/_FeedbackPopover.scss +66 -0
- package/scss/components/Field/_Field.scss +51 -0
- package/scss/components/FieldGroup/_FieldGroup-variables.scss +31 -0
- package/scss/components/FieldGroup/_FieldGroup.scss +68 -0
- package/scss/components/Grid/_Grid.scss +101 -0
- package/scss/components/Heading/_Heading-variables.scss +78 -0
- package/scss/components/Heading/_Heading.scss +22 -0
- package/scss/components/HelperText/_HelperText-variables.scss +7 -0
- package/scss/components/HelperText/_HelperText.scss +18 -0
- package/scss/components/Icon/_Icon-variables.scss +3 -0
- package/scss/components/Icon/_Icon.scss +17 -0
- package/scss/components/IconButton/_IconButton-variables.scss +34 -0
- package/scss/components/IconButton/_IconButton.scss +41 -0
- package/scss/components/Input/_Input-variables.scss +6 -0
- package/scss/components/Input/_Input.scss +235 -0
- package/scss/components/Keyboard/_Keyboard.scss +17 -0
- package/scss/components/Label/_Label-variables.scss +26 -0
- package/scss/components/Label/_Label.scss +63 -0
- package/scss/components/Link/_Link-variables.scss +46 -0
- package/scss/components/Link/_Link.scss +63 -0
- package/scss/components/Mark/_Mark-variables.scss +8 -0
- package/scss/components/Mark/_Mark.scss +11 -0
- package/scss/components/MenuList/_MenuList.scss +86 -0
- package/scss/components/Output/_Output.scss +5 -0
- package/scss/components/Overlay/_Overlay-variables.scss +14 -0
- package/scss/components/Overlay/_Overlay.scss +32 -0
- package/scss/components/Popover/_Popover.scss +10 -0
- package/scss/components/RadioGroup/_Radio-variables.scss +1 -0
- package/scss/components/RadioGroup/_Radio.scss +49 -0
- package/scss/components/RadioGroup/_RadioGroup.scss +74 -0
- package/scss/components/Root/_Root-variables.scss +10 -0
- package/scss/components/Root/_Root.scss +107 -0
- package/scss/components/Select/_Select-variables.scss +101 -0
- package/scss/components/Select/_Select.scss +167 -0
- package/scss/components/Separator/_Separator.scss +16 -0
- package/scss/components/Spinner/_Spinner-variables.scss +3 -0
- package/scss/components/Spinner/_Spinner.scss +18 -0
- package/scss/components/Stack/_Stack-variables.scss +4 -0
- package/scss/components/Stack/_Stack.scss +47 -0
- package/scss/components/Stepper/_Stepper-variables.scss +38 -0
- package/scss/components/Stepper/_Stepper.scss +86 -0
- package/scss/components/Table/_Table-variables.scss +471 -0
- package/scss/components/Table/_Table.scss +632 -0
- package/scss/components/Tabs/_Tabs-variables.scss +403 -0
- package/scss/components/Tabs/_Tabs.scss +443 -0
- package/scss/components/Tag/_Tag-variables.scss +37 -0
- package/scss/components/Tag/_Tag.scss +86 -0
- package/scss/components/Toast/_Toast.scss +181 -0
- package/scss/components/Tooltip/_Tooltip-variables.scss +21 -0
- package/scss/components/Tooltip/_Tooltip.scss +44 -0
- package/scss/index.scss +57 -0
- package/scss/scss/_base-variables.scss +501 -0
- package/scss/scss/_colors.scss +188 -0
- package/scss/scss/helpers/_visually-hidden.scss +18 -0
- package/scss/scss/placeholders/_calendar-popover.scss +16 -0
- package/scss/scss/placeholders/button/_button-variables.scss +254 -0
- package/scss/scss/placeholders/button/_button.scss +153 -0
- package/scss/scss/placeholders/checkable/_checkable-variables.scss +78 -0
- package/scss/scss/placeholders/checkable/_checkable.scss +354 -0
- package/scss/scss/placeholders/checkable-group/_checkable-group-variables.scss +43 -0
- package/scss/scss/placeholders/checkable-group/_checkable-group.scss +141 -0
- package/scss/scss/placeholders/control/_control-variables.scss +300 -0
- package/scss/scss/placeholders/control/_control.scss +372 -0
- package/scss/scss/placeholders/menu/_menu-variables.scss +325 -0
- package/scss/scss/placeholders/menu/_menu.scss +364 -0
- package/scss/scss/placeholders/notification/_notification-variables.scss +76 -0
- package/scss/scss/placeholders/notification/_notification.scss +83 -0
- package/scss/scss/placeholders/popover/_popover-variables.scss +22 -0
- package/scss/scss/placeholders/popover/_popover.scss +70 -0
- package/scss/scss/utils/_animation.scss +125 -0
- package/scss/scss/utils/_breakpoints.scss +64 -0
- package/scss/scss/utils/_button-reset.scss +17 -0
- package/scss/scss/utils/_css-color-functions.scss +15 -0
- package/scss/scss/utils/_declare-var.scss +8 -0
- package/scss/scss/utils/_maybe-important.scss +5 -0
- package/scss/scss/utils/_responsive-values.scss +28 -0
- package/scss/scss/utils/_space-toggle.scss +25 -0
- package/scss/scss/utils/_spacing.scss +12 -0
- package/scss/scss/utils/_spinner.scss +31 -0
- package/scss/scss/utils/_transition.scss +15 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CardFooter } from "../Card";
|
|
3
|
+
/** Properties of the dialog footer component. */
|
|
4
|
+
export interface DialogFooterProps extends React.ComponentPropsWithoutRef<typeof CardFooter> {
|
|
5
|
+
}
|
|
6
|
+
/** Footer section of the dialog. */
|
|
7
|
+
export declare const DialogFooter: React.ForwardRefExoticComponent<DialogFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CardHeader } from "../Card";
|
|
3
|
+
import { CloseButton } from "../CloseButton";
|
|
4
|
+
/** Properties of the dialog header component. */
|
|
5
|
+
export interface DialogHeaderProps extends React.ComponentPropsWithoutRef<typeof CardHeader> {
|
|
6
|
+
/**
|
|
7
|
+
* Whether to show a close button.
|
|
8
|
+
*
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
showCloseButton?: boolean;
|
|
12
|
+
/** Properties to pass to the close button component. */
|
|
13
|
+
closeButtonProps?: React.ComponentPropsWithRef<typeof CloseButton>;
|
|
14
|
+
}
|
|
15
|
+
/** Header section of the dialog. */
|
|
16
|
+
export declare const DialogHeader: React.ForwardRefExoticComponent<DialogHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/** Properties of the dialog title component. */
|
|
4
|
+
export interface DialogTitleProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> {
|
|
5
|
+
}
|
|
6
|
+
/** Accessible title to be announced when the dialog is opened. */
|
|
7
|
+
export declare const DialogTitle: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/** Properties of the dialog trigger component. */
|
|
4
|
+
export interface DialogTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>, "asChild"> {
|
|
5
|
+
}
|
|
6
|
+
/** The button which, when pressed, opens the dialog. */
|
|
7
|
+
export declare const DialogTrigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./Dialog.tsx";
|
|
2
|
+
export * from "./DialogBody.tsx";
|
|
3
|
+
export * from "./DialogClose.tsx";
|
|
4
|
+
export * from "./DialogContent.tsx";
|
|
5
|
+
export * from "./DialogDescription.tsx";
|
|
6
|
+
export * from "./DialogFooter.tsx";
|
|
7
|
+
export * from "./DialogHeader.tsx";
|
|
8
|
+
export * from "./DialogTitle.tsx";
|
|
9
|
+
export * from "./DialogTrigger.tsx";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
/** Properties of the dropdown menu component. */
|
|
4
|
+
export interface DropdownMenuProps extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root>, "dir"> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Menu displayed within a dropdown, containing a set of actions.
|
|
8
|
+
*
|
|
9
|
+
* Built on top of the [Radix Dropdown Menu
|
|
10
|
+
* primitive](https://www.radix-ui.com/primitives/docs/components/dropdown-menu)
|
|
11
|
+
* and the `MenuList` component.
|
|
12
|
+
*
|
|
13
|
+
* It composes the following subcomponents:
|
|
14
|
+
*
|
|
15
|
+
* - `DropdownMenuTrigger`: Contains the element that triggers the dropdown menu.
|
|
16
|
+
* - `DropdownMenuContent`: Represents the menu itself. It appears once the
|
|
17
|
+
* trigger is pressed.
|
|
18
|
+
* - `DropdownMenuGroup`: Groups items under an optional label.
|
|
19
|
+
* - `DropdownMenuItem`: An item of the dropdown menu.
|
|
20
|
+
* - `DropdownMenuCheckboxItem`: An item that can be controlled and rendered like
|
|
21
|
+
* a checkbox.
|
|
22
|
+
* - `DropdownMenuRadioGroup`: Used to group multiple radio items.
|
|
23
|
+
* - `DropdownMenuRadioItem`: An item that can be controlled and rendered like a
|
|
24
|
+
* radio.
|
|
25
|
+
* - `DropdownMenuSub`: Container of a submenu.
|
|
26
|
+
* - `DropdownMenuSubTrigger`: An item that opens a submenu. Must be rendered
|
|
27
|
+
* inside a submenu container.
|
|
28
|
+
* - `DropdownMenuSubContent`: Content of a submenu. Must be rendered inside a
|
|
29
|
+
* submenu container.
|
|
30
|
+
*
|
|
31
|
+
* Example usage:
|
|
32
|
+
*
|
|
33
|
+
* ```tsx
|
|
34
|
+
* import {
|
|
35
|
+
* Button,
|
|
36
|
+
* DropdownMenu,
|
|
37
|
+
* DropdownMenuContent,
|
|
38
|
+
* DropdownMenuItem,
|
|
39
|
+
* DropdownMenuTrigger,
|
|
40
|
+
* } from "@ostack.tech/ui";
|
|
41
|
+
*
|
|
42
|
+
* function ActionsMenu() {
|
|
43
|
+
* return (
|
|
44
|
+
* <DropdownMenu>
|
|
45
|
+
* <DropdownMenuTrigger>
|
|
46
|
+
* <Button>Actions</Button>
|
|
47
|
+
* </DropdownMenuTrigger>
|
|
48
|
+
*
|
|
49
|
+
* <DropdownMenuContent>
|
|
50
|
+
* <DropdownMenuItem onSelect={openDocument}>
|
|
51
|
+
* Open…
|
|
52
|
+
* </DropdownMenuItem>
|
|
53
|
+
* <DropdownMenuItem onSelect={editDocument}>
|
|
54
|
+
* Edit…
|
|
55
|
+
* </DropdownMenuItem>
|
|
56
|
+
* <DropdownMenuItem onSelect={printDocument}>
|
|
57
|
+
* Print…
|
|
58
|
+
* </DropdownMenuItem>
|
|
59
|
+
* </DropdownMenuContent>
|
|
60
|
+
* </DropdownMenu>
|
|
61
|
+
* );
|
|
62
|
+
* }
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export declare const DropdownMenu: React.ComponentType<DropdownMenuProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type CheckboxChecked } from "../Checkbox";
|
|
4
|
+
import { Icon } from "../Icon";
|
|
5
|
+
import { type MenuListItemProps } from "../MenuList";
|
|
6
|
+
/** Properties of the dropdown menu checkbox item. */
|
|
7
|
+
export interface DropdownMenuCheckboxItemProps extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>, "asChild" | "color">, Pick<MenuListItemProps, "color" | "loading" | "enabledWhenLoading" | "loadingContent" | "iconPlacement" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps"> {
|
|
8
|
+
/**
|
|
9
|
+
* Whether to show the checkbox.
|
|
10
|
+
*
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
showCheckbox?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Function called whenever the item's checked status changes.
|
|
16
|
+
*
|
|
17
|
+
* @param value Checked status.
|
|
18
|
+
*/
|
|
19
|
+
onCheckedChange?: (value: CheckboxChecked) => void;
|
|
20
|
+
/** Properties to pass to the checkbox indicator component. */
|
|
21
|
+
indicatorProps?: Omit<React.ComponentPropsWithRef<typeof Icon>, "icon">;
|
|
22
|
+
}
|
|
23
|
+
/** A dropdown menu item that can be controlled and rendered like a checkbox. */
|
|
24
|
+
export declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { MenuList, type MenuListProps } from "../MenuList";
|
|
4
|
+
/** Properties of the dropdown menu content component. */
|
|
5
|
+
export interface DropdownMenuContentProps extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>, "asChild">, Pick<MenuListProps, "variant" | "iconPlacement"> {
|
|
6
|
+
/**
|
|
7
|
+
* Whether to show an arrow pointing to the anchor.
|
|
8
|
+
*
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
showArrow?: boolean;
|
|
12
|
+
/** Properties to pass to the portal component. */
|
|
13
|
+
portalProps?: Omit<React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.Portal>, "forceMount">;
|
|
14
|
+
/** Properties to pass to the arrow component. */
|
|
15
|
+
arrowProps?: React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.Arrow>;
|
|
16
|
+
/** Properties to pass to the menu list component. */
|
|
17
|
+
menuListProps?: Omit<React.ComponentPropsWithRef<typeof MenuList>, "variant" | "iconPlacement" | "asChild">;
|
|
18
|
+
}
|
|
19
|
+
/** The component that pops out when the dropdown menu is open. */
|
|
20
|
+
export declare const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type MenuListGroupProps } from "../MenuList/MenuListGroup.tsx";
|
|
4
|
+
/** Properties of the dropdown menu group. */
|
|
5
|
+
export interface DropdownMenuGroupProps extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>, "asChild">, Pick<MenuListGroupProps, "label" | "itemProps" | "labelProps"> {
|
|
6
|
+
}
|
|
7
|
+
/** Component used to group multiple dropdown menu items. */
|
|
8
|
+
export declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type MenuListItemProps } from "../MenuList";
|
|
4
|
+
/** Properties of the dropdown menu item. */
|
|
5
|
+
export interface DropdownMenuItemProps extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item>, "asChild" | "color">, Pick<MenuListItemProps, "selected" | "color" | "loading" | "enabledWhenLoading" | "loadingContent" | "icon" | "iconPlacement" | "href" | "target" | "rel" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps"> {
|
|
6
|
+
/**
|
|
7
|
+
* Render the item as a link. When set, you can pass `href`, `target`, and
|
|
8
|
+
* `rel` properties to the item.
|
|
9
|
+
*
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
asLink?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** Component containing a dropdown menu item. */
|
|
15
|
+
export declare const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type MenuListGroupProps } from "../MenuList/MenuListGroup.tsx";
|
|
4
|
+
/** Properties of the dropdown menu radio group. */
|
|
5
|
+
export interface DropdownMenuRadioGroupProps extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioGroup>, "asChild">, Pick<MenuListGroupProps, "label" | "itemProps" | "labelProps"> {
|
|
6
|
+
}
|
|
7
|
+
/** Component used to group multiple dropdown menu radio items. */
|
|
8
|
+
export declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type MenuListItemProps } from "../MenuList";
|
|
4
|
+
/** Properties of the dropdown menu radio item. */
|
|
5
|
+
export interface DropdownMenuRadioItemProps extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>, "asChild" | "color">, Pick<MenuListItemProps, "color" | "loading" | "enabledWhenLoading" | "loadingContent" | "iconPlacement" | "actionProps" | "contentProps" | "iconProps" | "spinnerProps"> {
|
|
6
|
+
/**
|
|
7
|
+
* Whether to show the radio.
|
|
8
|
+
*
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
showRadio?: boolean;
|
|
12
|
+
/** Properties to pass to the indicator component. */
|
|
13
|
+
indicatorProps?: React.ComponentPropsWithRef<typeof DropdownMenuPrimitive.ItemIndicator>;
|
|
14
|
+
}
|
|
15
|
+
/** A dropdown menu item that can be controlled and rendered like a radio. */
|
|
16
|
+
export declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { MenuList, type MenuListProps } from "../MenuList";
|
|
4
|
+
/** Properties of the dropdown menu sub content component. */
|
|
5
|
+
export interface DropdownMenuSubContentProps extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>, "asChild">, Pick<MenuListProps, "variant" | "iconPlacement"> {
|
|
6
|
+
/** Properties to pass to the menu list component. */
|
|
7
|
+
menuListProps?: Omit<React.ComponentPropsWithRef<typeof MenuList>, "variant" | "iconPlacement" | "asChild">;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The component that pops out when a submenu is open. Must be rendered inside
|
|
11
|
+
* `DropdownMenuSub`.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type MenuListItemProps } from "../MenuList";
|
|
4
|
+
/** Properties of the dropdown menu submenu trigger. */
|
|
5
|
+
export interface DropdownMenuSubTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger>, "asChild" | "color">, Pick<MenuListItemProps, "color" | "icon" | "disabled" | "actionProps" | "contentProps" | "iconProps"> {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A dropdown menu item that opens a submenu. Must be rendered within a
|
|
9
|
+
* `DropdownMenuSub`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/** Properties of the dropdown menu trigger component. */
|
|
4
|
+
export interface DropdownMenuTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>, "asChild"> {
|
|
5
|
+
}
|
|
6
|
+
/** Trigger component for the dropdown menu. */
|
|
7
|
+
export declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./DropdownMenu.tsx";
|
|
2
|
+
export * from "./DropdownMenuCheckboxItem.tsx";
|
|
3
|
+
export * from "./DropdownMenuContent.tsx";
|
|
4
|
+
export * from "./DropdownMenuGroup.tsx";
|
|
5
|
+
export * from "./DropdownMenuItem.tsx";
|
|
6
|
+
export * from "./DropdownMenuRadioGroup.tsx";
|
|
7
|
+
export * from "./DropdownMenuRadioItem.tsx";
|
|
8
|
+
export * from "./DropdownMenuSub.tsx";
|
|
9
|
+
export * from "./DropdownMenuSubContent.tsx";
|
|
10
|
+
export * from "./DropdownMenuSubTrigger.tsx";
|
|
11
|
+
export * from "./DropdownMenuTrigger.tsx";
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ErrorBoundary as ReactErrorBoundary } from "react-error-boundary";
|
|
3
|
+
import { Alert } from "../Alert";
|
|
4
|
+
import { IconButton } from "../IconButton";
|
|
5
|
+
/** Properties provided to the fallback element. */
|
|
6
|
+
export interface FallbackProps {
|
|
7
|
+
/** Error that occurred. */
|
|
8
|
+
error: any;
|
|
9
|
+
/**
|
|
10
|
+
* Function which, when called, rerenders the boundary `children`.
|
|
11
|
+
*
|
|
12
|
+
* @param args Arguments passed to the `onReset` callback.
|
|
13
|
+
*/
|
|
14
|
+
resetErrorBoundary: (...args: unknown[]) => void;
|
|
15
|
+
}
|
|
16
|
+
/** Properties of the error boundary component. */
|
|
17
|
+
export interface ErrorBoundaryProps extends Pick<React.ComponentPropsWithoutRef<typeof ReactErrorBoundary>, "resetKeys" | "onError" | "onReset"> {
|
|
18
|
+
/**
|
|
19
|
+
* Fallback component to render in the event of an error while rendering
|
|
20
|
+
* `children`.
|
|
21
|
+
*
|
|
22
|
+
* This component completely replaces the default fallback and, as such, when
|
|
23
|
+
* provided, other properties related to the default `Alert` fallback such as
|
|
24
|
+
* `showError`, `fallbackTitle`, and `fallbackMessage` are ignored.
|
|
25
|
+
*
|
|
26
|
+
* By default, a “danger” `Alert` is displayed with a message (specified via
|
|
27
|
+
* `fallbackMessage`) or the error that occurred when `showError` is set.
|
|
28
|
+
*/
|
|
29
|
+
fallback?: React.ReactNode | React.ComponentType<FallbackProps> | ((props: FallbackProps) => React.ReactNode);
|
|
30
|
+
/**
|
|
31
|
+
* Whether to show the error that occurred in the default fallback `Alert`.
|
|
32
|
+
*
|
|
33
|
+
* By default, the error is shown only when not in production mode.
|
|
34
|
+
*/
|
|
35
|
+
showError?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Whether to show a button to reset the error boundary in the default
|
|
38
|
+
* fallback `Alert`.
|
|
39
|
+
*
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
showResetButton?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Title to display in the default fallback `Alert` component in the event of
|
|
45
|
+
* an error occurring while rendering `children`. This property is ignored if
|
|
46
|
+
* `fallback` is provided or if `showError` is set.
|
|
47
|
+
*
|
|
48
|
+
* By default, the locale's message is used.
|
|
49
|
+
*/
|
|
50
|
+
fallbackTitle?: React.ReactNode | ((error?: unknown) => React.ReactNode);
|
|
51
|
+
/**
|
|
52
|
+
* Message to display in the default fallback `Alert` component in the event
|
|
53
|
+
* of an error occurring while rendering `children`. This property is ignored
|
|
54
|
+
* if `fallback` is provided or if `showError` is set.
|
|
55
|
+
*
|
|
56
|
+
* By default, the locale's message is used.
|
|
57
|
+
*/
|
|
58
|
+
fallbackMessage?: React.ReactNode | ((error?: unknown) => React.ReactNode);
|
|
59
|
+
/**
|
|
60
|
+
* Label of the button used to reset the error boundary.
|
|
61
|
+
*
|
|
62
|
+
* By default, the locale's label is used.
|
|
63
|
+
*/
|
|
64
|
+
resetButtonLabel?: React.ReactNode;
|
|
65
|
+
/** Properties to pass to the default fallback `Alert` component. */
|
|
66
|
+
fallbackProps?: React.ComponentPropsWithRef<typeof Alert>;
|
|
67
|
+
/**
|
|
68
|
+
* Properties to pass to the `IconButton` component used to reset the error
|
|
69
|
+
* boundary.
|
|
70
|
+
*/
|
|
71
|
+
resetButtonProps?: React.ComponentPropsWithRef<typeof IconButton>;
|
|
72
|
+
children?: React.ReactNode;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Generic error boundary which, by default, when an error occurs while
|
|
76
|
+
* rendering `children`, displays an `Alert` with a generic message, together
|
|
77
|
+
* with the error itself when in development mode.
|
|
78
|
+
*
|
|
79
|
+
* You can provide an alternative fallback component via the `fallback` property
|
|
80
|
+
* or simply an alternative fallback message via the `fallbackMessage`
|
|
81
|
+
* property.
|
|
82
|
+
*
|
|
83
|
+
* Example usage:
|
|
84
|
+
*
|
|
85
|
+
* ```tsx
|
|
86
|
+
* import { ErrorBoundary } from "@ostack.tech/ui";
|
|
87
|
+
*
|
|
88
|
+
* function ProtectedApp() {
|
|
89
|
+
* return (
|
|
90
|
+
* <ErrorBoundary>
|
|
91
|
+
* <App />
|
|
92
|
+
* </ErrorBoundary>
|
|
93
|
+
* );
|
|
94
|
+
* }
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
export declare const ErrorBoundary: React.ForwardRefExoticComponent<ErrorBoundaryProps & React.RefAttributes<ReactErrorBoundary>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useErrorBoundary } from "react-error-boundary";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Possible types of feedback. */
|
|
3
|
+
export type FeedbackType = "success" | "error" | "warning";
|
|
4
|
+
/** Properties of the feedback component. */
|
|
5
|
+
export type FeedbackProps = React.ComponentPropsWithoutRef<"div" | "li"> & {
|
|
6
|
+
/**
|
|
7
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
8
|
+
* This will merge the original component props with the props of the supplied
|
|
9
|
+
* element/component and change the underlying DOM node.
|
|
10
|
+
*/
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Type of feedback.
|
|
14
|
+
*
|
|
15
|
+
* @default error
|
|
16
|
+
*/
|
|
17
|
+
type?: FeedbackType;
|
|
18
|
+
/** Text prefixed to the feedback to be announced by assistive technologies. */
|
|
19
|
+
visuallyHiddenPrefix?: React.ReactNode | ((type: FeedbackType) => React.ReactNode);
|
|
20
|
+
};
|
|
21
|
+
/** Component used to provide some feedback to a form control. */
|
|
22
|
+
export declare const Feedback: React.ForwardRefExoticComponent<FeedbackProps & React.RefAttributes<HTMLDivElement | HTMLLIElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Feedback.tsx";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Properties of the feedback list component. */
|
|
3
|
+
export interface FeedbackListProps extends React.ComponentPropsWithoutRef<"ul"> {
|
|
4
|
+
}
|
|
5
|
+
/** Component used to provide a list of feedbacks to a form control. */
|
|
6
|
+
export declare const FeedbackList: React.ForwardRefExoticComponent<FeedbackListProps & React.RefAttributes<HTMLUListElement>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Context present within a feedback list. */
|
|
3
|
+
export declare const FeedbackListContext: React.Context<boolean>;
|
|
4
|
+
/** Hook exposing whether a component is being rendered within a feedback list. */
|
|
5
|
+
export declare function useIsInFeedbackList(): boolean;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type IconProp } from "@fortawesome/fontawesome-svg-core";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { IconButton, type IconButtonSize } from "../IconButton";
|
|
4
|
+
import { PopoverContent } from "../Popover";
|
|
5
|
+
/** Properties of the feedback popover component. */
|
|
6
|
+
export interface FeedbackPopoverProps extends React.ComponentPropsWithoutRef<typeof PopoverContent> {
|
|
7
|
+
/** Default open state of the feedback popover. */
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
/** Controlled open state of the feedback popover. */
|
|
10
|
+
open?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Function called whenever the open state of the feedback popover changes.
|
|
13
|
+
*
|
|
14
|
+
* @param open New open state.
|
|
15
|
+
*/
|
|
16
|
+
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
/** Whether to display the popover in modal mode. */
|
|
18
|
+
modal?: boolean;
|
|
19
|
+
/** Size of the icon button. */
|
|
20
|
+
size?: IconButtonSize;
|
|
21
|
+
/** Icon to show. Each feedback type has its own default icon. */
|
|
22
|
+
icon?: IconProp;
|
|
23
|
+
/** Label of the feedback popover button. */
|
|
24
|
+
label?: React.ReactNode;
|
|
25
|
+
/** Properties to pass to the element containing the button. */
|
|
26
|
+
buttonContainerProps?: React.ComponentPropsWithRef<"div">;
|
|
27
|
+
/** Properties to pass to the `IconButton` component. */
|
|
28
|
+
iconButtonProps?: Omit<React.ComponentPropsWithRef<typeof IconButton>, "size" | "icon" | "label">;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Component used to provide feedback to a form control, where the feedback is
|
|
32
|
+
* displayed within a popover.
|
|
33
|
+
*/
|
|
34
|
+
export declare const FeedbackPopover: React.ForwardRefExoticComponent<FeedbackPopoverProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type FeedbackType } from "../Feedback";
|
|
3
|
+
/** Value of the feedback popover context. */
|
|
4
|
+
export interface FeedbackPopoverContextValue {
|
|
5
|
+
onAddFeedback: (type: FeedbackType) => void;
|
|
6
|
+
onRemoveFeedback: (type: FeedbackType) => void;
|
|
7
|
+
}
|
|
8
|
+
/** Feedback popover context. */
|
|
9
|
+
export declare const FeedbackPopoverContext: React.Context<FeedbackPopoverContextValue | null>;
|
|
10
|
+
/** Hook providing access to the feedback popover context. */
|
|
11
|
+
export declare function useFeedbackPopoverContext(): FeedbackPopoverContextValue | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Properties of the field component. */
|
|
3
|
+
export interface FieldProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
4
|
+
/**
|
|
5
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
6
|
+
* This will merge the original component props with the props of the supplied
|
|
7
|
+
* element/component and change the underlying DOM node.
|
|
8
|
+
*/
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The `Field` component groups form controls such as `Input`, `Select`,
|
|
13
|
+
* `RadioButton`, `Checkbox`, and similar components that are used for user
|
|
14
|
+
* input, with an associated `Label`, `HelperText`, and feedback such as errors
|
|
15
|
+
* or validation messages.
|
|
16
|
+
*
|
|
17
|
+
* It provides automatic linking of the `Label` to the control, and marks the
|
|
18
|
+
* control as "required" when requested by the control.
|
|
19
|
+
*/
|
|
20
|
+
export declare const Field: React.ForwardRefExoticComponent<FieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Value of the field context. */
|
|
3
|
+
export type FieldContextValue = FieldStore;
|
|
4
|
+
/** State of the field. */
|
|
5
|
+
export interface FieldState {
|
|
6
|
+
controlId?: string;
|
|
7
|
+
controlTagName?: string;
|
|
8
|
+
controlFocused: boolean;
|
|
9
|
+
controlHasCode: boolean;
|
|
10
|
+
controlRequired: boolean;
|
|
11
|
+
label?: React.ReactNode;
|
|
12
|
+
labelId?: string;
|
|
13
|
+
descriptionIds: string[];
|
|
14
|
+
errorMessageIds: string[];
|
|
15
|
+
actions: FieldActions;
|
|
16
|
+
}
|
|
17
|
+
/** Actions of the field. */
|
|
18
|
+
export interface FieldActions {
|
|
19
|
+
addDescriptionId: (descriptionId: string) => void;
|
|
20
|
+
removeDescriptionId: (descriptionId: string) => void;
|
|
21
|
+
addErrorMessageId: (errorMessageId: string) => void;
|
|
22
|
+
removeErrorMessageId: (errorMessageId: string) => void;
|
|
23
|
+
}
|
|
24
|
+
/** Field store. */
|
|
25
|
+
export type FieldStore = ReturnType<typeof useCreateFieldContext>;
|
|
26
|
+
/** Field context. */
|
|
27
|
+
export declare const FieldContext: React.Context<(Omit<import("zustand").StoreApi<FieldState>, "subscribe"> & {
|
|
28
|
+
subscribe: {
|
|
29
|
+
(listener: (selectedState: FieldState, previousSelectedState: FieldState) => void): () => void;
|
|
30
|
+
<U>(selector: (state: FieldState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
31
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
32
|
+
fireImmediately?: boolean;
|
|
33
|
+
} | undefined): () => void;
|
|
34
|
+
};
|
|
35
|
+
}) | null>;
|
|
36
|
+
/** Hook which creates the field context value. */
|
|
37
|
+
export declare function useCreateFieldContext(): Omit<import("zustand").StoreApi<FieldState>, "subscribe"> & {
|
|
38
|
+
subscribe: {
|
|
39
|
+
(listener: (selectedState: FieldState, previousSelectedState: FieldState) => void): () => void;
|
|
40
|
+
<U>(selector: (state: FieldState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
41
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
42
|
+
fireImmediately?: boolean;
|
|
43
|
+
} | undefined): () => void;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/** Hook exposing the field control's id. */
|
|
47
|
+
export declare function useFieldControlId(): string | undefined;
|
|
48
|
+
/** Hook exposing the field control's tag name. */
|
|
49
|
+
export declare function useFieldControlTagName(): string | undefined;
|
|
50
|
+
/** Hook exposing whether the field's control is focused. */
|
|
51
|
+
export declare function useFieldControlFocused(): boolean | undefined;
|
|
52
|
+
/** Hook exposing whether the field's control is required. */
|
|
53
|
+
export declare function useFieldControlRequired(): boolean | undefined;
|
|
54
|
+
/** Hook exposing the field label's id. */
|
|
55
|
+
export declare function useFieldLabelId(): string | undefined;
|
|
56
|
+
/** Hook exposing the field's description ids. */
|
|
57
|
+
export declare function useFieldDescriptionIds(): string[] | undefined;
|
|
58
|
+
/** Hook exposing the field's error message ids. */
|
|
59
|
+
export declare function useFieldErrorMessageIds(): string[] | undefined;
|
|
60
|
+
/** Hook that makes a field aware of its control's information. */
|
|
61
|
+
export declare function useSetFieldControl(controlId: string | undefined, controlTagName: string | undefined, controlCodeId: string | undefined, controlHasCode?: boolean | undefined, controlRequired?: boolean | undefined): {
|
|
62
|
+
controlId: string;
|
|
63
|
+
codeId: string | undefined;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Hook which returns a function that can be used to set the focus status of the
|
|
67
|
+
* field's control.
|
|
68
|
+
*/
|
|
69
|
+
export declare function useSetFieldControlFocused(): (controlFocused: boolean) => void | undefined;
|
|
70
|
+
/** Hook that makes the field aware of its label. */
|
|
71
|
+
export declare function useSetFieldLabel(label: React.ReactNode, labelId: string | undefined): string | undefined;
|
|
72
|
+
/** Options available to the {@link useOnFieldLabelChange} hook. */
|
|
73
|
+
export interface UseOnFieldLabelChangeOptions {
|
|
74
|
+
/**
|
|
75
|
+
* Whether to run the callback immediately with the current label.
|
|
76
|
+
*
|
|
77
|
+
* @default true
|
|
78
|
+
*/
|
|
79
|
+
fireImmediately?: boolean;
|
|
80
|
+
}
|
|
81
|
+
/** Hook which runs the provided callback whenever the field's label changes. */
|
|
82
|
+
export declare function useOnFieldLabelChange(cb: (label: React.ReactNode) => (() => void) | void, { fireImmediately }?: UseOnFieldLabelChangeOptions): void;
|
|
83
|
+
/** Hook that makes the field aware of some helper text. */
|
|
84
|
+
export declare function useSetFieldHelperText(helperTextId: string | undefined): string | undefined;
|
|
85
|
+
/** Hook that makes the field aware of some feedback. */
|
|
86
|
+
export declare function useSetFieldFeedback(feedbackId: string | undefined, isError: boolean): string | undefined;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from "./Field.tsx";
|
|
2
|
+
export { type FieldActions, useFieldControlFocused, useFieldControlId, useFieldControlRequired, useFieldControlTagName, useFieldDescriptionIds, useFieldErrorMessageIds, useFieldLabelId, useOnFieldLabelChange, useSetFieldControl, useSetFieldControlFocused, useSetFieldFeedback, useSetFieldHelperText, useSetFieldLabel, } from "./FieldContext.ts";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Properties of the field group component. */
|
|
3
|
+
export interface FieldGroupProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
4
|
+
/**
|
|
5
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
6
|
+
* This will merge the original component props with the props of the supplied
|
|
7
|
+
* element/component and change the underlying DOM node.
|
|
8
|
+
*/
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Component used to group a set of fields of a form, improving the organization
|
|
13
|
+
* and usability of forms. By combining a header and body layout, it makes forms
|
|
14
|
+
* more readable and accessible, especially for complex interfaces. The header
|
|
15
|
+
* gives the group a clear title, while the body contains all related input
|
|
16
|
+
* controls.
|
|
17
|
+
*
|
|
18
|
+
* This component is especially useful for creating forms where logical grouping
|
|
19
|
+
* of fields is essential for user comprehension. It ensures consistency in
|
|
20
|
+
* design and simplifies the process of building accessible and maintainable
|
|
21
|
+
* forms.
|
|
22
|
+
*
|
|
23
|
+
* It composes the following subcomponents:
|
|
24
|
+
*
|
|
25
|
+
* - `FieldGroupHeader`: Acts as the headers for the group, typically containing
|
|
26
|
+
* the `FieldGroupTitle` of the section.
|
|
27
|
+
* - `FieldGroupTitle`: Displays the title within the header.
|
|
28
|
+
* - `FieldGroupBody`: The container for all fields and controls within the group.
|
|
29
|
+
*/
|
|
30
|
+
export declare const FieldGroup: React.ForwardRefExoticComponent<FieldGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Properties of the field group body component. */
|
|
3
|
+
export interface FieldGroupBodyProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
4
|
+
/**
|
|
5
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
6
|
+
* This will merge the original component props with the props of the supplied
|
|
7
|
+
* element/component and change the underlying DOM node.
|
|
8
|
+
*/
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Component used to display the body of a field group. */
|
|
12
|
+
export declare const FieldGroupBody: React.ForwardRefExoticComponent<FieldGroupBodyProps & React.RefAttributes<HTMLDivElement>>;
|