@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.
Files changed (161) hide show
  1. package/Accordion/Accordion.d.ts +1 -1
  2. package/Accordion/Accordion.mdx +437 -463
  3. package/Accordion/components/AccordionContent.js.map +1 -1
  4. package/Alert/Alert.d.ts +1 -1
  5. package/Alert/Alert.js.map +1 -1
  6. package/Alert/Alert.mdx +80 -83
  7. package/AutoComplete/AutoComplete.mdx +63 -55
  8. package/Avatar/Avatar.d.ts +1 -1
  9. package/Avatar/Avatar.js.map +1 -1
  10. package/Avatar/Avatar.mdx +52 -43
  11. package/Button/Button.d.ts +1 -1
  12. package/Button/Button.js.map +1 -1
  13. package/Button/Button.mdx +50 -42
  14. package/Button/IconButton.d.ts +1 -1
  15. package/Button/IconButton.js.map +1 -1
  16. package/Card/components/CardContent.d.ts +1 -1
  17. package/Card/components/CardTitle.d.ts +1 -1
  18. package/Checkbox/Checkbox.mdx +51 -49
  19. package/Checkbox/primitives/CheckboxPrimitive.d.ts +1 -1
  20. package/CheckboxGroup/CheckboxGroup.mdx +51 -53
  21. package/CodeEditor/CodeEditor.mdx +44 -43
  22. package/ColorPicker/ColorPicker.mdx +41 -40
  23. package/Command/components/Item.d.ts +1 -1
  24. package/Command/components/Item.js.map +1 -1
  25. package/DataTable/DataTable.mdx +537 -542
  26. package/DataTable/components/ColumnSorter.d.ts +1 -1
  27. package/DataTable/components/ColumnSorter.js.map +1 -1
  28. package/Dialog/Dialog.js.map +1 -1
  29. package/Dialog/components/DialogContent.d.ts +1 -1
  30. package/Dialog/components/DialogContent.js +1 -1
  31. package/Dialog/components/DialogContent.js.map +1 -1
  32. package/Dialog/components/DialogFooter.d.ts +1 -1
  33. package/Dialog/components/DialogFooter.js.map +1 -1
  34. package/Dialog/components/DialogTitle.d.ts +1 -1
  35. package/Drawer/Drawer.js.map +1 -1
  36. package/Drawer/Drawer.mdx +73 -64
  37. package/Drawer/components/DrawerContent.d.ts +1 -1
  38. package/Drawer/components/DrawerContent.js.map +1 -1
  39. package/DropdownMenu/DropdownMenu.js.map +1 -1
  40. package/DropdownMenu/DropdownMenu.mdx +155 -256
  41. package/DropdownMenu/components/DropdownMenuCheckboxItem.js.map +1 -1
  42. package/DropdownMenu/components/DropdownMenuLabel.js.map +1 -1
  43. package/FilePicker/FilePicker.mdx +69 -69
  44. package/FilePicker/primitives/FilePickerPrimitive.d.ts +19 -19
  45. package/FilePicker/primitives/FilePickerPrimitive.js.map +1 -1
  46. package/FilePicker/primitives/components/Trigger.d.ts +1 -1
  47. package/FilePicker/primitives/components/previews/TextOnlyPreview/TextOnlyPreview.d.ts +1 -1
  48. package/FilePicker/primitives/components/previews/variants.d.ts +1 -1
  49. package/FilePicker/primitives/components/types.js.map +1 -1
  50. package/FormComponent/Description.d.ts +1 -1
  51. package/FormComponent/ErrorMessage.d.ts +1 -1
  52. package/FormComponent/Note.d.ts +1 -1
  53. package/Grid/Grid.d.ts +2 -2
  54. package/Grid/Grid.js.map +1 -1
  55. package/Grid/Grid.mdx +111 -121
  56. package/HeaderBar/HeaderBar.mdx +98 -99
  57. package/Heading/Heading.d.ts +1 -1
  58. package/Heading/Heading.js.map +1 -1
  59. package/Heading/Heading.mdx +63 -58
  60. package/Icon/Icon.d.ts +1 -1
  61. package/Icon/Icon.js.map +1 -1
  62. package/Icon/Icon.mdx +79 -147
  63. package/IconPicker/IconPicker.mdx +66 -64
  64. package/IconPicker/primitives/IconPickerPrimitive.d.ts +1 -1
  65. package/IconPicker/primitives/components/IconPickerTrigger.d.ts +1 -1
  66. package/Image/Image.js.map +1 -1
  67. package/Input/Input.mdx +67 -56
  68. package/Input/InputPrimitive.d.ts +1 -1
  69. package/Label/Label.d.ts +1 -1
  70. package/Label/Label.js.map +1 -1
  71. package/Label/Label.mdx +42 -42
  72. package/Label/components/LabelDescription.d.ts +1 -1
  73. package/Label/components/LabelRequired.d.ts +1 -1
  74. package/Label/components/LabelValue.d.ts +1 -1
  75. package/Link/Link.d.ts +1 -1
  76. package/Link/Link.mdx +129 -116
  77. package/List/List.d.ts +1 -1
  78. package/List/List.js.map +1 -1
  79. package/List/List.mdx +317 -329
  80. package/List/components/ListItem.d.ts +1 -1
  81. package/List/components/ListItem.js.map +1 -1
  82. package/Loader/Loader.d.ts +2 -2
  83. package/Loader/Loader.js.map +1 -1
  84. package/Loader/Loader.mdx +96 -91
  85. package/MultiAutoComplete/MultiAutoComplete.mdx +52 -51
  86. package/MultiAutoComplete/primitives/components/MultiAutoCompleteInput.d.ts +1 -1
  87. package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteListOptionsPresenter.js.map +1 -1
  88. package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteListOptionsPresenterWithUniqueValues.js.map +1 -1
  89. package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteSelectedOptionsPresenter.js.map +1 -1
  90. package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteTemporaryOptionPresenter.js.map +1 -1
  91. package/MultiFilePicker/MultiFilePicker.mdx +84 -80
  92. package/MultiFilePicker/primitives/MultiFilePickerPrimitive.js.map +1 -1
  93. package/Popover/Popover.mdx +112 -118
  94. package/Popover/primitives/components/PopoverArrow.d.ts +1 -1
  95. package/Popover/primitives/components/PopoverContent.d.ts +1 -1
  96. package/RadioGroup/RadioGroup.mdx +62 -59
  97. package/RadioGroup/primitives/RadioGroupPrimitive.js.map +1 -1
  98. package/RangeSlider/RangeSlider.mdx +48 -47
  99. package/RangeSlider/primitives/RangeSliderPrimitive.js.map +1 -1
  100. package/RangeSlider/primitives/components/RangeSliderValue.d.ts +1 -1
  101. package/RangeSlider/primitives/components/RangeSliderValue.js.map +1 -1
  102. package/ScrollArea/ScrollArea.js.map +1 -1
  103. package/SegmentedControl/SegmentedControl.mdx +59 -59
  104. package/SegmentedControl/primitives/SegmentedControlPrimitive.d.ts +1 -1
  105. package/SegmentedControl/primitives/SegmentedControlPrimitive.js.map +1 -1
  106. package/Select/Select.mdx +52 -43
  107. package/Select/primitives/components/SelectTrigger.d.ts +1 -1
  108. package/Select/primitives/components/SelectTrigger.js.map +1 -1
  109. package/Select/primitives/presenters/SelectPresenter.d.ts +1 -1
  110. package/Separator/Separator.d.ts +1 -1
  111. package/Separator/Separator.mdx +139 -150
  112. package/Sidebar/Sidebar.js.map +1 -1
  113. package/Sidebar/Sidebar.mdx +66 -88
  114. package/Sidebar/components/items/SidebarMenuSubItemIndentation.d.ts +1 -1
  115. package/Sidebar/components/items/SidebarMenuSubItemIndentation.js.map +1 -1
  116. package/Skeleton/Skeleton.d.ts +1 -1
  117. package/Skeleton/Skeleton.js.map +1 -1
  118. package/Skeleton/Skeleton.mdx +37 -37
  119. package/Slider/Slider.mdx +48 -47
  120. package/Slider/primitives/SliderPrimitive.js.map +1 -1
  121. package/Slider/primitives/components/SliderSideValue.d.ts +1 -1
  122. package/Slider/primitives/components/SliderSideValue.js.map +1 -1
  123. package/Slider/primitives/components/SliderTooltip.d.ts +1 -1
  124. package/SteppedProgress/components/SteppedProgressIcon.d.ts +1 -1
  125. package/SteppedProgress/components/SteppedProgressIcon.js.map +1 -1
  126. package/SteppedProgress/components/SteppedProgressIndicator.d.ts +1 -1
  127. package/SteppedProgress/components/SteppedProgressIndicator.js.map +1 -1
  128. package/Switch/Switch.mdx +44 -42
  129. package/Switch/primitives/SwitchPrimitive.d.ts +1 -1
  130. package/Table/Table.d.ts +1 -1
  131. package/Table/Table.js.map +1 -1
  132. package/Table/components/Direction.d.ts +1 -1
  133. package/Table/components/Direction.js.map +1 -1
  134. package/Table/components/Header.d.ts +1 -1
  135. package/Table/components/Header.js.map +1 -1
  136. package/Table/components/Resizer.d.ts +1 -1
  137. package/Table/components/Resizer.js.map +1 -1
  138. package/Table/components/Row.d.ts +1 -1
  139. package/Table/components/Row.js.map +1 -1
  140. package/Tabs/Tabs.mdx +297 -292
  141. package/Tabs/components/Content.d.ts +1 -1
  142. package/Tabs/components/List.d.ts +1 -1
  143. package/Tabs/components/Trigger.d.ts +1 -1
  144. package/Tag/Tag.d.ts +1 -1
  145. package/Tag/Tag.js.map +1 -1
  146. package/Tag/Tag.mdx +68 -64
  147. package/Tags/primitives/TagsPrimitive.js.map +1 -1
  148. package/Text/Text.d.ts +1 -1
  149. package/Text/Text.mdx +54 -48
  150. package/Textarea/Textarea.mdx +49 -39
  151. package/Textarea/TextareaPrimitive.d.ts +1 -1
  152. package/Textarea/TextareaPrimitive.js.map +1 -1
  153. package/Toast/Toast.mdx +63 -53
  154. package/Toast/components/ToastRoot.d.ts +1 -1
  155. package/Tooltip/Tooltip.mdx +197 -198
  156. package/Tooltip/components/TooltipArrow.d.ts +1 -1
  157. package/Tooltip/components/TooltipContent.d.ts +1 -1
  158. package/Tree/components/Item.d.ts +1 -1
  159. package/Tree/useTree.d.ts +1 -1
  160. package/Widget/components/WidgetContent.d.ts +1 -1
  161. package/package.json +15 -15
