@motifx-community/ui 0.1.0-beta.5 → 0.1.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 (270) hide show
  1. package/CHANGELOG.md +87 -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-settings.d.ts +3 -3
  67. package/dist/components/datagrid/model/GridData.d.ts +22 -3
  68. package/dist/components/gauge/Gauge.d.ts +179 -0
  69. package/dist/components/gauge/gauge-mark.d.ts +9 -0
  70. package/dist/components/gauge/gauge-marker.d.ts +2 -0
  71. package/dist/components/gauge/gauge-needle-shape.d.ts +2 -0
  72. package/dist/components/gauge/gauge-orientation.d.ts +2 -0
  73. package/dist/components/gauge/gauge-props.d.ts +58 -0
  74. package/dist/components/gauge/gauge-range.d.ts +11 -0
  75. package/dist/components/gauge/gauge-scale.d.ts +2 -0
  76. package/dist/components/gauge/gauge-shape.d.ts +43 -0
  77. package/dist/components/gauge/gauge-type.d.ts +2 -0
  78. package/dist/components/gauge/index.d.ts +9 -0
  79. package/dist/components/otpinput/OtpInput.d.ts +73 -0
  80. package/dist/components/otpinput/index.d.ts +4 -0
  81. package/dist/components/otpinput/otp-charset.d.ts +2 -0
  82. package/dist/components/otpinput/otp-completed-event-args.d.ts +8 -0
  83. package/dist/components/otpinput/otp-input-props.d.ts +32 -0
  84. package/dist/components/qrcode/QRCode.d.ts +58 -0
  85. package/dist/components/qrcode/index.d.ts +5 -0
  86. package/dist/components/qrcode/qr-code-export-options.d.ts +9 -0
  87. package/dist/components/qrcode/qr-code-failed-event-args.d.ts +7 -0
  88. package/dist/components/qrcode/qr-code-props.d.ts +23 -0
  89. package/dist/components/signature/Signature.d.ts +100 -0
  90. package/dist/components/signature/index.d.ts +5 -0
  91. package/dist/components/signature/signature-draw.d.ts +15 -0
  92. package/dist/components/signature/signature-export-options.d.ts +11 -0
  93. package/dist/components/signature/signature-props.d.ts +30 -0
  94. package/dist/components/signature/signature-stroke-event-args.d.ts +9 -0
  95. package/dist/components/signature/signature-stroke.d.ts +11 -0
  96. package/dist/components/sparkline/Sparkline.d.ts +85 -0
  97. package/dist/components/sparkline/index.d.ts +4 -0
  98. package/dist/components/sparkline/sparkline-highlight.d.ts +2 -0
  99. package/dist/components/sparkline/sparkline-props.d.ts +34 -0
  100. package/dist/components/sparkline/sparkline-type.d.ts +2 -0
  101. package/dist/components/validationsummary/ValidationSummary.d.ts +1 -0
  102. package/dist/core/fonts-loaded.d.ts +2 -0
  103. package/dist/core/scroll-watch.d.ts +13 -0
  104. package/dist/core/ui-strings.d.ts +38 -0
  105. package/dist/generated/tokens.d.ts +3023 -863
  106. package/dist/index.d.ts +10 -0
  107. package/dist/index.js +55999 -47313
  108. package/dist/index.js.map +1 -1
  109. package/dist/locales/en.json +37 -1
  110. package/dist/locales/tr.json +37 -1
  111. package/dist/parts/chart/chart-paths.d.ts +30 -0
  112. package/dist/parts/chart/chart-scale.d.ts +13 -0
  113. package/dist/parts/chart/chart-text.d.ts +12 -0
  114. package/dist/parts/chart/nice-ticks.d.ts +6 -0
  115. package/dist/parts/chart/svg-parts.d.ts +12 -0
  116. package/dist/parts/chart/thin-out.d.ts +6 -0
  117. package/dist/parts/chart/time-ticks.d.ts +7 -0
  118. package/dist/parts/chart/token-lengths.d.ts +16 -0
  119. package/dist/parts/chart/value-motion.d.ts +16 -0
  120. package/dist/parts/code/barcode-encode.d.ts +23 -0
  121. package/dist/parts/code/code-image.d.ts +35 -0
  122. package/dist/parts/code/qr-encode.d.ts +10 -0
  123. package/dist/parts/field/Field.d.ts +2 -0
  124. package/dist/styles.css +3043 -9
  125. package/dist/tokens/index.d.ts +3212 -967
  126. package/dist/tokens/index.js +3023 -863
  127. package/dist/tokens/index.js.map +1 -1
  128. package/dist/{tr-C5IXRzAH.js → tr-DhIFcH3c.js} +75 -3
  129. package/dist/{tr-C5IXRzAH.js.map → tr-DhIFcH3c.js.map} +1 -1
  130. package/docs/accordion.md +1 -1
  131. package/docs/actionsheet.md +1 -1
  132. package/docs/appbar.md +194 -0
  133. package/docs/avatar.md +1 -1
  134. package/docs/badge.md +1 -1
  135. package/docs/bar-gauge-angles.md +87 -0
  136. package/docs/bar-gauge-data.md +122 -0
  137. package/docs/bar-gauge-labels.md +78 -0
  138. package/docs/bar-gauge.md +98 -0
  139. package/docs/barcode.md +193 -0
  140. package/docs/bottomnavigation.md +258 -0
  141. package/docs/bottomsheet.md +1 -1
  142. package/docs/breadcrumb.md +1 -1
  143. package/docs/button.md +1 -1
  144. package/docs/buttongroup.md +1 -1
  145. package/docs/buttons.md +169 -0
  146. package/docs/calendar.md +1 -1
  147. package/docs/card.md +1 -1
  148. package/docs/chart-bars.md +142 -0
  149. package/docs/chart-candles.md +164 -0
  150. package/docs/chart-funnel.md +115 -0
  151. package/docs/chart-heatmap.md +93 -0
  152. package/docs/chart-lines.md +128 -0
  153. package/docs/chart-live.md +62 -0
  154. package/docs/chart-pie.md +125 -0
  155. package/docs/chart-radar.md +124 -0
  156. package/docs/chart-ranges.md +127 -0
  157. package/docs/chart-references.md +126 -0
  158. package/docs/chart-scatter.md +139 -0
  159. package/docs/chart-waterfall.md +111 -0
  160. package/docs/chart-zoom.md +95 -0
  161. package/docs/chart.md +427 -0
  162. package/docs/checkbox.md +1 -1
  163. package/docs/chip.md +1 -1
  164. package/docs/choice.md +151 -0
  165. package/docs/colorbox.md +1 -1
  166. package/docs/combobox.md +1 -1
  167. package/docs/control.md +1 -1
  168. package/docs/data.md +127 -0
  169. package/docs/datagrid-api.md +1 -1
  170. package/docs/datagrid-bands.md +1 -1
  171. package/docs/datagrid-drag-select.md +1 -1
  172. package/docs/datagrid-drag.md +1 -1
  173. package/docs/datagrid-editing.md +1 -1
  174. package/docs/datagrid-filtering.md +1 -1
  175. package/docs/datagrid-forms.md +1 -1
  176. package/docs/datagrid-grouping.md +62 -2
  177. package/docs/datagrid-layout.md +2 -2
  178. package/docs/datagrid-lookups.md +1 -1
  179. package/docs/datagrid-master-detail.md +1 -1
  180. package/docs/datagrid-scrolling.md +1 -1
  181. package/docs/datagrid-selection.md +1 -1
  182. package/docs/datagrid.md +1 -1
  183. package/docs/datebox.md +1 -1
  184. package/docs/daterangebox.md +1 -1
  185. package/docs/display.md +148 -0
  186. package/docs/draggable.md +1 -1
  187. package/docs/drawer.md +1 -1
  188. package/docs/dropdown.md +1 -1
  189. package/docs/editors.md +157 -0
  190. package/docs/feedback.md +138 -0
  191. package/docs/fileuploader.md +1 -1
  192. package/docs/filterbuilder.md +1 -1
  193. package/docs/formlayout.md +1 -1
  194. package/docs/foundations.md +79 -0
  195. package/docs/gallery.md +1 -1
  196. package/docs/gauge-base.md +78 -0
  197. package/docs/gauge-circular.md +101 -0
  198. package/docs/gauge-dashboards.md +134 -0
  199. package/docs/gauge-linear.md +84 -0
  200. package/docs/gauge-markers.md +135 -0
  201. package/docs/gauge-marks.md +108 -0
  202. package/docs/gauge-ranges.md +133 -0
  203. package/docs/gauge-scales.md +117 -0
  204. package/docs/gauge.md +152 -0
  205. package/docs/home.md +1 -1
  206. package/docs/keyboard.md +1 -1
  207. package/docs/language.md +1 -1
  208. package/docs/layout.md +1 -1
  209. package/docs/listbox.md +1 -1
  210. package/docs/loadpanel.md +1 -1
  211. package/docs/lookup.md +1 -1
  212. package/docs/menus.md +1 -1
  213. package/docs/multiview.md +1 -1
  214. package/docs/navigation.md +143 -0
  215. package/docs/numberbox.md +1 -1
  216. package/docs/otpinput.md +197 -0
  217. package/docs/pagination.md +1 -1
  218. package/docs/popover.md +1 -1
  219. package/docs/progress.md +1 -1
  220. package/docs/qrcode.md +179 -0
  221. package/docs/radiogroup.md +1 -1
  222. package/docs/rating.md +1 -1
  223. package/docs/resizable.md +1 -1
  224. package/docs/scheduler-agenda.md +1 -1
  225. package/docs/scheduler-big-data.md +1 -1
  226. package/docs/scheduler-editing.md +1 -1
  227. package/docs/scheduler-form.md +1 -1
  228. package/docs/scheduler-icalendar.md +1 -1
  229. package/docs/scheduler-mobile.md +1 -1
  230. package/docs/scheduler-recurrence.md +1 -1
  231. package/docs/scheduler-resources.md +1 -1
  232. package/docs/scheduler-timeline.md +1 -1
  233. package/docs/scheduler.md +1 -1
  234. package/docs/scrollview.md +1 -1
  235. package/docs/showcase-home.md +31 -0
  236. package/docs/showcase.md +1 -1
  237. package/docs/signature.md +208 -0
  238. package/docs/skeleton.md +1 -1
  239. package/docs/slider.md +1 -1
  240. package/docs/sortable.md +1 -1
  241. package/docs/sparkline.md +119 -0
  242. package/docs/speeddial.md +1 -1
  243. package/docs/splitter.md +1 -1
  244. package/docs/stepper.md +1 -1
  245. package/docs/switch.md +1 -1
  246. package/docs/tabdocs-dock.md +1 -1
  247. package/docs/tabdocs-drag.md +1 -1
  248. package/docs/tabdocs-menus.md +1 -1
  249. package/docs/tabdocs-mobile.md +1 -1
  250. package/docs/tabdocs-tabs.md +1 -1
  251. package/docs/tabdocs-windows.md +1 -1
  252. package/docs/tabdocs-workspace.md +1 -1
  253. package/docs/tabdocs.md +1 -1
  254. package/docs/tabs.md +1 -1
  255. package/docs/tagbox.md +1 -1
  256. package/docs/textarea.md +1 -1
  257. package/docs/textbox.md +1 -1
  258. package/docs/tileview.md +1 -1
  259. package/docs/timeline.md +1 -1
  260. package/docs/toast.md +1 -1
  261. package/docs/tokens.md +450 -1
  262. package/docs/toolbar.md +1 -1
  263. package/docs/tooltip.md +1 -1
  264. package/docs/treeview.md +1 -1
  265. package/docs/validationsummary.md +1 -1
  266. package/docs/window.md +1 -1
  267. package/docs/wizard.md +1 -1
  268. package/llms-full.txt +6724 -98
  269. package/llms.txt +50 -1
  270. package/package.json +5 -5
package/docs/choice.md ADDED
@@ -0,0 +1,151 @@
1
+ # Choice
2
+
3
+ > Choice · @motifx-community/ui 0.1.0-beta.6
4
+
5
+ Choice components let the reader pick: on or off, one of a few, several of a list, or one of many with search.
6
+
7
+ ## Notification settings
8
+
9
+ Radio buttons for the channel, a switch that applies at once, check boxes with one that sets them all, a drop-down list, a combo box that searches as you type, and a lookup that picks a person from a table.
10
+
11
+ ```tsx
12
+ import { reactive } from '@motifx/core';
13
+ import { CheckBox, ComboBox, DropDown, Lookup, RadioGroup, Switch } from '@motifx-community/ui';
14
+
15
+ const TOPICS = ['Orders', 'Invoices', 'Comments', 'Releases'];
16
+
17
+ const CITIES = ['Ankara', 'Antalya', 'Berlin', 'Bursa', 'İstanbul', 'İzmir', 'Lisbon', 'London', 'Madrid', 'Paris', 'Rome', 'Vienna'].map(name => ({ id: name, name }));
18
+
19
+ const PEOPLE = [
20
+ { id: 1, name: 'Ada Yılmaz', team: 'Design', city: 'Ankara' },
21
+ { id: 2, name: 'Deniz Kaya', team: 'Web', city: 'İzmir' },
22
+ { id: 3, name: 'Elif Demir', team: 'Mobile', city: 'İstanbul' },
23
+ { id: 4, name: 'Mert Şahin', team: 'Web', city: 'Bursa' },
24
+ { id: 5, name: 'Selin Aydın', team: 'Support', city: 'Antalya' }
25
+ ];
26
+
27
+ /** Notification settings: one of a few, on or off, several of a list with all of them at once, one of many with search, and a pick from a table. */
28
+ export default function ChoiceDemo() {
29
+ const s = reactive({
30
+ channel: 'mail' as unknown,
31
+ quiet: false,
32
+ topics: { Orders: true, Invoices: true, Comments: false, Releases: false } as Record<string, boolean>,
33
+ language: 'en' as unknown,
34
+ city: 'İzmir' as unknown,
35
+ deputy: 2 as unknown
36
+ });
37
+ const chosen = () => TOPICS.filter(t => s.topics[t]);
38
+ const all = () => (chosen().length === TOPICS.length ? true : chosen().length === 0 ? false : null);
39
+
40
+ return (
41
+ <div class="ov-frame ov-choice">
42
+ <h3 class="ov-title">Notifications</h3>
43
+ <div class="ov-grid">
44
+ <RadioGroup
45
+ label="Send them by"
46
+ items={[
47
+ { value: 'mail', text: 'E-mail' },
48
+ { value: 'sms', text: 'Text message' },
49
+ { value: 'push', text: 'Phone notification', helpText: 'Needs the app.' }
50
+ ]}
51
+ x-model={() => s.channel}
52
+ />
53
+ <div class="ov-stack">
54
+ <Switch label="Do not disturb at night" x-model={() => s.quiet} />
55
+ <CheckBox
56
+ class="ov-all-topics"
57
+ label="All topics"
58
+ threeState
59
+ value={all}
60
+ onValueChanged={e => {
61
+ // Partly on or all off, a press turns them all on; all on, it turns them off.
62
+ if (!e.byUser) return;
63
+ const on = chosen().length < TOPICS.length;
64
+ for (const t of TOPICS) s.topics[t] = on;
65
+ }}
66
+ />
67
+ <div class="ov-indent">
68
+ {TOPICS.map(t => (
69
+ <CheckBox label={t} x-model={() => s.topics[t]} />
70
+ ))}
71
+ </div>
72
+ </div>
73
+ <div class="ov-stack">
74
+ <DropDown
75
+ label="Language"
76
+ items={[
77
+ { value: 'en', text: 'English' },
78
+ { value: 'tr', text: 'Türkçe' },
79
+ { value: 'de', text: 'Deutsch' }
80
+ ]}
81
+ x-model={() => s.language}
82
+ />
83
+ <ComboBox label="Office" items={CITIES} textField="name" valueField="id" x-model={() => s.city} helpText="Type to search." />
84
+ <Lookup
85
+ label="Deputy while away"
86
+ items={PEOPLE}
87
+ textField="name"
88
+ valueField="id"
89
+ columns={[
90
+ { field: 'name', caption: 'Name', width: '2fr' },
91
+ { field: 'team', caption: 'Team' },
92
+ { field: 'city', caption: 'City' }
93
+ ]}
94
+ x-model={() => s.deputy}
95
+ />
96
+ </div>
97
+ </div>
98
+ <output class="ov-status ov-choice-sum">
99
+ {() =>
100
+ `By ${s.channel}${s.quiet ? ', quiet at night' : ''}; ${chosen().join(', ') || 'no topics'}; ${s.language}; ${s.city}; deputy ${PEOPLE.find(p => p.id === s.deputy)?.name ?? 'none'}.`
101
+ }
102
+ </output>
103
+ </div>
104
+ );
105
+ }
106
+ ```
107
+
108
+ ## Components in this group
109
+
110
+ Each component has its own page with its examples and its full API.
111
+
112
+ | Component | For |
113
+ | --- | --- |
114
+ | `[CheckBox](checkbox.md)` | One option on or off, with a third state for a group that is partly on. |
115
+ | `[Switch](switch.md)` | A setting that takes effect at once. |
116
+ | `[RadioGroup](radiogroup.md)` | One of a few options, all on show. |
117
+ | `[DropDown](dropdown.md)` | One of a list, opened from a field. |
118
+ | `[ComboBox and Autocomplete](combobox.md)` | One of a list found by typing, or a value of your own. |
119
+ | `[Lookup](lookup.md)` | One row of many, picked from a table with columns, from a server too. |
120
+
121
+ ## Choosing a component
122
+
123
+ Several components can do the same job; this table points to the one that reads best for it.
124
+
125
+ | To | Use |
126
+ | --- | --- |
127
+ | `Turn a setting on that applies at once` | [Switch](switch.md) |
128
+ | `Agree to something, or pick independent options` | [CheckBox](checkbox.md) |
129
+ | `Pick one of up to about five options` | [RadioGroup](radiogroup.md) |
130
+ | `Pick one of a longer list` | [DropDown](dropdown.md) |
131
+ | `Find an item by typing` | [ComboBox](combobox.md) |
132
+ | `Pick a row by several of its columns` | [Lookup](lookup.md) |
133
+ | `Pick several of a long list` | [TagBox](tagbox.md) |
134
+
135
+ ## What they share
136
+
137
+ They are fields like the editors: a label, help text, validation and `x-model`.
138
+
139
+ Items are strings or objects read through `textField` and `valueField`; long lists come from a `dataSource` of the data layer and load as the reader scrolls or searches.
140
+
141
+ ## Accessibility
142
+
143
+ | Topic | Details |
144
+ | --- | --- |
145
+ | `Roles` | Check boxes and switches with their state, radio groups, and list boxes for the lists. |
146
+ | `Keyboard` | Space toggles; the arrow keys move inside a group and a list; typing finds an item. |
147
+ | `Groups` | A radio group and a set of check boxes are named as a group by their label. |
148
+
149
+ ## Feedback
150
+
151
+ Loading issues…
package/docs/colorbox.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ColorBox and ColorPicker
2
2
 
