@agility/plenum-ui 2.0.0-rc47 → 2.0.0-rc49
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/.eslintrc.json +6 -6
- package/.prettierrc +13 -13
- package/.storybook/Layout.jsx +12 -12
- package/.storybook/head.tsx +4 -4
- package/.storybook/main.ts +18 -18
- package/.storybook/manager-head.html +1 -1
- package/.storybook/manager.ts +25 -25
- package/.storybook/plenumTheme.ts +8 -8
- package/.storybook/preview-head.html +3 -3
- package/.storybook/preview.tsx +28 -28
- package/.vscode/settings.json +3 -3
- package/README.md +271 -271
- package/app/globals.css +99 -99
- package/app/head.tsx +59 -59
- package/app/layout.tsx +28 -28
- package/app/page.tsx +7 -7
- package/build.js +45 -45
- package/dist/index.d.ts +232 -230
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/types/stories/molecules/inputs/select/Select.d.ts +2 -0
- package/local.sh +100 -100
- package/next.config.js +8 -8
- package/package.json +82 -82
- package/pages/api/hello.ts +13 -13
- package/postcss.config.js +6 -6
- package/rollup.config.mjs +41 -41
- package/scripts/create-component.js +97 -97
- package/stories/Introduction.mdx +314 -314
- package/stories/assets/stackalt.svg +1 -1
- package/stories/atoms/Avatar/Avatar.stories.tsx +96 -96
- package/stories/atoms/Avatar/Avatar.tsx +123 -123
- package/stories/atoms/Avatar/index.ts +3 -3
- package/stories/atoms/badges/Badge.tsx +127 -127
- package/stories/atoms/badges/Pill/Pill.stories.tsx +75 -75
- package/stories/atoms/badges/Rounded/Rounded.stories.tsx +75 -75
- package/stories/atoms/badges/index.ts +3 -3
- package/stories/atoms/buttons/Button/Alternative/Alternative.stories.ts +86 -86
- package/stories/atoms/buttons/Button/Button.tsx +232 -232
- package/stories/atoms/buttons/Button/Danger/Danger.stories.ts +90 -90
- package/stories/atoms/buttons/Button/Primary/Primary.stories.ts +97 -97
- package/stories/atoms/buttons/Button/Secondary/Secondary.stories.ts +93 -93
- package/stories/atoms/buttons/Button/defaultArgs.ts +9 -9
- package/stories/atoms/buttons/Button/index.ts +3 -3
- package/stories/atoms/buttons/Capsule/Alternative/Alternative.stories.ts +27 -27
- package/stories/atoms/buttons/Capsule/Capsule.tsx +88 -88
- package/stories/atoms/buttons/Capsule/Danger/Danger.stories.ts +27 -27
- package/stories/atoms/buttons/Capsule/Primary/Primary.stories.ts +27 -27
- package/stories/atoms/buttons/Capsule/Secondary/Secondary.stories.ts +27 -27
- package/stories/atoms/buttons/Capsule/index.ts +3 -3
- package/stories/atoms/buttons/FloatingActionButton/FloatingActionButton.stories.tsx +15 -15
- package/stories/atoms/buttons/FloatingActionButton/FloatingActionButton.tsx +22 -22
- package/stories/atoms/buttons/FloatingActionButton/index.tsx +3 -3
- package/stories/atoms/buttons/index.ts +4 -4
- package/stories/atoms/crumb/Crumb.stories.tsx +18 -18
- package/stories/atoms/crumb/Crumb.tsx +22 -22
- package/stories/atoms/crumb/index.tsx +3 -3
- package/stories/atoms/icons/DynamicIcon.stories.ts +43 -43
- package/stories/atoms/icons/DynamicIcon.tsx +90 -90
- package/stories/atoms/icons/IconWithShadow.stories.ts +43 -43
- package/stories/atoms/icons/IconWithShadow.tsx +16 -16
- package/stories/atoms/icons/TablerIcon.tsx +22 -22
- package/stories/atoms/icons/index.tsx +14 -14
- package/stories/atoms/icons/tablerIconNames.ts +4336 -4336
- package/stories/atoms/index.ts +46 -46
- package/stories/atoms/loaders/Loader.stories.ts +15 -15
- package/stories/atoms/loaders/Loader.tsx +21 -21
- package/stories/atoms/loaders/NProgress/RadialProgress.stories.tsx +19 -19
- package/stories/atoms/loaders/NProgress/RadialProgress.tsx +74 -74
- package/stories/atoms/loaders/NProgress/index.ts +3 -3
- package/stories/atoms/loaders/index.ts +4 -4
- package/stories/index.ts +136 -136
- package/stories/molecules/index.ts +51 -51
- package/stories/molecules/inputs/InputCounter/InputCounter.stories.tsx +18 -18
- package/stories/molecules/inputs/InputCounter/InputCounter.tsx +24 -24
- package/stories/molecules/inputs/InputCounter/index.tsx +3 -3
- package/stories/molecules/inputs/InputField/InputField.stories.tsx +29 -29
- package/stories/molecules/inputs/InputField/InputField.tsx +96 -96
- package/stories/molecules/inputs/InputField/index.tsx +3 -3
- package/stories/molecules/inputs/InputLabel/InputLabel.stories.tsx +19 -19
- package/stories/molecules/inputs/InputLabel/InputLabel.tsx +45 -45
- package/stories/molecules/inputs/InputLabel/index.tsx +3 -3
- package/stories/molecules/inputs/NestedInputButton/NestedInputButton.stories.tsx +52 -52
- package/stories/molecules/inputs/NestedInputButton/NestedInputButton.tsx +64 -64
- package/stories/molecules/inputs/NestedInputButton/index.tsx +3 -3
- package/stories/molecules/inputs/TextInput/TextInput.stories.tsx +32 -32
- package/stories/molecules/inputs/TextInput/TextInput.tsx +165 -165
- package/stories/molecules/inputs/TextInput/index.tsx +5 -5
- package/stories/molecules/inputs/checkbox/Checkbox.stories.ts +23 -23
- package/stories/molecules/inputs/checkbox/Checkbox.tsx +98 -98
- package/stories/molecules/inputs/checkbox/index.ts +3 -3
- package/stories/molecules/inputs/combobox/ComboBox.stories.ts +41 -41
- package/stories/molecules/inputs/combobox/ComboBox.tsx +185 -185
- package/stories/molecules/inputs/combobox/index.ts +3 -3
- package/stories/molecules/inputs/index.ts +38 -38
- package/stories/molecules/inputs/radio/Radio.stories.ts +27 -27
- package/stories/molecules/inputs/radio/Radio.tsx +92 -92
- package/stories/molecules/inputs/radio/index.ts +3 -3
- package/stories/molecules/inputs/select/Select.stories.ts +23 -23
- package/stories/molecules/inputs/select/Select.tsx +108 -100
- package/stories/molecules/inputs/select/index.ts +3 -3
- package/stories/molecules/inputs/textArea/TextArea.stories.ts +22 -22
- package/stories/molecules/inputs/textArea/TextArea.tsx +158 -158
- package/stories/molecules/inputs/textArea/index.ts +3 -3
- package/stories/molecules/inputs/toggleSwitch/ToggleSwitch.stories.tsx +118 -118
- package/stories/molecules/inputs/toggleSwitch/ToggleSwitch.tsx +81 -81
- package/stories/molecules/inputs/toggleSwitch/index.ts +3 -3
- package/stories/molecules/tabs/Tabs.stories.tsx +18 -18
- package/stories/molecules/tabs/Tabs.tsx +22 -22
- package/stories/molecules/tabs/index.tsx +2 -2
- package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.stories.tsx +30 -30
- package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.tsx +66 -66
- package/stories/organisms/AnimatedLabelInput/index.tsx +3 -3
- package/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.stories.tsx +26 -26
- package/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.tsx +61 -61
- package/stories/organisms/AnimatedLabelTextArea/index.tsx +3 -3
- package/stories/organisms/ButtonDropdown/ButtonDropdown.stories.tsx +125 -125
- package/stories/organisms/ButtonDropdown/ButtonDropdown.tsx +86 -86
- package/stories/organisms/ButtonDropdown/index.tsx +3 -3
- package/stories/organisms/DropdownComponent/Dropdown.stories.tsx +73 -73
- package/stories/organisms/DropdownComponent/DropdownComponent.tsx +346 -346
- package/stories/organisms/DropdownComponent/dropdownItems.ts +122 -122
- package/stories/organisms/DropdownComponent/index.ts +4 -4
- package/stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder.stories.tsx +76 -76
- package/stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder.tsx +52 -52
- package/stories/organisms/EmptySectionPlaceholder/index.tsx +4 -4
- package/stories/organisms/FormInputWithAddons/FormInputWithAddons.stories.tsx +29 -29
- package/stories/organisms/FormInputWithAddons/FormInputWithAddons.tsx +145 -145
- package/stories/organisms/FormInputWithAddons/index.tsx +3 -3
- package/stories/organisms/TextInputSelect/InputSelect.tsx +59 -59
- package/stories/organisms/TextInputSelect/TextInputSelect.stories.tsx +33 -33
- package/stories/organisms/TextInputSelect/TextInputSelect.tsx +186 -186
- package/stories/organisms/TextInputSelect/index.tsx +3 -3
- package/stories/organisms/index.ts +27 -27
- package/tailwind.config.js +192 -192
- package/tsconfig.json +29 -29
- package/tsconfig.lib.json +25 -25
- package/utils/types.d.ts +2 -2
- package/utils/types.ts +3 -3
- package/utils/useId.d.ts +1 -1
- package/utils/useId.tsx +16 -16
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
import Checkbox from "./Checkbox"
|
|
3
|
-
const meta: Meta<typeof Checkbox> = {
|
|
4
|
-
title: "Design System/Molecules/Inputs/Checkbox",
|
|
5
|
-
component: Checkbox,
|
|
6
|
-
tags: []
|
|
7
|
-
}
|
|
8
|
-
type Story = StoryObj<typeof Checkbox>
|
|
9
|
-
export const DefaultCheckbox: Story = {
|
|
10
|
-
args: {
|
|
11
|
-
label: "Checkbox Label",
|
|
12
|
-
id: "checkboxId",
|
|
13
|
-
isDisabled: false,
|
|
14
|
-
isChecked: false,
|
|
15
|
-
isRequired: false,
|
|
16
|
-
isError: false,
|
|
17
|
-
message: "",
|
|
18
|
-
onChange: (value: string) => {
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export default meta
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import Checkbox from "./Checkbox"
|
|
3
|
+
const meta: Meta<typeof Checkbox> = {
|
|
4
|
+
title: "Design System/Molecules/Inputs/Checkbox",
|
|
5
|
+
component: Checkbox,
|
|
6
|
+
tags: []
|
|
7
|
+
}
|
|
8
|
+
type Story = StoryObj<typeof Checkbox>
|
|
9
|
+
export const DefaultCheckbox: Story = {
|
|
10
|
+
args: {
|
|
11
|
+
label: "Checkbox Label",
|
|
12
|
+
id: "checkboxId",
|
|
13
|
+
isDisabled: false,
|
|
14
|
+
isChecked: false,
|
|
15
|
+
isRequired: false,
|
|
16
|
+
isError: false,
|
|
17
|
+
message: "",
|
|
18
|
+
onChange: (value: string) => {
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export default meta
|
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
import React, { FC } from "react"
|
|
2
|
-
import { default as cn } from "classnames"
|
|
3
|
-
import InputLabel from "@/stories/molecules/inputs/InputLabel"
|
|
4
|
-
import { useId } from "@/utils/useId"
|
|
5
|
-
|
|
6
|
-
export interface ICheckboxProps {
|
|
7
|
-
/** Checkbox label */
|
|
8
|
-
label: string
|
|
9
|
-
/** Checkbox ID */
|
|
10
|
-
id?: string
|
|
11
|
-
/** Disabled state */
|
|
12
|
-
isDisabled?: boolean
|
|
13
|
-
/** value */
|
|
14
|
-
value?: string
|
|
15
|
-
/** Check state */
|
|
16
|
-
isChecked?: boolean
|
|
17
|
-
/** If field is required */
|
|
18
|
-
isRequired?: boolean
|
|
19
|
-
/** Error state */
|
|
20
|
-
isError?: boolean
|
|
21
|
-
/** Message or description */
|
|
22
|
-
message?: string
|
|
23
|
-
/** Callback on input change */
|
|
24
|
-
onChange?(value: string, isChecked: boolean): void
|
|
25
|
-
/** Has a border around the checkbox and label */
|
|
26
|
-
hasBorder?: boolean
|
|
27
|
-
/** any arbitrary classNames to add to the wrapper */
|
|
28
|
-
className?: string
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/** Comment */
|
|
32
|
-
const Checkbox: FC<ICheckboxProps> = ({
|
|
33
|
-
label,
|
|
34
|
-
id,
|
|
35
|
-
isDisabled,
|
|
36
|
-
isChecked,
|
|
37
|
-
isRequired,
|
|
38
|
-
isError,
|
|
39
|
-
message,
|
|
40
|
-
value,
|
|
41
|
-
onChange,
|
|
42
|
-
hasBorder,
|
|
43
|
-
className,
|
|
44
|
-
...props
|
|
45
|
-
}: ICheckboxProps) => {
|
|
46
|
-
const uniqueID = useId()
|
|
47
|
-
if (!id) id = `cb-${uniqueID}`
|
|
48
|
-
|
|
49
|
-
const checkboxStyles = cn(
|
|
50
|
-
"rounded-sm border-gray-300 text-sm font-normal leading-5 text-purple-600 focus:ring-purple-600",
|
|
51
|
-
{ "border-red-500 shadow-none": isError }
|
|
52
|
-
)
|
|
53
|
-
const wrapperStyles = cn(
|
|
54
|
-
"relative flex items-center min-h-[38px]",
|
|
55
|
-
{ "opacity-50": isDisabled },
|
|
56
|
-
{ "rounded-sm border border-1 px-3 border-gray-200": hasBorder },
|
|
57
|
-
{ "py-3": hasBorder && message },
|
|
58
|
-
className
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
62
|
-
const targetValue = e.target.value
|
|
63
|
-
const targetChecked = e.target.checked
|
|
64
|
-
typeof onChange === "function" && onChange(targetValue, targetChecked)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<div className={wrapperStyles}>
|
|
69
|
-
<div className="flex items-center">
|
|
70
|
-
<input
|
|
71
|
-
id={id}
|
|
72
|
-
aria-describedby={`${id}-description`}
|
|
73
|
-
name={id}
|
|
74
|
-
value={value}
|
|
75
|
-
type="checkbox"
|
|
76
|
-
className={checkboxStyles}
|
|
77
|
-
disabled={isDisabled}
|
|
78
|
-
checked={isChecked}
|
|
79
|
-
onChange={(e) => {
|
|
80
|
-
handleChange(e)
|
|
81
|
-
}}
|
|
82
|
-
{...props}
|
|
83
|
-
/>
|
|
84
|
-
</div>
|
|
85
|
-
<div className="ml-3 text-sm ">
|
|
86
|
-
<label htmlFor={id} className="font-medium text-gray-700">
|
|
87
|
-
<InputLabel label={label} isRequired={isRequired} id={id} />
|
|
88
|
-
</label>
|
|
89
|
-
{message && (
|
|
90
|
-
<p id={`${id}-description`} className="text-gray-500">
|
|
91
|
-
{message}
|
|
92
|
-
</p>
|
|
93
|
-
)}
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
export default Checkbox
|
|
1
|
+
import React, { FC } from "react"
|
|
2
|
+
import { default as cn } from "classnames"
|
|
3
|
+
import InputLabel from "@/stories/molecules/inputs/InputLabel"
|
|
4
|
+
import { useId } from "@/utils/useId"
|
|
5
|
+
|
|
6
|
+
export interface ICheckboxProps {
|
|
7
|
+
/** Checkbox label */
|
|
8
|
+
label: string
|
|
9
|
+
/** Checkbox ID */
|
|
10
|
+
id?: string
|
|
11
|
+
/** Disabled state */
|
|
12
|
+
isDisabled?: boolean
|
|
13
|
+
/** value */
|
|
14
|
+
value?: string
|
|
15
|
+
/** Check state */
|
|
16
|
+
isChecked?: boolean
|
|
17
|
+
/** If field is required */
|
|
18
|
+
isRequired?: boolean
|
|
19
|
+
/** Error state */
|
|
20
|
+
isError?: boolean
|
|
21
|
+
/** Message or description */
|
|
22
|
+
message?: string
|
|
23
|
+
/** Callback on input change */
|
|
24
|
+
onChange?(value: string, isChecked: boolean): void
|
|
25
|
+
/** Has a border around the checkbox and label */
|
|
26
|
+
hasBorder?: boolean
|
|
27
|
+
/** any arbitrary classNames to add to the wrapper */
|
|
28
|
+
className?: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Comment */
|
|
32
|
+
const Checkbox: FC<ICheckboxProps> = ({
|
|
33
|
+
label,
|
|
34
|
+
id,
|
|
35
|
+
isDisabled,
|
|
36
|
+
isChecked,
|
|
37
|
+
isRequired,
|
|
38
|
+
isError,
|
|
39
|
+
message,
|
|
40
|
+
value,
|
|
41
|
+
onChange,
|
|
42
|
+
hasBorder,
|
|
43
|
+
className,
|
|
44
|
+
...props
|
|
45
|
+
}: ICheckboxProps) => {
|
|
46
|
+
const uniqueID = useId()
|
|
47
|
+
if (!id) id = `cb-${uniqueID}`
|
|
48
|
+
|
|
49
|
+
const checkboxStyles = cn(
|
|
50
|
+
"rounded-sm border-gray-300 text-sm font-normal leading-5 text-purple-600 focus:ring-purple-600",
|
|
51
|
+
{ "border-red-500 shadow-none": isError }
|
|
52
|
+
)
|
|
53
|
+
const wrapperStyles = cn(
|
|
54
|
+
"relative flex items-center min-h-[38px]",
|
|
55
|
+
{ "opacity-50": isDisabled },
|
|
56
|
+
{ "rounded-sm border border-1 px-3 border-gray-200": hasBorder },
|
|
57
|
+
{ "py-3": hasBorder && message },
|
|
58
|
+
className
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
62
|
+
const targetValue = e.target.value
|
|
63
|
+
const targetChecked = e.target.checked
|
|
64
|
+
typeof onChange === "function" && onChange(targetValue, targetChecked)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<div className={wrapperStyles}>
|
|
69
|
+
<div className="flex items-center">
|
|
70
|
+
<input
|
|
71
|
+
id={id}
|
|
72
|
+
aria-describedby={`${id}-description`}
|
|
73
|
+
name={id}
|
|
74
|
+
value={value}
|
|
75
|
+
type="checkbox"
|
|
76
|
+
className={checkboxStyles}
|
|
77
|
+
disabled={isDisabled}
|
|
78
|
+
checked={isChecked}
|
|
79
|
+
onChange={(e) => {
|
|
80
|
+
handleChange(e)
|
|
81
|
+
}}
|
|
82
|
+
{...props}
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
<div className="ml-3 text-sm ">
|
|
86
|
+
<label htmlFor={id} className="font-medium text-gray-700">
|
|
87
|
+
<InputLabel label={label} isRequired={isRequired} id={id} />
|
|
88
|
+
</label>
|
|
89
|
+
{message && (
|
|
90
|
+
<p id={`${id}-description`} className="text-gray-500">
|
|
91
|
+
{message}
|
|
92
|
+
</p>
|
|
93
|
+
)}
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
export default Checkbox
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import Checkbox, { ICheckboxProps } from "./Checkbox"
|
|
2
|
-
export type { ICheckboxProps }
|
|
3
|
-
export default Checkbox
|
|
1
|
+
import Checkbox, { ICheckboxProps } from "./Checkbox"
|
|
2
|
+
export type { ICheckboxProps }
|
|
3
|
+
export default Checkbox
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
import Combobox from "./ComboBox"
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof Combobox> = {
|
|
5
|
-
title: "Design System/Molecules/Inputs/Combobox",
|
|
6
|
-
component: Combobox,
|
|
7
|
-
tags: ["autodocs"]
|
|
8
|
-
}
|
|
9
|
-
type Story = StoryObj<typeof Combobox>
|
|
10
|
-
interface ComboItem {
|
|
11
|
-
[value: string]: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const comboboxlist: ComboItem[] = [
|
|
15
|
-
{ value: "Leslie Alexander" },
|
|
16
|
-
{ value: "Alishba Molloy" },
|
|
17
|
-
{ value: "Raya Oconnell" },
|
|
18
|
-
{ value: "Danica Sweet" },
|
|
19
|
-
{ value: "Ralph Brook" },
|
|
20
|
-
{ value: "Tamar Tapia" },
|
|
21
|
-
{ value: "Cara Avila" },
|
|
22
|
-
{ value: "Jayson Cisneros" },
|
|
23
|
-
{ value: "Tracey Reader" },
|
|
24
|
-
{ value: "Rahima Fritz" },
|
|
25
|
-
{ value: "Vera Pritchard" }
|
|
26
|
-
]
|
|
27
|
-
export const DefaultComboBox: Story = {
|
|
28
|
-
args: {
|
|
29
|
-
label: "",
|
|
30
|
-
items: comboboxlist,
|
|
31
|
-
displayProperty: "value",
|
|
32
|
-
keyProperty: "value",
|
|
33
|
-
placeholder: "Select",
|
|
34
|
-
id: "combobox",
|
|
35
|
-
isRequired: false,
|
|
36
|
-
isError: false,
|
|
37
|
-
isDisabled: false,
|
|
38
|
-
nullable: false
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
export default meta
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import Combobox from "./ComboBox"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof Combobox> = {
|
|
5
|
+
title: "Design System/Molecules/Inputs/Combobox",
|
|
6
|
+
component: Combobox,
|
|
7
|
+
tags: ["autodocs"]
|
|
8
|
+
}
|
|
9
|
+
type Story = StoryObj<typeof Combobox>
|
|
10
|
+
interface ComboItem {
|
|
11
|
+
[value: string]: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const comboboxlist: ComboItem[] = [
|
|
15
|
+
{ value: "Leslie Alexander" },
|
|
16
|
+
{ value: "Alishba Molloy" },
|
|
17
|
+
{ value: "Raya Oconnell" },
|
|
18
|
+
{ value: "Danica Sweet" },
|
|
19
|
+
{ value: "Ralph Brook" },
|
|
20
|
+
{ value: "Tamar Tapia" },
|
|
21
|
+
{ value: "Cara Avila" },
|
|
22
|
+
{ value: "Jayson Cisneros" },
|
|
23
|
+
{ value: "Tracey Reader" },
|
|
24
|
+
{ value: "Rahima Fritz" },
|
|
25
|
+
{ value: "Vera Pritchard" }
|
|
26
|
+
]
|
|
27
|
+
export const DefaultComboBox: Story = {
|
|
28
|
+
args: {
|
|
29
|
+
label: "",
|
|
30
|
+
items: comboboxlist,
|
|
31
|
+
displayProperty: "value",
|
|
32
|
+
keyProperty: "value",
|
|
33
|
+
placeholder: "Select",
|
|
34
|
+
id: "combobox",
|
|
35
|
+
isRequired: false,
|
|
36
|
+
isError: false,
|
|
37
|
+
isDisabled: false,
|
|
38
|
+
nullable: false
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export default meta
|