@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,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Value of the field group context. */
|
|
3
|
+
export interface FieldGroupContextValue {
|
|
4
|
+
setCodeId: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
5
|
+
setTitleId: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
6
|
+
}
|
|
7
|
+
/** Field group context. */
|
|
8
|
+
export declare const FieldGroupContext: React.Context<FieldGroupContextValue | null>;
|
|
9
|
+
/** Hook providing access to the field group context. */
|
|
10
|
+
export declare function useFieldGroupContext(): FieldGroupContextValue;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Properties of the field group header component. */
|
|
3
|
+
export interface FieldGroupHeaderProps 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
|
+
/** Code associated with the field group. */
|
|
11
|
+
code?: React.ReactNode;
|
|
12
|
+
/** Text prefixed to the code to be announced by assistive technologies. */
|
|
13
|
+
visuallyHiddenCodePrefix?: React.ReactNode;
|
|
14
|
+
/** Properties to pass to the code element. */
|
|
15
|
+
codeProps?: React.ComponentPropsWithoutRef<"span">;
|
|
16
|
+
}
|
|
17
|
+
/** Component used to display the header of a field group. */
|
|
18
|
+
export declare const FieldGroupHeader: React.ForwardRefExoticComponent<FieldGroupHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type HeadingLevel } from "../Heading";
|
|
3
|
+
/** Properties of the field group title component. */
|
|
4
|
+
export interface FieldGroupTitleProps extends React.ComponentPropsWithoutRef<"h2"> {
|
|
5
|
+
/**
|
|
6
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
7
|
+
* This will merge the original component props with the props of the supplied
|
|
8
|
+
* element/component and change the underlying DOM node.
|
|
9
|
+
*/
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Heading level.
|
|
13
|
+
*
|
|
14
|
+
* @default 2
|
|
15
|
+
*/
|
|
16
|
+
level?: HeadingLevel;
|
|
17
|
+
}
|
|
18
|
+
/** Component used to display the caption of a field group. */
|
|
19
|
+
export declare const FieldGroupTitle: React.ForwardRefExoticComponent<FieldGroupTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type Responsive } from "../../utils/useResponsiveValues.ts";
|
|
3
|
+
/** Size of a column. */
|
|
4
|
+
export type GridColumnSize = number | "auto" | "content";
|
|
5
|
+
/** Offset of a column. */
|
|
6
|
+
export type GridOffsetSize = number | "auto";
|
|
7
|
+
/** Properties of the grid component. */
|
|
8
|
+
export interface GridProps 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
|
+
* Mark the component as a grid container that contains the grid items. `Grid`
|
|
17
|
+
* components are otherwise always items.
|
|
18
|
+
*/
|
|
19
|
+
container?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Number of columns of the grid.
|
|
22
|
+
*
|
|
23
|
+
* A responsive value may be provided to change the number of columns based on
|
|
24
|
+
* the current breakpoint.
|
|
25
|
+
*
|
|
26
|
+
* @default 12
|
|
27
|
+
*/
|
|
28
|
+
columns?: Responsive<number>;
|
|
29
|
+
/**
|
|
30
|
+
* Gap between both rows and columns. When a number `n` is provided, each unit
|
|
31
|
+
* corresponds to `spacing(n)`.
|
|
32
|
+
*
|
|
33
|
+
* A responsive value may be provided to change the gap based on the current
|
|
34
|
+
* breakpoint.
|
|
35
|
+
*
|
|
36
|
+
* @default 5
|
|
37
|
+
*/
|
|
38
|
+
gap?: Responsive<number | string>;
|
|
39
|
+
/**
|
|
40
|
+
* Gap between rows. When a number `n` is provided, each unit corresponds to
|
|
41
|
+
* `spacing(n)`.
|
|
42
|
+
*
|
|
43
|
+
* A responsive value may be provided to change the row gap based on the
|
|
44
|
+
* current breakpoint.
|
|
45
|
+
*
|
|
46
|
+
* @default gap
|
|
47
|
+
*/
|
|
48
|
+
rowGap?: Responsive<number | string>;
|
|
49
|
+
/**
|
|
50
|
+
* Gap between columns. When a number `n` is provided, each unit corresponds
|
|
51
|
+
* to `spacing(n)`.
|
|
52
|
+
*
|
|
53
|
+
* A responsive value may be provided to change the column gap based on the
|
|
54
|
+
* current breakpoint.
|
|
55
|
+
*
|
|
56
|
+
* @default gap
|
|
57
|
+
*/
|
|
58
|
+
columnGap?: Responsive<number | string>;
|
|
59
|
+
/** Column size (number of columns) at the `xs` breakpoint. */
|
|
60
|
+
xs?: GridColumnSize;
|
|
61
|
+
/** Offset size (number of columns) at the `xs` breakpoint. */
|
|
62
|
+
xsOffset?: GridOffsetSize;
|
|
63
|
+
/** Column size (number of columns) at the `sm` breakpoint. */
|
|
64
|
+
sm?: GridColumnSize;
|
|
65
|
+
/** Offset size (number of columns) at the `sm` breakpoint. */
|
|
66
|
+
smOffset?: GridOffsetSize;
|
|
67
|
+
/** Column size (number of columns) at the `md` breakpoint. */
|
|
68
|
+
md?: GridColumnSize;
|
|
69
|
+
/** Offset size (number of columns) at the `md` breakpoint. */
|
|
70
|
+
mdOffset?: GridOffsetSize;
|
|
71
|
+
/** Column size (number of columns) at the `lg` breakpoint. */
|
|
72
|
+
lg?: GridColumnSize;
|
|
73
|
+
/** Offset size (number of columns) at the `lg` breakpoint. */
|
|
74
|
+
lgOffset?: GridOffsetSize;
|
|
75
|
+
/** Column size (number of columns) at the `xl` breakpoint. */
|
|
76
|
+
xl?: GridColumnSize;
|
|
77
|
+
/** Offset size (number of columns) at the `xl` breakpoint. */
|
|
78
|
+
xlOffset?: GridOffsetSize;
|
|
79
|
+
/** Column size (number of columns) at the `xxl` breakpoint. */
|
|
80
|
+
xxl?: GridColumnSize;
|
|
81
|
+
/** Offset size (number of columns) at the `xxl` breakpoint. */
|
|
82
|
+
xxlOffset?: GridOffsetSize;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The `Grid` component is designed for creating layouts with a defined number
|
|
86
|
+
* of columns. It allows you to configure columns responsively by specifying
|
|
87
|
+
* different column spans for each child at various breakpoints, enabling
|
|
88
|
+
* flexible and adaptive designs across screen sizes.
|
|
89
|
+
*/
|
|
90
|
+
export declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Grid.tsx";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Heading levels. */
|
|
3
|
+
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
4
|
+
/** Properties of the heading component. */
|
|
5
|
+
export interface HeadingProps extends React.ComponentPropsWithoutRef<`h${HeadingLevel}`> {
|
|
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
|
+
* Heading level. By default, if `asChild` is not provided, the level is used
|
|
14
|
+
* to determine which HTML element to render, so a level of `2` causes an
|
|
15
|
+
* `<h2>` element to be rendered.
|
|
16
|
+
*
|
|
17
|
+
* @default 2
|
|
18
|
+
*/
|
|
19
|
+
level?: HeadingLevel;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Component used to render semantic HTML heading elements.
|
|
23
|
+
*
|
|
24
|
+
* Example usage:
|
|
25
|
+
*
|
|
26
|
+
* ```tsx
|
|
27
|
+
* import { Heading } from "@ostack.tech/ui";
|
|
28
|
+
*
|
|
29
|
+
* function FavoriteBooksTitle() {
|
|
30
|
+
* return <Heading>Favourite Books</Heading>;
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Heading.tsx";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Properties of the helper text component. */
|
|
3
|
+
export interface HelperTextProps 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 provide helper text to a form control. */
|
|
12
|
+
export declare const HelperText: React.ForwardRefExoticComponent<HelperTextProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./HelperText.tsx";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { FlipProp, IconProp } from "@fortawesome/fontawesome-svg-core";
|
|
2
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { type AccentColor } from "../../utils/accent.ts";
|
|
5
|
+
export type { IconProp } from "@fortawesome/fontawesome-svg-core";
|
|
6
|
+
/** Possible sizes of an icon. */
|
|
7
|
+
export type IconSize = "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
|
|
8
|
+
/** Possible colours of an icon. */
|
|
9
|
+
export type IconColor = AccentColor;
|
|
10
|
+
/** Properties of the icon component. */
|
|
11
|
+
export interface IconProps extends Omit<React.ComponentPropsWithoutRef<typeof FontAwesomeIcon>, "icon" | "size" | "flip"> {
|
|
12
|
+
/** Icon to display. */
|
|
13
|
+
icon: IconProp;
|
|
14
|
+
/**
|
|
15
|
+
* Size of the icon. By default, the icon will be sized according to the
|
|
16
|
+
* current font size.
|
|
17
|
+
*/
|
|
18
|
+
size?: IconSize;
|
|
19
|
+
/**
|
|
20
|
+
* Colour of the icon. By default, the icon will have the current font's
|
|
21
|
+
* colour.
|
|
22
|
+
*/
|
|
23
|
+
color?: IconColor;
|
|
24
|
+
/**
|
|
25
|
+
* Optional accessible label for the icon.
|
|
26
|
+
*
|
|
27
|
+
* When provided, a visually hidden label is added so that assistive
|
|
28
|
+
* technologies correctly announce it.
|
|
29
|
+
*/
|
|
30
|
+
label?: string;
|
|
31
|
+
flip?: boolean | FlipProp;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Icon component extending the FontAwesome's `FontAwesomeIcon` component.
|
|
35
|
+
*
|
|
36
|
+
* Properties supported by FontAwesome are also supported by this component. For
|
|
37
|
+
* more information on all supported properties, see [FontAwesome's React
|
|
38
|
+
* documentation](https://docs.fontawesome.com/v5/web/use-with/react).
|
|
39
|
+
*
|
|
40
|
+
* For a list of existing icons, consult:
|
|
41
|
+
* https://fontawesome.com/search?ic=free.
|
|
42
|
+
*
|
|
43
|
+
* For tree-shaking purposes, we recommend importing icons individually from
|
|
44
|
+
* their respective FontAwesome module.
|
|
45
|
+
*
|
|
46
|
+
* Example usage:
|
|
47
|
+
*
|
|
48
|
+
* ```tsx
|
|
49
|
+
* import { faCat } from "@fortawesome/free-solid-svg-icons";
|
|
50
|
+
* import { Icon } from "@ostack.tech/ui";
|
|
51
|
+
*
|
|
52
|
+
* function CatIcon() {
|
|
53
|
+
* return <Icon icon={faCat} />;
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare const Icon: React.NamedExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Icon.tsx";
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type ButtonColor, type ButtonSize, type ButtonVariant } from "../Button";
|
|
3
|
+
import { Icon, type IconProp } from "../Icon";
|
|
4
|
+
import { Spinner } from "../Spinner";
|
|
5
|
+
import { Tooltip } from "../Tooltip";
|
|
6
|
+
/** Icon button variants. */
|
|
7
|
+
export type IconButtonVariant = ButtonVariant;
|
|
8
|
+
/** Icon button colours. */
|
|
9
|
+
export type IconButtonColor = ButtonColor;
|
|
10
|
+
/** Icon button sizes. */
|
|
11
|
+
export type IconButtonSize = ButtonSize;
|
|
12
|
+
/** Properties of the icon button component. */
|
|
13
|
+
export interface IconButtonProps extends Omit<React.ComponentPropsWithoutRef<"button">, "children"> {
|
|
14
|
+
/**
|
|
15
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
16
|
+
* This will merge the original component props with the props of the supplied
|
|
17
|
+
* element/component and change the underlying DOM node.
|
|
18
|
+
*/
|
|
19
|
+
asChild?: boolean;
|
|
20
|
+
children?: React.ReactElement;
|
|
21
|
+
/**
|
|
22
|
+
* Icon button's variant.
|
|
23
|
+
*
|
|
24
|
+
* @default solid
|
|
25
|
+
*/
|
|
26
|
+
variant?: IconButtonVariant;
|
|
27
|
+
/**
|
|
28
|
+
* Icon button's colour.
|
|
29
|
+
*
|
|
30
|
+
* @default neutral
|
|
31
|
+
*/
|
|
32
|
+
color?: IconButtonColor;
|
|
33
|
+
/**
|
|
34
|
+
* Size of the icon button.
|
|
35
|
+
*
|
|
36
|
+
* @default md
|
|
37
|
+
*/
|
|
38
|
+
size?: IconButtonSize;
|
|
39
|
+
/** Whether to display the icon button as a circle. */
|
|
40
|
+
circle?: boolean;
|
|
41
|
+
/** Font Awesome icon to show within the button. */
|
|
42
|
+
icon: IconProp | React.ReactElement;
|
|
43
|
+
/** Button label provided to the icon button as a tooltip. */
|
|
44
|
+
label: React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Whether to display the button in "active" state.
|
|
47
|
+
*
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
active?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Whether to disable the button.
|
|
53
|
+
*
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Whether to display the button in "loading" state.
|
|
59
|
+
*
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
loading?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the icon button should be enabled when `loading` is `true`.
|
|
65
|
+
*
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
68
|
+
enabledWhenLoading?: boolean;
|
|
69
|
+
/** Properties to pass to the `Icon` component. */
|
|
70
|
+
iconProps?: Omit<React.ComponentPropsWithRef<typeof Icon>, "icon" | "label">;
|
|
71
|
+
/** Properties to pass to the `Spinner` component. */
|
|
72
|
+
spinnerProps?: React.ComponentPropsWithRef<typeof Spinner>;
|
|
73
|
+
/** Properties to pass to the `Tooltip` component. */
|
|
74
|
+
tooltipProps?: Omit<React.ComponentPropsWithRef<typeof Tooltip>, "content" | "children">;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The icon button component renders a button containing a single icon. Use it
|
|
78
|
+
* as appropriate, as an alternative to the `Button` component, to trigger
|
|
79
|
+
* actions or events, such as opening a dialog or submitting a form
|
|
80
|
+
*
|
|
81
|
+
* A `label` property, displayed as a tooltip, is required for screen-readers to
|
|
82
|
+
* give meaning to the button.
|
|
83
|
+
*
|
|
84
|
+
* Example usage:
|
|
85
|
+
*
|
|
86
|
+
* ```tsx
|
|
87
|
+
* import { faRocket } from "@fortawesome/free-solid-svg-icons";
|
|
88
|
+
* import { IconButton } from "@ostack.tech/ui";
|
|
89
|
+
*
|
|
90
|
+
* function Launch() {
|
|
91
|
+
* return (
|
|
92
|
+
* <IconButton
|
|
93
|
+
* icon={faRocket}
|
|
94
|
+
* label="Launch rocket"
|
|
95
|
+
* onClick={launchRocket}
|
|
96
|
+
* />
|
|
97
|
+
* );
|
|
98
|
+
* }
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./IconButton.tsx";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type ControlStatus, type ControlVariant } from "../../utils/control.ts";
|
|
3
|
+
import { type Responsive } from "../../utils/useResponsiveValues.ts";
|
|
4
|
+
import { CloseButton } from "../CloseButton";
|
|
5
|
+
import { type ControlAddon } from "../ControlAddon";
|
|
6
|
+
import { Spinner } from "../Spinner";
|
|
7
|
+
/** Accepted values for "show clear button". */
|
|
8
|
+
export type ShowClearButton = boolean | "auto";
|
|
9
|
+
export interface InputProps extends Omit<React.ComponentPropsWithoutRef<"input">, "children">, InputPropsBase {
|
|
10
|
+
}
|
|
11
|
+
/** Properties of the input component. */
|
|
12
|
+
export interface InputPropsBase {
|
|
13
|
+
/**
|
|
14
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
15
|
+
* This will merge the original component props with the props of the supplied
|
|
16
|
+
* element/component and change the underlying DOM node.
|
|
17
|
+
*/
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
children?: React.ReactElement;
|
|
20
|
+
/**
|
|
21
|
+
* Input's style variant. Defaults to the default variant unless when
|
|
22
|
+
* rendering inside a table cell (in which it defaults to `"cell"`).
|
|
23
|
+
*/
|
|
24
|
+
variant?: ControlVariant;
|
|
25
|
+
/** Sets the status of the input. */
|
|
26
|
+
status?: ControlStatus;
|
|
27
|
+
/** Input code. */
|
|
28
|
+
code?: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Adds a spinner to the input to indicate activity. Note that it doesn't
|
|
31
|
+
* automatically disable the input.
|
|
32
|
+
*
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
/** Sets the input's text align. */
|
|
37
|
+
align?: Responsive<React.CSSProperties["textAlign"]>;
|
|
38
|
+
/** Input's start adornment. */
|
|
39
|
+
startAdornment?: React.ReactNode;
|
|
40
|
+
/** Input's end adornment. */
|
|
41
|
+
endAdornment?: React.ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Whether to show a button to clear the input when it has content.
|
|
44
|
+
*
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
showClearButton?: ShowClearButton;
|
|
48
|
+
/** Label of the clear button announced to assistive technologies. */
|
|
49
|
+
clearButtonLabel?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Function called whenever the value changes.
|
|
52
|
+
*
|
|
53
|
+
* @param value New value.
|
|
54
|
+
*/
|
|
55
|
+
onValueChange?: (value: string) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Function called when the focus moves out of the control as a whole.
|
|
58
|
+
*
|
|
59
|
+
* This is useful when there is a need to know when the user stops interacting
|
|
60
|
+
* with the control.
|
|
61
|
+
*/
|
|
62
|
+
onBlurToOutside?: (event: React.FocusEvent) => void;
|
|
63
|
+
/** Properties to pass to the root component. */
|
|
64
|
+
rootProps?: React.ComponentPropsWithRef<"div">;
|
|
65
|
+
/** Properties to pass to the code component. */
|
|
66
|
+
codeProps?: Omit<React.ComponentPropsWithRef<typeof ControlAddon>, "status">;
|
|
67
|
+
/** Properties to pass to the container component. */
|
|
68
|
+
containerProps?: React.ComponentPropsWithRef<"div">;
|
|
69
|
+
/** Properties to pass to the clear button component. */
|
|
70
|
+
clearButtonProps?: React.ComponentPropsWithRef<typeof CloseButton>;
|
|
71
|
+
/** Properties to pass to the spinner component. */
|
|
72
|
+
spinnerProps?: Omit<React.ComponentPropsWithRef<typeof Spinner>, "size">;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The input component is used to collect user input. It is built on top of the
|
|
76
|
+
* browser's [`<input>`
|
|
77
|
+
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input).
|
|
78
|
+
*
|
|
79
|
+
* For accessibility purposes, inputs are usually included within a `Field`
|
|
80
|
+
* together with a `Label` and optionally `HelperText` and/or `Feedback`.
|
|
81
|
+
*
|
|
82
|
+
* Example usage:
|
|
83
|
+
*
|
|
84
|
+
* ```tsx
|
|
85
|
+
* import { Input } from "@ostack.tech/ui";
|
|
86
|
+
*
|
|
87
|
+
* function Search() {
|
|
88
|
+
* return <Input placeholder="Search…" />;
|
|
89
|
+
* }
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Input, type InputProps } from "./Input.tsx";
|
|
3
|
+
/**
|
|
4
|
+
* Utility input component whose `ref` is passed to the input's container. Use
|
|
5
|
+
* `inputRef` to provide the input's ref instead.
|
|
6
|
+
*
|
|
7
|
+
* This component is useful when using an input component as a trigger for
|
|
8
|
+
* popovers/menus, and we wish to align said popover/menu against the input's
|
|
9
|
+
* container (since popovers/menus align themselves based on the element
|
|
10
|
+
* referenced by their trigger).
|
|
11
|
+
*/
|
|
12
|
+
export declare const InputWithContainerRef: React.ForwardRefExoticComponent<InputProps & {
|
|
13
|
+
inputRef?: React.Ref<React.ComponentRef<typeof Input>>;
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Properties of the keyboard component. */
|
|
3
|
+
export interface KeyboardProps extends React.ComponentPropsWithoutRef<"kbd"> {
|
|
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 show which key or combination of keys performs a given
|
|
13
|
+
* action.
|
|
14
|
+
*/
|
|
15
|
+
export declare const Keyboard: React.ForwardRefExoticComponent<KeyboardProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Keyboard.tsx";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Label as LabelPrimitive } from "radix-ui";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Icon } from "../Icon";
|
|
4
|
+
import { IconButton } from "../IconButton";
|
|
5
|
+
import { Popover, PopoverContent } from "../Popover";
|
|
6
|
+
/** Properties of the label component. */
|
|
7
|
+
export interface LabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {
|
|
8
|
+
/** Shows a "required" symbol next to the label. */
|
|
9
|
+
required?: boolean;
|
|
10
|
+
/** Optional helper text displayed as a popover triggered by an icon button. */
|
|
11
|
+
helperText?: React.ReactNode;
|
|
12
|
+
/** Label of the required icon announced to assistive technologies. */
|
|
13
|
+
requiredIconLabel?: string;
|
|
14
|
+
/** Label of the helper button announced to assistive technologies. */
|
|
15
|
+
helperButtonLabel?: string;
|
|
16
|
+
/** Properties to pass to the container element. */
|
|
17
|
+
containerProps?: React.ComponentPropsWithRef<"div">;
|
|
18
|
+
/** Properties to pass to the required icon container element. */
|
|
19
|
+
requiredIconContainerProps?: React.ComponentPropsWithRef<"span">;
|
|
20
|
+
/** Properties to pass to the required icon component. */
|
|
21
|
+
requiredIconProps?: Omit<React.ComponentPropsWithRef<typeof Icon>, "icon">;
|
|
22
|
+
/** Properties to pass to the helper button component. */
|
|
23
|
+
helperButtonProps?: Omit<React.ComponentPropsWithRef<typeof IconButton>, "icon">;
|
|
24
|
+
/** Properties to pass to the helper popover component. */
|
|
25
|
+
helperPopoverProps?: React.ComponentPropsWithRef<typeof Popover>;
|
|
26
|
+
/** Properties to pass to the helper popover content component. */
|
|
27
|
+
helperPopoverContentProps?: React.ComponentPropsWithRef<typeof PopoverContent>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The `Label` component renders an accessible label which can be associated
|
|
31
|
+
* with form controls.
|
|
32
|
+
*
|
|
33
|
+
* It should typically be used within a `Field` component together with a
|
|
34
|
+
* control (`Input`, `Checkbox`, `Select`, _etc._), in which case the label will
|
|
35
|
+
* be automatically associated with its respective control.
|
|
36
|
+
*
|
|
37
|
+
* Example usage:
|
|
38
|
+
*
|
|
39
|
+
* ```tsx
|
|
40
|
+
* import { Label } from "@ostack.tech/ui";
|
|
41
|
+
*
|
|
42
|
+
* function FullNameLabel() {
|
|
43
|
+
* return <Label>Full name</Label>;
|
|
44
|
+
* }
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Label.tsx";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type AccentColor } from "../../utils/accent.ts";
|
|
3
|
+
import { Icon, type IconProp } from "../Icon";
|
|
4
|
+
/** Link variants. */
|
|
5
|
+
export type LinkVariant = "default" | "alert";
|
|
6
|
+
/** Link colours. */
|
|
7
|
+
export type LinkColor = AccentColor;
|
|
8
|
+
/** Properties of the link component. */
|
|
9
|
+
export interface LinkProps extends React.ComponentPropsWithoutRef<"a"> {
|
|
10
|
+
/**
|
|
11
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
12
|
+
* This will merge the original component props with the props of the supplied
|
|
13
|
+
* element/component and change the underlying DOM node.
|
|
14
|
+
*/
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Colour of the link.
|
|
18
|
+
*
|
|
19
|
+
* @default primary
|
|
20
|
+
*/
|
|
21
|
+
color?: LinkColor;
|
|
22
|
+
/**
|
|
23
|
+
* Link variant. Defaults to `"default"`, unless when rendered within an
|
|
24
|
+
* `Alert`, in which case the `"alert"` variant is used.
|
|
25
|
+
*
|
|
26
|
+
* @default default
|
|
27
|
+
*/
|
|
28
|
+
variant?: LinkVariant;
|
|
29
|
+
/**
|
|
30
|
+
* Marks this link as external, making it open in a new tab (it sets both
|
|
31
|
+
* `target="_blank"` and `rel="noopener noreferrer"`).
|
|
32
|
+
*
|
|
33
|
+
* If a `Referer` header should be included when navigating, then the `rel`
|
|
34
|
+
* attribute should be overriden to simply `rel="noopener"`.
|
|
35
|
+
*/
|
|
36
|
+
external?: boolean;
|
|
37
|
+
/** Link icon. By default, only `external` links have an icon. */
|
|
38
|
+
icon?: IconProp | null;
|
|
39
|
+
/** Properties to pass to the icon component. */
|
|
40
|
+
iconProps?: Omit<React.ComponentPropsWithRef<typeof Icon>, "icon">;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The link component, with its `href` property, is used to create a hyperlink
|
|
44
|
+
* to web pages, files, email addresses, locations in the same page, or anything
|
|
45
|
+
* else a URL can address. It is built on top of the browser's [`<a>` (anchor)
|
|
46
|
+
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a).
|
|
47
|
+
*
|
|
48
|
+
* Example usage:
|
|
49
|
+
*
|
|
50
|
+
* ```tsx
|
|
51
|
+
* import { Link } from "@ostack.tech/ui";
|
|
52
|
+
*
|
|
53
|
+
* function GoBackLink() {
|
|
54
|
+
* return <Link href="../">Go back</Link>;
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type LinkColor, type LinkVariant } from "./Link.tsx";
|
|
3
|
+
/** Value of the link context. */
|
|
4
|
+
export interface LinkContextValue {
|
|
5
|
+
/** Default colour that the link should use. */
|
|
6
|
+
defaultColor: LinkColor;
|
|
7
|
+
/** Default variant that the link should use. */
|
|
8
|
+
defaultVariant: LinkVariant;
|
|
9
|
+
}
|
|
10
|
+
/** Default value of the link context. */
|
|
11
|
+
export declare const LINK_CONTEXT_DEFAULT_VALUE: LinkContextValue;
|
|
12
|
+
/** Context for links. */
|
|
13
|
+
export declare const LinkContext: React.Context<LinkContextValue>;
|
|
14
|
+
/** Hook providing access to the link context. */
|
|
15
|
+
export declare function useLinkContext(): LinkContextValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Link.tsx";
|