@joralvmel/cosmos-core 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/dist/catalog.d.ts +3 -3
  2. package/dist/catalog.d.ts.map +1 -1
  3. package/dist/catalog.js +25 -6
  4. package/dist/catalog.js.map +1 -1
  5. package/dist/codegen.d.ts +16 -0
  6. package/dist/codegen.d.ts.map +1 -1
  7. package/dist/codegen.js +396 -57
  8. package/dist/codegen.js.map +1 -1
  9. package/dist/headless/calendar.d.ts +32 -0
  10. package/dist/headless/calendar.d.ts.map +1 -0
  11. package/dist/headless/calendar.js +242 -0
  12. package/dist/headless/calendar.js.map +1 -0
  13. package/dist/headless/listbox.d.ts +9 -0
  14. package/dist/headless/listbox.d.ts.map +1 -0
  15. package/dist/headless/listbox.js +103 -0
  16. package/dist/headless/listbox.js.map +1 -0
  17. package/dist/headless/pagination.d.ts +34 -0
  18. package/dist/headless/pagination.d.ts.map +1 -0
  19. package/dist/headless/pagination.js +92 -0
  20. package/dist/headless/pagination.js.map +1 -0
  21. package/dist/headless/radio-group.d.ts +10 -0
  22. package/dist/headless/radio-group.d.ts.map +1 -0
  23. package/dist/headless/radio-group.js +59 -0
  24. package/dist/headless/radio-group.js.map +1 -0
  25. package/dist/headless/select.d.ts +4 -0
  26. package/dist/headless/select.d.ts.map +1 -0
  27. package/dist/headless/select.js +7 -0
  28. package/dist/headless/select.js.map +1 -0
  29. package/dist/headless/size.d.ts +3 -0
  30. package/dist/headless/size.d.ts.map +1 -0
  31. package/dist/headless/size.js +7 -0
  32. package/dist/headless/size.js.map +1 -0
  33. package/dist/headless/text-field.d.ts +25 -0
  34. package/dist/headless/text-field.d.ts.map +1 -0
  35. package/dist/headless/text-field.js +12 -0
  36. package/dist/headless/text-field.js.map +1 -0
  37. package/dist/index.d.ts +1709 -19
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +60 -1
  40. package/dist/index.js.map +1 -1
  41. package/dist/markdown.d.ts.map +1 -1
  42. package/dist/markdown.js +7 -3
  43. package/dist/markdown.js.map +1 -1
  44. package/dist/specs/badge.d.ts +65 -0
  45. package/dist/specs/badge.d.ts.map +1 -0
  46. package/dist/specs/badge.js +64 -0
  47. package/dist/specs/badge.js.map +1 -0
  48. package/dist/specs/badge.scenarios.d.ts +21 -0
  49. package/dist/specs/badge.scenarios.d.ts.map +1 -0
  50. package/dist/specs/badge.scenarios.js +35 -0
  51. package/dist/specs/badge.scenarios.js.map +1 -0
  52. package/dist/specs/calendar.d.ts +120 -0
  53. package/dist/specs/calendar.d.ts.map +1 -0
  54. package/dist/specs/calendar.js +121 -0
  55. package/dist/specs/calendar.js.map +1 -0
  56. package/dist/specs/calendar.scenarios.d.ts +39 -0
  57. package/dist/specs/calendar.scenarios.d.ts.map +1 -0
  58. package/dist/specs/calendar.scenarios.js +139 -0
  59. package/dist/specs/calendar.scenarios.js.map +1 -0
  60. package/dist/specs/checkbox.d.ts +139 -0
  61. package/dist/specs/checkbox.d.ts.map +1 -0
  62. package/dist/specs/checkbox.js +129 -0
  63. package/dist/specs/checkbox.js.map +1 -0
  64. package/dist/specs/checkbox.scenarios.d.ts +28 -0
  65. package/dist/specs/checkbox.scenarios.d.ts.map +1 -0
  66. package/dist/specs/checkbox.scenarios.js +54 -0
  67. package/dist/specs/checkbox.scenarios.js.map +1 -0
  68. package/dist/specs/dialog.d.ts +167 -0
  69. package/dist/specs/dialog.d.ts.map +1 -0
  70. package/dist/specs/dialog.js +136 -0
  71. package/dist/specs/dialog.js.map +1 -0
  72. package/dist/specs/dialog.scenarios.d.ts +42 -0
  73. package/dist/specs/dialog.scenarios.d.ts.map +1 -0
  74. package/dist/specs/dialog.scenarios.js +129 -0
  75. package/dist/specs/dialog.scenarios.js.map +1 -0
  76. package/dist/specs/icon-button.d.ts +136 -0
  77. package/dist/specs/icon-button.d.ts.map +1 -0
  78. package/dist/specs/icon-button.js +119 -0
  79. package/dist/specs/icon-button.js.map +1 -0
  80. package/dist/specs/icon-button.scenarios.d.ts +28 -0
  81. package/dist/specs/icon-button.scenarios.d.ts.map +1 -0
  82. package/dist/specs/icon-button.scenarios.js +95 -0
  83. package/dist/specs/icon-button.scenarios.js.map +1 -0
  84. package/dist/specs/icon.d.ts +11 -20
  85. package/dist/specs/icon.d.ts.map +1 -1
  86. package/dist/specs/icon.js +11 -20
  87. package/dist/specs/icon.js.map +1 -1
  88. package/dist/specs/icon.scenarios.d.ts +9 -1
  89. package/dist/specs/icon.scenarios.d.ts.map +1 -1
  90. package/dist/specs/icon.scenarios.js +70 -6
  91. package/dist/specs/icon.scenarios.js.map +1 -1
  92. package/dist/specs/listbox.d.ts +157 -0
  93. package/dist/specs/listbox.d.ts.map +1 -0
  94. package/dist/specs/listbox.js +144 -0
  95. package/dist/specs/listbox.js.map +1 -0
  96. package/dist/specs/listbox.scenarios.d.ts +37 -0
  97. package/dist/specs/listbox.scenarios.d.ts.map +1 -0
  98. package/dist/specs/listbox.scenarios.js +110 -0
  99. package/dist/specs/listbox.scenarios.js.map +1 -0
  100. package/dist/specs/pagination.d.ts +147 -0
  101. package/dist/specs/pagination.d.ts.map +1 -0
  102. package/dist/specs/pagination.js +122 -0
  103. package/dist/specs/pagination.js.map +1 -0
  104. package/dist/specs/pagination.scenarios.d.ts +15 -0
  105. package/dist/specs/pagination.scenarios.d.ts.map +1 -0
  106. package/dist/specs/pagination.scenarios.js +29 -0
  107. package/dist/specs/pagination.scenarios.js.map +1 -0
  108. package/dist/specs/popover.d.ts +201 -0
  109. package/dist/specs/popover.d.ts.map +1 -0
  110. package/dist/specs/popover.js +169 -0
  111. package/dist/specs/popover.js.map +1 -0
  112. package/dist/specs/popover.scenarios.d.ts +83 -0
  113. package/dist/specs/popover.scenarios.d.ts.map +1 -0
  114. package/dist/specs/popover.scenarios.js +368 -0
  115. package/dist/specs/popover.scenarios.js.map +1 -0
  116. package/dist/specs/radio-group.d.ts +154 -0
  117. package/dist/specs/radio-group.d.ts.map +1 -0
  118. package/dist/specs/radio-group.js +133 -0
  119. package/dist/specs/radio-group.js.map +1 -0
  120. package/dist/specs/radio-group.scenarios.d.ts +35 -0
  121. package/dist/specs/radio-group.scenarios.d.ts.map +1 -0
  122. package/dist/specs/radio-group.scenarios.js +67 -0
  123. package/dist/specs/radio-group.scenarios.js.map +1 -0
  124. package/dist/specs/select.d.ts +167 -0
  125. package/dist/specs/select.d.ts.map +1 -0
  126. package/dist/specs/select.js +148 -0
  127. package/dist/specs/select.js.map +1 -0
  128. package/dist/specs/select.scenarios.d.ts +37 -0
  129. package/dist/specs/select.scenarios.d.ts.map +1 -0
  130. package/dist/specs/select.scenarios.js +77 -0
  131. package/dist/specs/select.scenarios.js.map +1 -0
  132. package/dist/specs/switch.d.ts +123 -0
  133. package/dist/specs/switch.d.ts.map +1 -0
  134. package/dist/specs/switch.js +113 -0
  135. package/dist/specs/switch.js.map +1 -0
  136. package/dist/specs/switch.scenarios.d.ts +27 -0
  137. package/dist/specs/switch.scenarios.d.ts.map +1 -0
  138. package/dist/specs/switch.scenarios.js +54 -0
  139. package/dist/specs/switch.scenarios.js.map +1 -0
  140. package/dist/specs/text-field.d.ts +232 -0
  141. package/dist/specs/text-field.d.ts.map +1 -0
  142. package/dist/specs/text-field.js +220 -0
  143. package/dist/specs/text-field.js.map +1 -0
  144. package/dist/specs/text-field.scenarios.d.ts +52 -0
  145. package/dist/specs/text-field.scenarios.d.ts.map +1 -0
  146. package/dist/specs/text-field.scenarios.js +106 -0
  147. package/dist/specs/text-field.scenarios.js.map +1 -0
  148. package/dist/specs/textarea.d.ts +144 -0
  149. package/dist/specs/textarea.d.ts.map +1 -0
  150. package/dist/specs/textarea.js +134 -0
  151. package/dist/specs/textarea.js.map +1 -0
  152. package/dist/specs/textarea.scenarios.d.ts +33 -0
  153. package/dist/specs/textarea.scenarios.d.ts.map +1 -0
  154. package/dist/specs/textarea.scenarios.js +82 -0
  155. package/dist/specs/textarea.scenarios.js.map +1 -0
  156. package/llms.md +797 -6
  157. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,7 +1,14 @@
1
1
  export { buildOrder, type CatalogEntry, type ComponentCategory, type ComponentStatus, catalog, catalogEntry, } from './catalog.js';
2
- export { type ActiveProp, activeProps, type ControlValue, type ControlValues, generateSnippets, pascalCase, type SnippetTarget, snippetTargets, supportsTarget, toAttribute, } from './codegen.js';
2
+ export { type ActiveProp, activeProps, type ControlValue, type ControlValues, generateComposedSnippets, generateSnippets, listboxItemExamples, listboxValueExamples, pascalCase, radioGroupOptionsExamples, radioGroupValueExamples, type SnippetChild, type SnippetTarget, selectItemExamples, selectValueExamples, snippetTargets, supportsTarget, toAttribute, } from './codegen.js';
3
3
  export { type ComponentContract, type ContractProps, defaults, defineContract, type EventSpec, eventNames, type KeyboardSpec, type Platform, type PropSpec, platforms, propNames, type StateSpec, supports, } from './contract.js';
4
+ export { addCalendarDays, addCalendarMonths, type CalendarLocaleInfo, type CalendarWeekdayName, canNavigateCalendarMonth, compareCalendarDates, formatCalendarDate, formatCalendarMonth, getCalendarLocaleInfo, getCalendarMonth, getCalendarMonthDates, getCalendarToday, getCalendarTodayLabel, getCalendarWeekdayNames, isCalendarDateSelectable, parseCalendarDate, tryAddCalendarDays, tryAddCalendarMonths, validateCalendarBounds, } from './headless/calendar.js';
5
+ export { findListboxMatch, getListboxInitialActive, getListboxOptions, getListboxSelection, moveListboxActive, validateListboxSize, validateListboxValues, } from './headless/listbox.js';
6
+ export { effectivePaginationPage, getPaginationView, type PaginationItem, paginationItems, validatePaginationNumber, } from './headless/pagination.js';
4
7
  export { getPressableState, type PressableInput, type PressableState, } from './headless/pressable.js';
8
+ export { getRadioGroupInitialActive, moveRadioGroupActive, validateRadioGroupOptions, validateRadioGroupValue, } from './headless/radio-group.js';
9
+ export { validateSelectValue } from './headless/select.js';
10
+ export { validateSize } from './headless/size.js';
11
+ export { getTextFieldState, type TextFieldState, type TextFieldStateInput, } from './headless/text-field.js';
5
12
  export { componentReference, contractMarkdown, eventsMarkdown, propsMarkdown, propType, snippetsMarkdown, snippetTitles, } from './markdown.js';
