@canonical/design-system 0.1.1 → 0.2.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.
- package/.github/PULL_REQUEST_TEMPLATE.md +22 -0
- package/.github/workflows/ci.yml +49 -0
- package/.github/workflows/sync-coda-manual.yml +13 -0
- package/.github/workflows/sync-coda-scheduled.yml +9 -0
- package/.github/workflows/sync-coda.yml +65 -1
- package/.mcp.json +1 -3
- package/README.md +132 -79
- package/biome.json +1 -1
- package/bun.lock +80 -38
- package/data/apps/component/file_tree.ttl +6 -1
- package/data/apps/component/key_value_pair.ttl +5 -1
- package/data/apps/component/navigation.ttl +5 -1
- package/data/apps/component/notification.ttl +5 -1
- package/data/apps/component/side_navigation.ttl +11 -0
- package/data/apps/component/skeleton_loading.ttl +5 -1
- package/data/apps/component/status_bar.ttl +5 -1
- package/data/apps/component/toolbar.ttl +5 -1
- package/data/apps/group/key_value_pairs.ttl +11 -0
- package/data/apps/group/notifications.ttl +5 -1
- package/data/apps/layout/application_layout.ttl +4 -0
- package/data/apps/layout/content_layout.ttl +11 -1
- package/data/apps/layout/empty_layout.ttl +5 -1
- package/data/apps/layout/list_page_layout.ttl +5 -1
- package/data/apps/layout/settings_page_layout.ttl +5 -1
- package/data/apps/layout/view_layout.ttl +4 -0
- package/data/apps/pattern/action_bar.ttl +11 -0
- package/data/apps/pattern/code_diff.ttl +5 -1
- package/data/apps/pattern/data_table.ttl +205 -2
- package/data/apps/pattern/destructive_modal.ttl +5 -1
- package/data/apps/pattern/drawer.ttl +12 -0
- package/data/apps/pattern/keyboard_shortcuts.ttl +5 -1
- package/data/apps/pattern/notification_center.ttl +19 -1
- package/data/apps/pattern/side_panel.ttl +6 -1
- package/data/apps/pattern/sidepanel_stacked.ttl +5 -1
- package/data/apps/subcomponent/data_table-action_bar.ttl +27 -0
- package/data/apps/subcomponent/data_table-body_cell.ttl +106 -0
- package/data/apps/subcomponent/data_table-group_header_row.ttl +58 -0
- package/data/apps/subcomponent/data_table-header_cell.ttl +73 -0
- package/data/apps/subcomponent/data_table-pagination_bar.ttl +44 -0
- package/data/apps/subcomponent/data_table-persistent_selection.ttl +50 -0
- package/data/apps/subcomponent/data_table-settings_menu.ttl +63 -0
- package/data/apps/subcomponent/drawer-content.ttl +12 -0
- package/data/apps/subcomponent/drawer-footer.ttl +12 -0
- package/data/apps/subcomponent/drawer-header.ttl +12 -0
- package/data/apps/subcomponent/file_tree-node.ttl +5 -1
- package/data/apps/subcomponent/log.ttl +11 -0
- package/data/apps/subcomponent/side_panel-content.ttl +12 -0
- package/data/apps/subcomponent/side_panel-footer.ttl +12 -0
- package/data/apps/subcomponent/side_panel-header.ttl +12 -0
- package/data/apps_anbox/component/theme_switcher.ttl +10 -0
- package/data/apps_anbox/pattern/side_menu.ttl +11 -1
- package/data/apps_debcrafters/component/example.ttl +10 -0
- package/data/apps_debcrafters/component/my_fancy_component.ttl +11 -0
- package/data/apps_debcrafters.ttl +4 -0
- package/data/apps_juju/pattern/single_select_multi_layered.ttl +4 -1
- package/data/apps_landscape/component/password_constraints.ttl +4 -1
- package/data/apps_landscape/component/truncated_cell.ttl +38 -0
- package/data/apps_launchpad/component/avatar.ttl +31 -0
- package/data/apps_launchpad/component/badge.ttl +11 -8
- package/data/apps_launchpad/component/breadcrumbs.ttl +5 -2
- package/data/apps_launchpad/component/button.ttl +10 -7
- package/data/apps_launchpad/component/checkbox_input.ttl +31 -0
- package/data/apps_launchpad/component/chip.ttl +11 -8
- package/data/apps_launchpad/component/combobox.ttl +16 -10
- package/data/apps_launchpad/component/description_list.ttl +8 -3
- package/data/apps_launchpad/component/drawer.ttl +38 -0
- package/data/apps_launchpad/component/log.ttl +58 -0
- package/data/apps_launchpad/component/modal.ttl +44 -0
- package/data/apps_launchpad/component/radio_input.ttl +37 -0
- package/data/apps_launchpad/component/select_input.ttl +38 -0
- package/data/apps_launchpad/component/switch.ttl +8 -4
- package/data/apps_launchpad/component/text_input.ttl +13 -8
- package/data/apps_launchpad/component/textarea_input.ttl +39 -0
- package/data/apps_launchpad/component/tooltip.ttl +12 -7
- package/data/apps_launchpad/subcomponent/combobox-checkbox_option.ttl +11 -9
- package/data/apps_launchpad/subcomponent/combobox-footer.ttl +8 -3
- package/data/apps_launchpad/subcomponent/combobox-group.ttl +10 -6
- package/data/apps_launchpad/subcomponent/combobox-helper.ttl +11 -6
- package/data/apps_launchpad/subcomponent/combobox-loading.ttl +9 -3
- package/data/apps_launchpad/subcomponent/combobox-no_results.ttl +8 -3
- package/data/apps_launchpad/subcomponent/combobox-radio_option.ttl +12 -10
- package/data/apps_launchpad/subcomponent/combobox-search.ttl +10 -6
- package/data/apps_launchpad/subcomponent/description_list-item.ttl +8 -3
- package/data/apps_launchpad/subcomponent/log-line.ttl +38 -0
- package/data/apps_launchpad/subcomponent/modal-content-body.ttl +18 -0
- package/data/apps_launchpad/subcomponent/modal-content-footer.ttl +18 -0
- package/data/apps_launchpad/subcomponent/modal-content-header-close_button.ttl +11 -0
- package/data/apps_launchpad/subcomponent/modal-content-header.ttl +19 -0
- package/data/apps_launchpad/subcomponent/modal-content.ttl +20 -0
- package/data/apps_launchpad/subcomponent/side_panel-content-body.ttl +11 -0
- package/data/apps_launchpad/subcomponent/side_panel-content-footer.ttl +11 -0
- package/data/apps_launchpad/subcomponent/side_panel-content-header-close_button.ttl +11 -0
- package/data/apps_launchpad/subcomponent/side_panel-content-header.ttl +12 -0
- package/data/apps_launchpad/subcomponent/side_panel-content.ttl +12 -0
- package/data/apps_lxd/component/back_link.ttl +29 -0
- package/data/apps_lxd/component/code_snippet_with_copy_button.ttl +54 -0
- package/data/apps_lxd/component/confirmation_checkbox.ttl +19 -3
- package/data/apps_lxd/component/doc_link.ttl +45 -0
- package/data/apps_lxd/component/meter.ttl +37 -0
- package/data/apps_lxd/component/output_field.ttl +48 -0
- package/data/apps_lxd/component/rename_header.ttl +74 -0
- package/data/apps_lxd/component/tab_links.ttl +35 -0
- package/data/apps_lxd/subcomponent/copy_to_clipboard.ttl +39 -0
- package/data/apps_lxd/view/network_topology.ttl +16 -2
- package/data/apps_notary.ttl +4 -0
- package/data/apps_portal/component/badge.ttl +3 -0
- package/data/apps_portal/component/credit_card_input.ttl +10 -0
- package/data/apps_portal/component/key_value_pair.ttl +10 -0
- package/data/apps_portal/pattern/purchase_summary.ttl +10 -0
- package/data/apps_portal/subcomponent/read_only_modal.ttl +10 -0
- package/data/apps_workplaceengineering/component/label-highlight.ttl +18 -0
- package/data/apps_workplaceengineering/component/rule.ttl +11 -0
- package/data/apps_workplaceengineering/component/skip_link.ttl +10 -0
- package/data/apps_workplaceengineering/component/theme_switcher.ttl +11 -0
- package/data/apps_workplaceengineering/pattern/callout_numbers_card.ttl +11 -0
- package/data/apps_workplaceengineering/pattern/event_timeline.ttl +11 -0
- package/data/apps_workplaceengineering/pattern/group_card.ttl +11 -0
- package/data/apps_workplaceengineering/pattern/travel_provider_card.ttl +12 -0
- package/data/apps_workplaceengineering.ttl +4 -0
- package/data/documentation/layout/documentation_layout.ttl +5 -1
- package/data/documentation/pattern/library_side_navigation.ttl +6 -2
- package/data/global/component/accordion.ttl +61 -2
- package/data/global/component/announcement.ttl +12 -2
- package/data/global/component/avatar.ttl +11 -0
- package/data/global/component/badge.ttl +42 -1
- package/data/global/component/breadcrumbs.ttl +18 -2
- package/data/global/component/button.ttl +36 -6
- package/data/global/component/button_link.ttl +5 -1
- package/data/global/component/card.ttl +33 -2
- package/data/global/component/checkbox_field.ttl +11 -0
- package/data/global/component/chip.ttl +74 -2
- package/data/global/component/choices_field.ttl +11 -0
- package/data/global/component/code_snippet-content.ttl +6 -2
- package/data/global/component/code_snippet-header.ttl +6 -2
- package/data/global/component/code_snippet.ttl +13 -2
- package/data/global/component/color_field.ttl +11 -0
- package/data/global/component/combobox_field.ttl +11 -0
- package/data/global/component/contextual_menu.ttl +22 -2
- package/data/global/component/data_tooltip.ttl +84 -0
- package/data/global/component/date_field.ttl +11 -0
- package/data/global/component/date_time_field.ttl +11 -0
- package/data/global/component/dropdown_button.ttl +18 -0
- package/data/global/component/file_upload_field.ttl +11 -0
- package/data/global/component/heading.ttl +7 -2
- package/data/global/component/hidden_field.ttl +11 -0
- package/data/global/component/icon.ttl +6 -2
- package/data/global/component/icon_in_container.ttl +5 -1
- package/data/global/component/inline_code.ttl +11 -0
- package/data/global/component/keyboard_key.ttl +7 -3
- package/data/global/component/markdown_field.ttl +11 -0
- package/data/global/component/mode_switcher.ttl +11 -0
- package/data/global/component/month_field.ttl +11 -0
- package/data/global/component/notification_inline.ttl +5 -1
- package/data/global/component/notification_toast.ttl +5 -1
- package/data/global/component/number_field.ttl +11 -0
- package/data/global/component/pagination.ttl +6 -2
- package/data/global/component/password_field.ttl +11 -0
- package/data/global/component/phone_field.ttl +11 -0
- package/data/global/component/popover.ttl +5 -1
- package/data/global/component/range_field.ttl +11 -0
- package/data/global/component/rating_field.ttl +11 -0
- package/data/global/component/relative_timestamp.ttl +10 -0
- package/data/global/component/rich_choices_field.ttl +11 -0
- package/data/global/component/rich_text_field.ttl +11 -0
- package/data/global/component/search_field.ttl +11 -0
- package/data/global/component/segmented_control_field.ttl +11 -0
- package/data/global/component/select_field.ttl +11 -0
- package/data/global/component/switch_field.ttl +11 -0
- package/data/global/component/table.ttl +7 -2
- package/data/global/component/tabs.ttl +7 -3
- package/data/global/component/tag.ttl +18 -0
- package/data/global/component/text_field.ttl +11 -0
- package/data/global/component/textarea_field.ttl +11 -0
- package/data/global/component/tile.ttl +24 -3
- package/data/global/component/time_field.ttl +11 -0
- package/data/global/component/timestamp.ttl +10 -0
- package/data/global/component/tooltip.ttl +56 -18
- package/data/global/component/tooltip_wrapper.ttl +81 -0
- package/data/global/group/buttons.ttl +12 -1
- package/data/global/group/cards.ttl +9 -1
- package/data/global/group/code_snippets.ttl +5 -1
- package/data/global/group/keyboard_keys.ttl +7 -3
- package/data/global/group/tiles.ttl +5 -1
- package/data/global/layout/error_layout.ttl +5 -1
- package/data/global/layout/form_layout.ttl +5 -1
- package/data/global/layout/identity_page_form.ttl +5 -1
- package/data/global/modifier/dark.ttl +1 -1
- package/data/global/modifier/information.ttl +1 -1
- package/data/global/modifier/light.ttl +1 -1
- package/data/global/modifier/modal.ttl +6 -0
- package/data/global/modifier/surface1.ttl +6 -0
- package/data/global/modifier/surface2.ttl +6 -0
- package/data/global/modifier/surface3.ttl +6 -0
- package/data/global/modifier_family/_emphasis.ttl +2 -1
- package/data/global/modifier_family/_other.ttl +2 -1
- package/data/global/modifier_family/anticipation.ttl +2 -1
- package/data/global/modifier_family/criticality.ttl +2 -1
- package/data/global/modifier_family/density.ttl +2 -1
- package/data/global/modifier_family/importance.ttl +2 -1
- package/data/global/modifier_family/lifecycle.ttl +2 -1
- package/data/global/modifier_family/mode.ttl +7 -0
- package/data/global/modifier_family/release.ttl +2 -1
- package/data/global/modifier_family/surface.ttl +7 -0
- package/data/global/pattern/description_list.ttl +11 -0
- package/data/global/pattern/field.ttl +11 -0
- package/data/global/pattern/form.ttl +10 -0
- package/data/global/pattern/form_login.ttl +10 -0
- package/data/global/pattern/info_table.ttl +5 -1
- package/data/global/pattern/modal.ttl +7 -2
- package/data/global/pattern/navigation.ttl +5 -1
- package/data/global/pattern/stepper.ttl +5 -1
- package/data/global/pattern/table_of_contents.ttl +5 -1
- package/data/global/pattern/timeline.ttl +41 -6
- package/data/global/subcomponent/accordion-item.ttl +10 -5
- package/data/global/subcomponent/breadcrumbs-item.ttl +7 -3
- package/data/global/subcomponent/card-content.ttl +8 -3
- package/data/global/subcomponent/card-footer.ttl +12 -0
- package/data/global/subcomponent/card-header.ttl +8 -3
- package/data/global/subcomponent/card-image.ttl +8 -3
- package/data/global/subcomponent/card-thumbnail.ttl +6 -1
- package/data/global/subcomponent/chart_legend.ttl +11 -0
- package/data/global/subcomponent/chart_legend_item.ttl +11 -0
- package/data/global/subcomponent/checkbox_input.ttl +11 -0
- package/data/global/subcomponent/color_input.ttl +11 -0
- package/data/global/subcomponent/combobox_input.ttl +11 -0
- package/data/global/subcomponent/date_input.ttl +11 -0
- package/data/global/subcomponent/date_time_input.ttl +11 -0
- package/data/global/subcomponent/field-description.ttl +11 -0
- package/data/global/subcomponent/field-label.ttl +11 -0
- package/data/global/subcomponent/file_upload_input.ttl +11 -0
- package/data/global/subcomponent/hidden_input.ttl +11 -0
- package/data/global/subcomponent/kvp_container.ttl +11 -0
- package/data/global/subcomponent/kvpitem_base.ttl +11 -0
- package/data/global/subcomponent/markdown_input.ttl +11 -0
- package/data/global/subcomponent/modal-content.ttl +5 -1
- package/data/global/subcomponent/modal-footer.ttl +5 -1
- package/data/global/subcomponent/modal-header.ttl +5 -1
- package/data/global/subcomponent/month_input.ttl +11 -0
- package/data/global/subcomponent/number_input.ttl +11 -0
- package/data/global/subcomponent/password_input.ttl +11 -0
- package/data/global/subcomponent/phone_input.ttl +11 -0
- package/data/global/subcomponent/radio_input.ttl +11 -0
- package/data/global/subcomponent/range_input.ttl +11 -0
- package/data/global/subcomponent/rating_input.ttl +11 -0
- package/data/global/subcomponent/rich_text_input.ttl +11 -0
- package/data/global/subcomponent/search_input.ttl +26 -0
- package/data/global/subcomponent/segmented_control_input.ttl +11 -0
- package/data/global/subcomponent/select_input.ttl +11 -0
- package/data/global/subcomponent/spin_button.ttl +11 -0
- package/data/global/subcomponent/spinner.ttl +7 -3
- package/data/global/subcomponent/switch_input.ttl +11 -0
- package/data/global/subcomponent/table-cell.ttl +5 -1
- package/data/global/subcomponent/table-row.ttl +5 -1
- package/data/global/subcomponent/text_input.ttl +11 -0
- package/data/global/subcomponent/textarea_input.ttl +33 -0
- package/data/global/subcomponent/tile-content.ttl +7 -3
- package/data/global/subcomponent/tile-header.ttl +13 -4
- package/data/global/subcomponent/time_input.ttl +11 -0
- package/data/global/subcomponent/timeline-content.ttl +7 -2
- package/data/global/subcomponent/timeline-event.ttl +8 -3
- package/data/global/subcomponent/timeline-expansion_indicator.ttl +6 -1
- package/data/global/subcomponent/timeline-header.ttl +6 -1
- package/data/global/variant/tooltip_dense.ttl +14 -0
- package/data/global/view/settings_view.ttl +5 -1
- package/data/sites/component/blog_card.ttl +11 -0
- package/data/sites/component/quote.ttl +11 -0
- package/data/sites/component/rule.ttl +11 -0
- package/data/sites/component/section.ttl +11 -0
- package/data/sites/group/blog_cards.ttl +11 -0
- package/data/sites/group/xblog_elements.ttl +10 -0
- package/data/sites/layout/blog_page_layout.ttl +11 -0
- package/data/{site → sites}/layout/case_study_layout.ttl +6 -2
- package/data/sites/layout/site_layout.ttl +11 -0
- package/data/sites/pattern/hero-github.ttl +11 -0
- package/data/sites/pattern/hero.ttl +11 -0
- package/data/sites/pattern/info_table.ttl +11 -0
- package/data/sites/pattern/pricing_section.ttl +11 -0
- package/data/sites/pattern/pricing_table.ttl +11 -0
- package/data/sites/pattern/read_more_section.ttl +11 -0
- package/data/sites/pattern/skip_link.ttl +11 -0
- package/data/{site.ttl → sites.ttl} +2 -2
- package/data/sites_webcomponentsprototype/component/blog_cards.ttl +4 -1
- package/data/sites_webcomponentsprototype/component/ctablock.ttl +4 -1
- package/data/sites_webcomponentsprototype/component/list.ttl +5 -2
- package/data/sites_webcomponentsprototype/component/tabs.ttl +5 -2
- package/data/sites_webcomponentsprototype/layout/site_layout.ttl +3 -0
- package/data/sites_webcomponentsprototype/pattern/basic_section.ttl +4 -1
- package/data/sites_webcomponentsprototype/pattern/blog_section.ttl +4 -1
- package/data/sites_webcomponentsprototype/pattern/ctasection.ttl +5 -2
- package/data/sites_webcomponentsprototype/pattern/equal_heights.ttl +5 -2
- package/data/sites_webcomponentsprototype/pattern/hero.ttl +5 -2
- package/data/sites_webcomponentsprototype/pattern/logo_section.ttl +5 -2
- package/data/sites_webcomponentsprototype/pattern/quote_wrapper.ttl +5 -2
- package/data/sites_webcomponentsprototype/pattern/tiered_list.ttl +5 -2
- package/data/tag/allgood.ttl +7 -0
- package/data/tag/beta.ttl +7 -0
- package/data/tag/candidate.ttl +7 -0
- package/data/tag/devbatch1.ttl +7 -0
- package/data/tag/devbatch2.ttl +7 -0
- package/data/tag/devexternal.ttl +7 -0
- package/data/tag/devreactapproved.ttl +7 -0
- package/data/tag/devreactbase.ttl +7 -0
- package/data/tag/devreactpreapproved.ttl +7 -0
- package/data/tag/devspecial.ttl +7 -0
- package/data/tag/devsveltedone.ttl +7 -0
- package/data/tag/devsveltein-progress.ttl +7 -0
- package/data/tag/divergent.ttl +7 -0
- package/data/tag/docscomplete.ttl +7 -0
- package/data/tag/draft.ttl +7 -0
- package/data/tag/edge.ttl +7 -0
- package/data/tag/global-docs-missing.ttl +7 -0
- package/data/tag/has-no-global-entry.ttl +7 -0
- package/data/tag/lpto-be-upstreamed.ttl +7 -0
- package/data/tag/lptriageblocked-reqs-design.ttl +7 -0
- package/data/tag/lptriageno-upstream.ttl +7 -0
- package/data/tag/lptriagereimplement-and-deprecate.ttl +7 -0
- package/data/tag/lptriagereimplement-and-keep.ttl +7 -0
- package/data/tag/lptriageupstream-and-deprecate.ttl +7 -0
- package/data/tag/minimal.ttl +7 -0
- package/data/tag/needsdefinition.ttl +7 -0
- package/data/tag/needsdiscussion.ttl +7 -0
- package/data/tag/needsdocumentation.ttl +7 -0
- package/data/tag/needsreview.ttl +7 -0
- package/data/tag/needstriage.ttl +7 -0
- package/data/tag/needsupdate.ttl +7 -0
- package/data/tag/notstarted.ttl +7 -0
- package/data/tag/specialadoption-docs.ttl +7 -0
- package/data/tag/stable.ttl +7 -0
- package/data/tag/stylesready.ttl +7 -0
- package/data/tag/triagedbacklog.ttl +7 -0
- package/data/tag/triagedrejected.ttl +7 -0
- package/data/tag/upstream-candidate.ttl +7 -0
- package/data/tag/upstream-compliant.ttl +7 -0
- package/data/tag/upstreamcandidate.ttl +7 -0
- package/data/tag/waiting-for-delta-review.ttl +7 -0
- package/data/tag/wpeinital-implementation.ttl +7 -0
- package/data/tag/wpetriageupstream-and-deprecate.ttl +6 -0
- package/data/tagcategory/channel.ttl +4 -0
- package/data/tagcategory/concept-status.ttl +4 -0
- package/data/tagcategory/concept-type.ttl +4 -0
- package/data/tagcategory/documentation-stage.ttl +4 -0
- package/data/tagcategory/implementation-status.ttl +4 -0
- package/data/tagcategory/lpupstream.ttl +4 -0
- package/data/tagcategory/review-status.ttl +4 -0
- package/data/tagcategory/tmp.ttl +4 -0
- package/definitions/ontology.ttl +237 -171
- package/examples/form-roster.target.json +550 -0
- package/package.json +5 -2
- package/skills/adoption-a1-styles/SKILL.md +115 -0
- package/skills/adoption-a2-components/SKILL.md +170 -0
- package/skills/adoption-a3-forms/SKILL.md +134 -0
- package/skills/anatomy-author/ANATOMY_DSL_SPEC.md +89 -106
- package/skills/anatomy-author/SKILL.md +323 -141
- package/skills/design-auditor/SKILL.md +5 -0
- package/skills/implement-component/SKILL.md +223 -0
- package/skills/specify-component/SKILL.md +195 -0
- package/skills/specify-pattern/SKILL.md +157 -0
- package/source.json +71 -4
- package/specs/README.md +17 -0
- package/src/cli.ts +48 -35
- package/src/collect/generateTurtle.tests.ts +181 -176
- package/src/collect/generateTurtle.ts +189 -138
- package/src/collect/index.ts +5 -2
- package/src/collect/scanAnnotations.tests.ts +116 -110
- package/src/collect/scanAnnotations.ts +35 -33
- package/src/collect/types.ts +34 -33
- package/src/collect/validateCollectConfig.tests.ts +135 -112
- package/src/collect/validateCollectConfig.ts +60 -54
- package/src/collect-implementations.ts +101 -88
- package/src/commands/extract.tests.ts +31 -32
- package/src/commands/extract.ts +29 -27
- package/src/commands/index.ts +2 -1
- package/src/commands/list.tests.ts +13 -14
- package/src/commands/list.ts +9 -9
- package/src/commands/sync.tests.ts +430 -0
- package/src/commands/sync.ts +418 -0
- package/src/commands/transform.tests.ts +210 -25
- package/src/commands/transform.ts +215 -115
- package/src/config/types.ts +40 -40
- package/src/config/validateConfig.tests.ts +31 -31
- package/src/config/validateConfig.ts +9 -9
- package/src/constants.ts +8 -8
- package/src/graph/GraphStore.tests.ts +111 -111
- package/src/graph/GraphStore.ts +205 -189
- package/src/graph/PrefixMap.tests.ts +124 -122
- package/src/graph/PrefixMap.ts +77 -77
- package/src/graph/buildUri.tests.ts +116 -116
- package/src/graph/buildUri.ts +45 -45
- package/src/graph/index.ts +2 -2
- package/src/graph/types.ts +3 -3
- package/src/providers/CodaProvider.tests.ts +327 -233
- package/src/providers/CodaProvider.ts +355 -145
- package/src/providers/CodaProvider.types.generated.ts +12484 -12123
- package/src/providers/detectSmartChips.tests.ts +42 -0
- package/src/providers/detectSmartChips.ts +60 -0
- package/src/providers/index.ts +13 -13
- package/src/scripts/checkDataDeletion.ts +68 -0
- package/src/scripts/evaluateDataDeletion.tests.ts +100 -0
- package/src/scripts/evaluateDataDeletion.ts +100 -0
- package/src/serializers/JSONSerializer.tests.ts +64 -64
- package/src/serializers/JSONSerializer.ts +51 -51
- package/src/serializers/TTLSerializer.tests.ts +45 -45
- package/src/serializers/TTLSerializer.ts +64 -57
- package/src/serializers/index.ts +4 -1
- package/src/serializers/types.ts +3 -3
- package/src/sync/constants.ts +52 -0
- package/src/sync/diffRoster.tests.ts +455 -0
- package/src/sync/diffRoster.ts +241 -0
- package/src/sync/loadTargetSpec.tests.ts +208 -0
- package/src/sync/loadTargetSpec.ts +139 -0
- package/src/sync/renderPlan.tests.ts +144 -0
- package/src/sync/renderPlan.ts +88 -0
- package/src/sync/snapshotTable.tests.ts +31 -0
- package/src/sync/snapshotTable.ts +20 -0
- package/src/sync/toLiveEntries.tests.ts +76 -0
- package/src/sync/toLiveEntries.ts +55 -0
- package/src/sync/types.ts +101 -0
- package/src/transform/collectDataMetrics.tests.ts +108 -0
- package/src/transform/collectDataMetrics.ts +114 -0
- package/src/transform/deltaGuards.tests.ts +136 -0
- package/src/transform/deltaGuards.ts +118 -0
- package/src/transform/expectedTables.tests.ts +99 -0
- package/src/transform/expectedTables.ts +34 -0
- package/src/transform/isValidReferenceUri.tests.ts +45 -0
- package/src/transform/isValidReferenceUri.ts +55 -0
- package/src/transform/materializeInverses.tests.ts +81 -0
- package/src/transform/materializeInverses.ts +78 -0
- package/src/transform/resolveReferences.tests.ts +47 -43
- package/src/transform/resolveReferences.ts +18 -18
- package/src/transform/resolveValue.tests.ts +55 -49
- package/src/transform/resolveValue.ts +48 -48
- package/src/transform/transform.tests.ts +126 -91
- package/src/transform/transform.ts +105 -77
- package/src/transform/transformRow.malformedRefs.tests.ts +127 -0
- package/src/transform/transformRow.tests.ts +454 -356
- package/src/transform/transformRow.ts +305 -191
- package/src/transform/types.ts +15 -4
- package/tsconfig.json +2 -1
- package/vitest.config.ts +29 -0
- package/.gemini/settings.json +0 -14
- package/data/apps/pattern/key_value_summary.ttl +0 -7
- package/data/apps_anbox/component/copy_to_clipboard.ttl +0 -7
- package/data/apps_launchpad/component/checkbox.ttl +0 -28
- package/data/apps_launchpad/component/radio.ttl +0 -34
- package/data/apps_launchpad/component/select.ttl +0 -34
- package/data/apps_launchpad/component/textarea.ttl +0 -35
- package/data/apps_launchpad/component/user_avatar.ttl +0 -25
- package/data/apps_lxd/component/copy_to_clipboard.ttl +0 -7
- package/data/apps_workplace/component/label-highlight.ttl +0 -7
- package/data/apps_workplace.ttl +0 -4
- package/data/apps_wpe.ttl +0 -4
- package/data/global/component/code.ttl +0 -7
- package/data/global/component/label.ttl +0 -14
- package/data/global/component/rich_text_editor.ttl +0 -7
- package/data/global/component/search_bar.ttl +0 -7
- package/data/global/component/theme_switcher.ttl +0 -7
- package/data/global/modifier/paper.ttl +0 -6
- package/data/global/pattern/dropdown_button.ttl +0 -7
- package/data/global/subcomponent/divider.ttl +0 -7
- package/data/global_form/component/checkbox_input.ttl +0 -7
- package/data/global_form/component/choices_input.ttl +0 -7
- package/data/global_form/component/combobox_input.ttl +0 -7
- package/data/global_form/component/custom_choices_input.ttl +0 -7
- package/data/global_form/component/datepicker_input.ttl +0 -7
- package/data/global_form/component/rating_input.ttl +0 -7
- package/data/global_form/component/rich_text_input.ttl +0 -7
- package/data/global_form/component/segmented_control_input.ttl +0 -7
- package/data/global_form/component/slider_input.ttl +0 -7
- package/data/global_form/component/switch_input.ttl +0 -7
- package/data/global_form/component/text_input.ttl +0 -7
- package/data/global_form/component/textarea_input.ttl +0 -7
- package/data/global_form/component/wysiwginput.ttl +0 -7
- package/data/global_form/pattern/field.ttl +0 -7
- package/data/global_form/pattern/form.ttl +0 -7
- package/data/global_form/subcomponent/field-description.ttl +0 -7
- package/data/global_form/subcomponent/field-label.ttl +0 -7
- package/data/global_form.ttl +0 -4
- package/data/site/component/blog_card.ttl +0 -7
- package/data/site/component/quote.ttl +0 -7
- package/data/site/component/rule.ttl +0 -7
- package/data/site/component/section.ttl +0 -7
- package/data/site/group/blog_cards.ttl +0 -7
- package/data/site/layout/blog_page_layout.ttl +0 -7
- package/data/site/layout/site_layout.ttl +0 -7
- package/data/site/pattern/hero-github.ttl +0 -7
- package/data/site/pattern/hero.ttl +0 -7
- package/data/site/pattern/info_table.ttl +0 -7
- package/data/site/pattern/pricing_section.ttl +0 -7
- package/data/site/pattern/pricing_table.ttl +0 -7
- package/data/site/pattern/read_more_section.ttl +0 -7
- package/data/site/pattern/skip_link.ttl +0 -7
- package/skills/component-specifier/SKILL.md +0 -409
|
@@ -2,6 +2,209 @@
|
|
|
2
2
|
|
|
3
3
|
ds:apps.pattern.data_table a ds:Pattern;
|
|
4
4
|
ds:name "DataTable";
|
|
5
|
-
ds:summary "";
|
|
5
|
+
ds:summary "The data table component presents structured tabular data and gives users tools to navigate and manipulate it. It suits application-tier products where users work with medium-to-large datasets.\n\nThe component is composed of several sub-components, each documented separately:\n\n- [DataTable.HeaderCell](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-8yifr5hfPa) \n- [DataTable.BodyCell](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-xsvt3IgB-u) \n- [DataTable.PaginationBar](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-I82k_zrGpw) \n- [DataTable.GroupHeaderRow](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-2tgGCrnrBv) \n- [DataTable.SettingsMenu](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-wyr7Qk04SN) \n- [DataTable.ActionBar](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-Tccmneq3YD) \n- [DataTable.PersistentSelection](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-Zx_Vr61cn4) \n\nKey capabilities include sorting, pagination, row selection, inline editing, column management, grouping, and bulk actions. The component also adapts responsively across viewport sizes.\n\n";
|
|
6
6
|
ds:anatomyDsl "";
|
|
7
|
-
ds:
|
|
7
|
+
ds:anatomyClassic "https://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3336-11041&t=8RN2Hpk8UX3gMX3u-4";
|
|
8
|
+
ds:usage "The data table is for presenting structured, tabular data in application-tier products. It is the right choice when users need to work with medium-to-large datasets that share a consistent structure, where each item has the same set of fields. The data table provides tools for navigating, organizing, and acting on that data, including sorting, pagination, row selection, inline editing, column management, grouping, and bulk actions. It is a complex component designed for workflows where data interaction is a core part of the user’s task, not a passive display.\n\n## When to use\n\n- The dataset has a consistent structure where each item shares the same set of fields.\n- Users need to scan or sort across many items.\n- Users need to perform actions on individual rows or in bulk, such as editing, deleting, or exporting.\n- The data is large enough that pagination, column management, or grouping would help users navigate it.\n\n## When not to use\n\n- The data is simple enough that a basic table or a list would suffice. If users only need to read a small, static dataset with no sorting, filtering, or row actions, a simpler component avoids unnecessary complexity.\n- Each item requires a rich visual representation, such as images, charts, or multi-line summaries. A card-based layout is better suited to this kind of content.\n- The dataset has only one or two attributes per item. A list or a key-value layout is more appropriate than a full table.\n- The primary task is comparison between two or three specific items rather than scanning a larger set. A dedicated comparison view serves this better than a table.\n\n## Sorting\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3419-4599&t=bxRtnsSQKBPwCGkE-4\n\n\n\nThe data table supports column-level sorting. Sorting is not enabled by default. The designer chooses which columns are sortable based on whether the sort order is obvious and helpful to the user. When a user sorts by a column, the table reorders its rows accordingly. Sorting follows a three-step cycle: ascending, descending, and back to unsorted.\n\nIf the table is paginated, sorting may reset the user to the first page and drop any active simple selection. If grouping is enabled, sorting applies only within each group, not across groups.\n\nRefer to [DataTable.HeaderCell](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-8yifr5hfPa) for the full sorting interaction, header cell states, and edge cases such as sorting with pagination and double rows.\n\n\n\n\n\n## Pagination\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3419-5498&t=bxRtnsSQKBPwCGkE-4\n\nThe data table supports pagination to split large datasets into manageable pages. Two pagination modes are available: **offset pagination** for backends that support random-access page navigation, and **keyset pagination** for backends that can only determine whether more pages exist.\n\nThe designer chooses the pagination mode based on the backend’s capabilities. The pagination bar is sticky and always visible at the bottom of the table.\n\nRefer to [DataTable.PaginationBar](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-I82k_zrGpw) for the full anatomy, interaction details, and guidance on choosing page-size options.\n\n## Inline editing\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3419-7270&t=bxRtnsSQKBPwCGkE-4\n\n\n\nThe data table supports inline editing, allowing users to modify data values directly in the table without navigating to a separate form. Editing is configured at the column level. The designer chooses which columns are editable and which edit mode to use (text, textarea, or select).\n\nInline editing is best suited for quick, small corrections. For complex edits that involve validation, multi-field dependencies, or high-consequence changes, a dedicated edit form or detail panel is a better fit.\n\nRefer to [DataTable.BodyCell](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-xsvt3IgB-u) for the full editing interaction, save behavior options, and validation states.\n\n## Grouping\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3419-8159&t=bxRtnsSQKBPwCGkE-4\n\nThe data table supports grouping rows by a shared column value. When grouping is active, rows are organized under collapsible group header rows. Only columns with enumerated values (a small, known set of options) can be grouped. The user activates grouping through the table settings panel.\n\nA table can only be grouped by one column at a time. Grouping is incompatible with keyset pagination.\n\nRefer to [DataTable.GroupHeaderRow](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-2tgGCrnrBv) for the full grouping interaction, selection behavior within groups, and pagination considerations.\n\n## Row selection\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3419-11054&t=bxRtnsSQKBPwCGkE-4\n\nThe data table supports row selection through per-row checkboxes. Two selection modes are available: **simple selection** and **persistent selection**.\n\nSimple selection is page-scoped. The selection is dropped when the user navigates to a different table page, sorts, or applies any action that changes which rows are visible. Use simple selection when users only need to act on items visible on the current page.\n\nPersistent selection preserves the selection across page changes, sorting, and other navigation actions. It adds a persistent selection panel where users can review and manage their full selection. Use persistent selection when users need to build up a selection of items across multiple pages before performing a bulk action.\n\nRefer to the row selection section in Interactions for the full behavior, header checkbox states, shift selection, and performance considerations. Refer to the [DataTable.PersistentSelection](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-Zx_Vr61cn4) for the panel UI and expanded view.\n\n## Bulk actions\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3419-12858&t=bxRtnsSQKBPwCGkE-4\n\nWhen row selection is enabled, the data table can show a bulk action bar at the bottom of the table. The bar appears when one or more rows are selected and provides action buttons for operations that apply to the entire selection, such as exporting, archiving, or deleting.\n\nThe designer defines which bulk actions are available for each table instance. The bar supports a maximum of 7 actions, with overflow grouped into expandable dropdown menus.\n\nRefer to the [DataTable.ActionBar](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-Tccmneq3YD) for guidance on choosing bulk actions, destructive action styling, and interaction details.\n\n## Column management\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-11158&t=2PBanDq6QA2yNcI2-4\n\nUsers can customize the table layout by reordering, resizing, pinning, and hiding columns. These features are accessed through the header cell interactions (drag-and-drop reordering, resize handles) and the settings menu (reordering, pinning, visibility toggles). The settings menu is enabled by default and provides a centralized interface for all column customizations.\n\nColumn customizations are persisted in browser storage across sessions. Users can reset all customizations to their defaults through the settings menu.\n\nRefer to [DataTable.HeaderCell](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-8yifr5hfPa) and [DataTable.SettingsMenu](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-wyr7Qk04SN) for the full interaction details and configuration options.\n\n## Density\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-12172&t=2PBanDq6QA2yNcI2-4\n\n\n\nDensity controls the vertical spacing of rows. Choose a density based on the user’s task and the amount of data they need to scan.\n\n- **Default** suits most use cases. It balances scannability with readability and provides enough vertical space for comfortable mouse interaction.\n- **Dense** works well when users need to compare many rows at once, such as scanning a log of recent events or triaging a long list of items. The reduced row height keeps more data visible without scrolling. Avoid dense spacing when rows contain complex content or when touch interaction is expected.\n- **Cozy** is a good fit when rows contain longer text values or when the table is not the only focus on the page. The extra breathing room reduces visual fatigue during extended reading. On mobile, cozy is the default density because it provides larger touch targets.\n- **Spacious** is appropriate when each row represents a distinct item the user evaluates individually, such as a list of candidates or detailed records. The generous spacing helps users focus on one row at a time. Avoid spacious spacing in tables with many rows, as it pushes content out of view. \n\n";
|
|
9
|
+
ds:guidelines "# Responsiveness\n\nThe data table follows a progressive responsive degradation strategy with five stages. Each stage activates only after the previous stage’s strategies are exhausted. This provides a structured path from full-width layouts down to narrow mobile viewports.\n\n## Stage 1: Fractional unit scaling\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-13064&t=2PBanDq6QA2yNcI2-4\n\nColumns are generally defined in fractional units (`fr`) for their width. The columns scale according to their fractional unit and the content inside the minimum width. When the viewport grows wider, columns expand proportionally to fill the available space. When it shrinks, they compress until they reach their minimum widths.\n\nSome special columns, such as the checkbox column and the actions column, have a fixed width and are not defined with a fractional unit. These columns do not contain variable content, so they hug their content instead. In some cases, regular columns can also be defined with a fixed width rather than a fractional unit.\n\n\n\n## Stage 2: Double rows\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-13947&t=2PBanDq6QA2yNcI2-4\n\nIf the minimum width of all columns has been reached, the next possible responsiveness stage is double rows. This stage combines two columns into one by stacking a secondary value beneath a primary value in the same cell.\n\n### Configuration\n\nDouble rows are **disabled by default**. To enable them, the designer must define:\n\n- Which columns can be combined\n- Which column is the primary and which is the secondary in each pair\n- The order in which pairs combine, if there are multiple double-row pairs\n\nPairs are combined **one at a time** to meet space constraints, not all at once. Each time the minimum width is reached again, the next defined pair combines.\n\n### Combining behavior\n\nThe secondary column moves in with the primary one. The primary column stays in the same position while the secondary column disappears as a standalone column. It then appears as a second row within the primary column’s cells. The secondary value is shown in a lighter or smaller style beneath the primary value.\n\nThe combined column inherits the **minimum width of the primary column**. Sorting is only possible on the primary value.\n\nAfter a pair combines, the freed horizontal space allows the remaining columns to grow again. If the viewport continues to shrink, columns compress until the minimum width is reached once more. This triggers the next combination, if one is defined.\n\n**Interaction with user-hidden columns**\n\nIf either the primary or secondary column has been hidden by the user, they act as normal independent columns. Specific scenarios:\n\n- **Hiding the primary column while it is in a double row:** The secondary column becomes an independent column again.\n- **Hiding the secondary column before it would have combined:** No combining happens. The primary column continues as an independent column.\n- **Showing a previously hidden primary column when the current viewport would normally trigger combining:** The primary and secondary columns combine with each other.\n\n### When to use double rows\n\nUse double rows with caution. Combining columns reduces scannability and removes the ability to sort by the secondary value. It also requires the user to hold more information in their head, since two column headers map to one. Use double rows only where the two columns have a strong relationship and combining them genuinely makes sense.\n\n### \n\n## Stage 3: Hiding columns\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-15497&t=2PBanDq6QA2yNcI2-4\n\nAfter all defined double rows have been combined and the minimum width is reached again, the next stage is hiding columns one by one.\n\n### Configuration\n\nHiding columns is **disabled by default**. The designer must define whether any columns should be hidden, which columns to hide, and in what order.\n\nColumns are hidden **one at a time**. After a column is hidden, the remaining columns grow to fill the freed space. Only once the minimum width is reached again would the next column, if defined, be hidden.\n\n### Design considerations\n\nThe designer must consider whether the column being hidden is still relevant for the user at smaller breakpoints. Users should be able to override the hiding of columns through the table settings (showing and hiding columns).\n\n## Stage 4: Horizontal scrolling\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-16138&t=2PBanDq6QA2yNcI2-4\n\nAt some point, even after combining all double rows and hiding columns, there is no more room for the table. The final responsiveness stage is horizontal scrolling.\n\nHorizontal scrolling is **enabled by default and cannot be disabled**. It must always be available as a fallback.\n\n### Column pinning during scroll\n\nBy default, the first data column and the actions column are pinned when horizontal scrolling is active. The actions column is always the last column when enabled, so pinning it keeps row-level actions visible while the user scrolls. The designer or developer can disable this default pinning behavior on a per-table basis, but the user cannot override it.\n\nIf the user has pinned additional columns, those columns are also pinned during horizontal scrolling.\n\n### Smart pinning behavior\n\nPinning is subject to a smart constraint. If too many columns are pinned, they could prevent the user from scrolling the table and lock the screen. When this would happen, columns are forcefully unpinned one by one until a meaningful portion of the table is viewable and scrollable again. This applies even to user-pinned columns and the first and last columns that are pinned by default. If pinning a column would lead to a locked-screen situation, pinning is disabled for that column.\n\n### Scroll indicators\n\nThicker borders, rather than drop shadows, visually separate pinned columns from the scrollable area. Horizontal and vertical scrolling can be active simultaneously, and drop shadows for both directions would be visually overwhelming. Borders handle the combined case more cleanly.\n\n### Mobile behavior\n\nOn mobile, screens are usually so narrow that pinned columns would leave almost no space to scroll the table. The smart pinning behavior therefore typically prevents pinning on mobile altogether. The table scrolls horizontally off the screen. In this case, drop shadows appear at the screen edges when content is scrolled underneath. These shadows indicate to the user that more content exists in that direction.\n\nPagination controls remain visible beneath the table on mobile (for example, items per page, total item count, and page navigation).\n\n## Stage 5: Alternative layout (optional)\n\nAs an optional final stage, a product team can choose to show data in a different format on smaller viewports, such as cards. This is not a feature of the table component itself. It is a product-specific implementation, as the requirements for alternative formats vary by product.\n\n## \n\n# Touchscreens\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-16990&t=2PBanDq6QA2yNcI2-4\n\nThe data table adapts its density, layout, and interaction patterns for touch devices and narrow viewports.\n\n## Default density\n\nOn touchscreens, the default density is “cozy.” This provides larger touch targets for actions inside the table. Inline action elements are sized up accordingly, and the table renders full-width within the mobile viewport.\n\n## Touch-for-hover\n\nSince hover states are unavailable on touch devices, the row hover effect should be triggered when the user selects a row by touch. The visual treatment is the same subtle background highlight used for hover on desktop.\n\n## Column resize and reorder via long press\n\nOn mobile, scrolling and dragging are the same gesture. Both column reordering and column resizing must be initiated with a long press to avoid ambiguity. The touch target for the column resize handle (the divider between column headers) should be slightly larger on mobile than on desktop to accommodate finger input.\n\n## \n\n# Interactions\n\n## Row hovering\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-17874&t=2PBanDq6QA2yNcI2-4\n\nA table body row can have a hover effect. When a row is hovered, it receives a distinct light background fill. All other rows retain the default white background.\n\nRow hovering is **enabled by default** but can be disabled.\n\n### Sub-element hover layering\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-18763&t=2PBanDq6QA2yNcI2-4\n\nIf an element within a hovered row has its own hover effect, that sub-element hover is rendered **on top of** the row-level hover. For example, an action icon such as an edit icon in the rightmost column shows its own, more prominent highlight layered over the row’s hover background. This makes sure that interactive elements within a row remain visually distinguishable even when the entire row is highlighted. Users can still identify exactly which element they are about to interact with.\n\n## Sticky header\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-19650&t=2PBanDq6QA2yNcI2-4\n\n### Default behavior\n\nThe header of a table is sticky at the top by default. This behavior can be overridden so that the header scrolls with the content instead.\n\nWhen sticky, the header row remains fixed at the top of the table while body rows scroll beneath it. It carries a layer 2 background and shows column names in bold text. A standard-weight bottom border visually separates the header from the body.\n\n### Scroll-state indicator (border thickness)\n\nWhen content is scrolled underneath the sticky header, the bottom border of the header row becomes thicker. When nothing is scrolled underneath, only the default border is shown.\n\nThis thicker border provides visual feedback that content is hidden behind the header. The design uses a border rather than a shadow because borders scale better to complex use cases.\n\n## Row selection\n\n### Overview\n\nThe data table supports two selection paradigms: **simple selection** and **persistent selection**. Both use per-row checkboxes and a header checkbox, but they differ in whether selections persist across navigation actions. When nothing is selected, neither the action bar nor the persistent selection panel is shown.\n\n### Simple selection\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-21110&t=2PBanDq6QA2yNcI2-4\n\nSimple selection allows users to select items on the current table page only. The selection is dropped if the user:\n\n- Applies a search or a filter.\n- Sorts the table by a different column.\n- Navigates to a different table page.\n- Takes any other action that would move selected items out of view.\n\nThis constraint exists because users cannot reasonably remember all selected items when those items are not visible and there is no way to view them all at once.\n\n\n\n### Persistent selection\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-23701&t=2PBanDq6QA2yNcI2-4\n\nPersistent selection adds a **persistent selection panel** to the bulk action bar. This panel persists selections across page changes, sorting, filtering, and searching. It allows users to build up a selection of items that may span different table pages. Users often need to perform bulk actions on items across multiple pages, so this model accommodates that workflow.\n\nWhen items are selected, a floating action bar appears at the bottom of the table. It shows the count (for example, “5 Selected”) and action buttons (Export, Archive, Assign, Tag, Delete), along with a deselect button (“X”).\n\nThe persistent selection panel UI, expanded view, deselection flows, and tooltips are documented in the [DataTable.PersistentSelection](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-Zx_Vr61cn4) panel sub-component document.\n\n### **Header checkbox** \n\nThe header checkbox has three states:\n\n1. **Unchecked**: no children are selected.\n2. **Indeterminate** (children selected): some items on the current page have been selected.\n3. **Fully checked**: all items on the current page have been selected.\n\nSelecting the header checkbox when it is unchecked or indeterminate transitions it to the fully checked state and selects all children. Selecting it when fully checked transitions it to the unchecked state and deselects all items on the current page.\n\n### Checkbox tooltips\n\nAll selection checkboxes display a tooltip on hover. The tooltip text changes based on the checkbox state.\n\nTable 7\n\n### Shift selection\n\nIf the user selects one item, holds Shift, and then selects a second item, all items between those two are selected as a contiguous block. This range selection works in both simple and persistent selection modes.\n\n### Performance considerations\n\nIf there are performance concerns related to the number of selected items or frontend pagination, a **hard limit** on the number of items a user can select may need to be considered.\n\n## Column pinning (visual behavior)\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-26040&t=2PBanDq6QA2yNcI2-4\n\nThe how-to-pin interaction and settings panel interactions are documented in the header cell and settings menu sub-component documents respectively.\n\nVisual indicator: 2px border\n\nOnce one or more columns are pinned, a **2px vertical border line** appears on the right edge of the pinned column group. This border provides a clear line where scrollable content passes underneath the pinned area.\n\nWhen **multiple columns** are pinned simultaneously, only the **rightmost pinned column** shows the indicator border.\n\n### Why a border and not a shadow\n\nBorders are used instead of shadows because shadows do not scale well when pinned columns are combined with pinned rows. The border approach handles the combination of a pinned first column, a pinned action column, and a pinned header row cleanly. Shadows look awkward in that compound state.\n\n### Combined pinned columns and pinned rows\n\nWhen the table is scrolled both vertically and horizontally, pinned columns, the pinned header row, and a pinned action column can all be active at the same time. All pinned areas use border indicators consistently. An example of this combined state includes:\n\n- A pinned first column on the left.\n- A pinned action column (with edit icons) on the far right.\n- A pinned header row at the top.\n\nBorders are applied to each pinned boundary, maintaining visual clarity across all axes of scroll.\n\n### Multiple pinned columns\n\nThere is no stated limit on the number of columns that can be pinned. Multiple pinned columns sit side by side on the left of the table. Only the rightmost one carries the 2px border indicator. However, the smart pinning behavior described in the responsiveness guidelines applies: if too many pinned columns would prevent the user from scrolling the table, columns are forcefully unpinned until the table is usable again.\n\n## Loading state\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-26686&t=2PBanDq6QA2yNcI2-4\n\nWhen data has not yet loaded, the table enters a loading state. In place of data and interactive elements, skeleton loading items are shown. These are gray rectangular bars that pulse between two shades of gray in an animation.\n\n### Skeleton loading items\n\nSkeleton items should reflect as much as possible about the table structure and expected data:\n\n- **Text cells:** Randomize the width of each skeleton bar within sensible minimum and maximum widths.\n- **Double-row cells:** Stack two skeleton bars if a cell is known to show content in two rows.\n- **Checkboxes:** Show a square skeleton item in place of each checkbox.\n- **Icons:** Show a square skeleton item in place of each icon.\n\nThe goal is for the skeleton layout to mirror the realistic structure of the populated table. Column count, cell arrangement, and content shape should all match so the transition from loading to loaded feels seamless.\n\n### Header treatment\n\nIf the table headers are not fetched from the backend and are already known to the frontend, show them immediately with real text rather than replacing them with skeleton items. Only the table body shows skeleton loading in this scenario.\n\nWhile loading, disable checkboxes and resize handles in the header row.\n\n### Vertical fill and gradient fade-out\n\nBecause the number of incoming rows is unknown, skeleton loading rows should fill at least the full height available to the table component. The table body should not be scrollable while loading.\n\nIf the table’s height is unconstrained, choose a sensible minimum height for the skeleton loading area.\n\nA gradient fade-out is applied at the bottom of the table body. It progressively transitions the skeleton rows to transparent, visually communicating that the row count is indeterminate.";
|
|
10
|
+
ds:tier ds:apps;
|
|
11
|
+
ds:documentationStage ds:tag.needsdefinition;
|
|
12
|
+
ds:hasProperty [
|
|
13
|
+
a ds:Property;
|
|
14
|
+
ds:name "columns";
|
|
15
|
+
ds:summary "The column configuration for the table. Each column defines its label, cell type, width, min-width, sortable, editable, reorderable, pinnable, and other per-column settings. Refer to the header cell and body cell sub-component documents for the full set of per-column properties.";
|
|
16
|
+
ds:propertyType "object";
|
|
17
|
+
ds:optional "false";
|
|
18
|
+
ds:constraints "At least one column is required."
|
|
19
|
+
], [
|
|
20
|
+
a ds:Property;
|
|
21
|
+
ds:name "density";
|
|
22
|
+
ds:summary "Controls row height and vertical cell padding. On mobile, the default density is cozy.";
|
|
23
|
+
ds:propertyType "choice";
|
|
24
|
+
ds:optional "true";
|
|
25
|
+
ds:defaultValue "default"
|
|
26
|
+
], [
|
|
27
|
+
a ds:Property;
|
|
28
|
+
ds:name "selection-mode";
|
|
29
|
+
ds:summary "Sets whether and how rows can be selected. Simple selection is page-scoped and dropped on navigation. Persistent selection persists across page changes, sorting, and filtering through a persistent selection panel.";
|
|
30
|
+
ds:propertyType "choice";
|
|
31
|
+
ds:optional "true";
|
|
32
|
+
ds:constraints "Tables with grouping and selection must use persistent.";
|
|
33
|
+
ds:defaultValue "none"
|
|
34
|
+
], [
|
|
35
|
+
a ds:Property;
|
|
36
|
+
ds:name "unique-identifier-field";
|
|
37
|
+
ds:summary "The column or field used to uniquely identify each row. Used by persistent selection to track items across pages and display them in the persistent selection panel.";
|
|
38
|
+
ds:propertyType "text";
|
|
39
|
+
ds:optional "true";
|
|
40
|
+
ds:constraints "Required when selection-mode is not none."
|
|
41
|
+
], [
|
|
42
|
+
a ds:Property;
|
|
43
|
+
ds:name "max-selection-count";
|
|
44
|
+
ds:summary "A hard limit on the number of items a user can select. Use when there are performance concerns related to the number of selected items or frontend pagination of the selection.";
|
|
45
|
+
ds:propertyType "number";
|
|
46
|
+
ds:optional "true";
|
|
47
|
+
ds:constraints "Must be a positive integer."
|
|
48
|
+
], [
|
|
49
|
+
a ds:Property;
|
|
50
|
+
ds:name "pagination-mode";
|
|
51
|
+
ds:summary "Sets the pagination strategy. Offset provides random-access page navigation. Keyset supports forward and back navigation only.";
|
|
52
|
+
ds:propertyType "choice";
|
|
53
|
+
ds:optional "true";
|
|
54
|
+
ds:constraints "Keyset pagination is incompatible with grouping and sorting.";
|
|
55
|
+
ds:defaultValue "none"
|
|
56
|
+
], [
|
|
57
|
+
a ds:Property;
|
|
58
|
+
ds:name "page-size-options";
|
|
59
|
+
ds:summary "The set of page sizes available in the page-size selector dropdown. The first value in the list is used as the default page size.";
|
|
60
|
+
ds:propertyType "list of text";
|
|
61
|
+
ds:optional "true";
|
|
62
|
+
ds:constraints "Each value must be a positive integer.";
|
|
63
|
+
ds:defaultValue "50, 75, 100"
|
|
64
|
+
], [
|
|
65
|
+
a ds:Property;
|
|
66
|
+
ds:name "item-label";
|
|
67
|
+
ds:summary "A context-specific noun used in the pagination bar in place of \"Items\" (for example, \"Machines\" or \"Orders\"). Applied to the item amount label and the item count summary.";
|
|
68
|
+
ds:propertyType "text";
|
|
69
|
+
ds:optional "true";
|
|
70
|
+
ds:defaultValue "items"
|
|
71
|
+
], [
|
|
72
|
+
a ds:Property;
|
|
73
|
+
ds:name "default-sort-column";
|
|
74
|
+
ds:summary "The column the table is sorted by on initial load.";
|
|
75
|
+
ds:propertyType "text";
|
|
76
|
+
ds:optional "true";
|
|
77
|
+
ds:constraints "Must reference a sortable column."
|
|
78
|
+
], [
|
|
79
|
+
a ds:Property;
|
|
80
|
+
ds:name "default-sort-direction";
|
|
81
|
+
ds:summary "The sort direction applied on initial load.";
|
|
82
|
+
ds:propertyType "choice";
|
|
83
|
+
ds:optional "true";
|
|
84
|
+
ds:constraints "Only applies when default-sort-column is set.";
|
|
85
|
+
ds:defaultValue "ascending"
|
|
86
|
+
], [
|
|
87
|
+
a ds:Property;
|
|
88
|
+
ds:name "grouping-columns";
|
|
89
|
+
ds:summary "The set of columns that support grouping. Only columns with a small, known set of values are valid.";
|
|
90
|
+
ds:propertyType "list of text";
|
|
91
|
+
ds:optional "true";
|
|
92
|
+
ds:constraints "Each value must reference an enumerated-value column."
|
|
93
|
+
], [
|
|
94
|
+
a ds:Property;
|
|
95
|
+
ds:name "default-group-column";
|
|
96
|
+
ds:summary "The column the table is grouped by on initial load. ";
|
|
97
|
+
ds:propertyType "text";
|
|
98
|
+
ds:optional "true";
|
|
99
|
+
ds:constraints "Must reference a column in grouping-columns."
|
|
100
|
+
], [
|
|
101
|
+
a ds:Property;
|
|
102
|
+
ds:name "group-order";
|
|
103
|
+
ds:summary "The order in which groups are displayed. Use a custom order when there is meaning associated with a specific sequence (for example, a status column ordered from start to finish).";
|
|
104
|
+
ds:propertyType "choice";
|
|
105
|
+
ds:optional "true";
|
|
106
|
+
ds:constraints "When custom, a custom order must be provided.";
|
|
107
|
+
ds:defaultValue "alphabetical"
|
|
108
|
+
], [
|
|
109
|
+
a ds:Property;
|
|
110
|
+
ds:name "groups-expanded-by-default";
|
|
111
|
+
ds:summary "Whether groups are expanded or collapsed on initial load.";
|
|
112
|
+
ds:propertyType "boolean";
|
|
113
|
+
ds:optional "true";
|
|
114
|
+
ds:constraints "Only applies when grouping is active.";
|
|
115
|
+
ds:defaultValue "true"
|
|
116
|
+
], [
|
|
117
|
+
a ds:Property;
|
|
118
|
+
ds:name "sticky-header";
|
|
119
|
+
ds:summary "Keeps the header row fixed at the top of the table during vertical scroll. Set to false to let the header scroll with the content.";
|
|
120
|
+
ds:propertyType "boolean";
|
|
121
|
+
ds:optional "true"
|
|
122
|
+
], [
|
|
123
|
+
a ds:Property;
|
|
124
|
+
ds:name "row-hover";
|
|
125
|
+
ds:summary "Applies a background highlight to body rows on hover. Set to false to disable the highlight.";
|
|
126
|
+
ds:propertyType "boolean";
|
|
127
|
+
ds:optional "true";
|
|
128
|
+
ds:defaultValue "true"
|
|
129
|
+
], [
|
|
130
|
+
a ds:Property;
|
|
131
|
+
ds:name "settings-menu";
|
|
132
|
+
ds:summary "Shows the settings menu gear icon in the header row.";
|
|
133
|
+
ds:propertyType "boolean";
|
|
134
|
+
ds:optional "true";
|
|
135
|
+
ds:constraints "Only set to false when all column customization features are disabled.";
|
|
136
|
+
ds:defaultValue "true"
|
|
137
|
+
], [
|
|
138
|
+
a ds:Property;
|
|
139
|
+
ds:name "auto-pin-first-column";
|
|
140
|
+
ds:summary "Pins the first data column to the left edge of the table during horizontal scroll. The designer can disable this default behavior on a per-table basis.";
|
|
141
|
+
ds:propertyType "boolean";
|
|
142
|
+
ds:optional "true";
|
|
143
|
+
ds:constraints "Only takes effect during horizontal scrolling. Subject to smart pinning constraints.";
|
|
144
|
+
ds:defaultValue "true"
|
|
145
|
+
], [
|
|
146
|
+
a ds:Property;
|
|
147
|
+
ds:name "auto-pin-actions-column";
|
|
148
|
+
ds:summary "Pins the actions column to the right edge of the table during horizontal scroll. The designer can disable this default behavior on a per-table basis.";
|
|
149
|
+
ds:propertyType "boolean";
|
|
150
|
+
ds:optional "true";
|
|
151
|
+
ds:constraints "Only takes effect during horizontal scrolling. Subject to smart pinning constraints.";
|
|
152
|
+
ds:defaultValue "true"
|
|
153
|
+
], [
|
|
154
|
+
a ds:Property;
|
|
155
|
+
ds:name "responsive-stages";
|
|
156
|
+
ds:summary "Defines the column hiding order and double-row pairing rules that activate as the viewport narrows. Includes which columns can be combined, which is primary and secondary in each pair, the order in which pairs combine, which columns to hide, and in what order.";
|
|
157
|
+
ds:propertyType "object";
|
|
158
|
+
ds:optional "true"
|
|
159
|
+
], [
|
|
160
|
+
a ds:Property;
|
|
161
|
+
ds:name "bulk-actions";
|
|
162
|
+
ds:summary "The set of bulk actions shown in the bulk action bar when rows are selected. Each action defines a label and an optional icon. Actions can be standalone buttons or grouped into expandable dropdown menus. A grouped action defines a top-level button with a dropdown caret and a list of sub-actions that appear in a popover menu above the action bar (for example, an \"Export\" group expanding into \"Export as CSV\", \"Export as JSON\", and \"Export as PDF\"). Grouping is also available as a design choice when fewer than 7 actions exist.";
|
|
163
|
+
ds:propertyType "object";
|
|
164
|
+
ds:optional "true";
|
|
165
|
+
ds:constraints "Maximum of 7 top-level actions. The deselect button does not count toward this limit."
|
|
166
|
+
], [
|
|
167
|
+
a ds:Property;
|
|
168
|
+
ds:name "loading";
|
|
169
|
+
ds:summary " When true, the table shows skeleton loading items in place of data and disables interactive header elements.";
|
|
170
|
+
ds:propertyType "boolean";
|
|
171
|
+
ds:optional "true";
|
|
172
|
+
ds:defaultValue "false"
|
|
173
|
+
], [
|
|
174
|
+
a ds:Property;
|
|
175
|
+
ds:name "on-sort";
|
|
176
|
+
ds:summary "Called when the user sorts a column. Receives the column identifier and sort direction. Use for backend-paginated tables where sorting triggers a data fetch.";
|
|
177
|
+
ds:propertyType "callback";
|
|
178
|
+
ds:optional "true"
|
|
179
|
+
], [
|
|
180
|
+
a ds:Property;
|
|
181
|
+
ds:name "on-page-change";
|
|
182
|
+
ds:summary "Called when the user navigates to a different page. Receives the target page number and page size. Use for backend-paginated tables where page changes trigger a data fetch.";
|
|
183
|
+
ds:propertyType "callback";
|
|
184
|
+
ds:optional "true"
|
|
185
|
+
], [
|
|
186
|
+
a ds:Property;
|
|
187
|
+
ds:name "on-selection-change";
|
|
188
|
+
ds:summary "Called when the selection changes. Receives the current set of selected item identifiers.";
|
|
189
|
+
ds:propertyType "callback";
|
|
190
|
+
ds:optional "true"
|
|
191
|
+
], [
|
|
192
|
+
a ds:Property;
|
|
193
|
+
ds:name "on-edit";
|
|
194
|
+
ds:summary "Called when a cell value is saved (either through auto-save or explicit save). Receives the row identifier, column identifier, and new value.";
|
|
195
|
+
ds:propertyType "callback";
|
|
196
|
+
ds:optional "true"
|
|
197
|
+
], [
|
|
198
|
+
a ds:Property;
|
|
199
|
+
ds:name "on-bulk-action";
|
|
200
|
+
ds:summary "Called when the user performs a bulk action. Receives the action identifier and the set of selected item identifiers.";
|
|
201
|
+
ds:propertyType "callback";
|
|
202
|
+
ds:optional "true"
|
|
203
|
+
];
|
|
204
|
+
ds:hasSubcomponent ds:apps.subcomponent.data_table-persistent_selection, ds:apps.subcomponent.data_table-group_header_row, ds:apps.subcomponent.data_table-body_cell, ds:apps.subcomponent.data_table-settings_menu, ds:apps.subcomponent.data_table-action_bar, ds:apps.subcomponent.data_table-header_cell, ds:apps.subcomponent.data_table-pagination_bar;
|
|
205
|
+
ds:changeLog [
|
|
206
|
+
a ds:ChangeLogEntry;
|
|
207
|
+
ds:timestamp "2026-03-24T00:00:00.000+01:00";
|
|
208
|
+
ds:change "initial commit";
|
|
209
|
+
ds:changeType "change"
|
|
210
|
+
].
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
|
|
3
|
+
ds:apps.pattern.drawer a ds:Pattern;
|
|
4
|
+
ds:name "Drawer";
|
|
5
|
+
ds:summary "";
|
|
6
|
+
ds:anatomyDsl "";
|
|
7
|
+
ds:anatomyClassic "";
|
|
8
|
+
ds:usage "";
|
|
9
|
+
ds:guidelines "";
|
|
10
|
+
ds:tier ds:apps;
|
|
11
|
+
ds:documentationStage ds:tag.needsdefinition;
|
|
12
|
+
ds:hasSubcomponent ds:apps.subcomponent.drawer-content, ds:apps.subcomponent.drawer-footer, ds:apps.subcomponent.drawer-header.
|
|
@@ -4,4 +4,22 @@ ds:apps.pattern.notification_center a ds:Pattern;
|
|
|
4
4
|
ds:name "NotificationCenter";
|
|
5
5
|
ds:summary "";
|
|
6
6
|
ds:anatomyDsl "";
|
|
7
|
-
ds:
|
|
7
|
+
ds:anatomyClassic "";
|
|
8
|
+
ds:usage "";
|
|
9
|
+
ds:guidelines "";
|
|
10
|
+
ds:tier ds:apps;
|
|
11
|
+
ds:documentationStage ds:tag.needstriage;
|
|
12
|
+
ds:hasProperty [
|
|
13
|
+
a ds:Property;
|
|
14
|
+
ds:name "datetimeFormat";
|
|
15
|
+
ds:summary "Represents variation along the X axis, refer to variant_guidelines for usage details.";
|
|
16
|
+
ds:propertyType "choice";
|
|
17
|
+
ds:optional "false";
|
|
18
|
+
ds:constraints "[normal, inverted]";
|
|
19
|
+
ds:defaultValue "normal"
|
|
20
|
+
], [
|
|
21
|
+
a ds:Property;
|
|
22
|
+
ds:name "avatarType";
|
|
23
|
+
ds:propertyType "choice";
|
|
24
|
+
ds:optional "false"
|
|
25
|
+
].
|
|
@@ -4,4 +4,9 @@ ds:apps.pattern.side_panel a ds:Pattern;
|
|
|
4
4
|
ds:name "SidePanel";
|
|
5
5
|
ds:summary "";
|
|
6
6
|
ds:anatomyDsl "";
|
|
7
|
-
ds:
|
|
7
|
+
ds:anatomyClassic "";
|
|
8
|
+
ds:usage "";
|
|
9
|
+
ds:guidelines "";
|
|
10
|
+
ds:tier ds:apps;
|
|
11
|
+
ds:documentationStage ds:tag.needsdefinition;
|
|
12
|
+
ds:hasSubcomponent ds:apps.subcomponent.side_panel-footer, ds:apps.subcomponent.side_panel-content, ds:apps.subcomponent.side_panel-header.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
|
|
3
|
+
ds:apps.subcomponent.data_table-action_bar a ds:Subcomponent;
|
|
4
|
+
ds:name "DataTable.ActionBar";
|
|
5
|
+
ds:summary "When one or more rows are selected in the table, a bulk action bar appears at the bottom of the table, overlaying the footer area. The bar displays the available action buttons and a deselect (X) button on the far right. The bulk actions shown in the bar are defined by the designer for each table instance. If the ActionBar is combined with the [DataTable.PersistentSelection](https://docs.superhuman.com/d/_dNyzE_TLZDh#_tugrid-20dWwIHYhx/_rui-Zx_Vr61cn4) it also displays the number of selected items (e.g. \"5 Selected\").";
|
|
6
|
+
ds:anatomyDsl "";
|
|
7
|
+
ds:anatomyClassic "https://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3340-1631&t=8RN2Hpk8UX3gMX3u-4\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=4781-83072&t=2fO23I8WsyT0YVJ1-4";
|
|
8
|
+
ds:usage "The bulk action bar appears when one or more rows are selected, giving users a way to apply an operation to their entire selection at once. It eliminates the need to act on rows one at a time, which is especially valuable in enterprise applications where users regularly manage large datasets. For example, a system administrator might select 30 machines across several pages and archive them in a single step, rather than repeating the action on each row individually.\n\n## When to use\n\n- Users need to perform the same operation on multiple table rows at once.\n- The table is used in workflows where bulk operations such as archiving, exporting, deleting, or reassigning are common.\n\n## When not to use\n\n- The table does not support row selection. Use inline row actions in the action column instead.\n- The available bulk operations are unlikely to be used. A bulk action bar that appears on selection but offers only one rarely used action adds complexity without meaningful benefit.\n\n## Choosing bulk actions\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3419-12858&t=2PBanDq6QA2yNcI2-4\n\nThe designer defines which bulk actions appear in the bar for each table instance. Start by identifying what users need to do with multiple items at once. Consider what operations are common enough to justify a bulk workflow and whether the product’s backend supports performing them in batch. Not every action available on a single row needs a bulk equivalent. Focus on the actions that save users the most time when applied to many items at once.\n\nThe action bar supports a maximum of 7 bulk actions. The deselect (X) button does not count toward this limit. When more than 7 actions are needed, group related actions into expandable dropdown menus. A grouped button displays a dropdown caret and opens a popover menu above the action bar listing the sub-actions (for example, an “Export” button expanding into “Export as CSV”, “Export as JSON”, and “Export as PDF”). Grouping is also available as a design choice when fewer than 7 actions exist. If there is a logical grouping the designer wants to enforce, expandable menus can be used even when space is not a constraint.\n\n## Destructive actions\n\nDestructive actions such as “Delete” may be visually distinguished with a red text style, making them clearly identifiable in the action bar.";
|
|
9
|
+
ds:guidelines "# Interactions\n\n## Scroll offset\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-27553&t=2PBanDq6QA2yNcI2-4\n\nWhen the action bar is visible, the table must allow the user to scroll far enough that the last row sits above the action bar. Without this extra scroll space, the bottom rows can be hidden beneath the overlay and the user cannot see or interact with them.\n\n## Performing a bulk action\n\nSelecting a bulk action button performs the associated action on the current selection. The selection count displayed in the bar (for example, “5 Selected”) lets users confirm how many items will be affected. If persistent selection is enabled, users can also verify their selection via the persistent selection panel before confirming an action.\n\n## Deselect button\n\nSelecting the deselect (X) button clears the current selection and hides the action bar.\n\n## Grouped action expansion\n\nA grouped button displays a dropdown caret; clicking it opens a popover menu above the action bar listing the sub-actions.";
|
|
10
|
+
ds:tier ds:apps;
|
|
11
|
+
ds:documentationStage ds:tag.needsdefinition;
|
|
12
|
+
ds:hasProperty [
|
|
13
|
+
a ds:Property;
|
|
14
|
+
ds:name "selection-mode";
|
|
15
|
+
ds:summary "Determines the selection paradigm. In simple selection mode, the selection indicator shows a count but is not interactive. In persistent selection mode, the selection indicator includes a chevron that opens the persistent selection panel.";
|
|
16
|
+
ds:propertyType "choice";
|
|
17
|
+
ds:optional "true";
|
|
18
|
+
ds:constraints "Inherited from the data table. The bulk action bar only renders when selection-mode is not none and at least one row is selected."
|
|
19
|
+
], [
|
|
20
|
+
a ds:Property;
|
|
21
|
+
ds:name "bulk-actions";
|
|
22
|
+
ds:summary "The bulk actions shown in the bar. Each action defines a label and an optional icon. Actions can be standalone buttons or grouped into expandable dropdown menus. A grouped action defines a top-level button with a dropdown caret and a list of sub-actions that appear in a popover menu above the action bar. ";
|
|
23
|
+
ds:propertyType "object";
|
|
24
|
+
ds:optional "false";
|
|
25
|
+
ds:constraints "Inherited from the data table. Maximum of 7 top-level actions. The deselect button does not count toward this limit."
|
|
26
|
+
];
|
|
27
|
+
ds:parentComponent ds:apps.pattern.data_table.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
|
|
3
|
+
ds:apps.subcomponent.data_table-body_cell a ds:Subcomponent;
|
|
4
|
+
ds:name "DataTable.BodyCell";
|
|
5
|
+
ds:summary "The body cell is the data cell element that displays content in each row of the data table. It comes in four types: checkbox, text, icon + text, and action. Some cell types support inline editing with multiple edit modes, and the action cell type supports inline action buttons for row-level operations.\n\nThe body cell is distinct from the header cell. While the header cell handles column-level controls such as sorting, resizing, reordering, and pinning, the body cell is responsible for presenting data values and providing row-level interactions such as inline editing and row actions.\n\n";
|
|
6
|
+
ds:anatomyDsl "";
|
|
7
|
+
ds:anatomyClassic "https://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3340-1934&t=8RN2Hpk8UX3gMX3u-4\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3834-176770&t=2fO23I8WsyT0YVJ1-4";
|
|
8
|
+
ds:usage "Every piece of data the user sees in a table row is rendered inside a body cell. The cell type determines how content is displayed and what interactions are available. Choosing the right cell type for each column is one of the most important decisions when designing a table, because it affects how users read, scan, and interact with the data.\n\n## Cell type selection\n\n- Use the **text cell** as the default for any column displaying plain data values.\n- Use the **icon + text cell** to indicate the status or category of a value within a cell, such as status indicators.\n- Use the **checkbox cell** when the user needs to select one or more rows. Use a radio variant if the user may only select one item.\n- Use the **action cell** when the table needs row-level inline actions or table settings access.\n\n## Inline actions configuration\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-29792&t=2PBanDq6QA2yNcI2-4\n\n\n\nA maximum of 4 icon-only inline actions can appear per row. If there are more than 4, they overflow into a contextual menu. The designer can also choose to show only the contextual menu and skip icon-only buttons entirely.\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-30895&t=2PBanDq6QA2yNcI2-4\n\nIf there is only one action that cannot be represented as an icon, it can appear as a button instead. The button fills the available space in the action column. The text inside the button is centered. Keep the action column narrow to avoid the button looking disproportionate.\n\n\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-31718&t=2PBanDq6QA2yNcI2-4\n\nThe designer can choose whether inline actions are always visible or appear only on row hover. In hover-only mode, action icons appear only on the currently hovered row, which receives a light background tint. All other rows show no action icons.\n\n\n\nInline actions can be semantically colored. The most common example is “Delete”, which uses a red destructive color. Other actions use the default neutral icon color.\n\n## Inline editing\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3419-7270&t=2PBanDq6QA2yNcI2-4\n\nThe designer can set columns as editable, allowing users to change data values directly in the table without navigating to a separate form or detail view. Editing is configured at the column level, so all body cells in an editable column support editing. Inline editing works well when users need to make quick, small corrections to existing data, such as updating a name, changing a status, or fixing a typo. It is less appropriate when editing involves complex validation, multi-field dependencies, or when changes have significant consequences that require more context than a single cell can provide. In those cases, a dedicated edit form or detail panel is a better fit.\n\nNot every column needs to be editable. Focus on columns where users frequently need to make changes and where the data type fits one of the available edit modes.\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3419-7270&t=2PBanDq6QA2yNcI2-4\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-32440&t=2PBanDq6QA2yNcI2-4\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-33329&t=2PBanDq6QA2yNcI2-4\n\n### Edit modes\n\n- **Text edit** is for short, single-line values such as a hostname, an IP address, or a username. Use this as the default edit mode.\n- **Textarea edit** is for cells that contain longer text, such as a description or a note. The editing area is larger and overlaps cells below it.\n- **Select edit** is for cells where the value must be one of a predefined set of options, such as a status, a region, or a role. It shows a downward-pointing chevron to differentiate it from a text input. A dropdown menu opens below the cell with the selectable options.\n\n\n\n### Save behavior\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-34261&t=2PBanDq6QA2yNcI2-4\n\nBy default, editable cells use **auto-save**. In critical situations where saving needs to be a deliberate decision, the designer can choose **explicit save**. This mode shows “Cancel” and “Save” buttons beneath the cell. Use explicit save when the consequence of an incorrect value is high, such as changing a price, reassigning ownership, or modifying a configuration that affects other users.";
|
|
9
|
+
ds:guidelines "# Interactions\n\n## Cell editing\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3419-7270&t=2PBanDq6QA2yNcI2-4\n\nBy default, editable cells show an edit icon when the cell is hovered. The cursor changes to indicate the cell is interactive. Only the currently hovered cell shows the edit icon, and only one cell displays it at a time.\n\nThe designer can choose to always show the edit icon for editable cells. This makes it easier for the user to discover that a cell is editable. In this configuration, edit icons are visible in every editable cell across all rows, not only the hovered one.\n\n\n\n### Text edit mode\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3419-7270&t=2PBanDq6QA2yNcI2-4\n\nThe cell in edit mode has a focus ring and a drop shadow. It stays the same size and position as the cell itself. When the user starts editing, the entire text is selected so they can type to replace it. They can deselect the text by selecting a position within the cell and add to the existing text instead. This places a text cursor within the existing content.\n\n### Textarea edit mode\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-32440&t=2PBanDq6QA2yNcI2-4\n\nThe editing area extends vertically below the cell’s normal boundaries, covering parts of the rows beneath it. The textarea has the same drop shadow and focus ring as the text edit cell.\n\n### Select edit mode\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-33329&t=2PBanDq6QA2yNcI2-4\n\nThe cell in edit mode has the same focus ring and drop shadow as other edit modes. It stays the same size as the cell itself. A downward-pointing chevron differentiates it from a text input. A dropdown menu opens below the cell with selectable options, overlapping the rows beneath it.\n\n\n\n### Saving and canceling with auto-save (default)\n\nIf the user presses \"Enter\" or selects outside the cell after changing its content, the change is saved automatically. This should be an optimistic update: show the updated value in the UI immediately without waiting for server confirmation. If the server rejects the change, roll the value back and notify the user that the edit did not persist. The notification itself is not part of this component. It should be handled through the application's notification system. The user can cancel an edit by pressing \"Escape\" while the cell is in edit mode. This removes focus from the cell without saving.\n\n### Saving and canceling with explicit save\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-34261&t=2PBanDq6QA2yNcI2-4\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-35176&t=2PBanDq6QA2yNcI2-4\n\nA \"Cancel\" button and a \"Save\" button (green/primary style) appear directly below the editing cell. Pressing \"Escape\" cancels the edit, the same as in auto-save mode. Pressing \"Enter\" does not save the cell, because the user might expect it to create a new line. In explicit save mode, saving must happen through the \"Save\" button. If the user selects somewhere else without saving or canceling, a confirmation modal appears. The modal has the title \"Save changes made to cell?\" and the body text: \"Do you want to save the changes made to this cell? Otherwise any change made to the cell will be discarded.\" Below the body text, a \"Changes:\" section shows the before and after values (for example, \"youthful-yak → Hello world! :)\"). The modal has two buttons: \"Discard changes\" (secondary style) and \"Save changes\" (primary style).\n\n### Unloading with unsaved changes\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-36094&t=2PBanDq6QA2yNcI2-4\n\nIf the user has an unsaved change and is about to leave the page (for example, closing the tab or window), interrupt the navigation and show a confirmation modal. The modal has the title \"Save changes made to cell before exiting?\" and the body text: \"Do you want to save the changes made to this cell before exiting? Otherwise any change made to the cell will be discarded.\" Below the body text, a \"Changes:\" section shows the before and after values (for example, \"youthful-yak → Hello world! :)\"). The modal has two buttons: \"Discard changes and exit\" (secondary style) and \"Save changes and exit\" (primary style).\n\n### Advanced cell type editing\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-37008&t=2PBanDq6QA2yNcI2-4\n\nIf the underlying data is compatible with the available edit modes (text, textarea, or select), more advanced custom cell types can also be edited inline. When a custom cell enters edit mode, it looks the same as any other editing cell. The custom rendering (for example, a percentage bar) is replaced with a standard text input showing the raw value, with the same focus ring and drop shadow styling.\n\n### Validation states\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-38135&t=2PBanDq6QA2yNcI2-4\n\nAn editable cell can have validation states. When active, the focus ring and background reflect the validation state (for example, a red focus ring and red-tinted background for an error). The validation message appears inline with an error icon beneath the editing cell.\n\n\n\n## Inline actions\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3432-39095&t=2PBanDq6QA2yNcI2-4\n\nInline actions are icon-only actions at the end of the row in the action cell type. They share a column with the table settings icon in the header.\n\nEvery icon-only action button must have an appropriate `aria-label` and a tooltip that displays the label on hover. This label should match the one that would appear if the action were shown in a contextual menu.\n\nWhen actions overflow into a contextual menu, it appears as a dropdown anchored to the row. Each menu item displays an icon alongside its label. Destructive actions such as “Delete” are styled in red within the menu.\n\n## Checkbox and radio\n\nA checkbox cell can contain either a checkbox or a radio. A column must use either checkboxes or radios, not a mix.\n\nA header cell checkbox can have the partially selected state, to indicate that some but not all of the page’s rows have been selected. If radios are used, the header cell in that column is empty.";
|
|
10
|
+
ds:tier ds:apps;
|
|
11
|
+
ds:documentationStage ds:tag.needsdefinition;
|
|
12
|
+
ds:hasProperty [
|
|
13
|
+
a ds:Property;
|
|
14
|
+
ds:name "cell-type";
|
|
15
|
+
ds:summary "The type of content the cell displays. Determines the available interactions and visual treatment.";
|
|
16
|
+
ds:propertyType "choice";
|
|
17
|
+
ds:optional "false";
|
|
18
|
+
ds:constraints "A column must use a single cell type.";
|
|
19
|
+
ds:defaultValue "text"
|
|
20
|
+
], [
|
|
21
|
+
a ds:Property;
|
|
22
|
+
ds:name "highlighted";
|
|
23
|
+
ds:summary "Whether the cell appears in a highlighted visual state instead of the default state.";
|
|
24
|
+
ds:propertyType "boolean";
|
|
25
|
+
ds:optional "true";
|
|
26
|
+
ds:constraints "Applies to text and icon+text cell types.";
|
|
27
|
+
ds:defaultValue "false"
|
|
28
|
+
], [
|
|
29
|
+
a ds:Property;
|
|
30
|
+
ds:name "editable";
|
|
31
|
+
ds:summary "Whether the cell supports inline editing.";
|
|
32
|
+
ds:propertyType "boolean";
|
|
33
|
+
ds:optional "true";
|
|
34
|
+
ds:constraints "Applies to text, icon+text, and compatible custom cell types only. Not available on checkbox or action cell types.";
|
|
35
|
+
ds:defaultValue "false"
|
|
36
|
+
], [
|
|
37
|
+
a ds:Property;
|
|
38
|
+
ds:name "edit-mode";
|
|
39
|
+
ds:summary "The editing interface used when the cell enters edit mode. Text is for short single-line values. Textarea is for longer multi-line values. Select is for values from a predefined set of options.";
|
|
40
|
+
ds:propertyType "choice";
|
|
41
|
+
ds:optional "true";
|
|
42
|
+
ds:constraints "Only applies when editable is true.";
|
|
43
|
+
ds:defaultValue "text"
|
|
44
|
+
], [
|
|
45
|
+
a ds:Property;
|
|
46
|
+
ds:name "select-options";
|
|
47
|
+
ds:summary "The set of predefined options shown in the select dropdown when the cell enters edit mode.";
|
|
48
|
+
ds:propertyType "list of text";
|
|
49
|
+
ds:optional "true";
|
|
50
|
+
ds:constraints "Required when edit-mode is select."
|
|
51
|
+
], [
|
|
52
|
+
a ds:Property;
|
|
53
|
+
ds:name "save-mode";
|
|
54
|
+
ds:summary "How changes are persisted. Auto-save saves on Enter or blur. Explicit save shows Cancel and Save buttons beneath the cell. Use explicit save when the consequence of an incorrect value is high.";
|
|
55
|
+
ds:propertyType "choice";
|
|
56
|
+
ds:optional "true";
|
|
57
|
+
ds:constraints "Only applies when editable is true.";
|
|
58
|
+
ds:defaultValue "auto-save"
|
|
59
|
+
], [
|
|
60
|
+
a ds:Property;
|
|
61
|
+
ds:name "always-show-edit-icon";
|
|
62
|
+
ds:summary "Whether the edit icon is always visible on editable cells or only shown on hover. When true, edit icons appear in every editable cell across all rows.";
|
|
63
|
+
ds:propertyType "boolean";
|
|
64
|
+
ds:optional "true";
|
|
65
|
+
ds:constraints "Only applies when editable is true.";
|
|
66
|
+
ds:defaultValue "false"
|
|
67
|
+
], [
|
|
68
|
+
a ds:Property;
|
|
69
|
+
ds:name "validation-state";
|
|
70
|
+
ds:summary "The current validation state of the cell. When active, the focus ring and background reflect the state (for example, a red focus ring and red-tinted background for an error).";
|
|
71
|
+
ds:propertyType "choice";
|
|
72
|
+
ds:optional "true";
|
|
73
|
+
ds:constraints "Only applies when editable is true.";
|
|
74
|
+
ds:defaultValue "none"
|
|
75
|
+
], [
|
|
76
|
+
a ds:Property;
|
|
77
|
+
ds:name "validation-message";
|
|
78
|
+
ds:summary "The inline validation message displayed beneath the editing cell with an error icon.";
|
|
79
|
+
ds:propertyType "text";
|
|
80
|
+
ds:optional "true";
|
|
81
|
+
ds:constraints "Only applies when validation-state is not none."
|
|
82
|
+
], [
|
|
83
|
+
a ds:Property;
|
|
84
|
+
ds:name "checkbox-mode";
|
|
85
|
+
ds:summary "Whether the cell uses a checkbox (multi-select) or radio (single-select) control. When radios are used, the header cell in that column is empty.";
|
|
86
|
+
ds:propertyType "choice";
|
|
87
|
+
ds:optional "true";
|
|
88
|
+
ds:constraints "Only applies when cell-type is checkbox. A column must use either checkboxes or radios, not a mix.";
|
|
89
|
+
ds:defaultValue "checkbox"
|
|
90
|
+
], [
|
|
91
|
+
a ds:Property;
|
|
92
|
+
ds:name "inline-actions";
|
|
93
|
+
ds:summary "The set of row-level actions displayed in the cell. Each action defines a label, an icon, an optional `aria-label`, and whether it is destructive.";
|
|
94
|
+
ds:propertyType "list of text";
|
|
95
|
+
ds:optional "true";
|
|
96
|
+
ds:constraints "Only applies when cell-type is action. Maximum of 4 icon-only actions before overflow to a contextual menu."
|
|
97
|
+
], [
|
|
98
|
+
a ds:Property;
|
|
99
|
+
ds:name "inline-actions-visibility";
|
|
100
|
+
ds:summary "Whether inline action icons are always visible or appear only on the currently hovered row.";
|
|
101
|
+
ds:propertyType "choice";
|
|
102
|
+
ds:optional "true";
|
|
103
|
+
ds:constraints "Only applies when cell-type is action.";
|
|
104
|
+
ds:defaultValue "always"
|
|
105
|
+
];
|
|
106
|
+
ds:parentComponent ds:apps.pattern.data_table.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
|
|
3
|
+
ds:apps.subcomponent.data_table-group_header_row a ds:Subcomponent;
|
|
4
|
+
ds:name "DataTable.GroupHeaderRow";
|
|
5
|
+
ds:summary "A group header row is a collapsible row that separates groups of data rows based on a shared column value. It spans the full width of the table and is labeled with the column name and its value (for example, \"Status: In progress\"). It contains a chevron indicating open/closed state, the group label text, and an optional selection checkbox when selection is enabled.";
|
|
6
|
+
ds:anatomyDsl "";
|
|
7
|
+
ds:anatomyClassic "https://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3340-2397&t=8RN2Hpk8UX3gMX3u-4\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=4817-88534&t=2fO23I8WsyT0YVJ1-4";
|
|
8
|
+
ds:usage "Grouping organizes table rows into collapsible sections based on a shared column value. It makes categorical structure visible directly in the table, so users can scan, focus on, and act on subsets of data without relying on filters or manual scanning. Consider grouping when users already think about the data in categories. For example, a table of support cases is naturally understood by severity, and a table of deployments is naturally understood by environment. Grouping reflects that mental model in the table layout itself.\n\nGrouping works best with medium-to-large datasets where a flat list becomes hard to navigate. It is less useful when the dataset is small or when the user’s primary task is comparing individual rows across categories, since grouping separates rows into sections that make cross-group comparison harder.\n\n## When to use\n\n- Users frequently scan or act on rows by a categorical attribute such as status, priority, or region.\n- The dataset is large enough that a flat list makes it hard to find relevant rows.\n- The data has a natural hierarchy that users already think in.\n\n## When not to use\n\n- The dataset is small enough that users can scan all rows without difficulty.\n- The primary task is comparing individual rows across categories. Sorting is a better fit.\n- The table uses keyset pagination. Grouping is incompatible with keyset pagination. Refer to the pagination with groups section for details.\n- No column has a small, known set of values. Grouping only works with enumerated values.\n\n## What can be grouped\n\nGroups are always based on columns in the table. Rows are grouped by a value in a column.\n\n- Groups can **only** be created for columns with **enumerated values**, where the value can only be one out of a set of known options (for example, “In progress”, “Finished”, “Queued”).\n- Groups **cannot** be created for columns with unique data, because that would produce many groups containing only one row. For such columns, sorting is more appropriate.\n- Tables **can** be grouped by a column that is hidden. The column does not need to be visible for grouping to work.\n\nWhen designing a table, the designer chooses which columns support grouping.\n\n## Order of groups\n\nThe order of groups is **alphabetical by default**. The designer can choose a custom order if there is meaning associated with a specific sequence. For example, a Status column could be ordered from start to finish: “In progress”, “Success”, “Failed”.\n\n## Empty groups\n\nGroups with no items are not shown. If a group has no content, the group header row is hidden entirely.\n\n## One active grouping at a time\n\nA table can only be grouped by one column at a time. If the user activates grouping on a different column, the previous grouping is deactivated and replaced by the new one.";
|
|
9
|
+
ds:guidelines "# Interactions\n\n## Choosing which column to group by\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3486-39979&t=2PBanDq6QA2yNcI2-4\n\nThe user selects the grouping column through the **table settings panel**.\n\n- Not all columns support grouping. Columns that do display a **“Group by” button** next to them in the settings panel.\n- Selecting the “Group by” button activates grouping for that column. The button enters an **active state**.\n- Since the table needs to be restructured and new data likely fetched, the table enters a **full skeleton loading state** while grouping is applied.\n- After loading completes, the table displays the grouped data.\n- Selecting an active “Group by” button again **deactivates** grouping. The table enters a loading state and then returns to an ungrouped view.\n- If the user selects a different column’s “Group by” button while one is already active, the previous grouping is deactivated and the new one is activated.\n- A table may offer multiple columns that support grouping.\n\n## Expand and collapse\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3486-50231&t=2PBanDq6QA2yNcI2-4\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3486-51205&t=2PBanDq6QA2yNcI2-4\n\nSelecting the group header row toggles the group between expanded and collapsed states. The chevron direction updates accordingly (down for open, right for closed).\n\nCollapsing a group hides its child rows, which means new rows may need to be loaded into the freed space. The loading behavior depends on how the group relates to pagination:\n\n- **Group spans multiple pages:** When a multi-page group is collapsed, skeleton loading placeholders appear beneath the collapsed group header while new data is fetched to fill the page.\n- **Group fits on the current page:** When a single-page group is collapsed, the loading state appears only toward the bottom of the page where new items load in. The other groups and their rows remain visible above.\n\nAfter loading completes, the collapsed group shows only its header row. The remaining space is filled with rows from subsequent groups.\n\n## Sorting within groups\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3486-49256&t=2PBanDq6QA2yNcI2-4\n\nWhen grouping is enabled, sorting applies **only within each group**. There is no sorting across groups.\n\n- **Without pagination (single-page groups):** Sorting is straightforward with no loading state needed. Rows within each group reorder immediately.\n- **With multi-page groups:** A loading state is required while new sorted rows are fetched. The group header remains visible with skeleton loading placeholders replacing the child rows until the sorted data arrives.\n\n## Pagination with groups\n\n\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3486-42366&t=2PBanDq6QA2yNcI2-4\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3486-42596&t=2PBanDq6QA2yNcI2-4\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3486-42826&t=2PBanDq6QA2yNcI2-4\n\nIf a group spans multiple pages, the **group header row is repeated** at the top of each subsequent page that contains rows from that group. For example, if the “In progress” group starts on page 1 and its last 3 items appear on page 2, the “In progress” group header row appears again at the top of page 2 above those 3 remaining rows.\n\nCollapsing a group hides rows, which changes the total page count:\n\n- While the table is in the loading state after a collapse, the **total number of pages also enters a skeleton loading state** because the page count needs to be recalculated.\n- After loading completes, the updated page count is displayed (for example, “of 20 pages” may become “of 19 pages” after collapsing a group).\n\nGrouping is **fundamentally incompatible with keyset pagination**. Keyset pagination filters rows based on the last seen value of the sort column, fetching only the next slice of individually ordered rows. Grouping requires the database to first collect all rows belonging to the same group, aggregate them, and return the collapsed result. These two concepts conflict because keyset pagination relies on a stable, unique cursor value per row, but grouped results are aggregated summaries that no longer correspond to individual rows with unique cursor values. A group may span multiple pages of the underlying data, so there is no reliable way to point a cursor at “the last group seen” using a row-level column value.\n\n\n\n## Selection with groups\n\nhttps://www.figma.com/design/WGHcOmGMEUF9hMAEoRafL8/%F0%9F%93%95-Pragma---documentation-visuals?node-id=3486-52279&t=2PBanDq6QA2yNcI2-4\n\nThe checkbox in the group header row selects or deselects **all rows in the group**. All child row checkboxes within that group become checked or unchecked accordingly.\n\nIf only some rows within a group are selected, the group header checkbox displays a **“child selected” (indeterminate) state**, shown as a dash instead of a checkmark. This occurs both when the user deselects individual rows from a fully selected group and when the user selects individual rows without selecting the full group.\n\nGroups can span multiple pages. When the user selects a multi-page group via its header checkbox, **all items in the group are selected, including those not currently visible on the page**. The selection persists when navigating to subsequent pages. Rows belonging to the selected group on other pages also appear checked.\n\nBecause of this requirement, a table that has both selection and grouping **cannot use simple selection**. It must use **persistent selection**.\n\n### Backend dependency for group selection\n\nSelecting an entire group through the header checkbox likely requires backend support. When a group spans multiple pages, the frontend only has access to the rows currently loaded on the page. It cannot know the full set of items in the group without querying the backend. The backend needs to resolve which rows belong to the group and return them so the selection state is accurate across all pages.\n\nIf the backend does not support group-level selection, remove the checkbox from the group header row. Users can still select individual rows within a group, but they cannot select the entire group at once. This avoids a misleading interaction where the user expects all items in the group to be selected but only the currently loaded rows are affected.\n\nGrouping can also be used in tables that have no selection at all. In this case, no checkboxes appear on group headers or data rows. Only action icons (for example, edit or delete) appear on rows.\n\n";
|
|
10
|
+
ds:tier ds:apps;
|
|
11
|
+
ds:documentationStage ds:tag.needsdefinition;
|
|
12
|
+
ds:hasProperty [
|
|
13
|
+
a ds:Property;
|
|
14
|
+
ds:name "grouping-columns";
|
|
15
|
+
ds:summary "The set of columns that support grouping. Only columns with a small, known set of values are valid. The user selects which column to group by through the settings menu.";
|
|
16
|
+
ds:propertyType "list of text";
|
|
17
|
+
ds:optional "true";
|
|
18
|
+
ds:constraints "Inherited from the data table. Each value must reference an enumerated-value column."
|
|
19
|
+
], [
|
|
20
|
+
a ds:Property;
|
|
21
|
+
ds:name "default-group-column";
|
|
22
|
+
ds:summary "The column the table is grouped by on initial load.";
|
|
23
|
+
ds:propertyType "text";
|
|
24
|
+
ds:optional "true";
|
|
25
|
+
ds:constraints "Inherited from the data table. Must reference a column in grouping-columns."
|
|
26
|
+
], [
|
|
27
|
+
a ds:Property;
|
|
28
|
+
ds:name "group-order";
|
|
29
|
+
ds:summary "The order in which groups are displayed. Use a custom order when there is meaning associated with a specific sequence (for example, a status column ordered from start to finish).";
|
|
30
|
+
ds:propertyType "choice";
|
|
31
|
+
ds:optional "true";
|
|
32
|
+
ds:constraints "Inherited from the data table. When custom, a custom order must be provided.";
|
|
33
|
+
ds:defaultValue "alphabetical"
|
|
34
|
+
], [
|
|
35
|
+
a ds:Property;
|
|
36
|
+
ds:name "groups-expanded-by-default";
|
|
37
|
+
ds:summary "Whether groups are expanded or collapsed on initial load.";
|
|
38
|
+
ds:propertyType "boolean";
|
|
39
|
+
ds:optional "true";
|
|
40
|
+
ds:constraints "Inherited from the data table.";
|
|
41
|
+
ds:defaultValue "true"
|
|
42
|
+
], [
|
|
43
|
+
a ds:Property;
|
|
44
|
+
ds:name "expanded";
|
|
45
|
+
ds:summary "Whether this individual group is currently expanded or collapsed. The chevron points down when expanded and right when collapsed. Selecting the group header row toggles this state.";
|
|
46
|
+
ds:propertyType "boolean";
|
|
47
|
+
ds:optional "true";
|
|
48
|
+
ds:defaultValue "Inherited from groups-expanded-by-default."
|
|
49
|
+
], [
|
|
50
|
+
a ds:Property;
|
|
51
|
+
ds:name "show-group-checkbox";
|
|
52
|
+
ds:summary "Whether a selection checkbox is shown on the group header row. When the backend does not support group-level selection, set to false to avoid a misleading interaction. Users can still select individual rows within the group.";
|
|
53
|
+
ds:propertyType "boolean";
|
|
54
|
+
ds:optional "true";
|
|
55
|
+
ds:constraints "Requires persistent selection when used with grouping. Requires backend support for group-level selection across pages.";
|
|
56
|
+
ds:defaultValue "true when selection is enabled."
|
|
57
|
+
];
|
|
58
|
+
ds:parentComponent ds:apps.pattern.data_table.
|