@cognite/aura 1.48020.0 → 1.48155.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 (27) hide show
  1. package/DESIGN.md +4 -0
  2. package/dist/components/index.d.ts +1 -0
  3. package/dist/components/index.js +1 -0
  4. package/dist/components/index.js.map +1 -1
  5. package/dist/components/ui/core/accordion/accordion.gallery.d.ts +2 -0
  6. package/dist/components/ui/core/accordion/accordion.gallery.js +46 -0
  7. package/dist/components/ui/core/accordion/accordion.gallery.js.map +1 -0
  8. package/dist/components/ui/core/card/card.gallery.d.ts +2 -0
  9. package/dist/components/ui/core/card/card.gallery.js +66 -0
  10. package/dist/components/ui/core/card/card.gallery.js.map +1 -0
  11. package/dist/components/ui/core/item/item.gallery.d.ts +2 -0
  12. package/dist/components/ui/core/item/item.gallery.js +65 -0
  13. package/dist/components/ui/core/item/item.gallery.js.map +1 -0
  14. package/dist/components/ui/core/message/message-response-table.d.ts +11 -0
  15. package/dist/components/ui/core/message/message-response-table.js +118 -0
  16. package/dist/components/ui/core/message/message-response-table.js.map +1 -0
  17. package/dist/components/ui/core/message/message.js +2 -1
  18. package/dist/components/ui/core/message/message.js.map +1 -1
  19. package/dist/components/ui/core/popover/popover.gallery.d.ts +2 -0
  20. package/dist/components/ui/core/popover/popover.gallery.js +46 -0
  21. package/dist/components/ui/core/popover/popover.gallery.js.map +1 -0
  22. package/dist/styles.css +1 -1
  23. package/package.json +1 -1
  24. package/src/components/ui/core/accordion/accordion.md +52 -0
  25. package/src/components/ui/core/card/card.md +47 -0
  26. package/src/components/ui/core/item/item.md +55 -0
  27. package/src/components/ui/core/popover/popover.md +53 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognite/aura",
