@webiny/ui 6.0.0-alpha.0 → 6.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/Accordion/Accordion.d.ts +1 -1
  2. package/Accordion/Accordion.js.map +1 -1
  3. package/Accordion/AccordionItem.d.ts +0 -19
  4. package/Accordion/AccordionItem.js +0 -1
  5. package/Accordion/AccordionItem.js.map +1 -1
  6. package/AutoComplete/AutoComplete.d.ts +1 -1
  7. package/AutoComplete/AutoComplete.js.map +1 -1
  8. package/AutoComplete/MultiAutoComplete.d.ts +1 -1
  9. package/AutoComplete/MultiAutoComplete.js.map +1 -1
  10. package/AutoComplete/types.d.ts +2 -2
  11. package/AutoComplete/types.js.map +1 -1
  12. package/Button/ButtonDefault.d.ts +1 -1
  13. package/Button/ButtonDefault.js.map +1 -1
  14. package/Button/ButtonFloating.d.ts +1 -1
  15. package/Button/ButtonFloating.js.map +1 -1
  16. package/Button/ButtonPrimary.d.ts +1 -1
  17. package/Button/ButtonPrimary.js.map +1 -1
  18. package/Button/ButtonSecondary.d.ts +1 -1
  19. package/Button/ButtonSecondary.js.map +1 -1
  20. package/Button/IconButton.d.ts +3 -2
  21. package/Button/IconButton.js.map +1 -1
  22. package/Button/useMappedButtonProps.d.ts +1 -1
  23. package/Button/useMappedButtonProps.js.map +1 -1
  24. package/Checkbox/Checkbox.d.ts +1 -1
  25. package/Checkbox/Checkbox.js.map +1 -1
  26. package/Checkbox/CheckboxGroup.d.ts +1 -1
  27. package/Checkbox/CheckboxGroup.js.map +1 -1
  28. package/Chips/Chips.d.ts +1 -1
  29. package/Chips/Chips.js.map +1 -1
  30. package/CodeEditor/CodeEditor.d.ts +1 -1
  31. package/CodeEditor/CodeEditor.js.map +1 -1
  32. package/ColorPicker/ColorPicker.d.ts +1 -1
  33. package/ColorPicker/ColorPicker.js.map +1 -1
  34. package/DataTable/DataTable.d.ts +1 -1
  35. package/DataTable/DataTable.js.map +1 -1
  36. package/Grid/Grid.d.ts +2 -1
  37. package/Grid/Grid.js.map +1 -1
  38. package/ImageUpload/ImageEditorDialog.d.ts +1 -1
  39. package/ImageUpload/ImageEditorDialog.js.map +1 -1
  40. package/ImageUpload/MultiImageUpload.d.ts +1 -1
  41. package/ImageUpload/MultiImageUpload.js.map +1 -1
  42. package/ImageUpload/SingleImageUpload.d.ts +1 -1
  43. package/ImageUpload/SingleImageUpload.js.map +1 -1
  44. package/Input/Input.d.ts +3 -2
  45. package/Input/Input.js.map +1 -1
  46. package/List/DataList/DataList.d.ts +2 -2
  47. package/List/DataList/DataList.js.map +1 -1
  48. package/List/DataList/DataListWithSections.d.ts +3 -3
  49. package/List/DataList/DataListWithSections.js.map +1 -1
  50. package/List/List/ListItem.js.map +1 -1
  51. package/List/List/ListItemAction.d.ts +1 -1
  52. package/List/List/ListItemAction.js.map +1 -1
  53. package/List/List/ListItemGraphic.d.ts +1 -1
  54. package/List/List/ListItemGraphic.js.map +1 -1
  55. package/List/List/ListItemText.d.ts +1 -1
  56. package/List/List/ListItemText.js.map +1 -1
  57. package/Radio/Radio.d.ts +1 -1
  58. package/Radio/Radio.js.map +1 -1
  59. package/Radio/RadioGroup.d.ts +1 -1
  60. package/Radio/RadioGroup.js.map +1 -1
  61. package/RichTextEditor/RichTextEditor.d.ts +1 -1
  62. package/RichTextEditor/RichTextEditor.js.map +1 -1
  63. package/Select/Select.d.ts +1 -1
  64. package/Select/Select.js +2 -1
  65. package/Select/Select.js.map +1 -1
  66. package/Skeleton/Skeleton.d.ts +3 -2
  67. package/Skeleton/Skeleton.js.map +1 -1
  68. package/Slider/Slider.d.ts +1 -1
  69. package/Slider/Slider.js.map +1 -1
  70. package/Snackbar/Snackbar.d.ts +1 -1
  71. package/Snackbar/Snackbar.js.map +1 -1
  72. package/Switch/Switch.d.ts +1 -1
  73. package/Switch/Switch.js.map +1 -1
  74. package/Tabs/Tabs.d.ts +3 -2
  75. package/Tabs/Tabs.js.map +1 -1
  76. package/Tags/Tags.d.ts +7 -2
  77. package/Tags/Tags.js +7 -62
  78. package/Tags/Tags.js.map +1 -1
  79. package/Tooltip/Tooltip.js.map +1 -1
  80. package/TopAppBar/TopAppBarPrimary.d.ts +1 -1
  81. package/TopAppBar/TopAppBarPrimary.js.map +1 -1
  82. package/TopAppBar/TopAppBarSecondary.d.ts +1 -1
  83. package/TopAppBar/TopAppBarSecondary.js.map +1 -1
  84. package/Typography/Typography.js.map +1 -1
  85. package/package.json +7 -8
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { ListItem } from "../List";
2
+ import type { ListItem } from "../List";
3
3
  import { type AccordionItem } from "./AccordionItem";
4
4
  interface AccordionProps {
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["React","Accordion","AdminUiAccordion","props","createElement","children"],"sources":["Accordion.tsx"],"sourcesContent":["import React from \"react\";\nimport { Accordion as AdminUiAccordion } from \"@webiny/admin-ui\";\nimport { ListItem } from \"../List\";\nimport { type AccordionItem } from \"./AccordionItem\";\n\ninterface AccordionProps {\n /**\n * Element displayed when accordion is expanded.\n */\n children:\n | React.ReactElement<typeof ListItem>[]\n | React.ReactElement<typeof AccordionItem>\n | React.ReactElement<typeof AccordionItem>[];\n\n /**\n * Elevation number, default set to 2\n */\n elevation?: number;\n\n /**\n * Append a class name\n */\n className?: string;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Accordion` component from the `@webiny/admin-ui` package instead.\n */\nconst Accordion = (props: AccordionProps) => {\n return <AdminUiAccordion>{props.children}</AdminUiAccordion>;\n};\n\nexport { Accordion, type AccordionProps };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,IAAIC,gBAAgB,QAAQ,kBAAkB;AAwBhE;AACA;AACA;AACA;AACA,MAAMD,SAAS,GAAIE,KAAqB,IAAK;EACzC,oBAAOH,KAAA,CAAAI,aAAA,CAACF,gBAAgB,QAAEC,KAAK,CAACE,QAA2B,CAAC;AAChE,CAAC;AAED,SAASJ,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["React","Accordion","AdminUiAccordion","props","createElement","children"],"sources":["Accordion.tsx"],"sourcesContent":["import React from \"react\";\nimport { Accordion as AdminUiAccordion } from \"@webiny/admin-ui\";\nimport type { ListItem } from \"../List\";\nimport { type AccordionItem } from \"./AccordionItem\";\n\ninterface AccordionProps {\n /**\n * Element displayed when accordion is expanded.\n */\n children:\n | React.ReactElement<typeof ListItem>[]\n | React.ReactElement<typeof AccordionItem>\n | React.ReactElement<typeof AccordionItem>[];\n\n /**\n * Elevation number, default set to 2\n */\n elevation?: number;\n\n /**\n * Append a class name\n */\n className?: string;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Accordion` component from the `@webiny/admin-ui` package instead.\n */\nconst Accordion = (props: AccordionProps) => {\n return <AdminUiAccordion>{props.children}</AdminUiAccordion>;\n};\n\nexport { Accordion, type AccordionProps };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,IAAIC,gBAAgB,QAAQ,kBAAkB;AAwBhE;AACA;AACA;AACA;AACA,MAAMD,SAAS,GAAIE,KAAqB,IAAK;EACzC,oBAAOH,KAAA,CAAAI,aAAA,CAACF,gBAAgB,QAAEC,KAAK,CAACE,QAA2B,CAAC;AAChE,CAAC;AAED,SAASJ,SAAS","ignoreList":[]}
@@ -89,25 +89,6 @@ export declare const AccordionItem: ((props: AccordionItemProps) => React.JSX.El
89
89
  }>) => (props: unknown) => React.JSX.Element;
90
90
  };
91
91
  };
