@x-plat/design-system 0.5.48 → 0.5.50

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.
@@ -3462,6 +3462,254 @@
3462
3462
  cursor: not-allowed;
3463
3463
  }
3464
3464
 
3465
+ /* src/components/Editor/editor.scss */
3466
+ .lib-xplat-editor {
3467
+ display: flex;
3468
+ flex-direction: column;
3469
+ width: 100%;
3470
+ border: 1px solid var(--semantic-border-default);
3471
+ border-radius: var(--spacing-radius-md);
3472
+ background: var(--semantic-surface-neutral-default);
3473
+ overflow: hidden;
3474
+ transition: border-color 150ms ease;
3475
+ }
3476
+ .lib-xplat-editor.focused {
3477
+ border-color: var(--semantic-border-brand);
3478
+ }
3479
+ .lib-xplat-editor.readonly {
3480
+ background: var(--semantic-surface-neutral-subtle);
3481
+ }
3482
+ .lib-xplat-editor__toolbar {
3483
+ display: flex;
3484
+ flex-wrap: wrap;
3485
+ gap: var(--spacing-space-1);
3486
+ padding: var(--spacing-space-2);
3487
+ border-bottom: 1px solid var(--semantic-border-subtle);
3488
+ background: var(--semantic-surface-neutral-subtle);
3489
+ }
3490
+ .lib-xplat-editor__toolbar-btn {
3491
+ display: inline-flex;
3492
+ align-items: center;
3493
+ justify-content: center;
3494
+ min-width: 32px;
3495
+ height: 32px;
3496
+ padding: 0 var(--spacing-space-2);
3497
+ border: 1px solid transparent;
3498
+ border-radius: var(--spacing-radius-sm);
3499
+ background: transparent;
3500
+ color: var(--semantic-text-strong);
3501
+ font-family: inherit;
3502
+ font-weight: 600;
3503
+ cursor: pointer;
3504
+ transition: background 100ms ease, border-color 100ms ease;
3505
+ }
3506
+ .lib-xplat-editor__toolbar-btn:hover {
3507
+ background: var(--semantic-surface-neutral-strong);
3508
+ }
3509
+ .lib-xplat-editor__toolbar-btn.active {
3510
+ background: var(--semantic-surface-brand-subtle);
3511
+ color: var(--semantic-text-brand);
3512
+ border-color: var(--semantic-border-brand);
3513
+ }
3514
+ .lib-xplat-editor__content {
3515
+ position: relative;
3516
+ padding: var(--spacing-space-4);
3517
+ }
3518
+ .lib-xplat-editor__placeholder {
3519
+ position: absolute;
3520
+ top: var(--spacing-space-4);
3521
+ left: var(--spacing-space-4);
3522
+ color: var(--semantic-text-muted);
3523
+ pointer-events: none;
3524
+ user-select: none;
3525
+ }
3526
+ .lib-xplat-editor__editable {
3527
+ outline: none;
3528
+ color: var(--semantic-text-strong);
3529
+ min-height: inherit;
3530
+ }
3531
+ .lib-xplat-editor__editable h1,
3532
+ .lib-xplat-editor__editable h2,
3533
+ .lib-xplat-editor__editable h3,
3534
+ .lib-xplat-editor__editable h4,
3535
+ .lib-xplat-editor__editable h5,
3536
+ .lib-xplat-editor__editable h6 {
3537
+ margin: var(--spacing-space-4) 0 var(--spacing-space-2);
3538
+ font-weight: 600;
3539
+ line-height: 1.3;
3540
+ }
3541
+ .lib-xplat-editor__editable h1:first-child,
3542
+ .lib-xplat-editor__editable h2:first-child,
3543
+ .lib-xplat-editor__editable h3:first-child,
3544
+ .lib-xplat-editor__editable h4:first-child,
3545
+ .lib-xplat-editor__editable h5:first-child,
3546
+ .lib-xplat-editor__editable h6:first-child {
3547
+ margin-top: 0;
3548
+ }
3549
+ .lib-xplat-editor__editable h1 {
3550
+ font-size: 28px;
3551
+ }
3552
+ .lib-xplat-editor__editable h2 {
3553
+ font-size: 22px;
3554
+ }
3555
+ .lib-xplat-editor__editable h3 {
3556
+ font-size: 18px;
3557
+ }
3558
+ .lib-xplat-editor__editable p {
3559
+ margin: var(--spacing-space-2) 0;
3560
+ line-height: 1.6;
3561
+ }
3562
+ .lib-xplat-editor__editable p:first-child {
3563
+ margin-top: 0;
3564
+ }
3565
+ .lib-xplat-editor__editable p:last-child {
3566
+ margin-bottom: 0;
3567
+ }
3568
+ .lib-xplat-editor__editable ul,
3569
+ .lib-xplat-editor__editable ol {
3570
+ margin: var(--spacing-space-2) 0;
3571
+ padding-left: var(--spacing-space-6);
3572
+ }
3573
+ .lib-xplat-editor__editable li {
3574
+ margin: var(--spacing-space-1) 0;
3575
+ line-height: 1.6;
3576
+ }
3577
+ .lib-xplat-editor__editable blockquote {
3578
+ margin: var(--spacing-space-3) 0;
3579
+ padding: var(--spacing-space-2) var(--spacing-space-4);
3580
+ border-left: 3px solid var(--semantic-border-brand);
3581
+ color: var(--semantic-text-subtle);
3582
+ background: var(--semantic-surface-neutral-subtle);
3583
+ border-radius: var(--spacing-radius-sm);
3584
+ }
3585
+ .lib-xplat-editor__editable pre {
3586
+ margin: var(--spacing-space-3) 0;
3587
+ padding: var(--spacing-space-3) var(--spacing-space-4);
3588
+ border-radius: var(--spacing-radius-md);
3589
+ background: var(--semantic-surface-neutral-subtle);
3590
+ color: var(--semantic-text-strong);
3591
+ font-family:
3592
+ ui-monospace,
3593
+ "SF Mono",
3594
+ Menlo,
3595
+ monospace;
3596
+ font-size: 13px;
3597
+ line-height: 1.5;
3598
+ overflow-x: auto;
3599
+ white-space: pre-wrap;
3600
+ }
3601
+ .lib-xplat-editor__editable code {
3602
+ padding: 2px 6px;
3603
+ border-radius: var(--spacing-radius-sm);
3604
+ background: var(--semantic-surface-neutral-subtle);
3605
+ font-family:
3606
+ ui-monospace,
3607
+ "SF Mono",
3608
+ Menlo,
3609
+ monospace;
3610
+ font-size: 13px;
3611
+ color: var(--semantic-text-strong);
3612
+ }
3613
+ .lib-xplat-editor__editable a {
3614
+ color: var(--semantic-text-link, var(--semantic-text-brand));
3615
+ text-decoration: underline;
3616
+ }
3617
+ .lib-xplat-editor__editable img {
3618
+ max-width: 100%;
3619
+ height: auto;
3620
+ border-radius: var(--spacing-radius-sm);
3621
+ margin: var(--spacing-space-2) 0;
3622
+ }
3623
+ .lib-xplat-editor__editable hr {
3624
+ margin: var(--spacing-space-4) 0;
3625
+ border: 0;
3626
+ border-top: 1px solid var(--semantic-border-default);
3627
+ }
3628
+ .lib-xplat-editor__slash-menu {
3629
+ position: absolute;
3630
+ z-index: 10;
3631
+ min-width: 240px;
3632
+ max-height: 280px;
3633
+ overflow-y: auto;
3634
+ padding: var(--spacing-space-1);
3635
+ border: 1px solid var(--semantic-border-default);
3636
+ border-radius: var(--spacing-radius-md);
3637
+ background: var(--semantic-surface-neutral-default);
3638
+ box-shadow: 0 4px 16px var(--semantic-interaction-overlay-10);
3639
+ }
3640
+ .lib-xplat-editor__slash-item {
3641
+ display: flex;
3642
+ width: 100%;
3643
+ align-items: center;
3644
+ justify-content: space-between;
3645
+ gap: var(--spacing-space-3);
3646
+ padding: var(--spacing-space-2) var(--spacing-space-3);
3647
+ border: 0;
3648
+ border-radius: var(--spacing-radius-sm);
3649
+ background: transparent;
3650
+ color: var(--semantic-text-strong);
3651
+ font-family: inherit;
3652
+ font-size: 13px;
3653
+ text-align: left;
3654
+ cursor: pointer;
3655
+ }
3656
+ .lib-xplat-editor__slash-item:hover,
3657
+ .lib-xplat-editor__slash-item.active {
3658
+ background: var(--semantic-surface-brand-subtle);
3659
+ color: var(--semantic-text-brand);
3660
+ }
3661
+ .lib-xplat-editor__slash-item .label {
3662
+ flex: 1;
3663
+ }
3664
+ .lib-xplat-editor__slash-item .hint {
3665
+ color: var(--semantic-text-muted);
3666
+ font-size: 12px;
3667
+ }
3668
+ .lib-xplat-editor__link-popover {
3669
+ position: absolute;
3670
+ z-index: 10;
3671
+ display: flex;
3672
+ align-items: center;
3673
+ gap: var(--spacing-space-2);
3674
+ padding: var(--spacing-space-2);
3675
+ border: 1px solid var(--semantic-border-default);
3676
+ border-radius: var(--spacing-radius-md);
3677
+ background: var(--semantic-surface-neutral-default);
3678
+ box-shadow: 0 4px 16px var(--semantic-interaction-overlay-10);
3679
+ }
3680
+ .lib-xplat-editor__link-popover input {
3681
+ width: 240px;
3682
+ padding: var(--spacing-space-1) var(--spacing-space-2);
3683
+ border: 1px solid var(--semantic-border-default);
3684
+ border-radius: var(--spacing-radius-sm);
3685
+ background: var(--semantic-surface-neutral-default);
3686
+ color: var(--semantic-text-strong);
3687
+ font-family: inherit;
3688
+ font-size: 13px;
3689
+ outline: none;
3690
+ }
3691
+ .lib-xplat-editor__link-popover input:focus {
3692
+ border-color: var(--semantic-border-brand);
3693
+ }
3694
+ .lib-xplat-editor__link-popover button {
3695
+ padding: var(--spacing-space-1) var(--spacing-space-3);
3696
+ border: 1px solid var(--semantic-border-default);
3697
+ border-radius: var(--spacing-radius-sm);
3698
+ background: var(--semantic-surface-neutral-default);
3699
+ color: var(--semantic-text-strong);
3700
+ font-family: inherit;
3701
+ font-size: 12px;
3702
+ cursor: pointer;
3703
+ }
3704
+ .lib-xplat-editor__link-popover button:hover {
3705
+ background: var(--semantic-surface-neutral-strong);
3706
+ }
3707
+ .lib-xplat-editor__link-popover button:first-of-type {
3708
+ background: var(--semantic-surface-brand-default);
3709
+ color: var(--semantic-text-inverse);
3710
+ border-color: var(--semantic-surface-brand-default);
3711
+ }
3712
+
3465
3713
  /* src/components/EmptyState/emptystate.scss */
