orbital-ds 0.41.0 → 0.44.1
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/AGENTS.md +28 -9
- package/components.manifest.json +6469 -3569
- package/dist/auth-form-B1hgbXkI.d.ts +144 -0
- package/dist/hooks/use-ds-messages.d.ts +7 -0
- package/dist/lib/format.d.ts +57 -0
- package/dist/lib/format.js +177 -0
- package/dist/lib/i18n.d.ts +14 -2
- package/dist/lib/i18n.js +32 -2
- package/dist/lib/locales/de.d.ts +7 -0
- package/dist/lib/locales/de.js +535 -0
- package/dist/lib/locales/fr.d.ts +7 -0
- package/dist/lib/locales/fr.js +535 -0
- package/dist/lib/locales/he.d.ts +7 -0
- package/dist/lib/locales/he.js +535 -0
- package/dist/lib/locales/it.d.ts +7 -0
- package/dist/lib/locales/it.js +535 -0
- package/dist/styles.css +39 -1
- package/dist/ui/a2ui-renderer.d.ts +11 -0
- package/dist/ui/agent-events.d.ts +17 -0
- package/dist/ui/ai-tag.d.ts +16 -0
- package/dist/ui/alert-dialog.d.ts +37 -0
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/animated-number.d.ts +11 -0
- package/dist/ui/app-bar.d.ts +22 -0
- package/dist/ui/attachment.d.ts +3 -3
- package/dist/ui/auth-backdrop.d.ts +17 -0
- package/dist/ui/auth-form.d.ts +3 -112
- package/dist/ui/auth-form.js +13 -6
- package/dist/ui/auth-layout.d.ts +38 -0
- package/dist/ui/avatar.d.ts +27 -0
- package/dist/ui/ayuda.d.ts +1 -1
- package/dist/ui/ayuda.js +4 -1
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/bottom-nav.d.ts +22 -0
- package/dist/ui/breadcrumb.d.ts +22 -0
- package/dist/ui/breadcrumb.js +1 -1
- package/dist/ui/bubble.d.ts +1 -1
- package/dist/ui/button-group.d.ts +1 -1
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/calendar.d.ts +13 -0
- package/dist/ui/calendar.js +3 -0
- package/dist/ui/card-stack.d.ts +27 -0
- package/dist/ui/card.d.ts +33 -0
- package/dist/ui/carousel.d.ts +35 -0
- package/dist/ui/carousel.js +10 -5
- package/dist/ui/chain-of-thought.d.ts +15 -0
- package/dist/ui/chart-card.d.ts +19 -0
- package/dist/ui/chart.d.ts +19 -0
- package/dist/ui/chat-composer.d.ts +19 -0
- package/dist/ui/choice-card.d.ts +33 -0
- package/dist/ui/code-block.d.ts +15 -0
- package/dist/ui/combobox.d.ts +48 -0
- package/dist/ui/command-palette.d.ts +18 -0
- package/dist/ui/command.d.ts +34 -0
- package/dist/ui/confirm-action.d.ts +30 -0
- package/dist/ui/confirm-dialog.d.ts +23 -0
- package/dist/ui/content-card.d.ts +14 -0
- package/dist/ui/context-menu.d.ts +35 -0
- package/dist/ui/context-menu.js +1 -1
- package/dist/ui/conversation-list.d.ts +20 -0
- package/dist/ui/copy-button.d.ts +11 -0
- package/dist/ui/date-time.d.ts +40 -0
- package/dist/ui/date-time.js +55 -0
- package/dist/ui/description-list.d.ts +49 -0
- package/dist/ui/description-list.js +86 -0
- package/dist/ui/detail-panel.d.ts +22 -0
- package/dist/ui/dialog.d.ts +35 -0
- package/dist/ui/dock.d.ts +17 -0
- package/dist/ui/drawer.d.ts +41 -0
- package/dist/ui/dropdown-menu.d.ts +32 -0
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/echart.d.ts +15 -0
- package/dist/ui/entity-list.d.ts +32 -0
- package/dist/ui/field.d.ts +1 -1
- package/dist/ui/form-layout.d.ts +24 -0
- package/dist/ui/gauge.d.ts +26 -0
- package/dist/ui/generated-image.d.ts +19 -0
- package/dist/ui/generated-table.d.ts +18 -0
- package/dist/ui/heatmap-grid.d.ts +20 -0
- package/dist/ui/hero.d.ts +58 -0
- package/dist/ui/hero.js +145 -0
- package/dist/ui/i18n-provider.d.ts +16 -0
- package/dist/ui/input-group.d.ts +1 -1
- package/dist/ui/input-otp.d.ts +23 -0
- package/dist/ui/input.d.ts +16 -0
- package/dist/ui/instruction-editor.d.ts +17 -0
- package/dist/ui/item.d.ts +3 -3
- package/dist/ui/label.d.ts +17 -0
- package/dist/ui/legend.d.ts +25 -0
- package/dist/ui/level-meter.d.ts +12 -0
- package/dist/ui/load-more.d.ts +17 -0
- package/dist/ui/loading-state.d.ts +12 -0
- package/dist/ui/markdown.d.ts +15 -0
- package/dist/ui/marker.d.ts +1 -1
- package/dist/ui/media-card.d.ts +16 -0
- package/dist/ui/menubar.d.ts +39 -0
- package/dist/ui/message-actions.d.ts +9 -0
- package/dist/ui/message-scroller.d.ts +30 -0
- package/dist/ui/message.d.ts +33 -0
- package/dist/ui/mfa-challenge.d.ts +3 -32
- package/dist/ui/mfa-challenge.js +1 -1
- package/dist/ui/mfa-setup.d.ts +1 -1
- package/dist/ui/mosaic.d.ts +23 -0
- package/dist/ui/motion-provider.d.ts +17 -0
- package/dist/ui/native-select.d.ts +22 -0
- package/dist/ui/next-step-card.d.ts +55 -0
- package/dist/ui/next-step-card.js +92 -0
- package/dist/ui/notice-review.d.ts +32 -0
- package/dist/ui/oauth-consent.d.ts +1 -1
- package/dist/ui/page-header.d.ts +46 -4
- package/dist/ui/page-header.js +20 -11
- package/dist/ui/page-loader.d.ts +17 -0
- package/dist/ui/page-shell.d.ts +17 -0
- package/dist/ui/pagination.d.ts +20 -0
- package/dist/ui/pagination.js +2 -2
- package/dist/ui/panel.d.ts +2 -2
- package/dist/ui/password-strength.d.ts +14 -0
- package/dist/ui/popover.d.ts +32 -0
- package/dist/ui/proportion-bar.d.ts +25 -0
- package/dist/ui/quantity.d.ts +25 -0
- package/dist/ui/quantity.js +27 -0
- package/dist/ui/questionnaire.d.ts +38 -0
- package/dist/ui/reasoning.d.ts +14 -0
- package/dist/ui/reveal.d.ts +17 -0
- package/dist/ui/sheet.d.ts +39 -2
- package/dist/ui/sheet.js +6 -2
- package/dist/ui/shield.d.ts +14 -0
- package/dist/ui/show-more.d.ts +14 -0
- package/dist/ui/sidebar.d.ts +5 -3
- package/dist/ui/sidebar.js +7 -3
- package/dist/ui/sparkline.d.ts +1 -1
- package/dist/ui/stat-group.d.ts +32 -0
- package/dist/ui/status-badge.d.ts +2 -2
- package/dist/ui/status-hero.d.ts +18 -0
- package/dist/ui/step-dots.d.ts +12 -0
- package/dist/ui/step-ring.d.ts +14 -0
- package/dist/ui/suggestions.d.ts +9 -0
- package/dist/ui/table.d.ts +26 -0
- package/dist/ui/tabs.d.ts +1 -1
- package/dist/ui/tag-input.d.ts +21 -0
- package/dist/ui/tag-input.js +169 -0
- package/dist/ui/task-loader.d.ts +15 -0
- package/dist/ui/task-progress.d.ts +14 -0
- package/dist/ui/textarea.d.ts +22 -1
- package/dist/ui/textarea.js +7 -1
- package/dist/ui/timeline.d.ts +26 -0
- package/dist/ui/toggle-group.d.ts +24 -0
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/tool-call.d.ts +12 -0
- package/dist/ui/usage-meter.d.ts +42 -0
- package/dist/ui/usage-meter.js +116 -0
- package/dist/ui/week-strip.d.ts +11 -0
- package/dist/ui/week-strip.js +2 -2
- package/dist/ui/workflow-run.d.ts +28 -0
- package/docs/adr/0001-rtl-clases-logicas.md +14 -1
- package/docs/designer/flujo.md +1 -1
- package/docs/designer/patrones.md +40 -1
- package/manifest/actions.json +364 -0
- package/manifest/agents.json +399 -0
- package/manifest/ai.json +128 -0
- package/manifest/auth.json +1547 -0
- package/manifest/chat.json +612 -0
- package/manifest/content.json +2298 -0
- package/manifest/data.json +2904 -0
- package/manifest/feedback.json +1005 -0
- package/manifest/forms.json +1954 -0
- package/manifest/motion.json +196 -0
- package/manifest/navigation.json +1792 -0
- package/manifest/overlays.json +931 -0
- package/package.json +242 -238
- package/scripts/cli.mjs +105 -8
- package/scripts/doctor.mjs +126 -1
- package/scripts/eslint-plugin.mjs +93 -0
- package/scripts/i18n.mjs +1 -1
- package/scripts/manifest.mjs +159 -7
- package/skill/SKILL.md +8 -3
|
@@ -0,0 +1,1954 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "orbital-ds",
|
|
3
|
+
"version": "0.44.1",
|
|
4
|
+
"group": "forms",
|
|
5
|
+
"about": "Campos, selectores y envío de datos.",
|
|
6
|
+
"components": {
|
|
7
|
+
"calendar": {
|
|
8
|
+
"import": "orbital-ds/ui/calendar",
|
|
9
|
+
"group": "forms",
|
|
10
|
+
"summary": "Calendario mensual siempre visible para elegir un día o un rango (react-day-picker); base de DatePicker.",
|
|
11
|
+
"see": [
|
|
12
|
+
{
|
|
13
|
+
"component": "date-picker",
|
|
14
|
+
"when": "elegir una fecha o un rango en un formulario, desde un botón que abre el calendario"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"component": "week-strip",
|
|
18
|
+
"when": "moverse por los días de una semana en una agenda"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"exports": [
|
|
22
|
+
"Calendar",
|
|
23
|
+
"CalendarDayButton"
|
|
24
|
+
],
|
|
25
|
+
"slots": [
|
|
26
|
+
"button",
|
|
27
|
+
"calendar",
|
|
28
|
+
"calendar-caption",
|
|
29
|
+
"calendar-day",
|
|
30
|
+
"calendar-weekday"
|
|
31
|
+
],
|
|
32
|
+
"optionalPeers": [
|
|
33
|
+
"react-day-picker"
|
|
34
|
+
],
|
|
35
|
+
"props": {
|
|
36
|
+
"Calendar": {
|
|
37
|
+
"buttonVariant": {
|
|
38
|
+
"type": "\"link\" | \"default\" | \"outline\" | \"secondary\" | \"ghost\" | \"destructive\" | \"cta\"",
|
|
39
|
+
"values": [
|
|
40
|
+
"link",
|
|
41
|
+
"default",
|
|
42
|
+
"outline",
|
|
43
|
+
"secondary",
|
|
44
|
+
"ghost",
|
|
45
|
+
"destructive",
|
|
46
|
+
"cta"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"CalendarDayButton": {
|
|
51
|
+
"locale": {
|
|
52
|
+
"type": "Partial<DayPickerLocale>"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"notes": [
|
|
57
|
+
"En un formulario usa DatePicker o DateRangePicker: ya traen botón, idioma, límites y confirmación.",
|
|
58
|
+
"react-day-picker es dependencia opcional de la app; `captionLayout=\"dropdown\"` añade selectores de mes y año."
|
|
59
|
+
],
|
|
60
|
+
"examples": [
|
|
61
|
+
{
|
|
62
|
+
"title": "Un día",
|
|
63
|
+
"code": "<Calendar mode=\"single\" selected={fecha} onSelect={setFecha} />"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"title": "Rango en dos meses",
|
|
67
|
+
"code": "<Calendar mode=\"range\" numberOfMonths={2} selected={rango} onSelect={setRango} />"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"checkbox": {
|
|
72
|
+
"import": "orbital-ds/ui/checkbox",
|
|
73
|
+
"group": "forms",
|
|
74
|
+
"summary": "Casilla para marcar o desmarcar una opción independiente (aceptar condiciones, varias de una lista); el cambio se aplica al enviar.",
|
|
75
|
+
"see": [
|
|
76
|
+
{
|
|
77
|
+
"component": "switch",
|
|
78
|
+
"when": "un ajuste que se aplica al momento (activar avisos)"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"component": "radio-group",
|
|
82
|
+
"when": "elegir UNA opción entre varias excluyentes"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"component": "choice-card",
|
|
86
|
+
"when": "elegir una opción con icono y texto en teselas"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"exports": [
|
|
90
|
+
"Checkbox"
|
|
91
|
+
],
|
|
92
|
+
"slots": [
|
|
93
|
+
"checkbox",
|
|
94
|
+
"checkbox-indicator"
|
|
95
|
+
],
|
|
96
|
+
"optionalPeers": [],
|
|
97
|
+
"notes": [
|
|
98
|
+
"Siempre con etiqueta pulsable (FieldLabel con `htmlFor`); el área táctil ya se amplía alrededor de la casilla."
|
|
99
|
+
],
|
|
100
|
+
"examples": [
|
|
101
|
+
{
|
|
102
|
+
"title": "Con etiqueta",
|
|
103
|
+
"code": "<Field orientation=\"horizontal\">\n <Checkbox id=\"terms\" />\n <FieldLabel htmlFor=\"terms\">Acepto las condiciones</FieldLabel>\n</Field>"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"title": "Marcada y desactivada",
|
|
107
|
+
"code": "<Field orientation=\"horizontal\" data-disabled=\"true\">\n <Checkbox id=\"backup\" defaultChecked disabled />\n <FieldLabel htmlFor=\"backup\">Copia diaria incluida</FieldLabel>\n</Field>"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"choice-card": {
|
|
112
|
+
"import": "orbital-ds/ui/choice-card",
|
|
113
|
+
"group": "forms",
|
|
114
|
+
"summary": "Teselas seleccionables con icono y texto para elegir UNA opción de un grupo corto y visual (tipo de cuenta, plan, modo).",
|
|
115
|
+
"see": [
|
|
116
|
+
{
|
|
117
|
+
"component": "radio-group",
|
|
118
|
+
"when": "muchas opciones o texto largo, en formato de lista"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"component": "select",
|
|
122
|
+
"when": "elegir de una lista larga sin ocupar espacio"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"component": "toggle-group",
|
|
126
|
+
"when": "cambiar una vista o filtro de la pantalla, no un dato del formulario"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"exports": [
|
|
130
|
+
"ChoiceCard",
|
|
131
|
+
"ChoiceCardContent",
|
|
132
|
+
"ChoiceCardDescription",
|
|
133
|
+
"ChoiceCardGroup",
|
|
134
|
+
"ChoiceCardIndicator",
|
|
135
|
+
"ChoiceCardMedia",
|
|
136
|
+
"ChoiceCardTitle"
|
|
137
|
+
],
|
|
138
|
+
"slots": [
|
|
139
|
+
"choice-card",
|
|
140
|
+
"choice-card-content",
|
|
141
|
+
"choice-card-description",
|
|
142
|
+
"choice-card-group",
|
|
143
|
+
"choice-card-indicator",
|
|
144
|
+
"choice-card-media",
|
|
145
|
+
"choice-card-title"
|
|
146
|
+
],
|
|
147
|
+
"optionalPeers": [],
|
|
148
|
+
"props": {
|
|
149
|
+
"ChoiceCard": {
|
|
150
|
+
"orientation": {
|
|
151
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
152
|
+
"values": [
|
|
153
|
+
"horizontal",
|
|
154
|
+
"vertical"
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"notes": [
|
|
160
|
+
"De 2 a 6 opciones mutuamente excluyentes, con texto corto; más opciones o texto largo, RadioGroup o Select."
|
|
161
|
+
],
|
|
162
|
+
"examples": [
|
|
163
|
+
{
|
|
164
|
+
"title": "Tipo de cuenta",
|
|
165
|
+
"code": "<ChoiceCardGroup defaultValue=\"company\" aria-label=\"Tipo de cuenta\">\n <ChoiceCard value=\"company\">\n <ChoiceCardMedia>\n <BuildingIcon />\n </ChoiceCardMedia>\n <ChoiceCardTitle>Empresa</ChoiceCardTitle>\n </ChoiceCard>\n <ChoiceCard value=\"user\">\n <ChoiceCardMedia>\n <UserIcon />\n </ChoiceCardMedia>\n <ChoiceCardTitle>Particular</ChoiceCardTitle>\n </ChoiceCard>\n</ChoiceCardGroup>"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"title": "Con descripción e indicador",
|
|
169
|
+
"code": "<ChoiceCardGroup defaultValue=\"pro\" aria-label=\"Plan\">\n <ChoiceCard value=\"pro\">\n <ChoiceCardContent>\n <ChoiceCardTitle>Pro</ChoiceCardTitle>\n <ChoiceCardDescription>Hasta 20 usuarios</ChoiceCardDescription>\n </ChoiceCardContent>\n <ChoiceCardIndicator />\n </ChoiceCard>\n</ChoiceCardGroup>"
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
"combobox": {
|
|
174
|
+
"import": "orbital-ds/ui/combobox",
|
|
175
|
+
"group": "forms",
|
|
176
|
+
"summary": "Campo con búsqueda para elegir uno o varios valores de una lista conocida (país, responsable, etiquetas); filtra mientras se escribe.",
|
|
177
|
+
"see": [
|
|
178
|
+
{
|
|
179
|
+
"component": "select",
|
|
180
|
+
"when": "lista corta (menos de ~10) sin necesidad de buscar"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"component": "search-box",
|
|
184
|
+
"when": "buscar en datos de la app con sugerencias del servidor y navegar al resultado"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"component": "native-select",
|
|
188
|
+
"when": "el selector del sistema, sin estilo de tema"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"exports": [
|
|
192
|
+
"Combobox",
|
|
193
|
+
"ComboboxChip",
|
|
194
|
+
"ComboboxChips",
|
|
195
|
+
"ComboboxChipsInput",
|
|
196
|
+
"ComboboxCollection",
|
|
197
|
+
"ComboboxContent",
|
|
198
|
+
"ComboboxEmpty",
|
|
199
|
+
"ComboboxGroup",
|
|
200
|
+
"ComboboxInput",
|
|
201
|
+
"ComboboxItem",
|
|
202
|
+
"ComboboxLabel",
|
|
203
|
+
"ComboboxList",
|
|
204
|
+
"ComboboxSeparator",
|
|
205
|
+
"ComboboxTrigger",
|
|
206
|
+
"ComboboxValue",
|
|
207
|
+
"useComboboxAnchor"
|
|
208
|
+
],
|
|
209
|
+
"slots": [
|
|
210
|
+
"combobox-chip",
|
|
211
|
+
"combobox-chip-input",
|
|
212
|
+
"combobox-chip-remove",
|
|
213
|
+
"combobox-chips",
|
|
214
|
+
"combobox-clear",
|
|
215
|
+
"combobox-collection",
|
|
216
|
+
"combobox-content",
|
|
217
|
+
"combobox-empty",
|
|
218
|
+
"combobox-group",
|
|
219
|
+
"combobox-item",
|
|
220
|
+
"combobox-label",
|
|
221
|
+
"combobox-list",
|
|
222
|
+
"combobox-separator",
|
|
223
|
+
"combobox-trigger",
|
|
224
|
+
"combobox-value",
|
|
225
|
+
"input-group-button"
|
|
226
|
+
],
|
|
227
|
+
"optionalPeers": [],
|
|
228
|
+
"props": {
|
|
229
|
+
"ComboboxInput": {
|
|
230
|
+
"showTrigger": {
|
|
231
|
+
"type": "boolean"
|
|
232
|
+
},
|
|
233
|
+
"showClear": {
|
|
234
|
+
"type": "boolean"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"ComboboxChip": {
|
|
238
|
+
"showRemove": {
|
|
239
|
+
"type": "boolean"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"notes": [
|
|
244
|
+
"Pasa la lista en `items` del Combobox y pinta cada opción con la función hija de ComboboxList; con chips, ancla la lista con `useComboboxAnchor()`.",
|
|
245
|
+
"Pon siempre ComboboxEmpty con un texto de la app para cuando el filtro no encuentra nada."
|
|
246
|
+
],
|
|
247
|
+
"examples": [
|
|
248
|
+
{
|
|
249
|
+
"title": "Uno de una lista",
|
|
250
|
+
"code": "<Combobox items={PAISES}>\n <ComboboxInput placeholder=\"Elige un país\" showClear />\n <ComboboxContent>\n <ComboboxEmpty>No hay ningún país con ese nombre.</ComboboxEmpty>\n <ComboboxList>\n {(item) => (\n <ComboboxItem key={item} value={item}>\n {item}\n </ComboboxItem>\n )}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"title": "Varios con chips",
|
|
254
|
+
"code": "<Combobox multiple items={ETIQUETAS} defaultValue={[\"Urgente\"]}>\n <ComboboxChips ref={anchor}>\n <ComboboxValue>\n {(values) => (\n <>\n {values.map((v) => (\n <ComboboxChip key={v}>{v}</ComboboxChip>\n ))}\n <ComboboxChipsInput placeholder=\"Añade etiquetas\" />\n </>\n )}\n </ComboboxValue>\n </ComboboxChips>\n <ComboboxContent anchor={anchor}>\n <ComboboxList>\n {(item) => (\n <ComboboxItem key={item} value={item}>\n {item}\n </ComboboxItem>\n )}\n </ComboboxList>\n </ComboboxContent>\n</Combobox>"
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
"date-picker": {
|
|
259
|
+
"import": "orbital-ds/ui/date-picker",
|
|
260
|
+
"group": "forms",
|
|
261
|
+
"summary": "Campo de fecha (DatePicker) o de rango (DateRangePicker) que abre un calendario desde un botón, con idioma, límites y atajos.",
|
|
262
|
+
"see": [
|
|
263
|
+
{
|
|
264
|
+
"component": "calendar",
|
|
265
|
+
"when": "un calendario siempre visible en la página"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"component": "date-time",
|
|
269
|
+
"when": "mostrar una fecha formateada, no elegirla"
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
"exports": [
|
|
273
|
+
"DatePicker",
|
|
274
|
+
"DateRangePicker",
|
|
275
|
+
"defaultDatePresets",
|
|
276
|
+
"type DateRange",
|
|
277
|
+
"type DateRangePreset"
|
|
278
|
+
],
|
|
279
|
+
"slots": [
|
|
280
|
+
"date-picker",
|
|
281
|
+
"date-picker-content",
|
|
282
|
+
"date-range-footer",
|
|
283
|
+
"date-range-hint",
|
|
284
|
+
"date-range-picker",
|
|
285
|
+
"date-range-picker-content",
|
|
286
|
+
"date-range-presets"
|
|
287
|
+
],
|
|
288
|
+
"optionalPeers": [
|
|
289
|
+
"react-day-picker"
|
|
290
|
+
],
|
|
291
|
+
"props": {
|
|
292
|
+
"DatePicker": {
|
|
293
|
+
"value": {
|
|
294
|
+
"type": "Date"
|
|
295
|
+
},
|
|
296
|
+
"onChange": {
|
|
297
|
+
"type": "(date: Date | undefined) => void"
|
|
298
|
+
},
|
|
299
|
+
"placeholder": {
|
|
300
|
+
"type": "string",
|
|
301
|
+
"doc": "Texto sin valor; por defecto, «Elige una fecha»."
|
|
302
|
+
},
|
|
303
|
+
"min": {
|
|
304
|
+
"type": "Date",
|
|
305
|
+
"doc": "Primer día elegible."
|
|
306
|
+
},
|
|
307
|
+
"max": {
|
|
308
|
+
"type": "Date",
|
|
309
|
+
"doc": "Último día elegible (p. ej. ayer)."
|
|
310
|
+
},
|
|
311
|
+
"disabled": {
|
|
312
|
+
"type": "boolean"
|
|
313
|
+
},
|
|
314
|
+
"align": {
|
|
315
|
+
"type": "\"center\" | \"start\" | \"end\"",
|
|
316
|
+
"values": [
|
|
317
|
+
"center",
|
|
318
|
+
"start",
|
|
319
|
+
"end"
|
|
320
|
+
]
|
|
321
|
+
},
|
|
322
|
+
"formatOptions": {
|
|
323
|
+
"type": "Intl.DateTimeFormatOptions",
|
|
324
|
+
"doc": "Formato del botón (Intl.DateTimeFormat)."
|
|
325
|
+
},
|
|
326
|
+
"className": {
|
|
327
|
+
"type": "string"
|
|
328
|
+
},
|
|
329
|
+
"id": {
|
|
330
|
+
"type": "string"
|
|
331
|
+
},
|
|
332
|
+
"aria-invalid": {
|
|
333
|
+
"type": "boolean"
|
|
334
|
+
},
|
|
335
|
+
"aria-label": {
|
|
336
|
+
"type": "string"
|
|
337
|
+
},
|
|
338
|
+
"aria-labelledby": {
|
|
339
|
+
"type": "string"
|
|
340
|
+
},
|
|
341
|
+
"calendarProps": {
|
|
342
|
+
"type": "Omit<DayPickerProps & { buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"]; }, \"onSelect\" | \"selected\" | \"mode\">",
|
|
343
|
+
"doc": "Props extra del calendario (p. ej. `captionLayout=\"dropdown\"`)."
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"DateRangePicker": {
|
|
347
|
+
"value": {
|
|
348
|
+
"type": "DateRange"
|
|
349
|
+
},
|
|
350
|
+
"onChange": {
|
|
351
|
+
"type": "(range: DateRange | undefined) => void",
|
|
352
|
+
"doc": "Se llama al «Aplicar» (con el rango) o al «Borrar» (con undefined)."
|
|
353
|
+
},
|
|
354
|
+
"presets": {
|
|
355
|
+
"type": "boolean | DateRangePreset[]",
|
|
356
|
+
"doc": "Atajos: `true` = hoy, ayer, últimos 7/30/90 días; o una lista propia."
|
|
357
|
+
},
|
|
358
|
+
"placeholder": {
|
|
359
|
+
"type": "string",
|
|
360
|
+
"doc": "Texto sin valor; por defecto, «Elige un rango de fechas»."
|
|
361
|
+
},
|
|
362
|
+
"min": {
|
|
363
|
+
"type": "Date"
|
|
364
|
+
},
|
|
365
|
+
"max": {
|
|
366
|
+
"type": "Date",
|
|
367
|
+
"doc": "Último día elegible (p. ej. ayer)."
|
|
368
|
+
},
|
|
369
|
+
"maxSpan": {
|
|
370
|
+
"type": "number",
|
|
371
|
+
"doc": "Duración máxima del rango en días (ambos extremos incluidos)."
|
|
372
|
+
},
|
|
373
|
+
"numberOfMonths": {
|
|
374
|
+
"type": "number"
|
|
375
|
+
},
|
|
376
|
+
"disabled": {
|
|
377
|
+
"type": "boolean"
|
|
378
|
+
},
|
|
379
|
+
"align": {
|
|
380
|
+
"type": "\"center\" | \"start\" | \"end\"",
|
|
381
|
+
"values": [
|
|
382
|
+
"center",
|
|
383
|
+
"start",
|
|
384
|
+
"end"
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
"formatOptions": {
|
|
388
|
+
"type": "Intl.DateTimeFormatOptions"
|
|
389
|
+
},
|
|
390
|
+
"className": {
|
|
391
|
+
"type": "string"
|
|
392
|
+
},
|
|
393
|
+
"id": {
|
|
394
|
+
"type": "string"
|
|
395
|
+
},
|
|
396
|
+
"aria-invalid": {
|
|
397
|
+
"type": "boolean"
|
|
398
|
+
},
|
|
399
|
+
"aria-label": {
|
|
400
|
+
"type": "string"
|
|
401
|
+
},
|
|
402
|
+
"aria-labelledby": {
|
|
403
|
+
"type": "string"
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
"notes": [
|
|
408
|
+
"El rango se edita en borrador y solo llega a `onChange` al pulsar «Aplicar» (o `undefined` con «Borrar»).",
|
|
409
|
+
"Formato e idioma salen del idioma activo con Intl: no formatees la fecha a mano ni cargues locales."
|
|
410
|
+
],
|
|
411
|
+
"examples": [
|
|
412
|
+
{
|
|
413
|
+
"title": "Una fecha con límite",
|
|
414
|
+
"code": "<DatePicker value={dia} onChange={setDia} max={ayer} aria-label=\"Fecha de alta\" />"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"title": "Rango con atajos y duración máxima",
|
|
418
|
+
"code": "<DateRangePicker value={rango} onChange={setRango} presets max={ayer} maxSpan={366} />"
|
|
419
|
+
}
|
|
420
|
+
]
|
|
421
|
+
},
|
|
422
|
+
"dropzone": {
|
|
423
|
+
"import": "orbital-ds/ui/dropzone",
|
|
424
|
+
"group": "forms",
|
|
425
|
+
"summary": "Zona para arrastrar y soltar ficheros (o pulsar para buscarlos) que valida tipo, tamaño y número; solo recoge, no sube ni lista.",
|
|
426
|
+
"see": [
|
|
427
|
+
{
|
|
428
|
+
"component": "file-upload",
|
|
429
|
+
"when": "subida completa con lista, progreso, error y reintento"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"component": "attachment",
|
|
433
|
+
"when": "la fila de un fichero ya adjunto"
|
|
434
|
+
}
|
|
435
|
+
],
|
|
436
|
+
"exports": [
|
|
437
|
+
"Dropzone",
|
|
438
|
+
"formatBytes",
|
|
439
|
+
"type DropzoneRejectReason",
|
|
440
|
+
"type DropzoneRejection",
|
|
441
|
+
"type DropzoneState"
|
|
442
|
+
],
|
|
443
|
+
"slots": [
|
|
444
|
+
"dropzone",
|
|
445
|
+
"dropzone-area",
|
|
446
|
+
"dropzone-description",
|
|
447
|
+
"dropzone-errors",
|
|
448
|
+
"dropzone-hint",
|
|
449
|
+
"dropzone-icon",
|
|
450
|
+
"dropzone-title"
|
|
451
|
+
],
|
|
452
|
+
"optionalPeers": [],
|
|
453
|
+
"props": {
|
|
454
|
+
"Dropzone": {
|
|
455
|
+
"accept": {
|
|
456
|
+
"type": "string",
|
|
457
|
+
"doc": "Tipos admitidos, con la sintaxis de `<input accept>`: «.pdf,image/*»."
|
|
458
|
+
},
|
|
459
|
+
"maxSize": {
|
|
460
|
+
"type": "number",
|
|
461
|
+
"doc": "Tamaño máximo por fichero, en bytes."
|
|
462
|
+
},
|
|
463
|
+
"maxFiles": {
|
|
464
|
+
"type": "number",
|
|
465
|
+
"doc": "Número máximo de ficheros por entrega (con `multiple`)."
|
|
466
|
+
},
|
|
467
|
+
"multiple": {
|
|
468
|
+
"type": "boolean"
|
|
469
|
+
},
|
|
470
|
+
"disabled": {
|
|
471
|
+
"type": "boolean"
|
|
472
|
+
},
|
|
473
|
+
"invalid": {
|
|
474
|
+
"type": "boolean",
|
|
475
|
+
"doc": "Fuerza el estado de error (p. ej. un campo obligatorio vacío)."
|
|
476
|
+
},
|
|
477
|
+
"onFiles": {
|
|
478
|
+
"type": "(files: File[]) => void",
|
|
479
|
+
"doc": "Ficheros aceptados."
|
|
480
|
+
},
|
|
481
|
+
"onReject": {
|
|
482
|
+
"type": "(rejections: DropzoneRejection[]) => void",
|
|
483
|
+
"doc": "Ficheros rechazados, con su motivo."
|
|
484
|
+
},
|
|
485
|
+
"title": {
|
|
486
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
487
|
+
"doc": "Título; por defecto, el del idioma activo."
|
|
488
|
+
},
|
|
489
|
+
"hint": {
|
|
490
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
491
|
+
"doc": "Pista bajo el título; por defecto, «o haz clic para buscarlos»."
|
|
492
|
+
},
|
|
493
|
+
"description": {
|
|
494
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
495
|
+
"doc": "Texto de la app (p. ej. «CSV, hasta 10 MB»)."
|
|
496
|
+
},
|
|
497
|
+
"icon": {
|
|
498
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
499
|
+
"doc": "Icono de la baldosa; por defecto, subir."
|
|
500
|
+
},
|
|
501
|
+
"areaClassName": {
|
|
502
|
+
"type": "string",
|
|
503
|
+
"doc": "Clases del área pulsable (la `label`); lo usa FileUpload para el preset `button`."
|
|
504
|
+
},
|
|
505
|
+
"name": {
|
|
506
|
+
"type": "string",
|
|
507
|
+
"doc": "name del `input type=file` (formularios)."
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
"notes": [
|
|
512
|
+
"Los rechazos ya se explican bajo la zona; `onReject` solo si la app necesita reaccionar a ellos."
|
|
513
|
+
],
|
|
514
|
+
"examples": [
|
|
515
|
+
{
|
|
516
|
+
"title": "Importar un CSV",
|
|
517
|
+
"code": "<Dropzone\n accept=\".csv,text/csv\"\n maxSize={10 * 1024 * 1024}\n description=\"CSV, hasta 10 MB\"\n onFiles={importar}\n onReject={avisar}\n/>"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"title": "Desactivada",
|
|
521
|
+
"code": "<Dropzone disabled description=\"Disponible cuando termine la importación en curso\" />"
|
|
522
|
+
}
|
|
523
|
+
]
|
|
524
|
+
},
|
|
525
|
+
"field": {
|
|
526
|
+
"import": "orbital-ds/ui/field",
|
|
527
|
+
"group": "forms",
|
|
528
|
+
"summary": "Estructura de un campo de formulario: etiqueta, control, ayuda y error, con orientación vertical, horizontal o adaptable al ancho.",
|
|
529
|
+
"see": [
|
|
530
|
+
{
|
|
531
|
+
"component": "form-layout",
|
|
532
|
+
"when": "la maqueta del formulario entero, con secciones y barra de guardar"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"component": "label",
|
|
536
|
+
"when": "una etiqueta suelta fuera de un formulario"
|
|
537
|
+
}
|
|
538
|
+
],
|
|
539
|
+
"exports": [
|
|
540
|
+
"Field",
|
|
541
|
+
"FieldContent",
|
|
542
|
+
"FieldDescription",
|
|
543
|
+
"FieldError",
|
|
544
|
+
"FieldGroup",
|
|
545
|
+
"FieldLabel",
|
|
546
|
+
"FieldLegend",
|
|
547
|
+
"FieldSeparator",
|
|
548
|
+
"FieldSet",
|
|
549
|
+
"FieldTitle"
|
|
550
|
+
],
|
|
551
|
+
"slots": [
|
|
552
|
+
"field",
|
|
553
|
+
"field-content",
|
|
554
|
+
"field-description",
|
|
555
|
+
"field-error",
|
|
556
|
+
"field-group",
|
|
557
|
+
"field-label",
|
|
558
|
+
"field-legend",
|
|
559
|
+
"field-separator",
|
|
560
|
+
"field-separator-content",
|
|
561
|
+
"field-set"
|
|
562
|
+
],
|
|
563
|
+
"optionalPeers": [],
|
|
564
|
+
"props": {
|
|
565
|
+
"Field": {
|
|
566
|
+
"orientation": {
|
|
567
|
+
"type": "\"horizontal\" | \"vertical\" | \"responsive\"",
|
|
568
|
+
"values": [
|
|
569
|
+
"horizontal",
|
|
570
|
+
"vertical",
|
|
571
|
+
"responsive"
|
|
572
|
+
]
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
"FieldError": {
|
|
576
|
+
"errors": {
|
|
577
|
+
"type": "({ message?: string; } | undefined)[]"
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
"FieldLegend": {
|
|
581
|
+
"variant": {
|
|
582
|
+
"type": "\"label\" | \"legend\"",
|
|
583
|
+
"values": [
|
|
584
|
+
"label",
|
|
585
|
+
"legend"
|
|
586
|
+
]
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
"notes": [
|
|
591
|
+
"Formularios: FieldGroup + Field con FieldLabel (siempre visible; el placeholder no es etiqueta), FieldDescription y FieldError junto al campo.",
|
|
592
|
+
"Una columna; agrupa con FieldSet/FieldLegend; lo opcional, marcado o plegado."
|
|
593
|
+
],
|
|
594
|
+
"examples": [
|
|
595
|
+
{
|
|
596
|
+
"title": "Campo con ayuda",
|
|
597
|
+
"code": "<FieldGroup>\n <Field>\n <FieldLabel htmlFor=\"company\">Razón social</FieldLabel>\n <Input id=\"company\" />\n <FieldDescription>Aparecerá en las facturas.</FieldDescription>\n </Field>\n</FieldGroup>"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"title": "Con error",
|
|
601
|
+
"code": "<Field data-invalid=\"true\">\n <FieldLabel htmlFor=\"vat\">NIF</FieldLabel>\n <Input id=\"vat\" aria-invalid=\"true\" />\n <FieldError>El NIF debe tener 9 caracteres.</FieldError>\n</Field>"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"title": "Grupo con leyenda",
|
|
605
|
+
"code": "<FieldSet>\n <FieldLegend>Notificaciones</FieldLegend>\n <Field orientation=\"horizontal\">\n <Checkbox id=\"n-email\" />\n <FieldLabel htmlFor=\"n-email\">Por correo</FieldLabel>\n </Field>\n</FieldSet>"
|
|
606
|
+
}
|
|
607
|
+
]
|
|
608
|
+
},
|
|
609
|
+
"file-upload": {
|
|
610
|
+
"import": "orbital-ds/ui/file-upload",
|
|
611
|
+
"group": "forms",
|
|
612
|
+
"summary": "Subida de ficheros completa: zona o botón para elegirlos y lista con progreso, error, reintento y quitar; la app pone la función que sube.",
|
|
613
|
+
"see": [
|
|
614
|
+
{
|
|
615
|
+
"component": "dropzone",
|
|
616
|
+
"when": "solo la zona para soltar, sin lista ni subida"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"component": "attachment",
|
|
620
|
+
"when": "mostrar un fichero ya adjunto"
|
|
621
|
+
}
|
|
622
|
+
],
|
|
623
|
+
"exports": [
|
|
624
|
+
"FileUpload",
|
|
625
|
+
"type FileUploadFn",
|
|
626
|
+
"type FileUploadItem",
|
|
627
|
+
"type FileUploadPreset",
|
|
628
|
+
"type FileUploadStatus"
|
|
629
|
+
],
|
|
630
|
+
"slots": [
|
|
631
|
+
"file-upload",
|
|
632
|
+
"file-upload-item",
|
|
633
|
+
"file-upload-list"
|
|
634
|
+
],
|
|
635
|
+
"optionalPeers": [],
|
|
636
|
+
"props": {
|
|
637
|
+
"FileUpload": {
|
|
638
|
+
"preset": {
|
|
639
|
+
"type": "FileUploadPreset",
|
|
640
|
+
"values": [
|
|
641
|
+
"button",
|
|
642
|
+
"drop"
|
|
643
|
+
]
|
|
644
|
+
},
|
|
645
|
+
"files": {
|
|
646
|
+
"type": "FileUploadItem[]",
|
|
647
|
+
"doc": "Lista controlada. Sin ella, el componente la guarda."
|
|
648
|
+
},
|
|
649
|
+
"onFilesChange": {
|
|
650
|
+
"type": "(files: FileUploadItem[]) => void"
|
|
651
|
+
},
|
|
652
|
+
"upload": {
|
|
653
|
+
"type": "FileUploadFn",
|
|
654
|
+
"doc": "Sube un fichero; la pone la app. Sin ella, solo recoge."
|
|
655
|
+
},
|
|
656
|
+
"accept": {
|
|
657
|
+
"type": "string",
|
|
658
|
+
"doc": "Tipos admitidos, con la sintaxis de `<input accept>`."
|
|
659
|
+
},
|
|
660
|
+
"maxSize": {
|
|
661
|
+
"type": "number",
|
|
662
|
+
"doc": "Tamaño máximo por fichero, en bytes."
|
|
663
|
+
},
|
|
664
|
+
"maxFiles": {
|
|
665
|
+
"type": "number",
|
|
666
|
+
"doc": "Máximo de ficheros en la lista."
|
|
667
|
+
},
|
|
668
|
+
"multiple": {
|
|
669
|
+
"type": "boolean"
|
|
670
|
+
},
|
|
671
|
+
"disabled": {
|
|
672
|
+
"type": "boolean"
|
|
673
|
+
},
|
|
674
|
+
"title": {
|
|
675
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
676
|
+
},
|
|
677
|
+
"hint": {
|
|
678
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
679
|
+
},
|
|
680
|
+
"description": {
|
|
681
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
682
|
+
"doc": "Texto de la app (p. ej. «PDF o imagen, hasta 10 MB»)."
|
|
683
|
+
},
|
|
684
|
+
"icon": {
|
|
685
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
686
|
+
},
|
|
687
|
+
"label": {
|
|
688
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
689
|
+
"doc": "Texto del botón (preset `button`)."
|
|
690
|
+
},
|
|
691
|
+
"name": {
|
|
692
|
+
"type": "string"
|
|
693
|
+
},
|
|
694
|
+
"id": {
|
|
695
|
+
"type": "string"
|
|
696
|
+
},
|
|
697
|
+
"className": {
|
|
698
|
+
"type": "string"
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
"presets": {
|
|
703
|
+
"values": [
|
|
704
|
+
"drop",
|
|
705
|
+
"button"
|
|
706
|
+
],
|
|
707
|
+
"default": "drop",
|
|
708
|
+
"intent": {
|
|
709
|
+
"drop": "zona grande para soltar con la lista debajo (importar, adjuntar documentos)",
|
|
710
|
+
"button": "botón «Adjuntar» con la lista debajo, ocupa poco (formularios, comentarios, diálogos)"
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
"notes": [
|
|
714
|
+
"Subida completa: `drop` para importar o adjuntar documentos, `button` para formularios y diálogos con poco sitio. La app pone `upload(file, onProgress, signal)` (cualquier backend, p. ej. URL prefirmada); sin él solo recoge ficheros y los envías con el formulario.",
|
|
715
|
+
"Un fichero con error muestra su mensaje y «reintentar»; quitar un fichero en curso cancela la subida (`signal`). Sin subida por trozos ni reanudación: eso lo resuelve la app. Solo la zona, sin lista: Dropzone; solo la fila de un fichero: Attachment."
|
|
716
|
+
],
|
|
717
|
+
"examples": [
|
|
718
|
+
{
|
|
719
|
+
"title": "Preset drop con subida",
|
|
720
|
+
"code": "<FileUpload\n accept=\".pdf,image/*\"\n maxSize={10 * 1024 * 1024}\n maxFiles={5}\n description=\"PDF o imagen, hasta 10 MB\"\n upload={subirFichero}\n/>"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"title": "Preset button, sin subida (va con el formulario)",
|
|
724
|
+
"code": "<FileUpload preset=\"button\" multiple={false} name=\"contrato\" onFilesChange={setFicheros} />"
|
|
725
|
+
}
|
|
726
|
+
]
|
|
727
|
+
},
|
|
728
|
+
"form-layout": {
|
|
729
|
+
"import": "orbital-ds/ui/form-layout",
|
|
730
|
+
"group": "forms",
|
|
731
|
+
"summary": "Maqueta de un formulario o pantalla de ajustes: secciones y barra Guardar/Descartar resueltas, en una columna o con títulos al lado.",
|
|
732
|
+
"see": [
|
|
733
|
+
{
|
|
734
|
+
"component": "field",
|
|
735
|
+
"when": "cada campo dentro de las secciones"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"component": "step-flow",
|
|
739
|
+
"when": "un formulario largo repartido en pasos"
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"component": "filter-bar",
|
|
743
|
+
"when": "filtros de una lista, no un formulario que se guarda"
|
|
744
|
+
}
|
|
745
|
+
],
|
|
746
|
+
"exports": [
|
|
747
|
+
"FormLayout",
|
|
748
|
+
"FormSection",
|
|
749
|
+
"type FormLayoutPreset"
|
|
750
|
+
],
|
|
751
|
+
"slots": [
|
|
752
|
+
"form-actions",
|
|
753
|
+
"form-layout",
|
|
754
|
+
"form-section"
|
|
755
|
+
],
|
|
756
|
+
"optionalPeers": [],
|
|
757
|
+
"props": {
|
|
758
|
+
"FormLayout": {
|
|
759
|
+
"preset": {
|
|
760
|
+
"type": "FormLayoutPreset",
|
|
761
|
+
"values": [
|
|
762
|
+
"inline",
|
|
763
|
+
"sectioned",
|
|
764
|
+
"settings"
|
|
765
|
+
]
|
|
766
|
+
},
|
|
767
|
+
"dirty": {
|
|
768
|
+
"type": "boolean",
|
|
769
|
+
"doc": "Hay cambios sin guardar (obligatorio para que `settings` muestre su barra)."
|
|
770
|
+
},
|
|
771
|
+
"saving": {
|
|
772
|
+
"type": "boolean"
|
|
773
|
+
},
|
|
774
|
+
"onSave": {
|
|
775
|
+
"type": "() => void | Promise<void>"
|
|
776
|
+
},
|
|
777
|
+
"onDiscard": {
|
|
778
|
+
"type": "() => void"
|
|
779
|
+
},
|
|
780
|
+
"saveLabel": {
|
|
781
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
782
|
+
},
|
|
783
|
+
"discardLabel": {
|
|
784
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
785
|
+
}
|
|
786
|
+
},
|
|
787
|
+
"FormSection": {
|
|
788
|
+
"title": {
|
|
789
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
790
|
+
"required": true
|
|
791
|
+
},
|
|
792
|
+
"description": {
|
|
793
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
"presets": {
|
|
798
|
+
"values": [
|
|
799
|
+
"inline",
|
|
800
|
+
"sectioned",
|
|
801
|
+
"settings"
|
|
802
|
+
],
|
|
803
|
+
"default": "inline",
|
|
804
|
+
"intent": {
|
|
805
|
+
"inline": "una columna, acciones al final (altas y formularios cortos)",
|
|
806
|
+
"sectioned": "título de sección a la izquierda y campos a la derecha en ancho; acciones al final",
|
|
807
|
+
"settings": "como `sectioned`, pero la barra «Guardar / Descartar» solo aparece con `dirty`"
|
|
808
|
+
}
|
|
809
|
+
},
|
|
810
|
+
"notes": [
|
|
811
|
+
"Formularios y ajustes: `inline` (corto), `sectioned` (varias secciones) o `settings` (barra de guardado solo con cambios). Combina con Field para los campos.",
|
|
812
|
+
"Un formulario de varios pasos no va aquí: usa StepFlow."
|
|
813
|
+
],
|
|
814
|
+
"examples": [
|
|
815
|
+
{
|
|
816
|
+
"title": "Preset inline (alta corta)",
|
|
817
|
+
"code": "<FormLayout preset=\"inline\" onSave={crear}>\n <Field>\n <FieldLabel htmlFor=\"name\">Nombre</FieldLabel>\n <Input id=\"name\" />\n </Field>\n</FormLayout>"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"title": "Preset settings (barra solo con cambios)",
|
|
821
|
+
"code": "<FormLayout preset=\"settings\" dirty={dirty} onSave={guardar} onDiscard={descartar}>\n <FormSection title=\"General\" description=\"Datos básicos de la organización.\">\n <Field>\n <FieldLabel htmlFor=\"org\">Nombre</FieldLabel>\n <Input id=\"org\" value={nombre} onChange={(e) => setNombre(e.target.value)} />\n </Field>\n </FormSection>\n</FormLayout>"
|
|
822
|
+
}
|
|
823
|
+
]
|
|
824
|
+
},
|
|
825
|
+
"input-group": {
|
|
826
|
+
"import": "orbital-ds/ui/input-group",
|
|
827
|
+
"group": "forms",
|
|
828
|
+
"summary": "Campo con piezas dentro de su borde: icono, prefijo o sufijo de texto, atajo de teclado o botones (copiar, borrar, mostrar).",
|
|
829
|
+
"see": [
|
|
830
|
+
{
|
|
831
|
+
"component": "input",
|
|
832
|
+
"when": "campo de texto simple, sin adornos"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"component": "button-group",
|
|
836
|
+
"when": "unir un campo y un botón separados en un bloque"
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
"component": "search-box",
|
|
840
|
+
"when": "buscador con sugerencias mientras se escribe"
|
|
841
|
+
}
|
|
842
|
+
],
|
|
843
|
+
"exports": [
|
|
844
|
+
"InputGroup",
|
|
845
|
+
"InputGroupAddon",
|
|
846
|
+
"InputGroupButton",
|
|
847
|
+
"InputGroupInput",
|
|
848
|
+
"InputGroupText",
|
|
849
|
+
"InputGroupTextarea"
|
|
850
|
+
],
|
|
851
|
+
"slots": [
|
|
852
|
+
"input-group",
|
|
853
|
+
"input-group-addon",
|
|
854
|
+
"input-group-button",
|
|
855
|
+
"input-group-control",
|
|
856
|
+
"input-group-text"
|
|
857
|
+
],
|
|
858
|
+
"optionalPeers": [],
|
|
859
|
+
"props": {
|
|
860
|
+
"InputGroupAddon": {
|
|
861
|
+
"align": {
|
|
862
|
+
"type": "\"inline-start\" | \"inline-end\" | \"block-start\" | \"block-end\"",
|
|
863
|
+
"values": [
|
|
864
|
+
"inline-start",
|
|
865
|
+
"inline-end",
|
|
866
|
+
"block-start",
|
|
867
|
+
"block-end"
|
|
868
|
+
]
|
|
869
|
+
}
|
|
870
|
+
},
|
|
871
|
+
"InputGroupButton": {
|
|
872
|
+
"variant": {
|
|
873
|
+
"type": "\"link\" | \"default\" | \"outline\" | \"secondary\" | \"ghost\" | \"destructive\" | \"cta\"",
|
|
874
|
+
"values": [
|
|
875
|
+
"link",
|
|
876
|
+
"default",
|
|
877
|
+
"outline",
|
|
878
|
+
"secondary",
|
|
879
|
+
"ghost",
|
|
880
|
+
"destructive",
|
|
881
|
+
"cta"
|
|
882
|
+
]
|
|
883
|
+
},
|
|
884
|
+
"nativeButton": {
|
|
885
|
+
"type": "boolean"
|
|
886
|
+
},
|
|
887
|
+
"size": {
|
|
888
|
+
"type": "\"xs\" | \"sm\" | \"icon-xs\" | \"icon-sm\"",
|
|
889
|
+
"values": [
|
|
890
|
+
"xs",
|
|
891
|
+
"sm",
|
|
892
|
+
"icon-xs",
|
|
893
|
+
"icon-sm"
|
|
894
|
+
]
|
|
895
|
+
},
|
|
896
|
+
"type": {
|
|
897
|
+
"type": "\"button\" | \"submit\" | \"reset\"",
|
|
898
|
+
"values": [
|
|
899
|
+
"button",
|
|
900
|
+
"submit",
|
|
901
|
+
"reset"
|
|
902
|
+
]
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
"notes": [
|
|
907
|
+
"Usa InputGroupInput o InputGroupTextarea dentro, nunca Input: el foco y el error los pinta el grupo."
|
|
908
|
+
],
|
|
909
|
+
"examples": [
|
|
910
|
+
{
|
|
911
|
+
"title": "Icono y atajo",
|
|
912
|
+
"code": "<InputGroup>\n <InputGroupAddon>\n <SearchIcon />\n </InputGroupAddon>\n <InputGroupInput placeholder=\"Buscar clientes…\" />\n <InputGroupAddon align=\"inline-end\">\n <Kbd>⌘K</Kbd>\n </InputGroupAddon>\n</InputGroup>"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"title": "Sufijo de texto y botón",
|
|
916
|
+
"code": "<InputGroup>\n <InputGroupInput readOnly defaultValue={clave} />\n <InputGroupAddon align=\"inline-end\">\n <InputGroupButton size=\"icon-xs\" aria-label=\"Copiar clave\">\n <CopyIcon />\n </InputGroupButton>\n </InputGroupAddon>\n</InputGroup>"
|
|
917
|
+
}
|
|
918
|
+
]
|
|
919
|
+
},
|
|
920
|
+
"input-otp": {
|
|
921
|
+
"import": "orbital-ds/ui/input-otp",
|
|
922
|
+
"group": "forms",
|
|
923
|
+
"summary": "Código de un solo uso en casillas (verificación por SMS o correo, MFA): pega y avanza solo entre dígitos.",
|
|
924
|
+
"see": [
|
|
925
|
+
{
|
|
926
|
+
"component": "mfa-challenge",
|
|
927
|
+
"when": "la pantalla completa del segundo factor"
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"component": "input",
|
|
931
|
+
"when": "un código o dato de longitud libre"
|
|
932
|
+
}
|
|
933
|
+
],
|
|
934
|
+
"exports": [
|
|
935
|
+
"InputOTP",
|
|
936
|
+
"InputOTPGroup",
|
|
937
|
+
"InputOTPSeparator",
|
|
938
|
+
"InputOTPSlot"
|
|
939
|
+
],
|
|
940
|
+
"slots": [
|
|
941
|
+
"input-otp",
|
|
942
|
+
"input-otp-char",
|
|
943
|
+
"input-otp-group",
|
|
944
|
+
"input-otp-separator",
|
|
945
|
+
"input-otp-slot"
|
|
946
|
+
],
|
|
947
|
+
"optionalPeers": [
|
|
948
|
+
"input-otp"
|
|
949
|
+
],
|
|
950
|
+
"props": {
|
|
951
|
+
"InputOTPSlot": {
|
|
952
|
+
"index": {
|
|
953
|
+
"type": "number",
|
|
954
|
+
"required": true
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
},
|
|
958
|
+
"notes": [
|
|
959
|
+
"Un InputOTPSlot por posición, con `index` de 0 a `maxLength - 1`; el error se marca con `aria-invalid` en cada casilla.",
|
|
960
|
+
"input-otp es dependencia opcional de la app."
|
|
961
|
+
],
|
|
962
|
+
"examples": [
|
|
963
|
+
{
|
|
964
|
+
"title": "Código de 6 dígitos en dos grupos",
|
|
965
|
+
"code": "<InputOTP maxLength={6} value={codigo} onChange={setCodigo}>\n <InputOTPGroup>\n <InputOTPSlot index={0} />\n <InputOTPSlot index={1} />\n <InputOTPSlot index={2} />\n </InputOTPGroup>\n <InputOTPSeparator />\n <InputOTPGroup>\n <InputOTPSlot index={3} />\n <InputOTPSlot index={4} />\n <InputOTPSlot index={5} />\n </InputOTPGroup>\n</InputOTP>"
|
|
966
|
+
}
|
|
967
|
+
]
|
|
968
|
+
},
|
|
969
|
+
"input": {
|
|
970
|
+
"import": "orbital-ds/ui/input",
|
|
971
|
+
"group": "forms",
|
|
972
|
+
"summary": "Campo de texto de una línea (nombre, correo, importe); va dentro de Field con su etiqueta.",
|
|
973
|
+
"see": [
|
|
974
|
+
{
|
|
975
|
+
"component": "input-group",
|
|
976
|
+
"when": "el campo necesita icono, prefijo, sufijo o botón dentro"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"component": "textarea",
|
|
980
|
+
"when": "texto de varias líneas"
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
"component": "password-input",
|
|
984
|
+
"when": "contraseñas, con mostrar/ocultar y autocompletado correcto"
|
|
985
|
+
}
|
|
986
|
+
],
|
|
987
|
+
"exports": [
|
|
988
|
+
"Input"
|
|
989
|
+
],
|
|
990
|
+
"slots": [
|
|
991
|
+
"input"
|
|
992
|
+
],
|
|
993
|
+
"optionalPeers": [],
|
|
994
|
+
"notes": [
|
|
995
|
+
"El placeholder no es etiqueta: pon siempre FieldLabel (o `aria-label` si no hay sitio)."
|
|
996
|
+
],
|
|
997
|
+
"examples": [
|
|
998
|
+
{
|
|
999
|
+
"title": "Con etiqueta",
|
|
1000
|
+
"code": "<Field>\n <FieldLabel htmlFor=\"email\">Correo</FieldLabel>\n <Input id=\"email\" type=\"email\" autoComplete=\"email\" />\n</Field>"
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
"title": "Con error",
|
|
1004
|
+
"code": "<Input id=\"vat\" aria-invalid=\"true\" defaultValue=\"B1234\" />"
|
|
1005
|
+
}
|
|
1006
|
+
]
|
|
1007
|
+
},
|
|
1008
|
+
"instruction-editor": {
|
|
1009
|
+
"import": "orbital-ds/ui/instruction-editor",
|
|
1010
|
+
"group": "forms",
|
|
1011
|
+
"summary": "Editor de instrucciones, prompts o documentos que siempre entrega Markdown, con vistas visual, Markdown, HTML y previa, y variables.",
|
|
1012
|
+
"see": [
|
|
1013
|
+
{
|
|
1014
|
+
"component": "textarea",
|
|
1015
|
+
"when": "texto libre corto sin formato"
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
"component": "chat-composer",
|
|
1019
|
+
"when": "escribir un mensaje en un chat"
|
|
1020
|
+
}
|
|
1021
|
+
],
|
|
1022
|
+
"exports": [
|
|
1023
|
+
"InstructionEditor"
|
|
1024
|
+
],
|
|
1025
|
+
"slots": [
|
|
1026
|
+
"instruction-editor",
|
|
1027
|
+
"instruction-editor-body",
|
|
1028
|
+
"instruction-editor-count",
|
|
1029
|
+
"instruction-editor-image-status",
|
|
1030
|
+
"instruction-editor-issues",
|
|
1031
|
+
"instruction-editor-preview",
|
|
1032
|
+
"instruction-editor-snippets",
|
|
1033
|
+
"instruction-editor-stats",
|
|
1034
|
+
"instruction-editor-toolbar",
|
|
1035
|
+
"instruction-editor-variables"
|
|
1036
|
+
],
|
|
1037
|
+
"optionalPeers": [
|
|
1038
|
+
"@tiptap/extension-image",
|
|
1039
|
+
"@tiptap/extension-placeholder",
|
|
1040
|
+
"@tiptap/extension-table",
|
|
1041
|
+
"@tiptap/markdown",
|
|
1042
|
+
"@tiptap/react",
|
|
1043
|
+
"@tiptap/starter-kit"
|
|
1044
|
+
],
|
|
1045
|
+
"props": {
|
|
1046
|
+
"InstructionEditor": {
|
|
1047
|
+
"preset": {
|
|
1048
|
+
"type": "InstructionEditorPreset",
|
|
1049
|
+
"values": [
|
|
1050
|
+
"compact",
|
|
1051
|
+
"document",
|
|
1052
|
+
"prompt"
|
|
1053
|
+
],
|
|
1054
|
+
"doc": "Intención: `prompt`, `document` o `compact`. Solo fija valores por defecto."
|
|
1055
|
+
},
|
|
1056
|
+
"value": {
|
|
1057
|
+
"type": "string",
|
|
1058
|
+
"doc": "Markdown (controlado)."
|
|
1059
|
+
},
|
|
1060
|
+
"defaultValue": {
|
|
1061
|
+
"type": "string",
|
|
1062
|
+
"doc": "Markdown inicial (no controlado)."
|
|
1063
|
+
},
|
|
1064
|
+
"onChange": {
|
|
1065
|
+
"type": "(markdown: string) => void",
|
|
1066
|
+
"doc": "Recibe el documento como Markdown en cada cambio."
|
|
1067
|
+
},
|
|
1068
|
+
"modes": {
|
|
1069
|
+
"type": "InstructionEditorMode[]",
|
|
1070
|
+
"doc": "Vistas disponibles, en orden."
|
|
1071
|
+
},
|
|
1072
|
+
"mode": {
|
|
1073
|
+
"type": "InstructionEditorMode",
|
|
1074
|
+
"values": [
|
|
1075
|
+
"html",
|
|
1076
|
+
"visual",
|
|
1077
|
+
"markdown",
|
|
1078
|
+
"preview"
|
|
1079
|
+
]
|
|
1080
|
+
},
|
|
1081
|
+
"defaultMode": {
|
|
1082
|
+
"type": "InstructionEditorMode",
|
|
1083
|
+
"values": [
|
|
1084
|
+
"html",
|
|
1085
|
+
"visual",
|
|
1086
|
+
"markdown",
|
|
1087
|
+
"preview"
|
|
1088
|
+
]
|
|
1089
|
+
},
|
|
1090
|
+
"onModeChange": {
|
|
1091
|
+
"type": "(mode: InstructionEditorMode) => void"
|
|
1092
|
+
},
|
|
1093
|
+
"variables": {
|
|
1094
|
+
"type": "readonly string[]",
|
|
1095
|
+
"doc": "Variables que se insertan como {{nombre}} desde la barra."
|
|
1096
|
+
},
|
|
1097
|
+
"syntax": {
|
|
1098
|
+
"type": "\"template\" | \"plain\"",
|
|
1099
|
+
"values": [
|
|
1100
|
+
"template",
|
|
1101
|
+
"plain"
|
|
1102
|
+
],
|
|
1103
|
+
"doc": "Sintaxis de plantilla: `template` activa los fragmentos de lógica (`[[IF]]`, valor por defecto…) y los avisos de condiciones mal escritas. Por defecto, `plain` (solo `{{variable}}`)."
|
|
1104
|
+
},
|
|
1105
|
+
"renderPreview": {
|
|
1106
|
+
"type": "(markdown: string) => string | InstructionPreview",
|
|
1107
|
+
"doc": "La app renderiza la plantilla con su motor (y variables de ejemplo) para la vista previa. Devuelve el texto que verá el modelo, o `{ text, stats }` con datos de tamaño."
|
|
1108
|
+
},
|
|
1109
|
+
"placeholder": {
|
|
1110
|
+
"type": "string"
|
|
1111
|
+
},
|
|
1112
|
+
"readOnly": {
|
|
1113
|
+
"type": "boolean"
|
|
1114
|
+
},
|
|
1115
|
+
"tools": {
|
|
1116
|
+
"type": "Tool[]",
|
|
1117
|
+
"doc": "Herramientas de la barra (por defecto, las del preset)."
|
|
1118
|
+
},
|
|
1119
|
+
"headingLevels": {
|
|
1120
|
+
"type": "HeadingLevel[]",
|
|
1121
|
+
"doc": "Niveles de título que ofrece la barra (por defecto, H1 a H3)."
|
|
1122
|
+
},
|
|
1123
|
+
"onUploadImage": {
|
|
1124
|
+
"type": "ImageUploader",
|
|
1125
|
+
"doc": "Sube una imagen y devuelve su URL (S3, R2, un Worker…: ver `createPresignedUploader` y `createEndpointUploader` en `orbital-ds/lib/image-upload`). Si se da, aparece el botón de imagen y se admiten pegar y arrastrar imágenes."
|
|
1126
|
+
},
|
|
1127
|
+
"imageAccept": {
|
|
1128
|
+
"type": "string",
|
|
1129
|
+
"doc": "Tipos de imagen admitidos (por defecto, `image/*`)."
|
|
1130
|
+
},
|
|
1131
|
+
"imageMaxBytes": {
|
|
1132
|
+
"type": "number",
|
|
1133
|
+
"doc": "Tamaño máximo en bytes; mayor se rechaza antes de subir."
|
|
1134
|
+
},
|
|
1135
|
+
"showCount": {
|
|
1136
|
+
"type": "boolean",
|
|
1137
|
+
"doc": "Muestra el contador de caracteres (por defecto, el del preset)."
|
|
1138
|
+
},
|
|
1139
|
+
"aria-label": {
|
|
1140
|
+
"type": "string",
|
|
1141
|
+
"doc": "Nombre accesible del editor."
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
"presets": {
|
|
1146
|
+
"values": [
|
|
1147
|
+
"prompt",
|
|
1148
|
+
"document",
|
|
1149
|
+
"compact"
|
|
1150
|
+
],
|
|
1151
|
+
"default": "prompt",
|
|
1152
|
+
"intent": {
|
|
1153
|
+
"prompt": "instrucciones o prompt de sistema: visual + markdown + vista previa, variables y contador",
|
|
1154
|
+
"document": "documento largo: las cuatro vistas y la barra completa",
|
|
1155
|
+
"compact": "comentario o nota corta: solo visual, barra mínima, área baja"
|
|
1156
|
+
}
|
|
1157
|
+
},
|
|
1158
|
+
"notes": [
|
|
1159
|
+
"Preset `prompt` para instrucciones o prompts de sistema (el modelo recibe el Markdown); `document` para texto largo con vista HTML; `compact` para notas y comentarios.",
|
|
1160
|
+
"Tiptap es dependencia opcional: instala `@tiptap/react @tiptap/pm @tiptap/starter-kit @tiptap/markdown @tiptap/extension-placeholder @tiptap/extension-table`. Carga el componente con `React.lazy` si quieres que no pese en el resto de la app.",
|
|
1161
|
+
"En la vista Markdown la barra inserta la sintaxis en el texto (##, **, listas, citas, bloque de código) sobre la selección y la quita si ya está; sin deshacer/rehacer propios (usa el del navegador).",
|
|
1162
|
+
"Seguridad: la extensión de imagen solo se registra con `onUploadImage`; sin él, un `` del Markdown no se pinta (no se cargan recursos externos de un texto que no es de confianza). Con él, las imágenes del documento se cargan desde su URL: sirve las tuyas desde un dominio propio y, si el texto viene de terceros, valida las URL en la app.",
|
|
1163
|
+
"Imágenes: con `onUploadImage` (file → URL) aparece el botón de imagen y se admiten pegar y arrastrar. orbital-ds no conoce el almacenamiento: `createPresignedUploader` (S3 y R2 por URL prefirmada) y `createEndpointUploader` (un Worker con R2, una API) de `orbital-ds/lib/image-upload` lo conectan; las claves viven en el servidor. En Markdown queda ``.",
|
|
1164
|
+
"Títulos H1–H3 por defecto (`headingLevels` los cambia). Tablas: la herramienta `table` inserta una de 3×3 con cabecera y, dentro de ella, añade/quita filas y columnas; sale como tabla Markdown (GFM). Sin celdas combinadas ni listas dentro de la celda: Markdown no las admite.",
|
|
1165
|
+
"La vista HTML es solo de lectura (no se edita HTML ni se inyecta con innerHTML): la fuente de verdad es el Markdown.",
|
|
1166
|
+
"Las variables se insertan como texto `{{nombre}}`; sustituirlas al enviar el prompt es cosa de la app.",
|
|
1167
|
+
"`syntax=\"template\"` reconoce `{{v | \"x\"}}`, `{{v ? \"a\" : \"b\"}}`, `[[IF]]/[[ELSE]]/[[UNLESS]]`: añade fragmentos a la barra y avisa de condiciones que el motor trataría como falsas, bloques sin cerrar y variables fuera de `variables`. El editor no renderiza plantillas.",
|
|
1168
|
+
"`renderPreview` la pone la app (con su motor y variables de ejemplo) y alimenta la vista «Vista previa»; `stats` muestra, por ejemplo, tokens TOON frente a JSON. Sin ella, la vista previa es el documento de solo lectura.",
|
|
1169
|
+
"Medidas en --ds-editor-min-h, -max-h y -p; la tipografía del contenido usa los pesos del tema."
|
|
1170
|
+
],
|
|
1171
|
+
"examples": [
|
|
1172
|
+
{
|
|
1173
|
+
"title": "Preset prompt con variables",
|
|
1174
|
+
"code": "<InstructionEditor\n preset=\"prompt\"\n value={md}\n onChange={setMd}\n variables={[\"company\", \"user_name\"]}\n aria-label=\"Instrucciones del agente\"\n/>"
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
"title": "Preset compact (nota corta)",
|
|
1178
|
+
"code": "<InstructionEditor preset=\"compact\" defaultValue=\"\" placeholder=\"Añade una nota…\" aria-label=\"Nota\" />"
|
|
1179
|
+
}
|
|
1180
|
+
]
|
|
1181
|
+
},
|
|
1182
|
+
"label": {
|
|
1183
|
+
"import": "orbital-ds/ui/label",
|
|
1184
|
+
"group": "forms",
|
|
1185
|
+
"summary": "Etiqueta accesible (label nativa) para un control suelto fuera de la estructura de formulario.",
|
|
1186
|
+
"see": [
|
|
1187
|
+
{
|
|
1188
|
+
"component": "field",
|
|
1189
|
+
"when": "en formularios: FieldLabel junto con ayuda y error"
|
|
1190
|
+
}
|
|
1191
|
+
],
|
|
1192
|
+
"exports": [
|
|
1193
|
+
"Label"
|
|
1194
|
+
],
|
|
1195
|
+
"slots": [
|
|
1196
|
+
"label"
|
|
1197
|
+
],
|
|
1198
|
+
"optionalPeers": [],
|
|
1199
|
+
"notes": [
|
|
1200
|
+
"Asocia con `htmlFor` o envolviendo el control; en un formulario usa FieldLabel dentro de Field."
|
|
1201
|
+
],
|
|
1202
|
+
"examples": [
|
|
1203
|
+
{
|
|
1204
|
+
"title": "Etiqueta asociada",
|
|
1205
|
+
"code": "<Label htmlFor=\"ie-preset\">Preset</Label>\n<NativeSelect id=\"ie-preset\">\n <NativeSelectOption value=\"prompt\">Prompt</NativeSelectOption>\n</NativeSelect>"
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
"title": "Envolviendo el control",
|
|
1209
|
+
"code": "<Label>\n <Switch />\n Avisos por correo\n</Label>"
|
|
1210
|
+
}
|
|
1211
|
+
]
|
|
1212
|
+
},
|
|
1213
|
+
"native-select": {
|
|
1214
|
+
"import": "orbital-ds/ui/native-select",
|
|
1215
|
+
"group": "forms",
|
|
1216
|
+
"summary": "Selector nativo del navegador (lista del sistema): formularios simples, móvil y HTML sin JavaScript; solo el campo sigue el tema.",
|
|
1217
|
+
"see": [
|
|
1218
|
+
{
|
|
1219
|
+
"component": "select",
|
|
1220
|
+
"when": "lista con el diseño del tema"
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
"component": "combobox",
|
|
1224
|
+
"when": "lista larga en la que hace falta buscar"
|
|
1225
|
+
}
|
|
1226
|
+
],
|
|
1227
|
+
"exports": [
|
|
1228
|
+
"NativeSelect",
|
|
1229
|
+
"NativeSelectOptGroup",
|
|
1230
|
+
"NativeSelectOption"
|
|
1231
|
+
],
|
|
1232
|
+
"slots": [
|
|
1233
|
+
"native-select",
|
|
1234
|
+
"native-select-icon",
|
|
1235
|
+
"native-select-optgroup",
|
|
1236
|
+
"native-select-option",
|
|
1237
|
+
"native-select-wrapper"
|
|
1238
|
+
],
|
|
1239
|
+
"optionalPeers": [],
|
|
1240
|
+
"props": {
|
|
1241
|
+
"NativeSelect": {
|
|
1242
|
+
"size": {
|
|
1243
|
+
"type": "\"default\" | \"sm\"",
|
|
1244
|
+
"values": [
|
|
1245
|
+
"default",
|
|
1246
|
+
"sm"
|
|
1247
|
+
]
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
"notes": [
|
|
1252
|
+
"Es un <select> nativo: la lista desplegable la dibuja el navegador y ni el componente ni el tema pueden estilarla (solo el campo). Para una lista con el diseño del tema usa Select (orbital-ds/ui/select)."
|
|
1253
|
+
],
|
|
1254
|
+
"examples": [
|
|
1255
|
+
{
|
|
1256
|
+
"title": "Con etiqueta",
|
|
1257
|
+
"code": "<Field>\n <FieldLabel htmlFor=\"country\">País</FieldLabel>\n <NativeSelect id=\"country\" defaultValue=\"es\">\n <NativeSelectOption value=\"es\">España</NativeSelectOption>\n <NativeSelectOption value=\"pt\">Portugal</NativeSelectOption>\n </NativeSelect>\n</Field>"
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
"title": "Por grupos y compacto",
|
|
1261
|
+
"code": "<NativeSelect size=\"sm\" defaultValue=\"madrid\" aria-label=\"Zona horaria\">\n <NativeSelectOptGroup label=\"Europa\">\n <NativeSelectOption value=\"madrid\">Madrid</NativeSelectOption>\n <NativeSelectOption value=\"lisboa\">Lisboa</NativeSelectOption>\n </NativeSelectOptGroup>\n</NativeSelect>"
|
|
1262
|
+
}
|
|
1263
|
+
]
|
|
1264
|
+
},
|
|
1265
|
+
"password-strength": {
|
|
1266
|
+
"import": "orbital-ds/ui/password-strength",
|
|
1267
|
+
"group": "forms",
|
|
1268
|
+
"summary": "Medidor de fuerza de una contraseña en segmentos (débil, media, fuerte) bajo el campo al crearla o cambiarla.",
|
|
1269
|
+
"see": [
|
|
1270
|
+
{
|
|
1271
|
+
"component": "password-input",
|
|
1272
|
+
"when": "el campo de contraseña"
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
"component": "level-meter",
|
|
1276
|
+
"when": "un nivel genérico que no es de contraseña"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"component": "progress",
|
|
1280
|
+
"when": "avance de una tarea"
|
|
1281
|
+
}
|
|
1282
|
+
],
|
|
1283
|
+
"exports": [
|
|
1284
|
+
"PasswordStrength"
|
|
1285
|
+
],
|
|
1286
|
+
"slots": [
|
|
1287
|
+
"password-strength",
|
|
1288
|
+
"password-strength-bar",
|
|
1289
|
+
"password-strength-box",
|
|
1290
|
+
"password-strength-label",
|
|
1291
|
+
"password-strength-segment",
|
|
1292
|
+
"password-strength-text"
|
|
1293
|
+
],
|
|
1294
|
+
"optionalPeers": [],
|
|
1295
|
+
"props": {
|
|
1296
|
+
"PasswordStrength": {
|
|
1297
|
+
"value": {
|
|
1298
|
+
"type": "number",
|
|
1299
|
+
"doc": "Segmentos llenos (0–segments)."
|
|
1300
|
+
},
|
|
1301
|
+
"level": {
|
|
1302
|
+
"type": "StrengthLevel",
|
|
1303
|
+
"values": [
|
|
1304
|
+
"strong",
|
|
1305
|
+
"weak",
|
|
1306
|
+
"medium"
|
|
1307
|
+
],
|
|
1308
|
+
"doc": "Nivel directo (si no hay `value`)."
|
|
1309
|
+
},
|
|
1310
|
+
"segments": {
|
|
1311
|
+
"type": "number"
|
|
1312
|
+
},
|
|
1313
|
+
"showLabel": {
|
|
1314
|
+
"type": "boolean",
|
|
1315
|
+
"doc": "Muestra «Nivel de fuerza:» delante."
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
},
|
|
1319
|
+
"notes": [
|
|
1320
|
+
"No calcula la fuerza: la app la mide (longitud, listas de contraseñas filtradas…) y pasa `value` o `level`.",
|
|
1321
|
+
"Solo al crear o cambiar la contraseña, nunca al iniciar sesión."
|
|
1322
|
+
],
|
|
1323
|
+
"examples": [
|
|
1324
|
+
{
|
|
1325
|
+
"title": "Por puntuación",
|
|
1326
|
+
"code": "<PasswordStrength value={puntuacion} />"
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
"title": "Nivel directo, sin texto",
|
|
1330
|
+
"code": "<PasswordStrength level=\"strong\" showLabel={false} />"
|
|
1331
|
+
}
|
|
1332
|
+
]
|
|
1333
|
+
},
|
|
1334
|
+
"questionnaire": {
|
|
1335
|
+
"import": "orbital-ds/ui/questionnaire",
|
|
1336
|
+
"group": "forms",
|
|
1337
|
+
"summary": "Cuestionario de varias preguntas con elección única, múltiple o respuesta libre, navegando con Anterior/Siguiente (encuestas, perfil inicial).",
|
|
1338
|
+
"see": [
|
|
1339
|
+
{
|
|
1340
|
+
"component": "step-flow",
|
|
1341
|
+
"when": "un alta o asistente por pasos con campos de formulario"
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
"component": "choice-card",
|
|
1345
|
+
"when": "una sola pregunta visual dentro de un formulario"
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
"component": "form-layout",
|
|
1349
|
+
"when": "un formulario corriente que se ve entero"
|
|
1350
|
+
}
|
|
1351
|
+
],
|
|
1352
|
+
"exports": [
|
|
1353
|
+
"Questionnaire",
|
|
1354
|
+
"QuestionnaireActions",
|
|
1355
|
+
"QuestionnaireChoice",
|
|
1356
|
+
"QuestionnaireChoiceDescription",
|
|
1357
|
+
"QuestionnaireChoices",
|
|
1358
|
+
"QuestionnaireDescription",
|
|
1359
|
+
"QuestionnaireError",
|
|
1360
|
+
"QuestionnaireInput",
|
|
1361
|
+
"QuestionnaireItem",
|
|
1362
|
+
"QuestionnaireNext",
|
|
1363
|
+
"QuestionnairePrevious",
|
|
1364
|
+
"QuestionnaireProgress",
|
|
1365
|
+
"QuestionnaireSkip",
|
|
1366
|
+
"QuestionnaireSubmit",
|
|
1367
|
+
"QuestionnaireTitle"
|
|
1368
|
+
],
|
|
1369
|
+
"slots": [
|
|
1370
|
+
"questionnaire",
|
|
1371
|
+
"questionnaire-actions",
|
|
1372
|
+
"questionnaire-choice",
|
|
1373
|
+
"questionnaire-choice-description",
|
|
1374
|
+
"questionnaire-choice-indicator",
|
|
1375
|
+
"questionnaire-choice-indicator-check",
|
|
1376
|
+
"questionnaire-choice-indicator-dot",
|
|
1377
|
+
"questionnaire-choice-input",
|
|
1378
|
+
"questionnaire-choice-label",
|
|
1379
|
+
"questionnaire-choice-shortcut",
|
|
1380
|
+
"questionnaire-choices",
|
|
1381
|
+
"questionnaire-description",
|
|
1382
|
+
"questionnaire-error",
|
|
1383
|
+
"questionnaire-input",
|
|
1384
|
+
"questionnaire-input-wrapper",
|
|
1385
|
+
"questionnaire-item",
|
|
1386
|
+
"questionnaire-next",
|
|
1387
|
+
"questionnaire-previous",
|
|
1388
|
+
"questionnaire-progress",
|
|
1389
|
+
"questionnaire-skip",
|
|
1390
|
+
"questionnaire-submit",
|
|
1391
|
+
"questionnaire-title"
|
|
1392
|
+
],
|
|
1393
|
+
"optionalPeers": [
|
|
1394
|
+
"@shadcn/react"
|
|
1395
|
+
],
|
|
1396
|
+
"props": {
|
|
1397
|
+
"QuestionnaireNext": {
|
|
1398
|
+
"variant": {
|
|
1399
|
+
"type": "\"link\" | \"default\" | \"outline\" | \"secondary\" | \"ghost\" | \"destructive\" | \"cta\"",
|
|
1400
|
+
"values": [
|
|
1401
|
+
"link",
|
|
1402
|
+
"default",
|
|
1403
|
+
"outline",
|
|
1404
|
+
"secondary",
|
|
1405
|
+
"ghost",
|
|
1406
|
+
"destructive",
|
|
1407
|
+
"cta"
|
|
1408
|
+
]
|
|
1409
|
+
},
|
|
1410
|
+
"size": {
|
|
1411
|
+
"type": "\"default\" | \"xs\" | \"sm\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-sm\" | \"icon-lg\"",
|
|
1412
|
+
"values": [
|
|
1413
|
+
"default",
|
|
1414
|
+
"xs",
|
|
1415
|
+
"sm",
|
|
1416
|
+
"lg",
|
|
1417
|
+
"icon",
|
|
1418
|
+
"icon-xs",
|
|
1419
|
+
"icon-sm",
|
|
1420
|
+
"icon-lg"
|
|
1421
|
+
]
|
|
1422
|
+
}
|
|
1423
|
+
},
|
|
1424
|
+
"QuestionnairePrevious": {
|
|
1425
|
+
"variant": {
|
|
1426
|
+
"type": "\"link\" | \"default\" | \"outline\" | \"secondary\" | \"ghost\" | \"destructive\" | \"cta\"",
|
|
1427
|
+
"values": [
|
|
1428
|
+
"link",
|
|
1429
|
+
"default",
|
|
1430
|
+
"outline",
|
|
1431
|
+
"secondary",
|
|
1432
|
+
"ghost",
|
|
1433
|
+
"destructive",
|
|
1434
|
+
"cta"
|
|
1435
|
+
]
|
|
1436
|
+
},
|
|
1437
|
+
"size": {
|
|
1438
|
+
"type": "\"default\" | \"xs\" | \"sm\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-sm\" | \"icon-lg\"",
|
|
1439
|
+
"values": [
|
|
1440
|
+
"default",
|
|
1441
|
+
"xs",
|
|
1442
|
+
"sm",
|
|
1443
|
+
"lg",
|
|
1444
|
+
"icon",
|
|
1445
|
+
"icon-xs",
|
|
1446
|
+
"icon-sm",
|
|
1447
|
+
"icon-lg"
|
|
1448
|
+
]
|
|
1449
|
+
}
|
|
1450
|
+
},
|
|
1451
|
+
"QuestionnaireSkip": {
|
|
1452
|
+
"variant": {
|
|
1453
|
+
"type": "\"link\" | \"default\" | \"outline\" | \"secondary\" | \"ghost\" | \"destructive\" | \"cta\"",
|
|
1454
|
+
"values": [
|
|
1455
|
+
"link",
|
|
1456
|
+
"default",
|
|
1457
|
+
"outline",
|
|
1458
|
+
"secondary",
|
|
1459
|
+
"ghost",
|
|
1460
|
+
"destructive",
|
|
1461
|
+
"cta"
|
|
1462
|
+
]
|
|
1463
|
+
},
|
|
1464
|
+
"size": {
|
|
1465
|
+
"type": "\"default\" | \"xs\" | \"sm\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-sm\" | \"icon-lg\"",
|
|
1466
|
+
"values": [
|
|
1467
|
+
"default",
|
|
1468
|
+
"xs",
|
|
1469
|
+
"sm",
|
|
1470
|
+
"lg",
|
|
1471
|
+
"icon",
|
|
1472
|
+
"icon-xs",
|
|
1473
|
+
"icon-sm",
|
|
1474
|
+
"icon-lg"
|
|
1475
|
+
]
|
|
1476
|
+
}
|
|
1477
|
+
},
|
|
1478
|
+
"QuestionnaireSubmit": {
|
|
1479
|
+
"variant": {
|
|
1480
|
+
"type": "\"link\" | \"default\" | \"outline\" | \"secondary\" | \"ghost\" | \"destructive\" | \"cta\"",
|
|
1481
|
+
"values": [
|
|
1482
|
+
"link",
|
|
1483
|
+
"default",
|
|
1484
|
+
"outline",
|
|
1485
|
+
"secondary",
|
|
1486
|
+
"ghost",
|
|
1487
|
+
"destructive",
|
|
1488
|
+
"cta"
|
|
1489
|
+
]
|
|
1490
|
+
},
|
|
1491
|
+
"size": {
|
|
1492
|
+
"type": "\"default\" | \"xs\" | \"sm\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-sm\" | \"icon-lg\"",
|
|
1493
|
+
"values": [
|
|
1494
|
+
"default",
|
|
1495
|
+
"xs",
|
|
1496
|
+
"sm",
|
|
1497
|
+
"lg",
|
|
1498
|
+
"icon",
|
|
1499
|
+
"icon-xs",
|
|
1500
|
+
"icon-sm",
|
|
1501
|
+
"icon-lg"
|
|
1502
|
+
]
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
},
|
|
1506
|
+
"notes": [
|
|
1507
|
+
"Cada QuestionnaireItem lleva `name`: las respuestas llegan en el FormData de `onSubmit`.",
|
|
1508
|
+
"`multiple` convierte la pregunta en elección múltiple; QuestionnaireInput, en respuesta libre."
|
|
1509
|
+
],
|
|
1510
|
+
"examples": [
|
|
1511
|
+
{
|
|
1512
|
+
"title": "Una pregunta de opción única",
|
|
1513
|
+
"code": "<Questionnaire onSubmit={enviar}>\n <QuestionnaireItem name=\"rol\" required>\n <QuestionnaireTitle>¿Cuál es tu función en el equipo?</QuestionnaireTitle>\n <QuestionnaireChoices>\n <QuestionnaireChoice value=\"ventas\">Ventas</QuestionnaireChoice>\n <QuestionnaireChoice value=\"soporte\">Soporte</QuestionnaireChoice>\n </QuestionnaireChoices>\n <QuestionnaireError>Elige una opción para continuar.</QuestionnaireError>\n </QuestionnaireItem>\n <QuestionnaireActions>\n <QuestionnairePrevious>Anterior</QuestionnairePrevious>\n <QuestionnaireNext>Siguiente</QuestionnaireNext>\n <QuestionnaireSubmit>Enviar</QuestionnaireSubmit>\n </QuestionnaireActions>\n</Questionnaire>"
|
|
1514
|
+
},
|
|
1515
|
+
{
|
|
1516
|
+
"title": "Varias respuestas y texto libre",
|
|
1517
|
+
"code": "<QuestionnaireItem name=\"objetivos\" multiple>\n <QuestionnaireTitle>¿Qué quieres conseguir?</QuestionnaireTitle>\n <QuestionnaireChoices>\n <QuestionnaireChoice value=\"captacion\">Captar clientes</QuestionnaireChoice>\n <QuestionnaireChoice value=\"retencion\">Reducir bajas</QuestionnaireChoice>\n </QuestionnaireChoices>\n</QuestionnaireItem>\n<QuestionnaireItem name=\"empresa\">\n <QuestionnaireTitle>¿Cómo se llama tu empresa?</QuestionnaireTitle>\n <QuestionnaireInput placeholder=\"Acme S.L.\" />\n</QuestionnaireItem>"
|
|
1518
|
+
}
|
|
1519
|
+
]
|
|
1520
|
+
},
|
|
1521
|
+
"radio-group": {
|
|
1522
|
+
"import": "orbital-ds/ui/radio-group",
|
|
1523
|
+
"group": "forms",
|
|
1524
|
+
"summary": "Lista de opciones excluyentes para elegir exactamente UNA en un formulario (plan, frecuencia), todas visibles.",
|
|
1525
|
+
"see": [
|
|
1526
|
+
{
|
|
1527
|
+
"component": "choice-card",
|
|
1528
|
+
"when": "pocas opciones visuales con icono, en teselas"
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
"component": "select",
|
|
1532
|
+
"when": "muchas opciones o poco espacio"
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
"component": "checkbox",
|
|
1536
|
+
"when": "opciones independientes que se marcan por separado"
|
|
1537
|
+
}
|
|
1538
|
+
],
|
|
1539
|
+
"exports": [
|
|
1540
|
+
"RadioGroup",
|
|
1541
|
+
"RadioGroupItem"
|
|
1542
|
+
],
|
|
1543
|
+
"slots": [
|
|
1544
|
+
"radio-group",
|
|
1545
|
+
"radio-group-indicator",
|
|
1546
|
+
"radio-group-item"
|
|
1547
|
+
],
|
|
1548
|
+
"optionalPeers": [],
|
|
1549
|
+
"notes": [
|
|
1550
|
+
"Rodéalo con FieldSet y FieldLegend para que la pregunta tenga nombre accesible."
|
|
1551
|
+
],
|
|
1552
|
+
"examples": [
|
|
1553
|
+
{
|
|
1554
|
+
"title": "Con etiquetas",
|
|
1555
|
+
"code": "<RadioGroup defaultValue=\"monthly\">\n <Field orientation=\"horizontal\">\n <RadioGroupItem value=\"monthly\" id=\"plan-monthly\" />\n <FieldLabel htmlFor=\"plan-monthly\">Mensual</FieldLabel>\n </Field>\n <Field orientation=\"horizontal\">\n <RadioGroupItem value=\"yearly\" id=\"plan-yearly\" />\n <FieldLabel htmlFor=\"plan-yearly\">Anual</FieldLabel>\n </Field>\n</RadioGroup>"
|
|
1556
|
+
}
|
|
1557
|
+
]
|
|
1558
|
+
},
|
|
1559
|
+
"search-box": {
|
|
1560
|
+
"import": "orbital-ds/ui/search-box",
|
|
1561
|
+
"group": "forms",
|
|
1562
|
+
"summary": "Buscador predictivo: sugerencias mientras se escribe (con recientes y populares) para encontrar contenido de la app e ir a él.",
|
|
1563
|
+
"see": [
|
|
1564
|
+
{
|
|
1565
|
+
"component": "combobox",
|
|
1566
|
+
"when": "elegir un valor de una lista cerrada como dato del formulario"
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
"component": "command-palette",
|
|
1570
|
+
"when": "ir a pantallas o lanzar acciones con ⌘K"
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
"component": "filter-bar",
|
|
1574
|
+
"when": "filtrar una lista que ya está en pantalla"
|
|
1575
|
+
}
|
|
1576
|
+
],
|
|
1577
|
+
"exports": [
|
|
1578
|
+
"SearchBox",
|
|
1579
|
+
"type SearchQueryOptions",
|
|
1580
|
+
"type SearchSuggestion"
|
|
1581
|
+
],
|
|
1582
|
+
"slots": [
|
|
1583
|
+
"search-box",
|
|
1584
|
+
"search-box-group",
|
|
1585
|
+
"search-box-input",
|
|
1586
|
+
"search-box-list",
|
|
1587
|
+
"search-box-option",
|
|
1588
|
+
"search-box-status"
|
|
1589
|
+
],
|
|
1590
|
+
"optionalPeers": [],
|
|
1591
|
+
"props": {
|
|
1592
|
+
"SearchBox": {
|
|
1593
|
+
"onQuery": {
|
|
1594
|
+
"type": "(query: string, options: SearchQueryOptions) => Promise<SearchSuggestion[]> | SearchSuggestion[]",
|
|
1595
|
+
"required": true,
|
|
1596
|
+
"doc": "Devuelve las sugerencias para un texto. Lanza o rechaza para mostrar el estado de error."
|
|
1597
|
+
},
|
|
1598
|
+
"onSelect": {
|
|
1599
|
+
"type": "(suggestion: SearchSuggestion) => void"
|
|
1600
|
+
},
|
|
1601
|
+
"onSubmit": {
|
|
1602
|
+
"type": "(query: string) => void",
|
|
1603
|
+
"doc": "Enter sin sugerencia activa: busca el texto tal cual."
|
|
1604
|
+
},
|
|
1605
|
+
"recent": {
|
|
1606
|
+
"type": "SearchSuggestion[]"
|
|
1607
|
+
},
|
|
1608
|
+
"popular": {
|
|
1609
|
+
"type": "SearchSuggestion[]"
|
|
1610
|
+
},
|
|
1611
|
+
"debounce": {
|
|
1612
|
+
"type": "number"
|
|
1613
|
+
},
|
|
1614
|
+
"minChars": {
|
|
1615
|
+
"type": "number"
|
|
1616
|
+
},
|
|
1617
|
+
"maxResults": {
|
|
1618
|
+
"type": "number"
|
|
1619
|
+
},
|
|
1620
|
+
"value": {
|
|
1621
|
+
"type": "string"
|
|
1622
|
+
},
|
|
1623
|
+
"defaultValue": {
|
|
1624
|
+
"type": "string"
|
|
1625
|
+
},
|
|
1626
|
+
"onValueChange": {
|
|
1627
|
+
"type": "(value: string) => void"
|
|
1628
|
+
},
|
|
1629
|
+
"placeholder": {
|
|
1630
|
+
"type": "string"
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
},
|
|
1634
|
+
"notes": [
|
|
1635
|
+
"Para buscar mientras se escribe (navegación, catálogo, ayuda): la app aporta `onQuery` (con `signal`) y recientes/populares; el componente pone el combobox accesible, la espera, el resaltado y los estados. Para elegir un valor de una lista cerrada → Combobox; para ir a una pantalla con ⌘K → CommandPalette.",
|
|
1636
|
+
"Guarda los «recientes» en la app y no pongas en las sugerencias datos que la persona no puede ver. No reveles si algo existe si la búsqueda es de cuentas."
|
|
1637
|
+
],
|
|
1638
|
+
"examples": [
|
|
1639
|
+
{
|
|
1640
|
+
"title": "Con sugerencias del servidor",
|
|
1641
|
+
"code": "<SearchBox\n onQuery={(q, { signal }) => buscarSecciones(q, signal)}\n recent={recientes}\n onSelect={(s) => navigate(s.href)}\n onSubmit={(q) => navigate(\"/buscar?q=\" + q)}\n placeholder=\"Buscar secciones…\"\n/>"
|
|
1642
|
+
}
|
|
1643
|
+
]
|
|
1644
|
+
},
|
|
1645
|
+
"select": {
|
|
1646
|
+
"import": "orbital-ds/ui/select",
|
|
1647
|
+
"group": "forms",
|
|
1648
|
+
"summary": "Lista desplegable con el diseño del tema para elegir UNA opción de una lista corta y conocida (estado, prioridad, zona).",
|
|
1649
|
+
"see": [
|
|
1650
|
+
{
|
|
1651
|
+
"component": "combobox",
|
|
1652
|
+
"when": "lista larga en la que hace falta escribir para buscar"
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
"component": "native-select",
|
|
1656
|
+
"when": "el selector del sistema (móvil, HTML sin JavaScript)"
|
|
1657
|
+
},
|
|
1658
|
+
{
|
|
1659
|
+
"component": "radio-group",
|
|
1660
|
+
"when": "pocas opciones que conviene ver todas a la vez"
|
|
1661
|
+
}
|
|
1662
|
+
],
|
|
1663
|
+
"exports": [
|
|
1664
|
+
"Select",
|
|
1665
|
+
"SelectContent",
|
|
1666
|
+
"SelectGroup",
|
|
1667
|
+
"SelectItem",
|
|
1668
|
+
"SelectLabel",
|
|
1669
|
+
"SelectScrollDownButton",
|
|
1670
|
+
"SelectScrollUpButton",
|
|
1671
|
+
"SelectSeparator",
|
|
1672
|
+
"SelectTrigger",
|
|
1673
|
+
"SelectValue"
|
|
1674
|
+
],
|
|
1675
|
+
"slots": [
|
|
1676
|
+
"select-content",
|
|
1677
|
+
"select-group",
|
|
1678
|
+
"select-item",
|
|
1679
|
+
"select-label",
|
|
1680
|
+
"select-positioner",
|
|
1681
|
+
"select-scroll-down-button",
|
|
1682
|
+
"select-scroll-up-button",
|
|
1683
|
+
"select-separator",
|
|
1684
|
+
"select-trigger",
|
|
1685
|
+
"select-value"
|
|
1686
|
+
],
|
|
1687
|
+
"optionalPeers": [],
|
|
1688
|
+
"props": {
|
|
1689
|
+
"SelectContent": {
|
|
1690
|
+
"position": {
|
|
1691
|
+
"type": "\"item-aligned\" | \"popper\"",
|
|
1692
|
+
"values": [
|
|
1693
|
+
"item-aligned",
|
|
1694
|
+
"popper"
|
|
1695
|
+
]
|
|
1696
|
+
}
|
|
1697
|
+
},
|
|
1698
|
+
"SelectTrigger": {
|
|
1699
|
+
"size": {
|
|
1700
|
+
"type": "\"default\" | \"sm\"",
|
|
1701
|
+
"values": [
|
|
1702
|
+
"default",
|
|
1703
|
+
"sm"
|
|
1704
|
+
]
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
},
|
|
1708
|
+
"notes": [
|
|
1709
|
+
"Pasa `items` al Select (lista de { value, label }) para que el disparador muestre la ETIQUETA y no el valor antes de abrir el menú (también en el HTML del servidor): <Select items={OPCIONES} defaultValue=\"warning\">.",
|
|
1710
|
+
"Por defecto position=\"popper\" y align=\"start\": debajo del campo, sin taparlo. position=\"item-aligned\" sigue disponible.",
|
|
1711
|
+
"La lista mide al menos el ancho del disparador y como máximo --ds-select-max-h (≈ 8 filas); ajústalo en brand.css.",
|
|
1712
|
+
"Resaltado de opciones con data-highlighted (ratón y teclado), como en los menús."
|
|
1713
|
+
],
|
|
1714
|
+
"examples": [
|
|
1715
|
+
{
|
|
1716
|
+
"title": "Con items (el disparador muestra la etiqueta)",
|
|
1717
|
+
"code": "<Select items={ESTADOS} defaultValue=\"en-curso\">\n <SelectTrigger>\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n {ESTADOS.map((e) => (\n <SelectItem key={e.value} value={e.value}>\n {e.label}\n </SelectItem>\n ))}\n </SelectContent>\n</Select>"
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
"title": "Por grupos con texto de espera",
|
|
1721
|
+
"code": "<Select items={ZONAS}>\n <SelectTrigger size=\"sm\">\n <SelectValue placeholder=\"Elige una zona horaria\" />\n </SelectTrigger>\n <SelectContent>\n <SelectGroup>\n <SelectLabel>Europa</SelectLabel>\n <SelectItem value=\"madrid\">Madrid</SelectItem>\n </SelectGroup>\n </SelectContent>\n</Select>"
|
|
1722
|
+
}
|
|
1723
|
+
]
|
|
1724
|
+
},
|
|
1725
|
+
"slider": {
|
|
1726
|
+
"import": "orbital-ds/ui/slider",
|
|
1727
|
+
"group": "forms",
|
|
1728
|
+
"summary": "Control deslizante para elegir un número o un rango aproximado dentro de unos límites (volumen, precio, umbral).",
|
|
1729
|
+
"see": [
|
|
1730
|
+
{
|
|
1731
|
+
"component": "input",
|
|
1732
|
+
"when": "un número exacto que se teclea"
|
|
1733
|
+
},
|
|
1734
|
+
{
|
|
1735
|
+
"component": "usage-meter",
|
|
1736
|
+
"when": "mostrar un consumo frente a un límite, sin editarlo"
|
|
1737
|
+
}
|
|
1738
|
+
],
|
|
1739
|
+
"exports": [
|
|
1740
|
+
"Slider",
|
|
1741
|
+
"type SliderProps"
|
|
1742
|
+
],
|
|
1743
|
+
"slots": [
|
|
1744
|
+
"slider",
|
|
1745
|
+
"slider-control",
|
|
1746
|
+
"slider-range",
|
|
1747
|
+
"slider-thumb",
|
|
1748
|
+
"slider-track"
|
|
1749
|
+
],
|
|
1750
|
+
"optionalPeers": [],
|
|
1751
|
+
"props": {
|
|
1752
|
+
"Slider": {
|
|
1753
|
+
"value": {
|
|
1754
|
+
"type": "number | readonly number[]"
|
|
1755
|
+
},
|
|
1756
|
+
"defaultValue": {
|
|
1757
|
+
"type": "number | readonly number[]"
|
|
1758
|
+
},
|
|
1759
|
+
"onValueChange": {
|
|
1760
|
+
"type": "((value: number, details: SliderEventDetails) => void) | ((value: number[], details: SliderEventDetails) => void)"
|
|
1761
|
+
},
|
|
1762
|
+
"onValueCommitted": {
|
|
1763
|
+
"type": "((value: number, details: SliderPrimitive.Root.CommitEventDetails) => void) | ((value: number[], details: SliderPrimitive.Root.CommitEventDetails) => void)"
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
},
|
|
1767
|
+
"notes": [
|
|
1768
|
+
"Con un número en `value`/`defaultValue` hay UN tirador y `onValueChange` recibe un número; con una lista, un rango y recibe una lista. Sin normalizar a mano en cada uso."
|
|
1769
|
+
],
|
|
1770
|
+
"examples": [
|
|
1771
|
+
{
|
|
1772
|
+
"title": "Un valor",
|
|
1773
|
+
"code": "<Slider value={limite} onValueChange={setLimite} max={500} aria-label=\"Límite de envíos diarios\" />"
|
|
1774
|
+
},
|
|
1775
|
+
{
|
|
1776
|
+
"title": "Rango",
|
|
1777
|
+
"code": "<Slider defaultValue={[20, 80]} step={5} aria-label=\"Rango de precio\" />"
|
|
1778
|
+
}
|
|
1779
|
+
]
|
|
1780
|
+
},
|
|
1781
|
+
"switch": {
|
|
1782
|
+
"import": "orbital-ds/ui/switch",
|
|
1783
|
+
"group": "forms",
|
|
1784
|
+
"summary": "Interruptor para activar o desactivar un ajuste que se aplica al momento (avisos, modo oscuro, publicar).",
|
|
1785
|
+
"see": [
|
|
1786
|
+
{
|
|
1787
|
+
"component": "checkbox",
|
|
1788
|
+
"when": "una opción que se confirma al enviar un formulario"
|
|
1789
|
+
},
|
|
1790
|
+
{
|
|
1791
|
+
"component": "toggle",
|
|
1792
|
+
"when": "un botón de herramienta que queda pulsado (negrita, favorito)"
|
|
1793
|
+
}
|
|
1794
|
+
],
|
|
1795
|
+
"exports": [
|
|
1796
|
+
"Switch"
|
|
1797
|
+
],
|
|
1798
|
+
"slots": [
|
|
1799
|
+
"switch",
|
|
1800
|
+
"switch-thumb"
|
|
1801
|
+
],
|
|
1802
|
+
"optionalPeers": [],
|
|
1803
|
+
"props": {
|
|
1804
|
+
"Switch": {
|
|
1805
|
+
"size": {
|
|
1806
|
+
"type": "\"default\" | \"sm\"",
|
|
1807
|
+
"values": [
|
|
1808
|
+
"default",
|
|
1809
|
+
"sm"
|
|
1810
|
+
]
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
},
|
|
1814
|
+
"notes": [
|
|
1815
|
+
"Su efecto es inmediato: si el cambio necesita «Guardar», usa Checkbox."
|
|
1816
|
+
],
|
|
1817
|
+
"examples": [
|
|
1818
|
+
{
|
|
1819
|
+
"title": "Con etiqueta",
|
|
1820
|
+
"code": "<Label>\n <Switch checked={avisos} onCheckedChange={setAvisos} />\n Avisos por correo\n</Label>"
|
|
1821
|
+
},
|
|
1822
|
+
{
|
|
1823
|
+
"title": "Pequeño",
|
|
1824
|
+
"code": "<Switch size=\"sm\" defaultChecked aria-label=\"Modo compacto\" />"
|
|
1825
|
+
}
|
|
1826
|
+
]
|
|
1827
|
+
},
|
|
1828
|
+
"tag-input": {
|
|
1829
|
+
"import": "orbital-ds/ui/tag-input",
|
|
1830
|
+
"group": "forms",
|
|
1831
|
+
"summary": "Campo para escribir etiquetas LIBRES (palabras clave, correos, dominios) que se convierten en fichas al pulsar Intro o coma; se quitan con su ✕ o con Retroceso.",
|
|
1832
|
+
"see": [
|
|
1833
|
+
{
|
|
1834
|
+
"component": "combobox",
|
|
1835
|
+
"when": "elegir etiquetas de una lista conocida (con búsqueda)"
|
|
1836
|
+
},
|
|
1837
|
+
{
|
|
1838
|
+
"component": "input",
|
|
1839
|
+
"when": "un solo valor de texto"
|
|
1840
|
+
}
|
|
1841
|
+
],
|
|
1842
|
+
"exports": [
|
|
1843
|
+
"TagInput",
|
|
1844
|
+
"type TagInputProps"
|
|
1845
|
+
],
|
|
1846
|
+
"slots": [
|
|
1847
|
+
"tag-input",
|
|
1848
|
+
"tag-input-field",
|
|
1849
|
+
"tag-input-remove",
|
|
1850
|
+
"tag-input-tag"
|
|
1851
|
+
],
|
|
1852
|
+
"optionalPeers": [],
|
|
1853
|
+
"props": {
|
|
1854
|
+
"TagInput": {
|
|
1855
|
+
"value": {
|
|
1856
|
+
"type": "string[]"
|
|
1857
|
+
},
|
|
1858
|
+
"defaultValue": {
|
|
1859
|
+
"type": "string[]"
|
|
1860
|
+
},
|
|
1861
|
+
"onValueChange": {
|
|
1862
|
+
"type": "(value: string[]) => void"
|
|
1863
|
+
},
|
|
1864
|
+
"separators": {
|
|
1865
|
+
"type": "string[]",
|
|
1866
|
+
"doc": "Teclas que, además de Intro, cierran una etiqueta. Por defecto, la coma."
|
|
1867
|
+
},
|
|
1868
|
+
"max": {
|
|
1869
|
+
"type": "number",
|
|
1870
|
+
"doc": "Máximo de etiquetas; al llegar, el campo deja de admitir más."
|
|
1871
|
+
},
|
|
1872
|
+
"validate": {
|
|
1873
|
+
"type": "(tag: string) => boolean",
|
|
1874
|
+
"doc": "Devuelve false para rechazar una etiqueta (queda escrita para corregirla)."
|
|
1875
|
+
},
|
|
1876
|
+
"allowDuplicates": {
|
|
1877
|
+
"type": "boolean"
|
|
1878
|
+
},
|
|
1879
|
+
"addOnBlur": {
|
|
1880
|
+
"type": "boolean",
|
|
1881
|
+
"doc": "Añadir lo escrito al salir del campo."
|
|
1882
|
+
},
|
|
1883
|
+
"inputClassName": {
|
|
1884
|
+
"type": "string",
|
|
1885
|
+
"doc": "Clases del contenedor (el `className` también va al contenedor)."
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
},
|
|
1889
|
+
"notes": [
|
|
1890
|
+
"Para elegir de una lista que ya conoces (responsables, países, etiquetas existentes) usa Combobox con chips; TagInput es para valores que escribe la persona.",
|
|
1891
|
+
"Di en FieldDescription cómo se separan («Pulsa Intro o coma») y el límite si hay `max`.",
|
|
1892
|
+
"Con `validate`, explica el error en FieldError: la etiqueta rechazada queda escrita y el campo se marca como inválido."
|
|
1893
|
+
],
|
|
1894
|
+
"examples": [
|
|
1895
|
+
{
|
|
1896
|
+
"title": "Palabras clave en un formulario",
|
|
1897
|
+
"code": "<Field>\n <FieldLabel htmlFor=\"keywords\">Palabras clave</FieldLabel>\n <TagInput id=\"keywords\" name=\"keywords\" defaultValue={[\"factura\", \"2026\"]} placeholder=\"Escribe y pulsa Intro\" />\n</Field>"
|
|
1898
|
+
},
|
|
1899
|
+
{
|
|
1900
|
+
"title": "Controlado, con validación y límite",
|
|
1901
|
+
"code": "<TagInput\n id=\"invite\"\n value={emails}\n onValueChange={setEmails}\n validate={(v) => v.includes(\"@\")}\n max={10}\n placeholder=\"correo@empresa.com\"\n/>"
|
|
1902
|
+
}
|
|
1903
|
+
]
|
|
1904
|
+
},
|
|
1905
|
+
"textarea": {
|
|
1906
|
+
"import": "orbital-ds/ui/textarea",
|
|
1907
|
+
"group": "forms",
|
|
1908
|
+
"summary": "Campo de texto de varias líneas para comentarios, notas o descripciones sin formato.",
|
|
1909
|
+
"see": [
|
|
1910
|
+
{
|
|
1911
|
+
"component": "input",
|
|
1912
|
+
"when": "texto de una línea"
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
"component": "instruction-editor",
|
|
1916
|
+
"when": "texto con formato (Markdown), prompts o documentos"
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
"component": "chat-composer",
|
|
1920
|
+
"when": "escribir mensajes en un chat"
|
|
1921
|
+
}
|
|
1922
|
+
],
|
|
1923
|
+
"exports": [
|
|
1924
|
+
"Textarea"
|
|
1925
|
+
],
|
|
1926
|
+
"slots": [
|
|
1927
|
+
"textarea"
|
|
1928
|
+
],
|
|
1929
|
+
"optionalPeers": [],
|
|
1930
|
+
"props": {
|
|
1931
|
+
"Textarea": {
|
|
1932
|
+
"autoGrow": {
|
|
1933
|
+
"type": "boolean",
|
|
1934
|
+
"doc": "Crece con el texto hasta --ds-textarea-max-h (después, desplazamiento)."
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
},
|
|
1938
|
+
"notes": [
|
|
1939
|
+
"`autoGrow`: crece con lo escrito hasta --ds-textarea-max-h y después desplaza (CSS `field-sizing`; en navegadores sin soporte se queda con su alto).",
|
|
1940
|
+
"Con límite de caracteres, dilo en FieldDescription antes de que la persona escriba."
|
|
1941
|
+
],
|
|
1942
|
+
"examples": [
|
|
1943
|
+
{
|
|
1944
|
+
"title": "Con etiqueta y ayuda",
|
|
1945
|
+
"code": "<Field>\n <FieldLabel htmlFor=\"notes\">Notas al pie</FieldLabel>\n <Textarea id=\"notes\" placeholder=\"Condiciones de pago, IBAN…\" />\n <FieldDescription>Máximo 300 caracteres.</FieldDescription>\n</Field>"
|
|
1946
|
+
},
|
|
1947
|
+
{
|
|
1948
|
+
"title": "Que crezca con el texto",
|
|
1949
|
+
"code": "<Textarea autoGrow placeholder=\"Describe la incidencia\" />"
|
|
1950
|
+
}
|
|
1951
|
+
]
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
}
|