@x-plat/design-system 0.5.2 → 0.5.4

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.
Files changed (50) hide show
  1. package/dist/components/Accordion/index.cjs +38 -31
  2. package/dist/components/Accordion/index.css +2 -0
  3. package/dist/components/Accordion/index.js +38 -31
  4. package/dist/components/Alert/index.css +1 -0
  5. package/dist/components/Breadcrumb/index.css +3 -0
  6. package/dist/components/Button/index.css +1 -0
  7. package/dist/components/Calendar/index.cjs +103 -62
  8. package/dist/components/Calendar/index.css +2 -0
  9. package/dist/components/Calendar/index.js +103 -62
  10. package/dist/components/Card/index.css +3 -1
  11. package/dist/components/CardTab/index.css +1 -0
  12. package/dist/components/Chart/index.cjs +106 -83
  13. package/dist/components/Chart/index.css +2 -0
  14. package/dist/components/Chart/index.js +106 -83
  15. package/dist/components/DatePicker/index.cjs +36 -15
  16. package/dist/components/DatePicker/index.css +2 -0
  17. package/dist/components/DatePicker/index.js +36 -15
  18. package/dist/components/Dropdown/index.css +1 -0
  19. package/dist/components/EmptyState/index.css +2 -0
  20. package/dist/components/FileUpload/index.css +3 -0
  21. package/dist/components/HtmlTypeWriter/index.css +1 -0
  22. package/dist/components/Pagination/index.css +8 -8
  23. package/dist/components/Select/index.css +1 -0
  24. package/dist/components/Spinner/index.css +7 -2
  25. package/dist/components/Steps/index.cjs +1 -4
  26. package/dist/components/Steps/index.css +15 -36
  27. package/dist/components/Steps/index.js +1 -4
  28. package/dist/components/Swiper/index.cjs +16 -12
  29. package/dist/components/Swiper/index.css +2 -0
  30. package/dist/components/Swiper/index.js +16 -12
  31. package/dist/components/Switch/index.css +20 -19
  32. package/dist/components/Tab/index.css +16 -2
  33. package/dist/components/Table/index.cjs +4 -4
  34. package/dist/components/Table/index.css +2 -0
  35. package/dist/components/Table/index.d.cts +2 -5
  36. package/dist/components/Table/index.d.ts +2 -5
  37. package/dist/components/Table/index.js +4 -4
  38. package/dist/components/Video/index.cjs +32 -43
  39. package/dist/components/Video/index.css +5 -4
  40. package/dist/components/Video/index.d.cts +1 -5
  41. package/dist/components/Video/index.d.ts +1 -5
  42. package/dist/components/Video/index.js +32 -43
  43. package/dist/components/index.cjs +339 -257
  44. package/dist/components/index.css +99 -72
  45. package/dist/components/index.js +339 -257
  46. package/dist/index.cjs +339 -257
  47. package/dist/index.css +99 -72
  48. package/dist/index.js +339 -257
  49. package/guidelines/Guidelines.md +11 -4
  50. package/package.json +1 -2
package/dist/index.css CHANGED
@@ -1083,6 +1083,8 @@
1083
1083
 
1084
1084
  /* src/components/Accordion/accordion.scss */
