@strapi/design-system 1.17.0 → 1.18.0-typescript.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/dist/Accordion/Accordion.d.ts +56 -0
- package/dist/Accordion/AccordionContent.d.ts +3 -0
- package/dist/Accordion/AccordionContext.d.ts +12 -0
- package/dist/Accordion/AccordionGroup.d.ts +10 -0
- package/dist/Accordion/AccordionToggle.d.ts +22 -0
- package/dist/Accordion/index.d.ts +4 -0
- package/dist/Accordion/utils.d.ts +7 -0
- package/dist/Alert/Alert.d.ts +34 -0
- package/dist/Alert/index.d.ts +1 -0
- package/dist/Alert/utils.d.ts +10 -0
- package/dist/Avatar/Avatar.d.ts +22 -0
- package/dist/Avatar/AvatarGroup.d.ts +1 -0
- package/dist/Avatar/__tests__/Avatar.spec.d.ts +1 -0
- package/dist/Avatar/constants.d.ts +2 -0
- package/dist/Avatar/index.d.ts +2 -0
- package/dist/Badge/Badge.d.ts +13 -0
- package/dist/Badge/index.d.ts +1 -0
- package/dist/BaseButton/BaseButton.d.ts +52 -0
- package/dist/BaseButton/index.d.ts +1 -0
- package/dist/BaseCheckbox/BaseCheckbox.d.ts +27 -0
- package/dist/BaseCheckbox/index.d.ts +1 -0
- package/dist/BaseCheckbox/utils.d.ts +7 -0
- package/dist/BaseLink/BaseLink.d.ts +50 -0
- package/dist/BaseLink/__tests__/BaseLink.spec.d.ts +1 -0
- package/dist/BaseLink/index.d.ts +1 -0
- package/dist/BaseRadio/BaseRadio.d.ts +6 -0
- package/dist/BaseRadio/RadioGroup.d.ts +12 -0
- package/dist/BaseRadio/context.d.ts +9 -0
- package/dist/BaseRadio/index.d.ts +2 -0
- package/dist/BaseRadio/utils.d.ts +4 -0
- package/dist/Box/Box.d.ts +97 -0
- package/dist/Box/__tests__/Box.spec.d.ts +1 -0
- package/dist/Box/index.d.ts +1 -0
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +17 -0
- package/dist/Breadcrumbs/index.d.ts +1 -0
- package/dist/Button/Button.d.ts +61 -0
- package/dist/Button/__tests__/utils.spec.d.ts +1 -0
- package/dist/Button/constants.d.ts +13 -0
- package/dist/Button/index.d.ts +1 -0
- package/dist/Button/utils.d.ts +18 -0
- package/dist/Card/Card.d.ts +5 -0
- package/dist/Card/CardAction.d.ts +8 -0
- package/dist/Card/CardAsset.d.ts +7 -0
- package/dist/Card/CardBadge.d.ts +3 -0
- package/dist/Card/CardBody.d.ts +3 -0
- package/dist/Card/CardCheckbox.d.ts +3 -0
- package/dist/Card/CardContent.d.ts +6 -0
- package/dist/Card/CardContext.d.ts +6 -0
- package/dist/Card/CardHeader.d.ts +3 -0
- package/dist/Card/CardTimer.d.ts +6 -0
- package/dist/Card/CardTitle.d.ts +5 -0
- package/dist/Card/index.d.ts +10 -0
- package/dist/CarouselInput/Carousel.d.ts +15 -0
- package/dist/CarouselInput/CarouselActions.d.ts +10 -0
- package/dist/CarouselInput/CarouselImage.d.ts +6 -0
- package/dist/CarouselInput/CarouselInput.d.ts +8 -0
- package/dist/CarouselInput/CarouselSlide.d.ts +7 -0
- package/dist/CarouselInput/index.d.ts +5 -0
- package/dist/Checkbox/Checkbox.d.ts +9 -0
- package/dist/Checkbox/index.d.ts +1 -0
- package/dist/Combobox/Combobox.d.ts +60 -0
- package/dist/Combobox/ComboboxList.d.ts +10 -0
- package/dist/Combobox/ComboboxOption.d.ts +3 -0
- package/dist/Combobox/__tests__/Combobox.spec.d.ts +1 -0
- package/dist/Combobox/index.d.ts +3 -0
- package/dist/DatePicker/DatePicker.d.ts +78 -0
- package/dist/DatePicker/__tests__/DatePicker.spec.d.ts +1 -0
- package/dist/DatePicker/index.d.ts +2 -0
- package/dist/DateTimePicker/DateTimePicker.d.ts +32 -0
- package/dist/DateTimePicker/__tests__/DateTimePicker.spec.d.ts +1 -0
- package/dist/DateTimePicker/index.d.ts +1 -0
- package/dist/DesignSystemProvider.d.ts +10 -0
- package/dist/Dialog/Dialog.d.ts +7 -0
- package/dist/Dialog/DialogBody.d.ts +6 -0
- package/dist/Dialog/DialogFooter.d.ts +6 -0
- package/dist/Dialog/__tests__/Dialog.spec.d.ts +1 -0
- package/dist/Dialog/index.d.ts +3 -0
- package/dist/DismissibleLayer/index.d.ts +3 -0
- package/dist/Divider/Divider.d.ts +9 -0
- package/dist/Divider/index.d.ts +1 -0
- package/dist/EmptyStateLayout/EmptyStateLayout.d.ts +7 -0
- package/dist/EmptyStateLayout/index.d.ts +1 -0
- package/dist/EmptyStateLayout/story-assets/Illo.d.ts +1 -0
- package/dist/Field/Field.d.ts +14 -0
- package/dist/Field/FieldAction.d.ts +7 -0
- package/dist/Field/FieldContext.d.ts +10 -0
- package/dist/Field/FieldError.d.ts +1 -0
- package/dist/Field/FieldHint.d.ts +1 -0
- package/dist/Field/FieldInput.d.ts +61 -0
- package/dist/Field/FieldLabel.d.ts +11 -0
- package/dist/Field/__tests__/Field.spec.d.ts +1 -0
- package/dist/Field/index.d.ts +7 -0
- package/dist/Flex/Flex.d.ts +15 -0
- package/dist/Flex/index.d.ts +1 -0
- package/dist/FocusTrap/FocusTrap.d.ts +13 -0
- package/dist/FocusTrap/index.d.ts +1 -0
- package/dist/Grid/Grid.d.ts +7 -0
- package/dist/Grid/GridItem.d.ts +47 -0
- package/dist/Grid/index.d.ts +2 -0
- package/dist/Icon/Icon.d.ts +7 -0
- package/dist/Icon/index.d.ts +1 -0
- package/dist/IconButton/IconButton.d.ts +41 -0
- package/dist/IconButton/index.d.ts +1 -0
- package/dist/JSONInput/JSONInput.d.ts +15 -0
- package/dist/JSONInput/__tests__/JSONInput.spec.d.ts +1 -0
- package/dist/JSONInput/index.d.ts +1 -0
- package/dist/JSONInput/utils/decorationExtension.d.ts +7 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.d.ts +6 -0
- package/dist/KeyboardNavigable/index.d.ts +1 -0
- package/dist/Layout/ActionLayout.d.ts +6 -0
- package/dist/Layout/ContentLayout.d.ts +5 -0
- package/dist/Layout/GridLayout.d.ts +1 -0
- package/dist/Layout/HeaderLayout.d.ts +18 -0
- package/dist/Layout/Layout.d.ts +6 -0
- package/dist/Layout/TwoColsLayout.d.ts +6 -0
- package/dist/Layout/index.d.ts +6 -0
- package/dist/Link/Link.d.ts +19 -0
- package/dist/Link/index.d.ts +1 -0
- package/dist/LinkButton/LinkButton.d.ts +23 -0
- package/dist/LinkButton/index.d.ts +1 -0
- package/dist/LiveRegions/LiveRegions.d.ts +1 -0
- package/dist/LiveRegions/__tests__/LiveRegions.spec.d.ts +1 -0
- package/dist/LiveRegions/constants.d.ts +5 -0
- package/dist/LiveRegions/index.d.ts +2 -0
- package/dist/LiveRegions/useNotifyAT.d.ts +5 -0
- package/dist/Loader/Loader.d.ts +6 -0
- package/dist/Loader/index.d.ts +1 -0
- package/dist/Main/Main.d.ts +5 -0
- package/dist/Main/SkipToContent.d.ts +4 -0
- package/dist/Main/index.d.ts +2 -0
- package/dist/MainNav/MainNav.d.ts +5 -0
- package/dist/MainNav/MainNavContext.d.ts +2 -0
- package/dist/MainNav/NavBrand.d.ts +8 -0
- package/dist/MainNav/NavCondense.d.ts +5 -0
- package/dist/MainNav/NavFooter.d.ts +5 -0
- package/dist/MainNav/NavLink.d.ts +9 -0
- package/dist/MainNav/NavSection.d.ts +11 -0
- package/dist/MainNav/NavSections.d.ts +10 -0
- package/dist/MainNav/NavUser.d.ts +7 -0
- package/dist/MainNav/index.d.ts +8 -0
- package/dist/ModalLayout/ModalBody.d.ts +2 -0
- package/dist/ModalLayout/ModalContext.d.ts +2 -0
- package/dist/ModalLayout/ModalFooter.d.ts +5 -0
- package/dist/ModalLayout/ModalHeader.d.ts +6 -0
- package/dist/ModalLayout/ModalLayout.d.ts +6 -0
- package/dist/ModalLayout/__tests__/ModalLayout.spec.d.ts +1 -0
- package/dist/ModalLayout/index.d.ts +4 -0
- package/dist/NumberInput/NumberInput.d.ts +11 -0
- package/dist/NumberInput/index.d.ts +1 -0
- package/dist/Pagination/Pagination.d.ts +8 -0
- package/dist/Pagination/PaginationContext.d.ts +6 -0
- package/dist/Pagination/components.d.ts +26 -0
- package/dist/Pagination/index.d.ts +2 -0
- package/dist/Popover/Popover.d.ts +21 -0
- package/dist/Popover/__tests__/Popover.spec.d.ts +1 -0
- package/dist/Popover/index.d.ts +3 -0
- package/dist/Popover/primitives.d.ts +3 -0
- package/dist/Portal/Portal.d.ts +6 -0
- package/dist/Portal/index.d.ts +1 -0
- package/dist/ProgressBar/ProgressBar.d.ts +11 -0
- package/dist/ProgressBar/index.d.ts +1 -0
- package/dist/Radio/Radio.d.ts +5 -0
- package/dist/Radio/__tests__/Radio.spec.d.ts +1 -0
- package/dist/Radio/index.d.ts +2 -0
- package/dist/RawTable/RawCell.d.ts +14 -0
- package/dist/RawTable/RawTable.d.ts +16 -0
- package/dist/RawTable/RawTableContext.d.ts +10 -0
- package/dist/RawTable/RawTbody.d.ts +5 -0
- package/dist/RawTable/RawThead.d.ts +5 -0
- package/dist/RawTable/RawTr.d.ts +5 -0
- package/dist/RawTable/focusFocusable.d.ts +1 -0
- package/dist/RawTable/index.d.ts +5 -0
- package/dist/Searchbar/SearchForm.d.ts +3 -0
- package/dist/Searchbar/Searchbar.d.ts +9 -0
- package/dist/Searchbar/index.d.ts +2 -0
- package/dist/Select/MultiSelect.d.ts +40 -0
- package/dist/Select/MultiSelectNested.d.ts +13 -0
- package/dist/Select/OptGroup.d.ts +9 -0
- package/dist/Select/Option.d.ts +13 -0
- package/dist/Select/Select.d.ts +18 -0
- package/dist/Select/SelectList.d.ts +25 -0
- package/dist/Select/SelectParts.d.ts +67 -0
- package/dist/Select/SingleSelect.d.ts +41 -0
- package/dist/Select/__tests__/MultiSelect.spec.d.ts +1 -0
- package/dist/Select/__tests__/MultiSelectNested.spec.d.ts +1 -0
- package/dist/Select/__tests__/Select.spec.d.ts +1 -0
- package/dist/Select/__tests__/SingleSelect.spec.d.ts +1 -0
- package/dist/Select/index.d.ts +17 -0
- package/dist/SimpleMenu/SimpleMenu.d.ts +33 -0
- package/dist/SimpleMenu/__tests__/SimpleMenu.spec.d.ts +1 -0
- package/dist/SimpleMenu/index.d.ts +1 -0
- package/dist/SimpleMenu/utils.d.ts +3 -0
- package/dist/Stack/Stack.d.ts +20 -0
- package/dist/Stack/index.d.ts +1 -0
- package/dist/Status/Status.d.ts +15 -0
- package/dist/Status/__tests__/Status.spec.d.ts +1 -0
- package/dist/Status/index.d.ts +1 -0
- package/dist/SubNav/SubNav.d.ts +6 -0
- package/dist/SubNav/SubNavHeader.d.ts +13 -0
- package/dist/SubNav/SubNavLink.d.ts +8 -0
- package/dist/SubNav/SubNavLinkSection.d.ts +7 -0
- package/dist/SubNav/SubNavSection.d.ts +9 -0
- package/dist/SubNav/SubNavSectionLabel.d.ts +8 -0
- package/dist/SubNav/SubNavSections.d.ts +10 -0
- package/dist/SubNav/index.d.ts +6 -0
- package/dist/Switch/Switch.d.ts +13 -0
- package/dist/Switch/index.d.ts +1 -0
- package/dist/Table/Cell.d.ts +8 -0
- package/dist/Table/TFooter.d.ts +7 -0
- package/dist/Table/Table.d.ts +7 -0
- package/dist/Table/Tbody.d.ts +2 -0
- package/dist/Table/Thead.d.ts +2 -0
- package/dist/Table/Tr.d.ts +2 -0
- package/dist/Table/index.d.ts +6 -0
- package/dist/Tabs/TabGroup.d.ts +14 -0
- package/dist/Tabs/TabPanels.d.ts +9 -0
- package/dist/Tabs/Tabs.d.ts +17 -0
- package/dist/Tabs/TabsContext.d.ts +10 -0
- package/dist/Tabs/components.d.ts +94 -0
- package/dist/Tabs/index.d.ts +3 -0
- package/dist/Tag/Tag.d.ts +5 -0
- package/dist/Tag/__tests__/Tag.spec.d.ts +1 -0
- package/dist/Tag/index.d.ts +1 -0
- package/dist/TextButton/TextButton.d.ts +8 -0
- package/dist/TextButton/index.d.ts +1 -0
- package/dist/TextInput/TextInput.d.ts +10 -0
- package/dist/TextInput/__tests__/TextInput.spec.d.ts +1 -0
- package/dist/TextInput/index.d.ts +1 -0
- package/dist/Textarea/Textarea.d.ts +17 -0
- package/dist/Textarea/index.d.ts +1 -0
- package/dist/ThemeProvider/ThemeProvider.d.ts +10 -0
- package/dist/ThemeProvider/hooks.d.ts +1 -0
- package/dist/ThemeProvider/index.d.ts +2 -0
- package/dist/TimePicker/TimePicker.d.ts +26 -0
- package/dist/TimePicker/__tests__/TimePicker.spec.d.ts +1 -0
- package/dist/TimePicker/index.d.ts +1 -0
- package/dist/ToggleCheckbox/ToggleCheckbox.d.ts +10 -0
- package/dist/ToggleCheckbox/index.d.ts +1 -0
- package/dist/ToggleInput/ToggleInput.d.ts +24 -0
- package/dist/ToggleInput/__tests__/ToggleInput.spec.d.ts +1 -0
- package/dist/ToggleInput/index.d.ts +1 -0
- package/dist/Tooltip/Tooltip.d.ts +11 -0
- package/dist/Tooltip/__tests__/Tooltip.spec.d.ts +1 -0
- package/dist/Tooltip/hooks/useTooltipHandlers.d.ts +7 -0
- package/dist/Tooltip/hooks/useTooltipLayout.d.ts +5 -0
- package/dist/Tooltip/index.d.ts +1 -0
- package/dist/Tooltip/utils/__tests__/positionTooltip.spec.d.ts +1 -0
- package/dist/Tooltip/utils/positionTooltip.d.ts +5 -0
- package/dist/Typography/Typography.d.ts +19 -0
- package/dist/Typography/__tests__/Typography.spec.d.ts +1 -0
- package/dist/Typography/constants.d.ts +8 -0
- package/dist/Typography/index.d.ts +1 -0
- package/dist/Typography/utils.d.ts +9 -0
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -0
- package/dist/VisuallyHidden/index.d.ts +1 -0
- package/dist/helpers/__tests__/deprecations.spec.d.ts +1 -0
- package/dist/helpers/context.d.ts +7 -0
- package/dist/helpers/deprecations.d.ts +2 -0
- package/dist/helpers/getDefaultLocale.d.ts +5 -0
- package/dist/helpers/getFocusableNodes.d.ts +10 -0
- package/dist/helpers/handleResponsiveValues.d.ts +17 -0
- package/dist/helpers/keyboardKeys.d.ts +17 -0
- package/dist/helpers/objects.d.ts +8 -0
- package/dist/helpers/setOpacity.d.ts +1 -0
- package/dist/helpers/setTabIndexOnFirstItem.d.ts +1 -0
- package/dist/helpers/strings.d.ts +1 -0
- package/dist/helpers/theme.d.ts +2 -0
- package/dist/helpers/useElementOnScreen.d.ts +6 -0
- package/dist/helpers/useId.d.ts +6 -0
- package/dist/helpers/useIntersection.d.ts +6 -0
- package/dist/helpers/useLockScroll.d.ts +7 -0
- package/dist/helpers/usePrevious.d.ts +6 -0
- package/dist/helpers/useResizeObserver.d.ts +6 -0
- package/dist/hooks/__tests__/useId.spec.d.ts +1 -0
- package/dist/hooks/useComposeRefs.d.ts +29 -0
- package/dist/hooks/useControllableState.d.ts +19 -0
- package/dist/hooks/useDateFormatter.d.ts +28 -0
- package/dist/hooks/useElementOnScreen.d.ts +1 -0
- package/dist/hooks/useId.d.ts +1 -0
- package/dist/hooks/useIntersection.d.ts +7 -0
- package/dist/hooks/useLockScroll.d.ts +2 -0
- package/dist/hooks/usePrevious.d.ts +1 -0
- package/dist/hooks/useResizeObserver.d.ts +2 -0
- package/dist/index.d.ts +69 -0
- package/dist/themes/__tests__/extendTheme.spec.d.ts +1 -0
- package/dist/themes/colors.d.ts +54 -0
- package/dist/themes/common-theme.d.ts +19 -0
- package/dist/themes/darkTheme/dark-colors.d.ts +4 -0
- package/dist/themes/darkTheme/dark-shadows.d.ts +4 -0
- package/dist/themes/darkTheme/index.d.ts +2 -0
- package/dist/themes/extendTheme.d.ts +2 -0
- package/dist/themes/index.d.ts +10 -0
- package/dist/themes/lightTheme/index.d.ts +2 -0
- package/dist/themes/lightTheme/light-colors.d.ts +4 -0
- package/dist/themes/lightTheme/light-shadows.d.ts +4 -0
- package/dist/themes/sizes.d.ts +21 -0
- package/dist/themes/utils.d.ts +12 -0
- package/dist/types.d.ts +3 -0
- package/dist/v2/Breadcrumbs/Breadcrumbs.d.ts +8 -0
- package/dist/v2/Breadcrumbs/Crumb.d.ts +8 -0
- package/dist/v2/Breadcrumbs/CrumbLink.d.ts +5 -0
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.d.ts +11 -0
- package/dist/v2/Breadcrumbs/Divider.d.ts +4 -0
- package/dist/v2/Breadcrumbs/__tests__/Breadcrumbs.spec.d.ts +1 -0
- package/dist/v2/Breadcrumbs/index.d.ts +4 -0
- package/dist/v2/Link/Link.d.ts +11 -0
- package/dist/v2/Link/index.d.ts +1 -0
- package/dist/v2/LinkButton/LinkButton.d.ts +61 -0
- package/dist/v2/LinkButton/index.d.ts +1 -0
- package/dist/v2/MainNav/MainNav.d.ts +5 -0
- package/dist/v2/MainNav/MainNavContext.d.ts +2 -0
- package/dist/v2/MainNav/NavBrand.d.ts +9 -0
- package/dist/v2/MainNav/NavCondense.d.ts +5 -0
- package/dist/v2/MainNav/NavFooter.d.ts +5 -0
- package/dist/v2/MainNav/NavLink.d.ts +9 -0
- package/dist/v2/MainNav/NavSection.d.ts +9 -0
- package/dist/v2/MainNav/NavSections.d.ts +8 -0
- package/dist/v2/MainNav/NavUser.d.ts +8 -0
- package/dist/v2/MainNav/index.d.ts +8 -0
- package/dist/v2/Pagination/Pagination.d.ts +8 -0
- package/dist/v2/Pagination/PaginationContext.d.ts +6 -0
- package/dist/v2/Pagination/components.d.ts +16 -0
- package/dist/v2/Pagination/index.d.ts +2 -0
- package/dist/v2/SimpleMenu/Menu.d.ts +56 -0
- package/dist/v2/SimpleMenu/SimpleMenu.d.ts +62 -0
- package/dist/v2/SimpleMenu/__tests__/Menu.spec.d.ts +1 -0
- package/dist/v2/SimpleMenu/__tests__/SimpleMenu.spec.d.ts +1 -0
- package/dist/v2/SimpleMenu/index.d.ts +1 -0
- package/dist/v2/SubNav/SubNav.d.ts +6 -0
- package/dist/v2/SubNav/SubNavHeader.d.ts +13 -0
- package/dist/v2/SubNav/SubNavLink.d.ts +9 -0
- package/dist/v2/SubNav/SubNavLinkSection.d.ts +7 -0
- package/dist/v2/SubNav/SubNavSection.d.ts +9 -0
- package/dist/v2/SubNav/SubNavSectionLabel.d.ts +9 -0
- package/dist/v2/SubNav/SubNavSections.d.ts +8 -0
- package/dist/v2/SubNav/index.d.ts +6 -0
- package/dist/v2/index.d.ts +7 -0
- package/package.json +7 -7
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DateFormatter } from '@internationalized/date';
|
|
2
|
+
export interface DateFormatterOptions extends Intl.DateTimeFormatOptions {
|
|
3
|
+
calendar?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* This hook wraps the `DateFormatter` from `@internationalized/date`. Which essentially is
|
|
7
|
+
* an extension of the `Intl.DateTimeFormat` API with some additional features.
|
|
8
|
+
*
|
|
9
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat
|
|
10
|
+
* for more information.
|
|
11
|
+
*
|
|
12
|
+
* @returns a memoized DateFormatter instance
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* const MyComponent = () => {
|
|
17
|
+
* const monthFormatter = useDateFormatter(locale, { month: 'long' });
|
|
18
|
+
* const months: string[] = React.useMemo(
|
|
19
|
+
* () => [...Array(12).keys()].map((m) => monthFormatter.format(new Date(Date.UTC(2023, m)))),
|
|
20
|
+
* [monthFormatter],
|
|
21
|
+
* );
|
|
22
|
+
*
|
|
23
|
+
* // assuming the locale is `en-GB` this will render `Janyary` to `December`.
|
|
24
|
+
* return months.map((month) => <p key={month}>{month}</p>)
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare function useDateFormatter(locale: string, options?: DateFormatterOptions): DateFormatter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useElementOnScreen: <TElement extends HTMLElement = HTMLElement>(options?: IntersectionObserverInit) => [containerRef: import("react").RefObject<TElement>, isVisible: boolean];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useId: (initialId?: string | number | undefined) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
interface UseIntersectionOptions {
|
|
3
|
+
selectorToWatch: string;
|
|
4
|
+
skipWhen?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const useIntersection: (scrollableAreaRef: MutableRefObject<HTMLElement | null>, callback: (entry: IntersectionObserverEntry) => void, { selectorToWatch, skipWhen }: UseIntersectionOptions) => void;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const usePrevious: <TValue>(value: TValue) => TValue | undefined;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export * from './Accordion';
|
|
2
|
+
export * from './Alert';
|
|
3
|
+
export * from './Avatar';
|
|
4
|
+
export * from './Badge';
|
|
5
|
+
export * from './BaseButton';
|
|
6
|
+
export * from './BaseCheckbox';
|
|
7
|
+
export * from './BaseLink';
|
|
8
|
+
export { BaseRadio } from './BaseRadio';
|
|
9
|
+
export * from './Box';
|
|
10
|
+
export * from './Breadcrumbs';
|
|
11
|
+
export * from './Button';
|
|
12
|
+
export * from './Card';
|
|
13
|
+
export * from './CarouselInput';
|
|
14
|
+
export * from './Checkbox';
|
|
15
|
+
export * from './Combobox';
|
|
16
|
+
export * from './DesignSystemProvider';
|
|
17
|
+
export * from './Dialog';
|
|
18
|
+
export * from './DismissibleLayer';
|
|
19
|
+
export * from './DatePicker';
|
|
20
|
+
export * from './DateTimePicker';
|
|
21
|
+
export * from './Divider';
|
|
22
|
+
export * from './EmptyStateLayout';
|
|
23
|
+
export * from './Field';
|
|
24
|
+
export * from './FocusTrap';
|
|
25
|
+
export * from './Grid';
|
|
26
|
+
export * from './Icon';
|
|
27
|
+
export * from './IconButton';
|
|
28
|
+
export * from './JSONInput';
|
|
29
|
+
export * from './KeyboardNavigable';
|
|
30
|
+
export * from './Layout';
|
|
31
|
+
export * from './Link';
|
|
32
|
+
export * from './LinkButton';
|
|
33
|
+
export * from './LiveRegions';
|
|
34
|
+
export * from './Loader';
|
|
35
|
+
export * from './Main';
|
|
36
|
+
export * from './MainNav';
|
|
37
|
+
export * from './ModalLayout';
|
|
38
|
+
export * from './NumberInput';
|
|
39
|
+
export * from './Pagination';
|
|
40
|
+
export * from './Popover';
|
|
41
|
+
export * from './Portal';
|
|
42
|
+
export * from './ProgressBar';
|
|
43
|
+
export * from './Radio';
|
|
44
|
+
export * from './RawTable';
|
|
45
|
+
export * from './Flex';
|
|
46
|
+
export * from './Searchbar';
|
|
47
|
+
export * from './Select';
|
|
48
|
+
export * from './SimpleMenu';
|
|
49
|
+
export * from './Stack';
|
|
50
|
+
export * from './Status';
|
|
51
|
+
export * from './SubNav';
|
|
52
|
+
export * from './Switch';
|
|
53
|
+
export * from './Tabs';
|
|
54
|
+
export * from './Table';
|
|
55
|
+
export * from './Tag';
|
|
56
|
+
export * from './TextButton';
|
|
57
|
+
export * from './TextInput';
|
|
58
|
+
export * from './Textarea';
|
|
59
|
+
export * from './ThemeProvider';
|
|
60
|
+
export * from './TimePicker';
|
|
61
|
+
export * from './ToggleCheckbox';
|
|
62
|
+
export * from './ToggleInput';
|
|
63
|
+
export * from './Tooltip';
|
|
64
|
+
export * from './Typography';
|
|
65
|
+
export * from './VisuallyHidden';
|
|
66
|
+
export * from './themes';
|
|
67
|
+
export * from './hooks/useComposeRefs';
|
|
68
|
+
export * from './hooks/useDateFormatter';
|
|
69
|
+
export { useFilter, useCollator, type Filter, useCallbackRef, composeEventHandlers } from '@strapi/ui-primitives';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface Shadows {
|
|
2
|
+
filterShadow: string;
|
|
3
|
+
focus: string;
|
|
4
|
+
focusShadow: string;
|
|
5
|
+
popupShadow: string;
|
|
6
|
+
tableShadow: string;
|
|
7
|
+
}
|
|
8
|
+
export interface Colors {
|
|
9
|
+
alternative100: string;
|
|
10
|
+
alternative200: string;
|
|
11
|
+
alternative500: string;
|
|
12
|
+
alternative600: string;
|
|
13
|
+
alternative700: string;
|
|
14
|
+
buttonNeutral0: string;
|
|
15
|
+
buttonPrimary500: string;
|
|
16
|
+
buttonPrimary600: string;
|
|
17
|
+
danger100: string;
|
|
18
|
+
danger200: string;
|
|
19
|
+
danger500: string;
|
|
20
|
+
danger600: string;
|
|
21
|
+
danger700: string;
|
|
22
|
+
neutral0: string;
|
|
23
|
+
neutral100: string;
|
|
24
|
+
neutral1000: string;
|
|
25
|
+
neutral150: string;
|
|
26
|
+
neutral200: string;
|
|
27
|
+
neutral300: string;
|
|
28
|
+
neutral400: string;
|
|
29
|
+
neutral500: string;
|
|
30
|
+
neutral600: string;
|
|
31
|
+
neutral700: string;
|
|
32
|
+
neutral800: string;
|
|
33
|
+
neutral900: string;
|
|
34
|
+
primary100: string;
|
|
35
|
+
primary200: string;
|
|
36
|
+
primary500: string;
|
|
37
|
+
primary600: string;
|
|
38
|
+
primary700: string;
|
|
39
|
+
secondary100: string;
|
|
40
|
+
secondary200: string;
|
|
41
|
+
secondary500: string;
|
|
42
|
+
secondary600: string;
|
|
43
|
+
secondary700: string;
|
|
44
|
+
success100: string;
|
|
45
|
+
success200: string;
|
|
46
|
+
success500: string;
|
|
47
|
+
success600: string;
|
|
48
|
+
success700: string;
|
|
49
|
+
warning100: string;
|
|
50
|
+
warning200: string;
|
|
51
|
+
warning500: string;
|
|
52
|
+
warning600: string;
|
|
53
|
+
warning700: string;
|
|
54
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Sizes } from './sizes';
|
|
2
|
+
export interface CommonTheme {
|
|
3
|
+
sizes: Sizes;
|
|
4
|
+
zIndices: [5, 10, 15, 20];
|
|
5
|
+
spaces: ['0px', '4px', '8px', '12px', '16px', '20px', '24px', '32px', '40px', '48px', '56px', '64px'];
|
|
6
|
+
borderRadius: '4px';
|
|
7
|
+
mediaQueries: {
|
|
8
|
+
tablet: string;
|
|
9
|
+
mobile: string;
|
|
10
|
+
};
|
|
11
|
+
fontSizes: [string, string, string, string, string, string];
|
|
12
|
+
lineHeights: [1.14, 1.22, 1.25, 1.33, 1.43, 1.45, 1.5];
|
|
13
|
+
fontWeights: {
|
|
14
|
+
regular: 400;
|
|
15
|
+
semiBold: 500;
|
|
16
|
+
bold: 600;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare const commonTheme: CommonTheme;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Colors, Shadows } from './colors';
|
|
2
|
+
import { CommonTheme } from './common-theme';
|
|
3
|
+
export * from './lightTheme';
|
|
4
|
+
export * from './darkTheme';
|
|
5
|
+
export * from './extendTheme';
|
|
6
|
+
export * from './utils';
|
|
7
|
+
export interface StrapiTheme extends CommonTheme {
|
|
8
|
+
colors: Colors;
|
|
9
|
+
shadows: Shadows;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface Sizes {
|
|
2
|
+
input: {
|
|
3
|
+
S: string;
|
|
4
|
+
M: string;
|
|
5
|
+
};
|
|
6
|
+
accordions: {
|
|
7
|
+
S: string;
|
|
8
|
+
M: string;
|
|
9
|
+
};
|
|
10
|
+
badge: {
|
|
11
|
+
S: string;
|
|
12
|
+
M: string;
|
|
13
|
+
};
|
|
14
|
+
button: {
|
|
15
|
+
S: string;
|
|
16
|
+
M: string;
|
|
17
|
+
L: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare const sizes: Sizes;
|
|
21
|
+
export type InputSizes = keyof Sizes['input'];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
|
2
|
+
export declare const getThemeSize: <TType extends keyof import("src/themes/sizes").Sizes>(type: TType) => ({ theme, size }: {
|
|
3
|
+
theme: DefaultTheme;
|
|
4
|
+
size: keyof DefaultTheme['sizes'][TType];
|
|
5
|
+
}) => import("src/themes/sizes").Sizes[TType][keyof import("src/themes/sizes").Sizes[TType]];
|
|
6
|
+
export declare const inputFocusStyle: (rootElement?: string) => ({ theme, hasError }: {
|
|
7
|
+
theme: DefaultTheme;
|
|
8
|
+
hasError?: boolean | undefined;
|
|
9
|
+
}) => import("styled-components").FlattenSimpleInterpolation;
|
|
10
|
+
export declare const buttonFocusStyle: ({ theme }: {
|
|
11
|
+
theme: DefaultTheme;
|
|
12
|
+
}) => import("styled-components").FlattenSimpleInterpolation;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FlexProps } from '../../Flex';
|
|
2
|
+
export interface BreadcrumbsProps extends FlexProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const Breadcrumbs: {
|
|
6
|
+
({ label, children, ...props }: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TypographyProps } from '../../Typography';
|
|
2
|
+
export interface CrumbProps extends TypographyProps {
|
|
3
|
+
isCurrent?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const Crumb: {
|
|
6
|
+
({ children, isCurrent, ...props }: CrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps } from '../../Button';
|
|
3
|
+
export interface CrumbSimpleMenuProps extends ButtonProps {
|
|
4
|
+
'aria-label': string;
|
|
5
|
+
icon?: React.ReactElement;
|
|
6
|
+
endIcon?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const CrumbSimpleMenu: {
|
|
9
|
+
({ children, ...props }: CrumbSimpleMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseLinkProps } from '../../BaseLink';
|
|
3
|
+
export interface LinkProps extends BaseLinkProps {
|
|
4
|
+
startIcon?: React.ReactNode;
|
|
5
|
+
endIcon?: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* @default true
|
|
8
|
+
*/
|
|
9
|
+
isExternal?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Link';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseButtonProps } from '../../BaseButton';
|
|
3
|
+
import { BaseLinkProps } from '../../BaseLink';
|
|
4
|
+
import { VARIANTS, BUTTON_SIZES } from '../../Button/constants';
|
|
5
|
+
interface SharedLinkProps extends BaseLinkProps {
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
endIcon?: React.ReactNode;
|
|
8
|
+
size?: (typeof BUTTON_SIZES)[number];
|
|
9
|
+
startIcon?: React.ReactNode;
|
|
10
|
+
variant?: (typeof VARIANTS)[number];
|
|
11
|
+
}
|
|
12
|
+
export type LinkButtonProps = SharedLinkProps & BaseButtonProps;
|
|
13
|
+
export declare const LinkButton: React.ForwardRefExoticComponent<SharedLinkProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & Pick<import("styled-components").CSSProperties, "cursor" | "display" | "overflow" | "pointerEvents" | "transform" | "position" | "textAlign" | "textTransform" | "zIndex" | "animation" | "transition"> & {
|
|
14
|
+
_hover?: ((theme: import("styled-components").DefaultTheme) => string) | undefined;
|
|
15
|
+
background?: import("src/types").DefaultThemeOrCSSProp<"colors", "background">;
|
|
16
|
+
basis?: import("csstype").Property.FlexBasis<string | number> | undefined;
|
|
17
|
+
borderColor?: keyof import("src/themes/colors").Colors | undefined;
|
|
18
|
+
color?: keyof import("src/themes/colors").Colors | undefined;
|
|
19
|
+
flex?: import("csstype").Property.Flex<string | number> | undefined;
|
|
20
|
+
fontSize?: import("src/types").DefaultThemeOrCSSProp<"fontSizes", "fontSize">;
|
|
21
|
+
grow?: import("csstype").Property.FlexGrow | undefined;
|
|
22
|
+
hasRadius?: boolean | undefined;
|
|
23
|
+
hiddenS?: boolean | undefined;
|
|
24
|
+
hiddenXS?: boolean | undefined;
|
|
25
|
+
padding?: import("src/helpers/handleResponsiveValues").ResponsiveValue<"padding">;
|
|
26
|
+
paddingBottom?: import("src/helpers/handleResponsiveValues").ResponsiveValue<"paddingBottom">;
|
|
27
|
+
paddingLeft?: import("src/helpers/handleResponsiveValues").ResponsiveValue<"paddingLeft">;
|
|
28
|
+
paddingRight?: import("src/helpers/handleResponsiveValues").ResponsiveValue<"paddingRight">;
|
|
29
|
+
paddingTop?: import("src/helpers/handleResponsiveValues").ResponsiveValue<"paddingTop">;
|
|
30
|
+
marginLeft?: import("src/helpers/handleResponsiveValues").ResponsiveValue<"marginLeft">;
|
|
31
|
+
marginBottom?: import("src/helpers/handleResponsiveValues").ResponsiveValue<"marginBottom">;
|
|
32
|
+
marginRight?: import("src/helpers/handleResponsiveValues").ResponsiveValue<"marginRight">;
|
|
33
|
+
marginTop?: import("src/helpers/handleResponsiveValues").ResponsiveValue<"marginTop">;
|
|
34
|
+
shadow?: keyof import("src/themes/colors").Shadows | undefined;
|
|
35
|
+
shrink?: import("csstype").Property.FlexShrink | undefined;
|
|
36
|
+
lineHeight?: import("src/types").DefaultThemeOrCSSProp<"lineHeights", "lineHeight">;
|
|
37
|
+
width?: import("src/types").DefaultThemeOrCSSProp<"spaces", "width">;
|
|
38
|
+
minWidth?: import("src/types").DefaultThemeOrCSSProp<"spaces", "minWidth">;
|
|
39
|
+
maxWidth?: import("src/types").DefaultThemeOrCSSProp<"spaces", "maxWidth">;
|
|
40
|
+
height?: import("src/types").DefaultThemeOrCSSProp<"spaces", "height">;
|
|
41
|
+
minHeight?: import("src/types").DefaultThemeOrCSSProp<"spaces", "minHeight">;
|
|
42
|
+
maxHeight?: import("src/types").DefaultThemeOrCSSProp<"spaces", "maxHeight">;
|
|
43
|
+
top?: import("src/types").DefaultThemeOrCSSProp<"spaces", "top">;
|
|
44
|
+
left?: import("src/types").DefaultThemeOrCSSProp<"spaces", "left">;
|
|
45
|
+
bottom?: import("src/types").DefaultThemeOrCSSProp<"spaces", "bottom">;
|
|
46
|
+
right?: import("src/types").DefaultThemeOrCSSProp<"spaces", "right">;
|
|
47
|
+
borderRadius?: import("csstype").Property.BorderRadius<string | number> | undefined;
|
|
48
|
+
borderStyle?: import("csstype").Property.BorderStyle | undefined;
|
|
49
|
+
borderWidth?: import("csstype").Property.BorderWidth<string | number> | undefined;
|
|
50
|
+
children?: React.ReactNode;
|
|
51
|
+
as?: string | React.ComponentType<any> | undefined;
|
|
52
|
+
forwardedAs?: string | React.ComponentType<any> | undefined;
|
|
53
|
+
} & {
|
|
54
|
+
alignItems?: import("csstype").Property.AlignItems | undefined;
|
|
55
|
+
direction?: import("csstype").Property.FlexDirection | undefined;
|
|
56
|
+
gap?: any;
|
|
57
|
+
inline?: boolean | undefined;
|
|
58
|
+
justifyContent?: import("csstype").Property.JustifyContent | undefined;
|
|
59
|
+
wrap?: import("csstype").Property.FlexWrap | undefined;
|
|
60
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LinkButton';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseLinkProps } from '../../BaseLink';
|
|
3
|
+
export interface NavBrandProps extends BaseLinkProps {
|
|
4
|
+
icon: React.ReactNode;
|
|
5
|
+
title: string;
|
|
6
|
+
to?: string;
|
|
7
|
+
workplace: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const NavBrand: React.ForwardRefExoticComponent<NavBrandProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseLinkProps } from '../../BaseLink';
|
|
3
|
+
export interface NavLinkProps extends BaseLinkProps {
|
|
4
|
+
badgeAriaLabel?: string;
|
|
5
|
+
badgeContent?: string | number;
|
|
6
|
+
children: string;
|
|
7
|
+
icon: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const NavLink: React.ForwardRefExoticComponent<NavLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FlexProps } from '../../Flex';
|
|
3
|
+
export interface NavSectionProps extends FlexProps<'ul'> {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
label: string;
|
|
6
|
+
horizontal?: boolean;
|
|
7
|
+
spacing?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const NavSection: ({ label, children, horizontal, spacing, ...props }: NavSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FlexProps } from '../../Flex';
|
|
3
|
+
export interface NavSectionsProps extends FlexProps<'ul'> {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
spacing?: number;
|
|
6
|
+
horizontal?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const NavSections: ({ children, spacing, horizontal, ...props }: NavSectionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BoxProps } from '../../Box';
|
|
3
|
+
export interface NavUserProps extends BoxProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
initials?: React.ReactNode;
|
|
6
|
+
src?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const NavUser: React.ForwardRefExoticComponent<NavUserProps & React.RefAttributes<any>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface PaginationProps {
|
|
3
|
+
activePage: number;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
label?: string;
|
|
6
|
+
pageCount: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const Pagination: ({ children, label, activePage, pageCount }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseLinkProps } from '../../BaseLink';
|
|
3
|
+
import { BoxProps } from '../../Box';
|
|
4
|
+
interface PaginationLinkProps extends BaseLinkProps {
|
|
5
|
+
active: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface PaginationPageLinkProps extends PaginationLinkProps {
|
|
8
|
+
number: number;
|
|
9
|
+
}
|
|
10
|
+
interface DotsProps extends BoxProps {
|
|
11
|
+
}
|
|
12
|
+
export declare const PreviousLink: React.ForwardRefExoticComponent<PaginationLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
13
|
+
export declare const NextLink: React.ForwardRefExoticComponent<PaginationLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
14
|
+
export declare const PageLink: React.ForwardRefExoticComponent<PaginationPageLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
15
|
+
export declare const Dots: ({ children, ...props }: DotsProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
import { BaseLink } from '../../BaseLink';
|
|
4
|
+
import { BoxProps } from '../../Box';
|
|
5
|
+
import { ButtonProps } from '../../Button';
|
|
6
|
+
import { FlexProps } from '../../Flex';
|
|
7
|
+
import { POPOVER_PLACEMENTS } from '../../Popover';
|
|
8
|
+
import { TypographyProps } from '../../Typography';
|
|
9
|
+
import { LinkProps } from '../Link';
|
|
10
|
+
interface RootProps extends DropdownMenu.DropdownMenuProps {
|
|
11
|
+
}
|
|
12
|
+
interface TriggerProps extends ButtonProps {
|
|
13
|
+
}
|
|
14
|
+
interface ContentProps extends FlexProps<'div'> {
|
|
15
|
+
intersectionId?: string;
|
|
16
|
+
popoverPlacement?: (typeof POPOVER_PLACEMENTS)[number];
|
|
17
|
+
}
|
|
18
|
+
interface ItemSharedProps extends Pick<DropdownMenu.MenuItemProps, 'disabled' | 'onSelect'> {
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
isExternal?: boolean;
|
|
21
|
+
isFocused?: boolean;
|
|
22
|
+
}
|
|
23
|
+
interface ItemExternalLinkProps extends ItemSharedProps, Omit<LinkProps, 'onSelect'> {
|
|
24
|
+
as?: never;
|
|
25
|
+
isLink?: false;
|
|
26
|
+
isExternal?: true;
|
|
27
|
+
}
|
|
28
|
+
type ItemInternalLinkProps<TComponent extends React.ComponentType = typeof BaseLink> = ItemSharedProps & ComponentPropsWithoutRef<TComponent> & {
|
|
29
|
+
as?: TComponent;
|
|
30
|
+
isLink?: true;
|
|
31
|
+
isExternal?: false;
|
|
32
|
+
};
|
|
33
|
+
interface ItemButtonProps extends ItemSharedProps, Omit<BoxProps<'button'>, 'onSelect'> {
|
|
34
|
+
as?: never;
|
|
35
|
+
isLink?: false;
|
|
36
|
+
isExternal?: false;
|
|
37
|
+
}
|
|
38
|
+
type ItemProps<TComponent extends React.ComponentType = typeof BaseLink> = ItemButtonProps | ItemInternalLinkProps<TComponent> | ItemExternalLinkProps;
|
|
39
|
+
interface LabelProps extends TypographyProps {
|
|
40
|
+
}
|
|
41
|
+
interface SubRootProps extends DropdownMenu.DropdownMenuSubProps {
|
|
42
|
+
}
|
|
43
|
+
interface SubTriggerProps extends BoxProps<'button'> {
|
|
44
|
+
}
|
|
45
|
+
interface SubContentProps extends FlexProps<'div'> {
|
|
46
|
+
}
|
|
47
|
+
declare const Root: import("react").FC<DropdownMenu.DropdownMenuProps>;
|
|
48
|
+
declare const Trigger: import("react").ForwardRefExoticComponent<TriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
49
|
+
declare const Content: import("react").ForwardRefExoticComponent<ContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
50
|
+
declare const Item: ({ onSelect, disabled, ...props }: ItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
52
|
+
declare const SubRoot: import("react").FC<DropdownMenu.DropdownMenuSubProps>;
|
|
53
|
+
declare const SubTrigger: import("react").ForwardRefExoticComponent<SubTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
54
|
+
declare const SubContent: import("react").ForwardRefExoticComponent<SubContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
55
|
+
export { Root, Trigger, Content, Item, Label, SubRoot, SubTrigger, SubContent };
|
|
56
|
+
export type { TriggerProps, ContentProps, ItemProps, RootProps, SubRootProps, SubTriggerProps, SubContentProps, LabelProps, };
|