@functionalcms/svelte-components 2.34.2 → 2.34.4

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,206 +1,5 @@
1
- <style>
2
-
3
- /* ---------- GLOBAL STYLES ---------- */
4
- /* Note this component requires global styles and doesn't get copied over from copystyles.js
5
- and is "locked down". Svelte no longer appears to support <style global> and CSS Modules support
6
- isn't built in. So, not ideal, but this is what we'll have to do for this component. */
7
-
8
- /* These are styles for the case where classNames.closeButton property was NOT
9
- passed in and so we're generating the default close 'X' button on the upper right. */
10
- :global(.dialog-close-button) {
11
- display: inline-flex;
12
- align-items: center;
13
- justify-content: center;
14
- background-color: transparent;
15
- border: 0;
16
- border-radius: 0;
17
- box-shadow: none;
18
- width: var(--fluid-32);
19
- height: var(--fluid-32);
20
- }
21
-
22
- :global(.dialog-close-button:hover,
23
- .dialog-close-button:active,
24
- .dialog-close-button:focus) {
25
- background: none;
26
-
27
- /* Needed for High Contrast mode */
28
- outline: var(--functional-focus-ring-outline-width)
29
- var(--functional-focus-ring-outline-style)
30
- var(--functional-focus-ring-outline-color);
31
- }
32
-
33
- :global(.dialog-close-button:focus) {
34
- box-shadow: 0 0 0 3px var(--functional-focus-ring-color);
35
- transition: box-shadow var(--functional-timing-fast) ease-out;
36
- }
37
-
38
- @media (prefers-reduced-motion), (update: slow) {
39
- :global(.dialog-close-button:focus) {
40
- transition-duration: 0.001ms !important;
41
- }
42
- }
43
-
44
- :global(.close-button-large > .close) {
45
- width: var(--fluid-16);
46
- height: var(--fluid-16);
47
- }
48
-
49
- :global(.dialog-close-button:hover .close) {
50
- opacity: 100%;
51
- }
52
-
53
-
54
- :global(.dialog),
55
- :global(.dialog-overlay) {
56
- position: fixed;
57
- top: 0;
58
- right: 0;
59
- bottom: 0;
60
- left: 0;
61
- }
62
-
63
- :global(.dialog) {
64
- z-index: 1001;
65
- display: flex;
66
- }
67
-
68
- :global(.dialog[aria-hidden="true"]) {
69
- display: none;
70
- }
71
-
72
- :global(.dialog-overlay) {
73
- background-color: rgb(50 50 50 / 60%);
74
- animation: fade-in var(--functional-timing-fast) both;
75
- }
76
-
77
- :global(.dialog-content) {
78
- background-color: var(--functional-light);
79
- margin: auto;
80
- z-index: 1001;
81
- position: relative;
82
- padding: var(--fluid-16);
83
- max-width: 90%;
84
- width: 600px;
85
- border-radius: var(--functional-radius);
86
- }
87
-
88
- :global(.dialog-fade-in) {
89
- animation: fade-in var(--functional-timing-fast) both;
90
- }
91
-
92
- :global(.dialog-slide-up) {
93
- animation: slide-up var(--functional-timing-slow) var(--functional-timing-fast) both;
94
- }
95
-
96
- /**
97
- * Cannot use two separate CSS classes with animation: foo, bar
98
- * as the later class will overwrite the first (so this combines)
99
- */
100
- :global(.dialog-slide-up-fade-in) {
101
- animation:
102
- fade-in var(--functional-timing-fast) both,
103
- slide-up var(--functional-timing-slow) var(--functional-timing-fast) both;
104
- }
105
-
106
- @media screen and (min-width: 700px) {
107
- :global(.dialog-content) {
108
- padding: var(--fluid-32);
109
- }
110
- }
111
-
112
- @keyframes -global-fade-in {
113
- from {
114
- opacity: 0%;
115
- }
116
- }
117
-
118
- @keyframes -global-slide-up {
119
- from {
120
- transform: translateY(10%);
121
- }
122
- }
123
-
124
- /* Shared with AgnosticUI close buton so only need positioning and transition */
125
- :global(.dialog-close) {
126
- position: absolute;
127
- top: var(--fluid-8);
128
- right: var(--fluid-8);
129
- }
130
-
131
- @media (prefers-reduced-motion), (update: slow) {
132
- :global(.dialog-slide-up-fade-in, .dialog-fade-in, .dialog-slide-up, .dialog-content) {
133
- transition-duration: 0.001ms !important;
134
- }
135
- }
136
-
137
- @media only screen and (min-width: 576px) {
138
- :global(.dialog-close) {
139
- top: var(--fluid-12);
140
- right: var(--fluid-12);
141
- }
142
- }
143
-
144
- @media screen and (min-width: 768px) {
145
- :global(.dialog-close) {
146
- top: var(--fluid-16);
147
- right: var(--fluid-16);
148
- }
149
- }
150
-
151
- /* We use div.drawer-* for specificity battle :( */
152
- :global(div.drawer-start) {
153
- right: initial;
154
- }
155
-
156
- :global(div.drawer-start[aria-hidden]) {
157
- transform: none;
158
- }
159
-
160
- :global(div.drawer-end) {
161
- left: initial;
162
- }
163
-
164
- :global(div.drawer-end[aria-hidden]) {
165
- transform: none;
166
- }
167
-
168
- :global(div.drawer-top) {
169
- bottom: initial;
170
- transform: none;
171
- }
172
-
173
- :global(div.drawer-top[aria-hidden]) {
174
- transform: none;
175
- }
176
-
177
- :global(div.drawer-bottom) {
178
- top: initial;
179
- transform: none;
180
- }
181
-
182
- :global(div.drawer-bottom[aria-hidden]) {
183
- transform: none;
184
- }
185
-
186
- :global(div.drawer-content) {
187
- margin: initial;
188
- max-width: initial;
189
- border-radius: initial;
190
- }
191
-
192
- :global(div.drawer-start div.drawer-content, div.drawer-end div.drawer-content) {
193
- width: 25rem;
194
- }
195
-
196
- :global(div.drawer-top div.drawer-content, div.drawer-bottom div.drawer-content) {
197
- height: 25vh;
198
- width: 100%;
199
- }
200
- </style>
201
-
202
- <script>import Close from "../Close/Close.svelte";
203
- import SvelteA11yDialog from "svelte-a11y-dialog/SvelteA11yDialog.svelte";
1
+ <script>import Close from "../Close/Close.svelte";
2
+ import SvelteA11yDialog from "./SvelteA11yDialog.svelte";
204
3
  import { createEventDispatcher } from "svelte";
