@pingux/astro 2.140.1-alpha.0 → 2.141.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/Card/Card.js +2 -3
- package/lib/cjs/components/Card/Card.stories.d.ts +1 -1
- package/lib/cjs/components/Card/Card.stories.js +8 -7
- package/lib/cjs/components/Card/Card.test.js +2 -1
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +2 -0
- package/lib/cjs/styles/themes/next-gen/variants/cards.d.ts +2 -0
- package/lib/cjs/styles/themes/next-gen/variants/cards.js +2 -1
- package/lib/components/Card/Card.js +2 -3
- package/lib/components/Card/Card.stories.js +6 -5
- package/lib/components/Card/Card.test.js +2 -1
- package/lib/styles/themes/next-gen/variants/cards.js +2 -1
- package/package.json +1 -1
@@ -40,7 +40,8 @@ var Card = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
40
40
|
onPressEnd = props.onPressEnd,
|
41
41
|
onPressChange = props.onPressChange,
|
42
42
|
onPressUp = props.onPressUp,
|
43
|
-
|
43
|
+
_props$isInteractiveW = props.isInteractiveWithin,
|
44
|
+
isInteractiveWithin = _props$isInteractiveW === void 0 ? true : _props$isInteractiveW,
|
44
45
|
isSelected = props.isSelected,
|
45
46
|
others = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
46
47
|
var cardRef = (0, _hooks.useLocalOrForwardRef)(ref);
|
@@ -77,8 +78,6 @@ var Card = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
77
78
|
}),
|
78
79
|
classNames = _useStatusClasses.classNames;
|
79
80
|
var ariaLabel = props['aria-label'];
|
80
|
-
|
81
|
-
// TODO: [Astro 3.0.0] Update isInteractiveWithin[default] for this prop to true
|
82
81
|
var mergedProps = (0, _utils.mergeProps)(others, focusWithinProps, !isInteractiveWithin ? _objectSpread(_objectSpread(_objectSpread({}, pressProps), hoverProps), focusProps) : {});
|
83
82
|
return (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
|
84
83
|
"aria-label": ariaLabel,
|
@@ -33,4 +33,4 @@ export declare const InteractiveCard: {
|
|
33
33
|
};
|
34
34
|
};
|
35
35
|
export declare const WithInteractiveContent: (args: any) => React.JSX.Element;
|
36
|
-
export declare const
|
36
|
+
export declare const RadioGroupCard: (args: any) => React.JSX.Element;
|
@@ -12,7 +12,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
12
12
|
_Object$defineProperty(exports, "__esModule", {
|
13
13
|
value: true
|
14
14
|
});
|
15
|
-
exports["default"] = exports.WithInteractiveContent = exports.InteractiveCard = exports.HeaderAndFooter = exports.Default = exports.CardWidth = exports.CardRow =
|
15
|
+
exports["default"] = exports.WithInteractiveContent = exports.RadioGroupCard = exports.InteractiveCard = exports.HeaderAndFooter = exports.Default = exports.CardWidth = exports.CardRow = void 0;
|
16
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
17
17
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
18
18
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
@@ -56,8 +56,7 @@ Default.parameters = {
|
|
56
56
|
var HeaderAndFooter = function HeaderAndFooter(args) {
|
57
57
|
var textStyling = {
|
58
58
|
fontSize: 'md',
|
59
|
-
fontWeight: 600
|
60
|
-
color: 'text.secondary'
|
59
|
+
fontWeight: 600
|
61
60
|
};
|
62
61
|
return (0, _react2.jsx)(_index.Card, (0, _extends2["default"])({}, args, {
|
63
62
|
variant: "cards.flat",
|
@@ -163,7 +162,8 @@ var InteractiveCard = function InteractiveCard(args) {
|
|
163
162
|
},
|
164
163
|
tabIndex: "0",
|
165
164
|
variant: "cards.interactive",
|
166
|
-
sx: sx
|
165
|
+
sx: sx,
|
166
|
+
isInteractiveWithin: false
|
167
167
|
}), "Interactive Card");
|
168
168
|
};
|
169
169
|
exports.InteractiveCard = InteractiveCard;
|
@@ -183,7 +183,7 @@ var WithInteractiveContent = function WithInteractiveContent(args) {
|
|
183
183
|
}));
|
184
184
|
};
|
185
185
|
exports.WithInteractiveContent = WithInteractiveContent;
|
186
|
-
var
|
186
|
+
var RadioGroupCard = function RadioGroupCard(args) {
|
187
187
|
var sx = {
|
188
188
|
alignContent: 'center',
|
189
189
|
height: '221px',
|
@@ -202,7 +202,8 @@ var ActiveCard = function ActiveCard(args) {
|
|
202
202
|
isSelected: isSelected,
|
203
203
|
onPress: function onPress() {
|
204
204
|
return setIsSelected(!isSelected);
|
205
|
-
}
|
205
|
+
},
|
206
|
+
isInteractiveWithin: false
|
206
207
|
}), "Active Card");
|
207
208
|
};
|
208
|
-
exports.
|
209
|
+
exports.RadioGroupCard = RadioGroupCard;
|
@@ -57,7 +57,8 @@ test('card allows hover, focus, and press events', function () {
|
|
57
57
|
getComponent({
|
58
58
|
children: children,
|
59
59
|
onPress: onPress,
|
60
|
-
tabIndex: 0
|
60
|
+
tabIndex: 0,
|
61
|
+
isInteractiveWithin: false
|
61
62
|
});
|
62
63
|
var card = _react2.screen.getByTestId(testId);
|
63
64
|
expect(card).not.toHaveClass('is-hovered');
|
@@ -3287,6 +3287,7 @@ declare const _default: {
|
|
3287
3287
|
container: {
|
3288
3288
|
p: string;
|
3289
3289
|
borderColor: string;
|
3290
|
+
lineHeight: number;
|
3290
3291
|
boxShadow: string;
|
3291
3292
|
border: string;
|
3292
3293
|
borderRadius: string;
|
@@ -3337,6 +3338,7 @@ declare const _default: {
|
|
3337
3338
|
tableWrapper: {
|
3338
3339
|
p: string;
|
3339
3340
|
borderColor: string;
|
3341
|
+
lineHeight: number;
|
3340
3342
|
boxShadow: string;
|
3341
3343
|
border: string;
|
3342
3344
|
borderRadius: string;
|
@@ -63,6 +63,7 @@ declare const _default: {
|
|
63
63
|
container: {
|
64
64
|
p: string;
|
65
65
|
borderColor: string;
|
66
|
+
lineHeight: number;
|
66
67
|
boxShadow: string;
|
67
68
|
border: string;
|
68
69
|
borderRadius: string;
|
@@ -113,6 +114,7 @@ declare const _default: {
|
|
113
114
|
tableWrapper: {
|
114
115
|
p: string;
|
115
116
|
borderColor: string;
|
117
|
+
lineHeight: number;
|
116
118
|
boxShadow: string;
|
117
119
|
border: string;
|
118
120
|
borderRadius: string;
|
@@ -37,7 +37,8 @@ var interactive = {
|
|
37
37
|
};
|
38
38
|
var container = _objectSpread(_objectSpread({}, _flatInstanceProperty(_Card)), {}, {
|
39
39
|
p: 'lg',
|
40
|
-
borderColor: 'border.base'
|
40
|
+
borderColor: 'border.base',
|
41
|
+
lineHeight: 1.6
|
41
42
|
});
|
42
43
|
var dark = _objectSpread(_objectSpread({}, _flatInstanceProperty(_Card)), {}, {
|
43
44
|
border: 'none',
|
@@ -29,7 +29,8 @@ var Card = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
29
29
|
onPressEnd = props.onPressEnd,
|
30
30
|
onPressChange = props.onPressChange,
|
31
31
|
onPressUp = props.onPressUp,
|
32
|
-
|
32
|
+
_props$isInteractiveW = props.isInteractiveWithin,
|
33
|
+
isInteractiveWithin = _props$isInteractiveW === void 0 ? true : _props$isInteractiveW,
|
33
34
|
isSelected = props.isSelected,
|
34
35
|
others = _objectWithoutProperties(props, _excluded);
|
35
36
|
var cardRef = useLocalOrForwardRef(ref);
|
@@ -66,8 +67,6 @@ var Card = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
66
67
|
}),
|
67
68
|
classNames = _useStatusClasses.classNames;
|
68
69
|
var ariaLabel = props['aria-label'];
|
69
|
-
|
70
|
-
// TODO: [Astro 3.0.0] Update isInteractiveWithin[default] for this prop to true
|
71
70
|
var mergedProps = mergeProps(others, focusWithinProps, !isInteractiveWithin ? _objectSpread(_objectSpread(_objectSpread({}, pressProps), hoverProps), focusProps) : {});
|
72
71
|
return ___EmotionJSX(Box, _extends({
|
73
72
|
"aria-label": ariaLabel,
|
@@ -47,8 +47,7 @@ Default.parameters = {
|
|
47
47
|
export var HeaderAndFooter = function HeaderAndFooter(args) {
|
48
48
|
var textStyling = {
|
49
49
|
fontSize: 'md',
|
50
|
-
fontWeight: 600
|
51
|
-
color: 'text.secondary'
|
50
|
+
fontWeight: 600
|
52
51
|
};
|
53
52
|
return ___EmotionJSX(Card, _extends({}, args, {
|
54
53
|
variant: "cards.flat",
|
@@ -151,7 +150,8 @@ export var InteractiveCard = function InteractiveCard(args) {
|
|
151
150
|
},
|
152
151
|
tabIndex: "0",
|
153
152
|
variant: "cards.interactive",
|
154
|
-
sx: sx
|
153
|
+
sx: sx,
|
154
|
+
isInteractiveWithin: false
|
155
155
|
}), "Interactive Card");
|
156
156
|
};
|
157
157
|
InteractiveCard.parameters = {
|
@@ -169,7 +169,7 @@ export var WithInteractiveContent = function WithInteractiveContent(args) {
|
|
169
169
|
width: "300px"
|
170
170
|
}));
|
171
171
|
};
|
172
|
-
export var
|
172
|
+
export var RadioGroupCard = function RadioGroupCard(args) {
|
173
173
|
var sx = {
|
174
174
|
alignContent: 'center',
|
175
175
|
height: '221px',
|
@@ -188,6 +188,7 @@ export var ActiveCard = function ActiveCard(args) {
|
|
188
188
|
isSelected: isSelected,
|
189
189
|
onPress: function onPress() {
|
190
190
|
return setIsSelected(!isSelected);
|
191
|
-
}
|
191
|
+
},
|
192
|
+
isInteractiveWithin: false
|
192
193
|
}), "Active Card");
|
193
194
|
};
|
@@ -54,7 +54,8 @@ test('card allows hover, focus, and press events', function () {
|
|
54
54
|
getComponent({
|
55
55
|
children: children,
|
56
56
|
onPress: onPress,
|
57
|
-
tabIndex: 0
|
57
|
+
tabIndex: 0,
|
58
|
+
isInteractiveWithin: false
|
58
59
|
});
|
59
60
|
var card = screen.getByTestId(testId);
|
60
61
|
expect(card).not.toHaveClass('is-hovered');
|
@@ -29,7 +29,8 @@ var interactive = {
|
|
29
29
|
};
|
30
30
|
var container = _objectSpread(_objectSpread({}, flat), {}, {
|
31
31
|
p: 'lg',
|
32
|
-
borderColor: 'border.base'
|
32
|
+
borderColor: 'border.base',
|
33
|
+
lineHeight: 1.6
|
33
34
|
});
|
34
35
|
var dark = _objectSpread(_objectSpread({}, flat), {}, {
|
35
36
|
border: 'none',
|