@pingux/astro 2.74.0-alpha.0 → 2.74.0-alpha.2
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.stories.d.ts +1 -0
- package/lib/cjs/components/Card/Card.stories.js +32 -1
- package/lib/cjs/components/Card/Card.styles.d.ts +25 -0
- package/lib/cjs/components/Card/Card.styles.js +25 -1
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.stories.d.ts +1 -1
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.stories.js +20 -21
- package/lib/components/Card/Card.stories.js +31 -1
- package/lib/components/Card/Card.styles.js +25 -1
- package/lib/components/RockerButtonGroup/RockerButtonGroup.stories.js +17 -18
- package/package.json +1 -1
@@ -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.InteractiveCard = exports.Default = exports.CardWidth = exports.CardRow = void 0;
|
15
|
+
exports["default"] = exports.InteractiveCard = exports.HeaderAndFooter = exports.Default = exports.CardWidth = exports.CardRow = void 0;
|
16
16
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
18
18
|
var _react = _interopRequireDefault(require("react"));
|
@@ -46,6 +46,37 @@ var Default = function Default(args) {
|
|
46
46
|
return (0, _react2.jsx)(_index.Card, args);
|
47
47
|
};
|
48
48
|
exports.Default = Default;
|
49
|
+
var HeaderAndFooter = function HeaderAndFooter(args) {
|
50
|
+
var textStyling = {
|
51
|
+
fontSize: 'md',
|
52
|
+
fontWeight: 600
|
53
|
+
};
|
54
|
+
return (0, _react2.jsx)(_index.Card, (0, _extends2["default"])({}, args, {
|
55
|
+
variant: "cards.flat",
|
56
|
+
width: "500px"
|
57
|
+
}), (0, _react2.jsx)(_index.Box, {
|
58
|
+
variant: "cards.header"
|
59
|
+
}, (0, _react2.jsx)(_index.Text, {
|
60
|
+
sx: textStyling
|
61
|
+
}, "Optional Card Header")), (0, _react2.jsx)(_index.Box, {
|
62
|
+
variant: "cards.body"
|
63
|
+
}, (0, _react2.jsx)(_index.Text, {
|
64
|
+
sx: textStyling,
|
65
|
+
mb: "md"
|
66
|
+
}, "Card Body"), (0, _react2.jsx)(_index.Box, {
|
67
|
+
gap: "md"
|
68
|
+
}, (0, _react2.jsx)(_index.Button, {
|
69
|
+
sx: {
|
70
|
+
width: 'fit-content'
|
71
|
+
},
|
72
|
+
variant: "primary"
|
73
|
+
}, "Save"), (0, _react2.jsx)(_index.Text, null, "Lorem ipsum dolor sit amet consectetur adipisicing elit. Fuga sed ratione, recusandae ipsam explicabo, quasi vel maxime sint harum qui rerum perferendis. Voluptatem nisi eaque, distinctio accusamus nobis voluptas nemo."))), (0, _react2.jsx)(_index.Box, {
|
74
|
+
variant: "cards.footer"
|
75
|
+
}, (0, _react2.jsx)(_index.Text, {
|
76
|
+
sx: textStyling
|
77
|
+
}, "Optional Card Footer")));
|
78
|
+
};
|
79
|
+
exports.HeaderAndFooter = HeaderAndFooter;
|
49
80
|
var CardWidth = function CardWidth(args) {
|
50
81
|
return (0, _react2.jsx)(_index.Box, {
|
51
82
|
gap: "40px",
|
@@ -40,5 +40,30 @@ declare const _default: {
|
|
40
40
|
flex: string;
|
41
41
|
p: string;
|
42
42
|
};
|
43
|
+
header: {
|
44
|
+
p: number;
|
45
|
+
borderBottom: string;
|
46
|
+
borderBottomColor: string;
|
47
|
+
};
|
48
|
+
footer: {
|
49
|
+
borderTop: string;
|
50
|
+
borderTopColor: string;
|
51
|
+
p: number;
|
52
|
+
};
|
53
|
+
flat: {
|
54
|
+
p: number;
|
55
|
+
boxShadow: string;
|
56
|
+
border: string;
|
57
|
+
borderColor: string;
|
58
|
+
borderRadius: string;
|
59
|
+
display: string;
|
60
|
+
color: string;
|
61
|
+
fontSize: string;
|
62
|
+
fontWeight: number;
|
63
|
+
flex: string;
|
64
|
+
};
|
65
|
+
body: {
|
66
|
+
p: number;
|
67
|
+
};
|
43
68
|
};
|
44
69
|
export default _default;
|
@@ -48,8 +48,32 @@ var interactive = _objectSpread(_objectSpread({}, container), {}, {
|
|
48
48
|
borderColor: 'active'
|
49
49
|
}
|
50
50
|
});
|
51
|
+
var flat = _objectSpread(_objectSpread({}, container), {}, {
|
52
|
+
p: 0,
|
53
|
+
boxShadow: '0 1px 3px 0px rgba(0,0,0, 0.13)',
|
54
|
+
border: '1px solid',
|
55
|
+
borderColor: 'neutral.90',
|
56
|
+
borderRadius: '16px'
|
57
|
+
});
|
58
|
+
var header = {
|
59
|
+
p: 24,
|
60
|
+
borderBottom: '1px solid',
|
61
|
+
borderBottomColor: 'neutral.90'
|
62
|
+
};
|
63
|
+
var footer = {
|
64
|
+
borderTop: '1px solid',
|
65
|
+
borderTopColor: 'neutral.90',
|
66
|
+
p: 24
|
67
|
+
};
|
68
|
+
var body = {
|
69
|
+
p: 24
|
70
|
+
};
|
51
71
|
var _default = {
|
52
72
|
container: container,
|
53
|
-
interactive: interactive
|
73
|
+
interactive: interactive,
|
74
|
+
header: header,
|
75
|
+
footer: footer,
|
76
|
+
flat: flat,
|
77
|
+
body: body
|
54
78
|
};
|
55
79
|
exports["default"] = _default;
|
@@ -5,5 +5,5 @@ export default _default;
|
|
5
5
|
export declare const Default: StoryFn<RockerButtonGroupProps>;
|
6
6
|
export declare const Uncontrolled: StoryFn;
|
7
7
|
export declare const Controlled: StoryFn;
|
8
|
-
export declare const withCustomSelectedColors: StoryFn;
|
9
8
|
export declare const DisabledSingleButton: StoryFn;
|
9
|
+
export declare const customColors: StoryFn;
|
@@ -8,7 +8,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
8
8
|
_Object$defineProperty(exports, "__esModule", {
|
9
9
|
value: true
|
10
10
|
});
|
11
|
-
exports
|
11
|
+
exports["default"] = exports.customColors = exports.Uncontrolled = exports.DisabledSingleButton = exports.Default = exports.Controlled = void 0;
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
13
13
|
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectDestructuringEmpty"));
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
@@ -93,7 +93,23 @@ var Controlled = function Controlled() {
|
|
93
93
|
}, "Maybe"));
|
94
94
|
};
|
95
95
|
exports.Controlled = Controlled;
|
96
|
-
var
|
96
|
+
var DisabledSingleButton = function DisabledSingleButton() {
|
97
|
+
return (0, _react2.jsx)(_index.RockerButtonGroup, {
|
98
|
+
defaultSelectedKey: "or",
|
99
|
+
disabledKeys: ['and']
|
100
|
+
}, (0, _react2.jsx)(_index.RockerButton, {
|
101
|
+
name: "and",
|
102
|
+
key: "and"
|
103
|
+
}, "And"), (0, _react2.jsx)(_index.RockerButton, {
|
104
|
+
name: "or",
|
105
|
+
key: "or"
|
106
|
+
}, "Or"), (0, _react2.jsx)(_index.RockerButton, {
|
107
|
+
name: "maybe",
|
108
|
+
key: "maybe"
|
109
|
+
}, "Maybe"));
|
110
|
+
};
|
111
|
+
exports.DisabledSingleButton = DisabledSingleButton;
|
112
|
+
var customColors = function customColors() {
|
97
113
|
return (0, _react2.jsx)(_index.RockerButtonGroup, null, (0, _react2.jsx)(_index.RockerButton, {
|
98
114
|
name: "and",
|
99
115
|
key: "and",
|
@@ -110,25 +126,8 @@ var withCustomSelectedColors = function withCustomSelectedColors() {
|
|
110
126
|
name: "maybe",
|
111
127
|
key: "maybe",
|
112
128
|
selectedStyles: {
|
113
|
-
bg: '
|
114
|
-
color: 'yellow'
|
129
|
+
bg: 'decorative.4'
|
115
130
|
}
|
116
131
|
}, "Maybe"));
|
117
132
|
};
|
118
|
-
exports.
|
119
|
-
var DisabledSingleButton = function DisabledSingleButton() {
|
120
|
-
return (0, _react2.jsx)(_index.RockerButtonGroup, {
|
121
|
-
defaultSelectedKey: "or",
|
122
|
-
disabledKeys: ['and']
|
123
|
-
}, (0, _react2.jsx)(_index.RockerButton, {
|
124
|
-
name: "and",
|
125
|
-
key: "and"
|
126
|
-
}, "And"), (0, _react2.jsx)(_index.RockerButton, {
|
127
|
-
name: "or",
|
128
|
-
key: "or"
|
129
|
-
}, "Or"), (0, _react2.jsx)(_index.RockerButton, {
|
130
|
-
name: "maybe",
|
131
|
-
key: "maybe"
|
132
|
-
}, "Maybe"));
|
133
|
-
};
|
134
|
-
exports.DisabledSingleButton = DisabledSingleButton;
|
133
|
+
exports.customColors = customColors;
|
@@ -13,7 +13,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
13
13
|
import React from 'react';
|
14
14
|
import { withDesign } from 'storybook-addon-designs';
|
15
15
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
16
|
-
import { Box, Card } from '../../index';
|
16
|
+
import { Box, Button, Card, Text } from '../../index';
|
17
17
|
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
18
18
|
import CardReadme from './Card.mdx';
|
19
19
|
import { cardArgTypes } from './cardAttributes';
|
@@ -37,6 +37,36 @@ export default {
|
|
37
37
|
export var Default = function Default(args) {
|
38
38
|
return ___EmotionJSX(Card, args);
|
39
39
|
};
|
40
|
+
export var HeaderAndFooter = function HeaderAndFooter(args) {
|
41
|
+
var textStyling = {
|
42
|
+
fontSize: 'md',
|
43
|
+
fontWeight: 600
|
44
|
+
};
|
45
|
+
return ___EmotionJSX(Card, _extends({}, args, {
|
46
|
+
variant: "cards.flat",
|
47
|
+
width: "500px"
|
48
|
+
}), ___EmotionJSX(Box, {
|
49
|
+
variant: "cards.header"
|
50
|
+
}, ___EmotionJSX(Text, {
|
51
|
+
sx: textStyling
|
52
|
+
}, "Optional Card Header")), ___EmotionJSX(Box, {
|
53
|
+
variant: "cards.body"
|
54
|
+
}, ___EmotionJSX(Text, {
|
55
|
+
sx: textStyling,
|
56
|
+
mb: "md"
|
57
|
+
}, "Card Body"), ___EmotionJSX(Box, {
|
58
|
+
gap: "md"
|
59
|
+
}, ___EmotionJSX(Button, {
|
60
|
+
sx: {
|
61
|
+
width: 'fit-content'
|
62
|
+
},
|
63
|
+
variant: "primary"
|
64
|
+
}, "Save"), ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet consectetur adipisicing elit. Fuga sed ratione, recusandae ipsam explicabo, quasi vel maxime sint harum qui rerum perferendis. Voluptatem nisi eaque, distinctio accusamus nobis voluptas nemo."))), ___EmotionJSX(Box, {
|
65
|
+
variant: "cards.footer"
|
66
|
+
}, ___EmotionJSX(Text, {
|
67
|
+
sx: textStyling
|
68
|
+
}, "Optional Card Footer")));
|
69
|
+
};
|
40
70
|
export var CardWidth = function CardWidth(args) {
|
41
71
|
return ___EmotionJSX(Box, {
|
42
72
|
gap: "40px",
|
@@ -41,7 +41,31 @@ var interactive = _objectSpread(_objectSpread({}, container), {}, {
|
|
41
41
|
borderColor: 'active'
|
42
42
|
}
|
43
43
|
});
|
44
|
+
var flat = _objectSpread(_objectSpread({}, container), {}, {
|
45
|
+
p: 0,
|
46
|
+
boxShadow: '0 1px 3px 0px rgba(0,0,0, 0.13)',
|
47
|
+
border: '1px solid',
|
48
|
+
borderColor: 'neutral.90',
|
49
|
+
borderRadius: '16px'
|
50
|
+
});
|
51
|
+
var header = {
|
52
|
+
p: 24,
|
53
|
+
borderBottom: '1px solid',
|
54
|
+
borderBottomColor: 'neutral.90'
|
55
|
+
};
|
56
|
+
var footer = {
|
57
|
+
borderTop: '1px solid',
|
58
|
+
borderTopColor: 'neutral.90',
|
59
|
+
p: 24
|
60
|
+
};
|
61
|
+
var body = {
|
62
|
+
p: 24
|
63
|
+
};
|
44
64
|
export default {
|
45
65
|
container: container,
|
46
|
-
interactive: interactive
|
66
|
+
interactive: interactive,
|
67
|
+
header: header,
|
68
|
+
footer: footer,
|
69
|
+
flat: flat,
|
70
|
+
body: body
|
47
71
|
};
|
@@ -76,7 +76,22 @@ export var Controlled = function Controlled() {
|
|
76
76
|
key: "maybe"
|
77
77
|
}, "Maybe"));
|
78
78
|
};
|
79
|
-
export var
|
79
|
+
export var DisabledSingleButton = function DisabledSingleButton() {
|
80
|
+
return ___EmotionJSX(RockerButtonGroup, {
|
81
|
+
defaultSelectedKey: "or",
|
82
|
+
disabledKeys: ['and']
|
83
|
+
}, ___EmotionJSX(RockerButton, {
|
84
|
+
name: "and",
|
85
|
+
key: "and"
|
86
|
+
}, "And"), ___EmotionJSX(RockerButton, {
|
87
|
+
name: "or",
|
88
|
+
key: "or"
|
89
|
+
}, "Or"), ___EmotionJSX(RockerButton, {
|
90
|
+
name: "maybe",
|
91
|
+
key: "maybe"
|
92
|
+
}, "Maybe"));
|
93
|
+
};
|
94
|
+
export var customColors = function customColors() {
|
80
95
|
return ___EmotionJSX(RockerButtonGroup, null, ___EmotionJSX(RockerButton, {
|
81
96
|
name: "and",
|
82
97
|
key: "and",
|
@@ -93,23 +108,7 @@ export var withCustomSelectedColors = function withCustomSelectedColors() {
|
|
93
108
|
name: "maybe",
|
94
109
|
key: "maybe",
|
95
110
|
selectedStyles: {
|
96
|
-
bg: '
|
97
|
-
color: 'yellow'
|
111
|
+
bg: 'decorative.4'
|
98
112
|
}
|
99
113
|
}, "Maybe"));
|
100
|
-
};
|
101
|
-
export var DisabledSingleButton = function DisabledSingleButton() {
|
102
|
-
return ___EmotionJSX(RockerButtonGroup, {
|
103
|
-
defaultSelectedKey: "or",
|
104
|
-
disabledKeys: ['and']
|
105
|
-
}, ___EmotionJSX(RockerButton, {
|
106
|
-
name: "and",
|
107
|
-
key: "and"
|
108
|
-
}, "And"), ___EmotionJSX(RockerButton, {
|
109
|
-
name: "or",
|
110
|
-
key: "or"
|
111
|
-
}, "Or"), ___EmotionJSX(RockerButton, {
|
112
|
-
name: "maybe",
|
113
|
-
key: "maybe"
|
114
|
-
}, "Maybe"));
|
115
114
|
};
|