@webiny/admin-ui 6.2.0 → 6.3.0-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/Accordion/Accordion.d.ts +1 -1
- package/Accordion/Accordion.mdx +437 -463
- package/Accordion/components/AccordionContent.js.map +1 -1
- package/Alert/Alert.d.ts +1 -1
- package/Alert/Alert.js.map +1 -1
- package/Alert/Alert.mdx +80 -83
- package/AutoComplete/AutoComplete.mdx +63 -55
- package/Avatar/Avatar.d.ts +1 -1
- package/Avatar/Avatar.js.map +1 -1
- package/Avatar/Avatar.mdx +52 -43
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js.map +1 -1
- package/Button/Button.mdx +50 -42
- package/Button/IconButton.d.ts +1 -1
- package/Button/IconButton.js.map +1 -1
- package/Card/components/CardContent.d.ts +1 -1
- package/Card/components/CardTitle.d.ts +1 -1
- package/Checkbox/Checkbox.mdx +51 -49
- package/Checkbox/primitives/CheckboxPrimitive.d.ts +1 -1
- package/CheckboxGroup/CheckboxGroup.mdx +51 -53
- package/CodeEditor/CodeEditor.mdx +44 -43
- package/ColorPicker/ColorPicker.mdx +41 -40
- package/Command/components/Item.d.ts +1 -1
- package/Command/components/Item.js.map +1 -1
- package/DataTable/DataTable.mdx +537 -542
- package/DataTable/components/ColumnSorter.d.ts +1 -1
- package/DataTable/components/ColumnSorter.js.map +1 -1
- package/Dialog/Dialog.js.map +1 -1
- package/Dialog/components/DialogContent.d.ts +1 -1
- package/Dialog/components/DialogContent.js +1 -1
- package/Dialog/components/DialogContent.js.map +1 -1
- package/Dialog/components/DialogFooter.d.ts +1 -1
- package/Dialog/components/DialogFooter.js.map +1 -1
- package/Dialog/components/DialogTitle.d.ts +1 -1
- package/Drawer/Drawer.js.map +1 -1
- package/Drawer/Drawer.mdx +73 -64
- package/Drawer/components/DrawerContent.d.ts +1 -1
- package/Drawer/components/DrawerContent.js.map +1 -1
- package/DropdownMenu/DropdownMenu.js.map +1 -1
- package/DropdownMenu/DropdownMenu.mdx +155 -256
- package/DropdownMenu/components/DropdownMenuCheckboxItem.js.map +1 -1
- package/DropdownMenu/components/DropdownMenuLabel.js.map +1 -1
- package/FilePicker/FilePicker.mdx +69 -69
- package/FilePicker/primitives/FilePickerPrimitive.d.ts +19 -19
- package/FilePicker/primitives/FilePickerPrimitive.js.map +1 -1
- package/FilePicker/primitives/components/Trigger.d.ts +1 -1
- package/FilePicker/primitives/components/previews/TextOnlyPreview/TextOnlyPreview.d.ts +1 -1
- package/FilePicker/primitives/components/previews/variants.d.ts +1 -1
- package/FilePicker/primitives/components/types.js.map +1 -1
- package/FormComponent/Description.d.ts +1 -1
- package/FormComponent/ErrorMessage.d.ts +1 -1
- package/FormComponent/Note.d.ts +1 -1
- package/Grid/Grid.d.ts +2 -2
- package/Grid/Grid.js.map +1 -1
- package/Grid/Grid.mdx +111 -121
- package/HeaderBar/HeaderBar.mdx +98 -99
- package/Heading/Heading.d.ts +1 -1
- package/Heading/Heading.js.map +1 -1
- package/Heading/Heading.mdx +63 -58
- package/Icon/Icon.d.ts +1 -1
- package/Icon/Icon.js.map +1 -1
- package/Icon/Icon.mdx +79 -147
- package/IconPicker/IconPicker.mdx +66 -64
- package/IconPicker/primitives/IconPickerPrimitive.d.ts +1 -1
- package/IconPicker/primitives/components/IconPickerTrigger.d.ts +1 -1
- package/Image/Image.js.map +1 -1
- package/Input/Input.mdx +67 -56
- package/Input/InputPrimitive.d.ts +1 -1
- package/Label/Label.d.ts +1 -1
- package/Label/Label.js.map +1 -1
- package/Label/Label.mdx +42 -42
- package/Label/components/LabelDescription.d.ts +1 -1
- package/Label/components/LabelRequired.d.ts +1 -1
- package/Label/components/LabelValue.d.ts +1 -1
- package/Link/Link.d.ts +1 -1
- package/Link/Link.mdx +129 -116
- package/List/List.d.ts +1 -1
- package/List/List.js.map +1 -1
- package/List/List.mdx +317 -329
- package/List/components/ListItem.d.ts +1 -1
- package/List/components/ListItem.js.map +1 -1
- package/Loader/Loader.d.ts +2 -2
- package/Loader/Loader.js.map +1 -1
- package/Loader/Loader.mdx +96 -91
- package/MultiAutoComplete/MultiAutoComplete.mdx +52 -51
- package/MultiAutoComplete/primitives/components/MultiAutoCompleteInput.d.ts +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteListOptionsPresenter.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteListOptionsPresenterWithUniqueValues.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteSelectedOptionsPresenter.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteTemporaryOptionPresenter.js.map +1 -1
- package/MultiFilePicker/MultiFilePicker.mdx +84 -80
- package/MultiFilePicker/primitives/MultiFilePickerPrimitive.js.map +1 -1
- package/Popover/Popover.mdx +112 -118
- package/Popover/primitives/components/PopoverArrow.d.ts +1 -1
- package/Popover/primitives/components/PopoverContent.d.ts +1 -1
- package/RadioGroup/RadioGroup.mdx +62 -59
- package/RadioGroup/primitives/RadioGroupPrimitive.js.map +1 -1
- package/RangeSlider/RangeSlider.mdx +48 -47
- package/RangeSlider/primitives/RangeSliderPrimitive.js.map +1 -1
- package/RangeSlider/primitives/components/RangeSliderValue.d.ts +1 -1
- package/RangeSlider/primitives/components/RangeSliderValue.js.map +1 -1
- package/ScrollArea/ScrollArea.js.map +1 -1
- package/SegmentedControl/SegmentedControl.mdx +59 -59
- package/SegmentedControl/primitives/SegmentedControlPrimitive.d.ts +1 -1
- package/SegmentedControl/primitives/SegmentedControlPrimitive.js.map +1 -1
- package/Select/Select.mdx +52 -43
- package/Select/primitives/components/SelectTrigger.d.ts +1 -1
- package/Select/primitives/components/SelectTrigger.js.map +1 -1
- package/Select/primitives/presenters/SelectPresenter.d.ts +1 -1
- package/Separator/Separator.d.ts +1 -1
- package/Separator/Separator.mdx +139 -150
- package/Sidebar/Sidebar.js.map +1 -1
- package/Sidebar/Sidebar.mdx +66 -88
- package/Sidebar/components/items/SidebarMenuSubItemIndentation.d.ts +1 -1
- package/Sidebar/components/items/SidebarMenuSubItemIndentation.js.map +1 -1
- package/Skeleton/Skeleton.d.ts +1 -1
- package/Skeleton/Skeleton.js.map +1 -1
- package/Skeleton/Skeleton.mdx +37 -37
- package/Slider/Slider.mdx +48 -47
- package/Slider/primitives/SliderPrimitive.js.map +1 -1
- package/Slider/primitives/components/SliderSideValue.d.ts +1 -1
- package/Slider/primitives/components/SliderSideValue.js.map +1 -1
- package/Slider/primitives/components/SliderTooltip.d.ts +1 -1
- package/SteppedProgress/components/SteppedProgressIcon.d.ts +1 -1
- package/SteppedProgress/components/SteppedProgressIcon.js.map +1 -1
- package/SteppedProgress/components/SteppedProgressIndicator.d.ts +1 -1
- package/SteppedProgress/components/SteppedProgressIndicator.js.map +1 -1
- package/Switch/Switch.mdx +44 -42
- package/Switch/primitives/SwitchPrimitive.d.ts +1 -1
- package/Table/Table.d.ts +1 -1
- package/Table/Table.js.map +1 -1
- package/Table/components/Direction.d.ts +1 -1
- package/Table/components/Direction.js.map +1 -1
- package/Table/components/Header.d.ts +1 -1
- package/Table/components/Header.js.map +1 -1
- package/Table/components/Resizer.d.ts +1 -1
- package/Table/components/Resizer.js.map +1 -1
- package/Table/components/Row.d.ts +1 -1
- package/Table/components/Row.js.map +1 -1
- package/Tabs/Tabs.mdx +297 -292
- package/Tabs/components/Content.d.ts +1 -1
- package/Tabs/components/List.d.ts +1 -1
- package/Tabs/components/Trigger.d.ts +1 -1
- package/Tag/Tag.d.ts +1 -1
- package/Tag/Tag.js.map +1 -1
- package/Tag/Tag.mdx +68 -64
- package/Tags/primitives/TagsPrimitive.js.map +1 -1
- package/Text/Text.d.ts +1 -1
- package/Text/Text.mdx +54 -48
- package/Textarea/Textarea.mdx +49 -39
- package/Textarea/TextareaPrimitive.d.ts +1 -1
- package/Textarea/TextareaPrimitive.js.map +1 -1
- package/Toast/Toast.mdx +63 -53
- package/Toast/components/ToastRoot.d.ts +1 -1
- package/Tooltip/Tooltip.mdx +197 -198
- package/Tooltip/components/TooltipArrow.d.ts +1 -1
- package/Tooltip/components/TooltipContent.d.ts +1 -1
- package/Tree/components/Item.d.ts +1 -1
- package/Tree/useTree.d.ts +1 -1
- package/Widget/components/WidgetContent.d.ts +1 -1
- package/package.json +15 -15
package/Heading/Heading.mdx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Meta, Controls } from
|
|
1
|
+
import { Canvas, Meta, Controls } from "@storybook/addon-docs/blocks";
|
|
2
2
|
|
|
3
|
-
import * as HeadingStories from
|
|
3
|
+
import * as HeadingStories from "./Heading.stories";
|
|
4
4
|
|
|
5
5
|
<Meta of={HeadingStories} />
|
|
6
6
|
|
|
@@ -15,23 +15,23 @@ import React from "react";
|
|
|
15
15
|
import { Heading } from "@webiny/admin-ui";
|
|
16
16
|
|
|
17
17
|
const HeadingExample = () => {
|
|
18
|
-
|
|
18
|
+
return <Heading level={1}>This is a heading</Heading>;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export default HeadingExample;
|
|
22
22
|
|
|
23
23
|
` } }
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
additionalActions={[
|
|
25
|
+
{
|
|
26
|
+
title: 'Open in GitHub',
|
|
27
|
+
onClick: () => {
|
|
28
|
+
window.open(
|
|
29
|
+
'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/Heading/Heading.tsx',
|
|
30
|
+
'_blank'
|
|
31
|
+
);
|
|
32
|
+
},
|
|
33
|
+
}
|
|
34
|
+
]}
|
|
35
35
|
/>
|
|
36
36
|
|
|
37
37
|
<Controls of={HeadingStories.Documentation} />
|
|
@@ -41,7 +41,7 @@ import React from "react";
|
|
|
41
41
|
import { Heading } from "@webiny/admin-ui";
|
|
42
42
|
|
|
43
43
|
const HeadingExample = () => {
|
|
44
|
-
|
|
44
|
+
return <Heading level={1}>This is a heading</Heading>;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
export default HeadingExample;
|
|
@@ -58,17 +58,17 @@ import React from "react";
|
|
|
58
58
|
import { Heading } from "@webiny/admin-ui";
|
|
59
59
|
|
|
60
60
|
const Heading1Example = () => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
return (
|
|
62
|
+
|
|
63
|
+
<Heading level={1}>
|
|
64
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum
|
|
65
|
+
rhoncus.
|
|
66
|
+
</Heading>
|
|
67
|
+
); };
|
|
67
68
|
|
|
68
69
|
export default Heading1Example;
|
|
69
70
|
` } } />
|
|
70
71
|
|
|
71
|
-
|
|
72
72
|
### Heading Level 2
|
|
73
73
|
|
|
74
74
|
Used for major section headings.
|
|
@@ -78,12 +78,13 @@ import React from "react";
|
|
|
78
78
|
import { Heading } from "@webiny/admin-ui";
|
|
79
79
|
|
|
80
80
|
const Heading2Example = () => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
return (
|
|
82
|
+
|
|
83
|
+
<Heading level={2}>
|
|
84
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum
|
|
85
|
+
rhoncus.
|
|
86
|
+
</Heading>
|
|
87
|
+
); };
|
|
87
88
|
|
|
88
89
|
export default Heading2Example;
|
|
89
90
|
` } } />
|
|
@@ -97,12 +98,13 @@ import React from "react";
|
|
|
97
98
|
import { Heading } from "@webiny/admin-ui";
|
|
98
99
|
|
|
99
100
|
const Heading3Example = () => {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
return (
|
|
102
|
+
|
|
103
|
+
<Heading level={3}>
|
|
104
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum
|
|
105
|
+
rhoncus.
|
|
106
|
+
</Heading>
|
|
107
|
+
); };
|
|
106
108
|
|
|
107
109
|
export default Heading3Example;
|
|
108
110
|
` } } />
|
|
@@ -116,12 +118,13 @@ import React from "react";
|
|
|
116
118
|
import { Heading } from "@webiny/admin-ui";
|
|
117
119
|
|
|
118
120
|
const Heading4Example = () => {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
return (
|
|
122
|
+
|
|
123
|
+
<Heading level={4}>
|
|
124
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum
|
|
125
|
+
rhoncus.
|
|
126
|
+
</Heading>
|
|
127
|
+
); };
|
|
125
128
|
|
|
126
129
|
export default Heading4Example;
|
|
127
130
|
` } } />
|
|
@@ -135,12 +138,13 @@ import React from "react";
|
|
|
135
138
|
import { Heading } from "@webiny/admin-ui";
|
|
136
139
|
|
|
137
140
|
const Heading5Example = () => {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
return (
|
|
142
|
+
|
|
143
|
+
<Heading level={5}>
|
|
144
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum
|
|
145
|
+
rhoncus.
|
|
146
|
+
</Heading>
|
|
147
|
+
); };
|
|
144
148
|
|
|
145
149
|
export default Heading5Example;
|
|
146
150
|
` } } />
|
|
@@ -154,12 +158,13 @@ import React from "react";
|
|
|
154
158
|
import { Heading } from "@webiny/admin-ui";
|
|
155
159
|
|
|
156
160
|
const Heading6Example = () => {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
return (
|
|
162
|
+
|
|
163
|
+
<Heading level={6}>
|
|
164
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum
|
|
165
|
+
rhoncus.
|
|
166
|
+
</Heading>
|
|
167
|
+
); };
|
|
163
168
|
|
|
164
169
|
export default Heading6Example;
|
|
165
170
|
` } } />
|
|
@@ -173,12 +178,12 @@ import React from "react";
|
|
|
173
178
|
import { Heading } from "@webiny/admin-ui";
|
|
174
179
|
|
|
175
180
|
const AsExample = () => {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
};
|
|
181
|
+
return (
|
|
182
|
+
|
|
183
|
+
<Heading level={2} as="h1">
|
|
184
|
+
This is visually a Heading level 2, but semantically an h1
|
|
185
|
+
</Heading>
|
|
186
|
+
); };
|
|
182
187
|
|
|
183
188
|
export default AsExample;
|
|
184
189
|
` } } />
|
package/Icon/Icon.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type VariantProps } from "../utils.js";
|
|
|
3
3
|
declare const iconVariants: (props?: ({
|
|
4
4
|
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
5
5
|
color?: "accent" | "inherit" | "neutral-light" | "neutral-strong" | "neutral-strong-transparent" | "neutral-base" | "neutral-negative" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
interface IconProps extends Omit<React.HTMLAttributes<HTMLOrSVGElement>, "color">, VariantProps<typeof iconVariants> {
|
|
8
8
|
label: string;
|
|
9
9
|
icon: React.ReactNode;
|
package/Icon/Icon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","AccessibleIcon","cn","cva","makeDecoratable","iconVariants","variants","size","xs","sm","md","lg","color","inherit","accent","defaultVariants","IconBase","props","label","icon","className","rest","createElement","Root","cloneElement","Icon"],"sources":["Icon.tsx"],"sourcesContent":["import React from \"react\";\nimport { AccessibleIcon } from \"radix-ui\";\nimport { cn, cva, makeDecoratable, type VariantProps } from \"~/utils.js\";\n\nconst iconVariants = cva(\"shrink-0\", {\n variants: {\n size: {\n xs: \"size-sm-extra\",\n sm: \"size-md\",\n md: \"size-md-plus\",\n lg: \"size-lg\"\n },\n color: {\n inherit: \"fill-inherit text-inherit\",\n accent: \"fill-accent-default text-accent-default\",\n \"neutral-light\": \"fill-neutral-strong text-neutral-strong\",\n \"neutral-strong\": \"fill-neutral-xstrong text-neutral-xstrong\",\n \"neutral-strong-transparent\": \"fill-neutral-xstrong/30 text-neutral-xstrong/30\",\n \"neutral-base\": \"fill-neutral-base text-neutral-base\",\n \"neutral-negative\": \"fill-neutral-base/50 text-neutral-base/50\"\n }\n },\n defaultVariants: {\n size: \"md\",\n color: \"inherit\"\n }\n});\n\ninterface IconProps\n extends
|
|
1
|
+
{"version":3,"names":["React","AccessibleIcon","cn","cva","makeDecoratable","iconVariants","variants","size","xs","sm","md","lg","color","inherit","accent","defaultVariants","IconBase","props","label","icon","className","rest","createElement","Root","cloneElement","Icon"],"sources":["Icon.tsx"],"sourcesContent":["import React from \"react\";\nimport { AccessibleIcon } from \"radix-ui\";\nimport { cn, cva, makeDecoratable, type VariantProps } from \"~/utils.js\";\n\nconst iconVariants = cva(\"shrink-0\", {\n variants: {\n size: {\n xs: \"size-sm-extra\",\n sm: \"size-md\",\n md: \"size-md-plus\",\n lg: \"size-lg\"\n },\n color: {\n inherit: \"fill-inherit text-inherit\",\n accent: \"fill-accent-default text-accent-default\",\n \"neutral-light\": \"fill-neutral-strong text-neutral-strong\",\n \"neutral-strong\": \"fill-neutral-xstrong text-neutral-xstrong\",\n \"neutral-strong-transparent\": \"fill-neutral-xstrong/30 text-neutral-xstrong/30\",\n \"neutral-base\": \"fill-neutral-base text-neutral-base\",\n \"neutral-negative\": \"fill-neutral-base/50 text-neutral-base/50\"\n }\n },\n defaultVariants: {\n size: \"md\",\n color: \"inherit\"\n }\n});\n\ninterface IconProps\n extends\n Omit<React.HTMLAttributes<HTMLOrSVGElement>, \"color\">,\n VariantProps<typeof iconVariants> {\n label: string;\n icon: React.ReactNode;\n}\n\nconst IconBase = (props: IconProps) => {\n const { label, icon, color, size, className, ...rest } = props;\n return (\n <AccessibleIcon.Root label={label}>\n {/* @ts-expect-error */}\n {React.cloneElement(icon, {\n ...rest,\n className: cn(iconVariants({ color, size }), className)\n })}\n </AccessibleIcon.Root>\n );\n};\n\nconst Icon = makeDecoratable(\"Icon\", IconBase);\n\nexport { Icon, type IconProps };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,UAAU;AACzC,SAASC,EAAE,EAAEC,GAAG,EAAEC,eAAe;AAEjC,MAAMC,YAAY,GAAGF,GAAG,CAAC,UAAU,EAAE;EACjCG,QAAQ,EAAE;IACNC,IAAI,EAAE;MACFC,EAAE,EAAE,eAAe;MACnBC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,cAAc;MAClBC,EAAE,EAAE;IACR,CAAC;IACDC,KAAK,EAAE;MACHC,OAAO,EAAE,2BAA2B;MACpCC,MAAM,EAAE,yCAAyC;MACjD,eAAe,EAAE,yCAAyC;MAC1D,gBAAgB,EAAE,2CAA2C;MAC7D,4BAA4B,EAAE,iDAAiD;MAC/E,cAAc,EAAE,qCAAqC;MACrD,kBAAkB,EAAE;IACxB;EACJ,CAAC;EACDC,eAAe,EAAE;IACbR,IAAI,EAAE,IAAI;IACVK,KAAK,EAAE;EACX;AACJ,CAAC,CAAC;AAUF,MAAMI,QAAQ,GAAIC,KAAgB,IAAK;EACnC,MAAM;IAAEC,KAAK;IAAEC,IAAI;IAAEP,KAAK;IAAEL,IAAI;IAAEa,SAAS;IAAE,GAAGC;EAAK,CAAC,GAAGJ,KAAK;EAC9D,oBACIjB,KAAA,CAAAsB,aAAA,CAACrB,cAAc,CAACsB,IAAI;IAACL,KAAK,EAAEA;EAAM,gBAE7BlB,KAAK,CAACwB,YAAY,CAACL,IAAI,EAAE;IACtB,GAAGE,IAAI;IACPD,SAAS,EAAElB,EAAE,CAACG,YAAY,CAAC;MAAEO,KAAK;MAAEL;IAAK,CAAC,CAAC,EAAEa,SAAS;EAC1D,CAAC,CACgB,CAAC;AAE9B,CAAC;AAED,MAAMK,IAAI,GAAGrB,eAAe,CAAC,MAAM,EAAEY,QAAQ,CAAC;AAE9C,SAASS,IAAI","ignoreList":[]}
|
package/Icon/Icon.mdx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Meta, Controls } from
|
|
1
|
+
import { Canvas, Meta, Controls } from "@storybook/addon-docs/blocks";
|
|
2
2
|
|
|
3
|
-
import * as IconStories from
|
|
3
|
+
import * as IconStories from "./Icon.stories";
|
|
4
4
|
|
|
5
5
|
<Meta of={IconStories} />
|
|
6
6
|
|
|
@@ -16,30 +16,25 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
16
16
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
17
17
|
|
|
18
18
|
const IconExample = () => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
size="md"
|
|
24
|
-
color="accent"
|
|
25
|
-
/>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
19
|
+
return (
|
|
20
|
+
|
|
21
|
+
<Icon icon={<CloseIcon />} label="Close icon" size="md" color="accent" />
|
|
22
|
+
); };
|
|
28
23
|
|
|
29
24
|
export default IconExample;
|
|
30
25
|
|
|
31
26
|
` } }
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
additionalActions={[
|
|
28
|
+
{
|
|
29
|
+
title: 'Open in GitHub',
|
|
30
|
+
onClick: () => {
|
|
31
|
+
window.open(
|
|
32
|
+
'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/Icon/Icon.tsx',
|
|
33
|
+
'_blank'
|
|
34
|
+
);
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
]}
|
|
43
38
|
/>
|
|
44
39
|
|
|
45
40
|
<Controls of={IconStories.Documentation} />
|
|
@@ -50,14 +45,7 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
50
45
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
51
46
|
|
|
52
47
|
const IconExample = () => {
|
|
53
|
-
|
|
54
|
-
<Icon
|
|
55
|
-
icon={<CloseIcon />}
|
|
56
|
-
label="Close icon"
|
|
57
|
-
size="md"
|
|
58
|
-
color="accent"
|
|
59
|
-
/>
|
|
60
|
-
);
|
|
48
|
+
return <Icon icon={<CloseIcon />} label="Close icon" size="md" color="accent" />;
|
|
61
49
|
};
|
|
62
50
|
|
|
63
51
|
export default IconExample;
|
|
@@ -73,15 +61,10 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
73
61
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
74
62
|
|
|
75
63
|
const DefaultIconExample = () => {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
size="md"
|
|
81
|
-
color="accent"
|
|
82
|
-
/>
|
|
83
|
-
);
|
|
84
|
-
};
|
|
64
|
+
return (
|
|
65
|
+
|
|
66
|
+
<Icon icon={<CloseIcon />} label="This is an icon" size="md" color="accent" />
|
|
67
|
+
); };
|
|
85
68
|
|
|
86
69
|
export default DefaultIconExample;
|
|
87
70
|
` } } />
|
|
@@ -96,19 +79,15 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
96
79
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
97
80
|
|
|
98
81
|
const InheritColorIconExample = () => {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
color="inherit"
|
|
106
|
-
/>
|
|
107
|
-
</div>
|
|
108
|
-
);
|
|
109
|
-
};
|
|
82
|
+
return (
|
|
83
|
+
|
|
84
|
+
<div className="fill-success">
|
|
85
|
+
<Icon icon={<CloseIcon />} label="This is an icon" size="md" color="inherit" />
|
|
86
|
+
</div>
|
|
87
|
+
); };
|
|
110
88
|
|
|
111
89
|
export default InheritColorIconExample;
|
|
90
|
+
|
|
112
91
|
` } } />
|
|
113
92
|
|
|
114
93
|
#### Accent Color
|
|
@@ -119,15 +98,10 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
119
98
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
120
99
|
|
|
121
100
|
const AccentIconExample = () => {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
size="md"
|
|
127
|
-
color="accent"
|
|
128
|
-
/>
|
|
129
|
-
);
|
|
130
|
-
};
|
|
101
|
+
return (
|
|
102
|
+
|
|
103
|
+
<Icon icon={<CloseIcon />} label="This is an icon" size="md" color="accent" />
|
|
104
|
+
); };
|
|
131
105
|
|
|
132
106
|
export default AccentIconExample;
|
|
133
107
|
` } } />
|
|
@@ -140,17 +114,13 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
140
114
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
141
115
|
|
|
142
116
|
const NeutralLightIconExample = () => {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
size="md"
|
|
148
|
-
color="neutral-light"
|
|
149
|
-
/>
|
|
150
|
-
);
|
|
151
|
-
};
|
|
117
|
+
return (
|
|
118
|
+
|
|
119
|
+
<Icon icon={<CloseIcon />} label="This is an icon" size="md" color="neutral-light" />
|
|
120
|
+
); };
|
|
152
121
|
|
|
153
122
|
export default NeutralLightIconExample;
|
|
123
|
+
|
|
154
124
|
` } } />
|
|
155
125
|
|
|
156
126
|
#### Neutral Strong Color
|
|
@@ -161,17 +131,13 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
161
131
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
162
132
|
|
|
163
133
|
const NeutralStrongIconExample = () => {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
size="md"
|
|
169
|
-
color="neutral-strong"
|
|
170
|
-
/>
|
|
171
|
-
);
|
|
172
|
-
};
|
|
134
|
+
return (
|
|
135
|
+
|
|
136
|
+
<Icon icon={<CloseIcon />} label="This is an icon" size="md" color="neutral-strong" />
|
|
137
|
+
); };
|
|
173
138
|
|
|
174
139
|
export default NeutralStrongIconExample;
|
|
140
|
+
|
|
175
141
|
` } } />
|
|
176
142
|
|
|
177
143
|
#### Neutral Strong Transparent Color
|
|
@@ -182,17 +148,12 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
182
148
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
183
149
|
|
|
184
150
|
const NeutralStrongTransparentIconExample = () => {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
color="neutral-strong-transparent"
|
|
192
|
-
/>
|
|
193
|
-
</div>
|
|
194
|
-
);
|
|
195
|
-
};
|
|
151
|
+
return (
|
|
152
|
+
|
|
153
|
+
<div className="bg-neutral-disabled p-3xl rounded-md">
|
|
154
|
+
<Icon icon={<CloseIcon />} label="This is an icon" size="md" color="neutral-strong-transparent" />
|
|
155
|
+
</div>
|
|
156
|
+
); };
|
|
196
157
|
|
|
197
158
|
export default NeutralStrongTransparentIconExample;
|
|
198
159
|
` } } />
|
|
@@ -205,19 +166,15 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
205
166
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
206
167
|
|
|
207
168
|
const NeutralBaseIconExample = () => {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
color="neutral-base"
|
|
215
|
-
/>
|
|
216
|
-
</div>
|
|
217
|
-
);
|
|
218
|
-
};
|
|
169
|
+
return (
|
|
170
|
+
|
|
171
|
+
<div className="bg-neutral-dark p-3xl rounded-md">
|
|
172
|
+
<Icon icon={<CloseIcon />} label="This is an icon" size="md" color="neutral-base" />
|
|
173
|
+
</div>
|
|
174
|
+
); };
|
|
219
175
|
|
|
220
176
|
export default NeutralBaseIconExample;
|
|
177
|
+
|
|
221
178
|
` } } />
|
|
222
179
|
|
|
223
180
|
#### Neutral Negative Color
|
|
@@ -228,19 +185,15 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
228
185
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
229
186
|
|
|
230
187
|
const NeutralNegativeIconExample = () => {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
color="neutral-negative"
|
|
238
|
-
/>
|
|
239
|
-
</div>
|
|
240
|
-
);
|
|
241
|
-
};
|
|
188
|
+
return (
|
|
189
|
+
|
|
190
|
+
<div className="bg-neutral-dark p-3xl rounded-md">
|
|
191
|
+
<Icon icon={<CloseIcon />} label="This is an icon" size="md" color="neutral-negative" />
|
|
192
|
+
</div>
|
|
193
|
+
); };
|
|
242
194
|
|
|
243
195
|
export default NeutralNegativeIconExample;
|
|
196
|
+
|
|
244
197
|
` } } />
|
|
245
198
|
|
|
246
199
|
### Size Variants
|
|
@@ -253,15 +206,10 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
253
206
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
254
207
|
|
|
255
208
|
const XsIconExample = () => {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
size="xs"
|
|
261
|
-
color="accent"
|
|
262
|
-
/>
|
|
263
|
-
);
|
|
264
|
-
};
|
|
209
|
+
return (
|
|
210
|
+
|
|
211
|
+
<Icon icon={<CloseIcon />} label="This is an icon" size="xs" color="accent" />
|
|
212
|
+
); };
|
|
265
213
|
|
|
266
214
|
export default XsIconExample;
|
|
267
215
|
` } } />
|
|
@@ -274,15 +222,10 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
274
222
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
275
223
|
|
|
276
224
|
const SmIconExample = () => {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
size="sm"
|
|
282
|
-
color="accent"
|
|
283
|
-
/>
|
|
284
|
-
);
|
|
285
|
-
};
|
|
225
|
+
return (
|
|
226
|
+
|
|
227
|
+
<Icon icon={<CloseIcon />} label="This is an icon" size="sm" color="accent" />
|
|
228
|
+
); };
|
|
286
229
|
|
|
287
230
|
export default SmIconExample;
|
|
288
231
|
` } } />
|
|
@@ -295,15 +238,10 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
295
238
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
296
239
|
|
|
297
240
|
const MdIconExample = () => {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
size="md"
|
|
303
|
-
color="accent"
|
|
304
|
-
/>
|
|
305
|
-
);
|
|
306
|
-
};
|
|
241
|
+
return (
|
|
242
|
+
|
|
243
|
+
<Icon icon={<CloseIcon />} label="This is an icon" size="md" color="accent" />
|
|
244
|
+
); };
|
|
307
245
|
|
|
308
246
|
export default MdIconExample;
|
|
309
247
|
` } } />
|
|
@@ -316,16 +254,10 @@ import { Icon } from "@webiny/admin-ui";
|
|
|
316
254
|
import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg";
|
|
317
255
|
|
|
318
256
|
const LgIconExample = () => {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
size="lg"
|
|
324
|
-
color="accent"
|
|
325
|
-
/>
|
|
326
|
-
);
|
|
327
|
-
};
|
|
257
|
+
return (
|
|
258
|
+
|
|
259
|
+
<Icon icon={<CloseIcon />} label="This is an icon" size="lg" color="accent" />
|
|
260
|
+
); };
|
|
328
261
|
|
|
329
262
|
export default LgIconExample;
|
|
330
263
|
` } } />
|
|
331
|
-
|