@x-plat/design-system 0.5.49 → 0.5.51
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/components/Button/index.css +6 -3
- package/dist/components/DatePicker/index.css +14 -7
- package/dist/components/Editor/index.cjs +760 -0
- package/dist/components/Editor/index.css +247 -0
- package/dist/components/Editor/index.d.cts +29 -0
- package/dist/components/Editor/index.d.ts +29 -0
- package/dist/components/Editor/index.js +727 -0
- package/dist/components/Input/index.css +8 -4
- package/dist/components/Select/index.css +10 -5
- package/dist/components/TextArea/index.css +3 -0
- package/dist/components/index.cjs +1002 -293
- package/dist/components/index.css +275 -12
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1001 -293
- package/dist/index.cjs +1026 -317
- package/dist/index.css +275 -12
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1025 -317
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1994,17 +1994,20 @@
|
|
|
1994
1994
|
.lib-xplat-button.sm {
|
|
1995
1995
|
height: var(--spacing-control-height-sm);
|
|
1996
1996
|
padding: 0 var(--spacing-space-3);
|
|
1997
|
-
font-size:
|
|
1997
|
+
font-size: var(--semantic-typo-label-2-m-size);
|
|
1998
|
+
line-height: var(--semantic-typo-label-2-m-lh);
|
|
1998
1999
|
}
|
|
1999
2000
|
.lib-xplat-button.md {
|
|
2000
2001
|
height: var(--spacing-control-height-md);
|
|
2001
2002
|
padding: 0 var(--spacing-space-4);
|
|
2002
|
-
font-size:
|
|
2003
|
+
font-size: var(--semantic-typo-label-1-m-size);
|
|
2004
|
+
line-height: var(--semantic-typo-label-1-m-lh);
|
|
2003
2005
|
}
|
|
2004
2006
|
.lib-xplat-button.lg {
|
|
2005
2007
|
height: var(--spacing-control-height-lg);
|
|
2006
2008
|
padding: 0 var(--spacing-space-6);
|
|
2007
|
-
font-size:
|
|
2009
|
+
font-size: var(--semantic-typo-body-1-m-size);
|
|
2010
|
+
line-height: var(--semantic-typo-body-1-m-lh);
|
|
2008
2011
|
}
|
|
2009
2012
|
.lib-xplat-button:disabled {
|
|
2010
2013
|
cursor: not-allowed;
|
|
@@ -2857,15 +2860,18 @@
|
|
|
2857
2860
|
}
|
|
2858
2861
|
.lib-xplat-input-wrap .lib-xplat-input.sm {
|
|
2859
2862
|
height: var(--spacing-control-height-sm);
|
|
2860
|
-
font-size:
|
|
2863
|
+
font-size: var(--semantic-typo-label-2-m-size);
|
|
2864
|
+
line-height: var(--semantic-typo-label-2-m-lh);
|
|
2861
2865
|
}
|
|
2862
2866
|
.lib-xplat-input-wrap .lib-xplat-input.md {
|
|
2863
2867
|
height: var(--spacing-control-height-md);
|
|
2864
|
-
font-size:
|
|
2868
|
+
font-size: var(--semantic-typo-label-1-m-size);
|
|
2869
|
+
line-height: var(--semantic-typo-label-1-m-lh);
|
|
2865
2870
|
}
|
|
2866
2871
|
.lib-xplat-input-wrap .lib-xplat-input.lg {
|
|
2867
2872
|
height: var(--spacing-control-height-lg);
|
|
2868
|
-
font-size:
|
|
2873
|
+
font-size: var(--semantic-typo-body-1-m-size);
|
|
2874
|
+
line-height: var(--semantic-typo-body-1-m-lh);
|
|
2869
2875
|
}
|
|
2870
2876
|
.lib-xplat-input-wrap .lib-xplat-input.disabled {
|
|
2871
2877
|
background-color: var(--semantic-surface-neutral-disabled);
|
|
@@ -2905,7 +2911,8 @@
|
|
|
2905
2911
|
.lib-xplat-input-wrap .lib-xplat-input-validation-wrap > .lib-xplat-input-validation {
|
|
2906
2912
|
display: flex;
|
|
2907
2913
|
gap: var(--spacing-space-1);
|
|
2908
|
-
font-size:
|
|
2914
|
+
font-size: var(--semantic-typo-caption-2-r-size);
|
|
2915
|
+
line-height: var(--semantic-typo-caption-2-r-lh);
|
|
2909
2916
|
align-items: center;
|
|
2910
2917
|
user-select: none;
|
|
2911
2918
|
}
|
|
@@ -3462,6 +3469,254 @@
|
|
|
3462
3469
|
cursor: not-allowed;
|
|
3463
3470
|
}
|
|
3464
3471
|
|
|
3472
|
+
/* src/components/Editor/editor.scss */
|
|
3473
|
+
.lib-xplat-editor {
|
|
3474
|
+
display: flex;
|
|
3475
|
+
flex-direction: column;
|
|
3476
|
+
width: 100%;
|
|
3477
|
+
border: 1px solid var(--semantic-border-default);
|
|
3478
|
+
border-radius: var(--spacing-radius-md);
|
|
3479
|
+
background: var(--semantic-surface-neutral-default);
|
|
3480
|
+
overflow: hidden;
|
|
3481
|
+
transition: border-color 150ms ease;
|
|
3482
|
+
}
|
|
3483
|
+
.lib-xplat-editor.focused {
|
|
3484
|
+
border-color: var(--semantic-border-brand);
|
|
3485
|
+
}
|
|
3486
|
+
.lib-xplat-editor.readonly {
|
|
3487
|
+
background: var(--semantic-surface-neutral-subtle);
|
|
3488
|
+
}
|
|
3489
|
+
.lib-xplat-editor__toolbar {
|
|
3490
|
+
display: flex;
|
|
3491
|
+
flex-wrap: wrap;
|
|
3492
|
+
gap: var(--spacing-space-1);
|
|
3493
|
+
padding: var(--spacing-space-2);
|
|
3494
|
+
border-bottom: 1px solid var(--semantic-border-subtle);
|
|
3495
|
+
background: var(--semantic-surface-neutral-subtle);
|
|
3496
|
+
}
|
|
3497
|
+
.lib-xplat-editor__toolbar-btn {
|
|
3498
|
+
display: inline-flex;
|
|
3499
|
+
align-items: center;
|
|
3500
|
+
justify-content: center;
|
|
3501
|
+
min-width: 32px;
|
|
3502
|
+
height: 32px;
|
|
3503
|
+
padding: 0 var(--spacing-space-2);
|
|
3504
|
+
border: 1px solid transparent;
|
|
3505
|
+
border-radius: var(--spacing-radius-sm);
|
|
3506
|
+
background: transparent;
|
|
3507
|
+
color: var(--semantic-text-strong);
|
|
3508
|
+
font-family: inherit;
|
|
3509
|
+
font-weight: 600;
|
|
3510
|
+
cursor: pointer;
|
|
3511
|
+
transition: background 100ms ease, border-color 100ms ease;
|
|
3512
|
+
}
|
|
3513
|
+
.lib-xplat-editor__toolbar-btn:hover {
|
|
3514
|
+
background: var(--semantic-surface-neutral-strong);
|
|
3515
|
+
}
|
|
3516
|
+
.lib-xplat-editor__toolbar-btn.active {
|
|
3517
|
+
background: var(--semantic-surface-brand-subtle);
|
|
3518
|
+
color: var(--semantic-text-brand);
|
|
3519
|
+
border-color: var(--semantic-border-brand);
|
|
3520
|
+
}
|
|
3521
|
+
.lib-xplat-editor__content {
|
|
3522
|
+
position: relative;
|
|
3523
|
+
padding: var(--spacing-space-4);
|
|
3524
|
+
}
|
|
3525
|
+
.lib-xplat-editor__placeholder {
|
|
3526
|
+
position: absolute;
|
|
3527
|
+
top: var(--spacing-space-4);
|
|
3528
|
+
left: var(--spacing-space-4);
|
|
3529
|
+
color: var(--semantic-text-muted);
|
|
3530
|
+
pointer-events: none;
|
|
3531
|
+
user-select: none;
|
|
3532
|
+
}
|
|
3533
|
+
.lib-xplat-editor__editable {
|
|
3534
|
+
outline: none;
|
|
3535
|
+
color: var(--semantic-text-strong);
|
|
3536
|
+
min-height: inherit;
|
|
3537
|
+
}
|
|
3538
|
+
.lib-xplat-editor__editable h1,
|
|
3539
|
+
.lib-xplat-editor__editable h2,
|
|
3540
|
+
.lib-xplat-editor__editable h3,
|
|
3541
|
+
.lib-xplat-editor__editable h4,
|
|
3542
|
+
.lib-xplat-editor__editable h5,
|
|
3543
|
+
.lib-xplat-editor__editable h6 {
|
|
3544
|
+
margin: var(--spacing-space-4) 0 var(--spacing-space-2);
|
|
3545
|
+
font-weight: 600;
|
|
3546
|
+
line-height: 1.3;
|
|
3547
|
+
}
|
|
3548
|
+
.lib-xplat-editor__editable h1:first-child,
|
|
3549
|
+
.lib-xplat-editor__editable h2:first-child,
|
|
3550
|
+
.lib-xplat-editor__editable h3:first-child,
|
|
3551
|
+
.lib-xplat-editor__editable h4:first-child,
|
|
3552
|
+
.lib-xplat-editor__editable h5:first-child,
|
|
3553
|
+
.lib-xplat-editor__editable h6:first-child {
|
|
3554
|
+
margin-top: 0;
|
|
3555
|
+
}
|
|
3556
|
+
.lib-xplat-editor__editable h1 {
|
|
3557
|
+
font-size: 28px;
|
|
3558
|
+
}
|
|
3559
|
+
.lib-xplat-editor__editable h2 {
|
|
3560
|
+
font-size: 22px;
|
|
3561
|
+
}
|
|
3562
|
+
.lib-xplat-editor__editable h3 {
|
|
3563
|
+
font-size: 18px;
|
|
3564
|
+
}
|
|
3565
|
+
.lib-xplat-editor__editable p {
|
|
3566
|
+
margin: var(--spacing-space-2) 0;
|
|
3567
|
+
line-height: 1.6;
|
|
3568
|
+
}
|
|
3569
|
+
.lib-xplat-editor__editable p:first-child {
|
|
3570
|
+
margin-top: 0;
|
|
3571
|
+
}
|
|
3572
|
+
.lib-xplat-editor__editable p:last-child {
|
|
3573
|
+
margin-bottom: 0;
|
|
3574
|
+
}
|
|
3575
|
+
.lib-xplat-editor__editable ul,
|
|
3576
|
+
.lib-xplat-editor__editable ol {
|
|
3577
|
+
margin: var(--spacing-space-2) 0;
|
|
3578
|
+
padding-left: var(--spacing-space-6);
|
|
3579
|
+
}
|
|
3580
|
+
.lib-xplat-editor__editable li {
|
|
3581
|
+
margin: var(--spacing-space-1) 0;
|
|
3582
|
+
line-height: 1.6;
|
|
3583
|
+
}
|
|
3584
|
+
.lib-xplat-editor__editable blockquote {
|
|
3585
|
+
margin: var(--spacing-space-3) 0;
|
|
3586
|
+
padding: var(--spacing-space-2) var(--spacing-space-4);
|
|
3587
|
+
border-left: 3px solid var(--semantic-border-brand);
|
|
3588
|
+
color: var(--semantic-text-subtle);
|
|
3589
|
+
background: var(--semantic-surface-neutral-subtle);
|
|
3590
|
+
border-radius: var(--spacing-radius-sm);
|
|
3591
|
+
}
|
|
3592
|
+
.lib-xplat-editor__editable pre {
|
|
3593
|
+
margin: var(--spacing-space-3) 0;
|
|
3594
|
+
padding: var(--spacing-space-3) var(--spacing-space-4);
|
|
3595
|
+
border-radius: var(--spacing-radius-md);
|
|
3596
|
+
background: var(--semantic-surface-neutral-subtle);
|
|
3597
|
+
color: var(--semantic-text-strong);
|
|
3598
|
+
font-family:
|
|
3599
|
+
ui-monospace,
|
|
3600
|
+
"SF Mono",
|
|
3601
|
+
Menlo,
|
|
3602
|
+
monospace;
|
|
3603
|
+
font-size: 13px;
|
|
3604
|
+
line-height: 1.5;
|
|
3605
|
+
overflow-x: auto;
|
|
3606
|
+
white-space: pre-wrap;
|
|
3607
|
+
}
|
|
3608
|
+
.lib-xplat-editor__editable code {
|
|
3609
|
+
padding: 2px 6px;
|
|
3610
|
+
border-radius: var(--spacing-radius-sm);
|
|
3611
|
+
background: var(--semantic-surface-neutral-subtle);
|
|
3612
|
+
font-family:
|
|
3613
|
+
ui-monospace,
|
|
3614
|
+
"SF Mono",
|
|
3615
|
+
Menlo,
|
|
3616
|
+
monospace;
|
|
3617
|
+
font-size: 13px;
|
|
3618
|
+
color: var(--semantic-text-strong);
|
|
3619
|
+
}
|
|
3620
|
+
.lib-xplat-editor__editable a {
|
|
3621
|
+
color: var(--semantic-text-link, var(--semantic-text-brand));
|
|
3622
|
+
text-decoration: underline;
|
|
3623
|
+
}
|
|
3624
|
+
.lib-xplat-editor__editable img {
|
|
3625
|
+
max-width: 100%;
|
|
3626
|
+
height: auto;
|
|
3627
|
+
border-radius: var(--spacing-radius-sm);
|
|
3628
|
+
margin: var(--spacing-space-2) 0;
|
|
3629
|
+
}
|
|
3630
|
+
.lib-xplat-editor__editable hr {
|
|
3631
|
+
margin: var(--spacing-space-4) 0;
|
|
3632
|
+
border: 0;
|
|
3633
|
+
border-top: 1px solid var(--semantic-border-default);
|
|
3634
|
+
}
|
|
3635
|
+
.lib-xplat-editor__slash-menu {
|
|
3636
|
+
position: absolute;
|
|
3637
|
+
z-index: 10;
|
|
3638
|
+
min-width: 240px;
|
|
3639
|
+
max-height: 280px;
|
|
3640
|
+
overflow-y: auto;
|
|
3641
|
+
padding: var(--spacing-space-1);
|
|
3642
|
+
border: 1px solid var(--semantic-border-default);
|
|
3643
|
+
border-radius: var(--spacing-radius-md);
|
|
3644
|
+
background: var(--semantic-surface-neutral-default);
|
|
3645
|
+
box-shadow: 0 4px 16px var(--semantic-interaction-overlay-10);
|
|
3646
|
+
}
|
|
3647
|
+
.lib-xplat-editor__slash-item {
|
|
3648
|
+
display: flex;
|
|
3649
|
+
width: 100%;
|
|
3650
|
+
align-items: center;
|
|
3651
|
+
justify-content: space-between;
|
|
3652
|
+
gap: var(--spacing-space-3);
|
|
3653
|
+
padding: var(--spacing-space-2) var(--spacing-space-3);
|
|
3654
|
+
border: 0;
|
|
3655
|
+
border-radius: var(--spacing-radius-sm);
|
|
3656
|
+
background: transparent;
|
|
3657
|
+
color: var(--semantic-text-strong);
|
|
3658
|
+
font-family: inherit;
|
|
3659
|
+
font-size: 13px;
|
|
3660
|
+
text-align: left;
|
|
3661
|
+
cursor: pointer;
|
|
3662
|
+
}
|
|
3663
|
+
.lib-xplat-editor__slash-item:hover,
|
|
3664
|
+
.lib-xplat-editor__slash-item.active {
|
|
3665
|
+
background: var(--semantic-surface-brand-subtle);
|
|
3666
|
+
color: var(--semantic-text-brand);
|
|
3667
|
+
}
|
|
3668
|
+
.lib-xplat-editor__slash-item .label {
|
|
3669
|
+
flex: 1;
|
|
3670
|
+
}
|
|
3671
|
+
.lib-xplat-editor__slash-item .hint {
|
|
3672
|
+
color: var(--semantic-text-muted);
|
|
3673
|
+
font-size: 12px;
|
|
3674
|
+
}
|
|
3675
|
+
.lib-xplat-editor__link-popover {
|
|
3676
|
+
position: absolute;
|
|
3677
|
+
z-index: 10;
|
|
3678
|
+
display: flex;
|
|
3679
|
+
align-items: center;
|
|
3680
|
+
gap: var(--spacing-space-2);
|
|
3681
|
+
padding: var(--spacing-space-2);
|
|
3682
|
+
border: 1px solid var(--semantic-border-default);
|
|
3683
|
+
border-radius: var(--spacing-radius-md);
|
|
3684
|
+
background: var(--semantic-surface-neutral-default);
|
|
3685
|
+
box-shadow: 0 4px 16px var(--semantic-interaction-overlay-10);
|
|
3686
|
+
}
|
|
3687
|
+
.lib-xplat-editor__link-popover input {
|
|
3688
|
+
width: 240px;
|
|
3689
|
+
padding: var(--spacing-space-1) var(--spacing-space-2);
|
|
3690
|
+
border: 1px solid var(--semantic-border-default);
|
|
3691
|
+
border-radius: var(--spacing-radius-sm);
|
|
3692
|
+
background: var(--semantic-surface-neutral-default);
|
|
3693
|
+
color: var(--semantic-text-strong);
|
|
3694
|
+
font-family: inherit;
|
|
3695
|
+
font-size: 13px;
|
|
3696
|
+
outline: none;
|
|
3697
|
+
}
|
|
3698
|
+
.lib-xplat-editor__link-popover input:focus {
|
|
3699
|
+
border-color: var(--semantic-border-brand);
|
|
3700
|
+
}
|
|
3701
|
+
.lib-xplat-editor__link-popover button {
|
|
3702
|
+
padding: var(--spacing-space-1) var(--spacing-space-3);
|
|
3703
|
+
border: 1px solid var(--semantic-border-default);
|
|
3704
|
+
border-radius: var(--spacing-radius-sm);
|
|
3705
|
+
background: var(--semantic-surface-neutral-default);
|
|
3706
|
+
color: var(--semantic-text-strong);
|
|
3707
|
+
font-family: inherit;
|
|
3708
|
+
font-size: 12px;
|
|
3709
|
+
cursor: pointer;
|
|
3710
|
+
}
|
|
3711
|
+
.lib-xplat-editor__link-popover button:hover {
|
|
3712
|
+
background: var(--semantic-surface-neutral-strong);
|
|
3713
|
+
}
|
|
3714
|
+
.lib-xplat-editor__link-popover button:first-of-type {
|
|
3715
|
+
background: var(--semantic-surface-brand-default);
|
|
3716
|
+
color: var(--semantic-text-inverse);
|
|
3717
|
+
border-color: var(--semantic-surface-brand-default);
|
|
3718
|
+
}
|
|
3719
|
+
|
|
3465
3720
|
/* src/components/EmptyState/emptystate.scss */
|
|
3466
3721
|
.lib-xplat-empty-state {
|
|
3467
3722
|
width: 100%;
|
|
@@ -3930,25 +4185,30 @@
|
|
|
3930
4185
|
.lib-xplat-select.sm .select-trigger {
|
|
3931
4186
|
min-height: var(--spacing-control-height-sm);
|
|
3932
4187
|
padding: var(--spacing-space-1) var(--spacing-space-2);
|
|
3933
|
-
font-size:
|
|
4188
|
+
font-size: var(--semantic-typo-label-2-m-size);
|
|
4189
|
+
line-height: var(--semantic-typo-label-2-m-lh);
|
|
3934
4190
|
}
|
|
3935
4191
|
.lib-xplat-select.md .select-trigger {
|
|
3936
4192
|
min-height: var(--spacing-control-height-md);
|
|
3937
4193
|
padding: var(--spacing-space-2) var(--spacing-space-3);
|
|
3938
|
-
font-size:
|
|
4194
|
+
font-size: var(--semantic-typo-label-1-m-size);
|
|
4195
|
+
line-height: var(--semantic-typo-label-1-m-lh);
|
|
3939
4196
|
}
|
|
3940
4197
|
.lib-xplat-select.lg .select-trigger {
|
|
3941
4198
|
min-height: var(--spacing-control-height-lg);
|
|
3942
4199
|
padding: var(--spacing-space-2) var(--spacing-space-4);
|
|
3943
|
-
font-size:
|
|
4200
|
+
font-size: var(--semantic-typo-body-1-m-size);
|
|
4201
|
+
line-height: var(--semantic-typo-body-1-m-lh);
|
|
3944
4202
|
}
|
|
3945
4203
|
.lib-xplat-select.sm .select-content .select-item {
|
|
3946
4204
|
padding: var(--spacing-space-2) var(--spacing-space-2);
|
|
3947
|
-
font-size:
|
|
4205
|
+
font-size: var(--semantic-typo-label-2-m-size);
|
|
4206
|
+
line-height: var(--semantic-typo-label-2-m-lh);
|
|
3948
4207
|
}
|
|
3949
4208
|
.lib-xplat-select.lg .select-content .select-item {
|
|
3950
4209
|
padding: var(--spacing-space-2) var(--spacing-space-4);
|
|
3951
|
-
font-size:
|
|
4210
|
+
font-size: var(--semantic-typo-body-1-m-size);
|
|
4211
|
+
line-height: var(--semantic-typo-body-1-m-lh);
|
|
3952
4212
|
}
|
|
3953
4213
|
.lib-xplat-select .select-trigger {
|
|
3954
4214
|
cursor: pointer;
|
|
@@ -4888,6 +5148,9 @@
|
|
|
4888
5148
|
color: var(--semantic-text-subtle);
|
|
4889
5149
|
resize: none;
|
|
4890
5150
|
height: 1.5em;
|
|
5151
|
+
font-size: var(--semantic-typo-label-1-m-size);
|
|
5152
|
+
line-height: var(--semantic-typo-label-1-m-lh);
|
|
5153
|
+
font-family: inherit;
|
|
4891
5154
|
}
|
|
4892
5155
|
.lib-xplat-textarea-wrapper .lib-xplat-textarea > textarea:disabled {
|
|
4893
5156
|
cursor: not-allowed;
|
package/dist/index.d.cts
CHANGED
|
@@ -16,6 +16,7 @@ export { InputDatePicker, PopupDatePicker, RangeDatePicker, SingleDatePicker } f
|
|
|
16
16
|
export { Divider } from './components/Divider/index.cjs';
|
|
17
17
|
export { Drawer } from './components/Drawer/index.cjs';
|
|
18
18
|
export { Dropdown } from './components/Dropdown/index.cjs';
|
|
19
|
+
export { default as Editor, EditorProps, EditorToolbarItem } from './components/Editor/index.cjs';
|
|
19
20
|
export { EmptyState } from './components/EmptyState/index.cjs';
|
|
20
21
|
export { FileUpload } from './components/FileUpload/index.cjs';
|
|
21
22
|
export { HtmlTypewriter } from './components/HtmlTypeWriter/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { InputDatePicker, PopupDatePicker, RangeDatePicker, SingleDatePicker } f
|
|
|
16
16
|
export { Divider } from './components/Divider/index.js';
|
|
17
17
|
export { Drawer } from './components/Drawer/index.js';
|
|
18
18
|
export { Dropdown } from './components/Dropdown/index.js';
|
|
19
|
+
export { default as Editor, EditorProps, EditorToolbarItem } from './components/Editor/index.js';
|
|
19
20
|
export { EmptyState } from './components/EmptyState/index.js';
|
|
20
21
|
export { FileUpload } from './components/FileUpload/index.js';
|
|
21
22
|
export { HtmlTypewriter } from './components/HtmlTypeWriter/index.js';
|