wilday_ui 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/builds/wilday_ui/index.js +8 -1
- data/app/assets/builds/wilday_ui/index.js.map +2 -2
- data/app/assets/config/wilday_ui_manifest.js +3 -0
- data/app/assets/stylesheets/wilday_ui/components/button/base.css +16 -0
- data/app/assets/stylesheets/wilday_ui/components/button/features/dropdown.css +244 -0
- data/app/assets/stylesheets/wilday_ui/components/button/features/icons.css +26 -0
- data/app/assets/stylesheets/wilday_ui/components/button/features/loading.css +33 -0
- data/app/assets/stylesheets/wilday_ui/components/button/features/old_variants.css +30 -0
- data/app/assets/stylesheets/wilday_ui/components/button/features/radius.css +12 -0
- data/app/assets/stylesheets/wilday_ui/components/button/features/sizes.css +15 -0
- data/app/assets/stylesheets/wilday_ui/components/button/features/variants.css +195 -0
- data/app/assets/stylesheets/wilday_ui/components/button/index.css +8 -0
- data/app/helpers/wilday_ui/components/button_helper.rb +122 -8
- data/app/javascript/wilday_ui/controllers/dropdown_controller.js +10 -1
- data/app/views/wilday_ui/_button.html.erb +11 -1
- data/app/views/wilday_ui/button/_content.html.erb +18 -14
- data/lib/wilday_ui/config/theme.rb +138 -0
- data/lib/wilday_ui/engine.rb +13 -21
- data/lib/wilday_ui/version.rb +1 -1
- data/lib/wilday_ui.rb +1 -0
- metadata +12 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2e04d403a797e815f3db93143464606d159b1335c9d0d24b2dd9c5d3d16e28f
|
4
|
+
data.tar.gz: d6b88c2bd7353202331f9e9442abc43472e74dade6a0d97605ad3ca3042bf17e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3828bf06a18e492ff4bc765ec0fbaad5afbec6558770c8708a1e6606c7ead1f56b5d3f41704a70704a7a2af4a00d43edbe1f8d9b2260fdbdd128a0b1ddae800c
|
7
|
+
data.tar.gz: 2982c22352e77f0c9ff7f2cc7b82e570edc6d153aff6ab01fc7e4b71039fa3e8bbd37e1703232115e9a350116106ac58da4455825a609cb415dec45d4d1bd49f
|
@@ -2504,6 +2504,7 @@ var dropdown_controller_default = class extends Controller {
|
|
2504
2504
|
const align = this.element.dataset.dropdownAlignValue;
|
2505
2505
|
if (position) this.positionValue = position;
|
2506
2506
|
if (align) this.alignValue = align;
|
2507
|
+
this.updatePosition();
|
2507
2508
|
if (this.triggerValue === "hover") {
|
2508
2509
|
this.element.addEventListener("mouseenter", () => {
|
2509
2510
|
console.log("Mouse enter - showing menu");
|
@@ -2523,6 +2524,7 @@ var dropdown_controller_default = class extends Controller {
|
|
2523
2524
|
}
|
2524
2525
|
handleHover(show) {
|
2525
2526
|
if (show) {
|
2527
|
+
this.updatePosition();
|
2526
2528
|
this.menuTarget.classList.add("show");
|
2527
2529
|
this.buttonTarget.classList.add("active");
|
2528
2530
|
this.buttonTarget.setAttribute("aria-expanded", "true");
|
@@ -2537,8 +2539,13 @@ var dropdown_controller_default = class extends Controller {
|
|
2537
2539
|
event.stopPropagation();
|
2538
2540
|
if (this.isOpen) {
|
2539
2541
|
this.menuTarget.classList.remove("show");
|
2542
|
+
this.buttonTarget.classList.remove("active");
|
2543
|
+
this.buttonTarget.setAttribute("aria-expanded", "false");
|
2540
2544
|
} else {
|
2545
|
+
this.updatePosition();
|
2541
2546
|
this.menuTarget.classList.add("show");
|
2547
|
+
this.buttonTarget.classList.add("active");
|
2548
|
+
this.buttonTarget.setAttribute("aria-expanded", "true");
|
2542
2549
|
}
|
2543
2550
|
}
|
2544
2551
|
show() {
|
@@ -2693,7 +2700,7 @@ var dropdown_controller_default = class extends Controller {
|
|
2693
2700
|
);
|
2694
2701
|
}
|
2695
2702
|
updatePosition() {
|
2696
|
-
const menuElement = this.
|
2703
|
+
const menuElement = this.menuTarget;
|
2697
2704
|
const position = this.hasPositionValue ? this.positionValue : "bottom";
|
2698
2705
|
const align = this.hasAlignValue ? this.alignValue : "start";
|
2699
2706
|
menuElement.setAttribute("data-position", position);
|