3
- > Editors · @motifx-community/ui 0.1.0-beta.5
3
+ > Editors · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  A color field with a popup picker, or the picker on its own. The picker has a saturation and brightness area, a hue slider, an opacity slider, channel inputs and preset colors.
6
6
 
package/docs/combobox.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ComboBox and Autocomplete
2
2
 
3
- > Choice · @motifx-community/ui 0.1.0-beta.5
3
+ > Choice · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  A text input with a list that filters as the user types. Items can come from memory or from a data layer source that is searched on the server. `Autocomplete` is the free-text variant, where the value is the text itself.
6
6
 
package/docs/control.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Control
2
2
 
3
- > Foundations · @motifx-community/ui 0.1.0-beta.5
3
+ > Foundations · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  `Control` is the base class of every control in the package. It provides the same `text`, `enabled`, `visible` and `tabStop` properties and the same focus methods, whether a control is declared in JSX and bound to state or created with `new` and changed programmatically.
6
6
 
package/docs/data.md ADDED
@@ -0,0 +1,127 @@
1
+ # Data
2
+
3
+ > Data · @motifx-community/ui 0.1.0-beta.6
4
+
5
+ Data components show and pick from structured data: hierarchies, lists, sets of tags, and filters that the reader builds. Tables have their own group: see [DataGrid](datagrid.md).
6
+
7
+ ## A file library
8
+
9
+ The folders in a tree, the files of the chosen folder in a searchable list, tags that narrow the files down, and a filter of your own on their names and sizes, written out in words.
10
+
11
+ ```tsx
12
+ import { reactive } from '@motifx/core';
13
+ import { data } from '@motifx-community/data';
14
+ import { FilterBuilder, ListBox, TagBox, TreeView, filterText, type FilterBuilderField } from '@motifx-community/ui';
15
+
16
+ interface Doc {
17
+ id: number;
18
+ name: string;
19
+ folder: string;
20
+ size: number;
21
+ tags: string[];
22
+ }
23
+
24
+ const FOLDERS = [
25
+ {
26
+ id: 'all',
27
+ text: 'All files',
28
+ children: [
29
+ { id: 'invoices', text: 'Invoices', children: [{ id: 'invoices-2025', text: '2025' }, { id: 'invoices-2026', text: '2026' }] },
30
+ { id: 'letters', text: 'Letters' },
31
+ { id: 'pictures', text: 'Pictures' }
32
+ ]
33
+ }
34
+ ];
35
+
36
+ const DOCS: Doc[] = [
37
+ { id: 1, name: 'january.pdf', folder: 'invoices-2025', size: 120, tags: ['paid'] },
38
+ { id: 2, name: 'february.pdf', folder: 'invoices-2025', size: 98, tags: ['paid'] },
39
+ { id: 3, name: 'march.pdf', folder: 'invoices-2026', size: 140, tags: ['open'] },
40
+ { id: 4, name: 'april.pdf', folder: 'invoices-2026', size: 310, tags: ['open', 'urgent'] },
41
+ { id: 5, name: 'bank.docx', folder: 'letters', size: 45, tags: ['sent'] },
42
+ { id: 6, name: 'landlord.docx', folder: 'letters', size: 38, tags: ['draft'] },
43
+ { id: 7, name: 'holiday.jpg', folder: 'pictures', size: 2400, tags: [] },
44
+ { id: 8, name: 'team.png', folder: 'pictures', size: 860, tags: ['shared'] }
45
+ ];
46
+
47
+ const FIELDS: FilterBuilderField[] = [
48
+ { dataField: 'name', caption: 'Name' },
49
+ { dataField: 'size', caption: 'Size (KB)', dataType: 'number' }
50
+ ];
51
+
52
+ const TAGS = ['paid', 'open', 'urgent', 'sent', 'draft', 'shared'];
53
+
54
+ /** A file library: folders in a tree, the files of the folder in a list, tags to narrow them down, and a filter of your own. */
55
+ export default function DataDemo() {
56
+ const s = reactive({
57
+ folder: 'all' as unknown,
58
+ file: null as unknown,
59
+ tags: [] as unknown,
60
+ filter: null as data.FilterExpression | null
61
+ });
62
+ const inFolder = (doc: Doc, folder: string) => folder === 'all' || doc.folder === folder || doc.folder.startsWith(folder + '-');
63
+ const files = () => {
64
+ const folder = String((Array.isArray(s.folder) ? s.folder[0] : s.folder) ?? 'all');
65
+ const tags = s.tags as string[];
66
+ const own = data.createRowFilter(s.filter);
67
+ return DOCS.filter(d => inFolder(d, folder) && tags.every(t => d.tags.includes(t))).filter(own);
68
+ };
69
+ const chosen = () => DOCS.find(d => d.id === s.file);
70
+
71
+ return (
72
+ <div class="ov-frame ov-data">
73
+ <div class="ov-split">
74
+ <TreeView label="Folders" items={FOLDERS} expandedKeys={['all', 'invoices']} selectionMode="single" x-model={() => s.folder} />
75
+ <div class="ov-stack">
76
+ <TagBox label="Tags" items={TAGS} x-model={() => s.tags} placeholder="Any tag" />
77
+ <FilterBuilder label="Filter" fields={FIELDS} locale="en" x-model={() => s.filter} />
78
+ <output class="ov-muted">{() => filterText(s.filter, { fields: FIELDS, locale: 'en' }) || 'No filter of your own.'}</output>
79
+ <ListBox class="ov-files-list" label="Files" items={files} textField="name" valueField="id" searchEnabled height={6} noItemsText="No files match." x-model={() => s.file} />
80
+ </div>
81
+ </div>
82
+ <output class="ov-status ov-data-sum">{() => (chosen() ? `${chosen()!.name}, ${chosen()!.size} KB, ${chosen()!.tags.join(', ') || 'no tags'}` : `${files().length} file(s)`)}</output>
83
+ </div>
84
+ );
85
+ }
86
+ ```
87
+
88
+ ## Components in this group
89
+
90
+ Each component has its own page with its examples and its full API.
91
+
92
+ | Component | For |
93
+ | --- | --- |
94
+ | `[TreeView](treeview.md)` | A hierarchy that expands, with selection, check boxes, search and children loaded on demand. |
95
+ | `[ListBox](listbox.md)` | A list always on show, with one or several chosen, groups and search. |
96
+ | `[TagBox](tagbox.md)` | Several values of a long list, shown as tags. |
97
+ | `[FilterBuilder](filterbuilder.md)` | A filter of conditions and groups, built by the reader, in the data layer's format. |
98
+
99
+ ## Choosing a component
100
+
101
+ Several components can do the same job; this table points to the one that reads best for it.
102
+
103
+ | To | Use |
104
+ | --- | --- |
105
+ | `Show and pick from a hierarchy` | [TreeView](treeview.md) |
106
+ | `Keep a list on show` | [ListBox](listbox.md) |
107
+ | `Pick several of a long list in little room` | [TagBox](tagbox.md) |
108
+ | `Let the reader build a filter` | [FilterBuilder](filterbuilder.md) |
109
+ | `Show rows with columns` | [DataGrid](datagrid.md) |
110
+
111
+ ## What they share
112
+
113
+ They read the developer's data as it is, through fields such as `textField`, `valueField` and `childrenField`, and never change it.
114
+
115
+ Long lists come from a `dataSource` of the data layer; the filter of a FilterBuilder is the data layer's filter, ready for an adapter or for rows in memory.
116
+
117
+ ## Accessibility
118
+
119
+ | Topic | Details |
120
+ | --- | --- |
121
+ | `Roles` | A tree, list boxes and a group of conditions, each with its name. |
122
+ | `Keyboard` | The arrow keys move and expand, Space chooses, typing finds an item. |
123
+ | `Large data` | Long trees and lists draw only what is on show, and stay quick with thousands of items. |
124
+
125
+ ## Feedback
126
+
127
+ Loading issues…
@@ -1,6 +1,6 @@
1
1
  # DataGrid: API reference
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  ## Columns
6
6
 
