@pingux/astro 2.45.0-alpha.0 → 2.45.0-alpha.1
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/ButtonBar/ButtonBar.d.ts +4 -0
- package/lib/cjs/components/ButtonBar/ButtonBar.js +0 -5
- package/lib/cjs/components/ButtonBar/ButtonBar.stories.d.ts +8 -0
- package/lib/cjs/components/ButtonBar/ButtonBar.styles.d.ts +17 -0
- package/lib/cjs/components/ButtonBar/ButtonBar.test.d.ts +1 -0
- package/lib/cjs/components/ButtonBar/ButtonBar.test.js +0 -7
- package/lib/cjs/types/buttonBar.d.ts +6 -0
- package/lib/cjs/types/buttonBar.js +6 -0
- package/lib/cjs/types/index.d.ts +1 -0
- package/lib/cjs/types/index.js +27 -16
- package/lib/components/ButtonBar/ButtonBar.js +0 -5
- package/lib/components/ButtonBar/ButtonBar.test.js +0 -7
- package/lib/types/buttonBar.js +1 -0
- package/lib/types/index.js +1 -0
- package/package.json +1 -1
@@ -12,7 +12,6 @@ exports["default"] = void 0;
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
13
13
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
15
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
16
15
|
var _index = require("../../index");
|
17
16
|
var _react2 = require("@emotion/react");
|
18
17
|
var _excluded = ["align", "children"];
|
@@ -28,10 +27,6 @@ var ButtonBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
28
27
|
variant: align === 'right' ? 'buttonBar.justifyRightContainer' : 'buttonBar.container'
|
29
28
|
}, others), children);
|
30
29
|
});
|
31
|
-
ButtonBar.propTypes = {
|
32
|
-
/** Justifies the component's children. */
|
33
|
-
align: _propTypes["default"].oneOf(['left', 'right'])
|
34
|
-
};
|
35
30
|
ButtonBar.defaultProps = {
|
36
31
|
align: 'left'
|
37
32
|
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { StoryFn } from '@storybook/react';
|
2
|
+
import { ButtonBarProps } from '../../types';
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
|
4
|
+
export default _default;
|
5
|
+
export declare const Default: StoryFn<ButtonBarProps>;
|
6
|
+
export declare const RightAligned: StoryFn;
|
7
|
+
export declare const Secondary: StoryFn;
|
8
|
+
export declare const SecondaryRightAligned: StoryFn;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
container: {
|
3
|
+
bg: string;
|
4
|
+
gap: string;
|
5
|
+
justifyContent: string;
|
6
|
+
px: string;
|
7
|
+
py: string;
|
8
|
+
};
|
9
|
+
justifyRightContainer: {
|
10
|
+
justifyContent: string;
|
11
|
+
bg: string;
|
12
|
+
gap: string;
|
13
|
+
px: string;
|
14
|
+
py: string;
|
15
|
+
};
|
16
|
+
};
|
17
|
+
export default _default;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -91,11 +91,4 @@ test('justify-content left when align prop is excluded', function () {
|
|
91
91
|
getComponent();
|
92
92
|
var element = _testWrapper.screen.getByTestId(testId);
|
93
93
|
expect(element).toHaveStyleRule('justify-content', 'left');
|
94
|
-
});
|
95
|
-
test('an error is thrown when align has invalid prop value', function () {
|
96
|
-
expect(function () {
|
97
|
-
return getComponent({
|
98
|
-
align: 'rihgt'
|
99
|
-
});
|
100
|
-
}).toThrow('Failed prop type');
|
101
94
|
});
|
package/lib/cjs/types/index.d.ts
CHANGED
package/lib/cjs/types/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10, _context11, _context12, _context13, _context14, _context15, _context16, _context17, _context18, _context19;
|
3
|
+
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10, _context11, _context12, _context13, _context14, _context15, _context16, _context17, _context18, _context19, _context20;
|
4
4
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
5
5
|
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
6
6
|
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
@@ -51,8 +51,19 @@ _forEachInstanceProperty(_context4 = _Object$keys(_button)).call(_context4, func
|
|
51
51
|
}
|
52
52
|
});
|
53
53
|
});
|
54
|
+
var _buttonBar = require("./buttonBar");
|
55
|
+
_forEachInstanceProperty(_context5 = _Object$keys(_buttonBar)).call(_context5, function (key) {
|
56
|
+
if (key === "default" || key === "__esModule") return;
|
57
|
+
if (key in exports && exports[key] === _buttonBar[key]) return;
|
58
|
+
_Object$defineProperty(exports, key, {
|
59
|
+
enumerable: true,
|
60
|
+
get: function get() {
|
61
|
+
return _buttonBar[key];
|
62
|
+
}
|
63
|
+
});
|
64
|
+
});
|
54
65
|
var _card = require("./card");
|
55
|
-
_forEachInstanceProperty(
|
66
|
+
_forEachInstanceProperty(_context6 = _Object$keys(_card)).call(_context6, function (key) {
|
56
67
|
if (key === "default" || key === "__esModule") return;
|
57
68
|
if (key in exports && exports[key] === _card[key]) return;
|
58
69
|
_Object$defineProperty(exports, key, {
|
@@ -63,7 +74,7 @@ _forEachInstanceProperty(_context5 = _Object$keys(_card)).call(_context5, functi
|
|
63
74
|
});
|
64
75
|
});
|
65
76
|
var _fieldHelperText = require("./fieldHelperText");
|
66
|
-
_forEachInstanceProperty(
|
77
|
+
_forEachInstanceProperty(_context7 = _Object$keys(_fieldHelperText)).call(_context7, function (key) {
|
67
78
|
if (key === "default" || key === "__esModule") return;
|
68
79
|
if (key in exports && exports[key] === _fieldHelperText[key]) return;
|
69
80
|
_Object$defineProperty(exports, key, {
|
@@ -74,7 +85,7 @@ _forEachInstanceProperty(_context6 = _Object$keys(_fieldHelperText)).call(_conte
|
|
74
85
|
});
|
75
86
|
});
|
76
87
|
var _icon = require("./icon");
|
77
|
-
_forEachInstanceProperty(
|
88
|
+
_forEachInstanceProperty(_context8 = _Object$keys(_icon)).call(_context8, function (key) {
|
78
89
|
if (key === "default" || key === "__esModule") return;
|
79
90
|
if (key in exports && exports[key] === _icon[key]) return;
|
80
91
|
_Object$defineProperty(exports, key, {
|
@@ -85,7 +96,7 @@ _forEachInstanceProperty(_context7 = _Object$keys(_icon)).call(_context7, functi
|
|
85
96
|
});
|
86
97
|
});
|
87
98
|
var _iconBadge = require("./iconBadge");
|
88
|
-
_forEachInstanceProperty(
|
99
|
+
_forEachInstanceProperty(_context9 = _Object$keys(_iconBadge)).call(_context9, function (key) {
|
89
100
|
if (key === "default" || key === "__esModule") return;
|
90
101
|
if (key in exports && exports[key] === _iconBadge[key]) return;
|
91
102
|
_Object$defineProperty(exports, key, {
|
@@ -96,7 +107,7 @@ _forEachInstanceProperty(_context8 = _Object$keys(_iconBadge)).call(_context8, f
|
|
96
107
|
});
|
97
108
|
});
|
98
109
|
var _iconButton = require("./iconButton");
|
99
|
-
_forEachInstanceProperty(
|
110
|
+
_forEachInstanceProperty(_context10 = _Object$keys(_iconButton)).call(_context10, function (key) {
|
100
111
|
if (key === "default" || key === "__esModule") return;
|
101
112
|
if (key in exports && exports[key] === _iconButton[key]) return;
|
102
113
|
_Object$defineProperty(exports, key, {
|
@@ -107,7 +118,7 @@ _forEachInstanceProperty(_context9 = _Object$keys(_iconButton)).call(_context9,
|
|
107
118
|
});
|
108
119
|
});
|
109
120
|
var _item = require("./item");
|
110
|
-
_forEachInstanceProperty(
|
121
|
+
_forEachInstanceProperty(_context11 = _Object$keys(_item)).call(_context11, function (key) {
|
111
122
|
if (key === "default" || key === "__esModule") return;
|
112
123
|
if (key in exports && exports[key] === _item[key]) return;
|
113
124
|
_Object$defineProperty(exports, key, {
|
@@ -118,7 +129,7 @@ _forEachInstanceProperty(_context10 = _Object$keys(_item)).call(_context10, func
|
|
118
129
|
});
|
119
130
|
});
|
120
131
|
var _link = require("./link");
|
121
|
-
_forEachInstanceProperty(
|
132
|
+
_forEachInstanceProperty(_context12 = _Object$keys(_link)).call(_context12, function (key) {
|
122
133
|
if (key === "default" || key === "__esModule") return;
|
123
134
|
if (key in exports && exports[key] === _link[key]) return;
|
124
135
|
_Object$defineProperty(exports, key, {
|
@@ -129,7 +140,7 @@ _forEachInstanceProperty(_context11 = _Object$keys(_link)).call(_context11, func
|
|
129
140
|
});
|
130
141
|
});
|
131
142
|
var _listItem = require("./listItem");
|
132
|
-
_forEachInstanceProperty(
|
143
|
+
_forEachInstanceProperty(_context13 = _Object$keys(_listItem)).call(_context13, function (key) {
|
133
144
|
if (key === "default" || key === "__esModule") return;
|
134
145
|
if (key in exports && exports[key] === _listItem[key]) return;
|
135
146
|
_Object$defineProperty(exports, key, {
|
@@ -140,7 +151,7 @@ _forEachInstanceProperty(_context12 = _Object$keys(_listItem)).call(_context12,
|
|
140
151
|
});
|
141
152
|
});
|
142
153
|
var _loader = require("./loader");
|
143
|
-
_forEachInstanceProperty(
|
154
|
+
_forEachInstanceProperty(_context14 = _Object$keys(_loader)).call(_context14, function (key) {
|
144
155
|
if (key === "default" || key === "__esModule") return;
|
145
156
|
if (key in exports && exports[key] === _loader[key]) return;
|
146
157
|
_Object$defineProperty(exports, key, {
|
@@ -151,7 +162,7 @@ _forEachInstanceProperty(_context13 = _Object$keys(_loader)).call(_context13, fu
|
|
151
162
|
});
|
152
163
|
});
|
153
164
|
var _popoverContainer = require("./popoverContainer");
|
154
|
-
_forEachInstanceProperty(
|
165
|
+
_forEachInstanceProperty(_context15 = _Object$keys(_popoverContainer)).call(_context15, function (key) {
|
155
166
|
if (key === "default" || key === "__esModule") return;
|
156
167
|
if (key in exports && exports[key] === _popoverContainer[key]) return;
|
157
168
|
_Object$defineProperty(exports, key, {
|
@@ -162,7 +173,7 @@ _forEachInstanceProperty(_context14 = _Object$keys(_popoverContainer)).call(_con
|
|
162
173
|
});
|
163
174
|
});
|
164
175
|
var _separator = require("./separator");
|
165
|
-
_forEachInstanceProperty(
|
176
|
+
_forEachInstanceProperty(_context16 = _Object$keys(_separator)).call(_context16, function (key) {
|
166
177
|
if (key === "default" || key === "__esModule") return;
|
167
178
|
if (key in exports && exports[key] === _separator[key]) return;
|
168
179
|
_Object$defineProperty(exports, key, {
|
@@ -173,7 +184,7 @@ _forEachInstanceProperty(_context15 = _Object$keys(_separator)).call(_context15,
|
|
173
184
|
});
|
174
185
|
});
|
175
186
|
var _shared = require("./shared");
|
176
|
-
_forEachInstanceProperty(
|
187
|
+
_forEachInstanceProperty(_context17 = _Object$keys(_shared)).call(_context17, function (key) {
|
177
188
|
if (key === "default" || key === "__esModule") return;
|
178
189
|
if (key in exports && exports[key] === _shared[key]) return;
|
179
190
|
_Object$defineProperty(exports, key, {
|
@@ -184,7 +195,7 @@ _forEachInstanceProperty(_context16 = _Object$keys(_shared)).call(_context16, fu
|
|
184
195
|
});
|
185
196
|
});
|
186
197
|
var _table = require("./table");
|
187
|
-
_forEachInstanceProperty(
|
198
|
+
_forEachInstanceProperty(_context18 = _Object$keys(_table)).call(_context18, function (key) {
|
188
199
|
if (key === "default" || key === "__esModule") return;
|
189
200
|
if (key in exports && exports[key] === _table[key]) return;
|
190
201
|
_Object$defineProperty(exports, key, {
|
@@ -195,7 +206,7 @@ _forEachInstanceProperty(_context17 = _Object$keys(_table)).call(_context17, fun
|
|
195
206
|
});
|
196
207
|
});
|
197
208
|
var _text = require("./text");
|
198
|
-
_forEachInstanceProperty(
|
209
|
+
_forEachInstanceProperty(_context19 = _Object$keys(_text)).call(_context19, function (key) {
|
199
210
|
if (key === "default" || key === "__esModule") return;
|
200
211
|
if (key in exports && exports[key] === _text[key]) return;
|
201
212
|
_Object$defineProperty(exports, key, {
|
@@ -206,7 +217,7 @@ _forEachInstanceProperty(_context18 = _Object$keys(_text)).call(_context18, func
|
|
206
217
|
});
|
207
218
|
});
|
208
219
|
var _tooltipTrigger = require("./tooltipTrigger");
|
209
|
-
_forEachInstanceProperty(
|
220
|
+
_forEachInstanceProperty(_context20 = _Object$keys(_tooltipTrigger)).call(_context20, function (key) {
|
210
221
|
if (key === "default" || key === "__esModule") return;
|
211
222
|
if (key in exports && exports[key] === _tooltipTrigger[key]) return;
|
212
223
|
_Object$defineProperty(exports, key, {
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
3
3
|
var _excluded = ["align", "children"];
|
4
4
|
import React, { forwardRef } from 'react';
|
5
|
-
import PropTypes from 'prop-types';
|
6
5
|
import { Box } from '../../index';
|
7
6
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
8
7
|
var ButtonBar = /*#__PURE__*/forwardRef(function (props, ref) {
|
@@ -15,10 +14,6 @@ var ButtonBar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
15
14
|
variant: align === 'right' ? 'buttonBar.justifyRightContainer' : 'buttonBar.container'
|
16
15
|
}, others), children);
|
17
16
|
});
|
18
|
-
ButtonBar.propTypes = {
|
19
|
-
/** Justifies the component's children. */
|
20
|
-
align: PropTypes.oneOf(['left', 'right'])
|
21
|
-
};
|
22
17
|
ButtonBar.defaultProps = {
|
23
18
|
align: 'left'
|
24
19
|
};
|
@@ -88,11 +88,4 @@ test('justify-content left when align prop is excluded', function () {
|
|
88
88
|
getComponent();
|
89
89
|
var element = screen.getByTestId(testId);
|
90
90
|
expect(element).toHaveStyleRule('justify-content', 'left');
|
91
|
-
});
|
92
|
-
test('an error is thrown when align has invalid prop value', function () {
|
93
|
-
expect(function () {
|
94
|
-
return getComponent({
|
95
|
-
align: 'rihgt'
|
96
|
-
});
|
97
|
-
}).toThrow('Failed prop type');
|
98
91
|
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/lib/types/index.js
CHANGED