@x-plat/design-system 0.5.8 → 0.5.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.
package/dist/index.css CHANGED
@@ -1386,6 +1386,11 @@
1386
1386
  /* src/components/Button/button.scss */
1387
1387
  .lib-xplat-button {
1388
1388
  width: 100%;
1389
+ display: inline-flex;
1390
+ align-items: center;
1391
+ justify-content: center;
1392
+ gap: var(--spacing-space-2);
1393
+ white-space: nowrap;
1389
1394
  border-radius: var(--spacing-radius-md);
1390
1395
  font-weight: 500;
1391
1396
  cursor: pointer;
@@ -1659,34 +1664,61 @@
1659
1664
  font-weight: 600;
1660
1665
  }
1661
1666
 
1662
- /* src/components/Card/card.scss */
1663
- .lib-xplat-card {
1664
- contain: content;
1667
+ /* src/components/Box/box.scss */
1668
+ .lib-xplat-box {
1669
+ contain: layout style;
1665
1670
  width: 100%;
1671
+ height: 100%;
1666
1672
  display: flex;
1667
1673
  flex-direction: column;
1668
1674
  flex: 1;
1669
1675
  min-width: 0;
1670
- height: 100%;
1671
1676
  border-radius: var(--spacing-radius-xl);
1672
- border: 1px solid var(--semantic-border-strong);
1673
1677
  background-color: var(--semantic-surface-neutral-default);
1674
1678
  overflow: hidden;
1675
1679
  }
1676
- .lib-xplat-card > .title {
1680
+ .lib-xplat-box.outlined {
1681
+ border: 1px solid var(--semantic-border-default);
1682
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
1683
+ }
1684
+ .lib-xplat-box.elevated {
1685
+ border: none;
1686
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.08);
1687
+ }
1688
+ .lib-xplat-box.flat {
1689
+ border: none;
1690
+ background-color: var(--semantic-surface-neutral-subtle);
1691
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
1692
+ }
1693
+ .lib-xplat-box > .box-title {
1677
1694
  font-weight: 600;
1678
- background-color: var(--semantic-surface-neutral-disabled);
1679
- padding: var(--spacing-space-1) var(--spacing-space-3);
1695
+ font-size: 14px;
1696
+ color: var(--semantic-text-strong);
1697
+ padding: var(--spacing-space-3) var(--spacing-space-4);
1698
+ border-bottom: 1px solid var(--semantic-border-subtle);
1680
1699
  min-width: 0;
1681
1700
  overflow: hidden;
1682
1701
  text-overflow: ellipsis;
1683
1702
  white-space: nowrap;
1684
1703
  }
1685
- .lib-xplat-card > .content {
1704
+ .lib-xplat-box > .box-content {
1686
1705
  display: flex;
1687
1706
  flex-direction: column;
1707
+ flex: 1;
1708
+ min-height: 0;
1709
+ }
1710
+ .lib-xplat-box.pad-none > .box-content {
1711
+ padding: 0;
1712
+ }
1713
+ .lib-xplat-box.pad-sm > .box-content {
1714
+ padding: var(--spacing-space-2) var(--spacing-space-3);
1715
+ }
1716
+ .lib-xplat-box.pad-md > .box-content {
1688
1717
  padding: var(--spacing-space-4);
1689
1718
  }
1719
+ .lib-xplat-box.pad-lg > .box-content {
1720
+ padding: var(--spacing-space-6);
1721
+ }
1690
1722
 
1691
1723
  /* src/components/CardTab/cardTab.scss */
1692
1724
  .lib-xplat-card-tab {
@@ -1769,14 +1801,15 @@
1769
1801
 
1770
1802
  /* src/components/Chart/chart.scss */
1771
1803
  .lib-xplat-chart {
1772
- contain: content;
1804
+ contain: layout style;
1773
1805
  width: 100%;
1774
1806
  height: 100%;
1775
1807
  position: relative;
1776
1808
  }
1777
1809
  .lib-xplat-chart .chart-svg {
1810
+ display: block;
1778
1811
  width: 100%;
1779
- height: auto;
1812
+ height: 100%;
1780
1813
  }
1781
1814
  .lib-xplat-chart .chart-grid {
1782
1815
  stroke: var(--semantic-border-subtle);
@@ -1798,29 +1831,44 @@
1798
1831
  }
1799
1832
  .lib-xplat-chart .chart-point {
1800
1833
  cursor: pointer;
1801
- transition: r 0.15s;
1834
+ r: 0;
1835
+ opacity: 0;
1836
+ transition: r 0.15s, opacity 0.15s;
1802
1837
  }
1803
1838
  .lib-xplat-chart .chart-point:hover {
1804
- r: 6;
1839
+ r: 5;
1840
+ opacity: 1;
1841
+ }
1842
+ .lib-xplat-chart .chart-svg:hover .chart-point {
1843
+ r: 3;
1844
+ opacity: 0.6;
1805
1845
  }
1806
1846
  .lib-xplat-chart .chart-bar {
1807
1847
  cursor: pointer;
1808
- transition: opacity 0.15s;
1848
+ transition: opacity 0.15s, filter 0.15s;
1809
1849
  }
1810
1850
  .lib-xplat-chart .chart-bar:hover {
1811
- opacity: 0.8;
1851
+ opacity: 0.85;
1852
+ filter: brightness(1.08);
1812
1853
  }
1813
1854
  .lib-xplat-chart .chart-slice {
1814
1855
  cursor: pointer;
1815
- transition: opacity 0.15s;
1856
+ stroke: var(--semantic-surface-neutral-default);
1857
+ stroke-width: 2;
1858
+ transition:
1859
+ opacity 0.15s,
1860
+ filter 0.15s,
1861
+ transform 0.15s;
1862
+ transform-origin: center;
1816
1863
  }
1817
1864
  .lib-xplat-chart .chart-slice:hover {
1818
- opacity: 0.85;
1865
+ opacity: 0.9;
1866
+ filter: brightness(1.05) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
1819
1867
  }
1820
1868
  .lib-xplat-chart .chart-tooltip {
1821
1869
  position: absolute;
1822
1870
  transform: translate(-50%, -100%);
1823
- padding: var(--spacing-space-2) var(--spacing-space-2);
1871
+ padding: var(--spacing-space-2) var(--spacing-space-3);
1824
1872
  background-color: var(--semantic-surface-neutral-strong);
1825
1873
  color: var(--semantic-text-inverse);
1826
1874
  font-size: 12px;
@@ -2078,11 +2126,51 @@
2078
2126
  font-size: 16px;
2079
2127
  }
2080
2128
 
2129
+ /* src/components/Modal/modal.scss */
2130
+ .lib-xplat-modal {
2131
+ z-index: 11;
2132
+ }
2133
+ .lib-xplat-modal.modal-box {
2134
+ border-radius: var(--spacing-radius-lg);
2135
+ background-color: #fff;
2136
+ padding: var(--spacing-space-6);
2137
+ min-width: min-content;
2138
+ max-width: calc(100vw - 32px);
2139
+ max-height: calc(100vh - 32px);
2140
+ overflow: visible;
2141
+ transform: scale(0.9);
2142
+ opacity: 0;
2143
+ transition: transform 0.2s ease, opacity 0.2s ease;
2144
+ }
2145
+ .lib-xplat-modal.modal-box.enter {
2146
+ transform: scale(1);
2147
+ opacity: 1;
2148
+ }
2149
+ .lib-xplat-modal.modal-box.exit {
2150
+ transform: scale(0.9);
2151
+ opacity: 0;
2152
+ }
2153
+ .lib-xplat-modal.dim {
2154
+ position: fixed;
2155
+ inset: 0;
2156
+ display: flex;
2157
+ align-items: center;
2158
+ justify-content: center;
2159
+ opacity: 0;
2160
+ background-color: rgba(0, 0, 0, 0.3);
2161
+ transition: opacity 0.2s ease;
2162
+ }
2163
+ .lib-xplat-modal.dim.enter {
2164
+ opacity: 1;
2165
+ }
2166
+ .lib-xplat-modal.dim.exit {
2167
+ opacity: 0;
2168
+ }
2169
+
2081
2170
  /* src/components/DatePicker/datepicker.scss */
2082
2171
  .lib-xplat-datepicker {
2083
2172
  contain: content;
2084
2173
  user-select: none;
2085
- min-width: 200px;
2086
2174
  width: 100%;
2087
2175
  }
2088
2176
  .lib-xplat-datepicker .datepicker-header {
@@ -2108,17 +2196,23 @@
2108
2196
  .lib-xplat-datepicker .datepicker-title:hover {
2109
2197
  background-color: var(--semantic-surface-neutral-disabled);
2110
2198
  }
2199
+ .lib-xplat-datepicker .datepicker-body {
2200
+ display: flex;
2201
+ flex-direction: column;
2202
+ }
2111
2203
  .lib-xplat-datepicker .datepicker-picker-grid {
2112
2204
  display: grid;
2113
2205
  grid-template-columns: repeat(3, 1fr);
2206
+ grid-template-rows: repeat(4, 1fr);
2114
2207
  gap: var(--spacing-space-1);
2115
2208
  padding: var(--spacing-space-1) 0;
2209
+ flex: 1;
2116
2210
  }
2117
2211
  .lib-xplat-datepicker .datepicker-picker-cell {
2118
2212
  display: flex;
2119
2213
  align-items: center;
2120
2214
  justify-content: center;
2121
- padding: var(--spacing-space-2);
2215
+ padding: var(--spacing-space-3);
2122
2216
  border: none;
2123
2217
  border-radius: var(--spacing-radius-md);
2124
2218
  background: none;
@@ -2249,24 +2343,6 @@
2249
2343
  .lib-xplat-datepicker .datepicker-range-tabs {
2250
2344
  display: none;
2251
2345
  margin-bottom: var(--spacing-space-3);
2252
- border-bottom: 1px solid var(--semantic-border-default);
2253
- }
2254
- .lib-xplat-datepicker .datepicker-range-tab {
2255
- flex: 1;
2256
- padding: var(--spacing-space-2);
2257
- border: none;
2258
- background: none;
2259
- font-size: 13px;
2260
- font-weight: 500;
2261
- color: var(--semantic-text-muted);
2262
- cursor: pointer;
2263
- border-bottom: 2px solid transparent;
2264
- transition: color 0.15s, border-color 0.15s;
2265
- }
2266
- .lib-xplat-datepicker .datepicker-range-tab.active {
2267
- color: var(--semantic-surface-brand-default);
2268
- border-bottom-color: var(--semantic-surface-brand-default);
2269
- font-weight: 600;
2270
2346
  }
2271
2347
  .lib-xplat-datepicker .datepicker-range-panels {
2272
2348
  display: flex;
@@ -2330,56 +2406,106 @@
2330
2406
  }
2331
2407
  .lib-xplat-popup-datepicker-card {
2332
2408
  background-color: var(--semantic-surface-neutral-default);
2333
- border-radius: var(--spacing-radius-lg);
2409
+ border-radius: var(--spacing-radius-xl);
2410
+ min-width: 320px;
2411
+ }
2412
+ .lib-xplat-popup-datepicker-card.range-mode {
2413
+ min-width: 480px;
2334
2414
  }
2335
2415
  .lib-xplat-popup-datepicker-card .popup-datepicker-content {
2336
- margin-bottom: var(--spacing-space-4);
2416
+ margin-bottom: var(--spacing-space-5);
2337
2417
  }
2338
2418
  .lib-xplat-popup-datepicker-card .popup-datepicker-footer {
2339
2419
  display: flex;
2340
2420
  justify-content: flex-end;
2341
- gap: var(--spacing-space-2);
2421
+ gap: var(--spacing-space-3);
2422
+ padding-top: var(--spacing-space-4);
2423
+ border-top: 1px solid var(--semantic-border-subtle);
2342
2424
  }
2343
2425
 
2344
- /* src/components/Modal/modal.scss */
2345
- .lib-xplat-modal {
2346
- z-index: 11;
2426
+ /* src/components/Tab/tab.scss */
2427
+ .lib-xplat-tab {
2428
+ position: relative;
2429
+ display: flex;
2430
+ width: 100%;
2431
+ min-width: 0;
2432
+ align-items: center;
2433
+ overflow-x: auto;
2434
+ -ms-overflow-style: none;
2435
+ scrollbar-width: none;
2347
2436
  }
2348
- .lib-xplat-modal.modal-box {
2349
- border-radius: var(--spacing-radius-lg);
2350
- background-color: #fff;
2351
- padding: var(--spacing-space-6);
2352
- min-width: min-content;
2353
- max-width: calc(100vw - 32px);
2354
- max-height: calc(100vh - 32px);
2355
- overflow: visible;
2356
- transform: scale(0.9);
2357
- opacity: 0;
2358
- transition: transform 0.2s ease, opacity 0.2s ease;
2437
+ .lib-xplat-tab::-webkit-scrollbar {
2438
+ display: none;
2359
2439
  }
2360
- .lib-xplat-modal.modal-box.enter {
2361
- transform: scale(1);
2362
- opacity: 1;
2440
+ .lib-xplat-tab.sm {
2441
+ height: var(--spacing-control-height-sm);
2442
+ font-size: 14px;
2363
2443
  }
2364
- .lib-xplat-modal.modal-box.exit {
2365
- transform: scale(0.9);
2366
- opacity: 0;
2444
+ .lib-xplat-tab.md {
2445
+ height: var(--spacing-control-height-md);
2446
+ font-size: 16px;
2367
2447
  }
2368
- .lib-xplat-modal.dim {
2369
- position: fixed;
2370
- inset: 0;
2448
+ .lib-xplat-tab.lg {
2449
+ height: var(--spacing-control-height-lg);
2450
+ font-size: 18px;
2451
+ }
2452
+ .lib-xplat-tab.type-default {
2453
+ width: 100%;
2454
+ background-color: var(--semantic-surface-neutral-strong);
2455
+ border-radius: var(--spacing-radius-md);
2456
+ }
2457
+ .lib-xplat-tab.type-default > .tab-item {
2458
+ flex: 1;
2459
+ padding: var(--spacing-space-1) var(--spacing-space-6);
2460
+ height: 100%;
2371
2461
  display: flex;
2372
2462
  align-items: center;
2373
2463
  justify-content: center;
2374
- opacity: 0;
2375
- background-color: rgba(0, 0, 0, 0.3);
2376
- transition: opacity 0.2s ease;
2464
+ cursor: pointer;
2465
+ white-space: nowrap;
2466
+ border-right: 1px solid var(--semantic-border-strong);
2467
+ color: var(--semantic-text-inverse);
2377
2468
  }
2378
- .lib-xplat-modal.dim.enter {
2379
- opacity: 1;
2469
+ .lib-xplat-tab.type-default > .tab-item:last-child {
2470
+ border-right: none;
2380
2471
  }
2381
- .lib-xplat-modal.dim.exit {
2382
- opacity: 0;
2472
+ .lib-xplat-tab.type-default > .tab-item.active {
2473
+ background-color: var(--semantic-surface-brand-default);
2474
+ }
2475
+ .lib-xplat-tab.type-toggle {
2476
+ width: 100%;
2477
+ border-bottom: 1px solid var(--semantic-border-default);
2478
+ gap: var(--spacing-space-6);
2479
+ }
2480
+ .lib-xplat-tab.type-toggle > .tab-item {
2481
+ position: relative;
2482
+ flex: 1;
2483
+ display: flex;
2484
+ align-items: center;
2485
+ justify-content: center;
2486
+ white-space: nowrap;
2487
+ padding: 0 var(--spacing-space-3);
2488
+ font-size: 16px;
2489
+ font-weight: 500;
2490
+ height: 100%;
2491
+ background: none;
2492
+ border: none;
2493
+ cursor: pointer;
2494
+ transition: color 0.2s;
2495
+ color: var(--semantic-text-muted);
2496
+ }
2497
+ .lib-xplat-tab.type-toggle > .tab-item.active {
2498
+ color: var(--semantic-surface-brand-default);
2499
+ }
2500
+ .lib-xplat-tab.type-toggle > .tab-toggle-underline {
2501
+ position: absolute;
2502
+ left: 0;
2503
+ right: 0;
2504
+ bottom: -1px;
2505
+ height: 2px;
2506
+ background-color: var(--semantic-surface-brand-default);
2507
+ transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
2508
+ will-change: left, width;
2383
2509
  }
2384
2510
 
2385
2511
  /* src/components/Divider/divider.scss */
@@ -3531,91 +3657,6 @@
3531
3657
  transition: left 0.25s;
3532
3658
  }
3533
3659
 
3534
- /* src/components/Tab/tab.scss */
3535
- .lib-xplat-tab {
3536
- position: relative;
3537
- display: flex;
3538
- width: 100%;
3539
- min-width: 0;
3540
- align-items: center;
3541
- overflow-x: auto;
3542
- -ms-overflow-style: none;
3543
- scrollbar-width: none;
3544
- }
3545
- .lib-xplat-tab::-webkit-scrollbar {
3546
- display: none;
3547
- }
3548
- .lib-xplat-tab.sm {
3549
- height: var(--spacing-control-height-sm);
3550
- font-size: 14px;
3551
- }
3552
- .lib-xplat-tab.md {
3553
- height: var(--spacing-control-height-md);
3554
- font-size: 16px;
3555
- }
3556
- .lib-xplat-tab.lg {
3557
- height: var(--spacing-control-height-lg);
3558
- font-size: 18px;
3559
- }
3560
- .lib-xplat-tab.type-default {
3561
- width: 100%;
3562
- background-color: var(--semantic-surface-neutral-strong);
3563
- border-radius: var(--spacing-radius-md);
3564
- }
3565
- .lib-xplat-tab.type-default > .tab-item {
3566
- flex: 1;
3567
- padding: var(--spacing-space-1) var(--spacing-space-6);
3568
- height: 100%;
3569
- display: flex;
3570
- align-items: center;
3571
- justify-content: center;
3572
- cursor: pointer;
3573
- white-space: nowrap;
3574
- border-right: 1px solid var(--semantic-border-strong);
3575
- color: var(--semantic-text-inverse);
3576
- }
3577
- .lib-xplat-tab.type-default > .tab-item:last-child {
3578
- border-right: none;
3579
- }
3580
- .lib-xplat-tab.type-default > .tab-item.active {
3581
- background-color: var(--semantic-surface-brand-default);
3582
- }
3583
- .lib-xplat-tab.type-toggle {
3584
- width: 100%;
3585
- border-bottom: 1px solid var(--semantic-border-default);
3586
- gap: var(--spacing-space-6);
3587
- }
3588
- .lib-xplat-tab.type-toggle > .tab-item {
3589
- position: relative;
3590
- flex: 1;
3591
- display: flex;
3592
- align-items: center;
3593
- justify-content: center;
3594
- white-space: nowrap;
3595
- padding: 0 var(--spacing-space-3);
3596
- font-size: 16px;
3597
- font-weight: 500;
3598
- height: 100%;
3599
- background: none;
3600
- border: none;
3601
- cursor: pointer;
3602
- transition: color 0.2s;
3603
- color: var(--semantic-text-muted);
3604
- }
3605
- .lib-xplat-tab.type-toggle > .tab-item.active {
3606
- color: var(--semantic-surface-brand-default);
3607
- }
3608
- .lib-xplat-tab.type-toggle > .tab-toggle-underline {
3609
- position: absolute;
3610
- left: 0;
3611
- right: 0;
3612
- bottom: -1px;
3613
- height: 2px;
3614
- background-color: var(--semantic-surface-brand-default);
3615
- transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
3616
- will-change: left, width;
3617
- }
3618
-
3619
3660
  /* src/components/Table/table.scss */
3620
3661
  .lib-xplat-table-wrapper {
3621
3662
  contain: content;
package/dist/index.d.cts CHANGED
@@ -6,7 +6,7 @@ export { Badge } from './components/Badge/index.cjs';
6
6
  export { Breadcrumb } from './components/Breadcrumb/index.cjs';
7
7
  export { Button } from './components/Button/index.cjs';
8
8
  export { Calendar, CalendarDay, CalendarEvent, CalendarProps, isInRange, isSameDay, useCalendar } from './components/Calendar/index.cjs';
9
- export { Card } from './components/Card/index.cjs';
9
+ export { Box } from './components/Box/index.cjs';
10
10
  export { CardTab } from './components/CardTab/index.cjs';
11
11
  export { Chart } from './components/Chart/index.cjs';
12
12
  export { CheckBox } from './components/CheckBox/index.cjs';
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export { Badge } from './components/Badge/index.js';
6
6
  export { Breadcrumb } from './components/Breadcrumb/index.js';
7
7
  export { Button } from './components/Button/index.js';
8
8
  export { Calendar, CalendarDay, CalendarEvent, CalendarProps, isInRange, isSameDay, useCalendar } from './components/Calendar/index.js';
9
- export { Card } from './components/Card/index.js';
9
+ export { Box } from './components/Box/index.js';
10
10
  export { CardTab } from './components/CardTab/index.js';
11
11
  export { Chart } from './components/Chart/index.js';
12
12
  export { CheckBox } from './components/CheckBox/index.js';