@cocoar/vue-ui 3.4.0-beta.1 → 3.4.0-beta.22

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 (156) hide show
  1. package/README.md +1 -1
  2. package/dist/components/_internal/keyboardInset.d.ts +9 -0
  3. package/dist/components/_internal/keyboardInset.d.ts.map +1 -0
  4. package/dist/components/_internal/pageScrollLock.d.ts +17 -0
  5. package/dist/components/_internal/pageScrollLock.d.ts.map +1 -0
  6. package/dist/components/_internal/useFocusTrap.d.ts +9 -0
  7. package/dist/components/_internal/useFocusTrap.d.ts.map +1 -0
  8. package/dist/components/_internal/useVisualViewport.d.ts +26 -0
  9. package/dist/components/_internal/useVisualViewport.d.ts.map +1 -0
  10. package/dist/components/date-time/_shared/use-plain-date-picker.d.ts +95 -0
  11. package/dist/components/date-time/_shared/use-plain-date-picker.d.ts.map +1 -0
  12. package/dist/components/date-time/_shared/use-plain-date-time-picker.d.ts +113 -0
  13. package/dist/components/date-time/_shared/use-plain-date-time-picker.d.ts.map +1 -0
  14. package/dist/components/date-time/_shared/use-zoned-date-time-picker.d.ts +132 -0
  15. package/dist/components/date-time/_shared/use-zoned-date-time-picker.d.ts.map +1 -0
  16. package/dist/components/date-time/plain-date-picker/CoarPlainDatePicker.vue.d.ts.map +1 -1
  17. package/dist/components/date-time/plain-date-time-picker/CoarPlainDateTimePicker.vue.d.ts.map +1 -1
  18. package/dist/components/date-time/scrollable-calendar/CoarScrollableCalendar.vue.d.ts.map +1 -1
  19. package/dist/components/date-time/zoned-date-time-picker/CoarZonedDateTimePicker.vue.d.ts.map +1 -1
  20. package/dist/components/dialog/CoarDialogFooter.vue.d.ts +20 -0
  21. package/dist/components/dialog/CoarDialogFooter.vue.d.ts.map +1 -0
  22. package/dist/components/dialog/CoarDialogShell.vue.d.ts +2 -0
  23. package/dist/components/dialog/CoarDialogShell.vue.d.ts.map +1 -1
  24. package/dist/components/dialog/CoarSheetShell.vue.d.ts +50 -0
  25. package/dist/components/dialog/CoarSheetShell.vue.d.ts.map +1 -0
  26. package/dist/components/dialog/dialog-types.d.ts +27 -0
  27. package/dist/components/dialog/dialog-types.d.ts.map +1 -1
  28. package/dist/components/dialog/dialogFooter.d.ts +21 -0
  29. package/dist/components/dialog/dialogFooter.d.ts.map +1 -0
  30. package/dist/components/dialog/index.d.ts +2 -1
  31. package/dist/components/dialog/index.d.ts.map +1 -1
  32. package/dist/components/dialog/useDialog.d.ts +6 -15
  33. package/dist/components/dialog/useDialog.d.ts.map +1 -1
  34. package/dist/components/dialog/useSheetDrag.d.ts +46 -0
  35. package/dist/components/dialog/useSheetDrag.d.ts.map +1 -0
  36. package/dist/components/input-frame/CoarInputFrame.vue.d.ts.map +1 -1
  37. package/dist/components/input-frame/CoarInputFrameButton.vue.d.ts.map +1 -1
  38. package/dist/components/listbox/CoarListbox.vue.d.ts.map +1 -1
  39. package/dist/components/menu/CoarContextMenu.vue.d.ts.map +1 -1
  40. package/dist/components/menu/CoarMenuItem.vue.d.ts.map +1 -1
  41. package/dist/components/menu/CoarSubExpand.vue.d.ts.map +1 -1
  42. package/dist/components/menu/CoarSubFlyout.vue.d.ts.map +1 -1
  43. package/dist/components/menu/useContextMenu.d.ts +7 -20
  44. package/dist/components/menu/useContextMenu.d.ts.map +1 -1
  45. package/dist/components/otp-input/CoarOtpInput.vue.d.ts.map +1 -1
  46. package/dist/components/overlay/CoarOverlayOutlet.vue.d.ts.map +1 -1
  47. package/dist/components/overlay/index.d.ts +1 -1
  48. package/dist/components/overlay/index.d.ts.map +1 -1
  49. package/dist/components/overlay/overlay-presets.d.ts +9 -0
  50. package/dist/components/overlay/overlay-presets.d.ts.map +1 -1
  51. package/dist/components/overlay/overlay-service.d.ts +12 -0
  52. package/dist/components/overlay/overlay-service.d.ts.map +1 -1
  53. package/dist/components/overlay/overlay-types.d.ts +6 -0
  54. package/dist/components/overlay/overlay-types.d.ts.map +1 -1
  55. package/dist/components/pagination/CoarPagination.vue.d.ts.map +1 -1
  56. package/dist/components/scrollbar/vScrollbar.d.ts.map +1 -1
  57. package/dist/components/segmented-control/CoarSegmentedControl.vue.d.ts.map +1 -1
  58. package/dist/components/select/CoarMultiSelect.vue.d.ts.map +1 -1
  59. package/dist/components/select/CoarMultiSelectDropdownPanel.vue.d.ts.map +1 -1
  60. package/dist/components/select/CoarSelect.vue.d.ts.map +1 -1
  61. package/dist/components/select/CoarSelectDropdownPanel.vue.d.ts.map +1 -1
  62. package/dist/components/select/CoarTagSelect.vue.d.ts.map +1 -1
  63. package/dist/components/select/CoarTagSelectDropdownPanel.vue.d.ts.map +1 -1
  64. package/dist/components/tabs/CoarTabGroup.vue.d.ts.map +1 -1
  65. package/dist/components/tag/CoarTag.vue.d.ts.map +1 -1
  66. package/dist/index.css +1 -1
  67. package/dist/index.d.ts +4 -3
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +4597 -3950
  70. package/package.json +4 -4
  71. package/skills/cocoar-vue-ui/SKILL.md +9 -5
  72. package/skills/cocoar-vue-ui/references/components/avatar.md +2 -0
  73. package/skills/cocoar-vue-ui/references/components/badge.md +2 -0
  74. package/skills/cocoar-vue-ui/references/components/breadcrumb.md +2 -0
  75. package/skills/cocoar-vue-ui/references/components/button.md +2 -0
  76. package/skills/cocoar-vue-ui/references/components/calendar/agenda-view.md +2 -0
  77. package/skills/cocoar-vue-ui/references/components/calendar/coar-calendar.md +2 -0
  78. package/skills/cocoar-vue-ui/references/components/calendar/day-view.md +2 -0
  79. package/skills/cocoar-vue-ui/references/components/calendar/index.md +2 -0
  80. package/skills/cocoar-vue-ui/references/components/calendar/month-view.md +2 -0
  81. package/skills/cocoar-vue-ui/references/components/calendar/time-selection.md +2 -0
  82. package/skills/cocoar-vue-ui/references/components/calendar/timeline-view.md +2 -0
  83. package/skills/cocoar-vue-ui/references/components/calendar/week-view.md +2 -0
  84. package/skills/cocoar-vue-ui/references/components/calendar/work-week-view.md +2 -0
  85. package/skills/cocoar-vue-ui/references/components/calendar/year-view.md +2 -0
  86. package/skills/cocoar-vue-ui/references/components/card.md +2 -0
  87. package/skills/cocoar-vue-ui/references/components/checkbox-group.md +2 -0
  88. package/skills/cocoar-vue-ui/references/components/checkbox.md +2 -0
  89. package/skills/cocoar-vue-ui/references/components/code-block.md +2 -0
  90. package/skills/cocoar-vue-ui/references/components/context-menu.md +3 -0
  91. package/skills/cocoar-vue-ui/references/components/data-grid/checkbox.md +2 -0
  92. package/skills/cocoar-vue-ui/references/components/data-grid/date-columns.md +2 -0
  93. package/skills/cocoar-vue-ui/references/components/data-grid/editing.md +2 -0
  94. package/skills/cocoar-vue-ui/references/components/data-grid/multi-select.md +2 -0
  95. package/skills/cocoar-vue-ui/references/components/data-grid/number.md +2 -0
  96. package/skills/cocoar-vue-ui/references/components/data-grid/select.md +2 -0
  97. package/skills/cocoar-vue-ui/references/components/data-grid/text.md +2 -0
  98. package/skills/cocoar-vue-ui/references/components/data-grid.md +2 -0
  99. package/skills/cocoar-vue-ui/references/components/data-list.md +2 -0
  100. package/skills/cocoar-vue-ui/references/components/date-or-time-picker.md +2 -0
  101. package/skills/cocoar-vue-ui/references/components/date-picker.md +2 -0
  102. package/skills/cocoar-vue-ui/references/components/date-time-picker.md +2 -0
  103. package/skills/cocoar-vue-ui/references/components/date-views.md +2 -0
  104. package/skills/cocoar-vue-ui/references/components/dialog.md +189 -1
  105. package/skills/cocoar-vue-ui/references/components/divider.md +2 -0
  106. package/skills/cocoar-vue-ui/references/components/document-viewer/annotations.md +2 -0
  107. package/skills/cocoar-vue-ui/references/components/document-viewer/coar-document-viewer.md +2 -0
  108. package/skills/cocoar-vue-ui/references/components/document-viewer/index.md +2 -0
  109. package/skills/cocoar-vue-ui/references/components/document-viewer/toolbar.md +2 -0
  110. package/skills/cocoar-vue-ui/references/components/drag-drop.md +2 -0
  111. package/skills/cocoar-vue-ui/references/components/dual-listbox.md +2 -0
  112. package/skills/cocoar-vue-ui/references/components/form-field.md +2 -0
  113. package/skills/cocoar-vue-ui/references/components/link.md +2 -0
  114. package/skills/cocoar-vue-ui/references/components/listbox.md +2 -0
  115. package/skills/cocoar-vue-ui/references/components/map/editor.md +2 -0
  116. package/skills/cocoar-vue-ui/references/components/map/index.md +2 -0
  117. package/skills/cocoar-vue-ui/references/components/markdown-diagrams.md +2 -0
  118. package/skills/cocoar-vue-ui/references/components/markdown-editor.md +2 -0
  119. package/skills/cocoar-vue-ui/references/components/markdown-form.md +2 -0
  120. package/skills/cocoar-vue-ui/references/components/markdown.md +2 -0
  121. package/skills/cocoar-vue-ui/references/components/menu.md +2 -0
  122. package/skills/cocoar-vue-ui/references/components/mermaid.md +2 -0
  123. package/skills/cocoar-vue-ui/references/components/navbar.md +2 -0
  124. package/skills/cocoar-vue-ui/references/components/note.md +2 -0
  125. package/skills/cocoar-vue-ui/references/components/notice.md +2 -0
  126. package/skills/cocoar-vue-ui/references/components/number-input.md +2 -0
  127. package/skills/cocoar-vue-ui/references/components/otp-input.md +2 -0
  128. package/skills/cocoar-vue-ui/references/components/page-builder/coar-page-builder.md +2 -0
  129. package/skills/cocoar-vue-ui/references/components/page-builder/coar-page-renderer.md +2 -0
  130. package/skills/cocoar-vue-ui/references/components/pagination.md +2 -0
  131. package/skills/cocoar-vue-ui/references/components/panel-layout.md +2 -0
  132. package/skills/cocoar-vue-ui/references/components/password-input.md +2 -0
  133. package/skills/cocoar-vue-ui/references/components/popconfirm.md +2 -0
  134. package/skills/cocoar-vue-ui/references/components/popover.md +2 -0
  135. package/skills/cocoar-vue-ui/references/components/progress-bar.md +2 -0
  136. package/skills/cocoar-vue-ui/references/components/radio-group.md +2 -0
  137. package/skills/cocoar-vue-ui/references/components/script-editor.md +2 -0
  138. package/skills/cocoar-vue-ui/references/components/segmented-control.md +2 -0
  139. package/skills/cocoar-vue-ui/references/components/select.md +2 -0
  140. package/skills/cocoar-vue-ui/references/components/sidebar.md +2 -0
  141. package/skills/cocoar-vue-ui/references/components/spinner.md +2 -0
  142. package/skills/cocoar-vue-ui/references/components/switch.md +2 -0
  143. package/skills/cocoar-vue-ui/references/components/table.md +2 -0
  144. package/skills/cocoar-vue-ui/references/components/tabs.md +2 -0
  145. package/skills/cocoar-vue-ui/references/components/tag.md +2 -0
  146. package/skills/cocoar-vue-ui/references/components/text-input.md +2 -0
  147. package/skills/cocoar-vue-ui/references/components/toast.md +2 -0
  148. package/skills/cocoar-vue-ui/references/components/tooltip.md +2 -0
  149. package/skills/cocoar-vue-ui/references/components/tree.md +2 -0
  150. package/skills/cocoar-vue-ui/references/components/wizard.md +2 -0
  151. package/skills/cocoar-vue-ui/references/components/zoned-date-time-picker.md +2 -0
  152. package/skills/cocoar-vue-ui/references/foundations/design-principles.md +27 -3
  153. package/skills/cocoar-vue-ui/references/guide/getting-started.md +2 -2
  154. package/skills/cocoar-vue-ui/references/guide/mobile.md +326 -13
  155. package/styles/tokens/mobile.css +2 -0
  156. package/styles/tokens/new-components.css +9 -0
