@kushagradhawan/kookie-ui 0.1.77 → 0.1.79
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/components.css +69 -29
- package/dist/cjs/components/combobox.d.ts +57 -7
- package/dist/cjs/components/combobox.d.ts.map +1 -1
- package/dist/cjs/components/combobox.js +1 -1
- package/dist/cjs/components/combobox.js.map +3 -3
- package/dist/cjs/components/text-field.d.ts +2 -2
- package/dist/cjs/components/text-field.d.ts.map +1 -1
- package/dist/cjs/components/text-field.js +2 -2
- package/dist/cjs/components/text-field.js.map +3 -3
- package/dist/cjs/components/text-field.props.d.ts +26 -0
- package/dist/cjs/components/text-field.props.d.ts.map +1 -1
- package/dist/cjs/components/text-field.props.js +1 -1
- package/dist/cjs/components/text-field.props.js.map +1 -1
- package/dist/esm/components/combobox.d.ts +57 -7
- package/dist/esm/components/combobox.d.ts.map +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/combobox.js.map +3 -3
- package/dist/esm/components/text-field.d.ts +2 -2
- package/dist/esm/components/text-field.d.ts.map +1 -1
- package/dist/esm/components/text-field.js +2 -2
- package/dist/esm/components/text-field.js.map +3 -3
- package/dist/esm/components/text-field.props.d.ts +26 -0
- package/dist/esm/components/text-field.props.d.ts.map +1 -1
- package/dist/esm/components/text-field.props.js +1 -1
- package/dist/esm/components/text-field.props.js.map +1 -1
- package/package.json +2 -2
- package/schemas/base-button.json +1 -1
- package/schemas/button.json +1 -1
- package/schemas/icon-button.json +1 -1
- package/schemas/index.json +6 -6
- package/schemas/toggle-button.json +1 -1
- package/schemas/toggle-icon-button.json +1 -1
- package/src/components/combobox.css +56 -55
- package/src/components/combobox.tsx +305 -73
- package/src/components/text-field.css +83 -0
- package/src/components/text-field.props.tsx +28 -0
- package/src/components/text-field.tsx +222 -5
- package/styles.css +69 -29
|
@@ -10,6 +10,17 @@
|
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/*
|
|
14
|
+
* Hide content when closed (forceMount keeps items mounted for label registration).
|
|
15
|
+
* Using visibility + position to keep items in DOM for label registration while
|
|
16
|
+
* making them invisible and non-interactive.
|
|
17
|
+
*/
|
|
18
|
+
.rt-ComboboxContent:where([data-state='closed']) {
|
|
19
|
+
visibility: hidden;
|
|
20
|
+
position: absolute;
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
13
24
|
.rt-ComboboxCommand {
|
|
14
25
|
display: flex;
|
|
15
26
|
flex-direction: column;
|
|
@@ -39,11 +50,17 @@
|
|
|
39
50
|
--base-menu-item-padding-left: var(--space-5);
|
|
40
51
|
}
|
|
41
52
|
|
|
42
|
-
/*
|
|
53
|
+
/*
|
|
54
|
+
* Override disabled styles when data-disabled is false or empty (cmdk may set it incorrectly).
|
|
55
|
+
* This CSS-only approach replaces the per-item MutationObserver workaround for better performance.
|
|
56
|
+
* We reset all visual properties that base-menu applies to [data-disabled] items.
|
|
57
|
+
*/
|
|
43
58
|
.rt-BaseMenuContent :where(.rt-BaseMenuItem.rt-ComboboxItem[data-disabled='false']),
|
|
44
59
|
.rt-BaseMenuContent :where(.rt-BaseMenuItem.rt-ComboboxItem[data-disabled='']) {
|
|
45
60
|
color: inherit !important;
|
|
46
61
|
cursor: var(--cursor-menu-item) !important;
|
|
62
|
+
opacity: 1 !important;
|
|
63
|
+
pointer-events: auto !important;
|
|
47
64
|
}
|
|
48
65
|
|
|
49
66
|
/* Sticky search input with consistent padding */
|
|
@@ -69,67 +86,51 @@
|
|
|
69
86
|
min-height: 0;
|
|
70
87
|
}
|
|
71
88
|
|
|
72
|
-
/*
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
}
|
|
89
|
+
/*
|
|
90
|
+
* Map cmdk's data-selected state to highlighted styling.
|
|
91
|
+
* Mirrors base-menu's [data-highlighted] styling but for cmdk's [data-selected].
|
|
92
|
+
*
|
|
93
|
+
* IMPORTANT: background-color applies only to the item itself.
|
|
94
|
+
* color is explicitly set on ALL descendants (* selector) because user content
|
|
95
|
+
* (Flex, icons, text) may have intermediate wrappers that break CSS inheritance.
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
/* Solid variant - highlighted item */
|
|
99
|
+
.rt-BaseMenuContent:where(.rt-variant-solid) :where(.rt-ComboboxItem[data-selected='true']) {
|
|
100
|
+
background-color: var(--accent-9);
|
|
101
|
+
color: var(--accent-contrast);
|
|
87
102
|
}
|
|
88
103
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
background-color: var(--accent-4);
|
|
93
|
-
|
|
94
|
-
:where([data-panel-background='translucent'], [data-material='translucent']) & {
|
|
95
|
-
background-color: var(--accent-a4);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&:where([data-panel-background='solid'], [data-material='solid']) {
|
|
99
|
-
background-color: var(--accent-4);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
&:where([data-panel-background='translucent'], [data-material='translucent']) {
|
|
103
|
-
background-color: var(--accent-a4);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
104
|
+
/* Force color on all descendants (text, icons, wrappers) */
|
|
105
|
+
.rt-BaseMenuContent:where(.rt-variant-solid) :where(.rt-ComboboxItem[data-selected='true']) * {
|
|
106
|
+
color: var(--accent-contrast) !important;
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
color: var(--accent-1);
|
|
109
|
+
/* Soft variant - highlighted item */
|
|
110
|
+
.rt-BaseMenuContent:where(.rt-variant-soft) :where(.rt-ComboboxItem[data-selected='true']) {
|
|
111
|
+
background-color: var(--accent-4);
|
|
112
|
+
}
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
:where([data-panel-background='translucent'], [data-material='translucent']) .rt-BaseMenuContent:where(.rt-variant-soft) :where(.rt-ComboboxItem[data-selected='true']) {
|
|
115
|
+
background-color: var(--accent-a4);
|
|
116
|
+
}
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
/* High contrast - highlighted item */
|
|
119
|
+
.rt-BaseMenuContent:where(.rt-high-contrast) :where(.rt-ComboboxItem[data-selected='true']) {
|
|
120
|
+
background-color: var(--accent-12);
|
|
121
|
+
color: var(--accent-1);
|
|
122
|
+
}
|
|
121
123
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
.rt-BaseMenuContent:where(.rt-high-contrast) :where(.rt-ComboboxItem[data-selected='true']) * {
|
|
125
|
+
color: var(--accent-1) !important;
|
|
126
|
+
}
|
|
125
127
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
/* High contrast with accent color */
|
|
129
|
+
.rt-BaseMenuContent:where(.rt-high-contrast[data-accent-color]) :where(.rt-ComboboxItem[data-selected='true']) {
|
|
130
|
+
background-color: var(--accent-9);
|
|
131
|
+
color: var(--accent-contrast);
|
|
132
|
+
}
|
|
129
133
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
134
|
+
.rt-BaseMenuContent:where(.rt-high-contrast[data-accent-color]) :where(.rt-ComboboxItem[data-selected='true']) * {
|
|
135
|
+
color: var(--accent-contrast) !important;
|
|
135
136
|
}
|