6
13
  export { aiRules, DOCS_URL, isStack, type SetupGuide, type SetupStep, type Stack, setupGuide, setupMarkdown, stacks, } from './setup.js';
7
14
  export { type ButtonPressDetail, buttonContract, type PressSource } from './specs/button.js';
@@ -102,7 +109,7 @@ export declare const contracts: {
102
109
  readonly icon: {
103
110
  readonly name: "icon";
104
111
  readonly tag: "cosm-icon";
105
- readonly description: "Renders a structured SVG icon. Decorative icons are hidden from assistive technology; informative icons require a text label.";
112
+ readonly description: "Renders a structured SVG icon. Icons are decorative and hidden from assistive technology unless a nonempty label makes them informative.";
106
113
  readonly role: "img";
107
114
  readonly pattern: "https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA24";
108
115
  readonly props: {
@@ -126,44 +133,1727 @@ export declare const contracts: {
126
133
  readonly reflect: true;
127
134
  readonly description: "Semantic size (16, 20 or 24) or a positive finite number in pixels / native units.";
128
135
  };
129
- readonly stroke: {
136
+ readonly variant: {
137
+ readonly type: "enum";
138
+ readonly values: readonly ["outline", "filled"];
139
+ readonly default: "outline";
140
+ readonly reflect: true;
141
+ readonly description: "Appearance. outline draws only the stroke; filled also fills the shapes with the icon color (for example a favorite star or heart). Explicit node fills in the definition always win.";
142
+ };
143
+ readonly color: {
130
144
  readonly type: "string";
131
145
  readonly default: "currentColor";
132
- readonly description: "Stroke paint; currentColor inherits on web and resolves to the theme foreground on native.";
146
+ readonly description: "Icon color (stroke, currentColor fills and the filled variant). currentColor inherits the surrounding text color on web and the parent control or theme foreground on native; otherwise a supported color without URLs.";
147
+ };
148
+ readonly label: {
149
+ readonly type: "string";
150
+ readonly description: "Accessible name. A nonempty label makes the icon an informative image; without one the icon is decorative and hidden from assistive technology.";
151
+ };
152
+ };
153
+ readonly events: {};
154
+ readonly states: readonly [];
155
+ readonly slots: {};
156
+ readonly parts: {
157
+ readonly icon: "Rendered SVG image.";
158
+ };
159
+ readonly cssProperties: {
160
+ readonly '--cosm-icon-size': "Override the rendered icon width and height.";
161
+ };
162
+ readonly keyboard: readonly [];
163
+ };
164
+ readonly 'text-field': {
165
+ readonly name: "text-field";
166
+ readonly tag: "cosm-text-field";
167
+ readonly description: "Accepts a single line of text with an accessible label, optional helper and error text, and native form validation on the web.";
168
+ readonly role: "textbox";
169
+ readonly pattern: "https://html.spec.whatwg.org/multipage/input.html";
170
+ readonly props: {
171
+ readonly label: {
172
+ readonly type: "string";
173
+ readonly required: true;
174
+ readonly description: "Accessible name for the editable control. It is rendered above the control unless visually hidden.";
175
+ };
176
+ readonly labelHidden: {
177
+ readonly type: "boolean";
178
+ readonly default: false;
179
+ readonly reflect: true;
180
+ readonly description: "Visually hides the label while keeping it available to assistive technology.";
181
+ };
182
+ readonly value: {
183
+ readonly type: "string";
184
+ readonly description: "Current text. When bound, edits are proposals and the component waits for the owner to supply the accepted value.";
185
+ };
186
+ readonly defaultValue: {
187
+ readonly type: "string";
188
+ readonly default: "";
189
+ readonly description: "Initial value for autonomous use. Web form reset restores this value; it does not control subsequent edits.";
133
190
  };
134
- readonly fill: {
191
+ readonly type: {
192
+ readonly type: "enum";
193
+ readonly values: readonly ["text", "email", "password", "tel", "url", "search"];
194
+ readonly default: "text";
195
+ readonly reflect: true;
196
+ readonly description: "Single-line input type. Native maps it to supported keyboard, autofill and secure-entry behavior.";
197
+ };
198
+ readonly variant: {
199
+ readonly type: "enum";
200
+ readonly values: readonly ["outlined", "filled"];
201
+ readonly default: "outlined";
202
+ readonly reflect: true;
203
+ readonly description: "Visual treatment of the editable control.";
204
+ };
205
+ readonly size: {
206
+ readonly type: "enum";
207
+ readonly values: readonly ["sm", "md", "lg"];
208
+ readonly default: "md";
209
+ readonly reflect: true;
210
+ readonly description: "Small, medium or large editable control.";
211
+ };
212
+ readonly placeholder: {
213
+ readonly type: "string";
214
+ readonly description: "Short input hint; it never replaces the accessible label.";
215
+ };
216
+ readonly helperText: {
135
217
  readonly type: "string";
136
- readonly default: "none";
137
- readonly description: "Root fill paint. Explicit node fills take precedence.";
218
+ readonly description: "Optional supporting text associated with the editable control.";
219
+ };
220
+ readonly errorText: {
221
+ readonly type: "string";
222
+ readonly description: "Optional consumer-localized error text associated with the editable control; a nonempty trimmed value also exposes invalid state.";
223
+ };
224
+ readonly invalid: {
225
+ readonly type: "boolean";
226
+ readonly default: false;
227
+ readonly reflect: true;
228
+ readonly description: "External invalid state when the visible error is supplied elsewhere, independent of browser constraints or consumer business validation.";
229
+ };
230
+ readonly required: {
231
+ readonly type: "boolean";
232
+ readonly default: false;
233
+ readonly reflect: true;
234
+ readonly description: "Exposes required semantics. On web, participates in native HTML constraint validation.";
235
+ };
236
+ readonly disabled: {
237
+ readonly type: "boolean";
238
+ readonly default: false;
239
+ readonly reflect: true;
240
+ readonly description: "Disables editing and interaction. On web, follows disabled fieldsets and excludes the value from form submission.";
241
+ };
242
+ readonly readOnly: {
243
+ readonly type: "boolean";
244
+ readonly default: false;
245
+ readonly reflect: true;
246
+ readonly description: "Prevents editing while remaining focusable and form-submittable on web; distinct from disabled.";
247
+ };
248
+ readonly minLength: {
249
+ readonly type: "number";
250
+ readonly description: "Minimum number of characters. Web uses native HTML validity; native business validation remains the consumer’s responsibility.";
138
251
  };
139
- readonly strokeWidth: {
252
+ readonly maxLength: {
140
253
  readonly type: "number";
141
- readonly default: 2;
142
- readonly description: "Finite nonnegative stroke width in SVG viewBox units.";
254
+ readonly description: "Maximum number of characters. Web uses native HTML validity and native applies supported input limits.";
255
+ };
256
+ readonly pattern: {
257
+ readonly type: "string";
258
+ readonly platforms: readonly ["web", "react", "angular"];
259
+ readonly description: "Web-only HTML pattern constraint. Native does not emulate HTML regular-expression validation.";
260
+ };
261
+ readonly name: {
262
+ readonly type: "string";
263
+ readonly reflect: true;
264
+ readonly platforms: readonly ["web", "react", "angular"];
265
+ readonly description: "Form field name on web. React Native has no HTML form association or name-based submission.";
266
+ };
267
+ readonly autoComplete: {
268
+ readonly type: "string";
269
+ readonly description: "Consumer-provided completion/autofill hint, mapped to attributes supported by each platform.";
270
+ };
271
+ readonly inputMode: {
272
+ readonly type: "union";
273
+ readonly variants: readonly [{
274
+ readonly type: "enum";
275
+ readonly values: readonly ["none", "text", "decimal", "numeric", "tel", "search", "email", "url"];
276
+ }];
277
+ readonly description: "Input or keyboard hint (none, text, decimal, numeric, tel, search, email or url); it does not add numeric or multiline field behavior.";
278
+ };
279
+ readonly startIcon: {
280
+ readonly type: "reference";
281
+ readonly reference: "IconDefinition";
282
+ readonly options: readonly ["search", "house", "heart", "star"];
283
+ readonly example: "search";
284
+ readonly description: "Optional structured decorative icon before the editable text.";
285
+ };
286
+ readonly endIcon: {
287
+ readonly type: "reference";
288
+ readonly reference: "IconDefinition";
289
+ readonly options: readonly ["search", "house", "heart", "star"];
290
+ readonly example: "search";
291
+ readonly description: "Optional structured decorative icon after the editable text.";
292
+ };
293
+ readonly prefix: {
294
+ readonly type: "string";
295
+ readonly description: "Optional non-interactive text decoration before the editable text.";
296
+ };
297
+ readonly suffix: {
298
+ readonly type: "string";
299
+ readonly description: "Optional non-interactive text decoration after the editable text.";
300
+ };
301
+ readonly clearable: {
302
+ readonly type: "boolean";
303
+ readonly default: false;
304
+ readonly reflect: true;
305
+ readonly description: "Shows a clear action for non-empty editable fields. Supply clearLabel when enabled.";
306
+ };
307
+ readonly clearLabel: {
308
+ readonly type: "string";
309
+ readonly description: "Consumer-supplied localized accessible name for the clear action.";
310
+ };
311
+ readonly passwordReveal: {
312
+ readonly type: "boolean";
313
+ readonly default: false;
314
+ readonly reflect: true;
315
+ readonly description: "Opts into a reveal action for password fields. Supply both revealPasswordLabel and hidePasswordLabel when enabled.";
316
+ };
317
+ readonly revealPasswordLabel: {
318
+ readonly type: "string";
319
+ readonly description: "Consumer-supplied localized accessible name while the password is concealed.";
320
+ };
321
+ readonly hidePasswordLabel: {
322
+ readonly type: "string";
323
+ readonly description: "Consumer-supplied localized accessible name while the password is revealed.";
324
+ };
325
+ };
326
+ readonly events: {
327
+ readonly change: {
328
+ readonly description: "Proposes the current text after each user edit, including clear; this is not a blur/commit event.";
329
+ readonly detail: "TextFieldChangeDetail";
330
+ readonly names: {
331
+ readonly dom: "cosm-change";
332
+ readonly react: "onChange";
333
+ readonly angular: "valueChange";
334
+ readonly native: "onValueChange";
335
+ };
143
336
  };
337
+ readonly submit: {
338
+ readonly description: "Reports the current text when the user invokes the field submit action (Enter/return).";
339
+ readonly detail: "TextFieldSubmitDetail";
340
+ readonly names: {
341
+ readonly dom: "cosm-submit";
342
+ readonly react: "onSubmit";
343
+ readonly angular: "submit";
344
+ readonly native: "onSubmitEditing";
345
+ };
346
+ };
347
+ };
348
+ readonly states: readonly [{
349
+ readonly prop: "value";
350
+ readonly event: "change";
351
+ readonly defaultProp: "defaultValue";
352
+ }];
353
+ readonly slots: {};
354
+ readonly parts: {
355
+ readonly label: "Accessible label above the control.";
356
+ readonly control: "Visual control containing the editable input and decorations.";
357
+ readonly input: "The single-line editable input.";
358
+ readonly start: "Start icon or prefix decoration.";
359
+ readonly end: "End icon, suffix decoration or clear/reveal action.";
360
+ readonly help: "Supporting text associated with the editable input.";
361
+ readonly error: "External or native-validity error text associated with the editable input.";
362
+ readonly 'clear-button': "Optional accessible clear action.";
363
+ readonly 'reveal-button': "Optional accessible password visibility action.";
364
+ };
365
+ readonly cssProperties: {
366
+ readonly '--cosm-text-field-background': "Editable control background.";
367
+ readonly '--cosm-text-field-color': "Editable and decoration text color.";
368
+ readonly '--cosm-text-field-placeholder': "Placeholder text color.";
369
+ readonly '--cosm-text-field-border': "Editable control boundary color.";
370
+ readonly '--cosm-text-field-focus': "Visible focus indicator color.";
371
+ readonly '--cosm-text-field-radius': "Editable control corner radius.";
372
+ readonly '--cosm-text-field-start-icon-color': "Start icon color, independent of text and affixes.";
373
+ readonly '--cosm-text-field-end-icon-color': "End icon color, independent of text and affixes.";
374
+ };
375
+ readonly keyboard: readonly [{
376
+ readonly keys: readonly ["Tab", "Shift+Tab"];
377
+ readonly action: "Moves focus to or from the enabled editable control.";
378
+ }, {
379
+ readonly keys: readonly ["Enter"];
380
+ readonly action: "Invokes the submit action; web form behavior remains native.";
381
+ }];
382
+ };
383
+ readonly 'icon-button': {
384
+ readonly name: "icon-button";
385
+ readonly tag: "cosm-icon-button";
386
+ readonly description: "Activates an action or toggles a boolean state using a labeled icon.";
387
+ readonly role: "button";
388
+ readonly pattern: "https://www.w3.org/WAI/ARIA/apg/patterns/button/";
389
+ readonly props: {
144
390
  readonly label: {
145
391
  readonly type: "string";
146
- readonly description: "Accessible name required when decorative is false.";
392
+ readonly required: true;
393
+ readonly description: "Required localized accessible name. Missing, empty or whitespace-only labels are rejected.";
394
+ };
395
+ readonly mode: {
396
+ readonly type: "enum";
397
+ readonly values: readonly ["action", "toggle"];
398
+ readonly default: "action";
399
+ readonly reflect: true;
400
+ readonly description: "Action activates without toggle state; toggle exposes and changes pressed state.";
401
+ };
402
+ readonly variant: {
403
+ readonly type: "enum";
404
+ readonly values: readonly ["solid", "soft", "outline", "ghost"];
405
+ readonly default: "solid";
406
+ readonly reflect: true;
407
+ readonly description: "Visual emphasis, from highest (solid) to lowest (ghost).";
408
+ };
409
+ readonly tone: {
410
+ readonly type: "enum";
411
+ readonly values: readonly ["primary", "neutral", "danger"];
412
+ readonly default: "primary";
413
+ readonly reflect: true;
414
+ readonly description: "Color role. Use danger for destructive actions.";
415
+ };
416
+ readonly size: {
417
+ readonly type: "enum";
418
+ readonly values: readonly ["sm", "md", "lg"];
419
+ readonly default: "md";
420
+ readonly reflect: true;
421
+ readonly description: "Size of the square visual control.";
422
+ };
423
+ readonly disabled: {
424
+ readonly type: "boolean";
425
+ readonly default: false;
426
+ readonly reflect: true;
427
+ readonly description: "Prevents activation and removes the web button from the tab order.";
428
+ };
429
+ readonly type: {
430
+ readonly type: "enum";
431
+ readonly values: readonly ["button", "submit", "reset"];
432
+ readonly default: "button";
433
+ readonly platforms: readonly ["web", "react", "angular"];
434
+ readonly description: "Native web button form behavior.";
435
+ };
436
+ readonly pressed: {
437
+ readonly type: "boolean";
438
+ readonly default: false;
439
+ readonly description: "Toggle state. If supplied, including false, activation proposes changes without committing them until the owner updates this prop.";
440
+ };
441
+ readonly defaultPressed: {
442
+ readonly type: "boolean";
443
+ readonly default: false;
444
+ readonly description: "Initial toggle state when pressed is not supplied; it does not control later changes.";
445
+ };
446
+ };
447
+ readonly events: {
448
+ readonly press: {
449
+ readonly description: "Reports each enabled activation by pointer, keyboard or programmatically.";
450
+ readonly detail: "IconButtonPressDetail";
451
+ readonly names: {
452
+ readonly dom: "cosm-press";
453
+ readonly react: "onPress";
454
+ readonly angular: "press";
455
+ readonly native: "onPress";
456
+ };
457
+ };
458
+ readonly pressedChange: {
459
+ readonly description: "Reports the proposed next pressed state on toggle activation; controlled state waits for the owner.";
460
+ readonly detail: "IconButtonPressedChangeDetail";
461
+ readonly names: {
462
+ readonly dom: "cosm-pressed-change";
463
+ readonly react: "onPressedChange";
464
+ readonly angular: "pressedChange";
465
+ readonly native: "onPressedChange";
466
+ };
467
+ };
468
+ };
469
+ readonly states: readonly [{
470
+ readonly prop: "pressed";
471
+ readonly event: "pressedChange";
472
+ readonly defaultProp: "defaultPressed";
473
+ }];
474
+ readonly slots: {
475
+ readonly '': "Decorative icon content; the label supplies the accessible name.";
476
+ };
477
+ readonly parts: {
478
+ readonly base: "The native button element.";
479
+ };
480
+ readonly cssProperties: {
481
+ readonly '--cosm-icon-button-background': "Control background.";
482
+ readonly '--cosm-icon-button-color': "Icon foreground color.";
483
+ readonly '--cosm-icon-button-border': "Control border color.";
484
+ readonly '--cosm-icon-button-radius': "Control corner radius.";
485
+ readonly '--cosm-icon-button-focus': "Visible focus indicator color.";
486
+ };
487
+ readonly keyboard: readonly [{
488
+ readonly keys: readonly ["Tab", "Shift+Tab"];
489
+ readonly action: "Moves focus to or from the enabled button.";
490
+ }, {
491
+ readonly keys: readonly ["Enter", "Space"];
492
+ readonly action: "Activates the button; toggle mode also proposes a change.";
493
+ }];
494
+ };
495
+ readonly popover: {
496
+ readonly name: "popover";
497
+ readonly tag: "cosm-popover";
498
+ readonly description: "Non-modal content anchored to a consumer trigger, with cancelable close requests and no imposed panel semantics.";
499
+ readonly role: "";
500
+ readonly pattern: "https://html.spec.whatwg.org/multipage/popover.html";
501
+ readonly props: {
502
+ readonly open: {
503
+ readonly type: "boolean";
504
+ readonly default: false;
505
+ readonly reflect: true;
506
+ readonly description: "Committed visibility. Supplying this prop, including false, controls state; its metadata default does not establish a binding.";
507
+ };
508
+ readonly defaultOpen: {
509
+ readonly type: "boolean";
510
+ readonly default: false;
511
+ readonly description: "Initial autonomous visibility only; ignored when open is supplied. Later updates do not reset state.";
512
+ };
513
+ readonly triggerMode: {
514
+ readonly type: "enum";
515
+ readonly values: readonly ["press", "hover"];
516
+ readonly default: "press";
517
+ readonly description: "Hover adds pointer and keyboard-focus opening on web and React Native Web, while keeping press activation. Android/iOS use press. Does not change panel semantics.";
518
+ };
519
+ readonly closable: {
520
+ readonly type: "boolean";
521
+ readonly default: false;
522
+ readonly description: "Shows a built-in IconButton with an X. Requests a cancelable close with reason close-button.";
147
523
  };
148
- readonly decorative: {
524
+ readonly closeLabel: {
525
+ readonly type: "string";
526
+ readonly default: "Close";
527
+ readonly description: "Localized accessible name of the close button. Must be non-empty when closable is true.";
528
+ };
529
+ readonly arrow: {
530
+ readonly type: "boolean";
531
+ readonly default: false;
532
+ readonly description: "Shows a decorative triangular pointer (16 wide, 8 deep), following the actual side, panel background and border. Hidden if it cannot point to the trigger without crossing a corner or viewport edge.";
533
+ };
534
+ readonly closeOnEscape: {
535
+ readonly type: "boolean";
536
+ readonly default: true;
537
+ readonly description: "Requests closure on unhandled Escape on web and React Native Web. Native Android and iOS hardware Escape is not supported.";
538
+ };
539
+ readonly closeOnOutsidePress: {
149
540
  readonly type: "boolean";
150
541
  readonly default: true;
542
+ readonly description: "Requests closure on an outside press without preventing its interaction or restoring trigger focus.";
543
+ };
544
+ readonly side: {
545
+ readonly type: "enum";
546
+ readonly values: readonly ["top", "right", "bottom", "left"];
547
+ readonly default: "bottom";
548
+ readonly reflect: true;
549
+ readonly description: "Requested physical side; actual placement flips to the opposite side when that reduces viewport/safe-area overflow, then shifts within bounds.";
550
+ };
551
+ readonly align: {
552
+ readonly type: "enum";
553
+ readonly values: readonly ["start", "center", "end"];
554
+ readonly default: "center";
151
555
  readonly reflect: true;
152
- readonly description: "Hides the icon from assistive technology when true.";
556
+ readonly description: "Cross-axis alignment. On top/bottom, start/end follow inline direction (RTL reverses them); on left/right they mean top/bottom.";
153
557
  };
154
558
  };
155
- readonly events: {};
156
- readonly states: readonly [];
157
- readonly slots: {};
559
+ readonly events: {
560
+ readonly openChange: {
561
+ readonly description: "Proposes visibility changes by trigger, hover or focus, or closure by Escape, outside press, panel action, close button or Android Back. Closing only is cancelable, synchronously via the web event or detail.preventDefault(); native uses detail.preventDefault(). Not a committed-state notification.";
562
+ readonly detail: "PopoverOpenChangeDetail";
563
+ readonly cancelable: true;
564
+ readonly names: {
565
+ readonly dom: "cosm-open-change";
566
+ readonly react: "onOpenChange";
567
+ readonly angular: "openChange";
568
+ readonly native: "onOpenChange";
569
+ };
570
+ };
571
+ };
572
+ readonly states: readonly [{
573
+ readonly prop: "open";
574
+ readonly event: "openChange";
575
+ readonly defaultProp: "defaultOpen";
576
+ }];
577
+ readonly slots: {
578
+ readonly trigger: "Consumer-supplied accessible trigger; its appearance and label belong to the consumer. Native accepts content or a render function receiving onPress, ref and accessibilityState for composing an IconButton without nested buttons.";
579
+ readonly '': "Consumer-supplied panel content and semantics. Native maps this content to children.";
580
+ };
158
581
  readonly parts: {
159
- readonly icon: "Rendered SVG image.";
582
+ readonly trigger: "Trigger container.";
583
+ readonly panel: "Non-modal anchored surface.";
584
+ readonly body: "Scrollable consumer content.";
585
+ readonly close: "Optional close IconButton.";
586
+ readonly arrow: "Decorative pointer; follows panel colors.";
160
587
  };
161
588
  readonly cssProperties: {
162
- readonly '--cosm-icon-size': "Override the rendered icon width and height.";
589
+ readonly '--cosm-popover-z-index': "Panel stacking level.";
590
+ readonly '--cosm-popover-padding': "Panel padding.";
591
+ readonly '--cosm-popover-radius': "Panel corner radius.";
592
+ readonly '--cosm-popover-shadow': "Panel shadow.";
163
593
  };
164
- readonly keyboard: readonly [];
594
+ readonly keyboard: readonly [{
595
+ readonly keys: readonly ["Enter", "Space"];
596
+ readonly action: "The focused trigger activates once and toggles open.";
597
+ }, {
598
+ readonly keys: readonly ["Escape"];
599
+ readonly action: "On web and React Native Web, requests close when open and closeOnEscape is true, unless a child already handled the key.";
600
+ }, {
601
+ readonly keys: readonly ["Tab", "Shift+Tab"];
602
+ readonly action: "Moves focus normally without a focus trap or automatic dismissal.";
603
+ }, {
604
+ readonly keys: readonly ["Android Back"];
605
+ readonly action: "Requests close while open on Android only.";
606
+ }];
607
+ };
608
+ readonly listbox: {
609
+ readonly name: "listbox";
610
+ readonly tag: "cosm-listbox";
611
+ readonly description: "Selects one or more values from a named vertical collection, with groups, descriptions, icons and independent keyboard focus.";
612
+ readonly role: "listbox";
613
+ readonly pattern: "https://www.w3.org/WAI/ARIA/apg/patterns/listbox/";
614
+ readonly props: {
615
+ readonly label: {
616
+ readonly type: "string";
617
+ readonly required: true;
618
+ readonly description: "Required nonempty accessible label, visible unless labelHidden is true.";
619
+ };
620
+ readonly labelHidden: {
621
+ readonly type: "boolean";
622
+ readonly default: false;
623
+ readonly reflect: true;
624
+ readonly description: "Visually hides the label without removing its accessible name.";
625
+ };
626
+ readonly items: {
627
+ readonly type: "reference";
628
+ readonly reference: "ListboxItems";
629
+ readonly required: true;
630
+ readonly options: readonly ["flat", "grouped"];
631
+ readonly example: "grouped";
632
+ readonly description: "Readonly collection of options or named groups. Options have globally unique nonempty value and label strings, optional description, decorative IconDefinition and disabled. Groups have a nonempty label and options array.";
633
+ };
634
+ readonly selectionMode: {
635
+ readonly type: "enum";
636
+ readonly values: readonly ["single", "multiple"];
637
+ readonly default: "single";
638
+ readonly reflect: true;
639
+ readonly description: "Single permits at most one selected value; multiple toggles each activation.";
640
+ };
641
+ readonly selectedValues: {
642
+ readonly type: "reference";
643
+ readonly reference: "ListboxValues";
644
+ readonly options: readonly ["empty", "apple", "cherry", "apple-cherry"];
645
+ readonly description: "Controlled selected values, including an empty array. Activation only proposes changes until the owner updates this prop. Missing collection values are retained, not automatically selected or removed.";
646
+ };
647
+ readonly defaultSelectedValues: {
648
+ readonly type: "reference";
649
+ readonly reference: "ListboxValues";
650
+ readonly options: readonly ["empty", "apple", "cherry", "apple-cherry"];
651
+ readonly example: "empty";
652
+ readonly description: "Initial autonomous selected values (empty by default). Later changes do not reset selection.";
653
+ };
654
+ readonly variant: {
655
+ readonly type: "enum";
656
+ readonly values: readonly ["plain", "outlined"];
657
+ readonly default: "plain";
658
+ readonly reflect: true;
659
+ readonly description: "Plain composes inside a panel; outlined adds a standalone container boundary.";
660
+ };
661
+ readonly size: {
662
+ readonly type: "enum";
663
+ readonly values: readonly ["sm", "md", "lg"];
664
+ readonly default: "md";
665
+ readonly reflect: true;
666
+ readonly description: "Small, medium or large option rows. Content may grow; native touch targets remain at least 44.";
667
+ };
668
+ readonly disabled: {
669
+ readonly type: "boolean";
670
+ readonly default: false;
671
+ readonly reflect: true;
672
+ readonly description: "Prevents interaction and removes the list from keyboard navigation.";
673
+ };
674
+ readonly readOnly: {
675
+ readonly type: "boolean";
676
+ readonly default: false;
677
+ readonly reflect: true;
678
+ readonly description: "Allows exploring options without proposing or committing selection changes.";
679
+ };
680
+ readonly locale: {
681
+ readonly type: "string";
682
+ readonly description: "BCP 47 locale for typeahead. Web inherits the nearest language; native uses the runtime locale when omitted. Invalid locale identifiers are rejected.";
683
+ };
684
+ };
685
+ readonly events: {
686
+ readonly selectionChange: {
687
+ readonly description: "Proposes the next selectedValues for an enabled activation. Autonomous selection commits; controlled selection waits for the owner. Arrows and typeahead never select.";
688
+ readonly detail: "ListboxSelectionChangeDetail";
689
+ readonly names: {
690
+ readonly dom: "cosm-selection-change";
691
+ readonly react: "onSelectionChange";
692
+ readonly angular: "selectionChange";
693
+ readonly native: "onSelectionChange";
694
+ };
695
+ };
696
+ };
697
+ readonly states: readonly [{
698
+ readonly prop: "selectedValues";
699
+ readonly event: "selectionChange";
700
+ readonly defaultProp: "defaultSelectedValues";
701
+ }];
702
+ readonly slots: {};
703
+ readonly parts: {
704
+ readonly base: "Outer container.";
705
+ readonly label: "Visible or visually hidden accessible label.";
706
+ readonly list: "Scrollable listbox.";
707
+ readonly group: "Named option group.";
708
+ readonly 'group-label': "Noninteractive group heading.";
709
+ readonly option: "Selectable row; selected, disabled and active states are exposed on the row.";
710
+ readonly icon: "Decorative option icon.";
711
+ readonly content: "Text content wrapper.";
712
+ readonly 'option-label': "Primary option text.";
713
+ readonly description: "Optional supporting text.";
714
+ readonly indicator: "Decorative selected-state indicator.";
715
+ };
716
+ readonly cssProperties: {
717
+ readonly '--cosm-listbox-background': "Container background.";
718
+ readonly '--cosm-listbox-color': "Primary foreground.";
719
+ readonly '--cosm-listbox-border': "Outlined container border color.";
720
+ readonly '--cosm-listbox-radius': "Container and option corner radius.";
721
+ readonly '--cosm-listbox-option-height': "Minimum option height.";
722
+ readonly '--cosm-listbox-option-padding': "Option padding.";
723
+ readonly '--cosm-listbox-gap': "Space between icon, content and selection indicator.";
724
+ readonly '--cosm-listbox-font-size': "Primary option text size.";
725
+ readonly '--cosm-listbox-description-color': "Supporting text color.";
726
+ readonly '--cosm-listbox-selected-background': "Selected option background.";
727
+ readonly '--cosm-listbox-selected-color': "Selected option foreground.";
728
+ readonly '--cosm-listbox-focus': "Visible keyboard focus outline color.";
729
+ readonly '--cosm-listbox-max-height': "Maximum scrollable list height.";
730
+ };
731
+ readonly keyboard: readonly [{
732
+ readonly keys: readonly ["Tab", "Shift+Tab"];
733
+ readonly action: "Enters or leaves the list as one Tab stop.";
734
+ }, {
735
+ readonly keys: readonly ["ArrowDown", "ArrowUp", "Home", "End"];
736
+ readonly action: "Moves focus among enabled options without changing selection; stops at the ends.";
737
+ }, {
738
+ readonly keys: readonly ["Enter", "Space"];
739
+ readonly action: "Selects the focused option; multiple mode toggles it. Read-only never changes selection.";
740
+ }, {
741
+ readonly keys: readonly ["Printable characters"];
742
+ readonly action: "Moves focus to a matching option using locale-aware typeahead without filtering.";
743
+ }];
744
+ };
745
+ readonly checkbox: {
746
+ readonly name: "checkbox";
747
+ readonly tag: "cosm-checkbox";
748
+ readonly description: "Selects an independent boolean value with accessible labeling and native form behavior on the web.";
749
+ readonly role: "checkbox";
750
+ readonly pattern: "https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/";
751
+ readonly props: {
752
+ readonly label: {
753
+ readonly type: "string";
754
+ readonly required: true;
755
+ readonly description: "Required accessible name, visible unless labelHidden is true.";
756
+ };
757
+ readonly labelHidden: {
758
+ readonly type: "boolean";
759
+ readonly default: false;
760
+ readonly reflect: true;
761
+ readonly description: "Visually hides the label while keeping it available to assistive technology.";
762
+ };
763
+ readonly checked: {
764
+ readonly type: "boolean";
765
+ readonly default: false;
766
+ readonly description: "Controlled checked value when supplied, including false; activation proposes changes without self-committing.";
767
+ };
768
+ readonly defaultChecked: {
769
+ readonly type: "boolean";
770
+ readonly default: false;
771
+ readonly description: "Initial autonomous checked value; later changes do not reset it.";
772
+ };
773
+ readonly indeterminate: {
774
+ readonly type: "boolean";
775
+ readonly default: false;
776
+ readonly reflect: true;
777
+ readonly description: "Presentation-only mixed state. Autonomous activation clears it; controlled use leaves it to the owner.";
778
+ };
779
+ readonly size: {
780
+ readonly type: "enum";
781
+ readonly values: readonly ["sm", "md", "lg"];
782
+ readonly default: "md";
783
+ readonly reflect: true;
784
+ readonly description: "Small, medium or large visual box.";
785
+ };
786
+ readonly disabled: {
787
+ readonly type: "boolean";
788
+ readonly default: false;
789
+ readonly reflect: true;
790
+ readonly description: "Prevents user interaction and excludes the value from web form submission.";
791
+ };
792
+ readonly required: {
793
+ readonly type: "boolean";
794
+ readonly default: false;
795
+ readonly reflect: true;
796
+ readonly description: "Exposes required semantics and participates in native web form validation. Native has no automatic validation.";
797
+ };
798
+ readonly invalid: {
799
+ readonly type: "boolean";
800
+ readonly default: false;
801
+ readonly reflect: true;
802
+ readonly description: "Externally supplied invalid presentation state when the visible error is supplied elsewhere; web form validity remains based on required.";
803
+ };
804
+ readonly helperText: {
805
+ readonly type: "string";
806
+ readonly description: "Optional consumer-localized supporting text associated with the checkbox.";
807
+ };
808
+ readonly errorText: {
809
+ readonly type: "string";
810
+ readonly description: "Optional consumer-localized error description; a nonempty trimmed value also exposes invalid state.";
811
+ };
812
+ readonly name: {
813
+ readonly type: "string";
814
+ readonly reflect: true;
815
+ readonly platforms: readonly ["web", "react", "angular"];
816
+ readonly description: "Web form field name; React Native has no HTML form association.";
817
+ };
818
+ readonly value: {
819
+ readonly type: "string";
820
+ readonly default: "on";
821
+ readonly platforms: readonly ["web", "react", "angular"];
822
+ readonly description: "Web form value submitted when checked and enabled; defaults to on. Angular Forms uses checked as its boolean value.";
823
+ };
824
+ };
825
+ readonly events: {
826
+ readonly checkedChange: {
827
+ readonly description: "Proposes the next checked value after enabled user activation; controlled state waits for the owner.";
828
+ readonly detail: "CheckboxCheckedChangeDetail";
829
+ readonly names: {
830
+ readonly dom: "cosm-checked-change";
831
+ readonly react: "onCheckedChange";
832
+ readonly angular: "checkedChange";
833
+ readonly native: "onCheckedChange";
834
+ };
835
+ };
836
+ };
837
+ readonly states: readonly [{
838
+ readonly prop: "checked";
839
+ readonly event: "checkedChange";
840
+ readonly defaultProp: "defaultChecked";
841
+ }];
842
+ readonly slots: {
843
+ readonly '': "Optional noninteractive inline label content; links and buttons are not allowed.";
844
+ };
845
+ readonly parts: {
846
+ readonly base: "The label and visual checkbox control.";
847
+ readonly input: "The native checkbox input and web focus target.";
848
+ readonly box: "The visible checkbox box and indicator.";
849
+ readonly label: "Visible or visually hidden label text.";
850
+ readonly 'help-text': "Supporting text associated with the checkbox.";
851
+ readonly 'error-text': "Error description associated with the checkbox.";
852
+ };
853
+ readonly cssProperties: {
854
+ readonly '--cosm-checkbox-size': "Visual box width and height.";
855
+ readonly '--cosm-checkbox-background': "Unchecked box background.";
856
+ readonly '--cosm-checkbox-checked-background': "Checked and mixed box background.";
857
+ readonly '--cosm-checkbox-color': "Checked indicator foreground.";
858
+ readonly '--cosm-checkbox-border': "Box boundary color.";
859
+ readonly '--cosm-checkbox-radius': "Box corner radius.";
860
+ readonly '--cosm-checkbox-focus': "Visible keyboard focus indicator color.";
861
+ readonly '--cosm-checkbox-gap': "Space between the box and label.";
862
+ };
863
+ readonly keyboard: readonly [{
864
+ readonly keys: readonly ["Tab", "Shift+Tab"];
865
+ readonly action: "Moves focus to or from the enabled checkbox.";
866
+ }, {
867
+ readonly keys: readonly ["Space"];
868
+ readonly action: "Toggles checked state and emits a checkedChange proposal.";
869
+ }];
870
+ };
871
+ readonly switch: {
872
+ readonly name: "switch";
873
+ readonly tag: "cosm-switch";
874
+ readonly description: "Toggles a binary setting immediately with a stable accessible name and form behavior on the web.";
875
+ readonly role: "switch";
876
+ readonly pattern: "https://www.w3.org/WAI/ARIA/apg/patterns/switch/";
877
+ readonly props: {
878
+ readonly label: {
879
+ readonly type: "string";
880
+ readonly required: true;
881
+ readonly description: "Required nonempty accessible name; remains stable in both states.";
882
+ };
883
+ readonly labelHidden: {
884
+ readonly type: "boolean";
885
+ readonly default: false;
886
+ readonly reflect: true;
887
+ readonly description: "Visually hides the label while retaining its accessible name.";
888
+ };
889
+ readonly checked: {
890
+ readonly type: "boolean";
891
+ readonly default: false;
892
+ readonly description: "Controlled checked value when supplied, including false; activation proposes changes without self-committing.";
893
+ };
894
+ readonly defaultChecked: {
895
+ readonly type: "boolean";
896
+ readonly default: false;
897
+ readonly description: "Initial autonomous checked value; later changes do not reset it.";
898
+ };
899
+ readonly size: {
900
+ readonly type: "enum";
901
+ readonly values: readonly ["sm", "md", "lg"];
902
+ readonly default: "md";
903
+ readonly reflect: true;
904
+ readonly platforms: readonly ["web", "react", "angular"];
905
+ readonly description: "Small, medium or large web switch. Native uses system Switch sizing.";
906
+ };
907
+ readonly disabled: {
908
+ readonly type: "boolean";
909
+ readonly default: false;
910
+ readonly reflect: true;
911
+ readonly description: "Prevents user interaction and excludes the value from web form submission.";
912
+ };
913
+ readonly invalid: {
914
+ readonly type: "boolean";
915
+ readonly default: false;
916
+ readonly reflect: true;
917
+ readonly description: "Externally supplied invalid presentation. Does not change checked state or form validity; native uses danger colors without an equivalent system invalid trait.";
918
+ };
919
+ readonly helperText: {
920
+ readonly type: "string";
921
+ readonly description: "Optional consumer-localized supporting text associated with the switch.";
922
+ };
923
+ readonly name: {
924
+ readonly type: "string";
925
+ readonly reflect: true;
926
+ readonly platforms: readonly ["web", "react", "angular"];
927
+ readonly description: "Web form field name; React Native has no HTML form association.";
928
+ };
929
+ readonly value: {
930
+ readonly type: "string";
931
+ readonly default: "on";
932
+ readonly platforms: readonly ["web", "react", "angular"];
933
+ readonly description: "Web form value submitted when checked and enabled; defaults to on. Angular Forms uses checked as its boolean value.";
934
+ };
935
+ };
936
+ readonly events: {
937
+ readonly checkedChange: {
938
+ readonly description: "Proposes the next checked value after enabled user activation; controlled state waits for the owner.";
939
+ readonly detail: "SwitchCheckedChangeDetail";
940
+ readonly names: {
941
+ readonly dom: "cosm-checked-change";
942
+ readonly react: "onCheckedChange";
943
+ readonly angular: "checkedChange";
944
+ readonly native: "onCheckedChange";
945
+ };
946
+ };
947
+ };
948
+ readonly states: readonly [{
949
+ readonly prop: "checked";
950
+ readonly event: "checkedChange";
951
+ readonly defaultProp: "defaultChecked";
952
+ }];
953
+ readonly slots: {};
954
+ readonly parts: {
955
+ readonly base: "Label, control and supporting text layout.";
956
+ readonly input: "Native checkbox input and web focus target.";
957
+ readonly track: "Visible switch track.";
958
+ readonly thumb: "Visible switch thumb.";
959
+ readonly label: "Visible or visually hidden label text.";
960
+ readonly 'help-text': "Supporting text associated with the switch.";
961
+ };
962
+ readonly cssProperties: {
963
+ readonly '--cosm-switch-width': "Track width.";
964
+ readonly '--cosm-switch-height': "Track height.";
965
+ readonly '--cosm-switch-thumb-size': "Thumb diameter.";
966
+ readonly '--cosm-switch-track-background': "Unchecked track background.";
967
+ readonly '--cosm-switch-checked-track-background': "Checked track background.";
968
+ readonly '--cosm-switch-thumb-background': "Thumb background.";
969
+ readonly '--cosm-switch-border': "Unchecked track boundary color.";
970
+ readonly '--cosm-switch-radius': "Track corner radius.";
971
+ readonly '--cosm-switch-gap': "Space between the switch and label.";
972
+ readonly '--cosm-switch-focus': "Visible keyboard focus indicator color.";
973
+ };
974
+ readonly keyboard: readonly [{
975
+ readonly keys: readonly ["Tab", "Shift+Tab"];
976
+ readonly action: "Moves focus to or from the enabled switch.";
977
+ }, {
978
+ readonly keys: readonly ["Space"];
979
+ readonly action: "Toggles checked state and emits a checkedChange proposal.";
980
+ }];
981
+ };
982
+ readonly badge: {
983
+ readonly name: "badge";
984
+ readonly tag: "cosm-badge";
985
+ readonly description: "Displays a noninteractive status or category label, or caller-formatted count, with an optional decorative leading icon.";
986
+ readonly role: "";
987
+ readonly pattern: "https://html.spec.whatwg.org/multipage/text-level-semantics.html";
988
+ readonly props: {
989
+ readonly variant: {
990
+ readonly type: "enum";
991
+ readonly values: readonly ["soft", "solid", "outline"];
992
+ readonly default: "soft";
993
+ readonly reflect: true;
994
+ readonly description: "Visual treatment of the static label.";
995
+ };
996
+ readonly tone: {
997
+ readonly type: "enum";
998
+ readonly values: readonly ["neutral", "info", "success", "warning", "danger"];
999
+ readonly default: "neutral";
1000
+ readonly reflect: true;
1001
+ readonly description: "Semantic color intent of the static label.";
1002
+ };
1003
+ readonly size: {
1004
+ readonly type: "enum";
1005
+ readonly values: readonly ["sm", "md", "lg"];
1006
+ readonly default: "md";
1007
+ readonly reflect: true;
1008
+ readonly description: "Semantic label size.";
1009
+ };
1010
+ readonly startIcon: {
1011
+ readonly type: "reference";
1012
+ readonly reference: "IconDefinition";
1013
+ readonly options: readonly ["search", "house", "heart", "star"];
1014
+ readonly example: "heart";
1015
+ readonly description: "Optional structured decorative icon before the label.";
1016
+ };
1017
+ };
1018
+ readonly events: {};
1019
+ readonly states: readonly [];
1020
+ readonly slots: {
1021
+ readonly '': "Label or caller-formatted count text.";
1022
+ };
1023
+ readonly parts: {
1024
+ readonly base: "Rounded label container.";
1025
+ readonly label: "Label or caller-formatted count text.";
1026
+ readonly icon: "Optional decorative leading icon wrapper.";
1027
+ };
1028
+ readonly cssProperties: {
1029
+ readonly '--cosm-badge-background': "Badge background color.";
1030
+ readonly '--cosm-badge-color': "Badge text and icon color.";
1031
+ readonly '--cosm-badge-border': "Badge border color.";
1032
+ readonly '--cosm-badge-padding-inline': "Badge inline padding.";
1033
+ readonly '--cosm-badge-padding-block': "Badge block padding.";
1034
+ readonly '--cosm-badge-gap': "Space between the icon and label.";
1035
+ readonly '--cosm-badge-font-family': "Badge label font family.";
1036
+ readonly '--cosm-badge-font-size': "Badge label font size.";
1037
+ readonly '--cosm-badge-font-weight': "Badge label font weight.";
1038
+ readonly '--cosm-badge-line-height': "Badge label line height.";
1039
+ readonly '--cosm-badge-radius': "Badge corner radius.";
1040
+ };
1041
+ readonly keyboard: readonly [];
1042
+ };
1043
+ readonly calendar: {
1044
+ readonly name: "calendar";
1045
+ readonly tag: "cosm-calendar";
1046
+ readonly description: "Selects one Gregorian date from an inline, localized calendar with keyboard navigation and optional bounds. Month and year can be selected directly.";
1047
+ readonly role: "grid";
1048
+ readonly pattern: "https://www.w3.org/WAI/ARIA/apg/patterns/grid/";
1049
+ readonly props: {
1050
+ readonly value: {
1051
+ readonly type: "string";
1052
+ readonly description: "Controlled selected date in YYYY-MM-DD format; when supplied, selection proposals wait for the owner to update this value.";
1053
+ };
1054
+ readonly defaultValue: {
1055
+ readonly type: "string";
1056
+ readonly description: "Initial autonomous selected date in YYYY-MM-DD format; later changes do not reset selection.";
1057
+ };
1058
+ readonly min: {
1059
+ readonly type: "string";
1060
+ readonly description: "Earliest selectable date in YYYY-MM-DD format, inclusive.";
1061
+ };
1062
+ readonly max: {
1063
+ readonly type: "string";
1064
+ readonly description: "Latest selectable date in YYYY-MM-DD format, inclusive.";
1065
+ };
1066
+ readonly locale: {
1067
+ readonly type: "string";
1068
+ readonly description: "BCP 47 locale for month and weekday names, week start, and text direction; defaults to the environment locale. Invalid locale identifiers are rejected.";
1069
+ };
1070
+ readonly disabled: {
1071
+ readonly type: "boolean";
1072
+ readonly default: false;
1073
+ readonly reflect: true;
1074
+ readonly description: "Disables date selection and calendar navigation.";
1075
+ };
1076
+ };
1077
+ readonly events: {
1078
+ readonly change: {
1079
+ readonly description: "Proposes an enabled selected date as a YYYY-MM-DD value; autonomous selection commits and controlled selection waits for the owner.";
1080
+ readonly detail: "CalendarChangeDetail";
1081
+ readonly names: {
1082
+ readonly dom: "cosm-change";
1083
+ readonly react: "onChange";
1084
+ readonly angular: "valueChange";
1085
+ readonly native: "onValueChange";
1086
+ };
1087
+ };
1088
+ };
1089
+ readonly states: readonly [{
1090
+ readonly prop: "value";
1091
+ readonly event: "change";
1092
+ readonly defaultProp: "defaultValue";
1093
+ }];
1094
+ readonly slots: {};
1095
+ readonly parts: {
1096
+ readonly base: "Calendar root.";
1097
+ readonly header: "Month heading and navigation controls.";
1098
+ readonly previous: "Previous-month navigation button.";
1099
+ readonly heading: "Localized month and year heading.";
1100
+ readonly next: "Next-month navigation button.";
1101
+ readonly weekday: "Localized weekday heading.";
1102
+ readonly grid: "Seven-column date grid.";
1103
+ readonly day: "Date button, including adjacent-month dates.";
1104
+ readonly 'month-trigger': "Button that opens direct month selection.";
1105
+ readonly 'year-trigger': "Button that opens direct year selection.";
1106
+ readonly 'month-option': "Month choice in the month selection view.";
1107
+ readonly 'year-option': "Year choice in the year selection view.";
1108
+ };
1109
+ readonly cssProperties: {
1110
+ readonly '--cosm-calendar-background': "Calendar surface background.";
1111
+ readonly '--cosm-calendar-color': "Primary calendar text color.";
1112
+ readonly '--cosm-calendar-muted-color': "Adjacent-month and weekday text color.";
1113
+ readonly '--cosm-calendar-selected-background': "Selected-date background.";
1114
+ readonly '--cosm-calendar-selected-color': "Selected-date text color.";
1115
+ readonly '--cosm-calendar-day-size': "Minimum date target dimensions.";
1116
+ readonly '--cosm-calendar-gap': "Space between date targets.";
1117
+ readonly '--cosm-calendar-radius': "Date target corner radius.";
1118
+ readonly '--cosm-calendar-focus': "Visible keyboard focus indicator color.";
1119
+ readonly '--cosm-calendar-today-border': "Non-color-only today marker.";
1120
+ };
1121
+ readonly keyboard: readonly [{
1122
+ readonly keys: readonly ["Tab", "Shift+Tab"];
1123
+ readonly action: "Moves between the navigation controls and one active date.";
1124
+ readonly platforms: readonly ["web", "react", "angular"];
1125
+ }, {
1126
+ readonly keys: readonly ["ArrowLeft", "ArrowRight"];
1127
+ readonly action: "Moves the active date by one day; direction follows the visual RTL/LTR order.";
1128
+ readonly platforms: readonly ["web", "react", "angular"];
1129
+ }, {
1130
+ readonly keys: readonly ["ArrowUp", "ArrowDown"];
1131
+ readonly action: "Moves the active date by one week.";
1132
+ readonly platforms: readonly ["web", "react", "angular"];
1133
+ }, {
1134
+ readonly keys: readonly ["Home", "End"];
1135
+ readonly action: "Moves to the first or last day of the localized week.";
1136
+ readonly platforms: readonly ["web", "react", "angular"];
1137
+ }, {
1138
+ readonly keys: readonly ["PageUp", "PageDown"];
1139
+ readonly action: "Moves the active date by one month.";
1140
+ readonly platforms: readonly ["web", "react", "angular"];
1141
+ }, {
1142
+ readonly keys: readonly ["Shift+PageUp", "Shift+PageDown"];
1143
+ readonly action: "Moves the active date by one year.";
1144
+ readonly platforms: readonly ["web", "react", "angular"];
1145
+ }, {
1146
+ readonly keys: readonly ["Enter", "Space"];
1147
+ readonly action: "Proposes selection of the active enabled date.";
1148
+ readonly platforms: readonly ["web", "react", "angular"];
1149
+ }];
1150
+ };
1151
+ readonly textarea: {
1152
+ readonly name: "textarea";
1153
+ readonly tag: "cosm-textarea";
1154
+ readonly description: "Accepts multiline plain text with an accessible label, optional helper and error text, and native form behavior on the web.";
1155
+ readonly role: "textbox";
1156
+ readonly pattern: "https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element";
1157
+ readonly props: {
1158
+ readonly label: {
1159
+ readonly type: "string";
1160
+ readonly required: true;
1161
+ readonly description: "Accessible name for the editable control. It is rendered above the control unless visually hidden.";
1162
+ };
1163
+ readonly labelHidden: {
1164
+ readonly type: "boolean";
1165
+ readonly default: false;
1166
+ readonly reflect: true;
1167
+ readonly description: "Visually hides the label while keeping it available to assistive technology.";
1168
+ };
1169
+ readonly value: {
1170
+ readonly type: "string";
1171
+ readonly description: "Current text. When bound, edits are proposals and the component waits for the owner to supply the accepted value.";
1172
+ };
1173
+ readonly defaultValue: {
1174
+ readonly type: "string";
1175
+ readonly default: "";
1176
+ readonly description: "Initial value for autonomous use. Web form reset restores this value; it does not control subsequent edits.";
1177
+ };
1178
+ readonly rows: {
1179
+ readonly type: "number";
1180
+ readonly default: 4;
1181
+ readonly reflect: true;
1182
+ readonly description: "Visible line count of the multiline editor. It is independent of the visual size.";
1183
+ };
1184
+ readonly variant: {
1185
+ readonly type: "enum";
1186
+ readonly values: readonly ["outlined", "filled"];
1187
+ readonly default: "outlined";
1188
+ readonly reflect: true;
1189
+ readonly description: "Visual treatment of the editable control.";
1190
+ };
1191
+ readonly size: {
1192
+ readonly type: "enum";
1193
+ readonly values: readonly ["sm", "md", "lg"];
1194
+ readonly default: "md";
1195
+ readonly reflect: true;
1196
+ readonly description: "Visual size of the editable control, independent of rows.";
1197
+ };
1198
+ readonly placeholder: {
1199
+ readonly type: "string";
1200
+ readonly description: "Short input hint; it never replaces the accessible label.";
1201
+ };
1202
+ readonly helperText: {
1203
+ readonly type: "string";
1204
+ readonly description: "Optional supporting text associated with the editable control.";
1205
+ };
1206
+ readonly errorText: {
1207
+ readonly type: "string";
1208
+ readonly description: "Optional consumer-localized error text associated with the editable control; a nonempty trimmed value also exposes invalid state.";
1209
+ };
1210
+ readonly invalid: {
1211
+ readonly type: "boolean";
1212
+ readonly default: false;
1213
+ readonly reflect: true;
1214
+ readonly description: "External invalid state when the visible error is supplied elsewhere, independent of browser constraints or consumer business validation.";
1215
+ };
1216
+ readonly required: {
1217
+ readonly type: "boolean";
1218
+ readonly default: false;
1219
+ readonly reflect: true;
1220
+ readonly description: "Exposes required semantics. On web, participates in native HTML constraint validation.";
1221
+ };
1222
+ readonly disabled: {
1223
+ readonly type: "boolean";
1224
+ readonly default: false;
1225
+ readonly reflect: true;
1226
+ readonly description: "Disables editing and interaction. On web, follows disabled fieldsets and excludes the value from form submission.";
1227
+ };
1228
+ readonly readOnly: {
1229
+ readonly type: "boolean";
1230
+ readonly default: false;
1231
+ readonly reflect: true;
1232
+ readonly description: "Prevents editing while remaining focusable and form-submittable on web; distinct from disabled.";
1233
+ };
1234
+ readonly maxLength: {
1235
+ readonly type: "number";
1236
+ readonly description: "Maximum number of characters. Web uses native HTML length constraints and native applies supported input limits.";
1237
+ };
1238
+ readonly name: {
1239
+ readonly type: "string";
1240
+ readonly reflect: true;
1241
+ readonly platforms: readonly ["web", "react", "angular"];
1242
+ readonly description: "Form field name on web. React Native has no HTML form association or name-based submission.";
1243
+ };
1244
+ };
1245
+ readonly events: {
1246
+ readonly change: {
1247
+ readonly description: "Proposes the current text after each user edit; this is not a blur/commit event.";
1248
+ readonly detail: "TextareaChangeDetail";
1249
+ readonly names: {
1250
+ readonly dom: "cosm-change";
1251
+ readonly react: "onChange";
1252
+ readonly angular: "valueChange";
1253
+ readonly native: "onValueChange";
1254
+ };
1255
+ };
1256
+ };
1257
+ readonly states: readonly [{
1258
+ readonly prop: "value";
1259
+ readonly event: "change";
1260
+ readonly defaultProp: "defaultValue";
1261
+ }];
1262
+ readonly slots: {};
1263
+ readonly parts: {
1264
+ readonly label: "Accessible label above the control.";
1265
+ readonly control: "Visual control containing the editable textarea.";
1266
+ readonly textarea: "The native multiline editable textarea.";
1267
+ readonly help: "Supporting text associated with the editable textarea.";
1268
+ readonly error: "External or native-constraint error text associated with the editable textarea.";
1269
+ };
1270
+ readonly cssProperties: {
1271
+ readonly '--cosm-textarea-background': "Editable control background.";
1272
+ readonly '--cosm-textarea-color': "Editable text color.";
1273
+ readonly '--cosm-textarea-placeholder': "Placeholder text color.";
1274
+ readonly '--cosm-textarea-border': "Editable control boundary color.";
1275
+ readonly '--cosm-textarea-focus': "Visible focus indicator color.";
1276
+ readonly '--cosm-textarea-radius': "Editable control corner radius.";
1277
+ };
1278
+ readonly keyboard: readonly [{
1279
+ readonly keys: readonly ["Tab", "Shift+Tab"];
1280
+ readonly action: "Moves focus to or from the enabled editable control.";
1281
+ }, {
1282
+ readonly keys: readonly ["Enter"];
1283
+ readonly action: "Inserts a newline in the editable text.";
1284
+ }];
1285
+ };
1286
+ readonly 'radio-group': {
1287
+ readonly name: "radio-group";
1288
+ readonly tag: "cosm-radio-group";
1289
+ readonly description: "Selects one option from a labeled collection, with optional selection and native Web form behavior.";
1290
+ readonly role: "radiogroup";
1291
+ readonly pattern: "https://www.w3.org/WAI/ARIA/apg/patterns/radio/";
1292
+ readonly props: {
1293
+ readonly label: {
1294
+ readonly type: "string";
1295
+ readonly required: true;
1296
+ readonly description: "Required visible accessible name for the group.";
1297
+ };
1298
+ readonly options: {
1299
+ readonly type: "reference";
1300
+ readonly reference: "RadioGroupOptions";
1301
+ readonly required: true;
1302
+ readonly options: readonly ["contact-methods"];
1303
+ readonly example: "contact-methods";
1304
+ readonly description: "Readonly flat options with unique nonempty values and labels, optional descriptions and disabled states.";
1305
+ };
1306
+ readonly value: {
1307
+ readonly type: "reference";
1308
+ readonly reference: "RadioGroupValue";
1309
+ readonly options: readonly ["none", "email", "phone", "basic", "plus", "premium", "weekly", "monthly"];
1310
+ readonly description: "Controlled selected value; null means no selection, and a supplied null remains controlled.";
1311
+ };
1312
+ readonly defaultValue: {
1313
+ readonly type: "reference";
1314
+ readonly reference: "RadioGroupValue";
1315
+ readonly options: readonly ["none", "email", "phone", "basic", "plus", "premium", "weekly", "monthly"];
1316
+ readonly description: "Initial autonomous selection; null by default.";
1317
+ };
1318
+ readonly size: {
1319
+ readonly type: "enum";
1320
+ readonly values: readonly ["sm", "md", "lg"];
1321
+ readonly default: "md";
1322
+ readonly reflect: true;
1323
+ readonly description: "Small, medium or large radio indicator.";
1324
+ };
1325
+ readonly orientation: {
1326
+ readonly type: "enum";
1327
+ readonly values: readonly ["vertical", "horizontal"];
1328
+ readonly default: "vertical";
1329
+ readonly reflect: true;
1330
+ readonly description: "Vertical list or wrapping horizontal options.";
1331
+ };
1332
+ readonly disabled: {
1333
+ readonly type: "boolean";
1334
+ readonly default: false;
1335
+ readonly reflect: true;
1336
+ readonly description: "Prevents interaction and excludes the value from Web form submission.";
1337
+ };
1338
+ readonly required: {
1339
+ readonly type: "boolean";
1340
+ readonly default: false;
1341
+ readonly reflect: true;
1342
+ readonly description: "Requires a selection in Web form validation; Native exposes descriptive semantics.";
1343
+ };
1344
+ readonly invalid: {
1345
+ readonly type: "boolean";
1346
+ readonly default: false;
1347
+ readonly reflect: true;
1348
+ readonly description: "Externally supplied invalid presentation state when the visible error is supplied elsewhere.";
1349
+ };
1350
+ readonly helperText: {
1351
+ readonly type: "string";
1352
+ readonly description: "Optional supporting text associated with the group.";
1353
+ };
1354
+ readonly errorText: {
1355
+ readonly type: "string";
1356
+ readonly description: "Optional consumer-localized error text; a nonempty trimmed value also exposes invalid state.";
1357
+ };
1358
+ readonly name: {
1359
+ readonly type: "string";
1360
+ readonly reflect: true;
1361
+ readonly platforms: readonly ["web", "react", "angular"];
1362
+ readonly description: "Web form field name; React Native has no HTML form association.";
1363
+ };
1364
+ };
1365
+ readonly events: {
1366
+ readonly change: {
1367
+ readonly description: "Proposes a selection after enabled user activation; autonomous state commits and controlled state waits for the owner.";
1368
+ readonly detail: "RadioGroupChangeDetail";
1369
+ readonly names: {
1370
+ readonly dom: "cosm-change";
1371
+ readonly react: "onChange";
1372
+ readonly angular: "valueChange";
1373
+ readonly native: "onValueChange";
1374
+ };
1375
+ };
1376
+ };
1377
+ readonly states: readonly [{
1378
+ readonly prop: "value";
1379
+ readonly event: "change";
1380
+ readonly defaultProp: "defaultValue";
1381
+ }];
1382
+ readonly slots: {};
1383
+ readonly parts: {
1384
+ readonly base: "Group wrapper and accessible fieldset.";
1385
+ readonly label: "Visible group label.";
1386
+ readonly options: "Option collection.";
1387
+ readonly option: "Selectable option row.";
1388
+ readonly input: "Native radio input and Web focus target.";
1389
+ readonly control: "Visible circular radio boundary.";
1390
+ readonly indicator: "Selected radio dot.";
1391
+ readonly 'option-label': "Primary option text.";
1392
+ readonly description: "Optional option description.";
1393
+ readonly 'help-text': "Supporting text associated with the group.";
1394
+ readonly 'error-text': "Error description associated with the group.";
1395
+ };
1396
+ readonly cssProperties: {
1397
+ readonly '--cosm-radio-group-gap': "Space between option rows.";
1398
+ readonly '--cosm-radio-group-option-gap': "Space between the radio control and option content.";
1399
+ readonly '--cosm-radio-group-control-size': "Diameter of the visible radio control.";
1400
+ readonly '--cosm-radio-group-border': "Unchecked radio boundary color.";
1401
+ readonly '--cosm-radio-group-selected-border': "Selected radio boundary color.";
1402
+ readonly '--cosm-radio-group-indicator': "Selected radio dot color.";
1403
+ readonly '--cosm-radio-group-focus': "Visible keyboard focus indicator color.";
1404
+ };
1405
+ readonly keyboard: readonly [{
1406
+ readonly keys: readonly ["Tab", "Shift+Tab"];
1407
+ readonly action: "Enters or leaves the group as one tab stop.";
1408
+ }, {
1409
+ readonly keys: readonly ["Space"];
1410
+ readonly action: "Selects the focused enabled option.";
1411
+ }, {
1412
+ readonly keys: readonly ["ArrowRight", "ArrowDown", "ArrowLeft", "ArrowUp"];
1413
+ readonly action: "Moves focus and selection through enabled options with wrapping.";
1414
+ }];
1415
+ };
1416
+ readonly select: {
1417
+ readonly name: "select";
1418
+ readonly tag: "cosm-select";
1419
+ readonly description: "Selects one option from an accessible collection, with native Web form behavior.";
1420
+ readonly role: "combobox";
1421
+ readonly pattern: "https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/";
1422
+ readonly props: {
1423
+ readonly label: {
1424
+ readonly type: "string";
1425
+ readonly required: true;
1426
+ readonly description: "Required visible accessible name for the control.";
1427
+ };
1428
+ readonly items: {
1429
+ readonly type: "reference";
1430
+ readonly reference: "SelectItems";
1431
+ readonly required: true;
1432
+ readonly options: readonly ["flat"];
1433
+ readonly example: "flat";
1434
+ readonly description: "Readonly flat options with unique nonempty values, nonempty labels, and optional disabled state.";
1435
+ };
1436
+ readonly value: {
1437
+ readonly type: "reference";
1438
+ readonly reference: "SelectValue";
1439
+ readonly options: readonly ["none", "apple", "cherry"];
1440
+ readonly description: "Controlled selected value; null means no selection, and a supplied null remains controlled.";
1441
+ };
1442
+ readonly defaultValue: {
1443
+ readonly type: "reference";
1444
+ readonly reference: "SelectValue";
1445
+ readonly options: readonly ["none", "apple", "cherry"];
1446
+ readonly example: "none";
1447
+ readonly description: "Initial autonomous selection; null by default.";
1448
+ };
1449
+ readonly placeholder: {
1450
+ readonly type: "string";
1451
+ readonly required: true;
1452
+ readonly description: "Consumer-localized text shown when no value is selected.";
1453
+ };
1454
+ readonly variant: {
1455
+ readonly type: "enum";
1456
+ readonly values: readonly ["outlined", "filled"];
1457
+ readonly default: "outlined";
1458
+ readonly reflect: true;
1459
+ readonly description: "Outlined or filled trigger appearance.";
1460
+ };
1461
+ readonly size: {
1462
+ readonly type: "enum";
1463
+ readonly values: readonly ["sm", "md", "lg"];
1464
+ readonly default: "md";
1465
+ readonly reflect: true;
1466
+ readonly description: "Small, medium, or large control size.";
1467
+ };
1468
+ readonly disabled: {
1469
+ readonly type: "boolean";
1470
+ readonly default: false;
1471
+ readonly reflect: true;
1472
+ readonly description: "Prevents interaction and excludes the value from Web form submission.";
1473
+ };
1474
+ readonly required: {
1475
+ readonly type: "boolean";
1476
+ readonly default: false;
1477
+ readonly reflect: true;
1478
+ readonly description: "Requires a selection in Web form validation; Native exposes descriptive semantics.";
1479
+ };
1480
+ readonly invalid: {
1481
+ readonly type: "boolean";
1482
+ readonly default: false;
1483
+ readonly reflect: true;
1484
+ readonly description: "Externally supplied invalid presentation state when the visible error is supplied elsewhere.";
1485
+ };
1486
+ readonly helperText: {
1487
+ readonly type: "string";
1488
+ readonly description: "Optional supporting text associated with the control.";
1489
+ };
1490
+ readonly errorText: {
1491
+ readonly type: "string";
1492
+ readonly description: "Optional consumer-localized error text; a nonempty trimmed value also exposes invalid state.";
1493
+ };
1494
+ readonly name: {
1495
+ readonly type: "string";
1496
+ readonly reflect: true;
1497
+ readonly platforms: readonly ["web", "react", "angular"];
1498
+ readonly description: "Web form field name; React Native has no HTML form association.";
1499
+ };
1500
+ };
1501
+ readonly events: {
1502
+ readonly change: {
1503
+ readonly description: "Proposes a selected value after user activation; autonomous state commits and controlled state waits for the owner.";
1504
+ readonly detail: "SelectChangeDetail";
1505
+ readonly names: {
1506
+ readonly dom: "cosm-change";
1507
+ readonly react: "onChange";
1508
+ readonly angular: "valueChange";
1509
+ readonly native: "onValueChange";
1510
+ };
1511
+ };
1512
+ };
1513
+ readonly states: readonly [{
1514
+ readonly prop: "value";
1515
+ readonly event: "change";
1516
+ readonly defaultProp: "defaultValue";
1517
+ }];
1518
+ readonly slots: {};
1519
+ readonly parts: {
1520
+ readonly base: "Field wrapper.";
1521
+ readonly label: "Visible accessible label.";
1522
+ readonly trigger: "Select-only combobox trigger.";
1523
+ readonly value: "Selected option text.";
1524
+ readonly placeholder: "Text displayed when no option is selected.";
1525
+ readonly popup: "Anchored popup surface.";
1526
+ readonly listbox: "Single-selection option collection.";
1527
+ readonly option: "Selectable row with selected, active, and disabled states.";
1528
+ readonly content: "Option text wrapper.";
1529
+ readonly 'option-label': "Primary option text.";
1530
+ readonly help: "Supporting text associated with the control.";
1531
+ readonly error: "Error description associated with the control.";
1532
+ };
1533
+ readonly cssProperties: {
1534
+ readonly '--cosm-select-background': "Control background.";
1535
+ readonly '--cosm-select-color': "Control and value text color.";
1536
+ readonly '--cosm-select-placeholder': "Placeholder text color.";
1537
+ readonly '--cosm-select-border': "Control boundary color.";
1538
+ readonly '--cosm-select-focus': "Visible keyboard focus indicator color.";
1539
+ readonly '--cosm-select-radius': "Control corner radius.";
1540
+ readonly '--cosm-select-trigger-min-height': "Custom minimum trigger height.";
1541
+ readonly '--cosm-select-option-selected-background': "Selected option background.";
1542
+ readonly '--cosm-select-option-selected-color': "Selected option text color.";
1543
+ };
1544
+ readonly keyboard: readonly [{
1545
+ readonly keys: readonly ["Tab", "Shift+Tab"];
1546
+ readonly action: "Moves focus to or from the enabled combobox trigger.";
1547
+ }, {
1548
+ readonly keys: readonly ["Enter", "Space", "ArrowDown", "ArrowUp"];
1549
+ readonly action: "On Web, opens the popup; arrows move the active option without changing selection.";
1550
+ }, {
1551
+ readonly keys: readonly ["ArrowDown", "ArrowUp", "Home", "End"];
1552
+ readonly action: "On Web, moves the active option without changing the selected value.";
1553
+ }, {
1554
+ readonly keys: readonly ["Printable characters"];
1555
+ readonly action: "On Web and React Native Web, moves to a matching option using locale-aware typeahead. Native iOS/Android use touch and platform accessibility navigation; React Native core does not expose hardware key events on this control.";
1556
+ }, {
1557
+ readonly keys: readonly ["Enter", "Space"];
1558
+ readonly action: "On Web, selects the active enabled option.";
1559
+ }, {
1560
+ readonly keys: readonly ["Escape"];
1561
+ readonly action: "On Web, closes the popup without changing the selected value.";
1562
+ }];
1563
+ };
1564
+ readonly pagination: {
1565
+ readonly name: "pagination";
1566
+ readonly tag: "cosm-pagination";
1567
+ readonly description: "Navigates a known number of pages using buttons.";
1568
+ readonly role: "navigation";
1569
+ readonly pattern: "https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/";
1570
+ readonly props: {
1571
+ readonly totalPages: {
1572
+ readonly type: "number";
1573
+ readonly required: true;
1574
+ readonly description: "Required nonnegative safe integer page count.";
1575
+ };
1576
+ readonly page: {
1577
+ readonly type: "number";
1578
+ readonly description: "Controlled one-based safe integer page; out-of-range values are displayed clamped.";
1579
+ };
1580
+ readonly defaultPage: {
1581
+ readonly type: "number";
1582
+ readonly default: 1;
1583
+ readonly description: "Initial one-based page for autonomous state.";
1584
+ };
1585
+ readonly label: {
1586
+ readonly type: "string";
1587
+ readonly required: true;
1588
+ readonly description: "Required localized navigation landmark label.";
1589
+ };
1590
+ readonly previousLabel: {
1591
+ readonly type: "string";
1592
+ readonly default: "Previous page";
1593
+ readonly description: "Previous button label.";
1594
+ };
1595
+ readonly nextLabel: {
1596
+ readonly type: "string";
1597
+ readonly default: "Next page";
1598
+ readonly description: "Next button label.";
1599
+ };
1600
+ readonly firstLabel: {
1601
+ readonly type: "string";
1602
+ readonly default: "First page";
1603
+ readonly description: "First button label.";
1604
+ };
1605
+ readonly lastLabel: {
1606
+ readonly type: "string";
1607
+ readonly default: "Last page";
1608
+ readonly description: "Last button label.";
1609
+ };
1610
+ readonly pageLabel: {
1611
+ readonly type: "string";
1612
+ readonly default: "Page {page}";
1613
+ readonly description: "Page button label template; {page} is replaced with the localized number.";
1614
+ };
1615
+ readonly summaryLabel: {
1616
+ readonly type: "string";
1617
+ readonly default: "Page {page} of {total}";
1618
+ readonly description: "Compact summary template with {page} and {total} placeholders.";
1619
+ };
1620
+ readonly locale: {
1621
+ readonly type: "string";
1622
+ readonly description: "Locale for formatted page numbers.";
1623
+ };
1624
+ readonly direction: {
1625
+ readonly type: "enum";
1626
+ readonly values: readonly ["ltr", "rtl"];
1627
+ readonly default: "ltr";
1628
+ readonly description: "Layout and directional icon direction.";
1629
+ };
1630
+ readonly presentation: {
1631
+ readonly type: "enum";
1632
+ readonly values: readonly ["numbered", "compact"];
1633
+ readonly default: "numbered";
1634
+ readonly reflect: true;
1635
+ readonly description: "Show up to seven fixed-width numbered positions or a compact summary.";
1636
+ };
1637
+ readonly variant: {
1638
+ readonly type: "enum";
1639
+ readonly values: readonly ["solid", "soft", "outline"];
1640
+ readonly default: "solid";
1641
+ readonly reflect: true;
1642
+ readonly description: "Selected page emphasis.";
1643
+ };
1644
+ readonly size: {
1645
+ readonly type: "enum";
1646
+ readonly values: readonly ["sm", "md", "lg"];
1647
+ readonly default: "md";
1648
+ readonly reflect: true;
1649
+ readonly description: "Control size.";
1650
+ };
1651
+ readonly showFirstLast: {
1652
+ readonly type: "boolean";
1653
+ readonly default: false;
1654
+ readonly description: "Show first and last page controls.";
1655
+ };
1656
+ readonly disabled: {
1657
+ readonly type: "boolean";
1658
+ readonly default: false;
1659
+ readonly reflect: true;
1660
+ readonly description: "Disable all controls.";
1661
+ };
1662
+ };
1663
+ readonly events: {
1664
+ readonly change: {
1665
+ readonly description: "Proposes a different page after enabled user activation.";
1666
+ readonly detail: "PaginationChangeDetail";
1667
+ readonly names: {
1668
+ readonly dom: "cosm-change";
1669
+ readonly react: "onChange";
1670
+ readonly angular: "pageChange";
1671
+ readonly native: "onPageChange";
1672
+ };
1673
+ };
1674
+ };
1675
+ readonly states: readonly [{
1676
+ readonly prop: "page";
1677
+ readonly event: "change";
1678
+ readonly defaultProp: "defaultPage";
1679
+ }];
1680
+ readonly slots: {};
1681
+ readonly parts: {
1682
+ readonly base: "Navigation landmark.";
1683
+ readonly control: "Navigation control.";
1684
+ readonly page: "Page control.";
1685
+ readonly current: "Current page control.";
1686
+ readonly ellipsis: "Decorative omitted-page indicator.";
1687
+ readonly summary: "Compact summary.";
1688
+ };
1689
+ readonly cssProperties: {
1690
+ readonly '--cosm-pagination-gap': "Gap between controls.";
1691
+ readonly '--cosm-pagination-min-height': "Minimum control height.";
1692
+ readonly '--cosm-pagination-radius': "Control corner radius.";
1693
+ readonly '--cosm-pagination-current-background': "Current page background.";
1694
+ readonly '--cosm-pagination-current-color': "Current page foreground.";
1695
+ readonly '--cosm-pagination-current-border': "Current page border color.";
1696
+ };
1697
+ readonly keyboard: readonly [{
1698
+ readonly keys: readonly ["Tab", "Shift+Tab"];
1699
+ readonly action: "Moves between enabled controls.";
1700
+ }, {
1701
+ readonly keys: readonly ["Enter", "Space"];
1702
+ readonly action: "Activates the focused control.";
1703
+ }];
1704
+ };
1705
+ readonly dialog: {
1706
+ readonly name: "dialog";
1707
+ readonly tag: "cosm-dialog";
1708
+ readonly description: "Modal content with a title, actions and cancelable close requests.";
1709
+ readonly role: "dialog";
1710
+ readonly pattern: "https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/";
1711
+ readonly props: {
1712
+ readonly open: {
1713
+ readonly type: "boolean";
1714
+ readonly default: false;
1715
+ readonly reflect: true;
1716
+ readonly description: "Committed visibility; supplying this prop, including false, controls state.";
1717
+ };
1718
+ readonly defaultOpen: {
1719
+ readonly type: "boolean";
1720
+ readonly default: false;
1721
+ readonly description: "Initial autonomous visibility; subsequent changes do not reset state.";
1722
+ };
1723
+ readonly presentation: {
1724
+ readonly type: "enum";
1725
+ readonly values: readonly ["standard", "fullscreen"];
1726
+ readonly default: "standard";
1727
+ readonly reflect: true;
1728
+ readonly description: "Centered standard surface or fullscreen surface.";
1729
+ };
1730
+ readonly size: {
1731
+ readonly type: "enum";
1732
+ readonly values: readonly ["sm", "md", "lg"];
1733
+ readonly default: "md";
1734
+ readonly reflect: true;
1735
+ readonly description: "Maximum standard width: sm 400, md 640, lg 960 pixels or logical points.";
1736
+ };
1737
+ readonly responsiveFullscreen: {
1738
+ readonly type: "boolean";
1739
+ readonly default: false;
1740
+ readonly description: "Use fullscreen when available viewport width is below 640 pixels or logical points.";
1741
+ };
1742
+ readonly closeLabel: {
1743
+ readonly type: "string";
1744
+ readonly default: "Close";
1745
+ readonly description: "Non-empty localized accessible name of the built-in close button.";
1746
+ };
1747
+ readonly closeOnEscape: {
1748
+ readonly type: "boolean";
1749
+ readonly default: true;
1750
+ readonly platforms: readonly ["web", "react", "angular"];
1751
+ readonly description: "Request closure on unhandled Escape on web.";
1752
+ };
1753
+ readonly closeOnAndroidBack: {
1754
+ readonly type: "boolean";
1755
+ readonly default: true;
1756
+ readonly platforms: readonly ["native"];
1757
+ readonly description: "Request closure on Android Back; consume Back even if the request is canceled.";
1758
+ };
1759
+ readonly closeOnBackdropPress: {
1760
+ readonly type: "boolean";
1761
+ readonly default: false;
1762
+ readonly description: "Request closure when the backdrop itself is pressed.";
1763
+ };
1764
+ readonly initialFocusTarget: {
1765
+ readonly type: "reference";
1766
+ readonly reference: "DialogFocusTarget";
1767
+ readonly description: "Optional platform focus target used on committed opening; it must be inside the dialog.";
1768
+ };
1769
+ readonly returnFocusTarget: {
1770
+ readonly type: "reference";
1771
+ readonly reference: "DialogFocusTarget";
1772
+ readonly description: "Optional platform focus target used after committed closure.";
1773
+ };
1774
+ };
1775
+ readonly events: {
1776
+ readonly openChange: {
1777
+ readonly description: "Proposes opening or closing; only closing is synchronously cancelable.";
1778
+ readonly detail: "DialogOpenChangeDetail";
1779
+ readonly cancelable: true;
1780
+ readonly names: {
1781
+ readonly dom: "cosm-open-change";
1782
+ readonly react: "onOpenChange";
1783
+ readonly angular: "openChange";
1784
+ readonly native: "onOpenChange";
1785
+ };
1786
+ };
1787
+ };
1788
+ readonly states: readonly [{
1789
+ readonly prop: "open";
1790
+ readonly event: "openChange";
1791
+ readonly defaultProp: "defaultOpen";
1792
+ }];
1793
+ readonly slots: {
1794
+ readonly title: "Required accessible title content.";
1795
+ readonly description: "Optional short accessible description.";
1796
+ readonly '': "Scrollable body content.";
1797
+ readonly actions: "Consumer-supplied actions.";
1798
+ };
1799
+ readonly parts: {
1800
+ readonly backdrop: "Modal backdrop.";
1801
+ readonly base: "Dialog surface.";
1802
+ readonly header: "Title and close control area.";
1803
+ readonly title: "Title container.";
1804
+ readonly description: "Description container.";
1805
+ readonly body: "Scrollable body.";
1806
+ readonly actions: "Actions container.";
1807
+ readonly close: "Close IconButton.";
1808
+ };
1809
+ readonly cssProperties: {
1810
+ readonly '--cosm-dialog-z-index': "Modal stacking level.";
1811
+ readonly '--cosm-dialog-max-width': "Standard surface maximum width.";
1812
+ readonly '--cosm-dialog-backdrop': "Backdrop background.";
1813
+ readonly '--cosm-dialog-surface': "Surface background.";
1814
+ readonly '--cosm-dialog-border': "Surface border.";
1815
+ readonly '--cosm-dialog-radius': "Surface radius.";
1816
+ readonly '--cosm-dialog-shadow': "Surface shadow.";
1817
+ readonly '--cosm-dialog-padding': "Section spacing.";
1818
+ };
1819
+ readonly keyboard: readonly [{
1820
+ readonly keys: readonly ["Escape"];
1821
+ readonly action: "On web request close unless handled by a child or disabled.";
1822
+ }, {
1823
+ readonly keys: readonly ["Tab", "Shift+Tab"];
1824
+ readonly action: "Keep keyboard focus inside the modal.";
1825
+ }, {
1826
+ readonly keys: readonly ["Android Back"];
1827
+ readonly action: "On Android request close unless disabled.";
1828
+ }];
165
1829
  };
166
1830
  };
1831
+ export { badgeContract } from './specs/badge.js';
1832
+ export { type BadgeScenario, badgeScenarios, badgeScenariosFor, } from './specs/badge.scenarios.js';
1833
+ export { type CalendarChangeDetail, calendarContract } from './specs/calendar.js';
1834
+ export { type CalendarAction, type CalendarKey, type CalendarScenario, calendarScenarios, calendarScenariosFor, } from './specs/calendar.scenarios.js';
1835
+ export { type CheckboxCheckedChangeDetail, checkboxContract, } from './specs/checkbox.js';
1836
+ export { type CheckboxAction, type CheckboxScenario, checkboxScenarios, checkboxScenariosFor, } from './specs/checkbox.scenarios.js';
1837
+ export { type DialogCloseReason, type DialogHandle, type DialogOpenChangeDetail, type DialogReferences, type DialogSize, dialogContract, } from './specs/dialog.js';
1838
+ export { type DialogAction, type DialogLayoutScenario, type DialogScenario, dialogLayoutScenarios, dialogScenarios, dialogScenariosFor, } from './specs/dialog.scenarios.js';
167
1839
  export { iconContract } from './specs/icon.js';
168
1840
  export { type IconScenario, iconScenarios, iconScenariosFor, } from './specs/icon.scenarios.js';
1841
+ export { type IconButtonPressDetail, type IconButtonPressedChangeDetail, iconButtonContract, } from './specs/icon-button.js';
1842
+ export { type IconButtonAction, type IconButtonScenario, iconButtonScenarios, iconButtonScenariosFor, } from './specs/icon-button.scenarios.js';
1843
+ export { type ListboxGroup, type ListboxItem, type ListboxOption, type ListboxSelectionChangeDetail, type ListboxSelectionMode, listboxContract, } from './specs/listbox.js';
1844
+ export { type ListboxAction, type ListboxScenario, listboxScenarioItems, listboxScenarios, listboxScenariosFor, } from './specs/listbox.scenarios.js';
1845
+ export { type PaginationChangeDetail, paginationContract } from './specs/pagination.js';
1846
+ export { type PaginationScenario, paginationScenarios, paginationScenariosFor, } from './specs/pagination.scenarios.js';
1847
+ export { type PopoverAlign, type PopoverCloseReason, type PopoverHandle, type PopoverOpenChangeDetail, type PopoverSide, popoverContract, } from './specs/popover.js';
1848
+ export { type PopoverAction, type PopoverChangeExpectation, type PopoverScenario, popoverScenarios, popoverScenariosFor, } from './specs/popover.scenarios.js';
1849
+ export { type RadioGroupChangeDetail, type RadioGroupOption, type RadioGroupOptions, type RadioGroupReferences, type RadioGroupValue, radioGroupContract, } from './specs/radio-group.js';
1850
+ export { type RadioGroupAction, type RadioGroupScenario, radioGroupScenarioOptions, radioGroupScenarios, radioGroupScenariosFor, } from './specs/radio-group.scenarios.js';
1851
+ export { type SelectChangeDetail, type SelectItems, type SelectOption, type SelectReferences, type SelectValue, selectContract, } from './specs/select.js';
1852
+ export { type SelectAction, type SelectScenario, selectScenarioItems, selectScenarios, selectScenariosFor, } from './specs/select.scenarios.js';
1853
+ export { type SwitchCheckedChangeDetail, switchContract, } from './specs/switch.js';
1854
+ export { type SwitchAction, type SwitchScenario, switchScenarios, switchScenariosFor, } from './specs/switch.scenarios.js';
1855
+ export { type TextFieldChangeDetail, type TextFieldSubmitDetail, textFieldContract, } from './specs/text-field.js';
1856
+ export { type TextFieldAction, type TextFieldScenario, textFieldScenarios, textFieldScenariosFor, } from './specs/text-field.scenarios.js';
1857
+ export { type TextareaChangeDetail, textareaContract } from './specs/textarea.js';
1858
+ export { type TextareaAction, type TextareaScenario, textareaScenarios, textareaScenariosFor, } from './specs/textarea.scenarios.js';
169
1859
  //# sourceMappingURL=index.d.ts.map