@@ -41,10 +41,78 @@ validation, disabled/readonly states, and link-button semantics stay unchanged.
41
41
  Connecting a mouse does not switch the presentation. Narrowing the viewport does
42
42
  not automatically enable this mode either.
43
43
 
44
+ ## Try it in phone size {#try-it}
45
+
46
+ The demo below runs in a real viewport of 390 × 844 CSS pixels, in an app with
47
+ `coar-mobile` on `html`: overlays open inside it, and width-dependent rules see
48
+ the phone's width. It is one page of the
49
+ [mobile documentation](https://docs.cocoar.dev/cocoar-ui-vue/mobile/), a small app of demos that you
50
+ can open on a phone directly and browse with your thumb. What a frame cannot
51
+ show — the on-screen keyboard, safe areas, real finger gestures — needs that
52
+ real device.
53
+
54
+ Live demo in phone size: [A form in phone size](https://docs.cocoar.dev/cocoar-ui-vue/mobile/#/form)
55
+
56
+ ## What decides what
57
+
58
+ Each aspect of how a component looks and behaves has one source. They are
59
+ independent of each other:
60
+
61
+ | Aspect | Decided by |
62
+ |--------|------------|
63
+ | Brand: colours, fonts, shapes | The app's theme (`--coar-*` tokens, see [Theming](./theming.md)) |
64
+ | Colour scheme | The `dark-mode` class on the root element |
65
+ | Control sizes | The `coar-mobile` class |
66
+ | Layout in the available space | The size of the component's container — for example `CoarCalendar` and the month list view use CSS container queries, and the day view's multi-day variation derives its number of columns from the container width |
67
+ | Input behaviour: hover effects, drag engine | The input the browser reports — for example `CoarDataList` shows row hover only under `(hover: hover)`, and `useDragDrop` with `engine: 'auto'` uses its pointer engine on a coarse pointer |
68
+
69
+ Some cases:
70
+
71
+ - **A tablet with a mouse** in an app that sets `coar-mobile` keeps the mobile
72
+ sizes. Whether hover effects appear depends on what the browser reports for
73
+ the device (`(hover: hover)`), never on the class.
74
+ - **A narrow desktop window** does not get phone sizes. Only the class changes
75
+ sizes; components whose container gets narrow adapt their layout where they
76
+ support it.
77
+ - **A touch notebook** without the class keeps the desktop sizes. Touch works,
78
+ but the controls are not enlarged.
79
+
80
+ ## A mode, not a theme
81
+
82
+ Under `coar-mobile` the library's stylesheet sets only `--coar-control-*`
83
+ tokens (`packages/ui/styles/tokens/mobile.css`): heights, minimum target sizes,
84
+ the minimum editable font size and the visibility of clear buttons. Apart from
85
+ that, the input frame paints its border without taking layout space. No colour,
86
+ radius or font family changes, so a brand theme applies in both modes unchanged.
87
+
88
+ The control tokens are ordinary inherited custom properties, so the usual
89
+ cascade decides which value a control gets: the nearest ancestor that sets a
90
+ token wins, and on the same element the more specific selector, then the later
91
+ rule. There is no fixed order between the mode and a brand theme beyond that.
92
+
93
+ A brand that wants its own mobile sizes therefore sets them with a selector
94
+ that includes the class:
95
+
96
+ ```css
97
+ /* brand and mode on the same element, e.g. <html class="my-brand coar-mobile"> */
98
+ .my-brand.coar-mobile {
99
+ --coar-control-m-height: 56px;
100
+ }
101
+
102
+ /* a local mobile area inside the brand */
103
+ .my-brand .coar-mobile {
104
+ --coar-control-m-height: 56px;
105
+ }
106
+ ```
107
+
108
+ A brand rule without the class is the wrong tool: it either loses against
109
+ `.coar-mobile` or, where it wins, changes the desktop presentation too, because
110
+ the controls read these tokens in both modes.
111
+
44
112
  ## Supported controls
45
113
 
46
- This is the first mobile-controls increment, not a mobile redesign of the entire
47
- library.
114
+ The adapted controls are what a form taps: fields, the rows that open from them, and
115
+ the small controls around them. This is not a mobile redesign of the entire library.
48
116
 
49
117
  | Component | Mobile presentation |
50
118
  |-----------|---------------------|
@@ -55,6 +123,16 @@ library.
55
123
  | `CoarCheckbox` | At least 48×48px clickable label, without enlarging the indicator |
56
124
  | `CoarRadioButton` / `CoarRadioGroup` | At least 48×48px clickable option labels, without enlarging the indicators |
57
125
  | `CoarSwitch` | At least 48×48px clickable label, without enlarging the track |
126
+ | `CoarSelect` / `CoarMultiSelect` | The field height scale and at least 16px text, a 44×44px clear target; options at least 44px tall with 16px text |
127
+ | `CoarTagSelect` | The same field floors as a minimum height (the field still grows with its chips), 44×44px chip remove targets without enlarging the chips (wider gaps between chips and wrapped rows keep the targets apart); options as above |
128
+ | `CoarPlainDatePicker`, `CoarPlainDateTimePicker`, `CoarZonedDateTimePicker`, `CoarPlainDateTimeOrDatePicker`, `CoarZonedDateTimeOrDatePicker` | The field height scale and at least 16px editable text, 44×44px clear, calendar and time-zone targets; the panels keep their desktop layout |
129
+ | `CoarMenu` / `CoarContextMenu` | Items and submenu triggers at least 44px tall with 16px text |
130
+ | `CoarListbox` | Rows at least 44px tall with 16px text; in virtual mode the row height stays the `itemHeight` prop |
131
+ | `CoarSegmentedControl` | The button height scale, at least 44px wide segments and 16px text |
132
+ | `CoarTabGroup` | Tabs at least 44×44px with 16px text, never narrower than their label; a row wider than its container overflows as without the class |
133
+ | `CoarOtpInput` | Cells on the field height scale with at least 16px text; square where there is room, narrower where the container is too narrow for them |
134
+ | `CoarPagination` | Page and navigation buttons at least 44×44px with 16px text; they wrap in a narrow container |
135
+ | `CoarTag` | A 44×44px close target, without enlarging the tag; a closable tag keeps the target's room as margin, so tags in a list never cover each other |
58
136
 
59
137
  Text-input clear buttons also receive 44×44px targets. Clear buttons remain fully
60
138
  opaque without hover or focus when a value can be cleared; empty fields retain
@@ -70,8 +148,9 @@ of collapsing every size to one minimum:
70
148
  | `m` | 40px | 52px |
71
149
  | `l` | 48px | 56px |
72
150
 
73
- This scale applies to buttons and single-line text/password/number fields;
74
- textareas can grow taller. Larger custom component heights are preserved.
151
+ This scale applies to buttons, segmented controls, OTP cells and the single-line
152
+ fields (text, password, number, selects, date pickers); textareas and the tag select
153
+ can grow taller. Larger custom component heights are preserved.
75
154
  The mobile input border is painted without taking layout space, so even an `xs`
76
155
  field can contain 44px actions under a global `box-sizing: border-box` reset.
77
156
  Rounded fields still have intentionally rounded hit regions.
@@ -86,16 +165,91 @@ It is independent of light/dark mode. Removing the class restores normal sizing
86
165
  without remounting the controls or resetting their values. Desktop siblings
87
166
  outside a local mobile parent are unaffected.
88
167
 
89
- **Portaled content is not automatically part of a local mobile scope.** Overlays
90
- teleported to `body` leave that parent's DOM subtree. Use `coar-mobile` on `body`
91
- or `html` when supported controls inside overlays should also use the mode.
92
- This increment does not add a mobile-context bridge for local overlays.
168
+ Overlays are teleported to `body`, outside a local mobile parent; the mode
169
+ still reaches them, see [Overlays from a local area](#overlays).
170
+
171
+ The panels of date/time pickers, dialogs, grids, and editors do not have dedicated
172
+ mobile presentations yet; select panels get touch-sized rows but stay dropdowns. In
173
+ particular, no picker or select switches to a sheet or a stepped mobile flow.
174
+
175
+ The class changes sizes only. A component without a mobile presentation keeps
176
+ its own layout in both modes (see [Device support](#device-support)); adapted
177
+ controls inside it, such as the buttons of a dialog, still take the mobile
178
+ sizes. A component that
179
+ needs a different pattern on a phone will get an explicit option for it; no
180
+ component changes its behaviour or layout pattern because the class is present.
181
+
182
+ ## Overlays from a local area {#overlays}
183
+
184
+ An overlay opened from inside a local `coar-mobile` area keeps the mobile
185
+ presentation: popovers, selects, menus and their submenus, date pickers,
186
+ dialogs, context menus, and overlays opened from inside those. The overlay's
187
+ host element gets the class `coar-mobile` and, inline, the values the area
188
+ computes for the mobile control tokens:
189
+
190
+ `--coar-control-xs-height`, `--coar-control-s-height`, `--coar-control-m-height`,
191
+ `--coar-control-l-height`, `--coar-control-min-size`, `--coar-control-min-font-size`,
192
+ `--coar-control-min-target-size`, `--coar-control-row-min-height`,
193
+ `--coar-control-clear-opacity`, `--coar-control-align-items`
194
+
195
+ The values are read on the area itself, so brand rules (`.my-brand .coar-mobile`)
196
+ and local overrides (`.my-form.coar-mobile`) reach the overlay too.
197
+
198
+ With `coar-mobile` on `html` or `body` there is nothing to do: the overlay sits
199
+ inside it and inherits the tokens as before. Without `coar-mobile`, overlays are
200
+ unchanged.
201
+
202
+ ### Dialogs as bottom sheets
203
+
204
+ A dialog can open as a sheet docked to the bottom of the screen, with
205
+ `presentation: 'sheet'` in `useDialog()` (Preview, see [Bottom sheet](../components/dialog.md#sheet)).
206
+ The presentation is explicit, chosen per call, and never derived from `coar-mobile` or the
207
+ window width: a dialog opened without it stays the centered dialog, also inside a
208
+ `coar-mobile` area and on a narrow screen. Under `coar-mobile` the centered dialog keeps
209
+ clear of the window edges and stacks its footer buttons in full width; without the class it
210
+ looks as before.
211
+
212
+ ### Where the area is found
213
+
214
+ The overlay takes the nearest `.coar-mobile` ancestor of its context element.
215
+ The context is, in this order:
216
+
217
+ 1. the `context` option: of `useOverlay().open()` / `getOverlayService().open()`,
218
+ of the dialog config (`DialogConfig`, `ConfirmOptions`, the third argument of
219
+ `alert`);
220
+ 2. the element the overlay is anchored to (popover, select, menu, date picker);
221
+ 3. the parent overlay, for an overlay opened from inside another one.
222
+
223
+ Two callers set the context themselves:
224
+
225
+ - `useDialog()` called in a component's `setup()` uses that component's element
226
+ (the parent element for a fragment root) while the component is mounted.
227
+ - `useContextMenu().open(event)` remembers the element that was right-clicked
228
+ (`menu.target`), and `CoarContextMenu` passes it on.
229
+
230
+ Outside `setup()` (a store, a plain function, a router guard) `useDialog()` has
231
+ no component to use. Pass the context:
93
232
 
94
- Date/time pickers, select panels, dialogs, OTP inputs, grids, and editors do not
95
- have dedicated mobile presentations in this increment. In particular,
96
- `CoarZonedDateTimePicker` does not yet switch to a sheet or a stepped mobile flow.
97
- The class is the entry point for those future presentations, not a promise that
98
- all components are already adapted.
233
+ ```ts
234
+ const dialog = useDialog();
235
+
236
+ dialog.open(EditCustomer, { title: 'Edit customer', context: formEl });
237
+ dialog.confirm({ title: 'Delete?', message: 'This cannot be undone.', context: formEl });
238
+ dialog.alert('Saved', 'The customer was saved.', { context: formEl });
239
+ ```
240
+
241
+ ### Limits
242
+
243
+ - The area is looked up when the overlay opens. A `coar-mobile` class added
244
+ somewhere only afterwards is not picked up. Changes to the area's class or
245
+ inline style are followed: removing the class there removes it from the
246
+ overlay.
247
+ - A local `CoarThemeScope` is still followed only through an element anchor.
248
+ Dialogs and context menus take the mobile presentation of their area, but not
249
+ a local theme around it.
250
+ - Not covered: the theme editor and palette editor (developer tools), the
251
+ markdown editor's table handles, the document viewer's annotation popover, and
252
+ toasts (global, not tied to an area).
99
253
 
100
254
  ## Customizing the floors
101
255
 
@@ -110,14 +264,173 @@ desktop size tokens. Applications can override them locally:
110
264
  --coar-control-l-height: 60px;
111
265
  --coar-control-min-font-size: 18px;
112
266
  --coar-control-min-target-size: 48px;
267
+ --coar-control-row-min-height: 48px;
113
268
  }
114
269
  ```
115
270
 
116
271
  `--coar-control-min-size` separately controls the minimum clickable label size
117
272
  for checkboxes, radios, and switches (48px by default).
273
+ `--coar-control-row-min-height` is the minimum height of option, menu and listbox
274
+ rows (44px by default).
118
275
 
119
276
  Leave enough horizontal room for the field and its actions, especially for
120
277
  password fields with both clear/reveal buttons and number fields with steppers.
121
278
 
122
279
  The playground's `/mobile-controls` page demonstrates every size, local scope
123
280
  switching, nested themes, textarea behavior, and non-editable states.
281
+
282
+ ## Device support {#device-support}
283
+
284
+ Every component page states, under its title, how far it supports three device
285
+ classes:
286
+
287
+ - **Desktop** — mouse and keyboard.
288
+ - **Tablet** — touch without hover, in the default presentation.
289
+ - **Phone** — touch on a narrow screen, with `coar-mobile`.
290
+
291
+ Each class has one of four values:
292
+
293
+ | Value | Meaning |
294
+ |-------|---------|
295
+ | `ready` | Everything the page documents is reachable with that device's input and fits its width. On the phone an interactive component also needs a mobile presentation under `coar-mobile` that has left Preview. |
296
+ | `partial` | The main purpose works; the note on the page names the limit. |
297
+ | `planned` | Not adapted yet; an adaptation is planned. |
298
+ | `no` (shown as "not supported") | Not meant for this device. |
299
+
300
+ In a page's frontmatter this is one line, `devices: { desktop: ready, tablet: ready, phone: partial }`,
301
+ with a `devicesNote` when a value is `partial` or `no`.
302
+
303
+ The values state the result of design and code review. Automated touch tests
304
+ are only being added, and testing on real devices remains the job of the app.
305
+
306
+ **Form controls**
307
+
308
+ | Page | Desktop | Tablet | Phone | Note |
309
+ |---|---|---|---|---|
310
+ | [Button](../components/button.md) | ready | ready | partial | Mobile sizes under .coar-mobile; the mobile presentation is still Preview. |
311
+ | [Form Field](../components/form-field.md) | ready | ready | partial | Works on phones; the label and the status popover have no .coar-mobile presentation yet. |
312
+ | [Text Input](../components/text-input.md) | ready | ready | partial | Mobile sizes under .coar-mobile; the mobile presentation is still Preview. |
313
+ | [Number Input](../components/number-input.md) | ready | ready | partial | Mobile sizes under .coar-mobile; the mobile presentation is still Preview. |
314
+ | [Password Input](../components/password-input.md) | ready | ready | partial | Mobile sizes under .coar-mobile; the mobile presentation is still Preview. |
315
+ | [OTP Input](../components/otp-input.md) | ready | ready | partial | Mobile sizes under .coar-mobile (Preview); numeric keyboard and SMS autofill work on phones. |
316
+ | [Select](../components/select.md) | ready | ready | partial | Mobile field and option sizes under .coar-mobile (Preview); the panel stays a dropdown, a phone sheet is planned. |
317
+ | [Listbox](../components/listbox.md) | ready | partial | partial | Rows touch-sized under .coar-mobile (Preview), not in virtual mode; multi-highlight needs Ctrl/Shift. |
318
+ | [Dual Listbox](../components/dual-listbox.md) | ready | partial | planned | Move buttons work on touch; multi-highlight needs Ctrl/Shift, and drag needs dragEngine 'pointer'. |
319
+ | [Checkbox](../components/checkbox.md) | ready | ready | partial | Mobile sizes under .coar-mobile; the mobile presentation is still Preview. |
320
+ | [Checkbox Group](../components/checkbox-group.md) | ready | ready | partial | Mobile sizes under .coar-mobile; the mobile presentation is still Preview. |
321
+ | [Radio Group](../components/radio-group.md) | ready | ready | partial | Mobile sizes under .coar-mobile; the mobile presentation is still Preview. |
322
+ | [Switch](../components/switch.md) | ready | ready | partial | Mobile sizes under .coar-mobile; the mobile presentation is still Preview. |
323
+ | [Segmented Control](../components/segmented-control.md) | ready | ready | partial | Mobile sizes under .coar-mobile; the mobile presentation is still Preview. |
324
+ | [Date Picker](../components/date-picker.md) | ready | ready | partial | Mobile field sizes under .coar-mobile (Preview); the panel keeps its desktop layout, a phone sheet is planned. |
325
+ | [DateTime Picker](../components/date-time-picker.md) | ready | ready | partial | Mobile field sizes under .coar-mobile (Preview); the panel keeps its desktop layout, a phone sheet is planned. |
326
+ | [Zoned DateTime Picker](../components/zoned-date-time-picker.md) | ready | ready | partial | Mobile field sizes under .coar-mobile (Preview); the panel keeps its desktop layout, a phone sheet is planned. |
327
+ | [Date · optional time](../components/date-or-time-picker.md) | ready | ready | partial | Mobile field sizes under .coar-mobile (Preview); the panel keeps its desktop layout, a phone sheet is planned. |
328
+ | [Date Views](../components/date-views.md) | ready | ready | ready | |
329
+
330
+ **Display**
331
+
332
+ | Page | Desktop | Tablet | Phone | Note |
333
+ |---|---|---|---|---|
334
+ | [Avatar](../components/avatar.md) | ready | ready | ready | |
335
+ | [Badge](../components/badge.md) | ready | ready | ready | |
336
+ | [Card](../components/card.md) | ready | ready | ready | |
337
+ | [Code Block](../components/code-block.md) | ready | ready | partial | Readable and scrollable on phones; the copy and collapse buttons have no .coar-mobile presentation yet. |
338
+ | [Data List](../components/data-list.md) | ready | partial | planned | Item menus open on right-click and multi-select needs modifier keys, so both are hard to reach by touch. |
339
+ | [Divider](../components/divider.md) | ready | ready | ready | |
340
+ | [Link](../components/link.md) | ready | ready | ready | |
341
+ | [Note](../components/note.md) | ready | ready | ready | |
342
+ | [Notice](../components/notice.md) | ready | ready | ready | |
343
+ | [Progress Bar](../components/progress-bar.md) | ready | ready | ready | |
344
+ | [Spinner](../components/spinner.md) | ready | ready | ready | |
345
+ | [Table](../components/table.md) | ready | ready | partial | Wide tables need a scroll container from the host; nothing wraps them for narrow screens. |
346
+ | [Tag](../components/tag.md) | ready | partial | partial | The close button is a 10–14 px icon; only under .coar-mobile (Preview) does it get a 44 px touch target. |
347
+
348
+ **Navigation**
349
+
350
+ | Page | Desktop | Tablet | Phone | Note |
351
+ |---|---|---|---|---|
352
+ | [Menu](../components/menu.md) | ready | ready | partial | Touch-sized rows under .coar-mobile; the mobile presentation is still Preview. |
353
+ | [Context Menu](../components/context-menu.md) | ready | partial | planned | Opens on right-click; on touch that depends on the browser's long press, so offer your own trigger as well. |
354
+ | [Sidebar](../components/sidebar.md) | ready | partial | partial | Split-trigger flyouts open only on hover and icon-only labels are tooltips; no phone drawer. |
355
+ | [Navbar](../components/navbar.md) | ready | ready | partial | No collapsed or menu layout for narrow screens; slot content must fit the phone width. |
356
+ | [Tabs](../components/tabs.md) | ready | ready | partial | Touch-sized tabs under .coar-mobile (Preview), but the tab bar neither scrolls nor wraps, so many tabs overflow. |
357
+ | [Tree](../components/tree.md) | ready | partial | not supported | Desktop-first: right-click menus, HTML5 drag and hover-revealed row actions are not tuned for touch. |
358
+ | [Breadcrumb](../components/breadcrumb.md) | ready | ready | partial | Crumbs wrap to fit narrow screens, but their link targets are not enlarged under .coar-mobile. |
359
+ | [Pagination](../components/pagination.md) | ready | ready | partial | Mobile targets under .coar-mobile (Preview); use fewer maxVisiblePages on phones. |
360
+
361
+ **Layout**
362
+
363
+ | Page | Desktop | Tablet | Phone | Note |
364
+ |---|---|---|---|---|
365
+ | [Panel Layout](../components/panel-layout.md) | ready | partial | not supported | Resize dividers are 6 px wide and hard to hit by touch; the workbench layout is not meant for phones. |
366
+ | [Wizard](../components/wizard.md) | ready | ready | partial | Works on phones and the step indicator scrolls, but there is no .coar-mobile presentation yet. |
367
+
368
+ **Overlay**
369
+
370
+ | Page | Desktop | Tablet | Phone | Note |
371
+ |---|---|---|---|---|
372
+ | [Dialog](../components/dialog.md) | ready | ready | partial | Phone: use the bottom sheet (Preview); overlay-keyboard hosts need a native inset adapter. Android's back button does not close it. |
373
+ | [Popover](../components/popover.md) | ready | partial | planned | The default hover mode relies on emulated mouse events on touch; use mode 'click' or 'both'. |
374
+ | [Popconfirm](../components/popconfirm.md) | ready | ready | planned | Opens on tap; touch-sized popovers for phones are planned. |
375
+ | [Toast](../components/toast.md) | ready | ready | partial | Toasts are a fixed 380 px wide and overflow 360 px phone screens. |
376
+ | [Tooltip](../components/tooltip.md) | ready | partial | partial | Hints show on hover or focus, so touch users may not see them; keep essential information elsewhere. |
377
+
378
+ **Utilities**
379
+
380
+ | Page | Desktop | Tablet | Phone | Note |
381
+ |---|---|---|---|---|
382
+ | [Drag & Drop](../components/drag-drop.md) | ready | partial | partial | The default engine 'native' uses HTML5 drag events, made for the mouse; on touch use engine 'pointer' or 'auto'. |
383
+
384
+ **Content (@cocoar/vue-markdown, -editor, -form, -mermaid, @cocoar/vue-script-editor)**
385
+
386
+ | Page | Desktop | Tablet | Phone | Note |
387
+ |---|---|---|---|---|
388
+ | [Markdown](../components/markdown.md) | ready | ready | partial | Wide tables get no horizontal scroll container and can overflow narrow screens. |
389
+ | [Markdown Editor](../components/markdown-editor.md) | ready | partial | partial | Typing and the toolbar work on touch; table row/column grips and the code-block edit button need hover. |
390
+ | [Markdown Form](../components/markdown-form.md) | ready | ready | partial | Works on phones; its select and date fields still open the desktop panels. |
391
+ | [Diagrams](../components/markdown-diagrams.md) | ready | partial | partial | With zoomable, touch zooms with the buttons but cannot pan a zoomed diagram. |
392
+ | [Mermaid Diagram](../components/mermaid.md) | ready | partial | partial | With zoomable, touch zooms with the buttons but cannot pan a zoomed diagram. |
393
+ | [Script Editor](../components/script-editor.md) | ready | partial | not supported | Monaco does not support mobile browsers; touch editing has gaps and phones are out of scope. |
394
+
395
+ **Data Grid (@cocoar/vue-data-grid)**
396
+
397
+ | Page | Desktop | Tablet | Phone | Note |
398
+ |---|---|---|---|---|
399
+ | [Data Grid](../components/data-grid.md) | ready | partial | not supported | Touch scrolls and selects; editing starts with double-click and menus with right-click; not built for phones. |
400
+
401
+ **Page Builder (@cocoar/vue-page-builder)**
402
+
403
+ | Page | Desktop | Tablet | Phone | Note |
404
+ |---|---|---|---|---|
405
+ | [`<CoarPageBuilder>`](../components/page-builder/coar-page-builder.md) | ready | partial | not supported | Drag and drop works by touch; code editing uses Monaco, not made for touch; not meant for phones. |
406
+ | [`<CoarPageRenderer>`](../components/page-builder/coar-page-renderer.md) | ready | ready | partial | Responsive pages adapt to phone widths; its select and date fields still open desktop panels. |
407
+
408
+ **Document Viewer (@cocoar/vue-document-viewer)**
409
+
410
+ | Page | Desktop | Tablet | Phone | Note |
411
+ |---|---|---|---|---|
412
+ | [Document Viewer](../components/document-viewer/index.md) | ready | partial | partial | Pinch zoom and drawing work on touch; marker/ink style flyouts open only on hover; not adapted to phones. |
413
+ | [CoarDocumentViewer](../components/document-viewer/coar-document-viewer.md) | ready | partial | partial | Pinch zoom and drawing work on touch; marker/ink style flyouts open only on hover; not adapted to phones. |
414
+ | [Annotations](../components/document-viewer/annotations.md) | ready | partial | partial | Drawing works with touch; marker and ink width and color open only on hover; not adapted to phones. |
415
+
416
+ **Map (@cocoar/vue-map)**
417
+
418
+ | Page | Desktop | Tablet | Phone | Note |
419
+ |---|---|---|---|---|
420
+ | [Map](../components/map/index.md) | ready | ready | partial | Pan and zoom work by touch; the map's controls have no .coar-mobile presentation yet. |
421
+ | [Map Editor](../components/map/editor.md) | ready | partial | partial | Map editing works on touch; the point list's drag reorder is mouse-only and nothing is phone-adapted. |
422
+
423
+ **Calendar (@cocoar/vue-calendar)**
424
+
425
+ | Page | Desktop | Tablet | Phone | Note |
426
+ |---|---|---|---|---|
427
+ | [Calendar](../components/calendar/index.md) | ready | partial | planned | Taps, swipe paging and long-press selection work on touch; event resize handles are only 6 px tall. |
428
+ | [`<CoarCalendar>` — Composer](../components/calendar/coar-calendar.md) | ready | partial | planned | Taps, swipe paging and long-press selection work on touch; event resize handles are only 6 px tall. |
429
+ | [`<CoarYearView>` — Year View](../components/calendar/year-view.md) | ready | ready | planned | Tap to drill in works on touch; a phone presentation of the calendar is planned. |
430
+ | [Month Views](../components/calendar/month-view.md) | ready | partial | planned | Taps work on touch; multi-day bar resize handles are only 6 px and a touch on a pill always drags it. |
431
+ | [`<CoarDayView>` — Day View](../components/calendar/day-view.md) | ready | partial | planned | Taps, swipe paging and long-press selection work on touch; event resize handles are only 6 px tall. |
432
+ | [`<CoarWeekView>` — Week View](../components/calendar/week-view.md) | ready | partial | planned | Taps, swipe paging and long-press selection work on touch; event resize handles are only 6 px tall. |
433
+ | [`<CoarWorkWeekView>` — Work Week View](../components/calendar/work-week-view.md) | ready | partial | planned | Taps, swipe paging and long-press selection work on touch; event resize handles are only 6 px tall. |
434
+ | [Selecting time, drafts & bands](../components/calendar/time-selection.md) | ready | ready | planned | Long press selects on touch; the hover time indicator appears only for mouse and pen. |
435
+ | [`<CoarAgendaView>` — Agenda View](../components/calendar/agenda-view.md) | ready | ready | planned | Taps and scrolling work on touch; a phone presentation of the calendar is planned. |
436
+ | [`<CoarTimelineView>` — Timeline View](../components/calendar/timeline-view.md) | ready | ready | planned | Finger panning works like mouse panning; a phone presentation of the calendar is planned. |
@@ -12,6 +12,8 @@
12
12
  --coar-control-min-size: 48px;
13
13
  --coar-control-min-font-size: 16px;
14
14
  --coar-control-min-target-size: 44px;
15
+ /* Rows that a finger picks from a list: options, menu items. */
16
+ --coar-control-row-min-height: 44px;
15
17
  --coar-control-clear-opacity: 1;
16
18
  --coar-control-align-items: center;
17
19
  }
@@ -106,6 +106,15 @@
106
106
  --coar-dialog-border-radius: var(--coar-radius-l);
107
107
  --coar-dialog-background: var(--coar-background-neutral-primary);
108
108
 
109
+ /* Sheet (useDialog with presentation: 'sheet') — Preview */
110
+ --coar-sheet-border-radius: 16px;
111
+ --coar-sheet-padding: var(--coar-spacing-l);
112
+ --coar-sheet-top-gap: 24px;
113
+ --coar-sheet-handle-width: 36px;
114
+ --coar-sheet-handle-height: 4px;
115
+ --coar-sheet-handle-color: var(--coar-border-neutral-secondary);
116
+ --coar-sheet-handle-area-height: 20px;
117
+
109
118
  /* ==========================================================================
110
119
  TOAST
111
120
  ========================================================================== */