@neo-design/mui 1.0.0-rc.4

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.
Files changed (54) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/package.json +38 -0
  4. package/theme/alert-icons.mjs +16 -0
  5. package/theme/baseline.mjs +17 -0
  6. package/theme/checkbox-icons.mjs +12 -0
  7. package/theme/chip-icon.mjs +8 -0
  8. package/theme/components.mjs +982 -0
  9. package/theme/custom-css.mjs +44 -0
  10. package/theme/index.d.ts +9 -0
  11. package/theme/index.mjs +7 -0
  12. package/theme/locale.mjs +11 -0
  13. package/theme/neo.d.ts +105 -0
  14. package/theme/select-icon.mjs +8 -0
  15. package/theme/slices.mjs +37 -0
  16. package/ui/Alert.mjs +39 -0
  17. package/ui/AspectRatio.mjs +26 -0
  18. package/ui/Badge.mjs +39 -0
  19. package/ui/Banner.mjs +57 -0
  20. package/ui/Button.mjs +31 -0
  21. package/ui/ButtonIcon.mjs +22 -0
  22. package/ui/Checkbox.mjs +30 -0
  23. package/ui/Chips.mjs +16 -0
  24. package/ui/ChipsGroup.mjs +53 -0
  25. package/ui/Combobox.mjs +41 -0
  26. package/ui/EmptyState.mjs +31 -0
  27. package/ui/Link.mjs +11 -0
  28. package/ui/Menu.mjs +73 -0
  29. package/ui/ModalDialog.mjs +14 -0
  30. package/ui/ModalFullscreen.mjs +20 -0
  31. package/ui/RadioButton.mjs +23 -0
  32. package/ui/RadioGroup.mjs +16 -0
  33. package/ui/Select.mjs +35 -0
  34. package/ui/Snackbar.mjs +29 -0
  35. package/ui/Spinner.mjs +12 -0
  36. package/ui/Tabs.mjs +46 -0
  37. package/ui/Tag.mjs +16 -0
  38. package/ui/TextArea.mjs +45 -0
  39. package/ui/TextField.mjs +47 -0
  40. package/ui/Toggle.mjs +27 -0
  41. package/ui/Tooltip.mjs +20 -0
  42. package/ui/_alias-props.mjs +26 -0
  43. package/ui/_css-layers.mjs +15 -0
  44. package/ui/_help.mjs +25 -0
  45. package/ui/_icon.mjs +43 -0
  46. package/ui/_inner-input.mjs +7 -0
  47. package/ui/_keyboard-focus.mjs +24 -0
  48. package/ui/_modal-base.mjs +95 -0
  49. package/ui/_overflow.mjs +21 -0
  50. package/ui/_reveal.mjs +17 -0
  51. package/ui/_select-value.mjs +18 -0
  52. package/ui/_warn.mjs +13 -0
  53. package/ui/index.d.ts +693 -0
  54. package/ui/index.mjs +35 -0
