@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 CheckboxGroupStories from './CheckboxGroup.stories';
3
+ import * as CheckboxGroupStories from "./CheckboxGroup.stories";
4
4
 
5
5
  <Meta of={CheckboxGroupStories} />
6
6
 
@@ -18,8 +18,8 @@ import React, { useState } from "react";
18
18
  import { CheckboxGroup } from "@webiny/admin-ui";
19
19
 
20
20
  const CheckboxGroupExample = () => {
21
- const [selectedValues, setSelectedValues] = useState<string[]>([]);
22
- const [validation, setValidation] = useState({ isValid: true, message: "" });
21
+ const [selectedValues, setSelectedValues] = useState<string[]>([]);
22
+ const [validation, setValidation] = useState({ isValid: true, message: "" });
23
23
 
24
24
  const handleChange = (newValues: string[]) => {
25
25
  setSelectedValues(newValues);
@@ -50,25 +50,26 @@ const CheckboxGroupExample = () => {
50
50
  />
51
51
  </div>
52
52
  );
53
+
53
54
  };
54
55
 
55
56
  export default CheckboxGroupExample;
56
57
 
57
58
  ` } }
58
- additionalActions={[
59
- {
60
- title: 'Open in GitHub',
61
- onClick: () => {
62
- window.open(
63
- 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/CheckboxGroup/CheckboxGroup.tsx',
64
- '_blank'
65
- );
66
- },
67
- }
68
- ]}
59
+ additionalActions={[
60
+ {
61
+ title: 'Open in GitHub',
62
+ onClick: () => {
63
+ window.open(
64
+ 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/CheckboxGroup/CheckboxGroup.tsx',
65
+ '_blank'
66
+ );
67
+ },
68
+ }
69
+ ]}
69
70
  />
70
71
 
71
- <Controls of={CheckboxGroupStories.Documentation} exclude={"onChange"}/>
72
+ <Controls of={CheckboxGroupStories.Documentation} exclude={"onChange"} />
72
73
 
73
74
  ```tsx
74
75
  import React, { useState } from "react";
@@ -76,38 +77,38 @@ import React, { useState } from "react";
76
77
  import { CheckboxGroup } from "@webiny/admin-ui";
77
78
 
78
79
  const CheckboxGroupExample = () => {
79
- const [selectedValues, setSelectedValues] = useState<string[]>([]);
80
- const [validation, setValidation] = useState({ isValid: true, message: "" });
81
-
82
- const handleChange = (newValues: string[]) => {
83
- setSelectedValues(newValues);
84
-
85
- // Simple required validation
86
- if (!newValues || newValues.length === 0) {
87
- setValidation({ isValid: false, message: "Please select at least one option." });
88
- } else {
89
- setValidation({ isValid: true, message: "" });
90
- }
91
- };
92
-
93
- return (
94
- <div>
95
- <CheckboxGroup
96
- label="Select your preferences"
97
- description="Choose one or more options."
98
- note="Note: You can select multiple values."
99
- required={true}
100
- items={[
101
- { label: "Value 1", value: "value-1" },
102
- { label: "Value 2", value: "value-2" },
103
- { label: "Value 3", value: "value-3" }
104
- ]}
105
- value={selectedValues}
106
- onChange={handleChange}
107
- validation={validation}
108
- />
109
- </div>
110
- );
80
+ const [selectedValues, setSelectedValues] = useState<string[]>([]);
81
+ const [validation, setValidation] = useState({ isValid: true, message: "" });
82
+
83
+ const handleChange = (newValues: string[]) => {
84
+ setSelectedValues(newValues);
85
+
86
+ // Simple required validation
87
+ if (!newValues || newValues.length === 0) {
88
+ setValidation({ isValid: false, message: "Please select at least one option." });
89
+ } else {
90
+ setValidation({ isValid: true, message: "" });
91
+ }
92
+ };
93
+
94
+ return (
95
+ <div>
96
+ <CheckboxGroup
97
+ label="Select your preferences"
98
+ description="Choose one or more options."
99
+ note="Note: You can select multiple values."
100
+ required={true}
101
+ items={[
102
+ { label: "Value 1", value: "value-1" },
103
+ { label: "Value 2", value: "value-2" },
104
+ { label: "Value 3", value: "value-3" }
105
+ ]}
106
+ value={selectedValues}
107
+ onChange={handleChange}
108
+ validation={validation}
109
+ />
110
+ </div>
111
+ );
111
112
  };
112
113
 
113
114
  export default CheckboxGroupExample;
@@ -116,10 +117,7 @@ export default CheckboxGroupExample;
116
117
  ## Anatomy
117
118
 
118
119
  ### General
119
- Checkbox Group input enable users to select a single or multiple items from a list of offered choices. A checkbox input group organizes related checkbox input options together for better clarity and functionality.
120
-
121
- <img src="/images/storybook/checkbox-group/general.png" alt="General"/>
122
-
123
-
124
120
 
121
+ Checkbox Group input enable users to select a single or multiple items from a list of offered choices. A checkbox input group organizes related checkbox input options together for better clarity and functionality.
125
122
 
123
+ <img src="/images/storybook/checkbox-group/general.png" alt="General" />
@@ -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 CodeEditorStories from './CodeEditor.stories';
3
+ import * as CodeEditorStories from "./CodeEditor.stories";
4
4
 
5
5
  <Meta of={CodeEditorStories} />
6
6
 
@@ -15,8 +15,8 @@ import React, { useState } from "react";
15
15
  import { CodeEditor } from "@webiny/admin-ui";
16
16
 
17
17
  const CodeEditorExample = () => {
18
- const [code, setCode] = useState('{\\n "name": "example",\\n "version": "1.0.0"\\n}');
19
- const [validation, setValidation] = useState({ isValid: true, message: "" });
18
+ const [code, setCode] = useState('{\\n "name": "example",\\n "version": "1.0.0"\\n}');
19
+ const [validation, setValidation] = useState({ isValid: true, message: "" });
20
20
 
21
21
  const handleChange = (newCode: string) => {
22
22
  setCode(newCode);
@@ -42,58 +42,59 @@ const CodeEditorExample = () => {
42
42
  validation={validation}
43
43
  />
44
44
  );
45
+
45
46
  };
46
47
 
47
48
  export default CodeEditorExample;
48
49
 
49
50
  ` } }
50
- additionalActions={[
51
- {
52
- title: 'Open in GitHub',
53
- onClick: () => {
54
- window.open(
55
- 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/CodeEditor/CodeEditor.tsx',
56
- '_blank'
57
- );
58
- },
59
- }
60
- ]}
51
+ additionalActions={[
52
+ {
53
+ title: 'Open in GitHub',
54
+ onClick: () => {
55
+ window.open(
56
+ 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/CodeEditor/CodeEditor.tsx',
57
+ '_blank'
58
+ );
59
+ },
60
+ }
61
+ ]}
61
62
  />
62
63
 
63
- <Controls of={CodeEditorStories.Documentation} exclude={"onChange"}/>
64
+ <Controls of={CodeEditorStories.Documentation} exclude={"onChange"} />
64
65
 
65
66
  ```tsx
66
67
  import React, { useState } from "react";
67
68
  import { CodeEditor } from "@webiny/admin-ui";
68
69
 
69
70
  const CodeEditorExample = () => {
70
- const [code, setCode] = useState('{\n "name": "example",\n "version": "1.0.0"\n}');
71
- const [validation, setValidation] = useState({ isValid: true, message: "" });
72
-
73
- const handleChange = (newCode: string) => {
74
- setCode(newCode);
75
-
76
- // Simple required validation
77
- if (!newCode || newCode.trim() === "") {
78
- setValidation({ isValid: false, message: "This field is required" });
79
- } else {
80
- setValidation({ isValid: true, message: "" });
81
- }
82
- };
83
-
84
- return (
85
- <CodeEditor
86
- label="JSON Configuration"
87
- description="Enter your configuration in JSON format"
88
- note="Note: Make sure your JSON is valid"
89
- required={true}
90
- mode="json"
91
- theme="github"
92
- value={code}
93
- onChange={handleChange}
94
- validation={validation}
95
- />
96
- );
71
+ const [code, setCode] = useState('{\n "name": "example",\n "version": "1.0.0"\n}');
72
+ const [validation, setValidation] = useState({ isValid: true, message: "" });
73
+
74
+ const handleChange = (newCode: string) => {
75
+ setCode(newCode);
76
+
77
+ // Simple required validation
78
+ if (!newCode || newCode.trim() === "") {
79
+ setValidation({ isValid: false, message: "This field is required" });
80
+ } else {
81
+ setValidation({ isValid: true, message: "" });
82
+ }
83
+ };
84
+
85
+ return (
86
+ <CodeEditor
87
+ label="JSON Configuration"
88
+ description="Enter your configuration in JSON format"
89
+ note="Note: Make sure your JSON is valid"
90
+ required={true}
91
+ mode="json"
92
+ theme="github"
93
+ value={code}
94
+ onChange={handleChange}
95
+ validation={validation}
96
+ />
97
+ );
97
98
  };
98
99
 
99
100
  export default CodeEditorExample;
@@ -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 ColorPickerStories from './ColorPicker.stories';
3
+ import * as ColorPickerStories from "./ColorPicker.stories";
4
4
 
5
5
  <Meta of={ColorPickerStories} />
6
6
 
@@ -15,8 +15,8 @@ import React, { useState } from "react";
15
15
  import { ColorPicker } from "@webiny/admin-ui";
16
16
 
17
17
  const ColorPickerExample = () => {
18
- const [color, setColor] = useState("#4285F4");
19
- const [validation, setValidation] = useState({ isValid: true, message: "" });
18
+ const [color, setColor] = useState("#4285F4");
19
+ const [validation, setValidation] = useState({ isValid: true, message: "" });
20
20
 
21
21
  const handleChange = (newColor: string) => {
22
22
  setColor(newColor);
@@ -39,55 +39,56 @@ const ColorPickerExample = () => {
39
39
  validation={validation}
40
40
  />
41
41
  );
42
+
42
43
  };
43
44
 
44
45
  export default ColorPickerExample;
45
46
 
46
47
  ` } }
47
- additionalActions={[
48
- {
49
- title: 'Open in GitHub',
50
- onClick: () => {
51
- window.open(
52
- 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/ColorPicker/ColorPicker.tsx',
53
- '_blank'
54
- );
55
- },
56
- }
57
- ]}
48
+ additionalActions={[
49
+ {
50
+ title: 'Open in GitHub',
51
+ onClick: () => {
52
+ window.open(
53
+ 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/ColorPicker/ColorPicker.tsx',
54
+ '_blank'
55
+ );
56
+ },
57
+ }
58
+ ]}
58
59
  />
59
60
 
60
- <Controls of={ColorPickerStories.Documentation} exclude={"onChange"}/>
61
+ <Controls of={ColorPickerStories.Documentation} exclude={"onChange"} />
61
62
 
62
63
  ```tsx
63
64
  import React, { useState } from "react";
64
65
  import { ColorPicker } from "@webiny/admin-ui";
65
66
 
66
67
  const ColorPickerExample = () => {
67
- const [color, setColor] = useState("#4285F4");
68
- const [validation, setValidation] = useState({ isValid: true, message: "" });
69
-
70
- const handleChange = (newColor: string) => {
71
- setColor(newColor);
72
-
73
- if (!newColor) {
74
- setValidation({ isValid: false, message: "Please select a color" });
75
- } else {
76
- setValidation({ isValid: true, message: "" });
77
- }
78
- };
79
-
80
- return (
81
- <ColorPicker
82
- label="Brand Color"
83
- description="Select your primary brand color"
84
- note="Note: Choose a color that aligns with your brand identity"
85
- required={true}
86
- value={color}
87
- onChange={handleChange}
88
- validation={validation}
89
- />
90
- );
68
+ const [color, setColor] = useState("#4285F4");
69
+ const [validation, setValidation] = useState({ isValid: true, message: "" });
70
+
71
+ const handleChange = (newColor: string) => {
72
+ setColor(newColor);
73
+
74
+ if (!newColor) {
75
+ setValidation({ isValid: false, message: "Please select a color" });
76
+ } else {
77
+ setValidation({ isValid: true, message: "" });
78
+ }
79
+ };
80
+
81
+ return (
82
+ <ColorPicker
83
+ label="Brand Color"
84
+ description="Select your primary brand color"
85
+ note="Note: Choose a color that aligns with your brand identity"
86
+ required={true}
87
+ value={color}
88
+ onChange={handleChange}
89
+ validation={validation}
90
+ />
91
+ );
91
92
  };
92
93
 
93
94
  export default ColorPickerExample;
@@ -3,7 +3,7 @@ import { Command as CommandPrimitive } from "cmdk";
3
3
  import { type VariantProps } from "../../utils.js";
4
4
  declare const commandItemVariants: (props?: ({
5
5
  selected?: 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 ItemProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>, VariantProps<typeof commandItemVariants> {
8
8
  selected?: boolean;
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","ReactComponent","Check","Command","CommandPrimitive","cn","cva","commandItemVariants","variants","selected","true","Item","className","children","props","createElement","Object","assign"],"sources":["Item.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ReactComponent as Check } from \"@webiny/icons/check.svg\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\n\nconst commandItemVariants = cva(\n [\n \"flex items-center justify-between gap-sm-extra cursor-default select-none rounded-sm p-sm mx-sm text-md outline-none overflow-hidden\",\n \"bg-neutral-base text-neutral-primary fill-neutral-xstrong\",\n \"data-[disabled=true]:text-neutral-disabled data-[disabled=true]:cursor-not-allowed\",\n \"data-[selected=true]:bg-neutral-dimmed\"\n ],\n {\n variants: {\n selected: {\n true: \"font-semibold bg-neutral-dimmed\"\n }\n }\n }\n);\n\ninterface ItemProps\n extends React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>,\n VariantProps<typeof commandItemVariants> {\n selected?: boolean;\n}\n\nconst Item = ({ className, children, selected, ...props }: ItemProps) => (\n <CommandPrimitive.Item className={cn(commandItemVariants({ selected }), className)} {...props}>\n <span className={\"w-full overflow-hidden truncate whitespace-nowrap\"}>{children}</span>\n {selected ? <Check className=\"w-md h-md\" /> : null}\n </CommandPrimitive.Item>\n);\n\nexport { Item, type ItemProps };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,IAAIC,KAAK,QAAQ,yBAAyB;AACjE,SAASC,OAAO,IAAIC,gBAAgB,QAAQ,MAAM;AAClD,SAASC,EAAE,EAAEC,GAAG;AAEhB,MAAMC,mBAAmB,GAAGD,GAAG,CAC3B,CACI,sIAAsI,EACtI,2DAA2D,EAC3D,oFAAoF,EACpF,wCAAwC,CAC3C,EACD;EACIE,QAAQ,EAAE;IACNC,QAAQ,EAAE;MACNC,IAAI,EAAE;IACV;EACJ;AACJ,CACJ,CAAC;AAQD,MAAMC,IAAI,GAAGA,CAAC;EAAEC,SAAS;EAAEC,QAAQ;EAAEJ,QAAQ;EAAE,GAAGK;AAAiB,CAAC,kBAChEd,KAAA,CAAAe,aAAA,CAACX,gBAAgB,CAACO,IAAI,EAAAK,MAAA,CAAAC,MAAA;EAACL,SAAS,EAAEP,EAAE,CAACE,mBAAmB,CAAC;IAAEE;EAAS,CAAC,CAAC,EAAEG,SAAS;AAAE,GAAKE,KAAK,gBACzFd,KAAA,CAAAe,aAAA;EAAMH,SAAS,EAAE;AAAoD,GAAEC,QAAe,CAAC,EACtFJ,QAAQ,gBAAGT,KAAA,CAAAe,aAAA,CAACb,KAAK;EAACU,SAAS,EAAC;AAAW,CAAE,CAAC,GAAG,IAC3B,CAC1B;AAED,SAASD,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["React","ReactComponent","Check","Command","CommandPrimitive","cn","cva","commandItemVariants","variants","selected","true","Item","className","children","props","createElement","Object","assign"],"sources":["Item.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ReactComponent as Check } from \"@webiny/icons/check.svg\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\n\nconst commandItemVariants = cva(\n [\n \"flex items-center justify-between gap-sm-extra cursor-default select-none rounded-sm p-sm mx-sm text-md outline-none overflow-hidden\",\n \"bg-neutral-base text-neutral-primary fill-neutral-xstrong\",\n \"data-[disabled=true]:text-neutral-disabled data-[disabled=true]:cursor-not-allowed\",\n \"data-[selected=true]:bg-neutral-dimmed\"\n ],\n {\n variants: {\n selected: {\n true: \"font-semibold bg-neutral-dimmed\"\n }\n }\n }\n);\n\ninterface ItemProps\n extends\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>,\n VariantProps<typeof commandItemVariants> {\n selected?: boolean;\n}\n\nconst Item = ({ className, children, selected, ...props }: ItemProps) => (\n <CommandPrimitive.Item className={cn(commandItemVariants({ selected }), className)} {...props}>\n <span className={\"w-full overflow-hidden truncate whitespace-nowrap\"}>{children}</span>\n {selected ? <Check className=\"w-md h-md\" /> : null}\n </CommandPrimitive.Item>\n);\n\nexport { Item, type ItemProps };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,IAAIC,KAAK,QAAQ,yBAAyB;AACjE,SAASC,OAAO,IAAIC,gBAAgB,QAAQ,MAAM;AAClD,SAASC,EAAE,EAAEC,GAAG;AAEhB,MAAMC,mBAAmB,GAAGD,GAAG,CAC3B,CACI,sIAAsI,EACtI,2DAA2D,EAC3D,oFAAoF,EACpF,wCAAwC,CAC3C,EACD;EACIE,QAAQ,EAAE;IACNC,QAAQ,EAAE;MACNC,IAAI,EAAE;IACV;EACJ;AACJ,CACJ,CAAC;AASD,MAAMC,IAAI,GAAGA,CAAC;EAAEC,SAAS;EAAEC,QAAQ;EAAEJ,QAAQ;EAAE,GAAGK;AAAiB,CAAC,kBAChEd,KAAA,CAAAe,aAAA,CAACX,gBAAgB,CAACO,IAAI,EAAAK,MAAA,CAAAC,MAAA;EAACL,SAAS,EAAEP,EAAE,CAACE,mBAAmB,CAAC;IAAEE;EAAS,CAAC,CAAC,EAAEG,SAAS;AAAE,GAAKE,KAAK,gBACzFd,KAAA,CAAAe,aAAA;EAAMH,SAAS,EAAE;AAAoD,GAAEC,QAAe,CAAC,EACtFJ,QAAQ,gBAAGT,KAAA,CAAAe,aAAA,CAACb,KAAK;EAACU,SAAS,EAAC;AAAW,CAAE,CAAC,GAAG,IAC3B,CAC1B;AAED,SAASD,IAAI","ignoreList":[]}