@duskmoon-dev/core 1.19.7 → 1.19.8

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/README.md CHANGED
@@ -444,4 +444,4 @@ See [specs/004-oklch-color-system/quickstart.md](./specs/004-oklch-color-system/
444
444
 
445
445
  MIT
446
446
 
447
- <!-- release 35501128147 -->
447
+ <!-- release 35521434854 -->
@@ -113,6 +113,23 @@
113
113
  background-color: var(--color-surface-container-high);
114
114
  }
115
115
 
116
+ .cascader:has(> .cascader-clear) .cascader-value {
117
+ padding-inline-end: 2rem;
118
+ }
119
+
120
+ .cascader > .cascader-clear {
121
+ position: absolute;
122
+ inset-block-start: 50%;
123
+ inset-inline-end: 2.75rem;
124
+ z-index: 1;
125
+ transform: translateY(-50%);
126
+ }
127
+
128
+ .cascader > .cascader-clear:focus-visible {
129
+ outline: 2px solid currentColor;
130
+ outline-offset: 2px;
131
+ }
132
+
116
133
  /* Cascader Dropdown */
117
134
  .cascader-dropdown {
118
135
  position: absolute;
@@ -134,7 +151,10 @@
134
151
 
135
152
  /* Popover API Support */
136
153
  .cascader-dropdown[popover] {
137
- inset: unset;
154
+ position: fixed;
155
+ inset: auto 0.5rem 0.5rem auto;
156
+ max-inline-size: calc(100dvw - 1rem);
157
+ max-block-size: min(16rem, calc(100dvh - 1rem));
138
158
  margin: 0;
139
159
  border: 1px solid var(--color-outline-variant);
140
160
  }
@@ -143,32 +163,14 @@
143
163
  display: flex;
144
164
  }
145
165
 
146
- /* CSS Anchor Positioning for modern browsers */
147
- @supports (anchor-name: --anchor) {
148
- .cascader-trigger {
149
- anchor-name: --cascader-anchor;
150
- }
151
-
166
+ /* The popovertarget invoker is the implicit anchor for its own dropdown. */
167
+ @supports (position-area: block-end) {
152
168
  .cascader-dropdown[popover] {
153
- position-anchor: --cascader-anchor;
154
- top: anchor(bottom);
155
- left: anchor(left);
156
- margin-top: 0.25rem;
157
- position-try-fallbacks: flip-block;
158
- }
159
- }
160
-
161
- /* Fallback for browsers without anchor positioning */
162
- @supports not (anchor-name: --anchor) {
163
- .cascader {
164
- position: relative;
165
- }
166
-
167
- .cascader-dropdown[popover]:popover-open {
168
- position: absolute;
169
- top: 100%;
170
- left: 0;
171
- margin-top: 0.25rem;
169
+ inset: auto;
170
+ margin-block: 0.25rem;
171
+ margin-inline: 0;
172
+ position-area: block-end span-inline-end;
173
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
172
174
  }
173
175
  }
174
176
 
@@ -7635,6 +7635,23 @@
7635
7635
  background-color: var(--color-surface-container-high);
7636
7636
  }
7637
7637
 
7638
+ .cascader:has(> .cascader-clear) .cascader-value {
7639
+ padding-inline-end: 2rem;
7640
+ }
7641
+
7642
+ .cascader > .cascader-clear {
7643
+ position: absolute;
7644
+ inset-block-start: 50%;
7645
+ inset-inline-end: 2.75rem;
7646
+ z-index: 1;
7647
+ transform: translateY(-50%);
7648
+ }
7649
+
7650
+ .cascader > .cascader-clear:focus-visible {
7651
+ outline: 2px solid currentColor;
7652
+ outline-offset: 2px;
7653
+ }
7654
+
7638
7655
  /* Cascader Dropdown */
7639
7656
  .cascader-dropdown {
7640
7657
  position: absolute;
@@ -7656,7 +7673,10 @@
7656
7673
 
7657
7674
  /* Popover API Support */
7658
7675
  .cascader-dropdown[popover] {
7659
- inset: unset;
7676
+ position: fixed;
7677
+ inset: auto 0.5rem 0.5rem auto;
7678
+ max-inline-size: calc(100dvw - 1rem);
7679
+ max-block-size: min(16rem, calc(100dvh - 1rem));
7660
7680
  margin: 0;
7661
7681
  border: 1px solid var(--color-outline-variant);
7662
7682
  }
@@ -7665,32 +7685,14 @@
7665
7685
  display: flex;
7666
7686
  }
