@box/blueprint-web 17.22.1 → 17.22.3

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.
@@ -8553,7 +8553,7 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8553
8553
  display:inline;
8554
8554
  }
8555
8555
 
8556
- .bp_modal_module_overlay--0e889{
8556
+ .bp_modal_module_overlay--aa987{
8557
8557
  --modal-overlay-background:var(--bp-overlay-modal-overlay);
8558
8558
  --modal-content-background:var(--bp-surface-modal-surface);
8559
8559
  --modal-min-width-non-fullscreen:calc(460px - var(--bp-space-080)*2);
@@ -8579,6 +8579,8 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8579
8579
  --modal-back-button-margin-inline-start:var(--bp-space-040);
8580
8580
  --modal-back-button-size-non-fullscreen:var(--bp-size-100);
8581
8581
  --modal-title-gap:var(--bp-space-020);
8582
+ --modal-title-addon-gap:var(--bp-space-010);
8583
+ --modal-title-inline-gap:var(--bp-space-030);
8582
8584
  --modal-title-padding:var(--bp-space-050) var(--bp-space-120) var(--bp-space-050) var(--bp-space-040);
8583
8585
  --modal-title-padding-non-fullscreen:var(--bp-space-060) var(--bp-space-160) var(--bp-space-060) var(--bp-space-060);
8584
8586
  --modal-body-padding-fullscreen:var(--bp-space-020) var(--bp-space-040) var(--bp-space-040) var(--bp-space-040);
@@ -8599,15 +8601,15 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8599
8601
  z-index:var(--z-index-modal);
8600
8602
  }
8601
8603
  @media (width > 459px){
8602
- .bp_modal_module_overlay--0e889{
8604
+ .bp_modal_module_overlay--aa987{
8603
8605
  place-items:center;
8604
8606
  }
8605
8607
  }
8606
8608
 
8607
- .bp_modal_module_headerDividerLine--0e889{
8609
+ .bp_modal_module_headerDividerLine--aa987{
8608
8610
  position:relative;
8609
8611
  }
8610
- .bp_modal_module_headerDividerLine--0e889::after{
8612
+ .bp_modal_module_headerDividerLine--aa987::after{
8611
8613
  border-bottom:var(--modal-divider-line-border);
8612
8614
  bottom:0;
8613
8615
  content:"";
@@ -8616,16 +8618,16 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8616
8618
  right:var(--modal-divider-line-offset-right);
8617
8619
  }
8618
8620
  @media (width > 459px){
8619
- .bp_modal_module_headerDividerLine--0e889::after{
8621
+ .bp_modal_module_headerDividerLine--aa987::after{
8620
8622
  left:var(--modal-divider-line-offset-left-non-fullscreen);
8621
8623
  right:var(--modal-divider-line-offset-right-non-fullscreen);
8622
8624
  }
8623
8625
  }
8624
8626
 
8625
- .bp_modal_module_footerDividerLine--0e889{
8627
+ .bp_modal_module_footerDividerLine--aa987{
8626
8628
  position:relative;
8627
8629
  }
8628
- .bp_modal_module_footerDividerLine--0e889::before{
8630
+ .bp_modal_module_footerDividerLine--aa987::before{
8629
8631
  border-bottom:var(--modal-divider-line-border);
8630
8632
  content:"";
8631
8633
  left:var(--modal-divider-line-offset-left);
@@ -8634,13 +8636,13 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8634
8636
  top:0;
8635
8637
  }
8636
8638
  @media (width > 459px){
8637
- .bp_modal_module_footerDividerLine--0e889::before{
8639
+ .bp_modal_module_footerDividerLine--aa987::before{
8638
8640
  left:var(--modal-divider-line-offset-left-non-fullscreen);
8639
8641
  right:var(--modal-divider-line-offset-right-non-fullscreen);
8640
8642
  }
8641
8643
  }
8642
8644
 
8643
- .bp_modal_module_content--0e889{
8645
+ .bp_modal_module_content--aa987{
8644
8646
  display:flex;
8645
8647
  flex-direction:column;
8646
8648
  height:100vh;
@@ -8648,15 +8650,15 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8648
8650
  position:relative;
8649
8651
  }
8650
8652
  @media (width > 374px){
8651
- .bp_modal_module_content--0e889{
8653
+ .bp_modal_module_content--aa987{
8652
8654
  overflow:hidden;
8653
8655
  }
8654
8656
  }
8655
- .bp_modal_module_content--0e889{
8657
+ .bp_modal_module_content--aa987{
8656
8658
  background-color:var(--modal-content-background);
8657
8659
  }
8658
8660
  @media (width > 459px){
8659
- .bp_modal_module_content--0e889{
8661
+ .bp_modal_module_content--aa987{
8660
8662
  border-radius:var(--modal-border-radius);
8661
8663
  height:auto;
8662
8664
  margin:var(--modal-margin);
@@ -8664,97 +8666,97 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8664
8666
  min-width:var(--modal-min-width-non-fullscreen);
8665
8667
  transition:max-width var(--modal-loading-animation), max-height var(--modal-loading-animation);
8666
8668
  }
8667
- .bp_modal_module_content--0e889.bp_modal_module_smallSizeModal--0e889{
8669
+ .bp_modal_module_content--aa987.bp_modal_module_smallSizeModal--aa987{
8668
8670
  max-width:var(--modal-max-width-small);
8669
8671
  }
8670
- .bp_modal_module_content--0e889.bp_modal_module_mediumSizeModal--0e889{
8672
+ .bp_modal_module_content--aa987.bp_modal_module_mediumSizeModal--aa987{
8671
8673
  max-width:var(--modal-max-width-medium);
8672
8674
  }
8673
- .bp_modal_module_content--0e889.bp_modal_module_largeSizeModal--0e889{
8675
+ .bp_modal_module_content--aa987.bp_modal_module_largeSizeModal--aa987{
8674
8676
  max-width:var(--modal-max-width-large);
8675
8677
  }
8676
- .bp_modal_module_content--0e889.bp_modal_module_xlargeSizeModal--0e889{
8678
+ .bp_modal_module_content--aa987.bp_modal_module_xlargeSizeModal--aa987{
8677
8679
  max-width:var(--modal-max-width-xlarge);
8678
8680
  }
8679
8681
  }
8680
- .bp_modal_module_content--0e889:has(.bp_modal_module_loadingContainerActive--0e889) .bp_modal_module_footerDividerLine--0e889::before,.bp_modal_module_content--0e889:has(.bp_modal_module_loadingContainerActive--0e889) .bp_modal_module_headerDividerLine--0e889::after{
8682
+ .bp_modal_module_content--aa987:has(.bp_modal_module_loadingContainerActive--aa987) .bp_modal_module_footerDividerLine--aa987::before,.bp_modal_module_content--aa987:has(.bp_modal_module_loadingContainerActive--aa987) .bp_modal_module_headerDividerLine--aa987::after{
8681
8683
  display:none;
8682
8684
  }
8683
8685
  @media (width > 459px){
8684
- .bp_modal_module_content--0e889:has(.bp_modal_module_loadingContainerActive--0e889){
8686
+ .bp_modal_module_content--aa987:has(.bp_modal_module_loadingContainerActive--aa987){
8685
8687
  max-height:var(--modal-max-height-loading);
8686
8688
  max-width:var(--modal-max-width-loading);
8687
8689
  }
8688
8690
  }
8689
8691
 
8690
- .bp_modal_module_overlay--0e889 .bp_modal_module_content--0e889[data-bp-animated=false]{
8691
- animation:bp_modal_module_popup_bounce_in--0e889 var(--animation-duration-3);
8692
+ .bp_modal_module_overlay--aa987 .bp_modal_module_content--aa987[data-bp-animated=false]{
8693
+ animation:bp_modal_module_popup_bounce_in--aa987 var(--animation-duration-3);
8692
8694
  }
8693
8695
 
8694
- .bp_modal_module_overlay--0e889 .bp_modal_module_content--0e889[data-bp-animated=true][data-state=open]{
8696
+ .bp_modal_module_overlay--aa987 .bp_modal_module_content--aa987[data-bp-animated=true][data-state=open]{
8695
8697
  animation-duration:var(--bp-duration-long);
8696
8698
  animation-fill-mode:backwards;
8697
- animation-name:bp_modal_module_bpModalEnter--0e889;
8699
+ animation-name:bp_modal_module_bpModalEnter--aa987;
8698
8700
  animation-timing-function:var(--bp-curve-large-on);
8699
8701
  }
8700
8702
 
8701
- .bp_modal_module_overlay--0e889 .bp_modal_module_content--0e889[data-bp-animated=true][data-state=closed],.bp_modal_module_overlay--0e889[data-bp-animated=true][data-state=closed]{
8703
+ .bp_modal_module_overlay--aa987 .bp_modal_module_content--aa987[data-bp-animated=true][data-state=closed],.bp_modal_module_overlay--aa987[data-bp-animated=true][data-state=closed]{
8702
8704
  animation-duration:var(--bp-duration-medium);
8703
8705
  animation-fill-mode:forwards;
8704
- animation-name:bp_modal_module_bpModalExit--0e889;
8706
+ animation-name:bp_modal_module_bpModalExit--aa987;
8705
8707
  animation-timing-function:var(--bp-curve-large-off);
8706
8708
  }
8707
8709
 
8708
- .bp_modal_module_scrollableContainer--0e889{
8710
+ .bp_modal_module_scrollableContainer--aa987{
8709
8711
  flex-grow:1;
8710
8712
  }
8711
8713
  @media (width > 374px){
8712
- .bp_modal_module_scrollableContainer--0e889{
8714
+ .bp_modal_module_scrollableContainer--aa987{
8713
8715
  overflow-y:auto;
8714
8716
  }
8715
8717
  }
8716
8718
 
8717
- .bp_modal_module_content--0e889 .bp_modal_module_close--0e889{
8719
+ .bp_modal_module_content--aa987 .bp_modal_module_close--aa987{
8718
8720
  position:fixed;
8719
8721
  }
8720
8722
  @media (width > 374px){
8721
- .bp_modal_module_content--0e889 .bp_modal_module_close--0e889{
8723
+ .bp_modal_module_content--aa987 .bp_modal_module_close--aa987{
8722
8724
  position:absolute;
8723
8725
  }
8724
8726
  }
8725
- .bp_modal_module_content--0e889 .bp_modal_module_close--0e889{
8727
+ .bp_modal_module_content--aa987 .bp_modal_module_close--aa987{
8726
8728
  color:var(--modal-close-button-color);
8727
8729
  right:var(--modal-close-button-offset-right);
8728
8730
  top:var(--modal-close-button-offset-top);
8729
8731
  }
8730
8732
 
8731
- .bp_modal_module_close--0e889.bp_modal_module_onColor--0e889{
8733
+ .bp_modal_module_close--aa987.bp_modal_module_onColor--aa987{
8732
8734
  background-color:var(--modal-close-button-on-color-background);
8733
8735
  }
8734
- .bp_modal_module_close--0e889.bp_modal_module_onColor--0e889:hover{
8736
+ .bp_modal_module_close--aa987.bp_modal_module_onColor--aa987:hover{
8735
8737
  background-color:var(--modal-close-button-on-color-background-hover);
8736
8738
  }
8737
- .bp_modal_module_close--0e889.bp_modal_module_onColor--0e889:active{
8739
+ .bp_modal_module_close--aa987.bp_modal_module_onColor--aa987:active{
8738
8740
  background-color:var(--modal-close-button-on-color-background-pressed);
8739
8741
  }
8740
8742
 
8741
- .bp_modal_module_content--0e889 .bp_modal_module_backButton--0e889{
8743
+ .bp_modal_module_content--aa987 .bp_modal_module_backButton--aa987{
8742
8744
  color:var(--modal-back-button-color);
8743
8745
  margin-block-start:var(--modal-back-button-margin-top-start);
8744
8746
  margin-inline-start:var(--modal-back-button-margin-inline-start);
8745
8747
  }
8746
8748
  @media (width > 459px){
8747
- .bp_modal_module_content--0e889 .bp_modal_module_backButton--0e889{
8749
+ .bp_modal_module_content--aa987 .bp_modal_module_backButton--aa987{
8748
8750
  height:var(--modal-back-button-size-non-fullscreen);
8749
8751
  width:var(--modal-back-button-size-non-fullscreen);
8750
8752
  }
8751
8753
  }
8752
8754
 
8753
- .bp_modal_module_modalHeader--0e889{
8755
+ .bp_modal_module_modalHeader--aa987{
8754
8756
  display:flex;
8755
8757
  }
8756
8758
 
8757
- .bp_modal_module_modalTitle--0e889{
8759
+ .bp_modal_module_modalTitle--aa987{
8758
8760
  display:flex;
8759
8761
  flex-direction:column;
8760
8762
  gap:var(--modal-title-gap);
@@ -8762,83 +8764,131 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8762
8764
  padding:var(--modal-title-padding);
8763
8765
  }
8764
8766
  @media (width > 459px){
8765
- .bp_modal_module_modalTitle--0e889{
8767
+ .bp_modal_module_modalTitle--aa987{
8766
8768
  padding:var(--modal-title-padding-non-fullscreen);
8767
8769
  }
8768
8770
  }
8769
8771
 
8770
- .bp_modal_module_body--0e889{
8772
+ .bp_modal_module_modalHeaderWithAddon--aa987{
8773
+ container-name:modal-header;
8774
+ container-type:inline-size;
8775
+ }
8776
+
8777
+ .bp_modal_module_modalTitleWithAddon--aa987{
8778
+ align-items:center;
8779
+ flex-flow:row wrap;
8780
+ gap:var(--modal-title-addon-gap) var(--modal-title-inline-gap);
8781
+ min-width:0;
8782
+ width:100%;
8783
+ }
8784
+
8785
+ .bp_modal_module_modalTitleLabel--aa987{
8786
+ display:flex;
8787
+ flex-direction:column;
8788
+ gap:var(--modal-title-gap);
8789
+ max-width:100%;
8790
+ min-width:0;
8791
+ }
8792
+
8793
+ .bp_modal_module_modalTitleAddon--aa987{
8794
+ flex-shrink:0;
8795
+ max-width:100%;
8796
+ }
8797
+
8798
+ .bp_modal_module_modalTitleText--aa987{
8799
+ -webkit-box-orient:vertical;
8800
+ -webkit-line-clamp:1;
8801
+ display:-webkit-box;
8802
+ overflow:hidden;
8803
+ }
8804
+
8805
+ .bp_modal_module_modalTitleWithSubtitle--aa987 > *{
8806
+ flex-basis:100%;
8807
+ }
8808
+
8809
+ @container modal-header (max-width: 759px){
8810
+ .bp_modal_module_modalTitleWithAddon--aa987 > *{
8811
+ flex-basis:100%;
8812
+ }
8813
+ .bp_modal_module_modalTitleText--aa987{
8814
+ -webkit-box-orient:vertical;
8815
+ -webkit-line-clamp:2;
8816
+ display:-webkit-box;
8817
+ overflow:hidden;
8818
+ }
8819
+ }
8820
+ .bp_modal_module_body--aa987{
8771
8821
  color:var(--modal-body-text-color);
8772
8822
  padding:var(--modal-body-padding-fullscreen);
8773
8823
  }
8774
8824
  @media (width > 459px){
8775
- .bp_modal_module_body--0e889{
8825
+ .bp_modal_module_body--aa987{
8776
8826
  padding:var(--modal-body-padding-non-fullscreen);
8777
8827
  }
8778
8828
  }
8779
8829
 
8780
- .bp_modal_module_footer--0e889{
8830
+ .bp_modal_module_footer--aa987{
8781
8831
  display:flex;
8782
8832
  justify-content:flex-end;
8783
8833
  padding:var(--modal-footer-padding);
8784
8834
  }
8785
8835
  @media (width > 459px){
8786
- .bp_modal_module_footer--0e889{
8836
+ .bp_modal_module_footer--aa987{
8787
8837
  padding:var(--modal-footer-padding-non-fullscreen);
8788
8838
  }
8789
8839
  }
8790
- .bp_modal_module_footer--0e889 .bp_modal_module_footerButton--0e889{
8840
+ .bp_modal_module_footer--aa987 .bp_modal_module_footerButton--aa987{
8791
8841
  cursor:pointer;
8792
8842
  }
8793
8843
 
8794
- .bp_modal_module_footerButton--0e889 + .bp_modal_module_footerButton--0e889{
8844
+ .bp_modal_module_footerButton--aa987 + .bp_modal_module_footerButton--aa987{
8795
8845
  margin-inline-start:var(--modal-footer-button-margin-inline-start);
8796
8846
  }
8797
8847
 
8798
- .bp_modal_module_loadingContainer--0e889{
8848
+ .bp_modal_module_loadingContainer--aa987{
8799
8849
  display:flex;
8800
8850
  flex-direction:column;
8801
8851
  flex-grow:1;
8802
8852
  position:relative;
8803
8853
  }
8804
8854
  @media (width > 374px){
8805
- .bp_modal_module_loadingContainer--0e889{
8855
+ .bp_modal_module_loadingContainer--aa987{
8806
8856
  min-height:0;
8807
8857
  }
8808
8858
  }
8809
8859
 
8810
- .bp_modal_module_loadingContainerActive--0e889{
8860
+ .bp_modal_module_loadingContainerActive--aa987{
8811
8861
  overflow:hidden;
8812
8862
  }
8813
8863
 
8814
- .bp_modal_module_loading--0e889{
8864
+ .bp_modal_module_loading--aa987{
8815
8865
  align-items:center;
8816
8866
  display:flex;
8817
8867
  }
8818
8868
 
8819
- .bp_modal_module_loadingOverlay--0e889{
8869
+ .bp_modal_module_loadingOverlay--aa987{
8820
8870
  background-color:var(--modal-content-background);
8821
8871
  inset:0;
8822
8872
  position:absolute;
8823
8873
  z-index:1;
8824
8874
  }
8825
8875
 
8826
- .bp_modal_module_loadingContent--0e889{
8876
+ .bp_modal_module_loadingContent--aa987{
8827
8877
  display:flex;
8828
8878
  flex-direction:column;
8829
8879
  visibility:hidden;
8830
8880
  }
8831
8881
  @media (width > 374px){
8832
- .bp_modal_module_loadingContent--0e889{
8882
+ .bp_modal_module_loadingContent--aa987{
8833
8883
  min-height:0;
8834
8884
  }
8835
8885
  }
8836
8886
 
8837
- .bp_modal_module_loadingContentVisible--0e889{
8887
+ .bp_modal_module_loadingContentVisible--aa987{
8838
8888
  visibility:visible;
8839
8889
  }
8840
8890
 
8841
- @keyframes bp_modal_module_popup_bounce_in--0e889{
8891
+ @keyframes bp_modal_module_popup_bounce_in--aa987{
8842
8892
  0%{
8843
8893
  transform:scale3d(.1, .1, 1);
8844
8894
  }
@@ -8846,7 +8896,7 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8846
8896
  transform:scaleX(1);
8847
8897
  }
8848
8898
  }
8849
- @keyframes bp_modal_module_bpModalEnter--0e889{
8899
+ @keyframes bp_modal_module_bpModalEnter--aa987{
8850
8900
  from{
8851
8901
  opacity:var(--bp-opacity-hidden);
8852
8902
  transform:translateY(var(--bp-space-040)) scale(var(--bp-scale-small));
@@ -8856,7 +8906,7 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8856
8906
  transform:translateY(0) scale(var(--bp-scale-default));
8857
8907
  }
8858
8908
  }
8859
- @keyframes bp_modal_module_bpModalExit--0e889{
8909
+ @keyframes bp_modal_module_bpModalExit--aa987{
8860
8910
  from{
8861
8911
  opacity:var(--bp-opacity-visible);
8862
8912
  }
@@ -8553,7 +8553,7 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8553
8553
  display:inline;
8554
8554
  }
8555
8555
 
8556
- .bp_modal_module_overlay--0e889{
8556
+ .bp_modal_module_overlay--aa987{
8557
8557
  --modal-overlay-background:var(--bp-overlay-modal-overlay);
8558
8558
  --modal-content-background:var(--bp-surface-modal-surface);
8559
8559
  --modal-min-width-non-fullscreen:calc(460px - var(--bp-space-080)*2);
@@ -8579,6 +8579,8 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8579
8579
  --modal-back-button-margin-inline-start:var(--bp-space-040);
8580
8580
  --modal-back-button-size-non-fullscreen:var(--bp-size-100);
8581
8581
  --modal-title-gap:var(--bp-space-020);
8582
+ --modal-title-addon-gap:var(--bp-space-010);
8583
+ --modal-title-inline-gap:var(--bp-space-030);
8582
8584
  --modal-title-padding:var(--bp-space-050) var(--bp-space-120) var(--bp-space-050) var(--bp-space-040);
8583
8585
  --modal-title-padding-non-fullscreen:var(--bp-space-060) var(--bp-space-160) var(--bp-space-060) var(--bp-space-060);
8584
8586
  --modal-body-padding-fullscreen:var(--bp-space-020) var(--bp-space-040) var(--bp-space-040) var(--bp-space-040);
@@ -8599,15 +8601,15 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8599
8601
  z-index:var(--z-index-modal);
8600
8602
  }
8601
8603
  @media (width > 459px){
8602
- .bp_modal_module_overlay--0e889{
8604
+ .bp_modal_module_overlay--aa987{
8603
8605
  place-items:center;
8604
8606
  }
8605
8607
  }
8606
8608
 
8607
- .bp_modal_module_headerDividerLine--0e889{
8609
+ .bp_modal_module_headerDividerLine--aa987{
8608
8610
  position:relative;
8609
8611
  }
8610
- .bp_modal_module_headerDividerLine--0e889::after{
8612
+ .bp_modal_module_headerDividerLine--aa987::after{
8611
8613
  border-bottom:var(--modal-divider-line-border);
8612
8614
  bottom:0;
8613
8615
  content:"";
@@ -8616,16 +8618,16 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8616
8618
  right:var(--modal-divider-line-offset-right);
8617
8619
  }
8618
8620
  @media (width > 459px){
8619
- .bp_modal_module_headerDividerLine--0e889::after{
8621
+ .bp_modal_module_headerDividerLine--aa987::after{
8620
8622
  left:var(--modal-divider-line-offset-left-non-fullscreen);
8621
8623
  right:var(--modal-divider-line-offset-right-non-fullscreen);
8622
8624
  }
8623
8625
  }
8624
8626
 
8625
- .bp_modal_module_footerDividerLine--0e889{
8627
+ .bp_modal_module_footerDividerLine--aa987{
8626
8628
  position:relative;
8627
8629
  }
8628
- .bp_modal_module_footerDividerLine--0e889::before{
8630
+ .bp_modal_module_footerDividerLine--aa987::before{
8629
8631
  border-bottom:var(--modal-divider-line-border);
8630
8632
  content:"";
8631
8633
  left:var(--modal-divider-line-offset-left);
@@ -8634,13 +8636,13 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8634
8636
  top:0;
8635
8637
  }
8636
8638
  @media (width > 459px){
8637
- .bp_modal_module_footerDividerLine--0e889::before{
8639
+ .bp_modal_module_footerDividerLine--aa987::before{
8638
8640
  left:var(--modal-divider-line-offset-left-non-fullscreen);
8639
8641
  right:var(--modal-divider-line-offset-right-non-fullscreen);
8640
8642
  }
8641
8643
  }
8642
8644
 
8643
- .bp_modal_module_content--0e889{
8645
+ .bp_modal_module_content--aa987{
8644
8646
  display:flex;
8645
8647
  flex-direction:column;
8646
8648
  height:100vh;
@@ -8648,15 +8650,15 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8648
8650
  position:relative;
8649
8651
  }
8650
8652
  @media (width > 374px){
8651
- .bp_modal_module_content--0e889{
8653
+ .bp_modal_module_content--aa987{
8652
8654
  overflow:hidden;
8653
8655
  }
8654
8656
  }
8655
- .bp_modal_module_content--0e889{
8657
+ .bp_modal_module_content--aa987{
8656
8658
  background-color:var(--modal-content-background);
8657
8659
  }
8658
8660
  @media (width > 459px){
8659
- .bp_modal_module_content--0e889{
8661
+ .bp_modal_module_content--aa987{
8660
8662
  border-radius:var(--modal-border-radius);
8661
8663
  height:auto;
8662
8664
  margin:var(--modal-margin);
@@ -8664,97 +8666,97 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8664
8666
  min-width:var(--modal-min-width-non-fullscreen);
8665
8667
  transition:max-width var(--modal-loading-animation), max-height var(--modal-loading-animation);
8666
8668
  }
8667
- .bp_modal_module_content--0e889.bp_modal_module_smallSizeModal--0e889{
8669
+ .bp_modal_module_content--aa987.bp_modal_module_smallSizeModal--aa987{
8668
8670
  max-width:var(--modal-max-width-small);
8669
8671
  }
8670
- .bp_modal_module_content--0e889.bp_modal_module_mediumSizeModal--0e889{
8672
+ .bp_modal_module_content--aa987.bp_modal_module_mediumSizeModal--aa987{
8671
8673
  max-width:var(--modal-max-width-medium);
8672
8674
  }
8673
- .bp_modal_module_content--0e889.bp_modal_module_largeSizeModal--0e889{
8675
+ .bp_modal_module_content--aa987.bp_modal_module_largeSizeModal--aa987{
8674
8676
  max-width:var(--modal-max-width-large);
8675
8677
  }
8676
- .bp_modal_module_content--0e889.bp_modal_module_xlargeSizeModal--0e889{
8678
+ .bp_modal_module_content--aa987.bp_modal_module_xlargeSizeModal--aa987{
8677
8679
  max-width:var(--modal-max-width-xlarge);
8678
8680
  }
8679
8681
  }
8680
- .bp_modal_module_content--0e889:has(.bp_modal_module_loadingContainerActive--0e889) .bp_modal_module_footerDividerLine--0e889::before,.bp_modal_module_content--0e889:has(.bp_modal_module_loadingContainerActive--0e889) .bp_modal_module_headerDividerLine--0e889::after{
8682
+ .bp_modal_module_content--aa987:has(.bp_modal_module_loadingContainerActive--aa987) .bp_modal_module_footerDividerLine--aa987::before,.bp_modal_module_content--aa987:has(.bp_modal_module_loadingContainerActive--aa987) .bp_modal_module_headerDividerLine--aa987::after{
8681
8683
  display:none;
8682
8684
  }
8683
8685
  @media (width > 459px){
8684
- .bp_modal_module_content--0e889:has(.bp_modal_module_loadingContainerActive--0e889){
8686
+ .bp_modal_module_content--aa987:has(.bp_modal_module_loadingContainerActive--aa987){
8685
8687
  max-height:var(--modal-max-height-loading);
8686
8688
  max-width:var(--modal-max-width-loading);
8687
8689
  }
8688
8690
  }
8689
8691
 
8690
- .bp_modal_module_overlay--0e889 .bp_modal_module_content--0e889[data-bp-animated=false]{
8691
- animation:bp_modal_module_popup_bounce_in--0e889 var(--animation-duration-3);
8692
+ .bp_modal_module_overlay--aa987 .bp_modal_module_content--aa987[data-bp-animated=false]{
8693
+ animation:bp_modal_module_popup_bounce_in--aa987 var(--animation-duration-3);
8692
8694
  }
8693
8695
 
8694
- .bp_modal_module_overlay--0e889 .bp_modal_module_content--0e889[data-bp-animated=true][data-state=open]{
8696
+ .bp_modal_module_overlay--aa987 .bp_modal_module_content--aa987[data-bp-animated=true][data-state=open]{
8695
8697
  animation-duration:var(--bp-duration-long);
8696
8698
  animation-fill-mode:backwards;
8697
- animation-name:bp_modal_module_bpModalEnter--0e889;
8699
+ animation-name:bp_modal_module_bpModalEnter--aa987;
8698
8700
  animation-timing-function:var(--bp-curve-large-on);
8699
8701
  }
8700
8702
 
8701
- .bp_modal_module_overlay--0e889 .bp_modal_module_content--0e889[data-bp-animated=true][data-state=closed],.bp_modal_module_overlay--0e889[data-bp-animated=true][data-state=closed]{
8703
+ .bp_modal_module_overlay--aa987 .bp_modal_module_content--aa987[data-bp-animated=true][data-state=closed],.bp_modal_module_overlay--aa987[data-bp-animated=true][data-state=closed]{
8702
8704
  animation-duration:var(--bp-duration-medium);
8703
8705
  animation-fill-mode:forwards;
8704
- animation-name:bp_modal_module_bpModalExit--0e889;
8706
+ animation-name:bp_modal_module_bpModalExit--aa987;
8705
8707
  animation-timing-function:var(--bp-curve-large-off);
8706
8708
  }
8707
8709
 
8708
- .bp_modal_module_scrollableContainer--0e889{
8710
+ .bp_modal_module_scrollableContainer--aa987{
8709
8711
  flex-grow:1;
8710
8712
  }
8711
8713
  @media (width > 374px){
8712
- .bp_modal_module_scrollableContainer--0e889{
8714
+ .bp_modal_module_scrollableContainer--aa987{
8713
8715
  overflow-y:auto;
8714
8716
  }
8715
8717
  }
8716
8718
 
8717
- .bp_modal_module_content--0e889 .bp_modal_module_close--0e889{
8719
+ .bp_modal_module_content--aa987 .bp_modal_module_close--aa987{
8718
8720
  position:fixed;
8719
8721
  }
8720
8722
  @media (width > 374px){
8721
- .bp_modal_module_content--0e889 .bp_modal_module_close--0e889{
8723
+ .bp_modal_module_content--aa987 .bp_modal_module_close--aa987{
8722
8724
  position:absolute;
8723
8725
  }
8724
8726
  }
8725
- .bp_modal_module_content--0e889 .bp_modal_module_close--0e889{
8727
+ .bp_modal_module_content--aa987 .bp_modal_module_close--aa987{
8726
8728
  color:var(--modal-close-button-color);
8727
8729
  right:var(--modal-close-button-offset-right);
8728
8730
  top:var(--modal-close-button-offset-top);
8729
8731
  }
8730
8732
 
8731
- .bp_modal_module_close--0e889.bp_modal_module_onColor--0e889{
8733
+ .bp_modal_module_close--aa987.bp_modal_module_onColor--aa987{
8732
8734
  background-color:var(--modal-close-button-on-color-background);
8733
8735
  }
8734
- .bp_modal_module_close--0e889.bp_modal_module_onColor--0e889:hover{
8736
+ .bp_modal_module_close--aa987.bp_modal_module_onColor--aa987:hover{
8735
8737
  background-color:var(--modal-close-button-on-color-background-hover);
8736
8738
  }
8737
- .bp_modal_module_close--0e889.bp_modal_module_onColor--0e889:active{
8739
+ .bp_modal_module_close--aa987.bp_modal_module_onColor--aa987:active{
8738
8740
  background-color:var(--modal-close-button-on-color-background-pressed);
8739
8741
  }
8740
8742
 
8741
- .bp_modal_module_content--0e889 .bp_modal_module_backButton--0e889{
8743
+ .bp_modal_module_content--aa987 .bp_modal_module_backButton--aa987{
8742
8744
  color:var(--modal-back-button-color);
8743
8745
  margin-block-start:var(--modal-back-button-margin-top-start);
8744
8746
  margin-inline-start:var(--modal-back-button-margin-inline-start);
8745
8747
  }
8746
8748
  @media (width > 459px){
8747
- .bp_modal_module_content--0e889 .bp_modal_module_backButton--0e889{
8749
+ .bp_modal_module_content--aa987 .bp_modal_module_backButton--aa987{
8748
8750
  height:var(--modal-back-button-size-non-fullscreen);
8749
8751
  width:var(--modal-back-button-size-non-fullscreen);
8750
8752
  }
8751
8753
  }
8752
8754
 
8753
- .bp_modal_module_modalHeader--0e889{
8755
+ .bp_modal_module_modalHeader--aa987{
8754
8756
  display:flex;
8755
8757
  }
8756
8758
 
8757
- .bp_modal_module_modalTitle--0e889{
8759
+ .bp_modal_module_modalTitle--aa987{
8758
8760
  display:flex;
8759
8761
  flex-direction:column;
8760
8762
  gap:var(--modal-title-gap);
@@ -8762,83 +8764,131 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8762
8764
  padding:var(--modal-title-padding);
8763
8765
  }
8764
8766
  @media (width > 459px){
8765
- .bp_modal_module_modalTitle--0e889{
8767
+ .bp_modal_module_modalTitle--aa987{
8766
8768
  padding:var(--modal-title-padding-non-fullscreen);
8767
8769
  }
8768
8770
  }
8769
8771
 
8770
- .bp_modal_module_body--0e889{
8772
+ .bp_modal_module_modalHeaderWithAddon--aa987{
8773
+ container-name:modal-header;
8774
+ container-type:inline-size;
8775
+ }
8776
+
8777
+ .bp_modal_module_modalTitleWithAddon--aa987{
8778
+ align-items:center;
8779
+ flex-flow:row wrap;
8780
+ gap:var(--modal-title-addon-gap) var(--modal-title-inline-gap);
8781
+ min-width:0;
8782
+ width:100%;
8783
+ }
8784
+
8785
+ .bp_modal_module_modalTitleLabel--aa987{
8786
+ display:flex;
8787
+ flex-direction:column;
8788
+ gap:var(--modal-title-gap);
8789
+ max-width:100%;
8790
+ min-width:0;
8791
+ }
8792
+
8793
+ .bp_modal_module_modalTitleAddon--aa987{
8794
+ flex-shrink:0;
8795
+ max-width:100%;
8796
+ }
8797
+
8798
+ .bp_modal_module_modalTitleText--aa987{
8799
+ -webkit-box-orient:vertical;
8800
+ -webkit-line-clamp:1;
8801
+ display:-webkit-box;
8802
+ overflow:hidden;
8803
+ }
8804
+
8805
+ .bp_modal_module_modalTitleWithSubtitle--aa987 > *{
8806
+ flex-basis:100%;
8807
+ }
8808
+
8809
+ @container modal-header (max-width: 759px){
8810
+ .bp_modal_module_modalTitleWithAddon--aa987 > *{
8811
+ flex-basis:100%;
8812
+ }
8813
+ .bp_modal_module_modalTitleText--aa987{
8814
+ -webkit-box-orient:vertical;
8815
+ -webkit-line-clamp:2;
8816
+ display:-webkit-box;
8817
+ overflow:hidden;
8818
+ }
8819
+ }
8820
+ .bp_modal_module_body--aa987{
8771
8821
  color:var(--modal-body-text-color);
8772
8822
  padding:var(--modal-body-padding-fullscreen);
8773
8823
  }
8774
8824
  @media (width > 459px){
8775
- .bp_modal_module_body--0e889{
8825
+ .bp_modal_module_body--aa987{
8776
8826
  padding:var(--modal-body-padding-non-fullscreen);
8777
8827
  }
8778
8828
  }
8779
8829
 
8780
- .bp_modal_module_footer--0e889{
8830
+ .bp_modal_module_footer--aa987{
8781
8831
  display:flex;
8782
8832
  justify-content:flex-end;
8783
8833
  padding:var(--modal-footer-padding);
8784
8834
  }
8785
8835
  @media (width > 459px){
8786
- .bp_modal_module_footer--0e889{
8836
+ .bp_modal_module_footer--aa987{
8787
8837
  padding:var(--modal-footer-padding-non-fullscreen);
8788
8838
  }
8789
8839
  }
8790
- .bp_modal_module_footer--0e889 .bp_modal_module_footerButton--0e889{
8840
+ .bp_modal_module_footer--aa987 .bp_modal_module_footerButton--aa987{
8791
8841
  cursor:pointer;
8792
8842
  }
8793
8843
 
8794
- .bp_modal_module_footerButton--0e889 + .bp_modal_module_footerButton--0e889{
8844
+ .bp_modal_module_footerButton--aa987 + .bp_modal_module_footerButton--aa987{
8795
8845
  margin-inline-start:var(--modal-footer-button-margin-inline-start);
8796
8846
  }
8797
8847
 
8798
- .bp_modal_module_loadingContainer--0e889{
8848
+ .bp_modal_module_loadingContainer--aa987{
8799
8849
  display:flex;
8800
8850
  flex-direction:column;
8801
8851
  flex-grow:1;
8802
8852
  position:relative;
8803
8853
  }
8804
8854
  @media (width > 374px){
8805
- .bp_modal_module_loadingContainer--0e889{
8855
+ .bp_modal_module_loadingContainer--aa987{
8806
8856
  min-height:0;
8807
8857
  }
8808
8858
  }
8809
8859
 
8810
- .bp_modal_module_loadingContainerActive--0e889{
8860
+ .bp_modal_module_loadingContainerActive--aa987{
8811
8861
  overflow:hidden;
8812
8862
  }
8813
8863
 
8814
- .bp_modal_module_loading--0e889{
8864
+ .bp_modal_module_loading--aa987{
8815
8865
  align-items:center;
8816
8866
  display:flex;
8817
8867
  }
8818
8868
 
8819
- .bp_modal_module_loadingOverlay--0e889{
8869
+ .bp_modal_module_loadingOverlay--aa987{
8820
8870
  background-color:var(--modal-content-background);
8821
8871
  inset:0;
8822
8872
  position:absolute;
8823
8873
  z-index:1;
8824
8874
  }
8825
8875
 
8826
- .bp_modal_module_loadingContent--0e889{
8876
+ .bp_modal_module_loadingContent--aa987{
8827
8877
  display:flex;
8828
8878
  flex-direction:column;
8829
8879
  visibility:hidden;
8830
8880
  }
8831
8881
  @media (width > 374px){
8832
- .bp_modal_module_loadingContent--0e889{
8882
+ .bp_modal_module_loadingContent--aa987{
8833
8883
  min-height:0;
8834
8884
  }
8835
8885
  }
8836
8886
 
8837
- .bp_modal_module_loadingContentVisible--0e889{
8887
+ .bp_modal_module_loadingContentVisible--aa987{
8838
8888
  visibility:visible;
8839
8889
  }
8840
8890
 
8841
- @keyframes bp_modal_module_popup_bounce_in--0e889{
8891
+ @keyframes bp_modal_module_popup_bounce_in--aa987{
8842
8892
  0%{
8843
8893
  transform:scale3d(.1, .1, 1);
8844
8894
  }
@@ -8846,7 +8896,7 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8846
8896
  transform:scaleX(1);
8847
8897
  }
8848
8898
  }
8849
- @keyframes bp_modal_module_bpModalEnter--0e889{
8899
+ @keyframes bp_modal_module_bpModalEnter--aa987{
8850
8900
  from{
8851
8901
  opacity:var(--bp-opacity-hidden);
8852
8902
  transform:translateY(var(--bp-space-040)) scale(var(--bp-scale-small));
@@ -8856,7 +8906,7 @@ table.bp_inline_table_module_inlineTable--f26a1 tr:not(:last-child) td{
8856
8906
  transform:translateY(0) scale(var(--bp-scale-default));
8857
8907
  }
8858
8908
  }
8859
- @keyframes bp_modal_module_bpModalExit--0e889{
8909
+ @keyframes bp_modal_module_bpModalExit--aa987{
8860
8910
  from{
8861
8911
  opacity:var(--bp-opacity-visible);
8862
8912
  }
@@ -1,4 +1,4 @@
1
1
  export { AlertModal } from './alert-modal';
2
2
  export type { AlertModalProps } from './alert-modal.types';
3
3
  export { Modal } from './modal';
4
- export type { ModalCloseProps, ModalContentProps, ModalLoadingProps, ModalProps, ModalTriggerProps } from './types';
4
+ export type { ModalCloseProps, ModalContentProps, ModalHeaderProps, ModalHeaderTitleAddonRenderProps, ModalLoadingProps, ModalProps, ModalTriggerProps, } from './types';
@@ -0,0 +1,5 @@
1
+ import { type ModalDescriptionProps } from './types';
2
+ /**
3
+ * An accessible description to be announced along with the modal title.
4
+ */
5
+ export declare const ModalDescription: import("react").ForwardRefExoticComponent<ModalDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
@@ -0,0 +1,17 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import * as RadixDialog from '@radix-ui/react-dialog';
3
+ import { forwardRef } from 'react';
4
+
5
+ /**
6
+ * An accessible description to be announced along with the modal title.
7
+ */
8
+ const ModalDescription = /*#__PURE__*/forwardRef(({
9
+ children,
10
+ ...props
11
+ }, forwardedRef) => jsx(RadixDialog.Description, {
12
+ ...props,
13
+ ref: forwardedRef,
14
+ children: children
15
+ }));
16
+
17
+ export { ModalDescription };
@@ -1,51 +1,98 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { forwardRef, cloneElement } from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { forwardRef, useRef, cloneElement } from 'react';
3
3
  import { clsx } from 'clsx';
4
4
  import { useScrollContext } from '../utils/scroll-context.js';
5
+ import { TooltipWrapper } from '../utils/TooltipWrapper.js';
6
+ import { useIsEllipsized } from '../utils/useIsEllipsized.js';
5
7
  import { Text } from '../text/text.js';
8
+ import { ModalDescription } from './modal-description.js';
6
9
  import { ModalTitle } from './modal-title.js';
7
10
  import styles from './modal.module.js';
8
11
 
12
+ /**
13
+ * Title clamped next to an addon. When it gets cut off, it becomes focusable and reveals the full title in a tooltip.
14
+ * Rendered only with an addon, so modals without one don't observe the title size.
15
+ */
16
+ const ModalHeaderTruncatableTitle = ({
17
+ children,
18
+ className
19
+ }) => {
20
+ const titleTextRef = useRef(null);
21
+ const isTitleEllipsized = useIsEllipsized(titleTextRef);
22
+ return jsx(TooltipWrapper, {
23
+ tooltipContent: children,
24
+ withTooltip: isTitleEllipsized,
25
+ children: jsx(Text, {
26
+ ref: titleTextRef,
27
+ as: "h2",
28
+ className: className,
29
+ color: "textOnLightDefault",
30
+ variant: "titleLarge",
31
+ children: children
32
+ })
33
+ });
34
+ };
9
35
  /**
10
36
  * Header of the Modal
11
37
  */
12
38
  const ModalHeader = /*#__PURE__*/forwardRef(({
39
+ backButton,
13
40
  children,
14
41
  className,
42
+ renderTitleAddon,
15
43
  subtitle,
16
- backButton,
17
44
  ...rest
18
45
  }, forwardedRef) => {
19
46
  const {
20
47
  isScrolledUnderHeader
21
48
  } = useScrollContext();
49
+ const titleContainerRef = useRef(null);
22
50
  const headerClasses = clsx({
23
- [styles.headerDividerLine]: isScrolledUnderHeader
51
+ [styles.headerDividerLine]: isScrolledUnderHeader,
52
+ [styles.modalHeaderWithAddon]: renderTitleAddon
24
53
  }, styles.modalHeader);
54
+ const title = jsx(ModalTitle, {
55
+ ...rest,
56
+ ref: forwardedRef,
57
+ asChild: true,
58
+ children: jsxs("div", {
59
+ className: renderTitleAddon ? styles.modalTitleLabel : styles.modalTitle,
60
+ children: [renderTitleAddon ? jsx(ModalHeaderTruncatableTitle, {
61
+ className: clsx(styles.modalTitleText, className),
62
+ children: children
63
+ }) : jsx(Text, {
64
+ as: "h2",
65
+ className: className,
66
+ color: "textOnLightDefault",
67
+ variant: "titleLarge",
68
+ children: children
69
+ }), subtitle && jsx(Text, {
70
+ as: "h3",
71
+ color: "textOnLightSecondary",
72
+ variant: "subtitle",
73
+ children: subtitle
74
+ })]
75
+ })
76
+ });
25
77
  return jsxs("div", {
26
78
  className: headerClasses,
27
79
  children: [backButton ? /*#__PURE__*/cloneElement(backButton, {
28
80
  className: styles.backButton
29
- }) : null, jsx(ModalTitle, {
30
- ...rest,
31
- ref: forwardedRef,
32
- asChild: true,
33
- children: jsxs("div", {
34
- className: styles.modalTitle,
35
- children: [jsx(Text, {
36
- as: "h2",
37
- className: className,
38
- color: "textOnLightDefault",
39
- variant: "titleLarge",
40
- children: children
41
- }), subtitle && jsx(Text, {
42
- as: "h3",
43
- color: "textOnLightSecondary",
44
- variant: "subtitle",
45
- children: subtitle
46
- })]
47
- })
48
- })]
81
+ }) : null, renderTitleAddon ? jsxs("div", {
82
+ ref: titleContainerRef,
83
+ className: clsx(styles.modalTitle, styles.modalTitleWithAddon, {
84
+ [styles.modalTitleWithSubtitle]: subtitle
85
+ }),
86
+ children: [title, jsx(ModalDescription, {
87
+ asChild: true,
88
+ children: jsx("div", {
89
+ className: styles.modalTitleAddon,
90
+ children: renderTitleAddon({
91
+ containerRef: titleContainerRef
92
+ })
93
+ })
94
+ })]
95
+ }) : title]
49
96
  });
50
97
  });
51
98
 
@@ -1,4 +1,4 @@
1
1
  import '../index.css';
2
- var styles = {"overlay":"bp_modal_module_overlay--0e889","headerDividerLine":"bp_modal_module_headerDividerLine--0e889","footerDividerLine":"bp_modal_module_footerDividerLine--0e889","content":"bp_modal_module_content--0e889","smallSizeModal":"bp_modal_module_smallSizeModal--0e889","mediumSizeModal":"bp_modal_module_mediumSizeModal--0e889","largeSizeModal":"bp_modal_module_largeSizeModal--0e889","xlargeSizeModal":"bp_modal_module_xlargeSizeModal--0e889","loadingContainerActive":"bp_modal_module_loadingContainerActive--0e889","popup_bounce_in":"bp_modal_module_popup_bounce_in--0e889","bpModalEnter":"bp_modal_module_bpModalEnter--0e889","bpModalExit":"bp_modal_module_bpModalExit--0e889","scrollableContainer":"bp_modal_module_scrollableContainer--0e889","close":"bp_modal_module_close--0e889","onColor":"bp_modal_module_onColor--0e889","backButton":"bp_modal_module_backButton--0e889","modalHeader":"bp_modal_module_modalHeader--0e889","modalTitle":"bp_modal_module_modalTitle--0e889","body":"bp_modal_module_body--0e889","footer":"bp_modal_module_footer--0e889","footerButton":"bp_modal_module_footerButton--0e889","loadingContainer":"bp_modal_module_loadingContainer--0e889","loading":"bp_modal_module_loading--0e889","loadingOverlay":"bp_modal_module_loadingOverlay--0e889","loadingContent":"bp_modal_module_loadingContent--0e889","loadingContentVisible":"bp_modal_module_loadingContentVisible--0e889"};
2
+ var styles = {"overlay":"bp_modal_module_overlay--aa987","headerDividerLine":"bp_modal_module_headerDividerLine--aa987","footerDividerLine":"bp_modal_module_footerDividerLine--aa987","content":"bp_modal_module_content--aa987","smallSizeModal":"bp_modal_module_smallSizeModal--aa987","mediumSizeModal":"bp_modal_module_mediumSizeModal--aa987","largeSizeModal":"bp_modal_module_largeSizeModal--aa987","xlargeSizeModal":"bp_modal_module_xlargeSizeModal--aa987","loadingContainerActive":"bp_modal_module_loadingContainerActive--aa987","popup_bounce_in":"bp_modal_module_popup_bounce_in--aa987","bpModalEnter":"bp_modal_module_bpModalEnter--aa987","bpModalExit":"bp_modal_module_bpModalExit--aa987","scrollableContainer":"bp_modal_module_scrollableContainer--aa987","close":"bp_modal_module_close--aa987","onColor":"bp_modal_module_onColor--aa987","backButton":"bp_modal_module_backButton--aa987","modalHeader":"bp_modal_module_modalHeader--aa987","modalTitle":"bp_modal_module_modalTitle--aa987","modalHeaderWithAddon":"bp_modal_module_modalHeaderWithAddon--aa987","modalTitleWithAddon":"bp_modal_module_modalTitleWithAddon--aa987","modalTitleLabel":"bp_modal_module_modalTitleLabel--aa987","modalTitleAddon":"bp_modal_module_modalTitleAddon--aa987","modalTitleText":"bp_modal_module_modalTitleText--aa987","modalTitleWithSubtitle":"bp_modal_module_modalTitleWithSubtitle--aa987","body":"bp_modal_module_body--aa987","footer":"bp_modal_module_footer--aa987","footerButton":"bp_modal_module_footerButton--aa987","loadingContainer":"bp_modal_module_loadingContainer--aa987","loading":"bp_modal_module_loading--aa987","loadingOverlay":"bp_modal_module_loadingOverlay--aa987","loadingContent":"bp_modal_module_loadingContent--aa987","loadingContentVisible":"bp_modal_module_loadingContentVisible--aa987"};
3
3
 
4
4
  export { styles as default };
@@ -1,5 +1,5 @@
1
- import { type DialogContentProps, type DialogPortalProps, type DialogProps, type DialogTitleProps } from '@radix-ui/react-dialog';
2
- import { type FunctionComponent, type HTMLAttributes, type PropsWithChildren, type ReactElement, type ReactNode, type SVGProps } from 'react';
1
+ import { type DialogContentProps, type DialogDescriptionProps, type DialogPortalProps, type DialogProps, type DialogTitleProps } from '@radix-ui/react-dialog';
2
+ import { type FunctionComponent, type HTMLAttributes, type PropsWithChildren, type ReactElement, type ReactNode, type RefObject, type SVGProps } from 'react';
3
3
  import { type LoadingIndicatorProps } from '../loading-indicator/loading-indicator';
4
4
  import { type IconButtonProps } from '../primitives/icon-button';
5
5
  export type ModalProps = DialogProps;
@@ -38,6 +38,10 @@ export interface ModalTitleProps extends DialogTitleProps {
38
38
  /** Specifies if title should be visually hidden */
39
39
  visuallyHidden?: boolean;
40
40
  }
41
+ export interface ModalDescriptionProps extends DialogDescriptionProps {
42
+ /** Content of the Description element */
43
+ children: ReactNode;
44
+ }
41
45
  export interface ModalBodyProps extends HTMLAttributes<HTMLDivElement> {
42
46
  /** Content of the Body element */
43
47
  children: ReactNode;
@@ -50,11 +54,17 @@ export interface ModalFooterProps extends HTMLAttributes<HTMLDivElement> {
50
54
  /** Content of the Footer element */
51
55
  children: ReactNode;
52
56
  }
57
+ export interface ModalHeaderTitleAddonRenderProps {
58
+ /** Ref to the title area container, for observing changes to its size. */
59
+ containerRef: RefObject<HTMLDivElement>;
60
+ }
53
61
  export interface ModalHeaderProps extends HTMLAttributes<HTMLHeadingElement> {
54
62
  backButton?: ReactElement;
55
63
  /** Content of the Header element */
56
64
  children: ReactNode;
57
- /** Content of the Subttitle element */
65
+ /** Renders noninteractive content adjacent to, or below, the modal title. */
66
+ renderTitleAddon?: (props: ModalHeaderTitleAddonRenderProps) => ReactNode;
67
+ /** Content of the Subtitle element */
58
68
  subtitle?: ReactNode;
59
69
  }
60
70
  export interface ModalLoadingProps extends HTMLAttributes<HTMLDivElement> {
@@ -10,21 +10,21 @@ const ToolbarRoot = /*#__PURE__*/forwardRef((props, forwardedRef) => {
10
10
  const {
11
11
  children,
12
12
  className,
13
+ style,
13
14
  scrollable,
15
+ ariaLabelNextButton,
16
+ ariaLabelPrevButton,
17
+ maxWidth,
18
+ scrollStep,
14
19
  ...rest
15
20
  } = props;
16
21
  if (scrollable) {
17
- const {
18
- ariaLabelNextButton,
19
- ariaLabelPrevButton,
20
- maxWidth,
21
- scrollStep = 50
22
- } = props;
23
22
  return jsx(ToolbarPrimitive.Root, {
24
23
  ...rest,
25
24
  ref: forwardedRef,
26
25
  className: clsx(styles.toolbarRoot, styles.ScrollableToolbarWithReducedPadding, className),
27
26
  style: {
27
+ ...style,
28
28
  maxWidth
29
29
  },
30
30
  children: jsx(HorizontalScrollProvider, {
@@ -41,6 +41,7 @@ const ToolbarRoot = /*#__PURE__*/forwardRef((props, forwardedRef) => {
41
41
  ...rest,
42
42
  ref: forwardedRef,
43
43
  className: clsx(styles.toolbarRoot, className),
44
+ style: style,
44
45
  children: children
45
46
  });
46
47
  });
@@ -3,10 +3,8 @@ import { type CSSProperties, type FunctionComponent, type HTMLAttributes, type P
3
3
  interface ToolbarWithoutScrollProps {
4
4
  scrollable?: false;
5
5
  }
6
- interface ToolbarWithScrollProps {
7
- /** Prop to enable horizontal scrolling with control buttons. */
8
- scrollable: true;
9
- /** The maximum width of the toolbar. When this width is reached, horizontal scrolling with control buttons will be enabled. */
6
+ interface ToolbarScrollOptions {
7
+ /** The maximum width of the toolbar. When this width is reached, horizontal scrolling with control buttons will be enabled. Takes precedence over `style.maxWidth`. */
10
8
  maxWidth: string;
11
9
  /** Aria label for the previous control button. */
12
10
  ariaLabelPrevButton: string;
@@ -17,8 +15,14 @@ interface ToolbarWithScrollProps {
17
15
  */
18
16
  scrollStep?: number;
19
17
  }
18
+ interface ToolbarWithScrollProps extends ToolbarScrollOptions {
19
+ /** Prop to enable horizontal scrolling with control buttons. */
20
+ scrollable: true;
21
+ }
20
22
  type ScrollProps = ToolbarWithoutScrollProps | ToolbarWithScrollProps;
21
23
  export type ToolbarProps = ToolbarPrimitiveProps & ScrollProps;
24
+ /** Scroll options can still be present at runtime when `scrollable` is falsy, e.g. `scrollable={isNarrow}`. */
25
+ export type ToolbarRootRuntimeProps = ToolbarPrimitiveProps & ((ToolbarWithoutScrollProps & Partial<ToolbarScrollOptions>) | ToolbarWithScrollProps);
22
26
  export type ToolbarSeparatorProps = ToolbarPrimitiveSeparatorProps;
23
27
  export type ToolbarToggleGroupProps = ToolbarToggleGroupPrimitiveProps;
24
28
  interface ToolbarButtonCSS extends CSSProperties {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "17.22.1",
3
+ "version": "17.22.3",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -55,7 +55,7 @@
55
55
  "dependencies": {
56
56
  "@ariakit/react": "0.4.21",
57
57
  "@ariakit/react-core": "0.4.21",
58
- "@box/blueprint-web-assets": "^5.11.10",
58
+ "@box/blueprint-web-assets": "^5.11.12",
59
59
  "@internationalized/date": "^3.12.0",
60
60
  "@radix-ui/react-accordion": "1.1.2",
61
61
  "@radix-ui/react-checkbox": "1.0.4",
@@ -86,7 +86,7 @@
86
86
  "devDependencies": {
87
87
  "@box/box-test-client": "^3.2.7",
88
88
  "@box/playwright-utils": "^2.8.5",
89
- "@box/storybook-utils": "^1.4.5",
89
+ "@box/storybook-utils": "^1.4.7",
90
90
  "@figma/code-connect": "1.4.4",
91
91
  "@playwright/test": "1.46.1",
92
92
  "@types/js-yaml": "^4.0.9",