@ilo-org/react 0.4.3 → 0.4.4
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/.eslintrc.cjs +39 -0
- package/CHANGELOG.md +12 -0
- package/lib/cjs/{DailyMotion-5654fa6e.js → DailyMotion-2cda261d.js} +1 -1
- package/lib/cjs/{Facebook-1924e510.js → Facebook-40bd92e7.js} +1 -1
- package/lib/cjs/{FilePlayer-9c697e42.js → FilePlayer-b5a2e7b1.js} +1 -1
- package/lib/cjs/{Kaltura-177bb003.js → Kaltura-8544b000.js} +1 -1
- package/lib/cjs/{Mixcloud-91a772a6.js → Mixcloud-2c92778a.js} +1 -1
- package/lib/cjs/{Preview-8e2afb6a.js → Preview-a5f6c0c7.js} +1 -1
- package/lib/cjs/{SoundCloud-089e0f30.js → SoundCloud-ff297faf.js} +1 -1
- package/lib/cjs/{Streamable-4ca5b9c7.js → Streamable-612542e7.js} +1 -1
- package/lib/cjs/{Twitch-dbc5c387.js → Twitch-246c531e.js} +1 -1
- package/lib/cjs/{VideoPlayer-874a52b0.js → VideoPlayer-d576de50.js} +16 -23
- package/lib/cjs/{Vidyard-371acdcb.js → Vidyard-e1bb2e3d.js} +1 -1
- package/lib/cjs/{Vimeo-4d2029a8.js → Vimeo-38a72f3d.js} +1 -1
- package/lib/cjs/{Wistia-cd0799ad.js → Wistia-1280865c.js} +1 -1
- package/lib/cjs/{YouTube-23b7ec9e.js → YouTube-1fbce80b.js} +1 -1
- package/lib/cjs/components/Callout/index.js +14 -3
- package/lib/cjs/components/Card/CardGroup.js +4 -4
- package/lib/cjs/components/Collapse/Collapse.js +32 -47
- package/lib/cjs/components/Collapse/index.js +1 -1
- package/lib/cjs/components/Video/Video.js +2 -2
- package/lib/cjs/components/Video/VideoPlayer.js +2 -2
- package/lib/cjs/components/Video/index.js +2 -2
- package/lib/cjs/components/index.js +3 -3
- package/lib/cjs/{index-1b6434f0.js → index-0af02e81.js} +22 -59
- package/lib/cjs/index.js +4 -4
- package/lib/esm/{DailyMotion-88f6c379.js → DailyMotion-89500a59.js} +1 -1
- package/lib/esm/{Facebook-3a284039.js → Facebook-7abf2b6b.js} +1 -1
- package/lib/esm/{FilePlayer-dee1f94b.js → FilePlayer-c5879d9f.js} +1 -1
- package/lib/esm/{Kaltura-c5d42c88.js → Kaltura-424e97bb.js} +1 -1
- package/lib/esm/{Mixcloud-430ab42a.js → Mixcloud-a9c98513.js} +1 -1
- package/lib/esm/{Preview-7f57e055.js → Preview-05e5eb47.js} +1 -1
- package/lib/esm/{SoundCloud-d1ab591e.js → SoundCloud-0853e0b6.js} +1 -1
- package/lib/esm/{Streamable-042d61d5.js → Streamable-da3fc8b6.js} +1 -1
- package/lib/esm/{Twitch-2f45534f.js → Twitch-25eb6a7b.js} +1 -1
- package/lib/esm/{VideoPlayer-719076c4.js → VideoPlayer-a5fa87ce.js} +16 -23
- package/lib/esm/{Vidyard-4625527b.js → Vidyard-7284e1ca.js} +1 -1
- package/lib/esm/{Vimeo-03b960e6.js → Vimeo-4dc64c92.js} +1 -1
- package/lib/esm/{Wistia-48f9c303.js → Wistia-7f9e5ea3.js} +1 -1
- package/lib/esm/{YouTube-5b29a3d9.js → YouTube-9fef7faa.js} +1 -1
- package/lib/esm/components/Callout/index.js +16 -1
- package/lib/esm/components/Card/CardGroup.js +4 -4
- package/lib/esm/components/Collapse/Collapse.js +32 -47
- package/lib/esm/components/Collapse/index.js +1 -1
- package/lib/esm/components/Video/Video.js +2 -2
- package/lib/esm/components/Video/VideoPlayer.js +2 -2
- package/lib/esm/components/Video/index.js +2 -2
- package/lib/esm/components/index.js +3 -3
- package/lib/esm/{index-8ebb2cc1.js → index-623ce3f5.js} +21 -60
- package/lib/esm/index.js +4 -4
- package/lib/types/react/src/components/Fieldset/Fieldset.props.d.ts +1 -2
- package/lib/types/react/src/components/Video/Video.props.d.ts +1 -1
- package/package.json +29 -35
- package/src/components/Fieldset/Fieldset.props.ts +1 -2
- package/src/components/Video/Video.props.ts +1 -1
- package/lib/cjs/Callout.args-bcd5a9f1.js +0 -17
- package/lib/esm/Callout.args-3a0e0416.js +0 -15
|
@@ -2,7 +2,7 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import require$$0, { forwardRef, useMemo, cloneElement } from 'react';
|
|
5
|
-
import { p as
|
|
5
|
+
import { p as propTypes } from '../../index-623ce3f5.js';
|
|
6
6
|
import ReactDOM from 'react-dom';
|
|
7
7
|
import createChainedFunction from '../../utils/createChainedFunction.js';
|
|
8
8
|
import getDefaultDimensionValue from '../../utils/getDefaultDimensionValue.js';
|
|
@@ -41,30 +41,26 @@ var config = {
|
|
|
41
41
|
disabled: false
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
var timeoutsShape = process.env.NODE_ENV !== 'production' ?
|
|
45
|
-
enter:
|
|
46
|
-
exit:
|
|
47
|
-
appear:
|
|
44
|
+
var timeoutsShape = process.env.NODE_ENV !== 'production' ? propTypes.exports.oneOfType([propTypes.exports.number, propTypes.exports.shape({
|
|
45
|
+
enter: propTypes.exports.number,
|
|
46
|
+
exit: propTypes.exports.number,
|
|
47
|
+
appear: propTypes.exports.number
|
|
48
48
|
}).isRequired]) : null;
|
|
49
|
-
process.env.NODE_ENV !== 'production' ?
|
|
50
|
-
enter:
|
|
51
|
-
exit:
|
|
52
|
-
active:
|
|
53
|
-
}),
|
|
54
|
-
enter:
|
|
55
|
-
enterDone:
|
|
56
|
-
enterActive:
|
|
57
|
-
exit:
|
|
58
|
-
exitDone:
|
|
59
|
-
exitActive:
|
|
49
|
+
process.env.NODE_ENV !== 'production' ? propTypes.exports.oneOfType([propTypes.exports.string, propTypes.exports.shape({
|
|
50
|
+
enter: propTypes.exports.string,
|
|
51
|
+
exit: propTypes.exports.string,
|
|
52
|
+
active: propTypes.exports.string
|
|
53
|
+
}), propTypes.exports.shape({
|
|
54
|
+
enter: propTypes.exports.string,
|
|
55
|
+
enterDone: propTypes.exports.string,
|
|
56
|
+
enterActive: propTypes.exports.string,
|
|
57
|
+
exit: propTypes.exports.string,
|
|
58
|
+
exitDone: propTypes.exports.string,
|
|
59
|
+
exitActive: propTypes.exports.string
|
|
60
60
|
})]) : null;
|
|
61
61
|
|
|
62
62
|
var TransitionGroupContext = require$$0.createContext(null);
|
|
63
63
|
|
|
64
|
-
var forceReflow = function forceReflow(node) {
|
|
65
|
-
return node.scrollTop;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
64
|
var UNMOUNTED = 'unmounted';
|
|
69
65
|
var EXITED = 'exited';
|
|
70
66
|
var ENTERING = 'entering';
|
|
@@ -284,14 +280,6 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
284
280
|
this.cancelNextCallback();
|
|
285
281
|
|
|
286
282
|
if (nextStatus === ENTERING) {
|
|
287
|
-
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
288
|
-
var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749
|
|
289
|
-
// With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.
|
|
290
|
-
// To make the animation happen, we have to separate each rendering and avoid being processed as batched.
|
|
291
|
-
|
|
292
|
-
if (node) forceReflow(node);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
283
|
this.performEnter(mounting);
|
|
296
284
|
} else {
|
|
297
285
|
this.performExit();
|
|
@@ -483,11 +471,8 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
483
471
|
* (see
|
|
484
472
|
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
485
473
|
*/
|
|
486
|
-
nodeRef:
|
|
487
|
-
current: typeof Element === 'undefined' ?
|
|
488
|
-
var value = propValue[key];
|
|
489
|
-
return propTypesExports.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
|
|
490
|
-
}
|
|
474
|
+
nodeRef: propTypes.exports.shape({
|
|
475
|
+
current: typeof Element === 'undefined' ? propTypes.exports.any : propTypes.exports.instanceOf(Element)
|
|
491
476
|
}),
|
|
492
477
|
|
|
493
478
|
/**
|
|
@@ -504,12 +489,12 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
504
489
|
* </Transition>
|
|
505
490
|
* ```
|
|
506
491
|
*/
|
|
507
|
-
children:
|
|
492
|
+
children: propTypes.exports.oneOfType([propTypes.exports.func.isRequired, propTypes.exports.element.isRequired]).isRequired,
|
|
508
493
|
|
|
509
494
|
/**
|
|
510
495
|
* Show the component; triggers the enter or exit states
|
|
511
496
|
*/
|
|
512
|
-
in:
|
|
497
|
+
in: propTypes.exports.bool,
|
|
513
498
|
|
|
514
499
|
/**
|
|
515
500
|
* By default the child component is mounted immediately along with
|
|
@@ -517,13 +502,13 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
517
502
|
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
518
503
|
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
519
504
|
*/
|
|
520
|
-
mountOnEnter:
|
|
505
|
+
mountOnEnter: propTypes.exports.bool,
|
|
521
506
|
|
|
522
507
|
/**
|
|
523
508
|
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
524
509
|
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
525
510
|
*/
|
|
526
|
-
unmountOnExit:
|
|
511
|
+
unmountOnExit: propTypes.exports.bool,
|
|
527
512
|
|
|
528
513
|
/**
|
|
529
514
|
* By default the child component does not perform the enter transition when
|
|
@@ -536,17 +521,17 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
536
521
|
* > additional `.appear-*` classes, that way you can choose to style it
|
|
537
522
|
* > differently.
|
|
538
523
|
*/
|
|
539
|
-
appear:
|
|
524
|
+
appear: propTypes.exports.bool,
|
|
540
525
|
|
|
541
526
|
/**
|
|
542
527
|
* Enable or disable enter transitions.
|
|
543
528
|
*/
|
|
544
|
-
enter:
|
|
529
|
+
enter: propTypes.exports.bool,
|
|
545
530
|
|
|
546
531
|
/**
|
|
547
532
|
* Enable or disable exit transitions.
|
|
548
533
|
*/
|
|
549
|
-
exit:
|
|
534
|
+
exit: propTypes.exports.bool,
|
|
550
535
|
|
|
551
536
|
/**
|
|
552
537
|
* The duration of the transition, in milliseconds.
|
|
@@ -599,7 +584,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
599
584
|
* }}
|
|
600
585
|
* ```
|
|
601
586
|
*/
|
|
602
|
-
addEndListener:
|
|
587
|
+
addEndListener: propTypes.exports.func,
|
|
603
588
|
|
|
604
589
|
/**
|
|
605
590
|
* Callback fired before the "entering" status is applied. An extra parameter
|
|
@@ -609,7 +594,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
609
594
|
*
|
|
610
595
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
611
596
|
*/
|
|
612
|
-
onEnter:
|
|
597
|
+
onEnter: propTypes.exports.func,
|
|
613
598
|
|
|
614
599
|
/**
|
|
615
600
|
* Callback fired after the "entering" status is applied. An extra parameter
|
|
@@ -619,7 +604,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
619
604
|
*
|
|
620
605
|
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
621
606
|
*/
|
|
622
|
-
onEntering:
|
|
607
|
+
onEntering: propTypes.exports.func,
|
|
623
608
|
|
|
624
609
|
/**
|
|
625
610
|
* Callback fired after the "entered" status is applied. An extra parameter
|
|
@@ -629,7 +614,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
629
614
|
*
|
|
630
615
|
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
631
616
|
*/
|
|
632
|
-
onEntered:
|
|
617
|
+
onEntered: propTypes.exports.func,
|
|
633
618
|
|
|
634
619
|
/**
|
|
635
620
|
* Callback fired before the "exiting" status is applied.
|
|
@@ -638,7 +623,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
638
623
|
*
|
|
639
624
|
* @type Function(node: HtmlElement) -> void
|
|
640
625
|
*/
|
|
641
|
-
onExit:
|
|
626
|
+
onExit: propTypes.exports.func,
|
|
642
627
|
|
|
643
628
|
/**
|
|
644
629
|
* Callback fired after the "exiting" status is applied.
|
|
@@ -647,7 +632,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
647
632
|
*
|
|
648
633
|
* @type Function(node: HtmlElement) -> void
|
|
649
634
|
*/
|
|
650
|
-
onExiting:
|
|
635
|
+
onExiting: propTypes.exports.func,
|
|
651
636
|
|
|
652
637
|
/**
|
|
653
638
|
* Callback fired after the "exited" status is applied.
|
|
@@ -656,7 +641,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
656
641
|
*
|
|
657
642
|
* @type Function(node: HtmlElement) -> void
|
|
658
643
|
*/
|
|
659
|
-
onExited:
|
|
644
|
+
onExited: propTypes.exports.func
|
|
660
645
|
} : {}; // Name the function so it is clearer in the documentation
|
|
661
646
|
|
|
662
647
|
function noop() {}
|
|
@@ -3,7 +3,7 @@ import 'tslib';
|
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'classnames';
|
|
5
5
|
import 'react';
|
|
6
|
-
import '../../index-
|
|
6
|
+
import '../../index-623ce3f5.js';
|
|
7
7
|
import 'react-dom';
|
|
8
8
|
import '../../utils/createChainedFunction.js';
|
|
9
9
|
import '../../utils/getDefaultDimensionValue.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import useGlobalSettings from '../../hooks/useGlobalSettings.js';
|
|
4
|
-
import { V as VideoPlayer } from '../../VideoPlayer-
|
|
4
|
+
import { V as VideoPlayer } from '../../VideoPlayer-a5fa87ce.js';
|
|
5
5
|
import 'tslib';
|
|
6
6
|
import 'react';
|
|
7
7
|
import '../../GlobalCtx-7fb23cfa.js';
|
|
8
|
-
import '../../index-
|
|
8
|
+
import '../../index-623ce3f5.js';
|
|
9
9
|
import 'react-dom';
|
|
10
10
|
import '../../utils/hoursMinutesSeconds.js';
|
|
11
11
|
import 'screenfull';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { V as default } from '../../VideoPlayer-
|
|
3
|
+
export { V as default } from '../../VideoPlayer-a5fa87ce.js';
|
|
4
4
|
import 'react-dom';
|
|
5
5
|
import 'classnames';
|
|
6
6
|
import '../../hooks/useGlobalSettings.js';
|
|
7
7
|
import '../../utils/hoursMinutesSeconds.js';
|
|
8
8
|
import 'screenfull';
|
|
9
|
-
import '../../index-
|
|
9
|
+
import '../../index-623ce3f5.js';
|
|
10
10
|
import 'tslib';
|
|
11
11
|
import '../../GlobalCtx-7fb23cfa.js';
|
|
@@ -5,8 +5,8 @@ import '../../hooks/useGlobalSettings.js';
|
|
|
5
5
|
import 'tslib';
|
|
6
6
|
import 'react';
|
|
7
7
|
import '../../GlobalCtx-7fb23cfa.js';
|
|
8
|
-
import '../../VideoPlayer-
|
|
9
|
-
import '../../index-
|
|
8
|
+
import '../../VideoPlayer-a5fa87ce.js';
|
|
9
|
+
import '../../index-623ce3f5.js';
|
|
10
10
|
import 'react-dom';
|
|
11
11
|
import '../../utils/hoursMinutesSeconds.js';
|
|
12
12
|
import 'screenfull';
|
|
@@ -24,7 +24,7 @@ export { default as Notification } from './Notification/Notification.js';
|
|
|
24
24
|
export { default as ReadMore } from './ReadMore/ReadMore.js';
|
|
25
25
|
export { default as Textarea } from './Textarea/Textarea.js';
|
|
26
26
|
export { default as Callout } from './Callout/Callout.js';
|
|
27
|
-
import '
|
|
27
|
+
import './Callout/index.js';
|
|
28
28
|
export { default as Credit } from './Credit/Credit.js';
|
|
29
29
|
export { default as FileUpload } from './FileUpload/FileUpload.js';
|
|
30
30
|
export { default as Heading } from './Heading/Heading.js';
|
|
@@ -57,7 +57,7 @@ import '../hooks/useGlobalSettings.js';
|
|
|
57
57
|
import '../AccordionCtx-8c051900.js';
|
|
58
58
|
import '@ilo-org/utils';
|
|
59
59
|
import '../utils/checkArrayDuplicates.js';
|
|
60
|
-
import '../index-
|
|
60
|
+
import '../index-623ce3f5.js';
|
|
61
61
|
import 'react-dom';
|
|
62
62
|
import '../utils/createChainedFunction.js';
|
|
63
63
|
import '../utils/getDefaultDimensionValue.js';
|
|
@@ -65,7 +65,7 @@ import '../css-7414f50b.js';
|
|
|
65
65
|
import '../utils/transitionEndListener.js';
|
|
66
66
|
import '../utils/triggerBrowserReflow.js';
|
|
67
67
|
import './Hero/HeroCard.js';
|
|
68
|
-
import '../VideoPlayer-
|
|
68
|
+
import '../VideoPlayer-a5fa87ce.js';
|
|
69
69
|
import '../utils/hoursMinutesSeconds.js';
|
|
70
70
|
import 'screenfull';
|
|
71
71
|
import '@ilo-org/icons-react';
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
set exports(v){ propTypesExports = v; },
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
var reactIsExports = {};
|
|
8
|
-
var reactIs = {
|
|
9
|
-
get exports(){ return reactIsExports; },
|
|
10
|
-
set exports(v){ reactIsExports = v; },
|
|
11
|
-
};
|
|
1
|
+
var propTypes = {exports: {}};
|
|
2
|
+
|
|
3
|
+
var reactIs = {exports: {}};
|
|
12
4
|
|
|
13
5
|
var reactIs_production_min = {};
|
|
14
6
|
|
|
@@ -227,7 +219,7 @@ function requireReactIs_development () {
|
|
|
227
219
|
var hasRequiredReactIs;
|
|
228
220
|
|
|
229
221
|
function requireReactIs () {
|
|
230
|
-
if (hasRequiredReactIs) return
|
|
222
|
+
if (hasRequiredReactIs) return reactIs.exports;
|
|
231
223
|
hasRequiredReactIs = 1;
|
|
232
224
|
(function (module) {
|
|
233
225
|
|
|
@@ -237,7 +229,7 @@ function requireReactIs () {
|
|
|
237
229
|
module.exports = requireReactIs_development();
|
|
238
230
|
}
|
|
239
231
|
} (reactIs));
|
|
240
|
-
return
|
|
232
|
+
return reactIs.exports;
|
|
241
233
|
}
|
|
242
234
|
|
|
243
235
|
/*
|
|
@@ -358,16 +350,6 @@ function requireReactPropTypesSecret () {
|
|
|
358
350
|
return ReactPropTypesSecret_1;
|
|
359
351
|
}
|
|
360
352
|
|
|
361
|
-
var has;
|
|
362
|
-
var hasRequiredHas;
|
|
363
|
-
|
|
364
|
-
function requireHas () {
|
|
365
|
-
if (hasRequiredHas) return has;
|
|
366
|
-
hasRequiredHas = 1;
|
|
367
|
-
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
368
|
-
return has;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
353
|
/**
|
|
372
354
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
373
355
|
*
|
|
@@ -387,7 +369,7 @@ function requireCheckPropTypes () {
|
|
|
387
369
|
if (process.env.NODE_ENV !== 'production') {
|
|
388
370
|
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
389
371
|
var loggedTypeFailures = {};
|
|
390
|
-
var has =
|
|
372
|
+
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
391
373
|
|
|
392
374
|
printWarning = function(text) {
|
|
393
375
|
var message = 'Warning: ' + text;
|
|
@@ -399,7 +381,7 @@ function requireCheckPropTypes () {
|
|
|
399
381
|
// This error was thrown as a convenience so that you can use this stack
|
|
400
382
|
// to find the callsite that caused this warning to fire.
|
|
401
383
|
throw new Error(message);
|
|
402
|
-
} catch (x) {
|
|
384
|
+
} catch (x) {}
|
|
403
385
|
};
|
|
404
386
|
}
|
|
405
387
|
|
|
@@ -428,8 +410,7 @@ function requireCheckPropTypes () {
|
|
|
428
410
|
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
429
411
|
var err = Error(
|
|
430
412
|
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
431
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
432
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
413
|
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
433
414
|
);
|
|
434
415
|
err.name = 'Invariant Violation';
|
|
435
416
|
throw err;
|
|
@@ -497,9 +478,9 @@ function requireFactoryWithTypeCheckers () {
|
|
|
497
478
|
var assign = requireObjectAssign();
|
|
498
479
|
|
|
499
480
|
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
500
|
-
var has = requireHas();
|
|
501
481
|
var checkPropTypes = requireCheckPropTypes();
|
|
502
482
|
|
|
483
|
+
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
503
484
|
var printWarning = function() {};
|
|
504
485
|
|
|
505
486
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -600,7 +581,6 @@ function requireFactoryWithTypeCheckers () {
|
|
|
600
581
|
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
601
582
|
var ReactPropTypes = {
|
|
602
583
|
array: createPrimitiveTypeChecker('array'),
|
|
603
|
-
bigint: createPrimitiveTypeChecker('bigint'),
|
|
604
584
|
bool: createPrimitiveTypeChecker('boolean'),
|
|
605
585
|
func: createPrimitiveTypeChecker('function'),
|
|
606
586
|
number: createPrimitiveTypeChecker('number'),
|
|
@@ -646,9 +626,8 @@ function requireFactoryWithTypeCheckers () {
|
|
|
646
626
|
* is prohibitively expensive if they are created too often, such as what
|
|
647
627
|
* happens in oneOfType() for any type before the one that matched.
|
|
648
628
|
*/
|
|
649
|
-
function PropTypeError(message
|
|
629
|
+
function PropTypeError(message) {
|
|
650
630
|
this.message = message;
|
|
651
|
-
this.data = data && typeof data === 'object' ? data: {};
|
|
652
631
|
this.stack = '';
|
|
653
632
|
}
|
|
654
633
|
// Make `instanceof Error` still work for returned errors.
|
|
@@ -683,7 +662,7 @@ function requireFactoryWithTypeCheckers () {
|
|
|
683
662
|
) {
|
|
684
663
|
printWarning(
|
|
685
664
|
'You are manually calling a React.PropTypes validation ' +
|
|
686
|
-
'function for the `' + propFullName + '` prop on `' + componentName
|
|
665
|
+
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
687
666
|
'and will throw in the standalone `prop-types` package. ' +
|
|
688
667
|
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
689
668
|
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
@@ -722,10 +701,7 @@ function requireFactoryWithTypeCheckers () {
|
|
|
722
701
|
// 'of type `object`'.
|
|
723
702
|
var preciseType = getPreciseType(propValue);
|
|
724
703
|
|
|
725
|
-
return new PropTypeError(
|
|
726
|
-
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
727
|
-
{expectedType: expectedType}
|
|
728
|
-
);
|
|
704
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
|
729
705
|
}
|
|
730
706
|
return null;
|
|
731
707
|
}
|
|
@@ -869,19 +845,14 @@ function requireFactoryWithTypeCheckers () {
|
|
|
869
845
|
}
|
|
870
846
|
|
|
871
847
|
function validate(props, propName, componentName, location, propFullName) {
|
|
872
|
-
var expectedTypes = [];
|
|
873
848
|
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
874
849
|
var checker = arrayOfTypeCheckers[i];
|
|
875
|
-
|
|
876
|
-
if (checkerResult == null) {
|
|
850
|
+
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
|
877
851
|
return null;
|
|
878
852
|
}
|
|
879
|
-
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
880
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
881
|
-
}
|
|
882
853
|
}
|
|
883
|
-
|
|
884
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '
|
|
854
|
+
|
|
855
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
|
885
856
|
}
|
|
886
857
|
return createChainableTypeChecker(validate);
|
|
887
858
|
}
|
|
@@ -896,13 +867,6 @@ function requireFactoryWithTypeCheckers () {
|
|
|
896
867
|
return createChainableTypeChecker(validate);
|
|
897
868
|
}
|
|
898
869
|
|
|
899
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
900
|
-
return new PropTypeError(
|
|
901
|
-
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
902
|
-
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
903
|
-
);
|
|
904
|
-
}
|
|
905
|
-
|
|
906
870
|
function createShapeTypeChecker(shapeTypes) {
|
|
907
871
|
function validate(props, propName, componentName, location, propFullName) {
|
|
908
872
|
var propValue = props[propName];
|
|
@@ -912,8 +876,8 @@ function requireFactoryWithTypeCheckers () {
|
|
|
912
876
|
}
|
|
913
877
|
for (var key in shapeTypes) {
|
|
914
878
|
var checker = shapeTypes[key];
|
|
915
|
-
if (
|
|
916
|
-
|
|
879
|
+
if (!checker) {
|
|
880
|
+
continue;
|
|
917
881
|
}
|
|
918
882
|
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
919
883
|
if (error) {
|
|
@@ -932,18 +896,16 @@ function requireFactoryWithTypeCheckers () {
|
|
|
932
896
|
if (propType !== 'object') {
|
|
933
897
|
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
934
898
|
}
|
|
935
|
-
// We need to check all keys in case some are required but missing from
|
|
899
|
+
// We need to check all keys in case some are required but missing from
|
|
900
|
+
// props.
|
|
936
901
|
var allKeys = assign({}, props[propName], shapeTypes);
|
|
937
902
|
for (var key in allKeys) {
|
|
938
903
|
var checker = shapeTypes[key];
|
|
939
|
-
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
940
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
941
|
-
}
|
|
942
904
|
if (!checker) {
|
|
943
905
|
return new PropTypeError(
|
|
944
906
|
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
945
907
|
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
946
|
-
'\nValid keys: ' +
|
|
908
|
+
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
947
909
|
);
|
|
948
910
|
}
|
|
949
911
|
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
@@ -1137,7 +1099,6 @@ function requireFactoryWithThrowingShims () {
|
|
|
1137
1099
|
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1138
1100
|
var ReactPropTypes = {
|
|
1139
1101
|
array: shim,
|
|
1140
|
-
bigint: shim,
|
|
1141
1102
|
bool: shim,
|
|
1142
1103
|
func: shim,
|
|
1143
1104
|
number: shim,
|
|
@@ -1188,4 +1149,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1188
1149
|
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
1189
1150
|
}
|
|
1190
1151
|
|
|
1191
|
-
export {
|
|
1152
|
+
export { propTypes as p };
|
package/lib/esm/index.js
CHANGED
|
@@ -24,7 +24,7 @@ export { default as Notification } from './components/Notification/Notification.
|
|
|
24
24
|
export { default as ReadMore } from './components/ReadMore/ReadMore.js';
|
|
25
25
|
export { default as Textarea } from './components/Textarea/Textarea.js';
|
|
26
26
|
export { default as Callout } from './components/Callout/Callout.js';
|
|
27
|
-
import './Callout.
|
|
27
|
+
import './components/Callout/index.js';
|
|
28
28
|
export { default as Credit } from './components/Credit/Credit.js';
|
|
29
29
|
export { default as FileUpload } from './components/FileUpload/FileUpload.js';
|
|
30
30
|
export { default as Heading } from './components/Heading/Heading.js';
|
|
@@ -57,17 +57,17 @@ import './hooks/useGlobalSettings.js';
|
|
|
57
57
|
import './AccordionCtx-8c051900.js';
|
|
58
58
|
import '@ilo-org/utils';
|
|
59
59
|
import './utils/checkArrayDuplicates.js';
|
|
60
|
-
import './index-
|
|
60
|
+
import './index-623ce3f5.js';
|
|
61
61
|
import 'react-dom';
|
|
62
62
|
import './utils/createChainedFunction.js';
|
|
63
63
|
import './utils/getDefaultDimensionValue.js';
|
|
64
64
|
import './css-7414f50b.js';
|
|
65
65
|
import './utils/transitionEndListener.js';
|
|
66
66
|
import './utils/triggerBrowserReflow.js';
|
|
67
|
+
import '@ilo-org/icons-react';
|
|
67
68
|
import './components/Hero/HeroCard.js';
|
|
68
|
-
import './VideoPlayer-
|
|
69
|
+
import './VideoPlayer-a5fa87ce.js';
|
|
69
70
|
import './utils/hoursMinutesSeconds.js';
|
|
70
71
|
import 'screenfull';
|
|
71
|
-
import '@ilo-org/icons-react';
|
|
72
72
|
import './components/Logo/Logo.js';
|
|
73
73
|
import './components/List/ListItem.js';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from "react";
|
|
2
2
|
import { InputProps } from "../Input/Input.props";
|
|
3
3
|
import { TextareaProps } from "../Textarea/Textarea.props";
|
|
4
|
-
export
|
|
5
|
-
}
|
|
4
|
+
export type FieldsetChild = ReactElement<InputProps | TextareaProps>;
|
|
6
5
|
export interface FieldsetProps {
|
|
7
6
|
/**
|
|
8
7
|
* Specify the content of your Fieldset.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ilo-org/react",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "React components for the ILO's Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui_patterns",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"react-transition-group": "^4.4.1",
|
|
75
75
|
"@ilo-org/brand-assets": "0.1.0",
|
|
76
76
|
"@ilo-org/fonts": "0.1.0",
|
|
77
|
-
"@ilo-org/icons-react": "0.0.
|
|
78
|
-
"@ilo-org/styles": "0.3.
|
|
77
|
+
"@ilo-org/icons-react": "0.0.19",
|
|
78
|
+
"@ilo-org/styles": "0.3.2",
|
|
79
79
|
"@ilo-org/themes": "0.1.15",
|
|
80
80
|
"@ilo-org/utils": "0.0.11"
|
|
81
81
|
},
|
|
@@ -83,42 +83,38 @@
|
|
|
83
83
|
"@rollup/plugin-commonjs": "^23.0.2",
|
|
84
84
|
"@rollup/plugin-json": "^5.0.1",
|
|
85
85
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
86
|
-
"@storybook/addon-a11y": "^7.0.
|
|
87
|
-
"@storybook/addon-actions": "^7.0.
|
|
88
|
-
"@storybook/addon-docs": "^7.0.
|
|
89
|
-
"@storybook/addon-essentials": "^7.0.
|
|
90
|
-
"@storybook/addon-links": "^7.0.
|
|
91
|
-
"@storybook/addon-
|
|
92
|
-
"@storybook/blocks": "^7.0.
|
|
93
|
-
"@storybook/builder-
|
|
94
|
-
"@storybook/client-api": "^7.0.
|
|
95
|
-
"@storybook/manager-api": "^7.0.
|
|
96
|
-
"@storybook/
|
|
97
|
-
"@storybook/node-logger": "^7.0.6",
|
|
98
|
-
"@storybook/preset-create-react-app": "7.0.6",
|
|
86
|
+
"@storybook/addon-a11y": "^7.0.18",
|
|
87
|
+
"@storybook/addon-actions": "^7.0.18",
|
|
88
|
+
"@storybook/addon-docs": "^7.0.18",
|
|
89
|
+
"@storybook/addon-essentials": "^7.0.18",
|
|
90
|
+
"@storybook/addon-links": "^7.0.18",
|
|
91
|
+
"@storybook/addon-styling": "^1.0.8",
|
|
92
|
+
"@storybook/blocks": "^7.0.18",
|
|
93
|
+
"@storybook/builder-vite": "^7.0.18",
|
|
94
|
+
"@storybook/client-api": "^7.0.18",
|
|
95
|
+
"@storybook/manager-api": "^7.0.18",
|
|
96
|
+
"@storybook/node-logger": "^7.0.18",
|
|
99
97
|
"@storybook/preset-scss": "^1.0.3",
|
|
100
|
-
"@storybook/react": "^7.0.
|
|
101
|
-
"@storybook/react-
|
|
102
|
-
"@storybook/
|
|
103
|
-
"@
|
|
104
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
98
|
+
"@storybook/react": "^7.0.18",
|
|
99
|
+
"@storybook/react-vite": "^7.0.18",
|
|
100
|
+
"@storybook/theming": "^7.0.18",
|
|
101
|
+
"@testing-library/jest-dom": "5.16.5",
|
|
105
102
|
"@testing-library/react": "^12.1.2",
|
|
106
103
|
"@testing-library/user-event": "^13.5.0",
|
|
107
104
|
"@types/jest": "^27.4.1",
|
|
108
105
|
"@types/mdx": "^2.0.3",
|
|
109
|
-
"@types/node": "^17.0.
|
|
110
|
-
"@types/react": "17.0.11",
|
|
111
|
-
"@types/react-dom": "^17.0.
|
|
106
|
+
"@types/node": "^17.0.45",
|
|
107
|
+
"@types/react": "^17.0.11",
|
|
108
|
+
"@types/react-dom": "^17.0.20",
|
|
112
109
|
"http-server": "^14.1.0",
|
|
113
110
|
"identity-obj-proxy": "^3.0.0",
|
|
114
|
-
"jest-environment-jsdom": "
|
|
111
|
+
"jest-environment-jsdom": "27.5.1",
|
|
115
112
|
"nodemon": "^2.0.20",
|
|
116
113
|
"react": "17.0.2",
|
|
117
114
|
"react-dom": "17.0.2",
|
|
118
115
|
"react-element-to-jsx-string": "^15.0.0",
|
|
119
|
-
"react-scripts": "5.0.1",
|
|
116
|
+
"react-scripts": "^5.0.1",
|
|
120
117
|
"remark-gfm": "^3.0.1",
|
|
121
|
-
"rollup": "^3.9.0",
|
|
122
118
|
"rollup-plugin-copy": "^3.4.0",
|
|
123
119
|
"rollup-plugin-delete": "^2.0.0",
|
|
124
120
|
"rollup-plugin-livereload": "^2.0.5",
|
|
@@ -126,16 +122,14 @@
|
|
|
126
122
|
"rollup-plugin-mv": "^0.0.2",
|
|
127
123
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
128
124
|
"rollup-plugin-typescript2": "^0.34.1",
|
|
129
|
-
"sass": "^1.49.9",
|
|
130
125
|
"screenfull": "^5.2.0",
|
|
131
|
-
"storybook": "
|
|
132
|
-
"storybook-addon-performance": "^0.
|
|
126
|
+
"storybook": "^7.0.18",
|
|
127
|
+
"storybook-addon-performance": "^0.17.1",
|
|
133
128
|
"ts-dedent": "^2.2.0",
|
|
134
129
|
"ts-jest": "^27.1.3",
|
|
135
130
|
"tslib": "^2.3.1",
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"@ilo-org/eslint-config": "0.0.3",
|
|
131
|
+
"vite": "^4.3.9",
|
|
132
|
+
"@ilo-org/eslint-config": "0.1.0",
|
|
139
133
|
"@ilo-org/prettier-config": "0.0.2",
|
|
140
134
|
"@ilo-org/typescript-config": "0.0.1"
|
|
141
135
|
},
|
|
@@ -154,8 +148,8 @@
|
|
|
154
148
|
"dev:lib": "rollup --config --configDevelop -w",
|
|
155
149
|
"format": "prettier --check . --ignore-path ../../.prettierignore",
|
|
156
150
|
"format:fix": "prettier --write . --ignore-path ../../.prettierignore",
|
|
157
|
-
"lint": "eslint .
|
|
158
|
-
"lint:fix": "
|
|
151
|
+
"lint": "eslint .",
|
|
152
|
+
"lint:fix": "eslint . --fix",
|
|
159
153
|
"storybook": "storybook dev -p 6006",
|
|
160
154
|
"storybook:static": "http-server ./storybook-static",
|
|
161
155
|
"test": "NODE_OPTIONS=--experimental-vm-modules SKIP_PREFLIGHT_CHECK=true react-scripts test --watchAll=false --setupFilesAfterEnv ./src/setup.ts"
|