@onereach/idw-ui-components 0.2.1 β†’ 0.3.0-beta.36.0

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 (56) hide show
  1. package/README.md +59 -51
  2. package/dist/cjs/index.js +239 -1
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/esm/index.js +1954 -834
  5. package/dist/esm/index.js.map +1 -1
  6. package/dist/types/components/Feeds/FeedItemBase/FeedItemBase.vue.d.ts +29 -11
  7. package/dist/types/components/Feeds/FeedItemBase/FeedItemBase.vue.d.ts.map +1 -1
  8. package/dist/types/components/Feeds/FeedItemBase/index.d.ts +1 -1
  9. package/dist/types/components/Feeds/FeedItemBase/index.d.ts.map +1 -1
  10. package/dist/types/components/Feeds/FeedItemBase/types.d.ts +50 -10
  11. package/dist/types/components/Feeds/FeedItemBase/types.d.ts.map +1 -1
  12. package/dist/types/components/Feeds/FeedItemMetaFooter/FeedItemMetaFooter.vue.d.ts.map +1 -1
  13. package/dist/types/components/Feeds/FeedList/FeedList.vue.d.ts +5 -4
  14. package/dist/types/components/Feeds/FeedList/FeedList.vue.d.ts.map +1 -1
  15. package/dist/types/components/Feeds/FeedList/types.d.ts +1 -1
  16. package/dist/types/components/Feeds/FeedList/types.d.ts.map +1 -1
  17. package/dist/types/idw-card/index.d.ts +1 -1
  18. package/dist/types/idw-card/index.d.ts.map +1 -1
  19. package/dist/types/idw-card/renderer/CardRenderer.vue.d.ts.map +1 -1
  20. package/dist/types/idw-card/renderer/IdwCardActionBar.vue.d.ts.map +1 -1
  21. package/dist/types/idw-card/renderer/IdwCardElementView.vue.d.ts.map +1 -1
  22. package/dist/types/idw-card/renderer/actionStyle.d.ts +5 -10
  23. package/dist/types/idw-card/renderer/actionStyle.d.ts.map +1 -1
  24. package/dist/types/idw-card/renderer/elements/ColumnSetElement.vue.d.ts.map +1 -1
  25. package/dist/types/idw-card/renderer/elements/ContainerElement.vue.d.ts.map +1 -1
  26. package/dist/types/idw-card/renderer/elements/FactSetElement.vue.d.ts.map +1 -1
  27. package/dist/types/idw-card/renderer/elements/FileElement.vue.d.ts +0 -2
  28. package/dist/types/idw-card/renderer/elements/FileElement.vue.d.ts.map +1 -1
  29. package/dist/types/idw-card/renderer/elements/ImageElement.vue.d.ts.map +1 -1
  30. package/dist/types/idw-card/renderer/elements/ImageSetElement.vue.d.ts.map +1 -1
  31. package/dist/types/idw-card/renderer/elements/InputElement.vue.d.ts.map +1 -1
  32. package/dist/types/idw-card/renderer/elements/MediaAudio.vue.d.ts +7 -0
  33. package/dist/types/idw-card/renderer/elements/MediaAudio.vue.d.ts.map +1 -0
  34. package/dist/types/idw-card/renderer/elements/MediaElement.vue.d.ts.map +1 -1
  35. package/dist/types/idw-card/renderer/elements/MediaVideo.vue.d.ts +8 -0
  36. package/dist/types/idw-card/renderer/elements/MediaVideo.vue.d.ts.map +1 -0
  37. package/dist/types/idw-card/renderer/elements/MediaVolume.vue.d.ts +12 -0
  38. package/dist/types/idw-card/renderer/elements/MediaVolume.vue.d.ts.map +1 -0
  39. package/dist/types/idw-card/renderer/elements/NoteElement.vue.d.ts +7 -0
  40. package/dist/types/idw-card/renderer/elements/NoteElement.vue.d.ts.map +1 -0
  41. package/dist/types/idw-card/renderer/elements/NotificationElement.vue.d.ts +7 -0
  42. package/dist/types/idw-card/renderer/elements/NotificationElement.vue.d.ts.map +1 -0
  43. package/dist/types/idw-card/renderer/elements/ProgressElement.vue.d.ts.map +1 -1
  44. package/dist/types/idw-card/renderer/elements/SkillElement.vue.d.ts.map +1 -1
  45. package/dist/types/idw-card/renderer/elements/TableElement.vue.d.ts.map +1 -1
  46. package/dist/types/idw-card/renderer/frameBorder.d.ts +3 -0
  47. package/dist/types/idw-card/renderer/frameBorder.d.ts.map +1 -0
  48. package/dist/types/idw-card/renderer/mediaChrome.d.ts +3 -0
  49. package/dist/types/idw-card/renderer/mediaChrome.d.ts.map +1 -0
  50. package/dist/types/idw-card/renderer/mediaControls.d.ts +21 -0
  51. package/dist/types/idw-card/renderer/mediaControls.d.ts.map +1 -0
  52. package/dist/types/idw-card/renderer/sliderSpacing.d.ts +3 -0
  53. package/dist/types/idw-card/renderer/sliderSpacing.d.ts.map +1 -0
  54. package/dist/types/idw-card/schema/index.d.ts +1 -1
  55. package/dist/types/idw-card/schema/index.d.ts.map +1 -1
  56. package/package.json +5 -6
