@pingux/astro 2.103.0 → 2.104.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/Calendar/Calendar.js +11 -6
- package/lib/cjs/components/Calendar/Calendar.styles.d.ts +3 -1
- package/lib/cjs/components/Calendar/Calendar.styles.js +5 -1
- package/lib/cjs/components/DatePicker/DatePicker.stories.js +77 -9
- package/lib/cjs/components/Image/Image.stories.js +1 -1
- package/lib/cjs/utils/designUtils/figmaLinks.d.ts +13 -0
- package/lib/cjs/utils/designUtils/figmaLinks.js +13 -0
- package/lib/cjs/utils/devUtils/constants/images.d.ts +1 -0
- package/lib/cjs/utils/devUtils/constants/images.js +4 -2
- package/lib/components/Calendar/Calendar.js +11 -6
- package/lib/components/Calendar/Calendar.styles.js +5 -1
- package/lib/components/DatePicker/DatePicker.stories.js +75 -6
- package/lib/components/Image/Image.stories.js +2 -2
- package/lib/utils/designUtils/figmaLinks.js +13 -0
- package/lib/utils/devUtils/constants/images.js +2 -1
- package/package.json +1 -1
- package/lib/cjs/components/Calendar/Calendar.stories.d.ts +0 -212
- package/lib/cjs/components/Calendar/Calendar.stories.js +0 -225
- package/lib/components/Calendar/Calendar.stories.js +0 -206
@@ -17,6 +17,7 @@ import { chain } from '@react-aria/utils';
|
|
17
17
|
import { actions } from '@storybook/addon-actions';
|
18
18
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
19
19
|
import { Box, Button } from '../../index';
|
20
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
20
21
|
import { ariaAttributeBaseArgTypes } from '../../utils/docUtils/ariaAttributes';
|
21
22
|
import DatePicker from './DatePicker';
|
22
23
|
import DatePickerReadme from './DatePicker.mdx';
|
@@ -32,6 +33,14 @@ export default {
|
|
32
33
|
page: function page() {
|
33
34
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(DatePickerReadme, null), ___EmotionJSX(DocsLayout, null));
|
34
35
|
}
|
36
|
+
},
|
37
|
+
a11y: {
|
38
|
+
config: {
|
39
|
+
rules: [{
|
40
|
+
id: 'color-contrast',
|
41
|
+
enabled: false
|
42
|
+
}]
|
43
|
+
}
|
35
44
|
}
|
36
45
|
},
|
37
46
|
argTypes: _objectSpread({
|
@@ -95,18 +104,30 @@ export default {
|
|
95
104
|
isDisabled: false,
|
96
105
|
isReadOnly: false,
|
97
106
|
isRequired: false,
|
98
|
-
label: 'Example
|
107
|
+
label: 'Example Label',
|
99
108
|
onChange: null
|
100
109
|
}
|
101
110
|
};
|
102
111
|
export var Default = function Default(args) {
|
103
112
|
return ___EmotionJSX(DatePicker, args);
|
104
113
|
};
|
114
|
+
Default.parameters = {
|
115
|
+
design: {
|
116
|
+
type: 'figma',
|
117
|
+
url: FIGMA_LINKS.datePicker["default"]
|
118
|
+
}
|
119
|
+
};
|
105
120
|
export var DefaultValue = function DefaultValue(args) {
|
106
121
|
return ___EmotionJSX(DatePicker, _extends({}, args, {
|
107
122
|
defaultValue: "2030-01-15"
|
108
123
|
}));
|
109
124
|
};
|
125
|
+
DefaultValue.parameters = {
|
126
|
+
design: {
|
127
|
+
type: 'figma',
|
128
|
+
url: FIGMA_LINKS.datePicker.defaultValue
|
129
|
+
}
|
130
|
+
};
|
110
131
|
export var Controlled = function Controlled(args) {
|
111
132
|
var _useState = useState(null),
|
112
133
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -134,11 +155,23 @@ export var Disabled = function Disabled(args) {
|
|
134
155
|
isDisabled: true
|
135
156
|
}));
|
136
157
|
};
|
158
|
+
Disabled.parameters = {
|
159
|
+
design: {
|
160
|
+
type: 'figma',
|
161
|
+
url: FIGMA_LINKS.datePicker.disabled
|
162
|
+
}
|
163
|
+
};
|
137
164
|
export var ReadOnly = function ReadOnly(args) {
|
138
165
|
return ___EmotionJSX(DatePicker, _extends({}, args, {
|
139
166
|
isReadOnly: true
|
140
167
|
}));
|
141
168
|
};
|
169
|
+
ReadOnly.parameters = {
|
170
|
+
design: {
|
171
|
+
type: 'figma',
|
172
|
+
url: FIGMA_LINKS.datePicker.readOnly
|
173
|
+
}
|
174
|
+
};
|
142
175
|
export var UnavailableDates = function UnavailableDates(args) {
|
143
176
|
var unavailableRanges = [['2030-07-28', '2030-08-03'], ['2030-08-11', '2030-08-17'], ['2030-08-25', '2030-08-31']];
|
144
177
|
return ___EmotionJSX(DatePicker, _extends({}, args, {
|
@@ -146,43 +179,79 @@ export var UnavailableDates = function UnavailableDates(args) {
|
|
146
179
|
defaultValue: "2030-08-07"
|
147
180
|
}));
|
148
181
|
};
|
182
|
+
UnavailableDates.parameters = {
|
183
|
+
design: {
|
184
|
+
type: 'figma',
|
185
|
+
url: FIGMA_LINKS.datePicker.unavailableDates
|
186
|
+
}
|
187
|
+
};
|
149
188
|
export var MinimumDate = function MinimumDate(args) {
|
150
189
|
return ___EmotionJSX(DatePicker, _extends({}, args, {
|
151
190
|
defaultValue: "2030-01-15",
|
152
191
|
minValue: "2030-01-15"
|
153
192
|
}));
|
154
193
|
};
|
194
|
+
MinimumDate.parameters = {
|
195
|
+
design: {
|
196
|
+
type: 'figma',
|
197
|
+
url: FIGMA_LINKS.datePicker.minimumDate
|
198
|
+
}
|
199
|
+
};
|
155
200
|
export var MaximumDate = function MaximumDate(args) {
|
156
201
|
return ___EmotionJSX(DatePicker, _extends({}, args, {
|
157
202
|
defaultValue: "2030-01-15",
|
158
203
|
maxValue: "2030-01-15"
|
159
204
|
}));
|
160
205
|
};
|
206
|
+
MaximumDate.parameters = {
|
207
|
+
design: {
|
208
|
+
type: 'figma',
|
209
|
+
url: FIGMA_LINKS.datePicker.maximumDate
|
210
|
+
}
|
211
|
+
};
|
161
212
|
export var Required = function Required(args) {
|
162
213
|
return ___EmotionJSX(DatePicker, _extends({}, args, {
|
163
214
|
isRequired: true
|
164
215
|
}));
|
165
216
|
};
|
217
|
+
Required.parameters = {
|
218
|
+
design: {
|
219
|
+
type: 'figma',
|
220
|
+
url: FIGMA_LINKS.datePicker.required
|
221
|
+
}
|
222
|
+
};
|
166
223
|
export var FormatHelperText = function FormatHelperText(args) {
|
167
224
|
return ___EmotionJSX(DatePicker, _extends({}, args, {
|
168
225
|
hasFormatHelpText: true
|
169
226
|
}));
|
170
227
|
};
|
228
|
+
FormatHelperText.parameters = {
|
229
|
+
design: {
|
230
|
+
type: 'figma',
|
231
|
+
url: FIGMA_LINKS.datePicker.formatHelperText
|
232
|
+
}
|
233
|
+
};
|
171
234
|
export var DefaultOpen = function DefaultOpen(args) {
|
172
235
|
return ___EmotionJSX(DatePicker, _extends({}, args, {
|
173
236
|
isDefaultOpen: true,
|
174
237
|
defaultValue: "2030-01-15"
|
175
238
|
}));
|
176
239
|
};
|
240
|
+
DefaultOpen.parameters = {
|
241
|
+
design: {
|
242
|
+
type: 'figma',
|
243
|
+
url: FIGMA_LINKS.datePicker.defaultOpen
|
244
|
+
}
|
245
|
+
};
|
177
246
|
export var Error = function Error(args) {
|
178
247
|
return ___EmotionJSX(DatePicker, _extends({}, args, {
|
179
248
|
status: "error",
|
180
249
|
helperText: "Here is some helpful text..."
|
181
250
|
}));
|
182
251
|
};
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
}
|
252
|
+
Error.parameters = {
|
253
|
+
design: {
|
254
|
+
type: 'figma',
|
255
|
+
url: FIGMA_LINKS.datePicker.error
|
256
|
+
}
|
188
257
|
};
|
@@ -6,7 +6,7 @@ import isChromatic from 'chromatic/isChromatic';
|
|
6
6
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
7
7
|
import { Box, Button, Image } from '../../index';
|
8
8
|
import { htmlElements } from '../../utils/devUtils/constants/htmlElements';
|
9
|
-
import { chiefIdentityChampions, pingImg } from '../../utils/devUtils/constants/images';
|
9
|
+
import { chiefIdentityChampions, fallbackImg, pingImg } from '../../utils/devUtils/constants/images';
|
10
10
|
import ImageReadme from './Image.mdx';
|
11
11
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
12
12
|
export default {
|
@@ -77,7 +77,7 @@ export var Disabled = function Disabled() {
|
|
77
77
|
};
|
78
78
|
export var FallbackImage = function FallbackImage() {
|
79
79
|
return ___EmotionJSX(Image, {
|
80
|
-
fallbackImage:
|
80
|
+
fallbackImage: fallbackImg,
|
81
81
|
fallbackAlt: "Ping Identity",
|
82
82
|
src: "https://deelay.me/7000/https://picsum.photos/150/150",
|
83
83
|
sx: {
|
@@ -79,6 +79,19 @@ export var FIGMA_LINKS = {
|
|
79
79
|
countryPicker: {
|
80
80
|
"default": 'https://www.figma.com/file/Oa6VYtJcUJzEJuuRp0p4ls/Astro?type=design&node-id=4568-7532&mode=design&t=eSfQYHRFNPf37J4C-0'
|
81
81
|
},
|
82
|
+
datePicker: {
|
83
|
+
"default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=54750-58556&mode=design&t=xKC70FhpRo7cbuqQ-4',
|
84
|
+
defaultValue: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&mode=design&node-id=53997-4894&t=xKC70FhpRo7cbuqQ-4',
|
85
|
+
disabled: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&mode=design&node-id=54750-58557&t=xKC70FhpRo7cbuqQ-4',
|
86
|
+
readOnly: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&mode=design&node-id=54750-58568&t=xKC70FhpRo7cbuqQ-4',
|
87
|
+
required: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&mode=design&node-id=54750-58706&t=xKC70FhpRo7cbuqQ-4',
|
88
|
+
formatHelperText: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&mode=design&node-id=54750-58722&t=xKC70FhpRo7cbuqQ-4',
|
89
|
+
error: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&mode=design&node-id=54752-58829&t=xKC70FhpRo7cbuqQ-4',
|
90
|
+
defaultOpen: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&mode=design&node-id=54752-58855&t=xKC70FhpRo7cbuqQ-4',
|
91
|
+
unavailableDates: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&mode=design&node-id=57486-7296&t=xKC70FhpRo7cbuqQ-4',
|
92
|
+
minimumDate: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&mode=design&node-id=57486-7812&t=xKC70FhpRo7cbuqQ-4',
|
93
|
+
maximumDate: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&mode=design&node-id=57486-7297&t=xKC70FhpRo7cbuqQ-4'
|
94
|
+
},
|
82
95
|
dateTimeRangePicker: {
|
83
96
|
"default": 'https://www.figma.com/design/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=49152-4497&t=n7OkhpTOBBWW4rme-0'
|
84
97
|
},
|