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

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 +4 -4
  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 +1 @@
1
- {"version":3,"names":["React","useCallback","useMemo","pick","Input","AdminInput","Textarea","AdminTextarea","rmwcProps","props","autoFocus","value","description","placeholder","rows","validation","icon","trailingIcon","onBlur","onChange","rawOnChange","required","inputRef","rest","inputValue","size","getValidIcon","isValidElement","undefined","Boolean","createElement","Object","assign","className","forwardEventOnChange","textareaRef","startIcon","endIcon"],"sources":["Input.tsx"],"sourcesContent":["import React, { useCallback, useMemo, ReactElement } from \"react\";\nimport pick from \"lodash/pick\";\nimport { FormComponentProps } from \"~/types\";\nimport { Input as AdminInput, Textarea as AdminTextarea } from \"@webiny/admin-ui\";\n\nexport interface TextFieldHelperTextProps {\n /** Make the help text always visible */\n persistent?: boolean;\n /** Make the help a validation message style */\n validationMsg?: boolean;\n /** Content for the help text */\n children: React.ReactNode;\n}\n\nexport interface TextFieldProps {\n /** Sets the value for controlled TextFields. */\n value?: string | number;\n /** Adds help text to the field */\n helpText?: React.ReactNode | TextFieldHelperTextProps;\n /** Shows the character count, must be used in conjunction with maxLength. */\n characterCount?: boolean;\n /** Makes the TextField visually invalid. This is sometimes automatically applied in cases where required or pattern is used. */\n invalid?: boolean;\n /** Makes the Textfield disabled. */\n disabled?: boolean;\n /** Makes the Textfield required. */\n required?: boolean;\n /** Outline the TextField. */\n outlined?: boolean;\n /** How to align the text inside the TextField. Defaults to 'start'. */\n align?: \"start\" | \"end\";\n /** A label for the input. */\n label?: React.ReactNode;\n /** The label floats automatically based on value, but you can use this prop for manual control. */\n floatLabel?: boolean;\n /** Makes a multiline TextField. */\n textarea?: boolean;\n /** Makes the TextField fullwidth. */\n fullwidth?: boolean;\n /** Add a leading icon. */\n icon?: any;\n /** Add a trailing icon. */\n trailingIcon?: any;\n /** By default, props spread to the input. These props are for the component's root container. */\n rootProps?: any;\n /** A reference to the native input or textarea. */\n inputRef?: React.Ref<HTMLInputElement | HTMLTextAreaElement | null>;\n /** The type of input field to render, search, number, etc */\n type?: string;\n /** Add prefix. */\n prefix?: string;\n /** Add suffix. */\n suffix?: string;\n /** Advanced: A reference to the MDCFoundation. */\n foundationRef?: any;\n /** Make textarea resizeable */\n resizeable?: boolean;\n}\n\nexport type InputProps<TValue = any> = FormComponentProps<TValue> &\n TextFieldProps & {\n // Should this input be filled with browser values\n autoComplete?: string;\n\n // If true, will pass native `event` to the `onChange` callback\n rawOnChange?: boolean;\n\n // Auto-focus input\n autoFocus?: boolean;\n\n // Input placeholder\n placeholder?: string;\n\n // Description beneath the input.\n description?: string | ReactElement;\n\n // Converts input into a text area with given number of rows.\n rows?: number;\n\n maxLength?: number;\n\n // A callback that is executed when input focus is lost.\n onBlur?: (e: React.SyntheticEvent<any>) => any;\n\n onKeyDown?: (e: React.SyntheticEvent<any>) => any;\n\n // A callback that gets triggered when the user presses the \"Enter\" key.\n onEnter?: () => any;\n\n // CSS class name\n className?: string;\n\n // For testing purposes.\n \"data-testid\"?: string;\n\n // Size - small, medium or large\n size?: \"small\" | \"medium\" | \"large\";\n\n children?: React.ReactNode;\n };\n\n/**\n * Use Input component to store short string values, like first name, last name, e-mail etc.\n * Additionally, with rows prop, it can also be turned into a text area, to store longer strings.\n */\n\n// IconProps directly passed to RMWC\nconst rmwcProps = [\n \"label\",\n \"type\",\n \"disabled\",\n \"readOnly\",\n \"placeholder\",\n \"onKeyDown\",\n \"onEnter\",\n \"onKeyPress\",\n \"onKeyUp\",\n \"onFocus\",\n \"className\",\n \"maxLength\",\n \"characterCount\",\n \"autoComplete\",\n \"maxLength\"\n];\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Input` component from the `@webiny/admin-ui` package instead.\n */\nexport const Input = (props: InputProps) => {\n const {\n autoFocus,\n value,\n description,\n placeholder,\n rows,\n validation,\n icon,\n trailingIcon,\n onBlur,\n onChange,\n rawOnChange,\n required,\n inputRef,\n ...rest\n } = props;\n\n let inputValue = value;\n if (value === null || typeof value === \"undefined\") {\n inputValue = \"\";\n }\n\n const size = useMemo(() => {\n if (props.size === \"medium\") {\n return \"md\";\n }\n\n if (props.size === \"large\") {\n return \"lg\";\n }\n\n return \"lg\";\n }, [props.size]);\n\n const getValidIcon = useCallback((icon: React.ReactNode) => {\n if (React.isValidElement(icon)) {\n return icon;\n }\n\n return undefined;\n }, []);\n\n if (Boolean(rows)) {\n return (\n <AdminTextarea\n {...pick(rest, rmwcProps)}\n autoFocus={autoFocus}\n value={inputValue}\n onChange={onChange}\n placeholder={placeholder}\n size={size}\n className={\"webiny-ui-input\"}\n data-testid={props[\"data-testid\"]}\n validation={validation}\n description={description}\n required={required}\n rows={rows}\n forwardEventOnChange={rawOnChange}\n textareaRef={inputRef as React.Ref<HTMLTextAreaElement> | undefined}\n onBlur={onBlur}\n />\n );\n }\n\n return (\n <AdminInput\n {...pick(rest, rmwcProps)}\n autoFocus={autoFocus}\n value={inputValue}\n onChange={onChange}\n startIcon={getValidIcon(icon)}\n endIcon={getValidIcon(trailingIcon)}\n placeholder={placeholder}\n size={size}\n className={\"webiny-ui-input\"}\n data-testid={props[\"data-testid\"]}\n validation={validation}\n description={description}\n required={required}\n forwardEventOnChange={rawOnChange}\n inputRef={inputRef as React.Ref<HTMLInputElement> | undefined}\n onBlur={onBlur}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAsB,OAAO;AACjE,OAAOC,IAAI,MAAM,aAAa;AAE9B,SAASC,KAAK,IAAIC,UAAU,EAAEC,QAAQ,IAAIC,aAAa,QAAQ,kBAA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AI,EAAEf,SAAS,CAAC;MACzBE,SAAS,EAAEA,SAAU;MACrBC,KAAK,EAAEa,UAAW;MAClBL,QAAQ,EAAEA,QAAS;MACnBN,WAAW,EAAEA,WAAY;MACzBY,IAAI,EAAEA,IAAK;MACXQ,SAAS,EAAE,iBAAkB;MAC7B,eAAaxB,KAAK,CAAC,aAAa,CAAE;MAClCM,UAAU,EAAEA,UAAW;MACvBH,WAAW,EAAEA,WAAY;MACzBS,QAAQ,EAAEA,QAAS;MACnBP,IAAI,EAAEA,IAAK;MACXoB,oBAAoB,EAAEd,WAAY;MAClCe,WAAW,EAAEb,QAAuD;MACpEJ,MAAM,EAAEA;IAAO,EAClB,CAAC;EAEV;EAEA,oBACIlB,KAAA,CAAA8B,aAAA,CAACzB,UAAU,EAAA0B,MAAA,CAAAC,MAAA,KACH7B,IAAI,CAACoB,IAAI,EAAEf,SAAS,CAAC;IACzBE,SAAS,EAAEA,SAAU;IACrBC,KAAK,EAAEa,UAAW;IAClBL,QAAQ,EAAEA,QAAS;IACnBiB,SAAS,EAAEV,YAAY,CAACV,IAAI,CAAE;IAC9BqB,OAAO,EAAEX,YAAY,CAACT,YAAY,CAAE;IACpCJ,WAAW,EAAEA,WAAY;IACzBY,IAAI,EAAEA,IAAK;IACXQ,SAAS,EAAE,iBAAkB;IAC7B,eAAaxB,KAAK,CAAC,aAAa,CAAE;IAClCM,UAAU,EAAEA,UAAW;IACvBH,WAAW,EAAEA,WAAY;IACzBS,QAAQ,EAAEA,QAAS;IACnBa,oBAAoB,EAAEd,WAAY;IAClCE,QAAQ,EAAEA,QAAoD;IAC9DJ,MAAM,EAAEA;EAAO,EAClB,CAAC;AAEV,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useMemo","pick","Input","AdminInput","Textarea","AdminTextarea","rmwcProps","props","autoFocus","value","description","placeholder","rows","validation","icon","trailingIcon","onBlur","onChange","rawOnChange","required","inputRef","rest","inputValue","size","getValidIcon","isValidElement","undefined","Boolean","createElement","Object","assign","className","forwardEventOnChange","textareaRef","startIcon","endIcon"],"sources":["Input.tsx"],"sourcesContent":["import type { ReactElement } from \"react\";\nimport React, { useCallback, useMemo } from \"react\";\nimport pick from \"lodash/pick\";\nimport type { FormComponentProps } from \"~/types\";\nimport { Input as AdminInput, Textarea as AdminTextarea } from \"@webiny/admin-ui\";\n\nexport interface TextFieldHelperTextProps {\n /** Make the help text always visible */\n persistent?: boolean;\n /** Make the help a validation message style */\n validationMsg?: boolean;\n /** Content for the help text */\n children: React.ReactNode;\n}\n\nexport interface TextFieldProps {\n /** Sets the value for controlled TextFields. */\n value?: string | number;\n /** Adds help text to the field */\n helpText?: React.ReactNode | TextFieldHelperTextProps;\n /** Shows the character count, must be used in conjunction with maxLength. */\n characterCount?: boolean;\n /** Makes the TextField visually invalid. This is sometimes automatically applied in cases where required or pattern is used. */\n invalid?: boolean;\n /** Makes the Textfield disabled. */\n disabled?: boolean;\n /** Makes the Textfield required. */\n required?: boolean;\n /** Outline the TextField. */\n outlined?: boolean;\n /** How to align the text inside the TextField. Defaults to 'start'. */\n align?: \"start\" | \"end\";\n /** A label for the input. */\n label?: React.ReactNode;\n /** The label floats automatically based on value, but you can use this prop for manual control. */\n floatLabel?: boolean;\n /** Makes a multiline TextField. */\n textarea?: boolean;\n /** Makes the TextField fullwidth. */\n fullwidth?: boolean;\n /** Add a leading icon. */\n icon?: any;\n /** Add a trailing icon. */\n trailingIcon?: any;\n /** By default, props spread to the input. These props are for the component's root container. */\n rootProps?: any;\n /** A reference to the native input or textarea. */\n inputRef?: React.Ref<HTMLInputElement | HTMLTextAreaElement | null>;\n /** The type of input field to render, search, number, etc */\n type?: string;\n /** Add prefix. */\n prefix?: string;\n /** Add suffix. */\n suffix?: string;\n /** Advanced: A reference to the MDCFoundation. */\n foundationRef?: any;\n /** Make textarea resizeable */\n resizeable?: boolean;\n}\n\nexport type InputProps<TValue = any> = FormComponentProps<TValue> &\n TextFieldProps & {\n // Should this input be filled with browser values\n autoComplete?: string;\n\n // If true, will pass native `event` to the `onChange` callback\n rawOnChange?: boolean;\n\n // Auto-focus input\n autoFocus?: boolean;\n\n // Input placeholder\n placeholder?: string;\n\n // Description beneath the input.\n description?: string | ReactElement;\n\n // Converts input into a text area with given number of rows.\n rows?: number;\n\n maxLength?: number;\n\n // A callback that is executed when input focus is lost.\n onBlur?: (e: React.SyntheticEvent<any>) => any;\n\n onKeyDown?: (e: React.SyntheticEvent<any>) => any;\n\n // A callback that gets triggered when the user presses the \"Enter\" key.\n onEnter?: () => any;\n\n // CSS class name\n className?: string;\n\n // For testing purposes.\n \"data-testid\"?: string;\n\n // Size - small, medium or large\n size?: \"small\" | \"medium\" | \"large\";\n\n children?: React.ReactNode;\n };\n\n/**\n * Use Input component to store short string values, like first name, last name, e-mail etc.\n * Additionally, with rows prop, it can also be turned into a text area, to store longer strings.\n */\n\n// IconProps directly passed to RMWC\nconst rmwcProps = [\n \"label\",\n \"type\",\n \"disabled\",\n \"readOnly\",\n \"placeholder\",\n \"onKeyDown\",\n \"onEnter\",\n \"onKeyPress\",\n \"onKeyUp\",\n \"onFocus\",\n \"className\",\n \"maxLength\",\n \"characterCount\",\n \"autoComplete\",\n \"maxLength\"\n];\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Input` component from the `@webiny/admin-ui` package instead.\n */\nexport const Input = (props: InputProps) => {\n const {\n autoFocus,\n value,\n description,\n placeholder,\n rows,\n validation,\n icon,\n trailingIcon,\n onBlur,\n onChange,\n rawOnChange,\n required,\n inputRef,\n ...rest\n } = props;\n\n let inputValue = value;\n if (value === null || typeof value === \"undefined\") {\n inputValue = \"\";\n }\n\n const size = useMemo(() => {\n if (props.size === \"medium\") {\n return \"md\";\n }\n\n if (props.size === \"large\") {\n return \"lg\";\n }\n\n return \"lg\";\n }, [props.size]);\n\n const getValidIcon = useCallback((icon: React.ReactNode) => {\n if (React.isValidElement(icon)) {\n return icon;\n }\n\n return undefined;\n }, []);\n\n if (Boolean(rows)) {\n return (\n <AdminTextarea\n {...pick(rest, rmwcProps)}\n autoFocus={autoFocus}\n value={inputValue}\n onChange={onChange}\n placeholder={placeholder}\n size={size}\n className={\"webiny-ui-input\"}\n data-testid={props[\"data-testid\"]}\n validation={validation}\n description={description}\n required={required}\n rows={rows}\n forwardEventOnChange={rawOnChange}\n textareaRef={inputRef as React.Ref<HTMLTextAreaElement> | undefined}\n onBlur={onBlur}\n />\n );\n }\n\n return (\n <AdminInput\n {...pick(rest, rmwcProps)}\n autoFocus={autoFocus}\n value={inputValue}\n onChange={onChange}\n startIcon={getValidIcon(icon)}\n endIcon={getValidIcon(trailingIcon)}\n placeholder={placeholder}\n size={size}\n className={\"webiny-ui-input\"}\n data-testid={props[\"data-testid\"]}\n validation={validation}\n description={description}\n required={required}\n forwardEventOnChange={rawOnChange}\n inputRef={inputRef as React.Ref<HTMLInputElement> | undefined}\n onBlur={onBlur}\n />\n );\n};\n"],"mappings":"AACA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACnD,OAAOC,IAAI,MAAM,aAAa;AAE9B,SAASC,KAAK,IAAIC,UAAU,EAAEC,QAAQ,IAAIC,aAAa,QAAQ,kBAAkB;AAkGjF;AACA;AACA;AACA;;AAEA;AACA,MAAMC,SAAS,GAAG,CACd,OAAO,EACP,MAAM,EACN,UAAU,EACV,UAAU,EACV,aAAa,EACb,WAAW,EACX,SAAS,EACT,YAAY,EACZ,SAAS,EACT,SAAS,EACT,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,CACd;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMJ,KAAK,GAAIK,KAAiB,IAAK;EACxC,MAAM;IACFC,SAAS;IACTC,KAAK;IACLC,WAAW;IACXC,WAAW;IACXC,IAAI;IACJC,UAAU;IACVC,IAAI;IACJC,YAAY;IACZC,MAAM;IACNC,QAAQ;IACRC,WAAW;IACXC,QAAQ;IACRC,QAAQ;IACR,GAAGC;EACP,CAAC,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AAA,CAAAC,MAAA,KACH7B,IAAI,CAACoB,IAAI,EAAEf,SAAS,CAAC;IACzBE,SAAS,EAAEA,SAAU;IACrBC,KAAK,EAAEa,UAAW;IAClBL,QAAQ,EAAEA,QAAS;IACnBiB,SAAS,EAAEV,YAAY,CAACV,IAAI,CAAE;IAC9BqB,OAAO,EAAEX,YAAY,CAACT,YAAY,CAAE;IACpCJ,WAAW,EAAEA,WAAY;IACzBY,IAAI,EAAEA,IAAK;IACXQ,SAAS,EAAE,iBAAkB;IAC7B,eAAaxB,KAAK,CAAC,aAAa,CAAE;IAClCM,UAAU,EAAEA,UAAW;IACvBH,WAAW,EAAEA,WAAY;IACzBS,QAAQ,EAAEA,QAAS;IACnBa,oBAAoB,EAAEd,WAAY;IAClCE,QAAQ,EAAEA,QAAoD;IAC9DJ,MAAM,EAAEA;EAAO,EAClB,CAAC;AAEV,CAAC","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import { ListProps, ListItemProps } from "../List";
3
- import { DataListProps } from "@webiny/admin-ui/DataList/types";
2
+ import type { ListProps, ListItemProps } from "../List";
3
+ import type { DataListProps } from "@webiny/admin-ui/DataList/types";
4
4
  /**
5
5
  * @deprecated This component is deprecated and will be removed in future releases.
6
6
  * Please use the `DataList` component from the `@webiny/admin-ui` package instead.
@@ -1 +1 @@
1
- {"version":3,"names":["React","DataList","AdminDatalist","List","props","createElement","ScrollList"],"sources":["DataList.tsx"],"sourcesContent":["import React from \"react\";\nimport { DataList as AdminDatalist, List } from \"@webiny/admin-ui\";\nimport { ListProps, ListItemProps } from \"../List\";\nimport { DataListProps } from \"@webiny/admin-ui/DataList/types\";\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `DataList` component from the `@webiny/admin-ui` package instead.\n */\nexport const DataList = (props: DataListProps<Record<string, any>>) => {\n return <AdminDatalist {...props} />;\n};\n\nexport interface ScrollListProps extends ListProps {\n children: React.ReactElement<ListItemProps>[];\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `List` component from the `@webiny/admin-ui` package instead.\n */\nexport const ScrollList = (props: ScrollListProps) => {\n return <List {...props} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,IAAIC,aAAa,EAAEC,IAAI,QAAQ,kBAAkB;AAIlE;AACA;AACA;AACA;AACA,OAAO,MAAMF,QAAQ,GAAIG,KAAyC,IAAK;EACnE,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,aAAa,EAAKE,KAAQ,CAAC;AACvC,CAAC;AAMD;AACA;AACA;AACA;AACA,OAAO,MAAME,UAAU,GAAIF,KAAsB,IAAK;EAClD,oBAAOJ,KAAA,CAAAK,aAAA,CAACF,IAAI,EAAKC,KAAQ,CAAC;AAC9B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","DataList","AdminDatalist","List","props","createElement","ScrollList"],"sources":["DataList.tsx"],"sourcesContent":["import React from \"react\";\nimport { DataList as AdminDatalist, List } from \"@webiny/admin-ui\";\nimport type { ListProps, ListItemProps } from \"../List\";\nimport type { DataListProps } from \"@webiny/admin-ui/DataList/types\";\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `DataList` component from the `@webiny/admin-ui` package instead.\n */\nexport const DataList = (props: DataListProps<Record<string, any>>) => {\n return <AdminDatalist {...props} />;\n};\n\nexport interface ScrollListProps extends ListProps {\n children: React.ReactElement<ListItemProps>[];\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `List` component from the `@webiny/admin-ui` package instead.\n */\nexport const ScrollList = (props: ScrollListProps) => {\n return <List {...props} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,IAAIC,aAAa,EAAEC,IAAI,QAAQ,kBAAkB;AAIlE;AACA;AACA;AACA;AACA,OAAO,MAAMF,QAAQ,GAAIG,KAAyC,IAAK;EACnE,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,aAAa,EAAKE,KAAQ,CAAC;AACvC,CAAC;AAMD;AACA;AACA;AACA;AACA,OAAO,MAAME,UAAU,GAAIF,KAAsB,IAAK;EAClD,oBAAOJ,KAAA,CAAAK,aAAA,CAACF,IAAI,EAAKC,KAAQ,CAAC;AAC9B,CAAC","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
- import { ListProps } from "../List";
3
- import { DataListProps } from "@webiny/admin-ui/DataList/types";
4
- import { ListItem } from "@webiny/admin-ui/List/components";
2
+ import type { ListProps } from "../List";
3
+ import type { DataListProps } from "@webiny/admin-ui/DataList/types";
4
+ import type { ListItem } from "@webiny/admin-ui/List/components";
5
5
  interface DataListData {
6
6
  [key: string]: Record<string, any>[];
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","DataListWithSections","AdminDataListWithSections","List","props","createElement","ScrollListWithSections"],"sources":["DataListWithSections.tsx"],"sourcesContent":["import React from \"react\";\nimport { DataListWithSections as AdminDataListWithSections, List } from \"@webiny/admin-ui\";\nimport { ListProps } from \"../List\";\nimport { DataListProps } from \"@webiny/admin-ui/DataList/types\";\nimport { ListItem } from \"@webiny/admin-ui/List/components\";\n\ninterface DataListData {\n [key: string]: Record<string, any>[];\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `DataList` component from the `@webiny/admin-ui` package instead.\n */\nexport const DataListWithSections = (props: DataListProps<DataListData>) => {\n return <AdminDataListWithSections {...props} />;\n};\n\ninterface ScrollListWithSectionsProps extends ListProps {\n children: React.ReactElement<typeof ListItem>[];\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `List` component from the `@webiny/admin-ui` package instead.\n */\nexport const ScrollListWithSections = (props: ScrollListWithSectionsProps) => {\n return <List {...props} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,oBAAoB,IAAIC,yBAAyB,EAAEC,IAAI,QAAQ,kBAAkB;AAS1F;AACA;AACA;AACA;AACA,OAAO,MAAMF,oBAAoB,GAAIG,KAAkC,IAAK;EACxE,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,yBAAyB,EAAKE,KAAQ,CAAC;AACnD,CAAC;AAMD;AACA;AACA;AACA;AACA,OAAO,MAAME,sBAAsB,GAAIF,KAAkC,IAAK;EAC1E,oBAAOJ,KAAA,CAAAK,aAAA,CAACF,IAAI,EAAKC,KAAQ,CAAC;AAC9B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","DataListWithSections","AdminDataListWithSections","List","props","createElement","ScrollListWithSections"],"sources":["DataListWithSections.tsx"],"sourcesContent":["import React from \"react\";\nimport { DataListWithSections as AdminDataListWithSections, List } from \"@webiny/admin-ui\";\nimport type { ListProps } from \"../List\";\nimport type { DataListProps } from \"@webiny/admin-ui/DataList/types\";\nimport type { ListItem } from \"@webiny/admin-ui/List/components\";\n\ninterface DataListData {\n [key: string]: Record<string, any>[];\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `DataList` component from the `@webiny/admin-ui` package instead.\n */\nexport const DataListWithSections = (props: DataListProps<DataListData>) => {\n return <AdminDataListWithSections {...props} />;\n};\n\ninterface ScrollListWithSectionsProps extends ListProps {\n children: React.ReactElement<typeof ListItem>[];\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `List` component from the `@webiny/admin-ui` package instead.\n */\nexport const ScrollListWithSections = (props: ScrollListWithSectionsProps) => {\n return <List {...props} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,oBAAoB,IAAIC,yBAAyB,EAAEC,IAAI,QAAQ,kBAAkB;AAS1F;AACA;AACA;AACA;AACA,OAAO,MAAMF,oBAAoB,GAAIG,KAAkC,IAAK;EACxE,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,yBAAyB,EAAKE,KAAQ,CAAC;AACnD,CAAC;AAMD;AACA;AACA;AACA;AACA,OAAO,MAAME,sBAAsB,GAAIF,KAAkC,IAAK;EAC1E,oBAAOJ,KAAA,CAAAK,aAAA,CAACF,IAAI,EAAKC,KAAQ,CAAC;AAC9B,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","createContext","useMemo","useState","List","AdminList","initializeListItemState","title","undefined","description","actions","icon","onClick","DeprecatedListItemContext","ListItem","props","item","setItem","context","addTitle","value","state","addDescription","addIcon","addActions","addOnClickCallback","callback","createElement","Item","activated","disabled","selected","className","style","Provider","children","SimpleListItem","text","secondaryText","graphic","meta","metaIcon"],"sources":["ListItem.tsx"],"sourcesContent":["import React, { createContext, useMemo, useState } from \"react\";\nimport { List as AdminList, ListItemProps as AdminListItemProps } from \"@webiny/admin-ui\";\n\n/**\n * Ripples\n */\nexport declare type RipplePropT =\n | boolean\n | {\n accent?: boolean;\n surface?: boolean;\n unbounded?: boolean;\n };\n\n/** A ListItem component. */\nexport type ListItemProps = {\n /** A modifier for a selected state. */\n selected?: boolean;\n /** A modifier for an active state. */\n activated?: boolean;\n /** A modifier for a disabled state. */\n disabled?: boolean;\n /** Adds a ripple effect to the component */\n ripple?: RipplePropT;\n\n /** Custom */\n children: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n onClick?: (e: React.MouseEvent) => void;\n};\n\ninterface DeprecatedListItemContext {\n addTitle(value: React.ReactNode): void;\n addDescription(value?: React.ReactNode): void;\n addIcon(value: React.ReactNode): void;\n addActions(value?: React.ReactNode): void;\n addOnClickCallback(callback: React.MouseEventHandler<HTMLDivElement>): void;\n}\n\nconst initializeListItemState = (): AdminListItemProps => {\n return {\n title: undefined,\n description: undefined,\n actions: undefined,\n icon: undefined,\n onClick: undefined\n };\n};\n\nexport const DeprecatedListItemContext = createContext<DeprecatedListItemContext | undefined>(\n undefined\n);\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `List.Item` component from the `@webiny/admin-ui` package instead.\n */\nexport const ListItem = (props: ListItemProps) => {\n const [item, setItem] = useState<AdminListItemProps>(initializeListItemState());\n\n const context: DeprecatedListItemContext = useMemo(\n () => ({\n addTitle(value: React.ReactNode) {\n setItem(state => ({\n ...state,\n title: value\n }));\n },\n addDescription(value: React.ReactNode) {\n setItem(state => ({\n ...state,\n description: value\n }));\n },\n addIcon(value: React.ReactNode) {\n setItem(state => ({\n ...state,\n icon: value\n }));\n },\n addActions(value?: React.ReactNode) {\n setItem(state => ({\n ...state,\n actions: value\n }));\n },\n addOnClickCallback(callback: React.MouseEventHandler<HTMLDivElement>) {\n setItem(state => ({\n ...state,\n onClick: callback\n }));\n }\n }),\n [setItem, props]\n );\n\n return (\n <AdminList.Item\n activated={props.activated}\n disabled={props.disabled}\n selected={props.selected}\n onClick={item.onClick ?? props.onClick}\n className={props.className}\n style={props.style}\n title={item.title}\n description={item.description}\n actions={item.actions}\n icon={item.icon}\n >\n <DeprecatedListItemContext.Provider value={context}>\n {props.children}\n </DeprecatedListItemContext.Provider>\n </AdminList.Item>\n );\n};\n\n/** A simple list item template. */\nexport interface SimpleListItemProps extends ListItemProps {\n /** Text for the ListItem. */\n text?: React.ReactNode;\n /** Secondary Text for the ListItem. */\n secondaryText?: React.ReactNode;\n /** A graphic icon for the ListItem. */\n graphic?: any;\n /** A meta icon for the ListItem */\n metaIcon?: any;\n /** Meta content for the ListItem instead of an icon. */\n meta?: React.ReactNode;\n /** Children to render */\n children: React.ReactNode;\n\n /** Custom */\n onClick?: any;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `List.Item` component from the `@webiny/admin-ui` package instead.\n */\nexport const SimpleListItem = (props: SimpleListItemProps) => {\n return (\n <AdminList.Item\n title={props.text}\n description={props.secondaryText}\n icon={props.graphic}\n actions={props.meta ?? props.metaIcon}\n onClick={props.onClick}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC/D,SAASC,IAAI,IAAIC,SAAS,QAA6C,kB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CAAC;EAED,oBACIf,KAAA,CAAA2B,aAAA,CAACtB,SAAS,CAACuB,IAAI;IACXC,SAAS,EAAEd,KAAK,CAACc,SAAU;IAC3BC,QAAQ,EAAEf,KAAK,CAACe,QAAS;IACzBC,QAAQ,EAAEhB,KAAK,CAACgB,QAAS;IACzBnB,OAAO,EAAEI,IAAI,CAACJ,OAAO,IAAIG,KAAK,CAACH,OAAQ;IACvCoB,SAAS,EAAEjB,KAAK,CAACiB,SAAU;IAC3BC,KAAK,EAAElB,KAAK,CAACkB,KAAM;IACnB1B,KAAK,EAAES,IAAI,CAACT,KAAM;IAClBE,WAAW,EAAEO,IAAI,CAACP,WAAY;IAC9BC,OAAO,EAAEM,IAAI,CAACN,OAAQ;IACtBC,IAAI,EAAEK,IAAI,CAACL;EAAK,gBAEhBX,KAAA,CAAA2B,aAAA,CAACd,yBAAyB,CAACqB,QAAQ;IAACd,KAAK,EAAEF;EAAQ,GAC9CH,KAAK,CAACoB,QACyB,CACxB,CAAC;AAEzB,CAAC;;AAED;;AAmBA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAIrB,KAA0B,IAAK;EAC1D,oBACIf,KAAA,CAAA2B,aAAA,CAACtB,SAAS,CAACuB,IAAI;IACXrB,KAAK,EAAEQ,KAAK,CAACsB,IAAK;IAClB5B,WAAW,EAAEM,KAAK,CAACuB,aAAc;IACjC3B,IAAI,EAAEI,KAAK,CAACwB,OAAQ;IACpB7B,OAAO,EAAEK,KAAK,CAACyB,IAAI,IAAIzB,KAAK,CAAC0B,QAAS;IACtC7B,OAAO,EAAEG,KAAK,CAACH;EAAQ,CAC1B,CAAC;AAEV,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","createContext","useMemo","useState","List","AdminList","initializeListItemState","title","undefined","description","actions","icon","onClick","DeprecatedListItemContext","ListItem","props","item","setItem","context","addTitle","value","state","addDescription","addIcon","addActions","addOnClickCallback","callback","createElement","Item","activated","disabled","selected","className","style","Provider","children","SimpleListItem","text","secondaryText","graphic","meta","metaIcon"],"sources":["ListItem.tsx"],"sourcesContent":["import React, { createContext, useMemo, useState } from \"react\";\nimport type { ListItemProps as AdminListItemProps } from \"@webiny/admin-ui\";\nimport { List as AdminList } from \"@webiny/admin-ui\";\n\n/**\n * Ripples\n */\nexport declare type RipplePropT =\n | boolean\n | {\n accent?: boolean;\n surface?: boolean;\n unbounded?: boolean;\n };\n\n/** A ListItem component. */\nexport type ListItemProps = {\n /** A modifier for a selected state. */\n selected?: boolean;\n /** A modifier for an active state. */\n activated?: boolean;\n /** A modifier for a disabled state. */\n disabled?: boolean;\n /** Adds a ripple effect to the component */\n ripple?: RipplePropT;\n\n /** Custom */\n children: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n onClick?: (e: React.MouseEvent) => void;\n};\n\ninterface DeprecatedListItemContext {\n addTitle(value: React.ReactNode): void;\n addDescription(value?: React.ReactNode): void;\n addIcon(value: React.ReactNode): void;\n addActions(value?: React.ReactNode): void;\n addOnClickCallback(callback: React.MouseEventHandler<HTMLDivElement>): void;\n}\n\nconst initializeListItemState = (): AdminListItemProps => {\n return {\n title: undefined,\n description: undefined,\n actions: undefined,\n icon: undefined,\n onClick: undefined\n };\n};\n\nexport const DeprecatedListItemContext = createContext<DeprecatedListItemContext | undefined>(\n undefined\n);\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `List.Item` component from the `@webiny/admin-ui` package instead.\n */\nexport const ListItem = (props: ListItemProps) => {\n const [item, setItem] = useState<AdminListItemProps>(initializeListItemState());\n\n const context: DeprecatedListItemContext = useMemo(\n () => ({\n addTitle(value: React.ReactNode) {\n setItem(state => ({\n ...state,\n title: value\n }));\n },\n addDescription(value: React.ReactNode) {\n setItem(state => ({\n ...state,\n description: value\n }));\n },\n addIcon(value: React.ReactNode) {\n setItem(state => ({\n ...state,\n icon: value\n }));\n },\n addActions(value?: React.ReactNode) {\n setItem(state => ({\n ...state,\n actions: value\n }));\n },\n addOnClickCallback(callback: React.MouseEventHandler<HTMLDivElement>) {\n setItem(state => ({\n ...state,\n onClick: callback\n }));\n }\n }),\n [setItem, props]\n );\n\n return (\n <AdminList.Item\n activated={props.activated}\n disabled={props.disabled}\n selected={props.selected}\n onClick={item.onClick ?? props.onClick}\n className={props.className}\n style={props.style}\n title={item.title}\n description={item.description}\n actions={item.actions}\n icon={item.icon}\n >\n <DeprecatedListItemContext.Provider value={context}>\n {props.children}\n </DeprecatedListItemContext.Provider>\n </AdminList.Item>\n );\n};\n\n/** A simple list item template. */\nexport interface SimpleListItemProps extends ListItemProps {\n /** Text for the ListItem. */\n text?: React.ReactNode;\n /** Secondary Text for the ListItem. */\n secondaryText?: React.ReactNode;\n /** A graphic icon for the ListItem. */\n graphic?: any;\n /** A meta icon for the ListItem */\n metaIcon?: any;\n /** Meta content for the ListItem instead of an icon. */\n meta?: React.ReactNode;\n /** Children to render */\n children: React.ReactNode;\n\n /** Custom */\n onClick?: any;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `List.Item` component from the `@webiny/admin-ui` package instead.\n */\nexport const SimpleListItem = (props: SimpleListItemProps) => {\n return (\n <AdminList.Item\n title={props.text}\n description={props.secondaryText}\n icon={props.graphic}\n actions={props.meta ?? props.metaIcon}\n onClick={props.onClick}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAE/D,SAASC,IAAI,IAAIC,SAAS,QAAQ,kBAAkB;;AAEpD;AACA;AACA;;AASA;;AA0BA,MAAMC,uBAAuB,GAAGA,CAAA,KAA0B;EACtD,OAAO;IACHC,KAAK,EAAEC,SAAS;IAChBC,WAAW,EAAED,SAAS;IACtBE,OAAO,EAAEF,SAAS;IAClBG,IAAI,EAAEH,SAAS;IACfI,OAAO,EAAEJ;EACb,CAAC;AACL,CAAC;AAED,OAAO,MAAMK,yBAAyB,gBAAGZ,aAAa,CAClDO,SACJ,CAAC;;AAED;AACA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KAAK,EAAElB,KAAK,CAACkB,KAAM;IACnB1B,KAAK,EAAES,IAAI,CAACT,KAAM;IAClBE,WAAW,EAAEO,IAAI,CAACP,WAAY;IAC9BC,OAAO,EAAEM,IAAI,CAACN,OAAQ;IACtBC,IAAI,EAAEK,IAAI,CAACL;EAAK,gBAEhBX,KAAA,CAAA2B,aAAA,CAACd,yBAAyB,CAACqB,QAAQ;IAACd,KAAK,EAAEF;EAAQ,GAC9CH,KAAK,CAACoB,QACyB,CACxB,CAAC;AAEzB,CAAC;;AAED;;AAmBA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAIrB,KAA0B,IAAK;EAC1D,oBACIf,KAAA,CAAA2B,aAAA,CAACtB,SAAS,CAACuB,IAAI;IACXrB,KAAK,EAAEQ,KAAK,CAACsB,IAAK;IAClB5B,WAAW,EAAEM,KAAK,CAACuB,aAAc;IACjC3B,IAAI,EAAEI,KAAK,CAACwB,OAAQ;IACpB7B,OAAO,EAAEK,KAAK,CAACyB,IAAI,IAAIzB,KAAK,CAAC0B,QAAS;IACtC7B,OAAO,EAAEG,KAAK,CAACH;EAAQ,CAC1B,CAAC;AAEV,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import type React from "react";
2
2
  export type ListActionsProps = {
3
3
  children: React.ReactNode;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"names":["useContext","useEffect","DeprecatedListItemContext","ListActions","props","listItemContext","addActions","children"],"sources":["ListItemAction.tsx"],"sourcesContent":["import React, { useContext, useEffect } from \"react\";\nimport { DeprecatedListItemContext } from \"~/List\";\n\nexport type ListActionsProps = {\n children: React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListActions = (props: ListActionsProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n listItemContext!.addActions(props.children);\n }, [props]);\n\n return null;\n};\n"],"mappings":"AAAA,SAAgBA,UAAU,EAAEC,SAAS,QAAQ,OAAO;AACpD,SAASC,yBAAyB;AAMlC;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAIC,KAAuB,IAAK;EACpD,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZI,eAAe,CAAEC,UAAU,CAACF,KAAK,CAACG,QAAQ,CAAC;EAC/C,CAAC,EAAE,CAACH,KAAK,CAAC,CAAC;EAEX,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useContext","useEffect","DeprecatedListItemContext","ListActions","props","listItemContext","addActions","children"],"sources":["ListItemAction.tsx"],"sourcesContent":["import type React from \"react\";\nimport { useContext, useEffect } from \"react\";\nimport { DeprecatedListItemContext } from \"~/List\";\n\nexport type ListActionsProps = {\n children: React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListActions = (props: ListActionsProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n listItemContext!.addActions(props.children);\n }, [props]);\n\n return null;\n};\n"],"mappings":"AACA,SAASA,UAAU,EAAEC,SAAS,QAAQ,OAAO;AAC7C,SAASC,yBAAyB;AAMlC;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAIC,KAAuB,IAAK;EACpD,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZI,eAAe,CAAEC,UAAU,CAACF,KAAK,CAACG,QAAQ,CAAC;EAC/C,CAAC,EAAE,CAACH,KAAK,CAAC,CAAC;EAEX,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import type React from "react";
2
2
  export type ListItemGraphicProps = {
3
3
  children: React.ReactNode;
4
4
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"names":["useContext","useEffect","DeprecatedListItemContext","ListItemGraphic","props","listItemContext","addIcon","children","ListSelectBox"],"sources":["ListItemGraphic.tsx"],"sourcesContent":["import React, { useContext, useEffect } from \"react\";\nimport { DeprecatedListItemContext } from \"~/List\";\n\nexport type ListItemGraphicProps = { children: React.ReactNode; className?: string };\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListItemGraphic = (props: ListItemGraphicProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n listItemContext!.addIcon(props.children);\n }, [props]);\n\n return null;\n};\n\nexport type ListSelectBoxProps = {\n children: React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListSelectBox = (props: ListSelectBoxProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n listItemContext!.addIcon(props.children);\n }, [props]);\n\n return null;\n};\n"],"mappings":"AAAA,SAAgBA,UAAU,EAAEC,SAAS,QAAQ,OAAO;AACpD,SAASC,yBAAyB;AAIlC;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAIC,KAA2B,IAAK;EAC5D,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZI,eAAe,CAAEC,OAAO,CAACF,KAAK,CAACG,QAAQ,CAAC;EAC5C,CAAC,EAAE,CAACH,KAAK,CAAC,CAAC;EAEX,OAAO,IAAI;AACf,CAAC;AAMD;AACA;AACA;AACA;AACA,OAAO,MAAMI,aAAa,GAAIJ,KAAyB,IAAK;EACxD,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZI,eAAe,CAAEC,OAAO,CAACF,KAAK,CAACG,QAAQ,CAAC;EAC5C,CAAC,EAAE,CAACH,KAAK,CAAC,CAAC;EAEX,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useContext","useEffect","DeprecatedListItemContext","ListItemGraphic","props","listItemContext","addIcon","children","ListSelectBox"],"sources":["ListItemGraphic.tsx"],"sourcesContent":["import type React from \"react\";\nimport { useContext, useEffect } from \"react\";\nimport { DeprecatedListItemContext } from \"~/List\";\n\nexport type ListItemGraphicProps = { children: React.ReactNode; className?: string };\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListItemGraphic = (props: ListItemGraphicProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n listItemContext!.addIcon(props.children);\n }, [props]);\n\n return null;\n};\n\nexport type ListSelectBoxProps = {\n children: React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListSelectBox = (props: ListSelectBoxProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n listItemContext!.addIcon(props.children);\n }, [props]);\n\n return null;\n};\n"],"mappings":"AACA,SAASA,UAAU,EAAEC,SAAS,QAAQ,OAAO;AAC7C,SAASC,yBAAyB;AAIlC;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAIC,KAA2B,IAAK;EAC5D,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZI,eAAe,CAAEC,OAAO,CAACF,KAAK,CAACG,QAAQ,CAAC;EAC5C,CAAC,EAAE,CAACH,KAAK,CAAC,CAAC;EAEX,OAAO,IAAI;AACf,CAAC;AAMD;AACA;AACA;AACA;AACA,OAAO,MAAMI,aAAa,GAAIJ,KAAyB,IAAK;EACxD,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZI,eAAe,CAAEC,OAAO,CAACF,KAAK,CAACG,QAAQ,CAAC;EAC5C,CAAC,EAAE,CAACH,KAAK,CAAC,CAAC;EAEX,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import type React from "react";
2
2
  /** Text Wrapper for the ListItem */
3
3
  export type ListItemTextProps = {
4
4
  children: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"names":["useContext","useEffect","DeprecatedListItemContext","ListItemText","props","listItemContext","onClick","addOnClickCallback","children","ListItemTextPrimary","addTitle","ListItemTextSecondary","addDescription","ListTextOverline"],"sources":["ListItemText.tsx"],"sourcesContent":["import React, { useContext, useEffect } from \"react\";\nimport { DeprecatedListItemContext } from \"~/List\";\n\n/** Text Wrapper for the ListItem */\nexport type ListItemTextProps = {\n children: React.ReactNode;\n className?: string;\n onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListItemText = (props: ListItemTextProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n props.onClick && listItemContext!.addOnClickCallback(props.onClick);\n }, [props]);\n\n return props.children;\n};\n\nexport type ListItemTextPrimaryProps = {\n /**\n * Text content\n */\n children: React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListItemTextPrimary = (props: ListItemTextPrimaryProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n listItemContext!.addTitle(props.children);\n }, [props]);\n\n return null;\n};\n\nexport type ListItemTextSecondaryProps = {\n /**\n * Text content\n */\n children: React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListItemTextSecondary = (props: ListItemTextSecondaryProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n listItemContext!.addDescription(props.children);\n }, [props]);\n\n return null;\n};\n\nexport type ListTextOverlineProps = {\n children: React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListTextOverline = (props: ListTextOverlineProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n listItemContext!.addDescription(props.children);\n }, [props]);\n\n return null;\n};\n"],"mappings":"AAAA,SAAgBA,UAAU,EAAEC,SAAS,QAAQ,OAAO;AACpD,SAASC,yBAAyB;;AAElC;;AAOA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAIC,KAAwB,IAAK;EACtD,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZG,KAAK,CAACE,OAAO,IAAID,eAAe,CAAEE,kBAAkB,CAACH,KAAK,CAACE,OAAO,CAAC;EACvE,CAAC,EAAE,CAACF,KAAK,CAAC,CAAC;EAEX,OAAOA,KAAK,CAACI,QAAQ;AACzB,CAAC;AASD;AACA;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,GAAIL,KAA+B,IAAK;EACpE,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZI,eAAe,CAAEK,QAAQ,CAACN,KAAK,CAACI,QAAQ,CAAC;EAC7C,CAAC,EAAE,CAACJ,KAAK,CAAC,CAAC;EAEX,OAAO,IAAI;AACf,CAAC;AASD;AACA;AACA;AACA;AACA,OAAO,MAAMO,qBAAqB,GAAIP,KAAiC,IAAK;EACxE,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZI,eAAe,CAAEO,cAAc,CAACR,KAAK,CAACI,QAAQ,CAAC;EACnD,CAAC,EAAE,CAACJ,KAAK,CAAC,CAAC;EAEX,OAAO,IAAI;AACf,CAAC;AAMD;AACA;AACA;AACA;AACA,OAAO,MAAMS,gBAAgB,GAAIT,KAA4B,IAAK;EAC9D,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZI,eAAe,CAAEO,cAAc,CAACR,KAAK,CAACI,QAAQ,CAAC;EACnD,CAAC,EAAE,CAACJ,KAAK,CAAC,CAAC;EAEX,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useContext","useEffect","DeprecatedListItemContext","ListItemText","props","listItemContext","onClick","addOnClickCallback","children","ListItemTextPrimary","addTitle","ListItemTextSecondary","addDescription","ListTextOverline"],"sources":["ListItemText.tsx"],"sourcesContent":["import type React from \"react\";\nimport { useContext, useEffect } from \"react\";\nimport { DeprecatedListItemContext } from \"~/List\";\n\n/** Text Wrapper for the ListItem */\nexport type ListItemTextProps = {\n children: React.ReactNode;\n className?: string;\n onClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListItemText = (props: ListItemTextProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n props.onClick && listItemContext!.addOnClickCallback(props.onClick);\n }, [props]);\n\n return props.children;\n};\n\nexport type ListItemTextPrimaryProps = {\n /**\n * Text content\n */\n children: React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListItemTextPrimary = (props: ListItemTextPrimaryProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n listItemContext!.addTitle(props.children);\n }, [props]);\n\n return null;\n};\n\nexport type ListItemTextSecondaryProps = {\n /**\n * Text content\n */\n children: React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListItemTextSecondary = (props: ListItemTextSecondaryProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n listItemContext!.addDescription(props.children);\n }, [props]);\n\n return null;\n};\n\nexport type ListTextOverlineProps = {\n children: React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `ListItem` component props from the `@webiny/admin-ui` package instead.\n */\nexport const ListTextOverline = (props: ListTextOverlineProps) => {\n const listItemContext = useContext(DeprecatedListItemContext);\n\n useEffect(() => {\n listItemContext!.addDescription(props.children);\n }, [props]);\n\n return null;\n};\n"],"mappings":"AACA,SAASA,UAAU,EAAEC,SAAS,QAAQ,OAAO;AAC7C,SAASC,yBAAyB;;AAElC;;AAOA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAIC,KAAwB,IAAK;EACtD,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZG,KAAK,CAACE,OAAO,IAAID,eAAe,CAAEE,kBAAkB,CAACH,KAAK,CAACE,OAAO,CAAC;EACvE,CAAC,EAAE,CAACF,KAAK,CAAC,CAAC;EAEX,OAAOA,KAAK,CAACI,QAAQ;AACzB,CAAC;AASD;AACA;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,GAAIL,KAA+B,IAAK;EACpE,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZI,eAAe,CAAEK,QAAQ,CAACN,KAAK,CAACI,QAAQ,CAAC;EAC7C,CAAC,EAAE,CAACJ,KAAK,CAAC,CAAC;EAEX,OAAO,IAAI;AACf,CAAC;AASD;AACA;AACA;AACA;AACA,OAAO,MAAMO,qBAAqB,GAAIP,KAAiC,IAAK;EACxE,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZI,eAAe,CAAEO,cAAc,CAACR,KAAK,CAACI,QAAQ,CAAC;EACnD,CAAC,EAAE,CAACJ,KAAK,CAAC,CAAC;EAEX,OAAO,IAAI;AACf,CAAC;AAMD;AACA;AACA;AACA;AACA,OAAO,MAAMS,gBAAgB,GAAIT,KAA4B,IAAK;EAC9D,MAAMC,eAAe,GAAGL,UAAU,CAACE,yBAAyB,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACZI,eAAe,CAAEO,cAAc,CAACR,KAAK,CAACI,QAAQ,CAAC;EACnD,CAAC,EAAE,CAACJ,KAAK,CAAC,CAAC;EAEX,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
package/Radio/Radio.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { FormComponentProps } from "../types";
2
+ import type { FormComponentProps } from "../types";
3
3
  type Props = FormComponentProps & {
4
4
  label?: string;
5
5
  disabled?: boolean;
@@ -1 +1 @@
1
- {"version":3,"names":["React","FormComponentErrorMessage","FormComponentNote","Radio","AdminRadio","generateId","Component","onChange","e","props","target","checked","render","value","label","disabled","description","validation","isValid","validationIsValid","message","validationMessage","createElement","Fragment","id","invalid","Boolean","text"],"sources":["Radio.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n FormComponentErrorMessage,\n FormComponentNote,\n Radio as AdminRadio\n} from \"@webiny/admin-ui\";\nimport { FormComponentProps } from \"~/types\";\nimport { generateId } from \"@webiny/admin-ui/utils\";\n\ntype Props = FormComponentProps & {\n // Component label.\n label?: string;\n\n // Is radio disabled?\n disabled?: boolean;\n\n // Description beneath the radio.\n description?: string;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `Radio` component props from the `@webiny/admin-ui` package instead.\n */\nclass Radio extends React.Component<Props> {\n onChange = (e: React.SyntheticEvent<HTMLInputElement> | any) => {\n this.props.onChange && this.props.onChange((e.target as HTMLInputElement).checked);\n };\n\n public override render() {\n const { value, label, disabled, description, validation } = this.props;\n\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n\n return (\n <React.Fragment>\n <AdminRadio id={generateId()} disabled={disabled} value={value} label={label} />\n <FormComponentErrorMessage\n invalid={Boolean(validationIsValid === false)}\n text={validationMessage}\n />\n <FormComponentNote text={description} />\n </React.Fragment>\n );\n }\n}\n\nexport default Radio;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACIC,yBAAyB,EACzBC,iBAAiB,EACjBC,KAAK,IAAIC,UAAU,QAChB,kBAAkB;AAEzB,SAASC,UAAU,QAAQ,wBAAwB;AAanD;AACA;AACA;AACA;AACA,MAAMF,KAAK,SAASH,KAAK,CAACM,SAAS,CAAQ;EACvCC,QAAQ,GAAIC,CAA+C,IAAK;IAC5D,IAAI,CAACC,KAAK,CAACF,QAAQ,IAAI,IAAI,CAACE,KAAK,CAACF,QAAQ,CAAEC,CAAC,CAACE,MAAM,CAAsBC,OAAO,CAAC;EACtF,CAAC;EAEeC,MAAMA,CAAA,EAAG;IACrB,MAAM;MAAEC,KAAK;MAAEC,KAAK;MAAEC,QAAQ;MAAEC,WAAW;MAAEC;IAAW,CAAC,GAAG,IAAI,CAACR,KAAK;IAEtE,MAAM;MAAES,OAAO,EAAEC,iBAAiB;MAAEC,OAAO,EAAEC;IAAkB,CAAC,GAAGJ,UAAU,IAAI,CAAC,CAAC;IAEnF,oBACIjB,KAAA,CAAAsB,aAAA,CAACtB,KAAK,CAACuB,QAAQ,qBACXvB,KAAA,CAAAsB,aAAA,CAAClB,UAAU;MAACoB,EAAE,EAAEnB,UAAU,CAAC,CAAE;MAACU,QAAQ,EAAEA,QAAS;MAACF,KAAK,EAAEA,KAAM;MAACC,KAAK,EAAEA;IAAM,CAAE,CAAC,eAChFd,KAAA,CAAAsB,aAAA,CAACrB,yBAAyB;MACtBwB,OAAO,EAAEC,OAAO,CAACP,iBAAiB,KAAK,KAAK,CAAE;MAC9CQ,IAAI,EAAEN;IAAkB,CAC3B,CAAC,eACFrB,KAAA,CAAAsB,aAAA,CAACpB,iBAAiB;MAACyB,IAAI,EAAEX;IAAY,CAAE,CAC3B,CAAC;EAEzB;AACJ;AAEA,eAAeb,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["React","FormComponentErrorMessage","FormComponentNote","Radio","AdminRadio","generateId","Component","onChange","e","props","target","checked","render","value","label","disabled","description","validation","isValid","validationIsValid","message","validationMessage","createElement","Fragment","id","invalid","Boolean","text"],"sources":["Radio.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n FormComponentErrorMessage,\n FormComponentNote,\n Radio as AdminRadio\n} from \"@webiny/admin-ui\";\nimport type { FormComponentProps } from \"~/types\";\nimport { generateId } from \"@webiny/admin-ui/utils\";\n\ntype Props = FormComponentProps & {\n // Component label.\n label?: string;\n\n // Is radio disabled?\n disabled?: boolean;\n\n // Description beneath the radio.\n description?: string;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `Radio` component props from the `@webiny/admin-ui` package instead.\n */\nclass Radio extends React.Component<Props> {\n onChange = (e: React.SyntheticEvent<HTMLInputElement> | any) => {\n this.props.onChange && this.props.onChange((e.target as HTMLInputElement).checked);\n };\n\n public override render() {\n const { value, label, disabled, description, validation } = this.props;\n\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n\n return (\n <React.Fragment>\n <AdminRadio id={generateId()} disabled={disabled} value={value} label={label} />\n <FormComponentErrorMessage\n invalid={Boolean(validationIsValid === false)}\n text={validationMessage}\n />\n <FormComponentNote text={description} />\n </React.Fragment>\n );\n }\n}\n\nexport default Radio;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACIC,yBAAyB,EACzBC,iBAAiB,EACjBC,KAAK,IAAIC,UAAU,QAChB,kBAAkB;AAEzB,SAASC,UAAU,QAAQ,wBAAwB;AAanD;AACA;AACA;AACA;AACA,MAAMF,KAAK,SAASH,KAAK,CAACM,SAAS,CAAQ;EACvCC,QAAQ,GAAIC,CAA+C,IAAK;IAC5D,IAAI,CAACC,KAAK,CAACF,QAAQ,IAAI,IAAI,CAACE,KAAK,CAACF,QAAQ,CAAEC,CAAC,CAACE,MAAM,CAAsBC,OAAO,CAAC;EACtF,CAAC;EAEeC,MAAMA,CAAA,EAAG;IACrB,MAAM;MAAEC,KAAK;MAAEC,KAAK;MAAEC,QAAQ;MAAEC,WAAW;MAAEC;IAAW,CAAC,GAAG,IAAI,CAACR,KAAK;IAEtE,MAAM;MAAES,OAAO,EAAEC,iBAAiB;MAAEC,OAAO,EAAEC;IAAkB,CAAC,GAAGJ,UAAU,IAAI,CAAC,CAAC;IAEnF,oBACIjB,KAAA,CAAAsB,aAAA,CAACtB,KAAK,CAACuB,QAAQ,qBACXvB,KAAA,CAAAsB,aAAA,CAAClB,UAAU;MAACoB,EAAE,EAAEnB,UAAU,CAAC,CAAE;MAACU,QAAQ,EAAEA,QAAS;MAACF,KAAK,EAAEA,KAAM;MAACC,KAAK,EAAEA;IAAM,CAAE,CAAC,eAChFd,KAAA,CAAAsB,aAAA,CAACrB,yBAAyB;MACtBwB,OAAO,EAAEC,OAAO,CAACP,iBAAiB,KAAK,KAAK,CAAE;MAC9CQ,IAAI,EAAEN;IAAkB,CAC3B,CAAC,eACFrB,KAAA,CAAAsB,aAAA,CAACpB,iBAAiB;MAACyB,IAAI,EAAEX;IAAY,CAAE,CAC3B,CAAC;EAEzB;AACJ;AAEA,eAAeb,KAAK","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 RadioGroupRenderParams {
4
4
  onChange: (value: string | number) => () => void;
5
5
  getValue: (value: string | number) => string | number;
@@ -1 +1 @@
1
- {"version":3,"names":["React","DeprecatedRadioGroup","DeprecatedAdminRadioGroup","FormComponentDescription","FormComponentErrorMessage","FormComponentLabel","RadioGroup","Component","render","description","label","validation","value","onChange","props","isValid","validationIsValid","message","validationMessage","createElement","className","text","onValueChange","children","getValue","invalid"],"sources":["RadioGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormComponentProps } from \"~/types\";\nimport {\n DeprecatedRadioGroup as DeprecatedAdminRadioGroup,\n FormComponentDescription,\n FormComponentErrorMessage,\n FormComponentLabel\n} from \"@webiny/admin-ui\";\n\ninterface RadioGroupRenderParams {\n onChange: (value: string | number) => () => void;\n getValue: (value: string | number) => string | number;\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 Radio components.\n children: (props: RadioGroupRenderParams) => React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `RadioGroup` component props from the `@webiny/admin-ui` package instead.\n */\nclass RadioGroup extends React.Component<Props> {\n public override render() {\n const { description, label, validation, value, onChange } = this.props;\n\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n\n return (\n <div className={\"w-full\"}>\n <FormComponentLabel text={label} />\n <FormComponentDescription text={description} />\n <DeprecatedAdminRadioGroup value={value} onValueChange={onChange}>\n {this.props.children({\n onChange: value => () => this.props.onChange && this.props.onChange(value),\n getValue: value => value\n })}\n </DeprecatedAdminRadioGroup>\n <FormComponentErrorMessage\n text={validationMessage}\n invalid={validationIsValid === false}\n />\n </div>\n );\n }\n}\n\nexport default RadioGroup;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SACIC,oBAAoB,IAAIC,yBAAyB,EACjDC,wBAAwB,EACxBC,yBAAyB,EACzBC,kBAAkB,QACf,kBAAkB;AAkBzB;AACA;AACA;AACA;AACA,MAAMC,UAAU,SAASN,KAAK,CAACO,SAAS,CAAQ;EAC5BC,MAAMA,CAAA,EAAG;IACrB,MAAM;MAAEC,WAAW;MAAEC,KAAK;MAAEC,UAAU;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACC,KAAK;IAEtE,MAAM;MAAEC,OAAO,EAAEC,iBAAiB;MAAEC,OAAO,EAAEC;IAAkB,CAAC,GAAGP,UAAU,IAAI,CAAC,CAAC;IAEnF,oBACIX,KAAA,CAAAmB,aAAA;MAAKC,SAAS,EAAE;IAAS,gBACrBpB,KAAA,CAAAmB,aAAA,CAACd,kBAAkB;MAACgB,IAAI,EAAEX;IAAM,CAAE,CAAC,eACnCV,KAAA,CAAAmB,aAAA,CAAChB,wBAAwB;MAACkB,IAAI,EAAEZ;IAAY,CAAE,CAAC,eAC/CT,KAAA,CAAAmB,aAAA,CAACjB,yBAAyB;MAACU,KAAK,EAAEA,KAAM;MAACU,aAAa,EAAET;IAAS,GAC5D,IAAI,CAACC,KAAK,CAACS,QAAQ,CAAC;MACjBV,QAAQ,EAAED,KAAK,IAAI,MAAM,IAAI,CAACE,KAAK,CAACD,QAAQ,IAAI,IAAI,CAACC,KAAK,CAACD,QAAQ,CAACD,KAAK,CAAC;MAC1EY,QAAQ,EAAEZ,KAAK,IAAIA;IACvB,CAAC,CACsB,CAAC,eAC5BZ,KAAA,CAAAmB,aAAA,CAACf,yBAAyB;MACtBiB,IAAI,EAAEH,iBAAkB;MACxBO,OAAO,EAAET,iBAAiB,KAAK;IAAM,CACxC,CACA,CAAC;EAEd;AACJ;AAEA,eAAeV,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["React","DeprecatedRadioGroup","DeprecatedAdminRadioGroup","FormComponentDescription","FormComponentErrorMessage","FormComponentLabel","RadioGroup","Component","render","description","label","validation","value","onChange","props","isValid","validationIsValid","message","validationMessage","createElement","className","text","onValueChange","children","getValue","invalid"],"sources":["RadioGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FormComponentProps } from \"~/types\";\nimport {\n DeprecatedRadioGroup as DeprecatedAdminRadioGroup,\n FormComponentDescription,\n FormComponentErrorMessage,\n FormComponentLabel\n} from \"@webiny/admin-ui\";\n\ninterface RadioGroupRenderParams {\n onChange: (value: string | number) => () => void;\n getValue: (value: string | number) => string | number;\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 Radio components.\n children: (props: RadioGroupRenderParams) => React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `RadioGroup` component props from the `@webiny/admin-ui` package instead.\n */\nclass RadioGroup extends React.Component<Props> {\n public override render() {\n const { description, label, validation, value, onChange } = this.props;\n\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n\n return (\n <div className={\"w-full\"}>\n <FormComponentLabel text={label} />\n <FormComponentDescription text={description} />\n <DeprecatedAdminRadioGroup value={value} onValueChange={onChange}>\n {this.props.children({\n onChange: value => () => this.props.onChange && this.props.onChange(value),\n getValue: value => value\n })}\n </DeprecatedAdminRadioGroup>\n <FormComponentErrorMessage\n text={validationMessage}\n invalid={validationIsValid === false}\n />\n </div>\n );\n }\n}\n\nexport default RadioGroup;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SACIC,oBAAoB,IAAIC,yBAAyB,EACjDC,wBAAwB,EACxBC,yBAAyB,EACzBC,kBAAkB,QACf,kBAAkB;AAkBzB;AACA;AACA;AACA;AACA,MAAMC,UAAU,SAASN,KAAK,CAACO,SAAS,CAAQ;EAC5BC,MAAMA,CAAA,EAAG;IACrB,MAAM;MAAEC,WAAW;MAAEC,KAAK;MAAEC,UAAU;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACC,KAAK;IAEtE,MAAM;MAAEC,OAAO,EAAEC,iBAAiB;MAAEC,OAAO,EAAEC;IAAkB,CAAC,GAAGP,UAAU,IAAI,CAAC,CAAC;IAEnF,oBACIX,KAAA,CAAAmB,aAAA;MAAKC,SAAS,EAAE;IAAS,gBACrBpB,KAAA,CAAAmB,aAAA,CAACd,kBAAkB;MAACgB,IAAI,EAAEX;IAAM,CAAE,CAAC,eACnCV,KAAA,CAAAmB,aAAA,CAAChB,wBAAwB;MAACkB,IAAI,EAAEZ;IAAY,CAAE,CAAC,eAC/CT,KAAA,CAAAmB,aAAA,CAACjB,yBAAyB;MAACU,KAAK,EAAEA,KAAM;MAACU,aAAa,EAAET;IAAS,GAC5D,IAAI,CAACC,KAAK,CAACS,QAAQ,CAAC;MACjBV,QAAQ,EAAED,KAAK,IAAI,MAAM,IAAI,CAACE,KAAK,CAACD,QAAQ,IAAI,IAAI,CAACC,KAAK,CAACD,QAAQ,CAACD,KAAK,CAAC;MAC1EY,QAAQ,EAAEZ,KAAK,IAAIA;IACvB,CAAC,CACsB,CAAC,eAC5BZ,KAAA,CAAAmB,aAAA,CAACf,yBAAyB;MACtBiB,IAAI,EAAEH,iBAAkB;MACxBO,OAAO,EAAET,iBAAiB,KAAK;IAAM,CACxC,CACA,CAAC;EAEd;AACJ;AAEA,eAAeV,UAAU","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { type RichTextEditorProps as AdminRichTextEditorProps, type RichTextEditorValue, type OnReadyParams } from "@webiny/admin-ui";
3
- import { FormComponentProps } from "../types";
3
+ import type { FormComponentProps } from "../types";
4
4
  type RichTextEditorProps = FormComponentProps & AdminRichTextEditorProps & {
5
5
  readOnly?: boolean;
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"names":["React","RichTextEditor","AdminRichTextEditor","readOnly","props","createElement","Object","assign","disabled"],"sources":["RichTextEditor.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n RichTextEditor as AdminRichTextEditor,\n type RichTextEditorProps as AdminRichTextEditorProps,\n type RichTextEditorValue,\n type OnReadyParams\n} from \"@webiny/admin-ui\";\nimport { FormComponentProps } from \"~/types\";\n\ntype RichTextEditorProps = FormComponentProps &\n AdminRichTextEditorProps & {\n readOnly?: boolean;\n };\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `RichTextEditor` component props from the `@webiny/admin-ui` package instead.\n */\nconst RichTextEditor = ({ readOnly, ...props }: RichTextEditorProps) => {\n return <AdminRichTextEditor disabled={readOnly} {...props} />;\n};\n\nexport { RichTextEditor, type RichTextEditorProps, type RichTextEditorValue, type OnReadyParams };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACIC,cAAc,IAAIC,mBAAmB,QAIlC,kBAAkB;AAQzB;AACA;AACA;AACA;AACA,MAAMD,cAAc,GAAGA,CAAC;EAAEE,QAAQ;EAAE,GAAGC;AAA2B,CAAC,KAAK;EACpE,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,mBAAmB,EAAAI,MAAA,CAAAC,MAAA;IAACC,QAAQ,EAAEL;EAAS,GAAKC,KAAK,CAAG,CAAC;AACjE,CAAC;AAED,SAASH,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["React","RichTextEditor","AdminRichTextEditor","readOnly","props","createElement","Object","assign","disabled"],"sources":["RichTextEditor.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n RichTextEditor as AdminRichTextEditor,\n type RichTextEditorProps as AdminRichTextEditorProps,\n type RichTextEditorValue,\n type OnReadyParams\n} from \"@webiny/admin-ui\";\nimport type { FormComponentProps } from \"~/types\";\n\ntype RichTextEditorProps = FormComponentProps &\n AdminRichTextEditorProps & {\n readOnly?: boolean;\n };\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please find out the new `RichTextEditor` component props from the `@webiny/admin-ui` package instead.\n */\nconst RichTextEditor = ({ readOnly, ...props }: RichTextEditorProps) => {\n return <AdminRichTextEditor disabled={readOnly} {...props} />;\n};\n\nexport { RichTextEditor, type RichTextEditorProps, type RichTextEditorValue, type OnReadyParams };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACIC,cAAc,IAAIC,mBAAmB,QAIlC,kBAAkB;AAQzB;AACA;AACA;AACA;AACA,MAAMD,cAAc,GAAGA,CAAC;EAAEE,QAAQ;EAAE,GAAGC;AAA2B,CAAC,KAAK;EACpE,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,mBAAmB,EAAAI,MAAA,CAAAC,MAAA;IAACC,QAAQ,EAAEL;EAAS,GAAKC,KAAK,CAAG,CAAC;AACjE,CAAC;AAED,SAASH,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
  export interface FormattedOption extends Omit<React.AllHTMLAttributes<any>, "label"> {
4
4
  label: React.ReactNode;
5
5
  value?: string;
package/Select/Select.js CHANGED
@@ -122,7 +122,8 @@ export const Select = props => {
122
122
  label: label,
123
123
  placeholder: placeholder,
124
124
  size: size,
125
- onChange: value => props?.onChange?.(value)
125
+ onChange: value => props?.onChange?.(value),
126
+ displayResetAction: false
126
127
  }));
127
128
  };
128
129
  export default Select;
@@ -1 +1 @@
1
- {"version":3,"names":["React","useMemo","Select","AdminSelect","getOptions","initialOptions","Array","isArray","options","option","push","label","value","String","Object","keys","map","key","getChildrenOptions","children","Children","toArray","filter","child","isValidElement","type","element","props","toString","Boolean","skipProps","getRmwcProps","newProps","name","includes","forEach","initialValue","other","undefined","childrenOptions","placeholder","size","placeholderText","trim","createElement","assign","onChange"],"sources":["Select.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { FormComponentProps } from \"~/types\";\nimport { Select as AdminSelect } from \"@webiny/admin-ui\";\nimport { SelectOptionDto } from \"@webiny/admin-ui\";\n\nexport interface FormattedOption extends Omit<React.AllHTMLAttributes<any>, \"label\"> {\n label: React.ReactNode;\n value?: string;\n options?: FormattedOption[];\n}\n\nexport interface RmwcSelectProps {\n /** The value for a controlled select. */\n value?: string;\n /** Adds help text to the field */\n helpText?: React.ReactNode;\n /** Options accepts flat arrays, value => label maps, and more. See examples for details. */\n options?:\n | FormattedOption[]\n | string[]\n | {\n [value: string]: string;\n };\n /** A label for the form control. */\n label?: string;\n /** Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label. */\n placeholder?: string;\n /** Makes the select outlined. */\n outlined?: boolean;\n /** Makes the Select visually invalid. This is sometimes automatically my material-components-web. */\n invalid?: boolean;\n /** Makes the Select disabled. */\n disabled?: boolean;\n /** Makes the Select required. */\n required?: boolean;\n /** Props for the root element. By default, additional props spread to the native select element. */\n // rootProps?: Object;\n /** A reference to the native select element. Not applicable when `enhanced` is true. */\n inputRef?: (ref: HTMLSelectElement | null) => void;\n /** Add a leading icon. */\n icon?: React.ReactNode;\n /** Advanced: A reference to the MDCFoundation. */\n foundationRef?: any;\n}\n\nexport type SelectProps = FormComponentProps &\n RmwcSelectProps & {\n // Component label.\n label?: string;\n\n // Is checkbox disabled?\n disabled?: boolean;\n\n // Description beneath the select.\n description?: string;\n\n // Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label.\n placeholder?: string;\n\n // Makes the Select have a visual box.\n box?: string;\n\n // One or more <option> or <optgroup> elements.\n children?: (React.ReactElement<\"option\"> | React.ReactElement<\"optgroup\">)[];\n\n // IconProps for the root element. By default, additional props spread to the native select element.\n rootProps?: {\n [key: string]: any;\n };\n\n // A className for the root element.\n className?: string;\n\n // Size - small, medium or large\n size?: \"small\" | \"medium\" | \"large\";\n };\n\n/**\n * TODO verify that this is correct method get all options.\n */\nconst getOptions = (initialOptions: SelectProps[\"options\"]): SelectOptionDto[] => {\n if (!initialOptions) {\n return [];\n } else if (Array.isArray(initialOptions)) {\n const options: SelectOptionDto[] = [];\n for (const option of initialOptions) {\n if (typeof option === \"string\") {\n options.push({\n label: option,\n value: option\n });\n continue;\n }\n options.push({\n label: String(option.label),\n value: option.value,\n options: getOptions(option.options)\n });\n }\n return options;\n }\n return Object.keys(initialOptions).map(key => {\n return {\n label: initialOptions[key],\n value: key\n };\n });\n};\n\n/**\n * Select component lets users to manually build the option list.\n */\nfunction getChildrenOptions(children: React.ReactNode): SelectOptionDto[] {\n return React.Children.toArray(children)\n .filter(\n child =>\n React.isValidElement(child) &&\n (child.type === \"option\" || child.type === \"optgroup\")\n )\n .map(child => {\n const element = child as React.ReactElement<{\n value?: string;\n label?: string;\n children?: React.ReactNode;\n }>;\n\n if (React.isValidElement(child) && child.type === \"option\") {\n return {\n value: element.props.value || \"\",\n label: element.props.children?.toString() || \"\"\n };\n }\n\n if (React.isValidElement(child) && child.type === \"optgroup\") {\n return {\n label: element.props.label || \"\",\n options: getChildrenOptions(element.props.children)\n };\n }\n\n return null; // This shouldn't be reached\n })\n .filter(Boolean) as SelectOptionDto[];\n}\n\n/**\n * Select component lets users choose a value from given set of options.\n */\nconst skipProps = [\"validate\", \"form\"];\n\nconst getRmwcProps = (props: SelectProps): FormComponentProps & RmwcSelectProps => {\n const newProps: FormComponentProps & RmwcSelectProps = {};\n Object.keys(props)\n .filter(name => !skipProps.includes(name))\n // @ts-expect-error\n .forEach((name: any) => (newProps[name] = props[name]));\n\n return newProps;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Select` component from the `@webiny/admin-ui` package instead.\n */\nexport const Select = (props: SelectProps) => {\n const { value: initialValue, ...other } = props;\n const value = initialValue === null || initialValue === undefined ? \"\" : initialValue;\n\n const options = getOptions(other.options);\n const childrenOptions = getChildrenOptions(props.children);\n\n // Memoize the label and placeholder values based on the component size.\n const { label, placeholder } = useMemo(() => {\n const { size, label, placeholder: placeholderText } = props;\n\n // If `placeholderText` is null, undefined, or an empty string after trimming, `placeholder` will be set to `undefined`.\n const placeholder = placeholderText?.trim() || undefined;\n\n // For small or medium size, we set only the placeholder, using label as fallback.\n if (size === \"small\" || size === \"medium\") {\n return {\n label: undefined,\n placeholder: placeholder || label\n };\n }\n\n // For other sizes, use the provided label and placeholder.\n return {\n label,\n placeholder\n };\n }, [props.label, props.placeholder, props.size]);\n\n const size = useMemo(() => {\n if (props.size === \"medium\") {\n return \"md\";\n }\n\n if (props.size === \"large\") {\n return \"lg\";\n }\n\n return \"lg\";\n }, [props.size]);\n\n return (\n <AdminSelect\n {...getRmwcProps(other)}\n options={[...options, ...childrenOptions]}\n value={value}\n label={label}\n placeholder={placeholder}\n size={size}\n onChange={value => props?.onChange?.(value)}\n />\n );\n};\n\nexport default Select;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AAEtC,SAASC,MAAM,IAAIC,WAAW,QAAQ,kBAAkB;AA2ExD;AACA;AACA;AACA,MAAMC,UAAU,GAAIC,cAAsC,IAAwB;EAC9E,IAAI,CAACA,cAAc,EAAE;IACjB,OAAO,EAAE;EACb,CAAC,MAAM,IAAIC,KAAK,CAACC,OAAO,CAACF,cAAc,CAAC,EAAE;IACtC,MAAMG,OAA0B,GAAG,EAAE;IACrC,KAAK,MAAMC,MAAM,IAAIJ,cAAc,EAAE;MACjC,IAAI,OAAOI,MAAM,KAAK,QAAQ,EAAE;QAC5BD,OAAO,CAACE,IAAI,CAAC;UACTC,KAAK,EAAEF,MAAM;UACbG,KAAK,EAAEH;QACX,CAAC,CAAC;QACF;MACJ;MACAD,OAAO,CAACE,IAAI,CAAC;QACTC,KAAK,EAAEE,MAAM,CAACJ,MAAM,CAACE,KAAK,CAAC;QAC3BC,KAAK,EAAEH,MAAM,CAACG,KAAK;QACnBJ,OAAO,EAAEJ,UAAU,CAACK,MAAM,CAACD,OAAO;MACtC,CAAC,CAAC;IACN;IACA,OAAOA,OAAO;EAClB;EACA,OAAOM,MAAM,CAACC,IAAI,CAACV,cAAc,CAAC,CAACW,GAAG,CAACC,GAAG,IAAI;IAC1C,OAAO;MACHN,KAAK,EAAEN,cAAc,CAACY,GAAG,CAAC;MAC1BL,KAAK,EAAEK;IACX,CAAC;EACL,CAAC,CAAC;AACN,CAAC;;AAED;AACA;AACA;AACA,SAASC,kBAAkBA,CAACC,QAAyB,EAAqB;EACtE,OAAOnB,KAAK,CAACoB,QAAQ,CAACC,OAAO,CAACF,QAAQ,CAAC,CAClCG,MAAM,CACHC,KAAK,IACD,aAAAvB,KAAK,CAACwB,cAAc,CAACD,KAAK,CAAC,KAC1BA,KAAK,CAACE,IAAI,KAAK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AC;IACvB7B,OAAO,EAAE,CAAC,GAAGA,OAAO,EAAE,GAAG+B,eAAe,CAAE;IAC1C3B,KAAK,EAAEA,KAAM;IACbD,KAAK,EAAEA,KAAM;IACb6B,WAAW,EAAEA,WAAY;IACzBC,IAAI,EAAEA,IAAK;IACXK,QAAQ,EAAElC,KAAK,IAAIe,KAAK,EAAEmB,QAAQ,GAAGlC,KAAK;EAAE,EAC/C,CAAC;AAEV,CAAC;AAED,eAAeV,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["React","useMemo","Select","AdminSelect","getOptions","initialOptions","Array","isArray","options","option","push","label","value","String","Object","keys","map","key","getChildrenOptions","children","Children","toArray","filter","child","isValidElement","type","element","props","toString","Boolean","skipProps","getRmwcProps","newProps","name","includes","forEach","initialValue","other","undefined","childrenOptions","placeholder","size","placeholderText","trim","createElement","assign","onChange","displayResetAction"],"sources":["Select.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport type { FormComponentProps } from \"~/types\";\nimport { Select as AdminSelect } from \"@webiny/admin-ui\";\nimport type { SelectOptionDto } from \"@webiny/admin-ui\";\n\nexport interface FormattedOption extends Omit<React.AllHTMLAttributes<any>, \"label\"> {\n label: React.ReactNode;\n value?: string;\n options?: FormattedOption[];\n}\n\nexport interface RmwcSelectProps {\n /** The value for a controlled select. */\n value?: string;\n /** Adds help text to the field */\n helpText?: React.ReactNode;\n /** Options accepts flat arrays, value => label maps, and more. See examples for details. */\n options?:\n | FormattedOption[]\n | string[]\n | {\n [value: string]: string;\n };\n /** A label for the form control. */\n label?: string;\n /** Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label. */\n placeholder?: string;\n /** Makes the select outlined. */\n outlined?: boolean;\n /** Makes the Select visually invalid. This is sometimes automatically my material-components-web. */\n invalid?: boolean;\n /** Makes the Select disabled. */\n disabled?: boolean;\n /** Makes the Select required. */\n required?: boolean;\n /** Props for the root element. By default, additional props spread to the native select element. */\n // rootProps?: Object;\n /** A reference to the native select element. Not applicable when `enhanced` is true. */\n inputRef?: (ref: HTMLSelectElement | null) => void;\n /** Add a leading icon. */\n icon?: React.ReactNode;\n /** Advanced: A reference to the MDCFoundation. */\n foundationRef?: any;\n}\n\nexport type SelectProps = FormComponentProps &\n RmwcSelectProps & {\n // Component label.\n label?: string;\n\n // Is checkbox disabled?\n disabled?: boolean;\n\n // Description beneath the select.\n description?: string;\n\n // Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label.\n placeholder?: string;\n\n // Makes the Select have a visual box.\n box?: string;\n\n // One or more <option> or <optgroup> elements.\n children?: (React.ReactElement<\"option\"> | React.ReactElement<\"optgroup\">)[];\n\n // IconProps for the root element. By default, additional props spread to the native select element.\n rootProps?: {\n [key: string]: any;\n };\n\n // A className for the root element.\n className?: string;\n\n // Size - small, medium or large\n size?: \"small\" | \"medium\" | \"large\";\n };\n\n/**\n * TODO verify that this is correct method get all options.\n */\nconst getOptions = (initialOptions: SelectProps[\"options\"]): SelectOptionDto[] => {\n if (!initialOptions) {\n return [];\n } else if (Array.isArray(initialOptions)) {\n const options: SelectOptionDto[] = [];\n for (const option of initialOptions) {\n if (typeof option === \"string\") {\n options.push({\n label: option,\n value: option\n });\n continue;\n }\n options.push({\n label: String(option.label),\n value: option.value,\n options: getOptions(option.options)\n });\n }\n return options;\n }\n return Object.keys(initialOptions).map(key => {\n return {\n label: initialOptions[key],\n value: key\n };\n });\n};\n\n/**\n * Select component lets users to manually build the option list.\n */\nfunction getChildrenOptions(children: React.ReactNode): SelectOptionDto[] {\n return React.Children.toArray(children)\n .filter(\n child =>\n React.isValidElement(child) &&\n (child.type === \"option\" || child.type === \"optgroup\")\n )\n .map(child => {\n const element = child as React.ReactElement<{\n value?: string;\n label?: string;\n children?: React.ReactNode;\n }>;\n\n if (React.isValidElement(child) && child.type === \"option\") {\n return {\n value: element.props.value || \"\",\n label: element.props.children?.toString() || \"\"\n };\n }\n\n if (React.isValidElement(child) && child.type === \"optgroup\") {\n return {\n label: element.props.label || \"\",\n options: getChildrenOptions(element.props.children)\n };\n }\n\n return null; // This shouldn't be reached\n })\n .filter(Boolean) as SelectOptionDto[];\n}\n\n/**\n * Select component lets users choose a value from given set of options.\n */\nconst skipProps = [\"validate\", \"form\"];\n\nconst getRmwcProps = (props: SelectProps): FormComponentProps & RmwcSelectProps => {\n const newProps: FormComponentProps & RmwcSelectProps = {};\n Object.keys(props)\n .filter(name => !skipProps.includes(name))\n // @ts-expect-error\n .forEach((name: any) => (newProps[name] = props[name]));\n\n return newProps;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Select` component from the `@webiny/admin-ui` package instead.\n */\nexport const Select = (props: SelectProps) => {\n const { value: initialValue, ...other } = props;\n const value = initialValue === null || initialValue === undefined ? \"\" : initialValue;\n\n const options = getOptions(other.options);\n const childrenOptions = getChildrenOptions(props.children);\n\n // Memoize the label and placeholder values based on the component size.\n const { label, placeholder } = useMemo(() => {\n const { size, label, placeholder: placeholderText } = props;\n\n // If `placeholderText` is null, undefined, or an empty string after trimming, `placeholder` will be set to `undefined`.\n const placeholder = placeholderText?.trim() || undefined;\n\n // For small or medium size, we set only the placeholder, using label as fallback.\n if (size === \"small\" || size === \"medium\") {\n return {\n label: undefined,\n placeholder: placeholder || label\n };\n }\n\n // For other sizes, use the provided label and placeholder.\n return {\n label,\n placeholder\n };\n }, [props.label, props.placeholder, props.size]);\n\n const size = useMemo(() => {\n if (props.size === \"medium\") {\n return \"md\";\n }\n\n if (props.size === \"large\") {\n return \"lg\";\n }\n\n return \"lg\";\n }, [props.size]);\n\n return (\n <AdminSelect\n {...getRmwcProps(other)}\n options={[...options, ...childrenOptions]}\n value={value}\n label={label}\n placeholder={placeholder}\n size={size}\n onChange={value => props?.onChange?.(value)}\n displayResetAction={false}\n />\n );\n};\n\nexport default Select;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AAEtC,SAASC,MAAM,IAAIC,WAAW,QAAQ,kBAAkB;AA2ExD;AACA;AAC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,KAAK,IAAIe,KAAK,EAAEmB,QAAQ,GAAGlC,KAAK,CAAE;IAC5CmC,kBAAkB,EAAE;EAAM,EAC7B,CAAC;AAEV,CAAC;AAED,eAAe7C,MAAM","ignoreList":[]}
@@ -1,5 +1,6 @@
1
- import React, { CSSProperties, PropsWithChildren } from "react";
2
- import { SkeletonProps as AdminSkeletonProps } from "@webiny/admin-ui";
1
+ import type { CSSProperties, PropsWithChildren } from "react";
2
+ import React from "react";
3
+ import type { SkeletonProps as AdminSkeletonProps } from "@webiny/admin-ui";
3
4
  export interface SkeletonProps extends AdminSkeletonProps {
4
5
  baseColor?: string;
5
6
  highlightColor?: string;
@@ -1 +1 @@
1
- {"version":3,"names":["React","Skeleton","AdminSkeleton","className","type","size","createElement"],"sources":["Skeleton.tsx"],"sourcesContent":["import React, { CSSProperties, PropsWithChildren } from \"react\";\nimport { Skeleton as AdminSkeleton, SkeletonProps as AdminSkeletonProps } from \"@webiny/admin-ui\";\n\nexport interface SkeletonProps extends AdminSkeletonProps {\n //SkeletonStyleProps from \"react-loading-skeleton\"\n baseColor?: string;\n highlightColor?: string;\n width?: string | number;\n height?: string | number;\n borderRadius?: string | number;\n inline?: boolean;\n duration?: number;\n direction?: \"ltr\" | \"rtl\";\n enableAnimation?: boolean;\n // SkeletonProps from \"react-loading-skeleton\"\n count?: number;\n wrapper?: React.FunctionComponent<PropsWithChildren<unknown>>;\n className?: string;\n containerClassName?: string;\n containerTestId?: string;\n circle?: boolean;\n style?: CSSProperties;\n // Custom props\n theme?: \"dark\" | \"light\";\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Skeleton` component from the `@webiny/admin-ui` package instead.\n */\nexport const Skeleton = ({ className, type, size }: SkeletonProps) => {\n return <AdminSkeleton className={className} type={type} size={size} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAA4C,OAAO;AAC/D,SAASC,QAAQ,IAAIC,aAAa,QAA6C,kBAAkB;AAyBjG;AACA;AACA;AACA;AACA,OAAO,MAAMD,QAAQ,GAAGA,CAAC;EAAEE,SAAS;EAAEC,IAAI;EAAEC;AAAoB,CAAC,KAAK;EAClE,oBAAOL,KAAA,CAAAM,aAAA,CAACJ,aAAa;IAACC,SAAS,EAAEA,SAAU;IAACC,IAAI,EAAEA,IAAK;IAACC,IAAI,EAAEA;EAAK,CAAE,CAAC;AAC1E,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Skeleton","AdminSkeleton","className","type","size","createElement"],"sources":["Skeleton.tsx"],"sourcesContent":["import type { CSSProperties, PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport type { SkeletonProps as AdminSkeletonProps } from \"@webiny/admin-ui\";\nimport { Skeleton as AdminSkeleton } from \"@webiny/admin-ui\";\n\nexport interface SkeletonProps extends AdminSkeletonProps {\n //SkeletonStyleProps from \"react-loading-skeleton\"\n baseColor?: string;\n highlightColor?: string;\n width?: string | number;\n height?: string | number;\n borderRadius?: string | number;\n inline?: boolean;\n duration?: number;\n direction?: \"ltr\" | \"rtl\";\n enableAnimation?: boolean;\n // SkeletonProps from \"react-loading-skeleton\"\n count?: number;\n wrapper?: React.FunctionComponent<PropsWithChildren<unknown>>;\n className?: string;\n containerClassName?: string;\n containerTestId?: string;\n circle?: boolean;\n style?: CSSProperties;\n // Custom props\n theme?: \"dark\" | \"light\";\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Skeleton` component from the `@webiny/admin-ui` package instead.\n */\nexport const Skeleton = ({ className, type, size }: SkeletonProps) => {\n return <AdminSkeleton className={className} type={type} size={size} />;\n};\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,QAAQ,IAAIC,aAAa,QAAQ,kBAAkB;AAyB5D;AACA;AACA;AACA;AACA,OAAO,MAAMD,QAAQ,GAAGA,CAAC;EAAEE,SAAS;EAAEC,IAAI;EAAEC;AAAoB,CAAC,KAAK;EAClE,oBAAOL,KAAA,CAAAM,aAAA,CAACJ,aAAa;IAACC,SAAS,EAAEA,SAAU;IAACC,IAAI,EAAEA,IAAK;IAACC,IAAI,EAAEA;EAAK,CAAE,CAAC;AAC1E,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
  type Props = FormComponentProps & {
4
4
  label?: string;
5
5
  disabled?: boolean;
@@ -1 +1 @@
1
- {"version":3,"names":["React","omit","Slider","AdminSlider","Component","onValueCommit","value","props","onChange","onValueChange","onInput","toFloat","defaultValue","result","parseFloat","toString","isNaN","render","label","description","validation","sliderValue","min","createElement","Object","assign","max","step","showTooltip","discrete","note"],"sources":["Slider.tsx"],"sourcesContent":["import React from \"react\";\nimport omit from \"lodash/omit\";\nimport { Slider as AdminSlider } from \"@webiny/admin-ui\";\nimport { FormComponentProps } from \"~/types\";\n\ntype Props = FormComponentProps & {\n // Component label.\n label?: string;\n\n // Is checkbox disabled?\n disabled?: boolean;\n\n // Description beneath the slider.\n description?: string;\n\n // The minimum value of the Slider.\n min?: number | string;\n\n // The maximum value of the Slider.\n max?: number | string;\n\n // A step to quantize values by.\n step?: number | string;\n\n // Displays the exact value of the Slider on the knob.\n discrete?: boolean;\n\n // Displays the individual step markers on the Slider track.\n displayMarkers?: boolean;\n\n // Function that gets triggered on each input.\n onInput?: (value: any) => void;\n\n readOnly?: boolean;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Slider` component from the `@webiny/admin-ui` package instead.\n */\nclass Slider extends React.Component<Props> {\n onValueCommit = (value: number) => {\n this.props.onChange && this.props.onChange(value);\n };\n\n onValueChange = (value: number) => {\n this.props.onInput && this.props.onInput(value);\n };\n\n toFloat = (value: number | string | undefined, defaultValue = 0): number => {\n if (!value) {\n return defaultValue;\n }\n\n // Convert the value to a string before passing it to parseFloat\n const result = parseFloat(value.toString());\n\n // Check if the result is a valid number\n return isNaN(result) ? defaultValue : result;\n };\n\n public override render() {\n const { value, label, description, validation } = this.props;\n\n let sliderValue = value;\n if (value === null || typeof value === \"undefined\") {\n sliderValue = this.props.min || 0;\n }\n\n return (\n <AdminSlider\n {...omit(this.props, [\"displayMarkers\", \"discrete\", \"onInput\", \"onChange\"])}\n label={label}\n min={this.toFloat(this.props.min)}\n max={this.toFloat(this.props.max, 100)}\n step={this.toFloat(this.props.step, 1)}\n value={sliderValue}\n onValueCommit={this.onValueCommit}\n onValueChange={this.onValueChange}\n showTooltip={this.props.discrete}\n validation={validation}\n note={description}\n />\n );\n }\n}\n\nexport default Slider;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,IAAI,MAAM,aAAa;AAC9B,SAASC,MAAM,IAAIC,WAAW,QAAQ,kBAAkB;AAkCxD;AACA;AACA;AACA;AACA,MAAMD,MAAM,SAASF,KAAK,CAACI,SAAS,CAAQ;EACxCC,aAAa,GAAIC,KAAa,IAAK;IAC/B,IAAI,CAACC,KAAK,CAACC,QAAQ,IAAI,IAAI,CAACD,KAAK,CAACC,QAAQ,CAACF,KAAK,CAAC;EACrD,CAAC;EAEDG,aAAa,GAAIH,KAAa,IAAK;IAC/B,IAAI,CAACC,KAAK,CAACG,OAAO,IAAI,IAAI,CAACH,KAAK,CAACG,OAAO,CAACJ,KAAK,CAAC;EACnD,CAAC;EAEDK,OAAO,GAAGA,CAACL,KAAkC,EAAEM,YAAY,GAAG,CAAC,KAAa;IACxE,IAAI,CAACN,KAAK,EAAE;MACR,OAAOM,YAAY;IACvB;;IAEA;IACA,MAAMC,MAAM,GAAGC,UAAU,CAACR,KAAK,CAACS,QAAQ,CAAC,CAAC,CAAC;;IAE3C;IACA,OAAOC,KAAK,CAACH,MAAM,CAAC,GAAGD,YAAY,GAAGC,MAAM;EAChD,CAAC;EAEeI,MAAMA,CAAA,EAAG;IACrB,MAAM;MAAEX,KAAK;MAAEY,KAAK;MAAEC,WAAW;MAAEC;IAAW,CAAC,GAAG,IAAI,CAACb,KAAK;IAE5D,IAAIc,WAAW,GAAGf,KAAK;IACvB,IAAIA,KAAK,KAAK,IAAI,IAAI,OAAOA,KAAK,KAAK,WAAW,EAAE;MAChDe,WAAW,GAAG,IAAI,CAACd,KAAK,CAACe,GAAG,IAAI,CAAC;IACrC;IAEA,oBACItB,KAAA,CAAAuB,aAAA,CAACpB,WAAW,EAAAqB,MAAA,CAAAC,MAAA,KACJxB,IAAI,CAAC,IAAI,CAACM,KAAK,EAAE,CAAC,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;MAC3EW,KAAK,EAAEA,KAAM;MACbI,GAAG,EAAE,IAAI,CAACX,OAAO,CAAC,IAAI,CAACJ,KAAK,CAACe,GAAG,CAAE;MAClCI,GAAG,EAAE,IAAI,CAACf,OAAO,CAAC,IAAI,CAACJ,KAAK,CAACmB,GAAG,EAAE,GAAG,CAAE;MACvCC,IAAI,EAAE,IAAI,CAAChB,OAAO,CAAC,IAAI,CAACJ,KAAK,CAACoB,IAAI,EAAE,CAAC,CAAE;MACvCrB,KAAK,EAAEe,WAAY;MACnBhB,aAAa,EAAE,IAAI,CAACA,aAAc;MAClCI,aAAa,EAAE,IAAI,CAACA,aAAc;MAClCmB,WAAW,EAAE,IAAI,CAACrB,KAAK,CAACsB,QAAS;MACjCT,UAAU,EAAEA,UAAW;MACvBU,IAAI,EAAEX;IAAY,EACrB,CAAC;EAEV;AACJ;AAEA,eAAejB,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["React","omit","Slider","AdminSlider","Component","onValueCommit","value","props","onChange","onValueChange","onInput","toFloat","defaultValue","result","parseFloat","toString","isNaN","render","label","description","validation","sliderValue","min","createElement","Object","assign","max","step","showTooltip","discrete","note"],"sources":["Slider.tsx"],"sourcesContent":["import React from \"react\";\nimport omit from \"lodash/omit\";\nimport { Slider as AdminSlider } from \"@webiny/admin-ui\";\nimport type { FormComponentProps } from \"~/types\";\n\ntype Props = FormComponentProps & {\n // Component label.\n label?: string;\n\n // Is checkbox disabled?\n disabled?: boolean;\n\n // Description beneath the slider.\n description?: string;\n\n // The minimum value of the Slider.\n min?: number | string;\n\n // The maximum value of the Slider.\n max?: number | string;\n\n // A step to quantize values by.\n step?: number | string;\n\n // Displays the exact value of the Slider on the knob.\n discrete?: boolean;\n\n // Displays the individual step markers on the Slider track.\n displayMarkers?: boolean;\n\n // Function that gets triggered on each input.\n onInput?: (value: any) => void;\n\n readOnly?: boolean;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Slider` component from the `@webiny/admin-ui` package instead.\n */\nclass Slider extends React.Component<Props> {\n onValueCommit = (value: number) => {\n this.props.onChange && this.props.onChange(value);\n };\n\n onValueChange = (value: number) => {\n this.props.onInput && this.props.onInput(value);\n };\n\n toFloat = (value: number | string | undefined, defaultValue = 0): number => {\n if (!value) {\n return defaultValue;\n }\n\n // Convert the value to a string before passing it to parseFloat\n const result = parseFloat(value.toString());\n\n // Check if the result is a valid number\n return isNaN(result) ? defaultValue : result;\n };\n\n public override render() {\n const { value, label, description, validation } = this.props;\n\n let sliderValue = value;\n if (value === null || typeof value === \"undefined\") {\n sliderValue = this.props.min || 0;\n }\n\n return (\n <AdminSlider\n {...omit(this.props, [\"displayMarkers\", \"discrete\", \"onInput\", \"onChange\"])}\n label={label}\n min={this.toFloat(this.props.min)}\n max={this.toFloat(this.props.max, 100)}\n step={this.toFloat(this.props.step, 1)}\n value={sliderValue}\n onValueCommit={this.onValueCommit}\n onValueChange={this.onValueChange}\n showTooltip={this.props.discrete}\n validation={validation}\n note={description}\n />\n );\n }\n}\n\nexport default Slider;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,IAAI,MAAM,aAAa;AAC9B,SAASC,MAAM,IAAIC,WAAW,QAAQ,kBAAkB;AAkCxD;AACA;AACA;AACA;AACA,MAAMD,MAAM,SAASF,KAAK,CAACI,SAAS,CAAQ;EACxCC,aAAa,GAAIC,KAAa,IAAK;IAC/B,IAAI,CAACC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CAACJ,KAAK,CAACoB,IAAI,EAAE,CAAC,CAAE;MACvCrB,KAAK,EAAEe,WAAY;MACnBhB,aAAa,EAAE,IAAI,CAACA,aAAc;MAClCI,aAAa,EAAE,IAAI,CAACA,aAAc;MAClCmB,WAAW,EAAE,IAAI,CAACrB,KAAK,CAACsB,QAAS;MACjCT,UAAU,EAAEA,UAAW;MACvBU,IAAI,EAAEX;IAAY,EACrB,CAAC;EAEV;AACJ;AAEA,eAAejB,MAAM","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { ButtonProps } from "@webiny/admin-ui";
2
+ import type { ButtonProps } from "@webiny/admin-ui";
3
3
  type CustomEventT<T> = CustomEvent<T> & React.SyntheticEvent<EventTarget>;
4
4
  type SnackbarActionProps = ButtonProps & {
5
5
  /** Content specified as a label prop. */
@@ -1 +1 @@
1
- {"version":3,"names":["React","Button","Snackbar","message","console","warn","createElement","Fragment","SnackbarAction","label","action","onClick","variant","text"],"sources":["Snackbar.tsx"],"sourcesContent":["import React from \"react\";\nimport { Button, ButtonProps } from \"@webiny/admin-ui\";\n\ntype CustomEventT<T> = CustomEvent<T> & React.SyntheticEvent<EventTarget>;\n\ntype SnackbarActionProps = ButtonProps & {\n /** Content specified as a label prop. */\n label?: React.ReactNode | any;\n /** An action returned in evt.detail.reason to the onClose handler. */\n action?: string;\n};\n\ntype ToastActionWithDataActionProps = ButtonProps & {\n \"data-action\"?: string;\n};\n\ntype SnackbarProps = {\n open?: boolean;\n /** A callback thats fired when the Snackbar shows. */\n onOpen?: (evt: CustomEventT<any>) => void;\n /** A callback thats fired when the Snackbar hides. evt.detail = { reason?: string } */\n onClose?: (\n evt: CustomEventT<{\n reason?: string;\n }>\n ) => void;\n /** A string or other renderable JSX to be used as the message body. */\n message?: React.ReactNode;\n /** One or more actions to add to the snackbar. */\n action?:\n | React.ReactElement<ToastActionWithDataActionProps>\n | React.ReactElement<ToastActionWithDataActionProps>[];\n /** Milliseconds to show the Snackbar for. Set to -1 to show indefinitely. */\n timeout?: number;\n /** Places the action underneath the message text. */\n stacked?: boolean;\n leading?: boolean;\n dismissIcon?: boolean | React.ReactNode;\n /** Whether or not your want clicking an action to close the Snackbar. */\n dismissesOnAction?: boolean;\n /** An icon for the snackbar */\n icon?: React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `useToast` hook from the `@webiny/admin-ui` to show messages package instead.\n */\nconst Snackbar = ({ message }: SnackbarProps) => {\n console.warn(\n \"Snackbar component has been deprecated: use the `useToast` hook from the `@webiny/admin-ui` to show messages package instead.\"\n );\n return <>{message}</>;\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 */\nconst SnackbarAction = ({\n label,\n action,\n onClick\n}: SnackbarActionProps): React.ReactElement<ButtonProps & { \"data-action\"?: string }> => {\n return <Button variant={\"primary\"} onClick={onClick} data-action={action} text={label} />;\n};\n\nexport { Snackbar, SnackbarAction };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,QAAqB,kBAAkB;AA2CtD;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAGA,CAAC;EAAEC;AAAuB,CAAC,KAAK;EAC7CC,OAAO,CAACC,IAAI,CACR,+HACJ,CAAC;EACD,oBAAOL,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,OAAU,CAAC;AACzB,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMK,cAAc,GAAGA,CAAC;EACpBC,KAAK;EACLC,MAAM;EACNC;AACiB,CAAC,KAAmE;EACrF,oBAAOX,KAAA,CAAAM,aAAA,CAACL,MAAM;IAACW,OAAO,EAAE,SAAU;IAACD,OAAO,EAAEA,OAAQ;IAAC,eAAaD,MAAO;IAACG,IAAI,EAAEJ;EAAM,CAAE,CAAC;AAC7F,CAAC;AAED,SAASP,QAAQ,EAAEM,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["React","Button","Snackbar","message","console","warn","createElement","Fragment","SnackbarAction","label","action","onClick","variant","text"],"sources":["Snackbar.tsx"],"sourcesContent":["import React from \"react\";\nimport type { ButtonProps } from \"@webiny/admin-ui\";\nimport { Button } from \"@webiny/admin-ui\";\n\ntype CustomEventT<T> = CustomEvent<T> & React.SyntheticEvent<EventTarget>;\n\ntype SnackbarActionProps = ButtonProps & {\n /** Content specified as a label prop. */\n label?: React.ReactNode | any;\n /** An action returned in evt.detail.reason to the onClose handler. */\n action?: string;\n};\n\ntype ToastActionWithDataActionProps = ButtonProps & {\n \"data-action\"?: string;\n};\n\ntype SnackbarProps = {\n open?: boolean;\n /** A callback thats fired when the Snackbar shows. */\n onOpen?: (evt: CustomEventT<any>) => void;\n /** A callback thats fired when the Snackbar hides. evt.detail = { reason?: string } */\n onClose?: (\n evt: CustomEventT<{\n reason?: string;\n }>\n ) => void;\n /** A string or other renderable JSX to be used as the message body. */\n message?: React.ReactNode;\n /** One or more actions to add to the snackbar. */\n action?:\n | React.ReactElement<ToastActionWithDataActionProps>\n | React.ReactElement<ToastActionWithDataActionProps>[];\n /** Milliseconds to show the Snackbar for. Set to -1 to show indefinitely. */\n timeout?: number;\n /** Places the action underneath the message text. */\n stacked?: boolean;\n leading?: boolean;\n dismissIcon?: boolean | React.ReactNode;\n /** Whether or not your want clicking an action to close the Snackbar. */\n dismissesOnAction?: boolean;\n /** An icon for the snackbar */\n icon?: React.ReactNode;\n};\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `useToast` hook from the `@webiny/admin-ui` to show messages package instead.\n */\nconst Snackbar = ({ message }: SnackbarProps) => {\n console.warn(\n \"Snackbar component has been deprecated: use the `useToast` hook from the `@webiny/admin-ui` to show messages package instead.\"\n );\n return <>{message}</>;\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 */\nconst SnackbarAction = ({\n label,\n action,\n onClick\n}: SnackbarActionProps): React.ReactElement<ButtonProps & { \"data-action\"?: string }> => {\n return <Button variant={\"primary\"} onClick={onClick} data-action={action} text={label} />;\n};\n\nexport { Snackbar, SnackbarAction };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,MAAM,QAAQ,kBAAkB;AA2CzC;AACA;AACA;AACA;AACA,MAAMC,QAAQ,GAAGA,CAAC;EAAEC;AAAuB,CAAC,KAAK;EAC7CC,OAAO,CAACC,IAAI,CACR,+HACJ,CAAC;EACD,oBAAOL,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGJ,OAAU,CAAC;AACzB,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMK,cAAc,GAAGA,CAAC;EACpBC,KAAK;EACLC,MAAM;EACNC;AACiB,CAAC,KAAmE;EACrF,oBAAOX,KAAA,CAAAM,aAAA,CAACL,MAAM;IAACW,OAAO,EAAE,SAAU;IAACD,OAAO,EAAEA,OAAQ;IAAC,eAAaD,MAAO;IAACG,IAAI,EAAEJ;EAAM,CAAE,CAAC;AAC7F,CAAC;AAED,SAASP,QAAQ,EAAEM,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
  type SwitchProps = {
4
4
  /** A DOM ID for the toggle. */
5
5
  id?: string;
@@ -1 +1 @@
1
- {"version":3,"names":["React","Switch","AdminSwitch","Component","render","value","description","validation","label","disabled","props","createElement","note","className","checked","Boolean","String","onChange"],"sources":["Switch.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormComponentProps } from \"~/types\";\nimport { Switch as AdminSwitch } from \"@webiny/admin-ui\";\n\ntype SwitchProps = {\n /** A DOM ID for the toggle. */\n id?: string;\n /** Disables the control. */\n disabled?: boolean;\n /** Toggle the control on and off. */\n checked?: boolean;\n /** The value of the control. */\n value?: string | number | string[];\n /** A label for the control. */\n label?: React.ReactNode;\n /** By default, all props except className and style spread to the input. These are additional props for the root of the checkbox. */\n rootProps?: React.HTMLProps<any>;\n /** A reference to the native input. */\n inputRef?: React.Ref<HTMLInputElement>;\n};\n\ntype Props = Omit<SwitchProps, \"value\"> &\n FormComponentProps<boolean> & {\n // Description beneath the switch.\n description?: string;\n\n // Optional class name.\n className?: string;\n };\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Switch` component from the `@webiny/admin-ui` package instead.\n */\nclass Switch extends React.Component<Props> {\n public override render() {\n const { value, description, validation, label, disabled } = this.props;\n\n return (\n <AdminSwitch\n label={label}\n note={description}\n validation={validation}\n className={\"webiny-ui-switch\"}\n checked={Boolean(value)}\n value={String(value)}\n onChange={() => this.props.onChange && this.props.onChange(!value)}\n disabled={disabled}\n />\n );\n }\n}\n\nexport { Switch };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,MAAM,IAAIC,WAAW,QAAQ,kBAAkB;AA4BxD;AACA;AACA;AACA;AACA,MAAMD,MAAM,SAASD,KAAK,CAACG,SAAS,CAAQ;EACxBC,MAAMA,CAAA,EAAG;IACrB,MAAM;MAAEC,KAAK;MAAEC,WAAW;MAAEC,UAAU;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACC,KAAK;IAEtE,oBACIV,KAAA,CAAAW,aAAA,CAACT,WAAW;MACRM,KAAK,EAAEA,KAAM;MACbI,IAAI,EAAEN,WAAY;MAClBC,UAAU,EAAEA,UAAW;MACvBM,SAAS,EAAE,kBAAmB;MAC9BC,OAAO,EAAEC,OAAO,CAACV,KAAK,CAAE;MACxBA,KAAK,EAAEW,MAAM,CAACX,KAAK,CAAE;MACrBY,QAAQ,EAAEA,CAAA,KAAM,IAAI,CAACP,KAAK,CAACO,QAAQ,IAAI,IAAI,CAACP,KAAK,CAACO,QAAQ,CAAC,CAACZ,KAAK,CAAE;MACnEI,QAAQ,EAAEA;IAAS,CACtB,CAAC;EAEV;AACJ;AAEA,SAASR,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["React","Switch","AdminSwitch","Component","render","value","description","validation","label","disabled","props","createElement","note","className","checked","Boolean","String","onChange"],"sources":["Switch.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FormComponentProps } from \"~/types\";\nimport { Switch as AdminSwitch } from \"@webiny/admin-ui\";\n\ntype SwitchProps = {\n /** A DOM ID for the toggle. */\n id?: string;\n /** Disables the control. */\n disabled?: boolean;\n /** Toggle the control on and off. */\n checked?: boolean;\n /** The value of the control. */\n value?: string | number | string[];\n /** A label for the control. */\n label?: React.ReactNode;\n /** By default, all props except className and style spread to the input. These are additional props for the root of the checkbox. */\n rootProps?: React.HTMLProps<any>;\n /** A reference to the native input. */\n inputRef?: React.Ref<HTMLInputElement>;\n};\n\ntype Props = Omit<SwitchProps, \"value\"> &\n FormComponentProps<boolean> & {\n // Description beneath the switch.\n description?: string;\n\n // Optional class name.\n className?: string;\n };\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Switch` component from the `@webiny/admin-ui` package instead.\n */\nclass Switch extends React.Component<Props> {\n public override render() {\n const { value, description, validation, label, disabled } = this.props;\n\n return (\n <AdminSwitch\n label={label}\n note={description}\n validation={validation}\n className={\"webiny-ui-switch\"}\n checked={Boolean(value)}\n value={String(value)}\n onChange={() => this.props.onChange && this.props.onChange(!value)}\n disabled={disabled}\n />\n );\n }\n}\n\nexport { Switch };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,MAAM,IAAIC,WAAW,QAAQ,kBAAkB;AA4BxD;AACA;AACA;AACA;AACA,MAAMD,MAAM,SAASD,KAAK,CAACG,SAAS,CAAQ;EACxBC,MAAMA,CAAA,EAAG;IACrB,MAAM;MAAEC,KAAK;MAAEC,WAAW;MAAEC,UAAU;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAG,IAAI,CAACC,KAAK;IAEtE,oBACIV,KAAA,CAAAW,aAAA,CAACT,WAAW;MACRM,KAAK,EAAEA,KAAM;MACbI,IAAI,EAAEN,WAAY;MAClBC,UAAU,EAAEA,UAAW;MACvBM,SAAS,EAAE,kBAAmB;MAC9BC,OAAO,EAAEC,OAAO,CAACV,KAAK,CAAE;MACxBA,KAAK,EAAEW,MAAM,CAACX,KAAK,CAAE;MACrBY,QAAQ,EAAEA,CAAA,KAAM,IAAI,CAACP,KAAK,CAACO,QAAQ,IAAI,IAAI,CAACP,KAAK,CAACO,QAAQ,CAAC,CAACZ,KAAK,CAAE;MACnEI,QAAQ,EAAEA;IAAS,CACtB,CAAC;EAEV;AACJ;AAEA,SAASR,MAAM","ignoreList":[]}
package/Tabs/Tabs.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import React, { PropsWithChildren } from "react";
2
- import { TabProps } from "./Tab";
1
+ import type { PropsWithChildren } from "react";
2
+ import React from "react";
3
+ import type { TabProps } from "./Tab";
3
4
  export type TabsProps = PropsWithChildren<{
4
5
  /**
5
6
  * Append an ID.
package/Tabs/Tabs.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["React","createContext","useCallback","useMemo","useState","Tabs","AdminTabs","VALUE_PREFIX","DeprecatedTabsContext","undefined","value","onActivate","props","activeTabIndex","setActiveIndex","tabs","setTabs","activeIndex","onValueChange","parts","split","index","parseInt","isNaN","newTabs","map","tab","createElement","Tab","key","trigger","label","content","children","icon","disabled","visible","context","addTab","existingIndex","findIndex","id","slice","removeTab","filter","Fragment","Object","assign","size","separator","spacing","Provider","displayName"],"sources":["Tabs.tsx"],"sourcesContent":["import React, { createContext, PropsWithChildren, useCallback, useMemo, useState } from \"react\";\nimport { Tabs as AdminTabs } from \"@webiny/admin-ui\";\nimport { TabProps } from \"./Tab\";\n\nconst VALUE_PREFIX = \"tab-\";\n\nexport type TabsProps = PropsWithChildren<{\n /**\n * Append an ID.\n */\n id?: string;\n\n /**\n * Append a class name.\n */\n className?: string;\n\n /**\n * Callback to execute when a tab is changed.\n */\n onActivate?: (index: number) => void;\n\n /**\n * Active tab index value.\n */\n value?: number;\n\n /**\n * Tab ID for the testing.\n */\n \"data-testid\"?: string;\n}>;\n\ninterface TabItem extends TabProps {\n id: string;\n}\n\ninterface DeprecatedTabsContext {\n addTab(props: TabItem): void;\n\n removeTab(id: string): void;\n}\n\nexport const DeprecatedTabsContext = createContext<DeprecatedTabsContext | undefined>(undefined);\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Tabs` component from the `@webiny/admin-ui` package instead.\n */\nexport const Tabs = ({ value, onActivate, ...props }: TabsProps) => {\n const [activeTabIndex, setActiveIndex] = useState(0);\n const [tabs, setTabs] = useState<TabItem[]>([]);\n\n const activeIndex = value !== undefined ? value : activeTabIndex;\n\n const onValueChange = useCallback(\n (value: string) => {\n const parts = value.split(VALUE_PREFIX);\n const index = parseInt(parts[1]);\n\n if (isNaN(index)) {\n return;\n }\n\n setActiveIndex(index);\n onActivate && onActivate(index);\n },\n [onActivate]\n );\n\n /* We need to generate a key like this to trigger a proper component re-render when child tabs change. */\n const newTabs = tabs.map((tab, index) => {\n return (\n <AdminTabs.Tab\n key={`${VALUE_PREFIX}${index}`}\n value={`${VALUE_PREFIX}${index}`}\n trigger={tab.label}\n content={tab.children}\n icon={tab.icon}\n disabled={tab.disabled}\n visible={tab.visible !== false}\n data-testid={tab[\"data-testid\"]}\n />\n );\n });\n\n const context: DeprecatedTabsContext = useMemo(\n () => ({\n addTab(props) {\n setTabs(tabs => {\n const existingIndex = tabs.findIndex(tab => tab.id === props.id);\n if (existingIndex > -1) {\n return [\n ...tabs.slice(0, existingIndex),\n props,\n ...tabs.slice(existingIndex + 1)\n ];\n }\n return [...tabs, props];\n });\n },\n removeTab(id) {\n setTabs(tabs => tabs.filter(tab => tab.id === id));\n }\n }),\n [setTabs]\n );\n\n return (\n <>\n <AdminTabs\n {...props}\n value={`${VALUE_PREFIX}${activeIndex}`}\n onValueChange={onValueChange}\n tabs={newTabs}\n size={\"md\"}\n separator={true}\n spacing={\"lg\"}\n />\n <DeprecatedTabsContext.Provider value={context}>\n {props.children}\n </DeprecatedTabsContext.Provider>\n </>\n );\n};\n\nTabs.displayName = \"Tabs\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAqBC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC/F,SAASC,IAAI,IAAIC,SAAS,QAAQ,kBAAkB;AAGpD,MAAMC,YAAY,GAAG,MAAM;AAuC3B,OAAO,MAAMC,qBAAqB,gBAAGP,aAAa,CAAoCQ,SAAS,CAAC;;AAEhG;AACA;AACA;AACA;AACA,OAAO,MAAMJ,IAAI,GAAGA,CAAC;EAAEK,KAAK;EAAEC,UAAU;EAAE,GAAGC;AAAiB,CAAC,KAAK;EAChE,MAAM,CAACC,cAAc,EAAEC,cAAc,CAAC,GAAGV,QAAQ,CAAC,CAAC,CAAC;EACpD,MAAM,CAACW,IAAI,EAAEC,OAAO,CAAC,GAAGZ,QAAQ,CAAY,EAAE,CAAC;EAE/C,MAAMa,WAAW,GAAGP,KAAK,KAAKD,SAAS,GAAGC,KAAK,GAAGG,cAAc;EAEhE,MAAMK,aAAa,GAAGhB,WAAW,CAC5BQ,KAAa,IAAK;IACf,MAAMS,KAAK,GAAGT,KAAK,CAACU,KAAK,CAACb,YAAY,CAAC;IACvC,MAAMc,KAAK,GAAGC,QAAQ,CAACH,KAAK,CAAC,CAAC,CAAC,CAAC;IAEhC,IAAII,KAAK,CAACF,KAAK,CAAC,EAAE;MACd;IACJ;IAEAP,cAAc,CAACO,KAAK,CAAC;IACrBV,UAAU,IAAIA,UAAU,CAACU,KAAK,CAAC;EACnC,CAAC,EACD,CAACV,UAAU,CACf,CAAC;;EAED;EACA,MAAMa,OAAO,GAAGT,IAAI,CAACU,GAAG,CAAC,CAACC,GAAG,EAAEL,KAAK,KAAK;IACrC,oBACIrB,KAAA,CAAA2B,aAAA,CAACrB,SAAS,CAACsB,GAAG;MACVC,GAAG,EAAE,GAAGtB,YAAY,GA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GAAGH,YAAY,GAAGU,WAAW,EAAG;IACvCC,aAAa,EAAEA,aAAc;IAC7BH,IAAI,EAAES,OAAQ;IACdwB,IAAI,EAAE,IAAK;IACXC,SAAS,EAAE,IAAK;IAChBC,OAAO,EAAE;EAAK,EACjB,CAAC,eACFlD,KAAA,CAAA2B,aAAA,CAACnB,qBAAqB,CAAC2C,QAAQ;IAACzC,KAAK,EAAE2B;EAAQ,GAC1CzB,KAAK,CAACqB,QACqB,CAClC,CAAC;AAEX,CAAC;AAED5B,IAAI,CAAC+C,WAAW,GAAG,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["React","createContext","useCallback","useMemo","useState","Tabs","AdminTabs","VALUE_PREFIX","DeprecatedTabsContext","undefined","value","onActivate","props","activeTabIndex","setActiveIndex","tabs","setTabs","activeIndex","onValueChange","parts","split","index","parseInt","isNaN","newTabs","map","tab","createElement","Tab","key","trigger","label","content","children","icon","disabled","visible","context","addTab","existingIndex","findIndex","id","slice","removeTab","filter","Fragment","Object","assign","size","separator","spacing","Provider","displayName"],"sources":["Tabs.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React, { createContext, useCallback, useMemo, useState } from \"react\";\nimport { Tabs as AdminTabs } from \"@webiny/admin-ui\";\nimport type { TabProps } from \"./Tab\";\n\nconst VALUE_PREFIX = \"tab-\";\n\nexport type TabsProps = PropsWithChildren<{\n /**\n * Append an ID.\n */\n id?: string;\n\n /**\n * Append a class name.\n */\n className?: string;\n\n /**\n * Callback to execute when a tab is changed.\n */\n onActivate?: (index: number) => void;\n\n /**\n * Active tab index value.\n */\n value?: number;\n\n /**\n * Tab ID for the testing.\n */\n \"data-testid\"?: string;\n}>;\n\ninterface TabItem extends TabProps {\n id: string;\n}\n\ninterface DeprecatedTabsContext {\n addTab(props: TabItem): void;\n\n removeTab(id: string): void;\n}\n\nexport const DeprecatedTabsContext = createContext<DeprecatedTabsContext | undefined>(undefined);\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Tabs` component from the `@webiny/admin-ui` package instead.\n */\nexport const Tabs = ({ value, onActivate, ...props }: TabsProps) => {\n const [activeTabIndex, setActiveIndex] = useState(0);\n const [tabs, setTabs] = useState<TabItem[]>([]);\n\n const activeIndex = value !== undefined ? value : activeTabIndex;\n\n const onValueChange = useCallback(\n (value: string) => {\n const parts = value.split(VALUE_PREFIX);\n const index = parseInt(parts[1]);\n\n if (isNaN(index)) {\n return;\n }\n\n setActiveIndex(index);\n onActivate && onActivate(index);\n },\n [onActivate]\n );\n\n /* We need to generate a key like this to trigger a proper component re-render when child tabs change. */\n const newTabs = tabs.map((tab, index) => {\n return (\n <AdminTabs.Tab\n key={`${VALUE_PREFIX}${index}`}\n value={`${VALUE_PREFIX}${index}`}\n trigger={tab.label}\n content={tab.children}\n icon={tab.icon}\n disabled={tab.disabled}\n visible={tab.visible !== false}\n data-testid={tab[\"data-testid\"]}\n />\n );\n });\n\n const context: DeprecatedTabsContext = useMemo(\n () => ({\n addTab(props) {\n setTabs(tabs => {\n const existingIndex = tabs.findIndex(tab => tab.id === props.id);\n if (existingIndex > -1) {\n return [\n ...tabs.slice(0, existingIndex),\n props,\n ...tabs.slice(existingIndex + 1)\n ];\n }\n return [...tabs, props];\n });\n },\n removeTab(id) {\n setTabs(tabs => tabs.filter(tab => tab.id === id));\n }\n }),\n [setTabs]\n );\n\n return (\n <>\n <AdminTabs\n {...props}\n value={`${VALUE_PREFIX}${activeIndex}`}\n onValueChange={onValueChange}\n tabs={newTabs}\n size={\"md\"}\n separator={true}\n spacing={\"lg\"}\n />\n <DeprecatedTabsContext.Provider value={context}>\n {props.children}\n </DeprecatedTabsContext.Provider>\n </>\n );\n};\n\nTabs.displayName = \"Tabs\";\n"],"mappings":"AACA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC5E,SAASC,IAAI,IAAIC,SAAS,QAAQ,kBAAkB;AAGpD,MAAMC,YAAY,G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B,KAAK,CAACqB,QACqB,CAClC,CAAC;AAEX,CAAC;AAED5B,IAAI,CAAC+C,WAAW,GAAG,MAAM","ignoreList":[]}
package/Tags/Tags.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import type { FocusEventHandler } from "react";
1
2
  import React from "react";
2
- import { FormComponentProps } from "../types";
3
+ import type { FormComponentProps } from "../types.js";
3
4
  interface TagsProps extends FormComponentProps {
4
5
  /**
5
6
  * Component label.
@@ -32,7 +33,7 @@ interface TagsProps extends FormComponentProps {
32
33
  /**
33
34
  * Callback that gets executed when the input is focused.
34
35
  */
35
- onFocus?: (ev: Event) => void;
36
+ onFocus?: FocusEventHandler<HTMLInputElement> | undefined;
36
37
  /**
37
38
  * Automatically focus on the tags input.
38
39
  */
@@ -42,5 +43,9 @@ interface TagsProps extends FormComponentProps {
42
43
  */
43
44
  protectedTags?: string[];
44
45
  }
46
+ /**
47
+ * @deprecated This component is deprecated and will be removed in future releases.
48
+ * Please use the `Tags` component from the `@webiny/admin-ui` package instead.
49
+ */
45
50
  export declare const Tags: (props: TagsProps) => React.JSX.Element;
46
51
  export default Tags;