@box/blueprint-web 19.2.0 → 19.2.1
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/lib-esm/components.css +27 -24
- package/dist/lib-esm/index.css +27 -24
- package/dist/lib-esm/select/select-context.d.ts +5 -1
- package/dist/lib-esm/select/select-context.js +8 -3
- package/dist/lib-esm/select/select.js +9 -1
- package/dist/lib-esm/text-area/text-area-autosize/text-area-autosize.module.js +1 -1
- package/package.json +3 -3
|
@@ -4486,7 +4486,7 @@
|
|
|
4486
4486
|
font-family:monospace;
|
|
4487
4487
|
transform:scale(1.2);
|
|
4488
4488
|
}
|
|
4489
|
-
.bp_text_area_autosize_module_textArea--
|
|
4489
|
+
.bp_text_area_autosize_module_textArea--eeec2{
|
|
4490
4490
|
--text-area-inner-shadow:var(--innershadow-1);
|
|
4491
4491
|
--text-area-text-color:var(--bp-text-text-on-light);
|
|
4492
4492
|
--text-area-background-color:var(--bp-surface-input-surface);
|
|
@@ -4506,7 +4506,7 @@
|
|
|
4506
4506
|
letter-spacing:var(--bp-font-letter-spacing-01);
|
|
4507
4507
|
line-height:var(--bp-font-line-height-04);
|
|
4508
4508
|
}
|
|
4509
|
-
:where(body.is-inter-font) .bp_text_area_autosize_module_textArea--
|
|
4509
|
+
:where(body.is-inter-font) .bp_text_area_autosize_module_textArea--eeec2{
|
|
4510
4510
|
font-family:"Inter Variable", -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
|
|
4511
4511
|
font-size:.875rem;
|
|
4512
4512
|
font-style:normal;
|
|
@@ -4517,7 +4517,7 @@
|
|
|
4517
4517
|
text-transform:none;
|
|
4518
4518
|
}
|
|
4519
4519
|
|
|
4520
|
-
.bp_text_area_autosize_module_textArea--
|
|
4520
|
+
.bp_text_area_autosize_module_textArea--eeec2{
|
|
4521
4521
|
background:var(--text-area-background-color);
|
|
4522
4522
|
border:none;
|
|
4523
4523
|
box-shadow:var(--text-area-inner-shadow);
|
|
@@ -4528,47 +4528,47 @@
|
|
|
4528
4528
|
resize:none;
|
|
4529
4529
|
width:100%;
|
|
4530
4530
|
}
|
|
4531
|
-
.bp_text_area_autosize_module_textArea--
|
|
4531
|
+
.bp_text_area_autosize_module_textArea--eeec2.bp_text_area_autosize_module_withEndIcon--eeec2{
|
|
4532
4532
|
padding-inline-end:calc(var(--text-area-padding-inline) + var(--end-icon-width) + var(--text-area-icon-padding));
|
|
4533
4533
|
}
|
|
4534
|
-
.bp_text_area_autosize_module_textArea--
|
|
4534
|
+
.bp_text_area_autosize_module_textArea--eeec2::placeholder{
|
|
4535
4535
|
color:var(--text-area-placeholder-color);
|
|
4536
4536
|
opacity:1;
|
|
4537
4537
|
}
|
|
4538
|
-
.bp_text_area_autosize_module_textArea--
|
|
4538
|
+
.bp_text_area_autosize_module_textArea--eeec2.bp_text_area_autosize_module_error--eeec2{
|
|
4539
4539
|
background:var(--text-area-error-background-color);
|
|
4540
4540
|
outline:0;
|
|
4541
4541
|
}
|
|
4542
|
-
.bp_text_area_autosize_module_textArea--
|
|
4542
|
+
.bp_text_area_autosize_module_textArea--eeec2:focus{
|
|
4543
4543
|
border:none;
|
|
4544
4544
|
}
|
|
4545
|
-
.bp_text_area_autosize_module_textArea--
|
|
4545
|
+
.bp_text_area_autosize_module_textArea--eeec2:hover{
|
|
4546
4546
|
box-shadow:var(--text-area-inner-shadow);
|
|
4547
4547
|
}
|
|
4548
|
-
.bp_text_area_autosize_module_textArea--
|
|
4548
|
+
.bp_text_area_autosize_module_textArea--eeec2:focus-visible{
|
|
4549
4549
|
background:var(--text-area-error-background-focus);
|
|
4550
4550
|
outline:0;
|
|
4551
4551
|
}
|
|
4552
|
-
.bp_text_area_autosize_module_textArea--
|
|
4552
|
+
.bp_text_area_autosize_module_textArea--eeec2:disabled{
|
|
4553
4553
|
background:var(--text-area-background-color);
|
|
4554
4554
|
border:none;
|
|
4555
4555
|
box-shadow:var(--text-area-inner-shadow);
|
|
4556
4556
|
color:var(--text-area-text-color);
|
|
4557
4557
|
}
|
|
4558
|
-
.bp_text_area_autosize_module_textArea--
|
|
4558
|
+
.bp_text_area_autosize_module_textArea--eeec2.bp_text_area_autosize_module_readOnly--eeec2{
|
|
4559
4559
|
background-color:var(--text-area-read-only-background-color);
|
|
4560
4560
|
color:var(--text-area-read-only-color);
|
|
4561
4561
|
cursor:default;
|
|
4562
4562
|
}
|
|
4563
|
-
.bp_text_area_autosize_module_textArea--
|
|
4563
|
+
.bp_text_area_autosize_module_textArea--eeec2:not(:disabled, :focus-visible, .bp_text_area_autosize_module_error--eeec2):hover{
|
|
4564
4564
|
background:var(--text-area-error-background-hover);
|
|
4565
4565
|
}
|
|
4566
4566
|
|
|
4567
|
-
.bp_text_area_autosize_module_loadingIndicatorReset--
|
|
4567
|
+
.bp_text_area_autosize_module_loadingIndicatorReset--eeec2 div{
|
|
4568
4568
|
position:static;
|
|
4569
4569
|
}
|
|
4570
4570
|
|
|
4571
|
-
.bp_text_area_autosize_module_border--
|
|
4571
|
+
.bp_text_area_autosize_module_border--eeec2{
|
|
4572
4572
|
--text-area-radius:var(--bp-radius-06);
|
|
4573
4573
|
--text-area-border-width:var(--bp-border-01);
|
|
4574
4574
|
--text-area-shadow-color:var(--bp-border-input-border);
|
|
@@ -4586,27 +4586,30 @@
|
|
|
4586
4586
|
position:relative;
|
|
4587
4587
|
transform:translateZ(0);
|
|
4588
4588
|
}
|
|
4589
|
-
.bp_text_area_autosize_module_border--
|
|
4589
|
+
.bp_text_area_autosize_module_border--eeec2.bp_text_area_autosize_module_readOnly--eeec2{
|
|
4590
4590
|
box-shadow:0 0 0 var(--text-area-border-width) var(--text-area-border-color-read-only);
|
|
4591
4591
|
cursor:default;
|
|
4592
4592
|
}
|
|
4593
|
-
.bp_text_area_autosize_module_border--
|
|
4593
|
+
.bp_text_area_autosize_module_border--eeec2:focus-within{
|
|
4594
4594
|
box-shadow:0 0 0 var(--text-area-border-width-focus) var(--text-area-border-color-focus);
|
|
4595
4595
|
}
|
|
4596
|
-
.bp_text_area_autosize_module_border--
|
|
4596
|
+
.bp_text_area_autosize_module_border--eeec2:hover:not(:focus-within, .bp_text_area_autosize_module_hasError--eeec2, .bp_text_area_autosize_module_disabled--eeec2){
|
|
4597
4597
|
box-shadow:0 0 0 var(--text-area-border-width) var(--text-area-border-color-hover);
|
|
4598
4598
|
}
|
|
4599
|
-
.bp_text_area_autosize_module_border--
|
|
4599
|
+
.bp_text_area_autosize_module_border--eeec2.bp_text_area_autosize_module_hasError--eeec2:not(:focus-within){
|
|
4600
4600
|
box-shadow:0 0 0 var(--text-area-border-width-error) var(--text-area-border-color-error);
|
|
4601
4601
|
}
|
|
4602
|
-
.bp_text_area_autosize_module_border--
|
|
4602
|
+
.bp_text_area_autosize_module_border--eeec2.bp_text_area_autosize_module_hasError--eeec2:focus-within{
|
|
4603
|
+
box-shadow:0 0 0 var(--text-area-border-width-focus) var(--text-area-border-color-focus);
|
|
4604
|
+
}
|
|
4605
|
+
.bp_text_area_autosize_module_border--eeec2 .bp_text_area_autosize_module_endIconWrap--eeec2{
|
|
4603
4606
|
height:var(--bp-space-100);
|
|
4604
4607
|
pointer-events:none;
|
|
4605
4608
|
position:absolute;
|
|
4606
4609
|
right:0;
|
|
4607
4610
|
top:0;
|
|
4608
4611
|
}
|
|
4609
|
-
.bp_text_area_autosize_module_border--
|
|
4612
|
+
.bp_text_area_autosize_module_border--eeec2 .bp_text_area_autosize_module_endIconWrap--eeec2 .bp_text_area_autosize_module_endIcon--eeec2{
|
|
4610
4613
|
pointer-events:auto;
|
|
4611
4614
|
position:absolute;
|
|
4612
4615
|
right:calc(var(--text-area-padding-inline) + var(--text-area-border-width));
|
|
@@ -4614,20 +4617,20 @@
|
|
|
4614
4617
|
transform:translateY(-50%);
|
|
4615
4618
|
}
|
|
4616
4619
|
|
|
4617
|
-
.bp_text_area_autosize_module_border--
|
|
4620
|
+
.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true]{
|
|
4618
4621
|
transition-duration:var(--bp-duration-short);
|
|
4619
4622
|
transition-property:box-shadow;
|
|
4620
4623
|
transition-timing-function:var(--bp-curve-small-off);
|
|
4621
4624
|
}
|
|
4622
|
-
.bp_text_area_autosize_module_border--
|
|
4625
|
+
.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true].bp_text_area_autosize_module_hasError--eeec2,.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true]:focus-within,.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true]:hover:not(:focus-within, .bp_text_area_autosize_module_hasError--eeec2, .bp_text_area_autosize_module_disabled--eeec2){
|
|
4623
4626
|
transition-timing-function:var(--bp-curve-small-on);
|
|
4624
4627
|
}
|
|
4625
|
-
.bp_text_area_autosize_module_border--
|
|
4628
|
+
.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true] .bp_text_area_autosize_module_textArea--eeec2{
|
|
4626
4629
|
transition-duration:var(--bp-duration-short);
|
|
4627
4630
|
transition-property:background-color;
|
|
4628
4631
|
transition-timing-function:var(--bp-curve-small-off);
|
|
4629
4632
|
}
|
|
4630
|
-
.bp_text_area_autosize_module_border--
|
|
4633
|
+
.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true] .bp_text_area_autosize_module_textArea--eeec2:not(:disabled).bp_text_area_autosize_module_error--eeec2,.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true] .bp_text_area_autosize_module_textArea--eeec2:not(:disabled):focus-visible,.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true] .bp_text_area_autosize_module_textArea--eeec2:not(:disabled):hover{
|
|
4631
4634
|
transition-timing-function:var(--bp-curve-small-on);
|
|
4632
4635
|
}
|
|
4633
4636
|
.bp_text_area_module_textAreaContainer--a5e4e{
|
package/dist/lib-esm/index.css
CHANGED
|
@@ -4486,7 +4486,7 @@
|
|
|
4486
4486
|
font-family:monospace;
|
|
4487
4487
|
transform:scale(1.2);
|
|
4488
4488
|
}
|
|
4489
|
-
.bp_text_area_autosize_module_textArea--
|
|
4489
|
+
.bp_text_area_autosize_module_textArea--eeec2{
|
|
4490
4490
|
--text-area-inner-shadow:var(--innershadow-1);
|
|
4491
4491
|
--text-area-text-color:var(--bp-text-text-on-light);
|
|
4492
4492
|
--text-area-background-color:var(--bp-surface-input-surface);
|
|
@@ -4506,7 +4506,7 @@
|
|
|
4506
4506
|
letter-spacing:var(--bp-font-letter-spacing-01);
|
|
4507
4507
|
line-height:var(--bp-font-line-height-04);
|
|
4508
4508
|
}
|
|
4509
|
-
:where(body.is-inter-font) .bp_text_area_autosize_module_textArea--
|
|
4509
|
+
:where(body.is-inter-font) .bp_text_area_autosize_module_textArea--eeec2{
|
|
4510
4510
|
font-family:"Inter Variable", -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
|
|
4511
4511
|
font-size:.875rem;
|
|
4512
4512
|
font-style:normal;
|
|
@@ -4517,7 +4517,7 @@
|
|
|
4517
4517
|
text-transform:none;
|
|
4518
4518
|
}
|
|
4519
4519
|
|
|
4520
|
-
.bp_text_area_autosize_module_textArea--
|
|
4520
|
+
.bp_text_area_autosize_module_textArea--eeec2{
|
|
4521
4521
|
background:var(--text-area-background-color);
|
|
4522
4522
|
border:none;
|
|
4523
4523
|
box-shadow:var(--text-area-inner-shadow);
|
|
@@ -4528,47 +4528,47 @@
|
|
|
4528
4528
|
resize:none;
|
|
4529
4529
|
width:100%;
|
|
4530
4530
|
}
|
|
4531
|
-
.bp_text_area_autosize_module_textArea--
|
|
4531
|
+
.bp_text_area_autosize_module_textArea--eeec2.bp_text_area_autosize_module_withEndIcon--eeec2{
|
|
4532
4532
|
padding-inline-end:calc(var(--text-area-padding-inline) + var(--end-icon-width) + var(--text-area-icon-padding));
|
|
4533
4533
|
}
|
|
4534
|
-
.bp_text_area_autosize_module_textArea--
|
|
4534
|
+
.bp_text_area_autosize_module_textArea--eeec2::placeholder{
|
|
4535
4535
|
color:var(--text-area-placeholder-color);
|
|
4536
4536
|
opacity:1;
|
|
4537
4537
|
}
|
|
4538
|
-
.bp_text_area_autosize_module_textArea--
|
|
4538
|
+
.bp_text_area_autosize_module_textArea--eeec2.bp_text_area_autosize_module_error--eeec2{
|
|
4539
4539
|
background:var(--text-area-error-background-color);
|
|
4540
4540
|
outline:0;
|
|
4541
4541
|
}
|
|
4542
|
-
.bp_text_area_autosize_module_textArea--
|
|
4542
|
+
.bp_text_area_autosize_module_textArea--eeec2:focus{
|
|
4543
4543
|
border:none;
|
|
4544
4544
|
}
|
|
4545
|
-
.bp_text_area_autosize_module_textArea--
|
|
4545
|
+
.bp_text_area_autosize_module_textArea--eeec2:hover{
|
|
4546
4546
|
box-shadow:var(--text-area-inner-shadow);
|
|
4547
4547
|
}
|
|
4548
|
-
.bp_text_area_autosize_module_textArea--
|
|
4548
|
+
.bp_text_area_autosize_module_textArea--eeec2:focus-visible{
|
|
4549
4549
|
background:var(--text-area-error-background-focus);
|
|
4550
4550
|
outline:0;
|
|
4551
4551
|
}
|
|
4552
|
-
.bp_text_area_autosize_module_textArea--
|
|
4552
|
+
.bp_text_area_autosize_module_textArea--eeec2:disabled{
|
|
4553
4553
|
background:var(--text-area-background-color);
|
|
4554
4554
|
border:none;
|
|
4555
4555
|
box-shadow:var(--text-area-inner-shadow);
|
|
4556
4556
|
color:var(--text-area-text-color);
|
|
4557
4557
|
}
|
|
4558
|
-
.bp_text_area_autosize_module_textArea--
|
|
4558
|
+
.bp_text_area_autosize_module_textArea--eeec2.bp_text_area_autosize_module_readOnly--eeec2{
|
|
4559
4559
|
background-color:var(--text-area-read-only-background-color);
|
|
4560
4560
|
color:var(--text-area-read-only-color);
|
|
4561
4561
|
cursor:default;
|
|
4562
4562
|
}
|
|
4563
|
-
.bp_text_area_autosize_module_textArea--
|
|
4563
|
+
.bp_text_area_autosize_module_textArea--eeec2:not(:disabled, :focus-visible, .bp_text_area_autosize_module_error--eeec2):hover{
|
|
4564
4564
|
background:var(--text-area-error-background-hover);
|
|
4565
4565
|
}
|
|
4566
4566
|
|
|
4567
|
-
.bp_text_area_autosize_module_loadingIndicatorReset--
|
|
4567
|
+
.bp_text_area_autosize_module_loadingIndicatorReset--eeec2 div{
|
|
4568
4568
|
position:static;
|
|
4569
4569
|
}
|
|
4570
4570
|
|
|
4571
|
-
.bp_text_area_autosize_module_border--
|
|
4571
|
+
.bp_text_area_autosize_module_border--eeec2{
|
|
4572
4572
|
--text-area-radius:var(--bp-radius-06);
|
|
4573
4573
|
--text-area-border-width:var(--bp-border-01);
|
|
4574
4574
|
--text-area-shadow-color:var(--bp-border-input-border);
|
|
@@ -4586,27 +4586,30 @@
|
|
|
4586
4586
|
position:relative;
|
|
4587
4587
|
transform:translateZ(0);
|
|
4588
4588
|
}
|
|
4589
|
-
.bp_text_area_autosize_module_border--
|
|
4589
|
+
.bp_text_area_autosize_module_border--eeec2.bp_text_area_autosize_module_readOnly--eeec2{
|
|
4590
4590
|
box-shadow:0 0 0 var(--text-area-border-width) var(--text-area-border-color-read-only);
|
|
4591
4591
|
cursor:default;
|
|
4592
4592
|
}
|
|
4593
|
-
.bp_text_area_autosize_module_border--
|
|
4593
|
+
.bp_text_area_autosize_module_border--eeec2:focus-within{
|
|
4594
4594
|
box-shadow:0 0 0 var(--text-area-border-width-focus) var(--text-area-border-color-focus);
|
|
4595
4595
|
}
|
|
4596
|
-
.bp_text_area_autosize_module_border--
|
|
4596
|
+
.bp_text_area_autosize_module_border--eeec2:hover:not(:focus-within, .bp_text_area_autosize_module_hasError--eeec2, .bp_text_area_autosize_module_disabled--eeec2){
|
|
4597
4597
|
box-shadow:0 0 0 var(--text-area-border-width) var(--text-area-border-color-hover);
|
|
4598
4598
|
}
|
|
4599
|
-
.bp_text_area_autosize_module_border--
|
|
4599
|
+
.bp_text_area_autosize_module_border--eeec2.bp_text_area_autosize_module_hasError--eeec2:not(:focus-within){
|
|
4600
4600
|
box-shadow:0 0 0 var(--text-area-border-width-error) var(--text-area-border-color-error);
|
|
4601
4601
|
}
|
|
4602
|
-
.bp_text_area_autosize_module_border--
|
|
4602
|
+
.bp_text_area_autosize_module_border--eeec2.bp_text_area_autosize_module_hasError--eeec2:focus-within{
|
|
4603
|
+
box-shadow:0 0 0 var(--text-area-border-width-focus) var(--text-area-border-color-focus);
|
|
4604
|
+
}
|
|
4605
|
+
.bp_text_area_autosize_module_border--eeec2 .bp_text_area_autosize_module_endIconWrap--eeec2{
|
|
4603
4606
|
height:var(--bp-space-100);
|
|
4604
4607
|
pointer-events:none;
|
|
4605
4608
|
position:absolute;
|
|
4606
4609
|
right:0;
|
|
4607
4610
|
top:0;
|
|
4608
4611
|
}
|
|
4609
|
-
.bp_text_area_autosize_module_border--
|
|
4612
|
+
.bp_text_area_autosize_module_border--eeec2 .bp_text_area_autosize_module_endIconWrap--eeec2 .bp_text_area_autosize_module_endIcon--eeec2{
|
|
4610
4613
|
pointer-events:auto;
|
|
4611
4614
|
position:absolute;
|
|
4612
4615
|
right:calc(var(--text-area-padding-inline) + var(--text-area-border-width));
|
|
@@ -4614,20 +4617,20 @@
|
|
|
4614
4617
|
transform:translateY(-50%);
|
|
4615
4618
|
}
|
|
4616
4619
|
|
|
4617
|
-
.bp_text_area_autosize_module_border--
|
|
4620
|
+
.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true]{
|
|
4618
4621
|
transition-duration:var(--bp-duration-short);
|
|
4619
4622
|
transition-property:box-shadow;
|
|
4620
4623
|
transition-timing-function:var(--bp-curve-small-off);
|
|
4621
4624
|
}
|
|
4622
|
-
.bp_text_area_autosize_module_border--
|
|
4625
|
+
.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true].bp_text_area_autosize_module_hasError--eeec2,.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true]:focus-within,.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true]:hover:not(:focus-within, .bp_text_area_autosize_module_hasError--eeec2, .bp_text_area_autosize_module_disabled--eeec2){
|
|
4623
4626
|
transition-timing-function:var(--bp-curve-small-on);
|
|
4624
4627
|
}
|
|
4625
|
-
.bp_text_area_autosize_module_border--
|
|
4628
|
+
.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true] .bp_text_area_autosize_module_textArea--eeec2{
|
|
4626
4629
|
transition-duration:var(--bp-duration-short);
|
|
4627
4630
|
transition-property:background-color;
|
|
4628
4631
|
transition-timing-function:var(--bp-curve-small-off);
|
|
4629
4632
|
}
|
|
4630
|
-
.bp_text_area_autosize_module_border--
|
|
4633
|
+
.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true] .bp_text_area_autosize_module_textArea--eeec2:not(:disabled).bp_text_area_autosize_module_error--eeec2,.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true] .bp_text_area_autosize_module_textArea--eeec2:not(:disabled):focus-visible,.bp_text_area_autosize_module_border--eeec2[data-bp-animated=true] .bp_text_area_autosize_module_textArea--eeec2:not(:disabled):hover{
|
|
4631
4634
|
transition-timing-function:var(--bp-curve-small-on);
|
|
4632
4635
|
}
|
|
4633
4636
|
.bp_text_area_module_textAreaContainer--a5e4e{
|
|
@@ -8,6 +8,8 @@ interface SelectContextValue {
|
|
|
8
8
|
isExiting: boolean;
|
|
9
9
|
hasExitStyles: boolean;
|
|
10
10
|
completeExit: () => void;
|
|
11
|
+
canOpen: boolean;
|
|
12
|
+
selectedValue?: string;
|
|
11
13
|
}
|
|
12
14
|
export declare const useSelectContext: () => SelectContextValue;
|
|
13
15
|
interface SelectProviderProps {
|
|
@@ -16,7 +18,9 @@ interface SelectProviderProps {
|
|
|
16
18
|
isExiting: boolean;
|
|
17
19
|
hasExitStyles: boolean;
|
|
18
20
|
completeExit: () => void;
|
|
21
|
+
canOpen: boolean;
|
|
22
|
+
selectedValue?: string;
|
|
19
23
|
children: ReactNode;
|
|
20
24
|
}
|
|
21
|
-
export declare const SelectProvider: ({ truncateText, isAnimationEnabled, isExiting, hasExitStyles, completeExit, children, }: SelectProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const SelectProvider: ({ truncateText, isAnimationEnabled, isExiting, hasExitStyles, completeExit, canOpen, selectedValue, children, }: SelectProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
26
|
export {};
|
|
@@ -16,7 +16,8 @@ const defaultContextValue = {
|
|
|
16
16
|
hasExitStyles: false,
|
|
17
17
|
completeExit: () => {
|
|
18
18
|
/* noop */
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
canOpen: true
|
|
20
21
|
};
|
|
21
22
|
const SelectContext = /*#__PURE__*/createContext(null);
|
|
22
23
|
const useSelectContext = () => {
|
|
@@ -33,6 +34,8 @@ const SelectProvider = ({
|
|
|
33
34
|
isExiting,
|
|
34
35
|
hasExitStyles,
|
|
35
36
|
completeExit,
|
|
37
|
+
canOpen,
|
|
38
|
+
selectedValue,
|
|
36
39
|
children
|
|
37
40
|
}) => {
|
|
38
41
|
const [leftElements, setLeftElements] = useState(new Map());
|
|
@@ -61,8 +64,10 @@ const SelectProvider = ({
|
|
|
61
64
|
isAnimationEnabled,
|
|
62
65
|
isExiting,
|
|
63
66
|
hasExitStyles,
|
|
64
|
-
completeExit
|
|
65
|
-
|
|
67
|
+
completeExit,
|
|
68
|
+
canOpen,
|
|
69
|
+
selectedValue
|
|
70
|
+
}), [registerLeftElement, unregisterLeftElement, getLeftElement, truncateText, isAnimationEnabled, isExiting, hasExitStyles, completeExit, canOpen, selectedValue]);
|
|
66
71
|
return jsx(SelectContext.Provider, {
|
|
67
72
|
value: value,
|
|
68
73
|
children: children
|
|
@@ -128,10 +128,12 @@ const Root = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
128
128
|
className: styles.label,
|
|
129
129
|
hideLabel: hideLabel
|
|
130
130
|
}), jsx(SelectProvider, {
|
|
131
|
+
canOpen: !disabled && !readonly,
|
|
131
132
|
completeExit: completeExit,
|
|
132
133
|
hasExitStyles: hasExitStyles,
|
|
133
134
|
isAnimationEnabled: isAnimationEnabled,
|
|
134
135
|
isExiting: isExiting,
|
|
136
|
+
selectedValue: value,
|
|
135
137
|
truncateText: truncateText,
|
|
136
138
|
children: jsxs(SelectPrimitive.Root, {
|
|
137
139
|
...selectProps,
|
|
@@ -267,7 +269,9 @@ const Option = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
267
269
|
const {
|
|
268
270
|
registerLeftElement,
|
|
269
271
|
unregisterLeftElement,
|
|
270
|
-
truncateText
|
|
272
|
+
truncateText,
|
|
273
|
+
canOpen,
|
|
274
|
+
selectedValue
|
|
271
275
|
} = useSelectContext();
|
|
272
276
|
const onPointerLeave = useCallback(event => event.preventDefault(), []);
|
|
273
277
|
const onPointerMove = useCallback(event => event.preventDefault(), []);
|
|
@@ -283,6 +287,10 @@ const Option = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
283
287
|
}
|
|
284
288
|
return undefined;
|
|
285
289
|
}, [itemProps.value, leftElement, registerLeftElement, unregisterLeftElement]);
|
|
290
|
+
// A closed Select still renders every option off-screen. One that can't open needs only the selected option.
|
|
291
|
+
if (!canOpen && itemProps.value !== selectedValue) {
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
286
294
|
return jsxs(SelectPrimitive.Item, {
|
|
287
295
|
...itemProps,
|
|
288
296
|
ref: forwardedRef,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"textArea":"bp_text_area_autosize_module_textArea--
|
|
2
|
+
var styles = {"textArea":"bp_text_area_autosize_module_textArea--eeec2","withEndIcon":"bp_text_area_autosize_module_withEndIcon--eeec2","error":"bp_text_area_autosize_module_error--eeec2","readOnly":"bp_text_area_autosize_module_readOnly--eeec2","loadingIndicatorReset":"bp_text_area_autosize_module_loadingIndicatorReset--eeec2","border":"bp_text_area_autosize_module_border--eeec2","hasError":"bp_text_area_autosize_module_hasError--eeec2","disabled":"bp_text_area_autosize_module_disabled--eeec2","endIconWrap":"bp_text_area_autosize_module_endIconWrap--eeec2","endIcon":"bp_text_area_autosize_module_endIcon--eeec2"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/blueprint-web",
|
|
3
|
-
"version": "19.2.
|
|
3
|
+
"version": "19.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@ariakit/react": "0.4.21",
|
|
56
56
|
"@ariakit/react-core": "0.4.21",
|
|
57
|
-
"@box/blueprint-web-assets": "^5.15.
|
|
57
|
+
"@box/blueprint-web-assets": "^5.15.7",
|
|
58
58
|
"@internationalized/date": "^3.12.4",
|
|
59
59
|
"@radix-ui/react-accordion": "1.1.2",
|
|
60
60
|
"@radix-ui/react-checkbox": "1.0.4",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@box/box-test-client": "^3.2.7",
|
|
83
83
|
"@box/playwright-utils": "^3.10.0",
|
|
84
|
-
"@box/storybook-utils": "^1.4.
|
|
84
|
+
"@box/storybook-utils": "^1.4.41",
|
|
85
85
|
"@figma/code-connect": "1.4.4",
|
|
86
86
|
"@playwright/test": "1.46.1",
|
|
87
87
|
"@types/js-yaml": "^4.0.9",
|