@webiny/ui 5.33.5 → 5.34.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/Accordion/Accordion.js +1 -5
  2. package/Accordion/Accordion.js.map +1 -1
  3. package/Accordion/AccordionItem.d.ts +18 -2
  4. package/Accordion/AccordionItem.js +46 -48
  5. package/Accordion/AccordionItem.js.map +1 -1
  6. package/Accordion/AccordionItemActions.d.ts +8 -0
  7. package/Accordion/AccordionItemActions.js +36 -0
  8. package/Accordion/AccordionItemActions.js.map +1 -0
  9. package/Alert/Alert.d.ts +1 -1
  10. package/Alert/Alert.js +1 -1
  11. package/Alert/Alert.js.map +1 -1
  12. package/Button/Button.d.ts +30 -1
  13. package/Button/Button.js +2 -3
  14. package/Button/Button.js.map +1 -1
  15. package/CodeEditor/CodeEditor.d.ts +2 -0
  16. package/CodeEditor/CodeEditor.js +4 -0
  17. package/CodeEditor/CodeEditor.js.map +1 -1
  18. package/DataTable/DataTable.d.ts +22 -0
  19. package/DataTable/DataTable.js +162 -0
  20. package/DataTable/DataTable.js.map +1 -0
  21. package/DataTable/DataTable.stories.d.ts +1 -0
  22. package/DataTable/DataTable.stories.js +77 -0
  23. package/DataTable/DataTable.stories.js.map +1 -0
  24. package/DataTable/README.md +72 -0
  25. package/DataTable/index.d.ts +1 -0
  26. package/DataTable/index.js +18 -0
  27. package/DataTable/index.js.map +1 -0
  28. package/DataTable/styled.d.ts +2 -0
  29. package/DataTable/styled.js +18 -0
  30. package/DataTable/styled.js.map +1 -0
  31. package/DelayedOnChange/DelayedOnChange.d.ts +40 -0
  32. package/DelayedOnChange/DelayedOnChange.js +129 -0
  33. package/DelayedOnChange/DelayedOnChange.js.map +1 -0
  34. package/DelayedOnChange/index.d.ts +2 -0
  35. package/DelayedOnChange/index.js +23 -0
  36. package/DelayedOnChange/index.js.map +1 -0
  37. package/DelayedOnChange/withDelayedOnChange.d.ts +3 -0
  38. package/DelayedOnChange/withDelayedOnChange.js +37 -0
  39. package/DelayedOnChange/withDelayedOnChange.js.map +1 -0
  40. package/Dialog/Dialog.js +5 -2
  41. package/Dialog/Dialog.js.map +1 -1
  42. package/Image/Image.js +3 -1
  43. package/Image/Image.js.map +1 -1
  44. package/ImageUpload/styled.d.ts +3 -3
  45. package/Input/Input.d.ts +1 -1
  46. package/Input/Input.js.map +1 -1
  47. package/List/DataList/DataList.js +11 -52
  48. package/List/DataList/DataList.js.map +1 -1
  49. package/List/DataList/Loader.d.ts +2 -2
  50. package/List/DataList/Loader.js +35 -49
  51. package/List/DataList/Loader.js.map +1 -1
  52. package/Menu/Menu.js +5 -1
  53. package/Menu/Menu.js.map +1 -1
  54. package/Skeleton/README.md +21 -0
  55. package/Skeleton/Skeleton.d.ts +4 -0
  56. package/Skeleton/Skeleton.js +25 -0
  57. package/Skeleton/Skeleton.js.map +1 -0
  58. package/Skeleton/Skeleton.stories.d.ts +1 -0
  59. package/Skeleton/Skeleton.stories.js +28 -0
  60. package/Skeleton/Skeleton.stories.js.map +1 -0
  61. package/Skeleton/index.d.ts +1 -0
  62. package/Skeleton/index.js +18 -0
  63. package/Skeleton/index.js.map +1 -0
  64. package/Switch/Switch.d.ts +1 -1
  65. package/Switch/Switch.js.map +1 -1
  66. package/Tabs/Tab.d.ts +1 -0
  67. package/Tabs/Tab.js +4 -1
  68. package/Tabs/Tab.js.map +1 -1
  69. package/Tabs/Tabs.d.ts +1 -0
  70. package/Tabs/Tabs.js +8 -1
  71. package/Tabs/Tabs.js.map +1 -1
  72. package/Tags/Tags.d.ts +8 -15
  73. package/Tags/Tags.js +83 -112
  74. package/Tags/Tags.js.map +1 -1
  75. package/Typography/Typography.d.ts +2 -2
  76. package/Typography/Typography.js.map +1 -1
  77. package/package.json +19 -17
  78. package/styles.scss +2 -3
  79. package/types.d.ts +3 -3
  80. package/types.js.map +1 -1
