mnfst 0.5.145 → 0.5.147

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.
@@ -0,0 +1,208 @@
1
+ /* Manifest Combobox */
2
+
3
+ @layer components {
4
+
5
+ /* Field shell — inherits input tokens so it reads as a normal field */
6
+ :where(.combobox):not(.unstyle) {
7
+ display: flex;
8
+ flex-wrap: wrap;
9
+ align-items: center;
10
+ gap: var(--spacing, 0.25rem);
11
+ width: 100%;
12
+ max-width: 100%;
13
+ min-height: var(--spacing-field-height, 2.25rem);
14
+ padding: calc(var(--spacing, 0.25rem) * 1.25) var(--spacing-field-padding, 0.625rem);
15
+ color: var(--color-field-inverse, oklch(43.9% 0 0));
16
+ background-color: var(--color-field-surface, color-mix(in oklch, oklch(20.5% 0 0) 10%, transparent));
17
+ border-radius: var(--radius, 0.5rem);
18
+ transition: var(--transition);
19
+ cursor: text;
20
+
21
+ &:hover:has(> :where(input:not([type=hidden]), textarea, button):not([hidden])) {
22
+ background-color: var(--color-field-surface-hover, color-mix(in oklch, oklch(20.5% 0 0) 15%, transparent))
23
+ }
24
+
25
+ &:not(:has(> :where(input:not([type=hidden]), textarea, button):not([hidden]))) {
26
+ cursor: default
27
+ }
28
+
29
+ &:focus-within {
30
+ background-color: var(--color-field-surface, color-mix(in oklch, oklch(20.5% 0 0) 10%, transparent));
31
+ box-shadow: 0 0 0 2px color-mix(in oklch, var(--color-content-stark, oklch(43.9% 0 0)) 30%, transparent)
32
+ }
33
+
34
+ &:has(.combobox-chip) {
35
+ padding-inline: calc(var(--spacing, 0.25rem) * 1.25)
36
+ }
37
+
38
+ &:has(> :where(input, textarea):disabled) {
39
+ opacity: .5;
40
+ pointer-events: none
41
+ }
42
+
43
+ /* Inner typing surface */
44
+ &> :where(input:not([type=hidden]), textarea) {
45
+ flex: 1 0 auto;
46
+ width: auto;
47
+ min-width: 7rem;
48
+ height: auto;
49
+ margin: 0;
50
+ padding: 0;
51
+ color: inherit;
52
+ background: transparent;
53
+ field-sizing: content;
54
+
55
+ &:hover,
56
+ &:focus-visible {
57
+ background: transparent;
58
+ box-shadow: none
59
+ }
60
+ }
61
+
62
+ &>textarea {
63
+ resize: none
64
+ }
65
+ }
66
+
67
+ /* Chips */
68
+ :where(.combobox-chip):not(.unstyle) {
69
+ display: inline-flex;
70
+ align-items: center;
71
+ gap: var(--spacing, 0.25rem);
72
+ max-width: 100%;
73
+ height: calc(var(--spacing-field-height, 2.25rem) - var(--spacing, 0.25rem) * 2.5);
74
+ padding-inline-start: calc(var(--spacing, 0.25rem) * 2);
75
+ font-size: 0.875rem;
76
+ color: var(--color-content-stark, oklch(43.9% 0 0));
77
+ background-color: var(--color-popover-surface, oklch(100% 0 0));
78
+ border-radius: calc(var(--radius, 0.5rem) * 0.7);
79
+ overflow: hidden;
80
+ user-select: none;
81
+
82
+ /* Label */
83
+ &>span {
84
+ overflow: hidden;
85
+ text-overflow: ellipsis;
86
+ white-space: nowrap
87
+ }
88
+
89
+ /* Remove button */
90
+ &>button {
91
+ display: inline-flex;
92
+ align-items: center;
93
+ justify-content: center;
94
+ min-width: 0;
95
+ height: 100%;
96
+ aspect-ratio: 1 / 1;
97
+ padding: 0;
98
+ font-size: 1em;
99
+ line-height: 1;
100
+ color: var(--color-content-neutral, oklch(43.9% 0 0));
101
+ background: transparent;
102
+ border-radius: 0;
103
+ cursor: pointer;
104
+
105
+ &:hover {
106
+ color: var(--color-content-stark, oklch(43.9% 0 0));
107
+ background: color-mix(in oklch, var(--color-content-stark, oklch(43.9% 0 0)) 12%, transparent)
108
+ }
109
+ }
110
+
111
+ /* Failed validation */
112
+ &[aria-invalid="true"] {
113
+ color: var(--color-negative-inverse, oklch(44.4% 0.177 26.899));
114
+ background-color: var(--color-negative-surface, oklch(80.8% 0.114 19.571))
115
+ }
116
+ }
117
+
118
+ /* Trigger (editor:none button mode) — transparent; the shell is the field.
119
+ Fills the row like the input editor, with a select-style caret. */
120
+ :where(.combobox) > button:not(.unstyle) {
121
+ flex: 1 1 auto;
122
+ align-self: stretch;
123
+ min-width: 7rem;
124
+ justify-content: flex-start;
125
+ gap: var(--spacing, 0.25rem);
126
+ height: auto;
127
+ min-height: calc(var(--spacing-field-height, 2.25rem) - var(--spacing, 0.25rem) * 2.5);
128
+ padding: 0;
129
+ color: inherit;
130
+ background: transparent;
131
+ cursor: pointer;
132
+
133
+ &:hover {
134
+ background: transparent
135
+ }
136
+
137
+ /* Caret */
138
+ &::after {
139
+ content: '';
140
+ flex: none;
141
+ width: 1em;
142
+ height: 1em;
143
+ margin-inline-start: auto;
144
+ background-color: var(--color-content-subtle, oklch(55.6% 0 0));
145
+ mask: var(--icon-chevron-down, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E")) center / contain no-repeat
146
+ }
147
+ }
148
+
149
+ /* Button-only field (no chips): the button IS the field — it fills the whole
150
+ wrapper and carries the padding, so the entire area is the click target. */
151
+ :where(.combobox):has(> button:not(.unstyle)):not(:has(.combobox-chip)) {
152
+ padding: 0;
153
+
154
+ &>button:not(.unstyle) {
155
+ min-height: var(--spacing-field-height, 2.25rem);
156
+ padding: calc(var(--spacing, 0.25rem) * 1.25) var(--spacing-field-padding, 0.625rem)
157
+ }
158
+ }
159
+
160
+ /* Listbox — base look comes from menu[popover]; these are combobox-only extras */
161
+ :where(menu[role=listbox]):not(.unstyle) {
162
+
163
+ /* Active descendant (mirrors hover) */
164
+ & :where([role=option][aria-current="true"]) {
165
+ color: var(--color-field-inverse, oklch(43.9% 0 0));
166
+ background-color: var(--color-field-surface, color-mix(in oklch, oklch(20.5% 0 0) 10%, transparent))
167
+ }
168
+
169
+ /* Filtered out */
170
+ & :where([role=option][hidden]) {
171
+ display: none
172
+ }
173
+
174
+ /* Selected (multiple) */
175
+ & :where([role=option][aria-selected="true"]) {
176
+ font-weight: 600
177
+ }
178
+
179
+ /* "Add …" create row */
180
+ & :where(.combobox-create) {
181
+ color: var(--color-content-neutral, oklch(43.9% 0 0))
182
+ }
183
+
184
+ /* Empty state */
185
+ & :where(.combobox-empty) {
186
+ padding: 0.5rem;
187
+ color: var(--color-content-subtle, oklch(55.6% 0 0));
188
+ cursor: default;
189
+
190
+ &:hover {
191
+ background: transparent
192
+ }
193
+ }
194
+ }
195
+
196
+ /* Screen-reader-only live region */
197
+ :where(.combobox)> :where([role=status]) {
198
+ position: absolute;
199
+ width: 1px;
200
+ height: 1px;
201
+ margin: -1px;
202
+ padding: 0;
203
+ overflow: hidden;
204
+ clip: rect(0 0 0 0);
205
+ white-space: nowrap;
206
+ border: 0
207
+ }
208
+ }