@cocoar/vue-ui 3.1.0 → 3.2.0-beta.6

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 (179) hide show
  1. package/dist/components/checkbox/CoarCheckbox.vue.d.ts +1 -1
  2. package/dist/components/checkbox/CoarCheckbox.vue.d.ts.map +1 -1
  3. package/dist/components/code-block/CoarCodeBlock.vue.d.ts +1 -1
  4. package/dist/components/code-block/CoarCodeBlock.vue.d.ts.map +1 -1
  5. package/dist/components/data-list/CoarDataList.vue.d.ts +158 -0
  6. package/dist/components/data-list/CoarDataList.vue.d.ts.map +1 -0
  7. package/dist/components/data-list/CoarDataListToolbar.vue.d.ts +30 -0
  8. package/dist/components/data-list/CoarDataListToolbar.vue.d.ts.map +1 -0
  9. package/dist/components/data-list/data-list-builder.d.ts +288 -0
  10. package/dist/components/data-list/data-list-builder.d.ts.map +1 -0
  11. package/dist/components/data-list/index.d.ts +12 -0
  12. package/dist/components/data-list/index.d.ts.map +1 -0
  13. package/dist/components/data-list/internal/compare.d.ts +14 -0
  14. package/dist/components/data-list/internal/compare.d.ts.map +1 -0
  15. package/dist/components/data-list/internal/reorder-core.d.ts +46 -0
  16. package/dist/components/data-list/internal/reorder-core.d.ts.map +1 -0
  17. package/dist/components/data-list/internal/search.d.ts +16 -0
  18. package/dist/components/data-list/internal/search.d.ts.map +1 -0
  19. package/dist/components/data-list/internal/useDataListLines.d.ts +92 -0
  20. package/dist/components/data-list/internal/useDataListLines.d.ts.map +1 -0
  21. package/dist/components/data-list/internal/useDataListReorder.d.ts +68 -0
  22. package/dist/components/data-list/internal/useDataListReorder.d.ts.map +1 -0
  23. package/dist/components/data-list/internal/useSearchHighlight.d.ts +19 -0
  24. package/dist/components/data-list/internal/useSearchHighlight.d.ts.map +1 -0
  25. package/dist/components/data-list/types.d.ts +185 -0
  26. package/dist/components/data-list/types.d.ts.map +1 -0
  27. package/dist/components/data-list/useDataListModel.d.ts +79 -0
  28. package/dist/components/data-list/useDataListModel.d.ts.map +1 -0
  29. package/dist/components/date-time/_shared/maskito-config.d.ts +7 -2
  30. package/dist/components/date-time/_shared/maskito-config.d.ts.map +1 -1
  31. package/dist/components/date-time/_shared/time-helpers.d.ts +11 -4
  32. package/dist/components/date-time/_shared/time-helpers.d.ts.map +1 -1
  33. package/dist/components/date-time/_shared/use-date-picker-base.d.ts +1 -1
  34. package/dist/components/date-time/plain-date-picker/CoarPlainDatePicker.vue.d.ts +1 -1
  35. package/dist/components/date-time/plain-date-picker/CoarPlainDatePicker.vue.d.ts.map +1 -1
  36. package/dist/components/date-time/plain-date-time-picker/CoarPlainDateTimePicker.vue.d.ts +1 -1
  37. package/dist/components/date-time/plain-date-time-picker/CoarPlainDateTimePicker.vue.d.ts.map +1 -1
  38. package/dist/components/date-time/zoned-date-time-picker/CoarZonedDateTimePicker.vue.d.ts +1 -1
  39. package/dist/components/date-time/zoned-date-time-picker/CoarZonedDateTimePicker.vue.d.ts.map +1 -1
  40. package/dist/components/dual-listbox/CoarDualListbox.vue.d.ts +3 -0
  41. package/dist/components/dual-listbox/CoarDualListbox.vue.d.ts.map +1 -1
  42. package/dist/components/form-field/CoarFormField.vue.d.ts +1 -1
  43. package/dist/components/form-field/CoarFormField.vue.d.ts.map +1 -1
  44. package/dist/components/icon/CoarIcon.vue.d.ts +2 -2
  45. package/dist/components/icon/CoarIcon.vue.d.ts.map +1 -1
  46. package/dist/components/listbox/CoarListbox.vue.d.ts +7 -0
  47. package/dist/components/listbox/CoarListbox.vue.d.ts.map +1 -1
  48. package/dist/components/number-input/CoarNumberInput.vue.d.ts +1 -1
  49. package/dist/components/number-input/CoarNumberInput.vue.d.ts.map +1 -1
  50. package/dist/components/otp-input/CoarOtpInput.vue.d.ts +1 -1
  51. package/dist/components/otp-input/CoarOtpInput.vue.d.ts.map +1 -1
  52. package/dist/components/password-input/CoarPasswordInput.vue.d.ts +1 -1
  53. package/dist/components/password-input/CoarPasswordInput.vue.d.ts.map +1 -1
  54. package/dist/components/switch/CoarSwitch.vue.d.ts +1 -1
  55. package/dist/components/switch/CoarSwitch.vue.d.ts.map +1 -1
  56. package/dist/components/text-input/CoarTextInput.vue.d.ts +1 -1
  57. package/dist/components/text-input/CoarTextInput.vue.d.ts.map +1 -1
  58. package/dist/composables/dragRegistry.d.ts +12 -0
  59. package/dist/composables/dragRegistry.d.ts.map +1 -1
  60. package/dist/composables/index.d.ts +2 -2
  61. package/dist/composables/index.d.ts.map +1 -1
  62. package/dist/composables/useDragDrop.d.ts +62 -6
  63. package/dist/composables/useDragDrop.d.ts.map +1 -1
  64. package/dist/composables/useVirtualList.d.ts +21 -1
  65. package/dist/composables/useVirtualList.d.ts.map +1 -1
  66. package/dist/index.css +1 -1
  67. package/dist/index.d.ts +4 -2
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +4508 -2039
  70. package/package.json +5 -3
  71. package/skills/cocoar-vue-ui/SKILL.md +244 -0
  72. package/skills/cocoar-vue-ui/references/components/avatar.md +178 -0
  73. package/skills/cocoar-vue-ui/references/components/badge.md +290 -0
  74. package/skills/cocoar-vue-ui/references/components/breadcrumb.md +238 -0
  75. package/skills/cocoar-vue-ui/references/components/button.md +252 -0
  76. package/skills/cocoar-vue-ui/references/components/calendar/agenda-view.md +353 -0
  77. package/skills/cocoar-vue-ui/references/components/calendar/coar-calendar.md +1645 -0
  78. package/skills/cocoar-vue-ui/references/components/calendar/day-view.md +361 -0
  79. package/skills/cocoar-vue-ui/references/components/calendar/index.md +312 -0
  80. package/skills/cocoar-vue-ui/references/components/calendar/month-view.md +475 -0
  81. package/skills/cocoar-vue-ui/references/components/calendar/performance.md +186 -0
  82. package/skills/cocoar-vue-ui/references/components/calendar/timeline-view.md +301 -0
  83. package/skills/cocoar-vue-ui/references/components/calendar/week-view.md +382 -0
  84. package/skills/cocoar-vue-ui/references/components/calendar/work-week-view.md +145 -0
  85. package/skills/cocoar-vue-ui/references/components/calendar/year-view.md +63 -0
  86. package/skills/cocoar-vue-ui/references/components/card.md +151 -0
  87. package/skills/cocoar-vue-ui/references/components/checkbox-group.md +103 -0
  88. package/skills/cocoar-vue-ui/references/components/checkbox.md +279 -0
  89. package/skills/cocoar-vue-ui/references/components/code-block.md +241 -0
  90. package/skills/cocoar-vue-ui/references/components/context-menu.md +355 -0
  91. package/skills/cocoar-vue-ui/references/components/data-grid/checkbox.md +213 -0
  92. package/skills/cocoar-vue-ui/references/components/data-grid/date-columns.md +272 -0
  93. package/skills/cocoar-vue-ui/references/components/data-grid/editing.md +236 -0
  94. package/skills/cocoar-vue-ui/references/components/data-grid/multi-select.md +193 -0
  95. package/skills/cocoar-vue-ui/references/components/data-grid/number.md +147 -0
  96. package/skills/cocoar-vue-ui/references/components/data-grid/select.md +202 -0
  97. package/skills/cocoar-vue-ui/references/components/data-grid/text.md +127 -0
  98. package/skills/cocoar-vue-ui/references/components/data-grid.md +1225 -0
  99. package/skills/cocoar-vue-ui/references/components/data-list.md +2121 -0
  100. package/skills/cocoar-vue-ui/references/components/date-or-time-picker.md +200 -0
  101. package/skills/cocoar-vue-ui/references/components/date-picker.md +203 -0
  102. package/skills/cocoar-vue-ui/references/components/date-time-picker.md +154 -0
  103. package/skills/cocoar-vue-ui/references/components/date-views.md +212 -0
  104. package/skills/cocoar-vue-ui/references/components/dialog.md +148 -0
  105. package/skills/cocoar-vue-ui/references/components/divider.md +157 -0
  106. package/skills/cocoar-vue-ui/references/components/document-viewer/annotations.md +400 -0
  107. package/skills/cocoar-vue-ui/references/components/document-viewer/coar-document-viewer.md +327 -0
  108. package/skills/cocoar-vue-ui/references/components/document-viewer/index.md +234 -0
  109. package/skills/cocoar-vue-ui/references/components/document-viewer/toolbar.md +221 -0
  110. package/skills/cocoar-vue-ui/references/components/drag-drop.md +267 -0
  111. package/skills/cocoar-vue-ui/references/components/dual-listbox.md +449 -0
  112. package/skills/cocoar-vue-ui/references/components/file-explorer/asset-store.md +327 -0
  113. package/skills/cocoar-vue-ui/references/components/file-explorer/in-memory-store.md +176 -0
  114. package/skills/cocoar-vue-ui/references/components/file-explorer/index.md +311 -0
  115. package/skills/cocoar-vue-ui/references/components/file-explorer/use-file-explorer.md +300 -0
  116. package/skills/cocoar-vue-ui/references/components/form-field.md +1025 -0
  117. package/skills/cocoar-vue-ui/references/components/fragment-parser.md +298 -0
  118. package/skills/cocoar-vue-ui/references/components/link.md +235 -0
  119. package/skills/cocoar-vue-ui/references/components/listbox.md +575 -0
  120. package/skills/cocoar-vue-ui/references/components/map/editor.md +448 -0
  121. package/skills/cocoar-vue-ui/references/components/map/index.md +351 -0
  122. package/skills/cocoar-vue-ui/references/components/markdown-diagrams.md +210 -0
  123. package/skills/cocoar-vue-ui/references/components/markdown-editor.md +1478 -0
  124. package/skills/cocoar-vue-ui/references/components/markdown-embeds.md +387 -0
  125. package/skills/cocoar-vue-ui/references/components/markdown-form.md +447 -0
  126. package/skills/cocoar-vue-ui/references/components/markdown.md +276 -0
  127. package/skills/cocoar-vue-ui/references/components/menu.md +380 -0
  128. package/skills/cocoar-vue-ui/references/components/mermaid.md +172 -0
  129. package/skills/cocoar-vue-ui/references/components/navbar.md +147 -0
  130. package/skills/cocoar-vue-ui/references/components/note.md +96 -0
  131. package/skills/cocoar-vue-ui/references/components/notice.md +131 -0
  132. package/skills/cocoar-vue-ui/references/components/number-input.md +215 -0
  133. package/skills/cocoar-vue-ui/references/components/otp-input.md +324 -0
  134. package/skills/cocoar-vue-ui/references/components/page-builder/authoring-contract.md +271 -0
  135. package/skills/cocoar-vue-ui/references/components/page-builder/coar-page-builder.md +476 -0
  136. package/skills/cocoar-vue-ui/references/components/page-builder/coar-page-renderer.md +677 -0
  137. package/skills/cocoar-vue-ui/references/components/page-builder/custom-elements.md +441 -0
  138. package/skills/cocoar-vue-ui/references/components/page-builder/idp-integration.md +122 -0
  139. package/skills/cocoar-vue-ui/references/components/page-builder/index.md +573 -0
  140. package/skills/cocoar-vue-ui/references/components/pagination.md +150 -0
  141. package/skills/cocoar-vue-ui/references/components/panel-layout.md +372 -0
  142. package/skills/cocoar-vue-ui/references/components/password-input.md +175 -0
  143. package/skills/cocoar-vue-ui/references/components/popconfirm.md +186 -0
  144. package/skills/cocoar-vue-ui/references/components/popover.md +173 -0
  145. package/skills/cocoar-vue-ui/references/components/progress-bar.md +178 -0
  146. package/skills/cocoar-vue-ui/references/components/radio-group.md +225 -0
  147. package/skills/cocoar-vue-ui/references/components/script-editor.md +1271 -0
  148. package/skills/cocoar-vue-ui/references/components/segmented-control.md +238 -0
  149. package/skills/cocoar-vue-ui/references/components/select.md +463 -0
  150. package/skills/cocoar-vue-ui/references/components/sidebar.md +421 -0
  151. package/skills/cocoar-vue-ui/references/components/spinner.md +132 -0
  152. package/skills/cocoar-vue-ui/references/components/switch.md +195 -0
  153. package/skills/cocoar-vue-ui/references/components/table.md +170 -0
  154. package/skills/cocoar-vue-ui/references/components/tabs.md +382 -0
  155. package/skills/cocoar-vue-ui/references/components/tag.md +178 -0
  156. package/skills/cocoar-vue-ui/references/components/text-input.md +256 -0
  157. package/skills/cocoar-vue-ui/references/components/toast.md +160 -0
  158. package/skills/cocoar-vue-ui/references/components/tooltip.md +121 -0
  159. package/skills/cocoar-vue-ui/references/components/transitions.md +193 -0
  160. package/skills/cocoar-vue-ui/references/components/tree.md +2388 -0
  161. package/skills/cocoar-vue-ui/references/components/virtual-list.md +212 -0
  162. package/skills/cocoar-vue-ui/references/components/wizard.md +251 -0
  163. package/skills/cocoar-vue-ui/references/components/zoned-date-time-picker.md +177 -0
  164. package/skills/cocoar-vue-ui/references/foundations/colors.md +708 -0
  165. package/skills/cocoar-vue-ui/references/foundations/design-principles.md +115 -0
  166. package/skills/cocoar-vue-ui/references/foundations/icons.md +381 -0
  167. package/skills/cocoar-vue-ui/references/foundations/localization/formatting.md +530 -0
  168. package/skills/cocoar-vue-ui/references/foundations/localization/setup.md +86 -0
  169. package/skills/cocoar-vue-ui/references/foundations/localization/timezones.md +182 -0
  170. package/skills/cocoar-vue-ui/references/foundations/localization/translations.md +305 -0
  171. package/skills/cocoar-vue-ui/references/foundations/motion.md +549 -0
  172. package/skills/cocoar-vue-ui/references/foundations/spacing.md +330 -0
  173. package/skills/cocoar-vue-ui/references/foundations/theming.md +140 -0
  174. package/skills/cocoar-vue-ui/references/foundations/typography.md +206 -0
  175. package/skills/cocoar-vue-ui/references/guide/error-handling.md +162 -0
  176. package/skills/cocoar-vue-ui/references/guide/getting-started.md +119 -0
  177. package/skills/cocoar-vue-ui/references/guide/migration-page-builder-3.md +207 -0
  178. package/skills/cocoar-vue-ui/references/guide/migration.md +140 -0
  179. package/skills/cocoar-vue-ui/references/guide/theming.md +98 -0
