@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
package/Tags/Tags.js CHANGED
@@ -1,66 +1,11 @@
1
- import React, { useCallback, useState } from "react";
2
- import keycode from "keycode";
3
- import minimatch from "minimatch";
4
- import { Input } from "../Input";
5
- import { Chips, Chip } from "../Chips";
1
+ import React from "react";
2
+ import { Tags as AdminTags } from "@webiny/admin-ui";
3
+ /**
4
+ * @deprecated This component is deprecated and will be removed in future releases.
5
+ * Please use the `Tags` component from the `@webiny/admin-ui` package instead.
6
+ */
6
7
  export const Tags = props => {
7
- const [inputValue, setInputValue] = useState("");
8
- const {
9
- value,
10
- disabled,
11
- onChange,
12
- protectedTags = [],
13
- ...otherInputProps
14
- } = props;
15
- const isProtected = useCallback(tag => protectedTags.some(pattern => minimatch(tag, pattern)), [protectedTags]);
16
- const inputProps = {
17
- ...otherInputProps,
18
- value: inputValue,
19
- onChange: inputValue => {
20
- setInputValue(inputValue);
21
- },
22
- onKeyDown: ev => {
23
- if (!onChange) {
24
- return;
25
- }
26
- const newValue = Array.isArray(value) ? [...value] : [];
27
-
28
- /**
29
- * We must cast as keycode only works with Event | string type.
30
- */
31
- switch (keycode(ev)) {
32
- case "enter":
33
- if (inputValue) {
34
- newValue.push(inputValue);
35
- onChange(newValue);
36
- setInputValue("");
37
- }
38
- break;
39
- case "backspace":
40
- if (newValue.length && !inputValue) {
41
- newValue.splice(-1, 1);
42
- onChange(newValue);
43
- break;
44
- }
45
- }
46
- }
47
- };
48
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, inputProps), Array.isArray(value) && value.length ? /*#__PURE__*/React.createElement(Chips, {
49
- disabled: disabled
50
- }, value.map((item, index) => {
51
- return /*#__PURE__*/React.createElement(Chip, {
52
- label: item,
53
- key: `${item}-${index}`,
54
- onRemove: !isProtected(item) ? () => {
55
- // On removal, let's update the value and call "onChange" callback.
56
- if (onChange) {
57
- const newValue = [...value];
58
- newValue.splice(index, 1);
59
- onChange(newValue);
60
- }
61
- } : undefined
62
- });
63
- })) : null);
8
+ return /*#__PURE__*/React.createElement(AdminTags, props);
64
9
  };
65
10
  export default Tags;
66
11
 
