@eightshift/ui-components 5.4.0 → 5.5.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.
- package/dist/assets/style-admin.css +49 -10
- package/dist/assets/style-editor.css +49 -10
- package/dist/assets/style.css +49 -10
- package/dist/components/index.js +2 -0
- package/dist/components/placeholders/file-picker-shell.js +67 -39
- package/dist/components/smart-image/smart-image.js +117 -0
- package/dist/icons/icons.js +10 -0
- package/dist/index.js +2 -0
- package/dist/utilities/general.js +4142 -0
- package/dist/utilities/index.js +5 -0
- package/package.json +7 -3
|
@@ -142,7 +142,6 @@
|
|
|
142
142
|
--es-radius-7: .4375rem;
|
|
143
143
|
--es-radius-10: .625rem;
|
|
144
144
|
--es-aspect-3-2: 3 / 2;
|
|
145
|
-
--es-aspect-cinema: 21 / 9;
|
|
146
145
|
--es-color-secondary-50: var(--es-color-zinc-50);
|
|
147
146
|
--es-color-secondary-100: var(--es-color-zinc-100);
|
|
148
147
|
--es-color-secondary-200: var(--es-color-zinc-200);
|
|
@@ -324,6 +323,7 @@
|
|
|
324
323
|
--es-radius-2xl: 1rem;
|
|
325
324
|
--es-radius-3xl: 1.5rem;
|
|
326
325
|
--es-drop-shadow-sm: 0 1px 2px #00000026;
|
|
326
|
+
--es-animate-spin: spin 1s linear infinite;
|
|
327
327
|
--es-blur-sm: 8px;
|
|
328
328
|
--es-blur-md: 12px;
|
|
329
329
|
--es-blur-lg: 16px;
|
|
@@ -1038,10 +1038,6 @@
|
|
|
1038
1038
|
aspect-ratio: var(--es-aspect-3-2);
|
|
1039
1039
|
}
|
|
1040
1040
|
|
|
1041
|
-
:is(body, body #wpwrap) .es\:aspect-cinema {
|
|
1042
|
-
aspect-ratio: var(--es-aspect-cinema);
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
1041
|
:is(body, body #wpwrap) .es\:aspect-video {
|
|
1046
1042
|
aspect-ratio: var(--es-aspect-video);
|
|
1047
1043
|
}
|
|
@@ -1631,6 +1627,13 @@
|
|
|
1631
1627
|
animation: var(--motion-scale-in-animation), var(--motion-translate-in-animation), var(--motion-rotate-in-animation), var(--motion-filter-in-animation), var(--motion-opacity-in-animation), var(--motion-background-color-in-animation), var(--motion-text-color-in-animation), var(--motion-scale-loop-animation), var(--motion-translate-loop-animation), var(--motion-rotate-loop-animation), var(--motion-filter-loop-animation), var(--motion-opacity-loop-animation), var(--motion-background-color-loop-animation), var(--motion-text-color-loop-animation);
|
|
1632
1628
|
}
|
|
1633
1629
|
|
|
1630
|
+
:is(body, body #wpwrap) .es\:motion-preset-fade {
|
|
1631
|
+
--motion-origin-opacity: 0;
|
|
1632
|
+
--motion-duration: .5s;
|
|
1633
|
+
--motion-opacity-in-animation: motion-opacity-in calc(var(--motion-opacity-duration, var(--motion-duration)) * var(--motion-opacity-perceptual-duration-multiplier, var(--motion-perceptual-duration-multiplier))) var(--motion-opacity-timing, var(--motion-timing)) var(--motion-opacity-delay, var(--motion-delay)) both;
|
|
1634
|
+
animation: var(--motion-scale-in-animation), var(--motion-translate-in-animation), var(--motion-rotate-in-animation), var(--motion-filter-in-animation), var(--motion-opacity-in-animation), var(--motion-background-color-in-animation), var(--motion-text-color-in-animation), var(--motion-scale-loop-animation), var(--motion-translate-loop-animation), var(--motion-rotate-loop-animation), var(--motion-filter-loop-animation), var(--motion-opacity-loop-animation), var(--motion-background-color-loop-animation), var(--motion-text-color-loop-animation);
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1634
1637
|
:is(body, body #wpwrap) .es\:motion-preset-spin {
|
|
1635
1638
|
--motion-loop-rotate: 360deg;
|
|
1636
1639
|
--motion-timing: linear;
|
|
@@ -1694,6 +1697,10 @@
|
|
|
1694
1697
|
animation: var(--motion-scale-out-animation), var(--motion-translate-out-animation), var(--motion-rotate-out-animation), var(--motion-filter-out-animation), var(--motion-opacity-out-animation), var(--motion-background-color-out-animation), var(--motion-text-color-out-animation);
|
|
1695
1698
|
}
|
|
1696
1699
|
|
|
1700
|
+
:is(body, body #wpwrap) .es\:animate-spin {
|
|
1701
|
+
animation: var(--es-animate-spin);
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1697
1704
|
:is(body, body #wpwrap) .es\:cursor-default {
|
|
1698
1705
|
cursor: default;
|
|
1699
1706
|
}
|
|
@@ -1782,6 +1789,10 @@
|
|
|
1782
1789
|
grid-template-rows: auto auto;
|
|
1783
1790
|
}
|
|
1784
1791
|
|
|
1792
|
+
:is(body, body #wpwrap) .es\:grid-rows-\[minmax\(0\,_1fr\)_auto\] {
|
|
1793
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1785
1796
|
:is(body, body #wpwrap) .es\:flex-col {
|
|
1786
1797
|
flex-direction: column;
|
|
1787
1798
|
}
|
|
@@ -2163,6 +2174,11 @@
|
|
|
2163
2174
|
border-width: 1px;
|
|
2164
2175
|
}
|
|
2165
2176
|
|
|
2177
|
+
:is(body, body #wpwrap) .es\:border-4 {
|
|
2178
|
+
border-style: var(--tw-border-style);
|
|
2179
|
+
border-width: 4px;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2166
2182
|
:is(body, body #wpwrap) .es\:border-x {
|
|
2167
2183
|
border-inline-style: var(--tw-border-style);
|
|
2168
2184
|
border-inline-width: 1px;
|
|
@@ -2412,6 +2428,10 @@
|
|
|
2412
2428
|
border-bottom-color: var(--es-color-secondary-200);
|
|
2413
2429
|
}
|
|
2414
2430
|
|
|
2431
|
+
:is(body, body #wpwrap) .es\:bg-\(--es-img-dominant-color\) {
|
|
2432
|
+
background-color: var(--es-img-dominant-color);
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2415
2435
|
:is(body, body #wpwrap) .es\:bg-\[\#f1f1f1\] {
|
|
2416
2436
|
background-color: #f1f1f1;
|
|
2417
2437
|
}
|
|
@@ -3295,6 +3315,10 @@
|
|
|
3295
3315
|
padding-top: calc(var(--es-spacing) * 2.25);
|
|
3296
3316
|
}
|
|
3297
3317
|
|
|
3318
|
+
:is(body, body #wpwrap) .es\:pt-3 {
|
|
3319
|
+
padding-top: calc(var(--es-spacing) * 3);
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3298
3322
|
:is(body, body #wpwrap) .es\:pr-0 {
|
|
3299
3323
|
padding-right: calc(var(--es-spacing) * 0);
|
|
3300
3324
|
}
|
|
@@ -3347,6 +3371,10 @@
|
|
|
3347
3371
|
padding-bottom: calc(var(--es-spacing) * 2.5);
|
|
3348
3372
|
}
|
|
3349
3373
|
|
|
3374
|
+
:is(body, body #wpwrap) .es\:pb-3 {
|
|
3375
|
+
padding-bottom: calc(var(--es-spacing) * 3);
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3350
3378
|
:is(body, body #wpwrap) .es\:pb-3\.5 {
|
|
3351
3379
|
padding-bottom: calc(var(--es-spacing) * 3.5);
|
|
3352
3380
|
}
|
|
@@ -4333,6 +4361,11 @@
|
|
|
4333
4361
|
transition-duration: .3s;
|
|
4334
4362
|
}
|
|
4335
4363
|
|
|
4364
|
+
:is(body, body #wpwrap) .es\:duration-3000 {
|
|
4365
|
+
--tw-duration: 3s;
|
|
4366
|
+
transition-duration: 3s;
|
|
4367
|
+
}
|
|
4368
|
+
|
|
4336
4369
|
:is(body, body #wpwrap) .es\:ease-\[var\(--motion-spring-bouncy\)\] {
|
|
4337
4370
|
--tw-ease: var(--motion-spring-bouncy);
|
|
4338
4371
|
transition-timing-function: var(--motion-spring-bouncy);
|
|
@@ -5015,11 +5048,6 @@
|
|
|
5015
5048
|
display: none;
|
|
5016
5049
|
}
|
|
5017
5050
|
|
|
5018
|
-
:is(body, body #wpwrap) .es\:focus-within\:translate-y-0:where([data-rac])[data-focus-within], :is(body, body #wpwrap) .es\:focus-within\:translate-y-0:where(:not([data-rac])):focus-within {
|
|
5019
|
-
--tw-translate-y: calc(var(--es-spacing) * 0);
|
|
5020
|
-
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
5021
|
-
}
|
|
5022
|
-
|
|
5023
5051
|
:is(body, body #wpwrap) .es\:focus-within\:shadow-md:where([data-rac])[data-focus-within], :is(body, body #wpwrap) .es\:focus-within\:shadow-md:where(:not([data-rac])):focus-within {
|
|
5024
5052
|
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, #0000001a), 0 2px 4px -2px var(--tw-shadow-color, #0000001a);
|
|
5025
5053
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -6568,6 +6596,11 @@
|
|
|
6568
6596
|
}
|
|
6569
6597
|
}
|
|
6570
6598
|
|
|
6599
|
+
:is(body, body #wpwrap) .es\:has-focus-visible\:translate-y-0:has(:is(:focus-visible:not(:focus), [data-rac][data-focus-visible])), :is(body, body #wpwrap) .es\:has-aria-expanded\:translate-y-0:has([aria-expanded="true"]) {
|
|
6600
|
+
--tw-translate-y: calc(var(--es-spacing) * 0);
|
|
6601
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
6602
|
+
}
|
|
6603
|
+
|
|
6571
6604
|
:is(body, body #wpwrap) .es\:has-dragging\:inset-ring-1:has([data-dragging]) {
|
|
6572
6605
|
--tw-inset-ring-shadow: inset 0 0 0 1px var(--tw-inset-ring-color, currentcolor);
|
|
6573
6606
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -8245,3 +8278,9 @@
|
|
|
8245
8278
|
inherits: false;
|
|
8246
8279
|
initial-value: "";
|
|
8247
8280
|
}
|
|
8281
|
+
|
|
8282
|
+
@keyframes spin {
|
|
8283
|
+
to {
|
|
8284
|
+
transform: rotate(360deg);
|
|
8285
|
+
}
|
|
8286
|
+
}
|
|
@@ -142,7 +142,6 @@
|
|
|
142
142
|
--es-radius-7: .4375rem;
|
|
143
143
|
--es-radius-10: .625rem;
|
|
144
144
|
--es-aspect-3-2: 3 / 2;
|
|
145
|
-
--es-aspect-cinema: 21 / 9;
|
|
146
145
|
--es-color-secondary-50: var(--es-color-zinc-50);
|
|
147
146
|
--es-color-secondary-100: var(--es-color-zinc-100);
|
|
148
147
|
--es-color-secondary-200: var(--es-color-zinc-200);
|
|
@@ -324,6 +323,7 @@
|
|
|
324
323
|
--es-radius-2xl: 1rem;
|
|
325
324
|
--es-radius-3xl: 1.5rem;
|
|
326
325
|
--es-drop-shadow-sm: 0 1px 2px #00000026;
|
|
326
|
+
--es-animate-spin: spin 1s linear infinite;
|
|
327
327
|
--es-blur-sm: 8px;
|
|
328
328
|
--es-blur-md: 12px;
|
|
329
329
|
--es-blur-lg: 16px;
|
|
@@ -1038,10 +1038,6 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
1038
1038
|
aspect-ratio: var(--es-aspect-3-2);
|
|
1039
1039
|
}
|
|
1040
1040
|
|
|
1041
|
-
:is(body, #wpwrap #editor) .es\:aspect-cinema {
|
|
1042
|
-
aspect-ratio: var(--es-aspect-cinema);
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
1041
|
:is(body, #wpwrap #editor) .es\:aspect-video {
|
|
1046
1042
|
aspect-ratio: var(--es-aspect-video);
|
|
1047
1043
|
}
|
|
@@ -1631,6 +1627,13 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
1631
1627
|
animation: var(--motion-scale-in-animation), var(--motion-translate-in-animation), var(--motion-rotate-in-animation), var(--motion-filter-in-animation), var(--motion-opacity-in-animation), var(--motion-background-color-in-animation), var(--motion-text-color-in-animation), var(--motion-scale-loop-animation), var(--motion-translate-loop-animation), var(--motion-rotate-loop-animation), var(--motion-filter-loop-animation), var(--motion-opacity-loop-animation), var(--motion-background-color-loop-animation), var(--motion-text-color-loop-animation);
|
|
1632
1628
|
}
|
|
1633
1629
|
|
|
1630
|
+
:is(body, #wpwrap #editor) .es\:motion-preset-fade {
|
|
1631
|
+
--motion-origin-opacity: 0;
|
|
1632
|
+
--motion-duration: .5s;
|
|
1633
|
+
--motion-opacity-in-animation: motion-opacity-in calc(var(--motion-opacity-duration, var(--motion-duration)) * var(--motion-opacity-perceptual-duration-multiplier, var(--motion-perceptual-duration-multiplier))) var(--motion-opacity-timing, var(--motion-timing)) var(--motion-opacity-delay, var(--motion-delay)) both;
|
|
1634
|
+
animation: var(--motion-scale-in-animation), var(--motion-translate-in-animation), var(--motion-rotate-in-animation), var(--motion-filter-in-animation), var(--motion-opacity-in-animation), var(--motion-background-color-in-animation), var(--motion-text-color-in-animation), var(--motion-scale-loop-animation), var(--motion-translate-loop-animation), var(--motion-rotate-loop-animation), var(--motion-filter-loop-animation), var(--motion-opacity-loop-animation), var(--motion-background-color-loop-animation), var(--motion-text-color-loop-animation);
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1634
1637
|
:is(body, #wpwrap #editor) .es\:motion-preset-spin {
|
|
1635
1638
|
--motion-loop-rotate: 360deg;
|
|
1636
1639
|
--motion-timing: linear;
|
|
@@ -1694,6 +1697,10 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
1694
1697
|
animation: var(--motion-scale-out-animation), var(--motion-translate-out-animation), var(--motion-rotate-out-animation), var(--motion-filter-out-animation), var(--motion-opacity-out-animation), var(--motion-background-color-out-animation), var(--motion-text-color-out-animation);
|
|
1695
1698
|
}
|
|
1696
1699
|
|
|
1700
|
+
:is(body, #wpwrap #editor) .es\:animate-spin {
|
|
1701
|
+
animation: var(--es-animate-spin);
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1697
1704
|
:is(body, #wpwrap #editor) .es\:cursor-default {
|
|
1698
1705
|
cursor: default;
|
|
1699
1706
|
}
|
|
@@ -1782,6 +1789,10 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
1782
1789
|
grid-template-rows: auto auto;
|
|
1783
1790
|
}
|
|
1784
1791
|
|
|
1792
|
+
:is(body, #wpwrap #editor) .es\:grid-rows-\[minmax\(0\,_1fr\)_auto\] {
|
|
1793
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1785
1796
|
:is(body, #wpwrap #editor) .es\:flex-col {
|
|
1786
1797
|
flex-direction: column;
|
|
1787
1798
|
}
|
|
@@ -2163,6 +2174,11 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
2163
2174
|
border-width: 1px;
|
|
2164
2175
|
}
|
|
2165
2176
|
|
|
2177
|
+
:is(body, #wpwrap #editor) .es\:border-4 {
|
|
2178
|
+
border-style: var(--tw-border-style);
|
|
2179
|
+
border-width: 4px;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2166
2182
|
:is(body, #wpwrap #editor) .es\:border-x {
|
|
2167
2183
|
border-inline-style: var(--tw-border-style);
|
|
2168
2184
|
border-inline-width: 1px;
|
|
@@ -2412,6 +2428,10 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
2412
2428
|
border-bottom-color: var(--es-color-secondary-200);
|
|
2413
2429
|
}
|
|
2414
2430
|
|
|
2431
|
+
:is(body, #wpwrap #editor) .es\:bg-\(--es-img-dominant-color\) {
|
|
2432
|
+
background-color: var(--es-img-dominant-color);
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2415
2435
|
:is(body, #wpwrap #editor) .es\:bg-\[\#f1f1f1\] {
|
|
2416
2436
|
background-color: #f1f1f1;
|
|
2417
2437
|
}
|
|
@@ -3295,6 +3315,10 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
3295
3315
|
padding-top: calc(var(--es-spacing) * 2.25);
|
|
3296
3316
|
}
|
|
3297
3317
|
|
|
3318
|
+
:is(body, #wpwrap #editor) .es\:pt-3 {
|
|
3319
|
+
padding-top: calc(var(--es-spacing) * 3);
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3298
3322
|
:is(body, #wpwrap #editor) .es\:pr-0 {
|
|
3299
3323
|
padding-right: calc(var(--es-spacing) * 0);
|
|
3300
3324
|
}
|
|
@@ -3347,6 +3371,10 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
3347
3371
|
padding-bottom: calc(var(--es-spacing) * 2.5);
|
|
3348
3372
|
}
|
|
3349
3373
|
|
|
3374
|
+
:is(body, #wpwrap #editor) .es\:pb-3 {
|
|
3375
|
+
padding-bottom: calc(var(--es-spacing) * 3);
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3350
3378
|
:is(body, #wpwrap #editor) .es\:pb-3\.5 {
|
|
3351
3379
|
padding-bottom: calc(var(--es-spacing) * 3.5);
|
|
3352
3380
|
}
|
|
@@ -4333,6 +4361,11 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
4333
4361
|
transition-duration: .3s;
|
|
4334
4362
|
}
|
|
4335
4363
|
|
|
4364
|
+
:is(body, #wpwrap #editor) .es\:duration-3000 {
|
|
4365
|
+
--tw-duration: 3s;
|
|
4366
|
+
transition-duration: 3s;
|
|
4367
|
+
}
|
|
4368
|
+
|
|
4336
4369
|
:is(body, #wpwrap #editor) .es\:ease-\[var\(--motion-spring-bouncy\)\] {
|
|
4337
4370
|
--tw-ease: var(--motion-spring-bouncy);
|
|
4338
4371
|
transition-timing-function: var(--motion-spring-bouncy);
|
|
@@ -5015,11 +5048,6 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
5015
5048
|
display: none;
|
|
5016
5049
|
}
|
|
5017
5050
|
|
|
5018
|
-
:is(body, #wpwrap #editor) .es\:focus-within\:translate-y-0:where([data-rac])[data-focus-within], :is(body, #wpwrap #editor) .es\:focus-within\:translate-y-0:where(:not([data-rac])):focus-within {
|
|
5019
|
-
--tw-translate-y: calc(var(--es-spacing) * 0);
|
|
5020
|
-
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
5021
|
-
}
|
|
5022
|
-
|
|
5023
5051
|
:is(body, #wpwrap #editor) .es\:focus-within\:shadow-md:where([data-rac])[data-focus-within], :is(body, #wpwrap #editor) .es\:focus-within\:shadow-md:where(:not([data-rac])):focus-within {
|
|
5024
5052
|
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, #0000001a), 0 2px 4px -2px var(--tw-shadow-color, #0000001a);
|
|
5025
5053
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -6568,6 +6596,11 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
6568
6596
|
}
|
|
6569
6597
|
}
|
|
6570
6598
|
|
|
6599
|
+
:is(body, #wpwrap #editor) .es\:has-focus-visible\:translate-y-0:has(:is(:focus-visible:not(:focus), [data-rac][data-focus-visible])), :is(body, #wpwrap #editor) .es\:has-aria-expanded\:translate-y-0:has([aria-expanded="true"]) {
|
|
6600
|
+
--tw-translate-y: calc(var(--es-spacing) * 0);
|
|
6601
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
6602
|
+
}
|
|
6603
|
+
|
|
6571
6604
|
:is(body, #wpwrap #editor) .es\:has-dragging\:inset-ring-1:has([data-dragging]) {
|
|
6572
6605
|
--tw-inset-ring-shadow: inset 0 0 0 1px var(--tw-inset-ring-color, currentcolor);
|
|
6573
6606
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -8245,3 +8278,9 @@ button, input:where([type="button"], [type="reset"], [type="submit"]) {
|
|
|
8245
8278
|
inherits: false;
|
|
8246
8279
|
initial-value: "";
|
|
8247
8280
|
}
|
|
8281
|
+
|
|
8282
|
+
@keyframes spin {
|
|
8283
|
+
to {
|
|
8284
|
+
transform: rotate(360deg);
|
|
8285
|
+
}
|
|
8286
|
+
}
|
package/dist/assets/style.css
CHANGED
|
@@ -142,7 +142,6 @@
|
|
|
142
142
|
--es-radius-7: .4375rem;
|
|
143
143
|
--es-radius-10: .625rem;
|
|
144
144
|
--es-aspect-3-2: 3 / 2;
|
|
145
|
-
--es-aspect-cinema: 21 / 9;
|
|
146
145
|
--es-color-secondary-50: var(--es-color-zinc-50);
|
|
147
146
|
--es-color-secondary-100: var(--es-color-zinc-100);
|
|
148
147
|
--es-color-secondary-200: var(--es-color-zinc-200);
|
|
@@ -324,6 +323,7 @@
|
|
|
324
323
|
--es-radius-2xl: 1rem;
|
|
325
324
|
--es-radius-3xl: 1.5rem;
|
|
326
325
|
--es-drop-shadow-sm: 0 1px 2px #00000026;
|
|
326
|
+
--es-animate-spin: spin 1s linear infinite;
|
|
327
327
|
--es-blur-sm: 8px;
|
|
328
328
|
--es-blur-md: 12px;
|
|
329
329
|
--es-blur-lg: 16px;
|
|
@@ -1523,10 +1523,6 @@
|
|
|
1523
1523
|
aspect-ratio: var(--es-aspect-3-2);
|
|
1524
1524
|
}
|
|
1525
1525
|
|
|
1526
|
-
.es\:aspect-cinema {
|
|
1527
|
-
aspect-ratio: var(--es-aspect-cinema);
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
1526
|
.es\:aspect-video {
|
|
1531
1527
|
aspect-ratio: var(--es-aspect-video);
|
|
1532
1528
|
}
|
|
@@ -2116,6 +2112,13 @@
|
|
|
2116
2112
|
animation: var(--motion-scale-in-animation), var(--motion-translate-in-animation), var(--motion-rotate-in-animation), var(--motion-filter-in-animation), var(--motion-opacity-in-animation), var(--motion-background-color-in-animation), var(--motion-text-color-in-animation), var(--motion-scale-loop-animation), var(--motion-translate-loop-animation), var(--motion-rotate-loop-animation), var(--motion-filter-loop-animation), var(--motion-opacity-loop-animation), var(--motion-background-color-loop-animation), var(--motion-text-color-loop-animation);
|
|
2117
2113
|
}
|
|
2118
2114
|
|
|
2115
|
+
.es\:motion-preset-fade {
|
|
2116
|
+
--motion-origin-opacity: 0;
|
|
2117
|
+
--motion-duration: .5s;
|
|
2118
|
+
--motion-opacity-in-animation: motion-opacity-in calc(var(--motion-opacity-duration, var(--motion-duration)) * var(--motion-opacity-perceptual-duration-multiplier, var(--motion-perceptual-duration-multiplier))) var(--motion-opacity-timing, var(--motion-timing)) var(--motion-opacity-delay, var(--motion-delay)) both;
|
|
2119
|
+
animation: var(--motion-scale-in-animation), var(--motion-translate-in-animation), var(--motion-rotate-in-animation), var(--motion-filter-in-animation), var(--motion-opacity-in-animation), var(--motion-background-color-in-animation), var(--motion-text-color-in-animation), var(--motion-scale-loop-animation), var(--motion-translate-loop-animation), var(--motion-rotate-loop-animation), var(--motion-filter-loop-animation), var(--motion-opacity-loop-animation), var(--motion-background-color-loop-animation), var(--motion-text-color-loop-animation);
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2119
2122
|
.es\:motion-preset-spin {
|
|
2120
2123
|
--motion-loop-rotate: 360deg;
|
|
2121
2124
|
--motion-timing: linear;
|
|
@@ -2179,6 +2182,10 @@
|
|
|
2179
2182
|
animation: var(--motion-scale-out-animation), var(--motion-translate-out-animation), var(--motion-rotate-out-animation), var(--motion-filter-out-animation), var(--motion-opacity-out-animation), var(--motion-background-color-out-animation), var(--motion-text-color-out-animation);
|
|
2180
2183
|
}
|
|
2181
2184
|
|
|
2185
|
+
.es\:animate-spin {
|
|
2186
|
+
animation: var(--es-animate-spin);
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2182
2189
|
.es\:cursor-default {
|
|
2183
2190
|
cursor: default;
|
|
2184
2191
|
}
|
|
@@ -2267,6 +2274,10 @@
|
|
|
2267
2274
|
grid-template-rows: auto auto;
|
|
2268
2275
|
}
|
|
2269
2276
|
|
|
2277
|
+
.es\:grid-rows-\[minmax\(0\,_1fr\)_auto\] {
|
|
2278
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2270
2281
|
.es\:flex-col {
|
|
2271
2282
|
flex-direction: column;
|
|
2272
2283
|
}
|
|
@@ -2648,6 +2659,11 @@
|
|
|
2648
2659
|
border-width: 1px;
|
|
2649
2660
|
}
|
|
2650
2661
|
|
|
2662
|
+
.es\:border-4 {
|
|
2663
|
+
border-style: var(--tw-border-style);
|
|
2664
|
+
border-width: 4px;
|
|
2665
|
+
}
|
|
2666
|
+
|
|
2651
2667
|
.es\:border-x {
|
|
2652
2668
|
border-inline-style: var(--tw-border-style);
|
|
2653
2669
|
border-inline-width: 1px;
|
|
@@ -2897,6 +2913,10 @@
|
|
|
2897
2913
|
border-bottom-color: var(--es-color-secondary-200);
|
|
2898
2914
|
}
|
|
2899
2915
|
|
|
2916
|
+
.es\:bg-\(--es-img-dominant-color\) {
|
|
2917
|
+
background-color: var(--es-img-dominant-color);
|
|
2918
|
+
}
|
|
2919
|
+
|
|
2900
2920
|
.es\:bg-\[\#f1f1f1\] {
|
|
2901
2921
|
background-color: #f1f1f1;
|
|
2902
2922
|
}
|
|
@@ -3780,6 +3800,10 @@
|
|
|
3780
3800
|
padding-top: calc(var(--es-spacing) * 2.25);
|
|
3781
3801
|
}
|
|
3782
3802
|
|
|
3803
|
+
.es\:pt-3 {
|
|
3804
|
+
padding-top: calc(var(--es-spacing) * 3);
|
|
3805
|
+
}
|
|
3806
|
+
|
|
3783
3807
|
.es\:pr-0 {
|
|
3784
3808
|
padding-right: calc(var(--es-spacing) * 0);
|
|
3785
3809
|
}
|
|
@@ -3832,6 +3856,10 @@
|
|
|
3832
3856
|
padding-bottom: calc(var(--es-spacing) * 2.5);
|
|
3833
3857
|
}
|
|
3834
3858
|
|
|
3859
|
+
.es\:pb-3 {
|
|
3860
|
+
padding-bottom: calc(var(--es-spacing) * 3);
|
|
3861
|
+
}
|
|
3862
|
+
|
|
3835
3863
|
.es\:pb-3\.5 {
|
|
3836
3864
|
padding-bottom: calc(var(--es-spacing) * 3.5);
|
|
3837
3865
|
}
|
|
@@ -4818,6 +4846,11 @@
|
|
|
4818
4846
|
transition-duration: .3s;
|
|
4819
4847
|
}
|
|
4820
4848
|
|
|
4849
|
+
.es\:duration-3000 {
|
|
4850
|
+
--tw-duration: 3s;
|
|
4851
|
+
transition-duration: 3s;
|
|
4852
|
+
}
|
|
4853
|
+
|
|
4821
4854
|
.es\:ease-\[var\(--motion-spring-bouncy\)\] {
|
|
4822
4855
|
--tw-ease: var(--motion-spring-bouncy);
|
|
4823
4856
|
transition-timing-function: var(--motion-spring-bouncy);
|
|
@@ -5500,11 +5533,6 @@
|
|
|
5500
5533
|
display: none;
|
|
5501
5534
|
}
|
|
5502
5535
|
|
|
5503
|
-
.es\:focus-within\:translate-y-0:where([data-rac])[data-focus-within], .es\:focus-within\:translate-y-0:where(:not([data-rac])):focus-within {
|
|
5504
|
-
--tw-translate-y: calc(var(--es-spacing) * 0);
|
|
5505
|
-
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
5506
|
-
}
|
|
5507
|
-
|
|
5508
5536
|
.es\:focus-within\:shadow-md:where([data-rac])[data-focus-within], .es\:focus-within\:shadow-md:where(:not([data-rac])):focus-within {
|
|
5509
5537
|
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, #0000001a), 0 2px 4px -2px var(--tw-shadow-color, #0000001a);
|
|
5510
5538
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -7053,6 +7081,11 @@
|
|
|
7053
7081
|
}
|
|
7054
7082
|
}
|
|
7055
7083
|
|
|
7084
|
+
.es\:has-focus-visible\:translate-y-0:has(:is(:focus-visible:not(:focus), [data-rac][data-focus-visible])), .es\:has-aria-expanded\:translate-y-0:has([aria-expanded="true"]) {
|
|
7085
|
+
--tw-translate-y: calc(var(--es-spacing) * 0);
|
|
7086
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
7087
|
+
}
|
|
7088
|
+
|
|
7056
7089
|
.es\:has-dragging\:inset-ring-1:has([data-dragging]) {
|
|
7057
7090
|
--tw-inset-ring-shadow: inset 0 0 0 1px var(--tw-inset-ring-color, currentcolor);
|
|
7058
7091
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -8251,3 +8284,9 @@
|
|
|
8251
8284
|
inherits: false;
|
|
8252
8285
|
initial-value: "";
|
|
8253
8286
|
}
|
|
8287
|
+
|
|
8288
|
+
@keyframes spin {
|
|
8289
|
+
to {
|
|
8290
|
+
transform: rotate(360deg);
|
|
8291
|
+
}
|
|
8292
|
+
}
|
package/dist/components/index.js
CHANGED
|
@@ -50,6 +50,7 @@ import { OptionSelect } from "./option-select/option-select.js";
|
|
|
50
50
|
import { OptionsPanel, OptionsPanelHeader, OptionsPanelIntro, OptionsPanelSection } from "./options-panel/options-panel.js";
|
|
51
51
|
import { Select } from "./select/single-select.js";
|
|
52
52
|
import { Slider } from "./slider/slider.js";
|
|
53
|
+
import { SmartImage } from "./smart-image/smart-image.js";
|
|
53
54
|
import { SolidColorPicker } from "./color-pickers/solid-color-picker.js";
|
|
54
55
|
import { Spacer } from "./spacer/spacer.js";
|
|
55
56
|
import { Tab, TabList, TabPanel, Tabs } from "./tabs/tabs.js";
|
|
@@ -128,6 +129,7 @@ export {
|
|
|
128
129
|
Select,
|
|
129
130
|
SelectNext,
|
|
130
131
|
Slider,
|
|
132
|
+
SmartImage,
|
|
131
133
|
SolidColorPicker,
|
|
132
134
|
Spacer,
|
|
133
135
|
SubMenuItem,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
3
3
|
import { icons } from "../../icons/icons.js";
|
|
4
|
-
import "react";
|
|
4
|
+
import { cloneElement } from "react";
|
|
5
5
|
import "../../react-jsx-parser.min-VUl-CuCv.js";
|
|
6
6
|
import { truncateMiddle } from "../../utilities/text-helpers.js";
|
|
7
|
+
import { SmartImage } from "../smart-image/smart-image.js";
|
|
7
8
|
/**
|
|
8
9
|
* A shell for a file picker UI, handling both rich visual presentation (e.g. images) and simple file placeholders.
|
|
9
10
|
*
|
|
10
11
|
* @component
|
|
11
12
|
* @param {Object} props - Component props.
|
|
12
13
|
* @param {string} [props.url] - Current file URL.
|
|
13
|
-
* @param {string} [props.fileName] - Current file name.
|
|
14
14
|
* @param {ShellType} [props.type='file'] - File type icon override.
|
|
15
15
|
* @param {JSX.Element} [props.icon] - Icon to display within the button.
|
|
16
16
|
* @param {string} [props.className] - Classes to pass to the component.
|
|
@@ -24,9 +24,8 @@ import { truncateMiddle } from "../../utilities/text-helpers.js";
|
|
|
24
24
|
* @example
|
|
25
25
|
* <FilePickerShell
|
|
26
26
|
* className='es:w-full'
|
|
27
|
-
* url='
|
|
27
|
+
* url='myfile.json'
|
|
28
28
|
* noUrlContent={<Button size='large'>Upload</Button>}
|
|
29
|
-
* fileName='myfile.json'
|
|
30
29
|
* >
|
|
31
30
|
* <Button flat>Replace</Button>
|
|
32
31
|
* <Button flat>Remove</Button>
|
|
@@ -48,7 +47,6 @@ import { truncateMiddle } from "../../utilities/text-helpers.js";
|
|
|
48
47
|
const FilePickerShell = (props) => {
|
|
49
48
|
const {
|
|
50
49
|
url,
|
|
51
|
-
fileName,
|
|
52
50
|
type = "file",
|
|
53
51
|
icon = icons.file,
|
|
54
52
|
children,
|
|
@@ -59,41 +57,71 @@ const FilePickerShell = (props) => {
|
|
|
59
57
|
if (hidden) {
|
|
60
58
|
return null;
|
|
61
59
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
if (!url) {
|
|
61
|
+
return noUrlContent && /* @__PURE__ */ jsx("div", { className: clsx("es:grid es:auto-cols-fr es:grid-flow-col es:gap-2 es:p-px es:w-full"), children: noUrlContent });
|
|
62
|
+
}
|
|
63
|
+
if (type !== "image") {
|
|
64
|
+
return /* @__PURE__ */ jsxs(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
className: clsx(
|
|
68
|
+
"es:border es:border-secondary-200 es:bg-white es:flex es:justify-between es:rounded-2xl es:isolate es:relative es:flex-col es:gap-2 es:overflow-clip es:aspect-3-2 es:group es:p-2",
|
|
69
|
+
className
|
|
70
|
+
),
|
|
71
|
+
children: [
|
|
72
|
+
type === "file" && /* @__PURE__ */ jsxs("div", { className: "es:grow es:flex es:flex-col es:gap-2 es:text-sm es:items-center-safe es:justify-center-safe es:font-mono es:icon:size-6 es:rounded-xl es:bg-secondary-50 es:inset-ring es:inset-ring-secondary-100 es:icon:text-secondary-500", children: [
|
|
73
|
+
icon,
|
|
74
|
+
/* @__PURE__ */ jsx("span", { className: "es:line-clamp-1", children: truncateMiddle(url, 34) })
|
|
75
|
+
] }),
|
|
76
|
+
children && /* @__PURE__ */ jsx("div", { className: "es:flex es:items-center-safe es:gap-2", children })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
return /* @__PURE__ */ jsx(
|
|
82
|
+
SmartImage,
|
|
65
83
|
{
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
84
|
+
src: url,
|
|
85
|
+
alt: "",
|
|
86
|
+
className: ({ hasAnalysed, isTransparent, transparencyInfo }) => clsx(
|
|
87
|
+
hasAnalysed && transparencyInfo?.left && url && "es:pl-3",
|
|
88
|
+
hasAnalysed && transparencyInfo?.right && url && "es:pr-3",
|
|
89
|
+
hasAnalysed && transparencyInfo?.top && url && "es:pt-3",
|
|
90
|
+
hasAnalysed && transparencyInfo?.bottom && url && "es:pb-3",
|
|
91
|
+
hasAnalysed && isTransparent && "es:bg-white/60 es:object-contain es:mx-auto",
|
|
92
|
+
hasAnalysed && isTransparent && (transparencyInfo?.left || transparencyInfo?.right) && "es:w-full",
|
|
93
|
+
hasAnalysed && isTransparent && (transparencyInfo?.top || transparencyInfo?.bottom) && "es:h-full",
|
|
94
|
+
hasAnalysed && !isTransparent && "es:w-full es:aspect-3-2 es:object-cover",
|
|
95
|
+
hasAnalysed && "es:grow es:rounded-xl"
|
|
71
96
|
),
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
+
errorClassName: "es:aspect-3-2 es:rounded-2xl es:bg-gradient-to-br es:from-secondary-50 es:to-secondary-100 es:border es:border-secondary-200",
|
|
98
|
+
imageAnalysisSettings: { yFrom: 0.25, yTo: 0.75 },
|
|
99
|
+
children: ({ image, dominantColors, isDark, hasAnalysed, isTransparent }) => /* @__PURE__ */ jsxs(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
className: clsx(
|
|
103
|
+
"es:border es:border-secondary-200 es:justify-between es:rounded-2xl es:isolate es:relative es:flex-col es:gap-y-2 es:grid es:grid-cols-1 es:overflow-clip es:aspect-3-2 es:transition",
|
|
104
|
+
hasAnalysed && !isTransparent && "es:group es:grid-rows-1",
|
|
105
|
+
hasAnalysed && isTransparent && "es:p-2 es:grid-rows-[minmax(0,_1fr)_auto] es:h-fit",
|
|
106
|
+
className
|
|
107
|
+
),
|
|
108
|
+
style: hasAnalysed && isTransparent ? { backgroundColor: `color-mix(in srgb, ${dominantColors[0]?.color || "#ffffff"} ${dominantColors[0]?.isDark ? 10 : 80}%, #ffffff)` } : {},
|
|
109
|
+
children: [
|
|
110
|
+
image,
|
|
111
|
+
!hasAnalysed && cloneElement(icons.loader, { className: "es:animate-spin es:size-8 es:text-accent-600 es:m-auto es:duration-3000" }),
|
|
112
|
+
hasAnalysed && children && /* @__PURE__ */ jsx(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
className: clsx(
|
|
116
|
+
"es:flex es:items-center-safe es:gap-2",
|
|
117
|
+
!isTransparent && "es:absolute es:bottom-2 es:left-2 es:right-2 es:translate-y-[125%] es:group-hover:translate-y-0 es:has-aria-expanded:translate-y-0 es:has-focus-visible:translate-y-0 es:transition-transform es:ease-spring-smooth"
|
|
118
|
+
),
|
|
119
|
+
children: typeof children === "function" ? children({ dominantColors, isDark, isTransparent }) : children
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
)
|
|
97
125
|
}
|
|
98
126
|
);
|
|
99
127
|
};
|