@firecms/ui 3.0.0-canary.80 → 3.0.0-canary.82
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/components/RadioGroup.d.ts +1 -0
- package/dist/index.es.js +12592 -12258
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +20648 -25
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/components/RadioGroup.tsx +1 -0
- package/src/components/Select.tsx +15 -14
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@firecms/ui",
|
3
3
|
"type": "module",
|
4
|
-
"version": "3.0.0-canary.
|
4
|
+
"version": "3.0.0-canary.82",
|
5
5
|
"description": "Awesome Firebase/Firestore-based headless open-source CMS",
|
6
6
|
"funding": {
|
7
7
|
"url": "https://github.com/sponsors/firecmsco"
|
@@ -102,7 +102,7 @@
|
|
102
102
|
"src",
|
103
103
|
"tailwind.config.js"
|
104
104
|
],
|
105
|
-
"gitHead": "
|
105
|
+
"gitHead": "5bd98b85c3f5c0c9a08860188e15e2687f1d0542",
|
106
106
|
"publishConfig": {
|
107
107
|
"access": "public"
|
108
108
|
}
|
@@ -143,21 +143,22 @@ export function Select({
|
|
143
143
|
"overflow-visible",
|
144
144
|
size === "small" ? "h-[42px]" : "h-[64px]"
|
145
145
|
)}>
|
146
|
-
<SelectPrimitive.Value placeholder={placeholder}>
|
147
|
-
{
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
{
|
152
|
-
|
153
|
-
|
146
|
+
<SelectPrimitive.Value placeholder={placeholder} asChild>
|
147
|
+
<div className={"flex w-full"}>
|
148
|
+
{renderValue &&
|
149
|
+
(hasValue && Array.isArray(value)
|
150
|
+
? value.map((v, i) => (
|
151
|
+
<div key={v} className={"flex items-center gap-1 max-w-full"}>
|
152
|
+
{renderValue ? renderValue(v, i) : v}
|
153
|
+
</div>))
|
154
|
+
: (typeof value === "string" ? (renderValue ? renderValue(value, 0) : value) : placeholder))}
|
154
155
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
{!renderValue && !renderValues && hasValue}
|
156
|
+
{renderValues && (!hasValue || Array.isArray(value))
|
157
|
+
? renderValues(value as string[] ?? [])
|
158
|
+
: null}
|
160
159
|
|
160
|
+
{!renderValue && !renderValues && hasValue}
|
161
|
+
</div>
|
161
162
|
</SelectPrimitive.Value>
|
162
163
|
</div>
|
163
164
|
|
@@ -217,7 +218,7 @@ export function SelectItem({
|
|
217
218
|
}}
|
218
219
|
className={cls(
|
219
220
|
"w-full",
|
220
|
-
"relative
|
221
|
+
"relative flex items-center p-2 rounded-md text-sm text-slate-700 dark:text-slate-300",
|
221
222
|
focusedMixin,
|
222
223
|
"focus:z-10",
|
223
224
|
"data-[state=checked]:bg-slate-100 data-[state=checked]:dark:bg-slate-900 focus:bg-slate-100 dark:focus:bg-slate-950",
|