@motifx-community/ui 0.1.0-beta.5 → 0.1.0-beta.7

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 (277) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/README.md +7 -4
  3. package/dist/components/appbar/AppBar.d.ts +88 -0
  4. package/dist/components/appbar/app-bar-navigation-click-event-args.d.ts +9 -0
  5. package/dist/components/appbar/app-bar-navigation.d.ts +2 -0
  6. package/dist/components/appbar/app-bar-position.d.ts +2 -0
  7. package/dist/components/appbar/app-bar-props.d.ts +49 -0
  8. package/dist/components/appbar/app-bar-scroll-behavior.d.ts +2 -0
  9. package/dist/components/appbar/app-bar-title-align.d.ts +2 -0
  10. package/dist/components/appbar/app-bar-tone.d.ts +2 -0
  11. package/dist/components/appbar/index.d.ts +8 -0
  12. package/dist/components/barcode/Barcode.d.ts +62 -0
  13. package/dist/components/barcode/barcode-export-options.d.ts +9 -0
  14. package/dist/components/barcode/barcode-failed-event-args.d.ts +9 -0
  15. package/dist/components/barcode/barcode-props.d.ts +25 -0
  16. package/dist/components/barcode/index.d.ts +5 -0
  17. package/dist/components/bargauge/BarGauge.d.ts +120 -0
  18. package/dist/components/bargauge/bar-gauge-props.d.ts +38 -0
  19. package/dist/components/bargauge/index.d.ts +2 -0
  20. package/dist/components/bottomnavigation/BottomNavigation.d.ts +101 -0
  21. package/dist/components/bottomnavigation/bottom-navigation-item-click-event-args.d.ts +9 -0
  22. package/dist/components/bottomnavigation/bottom-navigation-item.d.ts +35 -0
  23. package/dist/components/bottomnavigation/bottom-navigation-label-mode.d.ts +2 -0
  24. package/dist/components/bottomnavigation/bottom-navigation-position.d.ts +2 -0
  25. package/dist/components/bottomnavigation/bottom-navigation-props.d.ts +31 -0
  26. package/dist/components/bottomnavigation/bottom-navigation-selecting-event-args.d.ts +5 -0
  27. package/dist/components/bottomnavigation/bottom-navigation-selection-changed-event-args.d.ts +11 -0
  28. package/dist/components/bottomnavigation/index.d.ts +8 -0
  29. package/dist/components/chart/Chart.d.ts +229 -0
  30. package/dist/components/chart/ChartLegend.d.ts +24 -0
  31. package/dist/components/chart/ChartPlot.d.ts +161 -0
  32. package/dist/components/chart/ChartTable.d.ts +68 -0
  33. package/dist/components/chart/ChartTooltip.d.ts +22 -0
  34. package/dist/components/chart/PartsPlot.d.ts +39 -0
  35. package/dist/components/chart/RadarPlot.d.ts +34 -0
  36. package/dist/components/chart/chart-axis-kind.d.ts +2 -0
  37. package/dist/components/chart/chart-axis.d.ts +31 -0
  38. package/dist/components/chart/chart-data-error-event-args.d.ts +7 -0
  39. package/dist/components/chart/chart-export-options.d.ts +7 -0
  40. package/dist/components/chart/chart-export.d.ts +12 -0
  41. package/dist/components/chart/chart-field.d.ts +2 -0
  42. package/dist/components/chart/chart-labels.d.ts +2 -0
  43. package/dist/components/chart/chart-legend-options.d.ts +10 -0
  44. package/dist/components/chart/chart-legend-position.d.ts +2 -0
  45. package/dist/components/chart/chart-look.d.ts +25 -0
  46. package/dist/components/chart/chart-mode-changed-event-args.d.ts +7 -0
  47. package/dist/components/chart/chart-mode.d.ts +2 -0
  48. package/dist/components/chart/chart-model.d.ts +105 -0
  49. package/dist/components/chart/chart-point-event-args.d.ts +9 -0
  50. package/dist/components/chart/chart-point-selection.d.ts +2 -0
  51. package/dist/components/chart/chart-point.d.ts +23 -0
  52. package/dist/components/chart/chart-props.d.ts +76 -0
  53. package/dist/components/chart/chart-reference.d.ts +12 -0
  54. package/dist/components/chart/chart-selection-changed-event-args.d.ts +8 -0
  55. package/dist/components/chart/chart-series-toggled-event-args.d.ts +10 -0
  56. package/dist/components/chart/chart-series-type.d.ts +6 -0
  57. package/dist/components/chart/chart-series.d.ts +55 -0
  58. package/dist/components/chart/chart-stacked.d.ts +2 -0
  59. package/dist/components/chart/chart-tooltip-context.d.ts +10 -0
  60. package/dist/components/chart/chart-tooltip-options.d.ts +10 -0
  61. package/dist/components/chart/chart-zoom-changed-event-args.d.ts +8 -0
  62. package/dist/components/chart/index.d.ts +21 -0
  63. package/dist/components/chart/legend-entry.d.ts +13 -0
  64. package/dist/components/chart/plot-text.d.ts +10 -0
  65. package/dist/components/chart/plot-view.d.ts +61 -0
  66. package/dist/components/datagrid/grid-lookup.d.ts +3 -3
  67. package/dist/components/datagrid/grid-settings.d.ts +3 -3
  68. package/dist/components/datagrid/model/GridData.d.ts +22 -3
  69. package/dist/components/datagrid/model/GridModel.d.ts +2 -0
  70. package/dist/components/gauge/Gauge.d.ts +179 -0
  71. package/dist/components/gauge/gauge-mark.d.ts +9 -0
  72. package/dist/components/gauge/gauge-marker.d.ts +2 -0
  73. package/dist/components/gauge/gauge-needle-shape.d.ts +2 -0
  74. package/dist/components/gauge/gauge-orientation.d.ts +2 -0
  75. package/dist/components/gauge/gauge-props.d.ts +58 -0
  76. package/dist/components/gauge/gauge-range.d.ts +11 -0
  77. package/dist/components/gauge/gauge-scale.d.ts +2 -0
  78. package/dist/components/gauge/gauge-shape.d.ts +43 -0
  79. package/dist/components/gauge/gauge-type.d.ts +2 -0
  80. package/dist/components/gauge/index.d.ts +9 -0
  81. package/dist/components/listbox/list-rows.d.ts +2 -0
  82. package/dist/components/otpinput/OtpInput.d.ts +73 -0
  83. package/dist/components/otpinput/index.d.ts +4 -0
  84. package/dist/components/otpinput/otp-charset.d.ts +2 -0
  85. package/dist/components/otpinput/otp-completed-event-args.d.ts +8 -0
  86. package/dist/components/otpinput/otp-input-props.d.ts +32 -0
  87. package/dist/components/qrcode/QRCode.d.ts +58 -0
  88. package/dist/components/qrcode/index.d.ts +5 -0
  89. package/dist/components/qrcode/qr-code-export-options.d.ts +9 -0
  90. package/dist/components/qrcode/qr-code-failed-event-args.d.ts +7 -0
  91. package/dist/components/qrcode/qr-code-props.d.ts +23 -0
  92. package/dist/components/signature/Signature.d.ts +100 -0
  93. package/dist/components/signature/index.d.ts +5 -0
  94. package/dist/components/signature/signature-draw.d.ts +15 -0
  95. package/dist/components/signature/signature-export-options.d.ts +11 -0
  96. package/dist/components/signature/signature-props.d.ts +30 -0
  97. package/dist/components/signature/signature-stroke-event-args.d.ts +9 -0
  98. package/dist/components/signature/signature-stroke.d.ts +11 -0
  99. package/dist/components/sparkline/Sparkline.d.ts +85 -0
  100. package/dist/components/sparkline/index.d.ts +4 -0
  101. package/dist/components/sparkline/sparkline-highlight.d.ts +2 -0
  102. package/dist/components/sparkline/sparkline-props.d.ts +34 -0
  103. package/dist/components/sparkline/sparkline-type.d.ts +2 -0
  104. package/dist/components/validationsummary/ValidationSummary.d.ts +1 -0
  105. package/dist/core/fonts-loaded.d.ts +2 -0
  106. package/dist/core/scroll-watch.d.ts +13 -0
  107. package/dist/core/ui-strings.d.ts +38 -0
  108. package/dist/generated/tokens.d.ts +3023 -863
  109. package/dist/index.d.ts +10 -0
  110. package/dist/index.js +55933 -47186
  111. package/dist/index.js.map +1 -1
  112. package/dist/locales/en.json +37 -1
  113. package/dist/locales/tr.json +37 -1
  114. package/dist/parts/chart/chart-paths.d.ts +30 -0
  115. package/dist/parts/chart/chart-scale.d.ts +13 -0
  116. package/dist/parts/chart/chart-text.d.ts +12 -0
  117. package/dist/parts/chart/nice-ticks.d.ts +6 -0
  118. package/dist/parts/chart/svg-parts.d.ts +12 -0
  119. package/dist/parts/chart/thin-out.d.ts +6 -0
  120. package/dist/parts/chart/time-ticks.d.ts +7 -0
  121. package/dist/parts/chart/token-lengths.d.ts +16 -0
  122. package/dist/parts/chart/value-motion.d.ts +16 -0
  123. package/dist/parts/code/barcode-encode.d.ts +23 -0
  124. package/dist/parts/code/code-image.d.ts +35 -0
  125. package/dist/parts/code/qr-encode.d.ts +10 -0
  126. package/dist/parts/data/DataItems.d.ts +2 -0
  127. package/dist/parts/data/KeyedItems.d.ts +1 -0
  128. package/dist/parts/field/Field.d.ts +2 -0
  129. package/dist/parts/list/OptionList.d.ts +6 -0
  130. package/dist/parts/list/item-source.d.ts +4 -0
  131. package/dist/styles.css +3043 -9
  132. package/dist/tokens/index.d.ts +3212 -967
  133. package/dist/tokens/index.js +3023 -863
  134. package/dist/tokens/index.js.map +1 -1
  135. package/dist/{tr-C5IXRzAH.js → tr-DhIFcH3c.js} +75 -3
  136. package/dist/{tr-C5IXRzAH.js.map → tr-DhIFcH3c.js.map} +1 -1
  137. package/docs/accordion.md +1 -1
  138. package/docs/actionsheet.md +1 -1
  139. package/docs/appbar.md +194 -0
  140. package/docs/avatar.md +1 -1
  141. package/docs/badge.md +1 -1
  142. package/docs/bar-gauge-angles.md +87 -0
  143. package/docs/bar-gauge-data.md +122 -0
  144. package/docs/bar-gauge-labels.md +78 -0
  145. package/docs/bar-gauge.md +98 -0
  146. package/docs/barcode.md +193 -0
  147. package/docs/bottomnavigation.md +258 -0
  148. package/docs/bottomsheet.md +1 -1
  149. package/docs/breadcrumb.md +1 -1
  150. package/docs/button.md +1 -1
  151. package/docs/buttongroup.md +1 -1
  152. package/docs/buttons.md +169 -0
  153. package/docs/calendar.md +1 -1
  154. package/docs/card.md +1 -1
  155. package/docs/chart-bars.md +142 -0
  156. package/docs/chart-candles.md +164 -0
  157. package/docs/chart-funnel.md +115 -0
  158. package/docs/chart-heatmap.md +93 -0
  159. package/docs/chart-lines.md +128 -0
  160. package/docs/chart-live.md +62 -0
  161. package/docs/chart-pie.md +125 -0
  162. package/docs/chart-radar.md +124 -0
  163. package/docs/chart-ranges.md +127 -0
  164. package/docs/chart-references.md +126 -0
  165. package/docs/chart-scatter.md +139 -0
  166. package/docs/chart-waterfall.md +111 -0
  167. package/docs/chart-zoom.md +95 -0
  168. package/docs/chart.md +427 -0
  169. package/docs/checkbox.md +1 -1
  170. package/docs/chip.md +1 -1
  171. package/docs/choice.md +151 -0
  172. package/docs/colorbox.md +1 -1
  173. package/docs/combobox.md +1 -1
  174. package/docs/control.md +1 -1
  175. package/docs/data.md +127 -0
  176. package/docs/datagrid-api.md +1 -1
  177. package/docs/datagrid-bands.md +1 -1
  178. package/docs/datagrid-drag-select.md +1 -1
  179. package/docs/datagrid-drag.md +1 -1
  180. package/docs/datagrid-editing.md +1 -1
  181. package/docs/datagrid-filtering.md +1 -1
  182. package/docs/datagrid-forms.md +1 -1
  183. package/docs/datagrid-grouping.md +62 -2
  184. package/docs/datagrid-layout.md +2 -2
  185. package/docs/datagrid-lookups.md +2 -2
  186. package/docs/datagrid-master-detail.md +1 -1
  187. package/docs/datagrid-scrolling.md +1 -1
  188. package/docs/datagrid-selection.md +1 -1
  189. package/docs/datagrid.md +1 -1
  190. package/docs/datebox.md +1 -1
  191. package/docs/daterangebox.md +1 -1
  192. package/docs/display.md +148 -0
  193. package/docs/draggable.md +1 -1
  194. package/docs/drawer.md +1 -1
  195. package/docs/dropdown.md +1 -1
  196. package/docs/editors.md +157 -0
  197. package/docs/feedback.md +138 -0
  198. package/docs/fileuploader.md +1 -1
  199. package/docs/filterbuilder.md +1 -1
  200. package/docs/formlayout.md +1 -1
  201. package/docs/foundations.md +79 -0
  202. package/docs/gallery.md +1 -1
  203. package/docs/gauge-base.md +78 -0
  204. package/docs/gauge-circular.md +101 -0
  205. package/docs/gauge-dashboards.md +134 -0
  206. package/docs/gauge-linear.md +84 -0
  207. package/docs/gauge-markers.md +135 -0
  208. package/docs/gauge-marks.md +108 -0
  209. package/docs/gauge-ranges.md +133 -0
  210. package/docs/gauge-scales.md +117 -0
  211. package/docs/gauge.md +152 -0
  212. package/docs/home.md +1 -1
  213. package/docs/keyboard.md +1 -1
  214. package/docs/language.md +1 -1
  215. package/docs/layout.md +1 -1
  216. package/docs/listbox.md +1 -1
  217. package/docs/loadpanel.md +1 -1
  218. package/docs/lookup.md +1 -1
  219. package/docs/menus.md +1 -1
  220. package/docs/multiview.md +1 -1
  221. package/docs/navigation.md +143 -0
  222. package/docs/numberbox.md +1 -1
  223. package/docs/otpinput.md +197 -0
  224. package/docs/pagination.md +1 -1
  225. package/docs/popover.md +1 -1
  226. package/docs/progress.md +1 -1
  227. package/docs/qrcode.md +179 -0
  228. package/docs/radiogroup.md +1 -1
  229. package/docs/rating.md +1 -1
  230. package/docs/resizable.md +1 -1
  231. package/docs/scheduler-agenda.md +1 -1
  232. package/docs/scheduler-big-data.md +1 -1
  233. package/docs/scheduler-editing.md +1 -1
  234. package/docs/scheduler-form.md +1 -1
  235. package/docs/scheduler-icalendar.md +1 -1
  236. package/docs/scheduler-mobile.md +1 -1
  237. package/docs/scheduler-recurrence.md +1 -1
  238. package/docs/scheduler-resources.md +1 -1
  239. package/docs/scheduler-timeline.md +1 -1
  240. package/docs/scheduler.md +1 -1
  241. package/docs/scrollview.md +1 -1
  242. package/docs/showcase-home.md +31 -0
  243. package/docs/showcase.md +1 -1
  244. package/docs/signature.md +208 -0
  245. package/docs/skeleton.md +1 -1
  246. package/docs/slider.md +1 -1
  247. package/docs/sortable.md +1 -1
  248. package/docs/sparkline.md +119 -0
  249. package/docs/speeddial.md +1 -1
  250. package/docs/splitter.md +1 -1
  251. package/docs/stepper.md +1 -1
  252. package/docs/switch.md +1 -1
  253. package/docs/tabdocs-dock.md +1 -1
  254. package/docs/tabdocs-drag.md +1 -1
  255. package/docs/tabdocs-menus.md +1 -1
  256. package/docs/tabdocs-mobile.md +1 -1
  257. package/docs/tabdocs-tabs.md +1 -1
  258. package/docs/tabdocs-windows.md +1 -1
  259. package/docs/tabdocs-workspace.md +1 -1
  260. package/docs/tabdocs.md +1 -1
  261. package/docs/tabs.md +1 -1
  262. package/docs/tagbox.md +1 -1
  263. package/docs/textarea.md +1 -1
  264. package/docs/textbox.md +1 -1
  265. package/docs/tileview.md +1 -1
  266. package/docs/timeline.md +1 -1
  267. package/docs/toast.md +1 -1
  268. package/docs/tokens.md +450 -1
  269. package/docs/toolbar.md +1 -1
  270. package/docs/tooltip.md +1 -1
  271. package/docs/treeview.md +1 -1
  272. package/docs/validationsummary.md +1 -1
  273. package/docs/window.md +1 -1
  274. package/docs/wizard.md +1 -1
  275. package/llms-full.txt +6725 -99
  276. package/llms.txt +50 -1
  277. package/package.json +5 -5