205
4
  const dispatch = createEventDispatcher();
206
5
  export let id;
@@ -228,10 +27,7 @@ const documentClasses = [
228
27
  isAnimationFadeIn && !isAnimationSlideUp ? "dialog-fade-in" : "",
229
28
  drawerPlacement.length ? "drawer-content" : ""
230
29
  ].filter((c) => c).join(" ");
231
- const containerClasses = [
232
- "dialog",
233
- drawerPlacement ? `drawer-${drawerPlacement}` : ""
234
- ].filter((c) => c).join(" ");
30
+ const containerClasses = ["dialog", drawerPlacement ? `drawer-${drawerPlacement}` : ""].filter((c) => c).join(" ");
235
31
  const defaultClassNames = {
236
32
  container: containerClasses,
237
33
  document: documentClasses,
@@ -245,21 +41,216 @@ $: getClassNames = () => {
245
41
  return { ...defaultClassNames, ...classNames };
246
42
  };
247
43
  </script>
248
-
249
- <SvelteA11yDialog
250
- id={id}
251
- dialogRoot={dialogRoot}
252
- closeButtonLabel={closeButtonLabel}
253
- closeButtonPosition={closeButtonPosition}
254
- title={title}
255
- titleId={titleId}
256
- role={role}
257
- classNames={getClassNames()}
258
- on:instance={assignDialogInstance}
259
- >
260
- <slot name="closeButtonContent" slot="closeButtonContent">
261
- <Close isFaux size="large" />
262
- </slot>
263
- <slot />
264
- </SvelteA11yDialog>
265
-
44
+
45
+ <SvelteA11yDialog
46
+ {id}
47
+ {dialogRoot}
48
+ {closeButtonLabel}
49
+ {closeButtonPosition}
50
+ {title}
51
+ {titleId}
52
+ {role}
53
+ classNames={getClassNames()}
54
+ on:instance={assignDialogInstance}
55
+ >
56
+ <slot name="closeButtonContent" slot="closeButtonContent">
57
+ <Close isFaux size="large" />
58
+ </slot>
59
+ <slot />
60
+ </SvelteA11yDialog>
61
+
62
+ <style>
63
+ /* ---------- GLOBAL STYLES ---------- */
64
+ /* Note this component requires global styles and doesn't get copied over from copystyles.js
65
+ and is "locked down". Svelte no longer appears to support <style global> and CSS Modules support
66
+ isn't built in. So, not ideal, but this is what we'll have to do for this component. */
67
+
68
+ /* These are styles for the case where classNames.closeButton property was NOT
69
+ passed in and so we're generating the default close 'X' button on the upper right. */
70
+ :global(.dialog-close-button) {
71
+ display: inline-flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ background-color: transparent;
75
+ border: 0;
76
+ border-radius: 0;
77
+ box-shadow: none;
78
+ width: var(--fluid-32);
79
+ height: var(--fluid-32);
80
+ }
81
+
82
+ :global(.dialog-close-button:hover, .dialog-close-button:active, .dialog-close-button:focus) {
83
+ background: none;
84
+
85
+ /* Needed for High Contrast mode */
86
+ outline: var(--functional-focus-ring-outline-width) var(--functional-focus-ring-outline-style)
87
+ var(--functional-focus-ring-outline-color);
88
+ }
89
+
90
+ :global(.dialog-close-button:focus) {
91
+ box-shadow: 0 0 0 3px var(--functional-focus-ring-color);
92
+ transition: box-shadow var(--functional-timing-fast) ease-out;
93
+ }
94
+
95
+ @media (prefers-reduced-motion), (update: slow) {
96
+ :global(.dialog-close-button:focus) {
97
+ transition-duration: 0.001ms !important;
98
+ }
99
+ }
100
+
101
+ :global(.close-button-large > .close) {
102
+ width: var(--fluid-16);
103
+ height: var(--fluid-16);
104
+ }
105
+
106
+ :global(.dialog-close-button:hover .close) {
107
+ opacity: 100%;
108
+ }
109
+
110
+ :global(.dialog),
111
+ :global(.dialog-overlay) {
112
+ position: fixed;
113
+ top: 0;
114
+ right: 0;
115
+ bottom: 0;
116
+ left: 0;
117
+ }
118
+
119
+ :global(.dialog) {
120
+ z-index: 1001;
121
+ display: flex;
122
+ }
123
+
124
+ :global(.dialog[aria-hidden='true']) {
125
+ display: none;
126
+ }
127
+
128
+ :global(.dialog-overlay) {
129
+ background-color: rgb(50 50 50 / 60%);
130
+ animation: fade-in var(--functional-timing-fast) both;
131
+ }
132
+
133
+ :global(.dialog-content) {
134
+ background-color: var(--functional-light);
135
+ margin: auto;
136
+ z-index: 1001;
137
+ position: relative;
138
+ padding: var(--fluid-16);
139
+ max-width: 90%;
140
+ width: 600px;
141
+ border-radius: var(--functional-radius);
142
+ }
143
+
144
+ :global(.dialog-fade-in) {
145
+ animation: fade-in var(--functional-timing-fast) both;
146
+ }
147
+
148
+ :global(.dialog-slide-up) {
149
+ animation: slide-up var(--functional-timing-slow) var(--functional-timing-fast) both;
150
+ }
151
+
152
+ /**
153
+ * Cannot use two separate CSS classes with animation: foo, bar
154
+ * as the later class will overwrite the first (so this combines)
155
+ */
156
+ :global(.dialog-slide-up-fade-in) {
157
+ animation:
158
+ fade-in var(--functional-timing-fast) both,
159
+ slide-up var(--functional-timing-slow) var(--functional-timing-fast) both;
160
+ }
161
+
162
+ @media screen and (min-width: 700px) {
163
+ :global(.dialog-content) {
164
+ padding: var(--fluid-32);
165
+ }
166
+ }
167
+
168
+ @keyframes -global-fade-in {
169
+ from {
170
+ opacity: 0%;
171
+ }
172
+ }
173
+
174
+ @keyframes -global-slide-up {
175
+ from {
176
+ transform: translateY(10%);
177
+ }
178
+ }
179
+
180
+ /* Shared with AgnosticUI close buton so only need positioning and transition */
181
+ :global(.dialog-close) {
182
+ position: absolute;
183
+ top: var(--fluid-8);
184
+ right: var(--fluid-8);
185
+ }
186
+
187
+ @media (prefers-reduced-motion), (update: slow) {
188
+ :global(.dialog-slide-up-fade-in, .dialog-fade-in, .dialog-slide-up, .dialog-content) {
189
+ transition-duration: 0.001ms !important;
190
+ }
191
+ }
192
+
193
+ @media only screen and (min-width: 576px) {
194
+ :global(.dialog-close) {
195
+ top: var(--fluid-12);
196
+ right: var(--fluid-12);
197
+ }
198
+ }
199
+
200
+ @media screen and (min-width: 768px) {
201
+ :global(.dialog-close) {
202
+ top: var(--fluid-16);
203
+ right: var(--fluid-16);
204
+ }
205
+ }
206
+
207
+ /* We use div.drawer-* for specificity battle :( */
208
+ :global(div.drawer-start) {
209
+ right: initial;
210
+ }
211
+
212
+ :global(div.drawer-start[aria-hidden]) {
213
+ transform: none;
214
+ }
215
+
216
+ :global(div.drawer-end) {
217
+ left: initial;
218
+ }
219
+
220
+ :global(div.drawer-end[aria-hidden]) {
221
+ transform: none;
222
+ }
223
+
224
+ :global(div.drawer-top) {
225
+ bottom: initial;
226
+ transform: none;
227
+ }
228
+
229
+ :global(div.drawer-top[aria-hidden]) {
230
+ transform: none;
231
+ }
232
+
233
+ :global(div.drawer-bottom) {
234
+ top: initial;
235
+ transform: none;
236
+ }
237
+
238
+ :global(div.drawer-bottom[aria-hidden]) {
239
+ transform: none;
240
+ }
241
+
242
+ :global(div.drawer-content) {
243
+ margin: initial;
244
+ max-width: initial;
245
+ border-radius: initial;
246
+ }
247
+
248
+ :global(div.drawer-start div.drawer-content, div.drawer-end div.drawer-content) {
249
+ width: 25rem;
250
+ }
251
+
252
+ :global(div.drawer-top div.drawer-content, div.drawer-bottom div.drawer-content) {
253
+ height: 25vh;
254
+ width: 100%;
255
+ }
256
+ </style>
@@ -1,13 +1,15 @@
1
1
  <script>import { HeaderNavigationItem } from "./Menu.js";
2
2
  import { page } from "$app/stores";
3
3
  import { isSelected } from "./MenuFunctions.js";
4
+ import ColumnMenu from "./ColumnMenu.svelte";
5
+ import { Orientation } from "../Styling.js";
4
6
  export let css = "";
5
7
  export let localPages = [];
6
8
  export let includeSubpagesForSelect = false;
7
- const klasses = ["flex", "flex-dynamic-row", css ? css : ""].filter((c) => c).join(" ");
8
9
  </script>
9
10
 
10
- <ul class={klasses}>
11
+ <ColumnMenu localPages={localPages} orientation={Orientation.DynamicRow} css={css}/>
12
+ <!-- <ul class={klasses}>
11
13
  {#each localPages as pageItem}
12
14
  <li aria-current={isSelected(includeSubpagesForSelect, $page, pageItem)}>
13
15
  <span class="screenreader-only">Navigate to {pageItem.name}</span>
@@ -16,7 +18,7 @@ const klasses = ["flex", "flex-dynamic-row", css ? css : ""].filter((c) => c).jo
16
18
  </a>
17
19
  </li>
18
20
  {/each}
19
- </ul>
21
+ </ul> -->
20
22
 
21
23
  <style>
22
24
  ul {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@functionalcms/svelte-components",
3
- "version": "2.34.2",
3
+ "version": "2.34.4",
4
4
  "watch": {
5
5
  "build": {
6
6
  "patterns": [
@@ -50,6 +50,7 @@
50
50
  "@sveltejs/adapter-auto": "^3.1.0",
51
51
  "@sveltejs/package": "^2.2.5",
52
52
  "@sveltejs/vite-plugin-svelte": "^3.0.1",
53
+ "ioredis": "^5.4.1",
53
54
  "npm-watch": "^0.11.0",
54
55
  "publint": "^0.2.7",
55
56
  "sass": "^1.69.7",