@canopy-iiif/app 1.9.1 → 1.9.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopy-iiif/app",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "Mat Jordan <mat@northwestern.edu>",
@@ -1,6 +1,6 @@
1
1
  @layer base {
2
2
  h1 {
3
- font-size: 2.61rem;
3
+ font-size: 2rem;
4
4
  line-height: 1.25;
5
5
  margin: 0 0 1rem 0;
6
6
  }
@@ -43,7 +43,6 @@ blockquote {
43
43
  }
44
44
 
45
45
  tbody {
46
- box-shadow: 5px 5px 11px rgba(0, 0, 0, 0.05);
47
46
 
48
47
  tr {
49
48
  &:nth-child(even) {
@@ -47,6 +47,5 @@
47
47
  background: color-mix(in srgb, var(--color-accent-500) 38.2%, transparent);
48
48
  color: inherit;
49
49
  padding: 0.05rem 0.25rem;
50
- border-radius: 0.2rem;
51
50
  }
52
51
  }
@@ -1,50 +1,61 @@
1
+ @mixin canopy-button-base($padding-y: 0.6rem, $padding-x: 1.4rem) {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ gap: 0.35rem;
6
+ padding: $padding-y $padding-x;
7
+ border: 1px solid currentColor;
8
+ color: inherit;
9
+ font: inherit;
10
+ text-decoration: none;
11
+ cursor: pointer;
12
+ line-height: 1.4;
13
+ transition:
14
+ background-color 0.2s ease,
15
+ color 0.2s ease,
16
+ border-color 0.2s ease;
17
+ }
18
+
19
+ @mixin canopy-button-variant($variant) {
20
+ @if $variant == "primary" {
21
+ background-color: var(--color-accent-default);
22
+ border-color: var(--color-accent-default);
23
+ color: var(--color-accent-50);
24
+
25
+ &:hover,
26
+ &:focus-visible {
27
+ background-color: var(--color-accent-600);
28
+ border-color: var(--color-accent-600);
29
+ }
30
+ } @else if $variant == "secondary" {
31
+ border-color: var(--color-gray-400);
32
+ color: var(--color-gray-900);
33
+
34
+ &:hover,
35
+ &:focus-visible {
36
+ border-color: var(--color-accent-400);
37
+ color: var(--color-accent-900);
38
+ }
39
+ } @else if $variant == "ghost" {
40
+ border-color: transparent;
41
+ }
42
+ }
43
+
1
44
  @layer components {
2
45
  .canopy-button {
3
- display: inline-flex;
4
- align-items: center;
5
- justify-content: center;
6
- gap: 0.35rem;
7
- padding: 0.55rem 1.4rem;
8
- border-radius: 9999px;
9
- font-size: 0.9222rem;
10
- font-weight: 300;
11
- text-decoration: none;
12
- transition:
13
- background-color 0.2s ease,
14
- color 0.2s ease,
15
- border-color 0.2s ease,
16
- box-shadow 0.2s ease;
46
+ @include canopy-button-base();
47
+ border-color: currentColor;
17
48
 
18
49
  &--primary {
19
- background-color: var(--color-accent-default);
20
- color: var(--color-accent-50);
21
- box-shadow: 0 18px 32px -22px rgba(15, 23, 42, 0.55);
22
-
23
- &:hover,
24
- &:focus-visible {
25
- background-color: var(--color-accent-600);
26
- }
50
+ @include canopy-button-variant("primary");
27
51
  }
28
52
 
29
53
  &--secondary {
30
- border: 1px solid var(--color-gray-200);
31
- color: color-mix(in srgb, var(--color-gray-900) 92%, transparent);
32
- background-color: var(--color-gray-50);
54
+ @include canopy-button-variant("secondary");
55
+ }
33
56
 
34
- &:hover,
35
- &:focus-visible {
36
- border-color: color-mix(
37
- in srgb,
38
- var(--color-accent-400) 65%,
39
- transparent
40
- );
41
- background-color: color-mix(
42
- in srgb,
43
- var(--color-accent-300) 25%,
44
- transparent
45
- );
46
- color: var(--color-accent-900);
47
- }
57
+ &--ghost {
58
+ @include canopy-button-variant("ghost");
48
59
  }
49
60
  }
50
61
 
@@ -56,8 +67,6 @@
56
67
  }
57
68
 
58
69
  .canopy-button-group__text {
59
- font-size: 1.38rem;
60
- font-weight: 500;
61
70
  color: var(--color-gray-900);
62
71
  margin-bottom: 1rem;
63
72
  letter-spacing: -0.0125em;
@@ -67,7 +76,7 @@
67
76
  display: flex;
68
77
  flex-wrap: wrap;
69
78
  align-items: center;
70
- gap: 0.75rem;
79
+ gap: 1rem;
71
80
  padding: 0.618rem 0 1.618rem;
72
81
  width: 100%;
73
82
  }
@@ -78,12 +87,6 @@
78
87
  text-align: center;
79
88
  padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 4vw, 4rem);
80
89
  margin: 2rem 0;
81
- border-radius: 1.25rem;
82
- background: linear-gradient(
83
- 173deg,
84
- transparent 0%,
85
- var(--color-accent-200) 100%
86
- );
87
90
  }
