@atlaskit/flag 14.4.1 → 14.5.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/__perf__/withFlagGroup.tsx +7 -1
  3. package/dist/cjs/auto-dismiss-flag.js +4 -4
  4. package/dist/cjs/flag-actions.js +50 -6
  5. package/dist/cjs/flag-group.js +57 -19
  6. package/dist/cjs/flag-provider.js +6 -4
  7. package/dist/cjs/flag.js +85 -107
  8. package/dist/cjs/index.js +12 -12
  9. package/dist/cjs/internal/description.js +32 -0
  10. package/dist/cjs/internal/dismiss-button.js +83 -0
  11. package/dist/cjs/{expander.js → internal/expander.js} +15 -7
  12. package/dist/cjs/internal/index.js +39 -0
  13. package/dist/cjs/internal/title.js +32 -0
  14. package/dist/cjs/theme.js +84 -60
  15. package/dist/cjs/version.json +1 -1
  16. package/dist/es2019/auto-dismiss-flag.js +2 -3
  17. package/dist/es2019/flag-actions.js +50 -32
  18. package/dist/es2019/flag-group.js +48 -65
  19. package/dist/es2019/flag.js +77 -162
  20. package/dist/es2019/internal/description.js +22 -0
  21. package/dist/es2019/internal/dismiss-button.js +63 -0
  22. package/dist/es2019/{expander.js → internal/expander.js} +14 -10
  23. package/dist/es2019/internal/index.js +4 -0
  24. package/dist/es2019/internal/title.js +22 -0
  25. package/dist/es2019/theme.js +78 -53
  26. package/dist/es2019/version.json +1 -1
  27. package/dist/esm/auto-dismiss-flag.js +2 -3
  28. package/dist/esm/flag-actions.js +49 -6
  29. package/dist/esm/flag-group.js +52 -16
  30. package/dist/esm/flag-provider.js +4 -3
  31. package/dist/esm/flag.js +81 -102
  32. package/dist/esm/internal/description.js +23 -0
  33. package/dist/esm/internal/dismiss-button.js +63 -0
  34. package/dist/esm/{expander.js → internal/expander.js} +14 -5
  35. package/dist/esm/internal/index.js +4 -0
  36. package/dist/esm/internal/title.js +23 -0
  37. package/dist/esm/theme.js +80 -53
  38. package/dist/esm/version.json +1 -1
  39. package/dist/types/auto-dismiss-flag.d.ts +1 -0
  40. package/dist/types/flag-actions.d.ts +4 -4
  41. package/dist/types/flag-group.d.ts +2 -2
  42. package/dist/types/flag.d.ts +2 -1
  43. package/dist/types/internal/description.d.ts +7 -0
  44. package/dist/types/internal/dismiss-button.d.ts +11 -0
  45. package/dist/types/internal/expander.d.ts +8 -0
  46. package/dist/types/internal/index.d.ts +4 -0
  47. package/dist/types/internal/title.d.ts +6 -0
  48. package/dist/types/theme.d.ts +2 -1
  49. package/package.json +14 -10
  50. package/dist/types/expander.d.ts +0 -9
  51. package/expander/package.json +0 -7
@@ -1,118 +1,143 @@
1
- import * as colors from '@atlaskit/theme/colors';
1
+ import { B100, B400, DN40, DN50, DN600, G300, G400, N0, N200, N30A, N40, N500, N50A, N60A, N700, R300, R400, Y200, Y300 } from '@atlaskit/theme/colors';
2
2
  const flagBackgroundColor = {
3
3
  error: {
4
- light: colors.R400,
5
- dark: colors.R300
4
+ light: `var(--ds-surface-overlay, ${R400})`,
5
+ dark: `var(--ds-surface-overlay, ${R300})`
6
6
  },
7
7
  info: {
8
- light: colors.N500,
9
- dark: colors.N500
8
+ light: `var(--ds-surface-overlay, ${N500})`,
9
+ dark: `var(--ds-surface-overlay, ${N500})`
10
10
  },
11
11
  normal: {
12
- light: colors.N0,
13
- dark: colors.DN50
12
+ light: `var(--ds-surface-overlay, ${N0})`,
13
+ dark: `var(--ds-surface-overlay, ${DN50})`
14
14
  },
15
15
  success: {
16
- light: colors.G400,
17
- dark: colors.G300
16
+ light: `var(--ds-surface-overlay, ${G400})`,
17
+ dark: `var(--ds-surface-overlay, ${G300})`
18
18
  },
19
19
  warning: {
20
- light: colors.Y200,
21
- dark: colors.Y300
20
+ light: `var(--ds-surface-overlay, ${Y200})`,
21
+ dark: `var(--ds-surface-overlay, ${Y300})`
22
22
  }
23
23
  };