package/Tags/Tags.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useState","keycode","minimatch","Input","Chips","Chip","Tags","props","inputValue","setInputValue","value","disabled","onChange","protectedTags","otherInputProps","isProtected","tag","some","pattern","inputProps","onKeyDown","ev","newValue","Array","isArray","push","length","splice","createElement","map","item","index","label","key","onRemove","undefined"],"sources":["Tags.tsx"],"sourcesContent":["import React, { SyntheticEvent, useCallback, useState } from \"react\";\nimport keycode from \"keycode\";\nimport minimatch from \"minimatch\";\nimport { Input, InputProps } from \"~/Input\";\nimport { Chips, Chip } from \"~/Chips\";\nimport { FormComponentProps } from \"~/types\";\n\ninterface TagsProps extends FormComponentProps {\n /**\n * Component label.\n */\n label?: React.ReactNode;\n\n /**\n * Are input and chosen tags disabled?\n */\n disabled?: boolean;\n\n /**\n * Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label.\n */\n placeholder?: string;\n\n /**\n * Description beneath the input.\n */\n description?: string;\n\n /**\n * A className for the root element.\n */\n className?: string;\n\n /**\n * A list of tags.\n */\n value?: string[];\n\n /**\n * Callback that gets executed on change of input value.\n */\n onInput?: <T = unknown>(value: T) => void;\n\n /**\n * Callback that gets executed when the input is focused.\n */\n onFocus?: (ev: Event) => void;\n\n /**\n * Automatically focus on the tags input.\n */\n autoFocus?: boolean;\n\n /**\n * Protected tags cannot be removed by the user.\n */\n protectedTags?: string[];\n}\n\nexport const Tags = (props: TagsProps) => {\n const [inputValue, setInputValue] = useState(\"\");\n\n const { value, disabled, onChange, protectedTags = [], ...otherInputProps } = props;\n\n const isProtected = useCallback(\n (tag: string) => protectedTags.some(pattern => minimatch(tag, pattern)),\n [protectedTags]\n );\n\n const inputProps: InputProps<string> = {\n ...otherInputProps,\n value: inputValue,\n onChange: inputValue => {\n setInputValue(inputValue);\n },\n onKeyDown: (ev: SyntheticEvent) => {\n if (!onChange) {\n return;\n }\n\n const newValue = Array.isArray(value) ? [...value] : [];\n\n /**\n * We must cast as keycode only works with Event | string type.\n */\n switch (keycode(ev as unknown as Event)) {\n case \"enter\":\n if (inputValue) {\n newValue.push(inputValue);\n onChange(newValue);\n setInputValue(\"\");\n }\n break;\n case \"backspace\":\n if (newValue.length && !inputValue) {\n newValue.splice(-1, 1);\n onChange(newValue);\n break;\n }\n }\n }\n };\n\n return (\n <div>\n <Input {...inputProps} />\n {Array.isArray(value) && value.length ? (\n <Chips disabled={disabled}>\n {value.map((item, index) => {\n return (\n <Chip\n label={item}\n key={`${item}-${index}`}\n onRemove={\n !isProtected(item)\n ? () => {\n // On removal, let's update the value and call \"onChange\" callback.\n if (onChange) {\n const newValue = [...value];\n newValue.splice(index, 1);\n onChange(newValue);\n }\n }\n : undefined\n }\n />\n );\n })}\n </Chips>\n ) : null}\n </div>\n );\n};\n\nexport default Tags;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAoBC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AACpE,OAAOC,OAAO,MAAM,SAAS;AAC7B,OAAOC,SAAS,MAAM,WAAW;AACjC,SAASC,KAAK;AACd,SAASC,KAAK,EAAEC,IAAI;AAuDpB,OAAO,MAAMC,IAAI,GAAIC,KAAgB,IAAK;EACtC,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGT,QAAQ,CAAC,EAAE,CAAC;EAEhD,MAAM;IAAEU,KAAK;IAAEC,QAAQ;IAAEC,QAAQ;IAAEC,aAAa,GAAG,EAAE;IAAE,GAAGC;EAAgB,CAAC,GAAGP,KAAK;EAEnF,MAAMQ,WAAW,GAAGhB,WAAW,CAC1BiB,GAAW,IAAKH,aAAa,CAACI,IAAI,CAACC,OAAO,IAAIhB,SAAS,CAACc,GAAG,EAAEE,OAAO,CAAC,CAAC,EACvE,CAACL,aAAa,CAClB,CAAC;EAED,MAAMM,UAA8B,GAAG;IACnC,GAAGL,eAAe;IAClBJ,KAAK,EAAEF,UAAU;IACjBI,QAAQ,EAAEJ,UAAU,IAAI;MACpBC,aAAa,CAACD,UAAU,CAAC;IAC7B,CAAC;IACDY,SAAS,EAAGC,EAAkB,IAAK;MAC/B,IAAI,CAACT,QAAQ,EAAE;QACX;MACJ;MAEA,MAAMU,QAAQ,GAAGC,KAAK,CAACC,OAAO,CAACd,KAAK,CAAC,GAAG,CAAC,GAAGA,KAAK,CAAC,GAAG,EAAE;;MAEvD;AACZ;AACA;MACY,QAAQT,OAAO,CAACoB,EAAsB,CAAC;QACnC,KAAK,OAAO;UACR,IAAIb,UAAU,EAAE;YACZc,QAAQ,CAACG,IAAI,CAACjB,UAAU,CAAC;YACzBI,QAAQ,CAACU,QAAQ,CAAC;YAClBb,aAAa,CAAC,EAAE,CAAC;UACrB;UACA;QACJ,KAAK,WAAW;UACZ,IAAIa,QAAQ,CAACI,MAAM,IAAI,CAAClB,UAAU,EAAE;YAChCc,QAAQ,CAACK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACtBf,QAAQ,CAACU,QAAQ,CAAC;YAClB;UACJ;MACR;IACJ;EACJ,CAAC;EAED,oBACIxB,KAAA,CAAA8B,aAAA,2BACI9B,KAAA,CAAA8B,aAAA,CAACzB,KAAK,EAAKgB,UAAa,CAAC,EACxBI,KAAK,CAACC,OAAO,CAACd,KAAK,CAAC,IAAIA,KAAK,CAACgB,MAAM,gBACjC5B,KAAA,CAAA8B,aAAA,CAACxB,KAAK;IAACO,QAAQ,EAAEA;EAAS,GACrBD,KAAK,CAACmB,GAAG,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAK;IACxB,oBACIjC,KAAA,CAAA8B,aAAA,CAACvB,IAAI;MACD2B,KAAK,EAAEF,IAAK;MACZG,GAAG,EAAE,GAAGH,IAAI,IAAIC,KAAK,EAAG;MACxBG,QAAQ,EACJ,CAACnB,WAAW,CAACe,IAAI,CAAC,GACZ,MAAM;QACF;QACA,IAAIlB,QAAQ,EAAE;UACV,MAAMU,QAAQ,GAAG,CAAC,GAAGZ,KAAK,CAAC;UAC3BY,QAAQ,CAACK,MAAM,CAACI,KAAK,EAAE,CAAC,CAAC;UACzBnB,QAAQ,CAACU,QAAQ,CAAC;QACtB;MACJ,CAAC,GACDa;IACT,CACJ,CAAC;EAEV,CAAC,CACE,CAAC,GACR,IACH,CAAC;AAEd,CAAC;AAED,eAAe7B,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["React","Tags","AdminTags","props","createElement"],"sources":["Tags.tsx"],"sourcesContent":["import type { FocusEventHandler } from \"react\";\nimport React from \"react\";\nimport { Tags as AdminTags } from \"@webiny/admin-ui\";\nimport type { FormComponentProps } from \"~/types.js\";\n\ninterface TagsProps extends FormComponentProps {\n /**\n * Component label.\n */\n label?: React.ReactNode;\n\n /**\n * Are input and chosen tags disabled?\n */\n disabled?: boolean;\n\n /**\n * Placeholder text for the form control. Set to a blank string to create a non-floating placeholder label.\n */\n placeholder?: string;\n\n /**\n * Description beneath the input.\n */\n description?: string;\n\n /**\n * A className for the root element.\n */\n className?: string;\n\n /**\n * A list of tags.\n */\n value?: string[];\n\n /**\n * Callback that gets executed on change of input value.\n */\n onInput?: <T = unknown>(value: T) => void;\n\n /**\n * Callback that gets executed when the input is focused.\n */\n onFocus?: FocusEventHandler<HTMLInputElement> | undefined;\n\n /**\n * Automatically focus on the tags input.\n */\n autoFocus?: boolean;\n\n /**\n * Protected tags cannot be removed by the user.\n */\n protectedTags?: string[];\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Tags` component from the `@webiny/admin-ui` package instead.\n */\nexport const Tags = (props: TagsProps) => {\n return <AdminTags {...props} />;\n};\n\nexport default Tags;\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,IAAIC,SAAS,QAAQ,kBAAkB;AAuDpD;AACA;AACA;AACA;AACA,OAAO,MAAMD,IAAI,GAAIE,KAAgB,IAAK;EACtC,oBAAOH,KAAA,CAAAI,aAAA,CAACF,SAAS,EAAKC,KAAQ,CAAC;AACnC,CAAC;AAED,eAAeF,IAAI","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","useMemo","Tooltip","TooltipBase","children","content","placement","className","side","align","placementMapping","left","undefined","right","top","bottom","topLeft","topRight","bottomLeft","bottomRight","createElement","trigger"],"sources":["Tooltip.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { Tooltip as TooltipBase, TooltipProps as TooltipPropsBase } from \"@webiny/admin-ui\";\n\nexport interface TooltipProps {\n // A component (eg. button) which will trigger the tooltip.\n children: React.ReactNode;\n\n // Content which will be shown inside the tooltip.\n content: React.ReactNode;\n\n // Defines which action will trigger the tooltip: \"hover\", \"click\" or \"focus\".\n trigger?: string;\n\n // Can be \"left\",\"right\",\"top\",\"bottom\", \"topLeft\", \"topRight\", \"bottomLeft\" or \"bottomRight\".\n placement?:\n | \"left\"\n | \"right\"\n | \"top\"\n | \"bottom\"\n | \"topLeft\"\n | \"topRight\"\n | \"bottomLeft\"\n | \"bottomRight\";\n\n // CSS 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 `Tooltip` component from the `@webiny/admin-ui` package instead.\n */\nexport const Tooltip = ({\n children,\n content,\n placement,\n className = \"webiny-ui-tooltip\"\n}: TooltipProps) => {\n const { side, align } = useMemo(() => {\n const placementMapping: Record<\n string,\n { side: TooltipPropsBase[\"side\"]; align: TooltipPropsBase[\"align\"] }\n > = {\n left: { side: \"left\", align: undefined },\n right: { side: \"right\", align: undefined },\n top: { side: \"top\", align: undefined },\n bottom: { side: \"bottom\", align: undefined },\n topLeft: { side: \"top\", align: \"start\" },\n topRight: { side: \"top\", align: \"end\" },\n bottomLeft: { side: \"bottom\", align: \"start\" },\n bottomRight: { side: \"bottom\", align: \"end\" }\n };\n\n return placementMapping[placement ?? \"\"] || { side: undefined, align: undefined };\n }, [placement]);\n\n return (\n <TooltipBase\n trigger={children}\n content={content}\n className={className}\n side={side}\n align={align}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,OAAO,IAAIC,WAAW,QAA0C,kBAAkB;AA2B3F;AACA;AACA;AACA;AACA,OAAO,MAAMD,OAAO,GAAGA,CAAC;EACpBE,QAAQ;EACRC,OAAO;EACPC,SAAS;EACTC,SAAS,GAAG;AACF,CAAC,KAAK;EAChB,MAAM;IAAEC,IAAI;IAAEC;EAAM,CAAC,GAAGR,OAAO,CAAC,MAAM;IAClC,MAAMS,gBAGL,GAAG;MACAC,IAAI,EAAE;QAAEH,IAAI,EAAE,MAAM;QAAEC,KAAK,EAAEG;MAAU,CAAC;MACxCC,KAAK,EAAE;QAAEL,IAAI,EAAE,OAAO;QAAEC,KAAK,EAAEG;MAAU,CAAC;MAC1CE,GAAG,EAAE;QAAEN,IAAI,EAAE,KAAK;QAAEC,KAAK,EAAEG;MAAU,CAAC;MACtCG,MAAM,EAAE;QAAEP,IAAI,EAAE,QAAQ;QAAEC,KAAK,EAAEG;MAAU,CAAC;MAC5CI,OAAO,EAAE;QAAER,IAAI,EAAE,KAAK;QAAEC,KAAK,EAAE;MAAQ,CAAC;MACxCQ,QAAQ,EAAE;QAAET,IAAI,EAAE,KAAK;QAAEC,KAAK,EAAE;MAAM,CAAC;MACvCS,UAAU,EAAE;QAAEV,IAAI,EAAE,QAAQ;QAAEC,KAAK,EAAE;MAAQ,CAAC;MAC9CU,WAAW,EAAE;QAAEX,IAAI,EAAE,QAAQ;QAAEC,KAAK,EAAE;MAAM;IAChD,CAAC;IAED,OAAOC,gBAAgB,CAACJ,SAAS,IAAI,EAAE,CAAC,IAAI;MAAEE,IAAI,EAAEI,SAAS;MAAEH,KAAK,EAAEG;IAAU,CAAC;EACrF,CAAC,EAAE,CAACN,SAAS,CAAC,CAAC;EAEf,oBACIN,KAAA,CAAAoB,aAAA,CAACjB,WAAW;IACRkB,OAAO,EAAEjB,QAAS;IAClBC,OAAO,EAAEA,OAAQ;IACjBE,SAAS,EAAEA,SAAU;IACrBC,IAAI,EAAEA,IAAK;IACXC,KAAK,EAAEA;EAAM,CAChB,CAAC;AAEV,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useMemo","Tooltip","TooltipBase","children","content","placement","className","side","align","placementMapping","left","undefined","right","top","bottom","topLeft","topRight","bottomLeft","bottomRight","createElement","trigger"],"sources":["Tooltip.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport type { TooltipProps as TooltipPropsBase } from \"@webiny/admin-ui\";\nimport { Tooltip as TooltipBase } from \"@webiny/admin-ui\";\n\nexport interface TooltipProps {\n // A component (eg. button) which will trigger the tooltip.\n children: React.ReactNode;\n\n // Content which will be shown inside the tooltip.\n content: React.ReactNode;\n\n // Defines which action will trigger the tooltip: \"hover\", \"click\" or \"focus\".\n trigger?: string;\n\n // Can be \"left\",\"right\",\"top\",\"bottom\", \"topLeft\", \"topRight\", \"bottomLeft\" or \"bottomRight\".\n placement?:\n | \"left\"\n | \"right\"\n | \"top\"\n | \"bottom\"\n | \"topLeft\"\n | \"topRight\"\n | \"bottomLeft\"\n | \"bottomRight\";\n\n // CSS 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 `Tooltip` component from the `@webiny/admin-ui` package instead.\n */\nexport const Tooltip = ({\n children,\n content,\n placement,\n className = \"webiny-ui-tooltip\"\n}: TooltipProps) => {\n const { side, align } = useMemo(() => {\n const placementMapping: Record<\n string,\n { side: TooltipPropsBase[\"side\"]; align: TooltipPropsBase[\"align\"] }\n > = {\n left: { side: \"left\", align: undefined },\n right: { side: \"right\", align: undefined },\n top: { side: \"top\", align: undefined },\n bottom: { side: \"bottom\", align: undefined },\n topLeft: { side: \"top\", align: \"start\" },\n topRight: { side: \"top\", align: \"end\" },\n bottomLeft: { side: \"bottom\", align: \"start\" },\n bottomRight: { side: \"bottom\", align: \"end\" }\n };\n\n return placementMapping[placement ?? \"\"] || { side: undefined, align: undefined };\n }, [placement]);\n\n return (\n <TooltipBase\n trigger={children}\n content={content}\n className={className}\n side={side}\n align={align}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AAEtC,SAASC,OAAO,IAAIC,WAAW,QAAQ,kBAAkB;AA2BzD;AACA;AACA;AACA;AACA,OAAO,MAAMD,OAAO,GAAGA,CAAC;EACpBE,QAAQ;EACRC,OAAO;EACPC,SAAS;EACTC,SAAS,GAAG;AACF,CAAC,KAAK;EAChB,MAAM;IAAEC,IAAI;IAAEC;EAAM,CAAC,GAAGR,OAAO,CAAC,MAAM;IAClC,MAAMS,gBAGL,GAAG;MACAC,IAAI,EAAE;QAAEH,IAAI,EAAE,MAAM;QAAEC,KAAK,EAAEG;MAAU,CAAC;MACxCC,KAAK,EAAE;QAAEL,IAAI,EAAE,OAAO;QAAEC,KAAK,EAAEG;MAAU,CAAC;MAC1CE,GAAG,EAAE;QAAEN,IAAI,EAAE,KAAK;QAAEC,KAAK,EAAEG;MAAU,CAAC;MACtCG,MAAM,EAAE;QAAEP,IAAI,EAAE,QAAQ;QAAEC,KAAK,EAAEG;MAAU,CAAC;MAC5CI,OAAO,EAAE;QAAER,IAAI,EAAE,KAAK;QAAEC,KAAK,EAAE;MAAQ,CAAC;MACxCQ,QAAQ,EAAE;QAAET,IAAI,EAAE,KAAK;QAAEC,KAAK,EAAE;MAAM,CAAC;MACvCS,UAAU,EAAE;QAAEV,IAAI,EAAE,QAAQ;QAAEC,KAAK,EAAE;MAAQ,CAAC;MAC9CU,WAAW,EAAE;QAAEX,IAAI,EAAE,QAAQ;QAAEC,KAAK,EAAE;MAAM;IAChD,CAAC;IAED,OAAOC,gBAAgB,CAACJ,SAAS,IAAI,EAAE,CAAC,IAAI;MAAEE,IAAI,EAAEI,SAAS;MAAEH,KAAK,EAAEG;IAAU,CAAC;EACrF,CAAC,EAAE,CAACN,SAAS,CAAC,CAAC;EAEf,oBACIN,KAAA,CAAAoB,aAAA,CAACjB,WAAW;IACRkB,OAAO,EAAEjB,QAAS;IAClBC,OAAO,EAAEA,OAAQ;IACjBE,SAAS,EAAEA,SAAU;IACrBC,IAAI,EAAEA,IAAK;IACXC,KAAK,EAAEA;EAAM,CAChB,CAAC;AAEV,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { TopAppBarProps } from "./TopAppBar";
2
+ import type { TopAppBarProps } from "./TopAppBar";
3
3
  export type TopAppBarPrimaryProps = TopAppBarProps;
4
4
  /**
5
5
  * @deprecated This component is deprecated and will be removed in future releases.
@@ -1 +1 @@
1
- {"version":3,"names":["React","TopAppBar","TopAppBarPrimary","props","children","other","createElement","Object","assign","className"],"sources":["TopAppBarPrimary.tsx"],"sourcesContent":["import React from \"react\";\nimport { TopAppBar, TopAppBarProps } from \"./TopAppBar\";\n\nexport type TopAppBarPrimaryProps = TopAppBarProps;\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `HeaderBar` component from the `@webiny/admin-ui` package instead.\n */\nconst TopAppBarPrimary = (props: TopAppBarPrimaryProps) => {\n const { children, ...other } = props;\n return (\n <TopAppBar {...other} className={\"primary\"}>\n {children}\n </TopAppBar>\n );\n};\n\nexport { TopAppBarPrimary };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS;AAIlB;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAIC,KAA4B,IAAK;EACvD,MAAM;IAAEC,QAAQ;IAAE,GAAGC;EAAM,CAAC,GAAGF,KAAK;EACpC,oBACIH,KAAA,CAAAM,aAAA,CAACL,SAAS,EAAAM,MAAA,CAAAC,MAAA,KAAKH,KAAK;IAAEI,SAAS,EAAE;EAAU,IACtCL,QACM,CAAC;AAEpB,CAAC;AAED,SAASF,gBAAgB","ignoreList":[]}
1
+ {"version":3,"names":["React","TopAppBar","TopAppBarPrimary","props","children","other","createElement","Object","assign","className"],"sources":["TopAppBarPrimary.tsx"],"sourcesContent":["import React from \"react\";\nimport type { TopAppBarProps } from \"./TopAppBar\";\nimport { TopAppBar } from \"./TopAppBar\";\n\nexport type TopAppBarPrimaryProps = TopAppBarProps;\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `HeaderBar` component from the `@webiny/admin-ui` package instead.\n */\nconst TopAppBarPrimary = (props: TopAppBarPrimaryProps) => {\n const { children, ...other } = props;\n return (\n <TopAppBar {...other} className={\"primary\"}>\n {children}\n </TopAppBar>\n );\n};\n\nexport { TopAppBarPrimary };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,SAAS;AAIlB;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAIC,KAA4B,IAAK;EACvD,MAAM;IAAEC,QAAQ;IAAE,GAAGC;EAAM,CAAC,GAAGF,KAAK;EACpC,oBACIH,KAAA,CAAAM,aAAA,CAACL,SAAS,EAAAM,MAAA,CAAAC,MAAA,KAAKH,KAAK;IAAEI,SAAS,EAAE;EAAU,IACtCL,QACM,CAAC;AAEpB,CAAC;AAED,SAASF,gBAAgB","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { TopAppBarProps } from "./TopAppBar";
2
+ import type { TopAppBarProps } from "./TopAppBar";
3
3
  export type TopAppBarSecondaryProps = TopAppBarProps;
4
4
  /**
5
5
  * @deprecated This component is deprecated and will be removed in future releases.
@@ -1 +1 @@
1
- {"version":3,"names":["React","TopAppBar","TopAppBarSecondary","props","style","children","other","createElement","Object","assign"],"sources":["TopAppBarSecondary.tsx"],"sourcesContent":["import React from \"react\";\nimport { TopAppBar, TopAppBarProps } from \"./TopAppBar\";\n\nexport type TopAppBarSecondaryProps = TopAppBarProps;\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `HeaderBar` component from the `@webiny/admin-ui` package instead.\n */\nconst TopAppBarSecondary = (props: TopAppBarSecondaryProps) => {\n const { style = {}, children, ...other } = props;\n return (\n <TopAppBar {...other} style={style}>\n {children}\n </TopAppBar>\n );\n};\n\nexport { TopAppBarSecondary };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS;AAIlB;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAIC,KAA8B,IAAK;EAC3D,MAAM;IAAEC,KAAK,GAAG,CAAC,CAAC;IAAEC,QAAQ;IAAE,GAAGC;EAAM,CAAC,GAAGH,KAAK;EAChD,oBACIH,KAAA,CAAAO,aAAA,CAACN,SAAS,EAAAO,MAAA,CAAAC,MAAA,KAAKH,KAAK;IAAEF,KAAK,EAAEA;EAAM,IAC9BC,QACM,CAAC;AAEpB,CAAC;AAED,SAASH,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["React","TopAppBar","TopAppBarSecondary","props","style","children","other","createElement","Object","assign"],"sources":["TopAppBarSecondary.tsx"],"sourcesContent":["import React from \"react\";\nimport type { TopAppBarProps } from \"./TopAppBar\";\nimport { TopAppBar } from \"./TopAppBar\";\n\nexport type TopAppBarSecondaryProps = TopAppBarProps;\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `HeaderBar` component from the `@webiny/admin-ui` package instead.\n */\nconst TopAppBarSecondary = (props: TopAppBarSecondaryProps) => {\n const { style = {}, children, ...other } = props;\n return (\n <TopAppBar {...other} style={style}>\n {children}\n </TopAppBar>\n );\n};\n\nexport { TopAppBarSecondary };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,SAAS;AAIlB;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAIC,KAA8B,IAAK;EAC3D,MAAM;IAAEC,KAAK,GAAG,CAAC,CAAC;IAAEC,QAAQ;IAAE,GAAGC;EAAM,CAAC,GAAGH,KAAK;EAChD,oBACIH,KAAA,CAAAO,aAAA,CAACN,SAAS,EAAAO,MAAA,CAAAC,MAAA,KAAKH,KAAK;IAAEF,KAAK,EAAEA;EAAM,IAC9BC,QACM,CAAC;AAEpB,CAAC;AAED,SAASH,kBAAkB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","Heading","Text","Typography","props","children","use","className","headingLevelMap","headline1","headline2","headline3","headline4","headline5","headline6","level","createElement","size"],"sources":["Typography.tsx"],"sourcesContent":["import React from \"react\";\nimport { Heading, HeadingLevels, Text } from \"@webiny/admin-ui\";\n\nexport declare type TypographyT =\n | \"headline1\"\n | \"headline2\"\n | \"headline3\"\n | \"headline4\"\n | \"headline5\"\n | \"headline6\"\n | \"subtitle1\"\n | \"subtitle2\"\n | \"body1\"\n | \"body2\"\n | \"caption\"\n | \"button\"\n | \"overline\";\n\ninterface TypographyProps {\n use: TypographyT;\n children?: React.ReactNode;\n className?: string;\n /**\n * @deprecated\n */\n style?: React.CSSProperties;\n tag?: string;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Heading` or `Text` components from the `@webiny/admin-ui` package instead.\n */\nconst Typography = (props: TypographyProps) => {\n const { children, use, className } = props;\n\n // Define a mapping of use values to heading levels\n const headingLevelMap: { [key: string]: HeadingLevels } = {\n headline1: 1,\n headline2: 2,\n headline3: 3,\n headline4: 4,\n headline5: 5,\n headline6: 6\n };\n\n if (use in headingLevelMap) {\n const level = headingLevelMap[use];\n return (\n <Heading level={level} className={className}>\n {children}\n </Heading>\n );\n }\n\n return (\n <Text size={\"md\"} className={className}>\n {children}\n </Text>\n );\n};\n\nexport { Typography, TypographyProps };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,OAAO,EAAiBC,IAAI,QAAQ,kBAAkB;AA4B/D;AACA;AACA;AACA;AACA,MAAMC,UAAU,GAAIC,KAAsB,IAAK;EAC3C,MAAM;IAAEC,QAAQ;IAAEC,GAAG;IAAEC;EAAU,CAAC,GAAGH,KAAK;;EAE1C;EACA,MAAMI,eAAiD,GAAG;IACtDC,SAAS,EAAE,CAAC;IACZC,SAAS,EAAE,CAAC;IACZC,SAAS,EAAE,CAAC;IACZC,SAAS,EAAE,CAAC;IACZC,SAAS,EAAE,CAAC;IACZC,SAAS,EAAE;EACf,CAAC;EAED,IAAIR,GAAG,IAAIE,eAAe,EAAE;IACxB,MAAMO,KAAK,GAAGP,eAAe,CAACF,GAAG,CAAC;IAClC,oBACIN,KAAA,CAAAgB,aAAA,CAACf,OAAO;MAACc,KAAK,EAAEA,KAAM;MAACR,SAAS,EAAEA;IAAU,GACvCF,QACI,CAAC;EAElB;EAEA,oBACIL,KAAA,CAAAgB,aAAA,CAACd,IAAI;IAACe,IAAI,EAAE,IAAK;IAACV,SAAS,EAAEA;EAAU,GAClCF,QACC,CAAC;AAEf,CAAC;AAED,SAASF,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["React","Heading","Text","Typography","props","children","use","className","headingLevelMap","headline1","headline2","headline3","headline4","headline5","headline6","level","createElement","size"],"sources":["Typography.tsx"],"sourcesContent":["import React from \"react\";\nimport type { HeadingLevels } from \"@webiny/admin-ui\";\nimport { Heading, Text } from \"@webiny/admin-ui\";\n\nexport declare type TypographyT =\n | \"headline1\"\n | \"headline2\"\n | \"headline3\"\n | \"headline4\"\n | \"headline5\"\n | \"headline6\"\n | \"subtitle1\"\n | \"subtitle2\"\n | \"body1\"\n | \"body2\"\n | \"caption\"\n | \"button\"\n | \"overline\";\n\ninterface TypographyProps {\n use: TypographyT;\n children?: React.ReactNode;\n className?: string;\n /**\n * @deprecated\n */\n style?: React.CSSProperties;\n tag?: string;\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Heading` or `Text` components from the `@webiny/admin-ui` package instead.\n */\nconst Typography = (props: TypographyProps) => {\n const { children, use, className } = props;\n\n // Define a mapping of use values to heading levels\n const headingLevelMap: { [key: string]: HeadingLevels } = {\n headline1: 1,\n headline2: 2,\n headline3: 3,\n headline4: 4,\n headline5: 5,\n headline6: 6\n };\n\n if (use in headingLevelMap) {\n const level = headingLevelMap[use];\n return (\n <Heading level={level} className={className}>\n {children}\n </Heading>\n );\n }\n\n return (\n <Text size={\"md\"} className={className}>\n {children}\n </Text>\n );\n};\n\nexport { Typography, TypographyProps };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,OAAO,EAAEC,IAAI,QAAQ,kBAAkB;AA4BhD;AACA;AACA;AACA;AACA,MAAMC,UAAU,GAAIC,KAAsB,IAAK;EAC3C,MAAM;IAAEC,QAAQ;IAAEC,GAAG;IAAEC;EAAU,CAAC,GAAGH,KAAK;;EAE1C;EACA,MAAMI,eAAiD,GAAG;IACtDC,SAAS,EAAE,CAAC;IACZC,SAAS,EAAE,CAAC;IACZC,SAAS,EAAE,CAAC;IACZC,SAAS,EAAE,CAAC;IACZC,SAAS,EAAE,CAAC;IACZC,SAAS,EAAE;EACf,CAAC;EAED,IAAIR,GAAG,IAAIE,eAAe,EAAE;IACxB,MAAMO,KAAK,GAAGP,eAAe,CAACF,GAAG,CAAC;IAClC,oBACIN,KAAA,CAAAgB,aAAA,CAACf,OAAO;MAACc,KAAK,EAAEA,KAAM;MAACR,SAAS,EAAEA;IAAU,GACvCF,QACI,CAAC;EAElB;EAEA,oBACIL,KAAA,CAAAgB,aAAA,CAACd,IAAI;IAACe,IAAI,EAAE,IAAK;IAACV,SAAS,EAAEA;EAAU,GAClCF,QACC,CAAC;AAEf,CAAC;AAED,SAASF,UAAU","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/ui",
3
- "version": "6.0.0-alpha.0",
3
+ "version": "6.0.0-alpha.2",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,18 +15,17 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@svgr/webpack": "6.5.1",
18
- "@webiny/admin-ui": "6.0.0-alpha.0",
19
- "@webiny/utils": "6.0.0-alpha.0",
18
+ "@webiny/admin-ui": "6.0.0-alpha.2",
19
+ "@webiny/utils": "6.0.0-alpha.2",
20
20
  "classnames": "2.5.1",
21
- "keycode": "2.2.1",
22
21
  "lodash": "4.17.21"
23
22
  },
24
23
  "devDependencies": {
25
24
  "@emotion/babel-plugin": "11.11.0",
26
25
  "@testing-library/react": "15.0.7",
27
- "@webiny/cli": "6.0.0-alpha.0",
28
- "@webiny/project-utils": "6.0.0-alpha.0",
29
- "@webiny/validation": "6.0.0-alpha.0",
26
+ "@webiny/cli": "6.0.0-alpha.2",
27
+ "@webiny/project-utils": "6.0.0-alpha.2",
28
+ "@webiny/validation": "6.0.0-alpha.2",
30
29
  "babel-loader": "9.2.1",
31
30
  "execa": "5.1.1",
32
31
  "ncp": "2.0.0",
@@ -60,5 +59,5 @@
60
59
  ]
61
60
  }
62
61
  },
63
- "gitHead": "a5b28fed7a242d8f56712197a8ea83aa6d2ed101"
62
+ "gitHead": "7c9e8fbfd62a57ece5f880dbad6c864636b0355e"
64
63
  }