turbo_modal 0.3.2 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0078dc10ef887436764ed4b1dd676e73ada176603190f8d8eb8eb02bd19837c5'
4
- data.tar.gz: 777a55c156dd52f49b66b8eec882a7d093dbd5e3b7f9884bf4999eacbdb00d38
3
+ metadata.gz: e8e72cdd25686a64f8cca7d141062e27cec69ae52e607a60a437ca1aad450cee
4
+ data.tar.gz: 29555235b607fc5f343e3f11643143c0233329cf1d210402999896afdb4cecc2
5
5
  SHA512:
6
- metadata.gz: 3f19861545c075e19cad1f516c05e022ee7fed7b64825e922b4c62fbc4f8a65ef59525db850fe6488cc26a89da3555c39493abc4fee8f78871025a0b503c7a2c
7
- data.tar.gz: dd29b5c61a67d68721cc57a4806b0f62cf15c421444598981074d258767a727840774769e0d920655cccd40a4af2d6a474f42f82ebf88b1114aef9b4b15d0a7d
6
+ metadata.gz: 9380653ea1ff7ce20473b1b6e34b2324c3e4665f10abf4ff4f6e840bc7ae659c79d54bc9722c0714b8c9c2eaa469ee2f02a379148b1f1c2376f390df6d67cf0e
7
+ data.tar.gz: 7220766f0abdd58b4eb5c89ec44a63db814ef6acd7e299af5e354d680896cbd6e66307405386f4820c0e696378dfe7999fd8db755848193ae811491a0ac87135
@@ -1,29 +1,57 @@
1
- .modal {
1
+ .modal-wrapper {
2
2
  position: fixed;
3
- top: 50%;
4
- left: 50%;
3
+ top: 0;
4
+ bottom: 0;
5
+ left: 0;
6
+ right: 0;
5
7
  z-index: 11;
8
+ display: flex;
9
+ justify-content: center;
10
+ align-items: center;
11
+ pointer-events: none;
12
+ }
13
+ .bottom-sheet .modal-wrapper {
14
+ align-items: flex-end;
15
+ }
16
+
17
+ .modal {
18
+ min-width: 40rem;
19
+ max-height: 100%;
20
+ display: flex;
21
+ position: relative;
22
+ top: unset;
23
+ left: unset;
6
24
  background: white;
7
25
  border-radius: 4px;
8
- padding: 2rem;
26
+ padding: 0;
9
27
  --animation-in: slide-in;
10
28
  --animation-out: slide-out;
29
+ pointer-events: auto;
30
+ margin: 2rem;
31
+ }
32
+ @media screen and (max-width: 45rem) {
33
+ .modal {
34
+ min-width: 100%;
35
+ }
36
+ }
37
+ .modal .modal-content {
38
+ overflow-y: scroll;
39
+ padding: 2rem;
11
40
  }
12
41
  @media screen and (max-width: 45rem) {
13
42
  .fullscreen .modal {
14
- top: 0;
15
- left: 0;
16
- right: 0;
17
- bottom: 0;
43
+ margin: 0;
18
44
  border-radius: 0;
45
+ height: 100%;
46
+ flex-grow: 1;
19
47
  }
20
48
  }
21
49
  .bottom-sheet .modal {
22
50
  top: unset;
23
- bottom: 0;
24
- left: 0;
25
- right: 0;
51
+ width: 100%;
52
+ margin: 0;
26
53
  min-height: 40vh;
54
+ transform: unset;
27
55
  --animation-in: slide-up;
28
56
  --animation-out: slide-down;
29
57
  }
@@ -36,7 +64,6 @@
36
64
  .animate-in {
37
65
  animation: var(--animation-in);
38
66
  animation-duration: 0.25s;
39
- animation-fill-mode: forwards;
40
67
  }
41
68
  @media screen and (max-width: 45rem) {
42
69
  .fullscreen .animate-in {
@@ -58,21 +85,21 @@
58
85
  @keyframes slide-in {
59
86
  from {
60
87
  opacity: 0;
61
- transform: translate(-50%, -35%);
88
+ transform: translateY(35%);
62
89
  }
63
90
  to {
64
91
  opacity: 1;
65
- transform: translate(-50%, -50%);
92
+ transform: translateY(0%);
66
93
  }
67
94
  }
68
95
  @keyframes slide-out {
69
96
  from {
70
97
  opacity: 1;
71
- transform: translate(-50%, -50%);
98
+ transform: translateY(0%);
72
99
  }
73
100
  to {
74
101
  opacity: 0;
75
- transform: translate(-50%, -35%);
102
+ transform: translateY(35%);
76
103
  }
77
104
  }
78
105
  @keyframes slide-in-left {
@@ -1,3 +1,3 @@
1
1
  module TurboModal
2
- VERSION = "0.3.2".freeze
2
+ VERSION = "0.3.3".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbo_modal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alan Cornthwaite
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-05-10 00:00:00.000000000 Z
12
+ date: 2022-05-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails