@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,82 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CloseButton } from "../CloseButton";
|
|
3
|
+
import { CollapsibleContent } from "../Collapsible";
|
|
4
|
+
import { Icon, type IconProp } from "../Icon";
|
|
5
|
+
/** Alert variants. */
|
|
6
|
+
export type AlertVariant = "solid" | "subtle" | "outlined";
|
|
7
|
+
/** Alert severities. */
|
|
8
|
+
export type AlertSeverity = "neutral" | "info" | "success" | "danger" | "warning";
|
|
9
|
+
/** Properties of the alert component. */
|
|
10
|
+
export interface AlertProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
11
|
+
/**
|
|
12
|
+
* Alert variant.
|
|
13
|
+
*
|
|
14
|
+
* @default subtle
|
|
15
|
+
*/
|
|
16
|
+
variant?: AlertVariant;
|
|
17
|
+
/**
|
|
18
|
+
* Sets the alert's severity.
|
|
19
|
+
*
|
|
20
|
+
* @default info
|
|
21
|
+
*/
|
|
22
|
+
severity?: AlertSeverity;
|
|
23
|
+
/** Alert action. */
|
|
24
|
+
action?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the alert should be open by default.
|
|
27
|
+
*
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
defaultOpen?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Property controlling whether the alert should be open. Use together with
|
|
33
|
+
* `onOpenChange` to control the alert's open state.
|
|
34
|
+
*/
|
|
35
|
+
open?: boolean;
|
|
36
|
+
/** Function called when the open state changes. */
|
|
37
|
+
onOpenChange?: (open: boolean) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Icon to show. The default icon is `faCircleInfo`. Each severity except
|
|
40
|
+
* `"neutral"` has its own default icon.
|
|
41
|
+
*/
|
|
42
|
+
icon?: IconProp | null;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to show a close button.
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
showCloseButton?: boolean;
|
|
49
|
+
/** Properties to pass to the container component. */
|
|
50
|
+
containerProps?: React.ComponentPropsWithRef<typeof CollapsibleContent>;
|
|
51
|
+
/** Properties to pass to the icon component. */
|
|
52
|
+
iconProps?: Omit<React.ComponentPropsWithRef<typeof Icon>, "icon">;
|
|
53
|
+
/** Properties to pass to the content component. */
|
|
54
|
+
contentProps?: React.ComponentPropsWithRef<"div">;
|
|
55
|
+
/** Properties to pass to the component containing the action/close button. */
|
|
56
|
+
actionContainerProps?: React.ComponentPropsWithRef<"div">;
|
|
57
|
+
/** Properties to pass to the close button component. */
|
|
58
|
+
closeButtonProps?: React.ComponentPropsWithRef<typeof CloseButton>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The alert component can be used to attract the user's attentions.
|
|
62
|
+
*
|
|
63
|
+
* It has the following subcomponent:
|
|
64
|
+
*
|
|
65
|
+
* - `AlertTitle`: Title of the alert.
|
|
66
|
+
*
|
|
67
|
+
* Example usage:
|
|
68
|
+
*
|
|
69
|
+
* ```tsx
|
|
70
|
+
* import { Alert, AlertTitle } from "@ostack.tech/ui";
|
|
71
|
+
*
|
|
72
|
+
* function TermAndConditionsNotice {
|
|
73
|
+
* return (
|
|
74
|
+
* <Alert>
|
|
75
|
+
* <AlertTitle>Notice</AlertTitle>
|
|
76
|
+
* Terms and conditions may apply.
|
|
77
|
+
* </Alert>
|
|
78
|
+
* );
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Properties of the alert title component. */
|
|
3
|
+
export interface AlertTitleProps 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
|
+
/** Title of the alert. */
|
|
12
|
+
export declare const AlertTitle: React.ForwardRefExoticComponent<AlertTitleProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
2
|
+
/**
|
|
3
|
+
* The alert dialog component displays an important overlaid “window” to the
|
|
4
|
+
* user and expects a response.
|
|
5
|
+
*
|
|
6
|
+
* Built on top of the [Radix Alert Dialog
|
|
7
|
+
* primitive](https://www.radix-ui.com/primitives/docs/components/alert-dialog),
|
|
8
|
+
* and the `Card` component.
|
|
9
|
+
*
|
|
10
|
+
* It composes the following subcomponents:
|
|
11
|
+
*
|
|
12
|
+
* - `AlertDialogTrigger`: The button which, when pressed, opens the alert dialog.
|
|
13
|
+
* - `AlertDialogContent`: Content to display when the alert dialog is open.
|
|
14
|
+
* - `AlertDialogHeader`: Header section of the alert dialog.
|
|
15
|
+
* - `AlertDialogTitle`: An accessible title to be announced when the alert dialog
|
|
16
|
+
* is opened.
|
|
17
|
+
* - `AlertDialogBody`: Body section of the alert dialog.
|
|
18
|
+
* - `AlertDialogDescription`: An optional accessible description to be announced
|
|
19
|
+
* when the alert dialog is opened.
|
|
20
|
+
*
|
|
21
|
+
* To hide the description, wrap it within `<VisuallyHidden asChild>`. To remove
|
|
22
|
+
* the description entirely, pass `aria-describedby={undefined}` to the
|
|
23
|
+
* `AlertDialogContent` and omit this component.
|
|
24
|
+
* - `AlertDialogFooter`: Footer section of the alert dialog.
|
|
25
|
+
* - `AlertDialogCancel`: A button which closes the alert dialog by cancelling the
|
|
26
|
+
* action. These buttons should be distinguished visually from
|
|
27
|
+
* `AlertDialogAction` buttons.
|
|
28
|
+
* - `AlertDialogAction`: A button which closes the alert dialog by accepting the
|
|
29
|
+
* action. These buttons should be distinguished visually from
|
|
30
|
+
* `AlertDialogCancel` buttons.
|
|
31
|
+
*
|
|
32
|
+
* Example usage:
|
|
33
|
+
*
|
|
34
|
+
* ```tsx
|
|
35
|
+
* import {
|
|
36
|
+
* Button,
|
|
37
|
+
* AlertDialog,
|
|
38
|
+
* AlertDialogAction,
|
|
39
|
+
* AlertDialogBody,
|
|
40
|
+
* AlertDialogCancel,
|
|
41
|
+
* AlertDialogClose,
|
|
42
|
+
* AlertDialogContent,
|
|
43
|
+
* AlertDialogDescription,
|
|
44
|
+
* AlertDialogFooter,
|
|
45
|
+
* AlertDialogHeader,
|
|
46
|
+
* AlertDialogTitle,
|
|
47
|
+
* AlertDialogTrigger,
|
|
48
|
+
* } from "@ostack.tech/ui";
|
|
49
|
+
*
|
|
50
|
+
* function UserAgreement() {
|
|
51
|
+
* return (
|
|
52
|
+
* <AlertDialog>
|
|
53
|
+
* <AlertDialogTrigger>
|
|
54
|
+
* <Button>Accept user agreement…</Button>
|
|
55
|
+
* </AlertDialogTrigger>
|
|
56
|
+
*
|
|
57
|
+
* <AlertDialogContent>
|
|
58
|
+
* <AlertDialogHeader>
|
|
59
|
+
* <AlertDialogTitle>User Agreement</AlertDialogTitle>
|
|
60
|
+
* </AlertDialogHeader>
|
|
61
|
+
* <AlertDialogBody>
|
|
62
|
+
* <AlertDialogDescription>
|
|
63
|
+
* Please read and accept the following user agreement:
|
|
64
|
+
* </AlertDialogDescription>
|
|
65
|
+
* …
|
|
66
|
+
* </AlertDialogBody>
|
|
67
|
+
* <AlertDialogFooter>
|
|
68
|
+
* <AlertDialogCancel>
|
|
69
|
+
* <Button variant="subtle">Cancel</Button>
|
|
70
|
+
* </AlertDialogCancel>
|
|
71
|
+
* <AlertDialogAction>
|
|
72
|
+
* <Button>Accept</Button>
|
|
73
|
+
* </AlertDialogAction>
|
|
74
|
+
* </AlertDialogFooter>
|
|
75
|
+
* </AlertDialogContent>
|
|
76
|
+
* </AlertDialog>
|
|
77
|
+
* );
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export declare const AlertDialog: import("react").FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/** Properties of the alert dialog action component. */
|
|
4
|
+
export interface AlertDialogActionProps extends Omit<React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>, "asChild"> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Button which closes the alert dialog by accepting the action. These buttons
|
|
8
|
+
* should be distinguished visually from `AlertDialogCancel` buttons.
|
|
9
|
+
*/
|
|
10
|
+
export declare const AlertDialogAction: React.ForwardRefExoticComponent<AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DialogBody } from "../Dialog";
|
|
3
|
+
/** Properties to the alert dialog body component. */
|
|
4
|
+
export interface AlertDialogBodyProps extends React.ComponentPropsWithoutRef<typeof DialogBody> {
|
|
5
|
+
}
|
|
6
|
+
/** Body section of the alert dialog. */
|
|
7
|
+
export declare const AlertDialogBody: React.ForwardRefExoticComponent<AlertDialogBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/** Properties of the alert dialog cancel component. */
|
|
4
|
+
export interface AlertDialogCancelProps extends Omit<React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>, "asChild"> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Button which closes the alert dialog by cancelling the action. These buttons
|
|
8
|
+
* should be distinguished visually from `AlertDialogAction` buttons.
|
|
9
|
+
*/
|
|
10
|
+
export declare const AlertDialogCancel: React.ForwardRefExoticComponent<AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type DialogContentColor, type DialogContentSize, type DialogContentVariant } from "../Dialog";
|
|
4
|
+
import { Overlay } from "../Overlay";
|
|
5
|
+
/** Alert dialog content variants. */
|
|
6
|
+
export type AlertDialogContentVariant = DialogContentVariant;
|
|
7
|
+
/** Possible alert dialog content colors. */
|
|
8
|
+
export type AlertDialogContentColor = DialogContentColor;
|
|
9
|
+
/** Possible alert dialog content sizes. */
|
|
10
|
+
export type AlertDialogContentSize = DialogContentSize;
|
|
11
|
+
/** Properties of the alert dialog content component. */
|
|
12
|
+
export interface AlertDialogContentProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> {
|
|
13
|
+
/**
|
|
14
|
+
* Dialog content variant.
|
|
15
|
+
*
|
|
16
|
+
* @default solid
|
|
17
|
+
*/
|
|
18
|
+
variant?: AlertDialogContentVariant;
|
|
19
|
+
/**
|
|
20
|
+
* Whether sections should be merged together, as opposed to them being
|
|
21
|
+
* clearly delimited. By default, each section is clearly delimited via a
|
|
22
|
+
* border or solid background colour.
|
|
23
|
+
*
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
mergeSections?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Dialog content color.
|
|
29
|
+
*
|
|
30
|
+
* @default neutral
|
|
31
|
+
*/
|
|
32
|
+
color?: AlertDialogContentColor;
|
|
33
|
+
/**
|
|
34
|
+
* Size of the dialog content.
|
|
35
|
+
*
|
|
36
|
+
* @default md
|
|
37
|
+
*/
|
|
38
|
+
size?: AlertDialogContentSize;
|
|
39
|
+
/** Properties to pass to the portal component. */
|
|
40
|
+
portalProps?: Omit<React.ComponentPropsWithRef<typeof AlertDialogPrimitive.Portal>, "forceMount">;
|
|
41
|
+
/** Properties to pass to the dialog's overlay component. */
|
|
42
|
+
overlayProps?: React.ComponentPropsWithRef<typeof Overlay>;
|
|
43
|
+
}
|
|
44
|
+
/** Content to be rendered in the open alert dialog. */
|
|
45
|
+
export declare const AlertDialogContent: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/** Properties of the alert dialog description component. */
|
|
4
|
+
export interface AlertDialogDescriptionProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Optional accessible description to be announced when the alert dialog is
|
|
8
|
+
* opened.
|
|
9
|
+
*
|
|
10
|
+
* To hide the description, wrap it within `<VisuallyHidden asChild>`. To remove
|
|
11
|
+
* the description entirely, pass `aria-describedby={undefined}` to the
|
|
12
|
+
* `AlertDialogContent` and omit this component.
|
|
13
|
+
*/
|
|
14
|
+
export declare const AlertDialogDescription: React.ForwardRefExoticComponent<AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DialogFooter } from "../Dialog";
|
|
3
|
+
/** Properties to the alert dialog footer component. */
|
|
4
|
+
export interface AlertDialogFooterProps extends React.ComponentPropsWithoutRef<typeof DialogFooter> {
|
|
5
|
+
}
|
|
6
|
+
/** Footer section of the alert dialog. */
|
|
7
|
+
export declare const AlertDialogFooter: React.ForwardRefExoticComponent<AlertDialogFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CardHeader } from "../Card";
|
|
3
|
+
/** Properties of the alert dialog header component. */
|
|
4
|
+
export interface AlertDialogHeaderProps extends React.ComponentPropsWithoutRef<typeof CardHeader> {
|
|
5
|
+
}
|
|
6
|
+
/** Header section of the alert dialog. */
|
|
7
|
+
export declare const AlertDialogHeader: React.ForwardRefExoticComponent<AlertDialogHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/** Properties of the alert dialog title component. */
|
|
4
|
+
export interface AlertDialogTitleProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title> {
|
|
5
|
+
}
|
|
6
|
+
/** Accessible title to be announced when the alert dialog is opened. */
|
|
7
|
+
export declare const AlertDialogTitle: React.ForwardRefExoticComponent<AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/** Properties of the alert dialog trigger component. */
|
|
4
|
+
export interface AlertDialogTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Trigger>, "asChild"> {
|
|
5
|
+
}
|
|
6
|
+
/** The button which, when pressed, opens the alert dialog */
|
|
7
|
+
export declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./AlertDialog.tsx";
|
|
2
|
+
export * from "./AlertDialogAction.tsx";
|
|
3
|
+
export * from "./AlertDialogBody.tsx";
|
|
4
|
+
export * from "./AlertDialogCancel.tsx";
|
|
5
|
+
export * from "./AlertDialogContent.tsx";
|
|
6
|
+
export * from "./AlertDialogDescription.tsx";
|
|
7
|
+
export * from "./AlertDialogFooter.tsx";
|
|
8
|
+
export * from "./AlertDialogHeader.tsx";
|
|
9
|
+
export * from "./AlertDialogTitle.tsx";
|
|
10
|
+
export * from "./AlertDialogTrigger.tsx";
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type AccentColor } from "../../utils/accent.ts";
|
|
3
|
+
import { Icon, type IconProp } from "../Icon";
|
|
4
|
+
import { Spinner } from "../Spinner";
|
|
5
|
+
/** Button variants. */
|
|
6
|
+
export type ButtonVariant = "solid" | "subtle" | "outlined" | "ghost";
|
|
7
|
+
/** Button colours. */
|
|
8
|
+
export type ButtonColor = AccentColor;
|
|
9
|
+
/** Button sizes. */
|
|
10
|
+
export type ButtonSize = "sm" | "md" | "lg" | "xl";
|
|
11
|
+
/** Button's icon placement. */
|
|
12
|
+
export type ButtonIconPlacement = "start" | "end";
|
|
13
|
+
/** Properties of the button component. */
|
|
14
|
+
export interface ButtonProps extends React.ComponentPropsWithoutRef<"button"> {
|
|
15
|
+
/**
|
|
16
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
17
|
+
* This will merge the original component props with the props of the supplied
|
|
18
|
+
* element/component and change the underlying DOM node.
|
|
19
|
+
*/
|
|
20
|
+
asChild?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Button's variant.
|
|
23
|
+
*
|
|
24
|
+
* @default solid
|
|
25
|
+
*/
|
|
26
|
+
variant?: ButtonVariant;
|
|
27
|
+
/**
|
|
28
|
+
* Button's colour.
|
|
29
|
+
*
|
|
30
|
+
* @default neutral
|
|
31
|
+
*/
|
|
32
|
+
color?: ButtonColor;
|
|
33
|
+
/**
|
|
34
|
+
* Size of the button.
|
|
35
|
+
*
|
|
36
|
+
* @default md
|
|
37
|
+
*/
|
|
38
|
+
size?: ButtonSize;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to display the button content vertically. This property should only
|
|
41
|
+
* be set when an icon is also specified.
|
|
42
|
+
*
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
vertical?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Font Awesome icon to show within the button. The position of the icon may
|
|
48
|
+
* be controlled via `iconPlacement`.
|
|
49
|
+
*
|
|
50
|
+
* @default null
|
|
51
|
+
*/
|
|
52
|
+
icon?: IconProp | React.ReactElement | null;
|
|
53
|
+
/**
|
|
54
|
+
* Whether to display the icon at the start or end of the button. This
|
|
55
|
+
* property also affects the placement of the spinner.
|
|
56
|
+
*
|
|
57
|
+
* @default start
|
|
58
|
+
*/
|
|
59
|
+
iconPlacement?: ButtonIconPlacement;
|
|
60
|
+
/**
|
|
61
|
+
* Whether to display the button in "active" state.
|
|
62
|
+
*
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
active?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Whether to disable the button.
|
|
68
|
+
*
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
disabled?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Whether to display the button in "loading" state by presenting a spinner as
|
|
74
|
+
* icon. The position of the spinner may be controlled via `iconPlacement`.
|
|
75
|
+
*
|
|
76
|
+
* Setting this property will automatically disable the button.
|
|
77
|
+
*
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
loading?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Whether the button should be enabled when `loading` is `true`.
|
|
83
|
+
*
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
enabledWhenLoading?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Content of the button when it is in "loading" state. If not provided, the
|
|
89
|
+
* button content will remain unchanged.
|
|
90
|
+
*/
|
|
91
|
+
loadingContent?: React.ReactNode;
|
|
92
|
+
/** Properties to pass to the icon component. */
|
|
93
|
+
iconProps?: Omit<React.ComponentPropsWithRef<typeof Icon>, "icon">;
|
|
94
|
+
/** Properties to pass to the spinner component. */
|
|
95
|
+
spinnerProps?: React.ComponentPropsWithRef<typeof Spinner>;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The button component is used to trigger actions or events, such as opening a
|
|
99
|
+
* dialog or submitting a form.
|
|
100
|
+
*
|
|
101
|
+
* Example usage:
|
|
102
|
+
*
|
|
103
|
+
* ```tsx
|
|
104
|
+
* import { Button } from "@ostack.tech/ui";
|
|
105
|
+
*
|
|
106
|
+
* function Launch() {
|
|
107
|
+
* return <Button onClick={launchRocket}>Launch rocket</Button>;
|
|
108
|
+
* }
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Button.tsx";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Properties of the button group component. */
|
|
3
|
+
export interface ButtonGroupProps 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 button group component can be used to group buttons together.
|
|
13
|
+
*
|
|
14
|
+
* It supports both `Button` and `IconButton` components as children.
|
|
15
|
+
*
|
|
16
|
+
* Example usage:
|
|
17
|
+
*
|
|
18
|
+
* ```tsx
|
|
19
|
+
* import { Button, ButtonGroup } from "@ostack.tech/ui";
|
|
20
|
+
*
|
|
21
|
+
* function Actions() {
|
|
22
|
+
* return (
|
|
23
|
+
* <ButtonGroup>
|
|
24
|
+
* <Button>Delete</Button>
|
|
25
|
+
* <Button>Correct</Button>
|
|
26
|
+
* <Button>Submit</Button>
|
|
27
|
+
* </ButtonGroup>
|
|
28
|
+
* );
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ButtonGroup.tsx";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type Locale } from "date-fns";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type DayPickerProps } from "react-day-picker";
|
|
4
|
+
import { type IconButton } from "../IconButton";
|
|
5
|
+
import { type Select } from "../Select";
|
|
6
|
+
/** Properties of the calendar component. */
|
|
7
|
+
export interface CalendarProps extends Omit<DayPickerProps, "mode" | "selected" | "onSelect" | "classNames" | "modifiersClassNames" | "styles" | "modifiersStyles" | "fromDate" | "toDate" | "fromMonth" | "toMonth" | "fromYear" | "toYear" | "startMonth" | "endMonth" | "reverseMonths" | "captionLayout" | "navLayout" | "components" | "locale" | "labels" | "formatters" | "dir" | "dateLib"> {
|
|
8
|
+
/** Minimum date allowed. */
|
|
9
|
+
minDate?: string | Date | null;
|
|
10
|
+
/** Maximum date allowed. */
|
|
11
|
+
maxDate?: string | Date | null;
|
|
12
|
+
/** Minimum month allowed. */
|
|
13
|
+
minMonth?: string | Date | null;
|
|
14
|
+
/** Maximum month allowed. */
|
|
15
|
+
maxMonth?: string | Date | null;
|
|
16
|
+
/** Minimum year allowed. */
|
|
17
|
+
minYear?: number;
|
|
18
|
+
/** Maximum year allowed. */
|
|
19
|
+
maxYear?: number;
|
|
20
|
+
/** `date-fns` locale to format dates and to be used by the date picker. */
|
|
21
|
+
locale?: Locale;
|
|
22
|
+
/** Label of the "previous month" button. */
|
|
23
|
+
previousMonthLabel?: string;
|
|
24
|
+
/** Label of the "next month" button. */
|
|
25
|
+
nextMonthLabel?: string;
|
|
26
|
+
/** Properties to pass to the caption element. */
|
|
27
|
+
captionProps?: React.ComponentPropsWithRef<"div">;
|
|
28
|
+
/** Properties to pass to the previous button component. */
|
|
29
|
+
previousButtonProps?: React.ComponentPropsWithRef<typeof IconButton>;
|
|
30
|
+
/** Properties to pass to the next button component. */
|
|
31
|
+
nextButtonProps?: React.ComponentPropsWithRef<typeof IconButton>;
|
|
32
|
+
/** Properties to pass to the month select component. */
|
|
33
|
+
monthSelectProps?: Omit<React.ComponentPropsWithRef<typeof Select>, "multiple" | "defaultValue" | "value">;
|
|
34
|
+
/** Properties to pass to the year select component. */
|
|
35
|
+
yearSelectProps?: Omit<React.ComponentPropsWithRef<typeof Select>, "multiple" | "defaultValue" | "value">;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Calendar component built on top of [React
|
|
39
|
+
* DayPicker](https://react-day-picker.js.org).
|
|
40
|
+
*/
|
|
41
|
+
export declare function Calendar({ required, minDate, maxDate, minMonth, maxMonth, minYear, maxYear, previousMonthLabel, nextMonthLabel, defaultMonth, month: controlledMonth, onMonthChange, onDayClick, numberOfMonths, showOutsideDays, fixedWeeks, disableNavigation, locale: dateFnsLocale, disabled, modifiers, captionProps, previousButtonProps, nextButtonProps, monthSelectProps, yearSelectProps, pagedNavigation, ...otherProps }: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type CalendarProps } from "./Calendar.tsx";
|
|
3
|
+
/** Value of the calendar context. */
|
|
4
|
+
export interface CalendarContextValue {
|
|
5
|
+
minAllowedDate: Date | undefined;
|
|
6
|
+
maxAllowedDate: Date | undefined;
|
|
7
|
+
previousMonthLabel: CalendarProps["previousMonthLabel"];
|
|
8
|
+
nextMonthLabel: CalendarProps["nextMonthLabel"];
|
|
9
|
+
captionProps: CalendarProps["captionProps"];
|
|
10
|
+
previousButtonProps: CalendarProps["previousButtonProps"];
|
|
11
|
+
nextButtonProps: CalendarProps["nextButtonProps"];
|
|
12
|
+
monthSelectProps: CalendarProps["monthSelectProps"];
|
|
13
|
+
yearSelectProps: CalendarProps["yearSelectProps"];
|
|
14
|
+
}
|
|
15
|
+
/** Calendar context. */
|
|
16
|
+
export declare const CalendarContext: React.Context<CalendarContextValue | null>;
|
|
17
|
+
/** Hook providing access to the calendar context. */
|
|
18
|
+
export declare function useCalendarContext(): CalendarContextValue;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Reimplementation of the React Day Picker's day component to provide a
|
|
4
|
+
* consistent inner element (even when the day isn't interactive), as well as a
|
|
5
|
+
* wrapper over the day text which lets us style it without styling the whole
|
|
6
|
+
* button.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CalendarDay: React.NamedExoticComponent<{
|
|
9
|
+
day: import("react-day-picker").CalendarDay;
|
|
10
|
+
modifiers: import("react-day-picker").Modifiers;
|
|
11
|
+
} & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Reimplementation of the React Day Picker's caption component to provide both
|
|
4
|
+
* navigation arrows and dropdown selections.
|
|
5
|
+
*/
|
|
6
|
+
export declare const CalendarMonthCaption: React.NamedExoticComponent<{
|
|
7
|
+
calendarMonth: import("react-day-picker").CalendarMonth;
|
|
8
|
+
displayIndex: number;
|
|
9
|
+
} & React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Calendar.tsx";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type AccentColor } from "../../utils/accent.ts";
|
|
3
|
+
/** Card variants. */
|
|
4
|
+
export type CardVariant = "solid" | "subtle" | "outlined" | "ghost";
|
|
5
|
+
/** Possible card colours. */
|
|
6
|
+
export type CardColor = AccentColor;
|
|
7
|
+
/** Properties of the card component. */
|
|
8
|
+
export interface CardProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
9
|
+
/**
|
|
10
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
11
|
+
* This will merge the original component props with the props of the supplied
|
|
12
|
+
* element/component and change the underlying DOM node.
|
|
13
|
+
*/
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Card variant.
|
|
17
|
+
*
|
|
18
|
+
* @default solid
|
|
19
|
+
*/
|
|
20
|
+
variant?: CardVariant;
|
|
21
|
+
/**
|
|
22
|
+
* Whether sections should be merged together, as opposed to them being
|
|
23
|
+
* clearly delimited. By default, each section is clearly delimited via a
|
|
24
|
+
* border or solid background colour.
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
mergeSections?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Card color.
|
|
31
|
+
*
|
|
32
|
+
* @default neutral
|
|
33
|
+
*/
|
|
34
|
+
color?: CardColor;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The card component encapsulates content in a card format.
|
|
38
|
+
*
|
|
39
|
+
* It composes the following subcomponents:
|
|
40
|
+
*
|
|
41
|
+
* - `CardHeader`: Header section of the card.
|
|
42
|
+
* - `CardTitle`: Title of the card.
|
|
43
|
+
* - `CardBody`: Body section of the card.
|
|
44
|
+
* - `CardFooter`: Footer section of the card.
|
|
45
|
+
*
|
|
46
|
+
* Example usage:
|
|
47
|
+
*
|
|
48
|
+
* ```tsx
|
|
49
|
+
* import {
|
|
50
|
+
* Card,
|
|
51
|
+
* CardBody,
|
|
52
|
+
* CardFooter,
|
|
53
|
+
* CardHeader,
|
|
54
|
+
* CardTitle,
|
|
55
|
+
* } from "@ostack.tech/ui";
|
|
56
|
+
*
|
|
57
|
+
* function UserCard() {
|
|
58
|
+
* return (
|
|
59
|
+
* <Card>
|
|
60
|
+
* <CardHeader>
|
|
61
|
+
* <CardTitle>User</CardTitle>
|
|
62
|
+
* </CardHeader>
|
|
63
|
+
* <CardBody>…</CardBody>
|
|
64
|
+
* <CardFooter>…</CardFooter>
|
|
65
|
+
* </Card>
|
|
66
|
+
* );
|
|
67
|
+
* }
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Properties of the card body component. */
|
|
3
|
+
export interface CardBodyProps 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
|
+
/** Body section of the `Card` component. */
|
|
12
|
+
export declare const CardBody: React.ForwardRefExoticComponent<CardBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Properties of the card footer component. */
|
|
3
|
+
export interface CardFooterProps 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
|
+
/** Footer section of the `Card` component. */
|
|
12
|
+
export declare const CardFooter: React.ForwardRefExoticComponent<CardFooterProps & React.RefAttributes<HTMLDivElement>>;
|