panelset 0.5.0 → 0.5.2

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.
Files changed (38) hide show
  1. package/dist/index.d.ts +4 -1
  2. package/dist/panelset.js +25 -12
  3. package/dist/panelset.js.map +1 -1
  4. package/package.json +5 -6
  5. package/src/docs/assets/scripts/copybutton.js +0 -44
  6. package/src/docs/assets/scripts/example-async.js +0 -161
  7. package/src/docs/assets/scripts/example-closable.js +0 -27
  8. package/src/docs/assets/scripts/example-megamenu.js +0 -84
  9. package/src/docs/assets/scripts/example.js +0 -29
  10. package/src/docs/assets/scripts/main.js +0 -7
  11. package/src/docs/assets/styles/_base.scss +0 -13
  12. package/src/docs/assets/styles/_code.scss +0 -121
  13. package/src/docs/assets/styles/_demos.scss +0 -180
  14. package/src/docs/assets/styles/_landingpage.scss +0 -41
  15. package/src/docs/assets/styles/_layout.scss +0 -80
  16. package/src/docs/assets/styles/_sidebar.scss +0 -67
  17. package/src/docs/assets/styles/_typography.scss +0 -116
  18. package/src/docs/assets/styles/_variables.scss +0 -32
  19. package/src/docs/assets/styles/docs.scss +0 -64
  20. package/src/docs/views/api-reference.pug +0 -474
  21. package/src/docs/views/configuration.pug +0 -173
  22. package/src/docs/views/events.pug +0 -222
  23. package/src/docs/views/examples/async.pug +0 -268
  24. package/src/docs/views/examples/basic.pug +0 -155
  25. package/src/docs/views/examples/closable.pug +0 -97
  26. package/src/docs/views/getting-started.pug +0 -99
  27. package/src/docs/views/index.pug +0 -38
  28. package/src/docs/views/templates/includes/_head.pug +0 -11
  29. package/src/docs/views/templates/includes/_mixins.pug +0 -100
  30. package/src/docs/views/templates/includes/_scripts.pug +0 -14
  31. package/src/docs/views/templates/includes/_sidebar.pug +0 -18
  32. package/src/docs/views/templates/layouts/_base.pug +0 -36
  33. package/src/docs/views/transitions.pug +0 -141
  34. package/src/lib/index.ts +0 -685
  35. package/src/lib/styles/_base.scss +0 -99
  36. package/src/lib/styles/_loading.scss +0 -47
  37. package/src/lib/styles/_variables.scss +0 -19
  38. package/src/lib/styles/panelset.scss +0 -3
