@pingux/astro 1.1.0-alpha.0 → 1.1.0-alpha.12
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/CHANGELOG.md +132 -0
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.test.js +24 -0
- package/lib/cjs/components/AccordionGridItem/AccordionGridItemBody.js +1 -1
- package/lib/cjs/components/AccordionGridItem/AccordionGridItemHeader.js +1 -1
- package/lib/cjs/components/AccordionGroup/AccordionGroup.test.js +33 -1
- package/lib/cjs/components/AccordionItem/AccordionItem.js +5 -4
- package/lib/cjs/components/Button/Button.js +1 -2
- package/lib/cjs/components/Button/Button.stories.js +2 -1
- package/lib/cjs/components/Button/Button.test.js +2 -1
- package/lib/cjs/components/CodeView/CodeView.js +165 -0
- package/lib/cjs/components/CodeView/CodeView.stories.js +93 -0
- package/lib/cjs/components/CodeView/CodeView.test.js +211 -0
- package/lib/cjs/components/CodeView/index.js +18 -0
- package/lib/cjs/components/ColorField/ColorField.js +1 -0
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +7 -0
- package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +25 -1
- package/lib/cjs/components/ComboBoxField/ComboBoxField.test.js +44 -0
- package/lib/cjs/components/CopyText/CopyText.js +34 -11
- package/lib/cjs/components/FileInputField/FileItem.js +2 -1
- package/lib/cjs/components/IconButton/IconButton.js +1 -1
- package/lib/cjs/components/IconButton/IconButton.stories.js +8 -17
- package/lib/cjs/components/IconButton/IconButton.test.js +4 -5
- package/lib/cjs/components/ImageUploadField/ImagePreviewButton.js +2 -1
- package/lib/cjs/components/List/List.js +3 -0
- package/lib/cjs/components/List/List.stories.js +7 -2
- package/lib/cjs/components/ListBox/ListBox.js +3 -6
- package/lib/cjs/components/ListBox/ListBox.test.js +2 -0
- package/lib/cjs/components/ListBox/Option.js +6 -0
- package/lib/cjs/components/ListView/ListView.stories.js +580 -39
- package/lib/cjs/components/Messages/Message.js +2 -2
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +2 -1
- package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +15 -14
- package/lib/cjs/components/PopoverContainer/PopoverContainer.test.js +15 -0
- package/lib/cjs/components/TextArea/TextArea.js +5 -1
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.js +10 -5
- package/lib/cjs/index.js +10 -0
- package/lib/cjs/styles/variants/accordion.js +2 -2
- package/lib/cjs/styles/variants/buttons.js +11 -1
- package/lib/cjs/styles/variants/codeView.js +80 -0
- package/lib/cjs/styles/variants/variants.js +3 -0
- package/lib/components/AccordionGridGroup/AccordionGridGroup.test.js +23 -1
- package/lib/components/AccordionGridItem/AccordionGridItemBody.js +1 -1
- package/lib/components/AccordionGridItem/AccordionGridItemHeader.js +1 -1
- package/lib/components/AccordionGroup/AccordionGroup.test.js +30 -1
- package/lib/components/AccordionItem/AccordionItem.js +6 -5
- package/lib/components/Button/Button.js +2 -3
- package/lib/components/Button/Button.stories.js +2 -1
- package/lib/components/Button/Button.test.js +2 -1
- package/lib/components/CodeView/CodeView.js +130 -0
- package/lib/components/CodeView/CodeView.stories.js +67 -0
- package/lib/components/CodeView/CodeView.test.js +171 -0
- package/lib/components/CodeView/index.js +1 -0
- package/lib/components/ColorField/ColorField.js +1 -0
- package/lib/components/ComboBoxField/ComboBoxField.js +7 -0
- package/lib/components/ComboBoxField/ComboBoxField.stories.js +21 -0
- package/lib/components/ComboBoxField/ComboBoxField.test.js +35 -0
- package/lib/components/CopyText/CopyText.js +35 -11
- package/lib/components/FileInputField/FileItem.js +2 -1
- package/lib/components/IconButton/IconButton.js +1 -1
- package/lib/components/IconButton/IconButton.stories.js +7 -13
- package/lib/components/IconButton/IconButton.test.js +4 -5
- package/lib/components/ImageUploadField/ImagePreviewButton.js +2 -1
- package/lib/components/List/List.js +2 -0
- package/lib/components/List/List.stories.js +6 -2
- package/lib/components/ListBox/ListBox.js +3 -5
- package/lib/components/ListBox/ListBox.test.js +2 -0
- package/lib/components/ListBox/Option.js +6 -0
- package/lib/components/ListView/ListView.stories.js +577 -39
- package/lib/components/Messages/Message.js +2 -2
- package/lib/components/MultivaluesField/MultivaluesField.js +2 -1
- package/lib/components/OverlayPanel/OverlayPanel.stories.js +7 -5
- package/lib/components/PopoverContainer/PopoverContainer.test.js +16 -1
- package/lib/components/TextArea/TextArea.js +5 -1
- package/lib/components/TooltipTrigger/TooltipTrigger.js +10 -5
- package/lib/index.js +1 -0
- package/lib/styles/variants/accordion.js +2 -2
- package/lib/styles/variants/buttons.js +11 -1
- package/lib/styles/variants/codeView.js +68 -0
- package/lib/styles/variants/variants.js +2 -0
- package/package.json +3 -1
@@ -92,7 +92,8 @@ var ImagePreviewButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
92
92
|
ref: buttonRef,
|
93
93
|
variant: "imageUpload",
|
94
94
|
sx: widthHeightSx,
|
95
|
-
"data-testid": "image-preview-button"
|
95
|
+
"data-testid": "image-preview-button",
|
96
|
+
"aria-label": "Image preview"
|
96
97
|
}, mergeProps(focusProps, others)), previewImage && isImageType ? imagePreview : noImagePreview, isLoading && loadingPreview, (isHovered || isFocusVisible) && !isLoading && hoveredPreview));
|
97
98
|
});
|
98
99
|
ImagePreviewButton.propTypes = {
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
3
3
|
import React, { forwardRef } from 'react';
|
4
4
|
import Box from '../Box/Box';
|
5
|
+
import { useDeprecationWarning } from '../../hooks';
|
5
6
|
/**
|
6
7
|
* The intended use of List is to hold a collection of <ListItem/> components.
|
7
8
|
* Accepts most of the styling props from [styled-system](https://styled-system.com/table).
|
@@ -12,6 +13,7 @@ var List = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
12
13
|
var children = props.children,
|
13
14
|
others = _objectWithoutProperties(props, ["children"]);
|
14
15
|
|
16
|
+
useDeprecationWarning('The List component will be deprecated in Astro-UI 2.0.0, use ListView instead.');
|
15
17
|
return ___EmotionJSX(Box, _extends({
|
16
18
|
ref: ref,
|
17
19
|
role: "list",
|
@@ -3,10 +3,14 @@ import List from '.';
|
|
3
3
|
import ListItem from '../ListItem';
|
4
4
|
import Text from '../Text';
|
5
5
|
import Separator from '../Separator';
|
6
|
+
import withDeprecationWarning from '../../utils/devUtils/decorators/withDeprecationWarning';
|
6
7
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
7
8
|
export default {
|
8
|
-
title: 'List',
|
9
|
-
component: [List, ListItem]
|
9
|
+
title: 'Deprecated/List',
|
10
|
+
component: [List, ListItem],
|
11
|
+
decorators: [function (Story, context) {
|
12
|
+
return withDeprecationWarning(Story, context, 'The `List` component will be deprecated in Astro-UI 2.0.0, use `ListView` instead.');
|
13
|
+
}]
|
10
14
|
};
|
11
15
|
export var Default = function Default() {
|
12
16
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Text, {
|
@@ -24,7 +24,6 @@ import { useCollator } from '@react-aria/i18n';
|
|
24
24
|
import { ListLayout } from '@react-stately/layout';
|
25
25
|
import { ListBoxContext } from './ListBoxContext';
|
26
26
|
import { Option } from './index.js';
|
27
|
-
import { useAriaLabelWarning } from '../../hooks';
|
28
27
|
import { isIterableProp } from '../../utils/devUtils/props/isIterable';
|
29
28
|
import Loader from '../Loader';
|
30
29
|
import ListBoxSection from './ListBoxSection';
|
@@ -77,13 +76,12 @@ var ListBox = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
77
76
|
selectedKeys = props.selectedKeys,
|
78
77
|
selectionMode = props.selectionMode,
|
79
78
|
state = props.state,
|
79
|
+
ariaLabel = props['aria-label'],
|
80
80
|
ariaLabelledby = props['aria-labelledby'],
|
81
81
|
ariaDescribedby = props['aria-describedby'],
|
82
82
|
ariaDetails = props['aria-details'],
|
83
|
-
others = _objectWithoutProperties(props, ["defaultSelectedKeys", "disabledKeys", "hasAutoFocus", "hasFocusWrap", "hasNoEmptySelection", "hasVirtualFocus", "id", "isLoading", "isFocusedOnHover", "isSelectedOnPressUp", "isVirtualized", "items", "keyboardDelegate", "label", "onLoadMore", "onScroll", "onSelectionChange", "renderEmptyState", "selectedKeys", "selectionMode", "state", "aria-labelledby", "aria-describedby", "aria-details"]);
|
83
|
+
others = _objectWithoutProperties(props, ["defaultSelectedKeys", "disabledKeys", "hasAutoFocus", "hasFocusWrap", "hasNoEmptySelection", "hasVirtualFocus", "id", "isLoading", "isFocusedOnHover", "isSelectedOnPressUp", "isVirtualized", "items", "keyboardDelegate", "label", "onLoadMore", "onScroll", "onSelectionChange", "renderEmptyState", "selectedKeys", "selectionMode", "state", "aria-label", "aria-labelledby", "aria-describedby", "aria-details"]);
|
84
84
|
|
85
|
-
var ariaLabel = props['aria-label'];
|
86
|
-
useAriaLabelWarning('ListBox', ariaLabel);
|
87
85
|
var focusStrategy = state.focusStrategy; // Object matching React Aria API with all options
|
88
86
|
|
89
87
|
var listBoxOptions = {
|
@@ -107,7 +105,7 @@ var ListBox = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
107
105
|
shouldFocusWrap: hasFocusWrap,
|
108
106
|
shouldSelectOnPressUp: isSelectedOnPressUp,
|
109
107
|
shouldUseVirtualFocus: hasVirtualFocus,
|
110
|
-
'aria-label': ariaLabel
|
108
|
+
'aria-label': ariaLabel,
|
111
109
|
'aria-labelledby': ariaLabelledby,
|
112
110
|
'aria-describedby': ariaDescribedby,
|
113
111
|
'aria-details': ariaDetails
|
@@ -29,11 +29,13 @@ var itemsWithSections = [{
|
|
29
29
|
}];
|
30
30
|
var defaultProps = {
|
31
31
|
'data-testid': testId,
|
32
|
+
'aria-label': 'listbox',
|
32
33
|
'aria-labelledby': 'label',
|
33
34
|
items: items
|
34
35
|
};
|
35
36
|
var defaultWithSectionsProps = {
|
36
37
|
'data-testid': testId,
|
38
|
+
'aria-label': 'listbox',
|
37
39
|
'aria-labelledby': 'label',
|
38
40
|
items: itemsWithSections
|
39
41
|
};
|
@@ -63,7 +63,13 @@ var Option = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
63
63
|
isSelected: isSelected
|
64
64
|
}),
|
65
65
|
classNames = _useStatusClasses.classNames;
|
66
|
+
/* Related to UIP-4992
|
67
|
+
* Need to remove these properties to avoid errors in the console on the external app.
|
68
|
+
* By the way, these properties return "undefined", so it shouldn't create issues */
|
66
69
|
|
70
|
+
|
71
|
+
delete optionProps.onPressStart;
|
72
|
+
delete optionProps.onPressUp;
|
67
73
|
return ___EmotionJSX(Box, _extends({
|
68
74
|
as: "li",
|
69
75
|
isRow: true,
|