@canopy-iiif/app 1.8.8 → 1.8.9

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,4 +1,3 @@
1
- @charset "UTF-8";
2
1
  /**
3
2
  * Main stylesheet for the @canopy-iiif/app/ui package
4
3
  */
@@ -3011,11 +3010,12 @@ html.dark .clover-iiif-image-openseadragon .clover-iiif-image-openseadragon-anno
3011
3010
  padding: 0;
3012
3011
  margin: 0;
3013
3012
  --canopy-gallery-gap: 1.5rem;
3014
- --canopy-gallery-min-column: 16rem;
3015
3013
  --canopy-gallery-radius: 1rem;
3014
+ --canopy-gallery-modal-actions-width: clamp(5rem, 18vw, 8rem);
3016
3015
  color: var(--color-gray-900);
3017
3016
  }
3018
- .canopy-gallery__close-anchor {
3017
+
3018
+ .canopy-gallery__close-anchor, .canopy-gallery__visually-hidden, .canopy-gallery__trigger-label, .canopy-gallery__nav-label {
3019
3019
  position: absolute;
3020
3020
  width: 1px;
3021
3021
  height: 1px;
@@ -3024,6 +3024,7 @@ html.dark .clover-iiif-image-openseadragon .clover-iiif-image-openseadragon-anno
3024
3024
  overflow: hidden;
3025
3025
  clip: rect(0 0 0 0);
3026
3026
  border: 0;
3027
+ white-space: nowrap;
3027
3028
  }
3028
3029
  .canopy-gallery__header {
3029
3030
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
@@ -3042,7 +3043,7 @@ html.dark .clover-iiif-image-openseadragon .clover-iiif-image-openseadragon-anno
3042
3043
  }
3043
3044
  .canopy-gallery__grid {
3044
3045
  display: grid;
3045
- grid-template-columns: repeat(auto-fit, minmax(var(--canopy-gallery-min-column, 16rem), 1fr));
3046
+ grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
3046
3047
  gap: var(--canopy-gallery-gap, 1.5rem);
3047
3048
  padding: var(--canopy-gallery-gap, 1.5rem) 0;
3048
3049
  }
@@ -3063,7 +3064,7 @@ html.dark .clover-iiif-image-openseadragon .clover-iiif-image-openseadragon-anno
3063
3064
  }
3064
3065
  .canopy-gallery__media {
3065
3066
  position: relative;
3066
- aspect-ratio: 4/3;
3067
+ aspect-ratio: 1/1;
3067
3068
  overflow: hidden;
3068
3069
  border-radius: calc(var(--canopy-gallery-radius, 1rem) - 0.25rem);
3069
3070
  background: var(--color-gray-100);
@@ -3129,16 +3130,7 @@ html.dark .clover-iiif-image-openseadragon .clover-iiif-image-openseadragon-anno
3129
3130
  color: inherit;
3130
3131
  background: transparent;
3131
3132
  }
3132
- .canopy-gallery__trigger-label {
3133
- position: absolute;
3134
- width: 1px;
3135
- height: 1px;
3136
- padding: 0;
3137
- margin: -1px;
3138
- overflow: hidden;
3139
- clip: rect(0 0 0 0);
3140
- border: 0;
3141
- }
3133
+
3142
3134
  .canopy-gallery__modals {
3143
3135
  position: relative;
3144
3136
  z-index: 100;
@@ -3150,15 +3142,13 @@ html.dark .clover-iiif-image-openseadragon .clover-iiif-image-openseadragon-anno
3150
3142
  pointer-events: none;
3151
3143
  visibility: hidden;
3152
3144
  z-index: 200;
3145
+ transform: translate3d(-200vw, 0, 0);
3153
3146
  }
3154
3147
  .canopy-gallery__modal:target, .canopy-gallery__modal[data-canopy-gallery-active="1"] {
3155
3148
  opacity: 1;
3156
3149
  pointer-events: auto;
3157
3150
  visibility: visible;
3158
- }
3159
- .canopy-gallery__modal:not([data-canopy-gallery-active]) {
3160
- width: 0;
3161
- height: 0;
3151
+ transform: none;
3162
3152
  }
