uikit-react-public 0.29.6 → 0.30.1
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/components/Accordion/Accordion.stories.d.ts +1 -1
- package/dist/components/Alert/Alert.stories.d.ts +1 -1
- package/dist/components/AppHeader/AppHeader.stories.d.ts +1 -1
- package/dist/components/AppMenu/AppMenu.stories.d.ts +1 -1
- package/dist/components/Avatar/Avatar.stories.d.ts +1 -1
- package/dist/components/Badge/Badge.stories.d.ts +1 -1
- package/dist/components/BaseCheckbox/BaseCheckbox.stories.d.ts +1 -1
- package/dist/components/Blanket/Blanket.stories.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +1 -1
- package/dist/components/Button/Button.stories.d.ts +1 -1
- package/dist/components/Calendar/Calendar.stories.d.ts +1 -1
- package/dist/components/Calendar/subcomponents/Day.stories.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/components/Chip/Chip.stories.d.ts +1 -1
- package/dist/components/Datepicker/Datepicker.stories.d.ts +1 -1
- package/dist/components/Dialog/BaseDialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +2 -2
- package/dist/components/Divider/Divider.stories.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.stories.d.ts +1 -1
- package/dist/components/FeedbackDialog/FeedbackDialog.stories.d.ts +1 -1
- package/dist/components/Field/Field.stories.d.ts +1 -1
- package/dist/components/FileInput/FileInput.stories.d.ts +1 -1
- package/dist/components/Footer/Footer.stories.d.ts +1 -1
- package/dist/components/Header/Header.stories.d.ts +1 -1
- package/dist/components/Heading/Heading.stories.d.ts +1 -1
- package/dist/components/Icon/Icon.stories.d.ts +1 -1
- package/dist/components/IconButton/IconButton.stories.d.ts +1 -1
- package/dist/components/Input/Input.stories.d.ts +1 -1
- package/dist/components/Label/Label.stories.d.ts +1 -1
- package/dist/components/Layout/Layout.stories.d.ts +1 -1
- package/dist/components/Link/Link.stories.d.ts +1 -1
- package/dist/components/Main/Main.stories.d.ts +1 -1
- package/dist/components/Modal/Modal.stories.d.ts +1 -1
- package/dist/components/NativeDatepicker/NativeDatepicker.stories.d.ts +1 -1
- package/dist/components/Overlay/Overlay.stories.d.ts +2 -2
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
- package/dist/components/Paragraph/Paragraph.stories.d.ts +1 -1
- package/dist/components/Radio/Radio.stories.d.ts +1 -1
- package/dist/components/Search/Search.stories.d.ts +1 -1
- package/dist/components/Select/Select.stories.d.ts +1 -1
- package/dist/components/Snackbar/Snackbar.stories.d.ts +1 -1
- package/dist/components/Spinner/Spinner.stories.d.ts +1 -1
- package/dist/components/StandaloneLink/StandaloneLink.stories.d.ts +1 -1
- package/dist/components/Table/Table.stories.d.ts +1 -1
- package/dist/components/Table/subcomponents/Cell/Cell.stories.d.ts +2 -2
- package/dist/components/Table/subcomponents/HeadCell/HeadCell.stories.d.ts +2 -2
- package/dist/components/Tabs/Tab.d.ts +11 -5
- package/dist/components/Tabs/TabContext.d.ts +14 -8
- package/dist/components/Tabs/Tabs.d.ts +25 -8
- package/dist/components/Tabs/Tabs.stories.d.ts +5 -9
- package/dist/components/Tabs/TabsList.d.ts +9 -0
- package/dist/components/Tabs/TabsPanel.d.ts +10 -0
- package/dist/components/Tabs/index.d.ts +2 -1
- package/dist/components/Textarea/Textarea.stories.d.ts +1 -1
- package/dist/components/Timepicker/Timepicker.stories.d.ts +1 -1
- package/dist/components/Toggle/Toggle.stories.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/components/UclLogo/UclLogo.stories.d.ts +1 -1
- package/dist/components/WeekPicker/WeekPicker.stories.d.ts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/index.js +4392 -4123
- package/dist/utils/announce.d.ts +2 -1
- package/lib/Welcome.mdx +1 -1
- package/lib/components/Accordion/Accordion.stories.tsx +1 -1
- package/lib/components/Alert/Alert.mdx +1 -1
- package/lib/components/Alert/Alert.stories.tsx +1 -1
- package/lib/components/AppHeader/AppHeader.stories.tsx +1 -1
- package/lib/components/AppMenu/AppMenu.stories.tsx +1 -1
- package/lib/components/Avatar/Avatar.mdx +1 -1
- package/lib/components/Avatar/Avatar.stories.tsx +1 -1
- package/lib/components/Badge/Badge.stories.tsx +1 -1
- package/lib/components/BaseCheckbox/BaseCheckbox.stories.tsx +2 -2
- package/lib/components/Blanket/Blanket.stories.tsx +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.tsx +1 -1
- package/lib/components/Button/Button.mdx +1 -1
- package/lib/components/Button/Button.stories.tsx +2 -2
- package/lib/components/Calendar/Calendar.stories.tsx +2 -2
- package/lib/components/Calendar/subcomponents/Day.stories.tsx +1 -1
- package/lib/components/Checkbox/Checkbox.stories.tsx +2 -2
- package/lib/components/Chip/Chip.stories.tsx +2 -2
- package/lib/components/Datepicker/Datepicker.stories.tsx +2 -2
- package/lib/components/Dialog/BaseDialog.tsx +180 -161
- package/lib/components/Dialog/Dialog.stories.tsx +1 -1
- package/lib/components/Dialog/Dialog.tsx +15 -11
- package/lib/components/Divider/Divider.stories.tsx +1 -1
- package/lib/components/Dropdown/Dropdown.stories.tsx +1 -1
- package/lib/components/FeedbackDialog/FeedbackDialog.stories.tsx +1 -1
- package/lib/components/Field/Field.stories.tsx +2 -2
- package/lib/components/FileInput/FileInput.stories.tsx +1 -1
- package/lib/components/Footer/Footer.stories.tsx +1 -1
- package/lib/components/Header/Header.mdx +1 -1
- package/lib/components/Header/Header.stories.tsx +1 -1
- package/lib/components/Heading/Documentation.mdx +1 -1
- package/lib/components/Heading/Heading.stories.tsx +1 -1
- package/lib/components/Icon/Icon.stories.tsx +1 -1
- package/lib/components/IconButton/IconButton.stories.tsx +1 -1
- package/lib/components/Input/Documentation.mdx +1 -1
- package/lib/components/Input/Input.stories.tsx +1 -1
- package/lib/components/Label/Label.stories.tsx +1 -1
- package/lib/components/Layout/Layout.stories.tsx +1 -1
- package/lib/components/Link/Link.stories.tsx +1 -1
- package/lib/components/Main/Main.stories.tsx +1 -1
- package/lib/components/Modal/Modal.stories.tsx +1 -1
- package/lib/components/NativeDatepicker/NativeDatepicker.stories.tsx +2 -2
- package/lib/components/Overlay/Overlay.stories.tsx +1 -1
- package/lib/components/Overlay/Overlay.tsx +1 -4
- package/lib/components/Pagination/Pagination.stories.tsx +1 -1
- package/lib/components/Paragraph/Paragraph.stories.tsx +1 -1
- package/lib/components/Radio/Radio.stories.tsx +2 -2
- package/lib/components/Search/Search.stories.tsx +1 -1
- package/lib/components/Select/Select.mdx +1 -1
- package/lib/components/Select/Select.stories.tsx +2 -2
- package/lib/components/Select/Select.types.ts +1 -2
- package/lib/components/Snackbar/Snackbar.stories.tsx +1 -1
- package/lib/components/Spinner/Spinner.stories.tsx +1 -1
- package/lib/components/StandaloneLink/StandaloneLink.stories.tsx +1 -1
- package/lib/components/Table/Table.stories.tsx +1 -1
- package/lib/components/Table/subcomponents/Cell/Cell.stories.tsx +2 -2
- package/lib/components/Table/subcomponents/HeadCell/HeadCell.stories.tsx +1 -1
- package/lib/components/Tabs/Tab.tsx +209 -36
- package/lib/components/Tabs/TabContext.tsx +20 -7
- package/lib/components/Tabs/Tabs.stories.tsx +87 -68
- package/lib/components/Tabs/Tabs.tsx +129 -37
- package/lib/components/Tabs/TabsList.tsx +134 -0
- package/lib/components/Tabs/TabsPanel.tsx +55 -0
- package/lib/components/Tabs/__tests__/Tabs.test.tsx +173 -105
- package/lib/components/Tabs/index.ts +8 -1
- package/lib/components/Textarea/Textarea.stories.tsx +1 -1
- package/lib/components/Timepicker/Timepicker.stories.tsx +1 -1
- package/lib/components/Toggle/Documentation.mdx +1 -1
- package/lib/components/Toggle/Toggle.stories.tsx +1 -1
- package/lib/components/Tooltip/Tooltip.stories.tsx +1 -1
- package/lib/components/UclLogo/UclLogo.stories.tsx +1 -1
- package/lib/components/WeekPicker/WeekPicker.stories.tsx +2 -2
- package/lib/components/common/Common.mdx +1 -1
- package/lib/components/index.ts +7 -1
- package/lib/theme/Icons.mdx +1 -1
- package/lib/theme/Typography.mdx +1 -1
- package/lib/utils/__tests__/announce.test.ts +53 -0
- package/lib/utils/announce.ts +33 -10
- package/package.json +8 -11
- package/lib/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +0 -185
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: (({ testId, defaultOpen, children, className, ...props }: import('./AppMenu').AppMenuProps) => import("react").JSX.Element) & import('./AppMenu').IAppMenuSubComponents;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('react').MemoExoticComponent<({ renderVisual, checkedComponent, uncheckedComponent, indeterminateComponent, checked, defaultChecked, indeterminate, disabled, testId, className, onChange, ref, ...props }: import('./BaseCheckbox').BaseCheckboxProps) => import("react").JSX.Element>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: <C extends import('react').ElementType = "button">({ as, variant, destructive, size, selected, disabled, icon, iconPosition, tooltip, loading, fullWidth, testId, ref, children, className, ...props }: import('./Button').ButtonProps<C>) => import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: ({ pickedDate, onDatePick, minDate, maxDate, events, showAcademicWeeks, academicWeeks, testId, className, }: import('./Calendar.types').CalendarProps) => import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: ({ date, onPick, isSelected, isToday, isInCurrentMonth, isDisabled, events, }: import('./Day').DayProps) => import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('react').NamedExoticComponent<import('./Checkbox').CheckboxBaseProps & import('../common/marginsStyle').MarginProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('react').NamedExoticComponent<Omit<import('./Chip').ChipProps, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: ({ value, onValueChange, minDate, maxDate, disabled, className, clearable, ...props }: import('./Datepicker.types').DatepickerProps) => import("react").JSX.Element;
|
|
@@ -18,5 +18,5 @@ export interface BaseDialogProps extends HTMLAttributes<HTMLDialogElement> {
|
|
|
18
18
|
skipCloseOnInitialFocus?: boolean;
|
|
19
19
|
testId?: string;
|
|
20
20
|
}
|
|
21
|
-
declare const _default: React.
|
|
21
|
+
declare const _default: React.NamedExoticComponent<BaseDialogProps & React.RefAttributes<HTMLDialogElement>>;
|
|
22
22
|
export default _default;
|
|
@@ -15,7 +15,7 @@ export interface DialogProps extends BaseDialogProps {
|
|
|
15
15
|
onAction?: () => void;
|
|
16
16
|
onSecondaryAction?: () => void;
|
|
17
17
|
}
|
|
18
|
-
declare const Dialog: (
|
|
18
|
+
declare const Dialog: import('react').ForwardRefExoticComponent<DialogProps & import('react').RefAttributes<HTMLDialogElement>>;
|
|
19
19
|
export interface DialogSubComponents {
|
|
20
20
|
Header: typeof DialogHeader;
|
|
21
21
|
Body: typeof DialogBody;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: (
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<import('./Dialog').DialogProps & import('react').RefAttributes<HTMLDialogElement>> & import('./Dialog').DialogSubComponents;
|
|
5
5
|
parameters: {
|
|
6
6
|
docs: {
|
|
7
7
|
story: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: (({ defaultOpen, ...props }: import('./Dropdown').DropdownProps) => import("react").JSX.Element) & import('./Dropdown').IDropdownSubComponents;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: ({ type, heading, buttonLabel, buttonVariant, buttonProps, testId, className, children, ...props }: import('./FeedbackDialog').FeedbackDialogProps) => import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: (({ error, disabled, optional, testId, className, children, ...props }: import('./Field').FieldProps) => import("react").JSX.Element) & import('./Field').IFieldSubcomponents;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('react').MemoExoticComponent<({ level, as, margins, testId, className, ref, noMargins, ...props }: import('./Heading').HeadingProps) => import("react").JSX.Element>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('react').NamedExoticComponent<import('./Label').LabelBaseProps & import('../common/marginsStyle').MarginProps & import('react').RefAttributes<HTMLLabelElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: ({ value, onValueChange, minDate, maxDate, className, disabled, testId, ref, ...props }: import('./NativeDatepicker.types').NativeDatepickerProps) => import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('react').NamedExoticComponent<import('./Overlay').OverlayProps & import('react').RefAttributes<import('./Overlay').Ref>>;
|
|
@@ -39,7 +39,7 @@ declare const meta: {
|
|
|
39
39
|
children: string;
|
|
40
40
|
reference: undefined;
|
|
41
41
|
};
|
|
42
|
-
decorators: ((Story: import('
|
|
42
|
+
decorators: ((Story: import('storybook/internal/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
43
43
|
reference: import('react').RefObject<HTMLElement | null>;
|
|
44
44
|
placement?: import('@floating-ui/utils').Placement | undefined;
|
|
45
45
|
blanket?: boolean | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: (({ offset, limit, total, onPageChange, mode, currentPage, trackedMaxPage, hasNextPage, hasPreviousPage, onNextPage, onPreviousPage, testId, className, children, ...props }: import('./Pagination').PaginationProps) => import("react").JSX.Element) & import('./Pagination').PaginationSubComponents;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('react').MemoExoticComponent<({ level, size, emphasis, as, margins, testId, className, ref, noMargins, ...props }: import('./Paragraph').ParagraphProps) => import("react").JSX.Element>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('react').NamedExoticComponent<import('./Radio').RadioBaseProps & import('../common/marginsStyle').MarginProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: ({ placeholder, testId, onSearch, onClear, disabled, m, mv, mh, mt, mb, ml, mr, noMargins, inputProps, clearButtonProps, submitButtonProps, className, ...props }: import('./Search').SearchProps) => import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('react').NamedExoticComponent<import('./Snackbar').SnackbarBaseProps & import('../common/marginsStyle').MarginProps & import('react').RefAttributes<HTMLOutputElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('react').MemoExoticComponent<({ size, strokeWidth, className, testId, inheritColour, ref, ...rest }: import('./Spinner').SpinnerProps) => import("react").JSX.Element>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: ({ variant, icon, onCheck, checked, onButtonClick, testId, className, children, checkboxProps, buttonProps, ...props }: import('./Cell').TableCellProps) => import("react").JSX.Element;
|
|
@@ -9,7 +9,7 @@ declare const meta: {
|
|
|
9
9
|
className: string;
|
|
10
10
|
};
|
|
11
11
|
tags: string[];
|
|
12
|
-
decorators: ((Story: import('
|
|
12
|
+
decorators: ((Story: import('storybook/internal/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
13
13
|
variant?: import('../..').ColumnVariant | undefined;
|
|
14
14
|
icon?: import('react').ReactNode;
|
|
15
15
|
checked?: boolean | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import { SortOrder } from '../../Table.types';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
@@ -14,7 +14,7 @@ declare const meta: {
|
|
|
14
14
|
children: string;
|
|
15
15
|
};
|
|
16
16
|
tags: string[];
|
|
17
|
-
decorators: ((Story: import('
|
|
17
|
+
decorators: ((Story: import('storybook/internal/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
18
18
|
variant?: import('../..').ColumnVariant | undefined;
|
|
19
19
|
accessor?: string | undefined;
|
|
20
20
|
sort?: SortOrder | undefined;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
export declare const NAME = "ucl-uikit-tabs__tab";
|
|
3
|
-
export interface TabProps extends
|
|
3
|
+
export interface TabProps extends HTMLAttributes<HTMLElement> {
|
|
4
4
|
testId?: string;
|
|
5
|
-
label: string;
|
|
6
5
|
value: string;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
count?: number;
|
|
8
|
+
/** @deprecated Use count instead. */
|
|
7
9
|
counter?: number;
|
|
8
|
-
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
ref?: React.Ref<HTMLElement>;
|
|
13
|
+
/** @deprecated Prefer children for the tab content. */
|
|
14
|
+
label?: ReactNode;
|
|
9
15
|
}
|
|
10
|
-
declare const _default: import('react').MemoExoticComponent<({ testId, className, label, value, counter, ref, ...props }: TabProps) => import("react").JSX.Element>;
|
|
16
|
+
declare const _default: import('react').MemoExoticComponent<({ testId, className, children, label, value, count, counter, disabled, asChild, onClick, ref, ...props }: TabProps) => import("react").JSX.Element>;
|
|
11
17
|
export default _default;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export type TabsActivationMode = 'automatic' | 'manual';
|
|
2
|
+
export type TabsOrientation = 'horizontal' | 'vertical';
|
|
3
|
+
export interface TabsContextType {
|
|
4
|
+
value: string | undefined;
|
|
5
|
+
setValue: (value: string) => void;
|
|
6
|
+
baseId: string;
|
|
7
|
+
activationMode: TabsActivationMode;
|
|
8
|
+
orientation: TabsOrientation;
|
|
9
|
+
fullWidth: boolean;
|
|
10
|
+
panelValues: Set<string>;
|
|
7
11
|
}
|
|
8
|
-
declare const TabContext: import('react').Context<
|
|
9
|
-
export declare const
|
|
12
|
+
declare const TabContext: import('react').Context<TabsContextType | undefined>;
|
|
13
|
+
export declare const getTabId: (baseId: string, value: string) => string;
|
|
14
|
+
export declare const getTabPanelId: (baseId: string, value: string) => string;
|
|
15
|
+
export declare const useTabContext: () => TabsContextType;
|
|
10
16
|
export default TabContext;
|
|
@@ -1,18 +1,35 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { HTMLAttributes, NamedExoticComponent } from 'react';
|
|
2
|
+
import { TabsActivationMode, TabsOrientation } from './TabContext';
|
|
3
|
+
import { default as Tab, TabProps } from './Tab';
|
|
4
|
+
import { default as TabsList, TabsListProps } from './TabsList';
|
|
5
|
+
import { default as TabsPanel, TabsPanelProps } from './TabsPanel';
|
|
3
6
|
import { MarginProps } from '../common/marginsStyle';
|
|
4
7
|
export declare const NAME = "ucl-uikit-tabs";
|
|
5
|
-
export interface TabsBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
6
|
-
|
|
8
|
+
export interface TabsBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> {
|
|
9
|
+
value?: string;
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
onValueChange?: (value: string) => void;
|
|
12
|
+
activationMode?: TabsActivationMode;
|
|
13
|
+
orientation?: TabsOrientation;
|
|
14
|
+
testId?: string;
|
|
15
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
16
|
+
/** @deprecated Use value instead. */
|
|
17
|
+
activeTab?: string;
|
|
18
|
+
/** @deprecated Use onValueChange instead. */
|
|
7
19
|
onChange?: (value: string) => void;
|
|
20
|
+
/** @deprecated Prefer setting fullWidth on Tabs.List. */
|
|
8
21
|
fullWidth?: boolean;
|
|
9
|
-
|
|
22
|
+
/** @deprecated Tabs now uses theme.colour.border.brand by default. */
|
|
10
23
|
color?: string;
|
|
11
|
-
ref?: React.RefObject<HTMLDivElement>;
|
|
12
24
|
}
|
|
13
25
|
export type TabsProps = TabsBaseProps & MarginProps;
|
|
14
|
-
|
|
26
|
+
export interface TabsComponent extends NamedExoticComponent<TabsProps> {
|
|
27
|
+
List: typeof TabsList;
|
|
15
28
|
Tab: typeof Tab;
|
|
16
|
-
|
|
29
|
+
Panel: typeof TabsPanel;
|
|
30
|
+
/** @deprecated Use Tabs.Tab instead. */
|
|
31
|
+
Trigger: typeof Tab;
|
|
32
|
+
}
|
|
17
33
|
declare const Tabs: TabsComponent;
|
|
34
|
+
export type { TabProps, TabsActivationMode, TabsListProps, TabsOrientation, TabsPanelProps, };
|
|
18
35
|
export default Tabs;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import('
|
|
5
|
-
Tab: typeof import('./Tab').default;
|
|
6
|
-
};
|
|
4
|
+
component: import('./Tabs').TabsComponent;
|
|
7
5
|
parameters: {
|
|
8
6
|
layout: string;
|
|
9
7
|
};
|
|
10
|
-
args: {
|
|
11
|
-
activeTab: string;
|
|
12
|
-
};
|
|
13
8
|
};
|
|
14
9
|
export default meta;
|
|
15
10
|
type Story = StoryObj<typeof meta>;
|
|
16
|
-
export declare const
|
|
11
|
+
export declare const Controlled: Story;
|
|
17
12
|
export declare const AutoWidth: Story;
|
|
18
|
-
export declare const
|
|
13
|
+
export declare const Count: Story;
|
|
14
|
+
export declare const Links: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export declare const NAME = "ucl-uikit-tabs__list";
|
|
3
|
+
export interface TabsListProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
fullWidth?: boolean;
|
|
5
|
+
testId?: string;
|
|
6
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('react').MemoExoticComponent<({ fullWidth, testId, className, children, onKeyDown, ref, ...props }: TabsListProps) => import("react").JSX.Element>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export declare const NAME = "ucl-uikit-tabs__panel";
|
|
3
|
+
export interface TabsPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
value: string;
|
|
5
|
+
forceMount?: boolean;
|
|
6
|
+
testId?: string;
|
|
7
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: import('react').MemoExoticComponent<({ value, forceMount, testId, className, children, ref, ...props }: TabsPanelProps) => import("react").JSX.Element | null>;
|
|
10
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import('react').NamedExoticComponent<import('./Textarea').TextareaBaseProps & import('../common/marginsStyle').MarginProps & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: ({ value, onValueChange, minDate, maxDate, disabled, className, ...props }: import('./WeekPicker.types').WeekPickerProps) => import("react").JSX.Element;
|
|
@@ -85,7 +85,7 @@ export type { TableProps } from './Table';
|
|
|
85
85
|
export { default as Alert } from './Alert';
|
|
86
86
|
export type { AlertProps } from './Alert';
|
|
87
87
|
export { default as Tabs } from './Tabs';
|
|
88
|
-
export type { TabsProps } from './Tabs';
|
|
88
|
+
export type { TabsActivationMode, TabsListProps, TabsOrientation, TabsPanelProps, TabsProps, } from './Tabs';
|
|
89
89
|
export type { TabProps } from './Tabs/Tab';
|
|
90
90
|
export { default as Accordion } from './Accordion';
|
|
91
91
|
export type { AccordionProps } from './Accordion';
|