@pingux/astro 1.2.0-alpha.12 → 1.2.0-alpha.13
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/Breadcrumbs/Breadcrumbs.stories.js +3 -3
- package/lib/cjs/components/Button/Button.js +9 -0
- package/lib/cjs/components/Button/Button.stories.js +1 -14
- package/lib/cjs/components/Modal/Modal.stories.js +1 -1
- package/lib/cjs/layouts/ListLayout.stories.js +6 -6
- package/lib/cjs/recipes/ArrayField.stories.js +1 -1
- package/lib/cjs/recipes/ConditionalFilter.stories.js +7 -3
- package/lib/cjs/recipes/RadioButtonsWithLinks.stories.js +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.js +3 -3
- package/lib/components/Button/Button.js +10 -1
- package/lib/components/Button/Button.stories.js +0 -10
- package/lib/components/Modal/Modal.stories.js +1 -1
- package/lib/layouts/ListLayout.stories.js +6 -6
- package/lib/recipes/ArrayField.stories.js +1 -1
- package/lib/recipes/ConditionalFilter.stories.js +7 -3
- package/lib/recipes/RadioButtonsWithLinks.stories.js +1 -1
- package/package.json +1 -1
@@ -63,15 +63,15 @@ var Default = function Default(args) {
|
|
63
63
|
onAction: onAction
|
64
64
|
}, args), (0, _react2.jsx)(_collections.Item, {
|
65
65
|
key: "home",
|
66
|
-
variant: "
|
66
|
+
variant: "link",
|
67
67
|
"data-id": "home"
|
68
68
|
}, "Home"), (0, _react2.jsx)(_collections.Item, {
|
69
69
|
key: "trendy",
|
70
|
-
variant: "
|
70
|
+
variant: "link",
|
71
71
|
"data-id": "trendy"
|
72
72
|
}, "Trendy"), (0, _react2.jsx)(_collections.Item, {
|
73
73
|
key: "march 2020 assets",
|
74
|
-
variant: "
|
74
|
+
variant: "link",
|
75
75
|
"data-id": "march"
|
76
76
|
}, "March 2020 Assets"));
|
77
77
|
};
|
@@ -103,6 +103,15 @@ var Button = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
103
103
|
}),
|
104
104
|
classNames = _useStatusClasses.classNames;
|
105
105
|
|
106
|
+
(0, _hooks.useDeprecationWarning)('The "icon" variant for `Button` is deprecated in Astro-UI 1.0.0, use the `IconButton` component instead.', {
|
107
|
+
isActive: props.variant === 'icon'
|
108
|
+
});
|
109
|
+
(0, _hooks.useDeprecationWarning)('The "danger" variant for `Button` will be deprecated in Astro-UI 2.0.0, use the `critical` variant instead.', {
|
110
|
+
isActive: props.variant === 'danger'
|
111
|
+
});
|
112
|
+
(0, _hooks.useDeprecationWarning)('The "text" variant for `Button` will be deprecated in Astro-UI 2.0.0, use the `link` variant instead.', {
|
113
|
+
isActive: props.variant === 'text'
|
114
|
+
});
|
106
115
|
var ariaLabel = props['aria-label'];
|
107
116
|
(0, _hooks.useAriaLabelWarning)('Button', ariaLabel, variant === 'filter');
|
108
117
|
return (0, _react2.jsx)(_themeUi.Button, (0, _extends2["default"])({
|
@@ -8,7 +8,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
9
9
|
});
|
10
10
|
|
11
|
-
exports.FilterButton = exports.ColorBlockButton = exports.InlineButton = exports.
|
11
|
+
exports.FilterButton = exports.ColorBlockButton = exports.InlineButton = exports.TextIconButton = exports.Disabled = exports.Default = exports["default"] = void 0;
|
12
12
|
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
14
14
|
|
@@ -99,19 +99,6 @@ var TextIconButton = function TextIconButton() {
|
|
99
99
|
|
100
100
|
exports.TextIconButton = TextIconButton;
|
101
101
|
|
102
|
-
var TextButton = function TextButton() {
|
103
|
-
return (0, _react2.jsx)(_index.Button, {
|
104
|
-
mb: "sm",
|
105
|
-
variant: "text",
|
106
|
-
"aria-label": "Add option"
|
107
|
-
}, (0, _react2.jsx)(_index.Text, {
|
108
|
-
variant: "label",
|
109
|
-
color: "active"
|
110
|
-
}, " + Add Option"));
|
111
|
-
};
|
112
|
-
|
113
|
-
exports.TextButton = TextButton;
|
114
|
-
|
115
102
|
var InlineButton = function InlineButton() {
|
116
103
|
return (0, _react2.jsx)(_index.Button, {
|
117
104
|
mb: "sm",
|
@@ -163,7 +163,7 @@ var DarkVariant = function DarkVariant() {
|
|
163
163
|
onPress: state.close,
|
164
164
|
"aria-label": "Yes"
|
165
165
|
}, "Yes"), (0, _react2.jsx)(_index.Button, {
|
166
|
-
variant: "
|
166
|
+
variant: "link",
|
167
167
|
onPress: state.close,
|
168
168
|
"aria-label": "Cancel"
|
169
169
|
}, "Cancel"))))
|
@@ -574,7 +574,7 @@ var Default = function Default() {
|
|
574
574
|
mr: "md",
|
575
575
|
"aria-label": "Save Button"
|
576
576
|
}, "Save"), (0, _react2.jsx)(_index.Button, {
|
577
|
-
variant: "
|
577
|
+
variant: "link",
|
578
578
|
onPress: viewItem,
|
579
579
|
"aria-label": "Cancel Button"
|
580
580
|
}, "Cancel"))), editConfigurationVisible && (0, _react2.jsx)(_index.OverlayPanel, {
|
@@ -704,7 +704,7 @@ var Default = function Default() {
|
|
704
704
|
mr: "md",
|
705
705
|
"aria-label": "Save Button"
|
706
706
|
}, "Save"), (0, _react2.jsx)(_index.Button, {
|
707
|
-
variant: "
|
707
|
+
variant: "link",
|
708
708
|
onPress: viewItem,
|
709
709
|
"aria-label": "Cancel Button"
|
710
710
|
}, "Cancel"))), addItemVisible && (0, _react2.jsx)(_index.OverlayPanel, {
|
@@ -790,7 +790,7 @@ var Default = function Default() {
|
|
790
790
|
isRow: true,
|
791
791
|
sx: buttonBarStyles
|
792
792
|
}, (0, _react2.jsx)(_index.Button, {
|
793
|
-
variant: "
|
793
|
+
variant: "link",
|
794
794
|
onPress: resetListItem,
|
795
795
|
mr: "md",
|
796
796
|
"aria-label": "Cancel Button"
|
@@ -851,7 +851,7 @@ var Default = function Default() {
|
|
851
851
|
isRow: true,
|
852
852
|
sx: buttonBarStyles
|
853
853
|
}, (0, _react2.jsx)(_index.Button, {
|
854
|
-
variant: "
|
854
|
+
variant: "link",
|
855
855
|
onPress: resetListItem,
|
856
856
|
mr: "md"
|
857
857
|
}, "Cancel"), (0, _react2.jsx)(_index.Button, {
|
@@ -873,11 +873,11 @@ var Default = function Default() {
|
|
873
873
|
pt: "lg",
|
874
874
|
mr: "auto"
|
875
875
|
}, (0, _react2.jsx)(_index.Button, {
|
876
|
-
variant: "
|
876
|
+
variant: "critical",
|
877
877
|
mr: "md",
|
878
878
|
onPress: deleteItem
|
879
879
|
}, "Delete"), (0, _react2.jsx)(_index.Button, {
|
880
|
-
variant: "
|
880
|
+
variant: "link",
|
881
881
|
onPress: function onPress() {
|
882
882
|
return setIsDeleting(false);
|
883
883
|
}
|
@@ -118,7 +118,9 @@ var Default = function Default() {
|
|
118
118
|
setEditOverviewVisible = _React$useState4[1];
|
119
119
|
|
120
120
|
return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.Button, {
|
121
|
-
onPress:
|
121
|
+
onPress: function onPress() {
|
122
|
+
return setStaticOverviewVisible(true);
|
123
|
+
}
|
122
124
|
}, "Open Panel"), staticOverviewVisible && (0, _react2.jsx)(_OverlayPanel["default"], {
|
123
125
|
isOpen: staticOverviewVisible
|
124
126
|
}, (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Box, {
|
@@ -133,7 +135,9 @@ var Default = function Default() {
|
|
133
135
|
"aria-label": "edit",
|
134
136
|
variant: "inverted",
|
135
137
|
ml: "xs",
|
136
|
-
onPress:
|
138
|
+
onPress: function onPress() {
|
139
|
+
return setEditOverviewVisible(true);
|
140
|
+
}
|
137
141
|
}, (0, _react2.jsx)(_index.Icon, {
|
138
142
|
icon: _CreateIcon["default"],
|
139
143
|
size: 14
|
@@ -457,7 +461,7 @@ var Default = function Default() {
|
|
457
461
|
onPress: function onPress() {
|
458
462
|
return setEditOverviewVisible(false);
|
459
463
|
},
|
460
|
-
variant: "
|
464
|
+
variant: "link",
|
461
465
|
"aria-label": "cancel"
|
462
466
|
}, "Cancel"))))));
|
463
467
|
};
|
@@ -41,15 +41,15 @@ export var Default = function Default(args) {
|
|
41
41
|
onAction: onAction
|
42
42
|
}, args), ___EmotionJSX(Item, {
|
43
43
|
key: "home",
|
44
|
-
variant: "
|
44
|
+
variant: "link",
|
45
45
|
"data-id": "home"
|
46
46
|
}, "Home"), ___EmotionJSX(Item, {
|
47
47
|
key: "trendy",
|
48
|
-
variant: "
|
48
|
+
variant: "link",
|
49
49
|
"data-id": "trendy"
|
50
50
|
}, "Trendy"), ___EmotionJSX(Item, {
|
51
51
|
key: "march 2020 assets",
|
52
|
-
variant: "
|
52
|
+
variant: "link",
|
53
53
|
"data-id": "march"
|
54
54
|
}, "March 2020 Assets"));
|
55
55
|
};
|
@@ -21,7 +21,7 @@ import { useButton } from '@react-aria/button';
|
|
21
21
|
import { useHover } from '@react-aria/interactions';
|
22
22
|
import { useFocusRing } from '@react-aria/focus';
|
23
23
|
import { mergeProps } from '@react-aria/utils';
|
24
|
-
import { useStatusClasses, usePropWarning, useAriaLabelWarning } from '../../hooks';
|
24
|
+
import { useStatusClasses, usePropWarning, useAriaLabelWarning, useDeprecationWarning } from '../../hooks';
|
25
25
|
import Loader from '../Loader';
|
26
26
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
27
27
|
var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
@@ -70,6 +70,15 @@ var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
70
70
|
}),
|
71
71
|
classNames = _useStatusClasses.classNames;
|
72
72
|
|
73
|
+
useDeprecationWarning('The "icon" variant for `Button` is deprecated in Astro-UI 1.0.0, use the `IconButton` component instead.', {
|
74
|
+
isActive: props.variant === 'icon'
|
75
|
+
});
|
76
|
+
useDeprecationWarning('The "danger" variant for `Button` will be deprecated in Astro-UI 2.0.0, use the `critical` variant instead.', {
|
77
|
+
isActive: props.variant === 'danger'
|
78
|
+
});
|
79
|
+
useDeprecationWarning('The "text" variant for `Button` will be deprecated in Astro-UI 2.0.0, use the `link` variant instead.', {
|
80
|
+
isActive: props.variant === 'text'
|
81
|
+
});
|
73
82
|
var ariaLabel = props['aria-label'];
|
74
83
|
useAriaLabelWarning('Button', ariaLabel, variant === 'filter');
|
75
84
|
return ___EmotionJSX(ThemeUIButton, _extends({
|
@@ -67,16 +67,6 @@ export var TextIconButton = function TextIconButton() {
|
|
67
67
|
size: 20
|
68
68
|
}), "Add a Form"));
|
69
69
|
};
|
70
|
-
export var TextButton = function TextButton() {
|
71
|
-
return ___EmotionJSX(Button, {
|
72
|
-
mb: "sm",
|
73
|
-
variant: "text",
|
74
|
-
"aria-label": "Add option"
|
75
|
-
}, ___EmotionJSX(Text, {
|
76
|
-
variant: "label",
|
77
|
-
color: "active"
|
78
|
-
}, " + Add Option"));
|
79
|
-
};
|
80
70
|
export var InlineButton = function InlineButton() {
|
81
71
|
return ___EmotionJSX(Button, {
|
82
72
|
mb: "sm",
|
@@ -138,7 +138,7 @@ export var DarkVariant = function DarkVariant() {
|
|
138
138
|
onPress: state.close,
|
139
139
|
"aria-label": "Yes"
|
140
140
|
}, "Yes"), ___EmotionJSX(Button, {
|
141
|
-
variant: "
|
141
|
+
variant: "link",
|
142
142
|
onPress: state.close,
|
143
143
|
"aria-label": "Cancel"
|
144
144
|
}, "Cancel"))))
|
@@ -547,7 +547,7 @@ export var Default = function Default() {
|
|
547
547
|
mr: "md",
|
548
548
|
"aria-label": "Save Button"
|
549
549
|
}, "Save"), ___EmotionJSX(Button, {
|
550
|
-
variant: "
|
550
|
+
variant: "link",
|
551
551
|
onPress: viewItem,
|
552
552
|
"aria-label": "Cancel Button"
|
553
553
|
}, "Cancel"))), editConfigurationVisible && ___EmotionJSX(OverlayPanel, {
|
@@ -677,7 +677,7 @@ export var Default = function Default() {
|
|
677
677
|
mr: "md",
|
678
678
|
"aria-label": "Save Button"
|
679
679
|
}, "Save"), ___EmotionJSX(Button, {
|
680
|
-
variant: "
|
680
|
+
variant: "link",
|
681
681
|
onPress: viewItem,
|
682
682
|
"aria-label": "Cancel Button"
|
683
683
|
}, "Cancel"))), addItemVisible && ___EmotionJSX(OverlayPanel, {
|
@@ -763,7 +763,7 @@ export var Default = function Default() {
|
|
763
763
|
isRow: true,
|
764
764
|
sx: buttonBarStyles
|
765
765
|
}, ___EmotionJSX(Button, {
|
766
|
-
variant: "
|
766
|
+
variant: "link",
|
767
767
|
onPress: resetListItem,
|
768
768
|
mr: "md",
|
769
769
|
"aria-label": "Cancel Button"
|
@@ -824,7 +824,7 @@ export var Default = function Default() {
|
|
824
824
|
isRow: true,
|
825
825
|
sx: buttonBarStyles
|
826
826
|
}, ___EmotionJSX(Button, {
|
827
|
-
variant: "
|
827
|
+
variant: "link",
|
828
828
|
onPress: resetListItem,
|
829
829
|
mr: "md"
|
830
830
|
}, "Cancel"), ___EmotionJSX(Button, {
|
@@ -846,11 +846,11 @@ export var Default = function Default() {
|
|
846
846
|
pt: "lg",
|
847
847
|
mr: "auto"
|
848
848
|
}, ___EmotionJSX(Button, {
|
849
|
-
variant: "
|
849
|
+
variant: "critical",
|
850
850
|
mr: "md",
|
851
851
|
onPress: deleteItem
|
852
852
|
}, "Delete"), ___EmotionJSX(Button, {
|
853
|
-
variant: "
|
853
|
+
variant: "link",
|
854
854
|
onPress: function onPress() {
|
855
855
|
return setIsDeleting(false);
|
856
856
|
}
|
@@ -96,7 +96,9 @@ export var Default = function Default() {
|
|
96
96
|
setEditOverviewVisible = _React$useState4[1];
|
97
97
|
|
98
98
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Button, {
|
99
|
-
onPress:
|
99
|
+
onPress: function onPress() {
|
100
|
+
return setStaticOverviewVisible(true);
|
101
|
+
}
|
100
102
|
}, "Open Panel"), staticOverviewVisible && ___EmotionJSX(OverlayPanel, {
|
101
103
|
isOpen: staticOverviewVisible
|
102
104
|
}, ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
|
@@ -111,7 +113,9 @@ export var Default = function Default() {
|
|
111
113
|
"aria-label": "edit",
|
112
114
|
variant: "inverted",
|
113
115
|
ml: "xs",
|
114
|
-
onPress:
|
116
|
+
onPress: function onPress() {
|
117
|
+
return setEditOverviewVisible(true);
|
118
|
+
}
|
115
119
|
}, ___EmotionJSX(Icon, {
|
116
120
|
icon: CreateIcon,
|
117
121
|
size: 14
|
@@ -435,7 +439,7 @@ export var Default = function Default() {
|
|
435
439
|
onPress: function onPress() {
|
436
440
|
return setEditOverviewVisible(false);
|
437
441
|
},
|
438
|
-
variant: "
|
442
|
+
variant: "link",
|
439
443
|
"aria-label": "cancel"
|
440
444
|
}, "Cancel"))))));
|
441
445
|
};
|