7667
7687
 
7668
- /* CSS Anchor Positioning for modern browsers */
7669
- @supports (anchor-name: --anchor) {
7670
- .cascader-trigger {
7671
- anchor-name: --cascader-anchor;
7672
- }
7673
-
7688
+ /* The popovertarget invoker is the implicit anchor for its own dropdown. */
7689
+ @supports (position-area: block-end) {
7674
7690
  .cascader-dropdown[popover] {
7675
- position-anchor: --cascader-anchor;
7676
- top: anchor(bottom);
7677
- left: anchor(left);
7678
- margin-top: 0.25rem;
7679
- position-try-fallbacks: flip-block;
7680
- }
7681
- }
7682
-
7683
- /* Fallback for browsers without anchor positioning */
7684
- @supports not (anchor-name: --anchor) {
7685
- .cascader {
7686
- position: relative;
7687
- }
7688
-
7689
- .cascader-dropdown[popover]:popover-open {
7690
- position: absolute;
7691
- top: 100%;
7692
- left: 0;
7693
- margin-top: 0.25rem;
7691
+ inset: auto;
7692
+ margin-block: 0.25rem;
7693
+ margin-inline: 0;
7694
+ position-area: block-end span-inline-end;
7695
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
7694
7696
  }
7695
7697
  }
7696
7698
 
@@ -12889,8 +12891,10 @@
12889
12891
  /* Popover API Support */
12890
12892
  .tree-select-dropdown[popover] {
12891
12893
  /* Reset browser defaults for proper positioning */
12892
- position: absolute;
12893
- inset: unset;
12894
+ position: fixed;
12895
+ inset: auto 0.5rem 0.5rem auto;
12896
+ max-inline-size: calc(100dvw - 1rem);
12897
+ max-block-size: min(20rem, calc(100dvh - 1rem));
12894
12898
  margin: 0;
12895
12899
  border: 1px solid var(--color-outline-variant);
12896
12900
  }
@@ -12899,18 +12903,15 @@
12899
12903
  display: block;
12900
12904
  }
12901
12905
 
12902
- /* CSS Anchor Positioning for modern browsers */
12903
- @supports (anchor-name: --tree-select) {
12904
- .tree-select {
12905
- anchor-name: --tree-select;
12906
- }
12907
-
12906
+ /* The popovertarget invoker is the implicit anchor for its own dropdown. */
12907
+ @supports (position-area: block-end) {
12908
12908
  .tree-select-dropdown[popover] {
12909
- position-anchor: --tree-select;
12910
- top: anchor(bottom);
12911
- left: anchor(left);
12912
- right: anchor(right);
12913
- position-try-fallbacks: flip-block;
12909
+ inset: auto;
12910
+ inline-size: anchor-size(width);
12911
+ margin-block: 0.25rem;
12912
+ margin-inline: 0;
12913
+ position-area: block-end span-inline-end;
12914
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
12914
12915
  }
12915
12916
  }
12916
12917
 
@@ -145,8 +145,10 @@
145
145
  /* Popover API Support */
146
146
  .tree-select-dropdown[popover] {
147
147
  /* Reset browser defaults for proper positioning */
148
- position: absolute;
149
- inset: unset;
148
+ position: fixed;
149
+ inset: auto 0.5rem 0.5rem auto;
150
+ max-inline-size: calc(100dvw - 1rem);
151
+ max-block-size: min(20rem, calc(100dvh - 1rem));
150
152
  margin: 0;
151
153
  border: 1px solid var(--color-outline-variant);
152
154
  }
@@ -155,18 +157,15 @@
155
157
  display: block;
156
158
  }
157
159
 
