@wwtdev/bsds-css 3.0.4 → 3.0.6

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.
@@ -3794,10 +3794,14 @@ label:where(.bs-label) {
3794
3794
  }
3795
3795
  .bs-option {
3796
3796
  --description-color: var(--bs-ink-light);
3797
+ align-items: center;
3797
3798
  border-left: 4px solid transparent;
3798
3799
  border-right: 4px solid transparent;
3799
3800
  color: var(--bs-ink-base);
3800
3801
  cursor: pointer;
3802
+ display: flex;
3803
+ gap: var(--bs-space-2);
3804
+ margin-bottom: var(--bs-space-2);
3801
3805
  overflow-wrap: break-word;
3802
3806
  padding: var(--bs-space-1) var(--bs-space-3) var(--bs-space-1) var(--bs-space-6);
3803
3807
  scroll-margin-bottom: var(--bs-space-3);
@@ -3810,9 +3814,6 @@ label:where(.bs-label) {
3810
3814
  padding: var(--bs-space-1) var(--bs-space-2);
3811
3815
  }
3812
3816
  }
3813
- .bs-option {
3814
- margin-bottom: var(--bs-space-2); /* ask ux: 12px is too much, can't see many menu options in view */
3815
- }
3816
3817
  /* is basically doing a last visible child selector ignoring selectToTop, since filtered options and groups are hidden by v-show */
