@llmnative/react 1.19.4 → 1.20.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.
@@ -173,6 +173,12 @@ export interface I18nDict {
173
173
  dragToResize: string;
174
174
  dragHere: string;
175
175
  };
176
+ sideNav: {
177
+ expandGroup: string;
178
+ collapseGroup: string;
179
+ expandSidebar: string;
180
+ collapseSidebar: string;
181
+ };
176
182
  addressAutocomplete: {
177
183
  placeholder: string;
178
184
  noResults: string;
@@ -38,6 +38,8 @@ export interface ModalProps extends MotionUIProps {
38
38
  footerClassName?: string;
39
39
  /** Close the modal when the user clicks the backdrop. Defaults to `true`. */
40
40
  closeOnBackdrop?: boolean;
41
+ /** Close the modal with the Escape key (only the top-most open modal reacts). Defaults to `true`. */
42
+ closeOnEscape?: boolean;
41
43
  /** CSS `z-index` override (useful when stacking modals). */
42
44
  zIndex?: number;
43
45
  /**
package/llms-full.txt CHANGED
@@ -551,11 +551,13 @@ Quando `commands` e presente in `mode="run"`, `Prompt` monta internamente `Conte
551
551
  <Modal title="Conferma" size="md" position="center" onClose={() => {}} onSave={handleSave} onDelete={handleDelete} motion="fade" allowFullscreen stackedBehind>
552
552
  {content}
553
553
  </Modal>
554
- <Modal.YesNo title="Sicuro?" onClose={() => {}} onYes={async () => true} />
555
- <Modal.Ok title="Completato!" onClose={() => {}} />
554
+ <ModalYesNo title="Sicuro?" onClose={() => {}} onYes={async () => true}>Eliminare il record?</ModalYesNo>
555
+ <ModalOk title="Completato!" onClose={() => {}}>Salvato.</ModalOk>
556
556
  ```
557
557
  `size`: `'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'fullscreen'`
558
558
  `position`: `'center' | 'top' | 'left' | 'right' | 'bottom'`
559
+ `ModalYesNo` e `ModalOk` sono export separati: `Modal.YesNo` e `Modal.Ok` non esistono.
560
+ Tastiera: Esc chiude il modal in cima alla pila (`closeOnEscape`, default `true`).
559
561
  Accessibilità: il dialog ha `role="dialog"`, `aria-modal="true"` (non con `stackedBehind`) e `aria-labelledby` verso `title` (o `header` stringa) — nei test si trova con `getByRole('dialog', { name })`.
560
562
 
561
563
  | Prop | Tipo | Note |
@@ -570,6 +572,7 @@ Accessibilità: il dialog ha `role="dialog"`, `aria-modal="true"` (non con `stac
570
572
  | `showCancel` | `boolean` | Default `true` |
571
573
  | `stackedBehind` | `boolean` | Modal seconda in pila |
572
574
  | `closeOnBackdrop` | `boolean` | Default `true` |
575
+ | `closeOnEscape` | `boolean` | Default `true` — solo il modal in cima reagisce |
573
576
  | `zIndex` | `number` | |
574
577
  | `motion` | `MotionReference` | Preset animazione |
575
578
  | Classi CSS header/title/subtitle/body/footer | `string` | |
@@ -642,12 +645,15 @@ Accessibilità: il dialog ha `role="dialog"`, `aria-modal="true"` (non con `stac
642
645
 
643
646
  ### Tab
644
647
  ```tsx
648
+ import { Tab, TabItem } from '@llmnative/react'
649
+
645
650
  <Tab defaultIndex={0} layout="top">
646
- <Tab.Item label="Generale">{content1}</Tab.Item>
647
- <Tab.Item label="SEO">{content2}</Tab.Item>
651
+ <TabItem label="Generale">{content1}</TabItem>
652
+ <TabItem label="SEO">{content2}</TabItem>
648
653
  </Tab>
649
654
  ```
650
655
  `layout`: `'default' | 'top' | 'left' | 'right' | 'bottom'`
656
+ Le schede sono `<TabItem>`, export separato: `Tab.Item` non esiste.
651
657
 
652
658
  ### Image
653
659
  ```tsx
@@ -760,7 +766,8 @@ utile quando un comando cambia famiglia sintattica (per esempio da `{{ ... }}` a
760
766
  ```tsx
761
767
  <Icon name="user" size={20} /> // usa provider icone configurato
762
768
  <ImageAvatar src="..." label="Mario" size={40} />
763
- <Loader /> // spinner
769
+ <Loader show={isLoading}>{content}</Loader> // indicatore al posto dei figli finché show è true
770
+ <Loader show>{null}</Loader> // solo indicatore (es. pagina in caricamento)
764
771
  <Code language="tsx">{snippet}</Code> // syntax highlight
765
772
  <GridSystem.Row><GridSystem.Col xs={12} md={6}>...</GridSystem.Col></GridSystem.Row>
766
773
  <LocaleSwitcher locales={[{ code: 'it', label: 'Italiano' }]} />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/react",
3
- "version": "1.19.4",
3
+ "version": "1.20.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",