@appdirect/design-system 0.0.25 → 0.0.28
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/README.md +11 -0
- package/dist/ComplexComponents/DashboardWidget/DashboardWidget.js +1 -1
- package/dist/ComplexComponents/DashboardWidget/DashboardWidget.tsx +9 -7
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/DateRangeSelectorFilter/index.js +1 -1
- package/dist/ComplexComponents/DataTable/CustomTopToolbar/DateRangeSelectorFilter/index.tsx +1 -1
- package/dist/ComplexComponents/KeyInsight/KeyInsights.js +6 -1
- package/dist/ComplexComponents/KeyInsight/KeyInsights.tsx +12 -2
- package/dist/ComplexComponents/PageContentHeader/PageContentHeader.js +1 -1
- package/dist/ComplexComponents/PageContentHeader/PageContentHeader.tsx +16 -11
- package/dist/ComplexComponents/Slat/Slat.js +14 -7
- package/dist/ComplexComponents/Slat/Slat.tsx +31 -19
- package/dist/DESIGN.md +4 -0
- package/dist/DataDisplay/Alert.js +2 -2
- package/dist/DataDisplay/Alert.tsx +7 -0
- package/dist/DataDisplay/Card.js +5 -4
- package/dist/DataDisplay/Card.tsx +5 -11
- package/dist/Overlays/Modal.js +2 -2
- package/dist/Overlays/Modal.tsx +4 -4
- package/dist/contracts/Alert.json +5 -0
- package/dist/contracts/index.json +1 -1
- package/dist/css/mantine.css +120 -12
- package/dist/css/tokens.css +52 -14
- package/dist/hooks/index.js +18 -0
- package/dist/hooks/index.ts +28 -0
- package/dist/hooks/useSelectedRowsText.js +73 -0
- package/dist/hooks/useSelectedRowsText.ts +74 -0
- package/dist/stories/ComplexComponents/DashboardWidget/DashboardWidget.stories.tsx +7 -0
- package/dist/stories/ComplexComponents/PageContentHeader/PageContentHeader.stories.tsx +21 -21
- package/dist/stories/DataDisplay/Progress.stories.tsx +11 -27
- package/dist/stories/Navigation/Stepper.stories.tsx +25 -21
- package/dist/stories/Overlays/Drawer.stories.tsx +6 -6
- package/dist/stories/Overlays/Modal.stories.tsx +31 -11
- package/dist/stories/index.json +4 -3
- package/package.json +97 -3
package/dist/css/mantine.css
CHANGED
|
@@ -78,6 +78,13 @@
|
|
|
78
78
|
--ad-alert-title-gap-bottom: var(--ad-spacing-xs);
|
|
79
79
|
--ad-alert-body-font-size: var(--ad-font-sizes-sm);
|
|
80
80
|
--ad-alert-body-fg: var(--ad-color-text-bright);
|
|
81
|
+
--ad-alert-panel-padding-x: var(--ad-spacing-xs);
|
|
82
|
+
--ad-alert-panel-padding-y: var(--ad-spacing-xxs);
|
|
83
|
+
--ad-alert-panel-border-width: var(--ad-border-width-none);
|
|
84
|
+
--ad-alert-panel-border-radius: 0px;
|
|
85
|
+
--ad-alert-panel-icon-size: var(--ad-icon-size-md);
|
|
86
|
+
--ad-alert-panel-icon-gap: var(--ad-spacing-xs);
|
|
87
|
+
--ad-alert-panel-icon-offset-top: 3px;
|
|
81
88
|
--ad-alert-icon-size: 20px;
|
|
82
89
|
--ad-alert-icon-margin-right: var(--ad-spacing-md);
|
|
83
90
|
--ad-app-shell-root-bg: var(--ad-color-bg-body);
|
|
@@ -105,7 +112,6 @@
|
|
|
105
112
|
--ad-avatar-sizes-xl-size: 84px;
|
|
106
113
|
--ad-badge-root-base-font-family: var(--ad-font-family-body);
|
|
107
114
|
--ad-badge-root-base-font-weight: var(--ad-font-weights-bold);
|
|
108
|
-
--ad-badge-root-base-line-height: var(--ad-line-heights-xs);
|
|
109
115
|
--ad-badge-root-base-border-radius: var(--ad-radius-sm);
|
|
110
116
|
--ad-badge-root-base-gap: 5px;
|
|
111
117
|
--ad-badge-root-base-padding-y: var(--ad-spacing-none);
|
|
@@ -562,6 +568,7 @@
|
|
|
562
568
|
--ad-drawer-overlay-bg: rgba(0, 0, 0, 0.55);
|
|
563
569
|
--ad-drawer-content-bg: var(--ad-color-bg-default);
|
|
564
570
|
--ad-drawer-content-shadow: var(--ad-shadows-xl);
|
|
571
|
+
--ad-drawer-content-border-radius: 0px;
|
|
565
572
|
--ad-drawer-content-z-index: var(--ad-z-index-modal);
|
|
566
573
|
--ad-drawer-header-bg: var(--ad-color-bg-body);
|
|
567
574
|
--ad-drawer-header-padding-x: var(--ad-spacing-md);
|
|
@@ -1149,22 +1156,34 @@
|
|
|
1149
1156
|
--ad-slat-row-padding: var(--ad-spacing-sm);
|
|
1150
1157
|
--ad-slat-row-gap: var(--ad-spacing-sm);
|
|
1151
1158
|
--ad-slat-row-icon-header-gap: var(--ad-spacing-xs);
|
|
1152
|
-
--ad-slat-row-subhead-gap: var(--ad-spacing-xshalf);
|
|
1153
1159
|
--ad-slat-sizes-xs-title-order: 6;
|
|
1154
1160
|
--ad-slat-sizes-xs-subtitle-size: xs;
|
|
1155
|
-
--ad-slat-sizes-xs-
|
|
1161
|
+
--ad-slat-sizes-xs-subhead-gap: var(--ad-spacing-xshalf);
|
|
1162
|
+
--ad-slat-sizes-xs-indicator-size: 8px;
|
|
1163
|
+
--ad-slat-sizes-xs-badge-size: xs;
|
|
1156
1164
|
--ad-slat-sizes-sm-title-order: 5;
|
|
1157
1165
|
--ad-slat-sizes-sm-subtitle-size: sm;
|
|
1158
|
-
--ad-slat-sizes-sm-
|
|
1166
|
+
--ad-slat-sizes-sm-subhead-gap: var(--ad-spacing-xshalf);
|
|
1167
|
+
--ad-slat-sizes-sm-indicator-size: 12px;
|
|
1168
|
+
--ad-slat-sizes-sm-badge-size: sm;
|
|
1159
1169
|
--ad-slat-sizes-md-title-order: 4;
|
|
1160
1170
|
--ad-slat-sizes-md-subtitle-size: md;
|
|
1161
|
-
--ad-slat-sizes-md-
|
|
1171
|
+
--ad-slat-sizes-md-subhead-gap: var(--ad-spacing-xshalf);
|
|
1172
|
+
--ad-slat-sizes-md-indicator-size: 16px;
|
|
1173
|
+
--ad-slat-sizes-md-badge-size: md;
|
|
1162
1174
|
--ad-slat-sizes-lg-title-order: 3;
|
|
1163
1175
|
--ad-slat-sizes-lg-subtitle-size: lg;
|
|
1164
|
-
--ad-slat-sizes-lg-
|
|
1176
|
+
--ad-slat-sizes-lg-subhead-gap: var(--ad-spacing-xs);
|
|
1177
|
+
--ad-slat-sizes-lg-indicator-size: 20px;
|
|
1178
|
+
--ad-slat-sizes-lg-badge-size: lg;
|
|
1165
1179
|
--ad-slat-sizes-xl-title-order: 2;
|
|
1166
1180
|
--ad-slat-sizes-xl-subtitle-size: xl;
|
|
1167
|
-
--ad-slat-sizes-xl-
|
|
1181
|
+
--ad-slat-sizes-xl-subhead-gap: var(--ad-spacing-xs);
|
|
1182
|
+
--ad-slat-sizes-xl-indicator-size: 24px;
|
|
1183
|
+
--ad-slat-sizes-xl-badge-size: xl;
|
|
1184
|
+
--ad-slat-title-font-weight: var(--ad-font-weights-medium);
|
|
1185
|
+
--ad-slat-title-line-height: 1.16;
|
|
1186
|
+
--ad-slat-subtitle-line-height: 1.16;
|
|
1168
1187
|
--ad-slider-root-color: var(--ad-color-brand-primary);
|
|
1169
1188
|
--ad-slider-root-track-bg: var(--ad-color-border-subtle);
|
|
1170
1189
|
--ad-slider-root-track-disabled-bg: var(--ad-color-state-disabled);
|
|
@@ -1591,6 +1610,22 @@
|
|
|
1591
1610
|
margin-inline-end: var(--ad-spacing-md);
|
|
1592
1611
|
flex-shrink: 0;
|
|
1593
1612
|
}
|
|
1613
|
+
.mantine-Alert-root[data-panel] {
|
|
1614
|
+
padding-inline: var(--ad-spacing-xs);
|
|
1615
|
+
padding-block: var(--ad-spacing-xxs);
|
|
1616
|
+
border-radius: 0px;
|
|
1617
|
+
border-width: var(--ad-border-width-none);
|
|
1618
|
+
}
|
|
1619
|
+
.mantine-Alert-root[data-panel] .mantine-Alert-icon {
|
|
1620
|
+
width: var(--ad-icon-size-md);
|
|
1621
|
+
height: var(--ad-icon-size-md);
|
|
1622
|
+
margin-inline-end: var(--ad-spacing-xs);
|
|
1623
|
+
margin-top: 3px;
|
|
1624
|
+
}
|
|
1625
|
+
.mantine-Alert-root[data-panel] .mantine-Alert-icon svg {
|
|
1626
|
+
width: 100%;
|
|
1627
|
+
height: 100%;
|
|
1628
|
+
}
|
|
1594
1629
|
/* === AppShell === */
|
|
1595
1630
|
.mantine-AppShell-root {
|
|
1596
1631
|
background: var(--ad-color-bg-body);
|
|
@@ -1627,33 +1662,37 @@
|
|
|
1627
1662
|
.mantine-Badge-root {
|
|
1628
1663
|
font-family: var(--ad-font-family-body);
|
|
1629
1664
|
font-weight: var(--ad-font-weights-bold);
|
|
1630
|
-
line-height: var(--ad-line-heights-xs);
|
|
1631
1665
|
border-radius: var(--ad-radius-sm);
|
|
1632
1666
|
padding-block: var(--ad-spacing-none);
|
|
1633
1667
|
gap: 5px;
|
|
1634
1668
|
}
|
|
1635
1669
|
.mantine-Badge-root[data-size="xs"] {
|
|
1636
1670
|
height: 16px;
|
|
1671
|
+
line-height: calc(16px - 2px);
|
|
1637
1672
|
padding-inline: 6px;
|
|
1638
1673
|
font-size: 9px;
|
|
1639
1674
|
}
|
|
1640
1675
|
.mantine-Badge-root[data-size="sm"] {
|
|
1641
1676
|
height: 18px;
|
|
1677
|
+
line-height: calc(18px - 2px);
|
|
1642
1678
|
padding-inline: 8px;
|
|
1643
1679
|
font-size: 10px;
|
|
1644
1680
|
}
|
|
1645
1681
|
.mantine-Badge-root[data-size="md"] {
|
|
1646
1682
|
height: 20px;
|
|
1683
|
+
line-height: calc(20px - 2px);
|
|
1647
1684
|
padding-inline: 10px;
|
|
1648
1685
|
font-size: 11px;
|
|
1649
1686
|
}
|
|
1650
1687
|
.mantine-Badge-root[data-size="lg"] {
|
|
1651
1688
|
height: 26px;
|
|
1689
|
+
line-height: calc(26px - 2px);
|
|
1652
1690
|
padding-inline: 12px;
|
|
1653
1691
|
font-size: 13px;
|
|
1654
1692
|
}
|
|
1655
1693
|
.mantine-Badge-root[data-size="xl"] {
|
|
1656
1694
|
height: 32px;
|
|
1695
|
+
line-height: calc(32px - 2px);
|
|
1657
1696
|
padding-inline: 16px;
|
|
1658
1697
|
font-size: 16px;
|
|
1659
1698
|
}
|
|
@@ -2336,6 +2375,11 @@
|
|
|
2336
2375
|
background: var(--ad-color-brand-light);
|
|
2337
2376
|
border-color: var(--ad-color-border-primary);
|
|
2338
2377
|
}
|
|
2378
|
+
.ad-DashboardWidget-notification {
|
|
2379
|
+
margin-top: calc(var(--ad-spacing-sm) * -1);
|
|
2380
|
+
margin-inline: calc(var(--ad-spacing-lg) * -1);
|
|
2381
|
+
margin-bottom: var(--ad-spacing-sm);
|
|
2382
|
+
}
|
|
2339
2383
|
.ad-DashboardWidget-body {
|
|
2340
2384
|
display: flex;
|
|
2341
2385
|
flex-direction: column;
|
|
@@ -2468,9 +2512,13 @@
|
|
|
2468
2512
|
.mantine-Drawer-overlay {
|
|
2469
2513
|
background: rgba(0, 0, 0, 0.55);
|
|
2470
2514
|
}
|
|
2471
|
-
.mantine-Drawer-content {
|
|
2515
|
+
.mantine-Drawer-content.mantine-Paper-root {
|
|
2472
2516
|
background: var(--ad-color-bg-default);
|
|
2473
2517
|
box-shadow: var(--ad-shadows-xl);
|
|
2518
|
+
border-radius: 0px;
|
|
2519
|
+
}
|
|
2520
|
+
.mantine-Drawer-inner {
|
|
2521
|
+
inset-inline-start: 0;
|
|
2474
2522
|
}
|
|
2475
2523
|
.mantine-Drawer-header {
|
|
2476
2524
|
background: var(--ad-color-bg-body);
|
|
@@ -3096,6 +3144,9 @@
|
|
|
3096
3144
|
.mantine-Modal-overlay {
|
|
3097
3145
|
background: rgba(0, 0, 0, 0.55);
|
|
3098
3146
|
}
|
|
3147
|
+
.mantine-Modal-inner {
|
|
3148
|
+
inset-inline-start: 0;
|
|
3149
|
+
}
|
|
3099
3150
|
.mantine-Modal-content {
|
|
3100
3151
|
background: var(--ad-color-bg-default);
|
|
3101
3152
|
border-radius: var(--ad-radius-sm);
|
|
@@ -3237,12 +3288,10 @@
|
|
|
3237
3288
|
color: var(--ad-color-text-dimmed);
|
|
3238
3289
|
}
|
|
3239
3290
|
/* === NumberInput === */
|
|
3240
|
-
.mantine-NumberInput-
|
|
3291
|
+
.mantine-NumberInput-control {
|
|
3241
3292
|
border-inline-start-color: var(--ad-color-border-default);
|
|
3242
3293
|
border-inline-start-width: var(--ad-border-width-thin);
|
|
3243
3294
|
border-inline-start-style: var(--ad-border-style-solid);
|
|
3244
|
-
}
|
|
3245
|
-
.mantine-NumberInput-control {
|
|
3246
3295
|
background: var(--ad-transparent);
|
|
3247
3296
|
color: var(--ad-color-text-default);
|
|
3248
3297
|
}
|
|
@@ -3483,6 +3532,65 @@ fieldset:disabled .mantine-SegmentedControl-label,
|
|
|
3483
3532
|
border-color: var(--ad-color-transparent);
|
|
3484
3533
|
background: var(--ad-color-transparent);
|
|
3485
3534
|
}
|
|
3535
|
+
/* === Slat === */
|
|
3536
|
+
.ad-Slat .ad-Slat-title.mantine-Title-root {
|
|
3537
|
+
font-weight: var(--ad-font-weights-medium);
|
|
3538
|
+
line-height: 1.16;
|
|
3539
|
+
}
|
|
3540
|
+
.ad-Slat .ad-Slat-subtitle.mantine-Text-root {
|
|
3541
|
+
line-height: 1.16;
|
|
3542
|
+
}
|
|
3543
|
+
.ad-Slat {
|
|
3544
|
+
overflow: hidden;
|
|
3545
|
+
}
|
|
3546
|
+
.ad-Slat .ad-Slat-icon.mantine-ThemeIcon-root {
|
|
3547
|
+
flex-shrink: 0;
|
|
3548
|
+
}
|
|
3549
|
+
.ad-Slat[data-size="xs"] .ad-Slat-subhead {
|
|
3550
|
+
gap: var(--ad-spacing-xshalf);
|
|
3551
|
+
}
|
|
3552
|
+
.ad-Slat[data-size="xs"] .ad-Slat-icon.mantine-ThemeIcon-root {
|
|
3553
|
+
width: calc(var(--ad-headings-sizes-h6-font-size) * 1.16 + var(--ad-font-sizes-xs) * 1.16);
|
|
3554
|
+
height: calc(var(--ad-headings-sizes-h6-font-size) * 1.16 + var(--ad-font-sizes-xs) * 1.16);
|
|
3555
|
+
min-width: calc(var(--ad-headings-sizes-h6-font-size) * 1.16 + var(--ad-font-sizes-xs) * 1.16);
|
|
3556
|
+
min-height: calc(var(--ad-headings-sizes-h6-font-size) * 1.16 + var(--ad-font-sizes-xs) * 1.16);
|
|
3557
|
+
}
|
|
3558
|
+
.ad-Slat[data-size="sm"] .ad-Slat-subhead {
|
|
3559
|
+
gap: var(--ad-spacing-xshalf);
|
|
3560
|
+
}
|
|
3561
|
+
.ad-Slat[data-size="sm"] .ad-Slat-icon.mantine-ThemeIcon-root {
|
|
3562
|
+
width: calc(var(--ad-headings-sizes-h5-font-size) * 1.16 + var(--ad-font-sizes-sm) * 1.16);
|
|
3563
|
+
height: calc(var(--ad-headings-sizes-h5-font-size) * 1.16 + var(--ad-font-sizes-sm) * 1.16);
|
|
3564
|
+
min-width: calc(var(--ad-headings-sizes-h5-font-size) * 1.16 + var(--ad-font-sizes-sm) * 1.16);
|
|
3565
|
+
min-height: calc(var(--ad-headings-sizes-h5-font-size) * 1.16 + var(--ad-font-sizes-sm) * 1.16);
|
|
3566
|
+
}
|
|
3567
|
+
.ad-Slat[data-size="md"] .ad-Slat-subhead {
|
|
3568
|
+
gap: var(--ad-spacing-xshalf);
|
|
3569
|
+
}
|
|
3570
|
+
.ad-Slat[data-size="md"] .ad-Slat-icon.mantine-ThemeIcon-root {
|
|
3571
|
+
width: calc(var(--ad-headings-sizes-h4-font-size) * 1.16 + var(--ad-font-sizes-md) * 1.16);
|
|
3572
|
+
height: calc(var(--ad-headings-sizes-h4-font-size) * 1.16 + var(--ad-font-sizes-md) * 1.16);
|
|
3573
|
+
min-width: calc(var(--ad-headings-sizes-h4-font-size) * 1.16 + var(--ad-font-sizes-md) * 1.16);
|
|
3574
|
+
min-height: calc(var(--ad-headings-sizes-h4-font-size) * 1.16 + var(--ad-font-sizes-md) * 1.16);
|
|
3575
|
+
}
|
|
3576
|
+
.ad-Slat[data-size="lg"] .ad-Slat-subhead {
|
|
3577
|
+
gap: var(--ad-spacing-xs);
|
|
3578
|
+
}
|
|
3579
|
+
.ad-Slat[data-size="lg"] .ad-Slat-icon.mantine-ThemeIcon-root {
|
|
3580
|
+
width: calc(var(--ad-headings-sizes-h3-font-size) * 1.16 + var(--ad-font-sizes-lg) * 1.16);
|
|
3581
|
+
height: calc(var(--ad-headings-sizes-h3-font-size) * 1.16 + var(--ad-font-sizes-lg) * 1.16);
|
|
3582
|
+
min-width: calc(var(--ad-headings-sizes-h3-font-size) * 1.16 + var(--ad-font-sizes-lg) * 1.16);
|
|
3583
|
+
min-height: calc(var(--ad-headings-sizes-h3-font-size) * 1.16 + var(--ad-font-sizes-lg) * 1.16);
|
|
3584
|
+
}
|
|
3585
|
+
.ad-Slat[data-size="xl"] .ad-Slat-subhead {
|
|
3586
|
+
gap: var(--ad-spacing-xs);
|
|
3587
|
+
}
|
|
3588
|
+
.ad-Slat[data-size="xl"] .ad-Slat-icon.mantine-ThemeIcon-root {
|
|
3589
|
+
width: calc(var(--ad-headings-sizes-h2-font-size) * 1.16 + var(--ad-font-sizes-xl) * 1.16);
|
|
3590
|
+
height: calc(var(--ad-headings-sizes-h2-font-size) * 1.16 + var(--ad-font-sizes-xl) * 1.16);
|
|
3591
|
+
min-width: calc(var(--ad-headings-sizes-h2-font-size) * 1.16 + var(--ad-font-sizes-xl) * 1.16);
|
|
3592
|
+
min-height: calc(var(--ad-headings-sizes-h2-font-size) * 1.16 + var(--ad-font-sizes-xl) * 1.16);
|
|
3593
|
+
}
|
|
3486
3594
|
/* === Slider === */
|
|
3487
3595
|
.mantine-Slider-root {
|
|
3488
3596
|
--slider-color: var(--ad-color-brand-primary);
|
package/dist/css/tokens.css
CHANGED
|
@@ -277,6 +277,13 @@
|
|
|
277
277
|
--ad-alert-title-gap-bottom: 10px;
|
|
278
278
|
--ad-alert-body-font-size: 14px;
|
|
279
279
|
--ad-alert-body-fg: #000000;
|
|
280
|
+
--ad-alert-panel-padding-x: 10px;
|
|
281
|
+
--ad-alert-panel-padding-y: 4px;
|
|
282
|
+
--ad-alert-panel-border-width: 0px;
|
|
283
|
+
--ad-alert-panel-border-radius: 0px;
|
|
284
|
+
--ad-alert-panel-icon-size: 16px;
|
|
285
|
+
--ad-alert-panel-icon-gap: 10px;
|
|
286
|
+
--ad-alert-panel-icon-offset-top: 3px;
|
|
280
287
|
--ad-alert-icon-size: 20px;
|
|
281
288
|
--ad-alert-icon-margin-right: 16px;
|
|
282
289
|
--ad-app-shell-root-bg: #ffffff;
|
|
@@ -304,7 +311,6 @@
|
|
|
304
311
|
--ad-avatar-sizes-xl-size: 84px;
|
|
305
312
|
--ad-badge-root-base-font-family: Inter;
|
|
306
313
|
--ad-badge-root-base-font-weight: 700;
|
|
307
|
-
--ad-badge-root-base-line-height: 1.4;
|
|
308
314
|
--ad-badge-root-base-border-radius: 4px;
|
|
309
315
|
--ad-badge-root-base-gap: 5px;
|
|
310
316
|
--ad-badge-root-base-padding-y: 0px;
|
|
@@ -761,6 +767,7 @@
|
|
|
761
767
|
--ad-drawer-overlay-bg: rgba(0, 0, 0, 0.55);
|
|
762
768
|
--ad-drawer-content-bg: #ffffff;
|
|
763
769
|
--ad-drawer-content-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.05), 0px 36px 28px -7px rgba(0, 0, 0, 0.05), 0px 17px 17px -7px rgba(0, 0, 0, 0.04);
|
|
770
|
+
--ad-drawer-content-border-radius: 0px;
|
|
764
771
|
--ad-drawer-content-z-index: 200;
|
|
765
772
|
--ad-drawer-header-bg: #ffffff;
|
|
766
773
|
--ad-drawer-header-padding-x: 16px;
|
|
@@ -1348,22 +1355,34 @@
|
|
|
1348
1355
|
--ad-slat-row-padding: 12px;
|
|
1349
1356
|
--ad-slat-row-gap: 12px;
|
|
1350
1357
|
--ad-slat-row-icon-header-gap: 10px;
|
|
1351
|
-
--ad-slat-row-subhead-gap: 5px;
|
|
1352
1358
|
--ad-slat-sizes-xs-title-order: 6;
|
|
1353
1359
|
--ad-slat-sizes-xs-subtitle-size: xs;
|
|
1354
|
-
--ad-slat-sizes-xs-
|
|
1360
|
+
--ad-slat-sizes-xs-subhead-gap: 5px;
|
|
1361
|
+
--ad-slat-sizes-xs-indicator-size: 8px;
|
|
1362
|
+
--ad-slat-sizes-xs-badge-size: xs;
|
|
1355
1363
|
--ad-slat-sizes-sm-title-order: 5;
|
|
1356
1364
|
--ad-slat-sizes-sm-subtitle-size: sm;
|
|
1357
|
-
--ad-slat-sizes-sm-
|
|
1365
|
+
--ad-slat-sizes-sm-subhead-gap: 5px;
|
|
1366
|
+
--ad-slat-sizes-sm-indicator-size: 12px;
|
|
1367
|
+
--ad-slat-sizes-sm-badge-size: sm;
|
|
1358
1368
|
--ad-slat-sizes-md-title-order: 4;
|
|
1359
1369
|
--ad-slat-sizes-md-subtitle-size: md;
|
|
1360
|
-
--ad-slat-sizes-md-
|
|
1370
|
+
--ad-slat-sizes-md-subhead-gap: 5px;
|
|
1371
|
+
--ad-slat-sizes-md-indicator-size: 16px;
|
|
1372
|
+
--ad-slat-sizes-md-badge-size: md;
|
|
1361
1373
|
--ad-slat-sizes-lg-title-order: 3;
|
|
1362
1374
|
--ad-slat-sizes-lg-subtitle-size: lg;
|
|
1363
|
-
--ad-slat-sizes-lg-
|
|
1375
|
+
--ad-slat-sizes-lg-subhead-gap: 10px;
|
|
1376
|
+
--ad-slat-sizes-lg-indicator-size: 20px;
|
|
1377
|
+
--ad-slat-sizes-lg-badge-size: lg;
|
|
1364
1378
|
--ad-slat-sizes-xl-title-order: 2;
|
|
1365
1379
|
--ad-slat-sizes-xl-subtitle-size: xl;
|
|
1366
|
-
--ad-slat-sizes-xl-
|
|
1380
|
+
--ad-slat-sizes-xl-subhead-gap: 10px;
|
|
1381
|
+
--ad-slat-sizes-xl-indicator-size: 24px;
|
|
1382
|
+
--ad-slat-sizes-xl-badge-size: xl;
|
|
1383
|
+
--ad-slat-title-font-weight: 600;
|
|
1384
|
+
--ad-slat-title-line-height: 1.16;
|
|
1385
|
+
--ad-slat-subtitle-line-height: 1.16;
|
|
1367
1386
|
--ad-slider-root-color: #326FDE;
|
|
1368
1387
|
--ad-slider-root-track-bg: #e9ecef;
|
|
1369
1388
|
--ad-slider-root-track-disabled-bg: #e9ecef;
|
|
@@ -1891,6 +1910,13 @@
|
|
|
1891
1910
|
--ad-alert-title-gap-bottom: 10px;
|
|
1892
1911
|
--ad-alert-body-font-size: 14px;
|
|
1893
1912
|
--ad-alert-body-fg: #ffffff;
|
|
1913
|
+
--ad-alert-panel-padding-x: 10px;
|
|
1914
|
+
--ad-alert-panel-padding-y: 4px;
|
|
1915
|
+
--ad-alert-panel-border-width: 0px;
|
|
1916
|
+
--ad-alert-panel-border-radius: 0px;
|
|
1917
|
+
--ad-alert-panel-icon-size: 16px;
|
|
1918
|
+
--ad-alert-panel-icon-gap: 10px;
|
|
1919
|
+
--ad-alert-panel-icon-offset-top: 3px;
|
|
1894
1920
|
--ad-alert-icon-size: 20px;
|
|
1895
1921
|
--ad-alert-icon-margin-right: 16px;
|
|
1896
1922
|
--ad-app-shell-root-bg: #242424;
|
|
@@ -1918,7 +1944,6 @@
|
|
|
1918
1944
|
--ad-avatar-sizes-xl-size: 84px;
|
|
1919
1945
|
--ad-badge-root-base-font-family: Inter;
|
|
1920
1946
|
--ad-badge-root-base-font-weight: 700;
|
|
1921
|
-
--ad-badge-root-base-line-height: 1.4;
|
|
1922
1947
|
--ad-badge-root-base-border-radius: 4px;
|
|
1923
1948
|
--ad-badge-root-base-gap: 5px;
|
|
1924
1949
|
--ad-badge-root-base-padding-y: 0px;
|
|
@@ -2375,6 +2400,7 @@
|
|
|
2375
2400
|
--ad-drawer-overlay-bg: rgba(0, 0, 0, 0.55);
|
|
2376
2401
|
--ad-drawer-content-bg: #2e2e2e;
|
|
2377
2402
|
--ad-drawer-content-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.05), 0px 36px 28px -7px rgba(0, 0, 0, 0.05), 0px 17px 17px -7px rgba(0, 0, 0, 0.04);
|
|
2403
|
+
--ad-drawer-content-border-radius: 0px;
|
|
2378
2404
|
--ad-drawer-content-z-index: 200;
|
|
2379
2405
|
--ad-drawer-header-bg: #242424;
|
|
2380
2406
|
--ad-drawer-header-padding-x: 16px;
|
|
@@ -2962,22 +2988,34 @@
|
|
|
2962
2988
|
--ad-slat-row-padding: 12px;
|
|
2963
2989
|
--ad-slat-row-gap: 12px;
|
|
2964
2990
|
--ad-slat-row-icon-header-gap: 10px;
|
|
2965
|
-
--ad-slat-row-subhead-gap: 5px;
|
|
2966
2991
|
--ad-slat-sizes-xs-title-order: 6;
|
|
2967
2992
|
--ad-slat-sizes-xs-subtitle-size: xs;
|
|
2968
|
-
--ad-slat-sizes-xs-
|
|
2993
|
+
--ad-slat-sizes-xs-subhead-gap: 5px;
|
|
2994
|
+
--ad-slat-sizes-xs-indicator-size: 8px;
|
|
2995
|
+
--ad-slat-sizes-xs-badge-size: xs;
|
|
2969
2996
|
--ad-slat-sizes-sm-title-order: 5;
|
|
2970
2997
|
--ad-slat-sizes-sm-subtitle-size: sm;
|
|
2971
|
-
--ad-slat-sizes-sm-
|
|
2998
|
+
--ad-slat-sizes-sm-subhead-gap: 5px;
|
|
2999
|
+
--ad-slat-sizes-sm-indicator-size: 12px;
|
|
3000
|
+
--ad-slat-sizes-sm-badge-size: sm;
|
|
2972
3001
|
--ad-slat-sizes-md-title-order: 4;
|
|
2973
3002
|
--ad-slat-sizes-md-subtitle-size: md;
|
|
2974
|
-
--ad-slat-sizes-md-
|
|
3003
|
+
--ad-slat-sizes-md-subhead-gap: 5px;
|
|
3004
|
+
--ad-slat-sizes-md-indicator-size: 16px;
|
|
3005
|
+
--ad-slat-sizes-md-badge-size: md;
|
|
2975
3006
|
--ad-slat-sizes-lg-title-order: 3;
|
|
2976
3007
|
--ad-slat-sizes-lg-subtitle-size: lg;
|
|
2977
|
-
--ad-slat-sizes-lg-
|
|
3008
|
+
--ad-slat-sizes-lg-subhead-gap: 10px;
|
|
3009
|
+
--ad-slat-sizes-lg-indicator-size: 20px;
|
|
3010
|
+
--ad-slat-sizes-lg-badge-size: lg;
|
|
2978
3011
|
--ad-slat-sizes-xl-title-order: 2;
|
|
2979
3012
|
--ad-slat-sizes-xl-subtitle-size: xl;
|
|
2980
|
-
--ad-slat-sizes-xl-
|
|
3013
|
+
--ad-slat-sizes-xl-subhead-gap: 10px;
|
|
3014
|
+
--ad-slat-sizes-xl-indicator-size: 24px;
|
|
3015
|
+
--ad-slat-sizes-xl-badge-size: xl;
|
|
3016
|
+
--ad-slat-title-font-weight: 600;
|
|
3017
|
+
--ad-slat-title-line-height: 1.16;
|
|
3018
|
+
--ad-slat-subtitle-line-height: 1.16;
|
|
2981
3019
|
--ad-slider-root-color: #1971c2;
|
|
2982
3020
|
--ad-slider-root-track-bg: #424242;
|
|
2983
3021
|
--ad-slider-root-track-disabled-bg: #2e2e2e;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hooks Module
|
|
3
|
+
*
|
|
4
|
+
* This module exports all custom React hooks used throughout the application.
|
|
5
|
+
* Custom hooks should be placed in individual files within this directory and
|
|
6
|
+
* exported from this index file for easy importing.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* // Import individual hooks
|
|
10
|
+
* import { useSelectedRowsText } from '@/hooks';
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Import specific hook
|
|
14
|
+
* import { useSelectedRowsText } from '@/hooks/useSelectedRowsText';
|
|
15
|
+
*/
|
|
16
|
+
// Table-related hooks
|
|
17
|
+
// DataTable state is controlled by the consumer (see DataTable docs); only the text helper remains.
|
|
18
|
+
export { useSelectedRowsText } from './useSelectedRowsText.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hooks Module
|
|
3
|
+
*
|
|
4
|
+
* This module exports all custom React hooks used throughout the application.
|
|
5
|
+
* Custom hooks should be placed in individual files within this directory and
|
|
6
|
+
* exported from this index file for easy importing.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* // Import individual hooks
|
|
10
|
+
* import { useSelectedRowsText } from '@/hooks';
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Import specific hook
|
|
14
|
+
* import { useSelectedRowsText } from '@/hooks/useSelectedRowsText';
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// Table-related hooks
|
|
18
|
+
// DataTable state is controlled by the consumer (see DataTable docs); only the text helper remains.
|
|
19
|
+
export { useSelectedRowsText } from './useSelectedRowsText';
|
|
20
|
+
|
|
21
|
+
// Mantine-related hooks
|
|
22
|
+
// export { useMantineRules } from './useMantineRules';
|
|
23
|
+
|
|
24
|
+
// Utility hooks
|
|
25
|
+
// Add other custom hooks here as they are created
|
|
26
|
+
|
|
27
|
+
// For now, this file serves as a placeholder for future hook exports
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { translate } from '@/components/DesignSystem/ComplexComponents/DataTable/translations';
|
|
3
|
+
/**
|
|
4
|
+
* Custom hook for generating selected rows text
|
|
5
|
+
*
|
|
6
|
+
* Generates appropriate text based on the number of selected rows.
|
|
7
|
+
* Returns null if no rows are selected, otherwise returns the appropriate
|
|
8
|
+
* singular or plural text based on the count.
|
|
9
|
+
*
|
|
10
|
+
* @param numberOfSelectedRows - The number of currently selected rows
|
|
11
|
+
* @returns String with selected rows text or null if no rows selected
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const selectedRowsText = useSelectedRowsText(3);
|
|
16
|
+
* // Returns: "3 rows selected" (or localized equivalent)
|
|
17
|
+
*
|
|
18
|
+
* if (selectedRowsText) {
|
|
19
|
+
* console.log(selectedRowsText);
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* // No rows selected
|
|
26
|
+
* const selectedRowsText = useSelectedRowsText(0);
|
|
27
|
+
* // Returns: null
|
|
28
|
+
*
|
|
29
|
+
* // Single row selected
|
|
30
|
+
* const selectedRowsText = useSelectedRowsText(1);
|
|
31
|
+
* // Returns: "1 row selected" (or localized equivalent)
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* // Using in a component
|
|
37
|
+
* const CustomToolbar = ({ selectedCount }) => {
|
|
38
|
+
* const selectedText = useSelectedRowsText(selectedCount);
|
|
39
|
+
*
|
|
40
|
+
* return (
|
|
41
|
+
* <div>
|
|
42
|
+
* {selectedText && (
|
|
43
|
+
* <Text size="sm" c="blue">
|
|
44
|
+
* {selectedText}
|
|
45
|
+
* </Text>
|
|
46
|
+
* )}
|
|
47
|
+
* </div>
|
|
48
|
+
* );
|
|
49
|
+
* };
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```tsx
|
|
54
|
+
* // Multiple rows selected
|
|
55
|
+
* const selectedRowsText = useSelectedRowsText(25);
|
|
56
|
+
* // Returns: "25 rows selected" (or localized equivalent)
|
|
57
|
+
*
|
|
58
|
+
* // Display in status bar
|
|
59
|
+
* const StatusBar = ({ count }) => {
|
|
60
|
+
* const text = useSelectedRowsText(count);
|
|
61
|
+
* return text ? <span>{text}</span> : <span>No selection</span>;
|
|
62
|
+
* };
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export function useSelectedRowsText(numberOfSelectedRows) {
|
|
66
|
+
return useMemo(() => {
|
|
67
|
+
if (numberOfSelectedRows === 0)
|
|
68
|
+
return null;
|
|
69
|
+
return numberOfSelectedRows === 1
|
|
70
|
+
? translate("table.selected.row")
|
|
71
|
+
: translate("table.selected.rows", { count: numberOfSelectedRows });
|
|
72
|
+
}, [numberOfSelectedRows]);
|
|
73
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { translate } from '@/components/DesignSystem/ComplexComponents/DataTable/translations';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Custom hook for generating selected rows text
|
|
6
|
+
*
|
|
7
|
+
* Generates appropriate text based on the number of selected rows.
|
|
8
|
+
* Returns null if no rows are selected, otherwise returns the appropriate
|
|
9
|
+
* singular or plural text based on the count.
|
|
10
|
+
*
|
|
11
|
+
* @param numberOfSelectedRows - The number of currently selected rows
|
|
12
|
+
* @returns String with selected rows text or null if no rows selected
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* const selectedRowsText = useSelectedRowsText(3);
|
|
17
|
+
* // Returns: "3 rows selected" (or localized equivalent)
|
|
18
|
+
*
|
|
19
|
+
* if (selectedRowsText) {
|
|
20
|
+
* console.log(selectedRowsText);
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* // No rows selected
|
|
27
|
+
* const selectedRowsText = useSelectedRowsText(0);
|
|
28
|
+
* // Returns: null
|
|
29
|
+
*
|
|
30
|
+
* // Single row selected
|
|
31
|
+
* const selectedRowsText = useSelectedRowsText(1);
|
|
32
|
+
* // Returns: "1 row selected" (or localized equivalent)
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* // Using in a component
|
|
38
|
+
* const CustomToolbar = ({ selectedCount }) => {
|
|
39
|
+
* const selectedText = useSelectedRowsText(selectedCount);
|
|
40
|
+
*
|
|
41
|
+
* return (
|
|
42
|
+
* <div>
|
|
43
|
+
* {selectedText && (
|
|
44
|
+
* <Text size="sm" c="blue">
|
|
45
|
+
* {selectedText}
|
|
46
|
+
* </Text>
|
|
47
|
+
* )}
|
|
48
|
+
* </div>
|
|
49
|
+
* );
|
|
50
|
+
* };
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* // Multiple rows selected
|
|
56
|
+
* const selectedRowsText = useSelectedRowsText(25);
|
|
57
|
+
* // Returns: "25 rows selected" (or localized equivalent)
|
|
58
|
+
*
|
|
59
|
+
* // Display in status bar
|
|
60
|
+
* const StatusBar = ({ count }) => {
|
|
61
|
+
* const text = useSelectedRowsText(count);
|
|
62
|
+
* return text ? <span>{text}</span> : <span>No selection</span>;
|
|
63
|
+
* };
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export function useSelectedRowsText(numberOfSelectedRows: number): string | null {
|
|
67
|
+
return useMemo(() => {
|
|
68
|
+
if (numberOfSelectedRows === 0) return null;
|
|
69
|
+
|
|
70
|
+
return numberOfSelectedRows === 1
|
|
71
|
+
? translate("table.selected.row")
|
|
72
|
+
: translate("table.selected.rows", { count: numberOfSelectedRows });
|
|
73
|
+
}, [numberOfSelectedRows]);
|
|
74
|
+
}
|
|
@@ -74,6 +74,13 @@ export const Basic: Story = {
|
|
|
74
74
|
},
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
+
export const WithPanelNotification: Story = {
|
|
78
|
+
args: {
|
|
79
|
+
...Basic.args,
|
|
80
|
+
panelNotification: true,
|
|
81
|
+
panelNotificationMessage: 'Something needs your attention.',
|
|
82
|
+
},
|
|
83
|
+
};
|
|
77
84
|
|
|
78
85
|
// ========================== WITH CONTROLS ==========================
|
|
79
86
|
|