@@ -0,0 +1,148 @@
1
+ # Display
2
+
3
+ > Display · @motifx-community/ui 0.1.0-beta.7
4
+
5
+ Display components present content: people, counts and labels, cards, pictures, tiles, events in time, codes to scan, and placeholders while content loads.
6
+
7
+ ## A profile
8
+
9
+ A card with an avatar and placeholders while it loads, skills as chips to choose, the team as an avatar group, figures as tiles, projects in a gallery, the year on a timeline, codes to share, and a badge with the unread count.
10
+
11
+ ```tsx
12
+ import { reactive } from '@motifx/core';
13
+ import { Avatar, AvatarGroup, Badge, Barcode, Button, Card, Chip, ChipGroup, Gallery, QRCode, Skeleton, Switch, TileView, Timeline } from '@motifx-community/ui';
14
+
15
+ /** A picture for the gallery: a coloured scene as a data address, so nothing is fetched. */
16
+ function scene(hue: number): string {
17
+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 450"><defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="hsl(${hue} 55% 58%)"/><stop offset="1" stop-color="hsl(${hue + 40} 60% 32%)"/></linearGradient></defs><rect width="800" height="450" fill="url(#g)"/><circle cx="640" cy="120" r="64" fill="hsl(${hue + 180} 70% 88% / 0.55)"/><path d="M0 330 Q200 250 400 330 T800 330 V450 H0 Z" fill="hsl(${hue + 20} 50% 25% / 0.5)"/></svg>`;
18
+ return 'data:image/svg+xml;utf8,' + encodeURIComponent(svg);
19
+ }
20
+
21
+ const SKILLS = ['Design systems', 'Accessibility', 'Motion', 'Research', 'Prototyping'];
22
+
23
+ const STATS = [
24
+ { key: 'projects', text: 'Projects', value: '18', wide: 2 },
25
+ { key: 'reviews', text: 'Reviews', value: '124', wide: 1 },
26
+ { key: 'talks', text: 'Talks', value: '6', wide: 1 }
27
+ ];
28
+
29
+ /** A profile: a card with an avatar and a badge, skills as chips, figures as tiles, projects in a gallery, the year on a timeline, and codes to share; with placeholders while it loads. */
30
+ export default function DisplayDemo() {
31
+ const s = reactive({ loading: false, skills: ['Design systems', 'Accessibility'] as unknown, messages: 3 });
32
+ const tile = (stat: (typeof STATS)[number]) => () => (
33
+ <div class="ov-stat">
34
+ <strong>{stat.value}</strong>
35
+ <span>{stat.text}</span>
36
+ </div>
37
+ );
38
+
39
+ return (
40
+ <div class="ov-frame ov-display">
41
+ <div class="ov-bar">
42
+ <Switch label="Show as loading" x-model={() => s.loading} />
43
+ <span style="flex: 1 1 auto" />
44
+ <Button text="Messages" variant="outline" onclick={() => (s.messages = 0)}>
45
+ <Badge count={() => s.messages} position="top-end" label="Unread messages" />
46
+ </Button>
47
+ </div>
48
+ <div class="ov-grid">
49
+ <Card title="Ada Yılmaz" subtitle="Lead designer, Ankara" avatar={{ name: 'Ada Yılmaz', status: 'online' }}>
50
+ <Skeleton lines={3} loading={() => s.loading}>
51
+ <p class="ov-copy">Works on the design system and its five design languages, and leads the accessibility reviews.</p>
52
+ </Skeleton>
53
+ <ChipGroup selection="multiple" label="Skills" x-model={() => s.skills}>
54
+ {SKILLS.map(skill => (
55
+ <Chip text={skill} />
56
+ ))}
57
+ </ChipGroup>
58
+ <div class="ov-bar">
59
+ <span class="ov-muted">Works with</span>
60
+ <AvatarGroup max={3} total={7} label="Team">
61
+ <Avatar name="Deniz Kaya" />
62
+ <Avatar name="Elif Demir" />
63
+ <Avatar name="Mert Şahin" />
64
+ <Avatar name="Selin Aydın" />
65
+ </AvatarGroup>
66
+ </div>
67
+ </Card>
68
+ <div class="ov-stack">
69
+ <TileView label="Figures" height={150} baseItemWidth={110} baseItemHeight={64} items={STATS.map(st => ({ key: st.key, widthRatio: st.wide, content: tile(st) }))} />
70
+ <Gallery
71
+ label="Projects"
72
+ height={180}
73
+ items={[
74
+ { image: scene(205), alt: 'The booking app', text: 'Booking app' },
75
+ { image: scene(30), alt: 'The new store', text: 'Store' },
76
+ { image: scene(280), alt: 'The dashboard', text: 'Dashboard' }
77
+ ]}
78
+ />
79
+ </div>
80
+ <Timeline
81
+ label="This year"
82
+ items={[
83
+ { date: '2026-02-10', title: 'Joined the design system team', tone: 'info' },
84
+ { date: '2026-05-21', title: 'Shipped the new color tokens', tone: 'success' },
85
+ { date: '2026-09-03', title: 'Spoke at the accessibility meetup', glyph: 'person' },
86
+ { date: '2026-11-07', title: 'Leads the gauge review' }
87
+ ]}
88
+ />
89
+ <div class="ov-codes">
90
+ <QRCode value="https://ui.motifjs.com/display" size={120} label="Profile address" />
91
+ <Barcode value="EMP-20460" format="code128" height={56} label="Staff number" />
92
+ </div>
93
+ </div>
94
+ </div>
95
+ );
96
+ }
97
+ ```
98
+
99
+ ## Components in this group
100
+
101
+ Each component has its own page with its examples and its full API.
102
+
103
+ | Component | For |
104
+ | --- | --- |
105
+ | `[QRCode](qrcode.md)` | A code to scan, drawn as vectors. |
106
+ | `[Barcode](barcode.md)` | Code 128, Code 39, EAN, UPC and Interleaved 2 of 5. |
107
+ | `[Badge](badge.md)` | A count or a dot on a corner of another control. |
108
+ | `[Avatar](avatar.md)` | A person as a picture or initials, alone or in a group. |
109
+ | `[Chip](chip.md)` | A small label to choose, remove or press, alone or in a group. |
110
+ | `[Card](card.md)` | A summary of one thing, with media, a title, content and actions. |
111
+ | `[Gallery](gallery.md)` | Pictures or content one at a time, swiped or played as a slideshow. |
112
+ | `[TileView](tileview.md)` | Tiles of different sizes on a grid, chosen and reordered. |
113
+ | `[Timeline](timeline.md)` | Events in the order they happened, down or across. |
114
+ | `[Skeleton](skeleton.md)` | The shape of content that is still loading. |
115
+
116
+ ## Choosing a component
117
+
118
+ Several components can do the same job; this table points to the one that reads best for it.
119
+
120
+ | To | Use |
121
+ | --- | --- |
122
+ | `Show a count on something` | [Badge](badge.md) |
123
+ | `Show a person` | [Avatar](avatar.md) |
124
+ | `Show tags or quick filters` | [Chip](chip.md) |
125
+ | `Summarize one thing` | [Card](card.md) |
126
+ | `Show pictures one at a time` | [Gallery](gallery.md) |
127
+ | `Lay out items of different sizes` | [TileView](tileview.md) |
128
+ | `Show events in time` | [Timeline](timeline.md) |
129
+ | `Give a code to scan` | [QRCode](qrcode.md) or [Barcode](barcode.md) |
130
+ | `Keep the layout while content loads` | [Skeleton](skeleton.md) |
131
+
132
+ ## What they share
133
+
134
+ Content comes as props, as JSX children, or as a function that builds it, so a card or a tile can hold any control of the kit.
135
+
136
+ Pictures that fail to load fall back to something readable: an avatar to initials, a gallery to its caption.
137
+
138
+ ## Accessibility
139
+
140
+ | Topic | Details |
141
+ | --- | --- |
142
+ | `Names` | Codes, avatars and badges have a label that says what they show. |
143
+ | `Collections` | A gallery, a tile view and a timeline are one Tab stop, moved through with the arrow keys. |
144
+ | `Loading` | A skeleton is marked busy while it waits, and its content is read once it arrives. |
145
+
146
+ ## Feedback
147
+
148
+ Loading issues…
package/docs/draggable.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Draggable and DropTarget
2
2
 
3
- > Navigation · @motifx-community/ui 0.1.0-beta.5
3
+ > Navigation · @motifx-community/ui 0.1.0-beta.7
4
4
 
5
5
  Makes any content movable with the pointer, touch or the arrow keys, optionally along one axis, inside a boundary, by a handle or as a copy. `DropTarget` defines areas that accept it. To reorder items in a list, see [Sortable](sortable.md).
6
6
 
package/docs/drawer.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Drawer
2
2
 
3
- > Navigation · @motifx-community/ui 0.1.0-beta.5
3
+ > Navigation · @motifx-community/ui 0.1.0-beta.7
4
4
 
5
5
  A panel that slides in from an edge of the page or a container, either over the content or pushing it aside. Users can swipe it in from the edge and back out, and Escape, the scrim and the browser's back action close it.
6
6
 
package/docs/dropdown.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # DropDown
2
2
 
3
- > Choice · @motifx-community/ui 0.1.0-beta.5
3
+ > Choice · @motifx-community/ui 0.1.0-beta.7
4
4
 
5
5
  Selects one item from a list. The field shows the selected item, and the list opens below it on click or from the keyboard. The list can be searched, grouped and customized, and it stays fast with thousands of items.
6
6
 
@@ -0,0 +1,157 @@
1
+ # Editors
2
+
3
+ > Editors · @motifx-community/ui 0.1.0-beta.7
4
+
5
+ Editors take values: text, numbers, dates and times, ranges, colors, ratings, codes, files and signatures. They share one field model, so a label, help text, validation and binding work the same in all of them.
6
+
7
+ ## A booking form
8
+
9
+ Fourteen editors in one form. Book checks the required fields and their rules together, and the summary at the top lists what is missing, with links that move to each field.
10
+
11
+ ```tsx
12
+ import { reactive } from '@motifx/core';
13
+ import {
14
+ Button,
15
+ Calendar,
16
+ ColorBox,
17
+ DateBox,
18
+ DateRangeBox,
19
+ FileUploader,
20
+ NumberBox,
21
+ OtpInput,
22
+ Rating,
23
+ Signature,
24
+ Slider,
25
+ TextArea,
26
+ TextBox,
27
+ ValidationGroup,
28
+ ValidationSummary,
29
+ toast,
30
+ type DateRange
31
+ } from '@motifx-community/ui';
32
+
33
+ // Stands in for a server: takes a file in a second and reports how far it is.
34
+ const send = (file: File, report: (fraction: number) => void) =>
35
+ new Promise<string>(resolve => {
36
+ let step = 0;
37
+ const timer = setInterval(() => {
38
+ report(++step / 10);
39
+ if (step === 10) {
40
+ clearInterval(timer);
41
+ resolve(file.name);
42
+ }
43
+ }, 100);
44
+ });
45
+
46
+ /** A room booking: text, numbers, dates, a range, a choice of color, files, a code and a signature, checked together on Book. */
47
+ export default function EditorsDemo() {
48
+ const group = new ValidationGroup();
49
+ const today = new Date();
50
+ const b = reactive({
51
+ name: '',
52
+ email: '',
53
+ phone: '',
54
+ guests: 2,
55
+ stay: [null, null] as DateRange,
56
+ arrival: null as Date | null,
57
+ budget: [80, 180] as number[],
58
+ accent: '#2f7d6d' as string | null,
59
+ rating: 4,
60
+ notes: '',
61
+ code: '',
62
+ strokes: null as unknown,
63
+ day: today as Date | null
64
+ });
65
+
66
+ const book = async () => {
67
+ if (!(await group.validate())) return;
68
+ toast.success(`${b.name}, your room for ${b.guests} is booked.`, { title: 'Booked' });
69
+ };
70
+
71
+ return (
72
+ <div class="ov-frame ov-editors">
73
+ <h3 class="ov-title">Book a room</h3>
74
+ <ValidationSummary group={group} />
75
+ <div class="ov-grid">
76
+ <TextBox label="&Name" required x-model={() => b.name} validationGroup={group} />
77
+ <TextBox label="E-&mail" type="email" required rules={[{ type: 'email' }]} x-model={() => b.email} validationGroup={group} />
78
+ <TextBox label="&Phone" mask="(000) 000 00 00" x-model={() => b.phone} helpText="Only if we need to call you." />
79
+ <NumberBox label="&Guests" min={1} max={6} required x-model={() => b.guests} validationGroup={group} />
80
+ <DateRangeBox label="&Stay" required min={today} minDays={1} x-model={() => b.stay} validationGroup={group} />
81
+ <DateBox label="&Arrival time" type="time" timeStep={30} x-model={() => b.arrival} />
82
+ <Slider label="Budget a night" range min={40} max={300} step={10} x-model={() => b.budget} format={{ style: 'currency', currency: 'EUR', maximumFractionDigits: 0 }} showValue="drag" />
83
+ <ColorBox label="Room light" x-model={() => b.accent} />
84
+ <Rating label="Your last stay" x-model={() => b.rating} />
85
+ <OtpInput label="Member code" length={6} x-model={() => b.code} helpText="Six digits from the member card." />
86
+ <TextArea class="ov-wide" stretch label="Wishes" autoGrow maxLength={300} showCounter x-model={() => b.notes} />
87
+ <FileUploader class="ov-wide" stretch label="Identity document" accept="image/*,.pdf" maxFiles={1} upload={send} />
88
+ <Signature label="Signature" height={140} x-model={() => b.strokes} />
89
+ <Calendar x-model={() => b.day} min={today} />
90
+ </div>
91
+ <div class="ov-status">
92
+ <output class="ov-editors-sum">{() => `${b.guests} guest(s), ${b.budget[0]} to ${b.budget[1]} EUR a night`}</output>
93
+ <div class="ov-bar">
94
+ <Button text="Start again" variant="outline" onclick={() => group.reset()} />
95
+ <Button class="ov-book" text="&Book" tone="accent" onclick={() => void book()} />
96
+ </div>
97
+ </div>
98
+ </div>
99
+ );
100
+ }
101
+ ```
102
+
103
+ ## Components in this group
104
+
105
+ Each component has its own page with its examples and its full API.
106
+
107
+ | Component | For |
108
+ | --- | --- |
109
+ | `[TextBox](textbox.md)` | A line of text, with a mask, a type such as e-mail, a counter or a clear button. |
110
+ | `[TextArea](textarea.md)` | Longer text that grows with its content. |
111
+ | `[NumberBox](numberbox.md)` | A number in the formats of the language, with limits and spin buttons. |
112
+ | `[DateBox](datebox.md)` | A date, a time or both, typed or picked. |
113
+ | `[DateRangeBox](daterangebox.md)` | A start and an end, with presets and limits on the length. |
114
+ | `[Signature](signature.md)` | A signature drawn with a pen, a finger or a mouse, kept as strokes. |
115
+ | `[OtpInput](otpinput.md)` | A one-time code in a row of boxes. |
116
+ | `[ColorBox](colorbox.md)` | A color, typed or picked. |
117
+ | `[Calendar](calendar.md)` | A month always on show, to pick a day or a range. |
118
+ | `[Slider](slider.md)` | A value or a range picked by dragging. |
119
+ | `[Rating](rating.md)` | A score in stars or other marks. |
120
+ | `[ValidationSummary](validationsummary.md)` | The invalid fields of a group, with links to them. |
121
+ | `[FileUploader](fileuploader.md)` | Files dropped or chosen, with limits, progress and uploading in chunks. |
122
+
123
+ ## Choosing a component
124
+
125
+ Several components can do the same job; this table points to the one that reads best for it.
126
+
127
+ | To | Use |
128
+ | --- | --- |
129
+ | `Take a short text, or one with a fixed pattern` | [TextBox](textbox.md) |
130
+ | `Take a longer text` | [TextArea](textarea.md) |
131
+ | `Take an exact number` | [NumberBox](numberbox.md) |
132
+ | `Pick a number or a range by feel` | [Slider](slider.md) |
133
+ | `Take one date or time` | [DateBox](datebox.md) |
134
+ | `Take a start and an end` | [DateRangeBox](daterangebox.md) |
135
+ | `Show a month all the time` | [Calendar](calendar.md) |
136
+ | `Take a code sent by message` | [OtpInput](otpinput.md) |
137
+ | `Take files` | [FileUploader](fileuploader.md) |
138
+
139
+ ## What they share
140
+
141
+ Every editor is a field: `label` with an access key, `helpText`, `prefix` and `suffix`, `readOnly`, `stretch`, and `x-model` for its value. The value is the developer's own: a field reads it and writes it back, and never wraps it.
142
+
143
+ `required` and `rules` check the value; the error shows under the field once the reader leaves it. A `ValidationGroup` checks several fields at once, and a `ValidationSummary` lists the ones that failed.
144
+
145
+ Numbers, dates and times follow the language of the kit, and change at once when it changes.
146
+
147
+ ## Accessibility
148
+
149
+ | Topic | Details |
150
+ | --- | --- |
151
+ | `Names` | The label names the field; help text and the error are read with it. |
152
+ | `Errors` | An invalid field is marked invalid for assistive technology, and its message is announced. |
153
+ | `Keyboard` | Every editor works without a pointer: pickers open with Alt+Down, sliders move with the arrow keys, Page Up and Page Down. |
154
+
155
+ ## Feedback
156
+
157
+ Loading issues…
@@ -0,0 +1,138 @@
1
+ # Feedback
2
+
3
+ > Feedback · @motifx-community/ui 0.1.0-beta.7
4
+
5
+ Feedback components tell the reader what is happening: how far a task has come, that something is loading, what a control does, and what has just happened.
6
+
7
+ ## Syncing a folder
8
+
9
+ Sync now shows a spinner while it connects and a bar while it copies, then a toast; Stop leaves a toast with a way to go on. Refresh covers the list with a load panel, Remove undoes from its toast, the button has a tooltip and the info button opens a popover.
10
+
11
+ ```tsx
12
+ import { reactive } from '@motifx/core';
13
+ import { Button, LoadPanel, Panel, Popover, ProgressBar, Spinner, Tooltip, toast } from '@motifx-community/ui';
14
+
15
+ const FILES = ['report.pdf', 'budget.xlsx', 'logo.svg', 'notes.md', 'photos.zip', 'plan.docx'];
16
+
17
+ /** Syncing files: a spinner while it connects, a bar while it copies, a panel that blocks the list while it refreshes, a tooltip, a popover and toasts. */
18
+ export default function FeedbackDemo() {
19
+ const s = reactive({ state: 'idle' as 'idle' | 'connecting' | 'copying' | 'done', copied: 0, refreshing: false, details: false, files: [...FILES] });
20
+ let sync!: Button;
21
+ let info!: Button;
22
+ let list!: Panel;
23
+ let timer = 0;
24
+
25
+ const start = () => {
26
+ s.state = 'connecting';
27
+ s.copied = 0;
28
+ timer = window.setTimeout(() => {
29
+ s.state = 'copying';
30
+ timer = window.setInterval(() => {
31
+ s.copied++;
32
+ if (s.copied < FILES.length) return;
33
+ clearInterval(timer);
34
+ s.state = 'done';
35
+ toast.success(`${FILES.length} files are up to date.`, { title: 'Synced' });
36
+ }, 450);
37
+ }, 900);
38
+ };
39
+ const stop = () => {
40
+ clearTimeout(timer);
41
+ clearInterval(timer);
42
+ s.state = 'idle';
43
+ toast.caution('Syncing stopped. Files copied so far are kept.', { action: { text: 'Go on', click: start } });
44
+ };
45
+ const refresh = () => {
46
+ s.refreshing = true;
47
+ setTimeout(() => (s.refreshing = false), 1500);
48
+ };
49
+ const remove = () => {
50
+ const file = s.files.pop();
51
+ if (file) toast.info(`${file} removed.`, { action: { text: 'Undo', click: () => s.files.push(file) } });
52
+ };
53
+
54
+ return (
55
+ <div class="ov-frame ov-feedback" onDisposing={() => (clearTimeout(timer), clearInterval(timer))}>
56
+ <div class="ov-bar">
57
+ <h3 class="ov-title" style="flex: 1 1 auto">Shared folder</h3>
58
+ <Button ref={(b: Button) => (info = b)} icon={() => <span class="mx-glyph" data-icon="info" />} variant="ghost" aria-label="About syncing" />
59
+ <Button ref={(b: Button) => (sync = b)} text={() => (s.state === 'connecting' || s.state === 'copying' ? 'Stop' : 'Sync now')} tone="accent" onclick={() => (s.state === 'connecting' || s.state === 'copying' ? stop() : start())} />
60
+ </div>
61
+ <Tooltip target={() => sync} text="Copies the changed files to the shared folder." />
62
+ <Popover target={() => info} title="About syncing" showClose x-model={() => s.details}>
63
+ Files you change on this computer are copied to the shared folder. A file changed in both places keeps both copies.
64
+ </Popover>
65
+ <div class="ov-sync">
66
+ {s.state === 'connecting' ? (
67
+ <Spinner label="Connecting to the server" labelPosition="side" />
68
+ ) : (
69
+ <ProgressBar
70
+ class="ov-sync-bar"
71
+ label={() => (s.state === 'done' ? 'Up to date' : s.state === 'copying' ? 'Copying files' : 'Not synced yet')}
72
+ value={() => s.copied}
73
+ max={FILES.length}
74
+ showValue
75
+ stretch
76
+ tone={() => (s.state === 'done' ? 'success' : 'accent')}
77
+ />
78
+ )}
79
+ </div>
80
+ <Panel ref={(p: Panel) => (list = p)} variant="outline" padding="md" class="ov-files">
81
+ <ul class="ov-file-list">
82
+ {s.files.map(f => (
83
+ <li>{f}</li>
84
+ ))}
85
+ </ul>
86
+ </Panel>
87
+ <LoadPanel target={() => list} message="Refreshing the list" x-model={() => s.refreshing} />
88
+ <div class="ov-bar">
89
+ <Button text="Refresh the list" variant="outline" onclick={refresh} />
90
+ <Button text="Remove the last file" variant="outline" enabled={() => s.files.length > 0} onclick={remove} />
91
+ </div>
92
+ </div>
93
+ );
94
+ }
95
+ ```
96
+
97
+ ## Components in this group
98
+
99
+ Each component has its own page with its examples and its full API.
100
+
101
+ | Component | For |
102
+ | --- | --- |
103
+ | `[ProgressBar and Spinner](progress.md)` | How far a task has come, or that it is under way. |
104
+ | `[Tooltip](tooltip.md)` | A short name or hint for a control, on hover or focus. |
105
+ | `[Popover](popover.md)` | More detail or a small form beside a control. |
106
+ | `[LoadPanel](loadpanel.md)` | A panel over a region or the page while it loads. |
107
+ | `[Toast](toast.md)` | A short message about what has just happened, with an action such as Undo. |
108
+
109
+ ## Choosing a component
110
+
111
+ Several components can do the same job; this table points to the one that reads best for it.
112
+
113
+ | To | Use |
114
+ | --- | --- |
115
+ | `Show progress that can be measured` | [ProgressBar](progress.md) |
116
+ | `Show a short wait of unknown length` | [Spinner](progress.md) |
117
+ | `Keep a region from use while it loads` | [LoadPanel](loadpanel.md) |
118
+ | `Name or explain a control` | [Tooltip](tooltip.md) |
119
+ | `Show more beside a control, or ask for a little` | [Popover](popover.md) |
120
+ | `Report the result of an action` | [Toast](toast.md) |
121
+
122
+ ## What they share
123
+
124
+ A delay keeps quick work from flashing a spinner or a panel; it shows only when the wait is long enough to notice.
125
+
126
+ Tones come from the design language: info, success, caution and danger, never by color alone but with an icon and words.
127
+
128
+ ## Accessibility
129
+
130
+ | Topic | Details |
131
+ | --- | --- |
132
+ | `Announcements` | Progress is read as a value; info and success toasts are announced politely, caution and danger ones at once. |
133
+ | `Tooltips` | A tooltip shows on focus as well as on hover, and Escape hides it. |
134
+ | `Focus` | A popover takes focus when it opens and gives it back when it closes; a load panel keeps focus out of what it covers. |
135
+
136
+ ## Feedback
137
+
138
+ Loading issues…
@@ -1,6 +1,6 @@
1
1
  # FileUploader
2
2
 
3
- > Editors · @motifx-community/ui 0.1.0-beta.5
3
+ > Editors · @motifx-community/ui 0.1.0-beta.7
4
4
 
5
5
  Lets users select files with a button or drop them on the box. Files are listed with their size and status, and can upload automatically, on a button click or programmatically, with progress, cancel, retry and remove for each file. Files that exceed the limits are listed with the reason.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # FilterBuilder
2
2
 
3
- > Data · @motifx-community/ui 0.1.0-beta.5
3
+ > Data · @motifx-community/ui 0.1.0-beta.7
4
4
 
5
5
  Lets users build a filter visually, using groups joined by And, Or, Not And or Not Or, and conditions made of a field, an operation and a value. Its value is a data layer filter expression, so it works directly with in-memory rows and every adapter. DataGrid opens it from the filter panel, and you can also use it on its own for reports or saved searches.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # FormLayout
2
2
 
3
- > Navigation · @motifx-community/ui 0.1.0-beta.5
3
+ > Navigation · @motifx-community/ui 0.1.0-beta.7
4
4
 
5
5
  Arranges the fields of a data object on a grid. Each field gets an editor, chosen by name or by the type of its value, with two-way binding to the object. Groups, column spans and buttons organize the layout, and submitting the form validates every field first.
6
6
 
@@ -0,0 +1,79 @@
1
+ # Foundations
2
+
3
+ > Foundations · @motifx-community/ui 0.1.0-beta.7
4
+
5
+ The foundations are what every control of the kit shares: the Control base with its properties, keyboard and focus, and the language of the texts and formats.
6
+
7
+ ## What every control shares
8
+
9
+ Access keys with Alt on buttons and labels, one Tab stop for each control, a switch that turns a whole panel off, and the kit's language switched live with every text and format drawn again.
10
+
11
+ ```tsx
12
+ import { reactive } from '@motifx/core';
13
+ import { Button, DateBox, NumberBox, Pagination, Panel, Switch, uiLocale } from '@motifx-community/ui';
14
+ import { kitTexts } from '../../../shared/kit-texts';
15
+
16
+ /** What every control shares: access keys with Alt, one Tab stop per control, a panel that turns everything inside off, and the kit's language switched live. */
17
+ export default function FoundationsDemo() {
18
+ const s = reactive({ price: 1234.5, when: new Date(2026, 2, 18) as Date | null, locked: false, log: 'Press Alt with an underlined letter.' });
19
+ let panel!: Panel;
20
+
21
+ return (
22
+ <div class="ov-frame ov-foundations">
23
+ <div class="ov-bar">
24
+ <Button text="&English" variant="outline" onclick={() => void uiLocale.use('en')} />
25
+ <Button text="&Türkçe" variant="outline" onclick={() => void uiLocale.use('tr')} />
26
+ <span class="ov-muted">
27
+ In use: <output class="ov-locale">{() => kitTexts.locale}</output>
28
+ </span>
29
+ <span style="flex: 1 1 auto" />
30
+ <Switch label="&Lock the form" x-model={() => s.locked} onValueChanged={e => (panel.enabled = !e.value)} />
31
+ </div>
32
+ <Panel ref={(p: Panel) => (panel = p)} variant="outline" padding="md">
33
+ <div class="ov-stack">
34
+ <div class="ov-grid">
35
+ <NumberBox label="&Price" x-model={() => s.price} format={{ style: 'currency', currency: 'EUR' }} />
36
+ <DateBox label="&Date" x-model={() => s.when} clearButton />
37
+ <Pagination class="ov-wide" total={95} pageSizes={[10, 20, 50]} label="Orders" />
38
+ </div>
39
+ <div class="ov-bar">
40
+ <Button text="&Save" tone="accent" onclick={() => (s.log = 'Saved with Alt+S or a click.')} />
41
+ <Button text="&Reset" variant="outline" onclick={() => (s.log = 'Reset with Alt+R or a click.')} />
42
+ </div>
43
+ </div>
44
+ </Panel>
45
+ <output class="ov-status ov-foundations-log">{() => s.log}</output>
46
+ </div>
47
+ );
48
+ }
49
+ ```
50
+
51
+ ## Components in this group
52
+
53
+ Each component has its own page with its examples and its full API.
54
+
55
+ | Component | For |
56
+ | --- | --- |
57
+ | `[Control](control.md)` | The base of every control: properties set as values or functions, enabled through the tree, and controls added programmatically. |
58
+ | `[Keyboard and focus](keyboard.md)` | Access keys, shortcuts, the Tab order and keeping focus where it belongs. |
59
+ | `[Language](language.md)` | The kit's texts and formats, loaded as packs and switched live. |
60
+
61
+ ## What they share
62
+
63
+ Every prop is also a property: a value is taken as it is, and a function is followed, so a control changes with the data without copying it.
64
+
65
+ Enabled and visible pass down the tree: a disabled panel disables everything inside, and each control keeps its own setting for when the panel comes back.
66
+
67
+ Texts and formats come from the language in use; a page can switch it at any time, and every control draws again.
68
+
69
+ ## Accessibility
70
+
71
+ | Topic | Details |
72
+ | --- | --- |
73
+ | `Keyboard` | Every control works with the keyboard alone, and access keys reach a command or a field in one step. |
74
+ | `Focus` | Focus is always visible, and it returns to a sensible place when a panel closes or a control goes away. |
75
+ | `Language` | The page language follows the kit's, so assistive technology reads texts in the right language. |
76
+
77
+ ## Feedback
78
+
79
+ Loading issues…
package/docs/gallery.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Gallery
2
2
 
3
- > Display · @motifx-community/ui 0.1.0-beta.5
3
+ > Display · @motifx-community/ui 0.1.0-beta.7
4
4
 
5
5
  Displays a horizontal set of slides, one or several at a time. Users navigate with the side buttons, the indicator dots, swipe gestures or the arrow keys, and it can run as an automatic slideshow. A slide can be an image with a caption or any other content.
6
6