88
91
 
89
92
  .canopy-button-group--interstitial .canopy-button-group__actions {
@@ -4,12 +4,8 @@
4
4
  text-decoration: none;
5
5
  color: inherit;
6
6
  border: 1px solid var(--color-gray-200);
7
- border-radius: 0.5rem;
8
7
  overflow: hidden;
9
8
  transition: all 150ms cubic-bezier(0.22, 1, 0.36, 1);
10
- box-shadow:
11
- 0 1px 3px 0 rgba(0, 0, 0, 0.05),
12
- 0 1px 3px 0 rgba(0, 0, 0, 0.05);
13
9
 
14
10
  figure {
15
11
  margin: 0;
@@ -19,7 +15,6 @@
19
15
  position: relative;
20
16
  width: 100%;
21
17
  padding-bottom: var(--canopy-card-padding);
22
- background-color: var(--color-gray-100);
23
18
  overflow: hidden;
24
19
 
25
20
  > img {
@@ -34,7 +29,6 @@
34
29
  flex-direction: column;
35
30
  opacity: 0;
36
31
  transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1);
37
- background: var(--color-gray-100);
38
32
  color: var(--color-gray-muted);
39
33
  font-size: 83.333%;
40
34
  }
@@ -71,8 +65,5 @@
71
65
  &:hover,
72
66
  &:focus {
73
67
  color: var(--color-accent-default);
74
- box-shadow:
75
- 0 1px 2px 0 rgba(0, 0, 0, 0.07),
76
- 0 1px 2px 0 rgba(0, 0, 0, 0.07);
77
68
  }
78
69
  }
@@ -28,7 +28,6 @@
28
28
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
29
29
 