92
- Handle: (({ onClick, ...props }: import("@webiny/admin-ui/Accordion/components/AccordionItemHandle").AccordionItemHandleProps) => React.JSX.Element) & {
93
- original: ({ onClick, ...props }: import("@webiny/admin-ui/Accordion/components/AccordionItemHandle").AccordionItemHandleProps) => React.JSX.Element;
94
- originalName: string;
95
- displayName: string;
96
- } & {
97
- original: (({ onClick, ...props }: import("@webiny/admin-ui/Accordion/components/AccordionItemHandle").AccordionItemHandleProps) => React.JSX.Element) & {
98
- original: ({ onClick, ...props }: import("@webiny/admin-ui/Accordion/components/AccordionItemHandle").AccordionItemHandleProps) => React.JSX.Element;
99
- originalName: string;
100
- displayName: string;
101
- };
102
- originalName: string;
103
- displayName: string;
104
- } & {
105
- createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ onClick, ...props }: import("@webiny/admin-ui/Accordion/components/AccordionItemHandle").AccordionItemHandleProps) => React.JSX.Element) & {
106
- original: ({ onClick, ...props }: import("@webiny/admin-ui/Accordion/components/AccordionItemHandle").AccordionItemHandleProps) => React.JSX.Element;
107
- originalName: string;
108
- displayName: string;
109
- }>) => (props: unknown) => React.JSX.Element;
110
- };
111
92
  Icon: ((props: import("@webiny/admin-ui/Icon/Icon").IconProps) => React.JSX.Element) & {
112
93
  original: (props: import("@webiny/admin-ui/Icon/Icon").IconProps) => React.JSX.Element;
113
94
  originalName: string;
@@ -27,7 +27,6 @@ const AccordionItemBase = props => {
27
27
  export const AccordionItem = withStaticProps(AccordionItemBase, {
28
28
  Divider: AdminUiAccordion.Item.Action.Separator,
29
29
  Action: AdminUiAccordion.Item.Action,
30
- Handle: AdminUiAccordion.Item.Handle,
31
30
  Icon: AdminUiAccordion.Item.Icon,
32
31
  Actions: props => /*#__PURE__*/React.createElement(React.Fragment, null, props.children),
33
32
  Element: props => /*#__PURE__*/React.createElement("div", Object.assign({
@@ -1 +1 @@
1
- {"version":3,"names":["React","useMemo","useEffect","useState","Accordion","AdminUiAccordion","withStaticProps","AccordionItemBase","props","open","setOpen","icon","createElement","Item","Icon","label","title","Object","assign","onOpenChange","children","AccordionItem","Divider","Action","Separator","Handle","Actions","Fragment","Element"],"sources":["AccordionItem.tsx"],"sourcesContent":["import React, { useMemo, useEffect, useState } from \"react\";\nimport { Accordion as AdminUiAccordion } from \"@webiny/admin-ui\";\nimport { withStaticProps } from \"@webiny/admin-ui/utils\";\n\nexport interface AccordionItemProps {\n /**\n * Element displayed when accordion is expanded.\n */\n children: React.ReactNode;\n\n /**\n * @deprecated This prop no longer has any effect.\n * Elevation number, default set to 2\n */\n elevation?: number;\n\n /**\n * Append a class name\n */\n className?: string;\n\n value?: string;\n\n title?: React.ReactNode;\n\n description?: React.ReactNode;\n\n open?: boolean;\n\n interactive?: boolean;\n\n handle?: React.ReactNode;\n\n actions?: React.ReactNode;\n\n icon?: React.ReactNode;\n\n /**\n * @deprecated This prop no longer has any effect.\n */\n iconClassName?: string;\n}\n\nconst AccordionItemBase = (props: AccordionItemProps) => {\n const [open, setOpen] = useState<boolean>(props.open ?? false);\n\n useEffect(() => {\n setOpen(!!props.open);\n }, [props.open]);\n\n const icon = useMemo(() => {\n return props.icon ? (\n <AdminUiAccordion.Item.Icon\n icon={props.icon}\n label={typeof props.title === \"string\" ? props.title : \"\"}\n />\n ) : null;\n }, [props.icon]);\n\n return (\n <AdminUiAccordion.Item\n {...props}\n open={open}\n onOpenChange={open => setOpen(open)}\n icon={icon}\n title={props.title || \"\"}\n >\n {props.children as React.ReactElement}\n </AdminUiAccordion.Item>\n );\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Accordion.Item` component from the `@webiny/admin-ui` package instead.\n */\nexport const AccordionItem = withStaticProps(AccordionItemBase, {\n Divider: AdminUiAccordion.Item.Action.Separator,\n Action: AdminUiAccordion.Item.Action,\n Handle: AdminUiAccordion.Item.Handle,\n Icon: AdminUiAccordion.Item.Icon,\n Actions: (props: any) => <>{props.children}</>,\n Element: (props: any) => <div data-role={\"accordion-element\"} {...props} />\n});\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3D,SAASC,SAAS,IAAIC,gBAAgB,QAAQ,kBAAkB;AAChE,SAASC,eAAe,QAAQ,wBAAwB;AAyCxD,MAAMC,iBAAiB,GAAIC,KAAyB,IAAK;EACrD,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGP,QAAQ,CAAUK,KAAK,CAACC,IAAI,IAAI,KAAK,CAAC;EAE9DP,SAAS,CAAC,MAAM;IACZQ,OAAO,CAAC,CAAC,CAACF,KAAK,CAACC,IAAI,CAAC;EACzB,CAAC,EAAE,CAACD,KAAK,CAACC,IAAI,CAAC,CAAC;EAEhB,MAAME,IAAI,GAAGV,OAAO,CAAC,MAAM;IACvB,OAAOO,KAAK,CAACG,IAAI,gBACbX,KAAA,CAAAY,aAAA,CAACP,gBAAgB,CAACQ,IAAI,CAACC,IAAI;MACvBH,IAAI,EAAEH,KAAK,CAACG,IAAK;MACjBI,KAAK,EAAE,OAAOP,KAAK,CAACQ,KAAK,KAAK,QAAQ,GAAGR,KAAK,CAACQ,KAAK,GAAG;IAAG,CAC7D,CAAC,GACF,IAAI;EACZ,CAAC,EAAE,CAACR,KAAK,CAACG,IAAI,CAAC,CAAC;EAEhB,oBACIX,KAAA,CAAAY,aAAA,CAACP,gBAAgB,CAACQ,IAAI,EAAAI,MAAA,CAAAC,MAAA,KACdV,KAAK;IACTC,IAAI,EAAEA,IAAK;IACXU,YAAY,EAAEV,IAAI,IAAIC,OAAO,CAACD,IAAI,CAAE;IACpCE,IAAI,EAAEA,IAAK;IACXK,KAAK,EAAER,KAAK,CAACQ,KAAK,IAAI;EAAG,IAExBR,KAAK,CAACY,QACY,CAAC;AAEhC,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAGf,eAAe,CAACC,iBAAiB,EAAE;EAC5De,OAAO,EAAEjB,gBAAgB,CAACQ,IAAI,CAACU,MAAM,CAACC,SAAS;EAC/CD,MAAM,EAAElB,gBAAgB,CAACQ,IAAI,CAACU,MAAM;EACpCE,MAAM,EAAEpB,gBAAgB,CAACQ,IAAI,CAACY,MAAM;EACpCX,IAAI,EAAET,gBAAgB,CAACQ,IAAI,CAACC,IAAI;EAChCY,OAAO,EAAGlB,KAAU,iBAAKR,KAAA,CAAAY,aAAA,CAAAZ,KAAA,CAAA2B,QAAA,QAAGnB,KAAK,CAACY,QAAW,CAAC;EAC9CQ,OAAO,EAAGpB,KAAU,iBAAKR,KAAA,CAAAY,aAAA,QAAAK,MAAA,CAAAC,MAAA;IAAK,aAAW;EAAoB,GAAKV,KAAK,CAAG;AAC9E,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useMemo","useEffect","useState","Accordion","AdminUiAccordion","withStaticProps","AccordionItemBase","props","open","setOpen","icon","createElement","Item","Icon","label","title","Object","assign","onOpenChange","children","AccordionItem","Divider","Action","Separator","Actions","Fragment","Element"],"sources":["AccordionItem.tsx"],"sourcesContent":["import React, { useMemo, useEffect, useState } from \"react\";\nimport { Accordion as AdminUiAccordion } from \"@webiny/admin-ui\";\nimport { withStaticProps } from \"@webiny/admin-ui/utils\";\n\nexport interface AccordionItemProps {\n /**\n * Element displayed when accordion is expanded.\n */\n children: React.ReactNode;\n\n /**\n * @deprecated This prop no longer has any effect.\n * Elevation number, default set to 2\n */\n elevation?: number;\n\n /**\n * Append a class name\n */\n className?: string;\n\n value?: string;\n\n title?: React.ReactNode;\n\n description?: React.ReactNode;\n\n open?: boolean;\n\n interactive?: boolean;\n\n handle?: React.ReactNode;\n\n actions?: React.ReactNode;\n\n icon?: React.ReactNode;\n\n /**\n * @deprecated This prop no longer has any effect.\n */\n iconClassName?: string;\n}\n\nconst AccordionItemBase = (props: AccordionItemProps) => {\n const [open, setOpen] = useState<boolean>(props.open ?? false);\n\n useEffect(() => {\n setOpen(!!props.open);\n }, [props.open]);\n\n const icon = useMemo(() => {\n return props.icon ? (\n <AdminUiAccordion.Item.Icon\n icon={props.icon}\n label={typeof props.title === \"string\" ? props.title : \"\"}\n />\n ) : null;\n }, [props.icon]);\n\n return (\n <AdminUiAccordion.Item\n {...props}\n open={open}\n onOpenChange={open => setOpen(open)}\n icon={icon}\n title={props.title || \"\"}\n >\n {props.children as React.ReactElement}\n </AdminUiAccordion.Item>\n );\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Accordion.Item` component from the `@webiny/admin-ui` package instead.\n */\nexport const AccordionItem = withStaticProps(AccordionItemBase, {\n Divider: AdminUiAccordion.Item.Action.Separator,\n Action: AdminUiAccordion.Item.Action,\n Icon: AdminUiAccordion.Item.Icon,\n Actions: (props: any) => <>{props.children}</>,\n Element: (props: any) => <div data-role={\"accordion-element\"} {...props} />\n});\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3D,SAASC,SAAS,IAAIC,gBAAgB,QAAQ,kBAAkB;AAChE,SAASC,eAAe,QAAQ,wBAAwB;AAyCxD,MAAMC,iBAAiB,GAAIC,KAAyB,IAAK;EACrD,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGP,QAAQ,CAAUK,KAAK,CAACC,IAAI,IAAI,KAAK,CAAC;EAE9DP,SAAS,CAAC,MAAM;IACZQ,OAAO,CAAC,CAAC,CAACF,KAAK,CAACC,IAAI,CAAC;EACzB,CAAC,EAAE,CAACD,KAAK,CAACC,IAAI,CAAC,CAAC;EAEhB,MAAME,IAAI,GAAGV,OAAO,CAAC,MAAM;IACvB,OAAOO,KAAK,CAACG,IAAI,gBACbX,KAAA,CAAAY,aAAA,CAACP,gBAAgB,CAACQ,IAAI,CAACC,IAAI;MACvBH,IAAI,EAAEH,KAAK,CAACG,IAAK;MACjBI,KAAK,EAAE,OAAOP,KAAK,CAACQ,KAAK,KAAK,QAAQ,GAAGR,KAAK,CAACQ,KAAK,GAAG;IAAG,CAC7D,CAAC,GACF,IAAI;EACZ,CAAC,EAAE,CAACR,KAAK,CAACG,IAAI,CAAC,CAAC;EAEhB,oBACIX,KAAA,CAAAY,aAAA,CAACP,gBAAgB,CAACQ,IAAI,EAAAI,MAAA,CAAAC,MAAA,KACdV,KAAK;IACTC,IAAI,EAAEA,IAAK;IACXU,YAAY,EAAEV,IAAI,IAAIC,OAAO,CAACD,IAAI,CAAE;IACpCE,IAAI,EAAEA,IAAK;IACXK,KAAK,EAAER,KAAK,CAACQ,KAAK,IAAI;EAAG,IAExBR,KAAK,CAACY,QACY,CAAC;AAEhC,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAGf,eAAe,CAACC,iBAAiB,EAAE;EAC5De,OAAO,EAAEjB,gBAAgB,CAACQ,IAAI,CAACU,MAAM,CAACC,SAAS;EAC/CD,MAAM,EAAElB,gBAAgB,CAACQ,IAAI,CAACU,MAAM;EACpCT,IAAI,EAAET,gBAAgB,CAACQ,IAAI,CAACC,IAAI;EAChCW,OAAO,EAAGjB,KAAU,iBAAKR,KAAA,CAAAY,aAAA,CAAAZ,KAAA,CAAA0B,QAAA,QAAGlB,KAAK,CAACY,QAAW,CAAC;EAC9CO,OAAO,EAAGnB,KAAU,iBAAKR,KAAA,CAAAY,aAAA,QAAAK,MAAA,CAAAC,MAAA;IAAK,aAAW;EAAoB,GAAKV,KAAK,CAAG;AAC9E,CAAC,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { AutoCompleteBaseProps } from "./types";
2
+ import type { AutoCompleteBaseProps } from "./types";
3
3
  export declare enum Placement {
4
4
  top = "top",
5
5
  bottom = "bottom"
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useMemo","AutoComplete","AdminAutoComplete","Placement","size","onChange","valueProp","textProp","renderItem","noResultFound","useSimpleValues","onInput","props","inputSize","options","map","option","label","value","disabled","item","undefined","onValueChange","find","createElement","Object","assign","onValueSearch","optionRenderer","emptyMessage"],"sources":["AutoComplete.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport { AutoCompleteBaseProps } from \"./types\";\nimport { AutoComplete as AdminAutoComplete } from \"@webiny/admin-ui\";\n\nexport enum Placement {\n top = \"top\",\n bottom = \"bottom\"\n}\n\nexport interface AutoCompleteProps extends Omit<AutoCompleteBaseProps, \"onChange\"> {\n /* Placement position of dropdown menu, can be either `top` or `bottom`. */\n placement?: Placement;\n\n /* A callback that is executed each time a value is changed. */\n onChange?: (value: any, selection?: any) => void;\n\n /* If true, will show a loading spinner on the right side of the input. */\n loading?: boolean;\n\n /* A component that renders supporting UI in case of no result found. */\n noResultFound?: React.ReactNode;\n\n // Size - small, medium or large\n size?: \"small\" | \"medium\" | \"large\";\n\n // Indicates if the reset action should be displayed.\n displayResetAction?: boolean;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `AutoComplete` component from the `@webiny/admin-ui` package instead.\n */\nexport const AutoComplete = ({\n size,\n onChange,\n valueProp = \"id\",\n textProp = \"name\",\n renderItem,\n noResultFound,\n useSimpleValues,\n onInput,\n ...props\n}: AutoCompleteProps) => {\n const inputSize = useMemo(() => {\n if (size === \"medium\") {\n return \"md\";\n }\n\n return \"lg\";\n }, [size]);\n\n const options = useMemo(() => {\n return props.options.map(option => {\n if (useSimpleValues) {\n return {\n label: option,\n value: option\n };\n }\n\n return {\n label: option[textProp],\n value: option[valueProp],\n disabled: option.disabled,\n item: option\n };\n });\n }, [props.options, textProp, valueProp, useSimpleValues]);\n\n const value = useMemo(() => {\n if (!props.value) {\n return undefined;\n }\n\n if (useSimpleValues && typeof props.value === \"string\") {\n return props.value;\n }\n\n return props.value[valueProp as keyof AutoCompleteProps[\"value\"]] as string;\n }, [props.value, valueProp]);\n\n const onValueChange = useCallback(\n (value: any) => {\n const option = options.find(option => option.value === value);\n\n if (!option) {\n return;\n }\n\n onChange?.(value, option.item);\n },\n [onChange, options]\n );\n\n return (\n <AdminAutoComplete\n {...props}\n value={value}\n options={options}\n onValueChange={onValueChange}\n onValueSearch={onInput}\n size={inputSize}\n optionRenderer={renderItem}\n emptyMessage={noResultFound}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAEnD,SAASC,YAAY,IAAIC,iBAAiB,QAAQ,kBAAkB;AAEpE,WAAYC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAyBrB;AACA;AACA;AACA;AACA,OAAO,MAAMF,YAAY,GAAGA,CAAC;EACzBG,IAAI;EACJC,QAAQ;EACRC,SAAS,GAAG,IAAI;EAChBC,QAAQ,GAAG,MAAM;EACjBC,UAAU;EACVC,aAAa;EACbC,eAAe;EACfC,OAAO;EACP,GAAGC;AACY,CAAC,KAAK;EACrB,MAAMC,SAAS,GAAGb,OAAO,CAAC,MAAM;IAC5B,IAAII,IAAI,KAAK,QAAQ,EAAE;MACnB,OAAO,IAAI;IACf;IAEA,OAAO,IAAI;EACf,CAAC,EAAE,CAACA,IAAI,CAAC,CAAC;EAEV,MAAMU,OAAO,GAAGd,OAAO,CAAC,MAAM;IAC1B,OAAOY,KAAK,CAACE,OAAO,CAACC,GAAG,CAACC,MAAM,IAAI;MAC/B,IAAIN,eAAe,EAAE;QACjB,OAAO;UACHO,KAAK,EAAED,MAAM;UACbE,KAAK,EAAEF;QACX,CAAC;MACL;MAEA,OAAO;QACHC,KAAK,EAAED,MAAM,CAACT,QAAQ,CAAC;QACvBW,KAAK,EAAEF,MAAM,CAACV,SAAS,CAAC;QACxBa,QAAQ,EAAEH,MAAM,CAACG,QAAQ;QACzBC,IAAI,EAAEJ;MACV,CAAC;IACL,CAAC,CAAC;EACN,CAAC,EAAE,CAACJ,KAAK,CAACE,OAAO,EAAEP,QAAQ,EAAED,SAAS,EAAEI,eAAe,CAAC,CAAC;EAEzD,MAAMQ,KAAK,GAAGlB,OAAO,CAAC,MAAM;IACxB,IAAI,CAACY,KAAK,CAACM,KAAK,EAAE;MACd,OAAOG,SAAS;IACpB;IAEA,IAAIX,eAAe,IAAI,OAAOE,KAAK,CAACM,KAAK,KAAK,QAAQ,EAAE;MACpD,OAAON,KAAK,CAACM,KAAK;IACtB;IAEA,OAAON,KAAK,CAACM,KAAK,CAACZ,SAAS,CAAqC;EACrE,CAAC,EAAE,CAACM,KAAK,CAACM,KAAK,EAAEZ,SAAS,CAAC,CAAC;EAE5B,MAAMgB,aAAa,GAAGvB,WAAW,CAC5BmB,KAAU,IAAK;IACZ,MAAMF,MAAM,GAAGF,OAAO,CAACS,IAAI,CAACP,MAAM,IAAIA,MAAM,CAACE,KAAK,KAAKA,KAAK,CAAC;IAE7D,IAAI,CAACF,MAAM,EAAE;MACT;IACJ;IAEAX,QAAQ,GAAGa,KAAK,EAAEF,MAAM,CAACI,IAAI,CAAC;EAClC,CAAC,EACD,CAACf,QAAQ,EAAES,OAAO,CACtB,CAAC;EAED,oBACIhB,KAAA,CAAA0B,aAAA,CAACtB,iBAAiB,EAAAuB,MAAA,CAAAC,MAAA,KACVd,KAAK;IACTM,KAAK,EAAEA,KAAM;IACbJ,OAAO,EAAEA,OAAQ;IACjBQ,aAAa,EAAEA,aAAc;IAC7BK,aAAa,EAAEhB,OAAQ;IACvBP,IAAI,EAAES,SAAU;IAChBe,cAAc,EAAEpB,UAAW;IAC3BqB,YAAY,EAAEpB;EAAc,EAC/B,CAAC;AAEV,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useMemo","AutoComplete","AdminAutoComplete","Placement","size","onChange","valueProp","textProp","renderItem","noResultFound","useSimpleValues","onInput","props","inputSize","options","map","option","label","value","disabled","item","undefined","onValueChange","find","createElement","Object","assign","onValueSearch","optionRenderer","emptyMessage"],"sources":["AutoComplete.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport type { AutoCompleteBaseProps } from \"./types\";\nimport { AutoComplete as AdminAutoComplete } from \"@webiny/admin-ui\";\n\nexport enum Placement {\n top = \"top\",\n bottom = \"bottom\"\n}\n\nexport interface AutoCompleteProps extends Omit<AutoCompleteBaseProps, \"onChange\"> {\n /* Placement position of dropdown menu, can be either `top` or `bottom`. */\n placement?: Placement;\n\n /* A callback that is executed each time a value is changed. */\n onChange?: (value: any, selection?: any) => void;\n\n /* If true, will show a loading spinner on the right side of the input. */\n loading?: boolean;\n\n /* A component that renders supporting UI in case of no result found. */\n noResultFound?: React.ReactNode;\n\n // Size - small, medium or large\n size?: \"small\" | \"medium\" | \"large\";\n\n // Indicates if the reset action should be displayed.\n displayResetAction?: boolean;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `AutoComplete` component from the `@webiny/admin-ui` package instead.\n */\nexport const AutoComplete = ({\n size,\n onChange,\n valueProp = \"id\",\n textProp = \"name\",\n renderItem,\n noResultFound,\n useSimpleValues,\n onInput,\n ...props\n}: AutoCompleteProps) => {\n const inputSize = useMemo(() => {\n if (size === \"medium\") {\n return \"md\";\n }\n\n return \"lg\";\n }, [size]);\n\n const options = useMemo(() => {\n return props.options.map(option => {\n if (useSimpleValues) {\n return {\n label: option,\n value: option\n };\n }\n\n return {\n label: option[textProp],\n value: option[valueProp],\n disabled: option.disabled,\n item: option\n };\n });\n }, [props.options, textProp, valueProp, useSimpleValues]);\n\n const value = useMemo(() => {\n if (!props.value) {\n return undefined;\n }\n\n if (useSimpleValues && typeof props.value === \"string\") {\n return props.value;\n }\n\n return props.value[valueProp as keyof AutoCompleteProps[\"value\"]] as string;\n }, [props.value, valueProp]);\n\n const onValueChange = useCallback(\n (value: any) => {\n const option = options.find(option => option.value === value);\n\n if (!option) {\n return;\n }\n\n onChange?.(value, option.item);\n },\n [onChange, options]\n );\n\n return (\n <AdminAutoComplete\n {...props}\n value={value}\n options={options}\n onValueChange={onValueChange}\n onValueSearch={onInput}\n size={inputSize}\n optionRenderer={renderItem}\n emptyMessage={noResultFound}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAEnD,SAASC,YAAY,IAAIC,iBAAiB,QAAQ,kBAAkB;AAEpE,WAAYC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAyBrB;AACA;AACA;AACA;AACA,OAAO,MAAMF,YAAY,GAAGA,CAAC;EACzBG,IAAI;EACJC,QAAQ;EACRC,SAAS,GAAG,IAAI;EAChBC,QAAQ,GAAG,MAAM;EACjBC,UAAU;EACVC,aAAa;EACbC,eAAe;EACfC,OAAO;EACP,GAAGC;AACY,CAAC,KAAK;EACrB,MAAMC,SAAS,GAAGb,OAAO,CAAC,MAAM;IAC5B,IAAII,IAAI,KAAK,QAAQ,EAAE;MACnB,OAAO,IAAI;IACf;IAEA,OAAO,IAAI;EACf,CAAC,EAAE,CAACA,IAAI,CAAC,CAAC;EAEV,MAAMU,OAAO,GAAGd,OAAO,CAAC,MAAM;IAC1B,OAAOY,KAAK,CAACE,OAAO,CAACC,GAAG,CAACC,MAAM,IAAI;MAC/B,IAAIN,eAAe,EAAE;QACjB,OAAO;UACHO,KAAK,EAAED,MAAM;UACbE,KAAK,EAAEF;QACX,CAAC;MACL;MAEA,OAAO;QACHC,KAAK,EAAED,MAAM,CAACT,QAAQ,CAAC;QACvBW,KAAK,EAAEF,MAAM,CAACV,SAAS,CAAC;QACxBa,QAAQ,EAAEH,MAAM,CAACG,QAAQ;QACzBC,IAAI,EAAEJ;MACV,CAAC;IACL,CAAC,CAAC;EACN,CAAC,EAAE,CAACJ,KAAK,CAACE,OAAO,EAAEP,QAAQ,EAAED,SAAS,EAAEI,eAAe,CAAC,CAAC;EAEzD,MAAMQ,KAAK,GAAGlB,OAAO,CAAC,MAAM;IACxB,IAAI,CAACY,KAAK,CAACM,KAAK,EAAE;MACd,OAAOG,SAAS;IACpB;IAEA,IAAIX,eAAe,IAAI,OAAOE,KAAK,CAACM,KAAK,KAAK,QAAQ,EAAE;MACpD,OAAON,KAAK,CAACM,KAAK;IACtB;IAEA,OAAON,KAAK,CAACM,KAAK,CAACZ,SAAS,CAAqC;EACrE,CAAC,EAAE,CAACM,KAAK,CAACM,KAAK,EAAEZ,SAAS,CAAC,CAAC;EAE5B,MAAMgB,aAAa,GAAGvB,WAAW,CAC5BmB,KAAU,IAAK;IACZ,MAAMF,MAAM,GAAGF,OAAO,CAACS,IAAI,CAACP,MAAM,IAAIA,MAAM,CAACE,KAAK,KAAKA,KAAK,CAAC;IAE7D,IAAI,CAACF,MAAM,EAAE;MACT;IACJ;IAEAX,QAAQ,GAAGa,KAAK,EAAEF,MAAM,CAACI,IAAI,CAAC;EAClC,CAAC,EACD,CAACf,QAAQ,EAAES,OAAO,CACtB,CAAC;EAED,oBACIhB,KAAA,CAAA0B,aAAA,CAACtB,iBAAiB,EAAAuB,MAAA,CAAAC,MAAA,KACVd,KAAK;IACTM,KAAK,EAAEA,KAAM;IACbJ,OAAO,EAAEA,OAAQ;IACjBQ,aAAa,EAAEA,aAAc;IAC7BK,aAAa,EAAEhB,OAAQ;IACvBP,IAAI,EAAES,SAAU;IAChBe,cAAc,EAAEpB,UAAW;IAC3BqB,YAAY,EAAEpB;EAAc,EAC/B,CAAC;AAEV,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { AutoCompleteBaseProps } from "./types";
2
+ import type { AutoCompleteBaseProps } from "./types";
3
3
  interface SelectionItem {
4
4
  name: string;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useMemo","MultiAutoComplete","AdminMultiAutoComplete","onChange","value","valueProp","textProp","renderItem","noResultFound","useSimpleValues","loading","allowFreeInput","unique","renderMultipleSelection","onInput","props","getOption","option","label","item","disabled","options","map","values","val","filter","Boolean","onValuesChange","selectedOptions","find","push","selectedItems","selectedOptionRenderer","createElement","Fragment","Object","assign","size","optionRenderer","emptyMessage","onValueSearch","uniqueValues"],"sources":["MultiAutoComplete.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport { AutoCompleteBaseProps } from \"./types\";\nimport { MultiAutoComplete as AdminMultiAutoComplete } from \"@webiny/admin-ui\";\n\ninterface SelectionItem {\n name: string;\n}\n\ntype MultiAutoCompletePropsValue = SelectionItem[] | string[];\n\nexport interface MultiAutoCompleteProps extends Omit<AutoCompleteBaseProps, \"value\"> {\n /**\n * Prevents adding the same item to the list twice.\n */\n unique?: boolean;\n\n /**\n * Set if custom values (not from list of suggestions) are allowed.\n */\n allowFreeInput?: boolean;\n\n /**\n * If true, will show a loading spinner on the right side of the input.\n */\n loading?: boolean;\n\n /**\n * Use custom renderer for selected items.\n */\n renderMultipleSelection?: ((items: any, index: number) => React.ReactNode | null) | null;\n\n /**\n * Use data list instead of default Chips component. Useful when expecting a lot of data.\n */\n useMultipleSelectionList?: boolean;\n\n /**\n * Render list item when `useMultipleSelectionList` is used.\n */\n renderListItemLabel?: (item: any) => React.ReactNode;\n\n /**\n * Render in meta wrapper\n */\n renderListItemOptions?: (item: any) => React.ReactNode | null;\n\n /**\n * A component that renders supporting UI in case of no result found.\n */\n noResultFound?: React.ReactNode;\n\n /**\n * Value is an array of strings. But can be undefined.\n */\n value?: MultiAutoCompletePropsValue;\n\n /**\n * Indicates if the reset action should be displayed.\n */\n displayResetAction?: boolean;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `MultiAutoComplete` component from the `@webiny/admin-ui` package instead.\n */\nexport const MultiAutoComplete = ({\n onChange,\n value = [],\n valueProp = \"id\",\n textProp = \"name\",\n renderItem,\n noResultFound,\n useSimpleValues,\n loading,\n allowFreeInput,\n unique = true,\n renderMultipleSelection,\n onInput,\n ...props\n}: MultiAutoCompleteProps) => {\n const getOption = useCallback(\n (option: any) => {\n if (useSimpleValues) {\n return {\n label: option,\n value: option,\n item: option\n };\n }\n\n return {\n label: option[textProp],\n value: option[valueProp],\n disabled: option.disabled,\n item: option\n };\n },\n [textProp, valueProp, useSimpleValues]\n );\n\n const options = useMemo(() => {\n return props.options.map(option => {\n return getOption(option);\n });\n }, [props.options]);\n\n const values = useMemo(() => {\n if (!value) {\n return [];\n }\n\n return value\n .map((val: SelectionItem | string) => {\n if (typeof val === \"string\") {\n return val;\n }\n\n return val[valueProp as keyof SelectionItem] as string;\n })\n .filter(Boolean);\n }, [value, valueProp]);\n\n const onValuesChange = useCallback(\n (values: any) => {\n const selectedOptions = [];\n\n for (const value of values) {\n const option = options.find(option => option.value === value);\n\n if (option) {\n selectedOptions.push(option);\n } else {\n selectedOptions.push(getOption(value));\n }\n }\n\n const selectedItems = selectedOptions.map(option => option.item);\n\n onChange?.(selectedItems);\n },\n [onChange, options]\n );\n\n const selectedOptionRenderer = useMemo(() => {\n if (renderMultipleSelection === null) {\n return () => null;\n }\n return renderMultipleSelection;\n }, [renderMultipleSelection]);\n\n return (\n <>\n <AdminMultiAutoComplete\n {...props}\n size={\"lg\"}\n values={values}\n options={options}\n optionRenderer={renderItem}\n selectedOptionRenderer={selectedOptionRenderer}\n emptyMessage={noResultFound}\n onValuesChange={onValuesChange}\n onValueSearch={onInput}\n loading={loading}\n allowFreeInput={allowFreeInput}\n uniqueValues={unique}\n />\n </>\n );\n};\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useMemo","MultiAutoComplete","AdminMultiAutoComplete","onChange","value","valueProp","textProp","renderItem","noResultFound","useSimpleValues","loading","allowFreeInput","unique","renderMultipleSelection","onInput","props","getOption","option","label","item","disabled","options","map","values","val","filter","Boolean","onValuesChange","selectedOptions","find","push","selectedItems","selectedOptionRenderer","createElement","Fragment","Object","assign","size","optionRenderer","emptyMessage","onValueSearch","uniqueValues"],"sources":["MultiAutoComplete.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport type { AutoCompleteBaseProps } from \"./types\";\nimport { MultiAutoComplete as AdminMultiAutoComplete } from \"@webiny/admin-ui\";\n\ninterface SelectionItem {\n name: string;\n}\n\ntype MultiAutoCompletePropsValue = SelectionItem[] | string[];\n\nexport interface MultiAutoCompleteProps extends Omit<AutoCompleteBaseProps, \"value\"> {\n /**\n * Prevents adding the same item to the list twice.\n */\n unique?: boolean;\n\n /**\n * Set if custom values (not from list of suggestions) are allowed.\n */\n allowFreeInput?: boolean;\n\n /**\n * If true, will show a loading spinner on the right side of the input.\n */\n loading?: boolean;\n\n /**\n * Use custom renderer for selected items.\n */\n renderMultipleSelection?: ((items: any, index: number) => React.ReactNode | null) | null;\n\n /**\n * Use data list instead of default Chips component. Useful when expecting a lot of data.\n */\n useMultipleSelectionList?: boolean;\n\n /**\n * Render list item when `useMultipleSelectionList` is used.\n */\n renderListItemLabel?: (item: any) => React.ReactNode;\n\n /**\n * Render in meta wrapper\n */\n renderListItemOptions?: (item: any) => React.ReactNode | null;\n\n /**\n * A component that renders supporting UI in case of no result found.\n */\n noResultFound?: React.ReactNode;\n\n /**\n * Value is an array of strings. But can be undefined.\n */\n value?: MultiAutoCompletePropsValue;\n\n /**\n * Indicates if the reset action should be displayed.\n */\n displayResetAction?: boolean;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `MultiAutoComplete` component from the `@webiny/admin-ui` package instead.\n */\nexport const MultiAutoComplete = ({\n onChange,\n value = [],\n valueProp = \"id\",\n textProp = \"name\",\n renderItem,\n noResultFound,\n useSimpleValues,\n loading,\n allowFreeInput,\n unique = true,\n renderMultipleSelection,\n onInput,\n ...props\n}: MultiAutoCompleteProps) => {\n const getOption = useCallback(\n (option: any) => {\n if (useSimpleValues) {\n return {\n label: option,\n value: option,\n item: option\n };\n }\n\n return {\n label: option[textProp],\n value: option[valueProp],\n disabled: option.disabled,\n item: option\n };\n },\n [textProp, valueProp, useSimpleValues]\n );\n\n const options = useMemo(() => {\n return props.options.map(option => {\n return getOption(option);\n });\n }, [props.options]);\n\n const values = useMemo(() => {\n if (!value) {\n return [];\n }\n\n return value\n .map((val: SelectionItem | string) => {\n if (typeof val === \"string\") {\n return val;\n }\n\n return val[valueProp as keyof SelectionItem] as string;\n })\n .filter(Boolean);\n }, [value, valueProp]);\n\n const onValuesChange = useCallback(\n (values: any) => {\n const selectedOptions = [];\n\n for (const value of values) {\n const option = options.find(option => option.value === value);\n\n if (option) {\n selectedOptions.push(option);\n } else {\n selectedOptions.push(getOption(value));\n }\n }\n\n const selectedItems = selectedOptions.map(option => option.item);\n\n onChange?.(selectedItems);\n },\n [onChange, options]\n );\n\n const selectedOptionRenderer = useMemo(() => {\n if (renderMultipleSelection === null) {\n return () => null;\n }\n return renderMultipleSelection;\n }, [renderMultipleSelection]);\n\n return (\n <>\n <AdminMultiAutoComplete\n {...props}\n size={\"lg\"}\n values={values}\n options={options}\n optionRenderer={renderItem}\n selectedOptionRenderer={selectedOptionRenderer}\n emptyMessage={noResultFound}\n onValuesChange={onValuesChange}\n onValueSearch={onInput}\n loading={loading}\n allowFreeInput={allowFreeInput}\n uniqueValues={unique}\n />\n </>\n );\n};\n"],"mappings":"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","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { FormComponentProps } from "../types";
1
+ import type React from "react";
2
+ import type { FormComponentProps } from "../types";
3
3
  export interface AutoCompleteBaseProps extends FormComponentProps {
4
4
  /**
5
5
  * Component label.
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import React from \"react\";\nimport { FormComponentProps } from \"~/types\";\n\nexport interface AutoCompleteBaseProps extends FormComponentProps {\n /**\n * Component label.\n */\n label?: string;\n\n /**\n * Is component disabled?\n */\n disabled?: boolean;\n\n /**\n * Is component read-only?\n */\n readOnly?: boolean;\n\n /**\n * Options that will be shown.\n */\n options: Array<any>;\n\n /**\n * Description beneath the autoComplete.\n */\n description?: React.ReactNode;\n\n /**\n * Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label.\n */\n placeholder?: string;\n\n /**\n * A className for the root element.\n */\n className?: string;\n\n /**\n * Default structure of value, an object consisting of \"id\" and \"name\" keys. Different keys can be set using \"valueProp\" and \"textProp\" props.\n */\n value?: { id: string; name: string } | string;\n\n /**\n * Key in a single option object that will be used as option's value (by default, \"id\" key will be used).\n */\n valueProp?: string;\n\n /**\n * Key in a single option object that will be used as option's text (by default, \"name\" key will be used).\n */\n textProp?: string;\n\n /**\n * Callback that gets executed on change of input value.\n */\n onInput?: (value: any) => void;\n\n /**\n * Callback that gets executed when the input is focused.\n */\n onFocus?: (ev: React.FocusEvent<any>) => void;\n\n /**\n * Set if you are saving plain strings as values.\n */\n useSimpleValues?: boolean;\n\n /**\n * Renders a single suggestion item.\n */\n renderItem?: (item: any, index?: number) => React.ReactNode;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from \"react\";\nimport type { FormComponentProps } from \"~/types\";\n\nexport interface AutoCompleteBaseProps extends FormComponentProps {\n /**\n * Component label.\n */\n label?: string;\n\n /**\n * Is component disabled?\n */\n disabled?: boolean;\n\n /**\n * Is component read-only?\n */\n readOnly?: boolean;\n\n /**\n * Options that will be shown.\n */\n options: Array<any>;\n\n /**\n * Description beneath the autoComplete.\n */\n description?: React.ReactNode;\n\n /**\n * Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label.\n */\n placeholder?: string;\n\n /**\n * A className for the root element.\n */\n className?: string;\n\n /**\n * Default structure of value, an object consisting of \"id\" and \"name\" keys. Different keys can be set using \"valueProp\" and \"textProp\" props.\n */\n value?: { id: string; name: string } | string;\n\n /**\n * Key in a single option object that will be used as option's value (by default, \"id\" key will be used).\n */\n valueProp?: string;\n\n /**\n * Key in a single option object that will be used as option's text (by default, \"name\" key will be used).\n */\n textProp?: string;\n\n /**\n * Callback that gets executed on change of input value.\n */\n onInput?: (value: any) => void;\n\n /**\n * Callback that gets executed when the input is focused.\n */\n onFocus?: (ev: React.FocusEvent<any>) => void;\n\n /**\n * Set if you are saving plain strings as values.\n */\n useSimpleValues?: boolean;\n\n /**\n * Renders a single suggestion item.\n */\n renderItem?: (item: any, index?: number) => React.ReactNode;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { ButtonProps } from "./Button";
2
+ import type { ButtonProps } from "./Button";
3
3
  /**
4
4
  * @deprecated This component is deprecated and will be removed in future releases.
5
5
  * Please use the `Button` component from the `@webiny/admin-ui` package instead.
@@ -1 +1 @@
1
- {"version":3,"names":["React","useMappedButtonProps","Button","AdminUiButton","ButtonDefault","props","mappedProps","createElement","Object","assign","variant"],"sources":["ButtonDefault.tsx"],"sourcesContent":["import React from \"react\";\nimport { ButtonProps } from \"./Button\";\nimport { useMappedButtonProps } from \"~/Button/useMappedButtonProps\";\nimport { Button as AdminUiButton } from \"@webiny/admin-ui\";\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Button` component from the `@webiny/admin-ui` package instead.\n */\nexport const ButtonDefault = (props: ButtonProps) => {\n const mappedProps = useMappedButtonProps(props);\n return <AdminUiButton {...mappedProps} variant={\"secondary\"} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,oBAAoB;AAC7B,SAASC,MAAM,IAAIC,aAAa,QAAQ,kBAAkB;;AAE1D;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAIC,KAAkB,IAAK;EACjD,MAAMC,WAAW,GAAGL,oBAAoB,CAACI,KAAK,CAAC;EAC/C,oBAAOL,KAAA,CAAAO,aAAA,CAACJ,aAAa,EAAAK,MAAA,CAAAC,MAAA,KAAKH,WAAW;IAAEI,OAAO,EAAE;EAAY,EAAE,CAAC;AACnE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useMappedButtonProps","Button","AdminUiButton","ButtonDefault","props","mappedProps","createElement","Object","assign","variant"],"sources":["ButtonDefault.tsx"],"sourcesContent":["import React from \"react\";\nimport type { ButtonProps } from \"./Button\";\nimport { useMappedButtonProps } from \"~/Button/useMappedButtonProps\";\nimport { Button as AdminUiButton } from \"@webiny/admin-ui\";\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Button` component from the `@webiny/admin-ui` package instead.\n */\nexport const ButtonDefault = (props: ButtonProps) => {\n const mappedProps = useMappedButtonProps(props);\n return <AdminUiButton {...mappedProps} variant={\"secondary\"} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,oBAAoB;AAC7B,SAASC,MAAM,IAAIC,aAAa,QAAQ,kBAAkB;;AAE1D;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAIC,KAAkB,IAAK;EACjD,MAAMC,WAAW,GAAGL,oBAAoB,CAACI,KAAK,CAAC;EAC/C,oBAAOL,KAAA,CAAAO,aAAA,CAACJ,aAAa,EAAAK,MAAA,CAAAC,MAAA,KAAKH,WAAW;IAAEI,OAAO,EAAE;EAAY,EAAE,CAAC;AACnE,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { IconButtonProps } from "./IconButton";
2
+ import type { IconButtonProps } from "./IconButton";
3
3
  /**
4
4
  * @deprecated This component is deprecated and will be removed in future releases.
5
5
  * Please use the `Button` component from the `@webiny/admin-ui` package instead.
@@ -1 +1 @@
1
- {"version":3,"names":["React","IconButton","ButtonFloating","props","createElement"],"sources":["ButtonFloating.tsx"],"sourcesContent":["import React from \"react\";\nimport { IconButton, IconButtonProps } from \"./IconButton\";\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Button` component from the `@webiny/admin-ui` package instead.\n */\nexport const ButtonFloating = (props: IconButtonProps) => {\n return <IconButton {...props} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU;;AAEnB;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAIC,KAAsB,IAAK;EACtD,oBAAOH,KAAA,CAAAI,aAAA,CAACH,UAAU,EAAKE,KAAQ,CAAC;AACpC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","IconButton","ButtonFloating","props","createElement"],"sources":["ButtonFloating.tsx"],"sourcesContent":["import React from \"react\";\nimport type { IconButtonProps } from \"./IconButton\";\nimport { IconButton } from \"./IconButton\";\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Button` component from the `@webiny/admin-ui` package instead.\n */\nexport const ButtonFloating = (props: IconButtonProps) => {\n return <IconButton {...props} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,UAAU;;AAEnB;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAIC,KAAsB,IAAK;EACtD,oBAAOH,KAAA,CAAAI,aAAA,CAACH,UAAU,EAAKE,KAAQ,CAAC;AACpC,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { ButtonProps } from "./Button";
2
+ import type { ButtonProps } from "./Button";
3
3
  /**
4
4
  * @deprecated This component is deprecated and will be removed in future releases.
5
5
  * Please use the `Button` component from the `@webiny/admin-ui` package instead.
@@ -1 +1 @@
1
- {"version":3,"names":["React","useMappedButtonProps","Button","AdminUiButton","ButtonPrimary","props","mappedProps","createElement","Object","assign","variant"],"sources":["ButtonPrimary.tsx"],"sourcesContent":["import React from \"react\";\nimport { ButtonProps } from \"./Button\";\nimport { useMappedButtonProps } from \"~/Button/useMappedButtonProps\";\nimport { Button as AdminUiButton } from \"@webiny/admin-ui\";\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Button` component from the `@webiny/admin-ui` package instead.\n */\nexport const ButtonPrimary = function ButtonPrimary(props: ButtonProps) {\n const mappedProps = useMappedButtonProps(props);\n return <AdminUiButton {...mappedProps} variant={\"primary\"} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,oBAAoB;AAC7B,SAASC,MAAM,IAAIC,aAAa,QAAQ,kBAAkB;;AAE1D;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG,SAASA,aAAaA,CAACC,KAAkB,EAAE;EACpE,MAAMC,WAAW,GAAGL,oBAAoB,CAACI,KAAK,CAAC;EAC/C,oBAAOL,KAAA,CAAAO,aAAA,CAACJ,aAAa,EAAAK,MAAA,CAAAC,MAAA,KAAKH,WAAW;IAAEI,OAAO,EAAE;EAAU,EAAE,CAAC;AACjE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useMappedButtonProps","Button","AdminUiButton","ButtonPrimary","props","mappedProps","createElement","Object","assign","variant"],"sources":["ButtonPrimary.tsx"],"sourcesContent":["import React from \"react\";\nimport type { ButtonProps } from \"./Button\";\nimport { useMappedButtonProps } from \"~/Button/useMappedButtonProps\";\nimport { Button as AdminUiButton } from \"@webiny/admin-ui\";\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Button` component from the `@webiny/admin-ui` package instead.\n */\nexport const ButtonPrimary = function ButtonPrimary(props: ButtonProps) {\n const mappedProps = useMappedButtonProps(props);\n return <AdminUiButton {...mappedProps} variant={\"primary\"} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,oBAAoB;AAC7B,SAASC,MAAM,IAAIC,aAAa,QAAQ,kBAAkB;;AAE1D;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG,SAASA,aAAaA,CAACC,KAAkB,EAAE;EACpE,MAAMC,WAAW,GAAGL,oBAAoB,CAACI,KAAK,CAAC;EAC/C,oBAAOL,KAAA,CAAAO,aAAA,CAACJ,aAAa,EAAAK,MAAA,CAAAC,MAAA,KAAKH,WAAW;IAAEI,OAAO,EAAE;EAAU,EAAE,CAAC;AACjE,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { ButtonProps } from "./Button";
2
+ import type { ButtonProps } from "./Button";
3
3
  /**
4
4
  * @deprecated This component is deprecated and will be removed in future releases.
5
5
  * Please use the `Button` component from the `@webiny/admin-ui` package instead.
@@ -1 +1 @@
1
- {"version":3,"names":["React","useMappedButtonProps","Button","AdminUiButton","ButtonSecondary","props","mappedProps","createElement","Object","assign","variant"],"sources":["ButtonSecondary.tsx"],"sourcesContent":["import React from \"react\";\nimport { ButtonProps } from \"./Button\";\nimport { useMappedButtonProps } from \"~/Button/useMappedButtonProps\";\nimport { Button as AdminUiButton } from \"@webiny/admin-ui\";\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Button` component from the `@webiny/admin-ui` package instead.\n */\nexport const ButtonSecondary = (props: ButtonProps) => {\n const mappedProps = useMappedButtonProps(props);\n return <AdminUiButton {...mappedProps} variant={\"secondary\"} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,oBAAoB;AAC7B,SAASC,MAAM,IAAIC,aAAa,QAAQ,kBAAkB;;AAE1D;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAIC,KAAkB,IAAK;EACnD,MAAMC,WAAW,GAAGL,oBAAoB,CAACI,KAAK,CAAC;EAC/C,oBAAOL,KAAA,CAAAO,aAAA,CAACJ,aAAa,EAAAK,MAAA,CAAAC,MAAA,KAAKH,WAAW;IAAEI,OAAO,EAAE;EAAY,EAAE,CAAC;AACnE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useMappedButtonProps","Button","AdminUiButton","ButtonSecondary","props","mappedProps","createElement","Object","assign","variant"],"sources":["ButtonSecondary.tsx"],"sourcesContent":["import React from \"react\";\nimport type { ButtonProps } from \"./Button\";\nimport { useMappedButtonProps } from \"~/Button/useMappedButtonProps\";\nimport { Button as AdminUiButton } from \"@webiny/admin-ui\";\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Button` component from the `@webiny/admin-ui` package instead.\n */\nexport const ButtonSecondary = (props: ButtonProps) => {\n const mappedProps = useMappedButtonProps(props);\n return <AdminUiButton {...mappedProps} variant={\"secondary\"} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,oBAAoB;AAC7B,SAASC,MAAM,IAAIC,aAAa,QAAQ,kBAAkB;;AAE1D;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAIC,KAAkB,IAAK;EACnD,MAAMC,WAAW,GAAGL,oBAAoB,CAACI,KAAK,CAAC;EAC/C,oBAAOL,KAAA,CAAAO,aAAA,CAACJ,aAAa,EAAAK,MAAA,CAAAC,MAAA,KAAKH,WAAW;IAAEI,OAAO,EAAE;EAAY,EAAE,CAAC;AACnE,CAAC","ignoreList":[]}
@@ -1,5 +1,6 @@
1
- import React, { SyntheticEvent } from "react";
2
- import { ButtonProps } from "./Button";
1
+ import type { SyntheticEvent } from "react";
2
+ import React from "react";
3
+ import type { ButtonProps } from "./Button";
3
4
  export interface IconButtonProps extends ButtonProps {
4
5
  /**
5
6
  * Icon should be provided as an SvgComponent.
@@ -1 +1 @@
1
- {"version":3,"names":["React","useMappedButtonProps","IconButton","AdminUiBIconButton","props","mappedProps","createElement","Object","assign","variant"],"sources":["IconButton.tsx"],"sourcesContent":["import React, { SyntheticEvent } from \"react\";\nimport { ButtonProps } from \"./Button\";\nimport { useMappedButtonProps } from \"~/Button/useMappedButtonProps\";\nimport { IconButton as AdminUiBIconButton } from \"@webiny/admin-ui\";\n\nexport interface IconButtonProps extends ButtonProps {\n /**\n * Icon should be provided as an SvgComponent.\n */\n icon: React.ReactNode;\n\n label?: string;\n\n onMouseDown?: (e: SyntheticEvent) => void;\n\n onMouseUp?: (e: SyntheticEvent) => void;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Button` component from the `@webiny/admin-ui` package instead.\n */\nexport const IconButton = (props: IconButtonProps) => {\n const mappedProps = useMappedButtonProps(props);\n return <AdminUiBIconButton {...mappedProps} variant={\"ghost\"} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAA0B,OAAO;AAE7C,SAASC,oBAAoB;AAC7B,SAASC,UAAU,IAAIC,kBAAkB,QAAQ,kBAAkB;AAenE;AACA;AACA;AACA;AACA,OAAO,MAAMD,UAAU,GAAIE,KAAsB,IAAK;EAClD,MAAMC,WAAW,GAAGJ,oBAAoB,CAACG,KAAK,CAAC;EAC/C,oBAAOJ,KAAA,CAAAM,aAAA,CAACH,kBAAkB,EAAAI,MAAA,CAAAC,MAAA,KAAKH,WAAW;IAAEI,OAAO,EAAE;EAAQ,EAAE,CAAC;AACpE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useMappedButtonProps","IconButton","AdminUiBIconButton","props","mappedProps","createElement","Object","assign","variant"],"sources":["IconButton.tsx"],"sourcesContent":["import type { SyntheticEvent } from \"react\";\nimport React from \"react\";\nimport type { ButtonProps } from \"./Button\";\nimport { useMappedButtonProps } from \"~/Button/useMappedButtonProps\";\nimport { IconButton as AdminUiBIconButton } from \"@webiny/admin-ui\";\n\nexport interface IconButtonProps extends ButtonProps {\n /**\n * Icon should be provided as an SvgComponent.\n */\n icon: React.ReactNode;\n\n label?: string;\n\n onMouseDown?: (e: SyntheticEvent) => void;\n\n onMouseUp?: (e: SyntheticEvent) => void;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Button` component from the `@webiny/admin-ui` package instead.\n */\nexport const IconButton = (props: IconButtonProps) => {\n const mappedProps = useMappedButtonProps(props);\n return <AdminUiBIconButton {...mappedProps} variant={\"ghost\"} />;\n};\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,oBAAoB;AAC7B,SAASC,UAAU,IAAIC,kBAAkB,QAAQ,kBAAkB;AAenE;AACA;AACA;AACA;AACA,OAAO,MAAMD,UAAU,GAAIE,KAAsB,IAAK;EAClD,MAAMC,WAAW,GAAGJ,oBAAoB,CAACG,KAAK,CAAC;EAC/C,oBAAOJ,KAAA,CAAAM,aAAA,CAACH,kBAAkB,EAAAI,MAAA,CAAAC,MAAA,KAAKH,WAAW;IAAEI,OAAO,EAAE;EAAQ,EAAE,CAAC;AACpE,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ButtonProps } from "./Button";
2
+ import type { ButtonProps } from "./Button";
3
3
  export declare const useMappedButtonProps: (props: ButtonProps) => {
4
4
  text?: import("react").ReactNode;
5
5
  size?: "sm" | "md" | "lg" | "xl" | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","omit","useMappedButtonProps","props","mappedButtonProps","small","size","children","text"],"sources":["useMappedButtonProps.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport omit from \"lodash/omit\";\nimport { ButtonProps as AdminUiButtonProps } from \"@webiny/admin-ui\";\nimport { ButtonProps } from \"~/Button/Button\";\n\nexport const useMappedButtonProps = (props: ButtonProps) => {\n return useMemo(() => {\n const mappedButtonProps: Pick<AdminUiButtonProps, \"size\" | \"text\"> = {};\n\n if (props.small === true) {\n mappedButtonProps.size = \"sm\";\n }\n\n if (props.children) {\n mappedButtonProps.text = props.children;\n }\n\n // Return all remaining props omitting unused ones.\n return {\n ...omit(props, [\"flat\", \"ripple\", \"small\"]),\n ...mappedButtonProps\n };\n }, [props]);\n};\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,OAAOC,IAAI,MAAM,aAAa;AAI9B,OAAO,MAAMC,oBAAoB,GAAIC,KAAkB,IAAK;EACxD,OAAOH,OAAO,CAAC,MAAM;IACjB,MAAMI,iBAA4D,GAAG,CAAC,CAAC;IAEvE,IAAID,KAAK,CAACE,KAAK,KAAK,IAAI,EAAE;MACtBD,iBAAiB,CAACE,IAAI,GAAG,IAAI;IACjC;IAEA,IAAIH,KAAK,CAACI,QAAQ,EAAE;MAChBH,iBAAiB,CAACI,IAAI,GAAGL,KAAK,CAACI,QAAQ;IAC3C;;IAEA;IACA,OAAO;MACH,GAAGN,IAAI,CAACE,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;MAC3C,GAAGC;IACP,CAAC;EACL,CAAC,EAAE,CAACD,KAAK,CAAC,CAAC;AACf,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useMemo","omit","useMappedButtonProps","props","mappedButtonProps","small","size","children","text"],"sources":["useMappedButtonProps.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport omit from \"lodash/omit\";\nimport type { ButtonProps as AdminUiButtonProps } from \"@webiny/admin-ui\";\nimport type { ButtonProps } from \"~/Button/Button\";\n\nexport const useMappedButtonProps = (props: ButtonProps) => {\n return useMemo(() => {\n const mappedButtonProps: Pick<AdminUiButtonProps, \"size\" | \"text\"> = {};\n\n if (props.small === true) {\n mappedButtonProps.size = \"sm\";\n }\n\n if (props.children) {\n mappedButtonProps.text = props.children;\n }\n\n // Return all remaining props omitting unused ones.\n return {\n ...omit(props, [\"flat\", \"ripple\", \"small\"]),\n ...mappedButtonProps\n };\n }, [props]);\n};\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,OAAOC,IAAI,MAAM,aAAa;AAI9B,OAAO,MAAMC,oBAAoB,GAAIC,KAAkB,IAAK;EACxD,OAAOH,OAAO,CAAC,MAAM;IACjB,MAAMI,iBAA4D,GAAG,CAAC,CAAC;IAEvE,IAAID,KAAK,CAACE,KAAK,KAAK,IAAI,EAAE;MACtBD,iBAAiB,CAACE,IAAI,GAAG,IAAI;IACjC;IAEA,IAAIH,KAAK,CAACI,QAAQ,EAAE;MAChBH,iBAAiB,CAACI,IAAI,GAAGL,KAAK,CAACI,QAAQ;IAC3C;;IAEA;IACA,OAAO;MACH,GAAGN,IAAI,CAACE,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;MAC3C,GAAGC;IACP,CAAC;EACL,CAAC,EAAE,CAACD,KAAK,CAAC,CAAC;AACf,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { FormComponentProps } from "../types";
2
+ import type { FormComponentProps } from "../types";
3
3
  interface Props extends FormComponentProps {
4
4
  id?: string;
5
5
  label?: string;
@@ -1 +1 @@
1
- {"version":3,"names":["React","Checkbox","AdminCheckbox","Component","onChange","checked","props","render","id","value","label","disabled","indeterminate","description","validation","onClick","createElement","Boolean"],"sources":["Checkbox.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormComponentProps } from \"~/types\";\nimport { Checkbox as AdminCheckbox } from \"@webiny/admin-ui\";\n\ninterface Props extends FormComponentProps {\n // Component id.\n id?: string;\n\n // Component label.\n label?: string;\n\n // Is checkbox disabled?\n disabled?: boolean;\n\n // onClick callback.\n onClick?: (value: boolean) => void;\n\n // Use when checkbox is not checked nor unchecked.\n indeterminate?: boolean;\n\n // Description beneath the checkbox.\n description?: string;\n\n // For testing purposes.\n \"data-testid\"?: string;\n\n children?: React.ReactNode;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Checkbox` component from the `@webiny/admin-ui` package instead.\n */\nclass Checkbox extends React.Component<Props> {\n onChange = (checked: boolean) => {\n this.props.onChange && this.props.onChange(checked);\n };\n\n public override render() {\n const { id, value, label, disabled, indeterminate, description, validation, onClick } =\n this.props;\n\n return (\n <AdminCheckbox\n id={id}\n indeterminate={indeterminate}\n disabled={disabled}\n checked={Boolean(value)}\n onChange={this.onChange}\n onClick={() => typeof onClick === \"function\" && onClick(Boolean(value))}\n label={label}\n data-testid={this.props[\"data-testid\"]}\n description={description}\n validation={validation}\n />\n );\n }\n}\n\nexport default Checkbox;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,QAAQ,IAAIC,aAAa,QAAQ,kBAAkB;AA2B5D;AACA;AACA;AACA;AACA,MAAMD,QAAQ,SAASD,KAAK,CAACG,SAAS,CAAQ;EAC1CC,QAAQ,GAAIC,OAAgB,IAAK;IAC7B,IAAI,CAACC,KAAK,CAACF,QAAQ,IAAI,IAAI,CAACE,KAAK,CAACF,QAAQ,CAACC,OAAO,CAAC;EACvD,CAAC;EAEeE,MAAMA,CAAA,EAAG;IACrB,MAAM;MAAEC,EAAE;MAAEC,KAAK;MAAEC,KAAK;MAAEC,QAAQ;MAAEC,aAAa;MAAEC,WAAW;MAAEC,UAAU;MAAEC;IAAQ,CAAC,GACjF,IAAI,CAACT,KAAK;IAEd,oBACIN,KAAA,CAAAgB,aAAA,CAACd,aAAa;MACVM,EAAE,EAAEA,EAAG;MACPI,aAAa,EAAEA,aAAc;MAC7BD,QAAQ,EAAEA,QAAS;MACnBN,OAAO,EAAEY,OAAO,CAACR,KAAK,CAAE;MACxBL,QAAQ,EAAE,IAAI,CAACA,QAAS;MACxBW,OAAO,EAAEA,CAAA,KAAM,OAAOA,OAAO,KAAK,UAAU,IAAIA,OAAO,CAACE,OAAO,CAACR,KAAK,CAAC,CAAE;MACxEC,KAAK,EAAEA,KAAM;MACb,eAAa,IAAI,CAACJ,KAAK,CAAC,aAAa,CAAE;MACvCO,WAAW,EAAEA,WAAY;MACzBC,UAAU,EAAEA;IAAW,CAC1B,CAAC;EAEV;AACJ;AAEA,eAAeb,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["React","Checkbox","AdminCheckbox","Component","onChange","checked","props","render","id","value","label","disabled","indeterminate","description","validation","onClick","createElement","Boolean"],"sources":["Checkbox.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FormComponentProps } from \"~/types\";\nimport { Checkbox as AdminCheckbox } from \"@webiny/admin-ui\";\n\ninterface Props extends FormComponentProps {\n // Component id.\n id?: string;\n\n // Component label.\n label?: string;\n\n // Is checkbox disabled?\n disabled?: boolean;\n\n // onClick callback.\n onClick?: (value: boolean) => void;\n\n // Use when checkbox is not checked nor unchecked.\n indeterminate?: boolean;\n\n // Description beneath the checkbox.\n description?: string;\n\n // For testing purposes.\n \"data-testid\"?: string;\n\n children?: React.ReactNode;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Checkbox` component from the `@webiny/admin-ui` package instead.\n */\nclass Checkbox extends React.Component<Props> {\n onChange = (checked: boolean) => {\n this.props.onChange && this.props.onChange(checked);\n };\n\n public override render() {\n const { id, value, label, disabled, indeterminate, description, validation, onClick } =\n this.props;\n\n return (\n <AdminCheckbox\n id={id}\n indeterminate={indeterminate}\n disabled={disabled}\n checked={Boolean(value)}\n onChange={this.onChange}\n onClick={() => typeof onClick === \"function\" && onClick(Boolean(value))}\n label={label}\n data-testid={this.props[\"data-testid\"]}\n description={description}\n validation={validation}\n />\n );\n }\n}\n\nexport default Checkbox;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,QAAQ,IAAIC,aAAa,QAAQ,kBAAkB;AA2B5D;AACA;AACA;AACA;AACA,MAAMD,QAAQ,SAASD,KAAK,CAACG,SAAS,CAAQ;EAC1CC,QAAQ,GAAIC,OAAgB,IAAK;IAC7B,IAAI,CAACC,KAAK,CAACF,QAAQ,IAAI,IAAI,CAACE,KAAK,CAACF,QAAQ,CAACC,OAAO,CAAC;EACvD,CAAC;EAEeE,MAAMA,CAAA,EAAG;IACrB,MAAM;MAAEC,EAAE;MAAEC,KAAK;MAAEC,KAAK;MAAEC,QAAQ;MAAEC,aAAa;MAAEC,WAAW;MAAEC,UAAU;MAAEC;IAAQ,CAAC,GACjF,IAAI,CAACT,KAAK;IAEd,oBACIN,KAAA,CAAAgB,aAAA,CAACd,aAAa;MACVM,EAAE,EAAEA,EAAG;MACPI,aAAa,EAAEA,aAAc;MAC7BD,QAAQ,EAAEA,QAAS;MACnBN,OAAO,EAAEY,OAAO,CAACR,KAAK,CAAE;MACxBL,QAAQ,EAAE,IAAI,CAACA,QAAS;MACxBW,OAAO,EAAEA,CAAA,KAAM,OAAOA,OAAO,KAAK,UAAU,IAAIA,OAAO,CAACE,OAAO,CAACR,KAAK,CAAC,CAAE;MACxEC,KAAK,EAAEA,KAAM;MACb,eAAa,IAAI,CAACJ,KAAK,CAAC,aAAa,CAAE;MACvCO,WAAW,EAAEA,WAAY;MACzBC,UAAU,EAAEA;IAAW,CAC1B,CAAC;EAEV;AACJ;AAEA,eAAeb,QAAQ","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { FormComponentProps } from "../types";
2
+ import type { FormComponentProps } from "../types";
3
3
  export interface ChildrenRenderProp {
4
4
  onChange: (id: string | number) => () => void;
5
5
  getValue: (id: string | number) => boolean;
@@ -1 +1 @@
1
- {"version":3,"names":["React","FormComponentDescription","FormComponentErrorMessage","FormComponentLabel","CheckboxGroup","Component","render","description","label","validation","props","isValid","validationIsValid","message","validationMessage","createElement","className","text","children","onChange","value","values","Array","isArray","index","indexOf","splice","push","getValue","id","includes","invalid","Boolean"],"sources":["CheckboxGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormComponentProps } from \"~/types\";\nimport {\n FormComponentDescription,\n FormComponentErrorMessage,\n FormComponentLabel\n} from \"@webiny/admin-ui\";\n\nexport interface ChildrenRenderProp {\n onChange: (id: string | number) => () => void;\n getValue: (id: string | number) => boolean;\n}\n\ntype Props = FormComponentProps & {\n // Form element's label.\n label?: string;\n\n // Form element's description.\n description?: string;\n\n // An array of Checkbox components.\n children: (props: ChildrenRenderProp) => React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `CheckboxGroup` component from the `@webiny/admin-ui` package instead.\n */\nclass CheckboxGroup extends React.Component<Props> {\n public override render() {\n const { description, label, validation } = this.props;\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n\n return (\n <div className={\"w-full\"}>\n <FormComponentLabel text={label} />\n <FormComponentDescription text={description} />\n {this.props.children({\n onChange: value => {\n return () => {\n const values = Array.isArray(this.props.value)\n ? [...this.props.value]\n : [];\n const index = values.indexOf(value);\n if (index > -1) {\n values.splice(index, 1);\n } else {\n values.push(value);\n }\n\n this.props.onChange && this.props.onChange(values);\n };\n },\n getValue: id => {\n const values = Array.isArray(this.props.value) ? this.props.value : [];\n return values.includes(id);\n }\n })}\n <FormComponentErrorMessage\n invalid={Boolean(validationIsValid === false)}\n text={validationMessage}\n />\n </div>\n );\n }\n}\n\nexport default CheckboxGroup;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SACIC,wBAAwB,EACxBC,yBAAyB,EACzBC,kBAAkB,QACf,kBAAkB;AAkBzB;AACA;AACA;AACA;AACA,MAAMC,aAAa,SAASJ,KAAK,CAACK,SAAS,CAAQ;EAC/BC,MAAMA,CAAA,EAAG;IACrB,MAAM;MAAEC,WAAW;MAAEC,KAAK;MAAEC;IAAW,CAAC,GAAG,IAAI,CAACC,KAAK;IACrD,MAAM;MAAEC,OAAO,EAAEC,iBAAiB;MAAEC,OAAO,EAAEC;IAAkB,CAAC,GAAGL,UAAU,IAAI,CAAC,CAAC;IAEnF,oBACIT,KAAA,CAAAe,aAAA;MAAKC,SAAS,EAAE;IAAS,gBACrBhB,KAAA,CAAAe,aAAA,CAACZ,kBAAkB;MAACc,IAAI,EAAET;IAAM,CAAE,CAAC,eACnCR,KAAA,CAAAe,aAAA,CAACd,wBAAwB;MAACgB,IAAI,EAAEV;IAAY,CAAE,CAAC,EAC9C,IAAI,CAACG,KAAK,CAACQ,QAAQ,CAAC;MACjBC,QAAQ,EAAEC,KAAK,IAAI;QACf,OAAO,MAAM;UACT,MAAMC,MAAM,GAAGC,KAAK,CAACC,OAAO,CAAC,IAAI,CAACb,KAAK,CAACU,KAAK,CAAC,GACxC,CAAC,GAAG,IAAI,CAACV,KAAK,CAACU,KAAK,CAAC,GACrB,EAAE;UACR,MAAMI,KAAK,GAAGH,MAAM,CAACI,OAAO,CAACL,KAAK,CAAC;UACnC,IAAII,KAAK,GAAG,CAAC,CAAC,EAAE;YACZH,MAAM,CAACK,MAAM,CAACF,KAAK,EAAE,CAAC,CAAC;UAC3B,CAAC,MAAM;YACHH,MAAM,CAACM,IAAI,CAACP,KAAK,CAAC;UACtB;UAEA,IAAI,CAACV,KAAK,CAACS,QAAQ,IAAI,IAAI,CAACT,KAAK,CAACS,QAAQ,CAACE,MAAM,CAAC;QACtD,CAAC;MACL,CAAC;MACDO,QAAQ,EAAEC,EAAE,IAAI;QACZ,MAAMR,MAAM,GAAGC,KAAK,CAACC,OAAO,CAAC,IAAI,CAACb,KAAK,CAACU,KAAK,CAAC,GAAG,IAAI,CAACV,KAAK,CAACU,KAAK,GAAG,EAAE;QACtE,OAAOC,MAAM,CAACS,QAAQ,CAACD,EAAE,CAAC;MAC9B;IACJ,CAAC,CAAC,eACF7B,KAAA,CAAAe,aAAA,CAACb,yBAAyB;MACtB6B,OAAO,EAAEC,OAAO,CAACpB,iBAAiB,KAAK,KAAK,CAAE;MAC9CK,IAAI,EAAEH;IAAkB,CAC3B,CACA,CAAC;EAEd;AACJ;AAEA,eAAeV,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["React","FormComponentDescription","FormComponentErrorMessage","FormComponentLabel","CheckboxGroup","Component","render","description","label","validation","props","isValid","validationIsValid","message","validationMessage","createElement","className","text","children","onChange","value","values","Array","isArray","index","indexOf","splice","push","getValue","id","includes","invalid","Boolean"],"sources":["CheckboxGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FormComponentProps } from \"~/types\";\nimport {\n FormComponentDescription,\n FormComponentErrorMessage,\n FormComponentLabel\n} from \"@webiny/admin-ui\";\n\nexport interface ChildrenRenderProp {\n onChange: (id: string | number) => () => void;\n getValue: (id: string | number) => boolean;\n}\n\ntype Props = FormComponentProps & {\n // Form element's label.\n label?: string;\n\n // Form element's description.\n description?: string;\n\n // An array of Checkbox components.\n children: (props: ChildrenRenderProp) => React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `CheckboxGroup` component from the `@webiny/admin-ui` package instead.\n */\nclass CheckboxGroup extends React.Component<Props> {\n public override render() {\n const { description, label, validation } = this.props;\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n\n return (\n <div className={\"w-full\"}>\n <FormComponentLabel text={label} />\n <FormComponentDescription text={description} />\n {this.props.children({\n onChange: value => {\n return () => {\n const values = Array.isArray(this.props.value)\n ? [...this.props.value]\n : [];\n const index = values.indexOf(value);\n if (index > -1) {\n values.splice(index, 1);\n } else {\n values.push(value);\n }\n\n this.props.onChange && this.props.onChange(values);\n };\n },\n getValue: id => {\n const values = Array.isArray(this.props.value) ? this.props.value : [];\n return values.includes(id);\n }\n })}\n <FormComponentErrorMessage\n invalid={Boolean(validationIsValid === false)}\n text={validationMessage}\n />\n </div>\n );\n }\n}\n\nexport default CheckboxGroup;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SACIC,wBAAwB,EACxBC,yBAAyB,EACzBC,kBAAkB,QACf,kBAAkB;AAkBzB;AACA;AACA;AACA;AACA,MAAMC,aAAa,SAASJ,KAAK,CAACK,SAAS,CAAQ;EAC/BC,MAAMA,CAAA,EAAG;IACrB,MAAM;MAAEC,WAAW;MAAEC,KAAK;MAAEC;IAAW,CAAC,GAAG,IAAI,CAACC,KAAK;IACrD,MAAM;MAAEC,OAAO,EAAEC,iBAAiB;MAAEC,OAAO,EAAEC;IAAkB,CAAC,GAAGL,UAAU,IAAI,CAAC,CAAC;IAEnF,oBACIT,KAAA,CAAAe,aAAA;MAAKC,SAAS,EAAE;IAAS,gBACrBhB,KAAA,CAAAe,aAAA,CAACZ,kBAAkB;MAACc,IAAI,EAAET;IAAM,CAAE,CAAC,eACnCR,KAAA,CAAAe,aAAA,CAACd,wBAAwB;MAACgB,IAAI,EAAEV;IAAY,CAAE,CAAC,EAC9C,IAAI,CAACG,KAAK,CAACQ,QAAQ,CAAC;MACjBC,QAAQ,EAAEC,KAAK,IAAI;QACf,OAAO,MAAM;UACT,MAAMC,MAAM,GAAGC,KAAK,CAACC,OAAO,CAAC,IAAI,CAACb,KAAK,CAACU,KAAK,CAAC,GACxC,CAAC,GAAG,IAAI,CAACV,KAAK,CAACU,KAAK,CAAC,GACrB,EAAE;UACR,MAAMI,KAAK,GAAGH,MAAM,CAACI,OAAO,CAACL,KAAK,CAAC;UACnC,IAAII,KAAK,GAAG,CAAC,CAAC,EAAE;YACZH,MAAM,CAACK,MAAM,CAACF,KAAK,EAAE,CAAC,CAAC;UAC3B,CAAC,MAAM;YACHH,MAAM,CAACM,IAAI,CAACP,KAAK,CAAC;UACtB;UAEA,IAAI,CAACV,KAAK,CAACS,QAAQ,IAAI,IAAI,CAACT,KAAK,CAACS,QAAQ,CAACE,MAAM,CAAC;QACtD,CAAC;MACL,CAAC;MACDO,QAAQ,EAAEC,EAAE,IAAI;QACZ,MAAMR,MAAM,GAAGC,KAAK,CAACC,OAAO,CAAC,IAAI,CAACb,KAAK,CAACU,KAAK,CAAC,GAAG,IAAI,CAACV,KAAK,CAACU,KAAK,GAAG,EAAE;QACtE,OAAOC,MAAM,CAACS,QAAQ,CAACD,EAAE,CAAC;MAC9B;IACJ,CAAC,CAAC,eACF7B,KAAA,CAAAe,aAAA,CAACb,yBAAyB;MACtB6B,OAAO,EAAEC,OAAO,CAACpB,iBAAiB,KAAK,KAAK,CAAE;MAC9CK,IAAI,EAAEH;IAAkB,CAC3B,CACA,CAAC;EAEd;AACJ;AAEA,eAAeV,aAAa","ignoreList":[]}
package/Chips/Chips.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { Chip } from "./Chip";
2
+ import type { Chip } from "./Chip";
3
3
  export interface ChipsProps {
4
4
  /**
5
5
  * Chips to show
@@ -1 +1 @@
1
- {"version":3,"names":["React","cn","Chips","props","children","className","rest","createElement","Object","assign"],"sources":["Chips.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn } from \"@webiny/admin-ui\";\nimport { Chip } from \"./Chip\";\n\nexport interface ChipsProps {\n /**\n * Chips to show\n */\n children?: React.ReactElement<typeof Chip> | React.ReactElement<typeof Chip>[];\n\n /**\n * Is chip disabled?\n */\n disabled?: boolean;\n\n /**\n * CSS class name\n */\n className?: string;\n\n /**\n * Style object.\n */\n style?: React.CSSProperties;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Tag` component from the `@webiny/admin-ui` package instead.\n */\nexport const Chips = (props: ChipsProps) => {\n const { children, className, ...rest } = props;\n\n return (\n <div\n {...rest}\n className={cn(\"mdc-evolution-chip-set wby-flex wby-gap-sm wby-py-sm\", className)}\n >\n {children}\n </div>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,EAAE,QAAQ,kBAAkB;AAyBrC;AACA;AACA;AACA;AACA,OAAO,MAAMC,KAAK,GAAIC,KAAiB,IAAK;EACxC,MAAM;IAAEC,QAAQ;IAAEC,SAAS;IAAE,GAAGC;EAAK,CAAC,GAAGH,KAAK;EAE9C,oBACIH,KAAA,CAAAO,aAAA,QAAAC,MAAA,CAAAC,MAAA,KACQH,IAAI;IACRD,SAAS,EAAEJ,EAAE,CAAC,sDAAsD,EAAEI,SAAS;EAAE,IAEhFD,QACA,CAAC;AAEd,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","cn","Chips","props","children","className","rest","createElement","Object","assign"],"sources":["Chips.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn } from \"@webiny/admin-ui\";\nimport type { Chip } from \"./Chip\";\n\nexport interface ChipsProps {\n /**\n * Chips to show\n */\n children?: React.ReactElement<typeof Chip> | React.ReactElement<typeof Chip>[];\n\n /**\n * Is chip disabled?\n */\n disabled?: boolean;\n\n /**\n * CSS class name\n */\n className?: string;\n\n /**\n * Style object.\n */\n style?: React.CSSProperties;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Tag` component from the `@webiny/admin-ui` package instead.\n */\nexport const Chips = (props: ChipsProps) => {\n const { children, className, ...rest } = props;\n\n return (\n <div\n {...rest}\n className={cn(\"mdc-evolution-chip-set wby-flex wby-gap-sm wby-py-sm\", className)}\n >\n {children}\n </div>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,EAAE,QAAQ,kBAAkB;AAyBrC;AACA;AACA;AACA;AACA,OAAO,MAAMC,KAAK,GAAIC,KAAiB,IAAK;EACxC,MAAM;IAAEC,QAAQ;IAAEC,SAAS;IAAE,GAAGC;EAAK,CAAC,GAAGH,KAAK;EAE9C,oBACIH,KAAA,CAAAO,aAAA,QAAAC,MAAA,CAAAC,MAAA,KACQH,IAAI;IACRD,SAAS,EAAEJ,EAAE,CAAC,sDAAsD,EAAEI,SAAS;EAAE,IAEhFD,QACA,CAAC;AAEd,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { FormComponentProps } from "../types";
2
+ import type { FormComponentProps } from "../types";
3
3
  interface Props extends FormComponentProps {
4
4
  mode: string;
5
5
  theme: string;
@@ -1 +1 @@
1
- {"version":3,"names":["React","CodeEditor","AdminCodeEditor","readOnly","props","createElement","Object","assign","disabled"],"sources":["CodeEditor.tsx"],"sourcesContent":["import React from \"react\";\nimport { CodeEditor as AdminCodeEditor } from \"@webiny/admin-ui\";\nimport { FormComponentProps } from \"~/types\";\n\ninterface Props extends FormComponentProps {\n mode: string;\n\n theme: string;\n\n readOnly?: boolean;\n\n // Description beneath the input.\n description?: React.ReactNode;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `CodeEditor` component props from the `@webiny/admin-ui` package instead.\n */\nexport const CodeEditor = ({ readOnly, ...props }: Props) => {\n return <AdminCodeEditor disabled={readOnly} {...props} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,IAAIC,eAAe,QAAQ,kBAAkB;AAchE;AACA;AACA;AACA;AACA,OAAO,MAAMD,UAAU,GAAGA,CAAC;EAAEE,QAAQ;EAAE,GAAGC;AAAa,CAAC,KAAK;EACzD,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,eAAe,EAAAI,MAAA,CAAAC,MAAA;IAACC,QAAQ,EAAEL;EAAS,GAAKC,KAAK,CAAG,CAAC;AAC7D,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","CodeEditor","AdminCodeEditor","readOnly","props","createElement","Object","assign","disabled"],"sources":["CodeEditor.tsx"],"sourcesContent":["import React from \"react\";\nimport { CodeEditor as AdminCodeEditor } from \"@webiny/admin-ui\";\nimport type { FormComponentProps } from \"~/types\";\n\ninterface Props extends FormComponentProps {\n mode: string;\n\n theme: string;\n\n readOnly?: boolean;\n\n // Description beneath the input.\n description?: React.ReactNode;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `CodeEditor` component props from the `@webiny/admin-ui` package instead.\n */\nexport const CodeEditor = ({ readOnly, ...props }: Props) => {\n return <AdminCodeEditor disabled={readOnly} {...props} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,IAAIC,eAAe,QAAQ,kBAAkB;AAchE;AACA;AACA;AACA;AACA,OAAO,MAAMD,UAAU,GAAGA,CAAC;EAAEE,QAAQ;EAAE,GAAGC;AAAa,CAAC,KAAK;EACzD,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,eAAe,EAAAI,MAAA,CAAAC,MAAA;IAACC,QAAQ,EAAEL;EAAS,GAAKC,KAAK,CAAG,CAAC;AAC7D,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { FormComponentProps } from "../types";
2
+ import type { FormComponentProps } from "../types";
3
3
  interface ColorPickerProps extends FormComponentProps<string> {
4
4
  label?: string;
5
5
  disable?: boolean;
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useMemo","ColorPicker","AdminColorPicker","value","onChange","align","originalAlign","props","onValueChange","undefined","createElement","Object","assign"],"sources":["ColorPicker.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport { ColorPicker as AdminColorPicker } from \"@webiny/admin-ui\";\nimport { FormComponentProps } from \"~/types\";\n\ninterface ColorPickerProps extends FormComponentProps<string> {\n // Component label.\n label?: string;\n\n // Is color picker disabled?\n disable?: boolean;\n\n // Description beneath the color picker.\n description?: string;\n\n // Popover alignment (default is `left`).\n align?: \"left\" | \"right\";\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `ColorPicker` component from the `@webiny/admin-ui` package instead.\n */\nconst ColorPicker = ({ value, onChange, align: originalAlign, ...props }: ColorPickerProps) => {\n const onValueChange = useCallback((value: string) => onChange && onChange(value), [onChange]);\n\n const align = useMemo(() => {\n if (!originalAlign) {\n return undefined;\n }\n\n if (originalAlign === \"right\") {\n return \"end\";\n }\n\n return \"start\";\n }, [originalAlign]);\n\n return <AdminColorPicker {...props} value={value} onChange={onValueChange} align={align} />;\n};\n\nexport { ColorPicker };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACnD,SAASC,WAAW,IAAIC,gBAAgB,QAAQ,kBAAkB;AAiBlE;AACA;AACA;AACA;AACA,MAAMD,WAAW,GAAGA,CAAC;EAAEE,KAAK;EAAEC,QAAQ;EAAEC,KAAK,EAAEC,aAAa;EAAE,GAAGC;AAAwB,CAAC,KAAK;EAC3F,MAAMC,aAAa,GAAGT,WAAW,CAAEI,KAAa,IAAKC,QAAQ,IAAIA,QAAQ,CAACD,KAAK,CAAC,EAAE,CAACC,QAAQ,CAAC,CAAC;EAE7F,MAAMC,KAAK,GAAGL,OAAO,CAAC,MAAM;IACxB,IAAI,CAACM,aAAa,EAAE;MAChB,OAAOG,SAAS;IACpB;IAEA,IAAIH,aAAa,KAAK,OAAO,EAAE;MAC3B,OAAO,KAAK;IAChB;IAEA,OAAO,OAAO;EAClB,CAAC,EAAE,CAACA,aAAa,CAAC,CAAC;EAEnB,oBAAOR,KAAA,CAAAY,aAAA,CAACR,gBAAgB,EAAAS,MAAA,CAAAC,MAAA,KAAKL,KAAK;IAAEJ,KAAK,EAAEA,KAAM;IAACC,QAAQ,EAAEI,aAAc;IAACH,KAAK,EAAEA;EAAM,EAAE,CAAC;AAC/F,CAAC;AAED,SAASJ,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useMemo","ColorPicker","AdminColorPicker","value","onChange","align","originalAlign","props","onValueChange","undefined","createElement","Object","assign"],"sources":["ColorPicker.tsx"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport { ColorPicker as AdminColorPicker } from \"@webiny/admin-ui\";\nimport type { FormComponentProps } from \"~/types\";\n\ninterface ColorPickerProps extends FormComponentProps<string> {\n // Component label.\n label?: string;\n\n // Is color picker disabled?\n disable?: boolean;\n\n // Description beneath the color picker.\n description?: string;\n\n // Popover alignment (default is `left`).\n align?: \"left\" | \"right\";\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `ColorPicker` component from the `@webiny/admin-ui` package instead.\n */\nconst ColorPicker = ({ value, onChange, align: originalAlign, ...props }: ColorPickerProps) => {\n const onValueChange = useCallback((value: string) => onChange && onChange(value), [onChange]);\n\n const align = useMemo(() => {\n if (!originalAlign) {\n return undefined;\n }\n\n if (originalAlign === \"right\") {\n return \"end\";\n }\n\n return \"start\";\n }, [originalAlign]);\n\n return <AdminColorPicker {...props} value={value} onChange={onValueChange} align={align} />;\n};\n\nexport { ColorPicker };\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACnD,SAASC,WAAW,IAAIC,gBAAgB,QAAQ,kBAAkB;AAiBlE;AACA;AACA;AACA;AACA,MAAMD,WAAW,GAAGA,CAAC;EAAEE,KAAK;EAAEC,QAAQ;EAAEC,KAAK,EAAEC,aAAa;EAAE,GAAGC;AAAwB,CAAC,KAAK;EAC3F,MAAMC,aAAa,GAAGT,WAAW,CAAEI,KAAa,IAAKC,QAAQ,IAAIA,QAAQ,CAACD,KAAK,CAAC,EAAE,CAACC,QAAQ,CAAC,CAAC;EAE7F,MAAMC,KAAK,GAAGL,OAAO,CAAC,MAAM;IACxB,IAAI,CAACM,aAAa,EAAE;MAChB,OAAOG,SAAS;IACpB;IAEA,IAAIH,aAAa,KAAK,OAAO,EAAE;MAC3B,OAAO,KAAK;IAChB;IAEA,OAAO,OAAO;EAClB,CAAC,EAAE,CAACA,aAAa,CAAC,CAAC;EAEnB,oBAAOR,KAAA,CAAAY,aAAA,CAACR,gBAAgB,EAAAS,MAAA,CAAAC,MAAA,KAAKL,KAAK;IAAEJ,KAAK,EAAEA,KAAM;IAACC,QAAQ,EAAEI,aAAc;IAACH,KAAK,EAAEA;EAAM,EAAE,CAAC;AAC/F,CAAC;AAED,SAASJ,WAAW","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { DataTableColumn, DataTableColumns, DataTableColumnSort, DataTableColumnVisibility, DataTableDefaultData, DataTableProps as AdminDataTableProps, DataTableRow, DataTableSorting, OnDataTableColumnVisibilityChange, OnDataTableSortingChange } from "@webiny/admin-ui";
2
+ import type { DataTableColumn, DataTableColumns, DataTableColumnSort, DataTableColumnVisibility, DataTableDefaultData, DataTableProps as AdminDataTableProps, DataTableRow, DataTableSorting, OnDataTableColumnVisibilityChange, OnDataTableSortingChange } from "@webiny/admin-ui";
3
3
  /**
4
4
  * @deprecated @webiny/ui package is deprecated and will be removed in future releases.
5
5
  * Please check `DataTable` types from the `@webiny/admin-ui` package instead.
@@ -1 +1 @@
1
- {"version":3,"names":["React","DataTable","AdminDataTable","loadingInitial","stickyRows","props","createElement","Object","assign","loading","stickyHeader"],"sources":["DataTable.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n DataTable as AdminDataTable,\n DataTableColumn,\n DataTableColumns,\n DataTableColumnSort,\n DataTableColumnVisibility,\n DataTableDefaultData,\n DataTableProps as AdminDataTableProps,\n DataTableRow,\n DataTableSorting,\n OnDataTableColumnVisibilityChange,\n OnDataTableSortingChange\n} from \"@webiny/admin-ui\";\n\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype Column<T> = DataTableColumn<T>;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype ColumnSort = DataTableColumnSort;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype ColumnVisibility = DataTableColumnVisibility;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype Columns<T> = DataTableColumns<T>;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype DefaultData = DataTableDefaultData;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype OnColumnVisibilityChange = OnDataTableColumnVisibilityChange;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype OnSortingChange = OnDataTableSortingChange;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype Sorting = DataTableSorting;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype TableRow<T> = DataTableRow<T>;\n\ninterface DataTableProps<TEntry>\n extends Omit<AdminDataTableProps<TEntry>, \"loading\" | \"stickyHeader\"> {\n loadingInitial?: AdminDataTableProps<TEntry>[\"loading\"];\n stickyRows?: number;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `DataTable` component from the `@webiny/admin-ui` package instead.\n */\nconst DataTable = <T extends Record<string, any> & DataTableDefaultData>({\n loadingInitial,\n stickyRows,\n ...props\n}: DataTableProps<T>) => {\n return <AdminDataTable {...props} loading={loadingInitial} stickyHeader={!!stickyRows} />;\n};\n\nexport {\n DataTable,\n type Column,\n type ColumnSort,\n type ColumnVisibility,\n type Columns,\n type DefaultData,\n type OnColumnVisibilityChange,\n type OnSortingChange,\n type Sorting,\n type TableRow\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACIC,SAAS,IAAIC,cAAc,QAWxB,kBAAkB;;AAEzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA,MAAMD,SAAS,GAAGA,CAAuD;EACrEE,cAAc;EACdC,UAAU;EACV,GAAGC;AACY,CAAC,KAAK;EACrB,oBAAOL,KAAA,CAAAM,aAAA,CAACJ,cAAc,EAAAK,MAAA,CAAAC,MAAA,KAAKH,KAAK;IAAEI,OAAO,EAAEN,cAAe;IAACO,YAAY,EAAE,CAAC,CAACN;EAAW,EAAE,CAAC;AAC7F,CAAC;AAED,SACIH,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["React","DataTable","AdminDataTable","loadingInitial","stickyRows","props","createElement","Object","assign","loading","stickyHeader"],"sources":["DataTable.tsx"],"sourcesContent":["import React from \"react\";\nimport type {\n DataTableColumn,\n DataTableColumns,\n DataTableColumnSort,\n DataTableColumnVisibility,\n DataTableDefaultData,\n DataTableProps as AdminDataTableProps,\n DataTableRow,\n DataTableSorting,\n OnDataTableColumnVisibilityChange,\n OnDataTableSortingChange\n} from \"@webiny/admin-ui\";\nimport { DataTable as AdminDataTable } from \"@webiny/admin-ui\";\n\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype Column<T> = DataTableColumn<T>;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype ColumnSort = DataTableColumnSort;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype ColumnVisibility = DataTableColumnVisibility;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype Columns<T> = DataTableColumns<T>;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype DefaultData = DataTableDefaultData;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype OnColumnVisibilityChange = OnDataTableColumnVisibilityChange;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype OnSortingChange = OnDataTableSortingChange;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype Sorting = DataTableSorting;\n/**\n * @deprecated @webiny/ui package is deprecated and will be removed in future releases.\n * Please check `DataTable` types from the `@webiny/admin-ui` package instead.\n */\ntype TableRow<T> = DataTableRow<T>;\n\ninterface DataTableProps<TEntry>\n extends Omit<AdminDataTableProps<TEntry>, \"loading\" | \"stickyHeader\"> {\n loadingInitial?: AdminDataTableProps<TEntry>[\"loading\"];\n stickyRows?: number;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `DataTable` component from the `@webiny/admin-ui` package instead.\n */\nconst DataTable = <T extends Record<string, any> & DataTableDefaultData>({\n loadingInitial,\n stickyRows,\n ...props\n}: DataTableProps<T>) => {\n return <AdminDataTable {...props} loading={loadingInitial} stickyHeader={!!stickyRows} />;\n};\n\nexport {\n DataTable,\n type Column,\n type ColumnSort,\n type ColumnVisibility,\n type Columns,\n type DefaultData,\n type OnColumnVisibilityChange,\n type OnSortingChange,\n type Sorting,\n type TableRow\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAazB,SAASC,SAAS,IAAIC,cAAc,QAAQ,kBAAkB;;AAE9D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA,MAAMD,SAAS,GAAGA,CAAuD;EACrEE,cAAc;EACdC,UAAU;EACV,GAAGC;AACY,CAAC,KAAK;EACrB,oBAAOL,KAAA,CAAAM,aAAA,CAACJ,cAAc,EAAAK,MAAA,CAAAC,MAAA,KAAKH,KAAK;IAAEI,OAAO,EAAEN,cAAe;IAACO,YAAY,EAAE,CAAC,CAACN;EAAW,EAAE,CAAC;AAC7F,CAAC;AAED,SACIH,SAAS","ignoreList":[]}
package/Grid/Grid.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import React, { CSSProperties } from "react";
1
+ import type { CSSProperties } from "react";
2
+ import React from "react";
2
3
  export interface RmwcGridProps {
3
4
  /** Specifies the grid should have fixed column width. */
4
5
  fixedColumnWidth?: boolean;
package/Grid/Grid.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["React","cn","Grid","AdminUiGrid","Cell","props","children","style","className","align","createElement","Column","span","GridInner","Object","assign","displayName"],"sources":["Grid.tsx"],"sourcesContent":["import React, { CSSProperties } from \"react\";\nimport cn from \"classnames\";\nimport { Grid as AdminUiGrid, ColumnProps as AdminUiColumnProps } from \"@webiny/admin-ui\";\n\nexport interface RmwcGridProps {\n /** Specifies the grid should have fixed column width. */\n fixedColumnWidth?: boolean;\n /** Specifies the alignment of the whole grid. */\n align?: \"left\" | \"right\";\n /** Children for the Grid */\n children?: React.ReactNode;\n}\n\nexport interface RmwcGridCellProps {\n /** Default number of columns to span. */\n span?: number;\n /** Number of columns to span on a phone. */\n phone?: number;\n /** Number of columns to span on a tablet. */\n tablet?: number;\n /** Number of columns to span on a desktop. */\n desktop?: number;\n /** Specifies the order of the cell. */\n order?: number;\n /** Specifies the alignment of cell */\n align?: \"top\" | \"middle\" | \"bottom\";\n}\n\nexport type CellProps = RmwcGridCellProps & {\n // One or more Cell components.\n children?: React.ReactNode;\n\n // CSS class name that will be added to the element\n className?: string;\n\n style?: { [key: string]: any };\n};\n\n/**\n * Cell must be direct children of Grid component.\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Grid` component from the `@webiny/admin-ui` package instead.\n */\nexport const Cell = (props: CellProps) => {\n const { children, style, className, align } = props;\n return (\n <AdminUiGrid.Column\n className={className}\n style={style}\n span={props.span as AdminUiColumnProps[\"span\"]}\n align={align}\n >\n {children}\n </AdminUiGrid.Column>\n );\n};\n\nexport type GridInnerProps = {\n // One or more Cell components.\n children: React.ReactElement<typeof Cell> | React.ReactElement<typeof Cell>[];\n\n /**\n * CSS class name\n */\n className?: string;\n};\n\nexport const GridInner = ({ className, ...props }: GridInnerProps) => {\n return (\n <div\n {...props}\n className={cn(\n \"wby-grid wby-grid-cols-12 wby-gap-6 wby-m-0 wby-flex wby-flex-wrap wby-items-stretch\",\n className\n )}\n >\n {props.children}\n </div>\n );\n};\n\nGridInner.displayName = \"GridInner\";\n\nexport type GridProps = RmwcGridProps & {\n className?: string;\n style?: CSSProperties;\n};\n\n/**\n * Use Grid component to display a list of choices, once the handler is triggered.\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Grid` component from the `@webiny/admin-ui` package instead.\n */\nexport const Grid = (props: GridProps) => {\n const { children, style, className } = props;\n\n return (\n <AdminUiGrid className={className} style={style}>\n {children as React.ReactElement<AdminUiColumnProps, typeof AdminUiGrid.Column>}\n </AdminUiGrid>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAyB,OAAO;AAC5C,OAAOC,EAAE,MAAM,YAAY;AAC3B,SAASC,IAAI,IAAIC,WAAW,QAA2C,kBAAkB;AAoCzF;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,IAAI,GAAIC,KAAgB,IAAK;EACtC,MAAM;IAAEC,QAAQ;IAAEC,KAAK;IAAEC,SAAS;IAAEC;EAAM,CAAC,GAAGJ,KAAK;EACnD,oBACIL,KAAA,CAAAU,aAAA,CAACP,WAAW,CAACQ,MAAM;IACfH,SAAS,EAAEA,SAAU;IACrBD,KAAK,EAAEA,KAAM;IACbK,IAAI,EAAEP,KAAK,CAACO,IAAmC;IAC/CH,KAAK,EAAEA;EAAM,GAEZH,QACe,CAAC;AAE7B,CAAC;AAYD,OAAO,MAAMO,SAAS,GAAGA,CAAC;EAAEL,SAAS;EAAE,GAAGH;AAAsB,CAAC,KAAK;EAClE,oBACIL,KAAA,CAAAU,aAAA,QAAAI,MAAA,CAAAC,MAAA,KACQV,KAAK;IACTG,SAAS,EAAEP,EAAE,CACT,sFAAsF,EACtFO,SACJ;EAAE,IAEDH,KAAK,CAACC,QACN,CAAC;AAEd,CAAC;AAEDO,SAAS,CAACG,WAAW,GAAG,WAAW;AAOnC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMd,IAAI,GAAIG,KAAgB,IAAK;EACtC,MAAM;IAAEC,QAAQ;IAAEC,KAAK;IAAEC;EAAU,CAAC,GAAGH,KAAK;EAE5C,oBACIL,KAAA,CAAAU,aAAA,CAACP,WAAW;IAACK,SAAS,EAAEA,SAAU;IAACD,KAAK,EAAEA;EAAM,GAC3CD,QACQ,CAAC;AAEtB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","cn","Grid","AdminUiGrid","Cell","props","children","style","className","align","createElement","Column","span","GridInner","Object","assign","displayName"],"sources":["Grid.tsx"],"sourcesContent":["import type { CSSProperties } from \"react\";\nimport React from \"react\";\nimport cn from \"classnames\";\nimport type { ColumnProps as AdminUiColumnProps } from \"@webiny/admin-ui\";\nimport { Grid as AdminUiGrid } from \"@webiny/admin-ui\";\n\nexport interface RmwcGridProps {\n /** Specifies the grid should have fixed column width. */\n fixedColumnWidth?: boolean;\n /** Specifies the alignment of the whole grid. */\n align?: \"left\" | \"right\";\n /** Children for the Grid */\n children?: React.ReactNode;\n}\n\nexport interface RmwcGridCellProps {\n /** Default number of columns to span. */\n span?: number;\n /** Number of columns to span on a phone. */\n phone?: number;\n /** Number of columns to span on a tablet. */\n tablet?: number;\n /** Number of columns to span on a desktop. */\n desktop?: number;\n /** Specifies the order of the cell. */\n order?: number;\n /** Specifies the alignment of cell */\n align?: \"top\" | \"middle\" | \"bottom\";\n}\n\nexport type CellProps = RmwcGridCellProps & {\n // One or more Cell components.\n children?: React.ReactNode;\n\n // CSS class name that will be added to the element\n className?: string;\n\n style?: { [key: string]: any };\n};\n\n/**\n * Cell must be direct children of Grid component.\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Grid` component from the `@webiny/admin-ui` package instead.\n */\nexport const Cell = (props: CellProps) => {\n const { children, style, className, align } = props;\n return (\n <AdminUiGrid.Column\n className={className}\n style={style}\n span={props.span as AdminUiColumnProps[\"span\"]}\n align={align}\n >\n {children}\n </AdminUiGrid.Column>\n );\n};\n\nexport type GridInnerProps = {\n // One or more Cell components.\n children: React.ReactElement<typeof Cell> | React.ReactElement<typeof Cell>[];\n\n /**\n * CSS class name\n */\n className?: string;\n};\n\nexport const GridInner = ({ className, ...props }: GridInnerProps) => {\n return (\n <div\n {...props}\n className={cn(\n \"wby-grid wby-grid-cols-12 wby-gap-6 wby-m-0 wby-flex wby-flex-wrap wby-items-stretch\",\n className\n )}\n >\n {props.children}\n </div>\n );\n};\n\nGridInner.displayName = \"GridInner\";\n\nexport type GridProps = RmwcGridProps & {\n className?: string;\n style?: CSSProperties;\n};\n\n/**\n * Use Grid component to display a list of choices, once the handler is triggered.\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Grid` component from the `@webiny/admin-ui` package instead.\n */\nexport const Grid = (props: GridProps) => {\n const { children, style, className } = props;\n\n return (\n <AdminUiGrid className={className} style={style}>\n {children as React.ReactElement<AdminUiColumnProps, typeof AdminUiGrid.Column>}\n </AdminUiGrid>\n );\n};\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,EAAE,MAAM,YAAY;AAE3B,SAASC,IAAI,IAAIC,WAAW,QAAQ,kBAAkB;AAoCtD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,IAAI,GAAIC,KAAgB,IAAK;EACtC,MAAM;IAAEC,QAAQ;IAAEC,KAAK;IAAEC,SAAS;IAAEC;EAAM,CAAC,GAAGJ,KAAK;EACnD,oBACIL,KAAA,CAAAU,aAAA,CAACP,WAAW,CAACQ,MAAM;IACfH,SAAS,EAAEA,SAAU;IACrBD,KAAK,EAAEA,KAAM;IACbK,IAAI,EAAEP,KAAK,CAACO,IAAmC;IAC/CH,KAAK,EAAEA;EAAM,GAEZH,QACe,CAAC;AAE7B,CAAC;AAYD,OAAO,MAAMO,SAAS,GAAGA,CAAC;EAAEL,SAAS;EAAE,GAAGH;AAAsB,CAAC,KAAK;EAClE,oBACIL,KAAA,CAAAU,aAAA,QAAAI,MAAA,CAAAC,MAAA,KACQV,KAAK;IACTG,SAAS,EAAEP,EAAE,CACT,sFAAsF,EACtFO,SACJ;EAAE,IAEDH,KAAK,CAACC,QACN,CAAC;AAEd,CAAC;AAEDO,SAAS,CAACG,WAAW,GAAG,WAAW;AAOnC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMd,IAAI,GAAIG,KAAgB,IAAK;EACtC,MAAM;IAAEC,QAAQ;IAAEC,KAAK;IAAEC;EAAU,CAAC,GAAGH,KAAK;EAE5C,oBACIL,KAAA,CAAAU,aAAA,CAACP,WAAW;IAACK,SAAS,EAAEA,SAAU;IAACD,KAAK,EAAEA;EAAM,GAC3CD,QACQ,CAAC;AAEtB,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { DialogOnClose } from "../Dialog";
2
+ import type { DialogOnClose } from "../Dialog";
3
3
  interface ImageEditorDialogProps {
4
4
  dialogZIndex?: number;
5
5
  onClose?: DialogOnClose;
@@ -1 +1 @@
1
- {"version":3,"names":["React","Alert","ImageEditorDialog","createElement","type","variant"],"sources":["ImageEditorDialog.tsx"],"sourcesContent":["import React from \"react\";\nimport { DialogOnClose } from \"../Dialog\";\nimport { Alert } from \"@webiny/admin-ui\";\n\ninterface ImageEditorDialogProps {\n dialogZIndex?: number;\n onClose?: DialogOnClose;\n open?: boolean;\n /**\n * We would need to drill down a lot to give correct options.\n * TODO: figure out some other way.\n */\n options?: any;\n src?: string;\n onAccept: (src: string) => void;\n \"data-testid\"?: string;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please check the `ImageEditorDialog` component inside the `@webiny/app-file-manager` package instead.\n */\nexport const ImageEditorDialog = ({}: ImageEditorDialogProps) => {\n return (\n <Alert type=\"danger\" variant={\"strong\"}>\n {\n \"Deprecated component! The original code has been moved to `@webiny/app-file-manager` package.\"\n }\n </Alert>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,KAAK,QAAQ,kBAAkB;AAgBxC;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAAC,CAAyB,CAAC,KAAK;EAC7D,oBACIF,KAAA,CAAAG,aAAA,CAACF,KAAK;IAACG,IAAI,EAAC,QAAQ;IAACC,OAAO,EAAE;EAAS,GAE/B,+FAED,CAAC;AAEhB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Alert","ImageEditorDialog","createElement","type","variant"],"sources":["ImageEditorDialog.tsx"],"sourcesContent":["import React from \"react\";\nimport type { DialogOnClose } from \"../Dialog\";\nimport { Alert } from \"@webiny/admin-ui\";\n\ninterface ImageEditorDialogProps {\n dialogZIndex?: number;\n onClose?: DialogOnClose;\n open?: boolean;\n /**\n * We would need to drill down a lot to give correct options.\n * TODO: figure out some other way.\n */\n options?: any;\n src?: string;\n onAccept: (src: string) => void;\n \"data-testid\"?: string;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please check the `ImageEditorDialog` component inside the `@webiny/app-file-manager` package instead.\n */\nexport const ImageEditorDialog = ({}: ImageEditorDialogProps) => {\n return (\n <Alert type=\"danger\" variant={\"strong\"}>\n {\n \"Deprecated component! The original code has been moved to `@webiny/app-file-manager` package.\"\n }\n </Alert>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,KAAK,QAAQ,kBAAkB;AAgBxC;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAAC,CAAyB,CAAC,KAAK;EAC7D,oBACIF,KAAA,CAAAG,aAAA,CAACF,KAAK;IAACG,IAAI,EAAC,QAAQ;IAACC,OAAO,EAAE;EAAS,GAE/B,+FAED,CAAC;AAEhB,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { FormComponentProps } from "../types";
2
+ import type { FormComponentProps } from "../types";
3
3
  interface MultiImageUploadProps extends FormComponentProps {
4
4
  label?: string;
5
5
  disabled?: boolean;
@@ -1 +1 @@
1
- {"version":3,"names":["React","Alert","MultiImageUpload","createElement","type","variant"],"sources":["MultiImageUpload.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormComponentProps } from \"../types\";\nimport { Alert } from \"@webiny/admin-ui\";\n\ninterface MultiImageUploadProps extends FormComponentProps {\n // Component label.\n label?: string;\n\n // Is component disabled?\n disabled?: boolean;\n\n // Description beneath the image.\n description?: string;\n\n // A className for the root element.\n className?: string;\n\n // Define a list of accepted image types.\n accept?: string[];\n\n // Define file's max allowed size (default is \"5mb\").\n // Uses \"bytes\" (https://www.npmjs.com/package/bytes) library to convert string notation to actual number.\n maxSize: string;\n\n // Image editor options.\n // Please check the docs of ImageEditor component for the list of all available options.\n imageEditor?: {\n [key: string]: any;\n };\n\n // Use these to customize error messages (eg. if i18n supported is needed).\n errorMessages: {\n maxSizeExceeded: string;\n unsupportedFileType: string;\n default: string;\n };\n\n // Cropper options\n cropper?: { [key: string]: any };\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please check the `MultiFilePicker` component inside the `@webiny/admin-ui` package instead.\n */\nexport const MultiImageUpload = ({}: MultiImageUploadProps) => {\n return (\n <Alert type=\"danger\" variant={\"strong\"}>\n {\n \"Deprecated component! The original code has been moved to `@webiny/admin-ui` package.\"\n }\n </Alert>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,KAAK,QAAQ,kBAAkB;AAuCxC;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAGA,CAAC,CAAwB,CAAC,KAAK;EAC3D,oBACIF,KAAA,CAAAG,aAAA,CAACF,KAAK;IAACG,IAAI,EAAC,QAAQ;IAACC,OAAO,EAAE;EAAS,GAE/B,uFAED,CAAC;AAEhB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Alert","MultiImageUpload","createElement","type","variant"],"sources":["MultiImageUpload.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FormComponentProps } from \"../types\";\nimport { Alert } from \"@webiny/admin-ui\";\n\ninterface MultiImageUploadProps extends FormComponentProps {\n // Component label.\n label?: string;\n\n // Is component disabled?\n disabled?: boolean;\n\n // Description beneath the image.\n description?: string;\n\n // A className for the root element.\n className?: string;\n\n // Define a list of accepted image types.\n accept?: string[];\n\n // Define file's max allowed size (default is \"5mb\").\n // Uses \"bytes\" (https://www.npmjs.com/package/bytes) library to convert string notation to actual number.\n maxSize: string;\n\n // Image editor options.\n // Please check the docs of ImageEditor component for the list of all available options.\n imageEditor?: {\n [key: string]: any;\n };\n\n // Use these to customize error messages (eg. if i18n supported is needed).\n errorMessages: {\n maxSizeExceeded: string;\n unsupportedFileType: string;\n default: string;\n };\n\n // Cropper options\n cropper?: { [key: string]: any };\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please check the `MultiFilePicker` component inside the `@webiny/admin-ui` package instead.\n */\nexport const MultiImageUpload = ({}: MultiImageUploadProps) => {\n return (\n <Alert type=\"danger\" variant={\"strong\"}>\n {\n \"Deprecated component! The original code has been moved to `@webiny/admin-ui` package.\"\n }\n </Alert>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,KAAK,QAAQ,kBAAkB;AAuCxC;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAGA,CAAC,CAAwB,CAAC,KAAK;EAC3D,oBACIF,KAAA,CAAAG,aAAA,CAACF,KAAK;IAACG,IAAI,EAAC,QAAQ;IAACC,OAAO,EAAE;EAAS,GAE/B,uFAED,CAAC;AAEhB,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { FormComponentProps } from "../types";
2
+ import type { FormComponentProps } from "../types";
3
3
  interface SingleImageUploadProps extends FormComponentProps {
4
4
  label?: string;
5
5
  disabled?: boolean;
@@ -1 +1 @@
1
- {"version":3,"names":["React","Alert","SingleImageUpload","createElement","type","variant"],"sources":["SingleImageUpload.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormComponentProps } from \"~/types\";\nimport { Alert } from \"@webiny/admin-ui\";\n\ninterface SingleImageUploadProps extends FormComponentProps {\n // Component label.\n label?: string;\n\n // Is component disabled?\n disabled?: boolean;\n\n // Description beneath the image.\n description?: string;\n\n // A className for the root element.\n className?: string;\n\n // Define a list of accepted image types.\n accept?: string[];\n\n // Define file's max allowed size (default is \"10mb\").\n // Uses \"bytes\" (https://www.npmjs.com/package/bytes) library to convert string notation to actual number.\n maxSize: string;\n\n // Image editor options.\n // Please check the docs of ImageEditor component for the list of all available options.\n imageEditor?: {\n [key: string]: any;\n };\n\n // Custom image preview renderer. By default images are rendered via simple <img> element.\n renderImagePreview?: () => React.ReactElement<any>;\n\n // Should remove image button (top right ✕) be shown? Default is set to `true`.\n showRemoveImageButton?: boolean;\n\n // Use these to customize error messages (eg. if i18n supported is needed).\n errorMessages: {\n maxSizeExceeded: string;\n unsupportedFileType: string;\n default: string;\n multipleNotAllowed: string;\n multipleMaxSizeExceeded: string;\n };\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please check the `FilePicker` component inside the `@webiny/admin-ui` package instead.\n */\nexport const SingleImageUpload = ({}: SingleImageUploadProps) => {\n return (\n <Alert type=\"danger\" variant={\"strong\"}>\n {\n \"Deprecated component! The original code has been moved to `@webiny/admin-ui` package.\"\n }\n </Alert>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,KAAK,QAAQ,kBAAkB;AA4CxC;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAAC,CAAyB,CAAC,KAAK;EAC7D,oBACIF,KAAA,CAAAG,aAAA,CAACF,KAAK;IAACG,IAAI,EAAC,QAAQ;IAACC,OAAO,EAAE;EAAS,GAE/B,uFAED,CAAC;AAEhB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Alert","SingleImageUpload","createElement","type","variant"],"sources":["SingleImageUpload.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FormComponentProps } from \"~/types\";\nimport { Alert } from \"@webiny/admin-ui\";\n\ninterface SingleImageUploadProps extends FormComponentProps {\n // Component label.\n label?: string;\n\n // Is component disabled?\n disabled?: boolean;\n\n // Description beneath the image.\n description?: string;\n\n // A className for the root element.\n className?: string;\n\n // Define a list of accepted image types.\n accept?: string[];\n\n // Define file's max allowed size (default is \"10mb\").\n // Uses \"bytes\" (https://www.npmjs.com/package/bytes) library to convert string notation to actual number.\n maxSize: string;\n\n // Image editor options.\n // Please check the docs of ImageEditor component for the list of all available options.\n imageEditor?: {\n [key: string]: any;\n };\n\n // Custom image preview renderer. By default images are rendered via simple <img> element.\n renderImagePreview?: () => React.ReactElement<any>;\n\n // Should remove image button (top right ✕) be shown? Default is set to `true`.\n showRemoveImageButton?: boolean;\n\n // Use these to customize error messages (eg. if i18n supported is needed).\n errorMessages: {\n maxSizeExceeded: string;\n unsupportedFileType: string;\n default: string;\n multipleNotAllowed: string;\n multipleMaxSizeExceeded: string;\n };\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please check the `FilePicker` component inside the `@webiny/admin-ui` package instead.\n */\nexport const SingleImageUpload = ({}: SingleImageUploadProps) => {\n return (\n <Alert type=\"danger\" variant={\"strong\"}>\n {\n \"Deprecated component! The original code has been moved to `@webiny/admin-ui` package.\"\n }\n </Alert>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,KAAK,QAAQ,kBAAkB;AA4CxC;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAAC,CAAyB,CAAC,KAAK;EAC7D,oBACIF,KAAA,CAAAG,aAAA,CAACF,KAAK;IAACG,IAAI,EAAC,QAAQ;IAACC,OAAO,EAAE;EAAS,GAE/B,uFAED,CAAC;AAEhB,CAAC","ignoreList":[]}
package/Input/Input.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import React, { ReactElement } from "react";
2
- import { FormComponentProps } from "../types";
1
+ import type { ReactElement } from "react";
2
+ import React from "react";
3
+ import type { FormComponentProps } from "../types";
3
4
  export interface TextFieldHelperTextProps {
4
5
  /** Make the help text always visible */
5
6
  persistent?: boolean;