package/Tags/Tags.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["tagsStyle","css","position","width","left","top","zIndex","maxHeight","overflowY","backgroundColor","ul","listStyle","padding","li","Tags","inputValue","props","validation","value","disabled","onChange","description","otherInputProps","inputProps","state","setState","onKeyDown","ev","newValue","Array","isArray","keycode","push","length","splice","validationIsValid","isValid","validationMessage","message","map","item","index","React","Component"],"sources":["Tags.tsx"],"sourcesContent":["import React from \"react\";\nimport { Input, InputProps } from \"~/Input\";\nimport { Chips, Chip } from \"../Chips\";\nimport { FormComponentProps } from \"~/types\";\nimport { css } from \"emotion\";\nimport keycode from \"keycode\";\nimport { ReactComponent as BaselineCloseIcon } from \"./icons/baseline-close-24px.svg\";\nimport { FormElementMessage } from \"~/FormElementMessage\";\nimport { SyntheticEvent } from \"react\";\n\ntype TagsProps = FormComponentProps & {\n /**\n * Component label.\n */\n label?: string;\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 * Default structure of value, an object consisting of \"id\" and \"name\" keys. Different keys can be set using \"valueProp\" and \"textProp\" props.\n */\n value?: { id: string; name: string };\n\n /**\n * Callback that gets executed on change of input value.\n */\n onInput?: Function;\n\n /**\n * Callback that gets executed when the input is focused.\n */\n onFocus?: Function;\n\n /**\n * Automatically focus on the tags input.\n */\n autoFocus?: boolean;\n};\n\ninterface TagsState {\n inputValue: string;\n}\n\nconst tagsStyle = css({\n position: \"relative\",\n \".mdc-elevation--z1\": {\n position: \"absolute\",\n width: \"calc(100% - 2px)\",\n left: 1,\n top: 56,\n zIndex: 10,\n maxHeight: 200,\n overflowY: \"scroll\",\n backgroundColor: \"var(--mdc-theme-surface)\"\n },\n ul: {\n listStyle: \"none\",\n width: \"100%\",\n padding: 0,\n li: {\n padding: 10\n }\n }\n});\n\nexport class Tags extends React.Component<TagsProps, TagsState> {\n public override state = {\n inputValue: \"\"\n };\n\n public override render() {\n const { validation, value, disabled, onChange, description, ...otherInputProps } =\n this.props;\n\n const inputProps: InputProps = {\n ...otherInputProps,\n value: this.state.inputValue,\n onChange: (inputValue: string) => {\n this.setState({ inputValue });\n },\n onKeyDown: (ev: SyntheticEvent) => {\n if (!onChange) {\n return;\n }\n\n const newValue = Array.isArray(value) ? [...value] : [];\n const inputValue = this.state.inputValue || \"\";\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 this.setState({ inputValue: \"\" });\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 const { isValid: validationIsValid, message: validationMessage } = validation || {};\n\n return (\n <div className={tagsStyle}>\n <div>\n <Input {...inputProps} />\n\n {validationIsValid === false && (\n <FormElementMessage error>{validationMessage}</FormElementMessage>\n )}\n {validationIsValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\n\n {Array.isArray(value) && value.length ? (\n <Chips disabled={disabled}>\n {value.map((item, index) => (\n <Chip\n label={item}\n trailingIcon={<BaselineCloseIcon />}\n key={`${item}-${index}`}\n onRemove={() => {\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 />\n ))}\n </Chips>\n ) : null}\n </div>\n </div>\n );\n }\n}\n\nexport default Tags;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;AAsDA,IAAMA,SAAS,gBAAG,IAAAC,YAAA,EAAI;EAClBC,QAAQ,EAAE,UADQ;EAElB,sBAAsB;IAClBA,QAAQ,EAAE,UADQ;IAElBC,KAAK,EAAE,kBAFW;IAGlBC,IAAI,EAAE,CAHY;IAIlBC,GAAG,EAAE,EAJa;IAKlBC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C,S;;;eAkFjB7B,I"}
1
+ {"version":3,"names":["tagsStyle","css","position","width","left","top","zIndex","maxHeight","overflowY","backgroundColor","ul","listStyle","padding","li","Tags","props","useState","inputValue","setInputValue","validation","value","disabled","onChange","description","protectedTags","otherInputProps","isProtected","useCallback","tag","some","pattern","minimatch","inputProps","onKeyDown","ev","newValue","Array","isArray","keycode","push","length","splice","validationIsValid","isValid","validationMessage","message","map","item","index"],"sources":["Tags.tsx"],"sourcesContent":["import React, { SyntheticEvent, useCallback, useState } from \"react\";\nimport { css } from \"emotion\";\nimport keycode from \"keycode\";\nimport minimatch from \"minimatch\";\nimport { Input, InputProps } from \"~/Input\";\nimport { Chips, Chip } from \"~/Chips\";\nimport { FormComponentProps } from \"~/types\";\nimport { ReactComponent as BaselineCloseIcon } from \"./icons/baseline-close-24px.svg\";\nimport { FormElementMessage } from \"~/FormElementMessage\";\n\ninterface TagsProps extends FormComponentProps {\n /**\n * Component label.\n */\n label?: string;\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?: Function;\n\n /**\n * Callback that gets executed when the input is focused.\n */\n onFocus?: Function;\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\nconst tagsStyle = css({\n position: \"relative\",\n \".mdc-elevation--z1\": {\n position: \"absolute\",\n width: \"calc(100% - 2px)\",\n left: 1,\n top: 56,\n zIndex: 10,\n maxHeight: 200,\n overflowY: \"scroll\",\n backgroundColor: \"var(--mdc-theme-surface)\"\n },\n ul: {\n listStyle: \"none\",\n width: \"100%\",\n padding: 0,\n li: {\n padding: 10\n }\n }\n});\n\nexport const Tags: React.FC<TagsProps> = props => {\n const [inputValue, setInputValue] = useState(\"\");\n\n const {\n validation,\n value,\n disabled,\n onChange,\n description,\n protectedTags = [],\n ...otherInputProps\n } = 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 const { isValid: validationIsValid, message: validationMessage } = validation || {};\n\n return (\n <div className={tagsStyle}>\n <div>\n <Input {...inputProps} />\n\n {validationIsValid === false && (\n <FormElementMessage error>{validationMessage}</FormElementMessage>\n )}\n {validationIsValid !== false && description && (\n <FormElementMessage>{description}</FormElementMessage>\n )}\n\n {Array.isArray(value) && value.length ? (\n <Chips disabled={disabled}>\n {value.map((item, index) => {\n return (\n <Chip\n label={item}\n trailingIcon={isProtected(item) ? null : <BaselineCloseIcon />}\n key={`${item}-${index}`}\n onRemove={() => {\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 />\n );\n })}\n </Chips>\n ) : null}\n </div>\n </div>\n );\n};\n\nexport default Tags;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;AAsDA,IAAMA,SAAS,gBAAG,IAAAC,YAAA,EAAI;EAClBC,QAAQ,EAAE,UADQ;EAElB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D;MACI,KAAK,EAAED,IADX;MAEI,YAAY,EAAErB,WAAW,CAACqB,IAAD,CAAX,GAAoB,IAApB,gBAA2B,6BAAC,iCAAD,OAF7C;MAGI,GAAG,YAAKA,IAAL,cAAaC,KAAb,CAHP;MAII,QAAQ,EAAE,oBAAM;QACZ;QACA,IAAI1B,QAAJ,EAAc;UACV,IAAMa,QAAQ,oCAAOf,KAAP,CAAd;UACAe,QAAQ,CAACM,MAAT,CAAgBO,KAAhB,EAAuB,CAAvB;UACA1B,QAAQ,CAACa,QAAD,CAAR;QACH;MACJ;IAXL,EADJ;EAeH,CAhBA,CADL,CADH,GAoBG,IA9BR,CADJ,CADJ;AAoCH,CA1FM;;;eA4FQrB,I"}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { TypographyProps as RmwcTypographyProps } from "@rmwc/typography";
3
- export interface TypographyProps extends RmwcTypographyProps {
3
+ interface TypographyProps extends RmwcTypographyProps {
4
4
  children?: React.ReactNode;
5
5
  className?: string;
6
6
  style?: React.CSSProperties;
@@ -10,4 +10,4 @@ export interface TypographyProps extends RmwcTypographyProps {
10
10
  * Use Ripple component to display a list of choices, once the handler is triggered.
11
11
  */
12
12
  declare const Typography: React.FC<TypographyProps>;
13
- export { Typography };
13
+ export { Typography, TypographyProps };
@@ -1 +1 @@
1
- {"version":3,"names":["Typography","props","children"],"sources":["Typography.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Typography as RwmcTypography,\n TypographyProps as RmwcTypographyProps\n} from \"@rmwc/typography\";\n\nexport interface TypographyProps extends RmwcTypographyProps {\n children?: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n tag?: string;\n}\n\n/**\n * Use Ripple component to display a list of choices, once the handler is triggered.\n */\nconst Typography: React.FC<TypographyProps> = props => {\n return <RwmcTypography {...props}>{props.children}</RwmcTypography>;\n};\n\nexport { Typography };\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAYA;AACA;AACA;AACA,IAAMA,UAAqC,GAAG,SAAxCA,UAAwC,CAAAC,KAAK,EAAI;EACnD,oBAAO,6BAAC,sBAAD,EAAoBA,KAApB,EAA4BA,KAAK,CAACC,QAAlC,CAAP;AACH,CAFD"}
1
+ {"version":3,"names":["Typography","props","children"],"sources":["Typography.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Typography as RwmcTypography,\n TypographyProps as RmwcTypographyProps\n} from \"@rmwc/typography\";\n\ninterface TypographyProps extends RmwcTypographyProps {\n children?: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n tag?: string;\n}\n\n/**\n * Use Ripple component to display a list of choices, once the handler is triggered.\n */\nconst Typography: React.FC<TypographyProps> = props => {\n return <RwmcTypography {...props}>{props.children}</RwmcTypography>;\n};\n\nexport { Typography, TypographyProps };\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAYA;AACA;AACA;AACA,IAAMA,UAAqC,GAAG,SAAxCA,UAAwC,CAAAC,KAAK,EAAI;EACnD,oBAAO,6BAAC,sBAAD,EAAoBA,KAApB,EAA4BA,KAAK,CAACC,QAAlC,CAAP;AACH,CAFD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/ui",
3
- "version": "5.33.5",
3
+ "version": "5.34.0-beta.0",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,13 +14,14 @@
14
14
  ],
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
- "@babel/runtime": "7.18.9",
17
+ "@babel/runtime": "7.19.0",
18
18
  "@editorjs/editorjs": "2.25.0",
19
19
  "@emotion/core": "10.3.1",
20
20
  "@emotion/styled": "10.3.0",
21
21
  "@rmwc/button": "7.0.3",
22
22
  "@rmwc/checkbox": "7.0.3",
23
23
  "@rmwc/chip": "7.0.3",
24
+ "@rmwc/data-table": "7.0.3",
24
25
  "@rmwc/dialog": "7.0.3",
25
26
  "@rmwc/drawer": "7.0.3",
26
27
  "@rmwc/elevation": "7.0.3",
@@ -39,9 +40,10 @@
39
40
  "@rmwc/textfield": "7.0.3",
40
41
  "@rmwc/top-app-bar": "7.0.3",
41
42
  "@rmwc/typography": "7.0.3",
42
- "@svgr/webpack": "6.3.1",
43
+ "@svgr/webpack": "6.4.0",
44
+ "@tanstack/react-table": "8.5.22",
43
45
  "brace": "0.11.1",
44
- "classnames": "2.3.1",
46
+ "classnames": "2.3.2",
45
47
  "cropperjs": "1.5.12",
46
48
  "dot-prop-immutable": "2.1.1",
47
49
  "downshift": "2.2.3",
@@ -58,33 +60,32 @@
58
60
  "react-color": "2.19.3",
59
61
  "react-columned": "1.1.3",
60
62
  "react-custom-scrollbars": "4.2.1",
61
- "react-loading-skeleton": "0.5.0",
63
+ "react-loading-skeleton": "3.1.0",
62
64
  "react-spinner-material": "1.1.4",
63
65
  "react-transition-group": "4.4.5",
64
66
  "shortid": "2.2.16"
65
67
  },
66
68
  "devDependencies": {
67
- "@babel/cli": "^7.16.0",
68
- "@babel/core": "^7.16.0",
69
- "@babel/plugin-proposal-class-properties": "^7.16.0",
70
- "@babel/preset-env": "^7.16.4",
71
- "@babel/preset-typescript": "^7.16.0",
69
+ "@babel/cli": "^7.19.3",
70
+ "@babel/core": "^7.19.3",
71
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
72
+ "@babel/preset-env": "^7.19.4",
73
+ "@babel/preset-typescript": "^7.18.6",
72
74
  "@storybook/addon-info": "^5.2.8",
73
75
  "@storybook/addon-knobs": "^5.0.5",
74
76
  "@storybook/addon-links": "^5.0.5",
75
77
  "@storybook/react": "^5.2.8",
76
78
  "@testing-library/react": "^12.1.2",
77
- "@types/classnames": "^2.2.7",
78
79
  "@types/nprogress": "^0.2.0",
79
80
  "@types/rc-tooltip": "^3.7.2",
80
81
  "@types/react-custom-scrollbars": "^4.0.10",
81
82
  "@types/react-transition-group": "^4.4.4",
82
83
  "@types/shortid": "^0.0.29",
83
- "@webiny/cli": "^5.33.5",
84
- "@webiny/form": "^5.33.5",
85
- "@webiny/project-utils": "^5.33.5",
86
- "@webiny/storybook-utils": "^5.33.5",
87
- "@webiny/validation": "^5.33.5",
84
+ "@webiny/cli": "^5.34.0-beta.0",
85
+ "@webiny/form": "^5.34.0-beta.0",
86
+ "@webiny/project-utils": "^5.34.0-beta.0",
87
+ "@webiny/storybook-utils": "^5.34.0-beta.0",
88
+ "@webiny/validation": "^5.34.0-beta.0",
88
89
  "babel-loader": "^8.0.0-beta.6",
89
90
  "babel-plugin-emotion": "^9.2.8",
90
91
  "execa": "^5.0.0",
@@ -102,6 +103,7 @@
102
103
  "webpack": "^4.46.0"
103
104
  },
104
105
  "peerDependencies": {
106
+ "minimatch": "^5.1.0",
105
107
  "react": "^17.0.2",
106
108
  "react-dom": "^17.0.2"
107
109
  },
@@ -130,5 +132,5 @@
130
132
  ]
131
133
  }
132
134
  },
133
- "gitHead": "5063045cd2abdcdb360f97262f9b90b8858ec1df"
135
+ "gitHead": "9648454619a1bfb35040eb00f27a64ed75194e61"
134
136
  }
package/styles.scss CHANGED
@@ -11,9 +11,8 @@ $webiny-theme-light-text-primary-on-background: rgba(0, 0, 0, 0.87);
11
11
  $webiny-theme-light-text-secondary-on-background: rgba(0, 0, 0, 0.54);
12
12
  $webiny-theme-light-text-hint-on-dark: rgba(255, 255, 255, 0.5);
13
13
  $webiny-theme-light-caret-down: url("data:image/svg+xml,%3Csvg%20width%3D%2210px%22%20height%3D%225px%22%20viewBox%3D%227%2010%2010%205%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%20%20%3Cpolygon%20id%3D%22Shape%22%20stroke%3D%22none%22%20fill%3D%22%23000000%22%20fill-rule%3D%22evenodd%22%20opacity%3D%220.54%22%20points%3D%227%2010%2012%2015%2017%2010%22%3E%3C%2Fpolygon%3E%0A%3C%2Fsvg%3E");
14
-
15
- // webiny typography
16
14
  $webiny-theme-typography-font-family: "Source Sans Pro" !default;
15
+ $webiny-theme-typography-subtitle2-font-weight: 600 !default;
17
16
 
18
17
  $mdc-theme-primary: $webiny-theme-light-primary;
19
18
  $mdc-theme-on-primary: $webiny-theme-light-on-primary;
@@ -29,7 +28,7 @@ $mdc-theme-text-hint-on-dark: $webiny-theme-light-text-hint-on-dark;
29
28
  $mdc-typography-font-family: $webiny-theme-typography-font-family;
30
29
 
31
30
  @import "material-components-web/material-components-web.scss";
32
- @import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700");
31
+ @import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700|Open+Sans:300,400,600,700|Source+Code+Pro:400,700");
33
32
 
34
33
  /*
35
34
  Fix for select box appearance. For some reason browser prefix css attributes are striped away.
package/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export interface FormComponentProps {
1
+ export interface FormComponentProps<TValue = any> {
2
2
  validation?: {
3
3
  isValid: boolean;
4
4
  message: string;
@@ -7,6 +7,6 @@ export interface FormComponentProps {
7
7
  };
8
8
  };
9
9
  validate?: () => Promise<boolean | any>;
10
- value?: any;
11
- onChange?: (value: any) => void;
10
+ value?: TValue;
11
+ onChange?: (value: TValue) => void;
12
12
  }
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export interface FormComponentProps {\n validation?: {\n /* Is form element's value valid? */\n isValid: boolean;\n /* Error message if value is not valid. */\n message: string;\n /* Any validation result returned by the validator. */\n results?: { [key: string]: any };\n };\n\n /* Provided by <Form> component to perform validation when value has changed. */\n validate?: () => Promise<boolean | any>;\n\n /* Form component's value. */\n value?: any;\n\n /* A callback that is executed each time a value is changed. */\n onChange?: (value: any) => void;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export interface FormComponentProps<TValue = any> {\n validation?: {\n /* Is form element's value valid? */\n isValid: boolean;\n /* Error message if value is not valid. */\n message: string;\n /* Any validation result returned by the validator. */\n results?: { [key: string]: any };\n };\n\n /* Provided by <Form> component to perform validation when value has changed. */\n validate?: () => Promise<boolean | any>;\n\n /* Form component's value. */\n value?: TValue;\n\n /* A callback that is executed each time a value is changed. */\n onChange?: (value: TValue) => void;\n}\n"],"mappings":""}