@pingux/astro 2.78.0-alpha.0 → 2.78.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/Messages/Messages.stories.d.ts +27 -6
- package/lib/cjs/components/Messages/Messages.stories.js +61 -33
- package/lib/cjs/components/TimeField/TimeField.stories.d.ts +8 -0
- package/lib/cjs/components/TimeField/TimeField.stories.js +8 -0
- package/lib/cjs/utils/designUtils/figmaLinks.d.ts +2 -0
- package/lib/cjs/utils/designUtils/figmaLinks.js +3 -1
- package/lib/components/Messages/Messages.stories.js +59 -32
- package/lib/components/TimeField/TimeField.stories.js +8 -0
- package/lib/utils/designUtils/figmaLinks.js +3 -1
- package/package.json +1 -1
@@ -74,8 +74,8 @@ export declare const ControlledWithButton: {
|
|
74
74
|
};
|
75
75
|
};
|
76
76
|
};
|
77
|
-
export declare const
|
78
|
-
(
|
77
|
+
export declare const UseReducer: {
|
78
|
+
(): React.JSX.Element;
|
79
79
|
parameters: {
|
80
80
|
a11y: {
|
81
81
|
config: {
|
@@ -87,7 +87,7 @@ export declare const WithCustomColorsAndIcons: {
|
|
87
87
|
};
|
88
88
|
};
|
89
89
|
};
|
90
|
-
export declare const
|
90
|
+
export declare const UseReducerWithMultipleContainers: {
|
91
91
|
(): React.JSX.Element;
|
92
92
|
parameters: {
|
93
93
|
a11y: {
|
@@ -100,9 +100,13 @@ export declare const UseReducer: {
|
|
100
100
|
};
|
101
101
|
};
|
102
102
|
};
|
103
|
-
export declare const
|
104
|
-
(): React.JSX.Element;
|
103
|
+
export declare const WithTextStyling: {
|
104
|
+
(args: any): React.JSX.Element;
|
105
105
|
parameters: {
|
106
|
+
design: {
|
107
|
+
type: string;
|
108
|
+
url: string;
|
109
|
+
};
|
106
110
|
a11y: {
|
107
111
|
config: {
|
108
112
|
rules: {
|
@@ -113,7 +117,24 @@ export declare const UseReducerWithMultipleContainers: {
|
|
113
117
|
};
|
114
118
|
};
|
115
119
|
};
|
116
|
-
export declare const
|
120
|
+
export declare const WithLink: {
|
121
|
+
(args: any): React.JSX.Element;
|
122
|
+
parameters: {
|
123
|
+
design: {
|
124
|
+
type: string;
|
125
|
+
url: string;
|
126
|
+
};
|
127
|
+
a11y: {
|
128
|
+
config: {
|
129
|
+
rules: {
|
130
|
+
id: string;
|
131
|
+
enabled: boolean;
|
132
|
+
}[];
|
133
|
+
};
|
134
|
+
};
|
135
|
+
};
|
136
|
+
};
|
137
|
+
export declare const Customization: {
|
117
138
|
(args: any): React.JSX.Element;
|
118
139
|
parameters: {
|
119
140
|
a11y: {
|
@@ -14,7 +14,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
14
14
|
_Object$defineProperty(exports, "__esModule", {
|
15
15
|
value: true
|
16
16
|
});
|
17
|
-
exports["default"] = exports.WithTextStyling = exports.
|
17
|
+
exports["default"] = exports.WithTextStyling = exports.WithLink = exports.UseReducerWithMultipleContainers = exports.UseReducer = exports.DefaultDynamic = exports.Default = exports.Customization = exports.ControlledWithButton = exports.Controlled = void 0;
|
18
18
|
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
19
19
|
var _setTimeout2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/set-timeout"));
|
20
20
|
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
@@ -66,7 +66,7 @@ var _default = {
|
|
66
66
|
}
|
67
67
|
};
|
68
68
|
exports["default"] = _default;
|
69
|
-
var loremText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
69
|
+
var loremText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit';
|
70
70
|
var messages = [{
|
71
71
|
key: 'message1',
|
72
72
|
text: loremText
|
@@ -86,11 +86,19 @@ var messages = [{
|
|
86
86
|
var Default = function Default(args) {
|
87
87
|
return (0, _react2.jsx)(_index.Messages, args, (0, _react2.jsx)(_reactStately.Item, {
|
88
88
|
key: "message1",
|
89
|
-
"data-id": "message1"
|
89
|
+
"data-id": "message1",
|
90
|
+
status: _statuses["default"].SUCCESS
|
90
91
|
}, loremText), (0, _react2.jsx)(_reactStately.Item, {
|
91
92
|
key: "message2",
|
92
93
|
"data-id": "message2",
|
93
|
-
status: _statuses["default"].
|
94
|
+
status: _statuses["default"].WARNING
|
95
|
+
}, loremText), (0, _react2.jsx)(_reactStately.Item, {
|
96
|
+
key: "message2",
|
97
|
+
"data-id": "message3",
|
98
|
+
status: _statuses["default"].ERROR
|
99
|
+
}, loremText), (0, _react2.jsx)(_reactStately.Item, {
|
100
|
+
key: "message2",
|
101
|
+
"data-id": "message4"
|
94
102
|
}, loremText));
|
95
103
|
};
|
96
104
|
exports.Default = Default;
|
@@ -207,26 +215,6 @@ ControlledWithButton.parameters = {
|
|
207
215
|
}
|
208
216
|
}
|
209
217
|
};
|
210
|
-
var WithCustomColorsAndIcons = function WithCustomColorsAndIcons(args) {
|
211
|
-
return (0, _react2.jsx)(_index.Messages, args, (0, _react2.jsx)(_reactStately.Item, {
|
212
|
-
bg: "accent.99",
|
213
|
-
color: "active",
|
214
|
-
icon: _AccountIcon["default"]
|
215
|
-
}, loremText));
|
216
|
-
};
|
217
|
-
|
218
|
-
// Added to bypass color contrast in safari
|
219
|
-
exports.WithCustomColorsAndIcons = WithCustomColorsAndIcons;
|
220
|
-
WithCustomColorsAndIcons.parameters = {
|
221
|
-
a11y: {
|
222
|
-
config: {
|
223
|
-
rules: [{
|
224
|
-
id: 'color-contrast',
|
225
|
-
enabled: false
|
226
|
-
}]
|
227
|
-
}
|
228
|
-
}
|
229
|
-
};
|
230
218
|
var UseReducer = function UseReducer() {
|
231
219
|
// import { messagesReducer as messagesReducerCore } from '@pingux/astro';
|
232
220
|
// const messagesReducer = messagesReducerCore;
|
@@ -352,15 +340,7 @@ var WithTextStyling = function WithTextStyling(args) {
|
|
352
340
|
node: (0, _react2.jsx)("strong", null, loremText)
|
353
341
|
}, {
|
354
342
|
key: 'message2',
|
355
|
-
|
356
|
-
status: 'success'
|
357
|
-
}, {
|
358
|
-
key: 'message3',
|
359
|
-
text: loremText,
|
360
|
-
status: 'warning'
|
361
|
-
}, {
|
362
|
-
key: 'message4',
|
363
|
-
node: (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)("b", null, "Lorem Ipsum! "), loremText),
|
343
|
+
node: (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)("b", null, "Lorem Ipsum! "), "dolor sit amet, consectetur adipiscing elit"),
|
364
344
|
status: 'error'
|
365
345
|
}];
|
366
346
|
return (0, _react2.jsx)(_index.Messages, (0, _extends2["default"])({}, args, {
|
@@ -373,6 +353,54 @@ var WithTextStyling = function WithTextStyling(args) {
|
|
373
353
|
// Added to bypass color contrast in safari
|
374
354
|
exports.WithTextStyling = WithTextStyling;
|
375
355
|
WithTextStyling.parameters = {
|
356
|
+
design: {
|
357
|
+
type: 'figma',
|
358
|
+
url: _figmaLinks.FIGMA_LINKS.messages.withTextStyling
|
359
|
+
},
|
360
|
+
a11y: {
|
361
|
+
config: {
|
362
|
+
rules: [{
|
363
|
+
id: 'color-contrast',
|
364
|
+
enabled: false
|
365
|
+
}]
|
366
|
+
}
|
367
|
+
}
|
368
|
+
};
|
369
|
+
var WithLink = function WithLink(args) {
|
370
|
+
return (0, _react2.jsx)(_index.Messages, args, (0, _react2.jsx)(_reactStately.Item, {
|
371
|
+
key: "message1"
|
372
|
+
}, loremText, ' ', (0, _react2.jsx)(_index.Link, {
|
373
|
+
href: "https://lorem.ipsum"
|
374
|
+
}, "Learn More")));
|
375
|
+
};
|
376
|
+
|
377
|
+
// Added to bypass color contrast in safari
|
378
|
+
exports.WithLink = WithLink;
|
379
|
+
WithLink.parameters = {
|
380
|
+
design: {
|
381
|
+
type: 'figma',
|
382
|
+
url: _figmaLinks.FIGMA_LINKS.messages.withLink
|
383
|
+
},
|
384
|
+
a11y: {
|
385
|
+
config: {
|
386
|
+
rules: [{
|
387
|
+
id: 'color-contrast',
|
388
|
+
enabled: false
|
389
|
+
}]
|
390
|
+
}
|
391
|
+
}
|
392
|
+
};
|
393
|
+
var Customization = function Customization(args) {
|
394
|
+
return (0, _react2.jsx)(_index.Messages, args, (0, _react2.jsx)(_reactStately.Item, {
|
395
|
+
bg: "accent.99",
|
396
|
+
color: "active",
|
397
|
+
icon: _AccountIcon["default"]
|
398
|
+
}, loremText));
|
399
|
+
};
|
400
|
+
|
401
|
+
// Added to bypass color contrast in safari
|
402
|
+
exports.Customization = Customization;
|
403
|
+
Customization.parameters = {
|
376
404
|
a11y: {
|
377
405
|
config: {
|
378
406
|
rules: [{
|
@@ -32,6 +32,14 @@ var _default = {
|
|
32
32
|
page: function page() {
|
33
33
|
return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_TimeField["default"], null), (0, _react2.jsx)(_storybookDocsLayout["default"], null));
|
34
34
|
}
|
35
|
+
},
|
36
|
+
a11y: {
|
37
|
+
config: {
|
38
|
+
rules: [{
|
39
|
+
id: 'color-contrast',
|
40
|
+
enabled: false
|
41
|
+
}]
|
42
|
+
}
|
35
43
|
}
|
36
44
|
},
|
37
45
|
argTypes: {}
|
@@ -121,7 +121,9 @@ var FIGMA_LINKS = {
|
|
121
121
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=12726-41720&t=8Wwd3tIBh3GEjCJB-0'
|
122
122
|
},
|
123
123
|
messages: {
|
124
|
-
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=
|
124
|
+
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=52857-6582&t=hqi8rId3S2ABv1E0-4',
|
125
|
+
withTextStyling: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=52857-9032&t=LVprZy9fVRpCA9Jd-4',
|
126
|
+
withLink: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=52857-9074&t=LVprZy9fVRpCA9Jd-4'
|
125
127
|
},
|
126
128
|
modal: {
|
127
129
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=7513-27244&t=8Wwd3tIBh3GEjCJB-0'
|
@@ -20,7 +20,7 @@ import { Item } from 'react-stately';
|
|
20
20
|
import AccountIcon from '@pingux/mdi-react/AccountIcon';
|
21
21
|
import { withDesign } from 'storybook-addon-designs';
|
22
22
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
23
|
-
import { Box, Button, Messages } from '../../index';
|
23
|
+
import { Box, Button, Link, Messages } from '../../index';
|
24
24
|
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
25
25
|
import statuses from '../../utils/devUtils/constants/statuses';
|
26
26
|
import { messagesReducerStory as messagesReducer, multiMessagesReducerStory as multiMessagesReducer } from './index';
|
@@ -53,7 +53,7 @@ export default {
|
|
53
53
|
}
|
54
54
|
}
|
55
55
|
};
|
56
|
-
var loremText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
56
|
+
var loremText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit';
|
57
57
|
var messages = [{
|
58
58
|
key: 'message1',
|
59
59
|
text: loremText
|
@@ -73,11 +73,19 @@ var messages = [{
|
|
73
73
|
export var Default = function Default(args) {
|
74
74
|
return ___EmotionJSX(Messages, args, ___EmotionJSX(Item, {
|
75
75
|
key: "message1",
|
76
|
-
"data-id": "message1"
|
76
|
+
"data-id": "message1",
|
77
|
+
status: statuses.SUCCESS
|
77
78
|
}, loremText), ___EmotionJSX(Item, {
|
78
79
|
key: "message2",
|
79
80
|
"data-id": "message2",
|
80
|
-
status: statuses.
|
81
|
+
status: statuses.WARNING
|
82
|
+
}, loremText), ___EmotionJSX(Item, {
|
83
|
+
key: "message2",
|
84
|
+
"data-id": "message3",
|
85
|
+
status: statuses.ERROR
|
86
|
+
}, loremText), ___EmotionJSX(Item, {
|
87
|
+
key: "message2",
|
88
|
+
"data-id": "message4"
|
81
89
|
}, loremText));
|
82
90
|
};
|
83
91
|
Default.parameters = {
|
@@ -190,25 +198,6 @@ ControlledWithButton.parameters = {
|
|
190
198
|
}
|
191
199
|
}
|
192
200
|
};
|
193
|
-
export var WithCustomColorsAndIcons = function WithCustomColorsAndIcons(args) {
|
194
|
-
return ___EmotionJSX(Messages, args, ___EmotionJSX(Item, {
|
195
|
-
bg: "accent.99",
|
196
|
-
color: "active",
|
197
|
-
icon: AccountIcon
|
198
|
-
}, loremText));
|
199
|
-
};
|
200
|
-
|
201
|
-
// Added to bypass color contrast in safari
|
202
|
-
WithCustomColorsAndIcons.parameters = {
|
203
|
-
a11y: {
|
204
|
-
config: {
|
205
|
-
rules: [{
|
206
|
-
id: 'color-contrast',
|
207
|
-
enabled: false
|
208
|
-
}]
|
209
|
-
}
|
210
|
-
}
|
211
|
-
};
|
212
201
|
export var UseReducer = function UseReducer() {
|
213
202
|
// import { messagesReducer as messagesReducerCore } from '@pingux/astro';
|
214
203
|
// const messagesReducer = messagesReducerCore;
|
@@ -332,15 +321,7 @@ export var WithTextStyling = function WithTextStyling(args) {
|
|
332
321
|
node: ___EmotionJSX("strong", null, loremText)
|
333
322
|
}, {
|
334
323
|
key: 'message2',
|
335
|
-
|
336
|
-
status: 'success'
|
337
|
-
}, {
|
338
|
-
key: 'message3',
|
339
|
-
text: loremText,
|
340
|
-
status: 'warning'
|
341
|
-
}, {
|
342
|
-
key: 'message4',
|
343
|
-
node: ___EmotionJSX(React.Fragment, null, ___EmotionJSX("b", null, "Lorem Ipsum! "), loremText),
|
324
|
+
node: ___EmotionJSX(React.Fragment, null, ___EmotionJSX("b", null, "Lorem Ipsum! "), "dolor sit amet, consectetur adipiscing elit"),
|
344
325
|
status: 'error'
|
345
326
|
}];
|
346
327
|
return ___EmotionJSX(Messages, _extends({}, args, {
|
@@ -352,6 +333,52 @@ export var WithTextStyling = function WithTextStyling(args) {
|
|
352
333
|
|
353
334
|
// Added to bypass color contrast in safari
|
354
335
|
WithTextStyling.parameters = {
|
336
|
+
design: {
|
337
|
+
type: 'figma',
|
338
|
+
url: FIGMA_LINKS.messages.withTextStyling
|
339
|
+
},
|
340
|
+
a11y: {
|
341
|
+
config: {
|
342
|
+
rules: [{
|
343
|
+
id: 'color-contrast',
|
344
|
+
enabled: false
|
345
|
+
}]
|
346
|
+
}
|
347
|
+
}
|
348
|
+
};
|
349
|
+
export var WithLink = function WithLink(args) {
|
350
|
+
return ___EmotionJSX(Messages, args, ___EmotionJSX(Item, {
|
351
|
+
key: "message1"
|
352
|
+
}, loremText, ' ', ___EmotionJSX(Link, {
|
353
|
+
href: "https://lorem.ipsum"
|
354
|
+
}, "Learn More")));
|
355
|
+
};
|
356
|
+
|
357
|
+
// Added to bypass color contrast in safari
|
358
|
+
WithLink.parameters = {
|
359
|
+
design: {
|
360
|
+
type: 'figma',
|
361
|
+
url: FIGMA_LINKS.messages.withLink
|
362
|
+
},
|
363
|
+
a11y: {
|
364
|
+
config: {
|
365
|
+
rules: [{
|
366
|
+
id: 'color-contrast',
|
367
|
+
enabled: false
|
368
|
+
}]
|
369
|
+
}
|
370
|
+
}
|
371
|
+
};
|
372
|
+
export var Customization = function Customization(args) {
|
373
|
+
return ___EmotionJSX(Messages, args, ___EmotionJSX(Item, {
|
374
|
+
bg: "accent.99",
|
375
|
+
color: "active",
|
376
|
+
icon: AccountIcon
|
377
|
+
}, loremText));
|
378
|
+
};
|
379
|
+
|
380
|
+
// Added to bypass color contrast in safari
|
381
|
+
Customization.parameters = {
|
355
382
|
a11y: {
|
356
383
|
config: {
|
357
384
|
rules: [{
|
@@ -19,6 +19,14 @@ export default {
|
|
19
19
|
page: function page() {
|
20
20
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(TimeFieldReadme, null), ___EmotionJSX(DocsLayout, null));
|
21
21
|
}
|
22
|
+
},
|
23
|
+
a11y: {
|
24
|
+
config: {
|
25
|
+
rules: [{
|
26
|
+
id: 'color-contrast',
|
27
|
+
enabled: false
|
28
|
+
}]
|
29
|
+
}
|
22
30
|
}
|
23
31
|
},
|
24
32
|
argTypes: {}
|
@@ -114,7 +114,9 @@ export var FIGMA_LINKS = {
|
|
114
114
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=12726-41720&t=8Wwd3tIBh3GEjCJB-0'
|
115
115
|
},
|
116
116
|
messages: {
|
117
|
-
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=
|
117
|
+
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=52857-6582&t=hqi8rId3S2ABv1E0-4',
|
118
|
+
withTextStyling: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=52857-9032&t=LVprZy9fVRpCA9Jd-4',
|
119
|
+
withLink: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=52857-9074&t=LVprZy9fVRpCA9Jd-4'
|
118
120
|
},
|
119
121
|
modal: {
|
120
122
|
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=7513-27244&t=8Wwd3tIBh3GEjCJB-0'
|