30
30
  article {
31
- border-radius: 1.25rem;
32
31
  background: linear-gradient(
33
32
  173deg,
34
33
  transparent 0%,
@@ -1,3 +1,5 @@
1
+ @use "./buttons" as buttons;
2
+
1
3
  .canopy-gallery {
2
4
  position: relative;
3
5
  padding: 0;
@@ -57,8 +59,6 @@
57
59
  height: 100%;
58
60
  padding: clamp(0.75rem, 1vw, 1rem);
59
61
  border: 1px solid var(--color-gray-200);
60
- border-radius: var(--canopy-gallery-radius, 1rem);
61
- box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
62
62
 
63
63
  &:focus-within {
64
64
  outline: 2px solid var(--color-accent-default, #3b82f6);
@@ -70,7 +70,6 @@
70
70
  position: relative;
71
71
  aspect-ratio: 1/1;
72
72
  overflow: hidden;
73
- border-radius: calc(var(--canopy-gallery-radius, 1rem) - 0.25rem);
74
73
  background: var(--color-gray-100);
75
74
 
76
75
  img,
@@ -145,12 +144,10 @@
145
144
  &__trigger {
146
145
  position: absolute;
147
146
  inset: 0;
148
- border-radius: inherit;
149
147
  text-decoration: none;
150
148
  border: 0;
151
149
  z-index: 2;
152
150
  color: inherit;
153
- background: transparent;
154
151
  }
155
152
  }
156
153
 
@@ -294,8 +291,6 @@ body[data-canopy-gallery-locked="1"] {
294
291
  width: min(960px, calc(100% - clamp(2rem, 4vw, 4rem)));
295
292
  height: auto;
296
293
  max-height: min(90vh, 960px);
297
- border-radius: 0.75rem;
298
- box-shadow: 0 25px 60px rgba(15, 23, 42, 0.45);
299
294
  }
300
295
  }
301
296
 
@@ -328,7 +323,6 @@ body[data-canopy-gallery-locked="1"] {
328
323
 
329
324
  &::-webkit-scrollbar-thumb {
330
325
  background-color: rgba(15, 23, 42, 0.2);
331
- border-radius: 0.5rem;
332
326
  }
333
327
  }
334
328
 
@@ -357,7 +351,6 @@ body[data-canopy-gallery-locked="1"] {
357
351
  display: inline-flex;
358
352
  flex-direction: column;
359
353
  text-decoration: none;
360
- border-radius: 0.75rem;
361
354
  background: var(--color-gray-50);
362
355
  color: inherit;
363
356
  width: 100%;
@@ -378,7 +371,6 @@ body[data-canopy-gallery-locked="1"] {
378
371
  &__nav-thumb {
379
372
  width: 100%;
380
373
  aspect-ratio: 1 / 1;
381
- border-radius: 0.5rem;
382
374
  overflow: hidden;
383
375
  padding: 1px;
384
376
  outline: 3px solid var(--color-gray-50);
@@ -393,18 +385,16 @@ body[data-canopy-gallery-locked="1"] {
393
385
  display: block;
394
386
  opacity: 1;
395
387
  transition: all 0.2s ease;
396
- border-radius: 0.5rem;
397
388
  }
398
389
  }
399
390
 
400
391
  &__nav-button {
392
+ @include buttons.canopy-button-base(0.25rem, 0.75rem);
401
393
  flex: 0 0 auto;
402
394
  width: 5rem;
403
395
  height: 100%;
404
396
  color: var(--color-gray-900);
405
397
  font-size: 1.25rem;
406
- font-weight: 500;
407
- cursor: pointer;
408
398
  display: none;
409
399
  align-items: center;
410
400
  justify-content: center;
@@ -412,6 +402,7 @@ body[data-canopy-gallery-locked="1"] {
412
402
  top: 50%;
413
403
  transform: translateY(-50%);
414
404
  z-index: 5;
405
+ border: none;
415
406
  background: linear-gradient(to right, transparent, transparent);
416
407
 
417
408
  &--prev {
@@ -12,11 +12,9 @@
12
12
  --storiiies-viewer-button-bg: var(--color-accent-default);
13
13
  --storiiies-viewer-button-fg: var(--color-gray-50);
14
14
 
15
- border-radius: 0.5rem;
16
15
  position: relative;
17
16
  display: block;
18
17
  overflow: hidden;
19
- box-shadow: inset 0 0 0 1px #0000000d;
20
18
 
21
19
  .storiiies-viewer__info-text {
22
20
  margin-top: 1.618rem;
@@ -42,8 +40,6 @@
42
40
  }
43
41
 
44
42
  .storiiies-viewer__info-area {
45
- border-radius: 0.5rem;
46
- box-shadow: 5px 5px 21px #0001;
47
43
  font-weight: 300;
48
44
  }
49
45
 
@@ -1,3 +1,5 @@
1
+ @use "./buttons" as buttons;
2
+
1
3
  .canopy-interstitial {
2
4
  position: relative;
3
5
  width: 100%;
@@ -43,10 +45,9 @@
43
45
  display: flex;
44
46
  align-items: center;
45
47
  justify-content: center;
46
- padding: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3.5rem);
48
+ padding: clamp(1.618rem, 5vw, 3rem) clamp(1.618rem, 4vw, 3rem);
47
49
  box-sizing: border-box;
48
50
  min-width: 0;
49
- background: transparent;
50
51
  }
51
52
 
52
53
  .canopy-interstitial__body {
@@ -58,10 +59,6 @@
58
59
  gap: 1.5rem;
59
60
  }
60
61
 
61
- .canopy-interstitial__actions {
62
- justify-content: flex-start;
63
- }
64
-
65
62
  .canopy-interstitial__media-group {
66
63
  flex: 1;
67
64
  position: relative;
@@ -73,7 +70,6 @@
73
70
  box-sizing: border-box;
74
71
  min-width: 0;
75
72
  overflow: hidden;
76
- background: transparent;
77
73
  }
78
74
 
79
75
  .canopy-interstitial__caption {
@@ -97,10 +93,16 @@
97
93
  }
98
94
 
99
95
  @media (max-width: 63.9375rem) {
96
+ background: none !important;
97
+
100
98
  .canopy-interstitial__panel,
101
99
  .canopy-interstitial__media-group {
102
100
  width: 100%;
103
101
  }
102
+
103
+ .canopy-interstitial__media-group {
104
+ padding: 1rem 0 !important;
105
+ }
104
106
  }
105
107
 
106
108
  @media (min-width: 48rem) {
@@ -200,7 +202,6 @@
200
202
  width: 100%;
201
203
  min-height: var(--hero-height);
202
204
  overflow: hidden;
203
- background-color: color-mix(in srgb, var(--hero-bg-start) 65%, transparent);
204
205
  }
205
206
 
206
207
  &__pane::before,
@@ -222,7 +223,6 @@
222
223
  display: flex;
223
224
  flex-direction: column;
224
225
  height: var(--hero-height);
225
- background-color: transparent;
226
226
  }
227
227
 
228
228
  &__media {
@@ -241,7 +241,6 @@
241
241
  height: 100%;
242
242
  flex: 1 1 auto;
243
243
  overflow: hidden;
244
- border-radius: 0.75rem;
245
244
  }
246
245
 
247
246
  &__media--static {
@@ -302,13 +301,6 @@
302
301
  max-width: 42rem;
303
302
  }
304
303
 
305
- &__actions {
306
- display: flex;
307
- flex-wrap: wrap;
308
- justify-content: center;
309
- gap: 0.75rem;
310
- }
311
-
312
304
  &__caption {
313
305
  position: absolute;
314
306
  bottom: 1.75rem;
@@ -331,23 +323,16 @@
331
323
  }
332
324
 
333
325
  &__nav-btn {
326
+ @include buttons.canopy-button-base(0.25rem, 0.75rem);
334
327
  position: absolute;
335
328
  top: 50%;
336
329
  transform: translateY(-50%);
337
330
  width: 2.618rem !important;
338
331
  height: 2.618rem !important;
339
- border-radius: 9999px;
340
- cursor: pointer;
341
- display: inline-flex;
342
- align-items: center;
343
- justify-content: center;
344
- transition:
345
- background-color 0.2s ease,
346
- border-color 0.2s ease,
347
- color 0.2s ease;
348
- stroke: var(--color-accent-default) !important;
349
- color: var(--color-accent-default) !important;
332
+ color: var(--color-gray-50) !important;
333
+ background-color: var(--color-accent-default) !important;
350
334
  pointer-events: auto;
335
+ border: none;
351
336
 
352
337
  &::after {
353
338
  content: none;
@@ -358,19 +343,15 @@
358
343
  display: block;
359
344
  width: 1rem;
360
345
  height: 1rem;
361
- stroke: var(--color-accent-default);
346
+ stroke: var(--color-gray-50);
362
347
  }
363
348
 
364
349
  &--prev {
365
- left: 1.5rem;
350
+ left: 0 !important;
366
351
  }
367
352
 
368
353
  &--next {
369
- right: 1.5rem;
370
- }
371
-
372
- &:hover,
373
- &:focus-visible {
354
+ right: 0 !important;
374
355
  }
375
356
  }
376
357
 
@@ -388,7 +369,6 @@
388
369
  display: inline-block;
389
370
  width: 0.45rem;
390
371
  height: 0.45rem;
391
- border-radius: 9999px;
392
372
  background-color: var(--hero-dot-bg);
393
373
  opacity: 1;
394
374
  transition:
@@ -3,7 +3,6 @@
3
3
  position: relative;
4
4
  width: 100%;
5
5
  min-height: 320px;
6
- border-radius: 0.5rem;
7
6
  overflow: hidden;
8
7
  background-color: var(--color-gray-100);
9
8
  z-index: 0;
@@ -52,12 +51,10 @@
52
51
  max-width: 320px;
53
52
  z-index: 4;
54
53
  padding: 0.5rem 0.75rem;
55
- border-radius: 999px;
56
54
  background-color: rgba(15, 23, 42, 0.85);
57
55
  color: var(--color-gray-50);
58
56
  font-size: 0.875rem;
59
57
  line-height: 1.25rem;
60
- box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
61
58
  pointer-events: auto;
62
59
  }
63
60
 
@@ -89,7 +86,6 @@
89
86
  &-dot {
90
87
  width: 12px;
91
88
  height: 12px;
92
- border-radius: 999px;
93
89
  background-color: var(--color-accent-default);
94
90
  flex-shrink: 0;
95
91
  }
@@ -107,7 +103,6 @@
107
103
 
108
104
  &-media {
109
105
  width: 100%;
110
- border-radius: 0.25rem;
111
106
  overflow: hidden;
112
107
 
113
108
  img {
@@ -194,7 +189,6 @@
194
189
  }
195
190
  }
196
191
  .leaflet-marker-icon#{&}__marker {
197
- background: transparent;
198
192
  border: none;
199
193
  width: auto;
200
194
  height: auto;
@@ -213,8 +207,6 @@
213
207
  &__marker-solid {
214
208
  width: 40px;
215
209
  height: 40px;
216
- border-radius: 999px;
217
- box-shadow: 0 4px 10px rgba(15, 23, 42, 0.35);
218
210
  overflow: hidden;
219
211
  display: flex;
220
212
  align-items: center;
@@ -241,7 +233,6 @@
241
233
  }
242
234
 
243
235
  &__marker--label {
244
- background: transparent;
245
236
  border: none;
246
237
 
247
238
  &.is-hovered {
@@ -254,7 +245,6 @@
254
245
  }
255
246
 
256
247
  .canopy-map__marker-label-text {
257
- box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
258
248
  }
259
249
  }
260
250
  }
@@ -268,14 +258,12 @@
268
258
  background: #fffd;
269
259
  white-space: nowrap;
270
260
  position: relative;
271
- border-radius: 999px;
272
261
  padding-left: 4px;
273
262
  }
274
263
 
275
264
  &__marker-label-dot {
276
265
  width: 12px;
277
266
  height: 12px;
278
- border-radius: 999px;
279
267
  background-color: var(--color-accent-default);
280
268
  flex-shrink: 0;
281
269
  cursor: default;
@@ -300,13 +288,11 @@
300
288
  font-weight: 500;
301
289
  width: 40px;
302
290
  height: 40px;
303
- border-radius: 999px;
304
291
  background: var(--color-gray-default);
305
292
  color: var(--color-gray-50);
306
293
  display: flex;
307
294
  align-items: center;
308
295
  justify-content: center;
309
- box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
310
296
  box-sizing: content-box;
311
297
  }
312
298
  }
@@ -1,3 +1,5 @@
1
+ @use "./buttons" as buttons;
2
+
1
3
  .canopy-index {
2
4
  display: flex;
3
5
  flex-direction: column;
@@ -55,13 +57,10 @@
55
57
  }
56
58
 
57
59
  .canopy-index__more {
58
- padding: 0.45rem 1rem;
59
- font-size: 0.8333rem;
60
- border: 1px solid var(--color-accent-200);
61
- border-radius: 999px;
60
+ @include buttons.canopy-button-base(0.45rem, 1rem);
61
+ border-color: var(--color-accent-200);
62
62
  background: var(--color-accent-100);
63
63
  color: var(--color-accent-default);
64
- cursor: pointer;
65
64
  }
66
65
 
67
66
  .canopy-index__more:hover {
@@ -1,3 +1,5 @@
1
+ @use "./buttons" as buttons;
2
+
1
3
  @layer components {
2
4
  .canopy-nav-tree {
3
5
  color: inherit;
@@ -39,14 +41,10 @@
39
41
  }
40
42
 
41
43
  .canopy-nav-tree__toggle {
44
+ @include buttons.canopy-button-base(0.5rem, 0.5rem);
42
45
  appearance: none;
43
46
  border: none;
44
- background: transparent;
45
- padding: 0.5rem;
46
- display: inline-flex;
47
- align-items: center;
48
47
  justify-content: flex-end;
49
- cursor: pointer;
50
48
  width: 40px;
51
49
  height: 40px;
52
50
 
@@ -1,3 +1,5 @@
1
+ @use "./buttons" as buttons;
2
+
1
3
  .canopy-sub-navigation {
2
4
  color: inherit;
3
5
  }
@@ -104,7 +106,6 @@
104
106
  transition:
105
107
  background-color 150ms ease,
106
108
  border-color 150ms ease,
107
- box-shadow 150ms ease,
108
109
  padding 150ms ease;
109
110
  color: var(--color-gray-muted);
110
111
  }
@@ -113,7 +114,6 @@
113
114
  padding: 0.25rem;
114
115
  border-color: transparent;
115
116
  background: none;
116
- box-shadow: none;
117
117
  }
118
118
 
119
119
  .canopy-content-navigation--floating {
@@ -128,16 +128,10 @@
128
128
  }
129
129
 
130
130
  .canopy-content-navigation__toggle {
131
+ @include buttons.canopy-button-base(0.35rem, 0.75rem);
131
132
  align-self: flex-end;
132
- display: inline-flex;
133
- align-items: center;
134
- justify-content: center;
135
133
  color: color-mix(in srgb, var(--color-gray-900) 92%, transparent);
136
- font-size: 1rem;
137
- font-weight: 500;
138
- cursor: pointer;
139
- line-height: 1.2;
140
- transition: color 150ms ease;
134
+ border: none;
141
135
  }
142
136
 
143
137
  .canopy-content-navigation__toggle:hover,