@pingux/astro 2.208.3 → 2.209.0-alpha.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/AIComponents/AIPanel/AIPanel.stories.js +3 -1
- package/lib/cjs/components/AIComponents/AIPanel/aiPanelAttributes.d.ts +17 -0
- package/lib/cjs/components/AIComponents/AIPanel/aiPanelAttributes.js +42 -0
- package/lib/cjs/components/AIComponents/Prompt/Prompt.stories.js +7 -1
- package/lib/cjs/components/AIComponents/Response/Response.stories.js +3 -1
- package/lib/cjs/components/AIComponents/Response/responseAttributes.d.ts +20 -0
- package/lib/cjs/components/AIComponents/Response/responseAttributes.js +27 -0
- package/lib/cjs/components/AIComponents/Suggestions/Suggestions.stories.js +17 -1
- package/lib/cjs/components/AccordionGroup/AccordionGroup.stories.js +4 -23
- package/lib/cjs/components/AccordionGroup/accordionGroupAttributes.d.ts +21 -0
- package/lib/cjs/components/AccordionGroup/accordionGroupAttributes.js +29 -0
- package/lib/cjs/components/ArrayField/ArrayField.stories.js +2 -28
- package/lib/cjs/components/ArrayField/arrayFieldAttributes.d.ts +99 -0
- package/lib/cjs/components/ArrayField/arrayFieldAttributes.js +46 -0
- package/lib/cjs/components/AstroProvider/AstroProvider.stories.js +21 -1
- package/lib/cjs/components/Avatar/Avatar.stories.js +2 -23
- package/lib/cjs/components/Avatar/avatarAttributes.d.ts +23 -0
- package/lib/cjs/components/Avatar/avatarAttributes.js +30 -0
- package/lib/cjs/components/Bracket/Bracket.stories.js +2 -25
- package/lib/cjs/components/Bracket/bracketAttributes.d.ts +25 -0
- package/lib/cjs/components/Bracket/bracketAttributes.js +32 -0
- package/lib/cjs/components/CheckboxField/CheckboxField.stories.js +2 -34
- package/lib/cjs/components/CheckboxField/checkboxFieldAttributes.d.ts +1 -0
- package/lib/cjs/components/CheckboxField/checkboxFieldAttributes.js +52 -0
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +12 -12
- package/lib/cjs/components/CollapsiblePanel/collapsiblePanelAttributes.d.ts +12 -0
- package/lib/cjs/components/CollapsiblePanel/collapsiblePanelAttributes.js +19 -0
- package/lib/cjs/components/ColorField/ColorField.stories.js +2 -26
- package/lib/cjs/components/ColorField/colorFieldAttributes.d.ts +1 -0
- package/lib/cjs/components/ColorField/colorFieldAttributes.js +44 -0
- package/lib/cjs/components/DataTable/DataTable.stories.js +3 -101
- package/lib/cjs/components/DataTable/dataTableAttributes.d.ts +162 -0
- package/lib/cjs/components/DataTable/dataTableAttributes.js +109 -0
- package/lib/cjs/components/ExpandableText/ExpandableText.stories.js +13 -1
- package/lib/cjs/components/ExpandableText/expandableTextAttributes.d.ts +26 -0
- package/lib/cjs/components/ExpandableText/expandableTextAttributes.js +33 -0
- package/lib/cjs/components/Footer/Footer.stories.js +6 -0
- package/lib/cjs/components/Grid/Grid.stories.js +2 -19
- package/lib/cjs/components/Grid/gridAttributes.d.ts +19 -0
- package/lib/cjs/components/Grid/gridAttributes.js +26 -0
- package/lib/cjs/components/IconBadge/IconBadge.stories.js +32 -1
- package/lib/cjs/components/IconButtonToggle/IconButtonToggle.stories.js +3 -1
- package/lib/cjs/components/IconButtonToggle/iconButtonToggleAttributes.d.ts +40 -0
- package/lib/cjs/components/IconButtonToggle/iconButtonToggleAttributes.js +63 -0
- package/lib/cjs/components/Image/Image.stories.js +2 -16
- package/lib/cjs/components/Image/imageAttributes.d.ts +15 -0
- package/lib/cjs/components/Image/imageAttributes.js +23 -0
- package/lib/cjs/components/Input/Input.stories.js +12 -6
- package/lib/cjs/components/Input/inputAttributes.d.ts +6 -0
- package/lib/cjs/components/Input/inputAttributes.js +13 -0
- package/lib/cjs/components/Label/Label.stories.js +2 -13
- package/lib/cjs/components/Label/labelAttributes.d.ts +17 -0
- package/lib/cjs/components/Label/labelAttributes.js +21 -0
- package/lib/cjs/components/Link/Link.stories.js +2 -33
- package/lib/cjs/components/Link/linkAttributes.d.ts +28 -0
- package/lib/cjs/components/Link/linkAttributes.js +41 -0
- package/lib/cjs/components/ListView/stories/ListViewOnyxDark.stories.js +51 -1
- package/lib/cjs/components/ListView/stories/listViewOnyxDarkAttributes.d.ts +31 -0
- package/lib/cjs/components/ListView/stories/listViewOnyxDarkAttributes.js +58 -0
- package/lib/cjs/components/Modal/Convenience/ModalBody.stories.js +13 -1
- package/lib/cjs/components/Modal/Convenience/ModalFooter.stories.js +13 -1
- package/lib/cjs/components/Modal/Convenience/ModalHeader.stories.js +13 -1
- package/lib/cjs/components/Modal/Convenience/modalBodyAttributes.d.ts +21 -0
- package/lib/cjs/components/Modal/Convenience/modalBodyAttributes.js +42 -0
- package/lib/cjs/components/Modal/Convenience/modalFooterAttributes.d.ts +28 -0
- package/lib/cjs/components/Modal/Convenience/modalFooterAttributes.js +51 -0
- package/lib/cjs/components/Modal/Convenience/modalHeaderAttributes.d.ts +35 -0
- package/lib/cjs/components/Modal/Convenience/modalHeaderAttributes.js +60 -0
- package/lib/cjs/components/Modal/Modal.stories.js +13 -58
- package/lib/cjs/components/Modal/modalAttributes.d.ts +55 -0
- package/lib/cjs/components/Modal/modalAttributes.js +63 -0
- package/lib/cjs/components/NavBar/NavBar.stories.js +13 -2
- package/lib/cjs/components/NavBar/navBarAttributes.d.ts +30 -0
- package/lib/cjs/components/NavBar/navBarAttributes.js +55 -0
- package/lib/cjs/components/NavBar/stories/NavBar.Onyx.stories.js +13 -1
- package/lib/cjs/components/NavBar/stories/navBarOnyxAttributes.d.ts +24 -0
- package/lib/cjs/components/NavBar/stories/navBarOnyxAttributes.js +49 -0
- package/lib/cjs/components/Pagination/Pagination.stories.js +2 -24
- package/lib/cjs/components/Pagination/paginationAttributes.d.ts +24 -0
- package/lib/cjs/components/Pagination/paginationAttributes.js +31 -0
- package/lib/cjs/components/PhoneNumberField/PhoneNumberField.d.ts +4 -0
- package/lib/cjs/components/PhoneNumberField/PhoneNumberField.js +299 -0
- package/lib/cjs/components/PhoneNumberField/PhoneNumberField.mdx +32 -0
- package/lib/cjs/components/PhoneNumberField/PhoneNumberField.stories.js +136 -0
- package/lib/cjs/components/PhoneNumberField/PhoneNumberField.test.js +158 -0
- package/lib/cjs/components/PhoneNumberField/index.d.ts +1 -0
- package/lib/cjs/components/PhoneNumberField/index.js +14 -0
- package/lib/cjs/components/PopoverMenu/PopoverMenu.stories.js +2 -13
- package/lib/cjs/components/PopoverMenu/popoverMenuAttributes.d.ts +13 -0
- package/lib/cjs/components/PopoverMenu/popoverMenuAttributes.js +20 -0
- package/lib/cjs/components/ProgressBar/ProgressBar.stories.js +2 -27
- package/lib/cjs/components/ProgressBar/progressBarAttributes.d.ts +42 -0
- package/lib/cjs/components/ProgressBar/progressBarAttributes.js +65 -0
- package/lib/cjs/components/RadioGroupField/RadioGroupField.stories.js +2 -28
- package/lib/cjs/components/RadioGroupField/radioGroupFieldAttributes.d.ts +1 -0
- package/lib/cjs/components/RadioGroupField/radioGroupFieldAttributes.js +46 -0
- package/lib/cjs/components/RangeCalendar/RangeCalendar.stories.js +4 -13
- package/lib/cjs/components/RangeCalendar/rangeCalendarAttributes.d.ts +121 -0
- package/lib/cjs/components/RangeCalendar/rangeCalendarAttributes.js +91 -0
- package/lib/cjs/components/SearchField/SearchField.stories.js +2 -27
- package/lib/cjs/components/SearchField/searchFieldAttributes.d.ts +1 -0
- package/lib/cjs/components/SearchField/searchFieldAttributes.js +45 -0
- package/lib/cjs/components/SelectField/SelectField.stories.js +2 -41
- package/lib/cjs/components/SelectField/selectFieldAttributes.d.ts +1 -0
- package/lib/cjs/components/SelectField/selectFieldAttributes.js +61 -0
- package/lib/cjs/components/Separator/Separator.stories.js +21 -1
- package/lib/cjs/components/ServerErrorBoundary/ServerErrorBoundary.stories.js +2 -0
- package/lib/cjs/components/ServerErrorBoundary/serverErrorBoundaryAttributes.d.ts +33 -0
- package/lib/cjs/components/ServerErrorBoundary/serverErrorBoundaryAttributes.js +54 -0
- package/lib/cjs/components/SliderField/SliderField.stories.js +2 -38
- package/lib/cjs/components/SliderField/sliderFieldAttributes.d.ts +38 -0
- package/lib/cjs/components/SliderField/sliderFieldAttributes.js +45 -0
- package/lib/cjs/components/StatusIcon/StatusIcon.stories.js +30 -0
- package/lib/cjs/components/Table/Table.stories.js +20 -4
- package/lib/cjs/components/TableBase/TableBase.stories.js +3 -1
- package/lib/cjs/components/TableBase/tableBaseAttributes.d.ts +33 -0
- package/lib/cjs/components/TableBase/tableBaseAttributes.js +62 -0
- package/lib/cjs/components/Tabs/Tabs.stories.js +2 -18
- package/lib/cjs/components/Tabs/tabsAttributes.d.ts +18 -0
- package/lib/cjs/components/Tabs/tabsAttributes.js +25 -0
- package/lib/cjs/components/Text/Text.stories.js +2 -26
- package/lib/cjs/components/Text/textAttributes.d.ts +26 -0
- package/lib/cjs/components/Text/textAttributes.js +33 -0
- package/lib/cjs/components/TextAreaField/TextAreaField.stories.js +2 -41
- package/lib/cjs/components/TextAreaField/textAreaFieldAttributes.d.ts +1 -0
- package/lib/cjs/components/TextAreaField/textAreaFieldAttributes.js +61 -0
- package/lib/cjs/components/TimeField/TimeField.stories.js +2 -1
- package/lib/cjs/components/TimeField/timeFieldAttributes.d.ts +89 -0
- package/lib/cjs/components/TimeField/timeFieldAttributes.js +132 -0
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.stories.js +55 -0
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.stories.js +3 -1
- package/lib/cjs/components/TooltipTrigger/tooltipTriggerAttributes.d.ts +130 -0
- package/lib/cjs/components/TooltipTrigger/tooltipTriggerAttributes.js +90 -0
- package/lib/cjs/components/TreeView/TreeView.stories.js +61 -1
- package/lib/cjs/index.d.ts +2 -0
- package/lib/cjs/index.js +56 -37
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/cjs/types/index.d.ts +1 -0
- package/lib/cjs/types/index.js +32 -21
- package/lib/cjs/types/phoneNumberField.d.ts +45 -0
- package/lib/cjs/types/phoneNumberField.js +6 -0
- package/lib/cjs/utils/designUtils/figmaLinks.d.ts +3 -0
- package/lib/cjs/utils/designUtils/figmaLinks.js +3 -0
- package/lib/cjs/utils/testUtils/universalFormSubmitTest.js +25 -11
- package/lib/components/AIComponents/AIPanel/AIPanel.stories.js +3 -1
- package/lib/components/AIComponents/AIPanel/aiPanelAttributes.js +35 -0
- package/lib/components/AIComponents/Prompt/Prompt.stories.js +7 -1
- package/lib/components/AIComponents/Response/Response.stories.js +3 -1
- package/lib/components/AIComponents/Response/responseAttributes.js +20 -0
- package/lib/components/AIComponents/Suggestions/Suggestions.stories.js +18 -1
- package/lib/components/AccordionGroup/AccordionGroup.stories.js +4 -23
- package/lib/components/AccordionGroup/accordionGroupAttributes.js +22 -0
- package/lib/components/ArrayField/ArrayField.stories.js +2 -28
- package/lib/components/ArrayField/arrayFieldAttributes.js +39 -0
- package/lib/components/AstroProvider/AstroProvider.stories.js +21 -1
- package/lib/components/Avatar/Avatar.stories.js +2 -23
- package/lib/components/Avatar/avatarAttributes.js +23 -0
- package/lib/components/Bracket/Bracket.stories.js +2 -25
- package/lib/components/Bracket/bracketAttributes.js +25 -0
- package/lib/components/CheckboxField/CheckboxField.stories.js +2 -34
- package/lib/components/CheckboxField/checkboxFieldAttributes.js +45 -0
- package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +13 -12
- package/lib/components/CollapsiblePanel/collapsiblePanelAttributes.js +12 -0
- package/lib/components/ColorField/ColorField.stories.js +2 -26
- package/lib/components/ColorField/colorFieldAttributes.js +37 -0
- package/lib/components/DataTable/DataTable.stories.js +2 -101
- package/lib/components/DataTable/dataTableAttributes.js +102 -0
- package/lib/components/ExpandableText/ExpandableText.stories.js +14 -1
- package/lib/components/ExpandableText/expandableTextAttributes.js +26 -0
- package/lib/components/Footer/Footer.stories.js +6 -0
- package/lib/components/Grid/Grid.stories.js +2 -19
- package/lib/components/Grid/gridAttributes.js +19 -0
- package/lib/components/IconBadge/IconBadge.stories.js +33 -1
- package/lib/components/IconButtonToggle/IconButtonToggle.stories.js +3 -1
- package/lib/components/IconButtonToggle/iconButtonToggleAttributes.js +56 -0
- package/lib/components/Image/Image.stories.js +2 -16
- package/lib/components/Image/imageAttributes.js +16 -0
- package/lib/components/Input/Input.stories.js +13 -6
- package/lib/components/Input/inputAttributes.js +6 -0
- package/lib/components/Label/Label.stories.js +2 -13
- package/lib/components/Label/labelAttributes.js +14 -0
- package/lib/components/Link/Link.stories.js +2 -33
- package/lib/components/Link/linkAttributes.js +33 -0
- package/lib/components/ListView/stories/ListViewOnyxDark.stories.js +52 -1
- package/lib/components/ListView/stories/listViewOnyxDarkAttributes.js +51 -0
- package/lib/components/Modal/Convenience/ModalBody.stories.js +14 -1
- package/lib/components/Modal/Convenience/ModalFooter.stories.js +14 -1
- package/lib/components/Modal/Convenience/ModalHeader.stories.js +14 -1
- package/lib/components/Modal/Convenience/modalBodyAttributes.js +35 -0
- package/lib/components/Modal/Convenience/modalFooterAttributes.js +44 -0
- package/lib/components/Modal/Convenience/modalHeaderAttributes.js +53 -0
- package/lib/components/Modal/Modal.stories.js +13 -56
- package/lib/components/Modal/modalAttributes.js +56 -0
- package/lib/components/NavBar/NavBar.stories.js +13 -0
- package/lib/components/NavBar/navBarAttributes.js +48 -0
- package/lib/components/NavBar/stories/NavBar.Onyx.stories.js +14 -1
- package/lib/components/NavBar/stories/navBarOnyxAttributes.js +42 -0
- package/lib/components/Pagination/Pagination.stories.js +2 -24
- package/lib/components/Pagination/paginationAttributes.js +24 -0
- package/lib/components/PhoneNumberField/PhoneNumberField.js +288 -0
- package/lib/components/PhoneNumberField/PhoneNumberField.mdx +32 -0
- package/lib/components/PhoneNumberField/PhoneNumberField.stories.js +126 -0
- package/lib/components/PhoneNumberField/PhoneNumberField.test.js +155 -0
- package/lib/components/PhoneNumberField/index.js +1 -0
- package/lib/components/PopoverMenu/PopoverMenu.stories.js +2 -13
- package/lib/components/PopoverMenu/popoverMenuAttributes.js +13 -0
- package/lib/components/ProgressBar/ProgressBar.stories.js +2 -27
- package/lib/components/ProgressBar/progressBarAttributes.js +58 -0
- package/lib/components/RadioGroupField/RadioGroupField.stories.js +2 -28
- package/lib/components/RadioGroupField/radioGroupFieldAttributes.js +39 -0
- package/lib/components/RangeCalendar/RangeCalendar.stories.js +2 -13
- package/lib/components/RangeCalendar/rangeCalendarAttributes.js +84 -0
- package/lib/components/SearchField/SearchField.stories.js +2 -27
- package/lib/components/SearchField/searchFieldAttributes.js +38 -0
- package/lib/components/SelectField/SelectField.stories.js +2 -41
- package/lib/components/SelectField/selectFieldAttributes.js +54 -0
- package/lib/components/Separator/Separator.stories.js +22 -1
- package/lib/components/ServerErrorBoundary/ServerErrorBoundary.stories.js +2 -0
- package/lib/components/ServerErrorBoundary/serverErrorBoundaryAttributes.js +47 -0
- package/lib/components/SliderField/SliderField.stories.js +2 -38
- package/lib/components/SliderField/sliderFieldAttributes.js +38 -0
- package/lib/components/StatusIcon/StatusIcon.stories.js +31 -0
- package/lib/components/Table/Table.stories.js +21 -4
- package/lib/components/TableBase/TableBase.stories.js +3 -1
- package/lib/components/TableBase/tableBaseAttributes.js +55 -0
- package/lib/components/Tabs/Tabs.stories.js +2 -18
- package/lib/components/Tabs/tabsAttributes.js +18 -0
- package/lib/components/Text/Text.stories.js +2 -26
- package/lib/components/Text/textAttributes.js +26 -0
- package/lib/components/TextAreaField/TextAreaField.stories.js +2 -41
- package/lib/components/TextAreaField/textAreaFieldAttributes.js +54 -0
- package/lib/components/TimeField/TimeField.stories.js +2 -1
- package/lib/components/TimeField/timeFieldAttributes.js +125 -0
- package/lib/components/TimeZonePicker/TimeZonePicker.stories.js +56 -0
- package/lib/components/TooltipTrigger/TooltipTrigger.stories.js +3 -1
- package/lib/components/TooltipTrigger/tooltipTriggerAttributes.js +83 -0
- package/lib/components/TreeView/TreeView.stories.js +60 -0
- package/lib/index.js +2 -0
- package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/types/index.js +1 -0
- package/lib/types/phoneNumberField.js +1 -0
- package/lib/utils/designUtils/figmaLinks.js +3 -0
- package/lib/utils/testUtils/universalFormSubmitTest.js +25 -11
- package/package.json +1 -1
|
@@ -170,6 +170,9 @@ var FIGMA_LINKS = exports.FIGMA_LINKS = {
|
|
|
170
170
|
withAvatar: 'https://www.figma.com/design/XDGxYAgQkcHDVjyu8OGrBv/Onyx-Specs?node-id=4470-24174&m=dev',
|
|
171
171
|
withExtraLongText: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44688%3A39713&mode=dev'
|
|
172
172
|
},
|
|
173
|
+
phoneNumberField: {
|
|
174
|
+
"default": 'https://www.figma.com/design/XDGxYAgQkcHDVjyu8OGrBv/Onyx-Specs?node-id=8496-31873'
|
|
175
|
+
},
|
|
173
176
|
popoverMenu: {
|
|
174
177
|
"default": 'https://www.figma.com/file/Oa6VYtJcUJzEJuuRp0p4ls/Astro?type=design&node-id=0%3A3073&t=We3h7LaaFJQnxdSy-1'
|
|
175
178
|
},
|
|
@@ -139,6 +139,7 @@ var useDefaultProps = function useDefaultProps(componentType) {
|
|
|
139
139
|
name: name
|
|
140
140
|
};
|
|
141
141
|
case 'PasswordField':
|
|
142
|
+
case 'PhoneNumberField':
|
|
142
143
|
return {
|
|
143
144
|
value: value,
|
|
144
145
|
onChange: function onChange(e) {
|
|
@@ -215,6 +216,7 @@ var getDefaultProps = function getDefaultProps(componentType, testValue) {
|
|
|
215
216
|
name: name
|
|
216
217
|
};
|
|
217
218
|
case 'PasswordField':
|
|
219
|
+
case 'PhoneNumberField':
|
|
218
220
|
case 'ComboBoxField':
|
|
219
221
|
case 'NumberField':
|
|
220
222
|
case 'MultivaluesField':
|
|
@@ -409,7 +411,7 @@ var universalFieldComponentTests = exports.universalFieldComponentTests = functi
|
|
|
409
411
|
_react2.fireEvent.click(_react2.screen.getAllByRole('option', {
|
|
410
412
|
name: testValue
|
|
411
413
|
})[0]);
|
|
412
|
-
_context2.next =
|
|
414
|
+
_context2.next = 45;
|
|
413
415
|
break;
|
|
414
416
|
case 19:
|
|
415
417
|
if (!(componentType === 'NumberField')) {
|
|
@@ -421,7 +423,7 @@ var universalFieldComponentTests = exports.universalFieldComponentTests = functi
|
|
|
421
423
|
value: testValue
|
|
422
424
|
}
|
|
423
425
|
});
|
|
424
|
-
_context2.next =
|
|
426
|
+
_context2.next = 45;
|
|
425
427
|
break;
|
|
426
428
|
case 23:
|
|
427
429
|
if (!(componentType === 'RadioGroupField')) {
|
|
@@ -429,7 +431,7 @@ var universalFieldComponentTests = exports.universalFieldComponentTests = functi
|
|
|
429
431
|
break;
|
|
430
432
|
}
|
|
431
433
|
_react2.fireEvent.click(_react2.screen.getByLabelText(testValue));
|
|
432
|
-
_context2.next =
|
|
434
|
+
_context2.next = 45;
|
|
433
435
|
break;
|
|
434
436
|
case 27:
|
|
435
437
|
if (!(componentType === 'PasswordField')) {
|
|
@@ -441,25 +443,37 @@ var universalFieldComponentTests = exports.universalFieldComponentTests = functi
|
|
|
441
443
|
value: testValue
|
|
442
444
|
}
|
|
443
445
|
});
|
|
444
|
-
_context2.next =
|
|
446
|
+
_context2.next = 45;
|
|
445
447
|
break;
|
|
446
448
|
case 31:
|
|
449
|
+
if (!(componentType === 'PhoneNumberField')) {
|
|
450
|
+
_context2.next = 35;
|
|
451
|
+
break;
|
|
452
|
+
}
|
|
453
|
+
_react2.fireEvent.change(_react2.screen.getByRole('textbox'), {
|
|
454
|
+
target: {
|
|
455
|
+
value: testValue
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
_context2.next = 45;
|
|
459
|
+
break;
|
|
460
|
+
case 35:
|
|
447
461
|
if (!(componentType === 'DatePicker')) {
|
|
448
|
-
_context2.next =
|
|
462
|
+
_context2.next = 44;
|
|
449
463
|
break;
|
|
450
464
|
}
|
|
451
465
|
iconButton = _react2.screen.queryAllByRole('button');
|
|
452
|
-
_context2.next =
|
|
466
|
+
_context2.next = 39;
|
|
453
467
|
return _userEvent["default"].click(iconButton[0]);
|
|
454
|
-
case
|
|
468
|
+
case 39:
|
|
455
469
|
cells = _react2.screen.getAllByRole('gridcell');
|
|
456
470
|
selected = (0, _find["default"])(cells).call(cells, function (cell) {
|
|
457
471
|
return cell.getAttribute('aria-selected') === 'true';
|
|
458
472
|
});
|
|
459
473
|
expect(selected === null || selected === void 0 ? void 0 : selected.children[0]).toHaveAttribute('aria-label', 'Wednesday, August 10, 2022 selected');
|
|
460
|
-
_context2.next =
|
|
474
|
+
_context2.next = 45;
|
|
461
475
|
break;
|
|
462
|
-
case
|
|
476
|
+
case 44:
|
|
463
477
|
if (componentType === 'SliderField') {
|
|
464
478
|
_react2.fireEvent.change(_react2.screen.getByRole('slider'), {
|
|
465
479
|
target: {
|
|
@@ -473,7 +487,7 @@ var universalFieldComponentTests = exports.universalFieldComponentTests = functi
|
|
|
473
487
|
}
|
|
474
488
|
});
|
|
475
489
|
}
|
|
476
|
-
case
|
|
490
|
+
case 45:
|
|
477
491
|
_react2.fireEvent.submit(_react2.screen.getByRole('form', {
|
|
478
492
|
hidden: true,
|
|
479
493
|
name: /test form 2/i
|
|
@@ -481,7 +495,7 @@ var universalFieldComponentTests = exports.universalFieldComponentTests = functi
|
|
|
481
495
|
expect(handleFormSubmit).toHaveBeenCalledWith({
|
|
482
496
|
testName: String(testValue)
|
|
483
497
|
});
|
|
484
|
-
case
|
|
498
|
+
case 47:
|
|
485
499
|
case "end":
|
|
486
500
|
return _context2.stop();
|
|
487
501
|
}
|
|
@@ -5,11 +5,13 @@ import DotsIcon from '@pingux/mdi-react/DotsHorizontalIcon';
|
|
|
5
5
|
import { useOverlayPanelState } from '../../../hooks';
|
|
6
6
|
import { Box, Button, Icon, IconButton, Item, Menu, PopoverMenu, Text } from '../../../index';
|
|
7
7
|
import AIPanel from './AIPanel';
|
|
8
|
+
import { aiPanelArgTypes } from './aiPanelAttributes';
|
|
8
9
|
import AIPanelHeader from './AIPanelHeader';
|
|
9
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
10
11
|
export default {
|
|
11
12
|
component: AIPanel,
|
|
12
|
-
title: 'AI Components/AI Panel'
|
|
13
|
+
title: 'AI Components/AI Panel',
|
|
14
|
+
argTypes: aiPanelArgTypes
|
|
13
15
|
};
|
|
14
16
|
var AIMenuPopover = function AIMenuPopover() {
|
|
15
17
|
var _useState = useState(false),
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
2
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
3
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
4
|
+
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
5
|
+
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
|
6
|
+
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
7
|
+
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
|
8
|
+
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
|
9
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
10
|
+
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
import { booleanArg, funcArg } from '../../../utils/docUtils/docArgTypes';
|
|
13
|
+
export var aiPanelArgTypes = {
|
|
14
|
+
state: {
|
|
15
|
+
description: 'The overlay panel state object controlling open/close behavior (required).',
|
|
16
|
+
control: {
|
|
17
|
+
type: null
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
isExpanded: _objectSpread(_objectSpread({}, booleanArg), {}, {
|
|
21
|
+
description: 'Whether the AI panel is in expanded (full-width) mode.'
|
|
22
|
+
}),
|
|
23
|
+
setIsExpanded: _objectSpread(_objectSpread({}, funcArg), {}, {
|
|
24
|
+
description: 'Callback invoked to toggle the expanded state of the panel.'
|
|
25
|
+
}),
|
|
26
|
+
onPanelClose: _objectSpread(_objectSpread({}, funcArg), {}, {
|
|
27
|
+
description: 'Callback invoked when the panel close action is triggered.'
|
|
28
|
+
}),
|
|
29
|
+
headerProps: {
|
|
30
|
+
description: 'Props passed to the panel header element.',
|
|
31
|
+
control: {
|
|
32
|
+
type: null
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
@@ -4,7 +4,13 @@ import Prompt from './Prompt';
|
|
|
4
4
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
5
|
export default {
|
|
6
6
|
title: 'AI Components/Prompt',
|
|
7
|
-
component: Prompt
|
|
7
|
+
component: Prompt,
|
|
8
|
+
argTypes: {
|
|
9
|
+
children: {
|
|
10
|
+
description: 'Content rendered inside the prompt container.',
|
|
11
|
+
control: false
|
|
12
|
+
}
|
|
13
|
+
}
|
|
8
14
|
};
|
|
9
15
|
export var Default = function Default() {
|
|
10
16
|
return ___EmotionJSX(Prompt, null, ___EmotionJSX(Text, null, "Did my number of registrations go up or down in the last month?"));
|
|
@@ -10,6 +10,7 @@ import { Response } from '../../../index';
|
|
|
10
10
|
import Markdown from './ResponseMarkdown/ResponseMarkdown';
|
|
11
11
|
import ResponseReadme from './Response.mdx';
|
|
12
12
|
import ResponseAttachment from './ResponseAttachment';
|
|
13
|
+
import { responseArgTypes } from './responseAttributes';
|
|
13
14
|
import ResponseList from './ResponseList';
|
|
14
15
|
import ResponseText from './ResponseText';
|
|
15
16
|
import ResponseToolbar from './ResponseToolbar';
|
|
@@ -24,7 +25,8 @@ export default {
|
|
|
24
25
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(ResponseReadme, null), ___EmotionJSX(DocsLayout, null));
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
|
-
}
|
|
28
|
+
},
|
|
29
|
+
argTypes: responseArgTypes
|
|
28
30
|
};
|
|
29
31
|
var testText = 'Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet';
|
|
30
32
|
export var Default = function Default() {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export var responseArgTypes = {
|
|
2
|
+
delay: {
|
|
3
|
+
description: 'Delay in milliseconds before the animation starts.',
|
|
4
|
+
control: {
|
|
5
|
+
type: 'number'
|
|
6
|
+
}
|
|
7
|
+
},
|
|
8
|
+
children: {
|
|
9
|
+
description: 'Content rendered inside the response container (required).',
|
|
10
|
+
control: false
|
|
11
|
+
},
|
|
12
|
+
containerProps: {
|
|
13
|
+
description: 'Props passed to the outer container element.',
|
|
14
|
+
control: false
|
|
15
|
+
},
|
|
16
|
+
iconProps: {
|
|
17
|
+
description: 'Props passed to the AI icon element.',
|
|
18
|
+
control: false
|
|
19
|
+
}
|
|
20
|
+
};
|
|
@@ -1,9 +1,26 @@
|
|
|
1
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
2
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
3
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
4
|
+
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
5
|
+
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
|
6
|
+
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
7
|
+
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
|
8
|
+
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
|
9
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
10
|
+
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1
12
|
import React from 'react';
|
|
2
13
|
import { AstroWrapper, NextGenTheme, Suggestion, Suggestions } from '../../../index';
|
|
14
|
+
import { booleanArg } from '../../../utils/docUtils/docArgTypes';
|
|
3
15
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
4
16
|
export default {
|
|
5
17
|
title: 'Ai Components/Suggestions',
|
|
6
|
-
component: Suggestions
|
|
18
|
+
component: Suggestions,
|
|
19
|
+
argTypes: {
|
|
20
|
+
isFullScreen: _objectSpread(_objectSpread({}, booleanArg), {}, {
|
|
21
|
+
description: 'Whether the suggestions panel is displayed in full-screen mode.'
|
|
22
|
+
})
|
|
23
|
+
}
|
|
7
24
|
};
|
|
8
25
|
var lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
|
|
9
26
|
export var Default = function Default() {
|
|
@@ -4,8 +4,8 @@ import React, { useState } from 'react';
|
|
|
4
4
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
|
5
5
|
import { AccordionGroup, Badge, Box, Button, HelpHint, Item, Text, TextField } from '../../index';
|
|
6
6
|
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
|
7
|
-
import { validHeadingTags } from '../AccordionItem/AccordionItem';
|
|
8
7
|
import AccordionReadme from './AccordionGroup.mdx';
|
|
8
|
+
import { accordionGroupArgTypes } from './accordionGroupAttributes';
|
|
9
9
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
10
10
|
var itemArray = [{
|
|
11
11
|
key: 't1',
|
|
@@ -42,7 +42,7 @@ var itemArrayDisabled = [{
|
|
|
42
42
|
label: 'Accordion Disabled',
|
|
43
43
|
children: ___EmotionJSX(Text, null, "Hi")
|
|
44
44
|
}];
|
|
45
|
-
|
|
45
|
+
var meta = {
|
|
46
46
|
title: 'Components/AccordionGroup',
|
|
47
47
|
component: AccordionGroup,
|
|
48
48
|
parameters: {
|
|
@@ -55,28 +55,9 @@ export default {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
argTypes:
|
|
59
|
-
id: {
|
|
60
|
-
control: {
|
|
61
|
-
type: 'text'
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
disabledKeys: {
|
|
65
|
-
description: 'The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with. Array of keys.'
|
|
66
|
-
},
|
|
67
|
-
defaultExpandedKeys: {},
|
|
68
|
-
expandedKeys: {
|
|
69
|
-
control: false
|
|
70
|
-
},
|
|
71
|
-
items: {
|
|
72
|
-
control: false
|
|
73
|
-
},
|
|
74
|
-
labelHeadingTag: {
|
|
75
|
-
control: 'radio',
|
|
76
|
-
options: validHeadingTags
|
|
77
|
-
}
|
|
78
|
-
}
|
|
58
|
+
argTypes: accordionGroupArgTypes
|
|
79
59
|
};
|
|
60
|
+
export default meta;
|
|
80
61
|
export var Default = function Default(args) {
|
|
81
62
|
return ___EmotionJSX(AccordionGroup, args, ___EmotionJSX(Item, {
|
|
82
63
|
key: "accordionKey",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { validHeadingTags } from '../AccordionItem/AccordionItem';
|
|
2
|
+
export var accordionGroupArgTypes = {
|
|
3
|
+
id: {
|
|
4
|
+
control: {
|
|
5
|
+
type: 'text'
|
|
6
|
+
}
|
|
7
|
+
},
|
|
8
|
+
disabledKeys: {
|
|
9
|
+
description: 'The item keys that are disabled. These items cannot be selected, focused, or otherwise interacted with. Array of keys.'
|
|
10
|
+
},
|
|
11
|
+
defaultExpandedKeys: {},
|
|
12
|
+
expandedKeys: {
|
|
13
|
+
control: false
|
|
14
|
+
},
|
|
15
|
+
items: {
|
|
16
|
+
control: false
|
|
17
|
+
},
|
|
18
|
+
labelHeadingTag: {
|
|
19
|
+
control: 'radio',
|
|
20
|
+
options: validHeadingTags
|
|
21
|
+
}
|
|
22
|
+
};
|
|
@@ -18,8 +18,8 @@ import { OverlayProvider } from 'react-aria';
|
|
|
18
18
|
import { v4 as uuid } from 'uuid';
|
|
19
19
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
|
20
20
|
import { ArrayField, ArrayFieldDeleteButton, Box, Button, Item, SelectField, Text, TextField } from '../../index';
|
|
21
|
-
import { ariaAttributeBaseArgTypes } from '../../utils/docUtils/ariaAttributes';
|
|
22
21
|
import ArrayFieldReadme from './ArrayField.mdx';
|
|
22
|
+
import { arrayFieldArgTypes } from './arrayFieldAttributes';
|
|
23
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
24
24
|
export default {
|
|
25
25
|
title: 'Form/ArrayField',
|
|
@@ -34,33 +34,7 @@ export default {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
-
argTypes: _objectSpread({
|
|
38
|
-
label: {
|
|
39
|
-
control: {
|
|
40
|
-
type: 'text'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
helperText: {
|
|
44
|
-
control: {
|
|
45
|
-
type: 'text'
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
addButtonLabel: {
|
|
49
|
-
control: {
|
|
50
|
-
type: 'text'
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
maxSize: {
|
|
54
|
-
control: {
|
|
55
|
-
type: 'text'
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
maxSizeText: {
|
|
59
|
-
control: {
|
|
60
|
-
type: 'text'
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}, ariaAttributeBaseArgTypes),
|
|
37
|
+
argTypes: _objectSpread({}, arrayFieldArgTypes),
|
|
64
38
|
args: {
|
|
65
39
|
label: 'Array field label',
|
|
66
40
|
helperText: 'Helper text info...',
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
2
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
3
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
4
|
+
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
5
|
+
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
|
6
|
+
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
7
|
+
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
|
8
|
+
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
|
9
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
10
|
+
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
import { ariaAttributeBaseArgTypes } from '../../utils/docUtils/ariaAttributes';
|
|
13
|
+
export var arrayFieldArgTypes = _objectSpread({
|
|
14
|
+
label: {
|
|
15
|
+
control: {
|
|
16
|
+
type: 'text'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
helperText: {
|
|
20
|
+
control: {
|
|
21
|
+
type: 'text'
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
addButtonLabel: {
|
|
25
|
+
control: {
|
|
26
|
+
type: 'text'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
maxSize: {
|
|
30
|
+
control: {
|
|
31
|
+
type: 'text'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
maxSizeText: {
|
|
35
|
+
control: {
|
|
36
|
+
type: 'text'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}, ariaAttributeBaseArgTypes);
|
|
@@ -15,7 +15,27 @@ export default {
|
|
|
15
15
|
},
|
|
16
16
|
decorators: [function (Story) {
|
|
17
17
|
return ___EmotionJSX("div", null, ___EmotionJSX(Story, null));
|
|
18
|
-
}]
|
|
18
|
+
}],
|
|
19
|
+
argTypes: {
|
|
20
|
+
themeOverrides: {
|
|
21
|
+
description: 'Array of theme override objects merged on top of the default Astro theme.',
|
|
22
|
+
control: {
|
|
23
|
+
type: null
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultTheme: {
|
|
27
|
+
description: 'The base theme object to use as the default instead of the built-in Astro theme.',
|
|
28
|
+
control: {
|
|
29
|
+
type: null
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
children: {
|
|
33
|
+
description: 'Content rendered inside the theme provider context.',
|
|
34
|
+
control: {
|
|
35
|
+
type: null
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
19
39
|
};
|
|
20
40
|
export var Default = function Default() {
|
|
21
41
|
return ___EmotionJSX(AstroProvider, {
|
|
@@ -6,6 +6,7 @@ import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
|
|
6
6
|
import { Avatar, Box, IconWrapper } from '../../index';
|
|
7
7
|
import { pingImg } from '../../utils/devUtils/constants/images';
|
|
8
8
|
import AvatarReadme from './Avatar.mdx';
|
|
9
|
+
import { avatarArgTypes } from './avatarAttributes';
|
|
9
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
10
11
|
export default {
|
|
11
12
|
title: 'Components/Avatar',
|
|
@@ -17,29 +18,7 @@ export default {
|
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
},
|
|
20
|
-
argTypes:
|
|
21
|
-
src: {
|
|
22
|
-
control: false
|
|
23
|
-
},
|
|
24
|
-
size: {
|
|
25
|
-
control: {
|
|
26
|
-
type: 'text'
|
|
27
|
-
},
|
|
28
|
-
description: 'Size of the avatar. Can be a string. like 50px'
|
|
29
|
-
},
|
|
30
|
-
alt: {
|
|
31
|
-
control: {
|
|
32
|
-
type: 'text'
|
|
33
|
-
},
|
|
34
|
-
description: 'Alternative text for the image.'
|
|
35
|
-
},
|
|
36
|
-
defaultText: {
|
|
37
|
-
control: {
|
|
38
|
-
type: 'text'
|
|
39
|
-
},
|
|
40
|
-
description: 'Default text to be displayed when src is not available.'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
21
|
+
argTypes: avatarArgTypes,
|
|
43
22
|
args: {
|
|
44
23
|
src: pingImg
|
|
45
24
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export var avatarArgTypes = {
|
|
2
|
+
src: {
|
|
3
|
+
control: false
|
|
4
|
+
},
|
|
5
|
+
size: {
|
|
6
|
+
control: {
|
|
7
|
+
type: 'text'
|
|
8
|
+
},
|
|
9
|
+
description: 'Size of the avatar. Can be a string. like 50px'
|
|
10
|
+
},
|
|
11
|
+
alt: {
|
|
12
|
+
control: {
|
|
13
|
+
type: 'text'
|
|
14
|
+
},
|
|
15
|
+
description: 'Alternative text for the image.'
|
|
16
|
+
},
|
|
17
|
+
defaultText: {
|
|
18
|
+
control: {
|
|
19
|
+
type: 'text'
|
|
20
|
+
},
|
|
21
|
+
description: 'Default text to be displayed when src is not available.'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
@@ -3,6 +3,7 @@ import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
|
|
3
3
|
import { Box, Bracket } from '../../index';
|
|
4
4
|
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
|
5
5
|
import BracketReadme from './Bracket.mdx';
|
|
6
|
+
import { bracketArgTypes } from './bracketAttributes';
|
|
6
7
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
7
8
|
export default {
|
|
8
9
|
title: 'Components/Bracket',
|
|
@@ -14,31 +15,7 @@ export default {
|
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
},
|
|
17
|
-
argTypes:
|
|
18
|
-
isLast: {
|
|
19
|
-
control: {
|
|
20
|
-
type: 'boolean'
|
|
21
|
-
},
|
|
22
|
-
description: 'If true, the bracket will be displayed as the last one.'
|
|
23
|
-
},
|
|
24
|
-
color: {
|
|
25
|
-
control: {
|
|
26
|
-
type: 'text'
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
variant: {
|
|
30
|
-
control: false
|
|
31
|
-
},
|
|
32
|
-
as: {
|
|
33
|
-
control: false
|
|
34
|
-
},
|
|
35
|
-
role: {
|
|
36
|
-
control: false
|
|
37
|
-
},
|
|
38
|
-
'data-testid': {
|
|
39
|
-
control: false
|
|
40
|
-
}
|
|
41
|
-
}
|
|
18
|
+
argTypes: bracketArgTypes
|
|
42
19
|
};
|
|
43
20
|
export var Default = function Default(args) {
|
|
44
21
|
return ___EmotionJSX(Box, {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export var bracketArgTypes = {
|
|
2
|
+
isLast: {
|
|
3
|
+
control: {
|
|
4
|
+
type: 'boolean'
|
|
5
|
+
},
|
|
6
|
+
description: 'If true, the bracket will be displayed as the last one.'
|
|
7
|
+
},
|
|
8
|
+
color: {
|
|
9
|
+
control: {
|
|
10
|
+
type: 'text'
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
variant: {
|
|
14
|
+
control: false
|
|
15
|
+
},
|
|
16
|
+
as: {
|
|
17
|
+
control: false
|
|
18
|
+
},
|
|
19
|
+
role: {
|
|
20
|
+
control: false
|
|
21
|
+
},
|
|
22
|
+
'data-testid': {
|
|
23
|
+
control: false
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -19,10 +19,8 @@ import MenuRight from '@pingux/mdi-react/MenuRightIcon';
|
|
|
19
19
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
|
20
20
|
import { Badge, Box, CheckboxField, IconButtonToggle, Link, SwitchField, Text } from '../../index';
|
|
21
21
|
import statuses from '../../utils/devUtils/constants/statuses';
|
|
22
|
-
import { ariaAttributeBaseArgTypes } from '../../utils/docUtils/ariaAttributes';
|
|
23
|
-
import { inputFieldAttributeBaseArgTypes } from '../../utils/docUtils/fieldAttributes';
|
|
24
|
-
import { statusArgTypes } from '../../utils/docUtils/statusProp';
|
|
25
22
|
import CheckboxFieldReadme from './CheckboxField.mdx';
|
|
23
|
+
import { checkboxFieldArgTypes } from './checkboxFieldAttributes';
|
|
26
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
27
25
|
export default {
|
|
28
26
|
title: 'Form/CheckboxField',
|
|
@@ -34,37 +32,7 @@ export default {
|
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
},
|
|
37
|
-
argTypes: _objectSpread(
|
|
38
|
-
label: {
|
|
39
|
-
control: {
|
|
40
|
-
type: 'text'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
helperText: {
|
|
44
|
-
control: {
|
|
45
|
-
type: 'text'
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
hintText: {
|
|
49
|
-
control: {
|
|
50
|
-
type: 'text'
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
name: {},
|
|
54
|
-
id: {
|
|
55
|
-
control: {
|
|
56
|
-
type: 'text'
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
value: {},
|
|
60
|
-
isRequired: {},
|
|
61
|
-
isDisabled: {},
|
|
62
|
-
isReadOnly: {},
|
|
63
|
-
hasAutoFocus: {},
|
|
64
|
-
isIndeterminate: {},
|
|
65
|
-
isDefaultSelected: {},
|
|
66
|
-
isSelected: {}
|
|
67
|
-
}, statusArgTypes), ariaAttributeBaseArgTypes), inputFieldAttributeBaseArgTypes),
|
|
35
|
+
argTypes: _objectSpread({}, checkboxFieldArgTypes),
|
|
68
36
|
args: {
|
|
69
37
|
label: 'Click me!'
|
|
70
38
|
}
|