@llmnative/react 1.19.5 → 1.21.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.
@@ -56,6 +56,7 @@ export interface SideNavTheme {
56
56
  overlayClassName?: string;
57
57
  headerClassName?: string;
58
58
  navClassName?: string;
59
+ bottomNavClassName?: string;
59
60
  footerClassName?: string;
60
61
  groupLabelClassName?: string;
61
62
  groupDividerClassName?: string;
@@ -24,6 +24,12 @@ export interface SideNavProps {
24
24
  menuKey?: string;
25
25
  /** Explicit items — alternative to menuKey */
26
26
  items?: SideNavItemDef[];
27
+ /**
28
+ * Items pinned at the bottom of the sidebar, above the footer and outside the scrolling
29
+ * list (e.g. Settings). Same shape as `items`: groups, children, badges and active state
30
+ * work the same way. In `embedded` mode they follow the main items, separated by a border.
31
+ */
32
+ bottomItems?: SideNavItemDef[];
27
33
  /** Initial collapsed state for UNCONTROLLED usage (ignored once `collapsed` is passed —
28
34
  * see below). Default false. */
29
35
  defaultCollapsed?: boolean;
@@ -59,4 +65,4 @@ export interface SideNavProps {
59
65
  */
60
66
  embedded?: boolean;
61
67
  }
62
- export default function SideNav({ menuKey, items: itemsProp, defaultCollapsed, collapsed: collapsedProp, onCollapsedChange, showIcons, showCollapseButton, footer, header, embedded, }: SideNavProps): React.JSX.Element | null;
68
+ export default function SideNav({ menuKey, items: itemsProp, bottomItems, defaultCollapsed, collapsed: collapsedProp, onCollapsedChange, showIcons, showCollapseButton, footer, header, embedded, }: SideNavProps): React.JSX.Element | null;
@@ -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` | |
@@ -762,7 +765,7 @@ utile quando un comando cambia famiglia sintattica (per esempio da `{{ ... }}` a
762
765
  ### Altre primitive
763
766
  ```tsx
764
767
  <Icon name="user" size={20} /> // usa provider icone configurato
765
- <ImageAvatar src="..." label="Mario" size={40} />
768
+ <ImageAvatar src="..." title="Mario" alt="Mario" width={40} height={40} />
766
769
  <Loader show={isLoading}>{content}</Loader> // indicatore al posto dei figli finché show è true
767
770
  <Loader show>{null}</Loader> // solo indicatore (es. pagina in caricamento)
768
771
  <Code language="tsx">{snippet}</Code> // syntax highlight
@@ -799,6 +802,37 @@ utile quando un comando cambia famiglia sintattica (per esempio da `{{ ... }}` a
799
802
  | `width` / `height` | `number` |
800
803
  | `wrapperClassName` / `className` / `logoClassName` / `labelClassName` | `string` |
801
804
 
805
+ **SideNav:**
806
+ | Prop | Tipo |
807
+ |---|---|
808
+ | `items` | `SideNavItemDef[]` (in alternativa a `menuKey`) |
809
+ | `menuKey` | `string` — voci dal menu registrato in `<App>` |
810
+ | `bottomItems` | `SideNavItemDef[]` — voci fissate in fondo, sopra il footer e fuori dalla lista scorrevole (es. Impostazioni) |
811
+ | `header` / `footer` | `ReactNode` |
812
+ | `collapsed` + `onCollapsedChange` / `defaultCollapsed` | `boolean` — compressione controllata o no |
813
+ | `showIcons` / `showCollapseButton` | `boolean` (default `true`) |
814
+ | `embedded` | `boolean` — solo le voci, senza guscio (drawer, pannelli); `bottomItems` seguono le voci principali |
815
+
816
+ `SideNavItemDef`: `{ path, title?, icon?, group?, end?, badge?, children? }`. La voce attiva ha
817
+ `aria-current="page"`.
818
+
819
+ ```tsx
820
+ <SideNav
821
+ items={[{ path: '/dashboard', title: 'Dashboard', icon: 'home' }]}
822
+ bottomItems={[{ path: '/settings', title: 'Impostazioni', icon: 'settings' }]}
823
+ />
824
+ ```
825
+
826
+ **ImageAvatar:**
827
+ | Prop | Tipo |
828
+ |---|---|
829
+ | `src` | `string` (obbligatoria) |
830
+ | `width` / `height` | `number` |
831
+ | `title` / `alt` | `string` |
832
+ | `fit` | `AvatarFit` |
833
+ | `badge` | `BadgeDescriptor` |
834
+ | `feedback` | `ReactNode` |
835
+
802
836
  **Search:**
803
837
  | Prop | Tipo |
804
838
  |---|---|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/react",
3
- "version": "1.19.5",
3
+ "version": "1.21.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
@@ -353,6 +353,7 @@ export const components: Theme = {
353
353
  overlayClassName: 'shadow-[0_0_32px_rgba(16,185,129,0.18)]',
354
354
  headerClassName: 'border-b border-border px-1.5 py-2',
355
355
  navClassName: 'px-1.5 py-2',
356
+ bottomNavClassName: 'border-t border-border px-1.5 py-2',
356
357
  footerClassName: 'border-t border-border px-1.5 py-2',
357
358
  groupLabelClassName: 'text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground/70 select-none',
358
359
  groupDividerClassName: 'bg-border/70',
package/themes/default.ts CHANGED
@@ -367,6 +367,7 @@ export const components: Theme = {
367
367
  overlayClassName: 'shadow-xl',
368
368
  headerClassName: 'border-b border-border/60 px-1.5 py-2',
369
369
  navClassName: 'px-1.5 py-2',
370
+ bottomNavClassName: 'border-t border-border/60 px-1.5 py-2',
370
371
  footerClassName: 'border-t border-border/60 px-1.5 py-2',
371
372
  groupLabelClassName: 'text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/60 select-none',
372
373
  groupDividerClassName: 'bg-border/50',
package/themes/flat.ts CHANGED
@@ -353,6 +353,7 @@ export const components: Theme = {
353
353
  overlayClassName: 'shadow-lg',
354
354
  headerClassName: 'border-b border-border px-1.5 py-2',
355
355
  navClassName: 'px-1.5 py-2',
356
+ bottomNavClassName: 'border-t border-border px-1.5 py-2',
356
357
  footerClassName: 'border-t border-border px-1.5 py-2',
357
358
  groupLabelClassName: 'text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/70 select-none',
358
359
  groupDividerClassName: 'bg-border/60',