@@ -1,6 +1,6 @@
1
- import { Canvas, Meta, Controls } from '@storybook/addon-docs/blocks';
1
+ import { Canvas, Meta, Controls } from "@storybook/addon-docs/blocks";
2
2
 
3
- import * as HeadingStories from './Heading.stories';
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
- return <Heading level={1}>This is a heading</Heading>;
18
+ return <Heading level={1}>This is a heading</Heading>;
19
19
  };
20
20
 
21
21
  export default HeadingExample;
22
22
 
23
23
  ` } }
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
- ]}
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
- return <Heading level={1}>This is a heading</Heading>;
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
- return (
62
- <Heading level={1}>
63
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.
64
- </Heading>
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
- return (
82
- <Heading level={2}>
83
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.
84
- </Heading>
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
- return (
101
- <Heading level={3}>
102
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.
103
- </Heading>
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
- return (
120
- <Heading level={4}>
121
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.
122
- </Heading>
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
- return (
139
- <Heading level={5}>
140
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.
141
- </Heading>
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
- return (
158
- <Heading level={6}>
159
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tempus tortor eu sapien interdum rhoncus.
160
- </Heading>
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
- return (
177
- <Heading level={2} as="h1">
178
- This is visually a Heading level 2, but semantically an h1
179
- </Heading>
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/dist/types").ClassProp) | undefined) => string;
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 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;AASF,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":[]}
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 '@storybook/addon-docs/blocks';
1
+ import { Canvas, Meta, Controls } from "@storybook/addon-docs/blocks";
2
2
 
3
- import * as IconStories from './Icon.stories';
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
- return (
20
- <Icon
21
- icon={<CloseIcon />}
22
- label="Close icon"
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
- additionalActions={[
33
- {
34
- title: 'Open in GitHub',
35
- onClick: () => {
36
- window.open(
37
- 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/Icon/Icon.tsx',
38
- '_blank'
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
- return (
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
- return (
77
- <Icon
78
- icon={<CloseIcon />}
79
- label="This is an icon"
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
- return (
100
- <div className="fill-success">
101
- <Icon
102
- icon={<CloseIcon />}
103
- label="This is an icon"
104
- size="md"
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
- return (
123
- <Icon
124
- icon={<CloseIcon />}
125
- label="This is an icon"
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
- return (
144
- <Icon
145
- icon={<CloseIcon />}
146
- label="This is an icon"
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
- return (
165
- <Icon
166
- icon={<CloseIcon />}
167
- label="This is an icon"
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
- return (
186
- <div className="bg-neutral-disabled p-3xl rounded-md">
187
- <Icon
188
- icon={<CloseIcon />}
189
- label="This is an icon"
190
- size="md"
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
- return (
209
- <div className="bg-neutral-dark p-3xl rounded-md">
210
- <Icon
211
- icon={<CloseIcon />}
212
- label="This is an icon"
213
- size="md"
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
- return (
232
- <div className="bg-neutral-dark p-3xl rounded-md">
233
- <Icon
234
- icon={<CloseIcon />}
235
- label="This is an icon"
236
- size="md"
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
- return (
257
- <Icon
258
- icon={<CloseIcon />}
259
- label="This is an icon"
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
- return (
278
- <Icon
279
- icon={<CloseIcon />}
280
- label="This is an icon"
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
- return (
299
- <Icon
300
- icon={<CloseIcon />}
301
- label="This is an icon"
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
- return (
320
- <Icon
321
- icon={<CloseIcon />}
322
- label="This is an icon"
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
-