3466
3714
  .lib-xplat-empty-state {
3467
3715
  width: 100%;
@@ -15,6 +15,7 @@ export { InputDatePicker, PopupDatePicker, RangeDatePicker, SingleDatePicker } f
15
15
  export { Divider } from './Divider/index.cjs';
16
16
  export { Drawer } from './Drawer/index.cjs';
17
17
  export { Dropdown } from './Dropdown/index.cjs';
18
+ export { default as Editor, EditorProps, EditorToolbarItem } from './Editor/index.cjs';
18
19
  export { EmptyState } from './EmptyState/index.cjs';
19
20
  export { FileUpload } from './FileUpload/index.cjs';
20
21
  export { HtmlTypewriter } from './HtmlTypeWriter/index.cjs';
@@ -15,6 +15,7 @@ export { InputDatePicker, PopupDatePicker, RangeDatePicker, SingleDatePicker } f
15
15
  export { Divider } from './Divider/index.js';
16
16
  export { Drawer } from './Drawer/index.js';
17
17
  export { Dropdown } from './Dropdown/index.js';
18
+ export { default as Editor, EditorProps, EditorToolbarItem } from './Editor/index.js';
18
19
  export { EmptyState } from './EmptyState/index.js';
19
20
  export { FileUpload } from './FileUpload/index.js';
20
21
  export { HtmlTypewriter } from './HtmlTypeWriter/index.js';