3163
3153
  .canopy-gallery__modal-scrim {
3164
3154
  min-height: 100vh;
@@ -3167,6 +3157,7 @@ html.dark .clover-iiif-image-openseadragon .clover-iiif-image-openseadragon-anno
3167
3157
  padding: 0;
3168
3158
  }
3169
3159
  .canopy-gallery__modal-panel {
3160
+ position: relative;
3170
3161
  background: #fff;
3171
3162
  color: var(--color-gray-900);
3172
3163
  border-radius: 0;
@@ -3178,32 +3169,36 @@ html.dark .clover-iiif-image-openseadragon .clover-iiif-image-openseadragon-anno
3178
3169
  flex-direction: column;
3179
3170
  box-shadow: none;
3180
3171
  }
3172
+ .canopy-gallery__modal-actions {
3173
+ display: flex;
3174
+ align-items: stretch;
3175
+ justify-content: space-between;
3176
+ flex-direction: column;
3177
+ gap: 1rem;
3178
+ z-index: 5;
3179
+ width: var(--canopy-gallery-modal-actions-width, clamp(5rem, 18vw, 8rem));
3180
+ position: fixed;
3181
+ top: var(--canopy-gallery-sticky-offset, 0);
3182
+ bottom: var(--canopy-gallery-sticky-offset, 0);
3183
+ right: 0;
3184
+ left: auto;
3185
+ padding: clamp(1rem, 2vw, 1.75rem) clamp(0.5rem, 2vw, 1rem);
3186
+ background: linear-gradient(to left, rgb(255, 255, 255), rgba(255, 255, 255, 0.9) 60%, rgba(255, 255, 255, 0.5) 85%, rgba(255, 255, 255, 0));
3187
+ border-left: 1px solid rgba(15, 23, 42, 0.08);
3188
+ box-shadow: -16px 0 32px rgba(15, 23, 42, 0.05);
3189
+ margin-left: 0;
3190
+ isolation: isolate;
3191
+ }
3181
3192
  .canopy-gallery__modal-header {
3182
3193
  border: none;
3183
- padding-top: 3rem;
3194
+ padding-top: 1.382rem;
3184
3195
  padding-bottom: 0;
3185
3196
  padding-left: clamp(1.25rem, 3vw, 2.5rem);
3186
- padding-right: clamp(1.25rem, 3vw, 2.5rem);
3197
+ padding-right: calc(clamp(1.25rem, 3vw, 2.5rem) + var(--canopy-gallery-modal-actions-width, clamp(5rem, 18vw, 8rem)));
3187
3198
  display: flex;
3188
- gap: clamp(1rem, 2vw, 2rem);
3189
- }
3190
- .canopy-gallery__modal-thumb {
3191
- flex: 0 0 auto;
3192
- width: 100px;
3193
- aspect-ratio: 1/1;
3194
- border-radius: 0.5rem;
3195
- overflow: hidden;
3196
- background: var(--color-gray-100);
3197
- height: fit-content;
3198
- }
3199
- .canopy-gallery__modal-thumb img,
3200
- .canopy-gallery__modal-thumb picture,
3201
- .canopy-gallery__modal-thumb video,
3202
- .canopy-gallery__modal-thumb iframe {
3203
- width: 100%;
3204
- height: 100%;
3205
- object-fit: cover;
3206
- display: block;
3199
+ gap: 1rem;
3200
+ align-items: flex-start;
3201
+ flex-wrap: wrap;
3207
3202
  }
3208
3203
  .canopy-gallery__modal-text {
3209
3204
  flex: 1;
@@ -3217,70 +3212,36 @@ html.dark .clover-iiif-image-openseadragon .clover-iiif-image-openseadragon-anno
3217
3212
  margin: 0 0 0.5rem;
3218
3213
  }
3219
3214
  .canopy-gallery__modal-title {
3220
- margin: 0.618rem 0 0;
3221
- font-size: 1.618rem;
3215
+ margin: 0.382rem 0;
3216
+ font-size: 1.382rem;
3217
+ font-weight: 400;
3222
3218
  line-height: 1.2;
3223
3219
  }
