grommet 2.55.0 → 2.56.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 (109) hide show
  1. package/components/Button/Button.js +7 -4
  2. package/components/Button/stories/CustomThemed/ChildrenPlainOption.stories.js +86 -0
  3. package/components/FormField/FormField.js +1 -1
  4. package/components/Grommet/index.d.ts +21 -0
  5. package/components/Grommet/propTypes.js +26 -0
  6. package/components/Stepper/StepConnector.js +68 -0
  7. package/components/Stepper/Stepper.js +309 -0
  8. package/components/Stepper/StepperContext.js +43 -0
  9. package/components/Stepper/StepperDescription.js +26 -0
  10. package/components/Stepper/StepperHelperText.js +44 -0
  11. package/components/Stepper/StepperIndicator.js +74 -0
  12. package/components/Stepper/StepperLabel.js +41 -0
  13. package/components/Stepper/StepperStep.js +127 -0
  14. package/components/Stepper/StyledStepper.js +124 -0
  15. package/components/Stepper/index.d.ts +80 -0
  16. package/components/Stepper/index.js +18 -0
  17. package/components/Stepper/propTypes.js +35 -0
  18. package/components/Stepper/stories/DisabledSteps.stories.js +45 -0
  19. package/components/Stepper/stories/ErrorStates.stories.js +45 -0
  20. package/components/Stepper/stories/HorizontalSteps.stories.js +50 -0
  21. package/components/Stepper/stories/Interactive.stories.js +60 -0
  22. package/components/Stepper/stories/KeyboardNavigation.stories.js +64 -0
  23. package/components/Stepper/stories/NestedSubSteps.stories.js +70 -0
  24. package/components/Stepper/stories/ReadOnly.stories.js +43 -0
  25. package/components/Stepper/stories/ThemingLightDark.stories.js +58 -0
  26. package/components/Stepper/stories/VerticalSteps.stories.js +67 -0
  27. package/components/Tab/Tab.js +19 -6
  28. package/components/Tabs/Tabs.js +156 -22
  29. package/components/TimeInput/README.md +2 -0
  30. package/components/TimeInput/StyledTimeInput.js +73 -0
  31. package/components/TimeInput/TimeInput.js +689 -0
  32. package/components/TimeInput/TimeInputPopup.js +393 -0
  33. package/components/TimeInput/index.d.ts +41 -0
  34. package/components/TimeInput/index.js +6 -0
  35. package/components/TimeInput/propTypes.js +35 -0
  36. package/components/TimeInput/stories/Controlled.stories.tsx +29 -0
  37. package/components/TimeInput/stories/Disabled.stories.tsx +13 -0
  38. package/components/TimeInput/stories/Form.stories.tsx +38 -0
  39. package/components/TimeInput/stories/ReadOnly.stories.tsx +13 -0
  40. package/components/TimeInput/stories/Simple.stories.tsx +19 -0
  41. package/components/TimeInput/stories/Step.stories.tsx +14 -0
  42. package/components/TimeInput/stories/ThemingLightDark.stories.tsx +22 -0
  43. package/components/TimeInput/stories/Uncontrolled.stories.tsx +22 -0
  44. package/components/TimeInput/useSectionedTimeField.js +359 -0
  45. package/components/TimeInput/utils.js +187 -0
  46. package/components/index.d.ts +2 -0
  47. package/components/index.js +12 -0
  48. package/es6/components/Button/Button.js +7 -4
  49. package/es6/components/Button/stories/CustomThemed/ChildrenPlainOption.stories.js +81 -0
  50. package/es6/components/FormField/FormField.js +1 -1
  51. package/es6/components/Grommet/index.d.ts +21 -0
  52. package/es6/components/Grommet/propTypes.js +26 -0
  53. package/es6/components/Stepper/StepConnector.js +63 -0
  54. package/es6/components/Stepper/Stepper.js +306 -0
  55. package/es6/components/Stepper/StepperContext.js +39 -0
  56. package/es6/components/Stepper/StepperDescription.js +21 -0
  57. package/es6/components/Stepper/StepperHelperText.js +39 -0
  58. package/es6/components/Stepper/StepperIndicator.js +69 -0
  59. package/es6/components/Stepper/StepperLabel.js +36 -0
  60. package/es6/components/Stepper/StepperStep.js +122 -0
  61. package/es6/components/Stepper/StyledStepper.js +120 -0
  62. package/es6/components/Stepper/index.d.ts +80 -0
  63. package/es6/components/Stepper/index.js +6 -0
  64. package/es6/components/Stepper/propTypes.js +30 -0
  65. package/es6/components/Stepper/stories/DisabledSteps.stories.js +41 -0
  66. package/es6/components/Stepper/stories/ErrorStates.stories.js +41 -0
  67. package/es6/components/Stepper/stories/HorizontalSteps.stories.js +46 -0
  68. package/es6/components/Stepper/stories/Interactive.stories.js +56 -0
  69. package/es6/components/Stepper/stories/KeyboardNavigation.stories.js +60 -0
  70. package/es6/components/Stepper/stories/NestedSubSteps.stories.js +66 -0
  71. package/es6/components/Stepper/stories/ReadOnly.stories.js +39 -0
  72. package/es6/components/Stepper/stories/ThemingLightDark.stories.js +54 -0
  73. package/es6/components/Stepper/stories/VerticalSteps.stories.js +63 -0
  74. package/es6/components/Tab/Tab.js +19 -6
  75. package/es6/components/Tabs/Tabs.js +157 -23
  76. package/es6/components/TimeInput/README.md +2 -0
  77. package/es6/components/TimeInput/StyledTimeInput.js +68 -0
  78. package/es6/components/TimeInput/TimeInput.js +685 -0
  79. package/es6/components/TimeInput/TimeInputPopup.js +389 -0
  80. package/es6/components/TimeInput/index.d.ts +41 -0
  81. package/es6/components/TimeInput/index.js +1 -0
  82. package/es6/components/TimeInput/propTypes.js +30 -0
  83. package/es6/components/TimeInput/stories/Controlled.stories.tsx +29 -0
  84. package/es6/components/TimeInput/stories/Disabled.stories.tsx +13 -0
  85. package/es6/components/TimeInput/stories/Form.stories.tsx +38 -0
  86. package/es6/components/TimeInput/stories/ReadOnly.stories.tsx +13 -0
  87. package/es6/components/TimeInput/stories/Simple.stories.tsx +19 -0
  88. package/es6/components/TimeInput/stories/Step.stories.tsx +14 -0
  89. package/es6/components/TimeInput/stories/ThemingLightDark.stories.tsx +22 -0
  90. package/es6/components/TimeInput/stories/Uncontrolled.stories.tsx +22 -0
  91. package/es6/components/TimeInput/useSectionedTimeField.js +356 -0
  92. package/es6/components/TimeInput/utils.js +183 -0
  93. package/es6/components/index.d.ts +2 -0
  94. package/es6/components/index.js +2 -0
  95. package/es6/index.d.ts +2 -0
  96. package/es6/languages/default.json +20 -0
  97. package/es6/themes/base.d.ts +108 -0
  98. package/es6/themes/base.js +208 -0
  99. package/grommet.min.js +1 -1
  100. package/grommet.min.js.map +1 -1
  101. package/index.d.ts +2 -0
  102. package/languages/default.json +20 -0
  103. package/package.json +41 -40
  104. package/themes/base.d.ts +108 -0
  105. package/themes/base.js +208 -0
  106. package/components/TextInput/stories/CustomThemed/CustomSuggestions.stories.tsx +0 -180
  107. package/components/TextInput/stories/CustomThemed/Themed.stories.js +0 -79
  108. package/es6/components/TextInput/stories/CustomThemed/CustomSuggestions.stories.tsx +0 -180
  109. package/es6/components/TextInput/stories/CustomThemed/Themed.stories.js +0 -74