3817
3818
  .bs-option:where(:nth-last-child(1 of [data-visible="true"][data-selected-to-top="false"])) {
3818
3819
  margin-bottom: 0;
@@ -3820,22 +3821,22 @@ label:where(.bs-label) {
3820
3821
  /* -- DISABLED -- */
3821
3822
  /* Don't disable via pointer-events, so tooltips still work in a disabled menu item. */
3822
3823
  .bs-option:where([aria-disabled="true"]) {
3823
- color: var(--bs-ink-disabled);
3824
3824
  --description-color: var(--bs-ink-disabled);
3825
+ color: var(--bs-ink-disabled);
3825
3826
  cursor: default;
3826
3827
  }
3827
3828
  /* -- SELECTED -- */
3828
3829
  .bs-option:where(:not([aria-disabled="true"], [data-negative="true"])):hover,
3829
3830
  .bs-option:where(:not([data-multiple="true"])[aria-selected="true"]) {
3830
- color: var(--bs-ink-primary);
3831
3831
  --description-color: var(--bs-ink-primary);
3832
3832
  background: var(--bs-bg-medium-to-light);
3833
3833
  border-left-color: var(--bs-ink-primary);
3834
+ color: var(--bs-ink-primary);
3834
3835
  }
3835
3836
  /* selected yet disabled...should be a very rare scenario, but need to handle it */
3836
3837
  .bs-option:where([aria-disabled="true"]):where([aria-selected="true"]) {
3837
- color: var(--bs-ink-light);
3838
3838
  border-left-color: var(--bs-ink-disabled);
3839
+ color: var(--bs-ink-light);
3839
3840
  }
3840
3841
  /* -- ACTIVE -- */
3841
3842
  .bs-option:where([data-active="true"]) {
@@ -3844,10 +3845,10 @@ label:where(.bs-label) {
3844
3845
  /* -- NEGATIVE -- */
3845
3846
  .bs-option:where([data-negative="true"]:hover),
3846
3847
  .bs-option:where(:not([data-multiple="true"])[data-negative="true"][aria-selected="true"]) {
3847
- color: var(--bs-ink-negative);
3848
+ --description-color: var(--bs-ink-negative);
3848
3849
  background: var(--bs-negative-highlight);
3849
3850
  border-left-color: var(--bs-negative-base);
3850
- --description-color: var(--bs-ink-negative);
3851
+ color: var(--bs-ink-negative);
3851
3852
  }
3852
3853
  .bs-option:where([data-negative="true"][aria-selected="true"]) :where(.bs-checkbox):before {
3853
3854
  --fill-bg-color: var(--bs-negative-base);
@@ -3856,23 +3857,18 @@ label:where(.bs-label) {
3856
3857
  box-shadow: inset 0 0 0 2px var(--bs-negative-base);
3857
3858
  }
3858
3859
  /* -- MULTIPLE -- */
3859
- .bs-option:where([data-multiple="true"]) {
3860
- display: grid;
3861
- grid-template-columns: auto 1fr;
3862
- align-items: start;
3863
- gap: var(--bs-space-2);
3864
- }
3865
3860
  .bs-option:where([data-multiple="true"]) :where(.bs-checkbox) {
3861
+ align-self: start;
3866
3862
  margin-top: var(--bs-space-1);
3867
3863
  }
3868
- /* -- VARIANTS -- */
3864
+ /* -- GRID LAYOUT -- */
3869
3865
  .bs-option-grid:where([data-icon-col="true"]) {
3870
3866
  display: grid;
3867
+ grid-column-gap: var(--bs-space-2);
3871
3868
  grid-template:
3872
3869
  "icon label"
3873
3870
  ". description"
3874
3871
  / auto 1fr;
3875
- grid-column-gap: var(--bs-space-2);
3876
3872
  }
3877
3873
  .bs-option-grid:where(:not([data-icon-col="true"])) {
3878
3874
  display: grid;
@@ -3881,10 +3877,10 @@ label:where(.bs-label) {
3881
3877
  "description";
3882
3878
  }
3883
3879
  .bs-option-grid:where([data-icon-col="true"]) :where(:nth-child(1)) {
3884
- grid-area: icon;
3885
3880
  align-self: center;
3886
- max-width: 1.5rem;
3881
+ grid-area: icon;
3887
3882
  max-height: 1.5rem;
3883
+ max-width: 1.5rem;
3888
3884
  }
3889
3885
  .bs-option-grid:where([data-icon-col="true"]) :where(:nth-child(2)),
3890
3886
  .bs-option-grid:where(:not([data-icon-col="true"])) :where(:nth-child(1)) {
@@ -3892,10 +3888,10 @@ label:where(.bs-label) {
3892
3888
  }
3893
3889
  .bs-option-grid:where([data-icon-col="true"]) :where(:nth-child(3)),
3894
3890
  .bs-option-grid:where(:not([data-icon-col="true"])) :where(:nth-child(2)) {
3895
- grid-area: description;
3891
+ color: var(--description-color);
3896
3892
  font-size: var(--bs-text-xs);
3893
+ grid-area: description;
3897
3894
  padding-top: 0.125rem;
3898
- color: var(--description-color);
3899
3895
  }
3900
3896
  .bs-overlay {
3901
3897
  -webkit-backdrop-filter: blur(4px);
@@ -4026,11 +4022,6 @@ label:where(.bs-label) {
4026
4022
  position: relative;
4027
4023
  text-decoration: none;
4028
4024
  }
4029
- .bs-pill-content {
4030
- display: inline-flex;
4031
- align-items: center;
4032
- gap: var(--pill-gap);
4033
- }
4034
4025
  .bs-pill :where(.bs-icon) {
4035
4026
  height: 0.75rem;
4036
4027
  width: 0.75rem;
@@ -4040,10 +4031,11 @@ label:where(.bs-label) {
4040
4031
  .bs-pill:has([data-truncate="true"]) {
4041
4032
  max-width: 100%;
4042
4033
  }
4043
- .bs-pill-content:where([data-truncate="true"]) {
4044
- white-space: nowrap;
4034
+ .bs-pill > :where([data-truncate="true"]) {
4035
+ display: inline-block;
4045
4036
  overflow: hidden;
4046
4037
  text-overflow: ellipsis;
4038
+ white-space: nowrap;
4047
4039
  }
4048
4040
  /* ------------------------------ Button and Link Styles ------------------------------ */
4049
4041
  :is(a, button).bs-pill {
@@ -6116,27 +6108,73 @@ a.bs-text-button {
6116
6108
  }
6117
6109
  /* Don't use mobile sheet at any breakpoint */
6118
6110
  .bs-dropdown:where(:not([data-mobile-sheet])) {
6119
- --bs-popover-width: 20rem;
6111
+ --bs-popover-width: unset;
6120
6112
  height: unset;
6121
6113
  max-height: 20rem; /* 320px */
6122
6114
  max-width: calc(100dvw - 3rem);
6115
+
6116
+ &:where([data-size="sm"]) {
6117
+ --bs-popover-width: 16rem;
6118
+ }
6119
+
6120
+ &:where([data-size="md"]) {
6121
+ --bs-popover-width: 20rem;
6122
+ }
6123
+
6124
+ &:where([data-size="lg"]) {
6125
+ --bs-popover-width: 28rem;
6126
+ }
6127
+
6128
+ /* Prevent mobile padding on options */
6129
+ & :where(.bs-option) {
6130
+ padding: var(--bs-space-1) var(--bs-space-2);
6131
+ }
6123
6132
  }
6124
6133
  @media (min-width: 752px) {
6125
6134
  /* Remove bottom drawer at tablet breakpoint */
6126
6135
  .bs-dropdown:where([data-mobile-sheet="mobile"]) {
6127
- --bs-popover-width: 20rem;
6136
+ --bs-popover-width: unset;
6128
6137
  height: unset;
6129
6138
  max-height: 20rem; /* 320px */
6130
6139
  max-width: calc(100dvw - 3rem);
6140
+
6141
+ &:where([data-size="sm"]) {
6142
+ --bs-popover-width: 16rem;
6143
+ }
6144
+
6145
+ &:where([data-size="md"]) {
6146
+ --bs-popover-width: 20rem;
6147
+ }
6148
+
6149
+ &:where([data-size="lg"]) {
6150
+ --bs-popover-width: 28rem;
6151
+ }
6152
+
6153
+ /* Prevent mobile padding on options */
6154
+ & :where(.bs-option) {
6155
+ padding: var(--bs-space-1) var(--bs-space-2);
6156
+ }
6131
6157
  }
6132
6158
  }
6133
6159
  @media (min-width: 1166px) {
6134
6160
  /* Remove bottom drawer at desktop breakpoint */
6135
6161
  .bs-dropdown:where([data-mobile-sheet="tablet"]) {
6136
- --bs-popover-width: 20rem;
6162
+ --bs-popover-width: unset;
6137
6163
  height: unset;
6138
6164
  max-height: 20rem; /* 320px */
6139
6165
  max-width: calc(100dvw - 3rem);
6166
+
6167
+ &:where([data-size="sm"]) {
6168
+ --bs-popover-width: 16rem;
6169
+ }
6170
+
6171
+ &:where([data-size="md"]) {
6172
+ --bs-popover-width: 20rem;
6173
+ }
6174
+
6175
+ &:where([data-size="lg"]) {
6176
+ --bs-popover-width: 28rem;
6177
+ }
6140
6178
  }
6141
6179
  }
6142
6180
  /* Here if a consumer adds their own hr between BsOptions. Just don't override the internal option group separator. */