@@ -1,6 +1,6 @@
1
1
  # DataGrid: Bands and adaptive columns
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  ## Band headers
6
6
 
@@ -1,6 +1,6 @@
1
1
  # DataGrid: Selecting by dragging
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  ## Rows
6
6
 
@@ -1,6 +1,6 @@
1
1
  # DataGrid: Row drag and drop
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  ## Reorder rows
6
6
 
@@ -1,6 +1,6 @@
1
1
  # DataGrid: Editing
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  ## Editing and save modes
6
6
 
@@ -1,6 +1,6 @@
1
1
  # DataGrid: Filtering and search
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  ## Filters
6
6
 
@@ -1,6 +1,6 @@
1
1
  # DataGrid: Edit forms and popups
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  ## Edit forms and popups
6
6
 
@@ -1,6 +1,6 @@
1
1
  # DataGrid: Grouping and summaries
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  ## Grouping
6
6
 
@@ -20,7 +20,28 @@ export interface Order {
20
20
  }
21
21
  ```
22
22
 
23
- On a server, a `DataSource` that loads by `blocks` over an adapter that supports grouping is asked only for the groups and their counts (`loadGroups`, `group` with `groupsOnly`). Rows arrive in group order, in blocks, only for expanded groups in the visible area. In this example, the groups start collapsed (`autoExpandGroup: false`). An adapter that cannot group (OData, REST), a source that loads by page, or a `calculateGroupValue` function loads every matching row and groups them in the browser. Filters, search and selection work with groups, and “select all” still means every row of the filter. CSV export writes a “Column: value” line before each group, and `group` is saved with the layout.
23
+ On a server, a `DataSource` that loads by `blocks` or by `page` over an adapter that supports grouping is asked only for the groups and their counts (`loadGroups`, `group` with `groupsOnly`). Rows arrive in group order, only for expanded groups: in blocks for the visible area while scrolling, or for the page shown with a pager. In this example, the groups start collapsed (`autoExpandGroup: false`). An adapter that cannot group (OData, REST) or a `calculateGroupValue` function loads every matching row and groups them in the browser. Filters, search and selection work with groups, and “select all” still means every row of the filter. CSV export writes a “Column: value” line before each group, and `group` is saved with the layout.
24
+
25
+ ```tsx
26
+ import { data } from '@motifx-community/data';
27
+
28
+ /** Rows in memory that answer a little later, the way a server does; for the examples. */
29
+ export class SlowAdapter<T extends object, K> extends data.ArrayAdapter<T, K> {
30
+ constructor(
31
+ options: data.ArrayAdapterOptions<T>,
32
+ private readonly delayMs = 300,
33
+ ) {
34
+ super(options);
35
+ }
36
+
37
+ override async load(options: data.LoadOptions = {}): Promise<data.LoadResult<T>> {
38
+ await new Promise((done) => setTimeout(done, this.delayMs));
39
+ return super.load(options);
40
+ }
41
+ }
42
+ ```
43
+
44
+ With a pager, a source that loads by `page` is grouped on the server too. The pager counts group rows and data rows together, and each page asks only for the rows it shows (`loadRange`), so a page seen before is not loaded again.
24
45
 
25
46
  ```tsx