@@ -1,180 +0,0 @@
1
- import React, { useCallback, useMemo, useRef, useState } from 'react';
2
-
3
- import { Search } from 'grommet-icons';
4
- import { Box, Grommet, Image, Text, TextInput } from 'grommet';
5
- import { grommet, ThemeType } from 'grommet/themes';
6
- import { deepMerge } from 'grommet/utils';
7
-
8
- // Type annotations can only be used in TypeScript files.
9
- // Remove ': ThemeType' if you are not using Typescript.
10
- const myCustomTheme: ThemeType = deepMerge(grommet, {
11
- global: {
12
- drop: {
13
- background: '#444444',
14
- shadowSize: 'medium',
15
- extend: `
16
- border-bottom-left-radius: 12px;
17
- border-bottom-right-radius: 12px;
18
- overflow: hidden;
19
- `,
20
- },
21
- elevation: {
22
- dark: {
23
- medium: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',
24
- },
25
- light: {
26
- medium: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',
27
- },
28
- },
29
- font: {
30
- size: '14px',
31
- family: 'Arial',
32
- },
33
- input: {
34
- weight: 400,
35
- },
36
- },
37
- });
38
-
39
- const folks = [
40
- {
41
- name: 'Alan Souza',
42
- imageUrl:
43
- 'https://s.gravatar.com/avatar/b226da5c619b18b44eb95c30be393953?s=80',
44
- },
45
- {
46
- name: 'Bryan Jacquot',
47
- imageUrl:
48
- 'https://s.gravatar.com/avatar/10d15019166606cfed23846a7f902660?s=80',
49
- },
50
- {
51
- name: 'Chris Carlozzi',
52
- imageUrl:
53
- 'https://s.gravatar.com/avatar/56ea1e2ecd0d3cc85479b2d09e31d071?s=80',
54
- },
55
- {
56
- name: 'Eric Soderberg',
57
- imageUrl:
58
- 'https://s.gravatar.com/avatar/99020cae7ff399a4fbea19c0634f77c3?s=80',
59
- },
60
- {
61
- name: 'Marlon Parizzotto',
62
- imageUrl:
63
- 'https://s.gravatar.com/avatar/e6684969375a4dcc0aa99f0bfae544c3?s=80',
64
- },
65
- {
66
- name: 'Tales Chaves',
67
- imageUrl:
68
- 'https://s.gravatar.com/avatar/1f80adca55d9f5d97932ff97f631a4e8?s=80',
69
- },
70
- {
71
- name: 'Tracy Barmore',
72
- imageUrl:
73
- 'https://s.gravatar.com/avatar/4ec9c3a91da89f278e4482811caad7f3?s=80',
74
- },
75
- ];
76
-
77
- const formatSuggestions = (suggestedFolks, value) =>
78
- suggestedFolks
79
- .filter(({ name }) => name.toLowerCase().indexOf(value.toLowerCase()) >= 0)
80
- .map(({ name, imageUrl }, index, list) => ({
81
- label: (
82
- <Box
83
- direction="row"
84
- align="center"
85
- gap="small"
86
- border={index < list.length - 1 ? 'bottom' : undefined}
87
- pad="small"
88
- >
89
- <Image width="48px" src={imageUrl} style={{ borderRadius: '100%' }} />
90
- <Text>
91
- <strong>{name}</strong>
92
- </Text>
93
- </Box>
94
- ),
95
- value: name,
96
- }));
97
-
98
- export const CustomSuggestions = () => {
99
- const [value, setValue] = useState('');
100
- const [suggestionOpen, setSuggestionOpen] = useState(false);
101
- const [suggestions, setSuggestions] = useState([]);
102
- const boxRef = useRef(undefined);
103
-
104
- const onChange = useCallback((event) => {
105
- const { value: newValue } = event.target;
106
- setValue(newValue);
107
-
108
- if (!newValue.trim()) {
109
- setSuggestions([]);
110
- } else {
111
- // simulate an async call to the backend
112
- setTimeout(() => {
113
- setSuggestions(formatSuggestions(folks, newValue));
114
- }, 300);
115
- }
116
- }, []);
117
-
118
- const onSuggestionSelect = useCallback(
119
- (event) => setValue(event.suggestion.value),
120
- [],
121
- );
122
-
123
- const onSuggestionsOpen = useCallback(() => {
124
- setSuggestions(formatSuggestions(folks, value));
125
- setSuggestionOpen(true);
126
- }, [value]);
127
-
128
- const onSuggestionsClose = useCallback(() => {
129
- setSuggestions([]);
130
- setSuggestionOpen(false);
131
- }, []);
132
-
133
- return (
134
- <Grommet full theme={myCustomTheme}>
135
- <Box background="dark-1" fill align="center" pad={{ top: 'large' }}>
136
- <Box
137
- ref={boxRef}
138
- width="large"
139
- direction="row"
140
- align="center"
141
- pad={{ horizontal: 'small', vertical: 'xsmall' }}
142
- round="small"
143
- elevation={suggestionOpen ? 'medium' : undefined}
144
- border={{
145
- side: 'all',
146
- color: suggestionOpen ? 'transparent' : 'border',
147
- }}
148
- style={
149
- suggestionOpen
150
- ? {
151
- borderBottomLeftRadius: '0px',
152
- borderBottomRightRadius: '0px',
153
- }
154
- : undefined
155
- }
156
- >
157
- <Search color="brand" />
158
- <TextInput
159
- id="grommet-custom-suggestions"
160
- dropTarget={boxRef.current}
161
- placeholder="Enter your name..."
162
- plain
163
- suggestions={suggestions}
164
- value={value}
165
- onChange={onChange}
166
- onSuggestionsOpen={onSuggestionsOpen}
167
- onSuggestionsClose={onSuggestionsClose}
168
- onSuggestionSelect={onSuggestionSelect}
169
- />
170
- </Box>
171
- </Box>
172
- </Grommet>
173
- );
174
- };
175
-
176
- CustomSuggestions.storyName = 'Custom suggestions';
177
-
178
- export default {
179
- title: 'Input/TextInput/Custom Themed/Custom suggestions',
180
- };
@@ -1,79 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports["default"] = exports.Themed = void 0;
5
- var _react = _interopRequireDefault(require("react"));
6
- var _grommet = require("grommet");
7
- var _themes = require("grommet/themes");
8
- var _utils = require("grommet/utils");
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
- var suggestions = Array(100).fill().map(function (_, i) {
11
- return "suggestion " + (i + 1);
12
- });
13
- var customTheme = (0, _utils.deepMerge)(_themes.grommet, {
14
- global: {
15
- input: {
16
- padding: {
17
- horizontal: 'small',
18
- vertical: 'medium'
19
- }
20
- }
21
- },
22
- textInput: {
23
- extend: function extend() {
24
- return "\n font-size: 20px;\n background: #c9c19f;\n width: 300px;\n margin: 0 auto;\n\n &:focus {\n box-shadow: none;\n border-color: initial;\n }\n ";
25
- },
26
- container: {
27
- extend: function extend() {
28
- return "\n background: #edf7d2;\n height: 100px;\n width: 400px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n border-radius: 10px;\n ";
29
- }
30
- },
31
- placeholder: {
32
- extend: function extend() {
33
- return "\n width: 100%;\n color: #1e1a11;\n ";
34
- }
35
- },
36
- suggestions: {
37
- extend: function extend() {
38
- return "\n background: #c9c19f;\n color: #3d3522;\n li {\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n }\n ";
39
- }
40
- }
41
- }
42
- });
43
- var Themed = exports.Themed = function Themed() {
44
- var _React$useState = _react["default"].useState(''),
45
- value = _React$useState[0],
46
- setValue = _React$useState[1];
47
- var onChange = function onChange(event) {
48
- return setValue(event.target.value);
49
- };
50
- var onSelect = function onSelect(event) {
51
- return setValue(event.suggestion);
52
- };
53
- return /*#__PURE__*/_react["default"].createElement(_grommet.Grommet, {
54
- full: true,
55
- theme: customTheme
56
- }, /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
57
- fill: true,
58
- align: "center",
59
- justify: "start",
60
- pad: "large"
61
- }, /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
62
- width: "medium"
63
- }, /*#__PURE__*/_react["default"].createElement(_grommet.TextInput, {
64
- id: "grommet-password",
65
- type: "password",
66
- value: value,
67
- dropProps: {
68
- height: 'small'
69
- },
70
- onChange: onChange,
71
- onSelect: onSelect,
72
- suggestions: suggestions,
73
- placeholder: /*#__PURE__*/_react["default"].createElement("span", null, "Enter something..."),
74
- "aria-label": "Input Text"
75
- }))));
76
- };
77
- var _default = exports["default"] = {
78
- title: 'Input/TextInput/Custom Themed/Themed'
79
- };
@@ -1,180 +0,0 @@
1
- import React, { useCallback, useMemo, useRef, useState } from 'react';
2
-
3
- import { Search } from 'grommet-icons';
4
- import { Box, Grommet, Image, Text, TextInput } from 'grommet';
5
- import { grommet, ThemeType } from 'grommet/themes';
6
- import { deepMerge } from 'grommet/utils';
7
-
8
- // Type annotations can only be used in TypeScript files.
9
- // Remove ': ThemeType' if you are not using Typescript.
10
- const myCustomTheme: ThemeType = deepMerge(grommet, {
11
- global: {
12
- drop: {
13
- background: '#444444',
14
- shadowSize: 'medium',
15
- extend: `
16
- border-bottom-left-radius: 12px;
17
- border-bottom-right-radius: 12px;
18
- overflow: hidden;
19
- `,
20
- },
21
- elevation: {
22
- dark: {
23
- medium: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',
24
- },
25
- light: {
26
- medium: '0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23)',
27
- },
28
- },
29
- font: {
30
- size: '14px',
31
- family: 'Arial',
32
- },
33
- input: {
34
- weight: 400,
35
- },
36
- },
37
- });
38
-
39
- const folks = [
40
- {
41
- name: 'Alan Souza',
42
- imageUrl:
43
- 'https://s.gravatar.com/avatar/b226da5c619b18b44eb95c30be393953?s=80',
44
- },
45
- {
46
- name: 'Bryan Jacquot',
47
- imageUrl:
48
- 'https://s.gravatar.com/avatar/10d15019166606cfed23846a7f902660?s=80',
49
- },
50
- {
51
- name: 'Chris Carlozzi',
52
- imageUrl:
53
- 'https://s.gravatar.com/avatar/56ea1e2ecd0d3cc85479b2d09e31d071?s=80',
54
- },
55
- {
56
- name: 'Eric Soderberg',
57
- imageUrl:
58
- 'https://s.gravatar.com/avatar/99020cae7ff399a4fbea19c0634f77c3?s=80',
59
- },
60
- {
61
- name: 'Marlon Parizzotto',
62
- imageUrl:
63
- 'https://s.gravatar.com/avatar/e6684969375a4dcc0aa99f0bfae544c3?s=80',
64
- },
65
- {
66
- name: 'Tales Chaves',
67
- imageUrl:
68
- 'https://s.gravatar.com/avatar/1f80adca55d9f5d97932ff97f631a4e8?s=80',
69
- },
70
- {
71
- name: 'Tracy Barmore',
72
- imageUrl:
73
- 'https://s.gravatar.com/avatar/4ec9c3a91da89f278e4482811caad7f3?s=80',
74
- },
75
- ];
76
-
77
- const formatSuggestions = (suggestedFolks, value) =>
78
- suggestedFolks
79
- .filter(({ name }) => name.toLowerCase().indexOf(value.toLowerCase()) >= 0)
80
- .map(({ name, imageUrl }, index, list) => ({
81
- label: (
82
- <Box
83
- direction="row"
84
- align="center"
85
- gap="small"
86
- border={index < list.length - 1 ? 'bottom' : undefined}
87
- pad="small"
88
- >
89
- <Image width="48px" src={imageUrl} style={{ borderRadius: '100%' }} />
90
- <Text>
91
- <strong>{name}</strong>
92
- </Text>
93
- </Box>
94
- ),
95
- value: name,
96
- }));
97
-
98
- export const CustomSuggestions = () => {
99
- const [value, setValue] = useState('');
100
- const [suggestionOpen, setSuggestionOpen] = useState(false);
101
- const [suggestions, setSuggestions] = useState([]);
102
- const boxRef = useRef(undefined);
103
-
104
- const onChange = useCallback((event) => {
105
- const { value: newValue } = event.target;
106
- setValue(newValue);
107
-
108
- if (!newValue.trim()) {
109
- setSuggestions([]);
110
- } else {
111
- // simulate an async call to the backend
112
- setTimeout(() => {
113
- setSuggestions(formatSuggestions(folks, newValue));
114
- }, 300);
115
- }
116
- }, []);
117
-
118
- const onSuggestionSelect = useCallback(
119
- (event) => setValue(event.suggestion.value),
120
- [],
121
- );
122
-
123
- const onSuggestionsOpen = useCallback(() => {
124
- setSuggestions(formatSuggestions(folks, value));
125
- setSuggestionOpen(true);
126
- }, [value]);
127
-
128
- const onSuggestionsClose = useCallback(() => {
129
- setSuggestions([]);
130
- setSuggestionOpen(false);
131
- }, []);
132
-
133
- return (
134
- <Grommet full theme={myCustomTheme}>
135
- <Box background="dark-1" fill align="center" pad={{ top: 'large' }}>
136
- <Box
137
- ref={boxRef}
138
- width="large"
139
- direction="row"
140
- align="center"
141
- pad={{ horizontal: 'small', vertical: 'xsmall' }}
142
- round="small"
143
- elevation={suggestionOpen ? 'medium' : undefined}
144
- border={{
145
- side: 'all',
146
- color: suggestionOpen ? 'transparent' : 'border',
147
- }}
148
- style={
149
- suggestionOpen
150
- ? {
151
- borderBottomLeftRadius: '0px',
152
- borderBottomRightRadius: '0px',
153
- }
154
- : undefined
155
- }
156
- >
157
- <Search color="brand" />
158
- <TextInput
159
- id="grommet-custom-suggestions"
160
- dropTarget={boxRef.current}
161
- placeholder="Enter your name..."
162
- plain
163
- suggestions={suggestions}
164
- value={value}
165
- onChange={onChange}
166
- onSuggestionsOpen={onSuggestionsOpen}
167
- onSuggestionsClose={onSuggestionsClose}
168
- onSuggestionSelect={onSuggestionSelect}
169
- />
170
- </Box>
171
- </Box>
172
- </Grommet>
173
- );
174
- };
175
-
176
- CustomSuggestions.storyName = 'Custom suggestions';
177
-
178
- export default {
179
- title: 'Input/TextInput/Custom Themed/Custom suggestions',
180
- };
@@ -1,74 +0,0 @@
1
- import React from 'react';
2
- import { Box, Grommet, TextInput } from 'grommet';
3
- import { grommet } from 'grommet/themes';
4
- import { deepMerge } from 'grommet/utils';
5
- var suggestions = Array(100).fill().map(function (_, i) {
6
- return "suggestion " + (i + 1);
7
- });
8
- var customTheme = deepMerge(grommet, {
9
- global: {
10
- input: {
11
- padding: {
12
- horizontal: 'small',
13
- vertical: 'medium'
14
- }
15
- }
16
- },
17
- textInput: {
18
- extend: function extend() {
19
- return "\n font-size: 20px;\n background: #c9c19f;\n width: 300px;\n margin: 0 auto;\n\n &:focus {\n box-shadow: none;\n border-color: initial;\n }\n ";
20
- },
21
- container: {
22
- extend: function extend() {
23
- return "\n background: #edf7d2;\n height: 100px;\n width: 400px;\n display: flex;\n flex-flow: column;\n justify-content: center;\n border-radius: 10px;\n ";
24
- }
25
- },
26
- placeholder: {
27
- extend: function extend() {
28
- return "\n width: 100%;\n color: #1e1a11;\n ";
29
- }
30
- },
31
- suggestions: {
32
- extend: function extend() {
33
- return "\n background: #c9c19f;\n color: #3d3522;\n li {\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n }\n ";
34
- }
35
- }
36
- }
37
- });
38
- export var Themed = function Themed() {
39
- var _React$useState = React.useState(''),
40
- value = _React$useState[0],
41
- setValue = _React$useState[1];
42
- var onChange = function onChange(event) {
43
- return setValue(event.target.value);
44
- };
45
- var onSelect = function onSelect(event) {
46
- return setValue(event.suggestion);
47
- };
48
- return /*#__PURE__*/React.createElement(Grommet, {
49
- full: true,
50
- theme: customTheme
51
- }, /*#__PURE__*/React.createElement(Box, {
52
- fill: true,
53
- align: "center",
54
- justify: "start",
55
- pad: "large"
56
- }, /*#__PURE__*/React.createElement(Box, {
57
- width: "medium"
58
- }, /*#__PURE__*/React.createElement(TextInput, {
59
- id: "grommet-password",
60
- type: "password",
61
- value: value,
62
- dropProps: {
63
- height: 'small'
64
- },
65
- onChange: onChange,
66
- onSelect: onSelect,
67
- suggestions: suggestions,
68
- placeholder: /*#__PURE__*/React.createElement("span", null, "Enter something..."),
69
- "aria-label": "Input Text"
70
- }))));
71
- };
72
- export default {
73
- title: 'Input/TextInput/Custom Themed/Themed'
74
- };