package/ui/index.d.ts ADDED
@@ -0,0 +1,693 @@
1
+ // packages/mui/ui/index.d.ts — GENERATED, do not edit by hand.
2
+ //
3
+ //
4
+ // THE REFERENCE BELOW IS NOT DECORATIVE. `package.json` points `types` at this file, and
5
+ // TypeScript only loads what it REACHES from there: a loose .d.ts inside the package is not read. The
6
+ // augmentations over MUI —the `theme.neo.*` node, the `xxl` breakpoint, `color="brand"` and the 22
7
+ // Typography variants— live in theme/neo.d.ts, and without this line NONE of that exists for the
8
+ // consumer: everything EXAMPLES.md and TOKENS-GUIDE.md teach would be a compile error.
9
+ /// <reference path="../theme/neo.d.ts" />
10
+ import type { ReactNode, ReactElement, ForwardRefExoticComponent, RefAttributes, Ref, ChangeEvent, SyntheticEvent } from 'react';
11
+ import type { SxProps, Theme, ThemeOptions } from '@mui/material/styles';
12
+
13
+ /** Ready-made MUI theme — mount it ONCE with ThemeProvider + CssBaseline. Also in `@neo-design/mui/theme`. */
14
+ export declare const theme: Theme;
15
+ export declare const themeOptions: ThemeOptions;
16
+
17
+ /** Communicates system messages the user needs to read. NO: Not for decoration or for navigation states. For the state of an element it is `badge`; for a classification it is `tag`. */
18
+ export interface NeoAlertProps {
19
+ /** the semantic nature of the message — the color, the icon and the ARIA role derive from it (C6) Default: 'info'. */
20
+ type?: 'info' | 'success' | 'warning' | 'error';
21
+ /** The title. It is a prop and not content because `aria-labelledby` anchors to it. */
22
+ title?: ReactNode;
23
+ /** The content. Whoever uses the component provides it; in the stories it comes from the minimal example. */
24
+ children?: ReactNode;
25
+ /** The close handler. Its presence draws the ✕. */
26
+ onClose?: (...args: unknown[]) => void;
27
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
28
+ className?: string;
29
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
30
+ sx?: SxProps<Theme>;
31
+ /** The rest flows to the base MUI component. */
32
+ [prop: string]: unknown;
33
+ }
34
+ export declare const NeoAlert: ForwardRefExoticComponent<NeoAlertProps & RefAttributes<HTMLElement>>;
35
+
36
+ /** Fixes the proportion (width : height) of the content and keeps it when the size changes. NO: It is not for text content or for layout: it fixes a proportion, not a layout. It is not interactive. */
37
+ export interface NeoAspectRatioProps {
38
+ /** how much space it takes. The width adapts to what is available and the height comes from here. Default: '16/9'. */
39
+ ratio?: '1/1' | '16/9' | '4/3' | '3/4' | '21/9';
40
+ /** The image fits whole instead of being cropped. Only when cropping loses information. */
41
+ contain?: boolean;
42
+ /** The image: a URL or a data URI. It realizes the image slot of the master; it goes in with `object-fit: cover`. */
43
+ src?: string;
44
+ /** The alternative text of the image. Empty when it is decorative and the message is already in the text (banner); descriptive when the image IS the content (aspect-ratio). */
45
+ alt?: string;
46
+ /** Extra classes on the root. They add to the system ones; they do not replace them. */
47
+ className?: string;
48
+ /** The content. Whoever uses the component provides it; in the stories it comes from the minimal example. */
49
+ children?: ReactNode;
50
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
51
+ sx?: SxProps<Theme>;
52
+ /** The rest flows to the base MUI component. */
53
+ [prop: string]: unknown;
54
+ }
55
+ export declare const NeoAspectRatio: ForwardRefExoticComponent<NeoAspectRatioProps & RefAttributes<HTMLElement>>;
56
+
57
+ /** Communicates system state or an activity count, compactly. NO: If it classifies instead of reporting a state it is `tag`. If the message needs to be read in full it is `alert`. It is never interactive. */
58
+ export interface NeoBadgeProps {
59
+ /** what kind of badge it is. The first TWO are indicators (MUI Badge) and the next five are semantic states (Chip variant=status) — the axis picks the base, not a variant. Default: 'dot'. */
60
+ type?: 'dot' | 'number' | 'neutral' | 'info' | 'success' | 'warning' | 'error';
61
+ /** The visible text of the component. */
62
+ label: ReactNode;
63
+ /** The number shown. It needs an `aria-label` that says it in words. */
64
+ count?: number;
65
+ /** The content. Whoever uses the component provides it; in the stories it comes from the minimal example. */
66
+ children: ReactNode;
67
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
68
+ className?: string;
69
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
70
+ sx?: SxProps<Theme>;
71
+ /** The rest flows to the base MUI component. */
72
+ [prop: string]: unknown;
73
+ }
74
+ export declare const NeoBadge: ForwardRefExoticComponent<NeoBadgeProps & RefAttributes<HTMLElement>>;
75
+
76
+ /** Highlights a message within the page —a campaign, a benefit, a notice— with or without an action. NO: It is NOT system feedback: confirmations and errors are `alert`. The banner promotes, it does not notify. */
77
+ export interface NeoBannerProps {
78
+ /** sets the height. The width is set by the container (C10). Default: 'large'. */
79
+ size?: 'small' | 'medium' | 'large';
80
+ /** the image becomes the background, with an overlay Default: 'false'. */
81
+ fullPhoto?: boolean;
82
+ /** The title. It is a prop and not content because `aria-labelledby` anchors to it. */
83
+ title?: ReactNode;
84
+ /** The secondary text, under the title. */
85
+ subtitle?: ReactNode;
86
+ /** The description. It is a prop and not a loose paragraph: `aria-describedby` needs a stable node. */
87
+ description: ReactNode;
88
+ /** The icon node. Use the system icons (icons/), not loose SVGs. */
89
+ icon?: ReactNode;
90
+ /** A node of your own for the banner image (video, picture). The main path is `src`; if both are given, `src` wins. */
91
+ media?: ReactNode;
92
+ /** The image: a URL or a data URI. It realizes the image slot of the master; it goes in with `object-fit: cover`. */
93
+ src?: string;
94
+ /** The alternative text of the image. Empty when it is decorative and the message is already in the text (banner); descriptive when the image IS the content (aspect-ratio). */
95
+ alt?: string;
96
+ /** Which side the image goes on. It only applies with `size="small"`: in the other sizes it does not go to the side. */
97
+ mediaPosition?: 'right' | 'left';
98
+ /** The call to action. One at most (C1). */
99
+ actions?: ReactNode;
100
+ /** The accessible name when there is no visible text that provides it. */
101
+ 'aria-label'?: string;
102
+ /** Extra classes on the root. They add to the system ones; they do not replace them. */
103
+ className?: string;
104
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
105
+ sx?: SxProps<Theme>;
106
+ /** The rest flows to the base MUI component. */
107
+ [prop: string]: unknown;
108
+ }
109
+ export declare const NeoBanner: ForwardRefExoticComponent<NeoBannerProps & RefAttributes<HTMLElement>>;
110
+
111
+ /** Runs actions. NO: To navigate it is `link`; for an on/off option it is `toggle`. */
112
+ export interface NeoButtonProps {
113
+ /** semantic family Default: 'system'. */
114
+ family?: 'system' | 'brand';
115
+ /** visual hierarchy Default: 'primary'. */
116
+ variant?: 'primary' | 'secondary' | 'tertiary';
117
+ /** the surface it sits on Default: 'default'. */
118
+ surface?: 'default' | 'inverse';
119
+ /** size adjustment Default: 'large'. */
120
+ size?: 'small' | 'medium' | 'large';
121
+ /** The visible text of the component. */
122
+ label?: ReactNode;
123
+ /** */
124
+ iconLeft?: string | ReactElement;
125
+ /** */
126
+ iconRight?: string | ReactElement;
127
+ /** loading */
128
+ loading?: boolean;
129
+ /** Not interactive: it takes neither focus nor clicks. */
130
+ disabled?: boolean;
131
+ /** The visible text, as MUI `children` —the same as `label`. One of the two is required: without either the control has no name. */
132
+ children?: ReactNode;
133
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
134
+ className?: string;
135
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
136
+ sx?: SxProps<Theme>;
137
+ /** The rest flows to the base MUI component. */
138
+ [prop: string]: unknown;
139
+ }
140
+ export declare const NeoButton: ForwardRefExoticComponent<NeoButtonProps & RefAttributes<HTMLElement>>;
141
+
142
+ /** Runs an action that is understood by its icon: close, back, add, more options. NO: If the action needs explaining, it is a `button` with a label. Without visible text there is NO accessible name: the `aria-label` is required, not an optional decoration. */
143
+ export interface NeoButtonIconProps {
144
+ /** semantic family — the same as `button` Default: 'system'. */
145
+ family?: 'system' | 'brand';
146
+ /** visual hierarchy Default: 'primary'. */
147
+ variant?: 'primary' | 'secondary' | 'tertiary';
148
+ /** size adjustment — the button is SQUARE: 32 · 40 · 48, and the glyph scales with it (16 · 20 · 24) Default: 'large'. */
149
+ size?: 'small' | 'medium' | 'large';
150
+ /** the surface it sits on Default: 'default'. */
151
+ surface?: 'default' | 'inverse';
152
+ /** Not interactive: it takes neither focus nor clicks. */
153
+ disabled?: boolean;
154
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
155
+ className?: string;
156
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
157
+ sx?: SxProps<Theme>;
158
+ /** The rest flows to the base MUI component. */
159
+ [prop: string]: unknown;
160
+ }
161
+ export declare const NeoButtonIcon: ForwardRefExoticComponent<NeoButtonIconProps & RefAttributes<HTMLElement>>;
162
+
163
+ /** Multiple, independent selection. NO: If the selection is exclusive it is `radio-button`. If the change applies instantly without saving, it is `toggle`. */
164
+ export interface NeoCheckboxProps {
165
+ /** The visible text of the component. */
166
+ label: ReactNode;
167
+ /** On. */
168
+ checked?: boolean;
169
+ /** */
170
+ defaultChecked?: boolean;
171
+ /** Neither checked nor unchecked: the state of a parent whose children are mixed. */
172
+ indeterminate?: boolean;
173
+ /** Not interactive: it takes neither focus nor clicks. */
174
+ disabled?: boolean;
175
+ /** Notifies the value change. */
176
+ onChange?: (event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
177
+ /** The control id, to link the label and the descriptions. */
178
+ id?: string;
179
+ /** Hides the label from view and keeps it for screen readers: the control still has a name. It is `text=false` in the master. */
180
+ hideLabel?: boolean;
181
+ /** The ref to the `<input>` inside — to focus or read it. The root forwards `ref`; this one reaches the control. */
182
+ inputRef?: Ref<unknown>;
183
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
184
+ className?: string;
185
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
186
+ sx?: SxProps<Theme>;
187
+ /** The rest flows to the base MUI component. */
188
+ [prop: string]: unknown;
189
+ }
190
+ export declare const NeoCheckbox: ForwardRefExoticComponent<NeoCheckboxProps & RefAttributes<HTMLElement>>;
191
+
192
+ /** Compact interactive filter or selection within the same view. NO: To navigate between sections it is `tabs`. For system states it is `badge`. For a classification nobody touches it is `tag`. */
193
+ export interface NeoChipsProps {
194
+ /** The visible text of the component. */
195
+ label: ReactNode;
196
+ /** The icon node. Use the system icons (icons/), not loose SVGs. */
197
+ icon?: ReactNode;
198
+ /** Selected (drawn filled). In the DOM it goes as data-selected. */
199
+ selected?: boolean;
200
+ /** Not interactive: it takes neither focus nor clicks. */
201
+ disabled?: boolean;
202
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
203
+ className?: string;
204
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
205
+ sx?: SxProps<Theme>;
206
+ /** The rest flows to the base MUI component. */
207
+ [prop: string]: unknown;
208
+ }
209
+ export declare const NeoChips: ForwardRefExoticComponent<NeoChipsProps & RefAttributes<HTMLElement>>;
210
+
211
+ /** A row of related chips chosen together: several at once, or one at a time. NO: A single filter is `chips`. To move between sections it is `tabs`. An exclusive choice that is not a filter of the view is `radio-button`. */
212
+ export interface NeoChipsGroupProps {
213
+ /** Whether several chips can be on at once (`multiple`) or only one (`single`). It is behaviour: the master draws the same row for both. Default: 'single'. */
214
+ selection?: 'multiple' | 'single';
215
+ /** The list options. Closed and strict: values outside it are not accepted. */
216
+ options?: ReadonlyArray<{ label: string; value: string; disabled?: boolean }>;
217
+ /** The controlled value. */
218
+ value?: string | ReadonlyArray<string>;
219
+ /** The initial, uncontrolled value. */
220
+ defaultValue?: string | ReadonlyArray<string>;
221
+ /** Not interactive: it takes neither focus nor clicks. */
222
+ disabled?: boolean;
223
+ /** Notifies the value change. */
224
+ onChange?: (event: SyntheticEvent, value: string | string[]) => void;
225
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
226
+ className?: string;
227
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
228
+ sx?: SxProps<Theme>;
229
+ /** The rest flows to the base MUI component. */
230
+ [prop: string]: unknown;
231
+ }
232
+ export declare const NeoChipsGroup: ForwardRefExoticComponent<NeoChipsGroupProps & RefAttributes<HTMLElement>>;
233
+
234
+ /** Single selection from a list filterable by text: you type and the list narrows down to the matches. NO: Without search it is `select`. For free text it is `text-field`. For running actions, `menu`. */
235
+ export interface NeoComboboxProps {
236
+ /** The visible text of the component. */
237
+ label: ReactNode;
238
+ /** The field is required. */
239
+ required?: boolean;
240
+ /** The help text under the field. In `error` this same slot says the error message: they are not two. */
241
+ helperText?: ReactNode;
242
+ /** The value does not pass validation. The message goes in the same `helperText` slot. */
243
+ error?: boolean;
244
+ /** It can be read but not edited. */
245
+ readOnly?: boolean;
246
+ /** Not interactive: it takes neither focus nor clicks. */
247
+ disabled?: boolean;
248
+ /** The help text that the ⓘ next to the label opens. Without it there is no ⓘ: its presence IS the content. The glyph is not chosen — the master sets it. */
249
+ tooltip?: ReactNode;
250
+ /** */
251
+ iconLeft?: string | ReactElement;
252
+ /** */
253
+ iconRight?: string | ReactElement;
254
+ /** The accessible name of the ⓘ button. By default «Ayuda sobre <label>» (end-user text, in Spanish); pass it when that phrase does not name the help well. */
255
+ tooltipLabel?: string;
256
+ /** The control id, to link the label and the descriptions. */
257
+ id?: string;
258
+ /** The hint text inside the field. It never replaces the label, which is visible and static. */
259
+ placeholder?: string;
260
+ /** The list options. Closed and strict: values outside it are not accepted. */
261
+ options?: ReadonlyArray<string>;
262
+ /** Notifies the value change. */
263
+ onChange?: (...args: unknown[]) => void;
264
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
265
+ className?: string;
266
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
267
+ sx?: SxProps<Theme>;
268
+ /** The rest flows to the base MUI component. */
269
+ [prop: string]: unknown;
270
+ }
271
+ export declare const NeoCombobox: ForwardRefExoticComponent<NeoComboboxProps & RefAttributes<HTMLElement>>;
272
+
273
+ /** Takes the place of content that does not exist yet and says what can be done about it. NO: To communicate something that just happened, which is `alert`. For the wait while data loads, which is `spinner`: empty and loading are not the same, and mixing them up leaves the person waiting for something that is not coming. */
274
+ export interface NeoEmptyStateProps {
275
+ /** The icon node. Use the system icons (icons/), not loose SVGs. */
276
+ icon: ReactNode;
277
+ /** The title. It is a prop and not content because `aria-labelledby` anchors to it. */
278
+ title: ReactNode;
279
+ /** The description. It is a prop and not a loose paragraph: `aria-describedby` needs a stable node. */
280
+ description: ReactNode;
281
+ /** The call to action. One at most (C1). */
282
+ actions?: ReactNode;
283
+ /** The heading level of the title. The screen decides it: `h2` on a page, `h3` inside a section that already has its own title. Skipping levels breaks navigation by headings. Default: 'h2'. */
284
+ headingLevel?: 'h2' | 'h3' | 'h4';
285
+ /** Extra classes on the root. They add to the system ones; they do not replace them. */
286
+ className?: string;
287
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
288
+ sx?: SxProps<Theme>;
289
+ /** The rest flows to the base MUI component. */
290
+ [prop: string]: unknown;
291
+ }
292
+ export declare const NeoEmptyState: ForwardRefExoticComponent<NeoEmptyStateProps & RefAttributes<HTMLElement>>;
293
+
294
+ /** Takes the person somewhere else. NO: If the action makes something happen (save, send, open a dialog) it is `button`. A link that does not navigate lies about what is going to happen. */
295
+ export interface NeoLinkProps {
296
+ /** The visible text of the component. */
297
+ label?: ReactNode;
298
+ /** Not interactive: it takes neither focus nor clicks. */
299
+ disabled?: boolean;
300
+ /** The visible text, as MUI `children` —the same as `label`. One of the two is required: without either the control has no name. */
301
+ children?: ReactNode;
302
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
303
+ className?: string;
304
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
305
+ sx?: SxProps<Theme>;
306
+ /** The rest flows to the base MUI component. */
307
+ [prop: string]: unknown;
308
+ }
309
+ export declare const NeoLink: ForwardRefExoticComponent<NeoLinkProps & RefAttributes<HTMLElement>>;
310
+
311
+ /** Public floating-list primitive: the reusable panel of options. NO: It is not used on its own: without a trigger nothing opens it. `select` and `combobox` consume it with the `listbox` role, and action menus with the native `menu` role. */
312
+ export interface NeoMenuProps {
313
+ /** The trigger that opens the panel. It is EXTERNAL: any element works. */
314
+ trigger: ReactElement;
315
+ /** The pieces of a composite: each one with its value, its label and its content. */
316
+ items?: Array<{ value?: string; label?: ReactNode; icon?: string | ReactElement; disabled?: boolean; divider?: boolean; onSelect?: (value: string) => void }>;
317
+ /** The accessible name when there is no visible text that provides it. */
318
+ 'aria-label'?: string;
319
+ /** The panel starts open and the component handles it afterwards. It is the UNCONTROLLED version of `open`: useful to document or capture the open panel without holding the state from outside. */
320
+ defaultOpen?: boolean;
321
+ /** Not interactive: it takes neither focus nor clicks. */
322
+ disabled?: boolean;
323
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
324
+ className?: string;
325
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
326
+ sx?: SxProps<Theme>;
327
+ /** The rest flows to the base MUI component. */
328
+ [prop: string]: unknown;
329
+ }
330
+ export declare const NeoMenu: ForwardRefExoticComponent<NeoMenuProps & RefAttributes<HTMLElement>>;
331
+
332
+ /** Interrupts the flow to ask for a decision or an answer. NO: If the content needs scrolling or several steps, the case is not a dialog: it is `modal-fullscreen`. */
333
+ export interface NeoModalDialogProps {
334
+ /** The panel or the bubble, open (controlled). */
335
+ open?: boolean;
336
+ /** The close handler. Its presence draws the ✕. */
337
+ onClose?: (...args: unknown[]) => void;
338
+ /** The title. It is a prop and not content because `aria-labelledby` anchors to it. */
339
+ title: ReactNode;
340
+ /** The description. It is a prop and not a loose paragraph: `aria-describedby` needs a stable node. */
341
+ description?: ReactNode;
342
+ /** how large the dialog is: 440 · 600 · 900 · 1200 of maximum width, constants from the master and not the breakpoint scale. It also scales the horizontal gutter (16 · 24 · 24 · 32). Default: 'xs'. */
343
+ size?: 'xs' | 'sm' | 'md' | 'lg';
344
+ /** what the dialog is about — the header background, the title color and the icon come from it, and the icon is NOT a prop but is derived (C6) Default: 'default'. */
345
+ type?: 'default' | 'brand' | 'info' | 'success' | 'warning' | 'error';
346
+ /** Draws the ✕. It needs `onClose` to do anything. */
347
+ closable?: boolean;
348
+ /** The call to action. One at most (C1). */
349
+ actions?: ReactNode;
350
+ /** The content. Whoever uses the component provides it; in the stories it comes from the minimal example. */
351
+ children?: ReactNode;
352
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
353
+ className?: string;
354
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
355
+ sx?: SxProps<Theme>;
356
+ /** The rest flows to the base MUI component. */
357
+ [prop: string]: unknown;
358
+ }
359
+ export declare const NeoModalDialog: ForwardRefExoticComponent<NeoModalDialogProps & RefAttributes<HTMLElement>>;
360
+
361
+ /** Takes over the whole screen for dense information or a long task, without losing the point of origin. NO: If the content is short and asks for a decision, the case is not a full-screen: it is `modal-dialog`. */
362
+ export interface NeoModalFullscreenProps {
363
+ /** The panel or the bubble, open (controlled). */
364
+ open?: boolean;
365
+ /** The close handler. Its presence draws the ✕. */
366
+ onClose?: (...args: unknown[]) => void;
367
+ /** The back-step handler. */
368
+ onBack?: (...args: unknown[]) => void;
369
+ /** The title. It is a prop and not content because `aria-labelledby` anchors to it. */
370
+ title: ReactNode;
371
+ /** The call to action. One at most (C1). */
372
+ actions?: ReactNode;
373
+ /** The content. Whoever uses the component provides it; in the stories it comes from the minimal example. */
374
+ children?: ReactNode;
375
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
376
+ className?: string;
377
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
378
+ sx?: SxProps<Theme>;
379
+ /** The rest flows to the base MUI component. */
380
+ [prop: string]: unknown;
381
+ }
382
+ export declare const NeoModalFullscreen: ForwardRefExoticComponent<NeoModalFullscreenProps & RefAttributes<HTMLElement>>;
383
+
384
+ /** Exclusive selection among mutually exclusive options. NO: If several can be chosen it is `checkbox`. If it is an immediate on/off it is `toggle`. With many options, a `select`. */
385
+ export interface NeoRadioButtonProps {
386
+ /** The visible text of the component. */
387
+ label: ReactNode;
388
+ /** On. */
389
+ checked?: boolean;
390
+ /** */
391
+ defaultChecked?: boolean;
392
+ /** Not interactive: it takes neither focus nor clicks. */
393
+ disabled?: boolean;
394
+ /** Notifies the value change. */
395
+ onChange?: (event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
396
+ /** The control id, to link the label and the descriptions. */
397
+ id?: string;
398
+ /** Hides the label from view and keeps it for screen readers: the control still has a name. It is `text=false` in the master. */
399
+ hideLabel?: boolean;
400
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
401
+ className?: string;
402
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
403
+ sx?: SxProps<Theme>;
404
+ /** The rest flows to the base MUI component. */
405
+ [prop: string]: unknown;
406
+ }
407
+ export declare const NeoRadioButton: ForwardRefExoticComponent<NeoRadioButtonProps & RefAttributes<HTMLElement>>;
408
+
409
+ /** Exclusive selection among mutually exclusive options. NO: If several can be chosen it is `checkbox`. If it is an immediate on/off it is `toggle`. With many options, a `select`. */
410
+ export interface NeoRadioGroupProps {
411
+ /** The group name: all the controls that exclude each other share it. REQUIRED. */
412
+ name: string;
413
+ /** The text of the group <legend>. REQUIRED: without it the set has no accessible name. */
414
+ legend: ReactNode;
415
+ /** The controlled value. */
416
+ value?: string;
417
+ /** The initial, uncontrolled value. */
418
+ defaultValue?: string;
419
+ /** how the GROUP's options are laid out. It lives in the group's master, not in the atom. Default: 'vertical'. */
420
+ direction?: 'vertical' | 'horizontal';
421
+ /** Not interactive: it takes neither focus nor clicks. */
422
+ disabled?: boolean;
423
+ /** Notifies the value change. */
424
+ onChange?: (event: ChangeEvent<HTMLInputElement>, value: string) => void;
425
+ /** The content. Whoever uses the component provides it; in the stories it comes from the minimal example. */
426
+ children?: ReactNode;
427
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
428
+ className?: string;
429
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
430
+ sx?: SxProps<Theme>;
431
+ /** The rest flows to the base MUI component. */
432
+ [prop: string]: unknown;
433
+ }
434
+ export declare const NeoRadioGroup: ForwardRefExoticComponent<NeoRadioGroupProps & RefAttributes<HTMLElement>>;
435
+
436
+ /** Single selection of one option from a predefined set. NO: With 2 options it is `radio-button`. If there are so many that searching helps, `combobox`. For running actions, `menu`. */
437
+ export interface NeoSelectProps {
438
+ /** The visible text of the component. */
439
+ label: ReactNode;
440
+ /** The field is required. */
441
+ required?: boolean;
442
+ /** The help text under the field. In `error` this same slot says the error message: they are not two. */
443
+ helperText?: ReactNode;
444
+ /** The value does not pass validation. The message goes in the same `helperText` slot. */
445
+ error?: boolean;
446
+ /** It can be read but not edited. */
447
+ readOnly?: boolean;
448
+ /** Not interactive: it takes neither focus nor clicks. */
449
+ disabled?: boolean;
450
+ /** The help text that the ⓘ next to the label opens. Without it there is no ⓘ: its presence IS the content. The glyph is not chosen — the master sets it. */
451
+ tooltip?: ReactNode;
452
+ /** The accessible name of the ⓘ button. By default «Ayuda sobre <label>» (end-user text, in Spanish); pass it when that phrase does not name the help well. */
453
+ tooltipLabel?: string;
454
+ /** The control id, to link the label and the descriptions. */
455
+ id?: string;
456
+ /** The hint text inside the field. It never replaces the label, which is visible and static. */
457
+ placeholder?: string;
458
+ /** How the chosen value is drawn in the trigger. */
459
+ renderValue?: (valor: unknown) => ReactNode;
460
+ /** The content. Whoever uses the component provides it; in the stories it comes from the minimal example. */
461
+ children?: ReactNode;
462
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
463
+ className?: string;
464
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
465
+ sx?: SxProps<Theme>;
466
+ /** The rest flows to the base MUI component. */
467
+ [prop: string]: unknown;
468
+ }
469
+ export declare const NeoSelect: ForwardRefExoticComponent<NeoSelectProps & RefAttributes<HTMLElement>>;
470
+
471
+ /** Communicates, for a moment, the result of an action or a change in the system, without interrupting the task. It floats over the page and goes away on its own. NO: If the message has to STAY until someone reads it, it is `alert`. If it promotes something, it is `banner`. If it demands a decision, it is `modal-dialog`. The distinction from `alert` is a single one and it is measurable: the alert takes up layout and persists; the snackbar takes up no layout and goes away. */
472
+ export interface NeoSnackbarProps {
473
+ /** The panel or the bubble, open (controlled). */
474
+ open?: boolean;
475
+ /** The close handler. Its presence draws the ✕. */
476
+ onClose?: (...args: unknown[]) => void;
477
+ /** */
478
+ message: ReactNode;
479
+ /** The call to action. One at most (C1). */
480
+ actions?: ReactNode;
481
+ /** Draws the ✕. It needs `onClose` to do anything. */
482
+ closable?: boolean;
483
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
484
+ className?: string;
485
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
486
+ sx?: SxProps<Theme>;
487
+ /** The rest flows to the base MUI component. */
488
+ [prop: string]: unknown;
489
+ }
490
+ export declare const NeoSnackbar: ForwardRefExoticComponent<NeoSnackbarProps & RefAttributes<HTMLElement>>;
491
+
492
+ /** Indicator for a brief, localized load. NO: In full-page transitions — that is the Loading Indicator, which Neo does not have. Nor in `button/icon`, which does not support loading. */
493
+ export interface NeoSpinnerProps {
494
+ /** the diameter of the arc, on MUI's long scale. Inside a `button` it is ALWAYS medium. Default: 'small'. */
495
+ size?: 'small' | 'medium' | 'large';
496
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
497
+ className?: string;
498
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
499
+ sx?: SxProps<Theme>;
500
+ /** The rest flows to the base MUI component. */
501
+ [prop: string]: unknown;
502
+ }
503
+ export declare const NeoSpinner: ForwardRefExoticComponent<NeoSpinnerProps & RefAttributes<HTMLElement>>;
504
+
505
+ /** Organizes content into sections within a single view. NO: To filter or select items it is `chips`. To navigate between pages it is `link`. */
506
+ export interface NeoTabsProps {
507
+ /** The pieces of a composite: each one with its value, its label and its content. */
508
+ items?: Array<{ value: string; label: ReactNode; icon?: string | ReactElement; disabled?: boolean; content?: ReactNode }>;
509
+ /** The controlled value. */
510
+ value?: string;
511
+ /** The initial, uncontrolled value. */
512
+ defaultValue?: unknown;
513
+ /** Notifies the value change. */
514
+ onChange?: (event: SyntheticEvent, value: string) => void;
515
+ /** The accessible name when there is no visible text that provides it. */
516
+ 'aria-label'?: string;
517
+ /** Not interactive: it takes neither focus nor clicks. */
518
+ disabled?: boolean;
519
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
520
+ className?: string;
521
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
522
+ sx?: SxProps<Theme>;
523
+ /** The rest flows to the base MUI component. */
524
+ [prop: string]: unknown;
525
+ }
526
+ export declare const NeoTabs: ForwardRefExoticComponent<NeoTabsProps & RefAttributes<HTMLElement>>;
527
+
528
+ /** Informational classification label: which category an element belongs to. NO: If it communicates a system state it is `badge`. If it represents an active selection it is `chips`. */
529
+ export interface NeoTagProps {
530
+ /** how heavy the tag's fill is: `soft` is the light gray with a stroke, `solid` the dark neutral without a stroke. It is NOT the surface it sits on Default: 'soft'. */
531
+ tone?: 'soft' | 'solid';
532
+ /** The visible text of the component. */
533
+ label: ReactNode;
534
+ /** The icon node. Use the system icons (icons/), not loose SVGs. */
535
+ icon?: ReactNode;
536
+ /** */
537
+ iconRight?: string | ReactElement;
538
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
539
+ className?: string;
540
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
541
+ sx?: SxProps<Theme>;
542
+ /** The rest flows to the base MUI component. */
543
+ [prop: string]: unknown;
544
+ }
545
+ export declare const NeoTag: ForwardRefExoticComponent<NeoTagProps & RefAttributes<HTMLElement>>;
546
+
547
+ /** Text input typed by the person. NO: If the value comes from a closed set it is `select`; if the set is long and searching helps, `combobox`. */
548
+ export interface NeoTextAreaProps {
549
+ /** The visible text of the component. */
550
+ label: ReactNode;
551
+ /** The field is required. */
552
+ required?: boolean;
553
+ /** The help text under the field. In `error` this same slot says the error message: they are not two. */
554
+ helperText?: ReactNode;
555
+ /** The value does not pass validation. The message goes in the same `helperText` slot. */
556
+ error?: boolean;
557
+ /** It can be read but not edited. */
558
+ readOnly?: boolean;
559
+ /** Not interactive: it takes neither focus nor clicks. */
560
+ disabled?: boolean;
561
+ /** The help text that the ⓘ next to the label opens. Without it there is no ⓘ: its presence IS the content. The glyph is not chosen — the master sets it. */
562
+ tooltip?: ReactNode;
563
+ /** The counter text. By default the field counts on its own against `maxLength` (written/limit); pass it only to show a different text. */
564
+ counter?: ReactNode;
565
+ /** The accessible name of the ⓘ button. By default «Ayuda sobre <label>» (end-user text, in Spanish); pass it when that phrase does not name the help well. */
566
+ tooltipLabel?: string;
567
+ /** The control id, to link the label and the descriptions. */
568
+ id?: string;
569
+ /** The keyboard a phone opens. It goes to the `<input>`, not to the container. */
570
+ inputMode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
571
+ /** The maximum number of characters the control accepts. It goes to the `<input>`, and the visible counter counts against it: written/limit. */
572
+ maxLength?: number;
573
+ /** Raw attributes for the `<input>`. They win over `inputMode` and `maxLength`, which are the two shortcuts. */
574
+ inputProps?: Record<string, unknown>;
575
+ /** The controlled value. */
576
+ value?: string | number;
577
+ /** The initial, uncontrolled value. */
578
+ defaultValue?: string | number;
579
+ /** Notifies the value change. */
580
+ onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
581
+ /** The minimum height, in lines: the area starts there and grows with the text. */
582
+ minRows?: number;
583
+ /** The maximum height, in lines: there the area stops growing. */
584
+ maxRows?: number;
585
+ /** A fixed height, in lines: with it the area does not grow, and `minRows` and `maxRows` do not apply. */
586
+ rows?: number;
587
+ /** The ref to the `<input>` inside — to focus or read it. The root forwards `ref`; this one reaches the control. */
588
+ inputRef?: Ref<unknown>;
589
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
590
+ className?: string;
591
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
592
+ sx?: SxProps<Theme>;
593
+ /** The rest flows to the base MUI component. */
594
+ [prop: string]: unknown;
595
+ }
596
+ export declare const NeoTextArea: ForwardRefExoticComponent<NeoTextAreaProps & RefAttributes<HTMLElement>>;
597
+
598
+ /** Text input typed by the person. NO: If the value comes from a closed set it is `select`; if the set is long and searching helps, `combobox`. */
599
+ export interface NeoTextFieldProps {
600
+ /** The visible text of the component. */
601
+ label: ReactNode;
602
+ /** The field is required. */
603
+ required?: boolean;
604
+ /** The help text under the field. In `error` this same slot says the error message: they are not two. */
605
+ helperText?: ReactNode;
606
+ /** The value does not pass validation. The message goes in the same `helperText` slot. */
607
+ error?: boolean;
608
+ /** It can be read but not edited. */
609
+ readOnly?: boolean;
610
+ /** Not interactive: it takes neither focus nor clicks. */
611
+ disabled?: boolean;
612
+ /** */
613
+ prefix?: ReactNode;
614
+ /** */
615
+ suffix?: ReactNode;
616
+ /** The help text that the ⓘ next to the label opens. Without it there is no ⓘ: its presence IS the content. The glyph is not chosen — the master sets it. */
617
+ tooltip?: ReactNode;
618
+ /** */
619
+ iconLeft?: string | ReactElement;
620
+ /** */
621
+ iconRight?: string | ReactElement;
622
+ /** The counter text. By default the field counts on its own against `maxLength` (written/limit); pass it only to show a different text. */
623
+ counter?: ReactNode;
624
+ /** The accessible name of the ⓘ button. By default «Ayuda sobre <label>» (end-user text, in Spanish); pass it when that phrase does not name the help well. */
625
+ tooltipLabel?: string;
626
+ /** The node that goes before the field, inside the border. */
627
+ startAdornment?: ReactNode;
628
+ /** The node that goes after the field, inside the border. */
629
+ endAdornment?: ReactNode;
630
+ /** The control id, to link the label and the descriptions. */
631
+ id?: string;
632
+ /** The keyboard a phone opens. It goes to the `<input>`, not to the container. */
633
+ inputMode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
634
+ /** The maximum number of characters the control accepts. It goes to the `<input>`, and the visible counter counts against it: written/limit. */
635
+ maxLength?: number;
636
+ /** Raw attributes for the `<input>`. They win over `inputMode` and `maxLength`, which are the two shortcuts. */
637
+ inputProps?: Record<string, unknown>;
638
+ /** The controlled value. */
639
+ value?: string | number;
640
+ /** The initial, uncontrolled value. */
641
+ defaultValue?: string | number;
642
+ /** Notifies the value change. */
643
+ onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
644
+ /** The ref to the `<input>` inside — to focus or read it. The root forwards `ref`; this one reaches the control. */
645
+ inputRef?: Ref<unknown>;
646
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
647
+ className?: string;
648
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
649
+ sx?: SxProps<Theme>;
650
+ /** The rest flows to the base MUI component. */
651
+ [prop: string]: unknown;
652
+ }
653
+ export declare const NeoTextField: ForwardRefExoticComponent<NeoTextFieldProps & RefAttributes<HTMLElement>>;
654
+
655
+ /** On/off control with immediate effect. NO: If the change needs an explicit save, it is `checkbox`. If the choice is between several mutually exclusive options, it is `radio-button`. */
656
+ export interface NeoToggleProps {
657
+ /** The visible text of the component. */
658
+ label: ReactNode;
659
+ /** On. */
660
+ checked?: boolean;
661
+ /** */
662
+ defaultChecked?: boolean;
663
+ /** Not interactive: it takes neither focus nor clicks. */
664
+ disabled?: boolean;
665
+ /** Notifies the value change. */
666
+ onChange?: (event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
667
+ /** The control id, to link the label and the descriptions. */
668
+ id?: string;
669
+ /** The accessible name when there is no visible text that provides it. */
670
+ 'aria-label'?: string;
671
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
672
+ className?: string;
673
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
674
+ sx?: SxProps<Theme>;
675
+ /** The rest flows to the base MUI component. */
676
+ [prop: string]: unknown;
677
+ }
678
+ export declare const NeoToggle: ForwardRefExoticComponent<NeoToggleProps & RefAttributes<HTMLElement>>;
679
+
680
+ /** Contextual informational label about the element that triggers it. NO: It does not replace a visible label and does not contain actions. If the information is needed to operate, it goes on the screen. If it is a system message, it is `alert`. */
681
+ export interface NeoTooltipProps {
682
+ /** where the bubble goes relative to the trigger — the vocabulary is MUI's, identical. `none` = no arrow, which in MUI is the default placement. Default: 'top'. */
683
+ placement?: 'none' | 'right' | 'left' | 'bottom' | 'top' | 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
684
+ /** The visible text of the component. */
685
+ label: ReactNode;
686
+ /** Classes from the consumer. They merge with the component ones; they do not replace them. */
687
+ className?: string;
688
+ /** The MUI `sx`: per-instance styles, with access to the theme. */
689
+ sx?: SxProps<Theme>;
690
+ /** The rest flows to the base MUI component. */
691
+ [prop: string]: unknown;
692
+ }
693
+ export declare const NeoTooltip: ForwardRefExoticComponent<NeoTooltipProps & RefAttributes<HTMLElement>>;