uikit-react-public 0.29.5 → 0.30.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/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/Dialog.stories.d.ts +1 -1
- 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.d.ts +14 -3
- package/dist/components/Overlay/Overlay.stories.d.ts +33 -4
- package/dist/components/Overlay/__tests__/Overlay.test.d.ts +1 -0
- package/dist/components/Overlay/index.d.ts +1 -1
- 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 +13 -1
- package/dist/components/Select/Select.types.d.ts +7 -0
- package/dist/components/Select/subcomponents/CustomSelect.d.ts +1 -1
- package/dist/components/Select/subcomponents/Panel.d.ts +8 -2
- 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 +5094 -4723
- 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/Dialog.stories.tsx +1 -1
- 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 +64 -21
- package/lib/components/Overlay/__tests__/Overlay.test.tsx +81 -0
- package/lib/components/Overlay/index.ts +1 -1
- 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 +9 -2
- package/lib/components/Select/Select.tsx +7 -0
- package/lib/components/Select/Select.types.ts +9 -2
- package/lib/components/Select/__tests__/Select.test.tsx +181 -1
- package/lib/components/Select/subcomponents/CustomSelect.tsx +109 -27
- package/lib/components/Select/subcomponents/Panel.tsx +40 -10
- 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/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;
|
|
@@ -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: (({ onClose, onAction, onSecondaryAction, testId, className, children, ...props }: import('./Dialog').DialogProps) => import("react").JSX.Element) & import('./Dialog').DialogSubComponents;
|
|
@@ -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,15 +1,26 @@
|
|
|
1
1
|
import { HTMLAttributes, RefObject, ReactElement } from 'react';
|
|
2
|
-
import { Placement } from '@floating-ui/react-dom';
|
|
2
|
+
import { Placement, FlipOptions, ShiftOptions } from '@floating-ui/react-dom';
|
|
3
3
|
export declare const NAME = "ucl-overlay";
|
|
4
|
+
type OverlaySizeOptions = {
|
|
5
|
+
padding?: number;
|
|
6
|
+
matchReferenceWidth?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type OverlaySize = {
|
|
9
|
+
referenceWidth: number;
|
|
10
|
+
availableWidth: number;
|
|
11
|
+
availableHeight: number;
|
|
12
|
+
};
|
|
4
13
|
export interface OverlayProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
14
|
reference: RefObject<HTMLElement | null>;
|
|
6
15
|
placement?: Placement;
|
|
7
16
|
blanket?: boolean;
|
|
8
|
-
flip?: boolean;
|
|
9
|
-
shift?: boolean;
|
|
17
|
+
flip?: boolean | FlipOptions;
|
|
18
|
+
shift?: boolean | ShiftOptions;
|
|
10
19
|
offset?: number;
|
|
20
|
+
size?: boolean | OverlaySizeOptions;
|
|
11
21
|
arrow?: ReactElement;
|
|
12
22
|
arrowClassName?: string;
|
|
23
|
+
onSizeChange?: (size: OverlaySize) => void;
|
|
13
24
|
onBlanketClick?: (ev: React.MouseEvent<HTMLDivElement>) => void;
|
|
14
25
|
}
|
|
15
26
|
export type Ref = HTMLDivElement | null;
|
|
@@ -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,15 +39,44 @@ 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;
|
|
46
|
-
flip?: boolean |
|
|
47
|
-
|
|
46
|
+
flip?: boolean | {
|
|
47
|
+
padding?: import('@floating-ui/utils').Padding | undefined;
|
|
48
|
+
mainAxis?: boolean | undefined;
|
|
49
|
+
crossAxis?: boolean | "alignment" | undefined;
|
|
50
|
+
fallbackPlacements?: Array<import('@floating-ui/utils').Placement> | undefined;
|
|
51
|
+
fallbackStrategy?: "bestFit" | "initialPlacement" | undefined;
|
|
52
|
+
fallbackAxisSideDirection?: "none" | "start" | "end" | undefined;
|
|
53
|
+
flipAlignment?: boolean | undefined;
|
|
54
|
+
rootBoundary?: import('@floating-ui/core').RootBoundary | undefined;
|
|
55
|
+
elementContext?: import('@floating-ui/core').ElementContext | undefined;
|
|
56
|
+
altBoundary?: boolean | undefined;
|
|
57
|
+
boundary?: import('@floating-ui/dom').Boundary | undefined;
|
|
58
|
+
} | undefined;
|
|
59
|
+
shift?: boolean | {
|
|
60
|
+
padding?: import('@floating-ui/utils').Padding | undefined;
|
|
61
|
+
mainAxis?: boolean | undefined;
|
|
62
|
+
crossAxis?: boolean | undefined;
|
|
63
|
+
rootBoundary?: import('@floating-ui/core').RootBoundary | undefined;
|
|
64
|
+
elementContext?: import('@floating-ui/core').ElementContext | undefined;
|
|
65
|
+
altBoundary?: boolean | undefined;
|
|
66
|
+
limiter?: {
|
|
67
|
+
fn: (state: import('@floating-ui/core').MiddlewareState) => import('@floating-ui/utils').Coords;
|
|
68
|
+
options?: any;
|
|
69
|
+
} | undefined;
|
|
70
|
+
boundary?: import('@floating-ui/dom').Boundary | undefined;
|
|
71
|
+
} | undefined;
|
|
48
72
|
offset?: number | undefined;
|
|
73
|
+
size?: (boolean | {
|
|
74
|
+
padding?: number;
|
|
75
|
+
matchReferenceWidth?: boolean;
|
|
76
|
+
}) | undefined;
|
|
49
77
|
arrow?: import('react').ReactElement | undefined;
|
|
50
78
|
arrowClassName?: string | undefined;
|
|
79
|
+
onSizeChange?: ((size: import('./Overlay').OverlaySize) => void) | undefined;
|
|
51
80
|
onBlanketClick?: ((ev: React.MouseEvent<HTMLDivElement>) => void) | undefined;
|
|
52
81
|
defaultChecked?: boolean | undefined | undefined;
|
|
53
82
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './Overlay';
|
|
2
|
-
export type { OverlayProps } from './Overlay';
|
|
2
|
+
export type { OverlayProps, OverlaySize } from './Overlay';
|
|
@@ -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: <T extends string | number = string>(props: import('./Select.types').SelectProps<T>) => React.JSX.Element;
|
|
@@ -154,6 +154,18 @@ declare const meta: {
|
|
|
154
154
|
};
|
|
155
155
|
};
|
|
156
156
|
};
|
|
157
|
+
dropdownWidth: {
|
|
158
|
+
description: string;
|
|
159
|
+
control: {
|
|
160
|
+
type: "radio";
|
|
161
|
+
};
|
|
162
|
+
options: string[];
|
|
163
|
+
table: {
|
|
164
|
+
type: {
|
|
165
|
+
summary: string;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
};
|
|
157
169
|
panelClassName: {
|
|
158
170
|
description: string;
|
|
159
171
|
control: {
|
|
@@ -26,6 +26,7 @@ export type OptionData<T> = {
|
|
|
26
26
|
* Additional props forwarded to the filter input when `filterable` is true
|
|
27
27
|
*/
|
|
28
28
|
export type FilterInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'disabled' | 'ref' | 'role' | 'aria-autocomplete' | 'aria-label'>;
|
|
29
|
+
export type SelectDropdownWidth = 'content' | 'match-select';
|
|
29
30
|
type SelectBaseProps<T = string | number> = Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> & {
|
|
30
31
|
/**
|
|
31
32
|
* Controls keyboard selection behaviour in the custom select variant.
|
|
@@ -77,6 +78,12 @@ type SelectBaseProps<T = string | number> = Omit<React.HTMLAttributes<HTMLElemen
|
|
|
77
78
|
* Allow long option labels to wrap instead of truncating
|
|
78
79
|
*/
|
|
79
80
|
lineBreak?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Controls the width of the custom options panel.
|
|
83
|
+
* - `content` (default): panel is at least the Select width and can grow to fit option labels.
|
|
84
|
+
* - `match-select`: panel width is capped to the Select width.
|
|
85
|
+
*/
|
|
86
|
+
dropdownWidth?: SelectDropdownWidth;
|
|
80
87
|
/**
|
|
81
88
|
* Custom className for the root element
|
|
82
89
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { InternalSelectProps } from '../Select.types';
|
|
2
2
|
type CustomSelectProps<T> = Omit<InternalSelectProps<T>, 'native' | 'nativeHtmlAttributes'>;
|
|
3
|
-
declare const CustomSelect: <T extends string | number>({ selectionBehaviour, value, options, onValueChange, disabled, clearable, placeholder, lineBreak, filterInputProps, width, testId, className, panelClassName, filterable, ref, ...props }: CustomSelectProps<T>) => import("react").JSX.Element;
|
|
3
|
+
declare const CustomSelect: <T extends string | number>({ selectionBehaviour, value, options, onValueChange, disabled, clearable, placeholder, lineBreak, dropdownWidth, filterInputProps, width, testId, className, panelClassName, filterable, ref, ...props }: CustomSelectProps<T>) => import("react").JSX.Element;
|
|
4
4
|
export default CustomSelect;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { SelectDropdownWidth } from '../Select.types';
|
|
2
|
+
type PanelProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
3
|
+
dropdownWidth?: SelectDropdownWidth;
|
|
4
|
+
referenceWidth?: number;
|
|
5
|
+
availableHeight?: number;
|
|
6
|
+
maxWidth?: number;
|
|
7
|
+
};
|
|
8
|
+
declare const Panel: ({ className, dropdownWidth, referenceWidth, availableHeight, maxWidth, ...props }: PanelProps) => import("react").JSX.Element;
|
|
3
9
|
export default Panel;
|
|
@@ -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;
|