@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
package/Select/Select.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 SelectStories from './Select.stories';
3
+ import * as SelectStories from "./Select.stories";
4
4
 
5
5
  <Meta of={SelectStories} />
6
6
 
@@ -16,7 +16,7 @@ import React, { useState } from "react";
16
16
  import { Select } from "@webiny/admin-ui";
17
17
 
18
18
  const SelectExample = () => {
19
- const [value, setValue] = useState("");
19
+ const [value, setValue] = useState("");
20
20
 
21
21
  return (
22
22
  <Select
@@ -36,25 +36,26 @@ const SelectExample = () => {
36
36
  onChange={setValue}
37
37
  />
38
38
  );
39
+
39
40
  };
40
41
 
41
42
  export default SelectExample;
42
43
 
43
44
  `} }
44
- additionalActions={[
45
- {
46
- title: 'Open in GitHub',
47
- onClick: () => {
48
- window.open(
49
- 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/Select/Select.tsx',
50
- '_blank'
51
- );
52
- },
53
- }
54
- ]}
45
+ additionalActions={[
46
+ {
47
+ title: 'Open in GitHub',
48
+ onClick: () => {
49
+ window.open(
50
+ 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/Select/Select.tsx',
51
+ '_blank'
52
+ );
53
+ },
54
+ }
55
+ ]}
55
56
  />
56
57
 
57
- <Controls of={SelectStories.Documentation} exclude={["onChange", "onOpenChange"]}/>
58
+ <Controls of={SelectStories.Documentation} exclude={["onChange", "onOpenChange"]} />
58
59
 
59
60
  ```jsx
60
61
  import React, { useState } from "react";
@@ -62,26 +63,26 @@ import React, { useState } from "react";
62
63
  import { Select } from "@webiny/admin-ui";
63
64
 
64
65
  const SelectExample = () => {
65
- const [value, setValue] = useState("");
66
-
67
- return (
68
- <Select
69
- label="Time Zone"
70
- description="Select your preferred time zone"
71
- note="This setting will affect how times are displayed throughout the application"
72
- required={true}
73
- options={[
74
- { value: "EST", label: "Eastern Standard Time (UTC-5)" },
75
- { value: "CST", label: "Central Standard Time (UTC-6)" },
76
- { value: "PST", label: "Pacific Standard Time (UTC-8)" },
77
- { value: "GMT", label: "Greenwich Mean Time (UTC+0)" },
78
- { value: "CET", label: "Central European Time (UTC+1)" },
79
- { value: "IST", label: "India Standard Time (UTC+5:30)" }
80
- ]}
81
- value={value}
82
- onChange={setValue}
83
- />
84
- );
66
+ const [value, setValue] = useState("");
67
+
68
+ return (
69
+ <Select
70
+ label="Time Zone"
71
+ description="Select your preferred time zone"
72
+ note="This setting will affect how times are displayed throughout the application"
73
+ required={true}
74
+ options={[
75
+ { value: "EST", label: "Eastern Standard Time (UTC-5)" },
76
+ { value: "CST", label: "Central Standard Time (UTC-6)" },
77
+ { value: "PST", label: "Pacific Standard Time (UTC-8)" },
78
+ { value: "GMT", label: "Greenwich Mean Time (UTC+0)" },
79
+ { value: "CET", label: "Central European Time (UTC+1)" },
80
+ { value: "IST", label: "India Standard Time (UTC+5:30)" }
81
+ ]}
82
+ value={value}
83
+ onChange={setValue}
84
+ />
85
+ );
85
86
  };
86
87
 
87
88
  export default SelectExample;
@@ -90,27 +91,35 @@ export default SelectExample;
90
91
  ## Anatomy
91
92
 
92
93
  ### Select Anatomy
93
- <img src="/images/storybook/select/anatomy.png" alt="Select Anatomy"/>
94
+
95
+ <img src="/images/storybook/select/anatomy.png" alt="Select Anatomy" />
94
96
 
95
97
  ### Styles
96
- <img src="/images/storybook/select/styles.png" alt="Styles"/>
98
+
99
+ <img src="/images/storybook/select/styles.png" alt="Styles" />
97
100
 
98
101
  ### Options
99
- <img src="/images/storybook/select/options.png" alt="Options"/>
102
+
103
+ <img src="/images/storybook/select/options.png" alt="Options" />
100
104
 
101
105
  ### States and Styles
102
- <img src="/images/storybook/select/states-and-styles.png" alt="States and Styles"/>
106
+
107
+ <img src="/images/storybook/select/states-and-styles.png" alt="States and Styles" />
103
108
 
104
109
  ### Label Anatomy
105
- <img src="/images/storybook/select/label-anatomy.png" alt="Label Anatomy"/>
110
+
111
+ <img src="/images/storybook/select/label-anatomy.png" alt="Label Anatomy" />
106
112
 
107
113
  ### Label Properties
108
- <img src="/images/storybook/select/label-properties.png" alt="Label Properties"/>
114
+
115
+ <img src="/images/storybook/select/label-properties.png" alt="Label Properties" />
109
116
 
110
117
  ### Label Options
111
- <img src="/images/storybook/select/label-options.png" alt="Label Options"/>
118
+
119
+ <img src="/images/storybook/select/label-options.png" alt="Label Options" />
112
120
 
113
121
  ## Usage
114
122
 
115
123
  ### Used in forms
116
- <img src="/images/storybook/select/used-in-forms.png" alt="Used in forms"/>
124
+
125
+ <img src="/images/storybook/select/used-in-forms.png" alt="Used in forms" />
@@ -5,7 +5,7 @@ declare const selectTriggerVariants: (props?: ({
5
5
  variant?: "primary" | "secondary" | "ghost" | "ghost-negative" | null | undefined;
6
6
  size?: "md" | "lg" | "xl" | 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 SelectTriggerProps extends SelectPrimitives.SelectTriggerProps, VariantProps<typeof selectTriggerVariants> {
10
10
  startIcon?: React.ReactElement;
11
11
  endIcon?: React.ReactElement;
@@ -1 +1 @@
1
- {"version":3,"names":["React","ReactComponent","ChevronDown","Select","SelectPrimitives","cn","cva","SelectIcon","selectTriggerVariants","variants","variant","primary","secondary","ghost","size","md","lg","xl","invalid","true","compoundVariants","class","defaultVariants","SelectTrigger","className","children","startIcon","endIcon","createElement","resetButton","disabled","props","Trigger","Object","assign","icon"],"sources":["SelectTrigger.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ReactComponent as ChevronDown } from \"@webiny/icons/keyboard_arrow_down.svg\";\nimport { Select as SelectPrimitives } from \"radix-ui\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\nimport { SelectIcon } from \"./SelectIcon.js\";\n\nconst selectTriggerVariants = cva(\n [\n \"w-full flex items-center justify-between gap-sm border-sm text-md relative\",\n \"focus:outline-none\",\n \"disabled:pointer-events-none\"\n ],\n {\n variants: {\n variant: {\n primary: [\n \"bg-neutral-base border-neutral-muted text-neutral-strong placeholder:text-neutral-dimmed fill-neutral-xstrong\",\n \"hover:border-neutral-strong\",\n \"focus:border-neutral-black\",\n \"data-[state=open]:border-neutral-black\",\n \"disabled:bg-neutral-disabled disabled:border-neutral-dimmed disabled:text-neutral-disabled disabled:placeholder:text-neutral-disabled disabled:fill-neutral-disabled\"\n ],\n secondary: [\n \"bg-neutral-light border-neutral-subtle text-neutral-strong placeholder:text-neutral-muted fill-neutral-xstrong\",\n \"hover:bg-neutral-dimmed\",\n \"focus:border-neutral-black focus:bg-neutral-base\",\n \"data-[state=open]:border-neutral-black data-[state=open]:bg-neutral-base\",\n \"disabled:bg-neutral-disabled disabled:border-neutral-dimmed disabled:text-neutral-disabled disabled:placeholder:text-neutral-disabled disabled:fill-neutral-disabled\"\n ],\n ghost: [\n \"bg-neutral-base border-transparent text-neutral-strong placeholder:text-neutral-dimmed\",\n \"hover:bg-neutral-dark/5\",\n \"focus:bg-neutral-dark/5\",\n \"data-[state=open]:bg-neutral-dark/5\",\n \"disabled:bg-neutral-disabled disabled:border-neutral-dimmed disabled:text-neutral-disabled disabled:placeholder:text-neutral-disabled disabled:fill-neutral-disabled\"\n ],\n \"ghost-negative\": [\n \"bg-transparent border-transparent text-neutral-light/50 placeholder:text-neutral-light/50 fill-neutral-base/50\",\n \"hover:bg-neutral-base/20\",\n \"focus:bg-neutral-base/20\",\n \"data-[state=open]:bg-neutral-base data-[state=open]:text-neutral-primary data[state=open]:placeholder:text-neutral-dimmed data[state=open]:!fill-neutral-xstrong\",\n \"disabled:bg-transparent disabled:text-neutral-disabled/50 disabled:placeholder:text-neutral-disabled/50\"\n ]\n },\n size: {\n md: [\n \"rounded-md\",\n \"py-[calc(var(--padding-xs-plus)-(var(--border-width-sm)))] px-[calc(var(--padding-sm-extra)-(var(--border-width-sm)))]\"\n ],\n lg: [\n \"rounded-md\",\n \"py-[calc(var(--padding-sm-plus)-(var(--border-width-sm)))] px-[calc(var(--padding-sm-extra)-(var(--border-width-sm)))]\"\n ],\n xl: [\n \"rounded-lg leading-6\",\n \"py-[calc(var(--padding-md)-(var(--border-width-sm)))] px-[calc(var(--padding-md)-(var(--border-width-sm)))]\"\n ]\n },\n invalid: {\n true: \"\"\n }\n },\n compoundVariants: [\n {\n variant: \"primary\",\n invalid: true,\n class: \"border-destructive-default!\"\n },\n {\n variant: \"secondary\",\n invalid: true,\n class: \"border-destructive-default!\"\n },\n {\n variant: \"ghost\",\n invalid: true,\n class: \"border-destructive-subtle! bg-destructive-subtle!\"\n },\n {\n variant: \"ghost-negative\",\n invalid: true,\n class: \"border-destructive-default! bg-destructive-subtle! text-neutral-primary placeholder:text-neutral-dimmed fill-neutral-xstrong!\"\n }\n ],\n defaultVariants: {\n variant: \"primary\",\n size: \"lg\"\n }\n }\n);\n\ninterface SelectTriggerProps\n extends SelectPrimitives.SelectTriggerProps,\n VariantProps<typeof selectTriggerVariants> {\n startIcon?: React.ReactElement;\n endIcon?: React.ReactElement;\n resetButton?: React.ReactElement;\n}\n\nconst SelectTrigger = ({\n className,\n children,\n size,\n variant,\n startIcon,\n endIcon = <ChevronDown />,\n resetButton,\n disabled,\n invalid,\n ...props\n}: SelectTriggerProps) => (\n <SelectPrimitives.Trigger\n className={cn(selectTriggerVariants({ variant, size, invalid }), className)}\n disabled={disabled}\n {...props}\n >\n {startIcon && <SelectIcon icon={startIcon} />}\n {children}\n {resetButton}\n <SelectIcon icon={endIcon} />\n </SelectPrimitives.Trigger>\n);\n\nexport { SelectTrigger, selectTriggerVariants };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,IAAIC,WAAW,QAAQ,uCAAuC;AACrF,SAASC,MAAM,IAAIC,gBAAgB,QAAQ,UAAU;AACrD,SAASC,EAAE,EAAEC,GAAG;AAChB,SAASC,UAAU;AAEnB,MAAMC,qBAAqB,GAAGF,GAAG,CAC7B,CACI,4EAA4E,EAC5E,oBAAoB,EACpB,8BAA8B,CACjC,EACD;EACIG,QAAQ,EAAE;IACNC,OAAO,EAAE;MACLC,OAAO,EAAE,CACL,+GAA+G,EAC/G,6BAA6B,EAC7B,4BAA4B,EAC5B,wCAAwC,EACxC,sKAAsK,CACzK;MACDC,SAAS,EAAE,CACP,gHAAgH,EAChH,yBAAyB,EACzB,kDAAkD,EAClD,0EAA0E,EAC1E,sKAAsK,CACzK;MACDC,KAAK,EAAE,CACH,wFAAwF,EACxF,yBAAyB,EACzB,yBAAyB,EACzB,qCAAqC,EACrC,sKAAsK,CACzK;MACD,gBAAgB,EAAE,CACd,gHAAgH,EAChH,0BAA0B,EAC1B,0BAA0B,EAC1B,kKAAkK,EAClK,yGAAyG;IAEjH,CAAC;IACDC,IAAI,EAAE;MACFC,EAAE,EAAE,CACA,YAAY,EACZ,wHAAwH,CAC3H;MACDC,EAAE,EAAE,CACA,YAAY,EACZ,wHAA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ER;AAAQ,CAAE,CACN,CAC7B;AAED,SAASJ,aAAa,EAAEf,qBAAqB","ignoreList":[]}
1
+ {"version":3,"names":["React","ReactComponent","ChevronDown","Select","SelectPrimitives","cn","cva","SelectIcon","selectTriggerVariants","variants","variant","primary","secondary","ghost","size","md","lg","xl","invalid","true","compoundVariants","class","defaultVariants","SelectTrigger","className","children","startIcon","endIcon","createElement","resetButton","disabled","props","Trigger","Object","assign","icon"],"sources":["SelectTrigger.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ReactComponent as ChevronDown } from \"@webiny/icons/keyboard_arrow_down.svg\";\nimport { Select as SelectPrimitives } from \"radix-ui\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\nimport { SelectIcon } from \"./SelectIcon.js\";\n\nconst selectTriggerVariants = cva(\n [\n \"w-full flex items-center justify-between gap-sm border-sm text-md relative\",\n \"focus:outline-none\",\n \"disabled:pointer-events-none\"\n ],\n {\n variants: {\n variant: {\n primary: [\n \"bg-neutral-base border-neutral-muted text-neutral-strong placeholder:text-neutral-dimmed fill-neutral-xstrong\",\n \"hover:border-neutral-strong\",\n \"focus:border-neutral-black\",\n \"data-[state=open]:border-neutral-black\",\n \"disabled:bg-neutral-disabled disabled:border-neutral-dimmed disabled:text-neutral-disabled disabled:placeholder:text-neutral-disabled disabled:fill-neutral-disabled\"\n ],\n secondary: [\n \"bg-neutral-light border-neutral-subtle text-neutral-strong placeholder:text-neutral-muted fill-neutral-xstrong\",\n \"hover:bg-neutral-dimmed\",\n \"focus:border-neutral-black focus:bg-neutral-base\",\n \"data-[state=open]:border-neutral-black data-[state=open]:bg-neutral-base\",\n \"disabled:bg-neutral-disabled disabled:border-neutral-dimmed disabled:text-neutral-disabled disabled:placeholder:text-neutral-disabled disabled:fill-neutral-disabled\"\n ],\n ghost: [\n \"bg-neutral-base border-transparent text-neutral-strong placeholder:text-neutral-dimmed\",\n \"hover:bg-neutral-dark/5\",\n \"focus:bg-neutral-dark/5\",\n \"data-[state=open]:bg-neutral-dark/5\",\n \"disabled:bg-neutral-disabled disabled:border-neutral-dimmed disabled:text-neutral-disabled disabled:placeholder:text-neutral-disabled disabled:fill-neutral-disabled\"\n ],\n \"ghost-negative\": [\n \"bg-transparent border-transparent text-neutral-light/50 placeholder:text-neutral-light/50 fill-neutral-base/50\",\n \"hover:bg-neutral-base/20\",\n \"focus:bg-neutral-base/20\",\n \"data-[state=open]:bg-neutral-base data-[state=open]:text-neutral-primary data[state=open]:placeholder:text-neutral-dimmed data[state=open]:!fill-neutral-xstrong\",\n \"disabled:bg-transparent disabled:text-neutral-disabled/50 disabled:placeholder:text-neutral-disabled/50\"\n ]\n },\n size: {\n md: [\n \"rounded-md\",\n \"py-[calc(var(--padding-xs-plus)-(var(--border-width-sm)))] px-[calc(var(--padding-sm-extra)-(var(--border-width-sm)))]\"\n ],\n lg: [\n \"rounded-md\",\n \"py-[calc(var(--padding-sm-plus)-(var(--border-width-sm)))] px-[calc(var(--padding-sm-extra)-(var(--border-width-sm)))]\"\n ],\n xl: [\n \"rounded-lg leading-6\",\n \"py-[calc(var(--padding-md)-(var(--border-width-sm)))] px-[calc(var(--padding-md)-(var(--border-width-sm)))]\"\n ]\n },\n invalid: {\n true: \"\"\n }\n },\n compoundVariants: [\n {\n variant: \"primary\",\n invalid: true,\n class: \"border-destructive-default!\"\n },\n {\n variant: \"secondary\",\n invalid: true,\n class: \"border-destructive-default!\"\n },\n {\n variant: \"ghost\",\n invalid: true,\n class: \"border-destructive-subtle! bg-destructive-subtle!\"\n },\n {\n variant: \"ghost-negative\",\n invalid: true,\n class: \"border-destructive-default! bg-destructive-subtle! text-neutral-primary placeholder:text-neutral-dimmed fill-neutral-xstrong!\"\n }\n ],\n defaultVariants: {\n variant: \"primary\",\n size: \"lg\"\n }\n }\n);\n\ninterface SelectTriggerProps\n extends SelectPrimitives.SelectTriggerProps, VariantProps<typeof selectTriggerVariants> {\n startIcon?: React.ReactElement;\n endIcon?: React.ReactElement;\n resetButton?: React.ReactElement;\n}\n\nconst SelectTrigger = ({\n className,\n children,\n size,\n variant,\n startIcon,\n endIcon = <ChevronDown />,\n resetButton,\n disabled,\n invalid,\n ...props\n}: SelectTriggerProps) => (\n <SelectPrimitives.Trigger\n className={cn(selectTriggerVariants({ variant, size, invalid }), className)}\n disabled={disabled}\n {...props}\n >\n {startIcon && <SelectIcon icon={startIcon} />}\n {children}\n {resetButton}\n <SelectIcon icon={endIcon} />\n </SelectPrimitives.Trigger>\n);\n\nexport { SelectTrigger, selectTriggerVariants };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,IAAIC,WAAW,QAAQ,uCAAuC;AACrF,SAASC,MAAM,IAAIC,gBAAgB,QAAQ,UAAU;AACrD,SAASC,EAAE,EAAEC,GAAG;AAChB,SAASC,UAAU;AAEnB,MAAMC,qBAAqB,GAAGF,GAAG,CAC7B,CACI,4EAA4E,EAC5E,oBAAoB,EACpB,8BAA8B,CACjC,EACD;EACIG,QAAQ,EAAE;IACNC,OAAO,EAAE;MACLC,OAAO,EAAE,CACL,+GAA+G,EAC/G,6BAA6B,EAC7B,4BAA4B,EAC5B,wCAAwC,EACxC,sKAAsK,CACzK;MACDC,SAAS,EAAE,CACP,gHAAgH,EAChH,yBAAyB,EACzB,kDAAkD,EAClD,0EAA0E,EAC1E,sKAAsK,CACzK;MACDC,KAAK,EAAE,CACH,wFAAwF,EACxF,yBAAyB,EACzB,yBAAyB,EACzB,qCAAqC,EACrC,sKAAsK,CACzK;MACD,gBAAgB,EAAE,CACd,gHAAgH,EAChH,0BAA0B,EAC1B,0BAA0B,EAC1B,kKAAkK,EAClK,yGAAyG;IAEjH,CAAC;IACDC,IAAI,EAAE;MACFC,EAAE,EAAE,CACA,YAAY,EACZ,wHAAwH,CAC3H;MACDC,EAAE,EAAE,CACA,YAAY,EACZ,wHAAwH,CAC3H;MACDC,EAAE,EAAE,CACA,sBAAsB,EACtB,6GAA6G;IAErH,CAAC;IACDC,OAAO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7 +34,7 @@ declare class SelectPresenter implements ISelectPresenter {
34
34
  displayResetAction: boolean;
35
35
  };
36
36
  selectOptions: {
37
- options: import("../../domains/SelectOptionFormatted.js").SelectOptionFormatted[];
37
+ options: import("../../index.js").SelectOptionFormatted[];
38
38
  };
39
39
  };
40
40
  changeValue: (value?: string) => void;
@@ -5,7 +5,7 @@ declare const separatorVariants: (props?: ({
5
5
  margin?: "sm" | "md" | "none" | "lg" | "xl" | "xs" | null | undefined;
6
6
  orientation?: "horizontal" | "vertical" | null | undefined;
7
7
  variant?: "accent" | "base" | "strong" | "transparent" | "dimmed" | "muted" | null | undefined;
8
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
8
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  type SeparatorPosition = "start" | "middle" | "end";
10
10
  type SeparatorProps = Omit<SeparatorPrimitive.SeparatorProps, "children"> & VariantProps<typeof separatorVariants> & {
11
11
  children?: React.ReactNode;
@@ -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 SeparatorStories from './Separator.stories';
3
+ import * as SeparatorStories from "./Separator.stories";
4
4
 
5
5
  <Meta of={SeparatorStories} />
6
6
 
@@ -15,41 +15,36 @@ import React from "react";
15
15
  import { Separator, Heading, Text } from "@webiny/admin-ui";
16
16
 
17
17
  const SeparatorExample = () => {
18
- return (
19
- <div>
20
- <div className="space-y-1">
21
- <Heading level={6}>{"This is a heading."}</Heading>
22
- <Text size="sm" className={"text-neutral-strong"}>
23
- {"This is a short description here"}
24
- </Text>
25
- </div>
26
- <Separator
27
- margin="lg"
28
- variant="subtle"
29
- orientation="horizontal"
30
- decorative={true}
31
- />
32
- <div className="flex items-center h-6 text-sm">
33
- <Text>{"This is text 1."}</Text>
34
- </div>
35
- </div>
36
- );
37
- };
18
+ return (
19
+
20
+ <div>
21
+ <div className="space-y-1">
22
+ <Heading level={6}>{"This is a heading."}</Heading>
23
+ <Text size="sm" className={"text-neutral-strong"}>
24
+ {"This is a short description here"}
25
+ </Text>
26
+ </div>
27
+ <Separator margin="lg" variant="subtle" orientation="horizontal" decorative={true} />
28
+ <div className="flex items-center h-6 text-sm">
29
+ <Text>{"This is text 1."}</Text>
30
+ </div>
31
+ </div>
32
+ ); };
38
33
 
39
34
  export default SeparatorExample;
40
35
 
41
36
  ` } }
42
- additionalActions={[
43
- {
44
- title: 'Open in GitHub',
45
- onClick: () => {
46
- window.open(
47
- 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/Separator/Separator.tsx',
48
- '_blank'
49
- );
50
- },
51
- }
52
- ]}
37
+ additionalActions={[
38
+ {
39
+ title: 'Open in GitHub',
40
+ onClick: () => {
41
+ window.open(
42
+ 'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/Separator/Separator.tsx',
43
+ '_blank'
44
+ );
45
+ },
46
+ }
47
+ ]}
53
48
  />
54
49
 
55
50
  <Controls of={SeparatorStories.Documentation} />
@@ -59,31 +54,25 @@ import React from "react";
59
54
  import { Separator, Heading, Text } from "@webiny/admin-ui";
60
55
 
61
56
  const SeparatorExample = () => {
62
- return (
63
- <div>
64
- <div className="space-y-1">
65
- <Heading level={6}>{"This is a heading."}</Heading>
66
- <Text size="sm" className={"text-neutral-strong"}>
67
- {"This is a short description here"}
68
- </Text>
69
- </div>
70
- <Separator
71
- margin="lg"
72
- variant="subtle"
73
- orientation="horizontal"
74
- decorative={true}
75
- />
76
- <div className="flex items-center h-6 text-sm">
77
- <Text>{"This is text 1."}</Text>
78
- </div>
79
- </div>
80
- );
57
+ return (
58
+ <div>
59
+ <div className="space-y-1">
60
+ <Heading level={6}>{"This is a heading."}</Heading>
61
+ <Text size="sm" className={"text-neutral-strong"}>
62
+ {"This is a short description here"}
63
+ </Text>
64
+ </div>
65
+ <Separator margin="lg" variant="subtle" orientation="horizontal" decorative={true} />
66
+ <div className="flex items-center h-6 text-sm">
67
+ <Text>{"This is text 1."}</Text>
68
+ </div>
69
+ </div>
70
+ );
81
71
  };
82
72
 
83
73
  export default SeparatorExample;
84
74
  ```
85
75
 
86
-
87
76
  ## Examples
88
77
 
89
78
  ### Default
@@ -95,21 +84,21 @@ import React from "react";
95
84
  import { Separator, Heading, Text } from "@webiny/admin-ui";
96
85
 
97
86
  const DefaultSeparatorExample = () => {
98
- return (
99
- <div>
100
- <div className="space-y-1">
101
- <Heading level={6}>{"This is a heading."}</Heading>
102
- <Text size="sm" className={"text-neutral-strong"}>
103
- {"This is a short description here"}
104
- </Text>
105
- </div>
106
- <Separator margin="lg" variant="subtle" />
107
- <div className="flex items-center h-6 text-sm">
108
- <Text>{"This is text 1."}</Text>
109
- </div>
110
- </div>
111
- );
112
- };
87
+ return (
88
+
89
+ <div>
90
+ <div className="space-y-1">
91
+ <Heading level={6}>{"This is a heading."}</Heading>
92
+ <Text size="sm" className={"text-neutral-strong"}>
93
+ {"This is a short description here"}
94
+ </Text>
95
+ </div>
96
+ <Separator margin="lg" variant="subtle" />
97
+ <div className="flex items-center h-6 text-sm">
98
+ <Text>{"This is text 1."}</Text>
99
+ </div>
100
+ </div>
101
+ ); };
113
102
 
114
103
  export default DefaultSeparatorExample;
115
104
  ` } } />
@@ -123,25 +112,25 @@ import React from "react";
123
112
  import { Separator, Heading, Text } from "@webiny/admin-ui";
124
113
 
125
114
  const VerticalAndHorizontalExample = () => {
126
- return (
127
- <div>
128
- <div className="space-y-1">
129
- <Heading level={6}>{"This is a heading."}</Heading>
130
- <Text size="sm" className={"text-neutral-strong"}>
131
- {"This is a short description here"}
132
- </Text>
133
- </div>
134
- <Separator margin={"lg"} />
135
- <div className="flex items-center h-6 text-sm">
136
- <Text>{"This is text 1."}</Text>
137
- <Separator orientation="vertical" margin={"lg"} />
138
- <Text>{"This is text 2."}</Text>
139
- <Separator orientation="vertical" margin={"lg"} />
140
- <Text>{"This is text 3."}</Text>
141
- </div>
142
- </div>
143
- );
144
- };
115
+ return (
116
+
117
+ <div>
118
+ <div className="space-y-1">
119
+ <Heading level={6}>{"This is a heading."}</Heading>
120
+ <Text size="sm" className={"text-neutral-strong"}>
121
+ {"This is a short description here"}
122
+ </Text>
123
+ </div>
124
+ <Separator margin={"lg"} />
125
+ <div className="flex items-center h-6 text-sm">
126
+ <Text>{"This is text 1."}</Text>
127
+ <Separator orientation="vertical" margin={"lg"} />
128
+ <Text>{"This is text 2."}</Text>
129
+ <Separator orientation="vertical" margin={"lg"} />
130
+ <Text>{"This is text 3."}</Text>
131
+ </div>
132
+ </div>
133
+ ); };
145
134
 
146
135
  export default VerticalAndHorizontalExample;
147
136
  ` } } />
@@ -155,21 +144,21 @@ import React from "react";
155
144
  import { Separator, Heading, Text } from "@webiny/admin-ui";
156
145
 
157
146
  const HorizontalOrientationExample = () => {
158
- return (
159
- <div>
160
- <div className="space-y-1">
161
- <Heading level={6}>{"This is a heading."}</Heading>
162
- <Text size="sm" className={"text-neutral-strong"}>
163
- {"This is a short description here"}
164
- </Text>
165
- </div>
166
- <Separator margin={"lg"} orientation="horizontal" />
167
- <div className="flex items-center h-6 text-sm">
168
- <Text>{"This is text 1."}</Text>
169
- </div>
170
- </div>
171
- );
172
- };
147
+ return (
148
+
149
+ <div>
150
+ <div className="space-y-1">
151
+ <Heading level={6}>{"This is a heading."}</Heading>
152
+ <Text size="sm" className={"text-neutral-strong"}>
153
+ {"This is a short description here"}
154
+ </Text>
155
+ </div>
156
+ <Separator margin={"lg"} orientation="horizontal" />
157
+ <div className="flex items-center h-6 text-sm">
158
+ <Text>{"This is text 1."}</Text>
159
+ </div>
160
+ </div>
161
+ ); };
173
162
 
174
163
  export default HorizontalOrientationExample;
175
164
  ` } } />
@@ -183,16 +172,16 @@ import React from "react";
183
172
  import { Separator, Text } from "@webiny/admin-ui";
184
173
 
185
174
  const VerticalOrientationExample = () => {
186
- return (
187
- <div className="flex justify-center h-6 text-sm">
188
- <Text>{"This is text 1."}</Text>
189
- <Separator orientation="vertical" margin={"lg"} />
190
- <Text>{"This is text 2."}</Text>
191
- <Separator orientation="vertical" margin={"lg"} />
192
- <Text>{"This is text 3."}</Text>
193
- </div>
194
- );
195
- };
175
+ return (
176
+
177
+ <div className="flex justify-center h-6 text-sm">
178
+ <Text>{"This is text 1."}</Text>
179
+ <Separator orientation="vertical" margin={"lg"} />
180
+ <Text>{"This is text 2."}</Text>
181
+ <Separator orientation="vertical" margin={"lg"} />
182
+ <Text>{"This is text 3."}</Text>
183
+ </div>
184
+ ); };
196
185
 
197
186
  export default VerticalOrientationExample;
198
187
  ` } } />
@@ -206,25 +195,25 @@ import React from "react";
206
195
  import { Separator, Heading, Text } from "@webiny/admin-ui";
207
196
 
208
197
  const LessMarginExample = () => {
209
- return (
210
- <div>
211
- <div className="space-y-1">
212
- <Heading level={6}>{"This is a heading."}</Heading>
213
- <Text size="sm" className={"text-neutral-strong"}>
214
- {"This is a short description here"}
215
- </Text>
216
- </div>
217
- <Separator margin={"md"} />
218
- <div className="flex items-center h-6 text-sm">
219
- <Text>{"This is text 1."}</Text>
220
- <Separator orientation="vertical" margin={"md"} />
221
- <Text>{"This is text 2."}</Text>
222
- <Separator orientation="vertical" margin={"md"} />
223
- <Text>{"This is text 3."}</Text>
224
- </div>
225
- </div>
226
- );
227
- };
198
+ return (
199
+
200
+ <div>
201
+ <div className="space-y-1">
202
+ <Heading level={6}>{"This is a heading."}</Heading>
203
+ <Text size="sm" className={"text-neutral-strong"}>
204
+ {"This is a short description here"}
205
+ </Text>
206
+ </div>
207
+ <Separator margin={"md"} />
208
+ <div className="flex items-center h-6 text-sm">
209
+ <Text>{"This is text 1."}</Text>
210
+ <Separator orientation="vertical" margin={"md"} />
211
+ <Text>{"This is text 2."}</Text>
212
+ <Separator orientation="vertical" margin={"md"} />
213
+ <Text>{"This is text 3."}</Text>
214
+ </div>
215
+ </div>
216
+ ); };
228
217
 
229
218
  export default LessMarginExample;
230
219
  ` } } />
@@ -238,25 +227,25 @@ import React from "react";
238
227
  import { Separator, Heading, Text } from "@webiny/admin-ui";
239
228
 
240
229
  const MoreMarginExample = () => {
241
- return (
242
- <div>
243
- <div className="space-y-1">
244
- <Heading level={6}>{"This is a heading."}</Heading>
245
- <Text size="sm" className={"text-neutral-strong"}>
246
- {"This is a short description here"}
247
- </Text>
248
- </div>
249
- <Separator margin={"xl"} />
250
- <div className="flex items-center h-6 text-sm">
251
- <Text>{"This is text 1."}</Text>
252
- <Separator orientation="vertical" margin={"xl"} />
253
- <Text>{"This is text 2."}</Text>
254
- <Separator orientation="vertical" margin={"xl"} />
255
- <Text>{"This is text 3."}</Text>
256
- </div>
257
- </div>
258
- );
259
- };
230
+ return (
231
+
232
+ <div>
233
+ <div className="space-y-1">
234
+ <Heading level={6}>{"This is a heading."}</Heading>
235
+ <Text size="sm" className={"text-neutral-strong"}>
236
+ {"This is a short description here"}
237
+ </Text>
238
+ </div>
239
+ <Separator margin={"xl"} />
240
+ <div className="flex items-center h-6 text-sm">
241
+ <Text>{"This is text 1."}</Text>
242
+ <Separator orientation="vertical" margin={"xl"} />
243
+ <Text>{"This is text 2."}</Text>
244
+ <Separator orientation="vertical" margin={"xl"} />
245
+ <Text>{"This is text 3."}</Text>
246
+ </div>
247
+ </div>
248
+ ); };
260
249
 
261
250
  export default MoreMarginExample;
262
251
  ` } } />