158
- /* CSS Anchor Positioning for modern browsers */
159
- @supports (anchor-name: --tree-select) {
160
- .tree-select {
161
- anchor-name: --tree-select;
162
- }
163
-
160
+ /* The popovertarget invoker is the implicit anchor for its own dropdown. */
161
+ @supports (position-area: block-end) {
164
162
  .tree-select-dropdown[popover] {
165
- position-anchor: --tree-select;
166
- top: anchor(bottom);
167
- left: anchor(left);
168
- right: anchor(right);
169
- position-try-fallbacks: flip-block;
163
+ inset: auto;
164
+ inline-size: anchor-size(width);
165
+ margin-block: 0.25rem;
166
+ margin-inline: 0;
167
+ position-area: block-end span-inline-end;
168
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
170
169
  }
171
170
  }
172
171
 
@@ -114,6 +114,23 @@ export const css = `/**
114
114
  background-color: var(--color-surface-container-high);
115
115
  }
116
116
 
117
+ .cascader:has(> .cascader-clear) .cascader-value {
118
+ padding-inline-end: 2rem;
119
+ }
120
+
121
+ .cascader > .cascader-clear {
122
+ position: absolute;
123
+ inset-block-start: 50%;
124
+ inset-inline-end: 2.75rem;
125
+ z-index: 1;
126
+ transform: translateY(-50%);
127
+ }
128
+
129
+ .cascader > .cascader-clear:focus-visible {
130
+ outline: 2px solid currentColor;
131
+ outline-offset: 2px;
132
+ }
133
+
117
134
  /* Cascader Dropdown */
118
135
  .cascader-dropdown {
119
136
  position: absolute;
@@ -135,7 +152,10 @@ export const css = `/**
135
152
 
136
153
  /* Popover API Support */
137
154
  .cascader-dropdown[popover] {
138
- inset: unset;
155
+ position: fixed;
156
+ inset: auto 0.5rem 0.5rem auto;
157
+ max-inline-size: calc(100dvw - 1rem);
158
+ max-block-size: min(16rem, calc(100dvh - 1rem));
139
159
  margin: 0;
140
160
  border: 1px solid var(--color-outline-variant);
141
161
  }
@@ -144,32 +164,14 @@ export const css = `/**
144
164
  display: flex;
145
165
  }
146
166
 
147
- /* CSS Anchor Positioning for modern browsers */
148
- @supports (anchor-name: --anchor) {
149
- .cascader-trigger {
150
- anchor-name: --cascader-anchor;
151
- }
152
-
167
+ /* The popovertarget invoker is the implicit anchor for its own dropdown. */
168
+ @supports (position-area: block-end) {
153
169
  .cascader-dropdown[popover] {
154
- position-anchor: --cascader-anchor;
155
- top: anchor(bottom);
156
- left: anchor(left);
157
- margin-top: 0.25rem;
158
- position-try-fallbacks: flip-block;
159
- }
160
- }
161
-
162
- /* Fallback for browsers without anchor positioning */
163
- @supports not (anchor-name: --anchor) {
164
- .cascader {
165
- position: relative;
166
- }
167
-
168
- .cascader-dropdown[popover]:popover-open {
169
- position: absolute;
170
- top: 100%;
171
- left: 0;
172
- margin-top: 0.25rem;
170
+ inset: auto;
171
+ margin-block: 0.25rem;
172
+ margin-inline: 0;
173
+ position-area: block-end span-inline-end;
174
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
173
175
  }
174
176
  }
175
177
 
@@ -146,8 +146,10 @@ export const css = `/**
146
146
  /* Popover API Support */
147
147
  .tree-select-dropdown[popover] {
148
148
  /* Reset browser defaults for proper positioning */
149
- position: absolute;
150
- inset: unset;
149
+ position: fixed;
150
+ inset: auto 0.5rem 0.5rem auto;
151
+ max-inline-size: calc(100dvw - 1rem);
152
+ max-block-size: min(20rem, calc(100dvh - 1rem));
151
153
  margin: 0;
152
154
  border: 1px solid var(--color-outline-variant);
153
155
  }
@@ -156,18 +158,15 @@ export const css = `/**
156
158
  display: block;
157
159
  }
158
160
 
159
- /* CSS Anchor Positioning for modern browsers */
160
- @supports (anchor-name: --tree-select) {
161
- .tree-select {
162
- anchor-name: --tree-select;
163
- }
164
-
161
+ /* The popovertarget invoker is the implicit anchor for its own dropdown. */
162
+ @supports (position-area: block-end) {
165
163
  .tree-select-dropdown[popover] {
166
- position-anchor: --tree-select;
167
- top: anchor(bottom);
168
- left: anchor(left);
169
- right: anchor(right);
170
- position-try-fallbacks: flip-block;
164
+ inset: auto;
165
+ inline-size: anchor-size(width);
166
+ margin-block: 0.25rem;
167
+ margin-inline: 0;
168
+ position-area: block-end span-inline-end;
169
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
171
170
  }
172
171
  }
173
172
 
package/dist/index.css CHANGED
@@ -8609,6 +8609,23 @@ html {
8609
8609
  background-color: var(--color-surface-container-high);
8610
8610
  }
8611
8611
 
8612
+ .cascader:has(> .cascader-clear) .cascader-value {
8613
+ padding-inline-end: 2rem;
8614
+ }
8615
+
8616
+ .cascader > .cascader-clear {
8617
+ position: absolute;
8618
+ inset-block-start: 50%;
8619
+ inset-inline-end: 2.75rem;
8620
+ z-index: 1;
8621
+ transform: translateY(-50%);
8622
+ }
8623
+
8624
+ .cascader > .cascader-clear:focus-visible {
8625
+ outline: 2px solid currentColor;
8626
+ outline-offset: 2px;
8627
+ }
8628
+
8612
8629
  /* Cascader Dropdown */
8613
8630
  .cascader-dropdown {
8614
8631
  position: absolute;
@@ -8630,7 +8647,10 @@ html {
8630
8647
 
8631
8648
  /* Popover API Support */
8632
8649
  .cascader-dropdown[popover] {
8633
- inset: unset;
8650
+ position: fixed;
8651
+ inset: auto 0.5rem 0.5rem auto;
8652
+ max-inline-size: calc(100dvw - 1rem);
8653
+ max-block-size: min(16rem, calc(100dvh - 1rem));
8634
8654
  margin: 0;
8635
8655
  border: 1px solid var(--color-outline-variant);
8636
8656
  }
@@ -8639,32 +8659,14 @@ html {
8639
8659
  display: flex;
8640
8660
  }
8641
8661
 
8642
- /* CSS Anchor Positioning for modern browsers */
8643
- @supports (anchor-name: --anchor) {
8644
- .cascader-trigger {
8645
- anchor-name: --cascader-anchor;
8646
- }
8647
-
8662
+ /* The popovertarget invoker is the implicit anchor for its own dropdown. */
8663
+ @supports (position-area: block-end) {
8648
8664
  .cascader-dropdown[popover] {
8649
- position-anchor: --cascader-anchor;
8650
- top: anchor(bottom);
8651
- left: anchor(left);
8652
- margin-top: 0.25rem;
8653
- position-try-fallbacks: flip-block;
8654
- }
8655
- }
8656
-
8657
- /* Fallback for browsers without anchor positioning */
8658
- @supports not (anchor-name: --anchor) {
8659
- .cascader {
8660
- position: relative;
8661
- }
8662
-
8663
- .cascader-dropdown[popover]:popover-open {
8664
- position: absolute;
8665
- top: 100%;
8666
- left: 0;
8667
- margin-top: 0.25rem;
8665
+ inset: auto;
8666
+ margin-block: 0.25rem;
8667
+ margin-inline: 0;
8668
+ position-area: block-end span-inline-end;
8669
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
8668
8670
  }
8669
8671
  }
8670
8672
 
@@ -13863,8 +13865,10 @@ html {
13863
13865
  /* Popover API Support */
13864
13866
  .tree-select-dropdown[popover] {
13865
13867
  /* Reset browser defaults for proper positioning */
13866
- position: absolute;
13867
- inset: unset;
13868
+ position: fixed;
13869
+ inset: auto 0.5rem 0.5rem auto;
13870
+ max-inline-size: calc(100dvw - 1rem);
13871
+ max-block-size: min(20rem, calc(100dvh - 1rem));
13868
13872
  margin: 0;
13869
13873
  border: 1px solid var(--color-outline-variant);
13870
13874
  }
@@ -13873,18 +13877,15 @@ html {
13873
13877
  display: block;
13874
13878
  }
13875
13879
 
13876
- /* CSS Anchor Positioning for modern browsers */
13877
- @supports (anchor-name: --tree-select) {
13878
- .tree-select {
13879
- anchor-name: --tree-select;
13880
- }
13881
-
13880
+ /* The popovertarget invoker is the implicit anchor for its own dropdown. */
13881
+ @supports (position-area: block-end) {
13882
13882
  .tree-select-dropdown[popover] {
13883
- position-anchor: --tree-select;
13884
- top: anchor(bottom);
13885
- left: anchor(left);
13886
- right: anchor(right);
13887
- position-try-fallbacks: flip-block;
13883
+ inset: auto;
13884
+ inline-size: anchor-size(width);
13885
+ margin-block: 0.25rem;
13886
+ margin-inline: 0;
13887
+ position-area: block-end span-inline-end;
13888
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
13888
13889
  }
13889
13890
  }
13890
13891