wilday_ui 0.8.0 → 0.9.0

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.
@@ -167,17 +167,6 @@ export default class extends Controller {
167
167
  const scrollX = window.pageXOffset || document.documentElement.scrollLeft;
168
168
  const scrollY = window.pageYOffset || document.documentElement.scrollTop;
169
169
 
170
- // Debug initial values
171
- console.log("=== Initial Values ===");
172
- console.log("Viewport Height:", viewportHeight);
173
- console.log("Viewport Width:", viewportWidth);
174
- console.log("Trigger Top:", triggerRect.top);
175
- console.log("Trigger Bottom:", triggerRect.bottom);
176
- console.log("Trigger Left:", triggerRect.left);
177
- console.log("Trigger Right:", triggerRect.right);
178
- console.log("Tooltip Height:", tooltipRect.height);
179
- console.log("Tooltip Width:", tooltipRect.width);
180
-
181
170
  let position = this.positionValue;
182
171
  let top, left;
183
172
 
@@ -191,34 +180,19 @@ export default class extends Controller {
191
180
  const requiredSpaceHorizontal =
192
181
  tooltipRect.width + this.offsetValue + arrowOffset;
193
182
 
194
- // Debug space
195
- console.log("\n=== Space Calculation ===");
196
- console.log("Space Above:", spaceAbove);
197
- console.log("Space Below:", spaceBelow);
198
- console.log("Space Left:", spaceLeft);
199
- console.log("Space Right:", spaceRight);
200
- console.log("Required Space Vertical:", requiredSpaceVertical);
201
- console.log("Required Space Horizontal:", requiredSpaceHorizontal);
202
-
203
183
  // Determine position based on available viewport space
204
184
  if (position === "right" && spaceRight >= requiredSpaceHorizontal) {
205
185
  position = "right";
206
- console.log("Using right - sufficient space");
207
186
  } else if (position === "left" && spaceLeft >= requiredSpaceHorizontal) {
208
187
  position = "left";
209
- console.log("Using left - sufficient space");
210
188
  } else if (position === "top" && spaceAbove >= requiredSpaceVertical) {
211
189
  position = "top";
212
- console.log("Using top - sufficient space");
213
190
  } else if (position === "bottom" && spaceBelow >= requiredSpaceVertical) {
214
191
  position = "bottom";
215
- console.log("Using bottom - sufficient space");
216
192
  } else if (spaceBelow >= requiredSpaceVertical) {
217
193
  position = "bottom";
218
- console.log("Fallback to bottom - sufficient space");
219
194
  } else {
220
195
  position = "top";
221
- console.log("Fallback to top - insufficient space below");
222
196
  }
223
197
 
224
198
  // Calculate viewport-relative position
@@ -292,13 +266,6 @@ export default class extends Controller {
292
266
  left = viewportWidth - tooltipRect.width - this.offsetValue;
293
267
  }
294
268
 
295
- // Debug final position
296
- console.log("\n=== Final Position ===");
297
- console.log("Position:", position);
298
- console.log("Top:", top);
299
- console.log("Left:", left);
300
- console.log("Alignment:", this.alignValue);
301
-
302
269
  // Add scroll position to final coordinates
303
270
  top += scrollY;
304
271
  left += scrollX;
@@ -1,3 +1,3 @@
1
1
  module WildayUi
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wilday_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - davidwinalda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-22 00:00:00.000000000 Z
11
+ date: 2024-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -45,6 +45,7 @@ files:
45
45
  - app/assets/stylesheets/wilday_ui/application.css
46
46
  - app/assets/stylesheets/wilday_ui/button.css
47
47
  - app/assets/stylesheets/wilday_ui/components/button/base.css
48
+ - app/assets/stylesheets/wilday_ui/components/button/features/animation.css
48
49
  - app/assets/stylesheets/wilday_ui/components/button/features/clipboard.css
49
50
  - app/assets/stylesheets/wilday_ui/components/button/features/confirmation.css
50
51
  - app/assets/stylesheets/wilday_ui/components/button/features/dropdown.css
@@ -60,9 +61,17 @@ files:
60
61
  - app/assets/stylesheets/wilday_ui/tokens/colors.css
61
62
  - app/controllers/wilday_ui/application_controller.rb
62
63
  - app/helpers/wilday_ui/application_helper.rb
63
- - app/helpers/wilday_ui/components/button_helper.rb
64
+ - app/helpers/wilday_ui/components/button/button_helper.rb
65
+ - app/helpers/wilday_ui/components/button/feature_engine.rb
66
+ - app/helpers/wilday_ui/components/button/features/animation.rb
67
+ - app/helpers/wilday_ui/components/button/features/confirm_dialog.rb
68
+ - app/helpers/wilday_ui/components/button/features/copy_to_clipboard.rb
69
+ - app/helpers/wilday_ui/components/button/features/dropdown.rb
70
+ - app/helpers/wilday_ui/components/button/features/loading.rb
71
+ - app/helpers/wilday_ui/components/button/features/tooltip.rb
64
72
  - app/helpers/wilday_ui/javascript_helper.rb
65
73
  - app/javascript/wilday_ui/components/button.js
74
+ - app/javascript/wilday_ui/controllers/animation_controller.js
66
75
  - app/javascript/wilday_ui/controllers/button_controller.js
67
76
  - app/javascript/wilday_ui/controllers/clipboard_controller.js
68
77
  - app/javascript/wilday_ui/controllers/confirmation_controller.js