@slotted/react 0.1.0-beta.14 → 0.1.0-beta.16

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 (132) hide show
  1. package/dist/{action-sheet-BAoaxbmI.js → action-sheet-dNnB26br.js} +20 -20
  2. package/dist/action-sheet.js +1 -1
  3. package/dist/{attachment-DKKiNUKe.js → attachment-C1wBuup6.js} +2 -0
  4. package/dist/attachment.js +1 -1
  5. package/dist/calendar-wqDIW4Z8.js +469 -0
  6. package/dist/calendar.js +1 -1
  7. package/dist/{column-manager-DMaWNyXs.js → column-manager-C8fN_mDy.js} +6 -6
  8. package/dist/column-manager.js +1 -1
  9. package/dist/dashboard-grid-ByThIV_n.js +1066 -0
  10. package/dist/dashboard-grid.js +1 -1
  11. package/dist/{data-grid-B5feiNsE.js → data-grid-aHlR2FHu.js} +4 -4
  12. package/dist/data-grid.js +1 -1
  13. package/dist/{data-list-CUvUS2AX.js → data-list-Cu6LtnDX.js} +1 -1
  14. package/dist/data-list.js +1 -1
  15. package/dist/{date-picker-Dys-z9mZ.js → date-picker-B5V8NZCT.js} +1 -1
  16. package/dist/date-picker.js +1 -1
  17. package/dist/{date-range-picker-Cu95hHyO.js → date-range-picker-B89Q973N.js} +1 -1
  18. package/dist/date-range-picker.js +1 -1
  19. package/dist/{datetime-picker-B7eWKoN3.js → datetime-picker-Cx6Z52Ka.js} +1 -1
  20. package/dist/datetime-picker.js +1 -1
  21. package/dist/{datetime-range-picker-Cm42pY3M.js → datetime-range-picker-DYshAlgq.js} +1 -1
  22. package/dist/datetime-range-picker.js +1 -1
  23. package/dist/docs/calendar.json +19 -1
  24. package/dist/docs/calendar.md +3 -1
  25. package/dist/docs/dashboard-grid.json +26 -4
  26. package/dist/docs/dashboard-grid.md +5 -2
  27. package/dist/docs/drawer.examples.md +1 -1
  28. package/dist/docs/drawer.json +18 -7
  29. package/dist/docs/drawer.md +7 -6
  30. package/dist/docs/link.json +16 -0
  31. package/dist/docs/link.md +3 -1
  32. package/dist/docs/list-item.json +10 -2
  33. package/dist/docs/list-item.md +20 -13
  34. package/dist/docs/markdown.json +7 -0
  35. package/dist/docs/markdown.md +1 -0
  36. package/dist/docs/message-scroller.json +1 -1
  37. package/dist/docs/prompt-composer.json +9 -2
  38. package/dist/docs/prompt-composer.md +3 -1
  39. package/dist/drawer-Du1aC1px.js +830 -0
  40. package/dist/drawer.js +2 -2
  41. package/dist/{event-calendar-kX0aS8Pm.js → event-calendar-CEIyV-fW.js} +520 -520
  42. package/dist/event-calendar.js +1 -1
  43. package/dist/{filter-bar-B-Jk5sPq.js → filter-bar-BHzy0o7n.js} +8 -8
  44. package/dist/filter-bar.js +1 -1
  45. package/dist/{import-export-center-BIB7sRCl.js → import-export-center-BX1Bhj8c.js} +1 -1
  46. package/dist/import-export-center.js +1 -1
  47. package/dist/index.js +124 -124
  48. package/dist/{link-rGL3Lr2t.js → link-YvD_Wov8.js} +23 -22
  49. package/dist/link.js +1 -1
  50. package/dist/list-item-2z75VYyp.js +160 -0
  51. package/dist/list-item.js +1 -1
  52. package/dist/markdown-gfrgwq6-.js +311 -0
  53. package/dist/markdown.js +1 -1
  54. package/dist/{prompt-composer-BDOi4rVK.js → prompt-composer-C57BzYrn.js} +109 -77
  55. package/dist/prompt-composer.js +2 -2
  56. package/dist/styles/action-sheet.css +1 -1
  57. package/dist/styles/calendar.css +3 -1
  58. package/dist/styles/chart.css +1 -1
  59. package/dist/styles/column-manager.css +1 -1
  60. package/dist/styles/command-palette.css +1 -1
  61. package/dist/styles/dashboard-grid.css +3 -1
  62. package/dist/styles/data-grid.css +1 -1
  63. package/dist/styles/date-picker.css +3 -1
  64. package/dist/styles/date-range-picker.css +3 -1
  65. package/dist/styles/datetime-picker.css +3 -1
  66. package/dist/styles/datetime-range-picker.css +3 -1
  67. package/dist/styles/detail-panel.css +1 -1
  68. package/dist/styles/dialog.css +1 -1
  69. package/dist/styles/drawer.css +1 -1
  70. package/dist/styles/event-calendar.css +1 -1
  71. package/dist/styles/filter-bar.css +4 -2
  72. package/dist/styles/import-export-center.css +2 -2
  73. package/dist/styles/index.css +11 -11
  74. package/dist/styles/link.css +1 -1
  75. package/dist/styles/markdown.css +1 -1
  76. package/dist/styles/message.css +1 -1
  77. package/dist/styles/prompt-composer.css +1 -1
  78. package/dist/styles/section.css +1 -1
  79. package/dist/styles/stat-card.css +1 -1
  80. package/dist/styles/table.css +2 -2
  81. package/dist/styles/upload.css +1 -1
  82. package/dist/styles.css +1 -1
  83. package/dist/{table-_xX87qua.js → table-BHuKvsgJ.js} +4 -4
  84. package/dist/table.js +1 -1
  85. package/dist/types/calendar/calendar.d.ts +2 -1
  86. package/dist/types/calendar/calendar.d.ts.map +1 -1
  87. package/dist/types/calendar/calendar.types.d.ts +11 -0
  88. package/dist/types/calendar/calendar.types.d.ts.map +1 -1
  89. package/dist/types/calendar/index.d.ts +1 -1
  90. package/dist/types/calendar/index.d.ts.map +1 -1
  91. package/dist/types/dashboard-grid/dashboard-grid.d.ts +1 -1
  92. package/dist/types/dashboard-grid/dashboard-grid.d.ts.map +1 -1
  93. package/dist/types/dashboard-grid/dashboard-grid.types.d.ts +23 -3
  94. package/dist/types/dashboard-grid/dashboard-grid.types.d.ts.map +1 -1
  95. package/dist/types/dashboard-grid/dashboard-widget.d.ts +1 -1
  96. package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
  97. package/dist/types/dashboard-grid/index.d.ts +1 -1
  98. package/dist/types/dashboard-grid/index.d.ts.map +1 -1
  99. package/dist/types/drawer/drawer-parts.d.ts +3 -1
  100. package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
  101. package/dist/types/drawer/drawer.types.d.ts +2 -0
  102. package/dist/types/drawer/drawer.types.d.ts.map +1 -1
  103. package/dist/types/drawer/index.d.ts +2 -2
  104. package/dist/types/drawer/index.d.ts.map +1 -1
  105. package/dist/types/link/index.d.ts +1 -1
  106. package/dist/types/link/index.d.ts.map +1 -1
  107. package/dist/types/link/link.d.ts +1 -1
  108. package/dist/types/link/link.d.ts.map +1 -1
  109. package/dist/types/link/link.types.d.ts +7 -0
  110. package/dist/types/link/link.types.d.ts.map +1 -1
  111. package/dist/types/list-item/list-item-content.d.ts +3 -3
  112. package/dist/types/list-item/list-item-content.d.ts.map +1 -1
  113. package/dist/types/list-item/list-item-nesting.d.ts +15 -0
  114. package/dist/types/list-item/list-item-nesting.d.ts.map +1 -0
  115. package/dist/types/list-item/list-item-parts.d.ts +3 -3
  116. package/dist/types/list-item/list-item-parts.d.ts.map +1 -1
  117. package/dist/types/markdown/markdown.d.ts +1 -1
  118. package/dist/types/markdown/markdown.d.ts.map +1 -1
  119. package/dist/types/markdown/markdown.types.d.ts +6 -1
  120. package/dist/types/markdown/markdown.types.d.ts.map +1 -1
  121. package/dist/types/prompt-composer/index.d.ts +2 -2
  122. package/dist/types/prompt-composer/index.d.ts.map +1 -1
  123. package/dist/types/prompt-composer/prompt-composer.d.ts +8 -1
  124. package/dist/types/prompt-composer/prompt-composer.d.ts.map +1 -1
  125. package/dist/types/prompt-composer/prompt-composer.types.d.ts +7 -1
  126. package/dist/types/prompt-composer/prompt-composer.types.d.ts.map +1 -1
  127. package/package.json +6 -6
  128. package/dist/calendar-DZx00W81.js +0 -457
  129. package/dist/dashboard-grid-B9-_lwn6.js +0 -1048
  130. package/dist/drawer-Pk4tqPUV.js +0 -819
  131. package/dist/list-item-CHaJYl5r.js +0 -125
  132. package/dist/markdown-B_lMpWz0.js +0 -306
