@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.
- package/Accordion/Accordion.d.ts +1 -1
- package/Accordion/Accordion.mdx +437 -463
- package/Accordion/components/AccordionContent.js.map +1 -1
- package/Alert/Alert.d.ts +1 -1
- package/Alert/Alert.js.map +1 -1
- package/Alert/Alert.mdx +80 -83
- package/AutoComplete/AutoComplete.mdx +63 -55
- package/Avatar/Avatar.d.ts +1 -1
- package/Avatar/Avatar.js.map +1 -1
- package/Avatar/Avatar.mdx +52 -43
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js.map +1 -1
- package/Button/Button.mdx +50 -42
- package/Button/IconButton.d.ts +1 -1
- package/Button/IconButton.js.map +1 -1
- package/Card/components/CardContent.d.ts +1 -1
- package/Card/components/CardTitle.d.ts +1 -1
- package/Checkbox/Checkbox.mdx +51 -49
- package/Checkbox/primitives/CheckboxPrimitive.d.ts +1 -1
- package/CheckboxGroup/CheckboxGroup.mdx +51 -53
- package/CodeEditor/CodeEditor.mdx +44 -43
- package/ColorPicker/ColorPicker.mdx +41 -40
- package/Command/components/Item.d.ts +1 -1
- package/Command/components/Item.js.map +1 -1
- package/DataTable/DataTable.mdx +537 -542
- package/DataTable/components/ColumnSorter.d.ts +1 -1
- package/DataTable/components/ColumnSorter.js.map +1 -1
- package/Dialog/Dialog.js.map +1 -1
- package/Dialog/components/DialogContent.d.ts +1 -1
- package/Dialog/components/DialogContent.js +1 -1
- package/Dialog/components/DialogContent.js.map +1 -1
- package/Dialog/components/DialogFooter.d.ts +1 -1
- package/Dialog/components/DialogFooter.js.map +1 -1
- package/Dialog/components/DialogTitle.d.ts +1 -1
- package/Drawer/Drawer.js.map +1 -1
- package/Drawer/Drawer.mdx +73 -64
- package/Drawer/components/DrawerContent.d.ts +1 -1
- package/Drawer/components/DrawerContent.js.map +1 -1
- package/DropdownMenu/DropdownMenu.js.map +1 -1
- package/DropdownMenu/DropdownMenu.mdx +155 -256
- package/DropdownMenu/components/DropdownMenuCheckboxItem.js.map +1 -1
- package/DropdownMenu/components/DropdownMenuLabel.js.map +1 -1
- package/FilePicker/FilePicker.mdx +69 -69
- package/FilePicker/primitives/FilePickerPrimitive.d.ts +19 -19
- package/FilePicker/primitives/FilePickerPrimitive.js.map +1 -1
- package/FilePicker/primitives/components/Trigger.d.ts +1 -1
- package/FilePicker/primitives/components/previews/TextOnlyPreview/TextOnlyPreview.d.ts +1 -1
- package/FilePicker/primitives/components/previews/variants.d.ts +1 -1
- package/FilePicker/primitives/components/types.js.map +1 -1
- package/FormComponent/Description.d.ts +1 -1
- package/FormComponent/ErrorMessage.d.ts +1 -1
- package/FormComponent/Note.d.ts +1 -1
- package/Grid/Grid.d.ts +2 -2
- package/Grid/Grid.js.map +1 -1
- package/Grid/Grid.mdx +111 -121
- package/HeaderBar/HeaderBar.mdx +98 -99
- package/Heading/Heading.d.ts +1 -1
- package/Heading/Heading.js.map +1 -1
- package/Heading/Heading.mdx +63 -58
- package/Icon/Icon.d.ts +1 -1
- package/Icon/Icon.js.map +1 -1
- package/Icon/Icon.mdx +79 -147
- package/IconPicker/IconPicker.mdx +66 -64
- package/IconPicker/primitives/IconPickerPrimitive.d.ts +1 -1
- package/IconPicker/primitives/components/IconPickerTrigger.d.ts +1 -1
- package/Image/Image.js.map +1 -1
- package/Input/Input.mdx +67 -56
- package/Input/InputPrimitive.d.ts +1 -1
- package/Label/Label.d.ts +1 -1
- package/Label/Label.js.map +1 -1
- package/Label/Label.mdx +42 -42
- package/Label/components/LabelDescription.d.ts +1 -1
- package/Label/components/LabelRequired.d.ts +1 -1
- package/Label/components/LabelValue.d.ts +1 -1
- package/Link/Link.d.ts +1 -1
- package/Link/Link.mdx +129 -116
- package/List/List.d.ts +1 -1
- package/List/List.js.map +1 -1
- package/List/List.mdx +317 -329
- package/List/components/ListItem.d.ts +1 -1
- package/List/components/ListItem.js.map +1 -1
- package/Loader/Loader.d.ts +2 -2
- package/Loader/Loader.js.map +1 -1
- package/Loader/Loader.mdx +96 -91
- package/MultiAutoComplete/MultiAutoComplete.mdx +52 -51
- package/MultiAutoComplete/primitives/components/MultiAutoCompleteInput.d.ts +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteListOptionsPresenter.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteListOptionsPresenterWithUniqueValues.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteSelectedOptionsPresenter.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteTemporaryOptionPresenter.js.map +1 -1
- package/MultiFilePicker/MultiFilePicker.mdx +84 -80
- package/MultiFilePicker/primitives/MultiFilePickerPrimitive.js.map +1 -1
- package/Popover/Popover.mdx +112 -118
- package/Popover/primitives/components/PopoverArrow.d.ts +1 -1
- package/Popover/primitives/components/PopoverContent.d.ts +1 -1
- package/RadioGroup/RadioGroup.mdx +62 -59
- package/RadioGroup/primitives/RadioGroupPrimitive.js.map +1 -1
- package/RangeSlider/RangeSlider.mdx +48 -47
- package/RangeSlider/primitives/RangeSliderPrimitive.js.map +1 -1
- package/RangeSlider/primitives/components/RangeSliderValue.d.ts +1 -1
- package/RangeSlider/primitives/components/RangeSliderValue.js.map +1 -1
- package/ScrollArea/ScrollArea.js.map +1 -1
- package/SegmentedControl/SegmentedControl.mdx +59 -59
- package/SegmentedControl/primitives/SegmentedControlPrimitive.d.ts +1 -1
- package/SegmentedControl/primitives/SegmentedControlPrimitive.js.map +1 -1
- package/Select/Select.mdx +52 -43
- package/Select/primitives/components/SelectTrigger.d.ts +1 -1
- package/Select/primitives/components/SelectTrigger.js.map +1 -1
- package/Select/primitives/presenters/SelectPresenter.d.ts +1 -1
- package/Separator/Separator.d.ts +1 -1
- package/Separator/Separator.mdx +139 -150
- package/Sidebar/Sidebar.js.map +1 -1
- package/Sidebar/Sidebar.mdx +66 -88
- package/Sidebar/components/items/SidebarMenuSubItemIndentation.d.ts +1 -1
- package/Sidebar/components/items/SidebarMenuSubItemIndentation.js.map +1 -1
- package/Skeleton/Skeleton.d.ts +1 -1
- package/Skeleton/Skeleton.js.map +1 -1
- package/Skeleton/Skeleton.mdx +37 -37
- package/Slider/Slider.mdx +48 -47
- package/Slider/primitives/SliderPrimitive.js.map +1 -1
- package/Slider/primitives/components/SliderSideValue.d.ts +1 -1
- package/Slider/primitives/components/SliderSideValue.js.map +1 -1
- package/Slider/primitives/components/SliderTooltip.d.ts +1 -1
- package/SteppedProgress/components/SteppedProgressIcon.d.ts +1 -1
- package/SteppedProgress/components/SteppedProgressIcon.js.map +1 -1
- package/SteppedProgress/components/SteppedProgressIndicator.d.ts +1 -1
- package/SteppedProgress/components/SteppedProgressIndicator.js.map +1 -1
- package/Switch/Switch.mdx +44 -42
- package/Switch/primitives/SwitchPrimitive.d.ts +1 -1
- package/Table/Table.d.ts +1 -1
- package/Table/Table.js.map +1 -1
- package/Table/components/Direction.d.ts +1 -1
- package/Table/components/Direction.js.map +1 -1
- package/Table/components/Header.d.ts +1 -1
- package/Table/components/Header.js.map +1 -1
- package/Table/components/Resizer.d.ts +1 -1
- package/Table/components/Resizer.js.map +1 -1
- package/Table/components/Row.d.ts +1 -1
- package/Table/components/Row.js.map +1 -1
- package/Tabs/Tabs.mdx +297 -292
- package/Tabs/components/Content.d.ts +1 -1
- package/Tabs/components/List.d.ts +1 -1
- package/Tabs/components/Trigger.d.ts +1 -1
- package/Tag/Tag.d.ts +1 -1
- package/Tag/Tag.js.map +1 -1
- package/Tag/Tag.mdx +68 -64
- package/Tags/primitives/TagsPrimitive.js.map +1 -1
- package/Text/Text.d.ts +1 -1
- package/Text/Text.mdx +54 -48
- package/Textarea/Textarea.mdx +49 -39
- package/Textarea/TextareaPrimitive.d.ts +1 -1
- package/Textarea/TextareaPrimitive.js.map +1 -1
- package/Toast/Toast.mdx +63 -53
- package/Toast/components/ToastRoot.d.ts +1 -1
- package/Tooltip/Tooltip.mdx +197 -198
- package/Tooltip/components/TooltipArrow.d.ts +1 -1
- package/Tooltip/components/TooltipContent.d.ts +1 -1
- package/Tree/components/Item.d.ts +1 -1
- package/Tree/useTree.d.ts +1 -1
- package/Widget/components/WidgetContent.d.ts +1 -1
- package/package.json +15 -15
|
@@ -5,7 +5,7 @@ declare const steppedProgressIndicatorVariants: (props?: ({
|
|
|
5
5
|
state?: ProgressItemState | null | undefined;
|
|
6
6
|
disabled?: boolean | null | undefined;
|
|
7
7
|
errored?: boolean | null | undefined;
|
|
8
|
-
} & import("class-variance-authority/
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
interface SteppedProgressIndicatorProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof steppedProgressIndicatorVariants> {
|
|
10
10
|
}
|
|
11
11
|
declare const SteppedProgressIndicator: ({ state, disabled, errored, className, children, ...props }: SteppedProgressIndicatorProps) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","cn","cva","ProgressItemState","steppedProgressIndicatorVariants","variants","state","IDLE","IN_PROGRESS","COMPLETED","COMPLETED_AFFIRMATIVE","disabled","true","errored","compoundVariants","className","defaultVariants","SteppedProgressIndicator","children","props","createElement","Object","assign"],"sources":["SteppedProgressIndicator.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\nimport { ProgressItemState } from \"~/SteppedProgress/domains/index.js\";\n\nconst steppedProgressIndicatorVariants = cva(\n [\"size-lg rounded-full relative shrink-0 basis-auto\"],\n {\n variants: {\n state: {\n [ProgressItemState.IDLE]:\n \"bg-neutral-base border-sm border-solid border-neutral-muted\",\n [ProgressItemState.IN_PROGRESS]: [\n \"bg-primary-base border-sm border-solid border-neutral-muted\"\n ],\n [ProgressItemState.COMPLETED]: \"bg-primary\",\n [ProgressItemState.COMPLETED_AFFIRMATIVE]: \"bg-success\"\n },\n disabled: {\n true: \"bg-neutral-dimmed! border-none!\"\n },\n errored: {\n true: \"\"\n }\n },\n compoundVariants: [\n {\n state: ProgressItemState.COMPLETED,\n errored: true,\n className: \"bg-destructive-default\"\n }\n ],\n defaultVariants: {\n state: ProgressItemState.IDLE\n }\n }\n);\n\ninterface SteppedProgressIndicatorProps\n extends
|
|
1
|
+
{"version":3,"names":["React","cn","cva","ProgressItemState","steppedProgressIndicatorVariants","variants","state","IDLE","IN_PROGRESS","COMPLETED","COMPLETED_AFFIRMATIVE","disabled","true","errored","compoundVariants","className","defaultVariants","SteppedProgressIndicator","children","props","createElement","Object","assign"],"sources":["SteppedProgressIndicator.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\nimport { ProgressItemState } from \"~/SteppedProgress/domains/index.js\";\n\nconst steppedProgressIndicatorVariants = cva(\n [\"size-lg rounded-full relative shrink-0 basis-auto\"],\n {\n variants: {\n state: {\n [ProgressItemState.IDLE]:\n \"bg-neutral-base border-sm border-solid border-neutral-muted\",\n [ProgressItemState.IN_PROGRESS]: [\n \"bg-primary-base border-sm border-solid border-neutral-muted\"\n ],\n [ProgressItemState.COMPLETED]: \"bg-primary\",\n [ProgressItemState.COMPLETED_AFFIRMATIVE]: \"bg-success\"\n },\n disabled: {\n true: \"bg-neutral-dimmed! border-none!\"\n },\n errored: {\n true: \"\"\n }\n },\n compoundVariants: [\n {\n state: ProgressItemState.COMPLETED,\n errored: true,\n className: \"bg-destructive-default\"\n }\n ],\n defaultVariants: {\n state: ProgressItemState.IDLE\n }\n }\n);\n\ninterface SteppedProgressIndicatorProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof steppedProgressIndicatorVariants> {}\n\nconst SteppedProgressIndicator = ({\n state,\n disabled,\n errored,\n className,\n children,\n ...props\n}: SteppedProgressIndicatorProps) => {\n return (\n <div\n {...props}\n className={cn(\n steppedProgressIndicatorVariants({ state, disabled, errored }),\n className\n )}\n >\n {children}\n </div>\n );\n};\n\nexport { SteppedProgressIndicator, type SteppedProgressIndicatorProps };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,EAAE,EAAEC,GAAG;AAChB,SAASC,iBAAiB;AAE1B,MAAMC,gCAAgC,GAAGF,GAAG,CACxC,CAAC,mDAAmD,CAAC,EACrD;EACIG,QAAQ,EAAE;IACNC,KAAK,EAAE;MACH,CAACH,iBAAiB,CAACI,IAAI,GACnB,6DAA6D;MACjE,CAACJ,iBAAiB,CAACK,WAAW,GAAG,CAC7B,6DAA6D,CAChE;MACD,CAACL,iBAAiB,CAACM,SAAS,GAAG,YAAY;MAC3C,CAACN,iBAAiB,CAACO,qBAAqB,GAAG;IAC/C,CAAC;IACDC,QAAQ,EAAE;MACNC,IAAI,EAAE;IACV,CAAC;IACDC,OAAO,EAAE;MACLD,IAAI,EAAE;IACV;EACJ,CAAC;EACDE,gBAAgB,EAAE,CACd;IACIR,KAAK,EAAEH,iBAAiB,CAACM,SAAS;IAClCI,OAAO,EAAE,IAAI;IACbE,SAAS,EAAE;EACf,CAAC,CACJ;EACDC,eAAe,EAAE;IACbV,KAAK,EAAEH,iBAAiB,CAACI;EAC7B;AACJ,CACJ,CAAC;AAOD,MAAMU,wBAAwB,GAAGA,CAAC;EAC9BX,KAAK;EACLK,QAAQ;EACRE,OAAO;EACPE,SAAS;EACTG,QAAQ;EACR,GAAGC;AACwB,CAAC,KAAK;EACjC,oBACInB,KAAA,CAAAoB,aAAA,QAAAC,MAAA,CAAAC,MAAA,KACQH,KAAK;IACTJ,SAAS,EAAEd,EAAE,CACTG,gCAAgC,CAAC;MAAEE,KAAK;MAAEK,QAAQ;MAAEE;IAAQ,CAAC,CAAC,EAC9DE,SACJ;EAAE,IAEDG,QACA,CAAC;AAEd,CAAC;AAED,SAASD,wBAAwB","ignoreList":[]}
|
package/Switch/Switch.mdx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Meta, Controls } from
|
|
1
|
+
import { Canvas, Meta, Controls } from "@storybook/addon-docs/blocks";
|
|
2
2
|
|
|
3
|
-
import * as SwitchStories from
|
|
3
|
+
import * as SwitchStories from "./Switch.stories";
|
|
4
4
|
|
|
5
5
|
<Meta of={SwitchStories} />
|
|
6
6
|
|
|
@@ -15,8 +15,8 @@ import React, { useState } from "react";
|
|
|
15
15
|
import { Switch } from "@webiny/admin-ui";
|
|
16
16
|
|
|
17
17
|
const SwitchExample = () => {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const [isChecked, setIsChecked] = useState(false);
|
|
19
|
+
const [validation, setValidation] = useState({ isValid: true, message: "" });
|
|
20
20
|
|
|
21
21
|
const handleChange = (checked: boolean) => {
|
|
22
22
|
setIsChecked(checked);
|
|
@@ -41,57 +41,59 @@ const SwitchExample = () => {
|
|
|
41
41
|
/>
|
|
42
42
|
</div>
|
|
43
43
|
);
|
|
44
|
+
|
|
44
45
|
};
|
|
45
46
|
|
|
46
47
|
export default SwitchExample;
|
|
47
48
|
|
|
48
49
|
` } }
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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/Switch/Switch.tsx',
|
|
56
|
+
'_blank'
|
|
57
|
+
);
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
]}
|
|
60
61
|
/>
|
|
61
62
|
|
|
62
|
-
<Controls of={SwitchStories.Documentation} exclude={"onChange"}/>
|
|
63
|
+
<Controls of={SwitchStories.Documentation} exclude={"onChange"} />
|
|
63
64
|
|
|
64
65
|
```tsx
|
|
65
66
|
import React, { useState } from "react";
|
|
66
67
|
import { Switch } from "@webiny/admin-ui";
|
|
67
68
|
|
|
68
69
|
const SwitchExample = () => {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
70
|
+
const [isChecked, setIsChecked] = useState(false);
|
|
71
|
+
const [validation, setValidation] = useState({ isValid: true, message: "" });
|
|
72
|
+
|
|
73
|
+
const handleChange = (checked: boolean) => {
|
|
74
|
+
setIsChecked(checked);
|
|
75
|
+
|
|
76
|
+
if (!checked && true) {
|
|
77
|
+
// true represents required field
|
|
78
|
+
setValidation({ isValid: false, message: "This field is required" });
|
|
79
|
+
} else {
|
|
80
|
+
setValidation({ isValid: true, message: "" });
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div>
|
|
86
|
+
<Switch
|
|
87
|
+
label="Enable feature"
|
|
88
|
+
description="Enabling this feature will activate additional functionality."
|
|
89
|
+
note="Note: This setting can be changed at any time."
|
|
90
|
+
checked={isChecked}
|
|
91
|
+
required={true}
|
|
92
|
+
onChange={handleChange}
|
|
93
|
+
validation={validation}
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
);
|
|
95
97
|
};
|
|
96
98
|
|
|
97
99
|
export default SwitchExample;
|
|
@@ -7,7 +7,7 @@ import type { SwitchItemDto, SwitchItemFormatted } from "../domains/index.js";
|
|
|
7
7
|
*/
|
|
8
8
|
declare const switchVariants: (props?: ({
|
|
9
9
|
labelPosition?: "end" | "start" | null | undefined;
|
|
10
|
-
} & import("class-variance-authority/
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
type SwitchPrimitiveProps = Omit<SwitchPrimitives.SwitchProps, "defaultChecked" | "onCheckedChange" | "onChange"> & VariantProps<typeof switchVariants> & SwitchItemDto & {
|
|
12
12
|
onChange?: (checked: boolean) => void;
|
|
13
13
|
};
|
package/Table/Table.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { type VariantProps } from "../utils.js";
|
|
3
3
|
declare const tableVariants: (props?: ({
|
|
4
4
|
bordered?: boolean | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
interface TableProps extends React.HTMLAttributes<HTMLTableElement>, VariantProps<typeof tableVariants> {
|
|
7
7
|
sticky?: boolean;
|
|
8
8
|
}
|
package/Table/Table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","cn","cva","withStaticProps","Body","Caption","Cell","Direction","Footer","Head","Header","Resizer","Row","tableWrapperVariants","variants","sticky","true","tableVariants","bordered","BaseTable","className","props","createElement","Object","assign","Table"],"sources":["Table.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn, cva, type VariantProps, withStaticProps } from \"~/utils.js\";\nimport {\n Body,\n Caption,\n Cell,\n Direction,\n Footer,\n Head,\n Header,\n Resizer,\n Row\n} from \"~/Table/components/index.js\";\n\nconst tableWrapperVariants = cva(\"relative w-full overflow-auto\", {\n variants: {\n sticky: {\n true: \"overflow-clip\"\n }\n }\n});\n\nconst tableVariants = cva(\"w-full caption-bottom text-sm bg-white\", {\n variants: {\n bordered: {\n true: \"border-neutral-dimmed border-solid border-sm\"\n }\n }\n});\n\ninterface TableProps\n extends React.HTMLAttributes<HTMLTableElement
|
|
1
|
+
{"version":3,"names":["React","cn","cva","withStaticProps","Body","Caption","Cell","Direction","Footer","Head","Header","Resizer","Row","tableWrapperVariants","variants","sticky","true","tableVariants","bordered","BaseTable","className","props","createElement","Object","assign","Table"],"sources":["Table.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn, cva, type VariantProps, withStaticProps } from \"~/utils.js\";\nimport {\n Body,\n Caption,\n Cell,\n Direction,\n Footer,\n Head,\n Header,\n Resizer,\n Row\n} from \"~/Table/components/index.js\";\n\nconst tableWrapperVariants = cva(\"relative w-full overflow-auto\", {\n variants: {\n sticky: {\n true: \"overflow-clip\"\n }\n }\n});\n\nconst tableVariants = cva(\"w-full caption-bottom text-sm bg-white\", {\n variants: {\n bordered: {\n true: \"border-neutral-dimmed border-solid border-sm\"\n }\n }\n});\n\ninterface TableProps\n extends React.HTMLAttributes<HTMLTableElement>, VariantProps<typeof tableVariants> {\n sticky?: boolean;\n}\n\nconst BaseTable = ({ className, bordered, sticky, ...props }: TableProps) => (\n <div className={cn(tableWrapperVariants({ sticky }))}>\n <table className={cn(tableVariants({ bordered }), className)} {...props} />\n </div>\n);\n\nconst Table = withStaticProps(BaseTable, {\n Body,\n Caption,\n Cell,\n Direction,\n Footer,\n Head,\n Header,\n Resizer,\n Row\n});\n\nexport { Table, type TableProps };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,EAAE,EAAEC,GAAG,EAAqBC,eAAe;AACpD,SACIC,IAAI,EACJC,OAAO,EACPC,IAAI,EACJC,SAAS,EACTC,MAAM,EACNC,IAAI,EACJC,MAAM,EACNC,OAAO,EACPC,GAAG;AAGP,MAAMC,oBAAoB,GAAGX,GAAG,CAAC,+BAA+B,EAAE;EAC9DY,QAAQ,EAAE;IACNC,MAAM,EAAE;MACJC,IAAI,EAAE;IACV;EACJ;AACJ,CAAC,CAAC;AAEF,MAAMC,aAAa,GAAGf,GAAG,CAAC,wCAAwC,EAAE;EAChEY,QAAQ,EAAE;IACNI,QAAQ,EAAE;MACNF,IAAI,EAAE;IACV;EACJ;AACJ,CAAC,CAAC;AAOF,MAAMG,SAAS,GAAGA,CAAC;EAAEC,SAAS;EAAEF,QAAQ;EAAEH,MAAM;EAAE,GAAGM;AAAkB,CAAC,kBACpErB,KAAA,CAAAsB,aAAA;EAAKF,SAAS,EAAEnB,EAAE,CAACY,oBAAoB,CAAC;IAAEE;EAAO,CAAC,CAAC;AAAE,gBACjDf,KAAA,CAAAsB,aAAA,UAAAC,MAAA,CAAAC,MAAA;EAAOJ,SAAS,EAAEnB,EAAE,CAACgB,aAAa,CAAC;IAAEC;EAAS,CAAC,CAAC,EAAEE,SAAS;AAAE,GAAKC,KAAK,CAAG,CACzE,CACR;AAED,MAAMI,KAAK,GAAGtB,eAAe,CAACgB,SAAS,EAAE;EACrCf,IAAI;EACJC,OAAO;EACPC,IAAI;EACJC,SAAS;EACTC,MAAM;EACNC,IAAI;EACJC,MAAM;EACNC,OAAO;EACPC;AACJ,CAAC,CAAC;AAEF,SAASa,KAAK","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { type VariantProps } from "../../utils.js";
|
|
3
3
|
declare const directionVariants: (props?: ({
|
|
4
4
|
direction?: "desc" | "asc" | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
interface DirectionProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof directionVariants> {
|
|
7
7
|
}
|
|
8
8
|
declare const Direction: ({ className, direction }: DirectionProps) => React.JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ReactComponent","ArrowDown","Icon","cn","cva","directionVariants","variants","direction","asc","desc","Direction","className","createElement","size","icon","label","color"],"sources":["Direction.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as ArrowDown } from \"@webiny/icons/keyboard_arrow_up.svg\";\nimport { Icon } from \"~/Icon/index.js\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\n\nconst directionVariants = cva(\"inline\", {\n variants: {\n direction: {\n asc: \"rotate-0\",\n desc: \"rotate-180\"\n }\n }\n});\n\ninterface DirectionProps\n extends React.HTMLAttributes<HTMLSpanElement
|
|
1
|
+
{"version":3,"names":["React","ReactComponent","ArrowDown","Icon","cn","cva","directionVariants","variants","direction","asc","desc","Direction","className","createElement","size","icon","label","color"],"sources":["Direction.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as ArrowDown } from \"@webiny/icons/keyboard_arrow_up.svg\";\nimport { Icon } from \"~/Icon/index.js\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\n\nconst directionVariants = cva(\"inline\", {\n variants: {\n direction: {\n asc: \"rotate-0\",\n desc: \"rotate-180\"\n }\n }\n});\n\ninterface DirectionProps\n extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof directionVariants> {}\n\nconst Direction = ({ className, direction }: DirectionProps) => {\n if (!direction) {\n return null;\n }\n\n return (\n <Icon\n className={cn(directionVariants({ direction }), className)}\n size=\"sm\"\n icon={<ArrowDown />}\n label={\"Sort column\"}\n color={\"neutral-strong\"}\n />\n );\n};\n\nexport { Direction, type DirectionProps };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,IAAIC,SAAS,QAAQ,qCAAqC;AACjF,SAASC,IAAI;AACb,SAASC,EAAE,EAAEC,GAAG;AAEhB,MAAMC,iBAAiB,GAAGD,GAAG,CAAC,QAAQ,EAAE;EACpCE,QAAQ,EAAE;IACNC,SAAS,EAAE;MACPC,GAAG,EAAE,UAAU;MACfC,IAAI,EAAE;IACV;EACJ;AACJ,CAAC,CAAC;AAKF,MAAMC,SAAS,GAAGA,CAAC;EAAEC,SAAS;EAAEJ;AAA0B,CAAC,KAAK;EAC5D,IAAI,CAACA,SAAS,EAAE;IACZ,OAAO,IAAI;EACf;EAEA,oBACIR,KAAA,CAAAa,aAAA,CAACV,IAAI;IACDS,SAAS,EAAER,EAAE,CAACE,iBAAiB,CAAC;MAAEE;IAAU,CAAC,CAAC,EAAEI,SAAS,CAAE;IAC3DE,IAAI,EAAC,IAAI;IACTC,IAAI,eAAEf,KAAA,CAAAa,aAAA,CAACX,SAAS,MAAE,CAAE;IACpBc,KAAK,EAAE,aAAc;IACrBC,KAAK,EAAE;EAAiB,CAC3B,CAAC;AAEV,CAAC;AAED,SAASN,SAAS","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { type VariantProps } from "../../utils.js";
|
|
3
3
|
declare const headerVariants: (props?: ({
|
|
4
4
|
sticky?: boolean | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
interface HeaderProps extends React.HTMLAttributes<HTMLTableSectionElement>, VariantProps<typeof headerVariants> {
|
|
7
7
|
}
|
|
8
8
|
declare const Header: ({ className, sticky, ...props }: HeaderProps) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","cn","cva","headerVariants","variants","sticky","true","Header","className","props","createElement","Object","assign"],"sources":["Header.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\n\nconst headerVariants = cva(\"[&_tr]:hover:bg-transparent\", {\n variants: {\n sticky: {\n true: \"[&_tr]:bg-white [&_tr]:hover:bg-white sticky top-0\"\n }\n }\n});\n\ninterface HeaderProps\n extends React.HTMLAttributes<HTMLTableSectionElement
|
|
1
|
+
{"version":3,"names":["React","cn","cva","headerVariants","variants","sticky","true","Header","className","props","createElement","Object","assign"],"sources":["Header.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\n\nconst headerVariants = cva(\"[&_tr]:hover:bg-transparent\", {\n variants: {\n sticky: {\n true: \"[&_tr]:bg-white [&_tr]:hover:bg-white sticky top-0\"\n }\n }\n});\n\ninterface HeaderProps\n extends React.HTMLAttributes<HTMLTableSectionElement>, VariantProps<typeof headerVariants> {}\n\nconst Header = ({ className, sticky, ...props }: HeaderProps) => (\n <thead className={cn(headerVariants({ sticky }), className)} {...props} />\n);\n\nexport { Header, type HeaderProps };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,EAAE,EAAEC,GAAG;AAEhB,MAAMC,cAAc,GAAGD,GAAG,CAAC,6BAA6B,EAAE;EACtDE,QAAQ,EAAE;IACNC,MAAM,EAAE;MACJC,IAAI,EAAE;IACV;EACJ;AACJ,CAAC,CAAC;AAKF,MAAMC,MAAM,GAAGA,CAAC;EAAEC,SAAS;EAAEH,MAAM;EAAE,GAAGI;AAAmB,CAAC,kBACxDT,KAAA,CAAAU,aAAA,UAAAC,MAAA,CAAAC,MAAA;EAAOJ,SAAS,EAAEP,EAAE,CAACE,cAAc,CAAC;IAAEE;EAAO,CAAC,CAAC,EAAEG,SAAS;AAAE,GAAKC,KAAK,CAAG,CAC5E;AAED,SAASF,MAAM","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { type VariantProps } from "../../utils.js";
|
|
3
3
|
declare const resizerVariants: (props?: ({
|
|
4
4
|
isResizing?: boolean | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
interface ResizerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof resizerVariants> {
|
|
7
7
|
}
|
|
8
8
|
declare const Resizer: ({ className, isResizing, ...props }: ResizerProps) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","cn","cva","resizerVariants","variants","isResizing","true","Resizer","className","props","createElement","Object","assign"],"sources":["Resizer.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\n\nconst resizerVariants = cva(\n [\n \"absolute right-0 top-0 w-md h-full border-r-md border-r-accent-default cursor-col-resize select-none touch-none\",\n \"opacity-0 bg-transparent\",\n \"hover:opacity-100\"\n ],\n {\n variants: {\n isResizing: {\n true: \"opacity-100\"\n }\n }\n }\n);\n\ninterface ResizerProps\n extends React.HTMLAttributes<HTMLDivElement
|
|
1
|
+
{"version":3,"names":["React","cn","cva","resizerVariants","variants","isResizing","true","Resizer","className","props","createElement","Object","assign"],"sources":["Resizer.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\n\nconst resizerVariants = cva(\n [\n \"absolute right-0 top-0 w-md h-full border-r-md border-r-accent-default cursor-col-resize select-none touch-none\",\n \"opacity-0 bg-transparent\",\n \"hover:opacity-100\"\n ],\n {\n variants: {\n isResizing: {\n true: \"opacity-100\"\n }\n }\n }\n);\n\ninterface ResizerProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof resizerVariants> {}\n\nconst Resizer = ({ className, isResizing, ...props }: ResizerProps) => (\n <div className={cn(resizerVariants({ isResizing }), className)} {...props} />\n);\n\nexport { Resizer, type ResizerProps };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,EAAE,EAAEC,GAAG;AAEhB,MAAMC,eAAe,GAAGD,GAAG,CACvB,CACI,iHAAiH,EACjH,0BAA0B,EAC1B,mBAAmB,CACtB,EACD;EACIE,QAAQ,EAAE;IACNC,UAAU,EAAE;MACRC,IAAI,EAAE;IACV;EACJ;AACJ,CACJ,CAAC;AAKD,MAAMC,OAAO,GAAGA,CAAC;EAAEC,SAAS;EAAEH,UAAU;EAAE,GAAGI;AAAoB,CAAC,kBAC9DT,KAAA,CAAAU,aAAA,QAAAC,MAAA,CAAAC,MAAA;EAAKJ,SAAS,EAAEP,EAAE,CAACE,eAAe,CAAC;IAAEE;EAAW,CAAC,CAAC,EAAEG,SAAS;AAAE,GAAKC,KAAK,CAAG,CAC/E;AAED,SAASF,OAAO","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { type VariantProps } from "../../utils.js";
|
|
3
3
|
declare const rowVariants: (props?: ({
|
|
4
4
|
selected?: boolean | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
interface RowProps extends React.HTMLAttributes<HTMLTableRowElement>, VariantProps<typeof rowVariants> {
|
|
7
7
|
}
|
|
8
8
|
declare const Row: ({ className, selected, ...props }: RowProps) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","cn","cva","rowVariants","variants","selected","true","Row","className","props","createElement","Object","assign"],"sources":["Row.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\n\nconst rowVariants = cva(\n \"border-neutral-dimmed border-solid border-b-sm transition-colors hover:bg-neutral-subtle\",\n {\n variants: {\n selected: {\n true: \"bg-neutral-light\"\n }\n }\n }\n);\n\ninterface RowProps\n extends React.HTMLAttributes<HTMLTableRowElement
|
|
1
|
+
{"version":3,"names":["React","cn","cva","rowVariants","variants","selected","true","Row","className","props","createElement","Object","assign"],"sources":["Row.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn, cva, type VariantProps } from \"~/utils.js\";\n\nconst rowVariants = cva(\n \"border-neutral-dimmed border-solid border-b-sm transition-colors hover:bg-neutral-subtle\",\n {\n variants: {\n selected: {\n true: \"bg-neutral-light\"\n }\n }\n }\n);\n\ninterface RowProps\n extends React.HTMLAttributes<HTMLTableRowElement>, VariantProps<typeof rowVariants> {}\n\nconst Row = ({ className, selected, ...props }: RowProps) => (\n <tr className={cn(rowVariants({ selected }), className)} {...props} />\n);\n\nexport { Row, type RowProps };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,EAAE,EAAEC,GAAG;AAEhB,MAAMC,WAAW,GAAGD,GAAG,CACnB,0FAA0F,EAC1F;EACIE,QAAQ,EAAE;IACNC,QAAQ,EAAE;MACNC,IAAI,EAAE;IACV;EACJ;AACJ,CACJ,CAAC;AAKD,MAAMC,GAAG,GAAGA,CAAC;EAAEC,SAAS;EAAEH,QAAQ;EAAE,GAAGI;AAAgB,CAAC,kBACpDT,KAAA,CAAAU,aAAA,OAAAC,MAAA,CAAAC,MAAA;EAAIJ,SAAS,EAAEP,EAAE,CAACE,WAAW,CAAC;IAAEE;EAAS,CAAC,CAAC,EAAEG,SAAS;AAAE,GAAKC,KAAK,CAAG,CACxE;AAED,SAASF,GAAG","ignoreList":[]}
|