@primer/behaviors 1.1.2-rc.83d1cfb → 1.1.3

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.
@@ -233,6 +233,7 @@ function shouldRecalculateAlignment(align, currentPos, containerDimensions, elem
233
233
  return currentPos.left < containerDimensions.left;
234
234
  }
235
235
  else if (align === 'start' || align === 'center') {
236
- return currentPos.left + elementDimensions.width > containerDimensions.left + containerDimensions.width;
236
+ return (currentPos.left + elementDimensions.width > containerDimensions.left + containerDimensions.width ||
237
+ currentPos.left < containerDimensions.left);
237
238
  }
238
239
  }
@@ -229,6 +229,7 @@ function shouldRecalculateAlignment(align, currentPos, containerDimensions, elem
229
229
  return currentPos.left < containerDimensions.left;
230
230
  }
231
231
  else if (align === 'start' || align === 'center') {
232
- return currentPos.left + elementDimensions.width > containerDimensions.left + containerDimensions.width;
232
+ return (currentPos.left + elementDimensions.width > containerDimensions.left + containerDimensions.width ||
233
+ currentPos.left < containerDimensions.left);
233
234
  }
234
235
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/behaviors",
3
- "version": "1.1.2-rc.83d1cfb",
3
+ "version": "1.1.3",
4
4
  "description": "Shared behaviors for JavaScript components",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/CHANGELOG.md DELETED
@@ -1,39 +0,0 @@
1
- # @primer/behaviors
2
-
3
- ## 1.1.2
4
-
5
- ### Patch Changes
6
-
7
- - [#78](https://github.com/primer/behaviors/pull/78) [`62e5459`](https://github.com/primer/behaviors/commit/62e545913dae8ca42f88fd6184f190cdf3df9c4c) Thanks [@siddharthkp](https://github.com/siddharthkp)! - Anchored Position: Add alternative alignments to flip to if there isn't enough space
8
-
9
- ## 1.1.1
10
-
11
- ### Patch Changes
12
-
13
- - [#73](https://github.com/primer/behaviors/pull/73) [`a96d60f`](https://github.com/primer/behaviors/commit/a96d60fdb2a2ffdde71a22ea29fa2c788bf4c6aa) Thanks [@dgreif](https://github.com/dgreif)! - Add `import` conditional export type to the package for better NodeJS ESM compatibility
14
-
15
- ## 1.1.0
16
-
17
- ### Minor Changes
18
-
19
- - [#52](https://github.com/primer/behaviors/pull/52) [`1aa3027`](https://github.com/primer/behaviors/commit/1aa302782e3c833f9d9c27f602a046e81f05c3e5) Thanks [@owenniblock](https://github.com/owenniblock)! - Update focusTrap to use new methodology after accessibility discussions
20
-
21
- ## 1.0.3
22
-
23
- ### Patch Changes
24
-
25
- - [#42](https://github.com/primer/behaviors/pull/42) [`41945a3`](https://github.com/primer/behaviors/commit/41945a37ef07da82ce5a29feb03d7a7d96ec76ea) Thanks [@dgreif](https://github.com/dgreif)! - Build both esm and cjs output for the package
26
-
27
- ## 1.0.2
28
-
29
- ### Patch Changes
30
-
31
- - [#17](https://github.com/primer/behaviors/pull/17) [`9194ba4`](https://github.com/primer/behaviors/commit/9194ba403502b4acba0be03bed1a765c1ba81340) Thanks [@dgreif](https://github.com/dgreif)! - Correct margin orientation for `scrollIntoView`
32
-
33
- * [#18](https://github.com/primer/behaviors/pull/18) [`3b4dd41`](https://github.com/primer/behaviors/commit/3b4dd414175417f83bd144939fe74b2a01bc7136) Thanks [@dgreif](https://github.com/dgreif)! - Export utils as submodule
34
-
35
- ## 1.0.1
36
-
37
- ### Patch Changes
38
-
39
- - [#10](https://github.com/primer/behaviors/pull/10) [`88b6f34`](https://github.com/primer/behaviors/commit/88b6f34bf4874f3c81473020a01a58b197dd6e16) Thanks [@dgreif](https://github.com/dgreif)! - Set up changesets