@atlaskit/button 23.0.2 → 23.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/button
2
2
 
3
+ ## 23.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#139619](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139619)
8
+ [`fdd33e36655ab`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fdd33e36655ab) -
9
+ Fixed a regression where Link Buttons with `shouldFitContainer` were not expanding to fill the
10
+ full width of their container.
11
+
12
+ ## 23.0.3
13
+
14
+ ### Patch Changes
15
+
16
+ - [#136521](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/136521)
17
+ [`2954f5ca1bc29`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2954f5ca1bc29) -
18
+ Update dependencies.
19
+
3
20
  ## 23.0.2
4
21
 
5
22
  ### Patch Changes
@@ -14,6 +14,7 @@
14
14
  ._11fnglyw:after{pointer-events:none}
15
15
  ._18postnw:after{position:absolute}
16
16
  ._1bah1h6o{justify-content:center}
17
+ ._1bsb1osq{width:100%}
17
18
  ._1bsb1wug{width:auto}
18
19
  ._1e0c116y{display:inline-flex}
19
20
  ._1hmsagmp{text-decoration-line:none!important}
@@ -20,7 +20,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
20
  var _compiled = require("@atlaskit/primitives/compiled");
21
21
  var _content = _interopRequireDefault(require("../shared/content"));
22
22
  var _iconRenderer = _interopRequireDefault(require("../shared/icon-renderer"));
23
- var _excluded = ["analyticsContext", "appearance", "aria-label", "aria-labelledby", "autoFocus", "children", "href", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "spacing", "testId"],
23
+ var _excluded = ["analyticsContext", "appearance", "aria-label", "aria-labelledby", "autoFocus", "children", "href", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shouldFitContainer", "spacing", "testId"],
24
24
  _excluded2 = ["className", "css", "as", "style"];
25
25
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
26
26
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -30,7 +30,8 @@ var styles = {
30
30
  disabled: "_80om13gf _bfhksyzs _syaz1lh4 _aetrglyw _irr3syzs _30l31lh4 _1di6syzs _9h8h1lh4",
31
31
  spacingCompact: "_1rjcv77o _gy1p1b66 _4t3i1k8s _y4tiutpp _bozgutpp _s7n4nkob",
32
32
  buttonIconBefore: "_bozgu2gc",
33
- buttonIconAfter: "_y4tiu2gc"
33
+ buttonIconAfter: "_y4tiu2gc",
34
+ fullWidth: "_1bsb1osq"
34
35
  };
35
36
  var defaultStyles = {
36
37
  root: "_bfhk1j54 _syaz10s3 _105310s3 _f8pj10s3 _irr3yw9d _30l310s3 _1di6ip91 _9h8h10s3",
@@ -94,6 +95,7 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
94
95
  onPointerUpCapture = _ref.onPointerUpCapture,
95
96
  onTouchEndCapture = _ref.onTouchEndCapture,
96
97
  onTouchStartCapture = _ref.onTouchStartCapture,
98
+ shouldFitContainer = _ref.shouldFitContainer,
97
99
  spacing = _ref.spacing,
98
100
  testId = _ref.testId,
99
101
  unsafeRest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
@@ -143,7 +145,7 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
143
145
  // TODO: remove me once we kill color fallbacks
144
146
  isSelected && appearance === 'warning' && selectedStyles.warning,
145
147
  // TODO: remove me once we kill color fallbacks
146
- isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, spacing === 'compact' && styles.spacingCompact, hasIconBefore && styles.buttonIconBefore, hasIconAfter && styles.buttonIconAfter)
148
+ isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, spacing === 'compact' && styles.spacingCompact, hasIconBefore && styles.buttonIconBefore, hasIconAfter && styles.buttonIconAfter, shouldFitContainer && styles.fullWidth)
147
149
  }), iconBefore && /*#__PURE__*/React.createElement(_content.default, {
148
150
  type: "icon",
149
151
  position: "before",
@@ -133,7 +133,7 @@ var ButtonBase = /*#__PURE__*/_react.default.forwardRef(function ButtonBase(prop
133
133
  action: 'clicked',
134
134
  componentName: 'button',
135
135
  packageName: "@atlaskit/button",
136
- packageVersion: "23.0.2",
136
+ packageVersion: "23.0.4",
137
137
  analyticsData: analyticsContext
138
138
  });
139
139
 
@@ -14,6 +14,7 @@
14
14
  ._11fnglyw:after{pointer-events:none}
15
15
  ._18postnw:after{position:absolute}
16
16
  ._1bah1h6o{justify-content:center}
17
+ ._1bsb1osq{width:100%}
17
18
  ._1bsb1wug{width:auto}
18
19
  ._1e0c116y{display:inline-flex}
19
20
  ._1hmsagmp{text-decoration-line:none!important}
@@ -17,7 +17,8 @@ const styles = {
17
17
  disabled: "_80om13gf _bfhksyzs _syaz1lh4 _aetrglyw _irr3syzs _30l31lh4 _1di6syzs _9h8h1lh4",
18
18
  spacingCompact: "_1rjcv77o _gy1p1b66 _4t3i1k8s _y4tiutpp _bozgutpp _s7n4nkob",
19
19
  buttonIconBefore: "_bozgu2gc",
20
- buttonIconAfter: "_y4tiu2gc"
20
+ buttonIconAfter: "_y4tiu2gc",
21
+ fullWidth: "_1bsb1osq"
21
22
  };
22
23
  const defaultStyles = {
23
24
  root: "_bfhk1j54 _syaz10s3 _105310s3 _f8pj10s3 _irr3yw9d _30l310s3 _1di6ip91 _9h8h10s3",
@@ -79,6 +80,7 @@ const LinkButtonBase = ({
79
80
  onPointerUpCapture,
80
81
  onTouchEndCapture,
81
82
  onTouchStartCapture,
83
+ shouldFitContainer,
82
84
  spacing,
83
85
  testId,
84
86
  ...unsafeRest
@@ -131,7 +133,7 @@ const LinkButtonBase = ({
131
133
  // TODO: remove me once we kill color fallbacks
132
134
  isSelected && appearance === 'warning' && selectedStyles.warning,
133
135
  // TODO: remove me once we kill color fallbacks
134
- isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, spacing === 'compact' && styles.spacingCompact, hasIconBefore && styles.buttonIconBefore, hasIconAfter && styles.buttonIconAfter)
136
+ isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, spacing === 'compact' && styles.spacingCompact, hasIconBefore && styles.buttonIconBefore, hasIconAfter && styles.buttonIconAfter, shouldFitContainer && styles.fullWidth)
135
137
  }), iconBefore && /*#__PURE__*/React.createElement(Content, {
136
138
  type: "icon",
137
139
  position: "before",
@@ -119,7 +119,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref)
119
119
  action: 'clicked',
120
120
  componentName: 'button',
121
121
  packageName: "@atlaskit/button",
122
- packageVersion: "23.0.2",
122
+ packageVersion: "23.0.4",
123
123
  analyticsData: analyticsContext
124
124
  });
125
125
 
@@ -14,6 +14,7 @@
14
14
  ._11fnglyw:after{pointer-events:none}
15
15
  ._18postnw:after{position:absolute}
16
16
  ._1bah1h6o{justify-content:center}
17
+ ._1bsb1osq{width:100%}
17
18
  ._1bsb1wug{width:auto}
18
19
  ._1e0c116y{display:inline-flex}
19
20
  ._1hmsagmp{text-decoration-line:none!important}
@@ -1,7 +1,7 @@
1
1
  /* link.tsx generated by @compiled/babel-plugin v0.36.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["analyticsContext", "appearance", "aria-label", "aria-labelledby", "autoFocus", "children", "href", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "spacing", "testId"],
4
+ var _excluded = ["analyticsContext", "appearance", "aria-label", "aria-labelledby", "autoFocus", "children", "href", "iconAfter", "iconBefore", "interactionName", "isDisabled", "isSelected", "onClick", "onClickCapture", "onKeyDownCapture", "onKeyUpCapture", "onMouseDownCapture", "onMouseUpCapture", "onPointerDownCapture", "onPointerUpCapture", "onTouchEndCapture", "onTouchStartCapture", "shouldFitContainer", "spacing", "testId"],
5
5
  _excluded2 = ["className", "css", "as", "style"];
6
6
  import "./link.compiled.css";
7
7
  import * as React from 'react';
@@ -20,7 +20,8 @@ var styles = {
20
20
  disabled: "_80om13gf _bfhksyzs _syaz1lh4 _aetrglyw _irr3syzs _30l31lh4 _1di6syzs _9h8h1lh4",
21
21
  spacingCompact: "_1rjcv77o _gy1p1b66 _4t3i1k8s _y4tiutpp _bozgutpp _s7n4nkob",
22
22
  buttonIconBefore: "_bozgu2gc",
23
- buttonIconAfter: "_y4tiu2gc"
23
+ buttonIconAfter: "_y4tiu2gc",
24
+ fullWidth: "_1bsb1osq"
24
25
  };
25
26
  var defaultStyles = {
26
27
  root: "_bfhk1j54 _syaz10s3 _105310s3 _f8pj10s3 _irr3yw9d _30l310s3 _1di6ip91 _9h8h10s3",
@@ -84,6 +85,7 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
84
85
  onPointerUpCapture = _ref.onPointerUpCapture,
85
86
  onTouchEndCapture = _ref.onTouchEndCapture,
86
87
  onTouchStartCapture = _ref.onTouchStartCapture,
88
+ shouldFitContainer = _ref.shouldFitContainer,
87
89
  spacing = _ref.spacing,
88
90
  testId = _ref.testId,
89
91
  unsafeRest = _objectWithoutProperties(_ref, _excluded);
@@ -133,7 +135,7 @@ var LinkButtonBase = function LinkButtonBase(_ref, ref) {
133
135
  // TODO: remove me once we kill color fallbacks
134
136
  isSelected && appearance === 'warning' && selectedStyles.warning,
135
137
  // TODO: remove me once we kill color fallbacks
136
- isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, spacing === 'compact' && styles.spacingCompact, hasIconBefore && styles.buttonIconBefore, hasIconAfter && styles.buttonIconAfter)
138
+ isSelected && appearance === 'discovery' && selectedStyles.discovery, isDisabled && styles.disabled, spacing === 'compact' && styles.spacingCompact, hasIconBefore && styles.buttonIconBefore, hasIconAfter && styles.buttonIconAfter, shouldFitContainer && styles.fullWidth)
137
139
  }), iconBefore && /*#__PURE__*/React.createElement(Content, {
138
140
  type: "icon",
139
141
  position: "before",
@@ -125,7 +125,7 @@ var ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {
125
125
  action: 'clicked',
126
126
  componentName: 'button',
127
127
  packageName: "@atlaskit/button",
128
- packageVersion: "23.0.2",
128
+ packageVersion: "23.0.4",
129
129
  analyticsData: analyticsContext
130
130
  });
131
131
 
@@ -11,7 +11,7 @@ export type LinkButtonProps<RouterLinkConfig extends Record<string, any> = never
11
11
  * - [Code](https://atlassian.design/components/link-button/code)
12
12
  * - [Usage](https://atlassian.design/components/link-button/usage)
13
13
  */
14
- declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, appearance, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, autoFocus, children, href, iconAfter, iconBefore, interactionName, isDisabled, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, spacing, testId, ...unsafeRest }: LinkButtonProps<RouterLinkConfig>, ref: React.Ref<HTMLAnchorElement>) => JSX.Element;
14
+ declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, appearance, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, autoFocus, children, href, iconAfter, iconBefore, interactionName, isDisabled, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, shouldFitContainer, spacing, testId, ...unsafeRest }: LinkButtonProps<RouterLinkConfig>, ref: React.Ref<HTMLAnchorElement>) => JSX.Element;
15
15
  /**
16
16
  * __Link Button__
17
17
  *
@@ -11,7 +11,7 @@ export type LinkButtonProps<RouterLinkConfig extends Record<string, any> = never
11
11
  * - [Code](https://atlassian.design/components/link-button/code)
12
12
  * - [Usage](https://atlassian.design/components/link-button/usage)
13
13
  */
14
- declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, appearance, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, autoFocus, children, href, iconAfter, iconBefore, interactionName, isDisabled, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, spacing, testId, ...unsafeRest }: LinkButtonProps<RouterLinkConfig>, ref: React.Ref<HTMLAnchorElement>) => JSX.Element;
14
+ declare const LinkButtonBase: <RouterLinkConfig extends Record<string, any> = never>({ analyticsContext, appearance, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, autoFocus, children, href, iconAfter, iconBefore, interactionName, isDisabled, isSelected, onClick, onClickCapture, onKeyDownCapture, onKeyUpCapture, onMouseDownCapture, onMouseUpCapture, onPointerDownCapture, onPointerUpCapture, onTouchEndCapture, onTouchStartCapture, shouldFitContainer, spacing, testId, ...unsafeRest }: LinkButtonProps<RouterLinkConfig>, ref: React.Ref<HTMLAnchorElement>) => JSX.Element;
15
15
  /**
16
16
  * __Link Button__
17
17
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/button",
3
- "version": "23.0.2",
3
+ "version": "23.0.4",
4
4
  "description": "A button triggers an event or action. They let users know what will happen next.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -85,18 +85,18 @@
85
85
  },
86
86
  "dependencies": {
87
87
  "@atlaskit/analytics-next": "^11.0.0",
88
- "@atlaskit/css": "0.10.5",
89
- "@atlaskit/ds-lib": "4.0.0",
90
- "@atlaskit/focus-ring": "3.0.0",
91
- "@atlaskit/icon": "25.5.0",
92
- "@atlaskit/interaction-context": "3.0.0",
93
- "@atlaskit/platform-feature-flags": "1.1.1",
94
- "@atlaskit/primitives": "14.3.0",
95
- "@atlaskit/spinner": "18.0.3",
96
- "@atlaskit/theme": "18.0.1",
97
- "@atlaskit/tokens": "4.6.0",
98
- "@atlaskit/tooltip": "20.0.5",
99
- "@atlaskit/visually-hidden": "3.0.2",
88
+ "@atlaskit/css": "^0.10.0",
89
+ "@atlaskit/ds-lib": "^4.0.0",
90
+ "@atlaskit/focus-ring": "^3.0.0",
91
+ "@atlaskit/icon": "^25.5.0",
92
+ "@atlaskit/interaction-context": "^3.0.0",
93
+ "@atlaskit/platform-feature-flags": "^1.1.0",
94
+ "@atlaskit/primitives": "^14.4.0",
95
+ "@atlaskit/spinner": "^18.0.0",
96
+ "@atlaskit/theme": "^18.0.0",
97
+ "@atlaskit/tokens": "^4.7.0",
98
+ "@atlaskit/tooltip": "^20.0.0",
99
+ "@atlaskit/visually-hidden": "^3.0.0",
100
100
  "@babel/runtime": "^7.0.0",
101
101
  "@compiled/react": "^0.18.3",
102
102
  "@emotion/react": "^11.7.1"
@@ -113,12 +113,12 @@
113
113
  "@atlaskit/docs": "^10.0.0",
114
114
  "@atlaskit/dropdown-menu": "^14.0.0",
115
115
  "@atlaskit/form": "^12.0.0",
116
- "@atlaskit/heading": "^5.1.0",
116
+ "@atlaskit/heading": "^5.2.0",
117
117
  "@atlaskit/link": "^3.1.0",
118
118
  "@atlaskit/logo": "^16.0.0",
119
119
  "@atlaskit/modal-dialog": "^14.1.0",
120
120
  "@atlaskit/section-message": "^8.2.0",
121
- "@atlaskit/select": "^20.0.0",
121
+ "@atlaskit/select": "^20.3.0",
122
122
  "@atlaskit/ssr": "^0.4.0",
123
123
  "@atlaskit/toggle": "^15.0.0",
124
124
  "@atlaskit/visual-regression": "^0.10.0",