@dmsi/wedgekit-react 0.0.415 → 0.0.417
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/chunk-3HBYDOYE.js +114 -0
- package/dist/{chunk-JIMJIJOF.js → chunk-5TGP5EFM.js} +2 -2
- package/dist/{chunk-2HMCS25C.js → chunk-6LHBY2IH.js} +1 -1
- package/dist/{chunk-6I5LZ2ZC.js → chunk-7AXHAWJX.js} +3 -3
- package/dist/{chunk-MQX7GFLX.js → chunk-CAQWLY5V.js} +24 -6
- package/dist/{chunk-QQ5G773N.js → chunk-DCLNAUC4.js} +1 -1
- package/dist/{chunk-GB4ZTUQV.js → chunk-DTW7JCBR.js} +36 -0
- package/dist/{chunk-BK7SPR6Y.js → chunk-HYJIDHAK.js} +6 -6
- package/dist/{chunk-ZHZIIVJN.js → chunk-IMOIZFJZ.js} +5 -5
- package/dist/chunk-KBJZUVLM.js +65 -0
- package/dist/{chunk-AA6GE3TH.js → chunk-LUPHOXAQ.js} +1 -1
- package/dist/chunk-NRNWEQD7.js +66 -0
- package/dist/{chunk-44TDIHUP.js → chunk-P3MIP2FD.js} +1 -1
- package/dist/{chunk-7ULLUUVJ.js → chunk-PQWWVBSR.js} +1 -1
- package/dist/{chunk-ERW5DEIO.js → chunk-RQLWSLVE.js} +1 -1
- package/dist/chunk-TYAQWVIM.js +159 -0
- package/dist/{chunk-KZZKQLKF.js → chunk-W55J2KJZ.js} +1 -1
- package/dist/chunk-Y2GK27RX.js +79 -0
- package/dist/components/Accordion.cjs +74 -2
- package/dist/components/Accordion.js +3 -3
- package/dist/components/CalendarRange.cjs +228 -53
- package/dist/components/CalendarRange.css +169 -65
- package/dist/components/CalendarRange.js +23 -16
- package/dist/components/Card.cjs +38 -2
- package/dist/components/Card.js +1 -1
- package/dist/components/CompactImagesPreview.cjs +59 -5
- package/dist/components/CompactImagesPreview.js +2 -2
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +186 -11
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +169 -65
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +23 -16
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +195 -20
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +169 -65
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +23 -16
- package/dist/components/DataGrid/PinnedColumns.cjs +211 -36
- package/dist/components/DataGrid/PinnedColumns.css +169 -65
- package/dist/components/DataGrid/PinnedColumns.js +23 -16
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +187 -12
- package/dist/components/DataGrid/TableBody/LoadingCell.css +169 -65
- package/dist/components/DataGrid/TableBody/LoadingCell.js +23 -16
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +193 -18
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +169 -65
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +23 -16
- package/dist/components/DataGrid/TableBody/index.cjs +208 -33
- package/dist/components/DataGrid/TableBody/index.css +169 -65
- package/dist/components/DataGrid/TableBody/index.js +23 -16
- package/dist/components/DataGrid/index.cjs +297 -122
- package/dist/components/DataGrid/index.css +169 -65
- package/dist/components/DataGrid/index.js +23 -16
- package/dist/components/DataGrid/utils.cjs +187 -12
- package/dist/components/DataGrid/utils.css +169 -65
- package/dist/components/DataGrid/utils.js +23 -16
- package/dist/components/DateInput.cjs +247 -72
- package/dist/components/DateInput.css +169 -65
- package/dist/components/DateInput.js +23 -16
- package/dist/components/DateRangeInput.cjs +247 -72
- package/dist/components/DateRangeInput.css +169 -65
- package/dist/components/DateRangeInput.js +23 -16
- package/dist/components/Grid.cjs +81 -76
- package/dist/components/Grid.js +1 -1
- package/dist/components/ListGroup.cjs +553 -0
- package/dist/components/ListGroup.js +11 -0
- package/dist/components/MobileDataGrid/ColumnList.cjs +36 -0
- package/dist/components/MobileDataGrid/ColumnList.js +3 -3
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +194 -19
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +169 -65
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +23 -16
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.cjs +36 -0
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +2 -2
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +238 -27
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +169 -65
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +23 -16
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.cjs +36 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +2 -2
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +36 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +5 -5
- package/dist/components/MobileDataGrid/index.cjs +740 -529
- package/dist/components/MobileDataGrid/index.css +169 -65
- package/dist/components/MobileDataGrid/index.js +23 -16
- package/dist/components/Modal.js +2 -2
- package/dist/components/Notification.cjs +36 -0
- package/dist/components/Notification.js +1 -1
- package/dist/components/PDFViewer/PDFElement.cjs +36 -0
- package/dist/components/PDFViewer/PDFElement.js +2 -2
- package/dist/components/PDFViewer/PDFNavigation.cjs +36 -0
- package/dist/components/PDFViewer/PDFNavigation.js +2 -2
- package/dist/components/PDFViewer/index.cjs +36 -0
- package/dist/components/PDFViewer/index.js +8 -111
- package/dist/components/Pagination.cjs +427 -0
- package/dist/components/Pagination.js +10 -0
- package/dist/components/ProductImagePreview/index.cjs +139 -127
- package/dist/components/ProductImagePreview/index.js +4 -4
- package/dist/components/SideMenuGroup.cjs +36 -0
- package/dist/components/SideMenuGroup.js +1 -1
- package/dist/components/SideMenuItem.cjs +36 -0
- package/dist/components/SideMenuItem.js +1 -1
- package/dist/components/SimpleTable.cjs +36 -0
- package/dist/components/SimpleTable.js +2 -2
- package/dist/components/Stack.cjs +36 -0
- package/dist/components/Stack.js +1 -1
- package/dist/components/Swatch.cjs +36 -0
- package/dist/components/Swatch.js +1 -1
- package/dist/components/Time.cjs +36 -0
- package/dist/components/Time.js +1 -1
- package/dist/components/Tooltip.cjs +1 -1
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/Upload.cjs +36 -0
- package/dist/components/Upload.js +1 -1
- package/dist/components/index.cjs +686 -131
- package/dist/components/index.css +169 -65
- package/dist/components/index.js +33 -17
- package/dist/index.css +169 -65
- package/package.json +1 -1
- package/src/components/Card.tsx +60 -2
- package/src/components/CompactImagesPreview.tsx +54 -30
- package/src/components/Grid.tsx +59 -91
- package/src/components/ListGroup.tsx +82 -0
- package/src/components/Pagination.tsx +182 -0
- package/src/components/Stack.tsx +76 -0
- package/src/components/Tooltip.tsx +4 -3
- package/src/components/index.ts +3 -0
- package/dist/chunk-ER6RCOH3.js +0 -97
- package/dist/chunk-EZCH4PQS.js +0 -29
- package/dist/{chunk-D6YCMQPO.js → chunk-SBCFBHNG.js} +3 -3
package/dist/index.css
CHANGED
|
@@ -668,6 +668,9 @@
|
|
|
668
668
|
.ml-auto {
|
|
669
669
|
margin-left: auto;
|
|
670
670
|
}
|
|
671
|
+
.box-content {
|
|
672
|
+
box-sizing: content-box;
|
|
673
|
+
}
|
|
671
674
|
.block {
|
|
672
675
|
display: block;
|
|
673
676
|
}
|
|
@@ -980,6 +983,9 @@
|
|
|
980
983
|
.cursor-grab {
|
|
981
984
|
cursor: grab;
|
|
982
985
|
}
|
|
986
|
+
.cursor-not-allowed {
|
|
987
|
+
cursor: not-allowed;
|
|
988
|
+
}
|
|
983
989
|
.cursor-pointer {
|
|
984
990
|
cursor: pointer;
|
|
985
991
|
}
|
|
@@ -1058,6 +1064,9 @@
|
|
|
1058
1064
|
.justify-start {
|
|
1059
1065
|
justify-content: flex-start;
|
|
1060
1066
|
}
|
|
1067
|
+
.gap-0 {
|
|
1068
|
+
gap: calc(var(--spacing) * 0);
|
|
1069
|
+
}
|
|
1061
1070
|
.gap-0\.5 {
|
|
1062
1071
|
gap: calc(var(--spacing) * 0.5);
|
|
1063
1072
|
}
|
|
@@ -1268,6 +1277,10 @@
|
|
|
1268
1277
|
border-inline-style: var(--tw-border-style);
|
|
1269
1278
|
border-inline-width: 0px;
|
|
1270
1279
|
}
|
|
1280
|
+
.border-x-1 {
|
|
1281
|
+
border-inline-style: var(--tw-border-style);
|
|
1282
|
+
border-inline-width: 1px;
|
|
1283
|
+
}
|
|
1271
1284
|
.border-y {
|
|
1272
1285
|
border-block-style: var(--tw-border-style);
|
|
1273
1286
|
border-block-width: 1px;
|
|
@@ -1284,6 +1297,10 @@
|
|
|
1284
1297
|
border-right-style: var(--tw-border-style);
|
|
1285
1298
|
border-right-width: 0px;
|
|
1286
1299
|
}
|
|
1300
|
+
.border-r-1 {
|
|
1301
|
+
border-right-style: var(--tw-border-style);
|
|
1302
|
+
border-right-width: 1px;
|
|
1303
|
+
}
|
|
1287
1304
|
.border-b {
|
|
1288
1305
|
border-bottom-style: var(--tw-border-style);
|
|
1289
1306
|
border-bottom-width: 1px;
|
|
@@ -1292,6 +1309,10 @@
|
|
|
1292
1309
|
border-left-style: var(--tw-border-style);
|
|
1293
1310
|
border-left-width: 1px;
|
|
1294
1311
|
}
|
|
1312
|
+
.border-l-1 {
|
|
1313
|
+
border-left-style: var(--tw-border-style);
|
|
1314
|
+
border-left-width: 1px;
|
|
1315
|
+
}
|
|
1295
1316
|
.border-dashed {
|
|
1296
1317
|
--tw-border-style: dashed;
|
|
1297
1318
|
border-style: dashed;
|
|
@@ -1869,6 +1890,9 @@
|
|
|
1869
1890
|
.\!p-0 {
|
|
1870
1891
|
padding: calc(var(--spacing) * 0) !important;
|
|
1871
1892
|
}
|
|
1893
|
+
.p-0 {
|
|
1894
|
+
padding: calc(var(--spacing) * 0);
|
|
1895
|
+
}
|
|
1872
1896
|
.p-0\.5 {
|
|
1873
1897
|
padding: calc(var(--spacing) * 0.5);
|
|
1874
1898
|
}
|
|
@@ -1983,12 +2007,33 @@
|
|
|
1983
2007
|
.pt-\[7px\] {
|
|
1984
2008
|
padding-top: 7px;
|
|
1985
2009
|
}
|
|
2010
|
+
.pt-mobile-component-padding {
|
|
2011
|
+
padding-top: var(--spacing-mobile-component-padding);
|
|
2012
|
+
}
|
|
2013
|
+
.pt-mobile-container-padding {
|
|
2014
|
+
padding-top: var(--spacing-mobile-container-padding);
|
|
2015
|
+
}
|
|
2016
|
+
.pt-mobile-layout-padding {
|
|
2017
|
+
padding-top: var(--spacing-mobile-layout-padding);
|
|
2018
|
+
}
|
|
2019
|
+
.pr-mobile-component-padding {
|
|
2020
|
+
padding-right: var(--spacing-mobile-component-padding);
|
|
2021
|
+
}
|
|
2022
|
+
.pr-mobile-container-padding {
|
|
2023
|
+
padding-right: var(--spacing-mobile-container-padding);
|
|
2024
|
+
}
|
|
2025
|
+
.pr-mobile-layout-padding {
|
|
2026
|
+
padding-right: var(--spacing-mobile-layout-padding);
|
|
2027
|
+
}
|
|
1986
2028
|
.pb-2 {
|
|
1987
2029
|
padding-bottom: calc(var(--spacing) * 2);
|
|
1988
2030
|
}
|
|
1989
2031
|
.pb-mobile-component-padding {
|
|
1990
2032
|
padding-bottom: var(--spacing-mobile-component-padding);
|
|
1991
2033
|
}
|
|
2034
|
+
.pb-mobile-container-padding {
|
|
2035
|
+
padding-bottom: var(--spacing-mobile-container-padding);
|
|
2036
|
+
}
|
|
1992
2037
|
.pb-mobile-layout-padding {
|
|
1993
2038
|
padding-bottom: var(--spacing-mobile-layout-padding);
|
|
1994
2039
|
}
|
|
@@ -2010,6 +2055,12 @@
|
|
|
2010
2055
|
.pl-mobile-component-padding {
|
|
2011
2056
|
padding-left: var(--spacing-mobile-component-padding);
|
|
2012
2057
|
}
|
|
2058
|
+
.pl-mobile-container-padding {
|
|
2059
|
+
padding-left: var(--spacing-mobile-container-padding);
|
|
2060
|
+
}
|
|
2061
|
+
.pl-mobile-layout-padding {
|
|
2062
|
+
padding-left: var(--spacing-mobile-layout-padding);
|
|
2063
|
+
}
|
|
2013
2064
|
.text-center {
|
|
2014
2065
|
text-align: center;
|
|
2015
2066
|
}
|
|
@@ -2230,6 +2281,9 @@
|
|
|
2230
2281
|
.text-text-action-normal {
|
|
2231
2282
|
color: var(--color-text-action-normal);
|
|
2232
2283
|
}
|
|
2284
|
+
.text-text-action-primary-disabled {
|
|
2285
|
+
color: var(--color-text-action-primary-disabled);
|
|
2286
|
+
}
|
|
2233
2287
|
.text-text-action-primary-normal {
|
|
2234
2288
|
color: var(--color-text-action-primary-normal);
|
|
2235
2289
|
}
|
|
@@ -2308,6 +2362,9 @@
|
|
|
2308
2362
|
.opacity-40 {
|
|
2309
2363
|
opacity: 40%;
|
|
2310
2364
|
}
|
|
2365
|
+
.opacity-50 {
|
|
2366
|
+
opacity: 50%;
|
|
2367
|
+
}
|
|
2311
2368
|
.opacity-70 {
|
|
2312
2369
|
opacity: 70%;
|
|
2313
2370
|
}
|
|
@@ -3047,6 +3104,13 @@
|
|
|
3047
3104
|
}
|
|
3048
3105
|
}
|
|
3049
3106
|
}
|
|
3107
|
+
.hover\:bg-background-grouped-secondary-normal {
|
|
3108
|
+
&:hover {
|
|
3109
|
+
@media (hover: hover) {
|
|
3110
|
+
background-color: var(--color-background-grouped-secondary-normal);
|
|
3111
|
+
}
|
|
3112
|
+
}
|
|
3113
|
+
}
|
|
3050
3114
|
.hover\:\!text-brand-text-on-action-primary-hover {
|
|
3051
3115
|
&:hover {
|
|
3052
3116
|
@media (hover: hover) {
|
|
@@ -3193,6 +3257,11 @@
|
|
|
3193
3257
|
background-color: var(--color-background-action-secondary-hover);
|
|
3194
3258
|
}
|
|
3195
3259
|
}
|
|
3260
|
+
.focus\:bg-background-grouped-secondary-normal {
|
|
3261
|
+
&:focus {
|
|
3262
|
+
background-color: var(--color-background-grouped-secondary-normal);
|
|
3263
|
+
}
|
|
3264
|
+
}
|
|
3196
3265
|
.focus\:text-text-action-critical-hover {
|
|
3197
3266
|
&:focus {
|
|
3198
3267
|
color: var(--color-text-action-critical-hover);
|
|
@@ -3403,6 +3472,11 @@
|
|
|
3403
3472
|
pointer-events: none;
|
|
3404
3473
|
}
|
|
3405
3474
|
}
|
|
3475
|
+
.disabled\:cursor-default {
|
|
3476
|
+
&:disabled {
|
|
3477
|
+
cursor: default;
|
|
3478
|
+
}
|
|
3479
|
+
}
|
|
3406
3480
|
.disabled\:\!border-border-primary-normal {
|
|
3407
3481
|
&:disabled {
|
|
3408
3482
|
border-color: var(--color-border-primary-normal) !important;
|
|
@@ -3709,11 +3783,6 @@
|
|
|
3709
3783
|
width: 100%;
|
|
3710
3784
|
}
|
|
3711
3785
|
}
|
|
3712
|
-
.sm\:grid-cols-2 {
|
|
3713
|
-
@media (width >= 320px) {
|
|
3714
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
3715
|
-
}
|
|
3716
|
-
}
|
|
3717
3786
|
.md\:block {
|
|
3718
3787
|
@media (width >= 768px) {
|
|
3719
3788
|
display: block;
|
|
@@ -3744,66 +3813,6 @@
|
|
|
3744
3813
|
gap: calc(var(--spacing) * 2);
|
|
3745
3814
|
}
|
|
3746
3815
|
}
|
|
3747
|
-
.lg\:grid-cols-4 {
|
|
3748
|
-
@media (width >= 1024px) {
|
|
3749
|
-
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
3750
|
-
}
|
|
3751
|
-
}
|
|
3752
|
-
.xl\:grid-cols-4 {
|
|
3753
|
-
@media (width >= 1280px) {
|
|
3754
|
-
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
3755
|
-
}
|
|
3756
|
-
}
|
|
3757
|
-
.xl\:grid-cols-5 {
|
|
3758
|
-
@media (width >= 1280px) {
|
|
3759
|
-
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
3760
|
-
}
|
|
3761
|
-
}
|
|
3762
|
-
.xl\:grid-cols-6 {
|
|
3763
|
-
@media (width >= 1280px) {
|
|
3764
|
-
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
3765
|
-
}
|
|
3766
|
-
}
|
|
3767
|
-
.xl\:grid-cols-8 {
|
|
3768
|
-
@media (width >= 1280px) {
|
|
3769
|
-
grid-template-columns: repeat(8, minmax(0, 1fr));
|
|
3770
|
-
}
|
|
3771
|
-
}
|
|
3772
|
-
.\32xl\:grid-cols-6 {
|
|
3773
|
-
@media (width >= 1536px) {
|
|
3774
|
-
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
3775
|
-
}
|
|
3776
|
-
}
|
|
3777
|
-
.\32xl\:grid-cols-7 {
|
|
3778
|
-
@media (width >= 1536px) {
|
|
3779
|
-
grid-template-columns: repeat(7, minmax(0, 1fr));
|
|
3780
|
-
}
|
|
3781
|
-
}
|
|
3782
|
-
.\32xl\:grid-cols-8 {
|
|
3783
|
-
@media (width >= 1536px) {
|
|
3784
|
-
grid-template-columns: repeat(8, minmax(0, 1fr));
|
|
3785
|
-
}
|
|
3786
|
-
}
|
|
3787
|
-
.\32xl\:grid-cols-9 {
|
|
3788
|
-
@media (width >= 1536px) {
|
|
3789
|
-
grid-template-columns: repeat(9, minmax(0, 1fr));
|
|
3790
|
-
}
|
|
3791
|
-
}
|
|
3792
|
-
.\32xl\:grid-cols-10 {
|
|
3793
|
-
@media (width >= 1536px) {
|
|
3794
|
-
grid-template-columns: repeat(10, minmax(0, 1fr));
|
|
3795
|
-
}
|
|
3796
|
-
}
|
|
3797
|
-
.\32xl\:grid-cols-11 {
|
|
3798
|
-
@media (width >= 1536px) {
|
|
3799
|
-
grid-template-columns: repeat(11, minmax(0, 1fr));
|
|
3800
|
-
}
|
|
3801
|
-
}
|
|
3802
|
-
.\32xl\:grid-cols-12 {
|
|
3803
|
-
@media (width >= 1536px) {
|
|
3804
|
-
grid-template-columns: repeat(12, minmax(0, 1fr));
|
|
3805
|
-
}
|
|
3806
|
-
}
|
|
3807
3816
|
.compact\:mt-desktop-compact-component-gap {
|
|
3808
3817
|
&:where([data-compact]) {
|
|
3809
3818
|
margin-top: var(--spacing-desktop-compact-component-gap);
|
|
@@ -3909,11 +3918,46 @@
|
|
|
3909
3918
|
padding-block: var(--spacing-desktop-compact-layout-padding);
|
|
3910
3919
|
}
|
|
3911
3920
|
}
|
|
3921
|
+
.compact\:pt-desktop-compact-component-padding {
|
|
3922
|
+
&:where([data-compact]) {
|
|
3923
|
+
padding-top: var(--spacing-desktop-compact-component-padding);
|
|
3924
|
+
}
|
|
3925
|
+
}
|
|
3926
|
+
.compact\:pt-desktop-compact-container-padding {
|
|
3927
|
+
&:where([data-compact]) {
|
|
3928
|
+
padding-top: var(--spacing-desktop-compact-container-padding);
|
|
3929
|
+
}
|
|
3930
|
+
}
|
|
3931
|
+
.compact\:pt-desktop-compact-layout-padding {
|
|
3932
|
+
&:where([data-compact]) {
|
|
3933
|
+
padding-top: var(--spacing-desktop-compact-layout-padding);
|
|
3934
|
+
}
|
|
3935
|
+
}
|
|
3936
|
+
.compact\:pr-desktop-compact-component-padding {
|
|
3937
|
+
&:where([data-compact]) {
|
|
3938
|
+
padding-right: var(--spacing-desktop-compact-component-padding);
|
|
3939
|
+
}
|
|
3940
|
+
}
|
|
3941
|
+
.compact\:pr-desktop-compact-container-padding {
|
|
3942
|
+
&:where([data-compact]) {
|
|
3943
|
+
padding-right: var(--spacing-desktop-compact-container-padding);
|
|
3944
|
+
}
|
|
3945
|
+
}
|
|
3946
|
+
.compact\:pr-desktop-compact-layout-padding {
|
|
3947
|
+
&:where([data-compact]) {
|
|
3948
|
+
padding-right: var(--spacing-desktop-compact-layout-padding);
|
|
3949
|
+
}
|
|
3950
|
+
}
|
|
3912
3951
|
.compact\:pb-desktop-compact-component-padding {
|
|
3913
3952
|
&:where([data-compact]) {
|
|
3914
3953
|
padding-bottom: var(--spacing-desktop-compact-component-padding);
|
|
3915
3954
|
}
|
|
3916
3955
|
}
|
|
3956
|
+
.compact\:pb-desktop-compact-container-padding {
|
|
3957
|
+
&:where([data-compact]) {
|
|
3958
|
+
padding-bottom: var(--spacing-desktop-compact-container-padding);
|
|
3959
|
+
}
|
|
3960
|
+
}
|
|
3917
3961
|
.compact\:pb-desktop-compact-layout-padding {
|
|
3918
3962
|
&:where([data-compact]) {
|
|
3919
3963
|
padding-bottom: var(--spacing-desktop-compact-layout-padding);
|
|
@@ -3924,6 +3968,16 @@
|
|
|
3924
3968
|
padding-left: var(--spacing-desktop-compact-component-padding);
|
|
3925
3969
|
}
|
|
3926
3970
|
}
|
|
3971
|
+
.compact\:pl-desktop-compact-container-padding {
|
|
3972
|
+
&:where([data-compact]) {
|
|
3973
|
+
padding-left: var(--spacing-desktop-compact-container-padding);
|
|
3974
|
+
}
|
|
3975
|
+
}
|
|
3976
|
+
.compact\:pl-desktop-compact-layout-padding {
|
|
3977
|
+
&:where([data-compact]) {
|
|
3978
|
+
padding-left: var(--spacing-desktop-compact-layout-padding);
|
|
3979
|
+
}
|
|
3980
|
+
}
|
|
3927
3981
|
.compact\:text-caption-desktop-compact {
|
|
3928
3982
|
&:where([data-compact]) {
|
|
3929
3983
|
font-size: var(--text-caption-desktop-compact);
|
|
@@ -4095,6 +4149,11 @@
|
|
|
4095
4149
|
flex-grow: 0;
|
|
4096
4150
|
}
|
|
4097
4151
|
}
|
|
4152
|
+
.desktop\:grid-cols-4 {
|
|
4153
|
+
@container root (width >= 48rem) {
|
|
4154
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
4155
|
+
}
|
|
4156
|
+
}
|
|
4098
4157
|
.desktop\:flex-col {
|
|
4099
4158
|
@container root (width >= 48rem) {
|
|
4100
4159
|
flex-direction: column;
|
|
@@ -4230,16 +4289,51 @@
|
|
|
4230
4289
|
padding-block: var(--spacing-desktop-layout-padding);
|
|
4231
4290
|
}
|
|
4232
4291
|
}
|
|
4292
|
+
.desktop\:pt-desktop-component-padding {
|
|
4293
|
+
@container root (width >= 48rem) {
|
|
4294
|
+
padding-top: var(--spacing-desktop-component-padding);
|
|
4295
|
+
}
|
|
4296
|
+
}
|
|
4297
|
+
.desktop\:pt-desktop-container-padding {
|
|
4298
|
+
@container root (width >= 48rem) {
|
|
4299
|
+
padding-top: var(--spacing-desktop-container-padding);
|
|
4300
|
+
}
|
|
4301
|
+
}
|
|
4233
4302
|
.desktop\:pt-desktop-layout-gap {
|
|
4234
4303
|
@container root (width >= 48rem) {
|
|
4235
4304
|
padding-top: var(--spacing-desktop-layout-gap);
|
|
4236
4305
|
}
|
|
4237
4306
|
}
|
|
4307
|
+
.desktop\:pt-desktop-layout-padding {
|
|
4308
|
+
@container root (width >= 48rem) {
|
|
4309
|
+
padding-top: var(--spacing-desktop-layout-padding);
|
|
4310
|
+
}
|
|
4311
|
+
}
|
|
4312
|
+
.desktop\:pr-desktop-component-padding {
|
|
4313
|
+
@container root (width >= 48rem) {
|
|
4314
|
+
padding-right: var(--spacing-desktop-component-padding);
|
|
4315
|
+
}
|
|
4316
|
+
}
|
|
4317
|
+
.desktop\:pr-desktop-container-padding {
|
|
4318
|
+
@container root (width >= 48rem) {
|
|
4319
|
+
padding-right: var(--spacing-desktop-container-padding);
|
|
4320
|
+
}
|
|
4321
|
+
}
|
|
4322
|
+
.desktop\:pr-desktop-layout-padding {
|
|
4323
|
+
@container root (width >= 48rem) {
|
|
4324
|
+
padding-right: var(--spacing-desktop-layout-padding);
|
|
4325
|
+
}
|
|
4326
|
+
}
|
|
4238
4327
|
.desktop\:pb-desktop-component-padding {
|
|
4239
4328
|
@container root (width >= 48rem) {
|
|
4240
4329
|
padding-bottom: var(--spacing-desktop-component-padding);
|
|
4241
4330
|
}
|
|
4242
4331
|
}
|
|
4332
|
+
.desktop\:pb-desktop-container-padding {
|
|
4333
|
+
@container root (width >= 48rem) {
|
|
4334
|
+
padding-bottom: var(--spacing-desktop-container-padding);
|
|
4335
|
+
}
|
|
4336
|
+
}
|
|
4243
4337
|
.desktop\:pb-desktop-layout-padding {
|
|
4244
4338
|
@container root (width >= 48rem) {
|
|
4245
4339
|
padding-bottom: var(--spacing-desktop-layout-padding);
|
|
@@ -4250,6 +4344,16 @@
|
|
|
4250
4344
|
padding-left: var(--spacing-desktop-component-padding);
|
|
4251
4345
|
}
|
|
4252
4346
|
}
|
|
4347
|
+
.desktop\:pl-desktop-container-padding {
|
|
4348
|
+
@container root (width >= 48rem) {
|
|
4349
|
+
padding-left: var(--spacing-desktop-container-padding);
|
|
4350
|
+
}
|
|
4351
|
+
}
|
|
4352
|
+
.desktop\:pl-desktop-layout-padding {
|
|
4353
|
+
@container root (width >= 48rem) {
|
|
4354
|
+
padding-left: var(--spacing-desktop-layout-padding);
|
|
4355
|
+
}
|
|
4356
|
+
}
|
|
4253
4357
|
.desktop\:text-caption-desktop {
|
|
4254
4358
|
@container root (width >= 48rem) {
|
|
4255
4359
|
font-size: var(--text-caption-desktop);
|
package/package.json
CHANGED
package/src/components/Card.tsx
CHANGED
|
@@ -7,17 +7,75 @@ export function Card(
|
|
|
7
7
|
selected?: boolean;
|
|
8
8
|
testid?: string;
|
|
9
9
|
as?: Tags;
|
|
10
|
+
/**
|
|
11
|
+
* When true applies both horizontal and vertical padding using layout spacing tokens.
|
|
12
|
+
* If none of padding / paddingX / paddingY are provided the original desktop-only padding class is applied for backward compatibility.
|
|
13
|
+
*/
|
|
14
|
+
padding?: boolean;
|
|
15
|
+
/** Horizontal only padding (overrides padding for X axis if both supplied). */
|
|
16
|
+
paddingX?: boolean;
|
|
17
|
+
/** Vertical only padding (overrides padding for Y axis if both supplied). */
|
|
18
|
+
paddingY?: boolean;
|
|
19
|
+
/** Bottom only padding */
|
|
20
|
+
paddingBottom?: boolean;
|
|
21
|
+
/** Top only padding */
|
|
22
|
+
paddingTop?: boolean;
|
|
23
|
+
/** Left only padding */
|
|
24
|
+
paddingLeft?: boolean;
|
|
25
|
+
/** Right only padding */
|
|
26
|
+
paddingRight?: boolean;
|
|
10
27
|
},
|
|
11
28
|
) {
|
|
12
|
-
const {
|
|
29
|
+
const {
|
|
30
|
+
children,
|
|
31
|
+
selected,
|
|
32
|
+
testid,
|
|
33
|
+
padding,
|
|
34
|
+
paddingX,
|
|
35
|
+
paddingY,
|
|
36
|
+
paddingBottom,
|
|
37
|
+
paddingTop,
|
|
38
|
+
paddingLeft,
|
|
39
|
+
paddingRight,
|
|
40
|
+
...rest
|
|
41
|
+
} = props;
|
|
13
42
|
|
|
14
43
|
const CardComponent = props.as || "div";
|
|
44
|
+
const anyPaddingPropSpecified =
|
|
45
|
+
padding !== undefined ||
|
|
46
|
+
paddingX !== undefined ||
|
|
47
|
+
paddingY !== undefined ||
|
|
48
|
+
paddingBottom !== undefined ||
|
|
49
|
+
paddingTop !== undefined ||
|
|
50
|
+
paddingLeft !== undefined ||
|
|
51
|
+
paddingRight !== undefined;
|
|
52
|
+
|
|
53
|
+
const paddingClasses = clsx(
|
|
54
|
+
// Backward compatibility: if no new padding props provided keep existing class.
|
|
55
|
+
!anyPaddingPropSpecified && "p-desktop-layout-padding",
|
|
56
|
+
// New responsive spacing tokens (mirrors Stack for layout sizing)
|
|
57
|
+
padding &&
|
|
58
|
+
"p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding",
|
|
59
|
+
paddingX &&
|
|
60
|
+
"px-mobile-layout-padding desktop:px-desktop-layout-padding compact:px-desktop-compact-layout-padding",
|
|
61
|
+
paddingY &&
|
|
62
|
+
"py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding",
|
|
63
|
+
paddingBottom &&
|
|
64
|
+
"pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding",
|
|
65
|
+
paddingTop &&
|
|
66
|
+
"pt-mobile-layout-padding desktop:pt-desktop-layout-padding compact:pt-desktop-compact-layout-padding",
|
|
67
|
+
paddingLeft &&
|
|
68
|
+
"pl-mobile-layout-padding desktop:pl-desktop-layout-padding compact:pl-desktop-compact-layout-padding",
|
|
69
|
+
paddingRight &&
|
|
70
|
+
"pr-mobile-layout-padding desktop:pr-desktop-layout-padding compact:pr-desktop-compact-layout-padding",
|
|
71
|
+
);
|
|
15
72
|
return (
|
|
16
73
|
<CardComponent
|
|
17
74
|
{...rest}
|
|
18
75
|
data-testid={testid}
|
|
19
76
|
className={clsx(
|
|
20
|
-
"rounded-sm
|
|
77
|
+
"rounded-sm",
|
|
78
|
+
paddingClasses,
|
|
21
79
|
selected
|
|
22
80
|
? "border-2 border-border-primary-focus"
|
|
23
81
|
: "border border-border-primary-normal",
|
|
@@ -9,12 +9,18 @@ type CompactImagesPreviewProps = {
|
|
|
9
9
|
sources: ImageSource[];
|
|
10
10
|
currentSourceIndex: number;
|
|
11
11
|
placeholderImageUri?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional alt text to use when falling back to the placeholder image due to an image load error
|
|
14
|
+
* or when there are no valid sources. Defaults to "placeholder image".
|
|
15
|
+
*/
|
|
16
|
+
placeholderAlt?: string;
|
|
12
17
|
activeImageWidth?: number | string;
|
|
13
18
|
activeImageHeight?: number | string;
|
|
14
19
|
thumbnailWidth?: number;
|
|
15
20
|
thumbnailHeight?: number;
|
|
16
21
|
enableThumbnailBorder?: boolean;
|
|
17
22
|
onChangeSource: (newIndex: number) => void;
|
|
23
|
+
onMainImageClick?: () => void;
|
|
18
24
|
};
|
|
19
25
|
export function CompactImagesPreview(props: CompactImagesPreviewProps) {
|
|
20
26
|
const {
|
|
@@ -26,11 +32,25 @@ export function CompactImagesPreview(props: CompactImagesPreviewProps) {
|
|
|
26
32
|
thumbnailHeight = 30,
|
|
27
33
|
enableThumbnailBorder = false,
|
|
28
34
|
placeholderImageUri,
|
|
35
|
+
placeholderAlt = "placeholder image",
|
|
29
36
|
onChangeSource,
|
|
37
|
+
onMainImageClick,
|
|
30
38
|
} = props;
|
|
31
39
|
const isMobile = useMatchesMobile();
|
|
32
40
|
const imagesCount = sources.length;
|
|
33
41
|
|
|
42
|
+
const handleImgError = useCallback(
|
|
43
|
+
(e: React.SyntheticEvent<HTMLImageElement>) => {
|
|
44
|
+
if (!placeholderImageUri) return;
|
|
45
|
+
const img = e.currentTarget;
|
|
46
|
+
// Prevent infinite loop if placeholder also 404s
|
|
47
|
+
if (img.src === placeholderImageUri) return;
|
|
48
|
+
img.src = placeholderImageUri;
|
|
49
|
+
if (!img.alt) img.alt = placeholderAlt;
|
|
50
|
+
},
|
|
51
|
+
[placeholderImageUri, placeholderAlt],
|
|
52
|
+
);
|
|
53
|
+
|
|
34
54
|
const handleThumbnailClick = useCallback(
|
|
35
55
|
(newIndex: number) => {
|
|
36
56
|
if (newIndex === currentSourceIndex) return;
|
|
@@ -55,13 +75,16 @@ export function CompactImagesPreview(props: CompactImagesPreviewProps) {
|
|
|
55
75
|
objectFit: "cover",
|
|
56
76
|
}}
|
|
57
77
|
src={placeholderImageUri}
|
|
58
|
-
alt={
|
|
78
|
+
alt={placeholderAlt}
|
|
79
|
+
onError={handleImgError}
|
|
80
|
+
onClick={onMainImageClick}
|
|
59
81
|
/>
|
|
60
82
|
);
|
|
61
83
|
const currentSource = sources[currentSourceIndex];
|
|
62
84
|
return (
|
|
63
85
|
<Stack sizing="layout">
|
|
64
86
|
<img
|
|
87
|
+
className={clsx("object-center", onMainImageClick && "cursor-pointer")}
|
|
65
88
|
style={{
|
|
66
89
|
width: isMobile ? "100%" : activeImageWidth,
|
|
67
90
|
height: activeImageHeight,
|
|
@@ -70,37 +93,38 @@ export function CompactImagesPreview(props: CompactImagesPreviewProps) {
|
|
|
70
93
|
}}
|
|
71
94
|
src={currentSource.uri}
|
|
72
95
|
alt={currentSource.name}
|
|
96
|
+
onError={handleImgError}
|
|
97
|
+
onClick={onMainImageClick}
|
|
73
98
|
/>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
99
|
+
<div className="flex flex-row flex-wrap items-center gap-3">
|
|
100
|
+
{sources.map((source, index) => (
|
|
101
|
+
<button
|
|
102
|
+
key={`compact-image-${source.uri}-${index}`}
|
|
103
|
+
onClick={(e) => {
|
|
104
|
+
e.preventDefault();
|
|
105
|
+
handleThumbnailClick(index);
|
|
106
|
+
}}
|
|
107
|
+
className={clsx(
|
|
108
|
+
"cursor-pointer",
|
|
109
|
+
currentSourceIndex === index && enableThumbnailBorder
|
|
110
|
+
? "ring-2 ring-offset-2 ring-brand-400 transition-discrete duration-300"
|
|
111
|
+
: "ring-brand-400/0",
|
|
112
|
+
)}
|
|
113
|
+
>
|
|
114
|
+
<img
|
|
115
|
+
src={source.uri}
|
|
116
|
+
alt={source.name}
|
|
117
|
+
style={{
|
|
118
|
+
width: thumbnailWidth,
|
|
119
|
+
height: thumbnailHeight,
|
|
120
|
+
objectPosition: "center",
|
|
121
|
+
objectFit: "cover",
|
|
82
122
|
}}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
)}
|
|
89
|
-
>
|
|
90
|
-
<img
|
|
91
|
-
src={source.uri}
|
|
92
|
-
alt={source.name}
|
|
93
|
-
style={{
|
|
94
|
-
width: thumbnailWidth,
|
|
95
|
-
height: thumbnailHeight,
|
|
96
|
-
objectPosition: "center",
|
|
97
|
-
objectFit: "cover",
|
|
98
|
-
}}
|
|
99
|
-
/>
|
|
100
|
-
</button>
|
|
101
|
-
))}
|
|
102
|
-
</div>
|
|
103
|
-
)}
|
|
123
|
+
onError={handleImgError}
|
|
124
|
+
/>
|
|
125
|
+
</button>
|
|
126
|
+
))}
|
|
127
|
+
</div>
|
|
104
128
|
</Stack>
|
|
105
129
|
);
|
|
106
130
|
}
|