@pingux/astro 2.53.1 → 2.54.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/ArrayField/ArrayField.js +2 -1
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.test.js +2 -3
- package/lib/cjs/components/Button/Button.js +4 -2
- package/lib/cjs/components/Calendar/Calendar.d.ts +4 -0
- package/lib/cjs/components/Calendar/Calendar.js +14 -59
- package/lib/cjs/components/Calendar/Calendar.stories.d.ts +212 -0
- package/lib/cjs/components/Calendar/Calendar.stories.js +12 -12
- package/lib/cjs/components/Calendar/Calendar.styles.d.ts +73 -0
- package/lib/cjs/components/Calendar/Calendar.test.d.ts +1 -0
- package/lib/cjs/components/Calendar/Calendar.test.js +2 -2
- package/lib/cjs/components/Calendar/CalendarCell.d.ts +9 -0
- package/lib/cjs/components/Calendar/CalendarCell.js +11 -30
- package/lib/cjs/components/Calendar/CalendarGrid.d.ts +9 -0
- package/lib/cjs/components/Calendar/CalendarGrid.js +6 -15
- package/lib/cjs/components/Calendar/index.d.ts +1 -0
- package/lib/cjs/components/CheckboxField/CheckboxField.js +4 -2
- package/lib/cjs/components/ColorField/ColorField.js +4 -2
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +4 -2
- package/lib/cjs/components/DatePicker/DatePicker.js +4 -2
- package/lib/cjs/components/FileInputField/FileInputField.js +4 -2
- package/lib/cjs/components/IconButton/IconButton.js +4 -2
- package/lib/cjs/components/ImageUploadField/ImageUploadField.js +4 -2
- package/lib/cjs/components/Input/Input.js +7 -6
- package/lib/cjs/components/LinkSelectField/LinkSelectField.js +4 -2
- package/lib/cjs/components/ListViewItem/ListViewItem.js +4 -2
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +2 -3
- package/lib/cjs/components/NumberField/NumberField.js +2 -1
- package/lib/cjs/components/PasswordField/PasswordField.js +4 -2
- package/lib/cjs/components/RadioGroupField/RadioGroupField.js +4 -2
- package/lib/cjs/components/SearchField/SearchField.js +4 -2
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +2 -1
- package/lib/cjs/components/SwitchField/SwitchField.js +5 -3
- package/lib/cjs/components/Tab/Tab.js +2 -1
- package/lib/cjs/components/TextAreaField/TextAreaField.js +4 -2
- package/lib/cjs/components/TextField/TextField.js +4 -2
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.js +2 -1
- package/lib/cjs/hooks/useField/useField.d.ts +8 -5
- package/lib/cjs/hooks/useRockerButton/useRockerButton.d.ts +1 -1
- package/lib/cjs/types/box.d.ts +3 -0
- package/lib/cjs/types/calendar.d.ts +69 -0
- package/lib/cjs/types/calendar.js +6 -0
- package/lib/cjs/types/index.d.ts +1 -0
- package/lib/cjs/types/index.js +42 -31
- package/lib/cjs/types/table.d.ts +1 -1
- package/lib/cjs/utils/devUtils/constants/pendoID.d.ts +3 -0
- package/lib/cjs/utils/devUtils/constants/pendoID.js +13 -0
- package/lib/components/ArrayField/ArrayField.js +2 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.test.js +2 -3
- package/lib/components/Button/Button.js +4 -2
- package/lib/components/Calendar/Calendar.js +15 -60
- package/lib/components/Calendar/Calendar.stories.js +2 -2
- package/lib/components/Calendar/Calendar.test.js +2 -2
- package/lib/components/Calendar/CalendarCell.js +12 -32
- package/lib/components/Calendar/CalendarGrid.js +6 -15
- package/lib/components/CheckboxField/CheckboxField.js +4 -2
- package/lib/components/ColorField/ColorField.js +4 -2
- package/lib/components/ComboBoxField/ComboBoxField.js +4 -2
- package/lib/components/DatePicker/DatePicker.js +4 -2
- package/lib/components/FileInputField/FileInputField.js +4 -2
- package/lib/components/IconButton/IconButton.js +4 -2
- package/lib/components/ImageUploadField/ImageUploadField.js +4 -2
- package/lib/components/Input/Input.js +6 -5
- package/lib/components/LinkSelectField/LinkSelectField.js +4 -2
- package/lib/components/ListViewItem/ListViewItem.js +4 -2
- package/lib/components/MultivaluesField/MultivaluesField.js +3 -4
- package/lib/components/NumberField/NumberField.js +2 -1
- package/lib/components/PasswordField/PasswordField.js +4 -2
- package/lib/components/RadioGroupField/RadioGroupField.js +4 -2
- package/lib/components/SearchField/SearchField.js +4 -2
- package/lib/components/SelectFieldBase/SelectFieldBase.js +2 -1
- package/lib/components/SwitchField/SwitchField.js +5 -3
- package/lib/components/Tab/Tab.js +2 -1
- package/lib/components/TextAreaField/TextAreaField.js +4 -2
- package/lib/components/TextField/TextField.js +4 -2
- package/lib/components/TimeZonePicker/TimeZonePicker.js +2 -1
- package/lib/types/calendar.js +1 -0
- package/lib/types/index.js +1 -0
- package/lib/utils/devUtils/constants/pendoID.js +5 -0
- package/package.json +2 -2
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, _context20, _context21, _context22, _context23, _context24, _context25, _context26, _context27, _context28, _context29, _context30, _context31, _context32, _context33, _context34, _context35, _context36;
|
3
|
+
var _context, _context2, _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10, _context11, _context12, _context13, _context14, _context15, _context16, _context17, _context18, _context19, _context20, _context21, _context22, _context23, _context24, _context25, _context26, _context27, _context28, _context29, _context30, _context31, _context32, _context33, _context34, _context35, _context36, _context37;
|
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");
|
@@ -73,8 +73,19 @@ _forEachInstanceProperty(_context6 = _Object$keys(_buttonBar)).call(_context6, f
|
|
73
73
|
}
|
74
74
|
});
|
75
75
|
});
|
76
|
+
var _calendar = require("./calendar");
|
77
|
+
_forEachInstanceProperty(_context7 = _Object$keys(_calendar)).call(_context7, function (key) {
|
78
|
+
if (key === "default" || key === "__esModule") return;
|
79
|
+
if (key in exports && exports[key] === _calendar[key]) return;
|
80
|
+
_Object$defineProperty(exports, key, {
|
81
|
+
enumerable: true,
|
82
|
+
get: function get() {
|
83
|
+
return _calendar[key];
|
84
|
+
}
|
85
|
+
});
|
86
|
+
});
|
76
87
|
var _card = require("./card");
|
77
|
-
_forEachInstanceProperty(
|
88
|
+
_forEachInstanceProperty(_context8 = _Object$keys(_card)).call(_context8, function (key) {
|
78
89
|
if (key === "default" || key === "__esModule") return;
|
79
90
|
if (key in exports && exports[key] === _card[key]) return;
|
80
91
|
_Object$defineProperty(exports, key, {
|
@@ -85,7 +96,7 @@ _forEachInstanceProperty(_context7 = _Object$keys(_card)).call(_context7, functi
|
|
85
96
|
});
|
86
97
|
});
|
87
98
|
var _copyText = require("./copyText");
|
88
|
-
_forEachInstanceProperty(
|
99
|
+
_forEachInstanceProperty(_context9 = _Object$keys(_copyText)).call(_context9, function (key) {
|
89
100
|
if (key === "default" || key === "__esModule") return;
|
90
101
|
if (key in exports && exports[key] === _copyText[key]) return;
|
91
102
|
_Object$defineProperty(exports, key, {
|
@@ -96,7 +107,7 @@ _forEachInstanceProperty(_context8 = _Object$keys(_copyText)).call(_context8, fu
|
|
96
107
|
});
|
97
108
|
});
|
98
109
|
var _fieldHelperText = require("./fieldHelperText");
|
99
|
-
_forEachInstanceProperty(
|
110
|
+
_forEachInstanceProperty(_context10 = _Object$keys(_fieldHelperText)).call(_context10, function (key) {
|
100
111
|
if (key === "default" || key === "__esModule") return;
|
101
112
|
if (key in exports && exports[key] === _fieldHelperText[key]) return;
|
102
113
|
_Object$defineProperty(exports, key, {
|
@@ -107,7 +118,7 @@ _forEachInstanceProperty(_context9 = _Object$keys(_fieldHelperText)).call(_conte
|
|
107
118
|
});
|
108
119
|
});
|
109
120
|
var _helpHint = require("./helpHint");
|
110
|
-
_forEachInstanceProperty(
|
121
|
+
_forEachInstanceProperty(_context11 = _Object$keys(_helpHint)).call(_context11, function (key) {
|
111
122
|
if (key === "default" || key === "__esModule") return;
|
112
123
|
if (key in exports && exports[key] === _helpHint[key]) return;
|
113
124
|
_Object$defineProperty(exports, key, {
|
@@ -118,7 +129,7 @@ _forEachInstanceProperty(_context10 = _Object$keys(_helpHint)).call(_context10,
|
|
118
129
|
});
|
119
130
|
});
|
120
131
|
var _icon = require("./icon");
|
121
|
-
_forEachInstanceProperty(
|
132
|
+
_forEachInstanceProperty(_context12 = _Object$keys(_icon)).call(_context12, function (key) {
|
122
133
|
if (key === "default" || key === "__esModule") return;
|
123
134
|
if (key in exports && exports[key] === _icon[key]) return;
|
124
135
|
_Object$defineProperty(exports, key, {
|
@@ -129,7 +140,7 @@ _forEachInstanceProperty(_context11 = _Object$keys(_icon)).call(_context11, func
|
|
129
140
|
});
|
130
141
|
});
|
131
142
|
var _iconBadge = require("./iconBadge");
|
132
|
-
_forEachInstanceProperty(
|
143
|
+
_forEachInstanceProperty(_context13 = _Object$keys(_iconBadge)).call(_context13, function (key) {
|
133
144
|
if (key === "default" || key === "__esModule") return;
|
134
145
|
if (key in exports && exports[key] === _iconBadge[key]) return;
|
135
146
|
_Object$defineProperty(exports, key, {
|
@@ -140,7 +151,7 @@ _forEachInstanceProperty(_context12 = _Object$keys(_iconBadge)).call(_context12,
|
|
140
151
|
});
|
141
152
|
});
|
142
153
|
var _iconButton = require("./iconButton");
|
143
|
-
_forEachInstanceProperty(
|
154
|
+
_forEachInstanceProperty(_context14 = _Object$keys(_iconButton)).call(_context14, function (key) {
|
144
155
|
if (key === "default" || key === "__esModule") return;
|
145
156
|
if (key in exports && exports[key] === _iconButton[key]) return;
|
146
157
|
_Object$defineProperty(exports, key, {
|
@@ -151,7 +162,7 @@ _forEachInstanceProperty(_context13 = _Object$keys(_iconButton)).call(_context13
|
|
151
162
|
});
|
152
163
|
});
|
153
164
|
var _iconButtonToggle = require("./iconButtonToggle");
|
154
|
-
_forEachInstanceProperty(
|
165
|
+
_forEachInstanceProperty(_context15 = _Object$keys(_iconButtonToggle)).call(_context15, function (key) {
|
155
166
|
if (key === "default" || key === "__esModule") return;
|
156
167
|
if (key in exports && exports[key] === _iconButtonToggle[key]) return;
|
157
168
|
_Object$defineProperty(exports, key, {
|
@@ -162,7 +173,7 @@ _forEachInstanceProperty(_context14 = _Object$keys(_iconButtonToggle)).call(_con
|
|
162
173
|
});
|
163
174
|
});
|
164
175
|
var _input = require("./input");
|
165
|
-
_forEachInstanceProperty(
|
176
|
+
_forEachInstanceProperty(_context16 = _Object$keys(_input)).call(_context16, function (key) {
|
166
177
|
if (key === "default" || key === "__esModule") return;
|
167
178
|
if (key in exports && exports[key] === _input[key]) return;
|
168
179
|
_Object$defineProperty(exports, key, {
|
@@ -173,7 +184,7 @@ _forEachInstanceProperty(_context15 = _Object$keys(_input)).call(_context15, fun
|
|
173
184
|
});
|
174
185
|
});
|
175
186
|
var _item = require("./item");
|
176
|
-
_forEachInstanceProperty(
|
187
|
+
_forEachInstanceProperty(_context17 = _Object$keys(_item)).call(_context17, function (key) {
|
177
188
|
if (key === "default" || key === "__esModule") return;
|
178
189
|
if (key in exports && exports[key] === _item[key]) return;
|
179
190
|
_Object$defineProperty(exports, key, {
|
@@ -184,7 +195,7 @@ _forEachInstanceProperty(_context16 = _Object$keys(_item)).call(_context16, func
|
|
184
195
|
});
|
185
196
|
});
|
186
197
|
var _label = require("./label");
|
187
|
-
_forEachInstanceProperty(
|
198
|
+
_forEachInstanceProperty(_context18 = _Object$keys(_label)).call(_context18, function (key) {
|
188
199
|
if (key === "default" || key === "__esModule") return;
|
189
200
|
if (key in exports && exports[key] === _label[key]) return;
|
190
201
|
_Object$defineProperty(exports, key, {
|
@@ -195,7 +206,7 @@ _forEachInstanceProperty(_context17 = _Object$keys(_label)).call(_context17, fun
|
|
195
206
|
});
|
196
207
|
});
|
197
208
|
var _link = require("./link");
|
198
|
-
_forEachInstanceProperty(
|
209
|
+
_forEachInstanceProperty(_context19 = _Object$keys(_link)).call(_context19, function (key) {
|
199
210
|
if (key === "default" || key === "__esModule") return;
|
200
211
|
if (key in exports && exports[key] === _link[key]) return;
|
201
212
|
_Object$defineProperty(exports, key, {
|
@@ -206,7 +217,7 @@ _forEachInstanceProperty(_context18 = _Object$keys(_link)).call(_context18, func
|
|
206
217
|
});
|
207
218
|
});
|
208
219
|
var _listBox = require("./listBox");
|
209
|
-
_forEachInstanceProperty(
|
220
|
+
_forEachInstanceProperty(_context20 = _Object$keys(_listBox)).call(_context20, function (key) {
|
210
221
|
if (key === "default" || key === "__esModule") return;
|
211
222
|
if (key in exports && exports[key] === _listBox[key]) return;
|
212
223
|
_Object$defineProperty(exports, key, {
|
@@ -217,7 +228,7 @@ _forEachInstanceProperty(_context19 = _Object$keys(_listBox)).call(_context19, f
|
|
217
228
|
});
|
218
229
|
});
|
219
230
|
var _listItem = require("./listItem");
|
220
|
-
_forEachInstanceProperty(
|
231
|
+
_forEachInstanceProperty(_context21 = _Object$keys(_listItem)).call(_context21, function (key) {
|
221
232
|
if (key === "default" || key === "__esModule") return;
|
222
233
|
if (key in exports && exports[key] === _listItem[key]) return;
|
223
234
|
_Object$defineProperty(exports, key, {
|
@@ -228,7 +239,7 @@ _forEachInstanceProperty(_context20 = _Object$keys(_listItem)).call(_context20,
|
|
228
239
|
});
|
229
240
|
});
|
230
241
|
var _loader = require("./loader");
|
231
|
-
_forEachInstanceProperty(
|
242
|
+
_forEachInstanceProperty(_context22 = _Object$keys(_loader)).call(_context22, function (key) {
|
232
243
|
if (key === "default" || key === "__esModule") return;
|
233
244
|
if (key in exports && exports[key] === _loader[key]) return;
|
234
245
|
_Object$defineProperty(exports, key, {
|
@@ -239,7 +250,7 @@ _forEachInstanceProperty(_context21 = _Object$keys(_loader)).call(_context21, fu
|
|
239
250
|
});
|
240
251
|
});
|
241
252
|
var _menu = require("./menu");
|
242
|
-
_forEachInstanceProperty(
|
253
|
+
_forEachInstanceProperty(_context23 = _Object$keys(_menu)).call(_context23, function (key) {
|
243
254
|
if (key === "default" || key === "__esModule") return;
|
244
255
|
if (key in exports && exports[key] === _menu[key]) return;
|
245
256
|
_Object$defineProperty(exports, key, {
|
@@ -250,7 +261,7 @@ _forEachInstanceProperty(_context22 = _Object$keys(_menu)).call(_context22, func
|
|
250
261
|
});
|
251
262
|
});
|
252
263
|
var _menuItem = require("./menuItem");
|
253
|
-
_forEachInstanceProperty(
|
264
|
+
_forEachInstanceProperty(_context24 = _Object$keys(_menuItem)).call(_context24, function (key) {
|
254
265
|
if (key === "default" || key === "__esModule") return;
|
255
266
|
if (key in exports && exports[key] === _menuItem[key]) return;
|
256
267
|
_Object$defineProperty(exports, key, {
|
@@ -261,7 +272,7 @@ _forEachInstanceProperty(_context23 = _Object$keys(_menuItem)).call(_context23,
|
|
261
272
|
});
|
262
273
|
});
|
263
274
|
var _Modal = require("./Modal");
|
264
|
-
_forEachInstanceProperty(
|
275
|
+
_forEachInstanceProperty(_context25 = _Object$keys(_Modal)).call(_context25, function (key) {
|
265
276
|
if (key === "default" || key === "__esModule") return;
|
266
277
|
if (key in exports && exports[key] === _Modal[key]) return;
|
267
278
|
_Object$defineProperty(exports, key, {
|
@@ -272,7 +283,7 @@ _forEachInstanceProperty(_context24 = _Object$keys(_Modal)).call(_context24, fun
|
|
272
283
|
});
|
273
284
|
});
|
274
285
|
var _navBar = require("./navBar");
|
275
|
-
_forEachInstanceProperty(
|
286
|
+
_forEachInstanceProperty(_context26 = _Object$keys(_navBar)).call(_context26, function (key) {
|
276
287
|
if (key === "default" || key === "__esModule") return;
|
277
288
|
if (key in exports && exports[key] === _navBar[key]) return;
|
278
289
|
_Object$defineProperty(exports, key, {
|
@@ -283,7 +294,7 @@ _forEachInstanceProperty(_context25 = _Object$keys(_navBar)).call(_context25, fu
|
|
283
294
|
});
|
284
295
|
});
|
285
296
|
var _overlayPanel = require("./overlayPanel");
|
286
|
-
_forEachInstanceProperty(
|
297
|
+
_forEachInstanceProperty(_context27 = _Object$keys(_overlayPanel)).call(_context27, function (key) {
|
287
298
|
if (key === "default" || key === "__esModule") return;
|
288
299
|
if (key in exports && exports[key] === _overlayPanel[key]) return;
|
289
300
|
_Object$defineProperty(exports, key, {
|
@@ -294,7 +305,7 @@ _forEachInstanceProperty(_context26 = _Object$keys(_overlayPanel)).call(_context
|
|
294
305
|
});
|
295
306
|
});
|
296
307
|
var _popoverContainer = require("./popoverContainer");
|
297
|
-
_forEachInstanceProperty(
|
308
|
+
_forEachInstanceProperty(_context28 = _Object$keys(_popoverContainer)).call(_context28, function (key) {
|
298
309
|
if (key === "default" || key === "__esModule") return;
|
299
310
|
if (key in exports && exports[key] === _popoverContainer[key]) return;
|
300
311
|
_Object$defineProperty(exports, key, {
|
@@ -305,7 +316,7 @@ _forEachInstanceProperty(_context27 = _Object$keys(_popoverContainer)).call(_con
|
|
305
316
|
});
|
306
317
|
});
|
307
318
|
var _popoverMenu = require("./popoverMenu");
|
308
|
-
_forEachInstanceProperty(
|
319
|
+
_forEachInstanceProperty(_context29 = _Object$keys(_popoverMenu)).call(_context29, function (key) {
|
309
320
|
if (key === "default" || key === "__esModule") return;
|
310
321
|
if (key in exports && exports[key] === _popoverMenu[key]) return;
|
311
322
|
_Object$defineProperty(exports, key, {
|
@@ -316,7 +327,7 @@ _forEachInstanceProperty(_context28 = _Object$keys(_popoverMenu)).call(_context2
|
|
316
327
|
});
|
317
328
|
});
|
318
329
|
var _requirementsList = require("./requirementsList");
|
319
|
-
_forEachInstanceProperty(
|
330
|
+
_forEachInstanceProperty(_context30 = _Object$keys(_requirementsList)).call(_context30, function (key) {
|
320
331
|
if (key === "default" || key === "__esModule") return;
|
321
332
|
if (key in exports && exports[key] === _requirementsList[key]) return;
|
322
333
|
_Object$defineProperty(exports, key, {
|
@@ -327,7 +338,7 @@ _forEachInstanceProperty(_context29 = _Object$keys(_requirementsList)).call(_con
|
|
327
338
|
});
|
328
339
|
});
|
329
340
|
var _rockerButtonGroup = require("./rockerButtonGroup");
|
330
|
-
_forEachInstanceProperty(
|
341
|
+
_forEachInstanceProperty(_context31 = _Object$keys(_rockerButtonGroup)).call(_context31, function (key) {
|
331
342
|
if (key === "default" || key === "__esModule") return;
|
332
343
|
if (key in exports && exports[key] === _rockerButtonGroup[key]) return;
|
333
344
|
_Object$defineProperty(exports, key, {
|
@@ -338,7 +349,7 @@ _forEachInstanceProperty(_context30 = _Object$keys(_rockerButtonGroup)).call(_co
|
|
338
349
|
});
|
339
350
|
});
|
340
351
|
var _scrollBox = require("./scrollBox");
|
341
|
-
_forEachInstanceProperty(
|
352
|
+
_forEachInstanceProperty(_context32 = _Object$keys(_scrollBox)).call(_context32, function (key) {
|
342
353
|
if (key === "default" || key === "__esModule") return;
|
343
354
|
if (key in exports && exports[key] === _scrollBox[key]) return;
|
344
355
|
_Object$defineProperty(exports, key, {
|
@@ -349,7 +360,7 @@ _forEachInstanceProperty(_context31 = _Object$keys(_scrollBox)).call(_context31,
|
|
349
360
|
});
|
350
361
|
});
|
351
362
|
var _separator = require("./separator");
|
352
|
-
_forEachInstanceProperty(
|
363
|
+
_forEachInstanceProperty(_context33 = _Object$keys(_separator)).call(_context33, function (key) {
|
353
364
|
if (key === "default" || key === "__esModule") return;
|
354
365
|
if (key in exports && exports[key] === _separator[key]) return;
|
355
366
|
_Object$defineProperty(exports, key, {
|
@@ -360,7 +371,7 @@ _forEachInstanceProperty(_context32 = _Object$keys(_separator)).call(_context32,
|
|
360
371
|
});
|
361
372
|
});
|
362
373
|
var _shared = require("./shared");
|
363
|
-
_forEachInstanceProperty(
|
374
|
+
_forEachInstanceProperty(_context34 = _Object$keys(_shared)).call(_context34, function (key) {
|
364
375
|
if (key === "default" || key === "__esModule") return;
|
365
376
|
if (key in exports && exports[key] === _shared[key]) return;
|
366
377
|
_Object$defineProperty(exports, key, {
|
@@ -371,7 +382,7 @@ _forEachInstanceProperty(_context33 = _Object$keys(_shared)).call(_context33, fu
|
|
371
382
|
});
|
372
383
|
});
|
373
384
|
var _table = require("./table");
|
374
|
-
_forEachInstanceProperty(
|
385
|
+
_forEachInstanceProperty(_context35 = _Object$keys(_table)).call(_context35, function (key) {
|
375
386
|
if (key === "default" || key === "__esModule") return;
|
376
387
|
if (key in exports && exports[key] === _table[key]) return;
|
377
388
|
_Object$defineProperty(exports, key, {
|
@@ -382,7 +393,7 @@ _forEachInstanceProperty(_context34 = _Object$keys(_table)).call(_context34, fun
|
|
382
393
|
});
|
383
394
|
});
|
384
395
|
var _text = require("./text");
|
385
|
-
_forEachInstanceProperty(
|
396
|
+
_forEachInstanceProperty(_context36 = _Object$keys(_text)).call(_context36, function (key) {
|
386
397
|
if (key === "default" || key === "__esModule") return;
|
387
398
|
if (key in exports && exports[key] === _text[key]) return;
|
388
399
|
_Object$defineProperty(exports, key, {
|
@@ -393,7 +404,7 @@ _forEachInstanceProperty(_context35 = _Object$keys(_text)).call(_context35, func
|
|
393
404
|
});
|
394
405
|
});
|
395
406
|
var _tooltipTrigger = require("./tooltipTrigger");
|
396
|
-
_forEachInstanceProperty(
|
407
|
+
_forEachInstanceProperty(_context37 = _Object$keys(_tooltipTrigger)).call(_context37, function (key) {
|
397
408
|
if (key === "default" || key === "__esModule") return;
|
398
409
|
if (key in exports && exports[key] === _tooltipTrigger[key]) return;
|
399
410
|
_Object$defineProperty(exports, key, {
|
package/lib/cjs/types/table.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
|
|
2
2
|
import { TestingAttributes } from './shared/test';
|
3
3
|
import { BoxProps } from './box';
|
4
4
|
import { DOMAttributes, StyleProps } from './shared';
|
5
|
-
export interface TableProps extends BoxProps, TestingAttributes {
|
5
|
+
export interface TableProps extends BoxProps, TestingAttributes, DOMAttributes {
|
6
6
|
}
|
7
7
|
export interface TableChildrenProp extends StyleProps, TestingAttributes {
|
8
8
|
children: ReactNode;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
4
|
+
_Object$defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
exports.getPendoID = void 0;
|
8
|
+
var getPendoID = function getPendoID(componentName) {
|
9
|
+
return {
|
10
|
+
'data-pendo-id': componentName
|
11
|
+
};
|
12
|
+
};
|
13
|
+
exports.getPendoID = getPendoID;
|
@@ -21,6 +21,7 @@ import { mergeProps, useLabel } from 'react-aria';
|
|
21
21
|
import PropTypes from 'prop-types';
|
22
22
|
import { v4 as uuid } from 'uuid';
|
23
23
|
import { Box, Button, FieldHelperText, Label, Text } from '../..';
|
24
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
24
25
|
import statuses from '../../utils/devUtils/constants/statuses';
|
25
26
|
import isValidPositiveInt from '../../utils/devUtils/props/isValidPositiveInt';
|
26
27
|
import { ariaAttributesBasePropTypes, getAriaAttributeProps } from '../../utils/docUtils/ariaAttributes';
|
@@ -119,7 +120,7 @@ var ArrayField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
119
120
|
var _getAriaAttributeProp = getAriaAttributeProps(others),
|
120
121
|
ariaProps = _getAriaAttributeProp.ariaProps,
|
121
122
|
nonAriaProps = _getAriaAttributeProp.nonAriaProps;
|
122
|
-
return ___EmotionJSX(Box, _extends({}, nonAriaProps, {
|
123
|
+
return ___EmotionJSX(Box, _extends({}, getPendoID('ArrayField'), nonAriaProps, {
|
123
124
|
ref: ref
|
124
125
|
}), ___EmotionJSX(Label, _extends({}, raLabelProps, mergeProps(labelProps, raLabelProps, {
|
125
126
|
children: label
|
@@ -26,7 +26,7 @@ var Breadcrumbs = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
26
26
|
var breadcrumbsRef = useLocalOrForwardRef(ref);
|
27
27
|
usePropWarning(props, 'disabled', 'isDisabled');
|
28
28
|
var createBreadcrumb = useCallback(function (child, idx) {
|
29
|
-
var isCurrentItem =
|
29
|
+
var isCurrentItem = _Array$isArray(filteredChildren) && filteredChildren.length > 1 ? idx === React.Children.toArray(children).length - 1 : true;
|
30
30
|
return ___EmotionJSX(React.Fragment, {
|
31
31
|
key: "li-".concat(child.key)
|
32
32
|
}, ___EmotionJSX(BreadcrumbItem, _extends({
|
@@ -51,11 +51,10 @@ test('should render nodes from the children', function () {
|
|
51
51
|
test('should render correct amount of icons', function () {
|
52
52
|
getComponent({
|
53
53
|
iconProps: {
|
54
|
-
'data-testid': testIconId
|
55
|
-
icon: ChevronRightIcon
|
54
|
+
'data-testid': testIconId
|
56
55
|
}
|
57
56
|
});
|
58
|
-
expect(screen.getAllByTestId(testIconId).length).toBe(testItemsArr.length -
|
57
|
+
expect(screen.getAllByTestId(testIconId).length).toBe(testItemsArr.length - 1);
|
59
58
|
});
|
60
59
|
test('breadcrumbItem should render breadcrumbItem as a Text component when appropriate elementType passed', function () {
|
61
60
|
getComponent({}, {
|
@@ -17,8 +17,10 @@ import { mergeProps, useButton, useFocusRing } from 'react-aria';
|
|
17
17
|
import { Pressable, useHover, usePress } from '@react-aria/interactions';
|
18
18
|
import { Button as ThemeUIButton } from 'theme-ui';
|
19
19
|
import { useAriaLabelWarning, useLocalOrForwardRef, usePropWarning, useStatusClasses } from '../../hooks';
|
20
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
20
21
|
import Loader from '../Loader';
|
21
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
23
|
+
var displayName = 'Button';
|
22
24
|
var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
23
25
|
var children = props.children,
|
24
26
|
className = props.className,
|
@@ -91,7 +93,7 @@ var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
91
93
|
alignItems: 'center'
|
92
94
|
} : {},
|
93
95
|
variant: variant
|
94
|
-
}, others, mergeProps(_objectSpread(_objectSpread({}, buttonProps), {}, {
|
96
|
+
}, getPendoID(displayName), others, mergeProps(_objectSpread(_objectSpread({}, buttonProps), {}, {
|
95
97
|
tabIndex: tabIndex
|
96
98
|
}), hoverProps, focusProps)), isLoading ? ___EmotionJSX("span", {
|
97
99
|
style: {
|
@@ -108,5 +110,5 @@ Button.defaultProps = {
|
|
108
110
|
isDisabled: false,
|
109
111
|
variant: 'default'
|
110
112
|
};
|
111
|
-
Button.displayName =
|
113
|
+
Button.displayName = displayName;
|
112
114
|
export default Button;
|
@@ -11,7 +11,7 @@ import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
|
11
11
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
12
12
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
13
13
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
14
|
-
import React, { forwardRef, useEffect,
|
14
|
+
import React, { forwardRef, useEffect, useRef, useState } from 'react';
|
15
15
|
import { createCalendar, parseDate } from '@internationalized/date';
|
16
16
|
import ChevronDoubleLeftIcon from '@pingux/mdi-react/ChevronDoubleLeftIcon';
|
17
17
|
import ChevronDoubleRightIcon from '@pingux/mdi-react/ChevronDoubleRightIcon';
|
@@ -21,7 +21,7 @@ import { useCalendar } from '@react-aria/calendar';
|
|
21
21
|
import { useLocale } from '@react-aria/i18n';
|
22
22
|
import { VisuallyHidden } from '@react-aria/visually-hidden';
|
23
23
|
import { useCalendarState } from '@react-stately/calendar';
|
24
|
-
import
|
24
|
+
import { useLocalOrForwardRef } from '../../hooks';
|
25
25
|
import { Box, Button, Icon, IconButton, Text } from '../../index';
|
26
26
|
import CalendarGrid from './CalendarGrid';
|
27
27
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
@@ -34,12 +34,7 @@ var Calendar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
34
34
|
value = props.value;
|
35
35
|
var _useLocale = useLocale(),
|
36
36
|
locale = _useLocale.locale;
|
37
|
-
var calenderRef =
|
38
|
-
|
39
|
-
// istanbul ignore next
|
40
|
-
useImperativeHandle(ref, function () {
|
41
|
-
return calenderRef.current;
|
42
|
-
});
|
37
|
+
var calenderRef = useLocalOrForwardRef(ref);
|
43
38
|
var parsedDates = {
|
44
39
|
value: typeof value === 'string' && parseDate(value) || value,
|
45
40
|
defaultValue: typeof defaultValue === 'string' && parseDate(defaultValue) || defaultValue,
|
@@ -53,11 +48,11 @@ var Calendar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
53
48
|
locale: locale,
|
54
49
|
createCalendar: createCalendar
|
55
50
|
}));
|
56
|
-
var
|
57
|
-
calendarProps =
|
58
|
-
prevButtonProps =
|
59
|
-
nextButtonProps =
|
60
|
-
title =
|
51
|
+
var _ref = useCalendar(_objectSpread(_objectSpread({}, props), parsedDates), state),
|
52
|
+
calendarProps = _ref.calendarProps,
|
53
|
+
prevButtonProps = _ref.prevButtonProps,
|
54
|
+
nextButtonProps = _ref.nextButtonProps,
|
55
|
+
title = _ref.title;
|
61
56
|
var _useState = useState(null),
|
62
57
|
_useState2 = _slicedToArray(_useState, 2),
|
63
58
|
yearChangeDirection = _useState2[0],
|
@@ -72,10 +67,12 @@ var Calendar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
72
67
|
// after updating visible year, reapplies focus to corresponding year buttons
|
73
68
|
useEffect(function () {
|
74
69
|
if (yearChangeDirection === nav.NEXT) {
|
75
|
-
|
70
|
+
var _nextYearRef$current;
|
71
|
+
(_nextYearRef$current = nextYearRef.current) === null || _nextYearRef$current === void 0 ? void 0 : _nextYearRef$current.focus();
|
76
72
|
}
|
77
73
|
if (yearChangeDirection === nav.PREVIOUS) {
|
78
|
-
|
74
|
+
var _previousYearRef$curr;
|
75
|
+
(_previousYearRef$curr = previousYearRef.current) === null || _previousYearRef$curr === void 0 ? void 0 : _previousYearRef$curr.focus();
|
79
76
|
}
|
80
77
|
setYearChangeDirection(null);
|
81
78
|
}, [nav.NEXT, nav.PREVIOUS, yearChangeDirection]);
|
@@ -99,12 +96,13 @@ var Calendar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
99
96
|
var renderTitle = ___EmotionJSX(Text, {
|
100
97
|
variant: "itemTitle",
|
101
98
|
role: "heading",
|
102
|
-
"aria-level":
|
99
|
+
"aria-level": 3,
|
103
100
|
fontWeight: 3
|
104
101
|
}, title);
|
105
102
|
return ___EmotionJSX(Box, _extends({}, calendarProps, {
|
106
103
|
ref: calenderRef,
|
107
|
-
variant: "calendar.calendarContainer"
|
104
|
+
variant: "calendar.calendarContainer",
|
105
|
+
role: "group"
|
108
106
|
}), ___EmotionJSX(VisuallyHidden, {
|
109
107
|
"aria-live": "assertive"
|
110
108
|
}, ___EmotionJSX(Text, null, title)), ___EmotionJSX(Box, {
|
@@ -167,47 +165,4 @@ var Calendar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
167
165
|
tabIndex: -1
|
168
166
|
})));
|
169
167
|
});
|
170
|
-
Calendar.propTypes = {
|
171
|
-
/** Prop to provide a custom default date (uncontrolled) */
|
172
|
-
defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
173
|
-
/** Prop to provide a custom default focused date (uncontrolled) */
|
174
|
-
defaultFocusedValue: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
175
|
-
/** Prop to provide a default date (controlled) */
|
176
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
177
|
-
/** custom week days for other calendars */
|
178
|
-
customWeekDays: PropTypes.arrayOf(PropTypes.string),
|
179
|
-
/** Whether the element should receive focus on render. */
|
180
|
-
hasAutoFocus: PropTypes.bool,
|
181
|
-
/** The element's unique identifier. */
|
182
|
-
id: PropTypes.string,
|
183
|
-
/**
|
184
|
-
* Callback that is called for each date of the calendar.
|
185
|
-
* If it returns true, then the date is unavailable.
|
186
|
-
*
|
187
|
-
* (date: DateValue) => boolean
|
188
|
-
*/
|
189
|
-
isDateUnavailable: PropTypes.func,
|
190
|
-
/** Whether the calendar is disabled. */
|
191
|
-
isDisabled: PropTypes.bool,
|
192
|
-
/** Whether the calendar dates are only focusable. */
|
193
|
-
isReadOnly: PropTypes.bool,
|
194
|
-
/** Whether user input is required on the input before form submission. */
|
195
|
-
isRequired: PropTypes.bool,
|
196
|
-
/** The maximum allowed date that a user may select. */
|
197
|
-
maxValue: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
198
|
-
/** The minimum allowed date that a user may select. */
|
199
|
-
minValue: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
200
|
-
/** Handler that is called when the element loses focus. */
|
201
|
-
onBlur: PropTypes.func,
|
202
|
-
/** Handler that is called when the element's selection state changes. */
|
203
|
-
onChange: PropTypes.func,
|
204
|
-
/** Handler that is called when the element receives focus. */
|
205
|
-
onFocus: PropTypes.func,
|
206
|
-
/** Handler that is called when the element's focus status changes. */
|
207
|
-
onFocusChange: PropTypes.func,
|
208
|
-
/** Handler that is called when a key is pressed. */
|
209
|
-
onKeyDown: PropTypes.func,
|
210
|
-
/** Handler that is called when a key is released. */
|
211
|
-
onKeyUp: PropTypes.func
|
212
|
-
};
|
213
168
|
export default Calendar;
|
@@ -16,10 +16,10 @@ import React, { useState } from 'react';
|
|
16
16
|
import { parseDate } from '@internationalized/date';
|
17
17
|
import { withDesign } from 'storybook-addon-designs';
|
18
18
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
19
|
-
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks
|
19
|
+
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
20
20
|
import { ariaAttributeBaseArgTypes } from '../../utils/docUtils/ariaAttributes';
|
21
|
-
import Calendar from './Calendar';
|
22
21
|
import CalendarReadme from './Calendar.mdx';
|
22
|
+
import Calendar from '.';
|
23
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
24
24
|
export default {
|
25
25
|
title: 'Components/Calendar',
|
@@ -274,7 +274,7 @@ test('unavailable dates cannot be picked', function () {
|
|
274
274
|
return cell.getAttribute('aria-disabled') === 'true';
|
275
275
|
});
|
276
276
|
expect(cells.length).toBe(9);
|
277
|
-
var disabledDate = screen.
|
277
|
+
var disabledDate = screen.getByText(16);
|
278
278
|
userEvent.click(disabledDate);
|
279
279
|
expect(disabledDate).toHaveAttribute('aria-disabled', 'true');
|
280
280
|
expect(disabledDate).not.toHaveClass('is-selected');
|
@@ -290,6 +290,6 @@ test('should autofocus on current day with hasAutoFocus', function () {
|
|
290
290
|
var focusedDay = _filterInstanceProperty(_context7 = screen.queryAllByText(day)).call(_context7, function (cell) {
|
291
291
|
return cell.getAttribute('aria-disabled') !== 'true';
|
292
292
|
});
|
293
|
-
expect(focusedDay[0]).toHaveTextContent(day);
|
293
|
+
expect(focusedDay[0]).toHaveTextContent(day.toString());
|
294
294
|
expect(focusedDay[0]).toHaveFocus();
|
295
295
|
});
|
@@ -1,31 +1,26 @@
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
3
3
|
var _excluded = ["state", "date", "className"];
|
4
|
-
import React, { forwardRef, useCallback
|
4
|
+
import React, { forwardRef, useCallback } from 'react';
|
5
5
|
import { useCalendarCell } from '@react-aria/calendar';
|
6
6
|
import { useFocusRing } from '@react-aria/focus';
|
7
7
|
import { useHover, usePress } from '@react-aria/interactions';
|
8
8
|
import { mergeProps } from '@react-aria/utils';
|
9
|
-
import
|
10
|
-
import { useStatusClasses } from '../../hooks';
|
9
|
+
import { useLocalOrForwardRef, useStatusClasses } from '../../hooks';
|
11
10
|
import { Box, TableCell } from '../../index';
|
12
|
-
|
11
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
13
12
|
/**
|
14
13
|
* Grid cell button element with the formatted day number.
|
15
14
|
* Utilizes the useCalendarCell hook to return props for an individual cell,
|
16
15
|
* along with states and information.
|
17
16
|
*/
|
18
|
-
|
17
|
+
|
19
18
|
var CalendarCell = /*#__PURE__*/forwardRef(function (props, ref) {
|
20
19
|
var state = props.state,
|
21
20
|
date = props.date,
|
22
21
|
className = props.className,
|
23
22
|
others = _objectWithoutProperties(props, _excluded);
|
24
|
-
var cellRef =
|
25
|
-
/* istanbul ignore next */
|
26
|
-
useImperativeHandle(ref, function () {
|
27
|
-
return cellRef.current;
|
28
|
-
});
|
23
|
+
var cellRef = useLocalOrForwardRef(ref);
|
29
24
|
var _useCalendarCell = useCalendarCell({
|
30
25
|
date: date
|
31
26
|
}, state, cellRef),
|
@@ -47,11 +42,11 @@ var CalendarCell = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
47
42
|
|
48
43
|
var handleDisableClick = useCallback(function () {
|
49
44
|
var _cellRef$current, _cellRef$current2;
|
50
|
-
if ((_cellRef$current = cellRef.current) !== null && _cellRef$current !== void 0 && _cellRef$current.hidden && !state.isDisabled && formattedDate > 20) {
|
51
|
-
setFocused(
|
45
|
+
if ((_cellRef$current = cellRef.current) !== null && _cellRef$current !== void 0 && _cellRef$current.hidden && !state.isDisabled && Number(formattedDate) > 20) {
|
46
|
+
setFocused(false);
|
52
47
|
focusPreviousPage();
|
53
|
-
} else if ((_cellRef$current2 = cellRef.current) !== null && _cellRef$current2 !== void 0 && _cellRef$current2.hidden && !state.isDisabled && formattedDate < 15) {
|
54
|
-
setFocused(
|
48
|
+
} else if ((_cellRef$current2 = cellRef.current) !== null && _cellRef$current2 !== void 0 && _cellRef$current2.hidden && !state.isDisabled && Number(formattedDate) < 15) {
|
49
|
+
setFocused(false);
|
55
50
|
focusNextPage();
|
56
51
|
}
|
57
52
|
}, [date, focusNextPage, focusPreviousPage, formattedDate, state, setFocused]);
|
@@ -86,27 +81,12 @@ var CalendarCell = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
86
81
|
}), ___EmotionJSX(Box, _extends({
|
87
82
|
variant: "calendar.calendarButton",
|
88
83
|
ref: cellRef,
|
89
|
-
hidden: isOutsideVisibleRange
|
84
|
+
hidden: isOutsideVisibleRange
|
85
|
+
}, mergeProps(buttonProps, others), {
|
90
86
|
isSelected: isSelected,
|
91
87
|
isDisabled: isDisabled,
|
92
88
|
isUnavailable: isUnavailable,
|
93
89
|
className: classNames
|
94
|
-
}
|
90
|
+
}), formattedDate));
|
95
91
|
});
|
96
|
-
CalendarCell.propTypes = {
|
97
|
-
isSelected: PropTypes.bool,
|
98
|
-
isDisabled: PropTypes.bool,
|
99
|
-
isOutsideVisibleRange: PropTypes.bool,
|
100
|
-
isUnavailable: PropTypes.bool,
|
101
|
-
formattedDate: PropTypes.string,
|
102
|
-
state: PropTypes.shape({
|
103
|
-
focusPreviousPage: PropTypes.func,
|
104
|
-
setValue: PropTypes.func,
|
105
|
-
focusNextPage: PropTypes.func,
|
106
|
-
setFocused: PropTypes.func,
|
107
|
-
setFocusedDate: PropTypes.func,
|
108
|
-
isDisabled: PropTypes.bool
|
109
|
-
}),
|
110
|
-
date: PropTypes.shape({})
|
111
|
-
};
|
112
92
|
export default CalendarCell;
|