@syscore/ui-library 1.25.0 → 2.0.0-beta-publish-workflow-beta.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/client/App.tsx +0 -2
- package/client/assets/alert/icon-clear.svg +4 -0
- package/client/assets/alert/icon-done.svg +3 -0
- package/client/assets/avatar-identity/photo.png +0 -0
- package/client/assets/avatar-identity/placeholder-icon.svg +8 -0
- package/client/assets/breadcrumb/icon-ellipsis.svg +5 -0
- package/client/assets/breadcrumb/icon-home.svg +3 -0
- package/client/assets/breadcrumb/icon-separator.svg +3 -0
- package/client/assets/button-v01/icon-back.svg +4 -0
- package/client/assets/button-v01/icon-check.svg +3 -0
- package/client/assets/button-v01/icon-close.svg +4 -0
- package/client/assets/button-v01/icon-delete.svg +3 -0
- package/client/assets/button-v01/icon-device.svg +3 -0
- package/client/assets/dropdown/icon-carrot-contract.svg +3 -0
- package/client/assets/dropdown/icon-carrot-expand.svg +3 -0
- package/client/assets/dropdown/icon-clear.svg +4 -0
- package/client/assets/dropdown/icon-enter.svg +3 -0
- package/client/components/icons/UtilityChangeType.tsx +21 -0
- package/client/components/ui/alert-dialog-panel.tsx +246 -0
- package/client/components/ui/alert-v02.tsx +214 -0
- package/client/components/ui/app-bar.tsx +299 -0
- package/client/components/ui/avatar-identity.tsx +122 -0
- package/client/components/ui/banner.tsx +108 -0
- package/client/components/ui/bottom-navigation.tsx +223 -0
- package/client/components/ui/breadcrumb-trail.tsx +170 -0
- package/client/components/ui/button-v01.tsx +238 -0
- package/client/components/ui/button.tsx +2 -0
- package/client/components/ui/card.tsx +108 -26
- package/client/components/ui/code-badge.tsx +62 -0
- package/client/components/ui/date-picker.tsx +188 -0
- package/client/components/ui/dropdown.tsx +448 -0
- package/client/components/ui/empty-state.tsx +197 -0
- package/client/components/ui/file-upload.tsx +214 -0
- package/client/components/ui/footer.tsx +179 -0
- package/client/components/ui/layout.tsx +1182 -0
- package/client/components/ui/pagination-v01.tsx +157 -0
- package/client/components/ui/password-field-v01.tsx +67 -0
- package/client/components/ui/search-field-v01.tsx +192 -0
- package/client/components/ui/section-heading.tsx +49 -0
- package/client/components/ui/sidebar.tsx +13 -8
- package/client/components/ui/stepper.tsx +148 -0
- package/client/components/ui/switch-v01.tsx +71 -0
- package/client/components/ui/system-bar.tsx +119 -0
- package/client/components/ui/table-v01.tsx +230 -0
- package/client/components/ui/tabs-v01.tsx +99 -0
- package/client/components/ui/tag-v02.tsx +113 -0
- package/client/components/ui/text-area-v01.tsx +33 -0
- package/client/components/ui/text-field-v01.tsx +108 -0
- package/client/components/ui/timeline.tsx +181 -0
- package/client/components/ui/toast-v01.tsx +206 -0
- package/client/components/ui/tooltip.tsx +264 -71
- package/client/global.css +9565 -4378
- package/client/storybook.css +125 -0
- package/client/ui/Accordion.stories.tsx +1 -1
- package/client/ui/AlertDialogPanel/AlertDialogPanel.stories.tsx +150 -0
- package/client/ui/AlertV02/AlertV02.stories.tsx +188 -0
- package/client/ui/AppBar/app-bar.stories.tsx +280 -0
- package/client/ui/AspectRatio.stories.tsx +1 -1
- package/client/ui/AvatarIdentity/AvatarIdentity.stories.tsx +77 -0
- package/client/ui/Banner/banner.stories.tsx +238 -0
- package/client/ui/BottomNavigation/bottom-navigation.stories.tsx +285 -0
- package/client/ui/BreadcrumbTrail/BreadcrumbTrail.stories.tsx +232 -0
- package/client/ui/Button.stories.tsx +1 -1
- package/client/ui/ButtonV01/ButtonV01.stories.tsx +417 -0
- package/client/ui/Calendar/Calendar.stories.tsx +1 -1
- package/client/ui/Card.stories.tsx +285 -168
- package/client/ui/Carousel/Carousel.stories.tsx +1 -1
- package/client/ui/Chart/Chart.stories.tsx +1 -1
- package/client/ui/Checkbox.stories.tsx +1 -1
- package/client/ui/Collapsible/Collapsible.stories.tsx +1 -1
- package/client/ui/Colors.stories.tsx +1 -1
- package/client/ui/Command/Command.stories.tsx +1 -1
- package/client/ui/ContextMenu/ContextMenu.stories.tsx +1 -1
- package/client/ui/DatePicker/DatePicker.stories.tsx +293 -0
- package/client/ui/Dialog.stories.tsx +1 -1
- package/client/ui/Drawer/Drawer.stories.tsx +1 -1
- package/client/ui/Dropdown/Dropdown.stories.tsx +205 -0
- package/client/ui/EmptyState/empty-state.stories.tsx +251 -0
- package/client/ui/FileUpload/FileUpload.stories.tsx +218 -0
- package/client/ui/Footer/footer.stories.tsx +194 -0
- package/client/ui/Form/Form.stories.tsx +1 -1
- package/client/ui/Hero.stories.tsx +1 -1
- package/client/ui/HoverCard/HoverCard.stories.tsx +1 -1
- package/client/ui/Icons.stories.tsx +1 -1
- package/client/ui/Input.stories.tsx +1 -1
- package/client/ui/InputOTP/InputOTP.stories.tsx +1 -1
- package/client/ui/Label.stories.tsx +1 -1
- package/client/ui/Layout/Center.stories.tsx +100 -0
- package/client/ui/Layout/Columns.stories.tsx +136 -0
- package/client/ui/Layout/Container.stories.tsx +104 -0
- package/client/ui/Layout/FormLayout.stories.tsx +144 -0
- package/client/ui/Layout/Grid.stories.tsx +158 -0
- package/client/ui/Layout/GridSpan.stories.tsx +75 -0
- package/client/ui/Layout/HStack.stories.tsx +128 -0
- package/client/ui/Layout/Layout.stories.tsx +287 -0
- package/client/ui/Layout/LayoutContent.stories.tsx +91 -0
- package/client/ui/Layout/LayoutFooter.stories.tsx +77 -0
- package/client/ui/Layout/LayoutHeader.stories.tsx +104 -0
- package/client/ui/Layout/LayoutPanel.stories.tsx +143 -0
- package/client/ui/Layout/Positioned.stories.tsx +113 -0
- package/client/ui/Layout/Section.stories.tsx +84 -0
- package/client/ui/Layout/ShowHide.stories.tsx +99 -0
- package/client/ui/Layout/Spacer.stories.tsx +149 -0
- package/client/ui/Layout/Stack.stories.tsx +69 -0
- package/client/ui/Layout/StackItem.stories.tsx +124 -0
- package/client/ui/Layout/VStack.stories.tsx +101 -0
- package/client/ui/Layout/controls.ts +33 -0
- package/client/ui/Layout/demo.tsx +37 -0
- package/client/ui/Menubar/Menubar.stories.tsx +1 -1
- package/client/ui/MobileNav.stories.tsx +1 -1
- package/client/ui/Navigation.stories.tsx +1 -1
- package/client/ui/NavigationMenu/NavigationMenu.stories.tsx +1 -1
- package/client/ui/PageHeader.stories.tsx +13 -13
- package/client/ui/Pagination/Pagination.stories.tsx +178 -98
- package/client/ui/Pagination/PaginationLegacy.stories.tsx +121 -0
- package/client/ui/Panel.stories.tsx +1 -1
- package/client/ui/Popover/Popover.stories.tsx +1 -1
- package/client/ui/Progress/Progress.stories.tsx +1 -1
- package/client/ui/RadioGroup/RadioGroup.stories.tsx +1 -1
- package/client/ui/Resizable/Resizable.stories.tsx +1 -1
- package/client/ui/ScrollArea/ScrollArea.stories.tsx +1 -1
- package/client/ui/SearchField/SearchField.stories.tsx +153 -0
- package/client/ui/{SearchField.stories.tsx → SearchField/SearchFieldLegacy.stories.tsx} +2 -2
- package/client/ui/SectionBadge.stories.tsx +1 -1
- package/client/ui/Select.stories.tsx +1 -1
- package/client/ui/Separator/Separator.stories.tsx +1 -1
- package/client/ui/Sheet/Sheet.stories.tsx +1 -1
- package/client/ui/Sidebar/Sidebar.stories.tsx +57 -8
- package/client/ui/Skeleton/Skeleton.stories.tsx +1 -1
- package/client/ui/Slider/Slider.stories.tsx +1 -1
- package/client/ui/StandardNavigation.stories.tsx +1 -1
- package/client/ui/Stepper/Stepper.stories.tsx +344 -0
- package/client/ui/Switch.stories.tsx +1 -1
- package/client/ui/SwitchV01/SwitchV01.stories.tsx +152 -0
- package/client/ui/SystemBar/system-bar.stories.tsx +179 -0
- package/client/ui/Table/TableV01.stories.tsx +256 -0
- package/client/ui/Tabs.stories.tsx +1 -1
- package/client/ui/TabsV01/TabsV01.stories.tsx +144 -0
- package/client/ui/Tag.stories.tsx +1 -1
- package/client/ui/TagV02/TagStatusV02.stories.tsx +132 -0
- package/client/ui/TagV02/TagV02.stories.tsx +142 -0
- package/client/ui/TextAreaV01/TextAreaV01.stories.tsx +146 -0
- package/client/ui/TextFieldV01/PasswordFieldV01.stories.tsx +161 -0
- package/client/ui/TextFieldV01/TextFieldV01.stories.tsx +160 -0
- package/client/ui/Textarea.stories.tsx +1 -1
- package/client/ui/Timeline/timeline.stories.tsx +404 -0
- package/client/ui/Toast/Toast.stories.tsx +1 -1
- package/client/ui/ToastV01/ToastV01.stories.tsx +201 -0
- package/client/ui/Toaster/Toaster.stories.tsx +1 -1
- package/client/ui/Toggle.stories.tsx +1 -1
- package/client/ui/Tooltip.stories.tsx +287 -114
- package/client/ui/Typography.stories.tsx +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +649 -13
- package/dist/index.es.js +6109 -2360
- package/package.json +1 -1
- package/client/components/ui/badge.tsx +0 -33
- package/client/components/ui/sonner.tsx +0 -26
- package/client/components/ui/toggle-group.tsx +0 -76
- package/client/ui/Alert/Alert.stories.tsx +0 -82
- package/client/ui/AlertDialog/AlertDialog.stories.tsx +0 -106
- package/client/ui/Avatar/Avatar.stories.tsx +0 -94
- package/client/ui/Badge/Badge.stories.tsx +0 -60
- package/client/ui/Breadcrumb/Breadcrumb.stories.tsx +0 -97
- package/client/ui/DropdownMenu/DropdownMenu.stories.tsx +0 -139
- package/client/ui/Sonner/Sonner.stories.tsx +0 -48
- package/client/ui/Table/Table.stories.tsx +0 -135
- package/client/ui/ToggleGroup/ToggleGroup.stories.tsx +0 -88
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import {
|
|
4
|
+
ButtonV01,
|
|
5
|
+
type ButtonV01Appearance,
|
|
6
|
+
type ButtonV01Context,
|
|
7
|
+
type ButtonV01Hierarchy,
|
|
8
|
+
type ButtonV01Icon,
|
|
9
|
+
type ButtonV01Size,
|
|
10
|
+
type ButtonV01Theme,
|
|
11
|
+
type ButtonV01Type,
|
|
12
|
+
} from "../../components/ui/button-v01";
|
|
13
|
+
|
|
14
|
+
const sizes: ButtonV01Size[] = ["large", "medium", "small"];
|
|
15
|
+
const types: ButtonV01Type[] = ["cta", "utility", "icon"];
|
|
16
|
+
const hierarchies: ButtonV01Hierarchy[] = ["primary", "secondary", "tertiary"];
|
|
17
|
+
const appearances: ButtonV01Appearance[] = ["solid", "gradient", "stroke"];
|
|
18
|
+
const themes: ButtonV01Theme[] = ["default", "light", "transparent", "color"];
|
|
19
|
+
const contexts: ButtonV01Context[] = [
|
|
20
|
+
"default",
|
|
21
|
+
"general",
|
|
22
|
+
"tooltip",
|
|
23
|
+
"confirm",
|
|
24
|
+
"error",
|
|
25
|
+
"cancel",
|
|
26
|
+
"redirect",
|
|
27
|
+
"done",
|
|
28
|
+
"floating",
|
|
29
|
+
"back",
|
|
30
|
+
];
|
|
31
|
+
const icons: ButtonV01Icon[] = ["none", "check", "close", "delete", "back"];
|
|
32
|
+
|
|
33
|
+
const meta = {
|
|
34
|
+
title: "Components/Button",
|
|
35
|
+
component: ButtonV01,
|
|
36
|
+
tags: ["autodocs"],
|
|
37
|
+
parameters: {
|
|
38
|
+
layout: "centered",
|
|
39
|
+
docs: {
|
|
40
|
+
description: {
|
|
41
|
+
component: [
|
|
42
|
+
"Pill button. Existing `Components/ButtonLegacy` (`Button`) is unchanged.",
|
|
43
|
+
"",
|
|
44
|
+
"Axes: **size**, **type**, **hierarchy**, **appearance**,",
|
|
45
|
+
"**theme**, **context**, and **icon** (icon-only buttons).",
|
|
46
|
+
"",
|
|
47
|
+
"---",
|
|
48
|
+
"",
|
|
49
|
+
"## Import",
|
|
50
|
+
"",
|
|
51
|
+
"```tsx",
|
|
52
|
+
`import { ButtonV01 } from "@syscore/ui-library"`,
|
|
53
|
+
"```",
|
|
54
|
+
"",
|
|
55
|
+
"## How to use",
|
|
56
|
+
"",
|
|
57
|
+
"Default is the large primary CTA (gradient). Change `typeVariant`, `hierarchy`,",
|
|
58
|
+
"`appearance`, and `context` to match the variant you need.",
|
|
59
|
+
"",
|
|
60
|
+
"```tsx",
|
|
61
|
+
"<ButtonV01 onClick={handleContinue}>",
|
|
62
|
+
" Call to action",
|
|
63
|
+
"</ButtonV01>",
|
|
64
|
+
"",
|
|
65
|
+
"<ButtonV01",
|
|
66
|
+
` typeVariant="utility"`,
|
|
67
|
+
` appearance="solid"`,
|
|
68
|
+
` context="confirm"`,
|
|
69
|
+
" onClick={handleSave}",
|
|
70
|
+
">",
|
|
71
|
+
" Confirm",
|
|
72
|
+
"</ButtonV01>",
|
|
73
|
+
"",
|
|
74
|
+
"<ButtonV01",
|
|
75
|
+
` typeVariant="icon"`,
|
|
76
|
+
` icon="close"`,
|
|
77
|
+
` theme="light"`,
|
|
78
|
+
` aria-label="Close"`,
|
|
79
|
+
" onClick={handleClose}",
|
|
80
|
+
"/>",
|
|
81
|
+
"```",
|
|
82
|
+
"",
|
|
83
|
+
"| Situation | Use |",
|
|
84
|
+
"|-----------|-----|",
|
|
85
|
+
"| Primary marketing / page CTA | default (`typeVariant=\"cta\"`, `appearance=\"gradient\"`) |",
|
|
86
|
+
"| Outline CTA | `hierarchy=\"secondary\"` or `\"tertiary\"`, `appearance=\"stroke\"` |",
|
|
87
|
+
"| Form / dialog utility | `typeVariant=\"utility\"`, `appearance=\"solid\"` |",
|
|
88
|
+
"| Confirm / error / tooltip color | `context=\"confirm\"` \\| `\"error\"` \\| `\"tooltip\"` |",
|
|
89
|
+
"| Floating action with device icon | `context=\"floating\"` |",
|
|
90
|
+
"| Icon-only 32px control | `typeVariant=\"icon\"` and `icon` |",
|
|
91
|
+
"",
|
|
92
|
+
"Existing `Components/ButtonLegacy` (`Button`) is the previous API — keep using it where it",
|
|
93
|
+
"is already wired. New work should import `ButtonV01`.",
|
|
94
|
+
"",
|
|
95
|
+
"## Props",
|
|
96
|
+
"",
|
|
97
|
+
"| Prop | Values | Default | Effect |",
|
|
98
|
+
"|------|--------|---------|--------|",
|
|
99
|
+
"| `size` | `\"large\"` \\| `\"medium\"` \\| `\"small\"` | `\"large\"` | Height and padding |",
|
|
100
|
+
"| `typeVariant` | `\"cta\"` \\| `\"utility\"` \\| `\"icon\"` | `\"cta\"` | CTA, utility, or icon |",
|
|
101
|
+
"| `hierarchy` | `\"primary\"` \\| `\"secondary\"` \\| `\"tertiary\"` | `\"primary\"` | Weight in the set |",
|
|
102
|
+
"| `appearance` | `\"solid\"` \\| `\"gradient\"` \\| `\"stroke\"` | `\"gradient\"` | Surface treatment |",
|
|
103
|
+
"| `theme` | `\"default\"` \\| `\"light\"` \\| `\"transparent\"` \\| `\"color\"` | `\"default\"` | Icon-button surfaces |",
|
|
104
|
+
"| `context` | `\"default\"` \\| `\"confirm\"` \\| `\"error\"` \\| `\"floating\"` … | `\"default\"` | Semantic / floating looks |",
|
|
105
|
+
"| `icon` | `\"none\"` \\| `\"close\"` \\| `\"check\"` \\| `\"delete\"` \\| `\"back\"` | `\"none\"` | Icon-only glyph |",
|
|
106
|
+
].join("\n"),
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
argTypes: {
|
|
111
|
+
size: { control: "select", options: [...sizes] },
|
|
112
|
+
typeVariant: { control: "select", options: [...types] },
|
|
113
|
+
hierarchy: { control: "select", options: [...hierarchies] },
|
|
114
|
+
appearance: { control: "select", options: [...appearances] },
|
|
115
|
+
theme: { control: "select", options: [...themes] },
|
|
116
|
+
context: { control: "select", options: [...contexts] },
|
|
117
|
+
icon: { control: "select", options: [...icons] },
|
|
118
|
+
disabled: { control: "boolean" },
|
|
119
|
+
children: { control: "text" },
|
|
120
|
+
},
|
|
121
|
+
args: {
|
|
122
|
+
size: "large",
|
|
123
|
+
typeVariant: "cta",
|
|
124
|
+
hierarchy: "primary",
|
|
125
|
+
appearance: "gradient",
|
|
126
|
+
theme: "default",
|
|
127
|
+
context: "default",
|
|
128
|
+
icon: "none",
|
|
129
|
+
disabled: false,
|
|
130
|
+
},
|
|
131
|
+
} satisfies Meta<typeof ButtonV01>;
|
|
132
|
+
|
|
133
|
+
export default meta;
|
|
134
|
+
type Story = StoryObj<typeof meta>;
|
|
135
|
+
|
|
136
|
+
export const Playground: Story = {};
|
|
137
|
+
|
|
138
|
+
const catalog = [
|
|
139
|
+
{
|
|
140
|
+
label: "CTA · Primary · Gradient",
|
|
141
|
+
props: {
|
|
142
|
+
typeVariant: "cta" as const,
|
|
143
|
+
hierarchy: "primary" as const,
|
|
144
|
+
appearance: "gradient" as const,
|
|
145
|
+
theme: "default" as const,
|
|
146
|
+
context: "default" as const,
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
label: "CTA · Secondary · Stroke",
|
|
151
|
+
props: {
|
|
152
|
+
typeVariant: "cta" as const,
|
|
153
|
+
hierarchy: "secondary" as const,
|
|
154
|
+
appearance: "stroke" as const,
|
|
155
|
+
theme: "light" as const,
|
|
156
|
+
context: "default" as const,
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
label: "CTA · Tertiary · Stroke",
|
|
161
|
+
props: {
|
|
162
|
+
typeVariant: "cta" as const,
|
|
163
|
+
hierarchy: "tertiary" as const,
|
|
164
|
+
appearance: "stroke" as const,
|
|
165
|
+
theme: "light" as const,
|
|
166
|
+
context: "default" as const,
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
label: "Utility · Primary",
|
|
171
|
+
props: {
|
|
172
|
+
typeVariant: "utility" as const,
|
|
173
|
+
hierarchy: "primary" as const,
|
|
174
|
+
appearance: "solid" as const,
|
|
175
|
+
theme: "default" as const,
|
|
176
|
+
context: "default" as const,
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
label: "Utility · Secondary",
|
|
181
|
+
props: {
|
|
182
|
+
typeVariant: "utility" as const,
|
|
183
|
+
hierarchy: "secondary" as const,
|
|
184
|
+
appearance: "solid" as const,
|
|
185
|
+
theme: "default" as const,
|
|
186
|
+
context: "default" as const,
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
label: "Utility · Tertiary",
|
|
191
|
+
props: {
|
|
192
|
+
typeVariant: "utility" as const,
|
|
193
|
+
hierarchy: "tertiary" as const,
|
|
194
|
+
appearance: "stroke" as const,
|
|
195
|
+
theme: "light" as const,
|
|
196
|
+
context: "default" as const,
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
label: "Confirm",
|
|
201
|
+
props: {
|
|
202
|
+
typeVariant: "utility" as const,
|
|
203
|
+
hierarchy: "primary" as const,
|
|
204
|
+
appearance: "solid" as const,
|
|
205
|
+
theme: "light" as const,
|
|
206
|
+
context: "confirm" as const,
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
label: "Redirect",
|
|
211
|
+
props: {
|
|
212
|
+
typeVariant: "cta" as const,
|
|
213
|
+
hierarchy: "primary" as const,
|
|
214
|
+
appearance: "solid" as const,
|
|
215
|
+
theme: "light" as const,
|
|
216
|
+
context: "redirect" as const,
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
label: "Error",
|
|
221
|
+
props: {
|
|
222
|
+
typeVariant: "utility" as const,
|
|
223
|
+
hierarchy: "primary" as const,
|
|
224
|
+
appearance: "solid" as const,
|
|
225
|
+
theme: "light" as const,
|
|
226
|
+
context: "error" as const,
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
label: "Tooltip",
|
|
231
|
+
props: {
|
|
232
|
+
typeVariant: "utility" as const,
|
|
233
|
+
hierarchy: "primary" as const,
|
|
234
|
+
appearance: "solid" as const,
|
|
235
|
+
theme: "light" as const,
|
|
236
|
+
context: "tooltip" as const,
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
label: "Floating",
|
|
241
|
+
props: {
|
|
242
|
+
typeVariant: "cta" as const,
|
|
243
|
+
hierarchy: "primary" as const,
|
|
244
|
+
appearance: "gradient" as const,
|
|
245
|
+
theme: "default" as const,
|
|
246
|
+
context: "floating" as const,
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
];
|
|
250
|
+
|
|
251
|
+
export const CTA: Story = {
|
|
252
|
+
args: {
|
|
253
|
+
typeVariant: "cta",
|
|
254
|
+
hierarchy: "primary",
|
|
255
|
+
appearance: "gradient",
|
|
256
|
+
},
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
export const Utility: Story = {
|
|
260
|
+
args: {
|
|
261
|
+
typeVariant: "utility",
|
|
262
|
+
hierarchy: "primary",
|
|
263
|
+
appearance: "solid",
|
|
264
|
+
theme: "default",
|
|
265
|
+
children: "Utility",
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export const Confirm: Story = {
|
|
270
|
+
args: {
|
|
271
|
+
typeVariant: "utility",
|
|
272
|
+
appearance: "solid",
|
|
273
|
+
theme: "light",
|
|
274
|
+
context: "confirm",
|
|
275
|
+
},
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
export const Floating: Story = {
|
|
279
|
+
args: {
|
|
280
|
+
context: "floating",
|
|
281
|
+
appearance: "gradient",
|
|
282
|
+
},
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
export const IconButtons: Story = {
|
|
286
|
+
render: () => (
|
|
287
|
+
<div style={{ display: "flex", flexDirection: "column", gap: 24 }}>
|
|
288
|
+
{(["light", "transparent", "color"] as const).map((theme) => (
|
|
289
|
+
<div
|
|
290
|
+
key={theme}
|
|
291
|
+
style={{
|
|
292
|
+
display: "flex",
|
|
293
|
+
gap: 16,
|
|
294
|
+
alignItems: "center",
|
|
295
|
+
padding: 16,
|
|
296
|
+
borderRadius: 12,
|
|
297
|
+
background: theme === "transparent" ? "#3e4049" : undefined,
|
|
298
|
+
}}
|
|
299
|
+
>
|
|
300
|
+
{(["close", "check", "delete", "back"] as const).map((icon) =>
|
|
301
|
+
theme === "color" && icon === "back" ? null : (
|
|
302
|
+
<ButtonV01
|
|
303
|
+
key={icon}
|
|
304
|
+
typeVariant="icon"
|
|
305
|
+
icon={icon}
|
|
306
|
+
theme={theme}
|
|
307
|
+
/>
|
|
308
|
+
),
|
|
309
|
+
)}
|
|
310
|
+
</div>
|
|
311
|
+
))}
|
|
312
|
+
</div>
|
|
313
|
+
),
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
export const AllVariants: Story = {
|
|
317
|
+
render: () => (
|
|
318
|
+
<div style={{ display: "grid", gap: 32, padding: 24 }}>
|
|
319
|
+
<section>
|
|
320
|
+
<div
|
|
321
|
+
style={{
|
|
322
|
+
display: "grid",
|
|
323
|
+
gridTemplateColumns: "72px repeat(11, max-content)",
|
|
324
|
+
gap: 24,
|
|
325
|
+
alignItems: "center",
|
|
326
|
+
}}
|
|
327
|
+
>
|
|
328
|
+
<span />
|
|
329
|
+
{catalog.map((col) => (
|
|
330
|
+
<span
|
|
331
|
+
key={col.label}
|
|
332
|
+
style={{
|
|
333
|
+
fontSize: 11,
|
|
334
|
+
fontWeight: 600,
|
|
335
|
+
color: "#71747d",
|
|
336
|
+
textTransform: "uppercase",
|
|
337
|
+
letterSpacing: 0.4,
|
|
338
|
+
}}
|
|
339
|
+
>
|
|
340
|
+
{col.label}
|
|
341
|
+
</span>
|
|
342
|
+
))}
|
|
343
|
+
{sizes.map((size) => (
|
|
344
|
+
<React.Fragment key={size}>
|
|
345
|
+
<span
|
|
346
|
+
style={{
|
|
347
|
+
fontSize: 12,
|
|
348
|
+
fontWeight: 600,
|
|
349
|
+
color: "#52545d",
|
|
350
|
+
}}
|
|
351
|
+
>
|
|
352
|
+
{size}
|
|
353
|
+
</span>
|
|
354
|
+
{catalog.map((col) => (
|
|
355
|
+
<ButtonV01
|
|
356
|
+
key={`${size}-${col.label}`}
|
|
357
|
+
size={size}
|
|
358
|
+
{...col.props}
|
|
359
|
+
/>
|
|
360
|
+
))}
|
|
361
|
+
</React.Fragment>
|
|
362
|
+
))}
|
|
363
|
+
</div>
|
|
364
|
+
</section>
|
|
365
|
+
<section>
|
|
366
|
+
<h3
|
|
367
|
+
style={{
|
|
368
|
+
margin: "0 0 16px",
|
|
369
|
+
fontSize: 14,
|
|
370
|
+
fontWeight: 600,
|
|
371
|
+
color: "#52545d",
|
|
372
|
+
}}
|
|
373
|
+
>
|
|
374
|
+
Icon
|
|
375
|
+
</h3>
|
|
376
|
+
<div style={{ display: "flex", flexDirection: "column", gap: 16 }}>
|
|
377
|
+
{(["light", "transparent", "color"] as const).map((theme) => (
|
|
378
|
+
<div
|
|
379
|
+
key={theme}
|
|
380
|
+
style={{
|
|
381
|
+
display: "flex",
|
|
382
|
+
gap: 24,
|
|
383
|
+
alignItems: "center",
|
|
384
|
+
padding: 12,
|
|
385
|
+
borderRadius: 12,
|
|
386
|
+
background: theme === "transparent" ? "#3e4049" : undefined,
|
|
387
|
+
}}
|
|
388
|
+
>
|
|
389
|
+
<span
|
|
390
|
+
style={{
|
|
391
|
+
width: 88,
|
|
392
|
+
fontSize: 12,
|
|
393
|
+
fontWeight: 600,
|
|
394
|
+
color: theme === "transparent" ? "#fff" : "#52545d",
|
|
395
|
+
textTransform: "capitalize",
|
|
396
|
+
}}
|
|
397
|
+
>
|
|
398
|
+
{theme}
|
|
399
|
+
</span>
|
|
400
|
+
{(["close", "check", "delete", "back"] as const).map((icon) =>
|
|
401
|
+
theme === "color" && icon === "back" ? null : (
|
|
402
|
+
<ButtonV01
|
|
403
|
+
key={icon}
|
|
404
|
+
typeVariant="icon"
|
|
405
|
+
icon={icon}
|
|
406
|
+
theme={theme}
|
|
407
|
+
/>
|
|
408
|
+
),
|
|
409
|
+
)}
|
|
410
|
+
</div>
|
|
411
|
+
))}
|
|
412
|
+
</div>
|
|
413
|
+
</section>
|
|
414
|
+
</div>
|
|
415
|
+
),
|
|
416
|
+
parameters: { layout: "padded" },
|
|
417
|
+
};
|