@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,88 +1,88 @@
|
|
|
1
|
-
import { default as cn } from "classnames"
|
|
2
|
-
import { HTMLAttributeAnchorTarget } from "react"
|
|
3
|
-
import { BTNActionType, IButtonProps } from "../Button/Button"
|
|
4
|
-
import { UnifiedIconName } from "../../icons/DynamicIcon"
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Capsule Style Button
|
|
8
|
-
*/
|
|
9
|
-
export interface ICapsuleProps
|
|
10
|
-
extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
11
|
-
/** Is the button a Primary CTA, alternative or danger button? */
|
|
12
|
-
actionType: BTNActionType
|
|
13
|
-
/** How lg should the button be? - Defaults to 'base'. */
|
|
14
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl"
|
|
15
|
-
/** The Button's text content. */
|
|
16
|
-
label: string
|
|
17
|
-
/** Does the button width grow to fill it's container? */
|
|
18
|
-
fullWidth?: boolean
|
|
19
|
-
/** Optionally render as anchor tag */
|
|
20
|
-
asLink?: {
|
|
21
|
-
href: string
|
|
22
|
-
target: HTMLAttributeAnchorTarget
|
|
23
|
-
title?: string
|
|
24
|
-
}
|
|
25
|
-
/** Is the associated content loading? */
|
|
26
|
-
isLoading?: boolean
|
|
27
|
-
/**Optional Classname String*/
|
|
28
|
-
className?: string
|
|
29
|
-
}
|
|
30
|
-
const Capsule = ({
|
|
31
|
-
actionType = "primary",
|
|
32
|
-
size = "sm",
|
|
33
|
-
label,
|
|
34
|
-
fullWidth = false,
|
|
35
|
-
asLink,
|
|
36
|
-
isLoading = false,
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}: ICapsuleProps) => {
|
|
40
|
-
const iconStyles = cn(
|
|
41
|
-
{ "text-white": actionType === "primary" || actionType === "danger" },
|
|
42
|
-
{ "text-purple-700": actionType === "secondary" },
|
|
43
|
-
{ "text-gray-700": actionType === "alternative" }
|
|
44
|
-
)
|
|
45
|
-
const loaderColors = cn(
|
|
46
|
-
{ "border-r-white": actionType === "primary" },
|
|
47
|
-
{ "border-purple-200 border-r-purple-700": actionType === "secondary" },
|
|
48
|
-
{ "border-gray-200 border-r-gray-700": actionType === "alternative" },
|
|
49
|
-
{ "border-red-800 border-r-white": actionType === "danger" }
|
|
50
|
-
)
|
|
51
|
-
const loaderSize = cn({ "h-4 w-4": size === "sm" }, { "h-5 w-5": size === "md" }, { "h-6 w-6 ": size === "lg" })
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<button
|
|
55
|
-
type="button"
|
|
56
|
-
className={cn(
|
|
57
|
-
"inline-flex items-center justify-center gap-x-2 text-sm font-medium p-2 !ring-offset-white outline-none focus-visible:ring-2 focus-visible:ring-purple-600 focus-visible:ring-offset-2 focus-within:ring-2 focus-within:ring-purple-600 focus-within:ring-offset-2 focus:ring-2 focus:ring-purple-600 focus:ring-offset-2 active:ring-2 active:ring-purple-600 active:ring-offset-2 transition-all",
|
|
58
|
-
{ "w-full": fullWidth },
|
|
59
|
-
{ "px-[11px] py-[7px] text-xs rounded-[15px]": size === "xs" },
|
|
60
|
-
{ "px-[15px] py-[9px] text-sm rounded-[17px]": size === "sm" },
|
|
61
|
-
{ "px-[17px] py-[9px] text-sm rounded-[19px]": size === "md" },
|
|
62
|
-
{ "px-[17px] py-[9px] text-base rounded-[21px]": size === "lg" },
|
|
63
|
-
{ "px-[25px] py-[13px] text-base rounded-[25px]": size === "xl" },
|
|
64
|
-
{
|
|
65
|
-
"bg-purple-600 text-white hover:border-purple-700 hover:bg-purple-700 ": actionType === "primary"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
" bg-purple-50 text-purple-700 hover:bg-purple-200 focus-within:bg-purple-100 focus-visible:bg-purple-100 focus:bg-purple-100 active:bg-purple-100":
|
|
69
|
-
actionType === "secondary"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"border-gray-300 bg-white border text-gray-700 hover:bg-gray-50 focus-visible:!border-gray-300 focus-within:!border-gray-300 focus:!border-gray-300 active:!border-gray-300":
|
|
73
|
-
actionType === "alternative"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
" bg-red-600 text-white hover:bg-red-700 <focus-visible:!></focus-visible:!>ring-red-500 focus:!ring-red-500 active:!ring-red-500 focus-within:!ring-red-500 ":
|
|
77
|
-
actionType === "danger"
|
|
78
|
-
},
|
|
79
|
-
className ? className : ""
|
|
80
|
-
)}
|
|
81
|
-
{...props}
|
|
82
|
-
>
|
|
83
|
-
{label}
|
|
84
|
-
</button>
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export default Capsule
|
|
1
|
+
import { default as cn } from "classnames"
|
|
2
|
+
import { HTMLAttributeAnchorTarget } from "react"
|
|
3
|
+
import { BTNActionType, IButtonProps } from "../Button/Button"
|
|
4
|
+
import { UnifiedIconName } from "../../icons/DynamicIcon"
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Capsule Style Button
|
|
8
|
+
*/
|
|
9
|
+
export interface ICapsuleProps
|
|
10
|
+
extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
11
|
+
/** Is the button a Primary CTA, alternative or danger button? */
|
|
12
|
+
actionType: BTNActionType
|
|
13
|
+
/** How lg should the button be? - Defaults to 'base'. */
|
|
14
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl"
|
|
15
|
+
/** The Button's text content. */
|
|
16
|
+
label: string
|
|
17
|
+
/** Does the button width grow to fill it's container? */
|
|
18
|
+
fullWidth?: boolean
|
|
19
|
+
/** Optionally render as anchor tag */
|
|
20
|
+
asLink?: {
|
|
21
|
+
href: string
|
|
22
|
+
target: HTMLAttributeAnchorTarget
|
|
23
|
+
title?: string
|
|
24
|
+
}
|
|
25
|
+
/** Is the associated content loading? */
|
|
26
|
+
isLoading?: boolean
|
|
27
|
+
/**Optional Classname String*/
|
|
28
|
+
className?: string
|
|
29
|
+
}
|
|
30
|
+
const Capsule = ({
|
|
31
|
+
actionType = "primary",
|
|
32
|
+
size = "sm",
|
|
33
|
+
label,
|
|
34
|
+
fullWidth = false,
|
|
35
|
+
asLink,
|
|
36
|
+
isLoading = false,
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}: ICapsuleProps) => {
|
|
40
|
+
const iconStyles = cn(
|
|
41
|
+
{ "text-white": actionType === "primary" || actionType === "danger" },
|
|
42
|
+
{ "text-purple-700": actionType === "secondary" },
|
|
43
|
+
{ "text-gray-700": actionType === "alternative" }
|
|
44
|
+
)
|
|
45
|
+
const loaderColors = cn(
|
|
46
|
+
{ "border-r-white": actionType === "primary" },
|
|
47
|
+
{ "border-purple-200 border-r-purple-700": actionType === "secondary" },
|
|
48
|
+
{ "border-gray-200 border-r-gray-700": actionType === "alternative" },
|
|
49
|
+
{ "border-red-800 border-r-white": actionType === "danger" }
|
|
50
|
+
)
|
|
51
|
+
const loaderSize = cn({ "h-4 w-4": size === "sm" }, { "h-5 w-5": size === "md" }, { "h-6 w-6 ": size === "lg" })
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<button
|
|
55
|
+
type="button"
|
|
56
|
+
className={cn(
|
|
57
|
+
"inline-flex items-center justify-center gap-x-2 text-sm font-medium p-2 !ring-offset-white outline-none focus-visible:ring-2 focus-visible:ring-purple-600 focus-visible:ring-offset-2 focus-within:ring-2 focus-within:ring-purple-600 focus-within:ring-offset-2 focus:ring-2 focus:ring-purple-600 focus:ring-offset-2 active:ring-2 active:ring-purple-600 active:ring-offset-2 transition-all",
|
|
58
|
+
{ "w-full": fullWidth },
|
|
59
|
+
{ "px-[11px] py-[7px] text-xs rounded-[15px]": size === "xs" },
|
|
60
|
+
{ "px-[15px] py-[9px] text-sm rounded-[17px]": size === "sm" },
|
|
61
|
+
{ "px-[17px] py-[9px] text-sm rounded-[19px]": size === "md" },
|
|
62
|
+
{ "px-[17px] py-[9px] text-base rounded-[21px]": size === "lg" },
|
|
63
|
+
{ "px-[25px] py-[13px] text-base rounded-[25px]": size === "xl" },
|
|
64
|
+
{
|
|
65
|
+
"bg-purple-600 text-white hover:border-purple-700 hover:bg-purple-700 ": actionType === "primary"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
" bg-purple-50 text-purple-700 hover:bg-purple-200 focus-within:bg-purple-100 focus-visible:bg-purple-100 focus:bg-purple-100 active:bg-purple-100":
|
|
69
|
+
actionType === "secondary"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"border-gray-300 bg-white border text-gray-700 hover:bg-gray-50 focus-visible:!border-gray-300 focus-within:!border-gray-300 focus:!border-gray-300 active:!border-gray-300":
|
|
73
|
+
actionType === "alternative"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
" bg-red-600 text-white hover:bg-red-700 <focus-visible:!></focus-visible:!>ring-red-500 focus:!ring-red-500 active:!ring-red-500 focus-within:!ring-red-500 ":
|
|
77
|
+
actionType === "danger"
|
|
78
|
+
},
|
|
79
|
+
className ? className : ""
|
|
80
|
+
)}
|
|
81
|
+
{...props}
|
|
82
|
+
>
|
|
83
|
+
{label}
|
|
84
|
+
</button>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export default Capsule
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
import { defaultIcon } from "../../Button/defaultArgs"
|
|
3
|
-
import Capsule from "../Capsule"
|
|
4
|
-
// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
|
|
5
|
-
const meta: Meta<typeof Capsule> = {
|
|
6
|
-
title: "Design System/atoms/Buttons/Capsule/Danger",
|
|
7
|
-
component: Capsule,
|
|
8
|
-
tags: ["autodocs"],
|
|
9
|
-
parameters: {
|
|
10
|
-
design: {
|
|
11
|
-
type: "figma",
|
|
12
|
-
url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=243-12178&mode=design&t=9hpwa8YStpwXksff-4"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default meta
|
|
18
|
-
type Story = StoryObj<typeof Capsule>
|
|
19
|
-
export const Danger: Story = {
|
|
20
|
-
args: {
|
|
21
|
-
label: "Danger",
|
|
22
|
-
onClick: () => {
|
|
23
|
-
window.alert("Button clicked!")
|
|
24
|
-
},
|
|
25
|
-
actionType: "danger"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { defaultIcon } from "../../Button/defaultArgs"
|
|
3
|
+
import Capsule from "../Capsule"
|
|
4
|
+
// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
|
|
5
|
+
const meta: Meta<typeof Capsule> = {
|
|
6
|
+
title: "Design System/atoms/Buttons/Capsule/Danger",
|
|
7
|
+
component: Capsule,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
design: {
|
|
11
|
+
type: "figma",
|
|
12
|
+
url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=243-12178&mode=design&t=9hpwa8YStpwXksff-4"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default meta
|
|
18
|
+
type Story = StoryObj<typeof Capsule>
|
|
19
|
+
export const Danger: Story = {
|
|
20
|
+
args: {
|
|
21
|
+
label: "Danger",
|
|
22
|
+
onClick: () => {
|
|
23
|
+
window.alert("Button clicked!")
|
|
24
|
+
},
|
|
25
|
+
actionType: "danger"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
import { defaultIcon } from "../../Button/defaultArgs"
|
|
3
|
-
import Capsule from "../Capsule"
|
|
4
|
-
// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
|
|
5
|
-
const meta: Meta<typeof Capsule> = {
|
|
6
|
-
title: "Design System/atoms/Buttons/Capsule/Primary",
|
|
7
|
-
component: Capsule,
|
|
8
|
-
tags: ["autodocs"],
|
|
9
|
-
parameters: {
|
|
10
|
-
design: {
|
|
11
|
-
type: "figma",
|
|
12
|
-
url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=243-12178&mode=design&t=9hpwa8YStpwXksff-4"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default meta
|
|
18
|
-
type Story = StoryObj<typeof Capsule>
|
|
19
|
-
export const Primary: Story = {
|
|
20
|
-
args: {
|
|
21
|
-
label: "Primary",
|
|
22
|
-
onClick: () => {
|
|
23
|
-
window.alert("Button clicked!")
|
|
24
|
-
},
|
|
25
|
-
actionType: "primary"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { defaultIcon } from "../../Button/defaultArgs"
|
|
3
|
+
import Capsule from "../Capsule"
|
|
4
|
+
// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
|
|
5
|
+
const meta: Meta<typeof Capsule> = {
|
|
6
|
+
title: "Design System/atoms/Buttons/Capsule/Primary",
|
|
7
|
+
component: Capsule,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
design: {
|
|
11
|
+
type: "figma",
|
|
12
|
+
url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=243-12178&mode=design&t=9hpwa8YStpwXksff-4"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default meta
|
|
18
|
+
type Story = StoryObj<typeof Capsule>
|
|
19
|
+
export const Primary: Story = {
|
|
20
|
+
args: {
|
|
21
|
+
label: "Primary",
|
|
22
|
+
onClick: () => {
|
|
23
|
+
window.alert("Button clicked!")
|
|
24
|
+
},
|
|
25
|
+
actionType: "primary"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
import { defaultIcon } from "../../Button/defaultArgs"
|
|
3
|
-
import Capsule from "../Capsule"
|
|
4
|
-
|
|
5
|
-
const meta: Meta<typeof Capsule> = {
|
|
6
|
-
title: "Design System/atoms/Buttons/Capsule/Secondary",
|
|
7
|
-
component: Capsule,
|
|
8
|
-
tags: ["autodocs"],
|
|
9
|
-
parameters: {
|
|
10
|
-
design: {
|
|
11
|
-
type: "figma",
|
|
12
|
-
url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=243-12178&mode=design&t=9hpwa8YStpwXksff-4"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default meta
|
|
18
|
-
type Story = StoryObj<typeof Capsule>
|
|
19
|
-
export const Secondary: Story = {
|
|
20
|
-
args: {
|
|
21
|
-
label: "Secondary",
|
|
22
|
-
onClick: () => {
|
|
23
|
-
window.alert("Button clicked!")
|
|
24
|
-
},
|
|
25
|
-
actionType: "secondary"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { defaultIcon } from "../../Button/defaultArgs"
|
|
3
|
+
import Capsule from "../Capsule"
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Capsule> = {
|
|
6
|
+
title: "Design System/atoms/Buttons/Capsule/Secondary",
|
|
7
|
+
component: Capsule,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
design: {
|
|
11
|
+
type: "figma",
|
|
12
|
+
url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=243-12178&mode=design&t=9hpwa8YStpwXksff-4"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default meta
|
|
18
|
+
type Story = StoryObj<typeof Capsule>
|
|
19
|
+
export const Secondary: Story = {
|
|
20
|
+
args: {
|
|
21
|
+
label: "Secondary",
|
|
22
|
+
onClick: () => {
|
|
23
|
+
window.alert("Button clicked!")
|
|
24
|
+
},
|
|
25
|
+
actionType: "secondary"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import Capsule, { ICapsuleProps } from "./Capsule"
|
|
2
|
-
export default Capsule
|
|
3
|
-
export type { ICapsuleProps }
|
|
1
|
+
import Capsule, { ICapsuleProps } from "./Capsule"
|
|
2
|
+
export default Capsule
|
|
3
|
+
export type { ICapsuleProps }
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
import FloatingActionButton, { IFloatingActionButtonProps } from "./FloatingActionButton"
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof FloatingActionButton> = {
|
|
5
|
-
title: "Design System/atoms/buttons/FloatingActionButton/FloatingActionButton",
|
|
6
|
-
component: FloatingActionButton,
|
|
7
|
-
tags: ["autodocs"],
|
|
8
|
-
argTypes: {}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default meta
|
|
12
|
-
type Story = StoryObj<typeof FloatingActionButton>
|
|
13
|
-
export const DefaultFloatingActionButtonStory: Story = {
|
|
14
|
-
args: {}
|
|
15
|
-
}
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import FloatingActionButton, { IFloatingActionButtonProps } from "./FloatingActionButton"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof FloatingActionButton> = {
|
|
5
|
+
title: "Design System/atoms/buttons/FloatingActionButton/FloatingActionButton",
|
|
6
|
+
component: FloatingActionButton,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
argTypes: {}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default meta
|
|
12
|
+
type Story = StoryObj<typeof FloatingActionButton>
|
|
13
|
+
export const DefaultFloatingActionButtonStory: Story = {
|
|
14
|
+
args: {}
|
|
15
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import React from "react"
|
|
3
|
-
import EmptySectionPlaceholder from "@/stories/organisms/EmptySectionPlaceholder"
|
|
4
|
-
|
|
5
|
-
export interface IFloatingActionButtonProps {}
|
|
6
|
-
|
|
7
|
-
const FloatingActionButton: React.FC<IFloatingActionButtonProps> = ({}) => {
|
|
8
|
-
return (
|
|
9
|
-
<EmptySectionPlaceholder
|
|
10
|
-
{...{
|
|
11
|
-
icon: {
|
|
12
|
-
icon: "IconCode"
|
|
13
|
-
},
|
|
14
|
-
mutedText: "Coming Soon! 🚧",
|
|
15
|
-
primaryMessage: "We're working on this component. Be sure to check back soon!",
|
|
16
|
-
actions: []
|
|
17
|
-
}}
|
|
18
|
-
/>
|
|
19
|
-
)
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default FloatingActionButton;
|
|
1
|
+
|
|
2
|
+
import React from "react"
|
|
3
|
+
import EmptySectionPlaceholder from "@/stories/organisms/EmptySectionPlaceholder"
|
|
4
|
+
|
|
5
|
+
export interface IFloatingActionButtonProps {}
|
|
6
|
+
|
|
7
|
+
const FloatingActionButton: React.FC<IFloatingActionButtonProps> = ({}) => {
|
|
8
|
+
return (
|
|
9
|
+
<EmptySectionPlaceholder
|
|
10
|
+
{...{
|
|
11
|
+
icon: {
|
|
12
|
+
icon: "IconCode"
|
|
13
|
+
},
|
|
14
|
+
mutedText: "Coming Soon! 🚧",
|
|
15
|
+
primaryMessage: "We're working on this component. Be sure to check back soon!",
|
|
16
|
+
actions: []
|
|
17
|
+
}}
|
|
18
|
+
/>
|
|
19
|
+
)
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default FloatingActionButton;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import FloatingActionButton, { IFloatingActionButtonProps } from "./FloatingActionButton"
|
|
2
|
-
export default FloatingActionButton
|
|
3
|
-
export type { FloatingActionButton }
|
|
1
|
+
import FloatingActionButton, { IFloatingActionButtonProps } from "./FloatingActionButton"
|
|
2
|
+
export default FloatingActionButton
|
|
3
|
+
export type { FloatingActionButton }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Button, { BTNActionType, IButtonProps } from "./Button"
|
|
2
|
-
import Capsule, { ICapsuleProps } from "./Capsule"
|
|
3
|
-
export type { IButtonProps, BTNActionType, ICapsuleProps }
|
|
4
|
-
export { Button, Capsule }
|
|
1
|
+
import Button, { BTNActionType, IButtonProps } from "./Button"
|
|
2
|
+
import Capsule, { ICapsuleProps } from "./Capsule"
|
|
3
|
+
export type { IButtonProps, BTNActionType, ICapsuleProps }
|
|
4
|
+
export { Button, Capsule }
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
-
import Crumb, { ICrumbProps } from "./Crumb"
|
|
4
|
-
|
|
5
|
-
const meta: Meta<typeof Crumb> = {
|
|
6
|
-
title: "Design System/atoms/Crumb",
|
|
7
|
-
component: Crumb,
|
|
8
|
-
tags: ["autodocs"],
|
|
9
|
-
argTypes: {}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export default meta
|
|
13
|
-
type Story = StoryObj<typeof Crumb>
|
|
14
|
-
export const DefaultCrumbStory: Story = {
|
|
15
|
-
args: {
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
import Crumb, { ICrumbProps } from "./Crumb"
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Crumb> = {
|
|
6
|
+
title: "Design System/atoms/Crumb",
|
|
7
|
+
component: Crumb,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default meta
|
|
13
|
+
type Story = StoryObj<typeof Crumb>
|
|
14
|
+
export const DefaultCrumbStory: Story = {
|
|
15
|
+
args: {
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import React from "react"
|
|
3
|
-
import EmptySectionPlaceholder from "@/stories/organisms/EmptySectionPlaceholder"
|
|
4
|
-
|
|
5
|
-
export interface ICrumbProps {}
|
|
6
|
-
|
|
7
|
-
const Crumb: React.FC<ICrumbProps> = ({}) => {
|
|
8
|
-
return (
|
|
9
|
-
<EmptySectionPlaceholder
|
|
10
|
-
{...{
|
|
11
|
-
icon: {
|
|
12
|
-
icon: "IconCode"
|
|
13
|
-
},
|
|
14
|
-
mutedText: "Coming Soon! 🚧",
|
|
15
|
-
primaryMessage: "We're working on this component. Be sure to check back soon!",
|
|
16
|
-
actions: []
|
|
17
|
-
}}
|
|
18
|
-
/>
|
|
19
|
-
)
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default Crumb;
|
|
1
|
+
|
|
2
|
+
import React from "react"
|
|
3
|
+
import EmptySectionPlaceholder from "@/stories/organisms/EmptySectionPlaceholder"
|
|
4
|
+
|
|
5
|
+
export interface ICrumbProps {}
|
|
6
|
+
|
|
7
|
+
const Crumb: React.FC<ICrumbProps> = ({}) => {
|
|
8
|
+
return (
|
|
9
|
+
<EmptySectionPlaceholder
|
|
10
|
+
{...{
|
|
11
|
+
icon: {
|
|
12
|
+
icon: "IconCode"
|
|
13
|
+
},
|
|
14
|
+
mutedText: "Coming Soon! 🚧",
|
|
15
|
+
primaryMessage: "We're working on this component. Be sure to check back soon!",
|
|
16
|
+
actions: []
|
|
17
|
+
}}
|
|
18
|
+
/>
|
|
19
|
+
)
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default Crumb;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export { default } from './Crumb';
|
|
3
|
-
export * from './Crumb';
|
|
1
|
+
|
|
2
|
+
export { default } from './Crumb';
|
|
3
|
+
export * from './Crumb';
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
import { DynamicIcon } from "./DynamicIcon"
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof DynamicIcon> = {
|
|
5
|
-
title: "Design System/atoms/Icons/DynamicIcon",
|
|
6
|
-
component: DynamicIcon,
|
|
7
|
-
tags: ["autodocs"]
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
type Story = StoryObj<typeof DynamicIcon>
|
|
11
|
-
|
|
12
|
-
export const HeroIconSolid: Story = {
|
|
13
|
-
args: {
|
|
14
|
-
icon: "TrashIcon",
|
|
15
|
-
outline: false
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export const HeroIconOutline: Story = {
|
|
19
|
-
args: {
|
|
20
|
-
icon: "TrashIcon",
|
|
21
|
-
outline: true
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
export const TablerIconSolid: Story = {
|
|
25
|
-
args: {
|
|
26
|
-
icon: "IconTrashFilled",
|
|
27
|
-
outline: false
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
export const TablerIconOutline: Story = {
|
|
31
|
-
args: {
|
|
32
|
-
icon: "IconTrash",
|
|
33
|
-
outline: true
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
export const FAIcon: Story = {
|
|
37
|
-
args: {
|
|
38
|
-
icon: "FaGithub",
|
|
39
|
-
outline: true
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export default meta
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
+
import { DynamicIcon } from "./DynamicIcon"
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof DynamicIcon> = {
|
|
5
|
+
title: "Design System/atoms/Icons/DynamicIcon",
|
|
6
|
+
component: DynamicIcon,
|
|
7
|
+
tags: ["autodocs"]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type Story = StoryObj<typeof DynamicIcon>
|
|
11
|
+
|
|
12
|
+
export const HeroIconSolid: Story = {
|
|
13
|
+
args: {
|
|
14
|
+
icon: "TrashIcon",
|
|
15
|
+
outline: false
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export const HeroIconOutline: Story = {
|
|
19
|
+
args: {
|
|
20
|
+
icon: "TrashIcon",
|
|
21
|
+
outline: true
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export const TablerIconSolid: Story = {
|
|
25
|
+
args: {
|
|
26
|
+
icon: "IconTrashFilled",
|
|
27
|
+
outline: false
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export const TablerIconOutline: Story = {
|
|
31
|
+
args: {
|
|
32
|
+
icon: "IconTrash",
|
|
33
|
+
outline: true
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export const FAIcon: Story = {
|
|
37
|
+
args: {
|
|
38
|
+
icon: "FaGithub",
|
|
39
|
+
outline: true
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default meta
|