@magic-spells/dialog-panel 0.3.0 → 1.0.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.
@@ -1,40 +0,0 @@
1
- // Dialog Panel variables
2
- // SCSS variables for internal component use and customization
3
- // These variables can be customized by the user
4
-
5
- // Overlay
6
- $overlay-z-index: 1000 !default;
7
- $overlay-background: rgba(20, 23, 26, 0.4) !default;
8
- $overlay-backdrop-filter: blur(2px) saturate(120%) !default;
9
- $overlay-transition: all 400ms ease-out !default;
10
-
11
- // Content
12
- $content-display: block !default;
13
- $content-background: white !default;
14
- $content-z-index: 1001 !default;
15
- $content-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !default;
16
- $content-border-radius: 8px !default;
17
-
18
- // Animation
19
- $transition-duration: 400ms !default;
20
- $transition-timing: ease-out !default;
21
-
22
- // Define CSS Custom Properties using SCSS values
23
- :root {
24
- // Overlay
25
- --dp-overlay-z-index: #{$overlay-z-index};
26
- --dp-overlay-background: #{$overlay-background};
27
- --dp-overlay-backdrop-filter: #{$overlay-backdrop-filter};
28
- --dp-overlay-transition: #{$overlay-transition};
29
-
30
- // Content
31
- --dp-content-display: #{$content-display};
32
- --dp-content-background: #{$content-background};
33
- --dp-content-z-index: #{$content-z-index};
34
- --dp-content-shadow: #{$content-shadow};
35
- --dp-content-border-radius: #{$content-border-radius};
36
-
37
- // Animation
38
- --dp-transition-duration: #{$transition-duration};
39
- --dp-transition-timing: #{$transition-timing};
40
- }
package/src/index.scss DELETED
@@ -1,2 +0,0 @@
1
- @forward 'scss/variables';
2
- @forward 'scss/dialog-panel';
@@ -1,78 +0,0 @@
1
- // Import variables using the modern @use rule
2
- @use 'variables' as vars;
3
-
4
- dialog-panel {
5
- /* Make it take no space and be invisible in the document flow */
6
- display: contents;
7
-
8
- &[aria-hidden='false'] {
9
- dialog-overlay,
10
- dialog-content {
11
- pointer-events: auto;
12
- opacity: 1;
13
- transform: scale(1);
14
- filter: blur(0px);
15
- }
16
- }
17
- }
18
-
19
- /* Overlay background */
20
- dialog-overlay {
21
- position: fixed;
22
- top: 0;
23
- left: 0;
24
- width: 100vw;
25
- height: 100vh;
26
- opacity: 0;
27
- pointer-events: none;
28
- z-index: var(--dp-overlay-z-index, 1000);
29
- transition: var(--dp-overlay-transition, all 300ms ease-out);
30
- background-color: var(
31
- --dp-overlay-background,
32
- rgba(20, 23, 26, 0.4)
33
- );
34
- backdrop-filter: var(
35
- --dp-overlay-backdrop-filter,
36
- blur(2px) saturate(120%)
37
- );
38
- }
39
-
40
- dialog-content {
41
- position: fixed;
42
- top: 50%;
43
- left: 50%;
44
- transform: translate(-50%, -50%) scale(0.95);
45
- max-width: 90vw;
46
- max-height: 85vh;
47
- display: var(--dp-content-display, block);
48
- opacity: 0;
49
- background: var(--dp-content-background, white);
50
- pointer-events: none;
51
- z-index: var(--dp-content-z-index, 1001);
52
- box-shadow: var(
53
- --dp-content-shadow,
54
- 0 10px 25px rgba(0, 0, 0, 0.15)
55
- );
56
- border-radius: var(--dp-content-border-radius, 8px);
57
- overflow: auto;
58
- transition:
59
- opacity var(--dp-transition-duration, 300ms)
60
- var(--dp-transition-timing, ease-out),
61
- transform var(--dp-transition-duration, 300ms)
62
- var(--dp-transition-timing, ease-out);
63
-
64
- /* When shown, reset transform to center */
65
- dialog-panel[aria-hidden='false'] & {
66
- transform: translate(-50%, -50%) scale(1);
67
- }
68
- }
69
-
70
- /* When explicitly hidden, remove from layout */
71
- dialog-content.hidden {
72
- display: none;
73
- }
74
-
75
- // Body scroll lock when dialog is open using :has() selector
76
- body:has(dialog-panel[open]) {
77
- overflow: hidden;
78
- }
@@ -1,40 +0,0 @@
1
- // Dialog Panel variables
2
- // SCSS variables for internal component use and customization
3
- // These variables can be customized by the user
4
-
5
- // Overlay
6
- $overlay-z-index: 1000 !default;
7
- $overlay-background: rgba(20, 23, 26, 0.4) !default;
8
- $overlay-backdrop-filter: blur(2px) saturate(120%) !default;
9
- $overlay-transition: all 400ms ease-out !default;
10
-
11
- // Content
12
- $content-display: block !default;
13
- $content-background: white !default;
14
- $content-z-index: 1001 !default;
15
- $content-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !default;
16
- $content-border-radius: 8px !default;
17
-
18
- // Animation
19
- $transition-duration: 400ms !default;
20
- $transition-timing: ease-out !default;
21
-
22
- // Define CSS Custom Properties using SCSS values
23
- :root {
24
- // Overlay
25
- --dp-overlay-z-index: #{$overlay-z-index};
26
- --dp-overlay-background: #{$overlay-background};
27
- --dp-overlay-backdrop-filter: #{$overlay-backdrop-filter};
28
- --dp-overlay-transition: #{$overlay-transition};
29
-
30
- // Content
31
- --dp-content-display: #{$content-display};
32
- --dp-content-background: #{$content-background};
33
- --dp-content-z-index: #{$content-z-index};
34
- --dp-content-shadow: #{$content-shadow};
35
- --dp-content-border-radius: #{$content-border-radius};
36
-
37
- // Animation
38
- --dp-transition-duration: #{$transition-duration};
39
- --dp-transition-timing: #{$transition-timing};
40
- }