24
24
  export const getFlagBackgroundColor = (appearance, mode) => flagBackgroundColor[appearance][mode];
25
- export const flagBorderColor = colors.N60A;
25
+ export const flagBorderColor = `var(--ds-surface-overlay, ${N60A})`;
26
+ const flagIconColor = {
27
+ error: {
28
+ light: `var(--ds-icon-danger, ${N0})`,
29
+ dark: `var(--ds-icon-danger, ${DN40})`
30
+ },
31
+ info: {
32
+ light: `var(--ds-icon-discovery, ${N0})`,
33
+ dark: `var(--ds-icon-discovery, ${DN600})`
34
+ },
35
+ normal: {
36
+ light: `var(--ds-icon-brand, ${N500})`,
37
+ dark: `var(--ds-icon-brand, ${DN600})`
38
+ },
39
+ success: {
40
+ light: `var(--ds-icon-success, ${N0})`,
41
+ dark: `var(--ds-icon-success, ${DN40})`
42
+ },
43
+ warning: {
44
+ light: `var(--ds-icon-warning, ${N700})`,
45
+ dark: `var(--ds-icon-warning, ${DN40})`
46
+ }
47
+ };
26
48
  const flagTextColor = {
27
49
  error: {
28
- light: colors.N0,
29
- dark: colors.DN40
50
+ light: `var(--ds-text, ${N0})`,
51
+ dark: `var(--ds-text, ${DN40})`
30
52
  },
31
53
  info: {
32
- light: colors.N0,
33
- dark: colors.DN600
54
+ light: `var(--ds-text, ${N0})`,
55
+ dark: `var(--ds-text, ${DN600})`
34
56
  },
35
57
  normal: {
36
- light: colors.N500,
37
- dark: colors.DN600
58
+ light: `var(--ds-text, ${N500})`,
59
+ dark: `var(--ds-text, ${DN600})`
38
60
  },
39
61
  success: {
40
- light: colors.N0,
41
- dark: colors.DN40
62
+ light: `var(--ds-text, ${N0})`,
63
+ dark: `var(--ds-text, ${DN40})`
42
64
  },
43
65
  warning: {
44
- light: colors.N700,
45
- dark: colors.DN40
66
+ light: `var(--ds-text, ${N700})`,
67
+ dark: `var(--ds-text, ${DN40})`
46
68
  }
47
69
  };
48
70
  export const getFlagTextColor = (appearance, mode) => flagTextColor[appearance][mode];
49
- export const flagShadowColor = colors.N50A;
71
+ export const getFlagIconColor = (appearance, mode) => flagIconColor[appearance][mode]; // token set in flag.tsx instead
72
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
73
+
74
+ export const flagShadowColor = N50A;
50
75
  const flagFocusRingColor = {
51
76
  error: {
52
- light: colors.N40,
53
- dark: colors.N40
77
+ light: `var(--ds-border-focused, ${N40})`,
78
+ dark: `var(--ds-border-focused, ${N40})`
54
79
  },
55
80
  info: {
56
- light: colors.N40,
57
- dark: colors.N40
81
+ light: `var(--ds-border-focused, ${N40})`,
82
+ dark: `var(--ds-border-focused, ${N40})`
58
83
  },
59
84
  normal: {
60
- light: colors.B100,
61
- dark: colors.B100
85
+ light: `var(--ds-border-focused, ${B100})`,
86
+ dark: `var(--ds-border-focused, ${B100})`
62
87
  },
63
88
  success: {
64
- light: colors.N40,
65
- dark: colors.N40
89
+ light: `var(--ds-border-focused, ${N40})`,
90
+ dark: `var(--ds-border-focused, ${N40})`
66
91
  },
67
92
  warning: {
68
- light: colors.N200,
69
- dark: colors.N200
93
+ light: `var(--ds-border-focused, ${N200})`,
94
+ dark: `var(--ds-border-focused, ${N200})`
70
95
  }
71
96
  };
72
97
  export const getFlagFocusRingColor = (appearance, mode) => flagFocusRingColor[appearance][mode];
73
98
  const lightButtonBackground = 'rgba(255, 255, 255, 0.08)';
74
99
  const actionBackground = {
75
100
  success: {
76
- light: lightButtonBackground,
77
- dark: colors.N30A
101
+ light: `var(--ds-background-neutral, ${lightButtonBackground})`,
102
+ dark: `var(--ds-background-neutral, ${N30A})`
78
103
  },
79
104
  info: {
80
- light: lightButtonBackground,
81
- dark: lightButtonBackground
105
+ light: `var(--ds-background-neutral, ${lightButtonBackground})`,
106
+ dark: `var(--ds-background-neutral, ${lightButtonBackground})`
82
107
  },
83
108
  error: {
84
- light: lightButtonBackground,
85
- dark: colors.N30A
109
+ light: `var(--ds-background-neutral, ${lightButtonBackground})`,
110
+ dark: `var(--ds-background-neutral, ${N30A})`
86
111
  },
87
112
  warning: {
88
- light: colors.N30A,
89
- dark: colors.N30A
113
+ light: `var(--ds-background-neutral, ${N30A})`,
114
+ dark: `var(--ds-background-neutral, ${N30A})`
90
115
  },
91
116
  normal: {
92
- light: 'none',
93
- dark: 'none'
117
+ light: "var(--ds-background-neutral, none)",
118
+ dark: "var(--ds-background-neutral, none)"
94
119
  }
95
120
  };
96
121
  const actionColor = {
97
122
  success: {
98
- light: colors.N0,
99
- dark: colors.DN40
123
+ light: `var(--ds-text-subtle, ${N0})`,
124
+ dark: `var(--ds-text-subtle, ${DN40})`
100
125
  },
101
126
  info: {
102
- light: colors.N0,
103
- dark: colors.DN600
127
+ light: `var(--ds-text-subtle, ${N0})`,
128
+ dark: `var(--ds-text-subtle, ${DN600})`
104
129
  },
105
130
  error: {
106
- light: colors.N0,
107
- dark: colors.DN600
131
+ light: `var(--ds-text-subtle, ${N0})`,
132
+ dark: `var(--ds-text-subtle, ${DN600})`
108
133
  },
109
134
  warning: {
110
- light: colors.N700,
111
- dark: colors.DN40
135
+ light: `var(--ds-text-subtle, ${N700})`,
136
+ dark: `var(--ds-text-subtle, ${DN40})`
112
137
  },
113
138
  normal: {
114
- light: colors.B400,
115
- dark: colors.B100
139
+ light: `var(--ds-text-subtle, ${B400})`,
140
+ dark: `var(--ds-text-subtle, ${B100})`
116
141
  }
117
142
  };
118
143
  export const getActionBackground = (appearance, mode) => actionBackground[appearance][mode];
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "14.4.1",
3
+ "version": "14.5.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,14 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useCallback, useEffect, useRef } from 'react';
3
3
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatformLeafEventHandler';
4
+ import noop from '@atlaskit/ds-lib/noop';
4
5
  import Flag from './flag';
5
6
  import { useFlagGroup } from './flag-group';
6
7
  var packageName = "@atlaskit/flag";
