@llmnative/react 2.2.2 → 2.3.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/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -26
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/components/ui/Modal.d.ts +7 -1
- package/llms-full.txt +2 -0
- package/package.json +1 -1
- package/themes/cyber.ts +1 -1
- package/themes/default.ts +1 -1
- package/themes/flat.ts +1 -1
|
@@ -79,6 +79,12 @@ export interface ModalYesNoProps {
|
|
|
79
79
|
/** Async handler for the No button. Return `true` to close. */
|
|
80
80
|
onNo?: (e: React.MouseEvent<HTMLElement>) => Promise<boolean>;
|
|
81
81
|
onClose?: () => void;
|
|
82
|
+
/** The words of the confirming button: the action, e.g. "Revoca" (default "Yes" of the dictionary). */
|
|
83
|
+
yesLabel?: string;
|
|
84
|
+
/** The words of the other button, e.g. "Annulla" (default "No" of the dictionary). */
|
|
85
|
+
noLabel?: string;
|
|
86
|
+
/** The action cannot be undone: the confirming button is red (`danger`) and the other one comes first. */
|
|
87
|
+
danger?: boolean;
|
|
82
88
|
}
|
|
83
89
|
/** Props for a simple acknowledgment modal with an OK button. */
|
|
84
90
|
export interface ModalOkProps {
|
|
@@ -87,6 +93,6 @@ export interface ModalOkProps {
|
|
|
87
93
|
onClose?: () => void;
|
|
88
94
|
}
|
|
89
95
|
declare const Modal: (props: ModalProps) => React.JSX.Element;
|
|
90
|
-
export declare const ModalYesNo: ({ children, title, onYes, onNo, onClose }: ModalYesNoProps) => React.JSX.Element;
|
|
96
|
+
export declare const ModalYesNo: ({ children, title, onYes, onNo, onClose, yesLabel, noLabel, danger }: ModalYesNoProps) => React.JSX.Element;
|
|
91
97
|
export declare const ModalOk: ({ children, title, onClose }: ModalOkProps) => React.JSX.Element;
|
|
92
98
|
export default Modal;
|
package/llms-full.txt
CHANGED
|
@@ -743,6 +743,8 @@ Quando `commands` e presente in `mode="run"`, `Prompt` monta internamente `Conte
|
|
|
743
743
|
{content}
|
|
744
744
|
</Modal>
|
|
745
745
|
<ModalYesNo title="Sicuro?" onClose={() => {}} onYes={async () => true}>Eliminare il record?</ModalYesNo>
|
|
746
|
+
// Un'azione che non si annulla: nominala e mettila in rosso (CR-128); "Annulla" viene per primo.
|
|
747
|
+
<ModalYesNo title="Revocare l'invito?" danger yesLabel="Revoca" noLabel="Annulla" onYes={revoke} onNo={async () => true}>La persona non potrà più usare il link.</ModalYesNo>
|
|
746
748
|
<ModalOk title="Completato!" onClose={() => {}}>Salvato.</ModalOk>
|
|
747
749
|
```
|
|
748
750
|
`size`: `'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'fullscreen'`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmnative/react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "LLM-native React framework for deterministic UI generation. Data-driven by default, schema-driven optional. Ultra-low token consumption — built for AI agents, not just humans.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
package/themes/cyber.ts
CHANGED
package/themes/default.ts
CHANGED