@joralvmel/cosmos-mcp 0.1.2 → 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.
- package/dist/data/docs.json +1 -1
- package/dist/data/llms/angular.md +350 -20
- package/dist/data/llms/core.md +550 -21
- package/dist/data/llms/elements.md +306 -20
- package/dist/data/llms/native.md +324 -23
- package/dist/data/llms/react.md +324 -20
- package/dist/data/llms/tailwind.md +1 -1
- package/dist/data/llms/tokens.md +1 -1
- package/dist/data/status.json +1 -1
- package/package.json +3 -3
package/dist/data/llms/core.md
CHANGED
|
@@ -67,17 +67,15 @@ Triggers an action or submits a form.
|
|
|
67
67
|
|
|
68
68
|
### `icon` (`<cosm-icon>`)
|
|
69
69
|
|
|
70
|
-
Renders a structured SVG icon.
|
|
70
|
+
Renders a structured SVG icon. Icons are decorative and hidden from assistive technology unless a nonempty label makes them informative.
|
|
71
71
|
|
|
72
72
|
| Prop | Type | Default | Description |
|
|
73
73
|
| --- | --- | --- | --- |
|
|
74
74
|
| `icon` | IconDefinition | Required | Structured icon definition, commonly imported from @joralvmel/cosmos-icons. |
|
|
75
75
|
| `size` | 'sm' \| 'md' \| 'lg' \| number | `md` | Semantic size (16, 20 or 24) or a positive finite number in pixels / native units. |
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `label` | string | — | Accessible name required when decorative is false. |
|
|
80
|
-
| `decorative` | boolean | `true` | Hides the icon from assistive technology when true. |
|
|
76
|
+
| `variant` | 'outline' \| 'filled' | `outline` | 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. |
|
|
77
|
+
| `color` | string | `currentColor` | 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. |
|
|
78
|
+
| `label` | string | — | Accessible name. A nonempty label makes the icon an informative image; without one the icon is decorative and hidden from assistive technology. |
|
|
81
79
|
|
|
82
80
|
**Events**
|
|
83
81
|
|
|
@@ -97,7 +95,7 @@ No events.
|
|
|
97
95
|
|
|
98
96
|
### `text-field` (`<cosm-text-field>`)
|
|
99
97
|
|
|
100
|
-
Accepts a single line of text with an accessible label, optional
|
|
98
|
+
Accepts a single line of text with an accessible label, optional helper and error text, and native form validation on the web.
|
|
101
99
|
|
|
102
100
|
| Prop | Type | Default | Description |
|
|
103
101
|
| --- | --- | --- | --- |
|
|
@@ -107,11 +105,11 @@ Accepts a single line of text with an accessible label, optional help and error
|
|
|
107
105
|
| `defaultValue` | string | `` | Initial value for autonomous use. Web form reset restores this value; it does not control subsequent edits. |
|
|
108
106
|
| `type` | 'text' \| 'email' \| 'password' \| 'tel' \| 'url' \| 'search' | `text` | Single-line input type. Native maps it to supported keyboard, autofill and secure-entry behavior. |
|
|
109
107
|
| `variant` | 'outlined' \| 'filled' | `outlined` | Visual treatment of the editable control. |
|
|
110
|
-
| `size` | 'sm' \| 'md' \| 'lg'
|
|
108
|
+
| `size` | 'sm' \| 'md' \| 'lg' | `md` | Small, medium or large editable control. |
|
|
111
109
|
| `placeholder` | string | — | Short input hint; it never replaces the accessible label. |
|
|
112
|
-
| `
|
|
113
|
-
| `
|
|
114
|
-
| `invalid` | boolean | `false` | External invalid state, independent of browser constraints or consumer business validation. |
|
|
110
|
+
| `helperText` | string | — | Optional supporting text associated with the editable control. |
|
|
111
|
+
| `errorText` | string | — | Optional consumer-localized error text associated with the editable control; a nonempty trimmed value also exposes invalid state. |
|
|
112
|
+
| `invalid` | boolean | `false` | External invalid state when the visible error is supplied elsewhere, independent of browser constraints or consumer business validation. |
|
|
115
113
|
| `required` | boolean | `false` | Exposes required semantics. On web, participates in native HTML constraint validation. |
|
|
116
114
|
| `disabled` | boolean | `false` | Disables editing and interaction. On web, follows disabled fieldsets and excludes the value from form submission. |
|
|
117
115
|
| `readOnly` | boolean | `false` | Prevents editing while remaining focusable and form-submittable on web; distinct from disabled. |
|
|
@@ -123,7 +121,6 @@ Accepts a single line of text with an accessible label, optional help and error
|
|
|
123
121
|
| `inputMode` | 'none' \| 'text' \| 'decimal' \| 'numeric' \| 'tel' \| 'search' \| 'email' \| 'url' | — | Input or keyboard hint (none, text, decimal, numeric, tel, search, email or url); it does not add numeric or multiline field behavior. |
|
|
124
122
|
| `startIcon` | IconDefinition | — | Optional structured decorative icon before the editable text. |
|
|
125
123
|
| `endIcon` | IconDefinition | — | Optional structured decorative icon after the editable text. |
|
|
126
|
-
| `iconFocusScope` | 'control' \| 'input' | `control` | When configured icon focus colors apply: control includes the input and clear/reveal buttons; input includes only the editable input. Does not change icons without a focus-color override. |
|
|
127
124
|
| `prefix` | string | — | Optional non-interactive text decoration before the editable text. |
|
|
128
125
|
| `suffix` | string | — | Optional non-interactive text decoration after the editable text. |
|
|
129
126
|
| `clearable` | boolean | `false` | Shows a clear action for non-empty editable fields. Supply clearLabel when enabled. |
|
|
@@ -164,9 +161,7 @@ Accepts a single line of text with an accessible label, optional help and error
|
|
|
164
161
|
| `--cosm-text-field-focus` | Visible focus indicator color. |
|
|
165
162
|
| `--cosm-text-field-radius` | Editable control corner radius. |
|
|
166
163
|
| `--cosm-text-field-start-icon-color` | Start icon color, independent of text and affixes. |
|
|
167
|
-
| `--cosm-text-field-start-icon-focus-color` | Start icon color within iconFocusScope; falls back to its normal color. |
|
|
168
164
|
| `--cosm-text-field-end-icon-color` | End icon color, independent of text and affixes. |
|
|
169
|
-
| `--cosm-text-field-end-icon-focus-color` | End icon color within iconFocusScope; falls back to its normal color. |
|
|
170
165
|
|
|
171
166
|
**Keyboard**
|
|
172
167
|
|
|
@@ -238,16 +233,11 @@ Non-modal content anchored to a consumer trigger, with cancelable close requests
|
|
|
238
233
|
| `triggerMode` | 'press' \| 'hover' | `press` | 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. |
|
|
239
234
|
| `closable` | boolean | `false` | Shows a built-in IconButton with an X. Requests a cancelable close with reason close-button. |
|
|
240
235
|
| `closeLabel` | string | `Close` | Localized accessible name of the close button. Must be non-empty when closable is true. |
|
|
241
|
-
| `gap` | number | `8` | Non-negative finite distance from trigger to panel, or to the arrow tip. CSS pixels on web, logical units on native. Viewport/safe-area collision handling takes priority. |
|
|
242
236
|
| `arrow` | boolean | `false` | 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. |
|
|
243
237
|
| `closeOnEscape` | boolean | `true` | Requests closure on unhandled Escape on web and React Native Web. Native Android and iOS hardware Escape is not supported. |
|
|
244
238
|
| `closeOnOutsidePress` | boolean | `true` | Requests closure on an outside press without preventing its interaction or restoring trigger focus. |
|
|
245
|
-
| `
|
|
246
|
-
| `restoreFocus` | boolean | `true` | After committed trigger, Escape, action or Back closure, restore focus only if still inside the panel and the trigger is connected and focusable. Never steal outside focus, restore after outside press, or restore for unsolicited prop closure. |
|
|
247
|
-
| `side` | 'top' \| 'right' \| 'bottom' \| 'left' | `bottom` | Requested physical side; actual placement may flip. Recompute for trigger/panel size, viewport/safe-area, scrolling and orientation changes. |
|
|
239
|
+
| `side` | 'top' \| 'right' \| 'bottom' \| 'left' | `bottom` | Requested physical side; actual placement flips to the opposite side when that reduces viewport/safe-area overflow, then shifts within bounds. |
|
|
248
240
|
| `align` | 'start' \| 'center' \| 'end' | `center` | Cross-axis alignment. On top/bottom, start/end follow inline direction (RTL reverses them); on left/right they mean top/bottom. |
|
|
249
|
-
| `flip` | boolean | `true` | Try the opposite side when the requested side overflows the available viewport/safe area; flip only if it reduces main-axis overflow. Ties keep the requested side. Runs before shift. |
|
|
250
|
-
| `shift` | boolean | `true` | After flip, translate within available viewport/safe-area bounds to reduce overflow. Constrain oversized panels to that region regardless of collision flags; flags never change requested props. |
|
|
251
241
|
|
|
252
242
|
**Events**
|
|
253
243
|
|
|
@@ -303,7 +293,7 @@ Selects one or more values from a named vertical collection, with groups, descri
|
|
|
303
293
|
| `selectedValues` | ListboxValues | — | 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. |
|
|
304
294
|
| `defaultSelectedValues` | ListboxValues | — | Initial autonomous selected values (empty by default). Later changes do not reset selection. |
|
|
305
295
|
| `variant` | 'plain' \| 'outlined' | `plain` | Plain composes inside a panel; outlined adds a standalone container boundary. |
|
|
306
|
-
| `size` | 'sm' \| 'md' \| 'lg'
|
|
296
|
+
| `size` | 'sm' \| 'md' \| 'lg' | `md` | Small, medium or large option rows. Content may grow; native touch targets remain at least 44. |
|
|
307
297
|
| `disabled` | boolean | `false` | Prevents interaction and removes the list from keyboard navigation. |
|
|
308
298
|
| `readOnly` | boolean | `false` | Allows exploring options without proposing or committing selection changes. |
|
|
309
299
|
| `locale` | string | — | BCP 47 locale for typeahead. Web inherits the nearest language; native uses the runtime locale when omitted. Invalid locale identifiers are rejected. |
|
|
@@ -357,6 +347,545 @@ Selects one or more values from a named vertical collection, with groups, descri
|
|
|
357
347
|
| `Enter`, `Space` | Selects the focused option; multiple mode toggles it. Read-only never changes selection. |
|
|
358
348
|
| `Printable characters` | Moves focus to a matching option using locale-aware typeahead without filtering. |
|
|
359
349
|
|
|
350
|
+
### `checkbox` (`<cosm-checkbox>`)
|
|
351
|
+
|
|
352
|
+
Selects an independent boolean value with accessible labeling and native form behavior on the web.
|
|
353
|
+
|
|
354
|
+
| Prop | Type | Default | Description |
|
|
355
|
+
| --- | --- | --- | --- |
|
|
356
|
+
| `label` | string | Required | Required accessible name, visible unless labelHidden is true. |
|
|
357
|
+
| `labelHidden` | boolean | `false` | Visually hides the label while keeping it available to assistive technology. |
|
|
358
|
+
| `checked` | boolean | `false` | Controlled checked value when supplied, including false; activation proposes changes without self-committing. |
|
|
359
|
+
| `defaultChecked` | boolean | `false` | Initial autonomous checked value; later changes do not reset it. |
|
|
360
|
+
| `indeterminate` | boolean | `false` | Presentation-only mixed state. Autonomous activation clears it; controlled use leaves it to the owner. |
|
|
361
|
+
| `size` | 'sm' \| 'md' \| 'lg' | `md` | Small, medium or large visual box. |
|
|
362
|
+
| `disabled` | boolean | `false` | Prevents user interaction and excludes the value from web form submission. |
|
|
363
|
+
| `required` | boolean | `false` | Exposes required semantics and participates in native web form validation. Native has no automatic validation. |
|
|
364
|
+
| `invalid` | boolean | `false` | Externally supplied invalid presentation state when the visible error is supplied elsewhere; web form validity remains based on required. |
|
|
365
|
+
| `helperText` | string | — | Optional consumer-localized supporting text associated with the checkbox. |
|
|
366
|
+
| `errorText` | string | — | Optional consumer-localized error description; a nonempty trimmed value also exposes invalid state. |
|
|
367
|
+
| `name` | string | — | Web form field name; React Native has no HTML form association. |
|
|
368
|
+
| `value` | string | `on` | Web form value submitted when checked and enabled; defaults to on. Angular Forms uses checked as its boolean value. |
|
|
369
|
+
|
|
370
|
+
**Events**
|
|
371
|
+
|
|
372
|
+
| DOM | React | Angular | React Native | Detail | Description |
|
|
373
|
+
| --- | --- | --- | --- | --- | --- |
|
|
374
|
+
| `cosm-checked-change` | `onCheckedChange` | `(checkedChange)` | `onCheckedChange` | `CheckboxCheckedChangeDetail` | Proposes the next checked value after enabled user activation; controlled state waits for the owner. |
|
|
375
|
+
|
|
376
|
+
**Slots**
|
|
377
|
+
|
|
378
|
+
| Name | Description |
|
|
379
|
+
| --- | --- |
|
|
380
|
+
| `(default)` | Optional noninteractive inline label content; links and buttons are not allowed. |
|
|
381
|
+
|
|
382
|
+
**CSS parts**
|
|
383
|
+
|
|
384
|
+
| Name | Description |
|
|
385
|
+
| --- | --- |
|
|
386
|
+
| `base` | The label and visual checkbox control. |
|
|
387
|
+
| `input` | The native checkbox input and web focus target. |
|
|
388
|
+
| `box` | The visible checkbox box and indicator. |
|
|
389
|
+
| `label` | Visible or visually hidden label text. |
|
|
390
|
+
| `help-text` | Supporting text associated with the checkbox. |
|
|
391
|
+
| `error-text` | Error description associated with the checkbox. |
|
|
392
|
+
|
|
393
|
+
**CSS custom properties**
|
|
394
|
+
|
|
395
|
+
| Name | Description |
|
|
396
|
+
| --- | --- |
|
|
397
|
+
| `--cosm-checkbox-size` | Visual box width and height. |
|
|
398
|
+
| `--cosm-checkbox-background` | Unchecked box background. |
|
|
399
|
+
| `--cosm-checkbox-checked-background` | Checked and mixed box background. |
|
|
400
|
+
| `--cosm-checkbox-color` | Checked indicator foreground. |
|
|
401
|
+
| `--cosm-checkbox-border` | Box boundary color. |
|
|
402
|
+
| `--cosm-checkbox-radius` | Box corner radius. |
|
|
403
|
+
| `--cosm-checkbox-focus` | Visible keyboard focus indicator color. |
|
|
404
|
+
| `--cosm-checkbox-gap` | Space between the box and label. |
|
|
405
|
+
|
|
406
|
+
**Keyboard**
|
|
407
|
+
|
|
408
|
+
| Keys | Action |
|
|
409
|
+
| --- | --- |
|
|
410
|
+
| `Tab`, `Shift+Tab` | Moves focus to or from the enabled checkbox. |
|
|
411
|
+
| `Space` | Toggles checked state and emits a checkedChange proposal. |
|
|
412
|
+
|
|
413
|
+
### `switch` (`<cosm-switch>`)
|
|
414
|
+
|
|
415
|
+
Toggles a binary setting immediately with a stable accessible name and form behavior on the web.
|
|
416
|
+
|
|
417
|
+
| Prop | Type | Default | Description |
|
|
418
|
+
| --- | --- | --- | --- |
|
|
419
|
+
| `label` | string | Required | Required nonempty accessible name; remains stable in both states. |
|
|
420
|
+
| `labelHidden` | boolean | `false` | Visually hides the label while retaining its accessible name. |
|
|
421
|
+
| `checked` | boolean | `false` | Controlled checked value when supplied, including false; activation proposes changes without self-committing. |
|
|
422
|
+
| `defaultChecked` | boolean | `false` | Initial autonomous checked value; later changes do not reset it. |
|
|
423
|
+
| `size` | 'sm' \| 'md' \| 'lg' | `md` | Small, medium or large web switch. Native uses system Switch sizing. |
|
|
424
|
+
| `disabled` | boolean | `false` | Prevents user interaction and excludes the value from web form submission. |
|
|
425
|
+
| `invalid` | boolean | `false` | Externally supplied invalid presentation. Does not change checked state or form validity; native uses danger colors without an equivalent system invalid trait. |
|
|
426
|
+
| `helperText` | string | — | Optional consumer-localized supporting text associated with the switch. |
|
|
427
|
+
| `name` | string | — | Web form field name; React Native has no HTML form association. |
|
|
428
|
+
| `value` | string | `on` | Web form value submitted when checked and enabled; defaults to on. Angular Forms uses checked as its boolean value. |
|
|
429
|
+
|
|
430
|
+
**Events**
|
|
431
|
+
|
|
432
|
+
| DOM | React | Angular | React Native | Detail | Description |
|
|
433
|
+
| --- | --- | --- | --- | --- | --- |
|
|
434
|
+
| `cosm-checked-change` | `onCheckedChange` | `(checkedChange)` | `onCheckedChange` | `SwitchCheckedChangeDetail` | Proposes the next checked value after enabled user activation; controlled state waits for the owner. |
|
|
435
|
+
|
|
436
|
+
**CSS parts**
|
|
437
|
+
|
|
438
|
+
| Name | Description |
|
|
439
|
+
| --- | --- |
|
|
440
|
+
| `base` | Label, control and supporting text layout. |
|
|
441
|
+
| `input` | Native checkbox input and web focus target. |
|
|
442
|
+
| `track` | Visible switch track. |
|
|
443
|
+
| `thumb` | Visible switch thumb. |
|
|
444
|
+
| `label` | Visible or visually hidden label text. |
|
|
445
|
+
| `help-text` | Supporting text associated with the switch. |
|
|
446
|
+
|
|
447
|
+
**CSS custom properties**
|
|
448
|
+
|
|
449
|
+
| Name | Description |
|
|
450
|
+
| --- | --- |
|
|
451
|
+
| `--cosm-switch-width` | Track width. |
|
|
452
|
+
| `--cosm-switch-height` | Track height. |
|
|
453
|
+
| `--cosm-switch-thumb-size` | Thumb diameter. |
|
|
454
|
+
| `--cosm-switch-track-background` | Unchecked track background. |
|
|
455
|
+
| `--cosm-switch-checked-track-background` | Checked track background. |
|
|
456
|
+
| `--cosm-switch-thumb-background` | Thumb background. |
|
|
457
|
+
| `--cosm-switch-border` | Unchecked track boundary color. |
|
|
458
|
+
| `--cosm-switch-radius` | Track corner radius. |
|
|
459
|
+
| `--cosm-switch-gap` | Space between the switch and label. |
|
|
460
|
+
| `--cosm-switch-focus` | Visible keyboard focus indicator color. |
|
|
461
|
+
|
|
462
|
+
**Keyboard**
|
|
463
|
+
|
|
464
|
+
| Keys | Action |
|
|
465
|
+
| --- | --- |
|
|
466
|
+
| `Tab`, `Shift+Tab` | Moves focus to or from the enabled switch. |
|
|
467
|
+
| `Space` | Toggles checked state and emits a checkedChange proposal. |
|
|
468
|
+
|
|
469
|
+
### `badge` (`<cosm-badge>`)
|
|
470
|
+
|
|
471
|
+
Displays a noninteractive status or category label, or caller-formatted count, with an optional decorative leading icon.
|
|
472
|
+
|
|
473
|
+
| Prop | Type | Default | Description |
|
|
474
|
+
| --- | --- | --- | --- |
|
|
475
|
+
| `variant` | 'soft' \| 'solid' \| 'outline' | `soft` | Visual treatment of the static label. |
|
|
476
|
+
| `tone` | 'neutral' \| 'info' \| 'success' \| 'warning' \| 'danger' | `neutral` | Semantic color intent of the static label. |
|
|
477
|
+
| `size` | 'sm' \| 'md' \| 'lg' | `md` | Semantic label size. |
|
|
478
|
+
| `startIcon` | IconDefinition | — | Optional structured decorative icon before the label. |
|
|
479
|
+
|
|
480
|
+
**Events**
|
|
481
|
+
|
|
482
|
+
No events.
|
|
483
|
+
|
|
484
|
+
**Slots**
|
|
485
|
+
|
|
486
|
+
| Name | Description |
|
|
487
|
+
| --- | --- |
|
|
488
|
+
| `(default)` | Label or caller-formatted count text. |
|
|
489
|
+
|
|
490
|
+
**CSS parts**
|
|
491
|
+
|
|
492
|
+
| Name | Description |
|
|
493
|
+
| --- | --- |
|
|
494
|
+
| `base` | Rounded label container. |
|
|
495
|
+
| `label` | Label or caller-formatted count text. |
|
|
496
|
+
| `icon` | Optional decorative leading icon wrapper. |
|
|
497
|
+
|
|
498
|
+
**CSS custom properties**
|
|
499
|
+
|
|
500
|
+
| Name | Description |
|
|
501
|
+
| --- | --- |
|
|
502
|
+
| `--cosm-badge-background` | Badge background color. |
|
|
503
|
+
| `--cosm-badge-color` | Badge text and icon color. |
|
|
504
|
+
| `--cosm-badge-border` | Badge border color. |
|
|
505
|
+
| `--cosm-badge-padding-inline` | Badge inline padding. |
|
|
506
|
+
| `--cosm-badge-padding-block` | Badge block padding. |
|
|
507
|
+
| `--cosm-badge-gap` | Space between the icon and label. |
|
|
508
|
+
| `--cosm-badge-font-family` | Badge label font family. |
|
|
509
|
+
| `--cosm-badge-font-size` | Badge label font size. |
|
|
510
|
+
| `--cosm-badge-font-weight` | Badge label font weight. |
|
|
511
|
+
| `--cosm-badge-line-height` | Badge label line height. |
|
|
512
|
+
| `--cosm-badge-radius` | Badge corner radius. |
|
|
513
|
+
|
|
514
|
+
### `calendar` (`<cosm-calendar>`)
|
|
515
|
+
|
|
516
|
+
Selects one Gregorian date from an inline, localized calendar with keyboard navigation and optional bounds. Month and year can be selected directly.
|
|
517
|
+
|
|
518
|
+
| Prop | Type | Default | Description |
|
|
519
|
+
| --- | --- | --- | --- |
|
|
520
|
+
| `value` | string | — | Controlled selected date in YYYY-MM-DD format; when supplied, selection proposals wait for the owner to update this value. |
|
|
521
|
+
| `defaultValue` | string | — | Initial autonomous selected date in YYYY-MM-DD format; later changes do not reset selection. |
|
|
522
|
+
| `min` | string | — | Earliest selectable date in YYYY-MM-DD format, inclusive. |
|
|
523
|
+
| `max` | string | — | Latest selectable date in YYYY-MM-DD format, inclusive. |
|
|
524
|
+
| `locale` | string | — | BCP 47 locale for month and weekday names, week start, and text direction; defaults to the environment locale. Invalid locale identifiers are rejected. |
|
|
525
|
+
| `disabled` | boolean | `false` | Disables date selection and calendar navigation. |
|
|
526
|
+
|
|
527
|
+
**Events**
|
|
528
|
+
|
|
529
|
+
| DOM | React | Angular | React Native | Detail | Description |
|
|
530
|
+
| --- | --- | --- | --- | --- | --- |
|
|
531
|
+
| `cosm-change` | `onChange` | `(valueChange)` | `onValueChange` | `CalendarChangeDetail` | Proposes an enabled selected date as a YYYY-MM-DD value; autonomous selection commits and controlled selection waits for the owner. |
|
|
532
|
+
|
|
533
|
+
**CSS parts**
|
|
534
|
+
|
|
535
|
+
| Name | Description |
|
|
536
|
+
| --- | --- |
|
|
537
|
+
| `base` | Calendar root. |
|
|
538
|
+
| `header` | Month heading and navigation controls. |
|
|
539
|
+
| `previous` | Previous-month navigation button. |
|
|
540
|
+
| `heading` | Localized month and year heading. |
|
|
541
|
+
| `next` | Next-month navigation button. |
|
|
542
|
+
| `weekday` | Localized weekday heading. |
|
|
543
|
+
| `grid` | Seven-column date grid. |
|
|
544
|
+
| `day` | Date button, including adjacent-month dates. |
|
|
545
|
+
| `month-trigger` | Button that opens direct month selection. |
|
|
546
|
+
| `year-trigger` | Button that opens direct year selection. |
|
|
547
|
+
| `month-option` | Month choice in the month selection view. |
|
|
548
|
+
| `year-option` | Year choice in the year selection view. |
|
|
549
|
+
|
|
550
|
+
**CSS custom properties**
|
|
551
|
+
|
|
552
|
+
| Name | Description |
|
|
553
|
+
| --- | --- |
|
|
554
|
+
| `--cosm-calendar-background` | Calendar surface background. |
|
|
555
|
+
| `--cosm-calendar-color` | Primary calendar text color. |
|
|
556
|
+
| `--cosm-calendar-muted-color` | Adjacent-month and weekday text color. |
|
|
557
|
+
| `--cosm-calendar-selected-background` | Selected-date background. |
|
|
558
|
+
| `--cosm-calendar-selected-color` | Selected-date text color. |
|
|
559
|
+
| `--cosm-calendar-day-size` | Minimum date target dimensions. |
|
|
560
|
+
| `--cosm-calendar-gap` | Space between date targets. |
|
|
561
|
+
| `--cosm-calendar-radius` | Date target corner radius. |
|
|
562
|
+
| `--cosm-calendar-focus` | Visible keyboard focus indicator color. |
|
|
563
|
+
| `--cosm-calendar-today-border` | Non-color-only today marker. |
|
|
564
|
+
|
|
565
|
+
**Keyboard**
|
|
566
|
+
|
|
567
|
+
| Keys | Action |
|
|
568
|
+
| --- | --- |
|
|
569
|
+
| `Tab`, `Shift+Tab` | Moves between the navigation controls and one active date. |
|
|
570
|
+
| `ArrowLeft`, `ArrowRight` | Moves the active date by one day; direction follows the visual RTL/LTR order. |
|
|
571
|
+
| `ArrowUp`, `ArrowDown` | Moves the active date by one week. |
|
|
572
|
+
| `Home`, `End` | Moves to the first or last day of the localized week. |
|
|
573
|
+
| `PageUp`, `PageDown` | Moves the active date by one month. |
|
|
574
|
+
| `Shift+PageUp`, `Shift+PageDown` | Moves the active date by one year. |
|
|
575
|
+
| `Enter`, `Space` | Proposes selection of the active enabled date. |
|
|
576
|
+
|
|
577
|
+
### `textarea` (`<cosm-textarea>`)
|
|
578
|
+
|
|
579
|
+
Accepts multiline plain text with an accessible label, optional helper and error text, and native form behavior on the web.
|
|
580
|
+
|
|
581
|
+
| Prop | Type | Default | Description |
|
|
582
|
+
| --- | --- | --- | --- |
|
|
583
|
+
| `label` | string | Required | Accessible name for the editable control. It is rendered above the control unless visually hidden. |
|
|
584
|
+
| `labelHidden` | boolean | `false` | Visually hides the label while keeping it available to assistive technology. |
|
|
585
|
+
| `value` | string | — | Current text. When bound, edits are proposals and the component waits for the owner to supply the accepted value. |
|
|
586
|
+
| `defaultValue` | string | `` | Initial value for autonomous use. Web form reset restores this value; it does not control subsequent edits. |
|
|
587
|
+
| `rows` | number | `4` | Visible line count of the multiline editor. It is independent of the visual size. |
|
|
588
|
+
| `variant` | 'outlined' \| 'filled' | `outlined` | Visual treatment of the editable control. |
|
|
589
|
+
| `size` | 'sm' \| 'md' \| 'lg' | `md` | Visual size of the editable control, independent of rows. |
|
|
590
|
+
| `placeholder` | string | — | Short input hint; it never replaces the accessible label. |
|
|
591
|
+
| `helperText` | string | — | Optional supporting text associated with the editable control. |
|
|
592
|
+
| `errorText` | string | — | Optional consumer-localized error text associated with the editable control; a nonempty trimmed value also exposes invalid state. |
|
|
593
|
+
| `invalid` | boolean | `false` | External invalid state when the visible error is supplied elsewhere, independent of browser constraints or consumer business validation. |
|
|
594
|
+
| `required` | boolean | `false` | Exposes required semantics. On web, participates in native HTML constraint validation. |
|
|
595
|
+
| `disabled` | boolean | `false` | Disables editing and interaction. On web, follows disabled fieldsets and excludes the value from form submission. |
|
|
596
|
+
| `readOnly` | boolean | `false` | Prevents editing while remaining focusable and form-submittable on web; distinct from disabled. |
|
|
597
|
+
| `maxLength` | number | — | Maximum number of characters. Web uses native HTML length constraints and native applies supported input limits. |
|
|
598
|
+
| `name` | string | — | Form field name on web. React Native has no HTML form association or name-based submission. |
|
|
599
|
+
|
|
600
|
+
**Events**
|
|
601
|
+
|
|
602
|
+
| DOM | React | Angular | React Native | Detail | Description |
|
|
603
|
+
| --- | --- | --- | --- | --- | --- |
|
|
604
|
+
| `cosm-change` | `onChange` | `(valueChange)` | `onValueChange` | `TextareaChangeDetail` | Proposes the current text after each user edit; this is not a blur/commit event. |
|
|
605
|
+
|
|
606
|
+
**CSS parts**
|
|
607
|
+
|
|
608
|
+
| Name | Description |
|
|
609
|
+
| --- | --- |
|
|
610
|
+
| `label` | Accessible label above the control. |
|
|
611
|
+
| `control` | Visual control containing the editable textarea. |
|
|
612
|
+
| `textarea` | The native multiline editable textarea. |
|
|
613
|
+
| `help` | Supporting text associated with the editable textarea. |
|
|
614
|
+
| `error` | External or native-constraint error text associated with the editable textarea. |
|
|
615
|
+
|
|
616
|
+
**CSS custom properties**
|
|
617
|
+
|
|
618
|
+
| Name | Description |
|
|
619
|
+
| --- | --- |
|
|
620
|
+
| `--cosm-textarea-background` | Editable control background. |
|
|
621
|
+
| `--cosm-textarea-color` | Editable text color. |
|
|
622
|
+
| `--cosm-textarea-placeholder` | Placeholder text color. |
|
|
623
|
+
| `--cosm-textarea-border` | Editable control boundary color. |
|
|
624
|
+
| `--cosm-textarea-focus` | Visible focus indicator color. |
|
|
625
|
+
| `--cosm-textarea-radius` | Editable control corner radius. |
|
|
626
|
+
|
|
627
|
+
**Keyboard**
|
|
628
|
+
|
|
629
|
+
| Keys | Action |
|
|
630
|
+
| --- | --- |
|
|
631
|
+
| `Tab`, `Shift+Tab` | Moves focus to or from the enabled editable control. |
|
|
632
|
+
| `Enter` | Inserts a newline in the editable text. |
|
|
633
|
+
|
|
634
|
+
### `radio-group` (`<cosm-radio-group>`)
|
|
635
|
+
|
|
636
|
+
Selects one option from a labeled collection, with optional selection and native Web form behavior.
|
|
637
|
+
|
|
638
|
+
| Prop | Type | Default | Description |
|
|
639
|
+
| --- | --- | --- | --- |
|
|
640
|
+
| `label` | string | Required | Required visible accessible name for the group. |
|
|
641
|
+
| `options` | RadioGroupOptions | Required | Readonly flat options with unique nonempty values and labels, optional descriptions and disabled states. |
|
|
642
|
+
| `value` | RadioGroupValue | — | Controlled selected value; null means no selection, and a supplied null remains controlled. |
|
|
643
|
+
| `defaultValue` | RadioGroupValue | — | Initial autonomous selection; null by default. |
|
|
644
|
+
| `size` | 'sm' \| 'md' \| 'lg' | `md` | Small, medium or large radio indicator. |
|
|
645
|
+
| `orientation` | 'vertical' \| 'horizontal' | `vertical` | Vertical list or wrapping horizontal options. |
|
|
646
|
+
| `disabled` | boolean | `false` | Prevents interaction and excludes the value from Web form submission. |
|
|
647
|
+
| `required` | boolean | `false` | Requires a selection in Web form validation; Native exposes descriptive semantics. |
|
|
648
|
+
| `invalid` | boolean | `false` | Externally supplied invalid presentation state when the visible error is supplied elsewhere. |
|
|
649
|
+
| `helperText` | string | — | Optional supporting text associated with the group. |
|
|
650
|
+
| `errorText` | string | — | Optional consumer-localized error text; a nonempty trimmed value also exposes invalid state. |
|
|
651
|
+
| `name` | string | — | Web form field name; React Native has no HTML form association. |
|
|
652
|
+
|
|
653
|
+
**Events**
|
|
654
|
+
|
|
655
|
+
| DOM | React | Angular | React Native | Detail | Description |
|
|
656
|
+
| --- | --- | --- | --- | --- | --- |
|
|
657
|
+
| `cosm-change` | `onChange` | `(valueChange)` | `onValueChange` | `RadioGroupChangeDetail` | Proposes a selection after enabled user activation; autonomous state commits and controlled state waits for the owner. |
|
|
658
|
+
|
|
659
|
+
**CSS parts**
|
|
660
|
+
|
|
661
|
+
| Name | Description |
|
|
662
|
+
| --- | --- |
|
|
663
|
+
| `base` | Group wrapper and accessible fieldset. |
|
|
664
|
+
| `label` | Visible group label. |
|
|
665
|
+
| `options` | Option collection. |
|
|
666
|
+
| `option` | Selectable option row. |
|
|
667
|
+
| `input` | Native radio input and Web focus target. |
|
|
668
|
+
| `control` | Visible circular radio boundary. |
|
|
669
|
+
| `indicator` | Selected radio dot. |
|
|
670
|
+
| `option-label` | Primary option text. |
|
|
671
|
+
| `description` | Optional option description. |
|
|
672
|
+
| `help-text` | Supporting text associated with the group. |
|
|
673
|
+
| `error-text` | Error description associated with the group. |
|
|
674
|
+
|
|
675
|
+
**CSS custom properties**
|
|
676
|
+
|
|
677
|
+
| Name | Description |
|
|
678
|
+
| --- | --- |
|
|
679
|
+
| `--cosm-radio-group-gap` | Space between option rows. |
|
|
680
|
+
| `--cosm-radio-group-option-gap` | Space between the radio control and option content. |
|
|
681
|
+
| `--cosm-radio-group-control-size` | Diameter of the visible radio control. |
|
|
682
|
+
| `--cosm-radio-group-border` | Unchecked radio boundary color. |
|
|
683
|
+
| `--cosm-radio-group-selected-border` | Selected radio boundary color. |
|
|
684
|
+
| `--cosm-radio-group-indicator` | Selected radio dot color. |
|
|
685
|
+
| `--cosm-radio-group-focus` | Visible keyboard focus indicator color. |
|
|
686
|
+
|
|
687
|
+
**Keyboard**
|
|
688
|
+
|
|
689
|
+
| Keys | Action |
|
|
690
|
+
| --- | --- |
|
|
691
|
+
| `Tab`, `Shift+Tab` | Enters or leaves the group as one tab stop. |
|
|
692
|
+
| `Space` | Selects the focused enabled option. |
|
|
693
|
+
| `ArrowRight`, `ArrowDown`, `ArrowLeft`, `ArrowUp` | Moves focus and selection through enabled options with wrapping. |
|
|
694
|
+
|
|
695
|
+
### `select` (`<cosm-select>`)
|
|
696
|
+
|
|
697
|
+
Selects one option from an accessible collection, with native Web form behavior.
|
|
698
|
+
|
|
699
|
+
| Prop | Type | Default | Description |
|
|
700
|
+
| --- | --- | --- | --- |
|
|
701
|
+
| `label` | string | Required | Required visible accessible name for the control. |
|
|
702
|
+
| `items` | SelectItems | Required | Readonly flat options with unique nonempty values, nonempty labels, and optional disabled state. |
|
|
703
|
+
| `value` | SelectValue | — | Controlled selected value; null means no selection, and a supplied null remains controlled. |
|
|
704
|
+
| `defaultValue` | SelectValue | — | Initial autonomous selection; null by default. |
|
|
705
|
+
| `placeholder` | string | Required | Consumer-localized text shown when no value is selected. |
|
|
706
|
+
| `variant` | 'outlined' \| 'filled' | `outlined` | Outlined or filled trigger appearance. |
|
|
707
|
+
| `size` | 'sm' \| 'md' \| 'lg' | `md` | Small, medium, or large control size. |
|
|
708
|
+
| `disabled` | boolean | `false` | Prevents interaction and excludes the value from Web form submission. |
|
|
709
|
+
| `required` | boolean | `false` | Requires a selection in Web form validation; Native exposes descriptive semantics. |
|
|
710
|
+
| `invalid` | boolean | `false` | Externally supplied invalid presentation state when the visible error is supplied elsewhere. |
|
|
711
|
+
| `helperText` | string | — | Optional supporting text associated with the control. |
|
|
712
|
+
| `errorText` | string | — | Optional consumer-localized error text; a nonempty trimmed value also exposes invalid state. |
|
|
713
|
+
| `name` | string | — | Web form field name; React Native has no HTML form association. |
|
|
714
|
+
|
|
715
|
+
**Events**
|
|
716
|
+
|
|
717
|
+
| DOM | React | Angular | React Native | Detail | Description |
|
|
718
|
+
| --- | --- | --- | --- | --- | --- |
|
|
719
|
+
| `cosm-change` | `onChange` | `(valueChange)` | `onValueChange` | `SelectChangeDetail` | Proposes a selected value after user activation; autonomous state commits and controlled state waits for the owner. |
|
|
720
|
+
|
|
721
|
+
**CSS parts**
|
|
722
|
+
|
|
723
|
+
| Name | Description |
|
|
724
|
+
| --- | --- |
|
|
725
|
+
| `base` | Field wrapper. |
|
|
726
|
+
| `label` | Visible accessible label. |
|
|
727
|
+
| `trigger` | Select-only combobox trigger. |
|
|
728
|
+
| `value` | Selected option text. |
|
|
729
|
+
| `placeholder` | Text displayed when no option is selected. |
|
|
730
|
+
| `popup` | Anchored popup surface. |
|
|
731
|
+
| `listbox` | Single-selection option collection. |
|
|
732
|
+
| `option` | Selectable row with selected, active, and disabled states. |
|
|
733
|
+
| `content` | Option text wrapper. |
|
|
734
|
+
| `option-label` | Primary option text. |
|
|
735
|
+
| `help` | Supporting text associated with the control. |
|
|
736
|
+
| `error` | Error description associated with the control. |
|
|
737
|
+
|
|
738
|
+
**CSS custom properties**
|
|
739
|
+
|
|
740
|
+
| Name | Description |
|
|
741
|
+
| --- | --- |
|
|
742
|
+
| `--cosm-select-background` | Control background. |
|
|
743
|
+
| `--cosm-select-color` | Control and value text color. |
|
|
744
|
+
| `--cosm-select-placeholder` | Placeholder text color. |
|
|
745
|
+
| `--cosm-select-border` | Control boundary color. |
|
|
746
|
+
| `--cosm-select-focus` | Visible keyboard focus indicator color. |
|
|
747
|
+
| `--cosm-select-radius` | Control corner radius. |
|
|
748
|
+
| `--cosm-select-trigger-min-height` | Custom minimum trigger height. |
|
|
749
|
+
| `--cosm-select-option-selected-background` | Selected option background. |
|
|
750
|
+
| `--cosm-select-option-selected-color` | Selected option text color. |
|
|
751
|
+
|
|
752
|
+
**Keyboard**
|
|
753
|
+
|
|
754
|
+
| Keys | Action |
|
|
755
|
+
| --- | --- |
|
|
756
|
+
| `Tab`, `Shift+Tab` | Moves focus to or from the enabled combobox trigger. |
|
|
757
|
+
| `Enter`, `Space`, `ArrowDown`, `ArrowUp` | On Web, opens the popup; arrows move the active option without changing selection. |
|
|
758
|
+
| `ArrowDown`, `ArrowUp`, `Home`, `End` | On Web, moves the active option without changing the selected value. |
|
|
759
|
+
| `Printable characters` | 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. |
|
|
760
|
+
| `Enter`, `Space` | On Web, selects the active enabled option. |
|
|
761
|
+
| `Escape` | On Web, closes the popup without changing the selected value. |
|
|
762
|
+
|
|
763
|
+
### `pagination` (`<cosm-pagination>`)
|
|
764
|
+
|
|
765
|
+
Navigates a known number of pages using buttons.
|
|
766
|
+
|
|
767
|
+
| Prop | Type | Default | Description |
|
|
768
|
+
| --- | --- | --- | --- |
|
|
769
|
+
| `totalPages` | number | Required | Required nonnegative safe integer page count. |
|
|
770
|
+
| `page` | number | — | Controlled one-based safe integer page; out-of-range values are displayed clamped. |
|
|
771
|
+
| `defaultPage` | number | `1` | Initial one-based page for autonomous state. |
|
|
772
|
+
| `label` | string | Required | Required localized navigation landmark label. |
|
|
773
|
+
| `previousLabel` | string | `Previous page` | Previous button label. |
|
|
774
|
+
| `nextLabel` | string | `Next page` | Next button label. |
|
|
775
|
+
| `firstLabel` | string | `First page` | First button label. |
|
|
776
|
+
| `lastLabel` | string | `Last page` | Last button label. |
|
|
777
|
+
| `pageLabel` | string | `Page {page}` | Page button label template; {page} is replaced with the localized number. |
|
|
778
|
+
| `summaryLabel` | string | `Page {page} of {total}` | Compact summary template with {page} and {total} placeholders. |
|
|
779
|
+
| `locale` | string | — | Locale for formatted page numbers. |
|
|
780
|
+
| `direction` | 'ltr' \| 'rtl' | `ltr` | Layout and directional icon direction. |
|
|
781
|
+
| `presentation` | 'numbered' \| 'compact' | `numbered` | Show up to seven fixed-width numbered positions or a compact summary. |
|
|
782
|
+
| `variant` | 'solid' \| 'soft' \| 'outline' | `solid` | Selected page emphasis. |
|
|
783
|
+
| `size` | 'sm' \| 'md' \| 'lg' | `md` | Control size. |
|
|
784
|
+
| `showFirstLast` | boolean | `false` | Show first and last page controls. |
|
|
785
|
+
| `disabled` | boolean | `false` | Disable all controls. |
|
|
786
|
+
|
|
787
|
+
**Events**
|
|
788
|
+
|
|
789
|
+
| DOM | React | Angular | React Native | Detail | Description |
|
|
790
|
+
| --- | --- | --- | --- | --- | --- |
|
|
791
|
+
| `cosm-change` | `onChange` | `(pageChange)` | `onPageChange` | `PaginationChangeDetail` | Proposes a different page after enabled user activation. |
|
|
792
|
+
|
|
793
|
+
**CSS parts**
|
|
794
|
+
|
|
795
|
+
| Name | Description |
|
|
796
|
+
| --- | --- |
|
|
797
|
+
| `base` | Navigation landmark. |
|
|
798
|
+
| `control` | Navigation control. |
|
|
799
|
+
| `page` | Page control. |
|
|
800
|
+
| `current` | Current page control. |
|
|
801
|
+
| `ellipsis` | Decorative omitted-page indicator. |
|
|
802
|
+
| `summary` | Compact summary. |
|
|
803
|
+
|
|
804
|
+
**CSS custom properties**
|
|
805
|
+
|
|
806
|
+
| Name | Description |
|
|
807
|
+
| --- | --- |
|
|
808
|
+
| `--cosm-pagination-gap` | Gap between controls. |
|
|
809
|
+
| `--cosm-pagination-min-height` | Minimum control height. |
|
|
810
|
+
| `--cosm-pagination-radius` | Control corner radius. |
|
|
811
|
+
| `--cosm-pagination-current-background` | Current page background. |
|
|
812
|
+
| `--cosm-pagination-current-color` | Current page foreground. |
|
|
813
|
+
| `--cosm-pagination-current-border` | Current page border color. |
|
|
814
|
+
|
|
815
|
+
**Keyboard**
|
|
816
|
+
|
|
817
|
+
| Keys | Action |
|
|
818
|
+
| --- | --- |
|
|
819
|
+
| `Tab`, `Shift+Tab` | Moves between enabled controls. |
|
|
820
|
+
| `Enter`, `Space` | Activates the focused control. |
|
|
821
|
+
|
|
822
|
+
### `dialog` (`<cosm-dialog>`)
|
|
823
|
+
|
|
824
|
+
Modal content with a title, actions and cancelable close requests.
|
|
825
|
+
|
|
826
|
+
| Prop | Type | Default | Description |
|
|
827
|
+
| --- | --- | --- | --- |
|
|
828
|
+
| `open` | boolean | `false` | Committed visibility; supplying this prop, including false, controls state. |
|
|
829
|
+
| `defaultOpen` | boolean | `false` | Initial autonomous visibility; subsequent changes do not reset state. |
|
|
830
|
+
| `presentation` | 'standard' \| 'fullscreen' | `standard` | Centered standard surface or fullscreen surface. |
|
|
831
|
+
| `size` | 'sm' \| 'md' \| 'lg' | `md` | Maximum standard width: sm 400, md 640, lg 960 pixels or logical points. |
|
|
832
|
+
| `responsiveFullscreen` | boolean | `false` | Use fullscreen when available viewport width is below 640 pixels or logical points. |
|
|
833
|
+
| `closeLabel` | string | `Close` | Non-empty localized accessible name of the built-in close button. |
|
|
834
|
+
| `closeOnEscape` | boolean | `true` | Request closure on unhandled Escape on web. |
|
|
835
|
+
| `closeOnAndroidBack` | boolean | `true` | Request closure on Android Back; consume Back even if the request is canceled. |
|
|
836
|
+
| `closeOnBackdropPress` | boolean | `false` | Request closure when the backdrop itself is pressed. |
|
|
837
|
+
| `initialFocusTarget` | DialogFocusTarget | — | Optional platform focus target used on committed opening; it must be inside the dialog. |
|
|
838
|
+
| `returnFocusTarget` | DialogFocusTarget | — | Optional platform focus target used after committed closure. |
|
|
839
|
+
|
|
840
|
+
**Events**
|
|
841
|
+
|
|
842
|
+
| DOM | React | Angular | React Native | Detail | Description |
|
|
843
|
+
| --- | --- | --- | --- | --- | --- |
|
|
844
|
+
| `cosm-open-change` | `onOpenChange` | `(openChange)` | `onOpenChange` | `DialogOpenChangeDetail` | Proposes opening or closing; only closing is synchronously cancelable. (cancelable) |
|
|
845
|
+
|
|
846
|
+
**Slots**
|
|
847
|
+
|
|
848
|
+
| Name | Description |
|
|
849
|
+
| --- | --- |
|
|
850
|
+
| `title` | Required accessible title content. |
|
|
851
|
+
| `description` | Optional short accessible description. |
|
|
852
|
+
| `(default)` | Scrollable body content. |
|
|
853
|
+
| `actions` | Consumer-supplied actions. |
|
|
854
|
+
|
|
855
|
+
**CSS parts**
|
|
856
|
+
|
|
857
|
+
| Name | Description |
|
|
858
|
+
| --- | --- |
|
|
859
|
+
| `backdrop` | Modal backdrop. |
|
|
860
|
+
| `base` | Dialog surface. |
|
|
861
|
+
| `header` | Title and close control area. |
|
|
862
|
+
| `title` | Title container. |
|
|
863
|
+
| `description` | Description container. |
|
|
864
|
+
| `body` | Scrollable body. |
|
|
865
|
+
| `actions` | Actions container. |
|
|
866
|
+
| `close` | Close IconButton. |
|
|
867
|
+
|
|
868
|
+
**CSS custom properties**
|
|
869
|
+
|
|
870
|
+
| Name | Description |
|
|
871
|
+
| --- | --- |
|
|
872
|
+
| `--cosm-dialog-z-index` | Modal stacking level. |
|
|
873
|
+
| `--cosm-dialog-max-width` | Standard surface maximum width. |
|
|
874
|
+
| `--cosm-dialog-backdrop` | Backdrop background. |
|
|
875
|
+
| `--cosm-dialog-surface` | Surface background. |
|
|
876
|
+
| `--cosm-dialog-border` | Surface border. |
|
|
877
|
+
| `--cosm-dialog-radius` | Surface radius. |
|
|
878
|
+
| `--cosm-dialog-shadow` | Surface shadow. |
|
|
879
|
+
| `--cosm-dialog-padding` | Section spacing. |
|
|
880
|
+
|
|
881
|
+
**Keyboard**
|
|
882
|
+
|
|
883
|
+
| Keys | Action |
|
|
884
|
+
| --- | --- |
|
|
885
|
+
| `Escape` | On web request close unless handled by a child or disabled. |
|
|
886
|
+
| `Tab`, `Shift+Tab` | Keep keyboard focus inside the modal. |
|
|
887
|
+
| `Android Back` | On Android request close unless disabled. |
|
|
888
|
+
|
|
360
889
|
|
|
361
890
|
## Rules for AI assistants
|
|
362
891
|
|