@worknice/whiteboard 0.22.6 → 0.23.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/Storybook.js +50 -0
- package/dist/controls/Button.d.ts +5 -0
- package/dist/controls/Button.stories.d.ts +67 -0
- package/dist/controls/Button.stories.js +121 -0
- package/dist/fields/CheckboxSetField.d.ts +3 -0
- package/dist/fields/CheckboxSetField.stories.d.ts +62 -0
- package/dist/fields/CheckboxSetField.stories.js +85 -0
- package/dist/fields/ColorPickerField.stories.d.ts +49 -0
- package/dist/fields/ColorPickerField.stories.js +56 -0
- package/dist/fields/OrgLogoField.stories.d.ts +44 -0
- package/dist/fields/OrgLogoField.stories.js +79 -0
- package/dist/fields/PaletteColorPickerField.stories.d.ts +43 -0
- package/dist/fields/PaletteColorPickerField.stories.js +60 -0
- package/dist/fields/TimezoneField.stories.d.ts +48 -0
- package/dist/fields/TimezoneField.stories.js +66 -0
- package/dist/icons/IconGallery.js +47 -0
- package/dist/inputs/ColorInput.stories.d.ts +36 -0
- package/dist/inputs/ColorInput.stories.js +42 -0
- package/dist/inputs/PaletteColorInput.stories.d.ts +28 -0
- package/dist/inputs/PaletteColorInput.stories.js +40 -0
- package/dist/presentation/Container.d.ts +7 -0
- package/dist/presentation/Container.js +12 -0
- package/dist/presentation/Container.module.js +7 -0
- package/dist/presentation/Container.stories.d.ts +14 -0
- package/dist/presentation/Container.stories.js +29 -0
- package/dist/presentation/Container_module.css +36 -0
- package/dist/presentation/Icon.stories.d.ts +20 -0
- package/dist/presentation/Icon.stories.js +24 -0
- package/dist/presentation/Tag.stories.d.ts +15 -0
- package/dist/presentation/Tag.stories.js +16 -0
- package/package.json +14 -4
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
+
import { type PaletteColor } from "../utils/paletteColor";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: ({ description, errors, id, label, labelFont, onChange, required, value, }: {
|
|
5
|
+
description?: import("react").ReactNode;
|
|
6
|
+
errors?: Array<import("../forms/_types").ValidationError>;
|
|
7
|
+
id: string;
|
|
8
|
+
label: import("react").ReactNode;
|
|
9
|
+
labelFont?: typeof import("../utils/field").LABEL_FONT_OPTIONS[number];
|
|
10
|
+
required?: boolean;
|
|
11
|
+
value: PaletteColor;
|
|
12
|
+
onChange: (value: PaletteColor) => void;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
argTypes: {
|
|
15
|
+
id: {
|
|
16
|
+
table: {
|
|
17
|
+
disable: true;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
args: {
|
|
22
|
+
label: string;
|
|
23
|
+
value: "blue";
|
|
24
|
+
onChange: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
25
|
+
description: string;
|
|
26
|
+
labelFont: "label";
|
|
27
|
+
required: false;
|
|
28
|
+
};
|
|
29
|
+
render: (args: {
|
|
30
|
+
description?: import("react").ReactNode;
|
|
31
|
+
errors?: Array<import("../forms/_types").ValidationError>;
|
|
32
|
+
id: string;
|
|
33
|
+
label: import("react").ReactNode;
|
|
34
|
+
labelFont?: typeof import("../utils/field").LABEL_FONT_OPTIONS[number];
|
|
35
|
+
required?: boolean;
|
|
36
|
+
value: PaletteColor;
|
|
37
|
+
onChange: (value: PaletteColor) => void;
|
|
38
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
};
|
|
40
|
+
export default meta;
|
|
41
|
+
type Story = StoryObj<typeof meta>;
|
|
42
|
+
export declare const Normal: Story;
|
|
43
|
+
export declare const WithErrors: Story;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_storybook_preview_api_98c434a5__ from "storybook/preview-api";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__ from "storybook/test";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__utils_paletteColor_js_a1a182d8__ from "../utils/paletteColor.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__PaletteColorPickerField_js_0920859c__ from "./PaletteColorPickerField.js";
|
|
6
|
+
const meta = {
|
|
7
|
+
component: __WEBPACK_EXTERNAL_MODULE__PaletteColorPickerField_js_0920859c__["default"],
|
|
8
|
+
argTypes: {
|
|
9
|
+
id: {
|
|
10
|
+
table: {
|
|
11
|
+
disable: true
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
args: {
|
|
16
|
+
label: "Tag Color",
|
|
17
|
+
value: __WEBPACK_EXTERNAL_MODULE__utils_paletteColor_js_a1a182d8__.PALETTE_COLORS["0"],
|
|
18
|
+
onChange: (0, __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.fn)(),
|
|
19
|
+
description: "Select a tag color",
|
|
20
|
+
labelFont: "label",
|
|
21
|
+
required: false
|
|
22
|
+
},
|
|
23
|
+
render: (args)=>{
|
|
24
|
+
const [{ value, onChange }, updateArgs] = (0, __WEBPACK_EXTERNAL_MODULE_storybook_preview_api_98c434a5__.useArgs)();
|
|
25
|
+
const onColorChange = (color)=>{
|
|
26
|
+
updateArgs({
|
|
27
|
+
value: color
|
|
28
|
+
});
|
|
29
|
+
onChange(color);
|
|
30
|
+
};
|
|
31
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PaletteColorPickerField_js_0920859c__["default"], {
|
|
32
|
+
...args,
|
|
33
|
+
value: value,
|
|
34
|
+
onChange: onColorChange
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const PaletteColorPickerField_stories_rslib_entry_ = meta;
|
|
39
|
+
const Normal = {
|
|
40
|
+
args: {
|
|
41
|
+
id: "normalPaletteColorPickerField"
|
|
42
|
+
},
|
|
43
|
+
play: async ({ args, canvas, userEvent })=>{
|
|
44
|
+
await userEvent.click(canvas.getByLabelText("Blue"));
|
|
45
|
+
await (0, __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.expect)(args.onChange).toHaveBeenCalledWith("blue");
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const WithErrors = {
|
|
49
|
+
args: {
|
|
50
|
+
id: "withErrorsPaletteColorPickerField",
|
|
51
|
+
errors: [
|
|
52
|
+
{
|
|
53
|
+
id: "error1",
|
|
54
|
+
message: "Please select a tag color",
|
|
55
|
+
field: "color"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
export { Normal, WithErrors, PaletteColorPickerField_stories_rslib_entry_ as default };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
+
import { type Timezone } from "./TimezoneField";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: ({ autoFocus, description, disabled, errors, id, includeValueInTracking, label, onChange, required, value, }: {
|
|
5
|
+
autoFocus?: boolean;
|
|
6
|
+
description?: import("react").ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
errors?: Array<import("../forms/_types").ValidationError>;
|
|
9
|
+
id: string;
|
|
10
|
+
includeValueInTracking?: boolean;
|
|
11
|
+
label: import("react").ReactNode;
|
|
12
|
+
onChange: import("react").Dispatch<Timezone>;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
value: Timezone;
|
|
15
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
argTypes: {
|
|
17
|
+
id: {
|
|
18
|
+
table: {
|
|
19
|
+
disable: true;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
args: {
|
|
24
|
+
label: string;
|
|
25
|
+
value: "Australia/Sydney";
|
|
26
|
+
onChange: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
27
|
+
description: string;
|
|
28
|
+
required: false;
|
|
29
|
+
disabled: false;
|
|
30
|
+
autoFocus: false;
|
|
31
|
+
};
|
|
32
|
+
render: (args: {
|
|
33
|
+
autoFocus?: boolean;
|
|
34
|
+
description?: import("react").ReactNode;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
errors?: Array<import("../forms/_types").ValidationError>;
|
|
37
|
+
id: string;
|
|
38
|
+
includeValueInTracking?: boolean;
|
|
39
|
+
label: import("react").ReactNode;
|
|
40
|
+
onChange: import("react").Dispatch<Timezone>;
|
|
41
|
+
required?: boolean;
|
|
42
|
+
value: Timezone;
|
|
43
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
};
|
|
45
|
+
export default meta;
|
|
46
|
+
type Story = StoryObj<typeof meta>;
|
|
47
|
+
export declare const Normal: Story;
|
|
48
|
+
export declare const WithErrors: Story;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_storybook_preview_api_98c434a5__ from "storybook/preview-api";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__ from "storybook/test";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__TimezoneField_js_4ab82a46__ from "./TimezoneField.js";
|
|
5
|
+
const defaultTimezone = __WEBPACK_EXTERNAL_MODULE__TimezoneField_js_4ab82a46__.TIMEZONES["363"];
|
|
6
|
+
const meta = {
|
|
7
|
+
component: __WEBPACK_EXTERNAL_MODULE__TimezoneField_js_4ab82a46__["default"],
|
|
8
|
+
argTypes: {
|
|
9
|
+
id: {
|
|
10
|
+
table: {
|
|
11
|
+
disable: true
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
args: {
|
|
16
|
+
label: "Timezone",
|
|
17
|
+
value: defaultTimezone,
|
|
18
|
+
onChange: (0, __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.fn)(),
|
|
19
|
+
description: "Select a timezone",
|
|
20
|
+
required: false,
|
|
21
|
+
disabled: false,
|
|
22
|
+
autoFocus: false
|
|
23
|
+
},
|
|
24
|
+
render: (args)=>{
|
|
25
|
+
const [{ value, onChange }, updateArgs] = (0, __WEBPACK_EXTERNAL_MODULE_storybook_preview_api_98c434a5__.useArgs)();
|
|
26
|
+
const onTimezoneChange = (timezone)=>{
|
|
27
|
+
updateArgs({
|
|
28
|
+
value: timezone
|
|
29
|
+
});
|
|
30
|
+
onChange(timezone);
|
|
31
|
+
};
|
|
32
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__TimezoneField_js_4ab82a46__["default"], {
|
|
33
|
+
...args,
|
|
34
|
+
value: value,
|
|
35
|
+
onChange: onTimezoneChange
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const TimezoneField_stories_rslib_entry_ = meta;
|
|
40
|
+
const Normal = {
|
|
41
|
+
args: {
|
|
42
|
+
id: "normalTimezoneField"
|
|
43
|
+
},
|
|
44
|
+
play: async ({ args, canvas, userEvent })=>{
|
|
45
|
+
await userEvent.click(canvas.getByRole("combobox", {
|
|
46
|
+
name: "Timezone"
|
|
47
|
+
}));
|
|
48
|
+
await userEvent.click(await __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.screen.findByRole("option", {
|
|
49
|
+
name: "America/New_York"
|
|
50
|
+
}));
|
|
51
|
+
(0, __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.expect)(args.onChange).toHaveBeenCalledWith("America/New_York");
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const WithErrors = {
|
|
55
|
+
args: {
|
|
56
|
+
id: "withErrorsTimezoneField",
|
|
57
|
+
errors: [
|
|
58
|
+
{
|
|
59
|
+
id: "error1",
|
|
60
|
+
message: "Please select a timezone",
|
|
61
|
+
field: "timezone"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
export { Normal, WithErrors, TimezoneField_stories_rslib_entry_ as default };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__storybook_addon_docs_blocks_67d3262c__ from "@storybook/addon-docs/blocks";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__presentation_IconSymbolSet_js_45454e7d__ from "../presentation/IconSymbolSet.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__presentation_Icon_js_6961aa57__ from "../presentation/Icon.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__index_js_fb10b2a7__ from "./index.js";
|
|
6
|
+
function _createMdxContent(props) {
|
|
7
|
+
const _components = {
|
|
8
|
+
h1: "h1",
|
|
9
|
+
...props.components
|
|
10
|
+
};
|
|
11
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
|
|
12
|
+
children: [
|
|
13
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__storybook_addon_docs_blocks_67d3262c__.Meta, {
|
|
14
|
+
title: "Icon Gallery"
|
|
15
|
+
}),
|
|
16
|
+
"\n",
|
|
17
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(_components.h1, {
|
|
18
|
+
children: "Icon Gallery"
|
|
19
|
+
}),
|
|
20
|
+
"\n",
|
|
21
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("br", {}),
|
|
22
|
+
"\n",
|
|
23
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__presentation_IconSymbolSet_js_45454e7d__["default"], {}),
|
|
24
|
+
"\n",
|
|
25
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__storybook_addon_docs_blocks_67d3262c__.IconGallery, {
|
|
26
|
+
children: Object.keys(__WEBPACK_EXTERNAL_MODULE__index_js_fb10b2a7__).map((icon)=>(0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__storybook_addon_docs_blocks_67d3262c__.IconItem, {
|
|
27
|
+
name: icon,
|
|
28
|
+
children: (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__presentation_Icon_js_6961aa57__["default"], {
|
|
29
|
+
id: icon,
|
|
30
|
+
symbol: icon,
|
|
31
|
+
size: "xlarge"
|
|
32
|
+
})
|
|
33
|
+
}, icon))
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function MDXContent(props = {}) {
|
|
39
|
+
const { wrapper: MDXLayout } = props.components || {};
|
|
40
|
+
return MDXLayout ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MDXLayout, {
|
|
41
|
+
...props,
|
|
42
|
+
children: (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(_createMdxContent, {
|
|
43
|
+
...props
|
|
44
|
+
})
|
|
45
|
+
}) : _createMdxContent(props);
|
|
46
|
+
}
|
|
47
|
+
export { MDXContent as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
component: ({ id, value, onChange, autoFocus, "aria-label": ariaLabel, disabled, }: {
|
|
4
|
+
id: string;
|
|
5
|
+
value: string | null;
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
|
+
autoFocus?: boolean;
|
|
8
|
+
"aria-label"?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
argTypes: {
|
|
12
|
+
id: {
|
|
13
|
+
table: {
|
|
14
|
+
disable: true;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
args: {
|
|
19
|
+
onChange: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
20
|
+
value: string;
|
|
21
|
+
autoFocus: false;
|
|
22
|
+
"aria-label": string;
|
|
23
|
+
disabled: false;
|
|
24
|
+
};
|
|
25
|
+
render: (args: {
|
|
26
|
+
id: string;
|
|
27
|
+
value: string | null;
|
|
28
|
+
onChange: (value: string) => void;
|
|
29
|
+
autoFocus?: boolean;
|
|
30
|
+
"aria-label"?: string;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
};
|
|
34
|
+
export default meta;
|
|
35
|
+
type Story = StoryObj<typeof meta>;
|
|
36
|
+
export declare const Normal: Story;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_storybook_preview_api_98c434a5__ from "storybook/preview-api";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__ from "storybook/test";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__ColorInput_js_cca8d716__ from "./ColorInput.js";
|
|
5
|
+
const meta = {
|
|
6
|
+
component: __WEBPACK_EXTERNAL_MODULE__ColorInput_js_cca8d716__["default"],
|
|
7
|
+
argTypes: {
|
|
8
|
+
id: {
|
|
9
|
+
table: {
|
|
10
|
+
disable: true
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
onChange: (0, __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.fn)(),
|
|
16
|
+
value: "#90116e",
|
|
17
|
+
autoFocus: false,
|
|
18
|
+
"aria-label": "Select color",
|
|
19
|
+
disabled: false
|
|
20
|
+
},
|
|
21
|
+
render: (args)=>{
|
|
22
|
+
const [{ value, onChange }, updateArgs] = (0, __WEBPACK_EXTERNAL_MODULE_storybook_preview_api_98c434a5__.useArgs)();
|
|
23
|
+
const onColorChange = (hexColor)=>{
|
|
24
|
+
updateArgs({
|
|
25
|
+
value: hexColor
|
|
26
|
+
});
|
|
27
|
+
onChange(hexColor);
|
|
28
|
+
};
|
|
29
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__ColorInput_js_cca8d716__["default"], {
|
|
30
|
+
...args,
|
|
31
|
+
value: value,
|
|
32
|
+
onChange: onColorChange
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const ColorInput_stories_rslib_entry_ = meta;
|
|
37
|
+
const Normal = {
|
|
38
|
+
args: {
|
|
39
|
+
id: "normalPaletteColorInput"
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export { Normal, ColorInput_stories_rslib_entry_ as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
+
import { type PaletteColor } from "../utils/paletteColor";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: ({ id, value, onChange }: {
|
|
5
|
+
id: string;
|
|
6
|
+
value: PaletteColor;
|
|
7
|
+
onChange: (value: PaletteColor) => void;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
argTypes: {
|
|
10
|
+
id: {
|
|
11
|
+
table: {
|
|
12
|
+
disable: true;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
args: {
|
|
17
|
+
value: "blue";
|
|
18
|
+
onChange: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
19
|
+
};
|
|
20
|
+
render: (args: {
|
|
21
|
+
id: string;
|
|
22
|
+
value: PaletteColor;
|
|
23
|
+
onChange: (value: PaletteColor) => void;
|
|
24
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
export declare const Normal: Story;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_storybook_preview_api_98c434a5__ from "storybook/preview-api";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__ from "storybook/test";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__utils_paletteColor_js_a1a182d8__ from "../utils/paletteColor.js";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__PaletteColorInput_js_43f9fb24__ from "./PaletteColorInput.js";
|
|
6
|
+
const meta = {
|
|
7
|
+
component: __WEBPACK_EXTERNAL_MODULE__PaletteColorInput_js_43f9fb24__["default"],
|
|
8
|
+
argTypes: {
|
|
9
|
+
id: {
|
|
10
|
+
table: {
|
|
11
|
+
disable: true
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
args: {
|
|
16
|
+
value: __WEBPACK_EXTERNAL_MODULE__utils_paletteColor_js_a1a182d8__.PALETTE_COLORS["0"],
|
|
17
|
+
onChange: (0, __WEBPACK_EXTERNAL_MODULE_storybook_test_a99c99ea__.fn)()
|
|
18
|
+
},
|
|
19
|
+
render: (args)=>{
|
|
20
|
+
const [{ value, onChange }, updateArgs] = (0, __WEBPACK_EXTERNAL_MODULE_storybook_preview_api_98c434a5__.useArgs)();
|
|
21
|
+
const onColorChange = (color)=>{
|
|
22
|
+
updateArgs({
|
|
23
|
+
value: color
|
|
24
|
+
});
|
|
25
|
+
onChange(color);
|
|
26
|
+
};
|
|
27
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PaletteColorInput_js_43f9fb24__["default"], {
|
|
28
|
+
...args,
|
|
29
|
+
value: value,
|
|
30
|
+
onChange: onColorChange
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const PaletteColorInput_stories_rslib_entry_ = meta;
|
|
35
|
+
const Normal = {
|
|
36
|
+
args: {
|
|
37
|
+
id: "normalPaletteColorInput"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
export { Normal, PaletteColorInput_stories_rslib_entry_ as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_clsx__ from "clsx";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Container_module_js_7d6074ca__ from "./Container.module.js";
|
|
4
|
+
const Container = ({ children, type = "full" })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
5
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])(__WEBPACK_EXTERNAL_MODULE__Container_module_js_7d6074ca__["default"].container, {
|
|
6
|
+
[__WEBPACK_EXTERNAL_MODULE__Container_module_js_7d6074ca__["default"].fullWidthContent]: "full" === type,
|
|
7
|
+
[__WEBPACK_EXTERNAL_MODULE__Container_module_js_7d6074ca__["default"].narrowWidthContent]: "narrow" === type
|
|
8
|
+
}),
|
|
9
|
+
children: children
|
|
10
|
+
});
|
|
11
|
+
const Container_rslib_entry_ = Container;
|
|
12
|
+
export { Container_rslib_entry_ as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
component: ({ children, type }: {
|
|
4
|
+
children: import("react").ReactNode;
|
|
5
|
+
type?: "full" | "narrow";
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
args: {
|
|
8
|
+
type: "full";
|
|
9
|
+
children: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Normal: Story;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Card_js_d67c086a__ from "./Card.js";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__CardContent_js_20e3f6de__ from "./CardContent.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Container_js_e7c2eb62__ from "./Container.js";
|
|
5
|
+
const meta = {
|
|
6
|
+
component: __WEBPACK_EXTERNAL_MODULE__Container_js_e7c2eb62__["default"],
|
|
7
|
+
args: {
|
|
8
|
+
type: "full",
|
|
9
|
+
children: `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam eget euismod ex, vitae tempor turpis.
|
|
10
|
+
Maecenas id tortor convallis, egestas eros sed, dictum diam. Nunc posuere purus sed interdum consequat.
|
|
11
|
+
Duis sit amet convallis felis. Vestibulum id consectetur arcu. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
12
|
+
Integer sed mi mollis, auctor felis eu, rutrum urna. Morbi auctor pulvinar quam ac tempor. Nunc pellentesque quis felis at eleifend.
|
|
13
|
+
Cras aliquet nulla at neque ultricies varius. Vestibulum ac viverra nisi.
|
|
14
|
+
Interdum et malesuada fames ac ante ipsum primis in faucibus.Vestibulum venenatis tincidunt urna vitae venenatis.
|
|
15
|
+
Phasellus dolor augue, euismod aliquam lobortis at, blandit sollicitudin ligula.`
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const Container_stories_rslib_entry_ = meta;
|
|
19
|
+
const Normal = {
|
|
20
|
+
render: (args)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Container_js_e7c2eb62__["default"], {
|
|
21
|
+
type: args.type,
|
|
22
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Card_js_d67c086a__["default"], {
|
|
23
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__CardContent_js_20e3f6de__["default"], {
|
|
24
|
+
children: args.children
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
};
|
|
29
|
+
export { Normal, Container_stories_rslib_entry_ as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.container-cRDqyT {
|
|
2
|
+
--container-spacing: var(--size-00);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
@media (min-width: 768px) {
|
|
6
|
+
.container-cRDqyT {
|
|
7
|
+
--container-spacing: var(--size-p3);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@media (min-width: 1440px) {
|
|
12
|
+
.container-cRDqyT {
|
|
13
|
+
--container-spacing: var(--size-p4);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.narrowWidthContent-jzMzq_ {
|
|
18
|
+
width: 100%;
|
|
19
|
+
padding-left: var(--container-spacing);
|
|
20
|
+
padding-right: var(--container-spacing);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@media (min-width: 720px) {
|
|
24
|
+
.narrowWidthContent-jzMzq_ {
|
|
25
|
+
width: 900px;
|
|
26
|
+
max-width: calc(100% - var(--container-spacing) * 2);
|
|
27
|
+
margin-left: auto;
|
|
28
|
+
margin-right: auto;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.fullWidthContent-iVPtI8 {
|
|
33
|
+
margin-left: var(--container-spacing);
|
|
34
|
+
margin-right: var(--container-spacing);
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
component: ({ animate, symbol, size, tone, className }: {
|
|
4
|
+
animate?: boolean;
|
|
5
|
+
symbol: keyof typeof import("../icons");
|
|
6
|
+
size?: "small" | "xsmall" | "default" | "large" | "xlarge";
|
|
7
|
+
tone?: "default" | "primary" | "muted" | "danger" | "warning" | "success" | "info" | "light";
|
|
8
|
+
className?: any;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
args: {
|
|
11
|
+
size: "default";
|
|
12
|
+
tone: "default";
|
|
13
|
+
symbol: "Approval";
|
|
14
|
+
animate: false;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Large: Story;
|
|
20
|
+
export declare const Animated: Story;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Icon_js_0d271bb6__ from "./Icon.js";
|
|
2
|
+
const meta = {
|
|
3
|
+
component: __WEBPACK_EXTERNAL_MODULE__Icon_js_0d271bb6__["default"],
|
|
4
|
+
args: {
|
|
5
|
+
size: "default",
|
|
6
|
+
tone: "default",
|
|
7
|
+
symbol: "Approval",
|
|
8
|
+
animate: false
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const Icon_stories_rslib_entry_ = meta;
|
|
12
|
+
const Large = {
|
|
13
|
+
args: {
|
|
14
|
+
size: "xlarge"
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const Animated = {
|
|
18
|
+
args: {
|
|
19
|
+
size: "xlarge",
|
|
20
|
+
symbol: "Loading",
|
|
21
|
+
animate: true
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export { Animated, Large, Icon_stories_rslib_entry_ as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
component: ({ children, id, color }: {
|
|
4
|
+
children: import("react").ReactNode;
|
|
5
|
+
id: string;
|
|
6
|
+
color: import("../utils/paletteColor").PaletteColor;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
args: {
|
|
9
|
+
children: string;
|
|
10
|
+
color: "blue";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof meta>;
|
|
15
|
+
export declare const Normal: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__utils_paletteColor_js_a1a182d8__ from "../utils/paletteColor.js";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__Tag_js_f7333ee7__ from "./Tag.js";
|
|
3
|
+
const meta = {
|
|
4
|
+
component: __WEBPACK_EXTERNAL_MODULE__Tag_js_f7333ee7__["default"],
|
|
5
|
+
args: {
|
|
6
|
+
children: "Some Tag",
|
|
7
|
+
color: __WEBPACK_EXTERNAL_MODULE__utils_paletteColor_js_a1a182d8__.PALETTE_COLORS["0"]
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
const Tag_stories_rslib_entry_ = meta;
|
|
11
|
+
const Normal = {
|
|
12
|
+
args: {
|
|
13
|
+
id: "id"
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export { Normal, Tag_stories_rslib_entry_ as default };
|