ember-attacher 1.3.0 → 2.0.1

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.
@@ -67,8 +67,5 @@ updates:
67
67
  - 5.6.4
68
68
  - 5.6.5
69
69
  - 5.7.0
70
- - dependency-name: ember-power-select
71
- versions:
72
- - 4.1.3
73
70
  commit-message:
74
71
  prefix: "[chore]"
@@ -37,7 +37,7 @@ on:
37
37
  pull_request:
38
38
 
39
39
  env:
40
- NODE_VERSION: '10'
40
+ NODE_VERSION: '14'
41
41
 
42
42
  jobs:
43
43
  lint:
@@ -176,9 +176,9 @@ jobs:
176
176
  fail-fast: true
177
177
  matrix:
178
178
  ember-try-scenario: [
179
- ember-lts-3.12,
180
179
  ember-lts-3.16,
181
180
  ember-lts-3.20,
181
+ ember-lts-3.26,
182
182
  ember-release,
183
183
  ember-default,
184
184
  ember-default-with-jquery
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+
2
+ ## v2.0.1 (2023-05-15)
3
+
4
+ #### :boom: Breaking Change
5
+ * [#772](https://github.com/tylerturdenpants/ember-attacher/pull/772) Convert to Glimmer component ([@pzubar](https://github.com/pzubar))
6
+ * [#743](https://github.com/tylerturdenpants/ember-attacher/pull/743) Migration to the Floating UI ([@pzubar](https://github.com/pzubar))
7
+
8
+ #### :rocket: Enhancement
9
+ * [#772](https://github.com/tylerturdenpants/ember-attacher/pull/772) Convert to Glimmer component ([@pzubar](https://github.com/pzubar))
10
+ * [#759](https://github.com/tylerturdenpants/ember-attacher/pull/759) Bump dependencies ([@pzubar](https://github.com/pzubar))
11
+ * [#743](https://github.com/tylerturdenpants/ember-attacher/pull/743) Migration to the Floating UI ([@pzubar](https://github.com/pzubar))
12
+ * [#561](https://github.com/tylerturdenpants/ember-attacher/pull/561) Avoid forcing dart ([@kmccullough](https://github.com/kmccullough))
13
+
14
+ #### :house: Internal
15
+ * [#759](https://github.com/tylerturdenpants/ember-attacher/pull/759) Bump dependencies ([@pzubar](https://github.com/pzubar))
16
+
17
+ #### Committers: 2
18
+ - Kerry McCullough ([@kmccullough](https://github.com/kmccullough))
19
+ - Petro Zubar ([@pzubar](https://github.com/pzubar))
20
+
1
21
  ## v1.3.0 (2021-09-09)
2
22
 
3
23
  #### :rocket: Enhancement
package/README.md CHANGED
@@ -20,35 +20,37 @@
20
20
 
21
21
  ----
22
22
 
23
- * Ember.js v3.12 or above
23
+ * Ember.js v3.16 or above
24
24
  * Ember CLI v3.13 or above
25
- * Node.js v10 or above
25
+ * Node.js v12 or above
26
26
 
27
27
  Tooltips and popovers made easy.
28
- Just drop an `{{#attach-tooltip}}` or `{{#attach-popover}}` in a parent and your popper is ready to go!
28
+ Just drop an `<AttachTooltip/>` or `<AttachPopover/>` in a parent and your floating element is ready to go!
29
29
 
30
30
  ```hbs
31
31
  <button>
32
32
  Click me
33
33
 
34
- {{#attach-tooltip}}
34
+ <AttachTooltip>
35
35
  I'm a tooltip!
36
- {{/attach-tooltip}}
36
+ </AttachTooltip>
37
37
  </button>
38
38
 
39
39
  <button class="other-button">
40
40
  No click me!
41
41
 
42
- {{#attach-popover class="ember-attacher-popper"
43
- hideOn='click'
44
- isShown=true
45
- showOn='click'}}
42
+ <AttachPopover
43
+ @class='ember-attacher'
44
+ @hideOn='click'
45
+ @isShown={{true}}
46
+ @showOn='click'
47
+ >
46
48
  I'm a popover!
47
- {{/attach-popover}}
49
+ </AttachPopover>
48
50
  </button>
49
51
  ```
50
52
 
51
- See [the example site](https://kybishop.github.io/ember-attacher/) for a demonstration of all
53
+ See [the example site](https://tylerturdenpants.github.io/ember-attacher/) for a demonstration of all
52
54
  available options.
53
55
 
54
56
  ## Installation
@@ -57,21 +59,24 @@ available options.
57
59
  ember install ember-attacher
58
60
  ```
59
61
 
62
+ If you're upgrading from 1.x to 2.x [see the upgrade guide](./docs/upgrade-guide-2.0.md).
63
+
64
+
60
65
  ## Components
61
66
 
62
- ### `{{#attach-popover}}`
67
+ ### `<AttachPopover/>`
63
68
 
64
69
  A popover attacher.
65
70
 
66
71
  * Has no default class or roles.
67
72
  * Does not modify the target in any way.
68
- * Adds `aria-hidden` attribute to the popper element
73
+ * Adds `aria-hidden` attribute to the floating element
69
74
 
70
- ### `{{#attach-tooltip}}`
75
+ ### `<AttachTooltip/>`
71
76
 
72
- A tooltip attacher. Subclass of `{{#attach-popover}}`
77
+ A tooltip attacher. Subclass of `<AttachPopover/>`
73
78
 
74
- * Has the default class `'ember-attacher-popper ember-attacher-tooltip'`
79
+ * Has the default class `'ember-attacher-floating ember-attacher-tooltip'`
75
80
  * The default tooltip classes can be modified by altering the `tooltipClass`
76
81
  default. See [here](#user-defined-defaults) for details on editing default values.
77
82
 
@@ -90,6 +95,12 @@ Below is a list of all available options, along with their defaults.
90
95
 
91
96
  // Whether or not an arrow will be displayed next to the attachment.
92
97
  arrow: false,
98
+
99
+ // Add listeners that will automatically call an update function
100
+ // Pass `true` to use the Floating UI default options or Options object to override them
101
+ // Example: { ancestorScroll: false }
102
+ // For more details see https://floating-ui.com/docs/autoUpdate
103
+ autoUpdate: false,
93
104
 
94
105
  // A class that will be applied to the attachment.
95
106
  class: null,
@@ -127,8 +138,8 @@ Below is a list of all available options, along with their defaults.
127
138
  // Useful for performance reasons, but will hide your attachment from search engines.
128
139
  lazyRender: false,
129
140
 
130
- // An options object that will be merged into popperOptions.
131
- modifiers: null,
141
+ // A middleware array that will be merged into computePosition options
142
+ middleware: null,
132
143
 
133
144
  // A function to be fired when the attachment's visibility changes. The new visibility is passed
134
145
  // to the function as an arg.
@@ -139,18 +150,18 @@ Below is a list of all available options, along with their defaults.
139
150
  placement: 'top',
140
151
 
141
152
  // The container where the attachment's DOM will be inserted.
142
- popperContainer: '.ember-application',
153
+ floatingElementContainer: '.ember-application',
143
154
 
144
- // An options object that will be passed to Popper.js, the positioning library.
145
- popperOptions: null,
155
+ // An options object that will be passed to Floating UI "computePosition" function.
156
+ floatingUiOptions: null,
146
157
 
147
158
  // NOT RECOMMENDED: We currently allow you to pass an explicit target, but this may be removed
148
159
  // in a future release.
149
160
  // Please provide your thoughts here: https://github.com/kybishop/ember-attacher/issues/109
150
- popperTarget: null,
161
+ explicitTarget: null,
151
162
 
152
163
  // Whether or not to render the attachment in place in the DOM, as opposed to
153
- // on the popperContainer. NOTE: Rendering in place can cause z-index issues.
164
+ // on the floatingElementContainer. NOTE: Rendering in place can cause z-index issues.
154
165
  renderInPlace: false,
155
166
 
156
167
  // The delay, in milliseconds, before the attachment will be shown.
@@ -173,7 +184,7 @@ Below is a list of all available options, along with their defaults.
173
184
 
174
185
  ## User-defined defaults
175
186
 
176
- User-defined defaults can be set in the consuming app or addon's config/environment.js. These defaults will be applied to every `{{#attach-popover}}` and `{{#attach-tooltip}}`
187
+ User-defined defaults can be set in the consuming app or addon's config/environment.js. These defaults will be applied to every `<AttachPopover/>` and `<AttachTooltip/>`
177
188
 
178
189
  ```javascript
179
190
  // config/environment.js
@@ -253,11 +264,13 @@ test('example', async function(assert) {
253
264
  <button id="toggle">
254
265
  Click me, captain!
255
266
 
256
- {{#attach-popover id='attachment'
257
- hideOn='click'
258
- showOn='click'}}
267
+ <AttachPopover
268
+ @id='attachment'
269
+ @hideOn='click'
270
+ @showOn='click'
271
+ >
259
272
  Click-toggled popover
260
- {{/attach-popover}}
273
+ <AttachPopover/>
261
274
  </button>
262
275
  `);
263
276
 
@@ -282,7 +295,7 @@ See the [Contributing](CONTRIBUTING.md) guide for details.
282
295
 
283
296
  Attachments are composed of two containers:
284
297
 
285
- * [An outer container](https://github.com/kybishop/ember-attacher/blob/master/addon/templates/components/attach-popover.hbs#L2) for positioning (via [ember-popper](https://github.com/kybishop/ember-popper)/[popper.js](https://github.com/FezVrasta/popper.js)).
298
+ * [An outer container](https://github.com/kybishop/ember-attacher/blob/master/addon/templates/components/attach-popover.hbs#L2) for positioning (via [floating-ui](https://github.com/floating-ui/floating-ui)).
286
299
  * [An inner container](https://github.com/kybishop/ember-attacher/blob/master/addon/templates/components/attach-popover.hbs#L12) for the content. This is the container that is animated.
287
300
 
288
301
  The outer container is positioned right next to the target via the CSS `transform` property. The inner container is required because animations also use `transform`, which would otherwise conflict with the container's position.
@@ -300,8 +313,8 @@ Note that animations require an implementation for each position (left, right, t
300
313
  * [tippy.js](https://github.com/atomiks/tippyjs), the library that inspired
301
314
  ember-attacher.
302
315
 
303
- * [popper.js](https://github.com/FezVrasta/popper.js), the library that powers
304
- positioning (via [ember-popper](https://github.com/kybishop/ember-popper))
316
+ * [floating-ui](https://github.com/floating-ui/floating-ui), the library that powers
317
+ positioning
305
318
 
306
319
  * [ember-tooltips](https://github.com/sir-dunxalot/ember-tooltips), the addon that
307
320
  influenced much of ember-attacher's API.