@@ -1,7 +0,0 @@
1
- document.addEventListener('click', e => {
2
- const button = e.target.closest('button[data-panel]');
3
- if (!button) return;
4
- const panelId = button.dataset.panel;
5
- const container = document.getElementById(panelId)?.closest('[data-panelset]');
6
- container?.panelSet?.show(panelId, true, { trigger: button });
7
- });
@@ -1,13 +0,0 @@
1
-
2
- // Reset & Base
3
- * {
4
- margin: 0;
5
- padding: 0;
6
- box-sizing: border-box;
7
- }
8
-
9
- body {
10
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
11
- color: var(--doc-gray-800);
12
- background: #fff;
13
- }
@@ -1,121 +0,0 @@
1
-
2
- code, .code {
3
- background: var(--doc-gray-100);
4
- padding: 0.2em 0.4em;
5
- border-radius: 3px;
6
- font-size: 1em;
7
- display: inline-block;
8
- }
9
-
10
- p code, li code , dl code, dt.code {
11
- background: var(--doc-code-transparent);
12
- padding: 0em 0.3em;
13
- font-size: 0.9em ;
14
- }
15
-
16
- pre {
17
- background: var(--doc-gray-50);
18
- border: 1px solid var(--doc-gray-200);
19
- border-radius: 6px;
20
- padding: 1rem;
21
- overflow-x: auto;
22
- margin-bottom: 1rem;
23
-
24
- code {
25
- background: none;
26
- padding: 0;
27
- }
28
- }
29
-
30
- dl.horizontal {
31
- display: grid;
32
- grid-template-columns: max-content auto;
33
- gap: 1rem;
34
- }
35
-
36
- .code-block {
37
- position: relative;
38
-
39
- .code-header {
40
- background: var(--doc-gray-100);
41
- padding: 0.5rem 0.5rem 0.5rem 1rem;
42
- border: 1px solid var(--doc-gray-200);
43
- border-bottom: none;
44
- border-radius: 6px 6px 0 0;
45
- font-size: 0.875rem;
46
- font-weight: 600;
47
- color: var(--doc-gray-600);
48
- display: flex;
49
- justify-content: space-between;
50
- align-items: center;
51
- }
52
-
53
- pre {
54
- margin: 0;
55
- border-radius: 0 0 6px 6px;
56
- }
57
-
58
- .lane:nth-child(even) & pre {
59
- background: white;
60
- }
61
- .lane:nth-child(even) .example & pre {
62
- background: var(--doc-gray-50);
63
- }
64
-
65
- }
66
-
67
- // HIGHLIGHTING CODE
68
-
69
- .hljs-ln td.hljs-ln-numbers {
70
- -webkit-touch-callout: none;
71
- -webkit-user-select: none;
72
- -khtml-user-select: none;
73
- -moz-user-select: none;
74
- -ms-user-select: none;
75
- user-select: none;
76
- text-align: right;
77
- color: #ccc;
78
- padding-right: 1.5rem;
79
- }
80
- .hljs-ln-code {
81
- padding-left: 10px;
82
- }
83
-
84
- pre code.hljs {
85
- padding: 0;
86
- background: none;
87
- }
88
-
89
- .hljs-attribute,
90
- .hljs-doctag,
91
- .hljs-keyword,
92
- .hljs-meta .hljs-keyword,
93
- .hljs-name,
94
- .hljs-selector-tag,
95
- .hljs-section,
96
- .hljs-title {
97
- font-weight: 600;
98
- }
99
-
100
- button.copy {
101
- background: var(--doc-gray-200);
102
- border: none;
103
- border-radius: 3px;
104
- padding: 0.2rem 0.5rem;
105
- font-size: 1rem;
106
- font-weight: 400;
107
- color: var(--doc-gray-600);
108
- cursor: pointer;
109
-
110
- transition: background 0.2s, color 0.2s;
111
- outline-width: 2px;
112
-
113
- &:hover {
114
- background: white;
115
- color: var(--doc-primary-dark);
116
- }
117
- &.copied {
118
- background: var(--doc-primary);
119
- color: white;
120
- }
121
- }
@@ -1,180 +0,0 @@
1
- // Demo block
2
-
3
- .example {
4
- position: relative;
5
- display: flex;
6
- flex-direction: column;
7
- padding: var(--standard-padding);
8
- border: 2px solid var(--doc-gray-200);
9
- border-radius: 16px;
10
- gap: 1rem;
11
- background: white;
12
-
13
- h2 {
14
- margin: 0;
15
- font-size: 1.5rem;
16
-
17
- }
18
-
19
- @media (max-width: 768px) {
20
- padding: 1rem;
21
- }
22
-
23
- &.white {
24
- background: white;
25
- }
26
- .code-block + * {
27
- margin-top: 1rem;
28
- }
29
- }
30
-
31
- .api {
32
- gap: 0;
33
- h3.code {
34
- font-size: 1.2rem;
35
- color: var(--doc-primary-dark);
36
- margin-bottom: 0.5rem;
37
- }
38
- h4 {
39
- font-size: 1.1rem;
40
- margin-bottom: 0.25rem;
41
- margin-top: 1rem;
42
- }
43
- dt {
44
- font-weight: 600;
45
- margin-top: 0.5rem;
46
- font-size: 0.9em;
47
- }
48
- }
49
-
50
- .card-row {
51
- display: flex;
52
- gap: 1.5rem;
53
- flex-wrap: wrap;
54
- }
55
-
56
- .card {
57
- flex: 1;
58
- min-width: 200px;
59
- border: 1px solid var(--doc-gray-200);
60
- border-radius: 8px;
61
- padding: 1rem;
62
- background: var(--doc-gray-50);
63
-
64
- h4 {
65
- margin-top: 0;
66
- margin-bottom: 0.5rem;
67
- }
68
- }
69
-
70
- // Demo Styles
71
- .demo {
72
- background: var(--doc-gray-50);
73
- border-radius: 8px;
74
- padding: var(--standard-padding);
75
- }
76
-
77
- .demo-controls {
78
- display: flex;
79
- gap: 1rem;
80
- margin-bottom: 1.5rem;
81
- flex-wrap: wrap;
82
- &.center {
83
- justify-content: center;
84
- }
85
-
86
- button {
87
- background: var(--doc-primary);
88
- color: white;
89
- border: none;
90
- padding: 0.5rem 1rem;
91
- border-radius: 24px;
92
- font-size: 1rem;
93
- cursor: pointer;
94
- transition: background 0.2s;
95
-
96
- &:hover {
97
- background: var(--doc-primary-dark);
98
- }
99
-
100
- &:disabled {
101
- opacity: 0.5;
102
- cursor: not-allowed;
103
- }
104
- &.secondary {
105
- background: var(--doc-secondary);
106
- }
107
- }
108
- }
109
-
110
- // SLOW DATA
111
-
112
- .recipe {
113
- display: flex;
114
- gap: 24px;
115
- align-items: center;
116
-
117
- & > * {
118
- flex: 1;
119
- }
120
- }
121
-
122
- .recipe-meta {
123
- display: flex;
124
- gap: 16px;
125
- margin: 16px 0;
126
- padding: 12px;
127
- background: white;
128
- border-radius: 8px;
129
- }
130
-
131
- img.testimage {
132
- display: block;
133
- margin-top: 1em;
134
- width: 100%;
135
- }
136
-
137
- img.recipe-image {
138
- width: 100%;
139
- max-width: 256px;
140
- border-radius: 8px;
141
- object-fit: cover;
142
- margin: 0 auto;
143
- }
144
-
145
- .recipe-meta span {
146
- font-size: 14px;
147
- }
148
-
149
- .recipe {
150
- display: grid;
151
- grid-template-columns: repeat(2, 1fr);
152
- grid-template-rows: 1fr;
153
- grid-column-gap: 2rem;
154
- grid-row-gap: 0px;
155
- margin-bottom: 2rem;
156
- }
157
-
158
- img.recipe-image {
159
- grid-area: 1 / 1 / 2 / 2;
160
- }
161
- .recipe-ingredients {
162
- grid-area: 1 / 2 / 2 / 3;
163
- }
164
-
165
- @media (max-width: 768px) {
166
- .recipe {
167
- display: flex;
168
- flex-direction: column;
169
-
170
- img {
171
- width: 100%;
172
- max-width: unset;
173
- max-height: 256px;
174
- }
175
- }
176
- .recipe-ingredients {
177
- margin-top: 2rem;
178
- width: 100%;
179
- }
180
- }
@@ -1,41 +0,0 @@
1
- // Landing Page Styles
2
-
3
- html.intro {
4
- .docs-content {
5
- // background: linear-gradient(135deg, var(--doc-primary) 0%, var(--doc-primary-dark) 100%);
6
-
7
- // min-height: 100vh;
8
- display: flex;
9
- flex-direction: column;
10
- padding: var(--standard-padding);
11
- text-align: center;
12
-
13
- .container {
14
- width: 100%;
15
- margin: auto auto;
16
- gap: var(--standard-padding);
17
- }
18
- .example {
19
- text-align: left;
20
- border: none;
21
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
22
- }
23
-
24
- p.lead {
25
- font-size: 1.25rem;
26
- opacity: 0.9;
27
- }
28
-
29
- }
30
- }
31
-
32
- .badge {
33
- display: inline-block;
34
- background: var(--doc-gray-200);
35
- padding: 0.25rem 0.75rem;
36
- border-radius: 999px;
37
- font-size: 1rem;
38
- font-weight: 400;
39
- margin-bottom: 1rem;
40
- line-height: 1.5em;
41
- }
@@ -1,80 +0,0 @@
1
- * {
2
- box-sizing: border-box;
3
- }
4
-
5
- .docs-layout {
6
- display: grid;
7
- grid-template-columns: var(--doc-sidebar-width) minmax(0, 1fr);
8
- min-height: 100vh;
9
- }
10
-
11
- .lane {
12
- background: white;
13
- &:nth-child(even) {
14
- background: var(--doc-gray-50);
15
- }
16
- padding: 2rem 0;
17
- }
18
- .container {
19
- max-width: 900px;
20
- margin: 0 auto;
21
- padding: 0 var(--standard-padding);
22
- display: flex;
23
- flex-direction: column;
24
- gap: 1rem;
25
-
26
- & + & {
27
- margin-top: 2rem;
28
- }
29
- }
30
-
31
-
32
- .docs-content {
33
- width: 100% !important;
34
- display: flex;
35
- flex: 1;
36
- flex-direction: column;
37
-
38
- .page-header {
39
-
40
- .lead {
41
- font-size: 1.25rem;
42
- color: var(--doc-gray-600);
43
- }
44
- }
45
- }
46
-
47
- // Responsive
48
- @media (max-width: 768px) {
49
-
50
-
51
-
52
- .docs-layout {
53
- grid-template-columns: 1fr;
54
- width: 100% !important;
55
- }
56
- .docs-content {
57
- width: 100% !important;
58
- min-width: 300px;
59
- }
60
-
61
- // .docs-sidebar {
62
- // position: static;
63
- // height: auto;
64
- // border-right: none;
65
- // border-bottom: 1px solid var(--doc-gray-200);
66
- // // padding: 2rem 1rem;
67
- // }
68
- }
69
-
70
- // // Responsive
71
- // @media (min-width: 769px) {
72
-
73
- // .docs-sidebar {
74
- // position: static;
75
- // height: auto;
76
- // border-right: none;
77
- // border-bottom: 1px solid var(--doc-gray-200);
78
- // padding: 2rem 1rem;
79
- // }
80
- // }
@@ -1,67 +0,0 @@
1
-
2
- .docs-sidebar {
3
- background: var(--doc-gray-100);
4
- border-bottom: 1px solid var(--doc-gray-200);
5
- padding: var(--standard-padding);
6
- // position: sticky;
7
- // top: 0;
8
- // height: 100vh;
9
- // overflow-y: auto;
10
-
11
-
12
- // Responsive
13
- @media (min-width: 769px) {
14
- position: sticky;
15
- border-right: 1px solid var(--doc-gray-200);
16
- top: 0;
17
- height: 100vh;
18
- }
19
-
20
- .logo {
21
- font-size: 1.25rem;
22
- font-weight: 500;
23
- margin-bottom: 2rem;
24
- color: var(--doc-primary);
25
- }
26
-
27
- nav {
28
- ul {
29
- list-style: none;
30
- display: flex;
31
- flex-direction: column;
32
- gap: 0.5rem;
33
-
34
- a {
35
- display: block;
36
- padding: 0.5rem 0.75rem;
37
- border-radius: 6px;
38
- color: var(--doc-gray-600);
39
-
40
- &:hover {
41
- background: white;
42
- color: var(--doc-primary);
43
- text-decoration: none;
44
- box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
45
- }
46
-
47
- &.active {
48
- background: var(--doc-primary);
49
- color: white;
50
- }
51
- }
52
- }
53
-
54
- .nav-section {
55
- margin-top: 1.5rem;
56
-
57
- h4 {
58
- font-size: 0.75rem;
59
- text-transform: uppercase;
60
- letter-spacing: 0.05em;
61
- color: var(--doc-gray-600);
62
- margin: 0 0 0.5rem;
63
- padding: 0 0.75rem;
64
- }
65
- }
66
- }
67
- }
@@ -1,116 +0,0 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
2
-
3
- @import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap");
4
-
5
-
6
-
7
-
8
- // Typography
9
-
10
- body {
11
- font-family: "Source Sans 3", sans-serif;
12
- font-weight: 400;
13
- font-size: 1rem;
14
- line-height: 1.5;
15
- color: var(--doc-gray-800);
16
- }
17
-
18
- code, .code {
19
- font-family: "JetBrains Mono", monospace;
20
- .code-block & {
21
- line-height: 1.6;
22
- font-size: 0.9em;
23
- }
24
- }
25
-
26
- h1, h2, h3, h4 {
27
- line-height: 1.2;
28
- &:first-child {
29
- margin-top: 0;
30
- }
31
- }
32
-
33
- h1 {
34
- font-weight: 300;
35
- }
36
- h2, h3, h4 {
37
- font-weight: 500;
38
- }
39
-
40
- h1 {
41
- font-size: 3rem;
42
- }
43
- h2 {
44
- font-size: 1.7rem;
45
- }
46
- h3 {
47
- font-size: 1.25rem;
48
- }
49
- h4 {
50
- font-size: 1.25rem;
51
- }
52
-
53
- a {
54
- color: var(--doc-primary);
55
- text-decoration: none;
56
- &:hover {
57
- text-decoration: underline;
58
- }
59
- }
60
- p a, dl a {
61
- text-decoration: underline;
62
- }
63
-
64
-
65
- .example, .lane {
66
- ul, ol {
67
- list-style: none;
68
- position: relative;
69
- padding: 0 0 0 1em;
70
- margin: 0;
71
- counter-reset: list;
72
-
73
- * + & {
74
- margin-top: var(--spacing-md);
75
- }
76
-
77
- li {
78
- padding-left: var(--spacing-lg);
79
-
80
- & + li {
81
- margin-top: 0.5em;
82
- }
83
-
84
- &::before {
85
- color: var(--doc-primary);
86
- position: absolute;
87
- }
88
- }
89
- }
90
-
91
- ul li::before {
92
- content: "•";
93
- left: 1px;
94
- font-weight: bold;
95
- }
96
-
97
- ol li {
98
- margin-bottom: 0;
99
-
100
- &::before {
101
- counter-increment: list;
102
- content: counter(list) ".";
103
- left: 0;
104
- font-weight: 500;
105
- }
106
- }
107
- }
108
-
109
- .docs-sidebar li a, button, .btn {
110
- line-height: 1.5rem;
111
-
112
- &:focus-visible {
113
- outline: 3px solid var(--doc-primary);
114
- outline-offset: 2px;
115
- }
116
- }
@@ -1,32 +0,0 @@
1
- :root {
2
- --doc-primary: #3b82f6;
3
- --doc-primary-dark: #2563eb;
4
-
5
- --doc-secondary: rgb(15, 120, 103);
6
-
7
- --doc-gray-50: #f9fafb;
8
- --doc-gray-100: #f3f4f6;
9
- --doc-gray-200: #e5e7eb;
10
- --doc-gray-600: #4b5563;
11
- --doc-gray-900: #111827;
12
- --doc-green-500: #009500;
13
- --doc-max-width: 1000px;
14
- --doc-sidebar-width: 200px;
15
- --doc-demo-color: #009300;
16
- --doc-code-transparent: #a5a5a533;
17
-
18
- --padding-large: 1.25rem;
19
- --padding-medium: 1rem;
20
- --padding-small: 0.75rem;
21
-
22
- --standard-padding: var(--padding-small);
23
-
24
- @media (min-width: 480px) {
25
- --standard-padding: var(--padding-medium);
26
- }
27
- @media (min-width: 769px) {
28
- --standard-padding: var(--padding-large);
29
- --doc-sidebar-width: 256px;
30
- }
31
-
32
- }
@@ -1,64 +0,0 @@
1
- /**
2
- * Documentation Styles
3
- * These styles are only for the docs site, not part of the library
4
- */
5
-
6
- @use "_variables.scss";
7
- @use "_base.scss";
8
- @use "_typography.scss";
9
- @use "_code.scss";
10
- @use "_demos.scss";
11
- @use "_layout.scss";
12
- @use "_landingpage.scss";
13
- @use "_sidebar.scss";
14
-
15
- // Variables
16
- // [data-panelset = "true"] {
17
- // border: 1px dashed var(--doc-demo-color); /* Show that the PanelSet is initialized for this container */
18
- // }
19
-
20
- .panel-wrapper h3 {
21
- margin-bottom: 0.5rem;
22
- font-weight: 500;
23
- }
24
-
25
- // Utility classes
26
- .text-center { text-align: center; }
27
- .text-muted { color: var(--doc-gray-600); }
28
- .mt-0 { margin-top: 0 !important; }
29
- .mb-2 { margin-bottom: 2rem; }
30
- .badge {
31
- display: inline-block;
32
- padding: 0.25rem 0.5rem;
33
- border-radius: 4px;
34
- font-size: 0.875rem;
35
- font-weight: 600;
36
-
37
- &.badge-new {
38
- background: #10b981;
39
- color: white;
40
- }
41
-
42
- &.badge-full {
43
- background: var(--doc-primary);
44
- color: white;
45
- }
46
- }
47
-
48
- // Responsive
49
- @media (max-width: 768px) {
50
- .docs-layout {
51
- grid-template-columns: 1fr;
52
- }
53
-
54
- .docs-sidebar {
55
- position: static;
56
- height: auto;
57
- border-right: none;
58
- border-bottom: 1px solid var(--doc-gray-200);
59
- }
60
-
61
- .version-picker {
62
- grid-template-columns: 1fr;
63
- }
64
- }