26
47
  import { data } from '@motifx-community/data';
@@ -300,6 +321,45 @@ export class SlowAdapter<T extends object, K> extends data.ArrayAdapter<T, K> {
300
321
  }
301
322
  ```
302
323
 
324
+ `GroupingServerPages.tsx`
325
+
326
+ ```tsx
327
+ import { reactive } from '@motifx/core';
328
+ import { data } from '@motifx-community/data';
329
+ import { DataGrid, Stack } from '@motifx-community/ui';
330
+ import { SlowAdapter } from '../../../shared/slow-adapter';
331
+ import type { Order } from './order';
332
+ import { columns, makeOrders } from './orders';
333
+
334
+ /** 100,000 orders grouped on the server with a pager: each page asks only for its own rows. */
335
+ export default function GroupingServerPages() {
336
+ const s = reactive({ loads: 0 });
337
+ const server = new SlowAdapter<Order, number>({ data: makeOrders(100_000), key: 'id' }, 300);
338
+ server.onLoading(() => s.loads++);
339
+ const orders = new data.DataSource<Order, number>({ adapter: server, loadMode: 'page', pageSize: 20 });
340
+ const grouped = columns.map((c) => (c.field === 'status' ? { ...c, groupIndex: 0 } : c));
341
+ let grid: DataGrid<Order> | null = null;
342
+
343
+ return (
344
+ <>
345
+ <DataGrid
346
+ class="dg-grouping-pages"
347
+ style="block-size: 32rem"
348
+ dataSource={orders}
349
+ columns={grouped}
350
+ label="100,000 orders by status, page by page"
351
+ locale="en"
352
+ settings={{ groupPanel: true }}
353
+ ref={(g: DataGrid<Order>) => (grid = g)}
354
+ />
355
+ <Stack orientation="horizontal" wrap align="center">
356
+ <output class="dg-grouping-pages-loads">{() => `${s.loads} loads for ${grid?.total ?? 0} rows`}</output>
357
+ </Stack>
358
+ </>
359
+ );
360
+ }
361
+ ```
362
+
303
363
  `Summaries.tsx`
304
364
 
305
365
  ```tsx