@@ -0,0 +1,172 @@
1
+ <!-- Generated from apps/docs/components/mermaid.md by apps/docs/scripts/sync-skill.mjs. Do not edit; edit the docs page. -->
2
+
3
+ # Mermaid Diagram (Preview)
4
+
5
+ A standalone [Mermaid](https://mermaid.js.org/) diagram component for Vue 3.
6
+ `<CoarMermaidDiagram :code>` renders a diagram from a Mermaid source **string** —
7
+ Cocoar-themed, lazy-loaded, with opt-in zoom/pan.
8
+
9
+ It knows **nothing about markdown** or any embedding layer — feed it a diagram
10
+ source and it renders. To turn ` ```mermaid ` fenced code blocks inside
11
+ `<CoarMarkdown>` into diagrams, use the thin adapter on the
12
+ [**Markdown Diagrams**](./markdown-diagrams.md) page (it registers this
13
+ same component as a fence renderer).
14
+
15
+ > **Info: Separate package**
16
+ >
17
+ ```bash
18
+ pnpm add @cocoar/vue-mermaid
19
+ ```
20
+ > `vue` is the only peer dependency. Mermaid is a regular dependency, imported
21
+ > **lazily** on first render (its own chunk). Import the stylesheet once:
22
+ >
23
+ ```ts
24
+ import '@cocoar/vue-mermaid/styles';
25
+ ```
26
+
27
+ **Demo — `mermaid/demos/MermaidBasic.vue`**
28
+
29
+ ```vue
30
+ <script setup lang="ts">
31
+ /**
32
+ * Standalone `<CoarMermaidDiagram>` — no markdown involved. Edit the source on
33
+ * the left; the component re-renders on the right. `zoomable` adds the
34
+ * +/−/⤢ controls, Ctrl/⌘+wheel zoom and drag-to-pan.
35
+ */
36
+ import { ref } from 'vue';
37
+ import { CoarMermaidDiagram } from '@cocoar/vue-mermaid';
38
+
39
+ const code = ref(`sequenceDiagram
40
+ autonumber
41
+ participant C as Client
42
+ participant S as Server
43
+ C->>S: Request
44
+ alt cache hit
45
+ S-->>C: 200 (cached)
46
+ else miss
47
+ S->>S: compute
48
+ S-->>C: 200
49
+ end`);
50
+ </script>
51
+
52
+ <template>
53
+ <ClientOnly>
54
+ <div class="mmd-demo">
55
+ <textarea v-model="code" class="mmd-demo__code" spellcheck="false" />
56
+ <div class="mmd-demo__out">
57
+ <CoarMermaidDiagram :code="code" zoomable />
58
+ </div>
59
+ </div>
60
+ </ClientOnly>
61
+ </template>
62
+
63
+ <style scoped>
64
+ .mmd-demo {
65
+ display: grid;
66
+ grid-template-columns: 1fr 1fr;
67
+ gap: 12px;
68
+ }
69
+ @media (max-width: 720px) {
70
+ .mmd-demo { grid-template-columns: 1fr; }
71
+ }
72
+ .mmd-demo__code {
73
+ min-height: 220px;
74
+ resize: vertical;
75
+ padding: 12px;
76
+ border: 1px solid var(--coar-border-neutral, #e2e2e2);
77
+ border-radius: var(--coar-radius-xl, 12px);
78
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
79
+ font-size: 12px;
80
+ line-height: 1.5;
81
+ }
82
+ .mmd-demo__out {
83
+ min-width: 0;
84
+ }
85
+ </style>
86
+ ```
87
+
88
+ ## Usage
89
+
90
+ ```vue
91
+ <template>
92
+ <CoarMermaidDiagram :code="code" zoomable />
93
+ </template>
94
+
95
+ <script setup lang="ts">
96
+ import { CoarMermaidDiagram } from '@cocoar/vue-mermaid';
97
+
98
+ const code = `
99
+ flowchart LR
100
+ A[Start] --> B{Choice}
101
+ B -->|yes| C[Do it]
102
+ B -->|no| D[Skip]
103
+ `;
104
+ </script>
105
+ ```
106
+
107
+ ## Props
108
+
109
+ | Prop | Type | Default | Description |
110
+ |---|---|---|---|
111
+ | `code` | `string` | — | The Mermaid diagram source. |
112
+ | `language` | `string` | `'mermaid'` | Info-string label; handy when one component is reused for several fence keys. |
113
+ | `zoomable` | `boolean` | `false` | Enable the zoom/pan viewport. |
114
+
115
+ ## How it works
116
+
117
+ - **Rendering is client-only** — Mermaid needs a DOM to measure and lay out, so
118
+ nothing renders on the server or before mount. (Wrap it in `<ClientOnly>` in an
119
+ SSR context like VitePress.)
120
+ - **Lazy** — Mermaid is dynamically imported on the first diagram, so pages
121
+ without one never pay for it.
122
+ - **Cocoar-themed** — design tokens map onto Mermaid's `themeVariables`. Cocoar
123
+ color tokens are `oklch(...)`, which Mermaid's parser can't read, so they're
124
+ normalized to sRGB first (via a 1×1 canvas).
125
+ - **Font-safe** — rendering waits for `document.fonts.ready`, so labels aren't
126
+ clipped by boxes that were measured before the web font loaded.
127
+ - **Security** — Mermaid runs with `securityLevel: 'strict'`; author diagram text
128
+ is treated as untrusted (HTML in labels is sanitized).
129
+ - **Invalid source degrades** to an error box that still shows the raw source —
130
+ it never throws up to the app.
131
+
132
+ > **Tip: Many diagrams on one page**
133
+ >
134
+ > Renders are serialized internally — `mermaid.render` shares global state and
135
+ > isn't concurrency-safe, so several diagrams mounting at once would otherwise
136
+ > corrupt each other.
137
+
138
+ ## Zoom & pan
139
+
140
+ With `zoomable`, the diagram sits in a fixed-height viewport with:
141
+
142
+ - **+ / − / ⤢ buttons** (top-right) — the primary, touch-friendly zoom;
143
+ - **Ctrl / ⌘ + wheel** — zoom toward the cursor;
144
+ - **drag** — pan (mouse / pen);
145
+ - **double-click** — reset.
146
+
147
+ Plain mouse-wheel scrolling is deliberately **not** captured, so a diagram never
148
+ traps the page scroll. On touch, one-finger scrolling still scrolls the page
149
+ (zoom via the buttons). Set the viewport height with the `--coar-mermaid-height`
150
+ CSS variable (default `420px`):
151
+
152
+ ```css
153
+ .my-diagram { --coar-mermaid-height: 600px; }
154
+ ```
155
+
156
+ ## Theming
157
+
158
+ Theming is applied automatically from the ambient Cocoar tokens. The mapping is
159
+ exported as pure functions if you need to build your own Mermaid config:
160
+
161
+ | Export | Description |
162
+ |---|---|
163
+ | `buildMermaidThemeVariables(getToken, resolveColor?)` | Cocoar token getter → Mermaid `themeVariables`. |
164
+ | `readCssTokens(el?)` | `getComputedStyle`-backed token getter. |
165
+ | `makeCssColorResolver()` | Canvas-backed CSS-color → sRGB resolver (handles `oklch(...)`). |
166
+
167
+ ## In markdown
168
+
169
+ To render diagrams from ` ```mermaid ` fences inside `<CoarMarkdown>`, don't wire
170
+ this component up by hand — install `@cocoar/vue-markdown-mermaid` and pass its
171
+ `mermaidFenceRenderers` to the viewer's `fenceRenderers` prop. See
172
+ [**Markdown Diagrams**](./markdown-diagrams.md).
@@ -0,0 +1,147 @@
1
+ <!-- Generated from apps/docs/components/navbar.md by apps/docs/scripts/sync-skill.mjs. Do not edit; edit the docs page. -->
2
+
3
+ # Navbar
4
+
5
+ A top-level navigation bar that anchors your application layout. It provides three flexible content slots -- start, center, and end -- so you can place a logo, navigation links, and user actions exactly where they belong. By default it uses a subtle shadow for visual elevation; switch to `bordered` for a flat look with a bottom border instead.
6
+
7
+ ```ts
8
+ import { CoarNavbar } from '@cocoar/vue-ui';
9
+ ```
10
+
11
+ ## Basic Usage (Elevated)
12
+
13
+ The default navbar casts a light shadow to separate it from the page content below. Use all three slots for a complete navigation layout: brand on the left, links in the center, and call-to-action buttons on the right.
14
+
15
+ **Demo — `navbar/demos/NavbarBasic.vue`**
16
+
17
+ ```vue
18
+ <template>
19
+ <div style="border: 1px solid var(--coar-border-neutral-secondary); border-radius: 8px; overflow: hidden;">
20
+ <CoarNavbar>
21
+ <template #start>
22
+ <strong style="font-size: var(--coar-body-base-size)">MyApp</strong>
23
+ </template>
24
+ <template #center>
25
+ <nav style="display: flex; gap: 16px;">
26
+ <a href="javascript:void(0)" style="color: var(--coar-text-neutral-secondary); text-decoration: none; font-size: var(--coar-body-small-base-size);">Home</a>
27
+ <a href="javascript:void(0)" style="color: var(--coar-text-neutral-secondary); text-decoration: none; font-size: var(--coar-body-small-base-size);">Features</a>
28
+ <a href="javascript:void(0)" style="color: var(--coar-text-neutral-secondary); text-decoration: none; font-size: var(--coar-body-small-base-size);">Pricing</a>
29
+ <a href="javascript:void(0)" style="color: var(--coar-text-neutral-secondary); text-decoration: none; font-size: var(--coar-body-small-base-size);">Docs</a>
30
+ </nav>
31
+ </template>
32
+ <template #end>
33
+ <CoarButton variant="ghost" size="s">Sign In</CoarButton>
34
+ <CoarButton variant="primary" size="s">Get Started</CoarButton>
35
+ </template>
36
+ </CoarNavbar>
37
+ </div>
38
+ </template>
39
+
40
+ <script setup lang="ts">
41
+ import { CoarNavbar, CoarButton } from '@cocoar/vue-ui';
42
+ </script>
43
+ ```
44
+
45
+ ## App Navbar with User Avatar
46
+
47
+ A common pattern for authenticated applications. The start slot holds the brand mark, the center slot contains primary navigation, and the end slot pairs notification controls with a user avatar.
48
+
49
+ **Demo — `navbar/demos/NavbarAvatar.vue`**
50
+
51
+ ```vue
52
+ <template>
53
+ <div style="border: 1px solid var(--coar-border-neutral-secondary); border-radius: 8px; overflow: hidden;">
54
+ <CoarNavbar>
55
+ <template #start>
56
+ <div style="display: flex; align-items: center; gap: 6px;">
57
+ <div style="width: 28px; height: 28px; background: var(--coar-background-accent-primary); color: white; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 14px;">C</div>
58
+ <strong style="font-size: var(--coar-body-base-size)">cocoar</strong>
59
+ </div>
60
+ </template>
61
+ <template #center>
62
+ <nav style="display: flex; gap: 16px;">
63
+ <a href="javascript:void(0)" style="color: var(--coar-text-neutral-secondary); text-decoration: none; font-size: var(--coar-body-small-base-size);">Dashboard</a>
64
+ <a href="javascript:void(0)" style="color: var(--coar-text-neutral-secondary); text-decoration: none; font-size: var(--coar-body-small-base-size);">Projects</a>
65
+ <a href="javascript:void(0)" style="color: var(--coar-text-neutral-secondary); text-decoration: none; font-size: var(--coar-body-small-base-size);">Team</a>
66
+ <a href="javascript:void(0)" style="color: var(--coar-text-neutral-secondary); text-decoration: none; font-size: var(--coar-body-small-base-size);">Reports</a>
67
+ </nav>
68
+ </template>
69
+ <template #end>
70
+ <CoarButton variant="ghost" icon-start="triangle-alert" size="s" aria-label="Notifications" />
71
+ <CoarAvatar name="John Doe" size="s" />
72
+ </template>
73
+ </CoarNavbar>
74
+ </div>
75
+ </template>
76
+
77
+ <script setup lang="ts">
78
+ import { CoarNavbar, CoarButton, CoarAvatar } from '@cocoar/vue-ui';
79
+ </script>
80
+ ```
81
+
82
+ ## Logo Only (Start Slot)
83
+
84
+ Not every navbar needs all three slots. For landing pages or simple tools, use just the start and end slots for a clean, minimal header.
85
+
86
+ **Demo — `navbar/demos/NavbarMinimal.vue`**
87
+
88
+ ```vue
89
+ <template>
90
+ <div style="border: 1px solid var(--coar-border-neutral-secondary); border-radius: 8px; overflow: hidden;">
91
+ <CoarNavbar>
92
+ <template #start>
93
+ <strong>Brand</strong>
94
+ </template>
95
+ <template #end>
96
+ <CoarButton variant="primary" size="s">Open App</CoarButton>
97
+ </template>
98
+ </CoarNavbar>
99
+ </div>
100
+ </template>
101
+
102
+ <script setup lang="ts">
103
+ import { CoarNavbar, CoarButton } from '@cocoar/vue-ui';
104
+ </script>
105
+ ```
106
+
107
+ ## Bordered (No Shadow)
108
+
109
+ Prefer a flat aesthetic? The `bordered` prop swaps the drop shadow for a thin bottom border, giving the navbar a lighter visual weight that works well in dense dashboards.
110
+
111
+ **Demo — `navbar/demos/NavbarBordered.vue`**
112
+
113
+ ```vue
114
+ <template>
115
+ <div style="border: 1px solid var(--coar-border-neutral-secondary); border-radius: 8px; overflow: hidden;">
116
+ <CoarNavbar bordered>
117
+ <template #start>
118
+ <strong>App</strong>
119
+ </template>
120
+ <template #end>
121
+ <CoarButton variant="ghost" size="s">Menu</CoarButton>
122
+ </template>
123
+ </CoarNavbar>
124
+ </div>
125
+ </template>
126
+
127
+ <script setup lang="ts">
128
+ import { CoarNavbar, CoarButton } from '@cocoar/vue-ui';
129
+ </script>
130
+ ```
131
+
132
+ ## API
133
+
134
+ ### Props
135
+
136
+ | Prop | Type | Default | Description |
137
+ |------|------|---------|-------------|
138
+ | `elevated` | `boolean` | `true` | Show subtle box-shadow elevation |
139
+ | `bordered` | `boolean` | `false` | Show bottom border instead of shadow |
140
+
141
+ ### Slots
142
+
143
+ | Slot | Description |
144
+ |------|-------------|
145
+ | `#start` | Left-aligned content (logo, brand name) |
146
+ | `#center` | Centered content (navigation links) |
147
+ | `#end` | Right-aligned content (actions, user menu) |
@@ -0,0 +1,96 @@
1
+ <!-- Generated from apps/docs/components/note.md by apps/docs/scripts/sync-skill.mjs. Do not edit; edit the docs page. -->
2
+
3
+ # Note
4
+
5
+ Notes call attention to supplementary information without interrupting the main content flow. Use them for tips, requirements, deprecation warnings, or any contextual message that readers should notice but shouldn't be blocked by. A colored left border and tinted background create just enough contrast to stand out.
6
+
7
+ ```ts
8
+ import { CoarNote } from '@cocoar/vue-ui';
9
+ ```
10
+
11
+ ## Color Variants
12
+
13
+ Six semantic variants communicate intent at a glance: `info` for tips, `success` for confirmations, `warning` for cautions, `error` for critical issues, `neutral` for general remarks, and `accent` for brand-specific callouts.
14
+
15
+ **Demo — `note/demos/NoteVariants.vue`**
16
+
17
+ ```vue
18
+ <template>
19
+ <div style="display: flex; flex-direction: column; gap: 8px;">
20
+ <CoarNote variant="info"><strong>Info:</strong> Informational message for guidance or context.</CoarNote>
21
+ <CoarNote variant="success"><strong>Success:</strong> Action completed successfully.</CoarNote>
22
+ <CoarNote variant="warning"><strong>Warning:</strong> Pay attention, potential issue ahead.</CoarNote>
23
+ <CoarNote variant="error"><strong>Error:</strong> Something went wrong. Action required.</CoarNote>
24
+ <CoarNote variant="neutral">Neutral note for general content without semantic meaning.</CoarNote>
25
+ <CoarNote variant="accent">Accent-colored note for brand-specific or promotional callouts.</CoarNote>
26
+ </div>
27
+ </template>
28
+
29
+ <script setup lang="ts">
30
+ import { CoarNote } from '@cocoar/vue-ui';
31
+ </script>
32
+ ```
33
+
34
+ ## Padding Sizes
35
+
36
+ Use `m` (the default) for standalone callouts, `s` inside compact layouts like cards or sidebars, and `l` for more prominent call-to-action notes.
37
+
38
+ **Demo — `note/demos/NotePadding.vue`**
39
+
40
+ ```vue
41
+ <template>
42
+ <div style="display: flex; flex-direction: column; gap: 8px;">
43
+ <CoarNote variant="info" padding="s">Small padding — compact notes in tight spaces.</CoarNote>
44
+ <CoarNote variant="info" padding="m">Medium padding (default) — standard note spacing.</CoarNote>
45
+ </div>
46
+ </template>
47
+
48
+ <script setup lang="ts">
49
+ import { CoarNote } from '@cocoar/vue-ui';
50
+ </script>
51
+ ```
52
+
53
+ ## Rich Content
54
+
55
+ The default slot accepts any HTML, so you can include links, bold text, inline code, and multi-line content without limitations.
56
+
57
+ **Demo — `note/demos/NoteRichContent.vue`**
58
+
59
+ ```vue
60
+ <template>
61
+ <div style="display: flex; flex-direction: column; gap: 8px;">
62
+ <CoarNote variant="info">
63
+ <strong>Did you know?</strong> The Temporal API is the modern JavaScript standard for date/time handling.
64
+ It provides <code>PlainDate</code>, <code>PlainDateTime</code>, and <code>ZonedDateTime</code> types
65
+ for precise date and time manipulation without timezone ambiguity.
66
+ </CoarNote>
67
+ <CoarNote variant="warning">
68
+ <strong>Breaking Change in v2.0:</strong> The <code>value</code> prop has been renamed to <code>modelValue</code>
69
+ to align with Vue 3's composition API conventions. Update your code before upgrading.
70
+ </CoarNote>
71
+ <CoarNote variant="success">
72
+ <strong>Migration Complete:</strong> Your project has been successfully upgraded to the latest version.
73
+ All components have been updated and tests are passing.
74
+ </CoarNote>
75
+ </div>
76
+ </template>
77
+
78
+ <script setup lang="ts">
79
+ import { CoarNote } from '@cocoar/vue-ui';
80
+ </script>
81
+ ```
82
+
83
+ ## API
84
+
85
+ ### Props
86
+
87
+ | Prop | Type | Default | Description |
88
+ |------|------|---------|-------------|
89
+ | `variant` | `'neutral' \| 'info' \| 'success' \| 'warning' \| 'error' \| 'accent'` | `'neutral'` | Note color variant |
90
+ | `padding` | `'s' \| 'm' \| 'l'` | `'m'` | Internal padding size |
91
+
92
+ ### Slots
93
+
94
+ | Slot | Description |
95
+ |------|-------------|
96
+ | `default` | Note content (supports rich HTML) |
@@ -0,0 +1,131 @@
1
+ <!-- Generated from apps/docs/components/notice.md by apps/docs/scripts/sync-skill.mjs. Do not edit; edit the docs page. -->
2
+
3
+ # Notice
4
+
5
+ Notices communicate short, timely status information. They are deliberately more compact than [Notes](./note.md): use a Notice for a sentence near a control or directly below an application header, and a Note for rich supporting content inside a page.
6
+
7
+ ```ts
8
+ import { CoarNotice } from '@cocoar/vue-ui';
9
+ ```
10
+
11
+ ## Variants
12
+
13
+ Every variant has its own semantic color and default icon. The icon can be replaced with the `icon` prop.
14
+
15
+ **Demo — `notice/demos/NoticeVariants.vue`**
16
+
17
+ ```vue
18
+ <script setup lang="ts">
19
+ import { CoarNotice } from '@cocoar/vue-ui';
20
+ </script>
21
+
22
+ <template>
23
+ <div class="notice-stack">
24
+ <CoarNotice variant="info" label="Information">A newer version is available.</CoarNotice>
25
+ <CoarNotice variant="success" label="Saved">All changes were stored successfully.</CoarNotice>
26
+ <CoarNotice variant="warning" label="Temporary storage">Uploaded files are removed on restart.</CoarNotice>
27
+ <CoarNotice variant="error" label="Connection failed">The service could not be reached.</CoarNotice>
28
+ <CoarNotice variant="neutral">Scheduled maintenance starts tonight at 22:00.</CoarNotice>
29
+ <CoarNotice variant="accent" label="New">Explore the updated workspace experience.</CoarNotice>
30
+ </div>
31
+ </template>
32
+
33
+ <style scoped>
34
+ .notice-stack {
35
+ display: grid;
36
+ gap: 8px;
37
+ }
38
+ </style>
39
+ ```
40
+
41
+ ## Banner
42
+
43
+ `placement="banner"` removes the radius and side borders so the Notice can sit flush below a header. The component is not sticky by itself—the surrounding application layout decides where it stays.
44
+
45
+ **Demo — `notice/demos/NoticeBanner.vue`**
46
+
47
+ ```vue
48
+ <script setup lang="ts">
49
+ import { CoarLink, CoarNotice } from '@cocoar/vue-ui';
50
+ </script>
51
+
52
+ <template>
53
+ <div class="banner-frame">
54
+ <div class="fake-header">Application header</div>
55
+ <CoarNotice placement="banner" variant="warning" label="Temporary storage">
56
+ Uploaded files are retained until the next restart.
57
+ <template #cta>
58
+ <CoarLink size="s">Configure storage →</CoarLink>
59
+ </template>
60
+ </CoarNotice>
61
+ <div class="fake-content">Application content</div>
62
+ </div>
63
+ </template>
64
+
65
+ <style scoped>
66
+ .banner-frame {
67
+ overflow: hidden;
68
+ border: 1px solid var(--coar-border-neutral-secondary);
69
+ border-radius: var(--coar-radius-s);
70
+ }
71
+
72
+ .fake-header {
73
+ padding: 14px 24px;
74
+ background: var(--coar-background-semantic-info-bold);
75
+ color: var(--coar-text-on-bold);
76
+ font-weight: 600;
77
+ }
78
+
79
+ .fake-content {
80
+ min-height: 92px;
81
+ padding: 24px;
82
+ color: var(--coar-text-neutral-secondary);
83
+ }
84
+ </style>
85
+ ```
86
+
87
+ Banner text always wraps. For compact inline use, `truncate` can deliberately keep a message on one line.
88
+
89
+ ## Details and actions
90
+
91
+ Keep the primary message short. Optional long-form information belongs in the `details` slot and opens in a popover. Put links or buttons in the `cta` slot; the Notice itself is intentionally not clickable.
92
+
93
+ **Demo — `notice/demos/NoticeActions.vue`**
94
+
95
+ ```vue
96
+ <script setup lang="ts">
97
+ import { CoarLink, CoarNotice } from '@cocoar/vue-ui';
98
+ </script>
99
+
100
+ <template>
101
+ <CoarNotice variant="info" label="Indexing">
102
+ Three files are still being processed.
103
+ <template #details>
104
+ Search results may be incomplete until all uploaded files have been indexed.
105
+ </template>
106
+ <template #cta>
107
+ <CoarLink size="s">View files</CoarLink>
108
+ </template>
109
+ </CoarNotice>
110
+ </template>
111
+ ```
112
+
113
+ ## API
114
+
115
+ ### Props
116
+
117
+ | Prop | Type | Default | Description |
118
+ |------|------|---------|-------------|
119
+ | `variant` | `'neutral' \| 'info' \| 'success' \| 'warning' \| 'error' \| 'accent'` | `'info'` | Semantic color and default icon |
120
+ | `placement` | `'inline' \| 'banner'` | `'inline'` | Bordered callout or edge-to-edge banner |
121
+ | `label` | `string` | — | Bold lead-in; a colon is added |
122
+ | `icon` | `string` | variant default | Custom icon name |
123
+ | `truncate` | `boolean` | `false` | Single-line inline content; ignored for banners |
124
+
125
+ ### Slots
126
+
127
+ | Slot | Description |
128
+ |------|-------------|
129
+ | `default` | Short primary message |
130
+ | `details` | Long-form content shown in a popover |
131
+ | `cta` | Link or button aligned to the right |