@midas-ds/components 16.3.3 → 16.4.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/CHANGELOG.md +16 -0
- package/accordion/Accordion.stories.d.ts +24 -0
- package/assets/DateField.css +1 -1
- package/assets/DateRangePicker.css +1 -1
- package/badge/Badge.stories.d.ts +17 -0
- package/breadcrumbs/Breadcrumbs.stories.d.ts +16 -0
- package/button/Button.stories.d.ts +25 -0
- package/button/ButtonGroup.stories.d.ts +15 -0
- package/calendar/Calendar.stories.d.ts +15 -0
- package/calendar/RangeCalendar.stories.d.ts +13 -0
- package/card/Card.stories.d.ts +12 -0
- package/checkbox/Checkbox.stories.d.ts +30 -0
- package/checkbox/CheckboxGroup.stories.d.ts +29 -0
- package/chunks/ClearButton-DavPe5uU.js +21 -0
- package/chunks/DateField-D9CEvqnd.js +91 -0
- package/chunks/DateRangePicker-DGfdhIjR.js +191 -0
- package/chunks/SearchField-Jqn3dKGs.js +127 -0
- package/clear-button/ClearButton.d.ts +3 -0
- package/clear-button/index.d.ts +1 -0
- package/clear-button/index.js +4 -0
- package/color-scheme-switch/ColorSchemeSwitch.stories.d.ts +6 -0
- package/combobox/ComboBox.stories.d.ts +44 -0
- package/date-field/DateField.d.ts +4 -0
- package/date-field/DateField.stories.d.ts +13 -0
- package/date-field/index.js +1 -1
- package/date-field/intl/translations.json.d.ts +11 -0
- package/date-picker/DatePicker.d.ts +4 -0
- package/date-picker/DatePicker.stories.d.ts +14 -0
- package/date-picker/DatePickerInputField.d.ts +1 -1
- package/date-picker/DateRangePicker.d.ts +4 -0
- package/date-picker/DateRangePicker.stories.d.ts +38 -0
- package/date-picker/index.js +1 -1
- package/date-picker/intl/translations.json.d.ts +11 -0
- package/date-picker/utils.d.ts +2 -0
- package/file-upload/DropZone.stories.d.ts +6 -0
- package/file-upload/FileUpload.stories.d.ts +11 -0
- package/grid/Grid.stories.d.ts +30 -0
- package/heading/Heading.stories.d.ts +30 -0
- package/index.js +3 -3
- package/info-banner/InfoBanner.stories.d.ts +16 -0
- package/label/Label.stories.d.ts +10 -0
- package/layout/Layout.stories.d.ts +9 -0
- package/legacy-select/LegacySelect.stories.d.ts +27 -0
- package/link/Link.stories.d.ts +14 -0
- package/link-button/LinkButton.stories.d.ts +12 -0
- package/logo/Logo.stories.d.ts +7 -0
- package/menu/Menu.stories.d.ts +34 -0
- package/modal/Dialog.stories.d.ts +15 -0
- package/package.json +1 -1
- package/popover/Popover.stories.d.ts +18 -0
- package/progress-bar/ProgressBar.stories.d.ts +15 -0
- package/radio/Radio.stories.d.ts +53 -0
- package/search-field/SearchField.stories.d.ts +22 -0
- package/search-field/index.js +1 -1
- package/select/Select.stories.d.ts +45 -0
- package/skeleton/Skeleton.Form.stories.d.ts +20 -0
- package/skeleton/Skeleton.stories.d.ts +10 -0
- package/spinner/Spinner.stories.d.ts +20 -0
- package/table/Table.stories.d.ts +31 -0
- package/tabs/Tabs.stories.d.ts +22 -0
- package/tag/Tag.stories.d.ts +8 -0
- package/text/Text.stories.d.ts +12 -0
- package/textfield/TextArea.stories.d.ts +367 -0
- package/textfield/TextField.stories.d.ts +34 -0
- package/toast/Toast.stories.d.ts +22 -0
- package/tooltip/Tooltip.stories.d.ts +26 -0
- package/utils/tests.d.ts +17 -0
- package/chunks/DateField-DPJrihTz.js +0 -46
- package/chunks/DateRangePicker-DzgK_p0d.js +0 -117
- package/chunks/SearchField-CxoPi6Ql.js +0 -135
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { s as C } from "./TextField.module-DZslrEPC.js";
|
|
3
|
+
import { B as F } from "./Button-BYrLbzir.js";
|
|
4
|
+
import { C as N } from "./ClearButton-DavPe5uU.js";
|
|
5
|
+
import { c as l } from "./clsx-AexbMWKp.js";
|
|
6
|
+
import * as x from "react";
|
|
7
|
+
import { useSearchFieldState as j } from "react-stately";
|
|
8
|
+
import { useSearchField as p } from "react-aria";
|
|
9
|
+
import { F as _ } from "./FieldError-Bra5aRT3.js";
|
|
10
|
+
import { c as B } from "./createLucideIcon-D4r5Phnh.js";
|
|
11
|
+
import { u as D } from "./useLocalizedStringFormatter-BHvsRxDk.js";
|
|
12
|
+
import '../assets/SearchField.css';const E = [
|
|
13
|
+
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
14
|
+
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
15
|
+
], k = B("search", E), P = "_container_basio_1", T = "_inner_basio_10", w = "_inputContainer_basio_15", I = "_medium_basio_21", K = "_icon_basio_26", L = "_clear_basio_39", M = "_input_basio_15", a = {
|
|
16
|
+
container: P,
|
|
17
|
+
inner: T,
|
|
18
|
+
inputContainer: w,
|
|
19
|
+
medium: I,
|
|
20
|
+
icon: K,
|
|
21
|
+
clear: L,
|
|
22
|
+
input: M
|
|
23
|
+
}, R = { search: "Search" }, V = { search: "Sök" }, O = {
|
|
24
|
+
en: R,
|
|
25
|
+
sv: V
|
|
26
|
+
};
|
|
27
|
+
function $(o) {
|
|
28
|
+
return !!o?.length;
|
|
29
|
+
}
|
|
30
|
+
const Z = ({
|
|
31
|
+
errorPosition: o = "top",
|
|
32
|
+
size: i = "large",
|
|
33
|
+
...e
|
|
34
|
+
}) => {
|
|
35
|
+
const { value: n, setValue: m } = j(e), f = D(O), d = x.useRef(null), { inputProps: r, isInvalid: s, validationErrors: h, clearButtonProps: v } = p(
|
|
36
|
+
{
|
|
37
|
+
...e,
|
|
38
|
+
label: e.placeholder,
|
|
39
|
+
validationBehavior: "native"
|
|
40
|
+
},
|
|
41
|
+
{ value: n, setValue: m },
|
|
42
|
+
d
|
|
43
|
+
), S = ({ target: c }) => m(c.value), g = () => m(""), b = () => {
|
|
44
|
+
if (e.validate && $(e.validate(n)) || s || !n) {
|
|
45
|
+
d.current?.focus();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
e.onSubmit && e.onSubmit(n);
|
|
49
|
+
}, y = ({ key: c }) => {
|
|
50
|
+
c === "Enter" && b();
|
|
51
|
+
};
|
|
52
|
+
return /* @__PURE__ */ u(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
className: l(a.container, e.className),
|
|
56
|
+
"data-disabled": r.disabled,
|
|
57
|
+
children: [
|
|
58
|
+
o === "top" && /* @__PURE__ */ t(_, { isInvalid: s, children: e.errorMessage ?? h.join(" ") }),
|
|
59
|
+
/* @__PURE__ */ u("div", { className: a.inner, children: [
|
|
60
|
+
/* @__PURE__ */ u(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
className: l(a.inputContainer, {
|
|
64
|
+
[a.medium]: i === "medium"
|
|
65
|
+
}),
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ t(
|
|
68
|
+
k,
|
|
69
|
+
{
|
|
70
|
+
size: 20,
|
|
71
|
+
className: a.icon
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ t(
|
|
75
|
+
"input",
|
|
76
|
+
{
|
|
77
|
+
...r,
|
|
78
|
+
...r.disabled && { "data-disabled": !0 },
|
|
79
|
+
className: l(
|
|
80
|
+
C.input,
|
|
81
|
+
a.input,
|
|
82
|
+
r.className,
|
|
83
|
+
{ [a.medium]: i === "medium" }
|
|
84
|
+
),
|
|
85
|
+
ref: d,
|
|
86
|
+
onChange: S,
|
|
87
|
+
value: n,
|
|
88
|
+
"aria-invalid": s,
|
|
89
|
+
onKeyDown: y,
|
|
90
|
+
"aria-label": e.placeholder,
|
|
91
|
+
"aria-labelledby": ""
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
n.length > 0 && /* @__PURE__ */ t(
|
|
95
|
+
N,
|
|
96
|
+
{
|
|
97
|
+
...v,
|
|
98
|
+
onPress: g,
|
|
99
|
+
size: i,
|
|
100
|
+
className: l(a.clear, {
|
|
101
|
+
[a.medium]: i === "medium"
|
|
102
|
+
})
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
/* @__PURE__ */ t(
|
|
109
|
+
F,
|
|
110
|
+
{
|
|
111
|
+
size: i,
|
|
112
|
+
isDisabled: e.isDisabled,
|
|
113
|
+
excludeFromTabOrder: !0,
|
|
114
|
+
onPress: b,
|
|
115
|
+
type: "button",
|
|
116
|
+
children: e.buttonText ? e.buttonText : f.format("search")
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] }),
|
|
120
|
+
o === "bottom" && /* @__PURE__ */ t(_, { isInvalid: s, children: e.errorMessage ?? h.join(" ") })
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
export {
|
|
126
|
+
Z as S
|
|
127
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ClearButton } from './ClearButton';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ColorSchemeSwitch } from './ColorSchemeSwitch';
|
|
3
|
+
declare const meta: Meta<typeof ColorSchemeSwitch>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ColorSchemeSwitch>;
|
|
6
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { optionsWithSections } from '../utils/tests';
|
|
3
|
+
import { ComboBox } from './ComboBox';
|
|
4
|
+
type Item = (typeof options)[0];
|
|
5
|
+
type Section = (typeof optionsWithSections)[0];
|
|
6
|
+
type Story<T extends object = Item> = StoryObj<typeof ComboBox<T>>;
|
|
7
|
+
declare const options: {
|
|
8
|
+
id: number;
|
|
9
|
+
name: string;
|
|
10
|
+
}[];
|
|
11
|
+
declare const _default: {
|
|
12
|
+
component: typeof ComboBox;
|
|
13
|
+
title: string;
|
|
14
|
+
tags: string[];
|
|
15
|
+
args: {
|
|
16
|
+
label: string;
|
|
17
|
+
placeholder: string;
|
|
18
|
+
description: string;
|
|
19
|
+
errorMessage: string;
|
|
20
|
+
errorPosition: "top";
|
|
21
|
+
size: "large";
|
|
22
|
+
};
|
|
23
|
+
argTypes: {
|
|
24
|
+
placeholder: {
|
|
25
|
+
control: "text";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
render: (args: import('./ComboBox').ComboBoxProps<{
|
|
29
|
+
id: number;
|
|
30
|
+
name: string;
|
|
31
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
34
|
+
export declare const Primary: Story;
|
|
35
|
+
export declare const Invalid: Story;
|
|
36
|
+
export declare const DS1253: Story;
|
|
37
|
+
export declare const MediumSizeInvalid: Story;
|
|
38
|
+
export declare const Disabled: Story;
|
|
39
|
+
export declare const ReadOnly: Story;
|
|
40
|
+
export declare const Required: Story;
|
|
41
|
+
export declare const Sectioned: Story<Section>;
|
|
42
|
+
export declare const PerformanceTest: Story;
|
|
43
|
+
export declare const AsynchronousLoadingWithEmptyMessage: Story;
|
|
44
|
+
export declare const InfiniteScroll: Story;
|
|
@@ -13,5 +13,9 @@ export interface DateFieldProps extends AriaDateFieldProps<DateValue> {
|
|
|
13
13
|
size?: Size;
|
|
14
14
|
/** An assistive text that helps the user understand the field better. Will be hidden in a popover with an info icon button. */
|
|
15
15
|
popover?: InfoPopoverProps;
|
|
16
|
+
/** Show a clear button to remove the selected date
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
isClearable?: boolean;
|
|
16
20
|
}
|
|
17
21
|
export declare const DateField: React.FC<DateFieldProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { DateField } from './DateField';
|
|
3
|
+
type Story = StoryObj<typeof DateField>;
|
|
4
|
+
declare const _default: Meta<typeof DateField>;
|
|
5
|
+
export default _default;
|
|
6
|
+
/** Don't put format in description, it changes with browser language settings! */
|
|
7
|
+
export declare const Primary: Story;
|
|
8
|
+
export declare const Invalid: Story;
|
|
9
|
+
export declare const Disabled: Story;
|
|
10
|
+
export declare const ReadOnly: Story;
|
|
11
|
+
/** When using uncontrolled value */
|
|
12
|
+
export declare const WithDefaultValue: Story;
|
|
13
|
+
export declare const WithClearButton: Story;
|
package/date-field/index.js
CHANGED
|
@@ -13,5 +13,9 @@ export interface DatePickerProps extends AriaDatePickerProps<DateValue> {
|
|
|
13
13
|
size?: Size;
|
|
14
14
|
/** An assistive text that helps the user understand the field better. Will be hidden in a popover with an info icon button. */
|
|
15
15
|
popover?: InfoPopoverProps;
|
|
16
|
+
/** Show a clear button to remove the selected date
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
isClearable?: boolean;
|
|
16
20
|
}
|
|
17
21
|
export declare const DatePicker: React.FC<DatePickerProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { DatePicker } from './DatePicker';
|
|
3
|
+
declare const meta: Meta<typeof DatePicker>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof DatePicker>;
|
|
6
|
+
export declare const Primary: Story;
|
|
7
|
+
export declare const WithTime: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
9
|
+
export declare const ReadOnly: Story;
|
|
10
|
+
export declare const Invalid: Story;
|
|
11
|
+
export declare const Required: Story;
|
|
12
|
+
export declare const CustomValiation: Story;
|
|
13
|
+
export declare const ControlledState: Story;
|
|
14
|
+
export declare const WithClearButton: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatePickerProps } from './DatePicker';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
interface DatePickerInputFieldProps extends Pick<DatePickerProps, 'isDisabled' | 'isInvalid' | 'isReadOnly' | 'size'> {
|
|
3
|
+
interface DatePickerInputFieldProps extends Pick<DatePickerProps, 'isDisabled' | 'isInvalid' | 'isReadOnly' | 'size' | 'isClearable'> {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
}
|
|
6
6
|
export declare const DatePickerInputField: React.FC<DatePickerInputFieldProps>;
|
|
@@ -13,5 +13,9 @@ export interface DateRangePickerProps extends AriaDateRangePickerProps<DateValue
|
|
|
13
13
|
size?: Size;
|
|
14
14
|
/** An assistive text that helps the user understand the field better. Will be hidden in a popover with an info icon button. */
|
|
15
15
|
popover?: InfoPopoverProps;
|
|
16
|
+
/** Show a clear button to remove the selected date range
|
|
17
|
+
* @default false
|
|
18
|
+
*/
|
|
19
|
+
isClearable?: boolean;
|
|
16
20
|
}
|
|
17
21
|
export declare const DateRangePicker: React.FC<DateRangePickerProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { DateRangePicker } from './DateRangePicker';
|
|
3
|
+
type Story = StoryObj<typeof DateRangePicker>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: import('react').FC<import('./DateRangePicker').DateRangePickerProps>;
|
|
6
|
+
title: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
a11y: {
|
|
10
|
+
config: {
|
|
11
|
+
rules: {
|
|
12
|
+
id: string;
|
|
13
|
+
selector: string;
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
options: {
|
|
18
|
+
rules: {
|
|
19
|
+
'color-contrast': {
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
args: {
|
|
27
|
+
label: string;
|
|
28
|
+
description: string;
|
|
29
|
+
errorMessage: string;
|
|
30
|
+
errorPosition: "top";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
34
|
+
export declare const Primary: Story;
|
|
35
|
+
export declare const Disabled: Story;
|
|
36
|
+
export declare const ReadOnly: Story;
|
|
37
|
+
export declare const Invalid: Story;
|
|
38
|
+
export declare const WithClearButton: Story;
|
package/date-picker/index.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { DropZone } from './FileUpload';
|
|
3
|
+
type Story = StoryObj<typeof DropZone>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: import('react').FC<import('react-aria-components').DropZoneProps>;
|
|
6
|
+
title: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
args: {};
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
export declare const DropIt: Story;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: import('react').FC<import('./Grid').GridProps>;
|
|
3
|
+
subcomponents: {
|
|
4
|
+
GridItem: import('react').FC<import('./GridItem').GridItemProps>;
|
|
5
|
+
};
|
|
6
|
+
title: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
argTypes: {
|
|
12
|
+
isContained: {
|
|
13
|
+
control: {
|
|
14
|
+
type: "boolean";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
removeMargins: {
|
|
18
|
+
control: {
|
|
19
|
+
type: "boolean";
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
25
|
+
export declare const Primary: {
|
|
26
|
+
args: {};
|
|
27
|
+
render: ({ ...args }: {
|
|
28
|
+
[x: string]: any;
|
|
29
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Heading } from './Heading';
|
|
3
|
+
type Story = StoryObj<typeof Heading>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: import('react').FC<import('./Heading').HeadingProps>;
|
|
6
|
+
title: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
args: {
|
|
9
|
+
isExpressive: false;
|
|
10
|
+
enableMargins: false;
|
|
11
|
+
};
|
|
12
|
+
argTypes: {
|
|
13
|
+
level: {
|
|
14
|
+
control: {
|
|
15
|
+
max: number;
|
|
16
|
+
min: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
22
|
+
export declare const Heading1: Story;
|
|
23
|
+
export declare const ExpressiveHeading1: Story;
|
|
24
|
+
export declare const Heading2: Story;
|
|
25
|
+
export declare const ExpressiveHeading2: Story;
|
|
26
|
+
export declare const Heading3: Story;
|
|
27
|
+
export declare const ExpressiveHeading3: Story;
|
|
28
|
+
export declare const ExpressiveHeading4: Story;
|
|
29
|
+
export declare const ExpressiveHeading5: Story;
|
|
30
|
+
export declare const ChangeSemanticElement: Story;
|
package/index.js
CHANGED
|
@@ -10,9 +10,9 @@ import { C as R } from "./chunks/Checkbox-BTAfwDxU.js";
|
|
|
10
10
|
import { C as F } from "./chunks/CheckboxGroup-C6LIpj_R.js";
|
|
11
11
|
import { C as v } from "./chunks/ColorSchemeSwitch-CaqrCGTA.js";
|
|
12
12
|
import { C as h, a as H, b as y } from "./chunks/ComboBox-BXcuyHPd.js";
|
|
13
|
-
import { D as N } from "./chunks/DateField-
|
|
13
|
+
import { D as N } from "./chunks/DateField-D9CEvqnd.js";
|
|
14
14
|
import { a as E, b as Q, D as Z } from "./chunks/DateInputDivider-CkTB5q5k.js";
|
|
15
|
-
import { D as q, a as J } from "./chunks/DateRangePicker-
|
|
15
|
+
import { D as q, a as J } from "./chunks/DateRangePicker-DGfdhIjR.js";
|
|
16
16
|
import { F as O } from "./chunks/FieldError-Bra5aRT3.js";
|
|
17
17
|
import { D as V, F as W } from "./chunks/FileUpload-h1PxqQmb.js";
|
|
18
18
|
import { G as Y } from "./chunks/Grid-B-WgMwON.js";
|
|
@@ -28,7 +28,7 @@ import { M as Bo } from "./chunks/Dialog-DprWZBKT.js";
|
|
|
28
28
|
import { P as So } from "./chunks/Popover-BcEtFiU1.js";
|
|
29
29
|
import { P as Io } from "./chunks/ProgressBar-67lCngwJ.js";
|
|
30
30
|
import { R as Po, a as Ro } from "./chunks/Radio-XQA8CylD.js";
|
|
31
|
-
import { S as Fo } from "./chunks/SearchField-
|
|
31
|
+
import { S as Fo } from "./chunks/SearchField-Jqn3dKGs.js";
|
|
32
32
|
import { S as vo } from "./chunks/Select-BNCz_ox4.js";
|
|
33
33
|
import { S as ho } from "./chunks/Select-CyYUhMOg.js";
|
|
34
34
|
import { S as yo } from "./chunks/Skeleton-DqIHQLQl.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { InfoBanner } from './InfoBanner';
|
|
4
|
+
type Story = StoryObj<typeof InfoBanner>;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
component: React.FC<import('./InfoBanner').InfoBannerProps>;
|
|
7
|
+
title: string;
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
export declare const Success: Story;
|
|
12
|
+
export declare const Warning: Story;
|
|
13
|
+
export declare const Info: Story;
|
|
14
|
+
export declare const Important: Story;
|
|
15
|
+
export declare const Dismissable: Story;
|
|
16
|
+
export declare const Controlled: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Label } from './Label';
|
|
3
|
+
type Story = StoryObj<typeof Label>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: import('react').FC<import('react-aria-components').LabelProps>;
|
|
6
|
+
title: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
10
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Layout } from './Layout';
|
|
3
|
+
declare const meta: Meta<typeof Layout>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Layout>;
|
|
6
|
+
export declare const Primary: Story;
|
|
7
|
+
export declare const External: Story;
|
|
8
|
+
export declare const OnlyHeader: Story;
|
|
9
|
+
export declare const Navbar: Story;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { LegacySelect } from '.';
|
|
3
|
+
type Story = StoryObj<typeof LegacySelect>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<Omit<import('./types').SelectProps, "children" | "items"> & {
|
|
6
|
+
options: import('..').ListBoxOption[];
|
|
7
|
+
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
title: string;
|
|
9
|
+
tags: string[];
|
|
10
|
+
args: {
|
|
11
|
+
description: string;
|
|
12
|
+
isDisabled: false;
|
|
13
|
+
isSelectableAll: false;
|
|
14
|
+
label: string;
|
|
15
|
+
options: {
|
|
16
|
+
name: string;
|
|
17
|
+
id: string;
|
|
18
|
+
}[];
|
|
19
|
+
placeholder: string;
|
|
20
|
+
selectionMode: "single";
|
|
21
|
+
showTags: false;
|
|
22
|
+
errorPosition: "top";
|
|
23
|
+
size: "large";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export default _default;
|
|
27
|
+
export declare const Primary: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Link } from './Link';
|
|
3
|
+
declare const meta: Meta<typeof Link>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Link>;
|
|
6
|
+
export declare const Primary: Story;
|
|
7
|
+
export declare const PrimaryDisabled: Story;
|
|
8
|
+
export declare const ExternalLink: Story;
|
|
9
|
+
export declare const DownloadLink: Story;
|
|
10
|
+
export declare const Standalone: Story;
|
|
11
|
+
export declare const StandaloneDisabled: Story;
|
|
12
|
+
export declare const ExternalLinkStandalone: Story;
|
|
13
|
+
export declare const DownloadLinkStandalone: Story;
|
|
14
|
+
export declare const CustomIcon: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { LinkButton } from './LinkButton';
|
|
3
|
+
declare const meta: Meta<typeof LinkButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof LinkButton>;
|
|
6
|
+
export declare const Primary: Story;
|
|
7
|
+
export declare const Secondary: Story;
|
|
8
|
+
export declare const Tertiary: Story;
|
|
9
|
+
export declare const Previous: Story;
|
|
10
|
+
export declare const Disabled: Story;
|
|
11
|
+
export declare const AppLink: Story;
|
|
12
|
+
export declare const Danger: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Logo } from './Logo';
|
|
3
|
+
declare const meta: Meta<typeof Logo>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Logo>;
|
|
6
|
+
export declare const Primary: Story;
|
|
7
|
+
export declare const Monochrome: Story;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Menu } from './Menu';
|
|
3
|
+
interface Item {
|
|
4
|
+
id: string | number;
|
|
5
|
+
name: string;
|
|
6
|
+
children?: Item[];
|
|
7
|
+
[prop: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
type Story = StoryObj<typeof Menu<Item>>;
|
|
10
|
+
declare const _default: {
|
|
11
|
+
title: string;
|
|
12
|
+
component: <T extends import('./Menu').MenuItemObject>({ className, size, ...rest }: import('./Menu').MenuProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
subcomponents: {
|
|
14
|
+
MenuItem: <T extends import('./Menu').MenuItemObject>(props: import('./MenuItem').MenuItemProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
};
|
|
16
|
+
render: (args: import('./Menu').MenuProps<import('./Menu').MenuItemObject>) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
args: {
|
|
18
|
+
children: (item: import('./Menu').MenuItemObject) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
items: {
|
|
20
|
+
id: number;
|
|
21
|
+
name: string;
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
26
|
+
export declare const Primary: Story;
|
|
27
|
+
export declare const ControlledSingleSelection: Story;
|
|
28
|
+
export declare const ControlledMultipleSelection: Story;
|
|
29
|
+
export declare const Sections: Story;
|
|
30
|
+
export declare const Separators: Story;
|
|
31
|
+
export declare const TextSlots: Story;
|
|
32
|
+
export declare const MultiSelectWithDescriptions: Story;
|
|
33
|
+
export declare const DisabledItems: Story;
|
|
34
|
+
export declare const SubMenus: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Modal } from './Dialog';
|
|
3
|
+
type Story = StoryObj<typeof Modal>;
|
|
4
|
+
declare const _default: Meta<typeof Modal>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const NotDismissable: Story;
|
|
8
|
+
/**
|
|
9
|
+
* For special cases when modal should not be closable without taking further action
|
|
10
|
+
*/
|
|
11
|
+
export declare const HiddenCloseButton: Story;
|
|
12
|
+
export declare const EmptyTitle: Story;
|
|
13
|
+
export declare const Scrollable: Story;
|
|
14
|
+
export declare const DS1282: Story;
|
|
15
|
+
export declare const LongTitle: Story;
|
package/package.json
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Popover } from './Popover';
|
|
3
|
+
import { DialogTrigger } from 'react-aria-components';
|
|
4
|
+
type Story = StoryObj<typeof Popover>;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
component: typeof Popover;
|
|
7
|
+
subcomponents: {
|
|
8
|
+
DialogTrigger: typeof DialogTrigger;
|
|
9
|
+
};
|
|
10
|
+
title: string;
|
|
11
|
+
tags: string[];
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
17
|
+
export declare const Primary: Story;
|
|
18
|
+
export declare const Placement: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ProgressBar } from './ProgressBar';
|
|
3
|
+
type Story = StoryObj<typeof ProgressBar>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: import('react').FC<import('./ProgressBar').ProgressBarProps>;
|
|
6
|
+
title: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
args: {
|
|
9
|
+
isIndeterminate: false;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
export declare const Primary: Story;
|
|
14
|
+
export declare const WithoutLabels: Story;
|
|
15
|
+
export declare const IsIndeterminate: Story;
|