7
- var packageVersion = "14.4.1";
8
+ var packageVersion = "14.5.2";
8
9
  export var AUTO_DISMISS_SECONDS = 8;
9
10
 
10
- function noop() {}
11
-
12
11
  var AutoDismissFlag = function AutoDismissFlag(props) {
13
12
  var id = props.id,
14
13
  analyticsContext = props.analyticsContext,
@@ -1,6 +1,4 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
- var _templateObject, _templateObject2, _templateObject3;
1
+ /* eslint-disable @repo/internal/styles/no-nested-styles */
4
2
 
5
3
  /** @jsx jsx */
6
4
  import { css, jsx } from '@emotion/core';
@@ -11,6 +9,46 @@ import { getActionBackground, getActionColor, getFlagFocusRingColor } from './th
11
9
  var gridSize = getGridSize();
12
10
  var separatorWidth = gridSize * 2;
13
11
  var defaultAppearanceTranslate = gridSize / 4;
12
+ var separatorStyles = css({
13
+ display: 'inline-block',
14
+ width: separatorWidth,
15
+ textAlign: 'center'
16
+ });
17
+ var actionContainerStyles = css({
18
+ display: 'flex',
19
+ paddingTop: gridSize,
20
+ alignItems: 'center',
21
+ flexWrap: 'wrap',
22
+ transform: "translateX(-".concat(defaultAppearanceTranslate, "px)")
23
+ });
24
+ var boldActionContainerStyles = css({
25
+ transform: 0
26
+ });
27
+ var buttonStyles = css({
28
+ '&&, a&&': {
29
+ marginLeft: 0,
30
+ padding: "0 ".concat(gridSize, "px !important"),
31
+ background: "var(--bg-color)",
32
+ color: "var(--color) !important",
33
+ fontWeight: 500
34
+ },
35
+ '&&:focus, a&&:focus': {
36
+ boxShadow: "0 0 0 2px var(--focus-color)"
37
+ },
38
+ '&&:hover, &&:active, a&&:hover, a&&:active': {
39
+ textDecoration: 'underline'
40
+ }
41
+ });
42
+ var appeanceNormalButtonStyles = css({
43
+ '&&, a&&': {
44
+ padding: '0 !important'
45
+ }
46
+ });
47
+ var isBoldButtonStyles = css({
48
+ '&&, a&&': {
49
+ marginLeft: gridSize
50
+ }
51
+ });
14
52
 
15
53
  var FlagActions = function FlagActions(props) {
16
54
  var _props$appearance = props.appearance,
@@ -27,11 +65,11 @@ var FlagActions = function FlagActions(props) {
27
65
 
28
66
  var isBold = appearance !== DEFAULT_APPEARANCE;
29
67
  return jsx("div", {
30
- css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n padding-top: ", "px;\n transform: ", ";\n align-items: center;\n "])), gridSize, appearance === DEFAULT_APPEARANCE ? "translateX(-".concat(defaultAppearanceTranslate, "px)") : 0),
68
+ css: [actionContainerStyles, isBold && boldActionContainerStyles],
31
69
  "data-testid": testId && "".concat(testId, "-actions")
32
70
  }, actions.map(function (action, index) {
33
71
  return [index && !isBold ? jsx("div", {
34
- css: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n text-align: center;\n display: inline-block;\n width: ", "px;\n "])), separatorWidth),
72
+ css: separatorStyles,
35
73
  key: index + 0.5
36
74
  }, "\xB7") : '', jsx(Button, {
37
75
  onClick: action.onClick,
@@ -42,7 +80,12 @@ var FlagActions = function FlagActions(props) {
42
80
  spacing: "compact",
43
81
  testId: action.testId,
44
82
  key: index,
45
- css: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &&,\n a&& {\n margin-left: ", "px;\n font-weight: 500;\n padding: 0 ", "px !important;\n background: ", ";\n color: ", " !important;\n }\n &&:focus,\n a&&:focus {\n box-shadow: 0 0 0 2px ", ";\n }\n &&:hover,\n &&:active,\n a&&:hover,\n a&&:active {\n text-decoration: underline;\n }\n "])), index && isBold ? gridSize : 0, appearance === 'normal' ? 0 : gridSize, getActionBackground(appearance, mode), getActionColor(appearance, mode), getFlagFocusRingColor(appearance, mode))
83
+ style: {
84
+ '--color': getActionColor(appearance, mode),
85
+ '--bg-color': getActionBackground(appearance, mode),
86
+ '--focus-color': getFlagFocusRingColor(appearance, mode)
87
+ },
88
+ css: [buttonStyles, isBold && isBoldButtonStyles, appearance === 'normal' && appeanceNormalButtonStyles]
46
89
  }, action.content)];
47
90
  }));
48
91
  };
@@ -1,13 +1,12 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
2
  import _typeof from "@babel/runtime/helpers/typeof";
4
3
 
5
- var _templateObject, _templateObject2, _templateObject3;
6
-
7
4
  /** @jsx jsx */
8
5
  import { Children, createContext, useContext, useMemo } from 'react';
9
6
  import { css, jsx } from '@emotion/core';
10
7
  import { easeIn, ExitingPersistence, SlideIn } from '@atlaskit/motion';
8
+ import VisuallyHidden from '@atlaskit/visually-hidden';
9
+ import noop from '@atlaskit/ds-lib/noop';
11
10
  import Portal from '@atlaskit/portal';
12
11
  import { gridSize as getGridSize, layers } from '@atlaskit/theme/constants';
13
12
  var gridSize = getGridSize();
@@ -15,9 +14,6 @@ export var flagWidth = gridSize * 50;
15
14
  export var flagAnimationTime = 400;
16
15
  var flagBottom = gridSize * 6;
17
16
  var flagLeft = gridSize * 10;
18
-
19
- function noop() {}
20
-
21
17
  var defaultFlagGroupContext = {
22
18
  onDismissed: function onDismissed() {},
23
19
  isDismissAllowed: false
@@ -28,7 +24,51 @@ export function useFlagGroup() {
28
24
  } // transition: none is set on first-of-type to prevent a bug in Firefox
29
25
  // that causes a broken transition
30
26
 
31
- var baseStyles = "\n bottom: 0;\n position: absolute;\n width: ".concat(flagWidth, "px;\n transition: transform ").concat(flagAnimationTime, "ms ease-in-out;\n\n @media (max-width: 560px) {\n width: 100vw;\n }\n\n &:first-of-type {\n transition: none;\n transform: translate(0,0);\n }\n\n &:nth-of-type(n + 2) {\n animation-duration: 0ms;\n transform: translateX(0) translateY(100%) translateY(").concat(2 * gridSize, "px);\n }\n\n /* Layer the 'primary' flag above the 'secondary' flag */\n &:nth-of-type(1) {\n z-index: 5;\n }\n &:nth-of-type(2) {\n z-index: 4;\n }\n\n &:nth-of-type(n + 4) {\n visibility: hidden;\n }\n");
27
+ var baseStyles = css({
28
+ width: flagWidth,
29
+ position: 'absolute',
30
+ bottom: 0,
31
+ transition: "transform ".concat(flagAnimationTime, "ms ease-in-out"),
32
+ '@media (max-width: 560px)': {
33
+ width: '100vw'
34
+ },
35
+ ':first-of-type': {
36
+ transform: "translate(0,0)",
37
+ transition: 'none'
38
+ },
39
+ ':nth-of-type(n + 2)': {
40
+ animationDuration: '0ms',
41
+ transform: "translateX(0) translateY(100%) translateY(".concat(2 * gridSize, "px)")
42
+ },
43
+ ':nth-of-type(1)': {
44
+ zIndex: 5
45
+ },
46
+ ':nth-of-type(2)': {
47
+ zIndex: 4
48
+ },
49
+ '&:nth-of-type(n + 4)': {
50
+ visibility: 'hidden'
51
+ }
52
+ }); // Transform needed to push up while 1st flag is leaving
53
+ // Exiting time should match the exiting time of motion so is halved
54
+
55
+ var dismissAllowedStyles = css({
56
+ // eslint-disable-next-line @repo/internal/styles/no-nested-styles
57
+ '&& + *': {
58
+ transform: "translate(0, 0)",
59
+ transitionDuration: "".concat(flagAnimationTime / 2, "ms")
60
+ }
61
+ });
62
+ var flagGroupContainerStyles = css({
63
+ position: 'fixed',
64
+ zIndex: layers.flag(),
65
+ bottom: flagBottom,
66
+ left: flagLeft,
67
+ '@media (max-width: 560px)': {
68
+ bottom: 0,
69
+ left: 0
70
+ }
71
+ });
32
72
 
33
73
  var FlagGroup = function FlagGroup(props) {
34
74
  var id = props.id,
@@ -51,17 +91,15 @@ var FlagGroup = function FlagGroup(props) {
51
91
  return children && _typeof(children) === 'object' ? Children.map(children, function (flag, index) {
52
92
  var isDismissAllowed = index === 0;
53
93
  return jsx(SlideIn, {
54
- enterFrom: 'left',
55
- fade: 'inout',
94
+ enterFrom: "left",
95
+ fade: "inout",
56
96
  duration: flagAnimationTime,
57
97
  animationTimingFunction: function animationTimingFunction() {
58
98
  return easeIn;
59
99
  }
60
100
  }, function (props) {
61
101
  return jsx("div", _extends({}, props, {
62
- css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n "])), baseStyles, isDismissAllowed ? // Transform needed to push up while 1st flag is leaving
63
- // Exiting time should match the exiting time of motion so is halved
64
- "\n && + * {\n transform: translate(0, 0);\n transition-duration: ".concat(flagAnimationTime / 2, "ms\n }") : '')
102
+ css: [baseStyles, isDismissAllowed && dismissAllowedStyles]
65
103
  }), jsx(FlagGroupContext.Provider, {
66
104
  value: // Only the first flag should be able to be dismissed.
67
105
  isDismissAllowed ? dismissFlagContext : defaultFlagGroupContext
@@ -74,10 +112,8 @@ var FlagGroup = function FlagGroup(props) {
74
112
  zIndex: layers.flag()
75
113
  }, jsx("div", {
76
114
  id: id,
77
- css: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n bottom: ", "px;\n left: ", "px;\n position: fixed;\n z-index: ", ";\n @media (max-width: 560px) {\n bottom: 0;\n left: 0;\n }\n "])), flagBottom, flagLeft, layers.flag())
78
- }, hasFlags ? jsx(LabelTag, {
79
- css: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border: 0;\n clip: rect(1px, 1px, 1px, 1px);\n height: 1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n "])))
80
- }, label) : null, jsx(ExitingPersistence, {
115
+ css: flagGroupContainerStyles
116
+ }, hasFlags ? jsx(VisuallyHidden, null, jsx(LabelTag, null, label)) : null, jsx(ExitingPersistence, {
81
117
  appear: false
82
118
  }, renderChildren())));
83
119
  };
@@ -3,10 +3,11 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
4
4
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
6
+ var _excluded = ["isAutoDismiss"];
6
7
 
7
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
8
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
9
 
9
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
10
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
11
 
11
12
  import React, { useCallback, useContext, useMemo, useState } from 'react';
12
13
  import AutoDismissFlag from './auto-dismiss-flag';
@@ -79,7 +80,7 @@ export function FlagsProvider(_ref) {
79
80
  onDismissed: removeFlag
80
81
  }, flags.map(function (flag) {
81
82
  var isAutoDismiss = flag.isAutoDismiss,
82
- restProps = _objectWithoutProperties(flag, ["isAutoDismiss"]);
83
+ restProps = _objectWithoutProperties(flag, _excluded);
83
84
 
84
85
  var FlagType = isAutoDismiss ? AutoDismissFlag : Flag;
85
86
  return /*#__PURE__*/React.createElement(FlagType, _extends({}, restProps, {