3224
3220
  .canopy-gallery__modal-summary {
3225
3221
  margin: 0;
3226
- font-size: 1.2222rem;
3227
3222
  color: var(--color-gray-muted);
3223
+ font-weight: 300;
3228
3224
  }
3229
3225
  .canopy-gallery__modal-body {
3230
3226
  padding: clamp(1rem, 3vw, 2.5rem);
3231
- flex: 1;
3232
- overflow: auto;
3233
- }
3234
- .canopy-gallery__modal-footer {
3235
- padding: clamp(1rem, 2vw, 1.5rem) clamp(1.25rem, 3vw, 2.5rem);
3236
- display: flex;
3237
- flex-wrap: wrap;
3238
- align-items: center;
3239
- gap: 1rem;
3240
- border-top: 1px solid rgba(15, 23, 42, 0.08);
3227
+ padding-right: calc(clamp(1rem, 3vw, 2.5rem) + var(--canopy-gallery-modal-actions-width, clamp(5rem, 18vw, 8rem)));
3228
+ flex: 0 0 auto;
3241
3229
  }
3242
3230
  .canopy-gallery__modal-close {
3243
3231
  background: var(--color-accent-100);
3244
3232
  border-radius: 999px;
3245
3233
  padding: 0.35rem 1.25rem;
3246
3234
  font-weight: 600;
3235
+ display: inline-flex;
3236
+ align-items: center;
3237
+ justify-content: center;
3238
+ width: 100%;
3239
+ text-align: center;
3247
3240
  }
3248
3241
  .canopy-gallery__modal-nav {
3249
- margin-left: auto;
3250
3242
  display: flex;
3251
3243
  align-items: center;
3252
- gap: 1rem;
3253
- }
3254
- .canopy-gallery__modal-nav-link {
3255
- font-weight: 600;
3256
- }
3257
- .canopy-gallery__modal-nav-link--prev::before {
3258
- content: "← ";
3259
- }
3260
- .canopy-gallery__modal-nav-link--next::after {
3261
- content: " →";
3262
- }
3263
- @media (max-width: 640px) {
3264
- .canopy-gallery__grid {
3265
- grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
3266
- }
3267
- .canopy-gallery__item {
3268
- padding: 0.75rem;
3269
- }
3270
- .canopy-gallery__modal-panel {
3271
- max-height: 100vh;
3272
- }
3273
- .canopy-gallery__modal-header {
3274
- flex-direction: column;
3275
- }
3276
- .canopy-gallery__modal-thumb {
3277
- width: 100%;
3278
- }
3279
- .canopy-gallery__modal-nav {
3280
- width: 100%;
3281
- justify-content: space-between;
3282
- margin-left: 0;
3283
- }
3244
+ gap: 0.382rem;
3284
3245
  }
3285
3246
 
