@uncinc/uncinc-react-kitchen-sink 2.16.12 → 2.16.14

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.
@@ -39,6 +39,8 @@ var CookieCompliancePopup = function CookieCompliancePopup(props) {
39
39
  acceptAllText = _props$acceptAllText === void 0 ? t('cookies.acceptAll') : _props$acceptAllText,
40
40
  _props$acceptSelectio = props.acceptSelectionText,
41
41
  acceptSelectionText = _props$acceptSelectio === void 0 ? t('cookies.acceptSelection') : _props$acceptSelectio,
42
+ _props$acceptAllSelec = props.acceptAllSelectionsText,
43
+ acceptAllSelectionsText = _props$acceptAllSelec === void 0 ? t(['cookies.acceptAllSelections', 'cookies.acceptAll']) : _props$acceptAllSelec,
42
44
  _props$onlyNecessaryT = props.onlyNecessaryText,
43
45
  onlyNecessaryText = _props$onlyNecessaryT === void 0 ? t('cookies.acceptOnlyNecessary') : _props$onlyNecessaryT,
44
46
  _props$cookieContents = props.cookieContentsShowMore,
@@ -47,6 +49,8 @@ var CookieCompliancePopup = function CookieCompliancePopup(props) {
47
49
  cookieContentsShowLess = _props$cookieContents2 === void 0 ? /*#__PURE__*/React.createElement("div", null, t('cookies.hideDetails')) : _props$cookieContents2,
48
50
  _props$showAcceptOnly = props.showAcceptOnlyNeeded,
49
51
  showAcceptOnlyNeeded = _props$showAcceptOnly === void 0 ? true : _props$showAcceptOnly,
52
+ _props$showAcceptOnly2 = props.showAcceptOnlyNeededSelections,
53
+ showAcceptOnlyNeededSelections = _props$showAcceptOnly2 === void 0 ? false : _props$showAcceptOnly2,
50
54
  _props$onAgree = props.onAgree,
51
55
  onAgree = _props$onAgree === void 0 ? function () {} : _props$onAgree,
52
56
  _props$cookieLevels = props.cookieLevels,
@@ -341,11 +345,16 @@ var CookieCompliancePopup = function CookieCompliancePopup(props) {
341
345
  className: "Button--cta",
342
346
  primary: true,
343
347
  onClick: onConsent(false)
344
- }, acceptSelectionText), /*#__PURE__*/React.createElement(Button, {
348
+ }, acceptSelectionText), showAcceptOnlyNeededSelections && /*#__PURE__*/React.createElement(Button, {
349
+ id: "only-necessary-agree-selections",
350
+ className: "Button--cta",
351
+ inverted: necessaryButtonInverted,
352
+ onClick: onConsent(true)
353
+ }, onlyNecessaryText), /*#__PURE__*/React.createElement(Button, {
345
354
  className: "Button--cta",
346
355
  inverted: necessaryButtonInverted,
347
356
  onClick: onConsentAll
348
- }, acceptAllText))))));
357
+ }, acceptAllSelectionsText))))));
349
358
  };
350
359
 
351
360
  /**
@@ -51,6 +51,7 @@ export interface CookieCompliancePopupProps {
51
51
  children?: any;
52
52
  acceptAllText?: string;
53
53
  acceptSelectionText?: string;
54
+ acceptAllSelectionsText?: string;
54
55
  onlyNecessaryText?: string;
55
56
  title?: string;
56
57
  cookieContentsShowMore?: string;
@@ -59,6 +60,7 @@ export interface CookieCompliancePopupProps {
59
60
  manualHeader?: string;
60
61
  onAgree?: Function;
61
62
  showAcceptOnlyNeeded?: boolean;
63
+ showAcceptOnlyNeededSelections?: boolean;
62
64
  manualButtonClassname?: string;
63
65
  necessaryButtonInverted?: boolean;
64
66
  cookieLevels?: Array<CookieLevel>;
@@ -24,6 +24,8 @@ var MediaPlayer = function MediaPlayer(_ref) {
24
24
  notSupportedMessage = _ref.notSupportedMessage,
25
25
  className = _ref.className,
26
26
  onPlay = _ref.onPlay,
27
+ _ref$autoPlay = _ref.autoPlay,
28
+ autoPlay = _ref$autoPlay === void 0 ? false : _ref$autoPlay,
27
29
  onPause = _ref.onPause,
28
30
  onEnded = _ref.onEnded,
29
31
  onSeeking = _ref.onSeeking,
@@ -77,6 +79,7 @@ var MediaPlayer = function MediaPlayer(_ref) {
77
79
  techOrder: ['html5', 'youtube', 'vimeo'],
78
80
  poster: posterUrl,
79
81
  controlBar: controlBar,
82
+ autoplay: autoPlay,
80
83
  sources: [{
81
84
  src: src,
82
85
  type: type
@@ -92,10 +95,14 @@ var MediaPlayer = function MediaPlayer(_ref) {
92
95
  // Passing down the VideoJS events.
93
96
  useEffect(function () {
94
97
  if (ready) {
95
- if (onPlay) {
98
+ if (autoPlay && onPlay) {
96
99
  player.one('play', function (event) {
97
100
  return onPlay(player, event);
98
101
  });
102
+ } else if (!autoPlay && onPlay) {
103
+ player.on('play', function (event) {
104
+ return onPlay(player, event);
105
+ });
99
106
  }
100
107
  if (onPause) {
101
108
  player.one('pause', function (event) {
@@ -13,6 +13,7 @@ export type MediaPlayerProps = {
13
13
  options?: VideoJsPlayerOptions;
14
14
  captions?: VideoJsPlayerOptions['tracks'];
15
15
  audioOnly?: boolean;
16
+ autoPlay?: boolean;
16
17
  notSupportedMessage?: string;
17
18
  className?: string;
18
19
  onPlay?: (player: NativeVideoJsPlayer, event: EventTarget) => void;
@@ -15,7 +15,7 @@ export default function useDialogHelpers<T extends HTMLElement>(options: UseDial
15
15
  readonly id: string;
16
16
  readonly labelId: string;
17
17
  readonly dialogHelpersProps: {
18
- 'aria-role': string;
18
+ role: string;
19
19
  'aria-labelledby': string;
20
20
  };
21
21
  };
@@ -73,7 +73,7 @@ export default function useDialogHelpers(options) {
73
73
  */
74
74
  var labelId = "".concat(id, "-label");
75
75
  var dialogHelpersProps = {
76
- 'aria-role': 'dialog',
76
+ role: 'dialog',
77
77
  'aria-labelledby': labelId
78
78
  };
79
79
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uncinc/uncinc-react-kitchen-sink",
3
- "version": "2.16.12",
3
+ "version": "2.16.14",
4
4
  "description": "Default React components that are easily extended.",
5
5
  "author": "uncinc",
6
6
  "license": "MIT",