@pingux/astro 2.166.1-alpha.5 → 2.167.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.
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +6 -5
- package/lib/cjs/components/ComboBoxField/ComboBoxField.test.js +434 -332
- package/lib/cjs/components/Modal/Modal.stories.d.ts +1 -0
- package/lib/cjs/components/Modal/Modal.stories.js +32 -11
- package/lib/components/ComboBoxField/ComboBoxField.js +6 -5
- package/lib/components/ComboBoxField/ComboBoxField.test.js +434 -332
- package/lib/components/Modal/Modal.stories.js +32 -11
- package/lib/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import React, { useState } from 'react';
|
|
|
4
4
|
import { withDesign } from 'storybook-addon-designs';
|
|
5
5
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
|
6
6
|
import { useGetTheme, useModalState } from '../../hooks';
|
|
7
|
-
import { Box, Button, Item, Menu, Modal, ModalBody, ModalFooter, ModalHeader, OverlayProvider, PopoverMenu, RadioField, RadioGroupField, SearchField, SelectField, Text } from '../../index';
|
|
7
|
+
import { Box, Button, ComboBoxField, Item, Menu, Modal, ModalBody, ModalFooter, ModalHeader, OverlayProvider, PopoverMenu, RadioField, RadioGroupField, SearchField, SelectField, Text } from '../../index';
|
|
8
8
|
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
|
9
9
|
import { modalSizes } from '../../utils/devUtils/constants/modalSizes';
|
|
10
10
|
import ModalReadme from './Modal.mdx';
|
|
@@ -88,6 +88,16 @@ export default {
|
|
|
88
88
|
hasAutoFocus: true
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
|
+
var items = [{
|
|
92
|
+
key: 'apple',
|
|
93
|
+
name: 'Apple'
|
|
94
|
+
}, {
|
|
95
|
+
key: 'banana',
|
|
96
|
+
name: 'Banana'
|
|
97
|
+
}, {
|
|
98
|
+
key: 'blueberry',
|
|
99
|
+
name: 'Blueberry'
|
|
100
|
+
}];
|
|
91
101
|
export var Default = function Default(args) {
|
|
92
102
|
var state = useModalState();
|
|
93
103
|
return (
|
|
@@ -179,16 +189,6 @@ export var WithInputField = function WithInputField() {
|
|
|
179
189
|
_useState2 = _slicedToArray(_useState, 2),
|
|
180
190
|
value = _useState2[0],
|
|
181
191
|
setValue = _useState2[1];
|
|
182
|
-
var items = [{
|
|
183
|
-
key: 'apple',
|
|
184
|
-
name: 'Apple'
|
|
185
|
-
}, {
|
|
186
|
-
key: 'banana',
|
|
187
|
-
name: 'Banana'
|
|
188
|
-
}, {
|
|
189
|
-
key: 'blueberry',
|
|
190
|
-
name: 'Blueberry'
|
|
191
|
-
}];
|
|
192
192
|
return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Button, {
|
|
193
193
|
onPress: state.open,
|
|
194
194
|
"aria-label": "Open modal"
|
|
@@ -276,4 +276,25 @@ export var WithPopoverMenu = function WithPopoverMenu() {
|
|
|
276
276
|
}, ___EmotionJSX(Text, {
|
|
277
277
|
color: "critical.bright"
|
|
278
278
|
}, "Delete"))))))));
|
|
279
|
+
};
|
|
280
|
+
export var WithComboBoxField = function WithComboBoxField() {
|
|
281
|
+
var state = useModalState();
|
|
282
|
+
return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Button, {
|
|
283
|
+
onPress: state.open,
|
|
284
|
+
"aria-label": "Open modal"
|
|
285
|
+
}, "Open Modal"), state.isOpen && ___EmotionJSX(Modal, {
|
|
286
|
+
isOpen: state.isOpen,
|
|
287
|
+
onClose: state.close
|
|
288
|
+
}, ___EmotionJSX(ModalBody, null, ___EmotionJSX(Box, {
|
|
289
|
+
gap: "lg"
|
|
290
|
+
}, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet consectetur"), ___EmotionJSX(ComboBoxField, {
|
|
291
|
+
items: items,
|
|
292
|
+
label: "ComboBox Label",
|
|
293
|
+
placeholder: "Select an item"
|
|
294
|
+
}, function (item) {
|
|
295
|
+
return ___EmotionJSX(Item, {
|
|
296
|
+
key: item.name,
|
|
297
|
+
"data-id": item.name
|
|
298
|
+
}, item.name);
|
|
299
|
+
})))));
|
|
279
300
|
};
|