@@ -1 +1 @@
1
- {"version":3,"names":["React","makeDecoratable","withStaticProps","SidebarRoot","SidebarHeader","SidebarContent","SidebarIcon","SidebarFooter","SidebarMenuItem","SidebarMenuLink","SidebarMenuRoot","SidebarMenuGroup","SidebarBase","props","headerProps","rootProps","footerProps","contentProps","useMemo","title","icon","side","footer","rest","createElement","showPinnedItems","children","DecoratableSidebar","Sidebar","Item","Link","Group","Icon"],"sources":["Sidebar.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { makeDecoratable, withStaticProps } from \"~/utils.js\";\nimport { SidebarRoot } from \"./components/SidebarRoot.js\";\nimport { SidebarHeader } from \"./components/SidebarHeader.js\";\nimport { SidebarContent } from \"./components/SidebarContent.js\";\nimport { SidebarIcon } from \"./components/SidebarIcon.js\";\nimport { SidebarFooter } from \"./components/SidebarFooter.js\";\nimport { SidebarMenuItem } from \"./components/items/SidebarMenuItem.js\";\nimport { SidebarMenuLink } from \"./components/items/SidebarMenuLink.js\";\nimport { SidebarMenuRoot } from \"./components/items/SidebarMenuRoot.js\";\nimport { SidebarMenuGroup } from \"~/Sidebar/components/items/SidebarMenuGroup.js\";\n\ninterface SidebarProps\n extends Omit<React.ComponentPropsWithoutRef<typeof SidebarRoot>, \"title\">,\n Omit<React.ComponentPropsWithoutRef<typeof SidebarContent>, \"title\"> {\n title?: React.ReactNode;\n icon?: React.ReactNode;\n children: React.ReactNode;\n footer?: React.ReactNode;\n}\n\nconst SidebarBase = (props: SidebarProps) => {\n const { headerProps, rootProps, footerProps, contentProps } = React.useMemo(() => {\n const {\n // Header props.\n title,\n icon,\n\n // Root props.\n side,\n\n // Footer props.\n footer,\n\n // Content props.\n ...rest\n } = props;\n\n return {\n headerProps: {\n title,\n icon\n },\n rootProps: {\n side\n },\n footerProps: {\n footer\n },\n contentProps: rest\n };\n }, [props]);\n\n return (\n <SidebarRoot {...rootProps}>\n <SidebarHeader {...headerProps} />\n <SidebarContent {...contentProps}>\n <SidebarMenuRoot showPinnedItems={true}>{props.children}</SidebarMenuRoot>\n </SidebarContent>\n <SidebarFooter>\n <SidebarMenuRoot showPinnedItems={false}>{footerProps.footer}</SidebarMenuRoot>\n </SidebarFooter>\n </SidebarRoot>\n );\n};\n\nconst DecoratableSidebar = makeDecoratable(\"Sidebar\", SidebarBase);\n\nconst Sidebar = withStaticProps(DecoratableSidebar, {\n Item: SidebarMenuItem,\n Link: SidebarMenuLink,\n Group: SidebarMenuGroup,\n Icon: SidebarIcon\n});\n\nexport { Sidebar };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,eAAe,EAAEC,eAAe;AACzC,SAASC,WAAW;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AAErB,eAAe;EACrBsB,KAAK,EAAEpB,gBAAgB;EACvBqB,IAAI,EAAE1B;AACV,CAAC,CAAC;AAEF,SAASsB,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["React","makeDecoratable","withStaticProps","SidebarRoot","SidebarHeader","SidebarContent","SidebarIcon","SidebarFooter","SidebarMenuItem","SidebarMenuLink","SidebarMenuRoot","SidebarMenuGroup","SidebarBase","props","headerProps","rootProps","footerProps","contentProps","useMemo","title","icon","side","footer","rest","createElement","showPinnedItems","children","DecoratableSidebar","Sidebar","Item","Link","Group","Icon"],"sources":["Sidebar.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { makeDecoratable, withStaticProps } from \"~/utils.js\";\nimport { SidebarRoot } from \"./components/SidebarRoot.js\";\nimport { SidebarHeader } from \"./components/SidebarHeader.js\";\nimport { SidebarContent } from \"./components/SidebarContent.js\";\nimport { SidebarIcon } from \"./components/SidebarIcon.js\";\nimport { SidebarFooter } from \"./components/SidebarFooter.js\";\nimport { SidebarMenuItem } from \"./components/items/SidebarMenuItem.js\";\nimport { SidebarMenuLink } from \"./components/items/SidebarMenuLink.js\";\nimport { SidebarMenuRoot } from \"./components/items/SidebarMenuRoot.js\";\nimport { SidebarMenuGroup } from \"~/Sidebar/components/items/SidebarMenuGroup.js\";\n\ninterface SidebarProps\n extends\n Omit<React.ComponentPropsWithoutRef<typeof SidebarRoot>, \"title\">,\n Omit<React.ComponentPropsWithoutRef<typeof SidebarContent>, \"title\"> {\n title?: React.ReactNode;\n icon?: React.ReactNode;\n children: React.ReactNode;\n footer?: React.ReactNode;\n}\n\nconst SidebarBase = (props: SidebarProps) => {\n const { headerProps, rootProps, footerProps, contentProps } = React.useMemo(() => {\n const {\n // Header props.\n title,\n icon,\n\n // Root props.\n side,\n\n // Footer props.\n footer,\n\n // Content props.\n ...rest\n } = props;\n\n return {\n headerProps: {\n title,\n icon\n },\n rootProps: {\n side\n },\n footerProps: {\n footer\n },\n contentProps: rest\n };\n }, [props]);\n\n return (\n <SidebarRoot {...rootProps}>\n <SidebarHeader {...headerProps} />\n <SidebarContent {...contentProps}>\n <SidebarMenuRoot showPinnedItems={true}>{props.children}</SidebarMenuRoot>\n </SidebarContent>\n <SidebarFooter>\n <SidebarMenuRoot showPinnedItems={false}>{footerProps.footer}</SidebarMenuRoot>\n </SidebarFooter>\n </SidebarRoot>\n );\n};\n\nconst DecoratableSidebar = makeDecoratable(\"Sidebar\", SidebarBase);\n\nconst Sidebar = withStaticProps(DecoratableSidebar, {\n Item: SidebarMenuItem,\n Link: SidebarMenuLink,\n Group: SidebarMenuGroup,\n Icon: SidebarIcon\n});\n\nexport { Sidebar };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,eAAe,EAAEC,eAAe;AACzC,SAASC,WAAW;AACpB,SAASC,aAAa;AACtB,SAASC,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,aAAa;AACtB,SAASC,eAAe;AACxB,SAASC,eAAe;AACxB,SAASC,eAAe;AACxB,SAASC,gBAAgB;AAYzB,MAAMC,WAAW,GAAIC,KAAmB,IAAK;EACzC,MAAM;IAAEC,WAAW;IAAEC,SAAS;IAAEC,WAAW;IAAEC;EAAa,CAAC,GAAGjB,KAAK,CAACkB,OAAO,CAAC,MAAM;IAC9E,MAAM;MACF;MACAC,KAAK;MACLC,IAAI;MAEJ;MACAC,IAAI;MAEJ;MACAC,MAAM;MAEN;MACA,GAAGC;IACP,CAAC,GAAGV,KAAK;IAET,OAAO;MACHC,WAAW,EAAE;QACTK,KAAK;QACLC;MACJ,CAAC;MACDL,SAAS,EAAE;QACPM;MACJ,CAAC;MACDL,WAAW,EAAE;QACTM;MACJ,CAAC;MACDL,YAAY,EAAEM;IAClB,CAAC;EACL,CAAC,EAAE,CAACV,KAAK,CAAC,CAAC;EAEX,oBACIb,KAAA,CAAAwB,aAAA,CAACrB,WAAW,EAAKY,SAAS,eACtBf,KAAA,CAAAwB,aAAA,CAACpB,aAAa,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