@@ -1,6 +1,6 @@
1
1
  # DataGrid: Layout and events
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  ## Toolbar
6
6
 
@@ -129,7 +129,7 @@ export interface Order {
129
129
  | `groupExpandMode` | `'button'` | A group expands from its arrow and the keyboard, or with `rowClick` from a click anywhere on its row. A column can set its own value. |
130
130
  | `groupCount` | `true` | Group rows show their row count. A column can set its own value. |
131
131
  | `groupToggleKeys, groupArrowKeys` | `['Enter', ' ']`, `true` | The keys that expand and collapse a group row. Right and Left expand, collapse, and move in and out. |
132
- | `remoteGrouping` | `'auto'` | What groups a data source's rows: `auto` uses its adapter when it supports grouping (blocks), `true` always uses the adapter when the source loads by blocks, and `false` always uses the browser, from every matching row. |
132
+ | `remoteGrouping` | `'auto'` | What groups a data source's rows: `auto` uses its adapter when it supports grouping (pages or blocks), `true` always uses the adapter when the source loads by pages or blocks, and `false` always uses the browser, from every matching row. |
133
133
  | `groupLoadPageSize` | `0` | For grouping or summaries in the browser over a source that loads pages or blocks, the rows per request while every matching row loads (0 means one request). |
134
134
  | `totalSummary, groupSummary` | `true` | The totals row with the items of `summary.totalItems`, and the items of `summary.groupItems` in group rows and footers. An item's `visible` takes precedence. |
135
135
  | `totalSummaryTabStop` | `true` | Makes the totals row a separate Tab stop after the rows. |
@@ -1,6 +1,6 @@
1
1
  # DataGrid: Lookup columns
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  ## Lookup columns
6
6
 
@@ -1,6 +1,6 @@
1
1
  # DataGrid: Master-detail
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  ## Master-detail
6
6
 
@@ -1,6 +1,6 @@
1
1
  # DataGrid: Scrolling
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  ## Scrolling modes
6
6
 
@@ -1,6 +1,6 @@
1
1
  # DataGrid: Selection and export
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  ## Selection
6
6
 
package/docs/datagrid.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # DataGrid
2
2
 
3
- > DataGrid · @motifx-community/ui 0.1.0-beta.5
3
+ > DataGrid · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  A grid for data entry and large data sets. Rows can be in memory or come from any data layer adapter, and can be displayed in a virtual list or in pages. It supports sorting, column layout, editing with kit editors, new rows with Tab navigation, three save modes, row actions, selection, filters, a search panel, grouping, summaries, a toolbar, lookup columns from other services, copy and paste, export, and a persistent layout. Every feature can be disabled for the grid or for a single column.
6
6
 
package/docs/datebox.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # DateBox
2
2
 
3
- > Editors · @motifx-community/ui 0.1.0-beta.5
3
+ > Editors · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  An input for a date, a time or both. Users can type through a mask in the locale's order, or pick from a calendar and a list of times. `min`, `max` and `disabledDates` apply to both methods.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # DateRangeBox
2
2
 
3
- > Editors · @motifx-community/ui 0.1.0-beta.5
3
+ > Editors · @motifx-community/ui 0.1.0-beta.6
4
4
 
5
5
  A single field for a start date and an end date. Users can type through two masks, or pick from two side-by-side months and a list of presets, within the allowed dates and range length. The value is a `[start, end]` pair.
6
6