1085
1085
  .lib-xplat-accordion {
1086
+ contain: content;
1087
+ width: 100%;
1086
1088
  border: 1px solid var(--semantic-border-default);
1087
1089
  border-radius: var(--spacing-radius-md);
1088
1090
  overflow: hidden;
@@ -1138,6 +1140,7 @@
1138
1140
 
1139
1141
  /* src/components/Alert/alert.scss */
1140
1142
  .lib-xplat-alert {
1143
+ width: 100%;
1141
1144
  display: flex;
1142
1145
  align-items: flex-start;
1143
1146
  justify-content: space-between;
@@ -1340,6 +1343,9 @@
1340
1343
  }
1341
1344
 
1342
1345
  /* src/components/Breadcrumb/breadcrumb.scss */
1346
+ .lib-xplat-breadcrumb {
1347
+ width: 100%;
1348
+ }
1343
1349
  .lib-xplat-breadcrumb ol {
1344
1350
  display: flex;
1345
1351
  align-items: center;
@@ -1379,6 +1385,7 @@
1379
1385
 
1380
1386
  /* src/components/Button/button.scss */
1381
1387
  .lib-xplat-button {
1388
+ width: 100%;
1382
1389
  border-radius: var(--spacing-radius-md);
1383
1390
  font-weight: 500;
1384
1391
  cursor: pointer;
@@ -1467,7 +1474,9 @@
1467
1474
 
1468
1475
  /* src/components/Calendar/calendar.scss */
1469
1476
  .lib-xplat-calendar {
1477
+ contain: content;
1470
1478
  width: 100%;
1479
+ height: 100%;
1471
1480
  min-width: 200px;
1472
1481
  user-select: none;
1473
1482
  container-type: inline-size;
@@ -1652,11 +1661,13 @@
1652
1661
 
1653
1662
  /* src/components/Card/card.scss */
1654
1663
  .lib-xplat-card {
1664
+ contain: content;
1665
+ width: 100%;
1655
1666
  display: flex;
1656
1667
  flex-direction: column;
1657
1668
  flex: 1;
1658
1669
  min-width: 0;
1659
- height: fit-content;
1670
+ height: 100%;
1660
1671
  border-radius: var(--spacing-radius-xl);
1661
1672
  border: 1px solid var(--semantic-border-strong);
1662
1673
  background-color: var(--semantic-surface-neutral-default);
@@ -1679,6 +1690,7 @@
1679
1690
 
1680
1691
  /* src/components/CardTab/cardTab.scss */
1681
1692
  .lib-xplat-card-tab {
1693
+ width: 100%;
1682
1694
  display: flex;
1683
1695
  flex-direction: column;
1684
1696
  }
@@ -1757,7 +1769,9 @@
1757
1769
 
1758
1770
  /* src/components/Chart/chart.scss */
1759
1771
  .lib-xplat-chart {
1772
+ contain: content;
1760
1773
  width: 100%;
1774
+ height: 100%;
1761
1775
  position: relative;
1762
1776
  }
1763
1777
  .lib-xplat-chart .chart-svg {
@@ -2066,6 +2080,7 @@
2066
2080
 
2067
2081
  /* src/components/DatePicker/datepicker.scss */
2068
2082
  .lib-xplat-datepicker {
2083
+ contain: content;
2069
2084
  user-select: none;
2070
2085
  min-width: 200px;
2071
2086
  width: 100%;
@@ -2445,6 +2460,7 @@
2445
2460
  .lib-xplat-dropdown {
2446
2461
  position: relative;
2447
2462
  display: inline-flex;
2463
+ width: 100%;
2448
2464
  }
2449
2465
  .lib-xplat-dropdown .dropdown-trigger {
2450
2466
  cursor: pointer;
@@ -2498,6 +2514,8 @@
2498
2514
 
2499
2515
  /* src/components/EmptyState/emptystate.scss */
2500
2516
  .lib-xplat-empty-state {
2517
+ width: 100%;
2518
+ height: 100%;
2501
2519
  display: flex;
2502
2520
  flex-direction: column;
2503
2521
  align-items: center;
@@ -2530,6 +2548,9 @@
2530
2548
 
2531
2549
  /* src/components/FileUpload/fileupload.scss */
2532
2550
  .lib-xplat-file-upload {
2551
+ contain: content;
2552
+ width: 100%;
2553
+ height: 100%;
2533
2554
  display: flex;
2534
2555
  flex-direction: column;
2535
2556
  align-items: center;
@@ -2572,6 +2593,7 @@
2572
2593
 
2573
2594
  /* src/components/HtmlTypeWriter/htmlTypeWriter.scss */
2574
2595
  .lib-xplat-htmlTypewriter {
2596
+ width: 100%;
2575
2597
  font-size: 16px;
2576
2598
  }
2577
2599
  .lib-xplat-htmlTypewriter h1,
@@ -2749,24 +2771,24 @@
2749
2771
  color: var(--semantic-text-inverse);
2750
2772
  font-weight: 600;
2751
2773
  }
2752
- .lib-xplat-pagination.brand .lib-xplat-pagination .page-btn.active {
2774
+ .lib-xplat-pagination .page-btn svg {
2775
+ font-size: 16px;
2776
+ }
2777
+ .lib-xplat-pagination.brand .page-btn.active {
2753
2778
  background-color: var(--semantic-surface-brand-default);
2754
2779
  }
2755
- .lib-xplat-pagination.success .lib-xplat-pagination .page-btn.active {
2780
+ .lib-xplat-pagination.success .page-btn.active {
2756
2781
  background-color: var(--semantic-surface-success-default);
2757
2782
  }
2758
- .lib-xplat-pagination.error .lib-xplat-pagination .page-btn.active {
2783
+ .lib-xplat-pagination.error .page-btn.active {
2759
2784
  background-color: var(--semantic-surface-error-default);
2760
2785
  }
2761
- .lib-xplat-pagination.warning .lib-xplat-pagination .page-btn.active {
2786
+ .lib-xplat-pagination.warning .page-btn.active {
2762
2787
  background-color: var(--semantic-surface-warning-default);
2763
2788
  }
2764
- .lib-xplat-pagination.info .lib-xplat-pagination .page-btn.active {
2789
+ .lib-xplat-pagination.info .page-btn.active {
2765
2790
  background-color: var(--semantic-surface-info-default);
2766
2791
  }
2767
- .lib-xplat-pagination .page-btn svg {
2768
- font-size: 16px;
2769
- }
2770
2792
 
2771
2793
  /* src/components/PopOver/popOver.scss */
2772
2794
  .lib-xplat-pop-over {
@@ -2951,6 +2973,7 @@
2951
2973
 
2952
2974
  /* src/components/Select/select.scss */
2953
2975
  .lib-xplat-select {
2976
+ width: 100%;
2954
2977
  position: relative;
2955
2978
  }
2956
2979
  .lib-xplat-select.is-open {
@@ -3156,10 +3179,15 @@
3156
3179
  width: var(--spacing-space-9);
3157
3180
  height: var(--spacing-space-9);
3158
3181
  }
3182
+ .lib-xplat-spinner {
3183
+ contain: strict;
3184
+ }
3159
3185
  .lib-xplat-spinner svg {
3160
3186
  width: 100%;
3161
3187
  height: 100%;
3162
3188
  animation: lib-xplat-spin 0.8s linear infinite;
3189
+ will-change: transform;
3190
+ backface-visibility: hidden;
3163
3191
  }
3164
3192
  .lib-xplat-spinner .track {
3165
3193
  stroke: var(--semantic-border-default);
@@ -3185,10 +3213,10 @@
3185
3213
  }
3186
3214
  @keyframes lib-xplat-spin {
3187
3215
  from {
3188
- transform: rotate(0deg);
3216
+ transform: rotate3d(0, 0, 1, 0deg);
3189
3217
  }
3190
3218
  to {
3191
- transform: rotate(360deg);
3219
+ transform: rotate3d(0, 0, 1, 360deg);
3192
3220
  }
3193
3221
  }
3194
3222
 
@@ -3202,16 +3230,18 @@
3202
3230
  display: flex;
3203
3231
  flex-direction: column;
3204
3232
  align-items: center;
3205
- }
3206
- .lib-xplat-steps .step-item:last-child .step-line {
3207
- display: none;
3208
- }
3209
- .lib-xplat-steps .step-indicator {
3210
- display: flex;
3211
- align-items: center;
3212
- width: 100%;
3213
3233
  position: relative;
3214
3234
  }
3235
+ .lib-xplat-steps .step-item:not(:last-child)::after {
3236
+ content: "";
3237
+ position: absolute;
3238
+ top: 16px;
3239
+ left: calc(50% + 20px);
3240
+ right: calc(-50% + 20px);
3241
+ height: 2px;
3242
+ background-color: var(--semantic-surface-neutral-disabled);
3243
+ transition: background-color 0.2s;
3244
+ }
3215
3245
  .lib-xplat-steps .step-circle {
3216
3246
  width: var(--spacing-control-height-sm);
3217
3247
  height: var(--spacing-control-height-sm);
@@ -3228,11 +3258,6 @@
3228
3258
  .lib-xplat-steps .step-circle svg {
3229
3259
  font-size: 16px;
3230
3260
  }
3231
- .lib-xplat-steps .step-line {
3232
- flex: 1;
3233
- height: 2px;
3234
- transition: background-color 0.2s;
3235
- }
3236
3261
  .lib-xplat-steps .step-content {
3237
3262
  display: flex;
3238
3263
  flex-direction: column;
@@ -3254,79 +3279,61 @@
3254
3279
  color: var(--semantic-text-inverse);
3255
3280
  background-color: var(--semantic-surface-brand-default);
3256
3281
  }
3257
- .lib-xplat-steps.brand .step-item.completed .step-line {
3282
+ .lib-xplat-steps.brand .step-item.completed::after {
3258
3283
  background-color: var(--semantic-surface-brand-default);
3259
3284
  }
3260
3285
  .lib-xplat-steps.brand .step-item.active .step-circle {
3261
3286
  color: var(--semantic-text-inverse);
3262
3287
  background-color: var(--semantic-surface-brand-default);
3263
3288
  }
3264
- .lib-xplat-steps.brand .step-item.active .step-line {
3265
- background-color: var(--semantic-surface-neutral-disabled);
3266
- }
3267
3289
  .lib-xplat-steps.success .step-item.completed .step-circle {
3268
3290
  color: var(--semantic-text-inverse);
3269
3291
  background-color: var(--semantic-surface-success-default);
3270
3292
  }
3271
- .lib-xplat-steps.success .step-item.completed .step-line {
3293
+ .lib-xplat-steps.success .step-item.completed::after {
3272
3294
  background-color: var(--semantic-surface-success-default);
3273
3295
  }
3274
3296
  .lib-xplat-steps.success .step-item.active .step-circle {
3275
3297
  color: var(--semantic-text-inverse);
3276
3298
  background-color: var(--semantic-surface-success-default);
3277
3299
  }
3278
- .lib-xplat-steps.success .step-item.active .step-line {
3279
- background-color: var(--semantic-surface-neutral-disabled);
3280
- }
3281
3300
  .lib-xplat-steps.error .step-item.completed .step-circle {
3282
3301
  color: var(--semantic-text-inverse);
3283
3302
  background-color: var(--semantic-surface-error-default);
3284
3303
  }
3285
- .lib-xplat-steps.error .step-item.completed .step-line {
3304
+ .lib-xplat-steps.error .step-item.completed::after {
3286
3305
  background-color: var(--semantic-surface-error-default);
3287
3306
  }
3288
3307
  .lib-xplat-steps.error .step-item.active .step-circle {
3289
3308
  color: var(--semantic-text-inverse);
3290
3309
  background-color: var(--semantic-surface-error-default);
3291
3310
  }
3292
- .lib-xplat-steps.error .step-item.active .step-line {
3293
- background-color: var(--semantic-surface-neutral-disabled);
3294
- }
3295
3311
  .lib-xplat-steps.warning .step-item.completed .step-circle {
3296
3312
  color: var(--semantic-text-inverse);
3297
3313
  background-color: var(--semantic-surface-warning-default);
3298
3314
  }
3299
- .lib-xplat-steps.warning .step-item.completed .step-line {
3315
+ .lib-xplat-steps.warning .step-item.completed::after {
3300
3316
  background-color: var(--semantic-surface-warning-default);
3301
3317
  }
3302
3318
  .lib-xplat-steps.warning .step-item.active .step-circle {
3303
3319
  color: var(--semantic-text-inverse);
3304
3320
  background-color: var(--semantic-surface-warning-default);
3305
3321
  }
3306
- .lib-xplat-steps.warning .step-item.active .step-line {
3307
- background-color: var(--semantic-surface-neutral-disabled);
3308
- }
3309
3322
  .lib-xplat-steps.info .step-item.completed .step-circle {
3310
3323
  color: var(--semantic-text-inverse);
3311
3324
  background-color: var(--semantic-surface-info-default);
3312
3325
  }
3313
- .lib-xplat-steps.info .step-item.completed .step-line {
3326
+ .lib-xplat-steps.info .step-item.completed::after {
3314
3327
  background-color: var(--semantic-surface-info-default);
3315
3328
  }
3316
3329
  .lib-xplat-steps.info .step-item.active .step-circle {
3317
3330
  color: var(--semantic-text-inverse);
3318
3331
  background-color: var(--semantic-surface-info-default);
3319
3332
  }
3320
- .lib-xplat-steps.info .step-item.active .step-line {
3321
- background-color: var(--semantic-surface-neutral-disabled);
3322
- }
3323
3333
  .lib-xplat-steps .step-item.pending .step-circle {
3324
3334
  background-color: var(--semantic-surface-neutral-disabled);
3325
3335
  color: var(--semantic-text-muted);
3326
3336
  }
3327
- .lib-xplat-steps .step-item.pending .step-line {
3328
- background-color: var(--semantic-surface-neutral-disabled);
3329
- }
3330
3337
  .lib-xplat-steps .step-item.pending .step-title {
3331
3338
  color: var(--semantic-text-disabled);
3332
3339
  }
@@ -3336,7 +3343,9 @@
3336
3343
 
3337
3344
  /* src/components/Swiper/swiper.scss */
3338
3345
  .lib-xplat-swiper {
3346
+ contain: content;
3339
3347
  width: 100%;
3348
+ height: 100%;
3340
3349
  position: relative;
3341
3350
  }
3342
3351
  .lib-xplat-swiper__viewport {
@@ -3410,43 +3419,44 @@
3410
3419
  position: relative;
3411
3420
  border-radius: var(--spacing-radius-full);
3412
3421
  cursor: pointer;
3422
+ box-sizing: border-box;
3413
3423
  transition: background-color 0.2s, border-color 0.2s;
3414
3424
  border: 1px solid transparent;
3415
3425
  background-color: var(--semantic-border-default);
3416
3426
  border-color: var(--semantic-border-default);
3417
3427
  }
3418
3428
  .lib-xplat-switch.sm {
3419
- width: var(--spacing-space-8);
3420
- height: var(--spacing-space-4);
3429
+ width: 34px;
3430
+ height: 20px;
3421
3431
  }
3422
3432
  .lib-xplat-switch.sm > .knob {
3423
- width: var(--spacing-space-4);
3424
- height: var(--spacing-space-4);
3433
+ width: 16px;
3434
+ height: 16px;
3425
3435
  }
3426
3436
  .lib-xplat-switch.sm > .knob.checked {
3427
- transform: translateY(-50%) translateX(14px);
3437
+ left: calc(100% - 16px - 2px);
3428
3438
  }
3429
3439
  .lib-xplat-switch.md {
3430
- width: var(--spacing-space-11);
3431
- height: var(--spacing-space-6);
3440
+ width: 42px;
3441
+ height: 24px;
3432
3442
  }
3433
3443
  .lib-xplat-switch.md > .knob {
3434
- width: var(--spacing-space-6);
3435
- height: var(--spacing-space-6);
3444
+ width: 20px;
3445
+ height: 20px;
3436
3446
  }
3437
3447
  .lib-xplat-switch.md > .knob.checked {
3438
- transform: translateY(-50%) translateX(22px);
3448
+ left: calc(100% - 20px - 2px);
3439
3449
  }
3440
3450
  .lib-xplat-switch.lg {
3441
- width: var(--spacing-space-11);
3442
- height: var(--spacing-space-8);
3451
+ width: 50px;
3452
+ height: 28px;
3443
3453
  }
3444
3454
  .lib-xplat-switch.lg > .knob {
3445
- width: var(--spacing-space-6);
3446
- height: var(--spacing-space-6);
3455
+ width: 24px;
3456
+ height: 24px;
3447
3457
  }
3448
3458
  .lib-xplat-switch.lg > .knob.checked {
3449
- transform: translateY(-50%) translateX(26px);
3459
+ left: calc(100% - 24px - 2px);
3450
3460
  }
3451
3461
  .lib-xplat-switch.disabled {
3452
3462
  opacity: 0.5;
@@ -3500,21 +3510,27 @@
3500
3510
  .lib-xplat-switch > .knob {
3501
3511
  position: absolute;
3502
3512
  top: 50%;
3503
- left: 0;
3513
+ left: 2px;
3514
+ transform: translateY(-50%);
3504
3515
  background-color: var(--semantic-surface-neutral-default);
3505
3516
  border-radius: var(--spacing-radius-full);
3506
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
3507
- transform: translateY(-50%);
3508
- transition: transform 0.25s;
3517
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
3518
+ transition: left 0.25s;
3509
3519
  }
3510
3520
 
3511
3521
  /* src/components/Tab/tab.scss */
3512
3522
  .lib-xplat-tab {
3513
3523
  position: relative;
3514
3524
  display: flex;
3515
- width: fit-content;
3516
- overflow: hidden;
3525
+ width: 100%;
3526
+ min-width: 0;
3517
3527
  align-items: center;
3528
+ overflow-x: auto;
3529
+ -ms-overflow-style: none;
3530
+ scrollbar-width: none;
3531
+ }
3532
+ .lib-xplat-tab::-webkit-scrollbar {
3533
+ display: none;
3518
3534
  }
3519
3535
  .lib-xplat-tab.sm {
3520
3536
  height: var(--spacing-control-height-sm);
@@ -3529,15 +3545,19 @@
3529
3545
  font-size: 18px;
3530
3546
  }
3531
3547
  .lib-xplat-tab.type-default {
3548
+ width: 100%;
3532
3549
  background-color: var(--semantic-surface-neutral-strong);
3533
3550
  border-radius: var(--spacing-radius-md);
3534
3551
  }
3535
3552
  .lib-xplat-tab.type-default > .tab-item {
3553
+ flex: 1;
3536
3554
  padding: var(--spacing-space-1) var(--spacing-space-6);
3537
3555
  height: 100%;
3538
3556
  display: flex;
3539
3557
  align-items: center;
3558
+ justify-content: center;
3540
3559
  cursor: pointer;
3560
+ white-space: nowrap;
3541
3561
  border-right: 1px solid var(--semantic-border-strong);
3542
3562
  color: var(--semantic-text-inverse);
3543
3563
  }
@@ -3548,13 +3568,17 @@
3548
3568
  background-color: var(--semantic-surface-brand-default);
3549
3569
  }
3550
3570
  .lib-xplat-tab.type-toggle {
3571
+ width: 100%;
3551
3572
  border-bottom: 1px solid var(--semantic-border-default);
3552
3573
  gap: var(--spacing-space-6);
3553
3574
  }
3554
3575
  .lib-xplat-tab.type-toggle > .tab-item {
3555
3576
  position: relative;
3577
+ flex: 1;
3556
3578
  display: flex;
3557
3579
  align-items: center;
3580
+ justify-content: center;
3581
+ white-space: nowrap;
3558
3582
  padding: 0 var(--spacing-space-3);
3559
3583
  font-size: 16px;
3560
3584
  font-weight: 500;
@@ -3581,7 +3605,9 @@
3581
3605
 
3582
3606
  /* src/components/Table/table.scss */
3583
3607
  .lib-xplat-table-wrapper {
3608
+ contain: content;
3584
3609
  width: 100%;
3610
+ height: 100%;
3585
3611
  position: relative;
3586
3612
  }
3587
3613
  .lib-xplat-table-wrapper > .lib-xplat-table {
@@ -4026,6 +4052,7 @@
4026
4052
  .lib-xplat-video {
4027
4053
  position: relative;
4028
4054
  width: 100%;
4055
+ height: 100%;
4029
4056
  border-radius: var(--spacing-radius-sm);
4030
4057
  overflow: hidden;
4031
4058
  background-color: var(--semantic-surface-neutral-strong);
@@ -4086,13 +4113,13 @@
4086
4113
  opacity: 0;
4087
4114
  pointer-events: none;
4088
4115
  }
4089
- .lib-xplat-video.custom-overlay > .play-overlay.is-playing:hover {
4090
- opacity: 1;
4091
- pointer-events: auto;
4092
- }
4093
4116
  .lib-xplat-video.custom-overlay > .play-overlay.is-loading .play-icon {
4094
4117
  opacity: 0.6;
4095
4118
  }
4119
+ .lib-xplat-video.custom-overlay:hover > .play-overlay.is-playing {
4120
+ opacity: 1;
4121
+ pointer-events: auto;
4122
+ }
4096
4123
 
4097
4124
  /* src/layout/Grid/FullGrid/fullgrid.scss */
4098
4125
  .lib-xplat-full-grid {