@@ -83,48 +83,56 @@
83
83
  },
84
84
  {
85
85
  "part": "marker",
86
+ "parent": "root",
86
87
  "element": "span",
87
88
  "required": false,
88
89
  "purpose": "The bullet, rendered only when marker is bullet: the dot Glyph in the marker column, before content and hidden from assistive technology. A numbered marker is a counter the stylesheet writes, because it is text."
89
90
  },
90
91
  {
91
92
  "part": "content",
93
+ "parent": "root",
92
94
  "element": "div, button or a",
93
95
  "required": true,
94
96
  "purpose": "The box that is read, hovered, focused and — for two of the three — activated. Three elements rather than one as prop, because the three are three different accessibility trees."
95
97
  },
96
98
  {
97
99
  "part": "start",
100
+ "parent": "content",
98
101
  "element": "div",
99
102
  "required": false,
100
103
  "purpose": "The leading column: an icon, an avatar, a Checkbox. It is the slot and not the control, and the chooser here is also what announces a selection the row only paints."
101
104
  },
102
105
  {
103
106
  "part": "body",
107
+ "parent": "content",
104
108
  "element": "div",
105
109
  "required": false,
106
110
  "purpose": "The text column, and the one box in the row that may shrink — which is what lets an unbroken token break instead of pushing the metadata out of the row."
107
111
  },