3
- "version": "1.48020.0",
3
+ "version": "1.48155.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -0,0 +1,52 @@
1
+ Use an Accordion to group related content into stacked sections that users can expand and collapse.
2
+ It reduces page density by showing section titles first and revealing the details on demand.
3
+
4
+ ## When to use
5
+
6
+ - Grouping settings in side panels and configuration panels.
7
+ - Breaking a long form into manageable sections.
8
+ - Organizing documentation, FAQ, or help content.
9
+ - Showing nested information hierarchies.
10
+
11
+ ## When to use something else
12
+
13
+ - Keep content visible when users need to compare or scan it side by side.
14
+ - Show short content directly; it does not need progressive disclosure.
15
+ - Avoid hiding content during high-stakes or multi-step decisions, where missing a hidden section can cause errors.
16
+ - Use a [Collapsible](?path=/docs/primitives-collapsible--docs) for a single optional section.
17
+ - Use [Tabs](?path=/docs/primitives-tabs--docs) when users switch between views rather than read sections in order.
18
+
19
+ ## Content
20
+
21
+ - Wrap each section in an `AccordionItem` with a unique `value`, containing an `AccordionTrigger` and an `AccordionContent`.
22
+ - Write specific section titles that say what is inside, such as "Notification settings" rather than "More".
23
+ - Pass a Tabler icon to `AccordionTrigger` through the `icon` prop when it helps users tell sections apart.
24
+ Use icons on every trigger in the Accordion or on none of them.
25
+
26
+ ## Expand modes
27
+
28
+ - `type="single"` is the default and allows one section open at a time.
29
+ Add `collapsible` so users can close the open section again.
30
+ - `type="multiple"` allows any number of sections open at once.
31
+ Prefer it when users need to see content from more than one section, such as in settings panels.
32
+ - Set `defaultValue` to open sections on first render, or use `value` with `onValueChange` when the state lives elsewhere.
33
+ - Set `disabled` on the `Accordion` to disable every section, or on a single `AccordionItem` to disable only that section.
34
+
35
+ ## Dos and don'ts
36
+
37
+ - **Do** keep icon and heading behavior consistent across sections.
38
+ - **Do** open the most relevant section by default when users are likely to need it.
39
+ - **Don't** nest Accordions.
40
+ - **Don't** use an Accordion for very short or simple content.
41
+ - **Don't** hide errors or required fields inside a collapsed section.
42
+
43
+ ## Behavior
44
+
45
+ - Clicking a trigger, or pressing Enter or Space while it has focus, expands or collapses its section.
46
+ - Up and Down arrow keys move focus between triggers.
47
+ - Each trigger exposes its state to assistive technology through `aria-expanded`.
48
+ - The chevron rotates and the panel animates its height when a section opens or closes.
49
+
50
+ ## Often used with
51
+
52
+ [Separator](?path=/docs/primitives-separator--docs), section headings, and form controls such as [Switch](?path=/docs/primitives-switch--docs) and [Checkbox](?path=/docs/primitives-checkbox--docs) inside panel content.
@@ -0,0 +1,47 @@
1
+ Use a Card as a structural container for a data artifact, widget, or piece of media.
2
+ It provides optional header, body, and footer slots so related content and actions stay together.
3
+
4
+ ## When to use
5
+
6
+ - Presenting charts, visualizations, or data widgets on a dashboard.
7
+ - Building grids of comparable items, such as models or scenes, where users may switch between list and grid views.
8
+ - Displaying media content such as images or videos.
9
+
10
+ ## When to use something else
11
+
12
+ - Use a [Separator](?path=/docs/primitives-separator--docs) and spacing when you only need visual separation between sections.
13
+ - Use a [DataGrid](?path=/docs/primitives-datagrid--docs) when comparing dense metadata across rows.
14
+ - Use an [Item](?path=/docs/primitives-item--docs) for compact rows in a list.
15
+
16
+ ## Content
17
+
18
+ - Every slot is optional; compose only what the content needs.
19
+ - `CardHeader` lays out three columns: `CardHeaderStart` for a leading icon or [Avatar](?path=/docs/primitives-avatar--docs), `CardHeaderCenter` for `CardTitle` and `CardDescription`, and `CardHeaderEnd` for a [Badge](?path=/docs/primitives-badge--docs), button, or menu.
20
+ - Put the main content in `CardContent`.
21
+ - Split `CardFooter` into `CardFooterStart` for metadata or status and `CardFooterEnd` for actions.
22
+ - Use `CardActions` in `CardHeaderEnd` for an overflow menu; its children are [Dropdown Menu](?path=/docs/primitives-dropdown-menu--docs) items.
23
+ - Add a [Count](?path=/docs/primitives-count--docs) in the header when the card summarizes a number of items.
24
+
25
+ ## Titles and headings
26
+
27
+ - `CardTitle` renders an `h3` by default.
28
+ Set `as` to another heading level so the card fits the page's heading hierarchy.
29
+ - Titles and descriptions clamp to two lines, so keep them short and put detail in the body.
30
+
31
+ ## Dos and don'ts
32
+
33
+ - **Do** keep Cards in a grid the same structure, so users can compare them at a glance.
34
+ - **Do** place interactive elements such as a [Button](?path=/docs/primitives-button--docs) or [Checkbox](?path=/docs/primitives-checkbox--docs) inside the body, footer, or header end slot.
35
+ - **Don't** add interactive elements to the card surface itself; Cards are structural containers.
36
+ The exception is a Card that acts as a single link or selection target, where the whole card is one focusable element.
37
+ - **Don't** nest Cards inside Cards.
38
+
39
+ ## Behavior
40
+
41
+ - The Card itself has no interactive behavior or ARIA role.
42
+ - `CardActions` renders a ghost icon button that opens a Dropdown Menu, aligned to the trigger's end edge by default; set `align` to change it.
43
+ - Give any icon-only [Button](?path=/docs/primitives-button--docs) you add to the header an `aria-label`.
44
+
45
+ ## Often used with
46
+
47
+ [Button](?path=/docs/primitives-button--docs), [Badge](?path=/docs/primitives-badge--docs), [Avatar](?path=/docs/primitives-avatar--docs), [Separator](?path=/docs/primitives-separator--docs), [Chart](?path=/docs/primitives-chart--docs), lists, or form fields in the body.
@@ -0,0 +1,55 @@
1
+ Use an Item to display a compact row with a title, an optional description, leading media, and trailing actions.
2
+ Items compose into groups for lists, trees, cards, and popovers.
3
+
4
+ ## When to use
5
+
6
+ - Building selectable or navigable rows in lists and tree views.
7
+ - Showing a compact row with an icon or avatar, a title, and an optional description.
8
+ - Revealing row actions on hover or keyboard focus.
9
+
10
+ ## When to use something else
11
+
12
+ - Use a [Select](?path=/docs/primitives-select--docs) or [Dropdown Menu](?path=/docs/primitives-dropdown-menu--docs) to pick from predefined options.
13
+ - Use form field patterns with a [Checkbox](?path=/docs/primitives-checkbox--docs), [Radio Group](?path=/docs/primitives-radio-group--docs), or [Switch](?path=/docs/primitives-switch--docs) for inline form inputs.
14
+ - Use a [DataGrid](?path=/docs/primitives-datagrid--docs) for dense data across many columns.
15
+ - Use a [Card](?path=/docs/primitives-card--docs) as a general-purpose container.
16
+
17
+ ## Content
18
+
19
+ - Wrap rows in an `ItemGroup`, and put each row in an `Item`.
20
+ - Inside each row, use `ItemMedia` for a leading icon or [Avatar](?path=/docs/primitives-avatar--docs), and `ItemContent` holding `ItemTitle` and an optional `ItemDescription`.
21
+ - Add `ItemCheckbox` at the start of the row for multi-select lists.
22
+ - Place trailing controls such as a [Switch](?path=/docs/primitives-switch--docs) or [Badge](?path=/docs/primitives-badge--docs) after `ItemContent`.
23
+ - Wrap icon buttons that should only appear on hover or focus in `ItemActions`.
24
+ - Set the Avatar size with its own `sizes` prop; `Item` and `ItemMedia` do not resize media.
25
+ - Titles and descriptions truncate to one line, so keep them short.
26
+
27
+ ## Section headers
28
+
29
+ - Use `ItemSectionHeader` with an `ItemSectionHeaderTitle` to label a group of rows.
30
+ - Add `ItemSectionHeaderChevron` when the section can collapse, and set its `open` prop to match the section state.
31
+ - Place `ItemSectionHeader` as a sibling of `ItemGroup`, not inside it, because `ItemGroup` renders a `ul` that only accepts `li` children.
32
+
33
+ ## States
34
+
35
+ - Set `selected` to mark the current or chosen row with the stronger `secondary-background`.
36
+ - Set `disabled` to show the row as unavailable with the `base-foreground-disabled` token, without reducing opacity.
37
+ - `disabled` is presentational only.
38
+ Disable interactive children such as buttons, links, and checkboxes yourself.
39
+
40
+ ## Dos and don'ts
41
+
42
+ - **Do** put links and buttons inside the row rather than replacing the `li` with them.
43
+ - **Do** give every icon button in `ItemActions` an `aria-label`.
44
+ - **Don't** use an Item as a generic card container.
45
+ - **Don't** hide the only way to perform an action inside `ItemActions` on touch devices, where hover is not available.
46
+
47
+ ## Behavior
48
+
49
+ - `ItemGroup` renders a `ul` and `Item` renders an `li`, so assistive technology announces the list and its length.
50
+ - Hovering a row, or moving keyboard focus into it, applies `accent-background` unless the row is disabled.
51
+ - `ItemActions` become visible on hover and when focus moves into the row, so keyboard users can reach them with Tab.
52
+
53
+ ## Often used with
54
+
55
+ [Button](?path=/docs/primitives-button--docs), [Avatar](?path=/docs/primitives-avatar--docs), [Checkbox](?path=/docs/primitives-checkbox--docs), [Separator](?path=/docs/primitives-separator--docs), and [Tree](?path=/docs/primitives-tree--docs).
@@ -0,0 +1,53 @@
1
+ Use a Popover to show interactive or structured supplemental content in a floating panel anchored to a trigger.
2
+ It opens on click and stays open until the user dismisses it.
3
+
4
+ ## When to use
5
+
6
+ - Users need to pick options, fill in a few short fields, or read formatted content on demand without leaving the page.
7
+ - The content relates to a specific control and should appear next to it.
8
+
9
+ ## When to use something else
10
+
11
+ - Show essential content inline or in a [Dialog](?path=/docs/primitives-dialog--docs) instead of hiding it in a Popover.
12
+ - Use a [Tooltip](?path=/docs/primitives-tooltip--docs) for a brief, non-interactive hint.
13
+ - Use a [Hover Card](?path=/docs/primitives-hover-card--docs) for a read-only preview that appears on hover.
14
+ - Use a [Dropdown Menu](?path=/docs/primitives-dropdown-menu--docs) for a list of actions.
15
+
16
+ ## Content
17
+
18
+ - Render the trigger as a [Button](?path=/docs/primitives-button--docs) through the `render` prop of `PopoverTrigger`.
19
+ - Put the panel content in `PopoverContent`.
20
+ - Compose the header from `PopoverHeader`, with a `PopoverHeaderContent` row holding `PopoverTitle` and `PopoverClose`, followed by an optional `PopoverDescription`.
21
+ - Put form fields, actions, or other body content in `PopoverSlot`.
22
+ - Keep content short; the panel is 288 pixels wide by default.
23
+ Override the width with `className` only when the content needs it.
24
+
25
+ ## Positioning
26
+
27
+ - The panel opens below the trigger and centered on it by default.
28
+ - Set `side` to `top`, `right`, `bottom`, or `left`, and `align` to `start`, `center`, or `end`, to place it elsewhere.
29
+ - The panel flips and shifts automatically to stay inside the viewport.
30
+
31
+ ## State
32
+
33
+ - Popovers start closed; set `defaultOpen` to start open.
34
+ - Use `open` with `onOpenChange` when the state lives elsewhere, such as closing the panel after a form is submitted.
35
+ - Set `modal` to block interaction with the rest of the page while the panel is open.
36
+
37
+ ## Dos and don'ts
38
+
39
+ - **Do** include a `PopoverClose` button or a clear completing action, so users know how to dismiss the panel.
40
+ - **Do** give `PopoverContent` an accessible name with `aria-label` when it has no visible title.
41
+ - **Don't** nest Popovers.
42
+ - **Don't** put long forms or multi-step flows in a Popover; use a [Dialog](?path=/docs/primitives-dialog--docs).
43
+
44
+ ## Behavior
45
+
46
+ - Clicking the trigger, or pressing Enter or Space while it has focus, opens and closes the panel.
47
+ - Pressing Escape or clicking outside the panel closes it, and focus returns to the trigger.
48
+ - `PopoverClose` renders a ghost icon button labelled "Close" by default.
49
+ - The panel renders in a portal, so it is not clipped by containers with hidden overflow.
50
+
51
+ ## Often used with
52
+
53
+ [Button](?path=/docs/primitives-button--docs) or an icon button as the trigger, [Command](?path=/docs/primitives-command--docs) for searchable lists, and form controls such as [Input](?path=/docs/primitives-input--docs) and [Label](?path=/docs/primitives-label--docs) inside the panel.