package/README.md CHANGED
@@ -52,7 +52,9 @@ const skill = {
52
52
 
53
53
  ## FeedItemBase
54
54
 
55
- Presentational shell for schema-driven feed items. It owns metadata, title, short description, feed-level controls, and expand/collapse. Body content is opaque via slots.
55
+ Presentational feed envelope. It owns the type chip, status, author, title thumbnail, collapsed summary, engagement row, and expand/collapse. The card body stays in the `#body` slot.
56
+
57
+ List and fullscreen views use the same light/dark token pairs as the Cockpit feed frame: `primary` / `on-primary` for the type chip, `outline` for meta text, `surface-1` for the summary panel, `surface-2` for the settled shell, and `primary-opacity-8` for the attention shell. Typography is `typography-caption-regular`, `typography-headline-3` (list title), `typography-headline-1` (fullscreen title), `typography-body-2-regular`, and `typography-body-2-bold` for Show more / summary choices.
56
58
 
57
59
  ```vue
58
60
  <script setup lang="ts">
@@ -62,22 +64,23 @@ import { FeedItemBase } from '@onereach/idw-ui-components';
62
64
  <template>
63
65
  <FeedItemBase
64
66
  id="feed-1"
67
+ type-label="Notification"
68
+ :status="{ label: 'Action Required', tone: 'primary' }"
65
69
  title="Important meeting needs review"
66
70
  short-content="Owner Strategy Review overlaps with your vacation."
67
71
  timestamp="1 min ago"
68
72
  timestamp-datetime="2026-08-07T12:00:00.000Z"
69
- source="by Vacation Skill"
73
+ source="Vacation Skill"
74
+ media-src="/cover.jpg"
75
+ :summary="{ choices: ['Assign Alex'] }"
76
+ :engagement="{ reactionCount: 213, reactionEmojis: ['πŸ‘'], commentsCount: 8, commentsLabel: '8 comments' }"
70
77
  >
71
78
  <template #body>
72
- <!-- Markdown, HTML, skill body, or embedded app -->
73
- </template>
74
-
75
- <template #actions>
76
- <!-- Domain actions such as Approve or Reschedule -->
79
+ <!-- Markdown, HTML, skill body, or card -->
77
80
  </template>
78
81
 
79
82
  <template #footer>
80
- <!-- Optional feedback, comments, or additional context (shown while body is open) -->
83
+ <!-- Optional host content shown only while the list body is open -->
81
84
  </template>
82
85
  </FeedItemBase>
83
86
  </template>
@@ -88,52 +91,51 @@ import { FeedItemBase } from '@onereach/idw-ui-components';
88
91
  | Prop | Type | Default | Description |
89
92
  |------|------|---------|-------------|
90
93
  | `id` | `string` | β€” | Stable feed item id (used for a11y ids) |
91
- | `title` | `string` | β€” | Shell title (always visible) |
92
- | `shortContent` | `string` | β€” | Shell short description |
94
+ | `title` | `string` | β€” | Shell title |
95
+ | `shortContent` | `string` | β€” | Subtitle under the list title |
96
+ | `typeLabel` | `string` | β€” | Type chip (Task, Notification, News, …) |
97
+ | `status` | `{ label, tone? }` | β€” | Status label plus indicator tone |
93
98
  | `timestamp` | `string` | β€” | Preformatted timestamp text |
94
99
  | `timestampDatetime` | `string` | β€” | Optional value for `<time datetime>` |
95
- | `source` | `string` | β€” | Source / author text |
96
- | `expandable` | `boolean` | `true` | Whether the expand control is shown |
97
- | `fullscreenControl` | `boolean` | `false` | Shows `open_in_full` inside default `#controls`; host owns overlay via `fullscreen` |
98
- | `mentionControl` | `boolean` | `true` | Shows `alternate_email` (mention) inside default `#controls` |
99
- | `isNew` | `boolean` | `false` | Attention shell (`primary-opacity-12`) vs settled shell (`surface-2`) |
100
- | `controlLabels` | `Partial<Record<FeedItemControl, string>> & { fullscreen?: string }` | Mention / Fullscreen | Optional localized tooltips |
101
-
102
- When `expandable` is `false`, the body is always shown and the expand button is hidden.
103
-
104
- Expand labels are fixed (`Show more` / `Show less`). The scrollable body uses `max-height: 37.875rem` by default.
105
-
106
- `FeedItemControl`: `'mention'`
100
+ | `source` | `string` | β€” | Author name, rendered as `By {source}` |
101
+ | `authorPrefix` | `string` | `By` | Prefix before `source` |
102
+ | `mediaSrc` / `mediaAlt` | `string` | β€” | 64px list thumbnail. Hidden in fullscreen |
103
+ | `summary` | `{ text?, choices? }` | β€” | Collapsed summary panel. Hidden once the body is open |
104
+ | `summaryLabel` | `string` | `Summary:` | Summary panel heading |
105
+ | `engagement` | `FeedItemEngagement` | β€” | Reactions, read time, and comments row |
106
+ | `view` | `'list' \| 'fullscreen'` | `list` | Fullscreen uses the large title, drops the thumbnail and expand control, and keeps the body open |
107
+ | `expandable` | `boolean` | `true` | Whether Show more / Show less is shown |
108
+ | `fullscreenControl` | `boolean` | `false` | Shows `open_in_full` inside default `#controls` |
109
+ | `mentionControl` | `boolean` | `true` | Shows `alternate_email` |
110
+ | `shareControl` | `boolean` | `true` | Shows share. In fullscreen this is the labeled Share button under the title |
111
+ | `moreControl` | `boolean` | `true` | Shows `more_vert` |
112
+ | `isNew` / `highlighted` | `boolean` | `false` | Attention shell (`primary-opacity-8`) vs settled shell (`surface-2`) |
113
+ | `controlLabels` | `FeedItemControlLabels` | Mention / Share / More / Fullscreen / Show more / Show less | Optional localized labels |
114
+
115
+ `FeedStatusTone`: `'primary' | 'success' | 'warning' | 'error' | 'neutral' | 'secondary'`.
116
+
117
+ When `expandable` is `false`, the body is always shown and the expand button is hidden. The list body uses `max-height: 37.875rem`. Fullscreen body content is centered at `50rem`.
118
+
119
+ `FeedItemControl`: `'mention' | 'share' | 'more'`
107
120
 
108
121
  ### Slots
109
122
 
110
- - `body` β€” rich / schema / app content (lazy-mounted on first expand, kept mounted while the item lives)
111
- - `actions` β€” domain action buttons (visible only while body is open; empty slot content is hidden)
112
- - `footer` β€” optional extra footer (visible only while body is open)
113
- - `controls` β€” override default controls entirely (including fullscreen when `fullscreenControl` is true)
114
-
115
- ### Default controls
116
-
117
- The default `#controls` content includes mention (`alternate_email`) when `mentionControl` is true (default), and fullscreen when `fullscreenControl` is true. A custom `#controls` slot replaces both.
118
-
119
- ```vue
120
- <!-- Localize built-in control tooltips -->
121
- <FeedItemBase
122
- ...
123
- :control-labels="{ mention: 'Π—Π³Π°Π΄Π°Ρ‚ΠΈ', fullscreen: 'На вСсь Π΅ΠΊΡ€Π°Π½' }"
124
- />
125
- ```
123
+ - `body` β€” card or rich content (lazy-mounted on first expand, kept mounted while the item lives)
124
+ - `actions` β€” extra controls under the body, shown while the body is open. Card action buttons belong in the body itself
125
+ - `media` β€” replaces the 64px thumbnail (skill tile, icon). Hidden in fullscreen
126
+ - `footer` β€” optional extra footer, list view only, shown while the body is open
127
+ - `controls` β€” replaces the default header icon buttons
126
128
 
127
129
  ### Events
128
130
 
129
131
  - `update:expanded` β€” expanded state changed
130
132
  - `expand` / `collapse` β€” convenience events
131
- - `control-click` β€” `'mention'` from the default mention control
132
- - `fullscreen` β€” fullscreen control clicked; host should open its overlay (modal / route)
133
+ - `control-click` β€” `'mention'`, `'share'`, or `'more'`
134
+ - `fullscreen` β€” fullscreen control clicked; host should open its overlay
133
135
 
134
136
  ### Body lifecycle
135
137
 
136
- The body slot mounts on the first expansion and stays mounted afterwards. Collapsing hides it with `v-show` so embedded apps / iframes are not destroyed automatically.
138
+ The body slot mounts on the first expansion and stays mounted afterwards. Collapsing hides it with `v-show` so embedded apps / iframes are not destroyed automatically. A collapsed summary is visible only while the body is closed.
137
139
 
138
140
  ## Feed type content (body slot)
139
141
 
@@ -273,8 +275,8 @@ const items: FeedListItem[] = [
273
275
  - `skill` β€” requires `content: string`; optional `skill` (`SkillCardData`) for the built-in card
274
276
  - `file` β€” requires `fileUrl: string`
275
277
  - `card` β€” requires `source` (`{ card }` or `{ templateId, data }`). Do not add `approval` / `task` as extra `type`s.
276
- - Shell fields are picked from `FeedItemBaseProps` (`timestampDatetime`, `fullscreenControl`, `mentionControl`, `isNew`, …)
277
- - Optional `engagement` (`FeedItemEngagement`) drives the built-in meta footer (reactions / comments / reading time) at the end of an **expanded** item
278
+ - Shell fields are picked from `FeedItemBaseProps` (`typeLabel`, `status`, `summary`, `mediaSrc`, `timestampDatetime`, `fullscreenControl`, `mentionControl`, `isNew`, …)
279
+ - Optional `engagement` (`FeedItemEngagement`) renders the compact reactions / comments / reading-time row in the list expansion area, collapsed and expanded
278
280
 
279
281
  HTML/file rows get `fullscreenControl` by default and an unconstrained body max-height.
280
282
  `mentionControl` defaults to `true` when omitted.
@@ -282,7 +284,7 @@ HTML/file rows get `fullscreenControl` by default and an unconstrained body max-
282
284
  ### Slots
283
285
 
284
286
  - `header` β€” above the scroll region
285
- - `actions` / `controls` / `footer` β€” scoped `{ item }`, forwarded to `FeedItemBase` (`#footer` is shown only while the item body is open β€” use for reactions / comments)
287
+ - `actions` / `controls` / `footer` β€” scoped `{ item }`, forwarded to `FeedItemBase` (`#footer` is shown only while the list body is open)
286
288
  - `empty` / `loading` / `loading-more` β€” replace defaults
287
289
 
288
290
  ### Events
@@ -339,19 +341,23 @@ function onAction(event: IdwCardActionEvent) {
339
341
  </template>
340
342
  ```
341
343
 
342
- ### v1 elements
344
+ ### Elements
343
345
 
344
- Layout / content: `Text` (Markdown), `Image`, `ImageSet`, `FactSet`, `Container`, `ColumnSet` (2–3 columns), `Table`, `Media`, `Html`, `File`, `Skill`, `ActionSet`, `Badge`, `Icon`, `Progress`.
346
+ Layout / content: `Text` (Markdown, including headings and lists), `Image` (`aspect`: `video` | `square`), `ImageSet`, `FactSet` (optional `progress`), `Note`, `Container`, `ColumnSet` (2–3 columns), `Table`, `Media` (feed video and audio players), `Html`, `File` (attachment row, optional `size`; menu opens or downloads `src`), `Skill` (tile; announcement text is a sibling `Text`), `ActionSet`, `Badge`, `Icon`, `Progress`.
345
347
 
346
- Inputs (inspired by Adaptive Cards `Input.*`, plus IDW widgets). Every input has `name` (collected on action), plus optional `label`, `hint`, `required`, `errorMessage`, `disabled`:
348
+ Inputs bind library props. Every input has `name` (collected on action), plus optional `label`, `hint`, `required`, `error` (`errorMessage` still accepted), `disabled`:
347
349
 
348
350
  | Type | Renders as | Notes |
349
351
  |---|---|---|
350
- | `Input.Text` | `OrInputV3` / `OrTextareaV3` | `multiline`, `style`: text/email/url/tel/password |
352
+ | `Input.Text` | `OrInputV3` | `style`: text/email/url/tel/password. `multiline` still renders `OrTextareaV3` |
353
+ | `Input.Textarea` | `OrTextareaV3` | `rows`, `maxLength` |
351
354
  | `Input.Number` | `OrInputV3` | `min` / `max` / `step` |
352
355
  | `Input.Toggle` | `OrSwitchV3` | boolean |
353
356
  | `Input.Checkbox` | `OrCheckboxV3` | boolean |
354
- | `Input.ChoiceSet` | select / radio / checkbox group | `style`: compact / expanded / filtered; `multi` |
357
+ | `Input.Select` | `OrSelectV3` | `options[]` (`label`, `value`, `disabled?`); `multiple`, `enableSearch`, `enableClear` |
358
+ | `Input.RadioGroup` | `OrRadioGroupV3` | `options[]`; `direction`: `vertical` \| `horizontal`; `readonly` |
359
+ | `Input.CheckboxGroup` | `OrCheckboxGroupV3` | `options[]`; `direction`: `vertical` \| `horizontal`; `readonly` |
360
+ | `Input.ChoiceSet` | select, radios, or checkboxes | Deprecated. `style: "expanded"` is radios, or checkboxes when `multiple` is set |
355
361
  | `Input.Date` | `OrDatePickerV3` | ISO date string |
356
362
  | `Input.Time` | `OrTimePickerV3` | `HH:mm` |
357
363
  | `Input.DateTime` | `OrDateTimePickerV3` | ISO datetime |
@@ -360,9 +366,11 @@ Inputs (inspired by Adaptive Cards `Input.*`, plus IDW widgets). Every input has
360
366
  | `Input.Rating` | `OrRatingV3` | number |
361
367
  | `Input.Location` | address (+ optional lat/lng) | `{ address, lat?, lng? }` |
362
368
 
363
- Spacing: `none | xs | sm | md | lg | xl`. Omitted `spacing` defaults to `md` between siblings; the first item in a stack has no top gap. Text style: `caption | body | headline`. Tone: `default | emphasis | success | warning | attention`.
369
+ Actions use `OrButtonV3` `variant` (`contained` | `outlined` | `text`), `color` (`primary` | `danger`), `disabled`, and optional `icon`. `style` `default` | `primary` | `destructive` still maps onto those props.
370
+
371
+ Spacing: `none | xs | sm | md | lg | xl`. Omitted `spacing` defaults to `md` between siblings; the first item in a stack has no top gap. `horizontalAlignment` and `verticalAlignment`: `start` (default) | `center` | `end`. Horizontal alignment places the element in its row. Vertical alignment places it in the leftover height of a stretched column or container. Text style: `caption | body | headline`. Tone: `default | emphasis | success | warning | attention`. Progress `color`: `auto` | `primary` | `success` | `warning` | `error` (`tone` still accepted). `maxValue` is preferred over `max`.
364
372
 
365
- This is **not** Adaptive Cards JSON. We borrowed the input/container/action model (including ChoiceSet, Table, Media, ImageSet, ShowCard, ToggleVisibility) and mapped it onto or-components.
373
+ This is **not** Adaptive Cards JSON. We borrowed the input/container/action model (including Table, Media, ImageSet, ShowCard, ToggleVisibility) and mapped it onto or-components. Choice fields are `Input.Select`, `Input.RadioGroup`, and `Input.CheckboxGroup`.
366
374
 
367
375
  Not in v1 (AC/Copilot extras we skipped on purpose): Refresh, Authentication, Carousel, Charts, `Data.Query` remote choices, `selectAction`, `RichTextBlock` runs, and `Action.Execute`. `Input.Location` has no or-component β€” it is address text plus optional lat/lng, not a map picker.
368
376