108
112
  {
109
113
  "part": "label",
114
+ "parent": "body",
110
115
  "element": "div",
111
116
  "required": false,
112
117
  "purpose": "The title. It clips under truncate, isolates its own direction so another script does not reorder the row, and breaks a single unbroken token."
113
118
  },
114
119
  {
115
120
  "part": "description",
121
+ "parent": "body",
116
122
  "element": "div",
117
123
  "required": false,
118
124
  "purpose": "The lines under the title. They clip with it, never instead of it."
119
125
  },
120
126
  {
121
127
  "part": "end",
128
+ "parent": "content",
122
129
  "element": "div",
123
130
  "required": false,
124
131
  "purpose": "Trailing metadata that is part of what the row says — a timestamp, a count, a Badge. Below 22rem it leaves the inline axis and sits under the title."
125
132
  },
126
133
  {
127
134
  "part": "actions",
135
+ "parent": "root",
128
136
  "element": "div",
129
137
  "required": false,
130
138
  "purpose": "Independent targets, and a sibling of the box rather than its child: interactive content may not nest inside an a or a button."
@@ -410,9 +418,9 @@
410
418
  {
411
419
  "id": "anatomy",
412
420
  "title": "Every part, and a row with almost none",
413
- "note": "Every part but the box is optional, and an absent one leaves no column behind: each gap is a margin on the part rather than a track on the grid.",
421
+ "note": "Every part but the box is optional, and an absent one leaves no column behind: each gap is a margin on the part rather than a track on the grid. ListItemEnd takes metadata, inside the box; ListItemActions takes controls, beside it.",
414
422
  "language": "tsx",
415
- "source": "<ListItem>\n <ListItemContent>\n <ListItemStart>{icon}</ListItemStart>\n <ListItemBody>\n <ListItemLabel>Photos</ListItemLabel>\n <ListItemDescription>128 files</ListItemDescription>\n </ListItemBody>\n <ListItemEnd>Yesterday</ListItemEnd>\n </ListItemContent>\n <ListItemActions>{remove}</ListItemActions>\n</ListItem>;\n",
423
+ "source": "<ListItem>\n <ListItemContent>\n <ListItemStart>{icon}</ListItemStart>\n <ListItemBody>\n <ListItemLabel>Photos</ListItemLabel>\n <ListItemDescription>128 files</ListItemDescription>\n </ListItemBody>\n <ListItemEnd>Yesterday</ListItemEnd>\n </ListItemContent>\n <ListItemActions>\n <Button size=\"sm\" variant=\"ghost\" onClick={rename}>\n Rename\n </Button>\n <Button size=\"sm\" variant=\"ghost\" onClick={remove}>\n Remove\n </Button>\n </ListItemActions>\n</ListItem>;\n",
416
424
  "verdict": "excerpt"
417
425
  },
418
426
  {
@@ -26,17 +26,17 @@ Excerpt — not a complete module
26
26
 
27
27
  ## Anatomy
28
28
 
29
- | Part | Element | Required |
30
- | --- | --- | --- |
31
- | `root` | li, or the element render returns | yes |
32
- | `marker` | span | no |
33
- | `content` | div, button or a | yes |
34
- | `start` | div | no |
35
- | `body` | div | no |
36
- | `label` | div | no |
37
- | `description` | div | no |
38
- | `end` | div | no |
39
- | `actions` | div | no |
29
+ | Part | Parent | Element | Required |
30
+ | --- | --- | --- | --- |
31
+ | `root` | — | li, or the element render returns | yes |
32
+ | `marker` | `root` | span | no |
33
+ | `content` | `root` | div, button or a | yes |
34
+ | `start` | `content` | div | no |
35
+ | `body` | `content` | div | no |
36
+ | `label` | `body` | div | no |
37
+ | `description` | `body` | div | no |
38
+ | `end` | `content` | div | no |
39
+ | `actions` | `root` | div | no |
40
40
 
41
41
  ## Props
42
42
 
@@ -103,7 +103,7 @@ Excerpt — not a complete module
103
103
 
104
104
  ### Every part, and a row with almost none
105
105
 
106
- Every part but the box is optional, and an absent one leaves no column behind: each gap is a margin on the part rather than a track on the grid.
106
+ Every part but the box is optional, and an absent one leaves no column behind: each gap is a margin on the part rather than a track on the grid. ListItemEnd takes metadata, inside the box; ListItemActions takes controls, beside it.
107
107
 
108
108
  Excerpt — not a complete module
109
109
 
@@ -117,7 +117,14 @@ Excerpt — not a complete module
117
117
  </ListItemBody>
118
118
  <ListItemEnd>Yesterday</ListItemEnd>
119
119
  </ListItemContent>
120
- <ListItemActions>{remove}</ListItemActions>
120
+ <ListItemActions>
121
+ <Button size="sm" variant="ghost" onClick={rename}>
122
+ Rename
123
+ </Button>
124
+ <Button size="sm" variant="ghost" onClick={remove}>
125
+ Remove
126
+ </Button>
127
+ </ListItemActions>
121
128
  </ListItem>;
122
129
  ```
123
130
 
@@ -118,6 +118,13 @@
118
118
  "appliesTo": "Markdown",
119
119
  "description": "The document in mdast; never HTML"
120
120
  },
121
+ {
122
+ "name": "source",
123
+ "type": "string",
124
+ "defaultValue": "—",
125
+ "appliesTo": "Markdown",
126
+ "description": "The document as CommonMark text, read by parseMarkdown in place of tree: the syntax of the types in allow is read and any other stays text. Paragraphs, ATX headings, fenced code, quotes, rules, nested lists, code spans, strong, emphasis, links, escapes and hard breaks; tables, images and HTML need an adapter"
127
+ },
121
128
  {
122
129
  "name": "size",
123
130
  "type": "'md' | 'lg' | 'xl'",
@@ -41,6 +41,7 @@ const tree = fromMarkedTokens(marked.lexer(source));
41
41
  | Name | Type | Default | Applies to | Description |
42
42
  | --- | --- | --- | --- | --- |
43
43
  | `tree` | `MarkdownNode \| null` | — | Markdown | The document in mdast; never HTML |
44
+ | `source` | `string` | — | Markdown | The document as CommonMark text, read by parseMarkdown in place of tree: the syntax of the types in allow is read and any other stays text. Paragraphs, ATX headings, fenced code, quotes, rules, nested lists, code spans, strong, emphasis, links, escapes and hard breaks; tables, images and HTML need an adapter |
44
45
  | `size` | `'md' \| 'lg' \| 'xl'` | lg | Markdown | The region’s type step, from prose |
45
46
  | `flow` | `'tight' \| 'normal' \| 'loose'` | normal | Markdown | The space between blocks, from prose |
46
47
  | `status` | `'ready' \| 'error'` | ready | Markdown | error replaces the document with the error part |
@@ -66,7 +66,7 @@
66
66
  "part": "root",
67
67
  "element": "div",
68
68
  "required": true,
69
- "purpose": "The frame. Fills a bounded parent; the engine writes data-scrollable, data-following and data-pending on it while the reader scrolls."
69
+ "purpose": "The frame. Fills a bounded parent; the engine writes data-scrollable, data-following and data-pending on it while the reader scrolls. data-pending hides the content until the opening position is applied, and content that holds no item is never pending."
70
70
  },
71
71
  {
72
72
  "part": "viewport",
@@ -75,6 +75,7 @@
75
75
  "footer",
76
76
  "action",
77
77
  "attach",
78
+ "dictate",
78
79
  "submit",
79
80
  "ring",
80
81
  "glow"
@@ -84,7 +85,7 @@
84
85
  "docs": {
85
86
  "promptComposer": {
86
87
  "imports": {
87
- "source": "import {\n PromptComposer,\n PromptComposerAction,\n PromptComposerAttach,\n PromptComposerFooter,\n PromptComposerHeader,\n PromptComposerInput,\n PromptComposerSubmit,\n} from '@slotted/react';"
88
+ "source": "import {\n PromptComposer,\n PromptComposerAction,\n PromptComposerAttach,\n PromptComposerDictate,\n PromptComposerFooter,\n PromptComposerHeader,\n PromptComposerInput,\n PromptComposerSubmit,\n} from '@slotted/react';"
88
89
  },
89
90
  "anatomy": [
90
91
  {
@@ -123,6 +124,12 @@
123
124
  "required": false,
124
125
  "purpose": "Opens the file chooser with the composer’s accept and multiple, and hands the choice to onAttach with reason \"pointer\"."
125
126
  },
127
+ {
128
+ "part": "dictate",
129
+ "element": "button (PromptComposerDictate)",
130
+ "required": false,
131
+ "purpose": "The microphone: dictation through the platform’s SpeechRecognition, in the lang input or the nearest lang attribute. Each final phrase is written at the end of the value through onValueChange with reason \"dictation\"; the button is aria-pressed while the engine listens, a second press stops it, and “Listening” is announced as it starts. Without a recognition engine the button renders nothing."
132
+ },
126
133
  {
127
134
  "part": "submit",
128
135
  "element": "button (PromptComposerSubmit)",
@@ -304,7 +311,7 @@
304
311
  {
305
312
  "name": "onValueChange",
306
313
  "payload": "(value: string, request: ChangeRequest<string>)",
307
- "when": "Before the value moves: reason \"keyboard\" for an edit, \"submit\" for the clearing after an accepted send. cancel() refuses the move."
314
+ "when": "Before the value moves: reason \"keyboard\" for an edit, \"dictation\" for a phrase PromptComposerDictate wrote, \"submit\" for the clearing after an accepted send. cancel() refuses the move."
308
315
  },
309
316
  {
310
317
  "name": "onValueSubmit",
@@ -10,6 +10,7 @@ import {
10
10
  PromptComposer,
11
11
  PromptComposerAction,
12
12
  PromptComposerAttach,
13
+ PromptComposerDictate,
13
14
  PromptComposerFooter,
14
15
  PromptComposerHeader,
15
16
  PromptComposerInput,
@@ -41,6 +42,7 @@ Excerpt — not a complete module
41
42
  | `footer` | div (PromptComposerFooter) | no |
42
43
  | `action` | button (PromptComposerAction) | no |
43
44
  | `attach` | button (PromptComposerAttach), with a hidden file input beside it | no |
45
+ | `dictate` | button (PromptComposerDictate) | no |
44
46
  | `submit` | button (PromptComposerSubmit) | no |
45
47
  | `ring` | span, aria-hidden | no |
46
48
  | `glow` | span, aria-hidden | no |
@@ -76,7 +78,7 @@ Excerpt — not a complete module
76
78
 
77
79
  | Name | Payload | When |
78
80
  | --- | --- | --- |
79
- | `onValueChange` | `(value: string, request: ChangeRequest<string>)` | Before the value moves: reason "keyboard" for an edit, "submit" for the clearing after an accepted send. cancel() refuses the move. |
81
+ | `onValueChange` | `(value: string, request: ChangeRequest<string>)` | Before the value moves: reason "keyboard" for an edit, "dictation" for a phrase PromptComposerDictate wrote, "submit" for the clearing after an accepted send. cancel() refuses the move. |
80
82
  | `onValueSubmit` | `(value: string, request: ChangeRequest<string>)` | Before the message is sent, from Enter, Mod+Enter or the send button — reason "keyboard" or "pointer". cancel() keeps the value where it is; otherwise an uncontrolled composer clears it. |
81
83
  | `onStop` | `({ reason, source })` | The stop button, while status is "streaming". “Stopped” is announced. |
82
84
  | `onAttach` | `(files: File[], { reason, rejected, source })` | Files from the paperclip ("pointer"), a paste ("paste") or a drop ("drop"), after accept, maxSize, maxFiles and multiple. rejected lists what the rules refused, with the reason. |