@webiny/admin-ui 6.2.0-beta.0 → 6.3.0-beta.0

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 IconPickerStories from './IconPicker.stories';
3
+ import * as IconPickerStories from "./IconPicker.stories";
4
4
 
5
5
  <Meta of={IconPickerStories} />
6
6
 
@@ -20,8 +20,8 @@ import { fas } from "@fortawesome/free-solid-svg-icons";
20
20
  library.add(fas as any);
21
21
 
22
22
  const IconPickerExample = () => {
23
- const [selectedIcon, setSelectedIcon] = useState("");
24
- const [validation, setValidation] = useState({ isValid: true, message: "" });
23
+ const [selectedIcon, setSelectedIcon] = useState("");
24
+ const [validation, setValidation] = useState({ isValid: true, message: "" });
25
25
 
26
26
  const handleChange = (newIcon: string) => {
27
27
  setSelectedIcon(newIcon);
@@ -52,22 +52,23 @@ const IconPickerExample = () => {
52
52
  validation={validation}
53
53
  />
54
54
  );
55
+
55
56
  };
56
57
 
57
58
  export default IconPickerExample;
58
59
 
59
60
  ` } }
60
- additionalActions={[
61
- {
62
- title: 'Open in GitHub',
63
- onClick: () => {
64
- window.open(
65
- 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/IconPicker/IconPicker.tsx',
66
- '_blank'
67
- );
68
- },
69
- }
70
- ]}
61
+ additionalActions={[
62
+ {
63
+ title: 'Open in GitHub',
64
+ onClick: () => {
65
+ window.open(
66
+ 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/IconPicker/IconPicker.tsx',
67
+ '_blank'
68
+ );
69
+ },
70
+ }
71
+ ]}
71
72
  />
72
73
 
73
74
  <Controls of={IconPickerStories.Documentation} exclude={"onChange"} />
@@ -82,38 +83,39 @@ import { fas } from "@fortawesome/free-solid-svg-icons";
82
83
  library.add(fas as any);
83
84
 
84
85
  const IconPickerExample = () => {
85
- const [selectedIcon, setSelectedIcon] = useState("");
86
- const [validation, setValidation] = useState({ isValid: true, message: "" });
87
-
88
- const handleChange = (newIcon: string) => {
89
- setSelectedIcon(newIcon);
90
-
91
- if (!newIcon && true) { // true represents required field
92
- setValidation({ isValid: false, message: "Please select an icon" });
93
- } else {
94
- setValidation({ isValid: true, message: "" });
95
- }
96
- };
97
-
98
- return (
99
- <IconPicker
100
- label="Select an Icon"
101
- description="Choose an icon for your button"
102
- note="Note: The selected icon will be displayed on your button"
103
- required={true}
104
- icons={[
105
- { prefix: "fas", name: "trash-restore-alt" },
106
- { prefix: "fas", name: "file-pen" },
107
- { prefix: "fas", name: "receipt" },
108
- { prefix: "fas", name: "user-circle" },
109
- { prefix: "fas", name: "circle-user" }
110
- // Add more icons as needed
111
- ]}
112
- value={selectedIcon}
113
- onChange={handleChange}
114
- validation={validation}
115
- />
116
- );
86
+ const [selectedIcon, setSelectedIcon] = useState("");
87
+ const [validation, setValidation] = useState({ isValid: true, message: "" });
88
+
89
+ const handleChange = (newIcon: string) => {
90
+ setSelectedIcon(newIcon);
91
+
92
+ if (!newIcon && true) {
93
+ // true represents required field
94
+ setValidation({ isValid: false, message: "Please select an icon" });
95
+ } else {
96
+ setValidation({ isValid: true, message: "" });
97
+ }
98
+ };
99
+
100
+ return (
101
+ <IconPicker
102
+ label="Select an Icon"
103
+ description="Choose an icon for your button"
104
+ note="Note: The selected icon will be displayed on your button"
105
+ required={true}
106
+ icons={[
107
+ { prefix: "fas", name: "trash-restore-alt" },
108
+ { prefix: "fas", name: "file-pen" },
109
+ { prefix: "fas", name: "receipt" },
110
+ { prefix: "fas", name: "user-circle" },
111
+ { prefix: "fas", name: "circle-user" }
112
+ // Add more icons as needed
113
+ ]}
114
+ value={selectedIcon}
115
+ onChange={handleChange}
116
+ validation={validation}
117
+ />
118
+ );
117
119
  };
118
120
 
119
121
  export default IconPickerExample;
@@ -146,29 +148,29 @@ const definitions = (library as any).definitions;
146
148
  const allIcons: IconPickerIconDto[] = [];
147
149
 
148
150
  Object.keys(definitions)
149
- .filter((pack): pack is IconPrefix => validPrefixes.includes(pack as IconPrefix))
150
- .forEach((prefix) => {
151
- const icons = definitions[prefix];
152
- Object.keys(icons).forEach((icon) => {
153
- allIcons.push({
154
- prefix,
155
- name: icon as IconName
156
- });
157
- });
151
+ .filter((pack): pack is IconPrefix => validPrefixes.includes(pack as IconPrefix))
152
+ .forEach(prefix => {
153
+ const icons = definitions[prefix];
154
+ Object.keys(icons).forEach(icon => {
155
+ allIcons.push({
156
+ prefix,
157
+ name: icon as IconName
158
+ });
158
159
  });
160
+ });
159
161
  ```
160
162
 
161
163
  You can then pass the `allIcons` array to the `IconPicker` component:
162
164
 
163
165
  ```tsx
164
166
  <IconPicker
165
- label="Select an Icon"
166
- description="Choose an icon for your button"
167
- note="Note: The selected icon will be displayed on your button"
168
- required={true}
169
- icons={allIcons}
170
- value={selectedIcon}
171
- onChange={handleChange}
172
- validation={validation}
167
+ label="Select an Icon"
168
+ description="Choose an icon for your button"
169
+ note="Note: The selected icon will be displayed on your button"
170
+ required={true}
171
+ icons={allIcons}
172
+ value={selectedIcon}
173
+ onChange={handleChange}
174
+ validation={validation}
173
175
  />
174
176
  ```
@@ -5,7 +5,7 @@ import type { IconPickerIconDto } from "../domains/index.js";
5
5
  declare const iconPickerVariants: (props?: ({
6
6
  size?: "md" | "lg" | "xl" | null | undefined;
7
7
  disabled?: boolean | null | undefined;
8
- } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
8
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  interface IconPickerPrimitiveProps extends VariantProps<typeof iconPickerVariants> {
10
10
  /**
11
11
  * Indicates if the field is disabled.
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { type VariantProps } from "../../../utils.js";
3
3
  declare const iconPickerTriggerVariants: (props?: ({
4
4
  size?: "md" | "lg" | "xl" | null | undefined;
5
- } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  interface IconPickerTriggerProps extends VariantProps<typeof iconPickerTriggerVariants> {
7
7
  value?: string;
8
8
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","Image","rest","finalProps","srcSet","Object","keys","map","key","join","createElement"],"sources":["Image.tsx"],"sourcesContent":["import React from \"react\";\n\n// Accepts all props that a normal <img> element would accept.\ninterface ImageProps\n extends React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {\n [key: string]: any;\n}\n\nconst Image = ({ ...rest }: ImageProps) => {\n const finalProps = { ...rest };\n const srcSet = finalProps.srcSet;\n if (srcSet && typeof srcSet === \"object\") {\n finalProps.srcSet = Object.keys(srcSet)\n .map(key => `${srcSet[key]} ${key}`)\n .join(\", \");\n }\n\n return <img {...finalProps} />;\n};\n\nexport { Image, type ImageProps };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAMA,MAAMC,KAAK,GAAGA,CAAC;EAAE,GAAGC;AAAiB,CAAC,KAAK;EACvC,MAAMC,UAAU,GAAG;IAAE,GAAGD;EAAK,CAAC;EAC9B,MAAME,MAAM,GAAGD,UAAU,CAACC,MAAM;EAChC,IAAIA,MAAM,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;IACtCD,UAAU,CAACC,MAAM,GAAGC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CAClCG,GAAG,CAACC,GAAG,IAAI,GAAGJ,MAAM,CAACI,GAAG,CAAC,IAAIA,GAAG,EAAE,CAAC,CACnCC,IAAI,CAAC,IAAI,CAAC;EACnB;EAEA,oBAAOT,KAAA,CAAAU,aAAA,QAASP,UAAa,CAAC;AAClC,CAAC;AAED,SAASF,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["React","Image","rest","finalProps","srcSet","Object","keys","map","key","join","createElement"],"sources":["Image.tsx"],"sourcesContent":["import React from \"react\";\n\n// Accepts all props that a normal <img> element would accept.\ninterface ImageProps extends React.DetailedHTMLProps<\n React.ImgHTMLAttributes<HTMLImageElement>,\n HTMLImageElement\n> {\n [key: string]: any;\n}\n\nconst Image = ({ ...rest }: ImageProps) => {\n const finalProps = { ...rest };\n const srcSet = finalProps.srcSet;\n if (srcSet && typeof srcSet === \"object\") {\n finalProps.srcSet = Object.keys(srcSet)\n .map(key => `${srcSet[key]} ${key}`)\n .join(\", \");\n }\n\n return <img {...finalProps} />;\n};\n\nexport { Image, type ImageProps };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAQA,MAAMC,KAAK,GAAGA,CAAC;EAAE,GAAGC;AAAiB,CAAC,KAAK;EACvC,MAAMC,UAAU,GAAG;IAAE,GAAGD;EAAK,CAAC;EAC9B,MAAME,MAAM,GAAGD,UAAU,CAACC,MAAM;EAChC,IAAIA,MAAM,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;IACtCD,UAAU,CAACC,MAAM,GAAGC,MAAM,CAACC,IAAI,CAACF,MAAM,CAAC,CAClCG,GAAG,CAACC,GAAG,IAAI,GAAGJ,MAAM,CAACI,GAAG,CAAC,IAAIA,GAAG,EAAE,CAAC,CACnCC,IAAI,CAAC,IAAI,CAAC;EACnB;EAEA,oBAAOT,KAAA,CAAAU,aAAA,QAASP,UAAa,CAAC;AAClC,CAAC;AAED,SAASF,KAAK","ignoreList":[]}
package/Input/Input.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 InputStories from './Input.stories';
3
+ import * as InputStories from "./Input.stories";
4
4
 
5
5
  <Meta of={InputStories} />
6
6
 
@@ -16,8 +16,8 @@ import React, { useState } from "react";
16
16
  import { Input } from "@webiny/admin-ui";
17
17
 
18
18
  const InputExample = () => {
19
- const [value, setValue] = useState("");
20
- const [validation, setValidation] = useState({ isValid: true, message: "" });
19
+ const [value, setValue] = useState("");
20
+ const [validation, setValidation] = useState({ isValid: true, message: "" });
21
21
 
22
22
  const handleValidation = () => {
23
23
  if (!value.trim()) {
@@ -46,25 +46,26 @@ const InputExample = () => {
46
46
  />
47
47
  </div>
48
48
  );
49
+
49
50
  };
50
51
 
51
52
  export default InputExample;
52
53
 
53
54
  ` } }
54
- additionalActions={[
55
- {
56
- title: 'Open in GitHub',
57
- onClick: () => {
58
- window.open(
59
- 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/Input/Input.tsx',
60
- '_blank'
61
- );
62
- },
63
- }
64
- ]}
55
+ additionalActions={[
56
+ {
57
+ title: 'Open in GitHub',
58
+ onClick: () => {
59
+ window.open(
60
+ 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/Input/Input.tsx',
61
+ '_blank'
62
+ );
63
+ },
64
+ }
65
+ ]}
65
66
  />
66
67
 
67
- <Controls of={InputStories.Documentation}/>
68
+ <Controls of={InputStories.Documentation} />
68
69
 
69
70
  ```jsx
70
71
  import React, { useState } from "react";
@@ -72,36 +73,36 @@ import React, { useState } from "react";
72
73
  import { Input } from "@webiny/admin-ui";
73
74
 
74
75
  const InputExample = () => {
75
- const [value, setValue] = useState("");
76
- const [validation, setValidation] = useState({ isValid: true, message: "" });
77
-
78
- const handleValidation = () => {
79
- if (!value.trim()) {
80
- setValidation({ isValid: false, message: "This field is required" });
81
- } else if (value.trim().length < 3) {
82
- setValidation({ isValid: false, message: "Must be at least 3 characters long" });
83
- } else {
84
- setValidation({ isValid: true, message: "" });
85
- }
86
- };
87
-
88
- return (
89
- <div>
90
- <Input
91
- type="text"
92
- label="Full Name"
93
- description="Enter your full name as it appears on your ID"
94
- note="This will be used for official documentation"
95
- placeholder="Enter your full name"
96
- required={true}
97
- value={value}
98
- validation={validation}
99
- onChange={newValue => setValue(newValue)}
100
- onBlur={handleValidation}
101
- onEnter={handleValidation}
102
- />
103
- </div>
104
- );
76
+ const [value, setValue] = useState("");
77
+ const [validation, setValidation] = useState({ isValid: true, message: "" });
78
+
79
+ const handleValidation = () => {
80
+ if (!value.trim()) {
81
+ setValidation({ isValid: false, message: "This field is required" });
82
+ } else if (value.trim().length < 3) {
83
+ setValidation({ isValid: false, message: "Must be at least 3 characters long" });
84
+ } else {
85
+ setValidation({ isValid: true, message: "" });
86
+ }
87
+ };
88
+
89
+ return (
90
+ <div>
91
+ <Input
92
+ type="text"
93
+ label="Full Name"
94
+ description="Enter your full name as it appears on your ID"
95
+ note="This will be used for official documentation"
96
+ placeholder="Enter your full name"
97
+ required={true}
98
+ value={value}
99
+ validation={validation}
100
+ onChange={newValue => setValue(newValue)}
101
+ onBlur={handleValidation}
102
+ onEnter={handleValidation}
103
+ />
104
+ </div>
105
+ );
105
106
  };
106
107
 
107
108
  export default InputExample;
@@ -110,6 +111,7 @@ export default InputExample;
110
111
  ## Examples
111
112
 
112
113
  ### With Validate Function
114
+
113
115
  The Input component supports validation using the validation prop, as shown in the example above.
114
116
  For more complex or reusable validation scenarios, you can use the validate prop, which accepts a custom validation function.
115
117
  Try entering **exists@** in the input box to see it in action, and click on **Show code** to view the validation function.
@@ -120,8 +122,8 @@ import React, { useState } from "react";
120
122
  import { Input } from "@webiny/admin-ui";
121
123
 
122
124
  const EmailInput = () => {
123
- const [value, setValue] = useState("");
124
- const [validation, setValidation] = useState({ isValid: true, message: undefined });
125
+ const [value, setValue] = useState("");
126
+ const [validation, setValidation] = useState({ isValid: true, message: undefined });
125
127
 
126
128
  const validate = async () => {
127
129
  // Simulate API call delay
@@ -146,33 +148,42 @@ const EmailInput = () => {
146
148
  validation={validation}
147
149
  />
148
150
  );
151
+
149
152
  };` } }
150
153
  />
151
154
 
152
155
  ## Anatomy
153
156
 
154
157
  ### Input Anatomy
155
- <img src="/images/storybook/input/anatomy.png" alt="Input Anatomy"/>
158
+
159
+ <img src="/images/storybook/input/anatomy.png" alt="Input Anatomy" />
156
160
 
157
161
  ### Styles
158
- <img src="/images/storybook/input/styles.png" alt="Styles"/>
162
+
163
+ <img src="/images/storybook/input/styles.png" alt="Styles" />
159
164
 
160
165
  ### Field Size
161
- <img src="/images/storybook/input/field-size.png" alt="Field Size"/>
166
+
167
+ <img src="/images/storybook/input/field-size.png" alt="Field Size" />
162
168
 
163
169
  ### States and Styles
164
- <img src="/images/storybook/input/states-and-styles.png" alt="States and Styles"/>
170
+
171
+ <img src="/images/storybook/input/states-and-styles.png" alt="States and Styles" />
165
172
 
166
173
  ### Label Anatomy
167
- <img src="/images/storybook/input/label-anatomy.png" alt="Label Anatomy"/>
174
+
175
+ <img src="/images/storybook/input/label-anatomy.png" alt="Label Anatomy" />
168
176
 
169
177
  ### Label Properties
170
- <img src="/images/storybook/input/label-properties.png" alt="Label Properties"/>
178
+
179
+ <img src="/images/storybook/input/label-properties.png" alt="Label Properties" />
171
180
 
172
181
  ### Label Options
173
- <img src="/images/storybook/input/label-options.png" alt="Label Options"/>
182
+
183
+ <img src="/images/storybook/input/label-options.png" alt="Label Options" />
174
184
 
175
185
  ## Usage
176
186
 
177
187
  ### Used in forms
178
- <img src="/images/storybook/input/used-in-forms.png" alt="Used in forms"/>
188
+
189
+ <img src="/images/storybook/input/used-in-forms.png" alt="Used in forms" />
@@ -17,7 +17,7 @@ declare const inputVariants: (props?: ({
17
17
  size?: "md" | "lg" | "xl" | null | undefined;
18
18
  variant?: "primary" | "secondary" | "ghost" | "ghost-negative" | null | undefined;
19
19
  invalid?: boolean | null | undefined;
20
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
20
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
21
21
  type InputPrimitiveProps<TValue = any> = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> & VariantProps<typeof inputVariants> & {
22
22
  /**
23
23
  * Icon to be displayed at the start of the input field.
package/Label/Label.d.ts CHANGED
@@ -5,7 +5,7 @@ declare const labelVariants: (props?: ({
5
5
  weight?: "strong" | "light" | null | undefined;
6
6
  disabled?: boolean | null | undefined;
7
7
  invalid?: boolean | null | undefined;
8
- } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
8
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  interface LabelProps extends Omit<React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>, "children">, VariantProps<typeof labelVariants> {
10
10
  text: React.ReactNode;
11
11
  value?: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"names":["React","Label","LabelPrimitive","cn","makeDecoratable","cva","LabelDescription","LabelHint","LabelRequired","LabelValue","useAdminUi","labelVariants","variants","weight","strong","light","disabled","true","invalid","defaultVariants","LabelBase","className","description","hint","required","value","text","props","compileMarkdown","createElement","Root","Object","assign","content"],"sources":["Label.tsx"],"sourcesContent":["import React from \"react\";\nimport { Label as LabelPrimitive } from \"radix-ui\";\nimport { cn, makeDecoratable, cva, type VariantProps } from \"~/utils.js\";\nimport { LabelDescription, LabelHint, LabelRequired, LabelValue } from \"./components/index.js\";\nimport { useAdminUi } from \"~/AdminUiProvider/index.js\";\n\nconst labelVariants = cva(\n [\n \"inline-flex items-center justify-between w-full text-sm\",\n \"text-neutral-primary whitespace-nowrap\",\n \"peer-disabled:text-neutral-disabled peer-disabled:cursor-not-allowed\"\n ],\n {\n variants: {\n weight: {\n strong: \"font-semibold\",\n light: \"font-regular\"\n },\n disabled: {\n true: \"text-neutral-disabled cursor-not-allowed\"\n },\n invalid: {\n true: \"webiny_label-invalid\"\n }\n },\n defaultVariants: {\n weight: \"strong\"\n }\n }\n);\n\ninterface LabelProps\n extends Omit<React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>, \"children\">,\n VariantProps<typeof labelVariants> {\n text: React.ReactNode;\n value?: React.ReactNode;\n description?: React.ReactNode;\n hint?: React.ReactNode;\n required?: boolean;\n disabled?: boolean;\n}\n\nconst LabelBase = ({\n className,\n disabled,\n description,\n hint,\n required,\n value,\n text,\n weight,\n invalid,\n ...props\n}: LabelProps) => {\n const { compileMarkdown } = useAdminUi();\n\n if (!text) {\n return null;\n }\n\n return (\n <LabelPrimitive.Root\n className={cn(labelVariants({ weight, disabled, invalid }), className)}\n {...props}\n >\n <span>\n <span className={\"flex items-center gap-xxs\"}>\n <span className={\"webiny_label-text\"}>{text}</span>\n {description && (\n <LabelDescription\n content={compileMarkdown(description)}\n disabled={disabled}\n />\n )}\n {hint && <LabelHint content={compileMarkdown(hint)} />}\n {required && <LabelRequired disabled={disabled} />}\n </span>\n </span>\n {value && <LabelValue value={value} weight={weight} disabled={disabled} />}\n </LabelPrimitive.Root>\n );\n};\n\nconst Label = makeDecoratable(\"Label\", LabelBase);\n\nexport { Label, type LabelProps };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,IAAIC,cAAc,QAAQ,UAAU;AAClD,SAASC,EAAE,EAAEC,eAAe,EAAEC,GAAG;AACjC,SAASC,gBAAgB,EAAEC,SAAS,EAAEC,aAAa,EAAEC,UAAU;AAC/D,SAASC,UAAU;AAEnB,MAAMC,aAAa,GAAGN,GAAG,CACrB,CACI,yDAAyD,EACzD,wCAAwC,EACxC,sEAAsE,CACzE,EACD;EACIO,QAAQ,EAAE;IACNC,MAAM,EAAE;MACJC,MAAM,EAAE,eAAe;MACvBC,KAAK,EAAE;IACX,CAAC;IACDC,QAAQ,EAAE;MACNC,IAAI,EAAE;IACV,CAAC;IACDC,OAAO,EAAE;MACLD,IAAI,EAAE;IACV;EACJ,CAAC;EACDE,eAAe,EAAE;IACbN,MAAM,EAAE;EACZ;AACJ,CACJ,CAAC;AAaD,MAAMO,SAAS,GAAGA,CAAC;EACfC,SAAS;EACTL,QAAQ;EACRM,WAAW;EACXC,IAAI;EACJC,QAAQ;EACRC,KAAK;EACLC,IAAI;EACJb,MAAM;EACNK,OAAO;EACP,GAAGS;AACK,CAAC,KAAK;EACd,MAAM;IAAEC;EAAgB,CAAC,GAAGlB,UAAU,CAAC,CAAC;EAExC,IAAI,CAACgB,IAAI,EAAE;IACP,OAAO,IAAI;EACf;EAEA,oBACI1B,KAAA,CAAA6B,aAAA,CAAC3B,cAAc,CAAC4B,IAAI,EAAAC,MAAA,CAAAC,MAAA;IAChBX,SAAS,EAAElB,EAAE,CAACQ,aAAa,CAAC;MAAEE,MAAM;MAAEG,QAAQ;MAAEE;IAAQ,CAAC,CAAC,EAAEG,SAAS;EAAE,GACnEM,KAAK,gBAET3B,KAAA,CAAA6B,aAAA,4BACI7B,KAAA,CAAA6B,aAAA;IAAMR,SAAS,EAAE;EAA4B,gBACzCrB,KAAA,CAAA6B,aAAA;IAAMR,SAAS,EAAE;EAAoB,GAAEK,IAAW,CAAC,EAClDJ,WAAW,iBACRtB,KAAA,CAAA6B,aAAA,CAACvB,gBAAgB;IACb2B,OAAO,EAAEL,eAAe,CAACN,WAAW,CAAE;IACtCN,QAAQ,EAAEA;EAAS,CACtB,CACJ,EACAO,IAAI,iBAAIvB,KAAA,CAAA6B,aAAA,CAACtB,SAAS;IAAC0B,OAAO,EAAEL,eAAe,CAACL,IAAI;EAAE,CAAE,CAAC,EACrDC,QAAQ,iBAAIxB,KAAA,CAAA6B,aAAA,CAACrB,aAAa;IAACQ,QAAQ,EAAEA;EAAS,CAAE,CAC/C,CACJ,CAAC,EACNS,KAAK,iBAAIzB,KAAA,CAAA6B,aAAA,CAACpB,UAAU;IAACgB,KAAK,EAAEA,KAAM;IAACZ,MAAM,EAAEA,MAAO;IAACG,QAAQ,EAAEA;EAAS,CAAE,CACxD,CAAC;AAE9B,CAAC;AAED,MAAMf,KAAK,GAAGG,eAAe,CAAC,OAAO,EAAEgB,SAAS,CAAC;AAEjD,SAASnB,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["React","Label","LabelPrimitive","cn","makeDecoratable","cva","LabelDescription","LabelHint","LabelRequired","LabelValue","useAdminUi","labelVariants","variants","weight","strong","light","disabled","true","invalid","defaultVariants","LabelBase","className","description","hint","required","value","text","props","compileMarkdown","createElement","Root","Object","assign","content"],"sources":["Label.tsx"],"sourcesContent":["import React from \"react\";\nimport { Label as LabelPrimitive } from \"radix-ui\";\nimport { cn, makeDecoratable, cva, type VariantProps } from \"~/utils.js\";\nimport { LabelDescription, LabelHint, LabelRequired, LabelValue } from \"./components/index.js\";\nimport { useAdminUi } from \"~/AdminUiProvider/index.js\";\n\nconst labelVariants = cva(\n [\n \"inline-flex items-center justify-between w-full text-sm\",\n \"text-neutral-primary whitespace-nowrap\",\n \"peer-disabled:text-neutral-disabled peer-disabled:cursor-not-allowed\"\n ],\n {\n variants: {\n weight: {\n strong: \"font-semibold\",\n light: \"font-regular\"\n },\n disabled: {\n true: \"text-neutral-disabled cursor-not-allowed\"\n },\n invalid: {\n true: \"webiny_label-invalid\"\n }\n },\n defaultVariants: {\n weight: \"strong\"\n }\n }\n);\n\ninterface LabelProps\n extends\n Omit<React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>, \"children\">,\n VariantProps<typeof labelVariants> {\n text: React.ReactNode;\n value?: React.ReactNode;\n description?: React.ReactNode;\n hint?: React.ReactNode;\n required?: boolean;\n disabled?: boolean;\n}\n\nconst LabelBase = ({\n className,\n disabled,\n description,\n hint,\n required,\n value,\n text,\n weight,\n invalid,\n ...props\n}: LabelProps) => {\n const { compileMarkdown } = useAdminUi();\n\n if (!text) {\n return null;\n }\n\n return (\n <LabelPrimitive.Root\n className={cn(labelVariants({ weight, disabled, invalid }), className)}\n {...props}\n >\n <span>\n <span className={\"flex items-center gap-xxs\"}>\n <span className={\"webiny_label-text\"}>{text}</span>\n {description && (\n <LabelDescription\n content={compileMarkdown(description)}\n disabled={disabled}\n />\n )}\n {hint && <LabelHint content={compileMarkdown(hint)} />}\n {required && <LabelRequired disabled={disabled} />}\n </span>\n </span>\n {value && <LabelValue value={value} weight={weight} disabled={disabled} />}\n </LabelPrimitive.Root>\n );\n};\n\nconst Label = makeDecoratable(\"Label\", LabelBase);\n\nexport { Label, type LabelProps };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,IAAIC,cAAc,QAAQ,UAAU;AAClD,SAASC,EAAE,EAAEC,eAAe,EAAEC,GAAG;AACjC,SAASC,gBAAgB,EAAEC,SAAS,EAAEC,aAAa,EAAEC,UAAU;AAC/D,SAASC,UAAU;AAEnB,MAAMC,aAAa,GAAGN,GAAG,CACrB,CACI,yDAAyD,EACzD,wCAAwC,EACxC,sEAAsE,CACzE,EACD;EACIO,QAAQ,EAAE;IACNC,MAAM,EAAE;MACJC,MAAM,EAAE,eAAe;MACvBC,KAAK,EAAE;IACX,CAAC;IACDC,QAAQ,EAAE;MACNC,IAAI,EAAE;IACV,CAAC;IACDC,OAAO,EAAE;MACLD,IAAI,EAAE;IACV;EACJ,CAAC;EACDE,eAAe,EAAE;IACbN,MAAM,EAAE;EACZ;AACJ,CACJ,CAAC;AAcD,MAAMO,SAAS,GAAGA,CAAC;EACfC,SAAS;EACTL,QAAQ;EACRM,WAAW;EACXC,IAAI;EACJC,QAAQ;EACRC,KAAK;EACLC,IAAI;EACJb,MAAM;EACNK,OAAO;EACP,GAAGS;AACK,CAAC,KAAK;EACd,MAAM;IAAEC;EAAgB,CAAC,GAAGlB,UAAU,CAAC,CAAC;EAExC,IAAI,CAACgB,IAAI,EAAE;IACP,OAAO,IAAI;EACf;EAEA,oBACI1B,KAAA,CAAA6B,aAAA,CAAC3B,cAAc,CAAC4B,IAAI,EAAAC,MAAA,CAAAC,MAAA;IAChBX,SAAS,EAAElB,EAAE,CAACQ,aAAa,CAAC;MAAEE,MAAM;MAAEG,QAAQ;MAAEE;IAAQ,CAAC,CAAC,EAAEG,SAAS;EAAE,GACnEM,KAAK,gBAET3B,KAAA,CAAA6B,aAAA,4BACI7B,KAAA,CAAA6B,aAAA;IAAMR,SAAS,EAAE;EAA4B,gBACzCrB,KAAA,CAAA6B,aAAA;IAAMR,SAAS,EAAE;EAAoB,GAAEK,IAAW,CAAC,EAClDJ,WAAW,iBACRtB,KAAA,CAAA6B,aAAA,CAACvB,gBAAgB;IACb2B,OAAO,EAAEL,eAAe,CAACN,WAAW,CAAE;IACtCN,QAAQ,EAAEA;EAAS,CACtB,CACJ,EACAO,IAAI,iBAAIvB,KAAA,CAAA6B,aAAA,CAACtB,SAAS;IAAC0B,OAAO,EAAEL,eAAe,CAACL,IAAI;EAAE,CAAE,CAAC,EACrDC,QAAQ,iBAAIxB,KAAA,CAAA6B,aAAA,CAACrB,aAAa;IAACQ,QAAQ,EAAEA;EAAS,CAAE,CAC/C,CACJ,CAAC,EACNS,KAAK,iBAAIzB,KAAA,CAAA6B,aAAA,CAACpB,UAAU;IAACgB,KAAK,EAAEA,KAAM;IAACZ,MAAM,EAAEA,MAAO;IAACG,QAAQ,EAAEA;EAAS,CAAE,CACxD,CAAC;AAE9B,CAAC;AAED,MAAMf,KAAK,GAAGG,eAAe,CAAC,OAAO,EAAEgB,SAAS,CAAC;AAEjD,SAASnB,KAAK","ignoreList":[]}
package/Label/Label.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 LabelStories from './Label.stories';
3
+ import * as LabelStories from "./Label.stories";
4
4
 
5
5
  <Meta of={LabelStories} />
6
6
 
@@ -12,7 +12,6 @@ The Label component is a fundamental UI element used to provide clear text descr
12
12
  It enhances usability by clearly identifying input fields and improves accessibility by properly associating labels with their corresponding form elements using htmlFor.
13
13
  The component supports a range of customization options, including descriptions, hints, required indicators, disabled and invalid states, and visual weight variants.
14
14
 
15
-
16
15
  ## Usage
17
16
 
18
17
  <Canvas of={LabelStories.Documentation} source={ { code: `
@@ -20,7 +19,7 @@ import React, { useState } from "react";
20
19
  import { Label, Input } from "@webiny/admin-ui";
21
20
 
22
21
  const LabelExample = () => {
23
- const [value, setValue] = useState("");
22
+ const [value, setValue] = useState("");
24
23
 
25
24
  return (
26
25
  <div className="mb-4 space-y-2">
@@ -47,22 +46,23 @@ const LabelExample = () => {
47
46
  />
48
47
  </div>
49
48
  );
49
+
50
50
  };
51
51
 
52
52
  export default LabelExample;
53
53
 
54
54
  ` } }
55
- additionalActions={[
56
- {
57
- title: 'Open in GitHub',
58
- onClick: () => {
59
- window.open(
60
- 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/Label/Label.tsx',
61
- '_blank'
62
- );
63
- },
64
- }
65
- ]}
55
+ additionalActions={[
56
+ {
57
+ title: 'Open in GitHub',
58
+ onClick: () => {
59
+ window.open(
60
+ 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/Label/Label.tsx',
61
+ '_blank'
62
+ );
63
+ },
64
+ }
65
+ ]}
66
66
  />
67
67
 
68
68
  <Controls of={LabelStories.Documentation} />
@@ -72,33 +72,33 @@ import React, { useState } from "react";
72
72
  import { Label, Input } from "@webiny/admin-ui";
73
73
 
74
74
  const LabelExample = () => {
75
- const [value, setValue] = useState("");
76
-
77
- return (
78
- <div className="mb-4 space-y-2">
79
- <Label
80
- id="full-name-label"
81
- htmlFor="full-name"
82
- text="Full Name"
83
- description="As shown on your government-issued ID"
84
- hint="Include middle name if applicable"
85
- required={true}
86
- value="Label value will be shown here"
87
- weight="strong"
88
- invalid={false}
89
- disabled={false}
90
- />
91
-
92
- <Input
93
- id="full-name"
94
- type="text"
95
- placeholder="e.g. John Michael Doe"
96
- required={true}
97
- value={value}
98
- onChange={(e) => setValue(e.target.value)}
99
- />
100
- </div>
101
- );
75
+ const [value, setValue] = useState("");
76
+
77
+ return (
78
+ <div className="mb-4 space-y-2">
79
+ <Label
80
+ id="full-name-label"
81
+ htmlFor="full-name"
82
+ text="Full Name"
83
+ description="As shown on your government-issued ID"
84
+ hint="Include middle name if applicable"
85
+ required={true}
86
+ value="Label value will be shown here"
87
+ weight="strong"
88
+ invalid={false}
89
+ disabled={false}
90
+ />
91
+
92
+ <Input
93
+ id="full-name"
94
+ type="text"
95
+ placeholder="e.g. John Michael Doe"
96
+ required={true}
97
+ value={value}
98
+ onChange={e => setValue(e.target.value)}
99
+ />
100
+ </div>
101
+ );
102
102
  };
103
103
 
104
104
  export default LabelExample;
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { type VariantProps } from "../../utils.js";
3
3
  declare const labelDescriptionVariants: (props?: ({
4
4
  disabled?: boolean | null | undefined;
5
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  interface LabelDescriptionProps extends VariantProps<typeof labelDescriptionVariants> {
7
7
  content: React.ReactNode;
8
8
  }
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { type VariantProps } from "../../utils.js";
3
3
  declare const labelRequiredVariants: (props?: ({
4
4
  disabled?: boolean | null | undefined;
5
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  type LabelRequiredProps = VariantProps<typeof labelRequiredVariants>;
7
7
  declare const LabelRequired: ({ disabled }: LabelRequiredProps) => React.JSX.Element;
8
8
  export { LabelRequired, type LabelRequiredProps };
@@ -3,7 +3,7 @@ import { type VariantProps } from "../../utils.js";
3
3
  declare const labelValueVariants: (props?: ({
4
4
  weight?: "strong" | "light" | null | undefined;
5
5
  disabled?: boolean | null | undefined;
6
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  interface LabelValueProps extends VariantProps<typeof labelValueVariants> {
8
8
  value: React.ReactNode;
9
9
  }
package/Link/Link.d.ts CHANGED
@@ -5,7 +5,7 @@ declare const linkVariants: (props?: ({
5
5
  size?: "sm" | "md" | "lg" | "xl" | "inherit" | null | undefined;
6
6
  variant?: "primary" | "secondary" | "primary-negative" | "secondary-negative" | null | undefined;
7
7
  underline?: boolean | null | undefined;
8
- } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;
8
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  export type LinkProps = LinkComponentProps & VariantProps<typeof linkVariants> & {
10
10
  disabled?: boolean;
11
11
  };