@nocode-factory/sanity-kit 2.30.0 → 2.31.0
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/bin/ncf-kit.mjs +16 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/form/OverrideInput.tsx +15 -2
- package/src/version.ts +1 -1
package/package.json
CHANGED
|
@@ -161,11 +161,24 @@ export function createOverrideInput(config: ResolvedKitConfig): ComponentType<In
|
|
|
161
161
|
</Flex>
|
|
162
162
|
)}
|
|
163
163
|
{inherits && placeholder === null && (
|
|
164
|
-
<
|
|
164
|
+
<Flex align="center" gap={2} marginTop={2} wrap="wrap">
|
|
165
165
|
<Text size={0} muted>
|
|
166
166
|
Component default value: {describeValue(inherited)}
|
|
167
167
|
</Text>
|
|
168
|
-
|
|
168
|
+
{/* Liste d'items (cartes, boutons, chiffres...) : la recopier dans
|
|
169
|
+
l'instance pour n'en modifier que ce qu'on veut, au lieu de tout
|
|
170
|
+
recréer. Tout composant à liste d'items en profite, sans réglage. */}
|
|
171
|
+
{Array.isArray(inherited) && !inputProps.readOnly && (
|
|
172
|
+
<Button
|
|
173
|
+
mode="ghost"
|
|
174
|
+
tone="primary"
|
|
175
|
+
fontSize={0}
|
|
176
|
+
padding={2}
|
|
177
|
+
text="Edit default items"
|
|
178
|
+
onClick={() => inputProps.onChange(set(structuredClone(inherited)))}
|
|
179
|
+
/>
|
|
180
|
+
)}
|
|
181
|
+
</Flex>
|
|
169
182
|
)}
|
|
170
183
|
</Box>
|
|
171
184
|
{/* Formulaire en lecture seule (vue « Publié », version planifiée, droits) :
|
package/src/version.ts
CHANGED