3286
3247
  body[data-canopy-gallery-locked="1"] {
@@ -3307,8 +3268,106 @@ body[data-canopy-gallery-locked="1"] {
3307
3268
  padding: 0;
3308
3269
  }
3309
3270
 
3310
- .canopy-gallery-item__content {
3271
+ .canopy-gallery__nav {
3272
+ display: flex;
3273
+ flex-direction: column;
3274
+ align-items: stretch;
3275
+ gap: 0.5rem;
3276
+ margin: 0;
3277
+ height: 100%;
3278
+ }
3279
+ .canopy-gallery__nav-viewport {
3280
+ flex: 1;
3281
+ overflow-y: auto;
3282
+ overflow-x: hidden;
3283
+ scrollbar-width: thin;
3284
+ }
3285
+ .canopy-gallery__nav-viewport::-webkit-scrollbar {
3286
+ width: 0.35rem;
3287
+ }
3288
+ .canopy-gallery__nav-viewport::-webkit-scrollbar-thumb {
3289
+ background-color: rgba(15, 23, 42, 0.2);
3290
+ border-radius: 0.5rem;
3291
+ }
3292
+ .canopy-gallery__nav-list {
3293
+ margin: 0;
3294
+ padding: 0;
3295
+ list-style: none;
3296
+ display: flex;
3297
+ flex-direction: column;
3298
+ }
3299
+ .canopy-gallery__nav-item {
3300
+ position: relative;
3301
+ list-style: none;
3302
+ }
3303
+ .canopy-gallery__nav-item[data-canopy-gallery-nav-selected] .canopy-gallery__nav-thumb {
3304
+ outline: 3px solid var(--color-accent-default);
3305
+ }
3306
+ .canopy-gallery__nav-link {
3307
+ display: inline-flex;
3308
+ flex-direction: column;
3309
+ text-decoration: none;
3310
+ border-radius: 0.75rem;
3311
+ background: var(--color-gray-50);
3312
+ color: inherit;
3313
+ width: 100%;
3314
+ align-items: stretch;
3315
+ justify-content: stretch;
3316
+ padding: 3px;
3317
+ }
3318
+ .canopy-gallery__nav-radio {
3319
+ position: absolute;
3320
+ inset: 0;
3321
+ width: 100%;
3322
+ height: 100%;
3323
+ opacity: 0;
3324
+ cursor: pointer;
3325
+ }
3326
+ .canopy-gallery__nav-thumb {
3327
+ width: 100%;
3328
+ aspect-ratio: 1/1;
3329
+ border-radius: 0.5rem;
3330
+ overflow: hidden;
3331
+ padding: 1px;
3332
+ outline: 3px solid var(--color-gray-50);
3333
+ }
3334
+ .canopy-gallery__nav-thumb img,
3335
+ .canopy-gallery__nav-thumb picture,
3336
+ .canopy-gallery__nav-thumb video,
3337
+ .canopy-gallery__nav-thumb iframe {
3311
3338
  width: 100%;
3339
+ height: 100%;
3340
+ object-fit: cover;
3341
+ display: block;
3342
+ opacity: 1;
3343
+ transition: all 0.2s ease;
3344
+ border-radius: 0.5rem;
3345
+ }
3346
+ .canopy-gallery__nav-button {
3347
+ flex: 0 0 auto;
3348
+ width: 100%;
3349
+ height: 2.75rem;
3350
+ border-radius: 0.75rem;
3351
+ background: rgba(255, 255, 255, 0.85);
3352
+ font-size: 1.25rem;
3353
+ font-weight: 600;
3354
+ cursor: pointer;
3355
+ display: inline-flex;
3356
+ align-items: center;
3357
+ justify-content: center;
3358
+ }
3359
+ .canopy-gallery__nav-controls {
3360
+ display: grid;
3361
+ grid-template-columns: repeat(2, minmax(0, 1fr));
3362
+ gap: 0.5rem;
3363
+ }
3364
+ .canopy-gallery__nav-button-icon {
3365
+ font-size: 1.25rem;
3366
+ line-height: 1;
3367
+ }
3368
+ .canopy-gallery__modal .canopy-gallery__nav {
3369
+ margin: clamp(1rem, 3vw, 1.5rem) 0;
3370
+ padding-bottom: 0.25rem;
3312
3371
  }
3313
3372
 
3314
3373
  .canopy-gallery-item__content_flex {
@@ -3340,6 +3399,28 @@ body[data-canopy-gallery-locked="1"] {
3340
3399
  line-height: 1.45;
3341
3400
  }
3342
3401
 
3402
+ @media (max-width: 640px) {
3403
+ .canopy-gallery__grid {
3404
+ grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
3405
+ }
3406
+ .canopy-gallery__item {
3407
+ padding: 0.75rem;
3408
+ }
3409
+ .canopy-gallery__modal-panel {
3410
+ max-height: 100vh;
3411
+ }
3412
+ .canopy-gallery__modal-header {
3413
+ flex-direction: column;
3414
+ }
3415
+ .canopy-gallery__modal-thumb {
3416
+ width: 100%;
3417
+ }
3418
+ .canopy-gallery__modal-actions {
3419
+ gap: 0.25rem;
3420
+ top: 0;
3421
+ padding: 0.5rem clamp(1rem, 4vw, 2rem) 0.25rem;
3422
+ }
3423
+ }
3343
3424
  /**
3344
3425
  * Define source files for utility classes
3345
3426
  */