uikit-react-public 0.27.2 → 0.29.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/BreadcrumbsNew/BaseBreadcrumbsItem.d.ts +12 -0
- package/dist/components/BreadcrumbsNew/Breadcrumbs.d.ts +18 -0
- package/dist/components/BreadcrumbsNew/BreadcrumbsCurrent.d.ts +8 -0
- package/dist/components/BreadcrumbsNew/BreadcrumbsLink.d.ts +7 -0
- package/dist/components/BreadcrumbsNew/__tests__/Breadcrumbs.test.d.ts +1 -0
- package/dist/components/BreadcrumbsNew/index.d.ts +2 -0
- package/dist/components/Chip/Chip.d.ts +11 -0
- package/dist/components/Chip/Chip.stories.d.ts +25 -0
- package/dist/components/Chip/__tests__/Chip.test.d.ts +1 -0
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/Link/BaseLink.d.ts +3 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/index.js +5965 -5634
- package/lib/components/BaseCheckbox/BaseCheckbox.tsx +1 -5
- package/lib/components/BreadcrumbsNew/BaseBreadcrumbsItem.tsx +69 -0
- package/lib/components/BreadcrumbsNew/Breadcrumbs.tsx +118 -0
- package/lib/components/BreadcrumbsNew/BreadcrumbsCurrent.tsx +54 -0
- package/lib/components/BreadcrumbsNew/BreadcrumbsLink.tsx +67 -0
- package/lib/components/BreadcrumbsNew/__tests__/Breadcrumbs.test.tsx +53 -0
- package/lib/components/BreadcrumbsNew/index.ts +8 -0
- package/lib/components/Checkbox/__tests__/__snapshots__/Checkbox.test.tsx.snap +4 -4
- package/lib/components/Chip/Chip.stories.tsx +37 -0
- package/lib/components/Chip/Chip.tsx +191 -0
- package/lib/components/Chip/__tests__/Chip.test.tsx +287 -0
- package/lib/components/Chip/__tests__/__snapshots__/Chip.test.tsx.snap +255 -0
- package/lib/components/Chip/index.ts +2 -0
- package/lib/components/Link/BaseLink.tsx +40 -2
- package/lib/components/Link/__tests__/link.test.tsx +58 -1
- package/lib/components/Table/subcomponents/Cell/__tests__/__snapshots__/Cell.test.tsx.snap +1 -1
- package/lib/components/Table/subcomponents/HeadCell/__tests__/__snapshots__/HeadCell.test.tsx.snap +1 -1
- package/lib/components/index.ts +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LiHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { BreadcrumbsSize } from './Breadcrumbs';
|
|
3
|
+
export declare const NAME = "ucl-uikit-breadcrumbs__item";
|
|
4
|
+
export interface BaseBreadcrumbsItemProps extends LiHTMLAttributes<HTMLLIElement> {
|
|
5
|
+
separator?: boolean;
|
|
6
|
+
back?: boolean;
|
|
7
|
+
size?: BreadcrumbsSize;
|
|
8
|
+
testId?: string;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare const BaseBreadcrumbsItem: ({ separator, back, size, testId, className, children, ...props }: BaseBreadcrumbsItemProps) => import("react").JSX.Element;
|
|
12
|
+
export default BaseBreadcrumbsItem;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HTMLAttributes, NamedExoticComponent } from 'react';
|
|
2
|
+
import { default as BaseBreadcrumbsItem, BaseBreadcrumbsItemProps } from './BaseBreadcrumbsItem';
|
|
3
|
+
import { default as BreadcrumbsCurrent, BreadcrumbsCurrentProps } from './BreadcrumbsCurrent';
|
|
4
|
+
import { default as BreadcrumbsLink, BreadcrumbsLinkProps } from './BreadcrumbsLink';
|
|
5
|
+
export declare const NAME = "ucl-uikit-breadcrumbs";
|
|
6
|
+
export type BreadcrumbsSize = 'small' | 'medium';
|
|
7
|
+
export interface BreadcrumbsProps extends HTMLAttributes<HTMLElement> {
|
|
8
|
+
size?: BreadcrumbsSize;
|
|
9
|
+
testId?: string;
|
|
10
|
+
}
|
|
11
|
+
interface BreadcrumbsComponent extends NamedExoticComponent<BreadcrumbsProps> {
|
|
12
|
+
BaseItem: typeof BaseBreadcrumbsItem;
|
|
13
|
+
Link: typeof BreadcrumbsLink;
|
|
14
|
+
Current: typeof BreadcrumbsCurrent;
|
|
15
|
+
}
|
|
16
|
+
declare const MemoBreadcrumbs: BreadcrumbsComponent;
|
|
17
|
+
export type { BaseBreadcrumbsItemProps, BreadcrumbsCurrentProps, BreadcrumbsLinkProps, };
|
|
18
|
+
export default MemoBreadcrumbs;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { BaseBreadcrumbsItemProps } from './BaseBreadcrumbsItem';
|
|
3
|
+
export declare const NAME = "ucl-uikit-breadcrumbs__current";
|
|
4
|
+
export interface BreadcrumbsCurrentProps extends HTMLAttributes<HTMLSpanElement>, Pick<BaseBreadcrumbsItemProps, 'separator' | 'size'> {
|
|
5
|
+
testId?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const BreadcrumbsCurrent: ({ separator, size, testId, className, children, ...props }: BreadcrumbsCurrentProps) => import("react").JSX.Element;
|
|
8
|
+
export default BreadcrumbsCurrent;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LinkProps } from '../Link';
|
|
2
|
+
import { BaseBreadcrumbsItemProps } from './BaseBreadcrumbsItem';
|
|
3
|
+
export declare const NAME = "ucl-uikit-breadcrumbs__link";
|
|
4
|
+
type BreadcrumbsLinkOwnProps = Pick<BaseBreadcrumbsItemProps, 'separator' | 'back' | 'size'>;
|
|
5
|
+
export type BreadcrumbsLinkProps = BreadcrumbsLinkOwnProps & Omit<LinkProps, 'size'>;
|
|
6
|
+
declare const BreadcrumbsLink: ({ separator, back, size, className, children, ...props }: BreadcrumbsLinkProps) => import("react").JSX.Element;
|
|
7
|
+
export default BreadcrumbsLink;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCheckboxProps } from '../BaseCheckbox';
|
|
2
|
+
import { MarginProps } from '../common/marginsStyle';
|
|
3
|
+
export declare const NAME = "ucl-uikit-chip";
|
|
4
|
+
export interface ChipBaseProps extends Omit<BaseCheckboxProps, 'renderVisual' | 'checkedComponent' | 'uncheckedComponent' | 'indeterminateComponent' | 'indeterminate'> {
|
|
5
|
+
label: string;
|
|
6
|
+
ariaLabel?: string;
|
|
7
|
+
}
|
|
8
|
+
export type ChipProps = ChipBaseProps & MarginProps;
|
|
9
|
+
export type Ref = HTMLInputElement;
|
|
10
|
+
declare const _default: import('react').NamedExoticComponent<Omit<ChipProps, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('react').NamedExoticComponent<Omit<import('./Chip').ChipProps, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
|
|
5
|
+
argTypes: {
|
|
6
|
+
label: {
|
|
7
|
+
control: {
|
|
8
|
+
type: "text";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
checked: {
|
|
12
|
+
control: {
|
|
13
|
+
type: "boolean";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
disabled: {
|
|
17
|
+
control: {
|
|
18
|
+
type: "boolean";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -6,10 +6,13 @@ type BaseLinkOwnProps = {
|
|
|
6
6
|
testId?: string;
|
|
7
7
|
className?: string;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
|
+
/** @deprecated Prefer `asChild` with a routing link child. */
|
|
9
10
|
to?: string;
|
|
11
|
+
asChild?: boolean;
|
|
10
12
|
};
|
|
11
13
|
type PolymorphicRef<C extends ElementType> = React.ComponentPropsWithRef<C>['ref'];
|
|
12
14
|
export type BaseLinkProps<C extends ElementType = 'a'> = BaseLinkOwnProps & {
|
|
15
|
+
/** @deprecated Prefer `asChild` with a custom link child. */
|
|
13
16
|
component?: C;
|
|
14
17
|
} & Omit<ComponentPropsWithoutRef<C>, keyof BaseLinkOwnProps | 'component' | 'disabled'>;
|
|
15
18
|
type BaseLinkComponent = <C extends ElementType = 'a'>(props: BaseLinkProps<C> & {
|
|
@@ -52,10 +52,14 @@ export { default as AppHeader, APP_HEADER_HEIGHT } from './AppHeader';
|
|
|
52
52
|
export type { AppHeaderProps } from './AppHeader';
|
|
53
53
|
export { default as Breadcrumbs } from './Breadcrumbs';
|
|
54
54
|
export type { BreadcrumbsProps } from './Breadcrumbs';
|
|
55
|
+
export { default as BreadcrumbsNew } from './BreadcrumbsNew';
|
|
56
|
+
export type { BaseBreadcrumbsItemProps, BreadcrumbsCurrentProps, BreadcrumbsLinkProps, BreadcrumbsProps as BreadcrumbsNewProps, BreadcrumbsSize, } from './BreadcrumbsNew';
|
|
55
57
|
export { default as Checkbox, LabelledCheckbox } from './Checkbox';
|
|
56
58
|
export type { CheckboxProps, LabelledCheckboxProps } from './Checkbox';
|
|
57
59
|
export { default as Toggle } from './Toggle';
|
|
58
60
|
export type { ToggleProps } from './Toggle';
|
|
61
|
+
export { default as Chip } from './Chip';
|
|
62
|
+
export type { ChipProps } from './Chip';
|
|
59
63
|
export { default as AppMenu } from './AppMenu';
|
|
60
64
|
export type { AppMenuProps } from './AppMenu';
|
|
61
65
|
export { default as Menu } from './Menu';
|