@canonical/design-system 0.2.4 → 0.43.0-experimental.1
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/LICENSE +166 -0
- package/README.md +255 -14
- package/data/apps/component/file_tree.ttl +2 -0
- package/data/apps/component/key_value_pair.ttl +2 -0
- package/data/apps/component/navigation.ttl +2 -0
- package/data/apps/component/notification.ttl +2 -0
- package/data/apps/component/side_navigation.ttl +2 -0
- package/data/apps/component/skeleton_loading.ttl +2 -0
- package/data/apps/component/status_bar.ttl +2 -0
- package/data/apps/component/toolbar.ttl +2 -0
- package/data/apps/group/key_value_pairs.ttl +2 -0
- package/data/apps/group/notifications.ttl +2 -0
- package/data/apps/layout/application_layout.ttl +2 -0
- package/data/apps/layout/content_layout.ttl +2 -0
- package/data/apps/layout/empty_layout.ttl +2 -0
- package/data/apps/layout/empty_state.ttl +13 -0
- package/data/apps/layout/list_page_layout.ttl +2 -0
- package/data/apps/layout/settings_page_layout.ttl +2 -0
- package/data/apps/layout/view_layout.ttl +2 -0
- package/data/apps/pattern/action_bar.ttl +4 -2
- package/data/apps/pattern/code_diff.ttl +2 -0
- package/data/apps/pattern/{data_table.ttl → datatable.ttl} +27 -25
- package/data/apps/pattern/destructive_modal.ttl +2 -0
- package/data/apps/pattern/drawer.ttl +2 -0
- package/data/apps/pattern/keyboard_shortcuts.ttl +2 -0
- package/data/apps/pattern/notification_center.ttl +4 -2
- package/data/apps/pattern/side_panel.ttl +39 -4
- package/data/apps/pattern/sidepanel_stacked.ttl +2 -0
- package/data/apps/subcomponent/data_table-action_bar.ttl +7 -5
- package/data/apps/subcomponent/data_table-body_cell.ttl +27 -25
- package/data/apps/subcomponent/data_table-group_header_row.ttl +10 -8
- package/data/apps/subcomponent/data_table-header_cell.ttl +13 -11
- package/data/apps/subcomponent/data_table-pagination_bar.ttl +11 -9
- package/data/apps/subcomponent/data_table-persistent_selection.ttl +12 -10
- package/data/apps/subcomponent/data_table-settings_menu.ttl +17 -15
- package/data/apps/subcomponent/drawer-content.ttl +2 -0
- package/data/apps/subcomponent/drawer-footer.ttl +2 -0
- package/data/apps/subcomponent/drawer-header.ttl +2 -0
- package/data/apps/subcomponent/file_tree-node.ttl +2 -0
- package/data/apps/subcomponent/log.ttl +2 -0
- package/data/apps/subcomponent/side_panel-content.ttl +3 -1
- package/data/apps/subcomponent/side_panel-footer.ttl +3 -1
- package/data/apps/subcomponent/side_panel-header.ttl +3 -1
- package/data/apps.ttl +2 -0
- package/data/apps_anbox/component/theme_switcher.ttl +2 -0
- package/data/apps_anbox/pattern/side_menu.ttl +2 -0
- package/data/apps_anbox.ttl +2 -0
- package/data/apps_debcrafters/component/deb_package_card.ttl +12 -0
- package/data/apps_debcrafters/component/example.ttl +2 -0
- package/data/apps_debcrafters/component/my_fancy_component.ttl +2 -0
- package/data/apps_debcrafters.ttl +2 -0
- package/data/apps_juju/pattern/single_select_multi_layered.ttl +2 -0
- package/data/apps_juju.ttl +2 -0
- package/data/apps_landscape/component/checkbox_group.ttl +110 -0
- package/data/apps_landscape/component/code_editor.ttl +134 -0
- package/data/apps_landscape/component/cron_schedule.ttl +40 -0
- package/data/apps_landscape/component/expandable_radio_group.ttl +106 -0
- package/data/apps_landscape/component/expandable_truncation.ttl +50 -0
- package/data/apps_landscape/component/form_section.ttl +33 -0
- package/data/apps_landscape/component/gpg_key_field.ttl +86 -0
- package/data/apps_landscape/component/grouped_select.ttl +137 -0
- package/data/apps_landscape/component/loading_state.ttl +30 -0
- package/data/apps_landscape/component/managed_file_input.ttl +75 -0
- package/data/apps_landscape/component/multi_select_field.ttl +323 -0
- package/data/apps_landscape/component/pass_rate_filter.ttl +13 -0
- package/data/apps_landscape/component/password_constraints.ttl +3 -0
- package/data/apps_landscape/component/progress_bar.ttl +100 -0
- package/data/apps_landscape/component/read_only_field.ttl +46 -0
- package/data/apps_landscape/component/search_help_popup.ttl +51 -0
- package/data/apps_landscape/component/search_query_editor.ttl +149 -0
- package/data/apps_landscape/component/tag_multi_select.ttl +52 -0
- package/data/apps_landscape/pattern/content_blocks.ttl +70 -0
- package/data/apps_landscape/pattern/dashboard_page_composition.ttl +110 -0
- package/data/apps_landscape/pattern/delivery_scheduling.ttl +24 -0
- package/data/apps_landscape/pattern/form_field_help.ttl +67 -0
- package/data/apps_landscape/pattern/header_search_controls.ttl +106 -0
- package/data/apps_landscape/pattern/ignorable_notification.ttl +60 -0
- package/data/apps_landscape/pattern/information_grid.ttl +93 -0
- package/data/apps_landscape/pattern/instance_association.ttl +29 -0
- package/data/apps_landscape/pattern/process_flow.ttl +52 -0
- package/data/apps_landscape/pattern/progressively_expandable_table.ttl +158 -0
- package/data/apps_landscape/pattern/recurring_schedule.ttl +21 -0
- package/data/apps_landscape/pattern/responsive_action_group.ttl +77 -0
- package/data/apps_landscape/pattern/responsive_header_actions.ttl +83 -0
- package/data/apps_landscape/pattern/responsive_table_filters.ttl +61 -0
- package/data/apps_landscape/pattern/side_panel_form_actions.ttl +126 -0
- package/data/apps_landscape/pattern/sortable_list.ttl +50 -0
- package/data/apps_landscape/pattern/table_filter.ttl +201 -0
- package/data/apps_landscape/pattern/table_filter_chips.ttl +174 -0
- package/data/apps_landscape/pattern/table_pagination.ttl +220 -0
- package/data/apps_landscape/pattern/typed_confirmation_modal.ttl +88 -0
- package/data/apps_landscape/subcomponent/bold_substring.ttl +30 -0
- package/data/apps_landscape/subcomponent/inline_cell_input.ttl +36 -0
- package/data/apps_landscape/subcomponent/label_with_description.ttl +46 -0
- package/data/apps_landscape/subcomponent/nested_dropdown_item.ttl +61 -0
- package/data/apps_landscape/subcomponent/pluralized_bold_count.ttl +36 -0
- package/data/apps_landscape/subcomponent/select_all_results_prompt.ttl +56 -0
- package/data/apps_landscape.ttl +2 -0
- package/data/apps_launchpad/component/accordion.ttl +12 -0
- package/data/apps_launchpad/component/avatar.ttl +4 -2
- package/data/apps_launchpad/component/badge.ttl +4 -2
- package/data/apps_launchpad/component/breadcrumbs.ttl +2 -0
- package/data/apps_launchpad/component/button.ttl +4 -2
- package/data/apps_launchpad/component/checkbox_input.ttl +6 -4
- package/data/apps_launchpad/component/chip.ttl +2 -0
- package/data/apps_launchpad/component/combobox.ttl +4 -2
- package/data/apps_launchpad/component/description_list.ttl +2 -0
- package/data/apps_launchpad/component/drawer.ttl +6 -4
- package/data/apps_launchpad/component/link.ttl +12 -0
- package/data/apps_launchpad/component/log.ttl +2 -0
- package/data/apps_launchpad/component/markdown_editor.ttl +12 -0
- package/data/apps_launchpad/component/modal.ttl +7 -5
- package/data/apps_launchpad/component/pagination.ttl +12 -0
- package/data/apps_launchpad/component/popover.ttl +12 -0
- package/data/apps_launchpad/component/radio_input.ttl +6 -4
- package/data/apps_launchpad/component/relative_timestamp.ttl +12 -0
- package/data/apps_launchpad/component/select_input.ttl +2 -0
- package/data/apps_launchpad/component/spinner.ttl +12 -0
- package/data/apps_launchpad/component/switch.ttl +6 -4
- package/data/apps_launchpad/component/table.ttl +12 -0
- package/data/apps_launchpad/component/text_input.ttl +9 -7
- package/data/apps_launchpad/component/textarea_input.ttl +10 -8
- package/data/apps_launchpad/component/timestamp.ttl +12 -0
- package/data/apps_launchpad/component/tooltip.ttl +4 -2
- package/data/apps_launchpad/subcomponent/combobox-checkbox_option.ttl +2 -0
- package/data/apps_launchpad/subcomponent/combobox-footer.ttl +2 -0
- package/data/apps_launchpad/subcomponent/combobox-group.ttl +2 -0
- package/data/apps_launchpad/subcomponent/combobox-helper.ttl +2 -0
- package/data/apps_launchpad/subcomponent/combobox-loading.ttl +4 -2
- package/data/apps_launchpad/subcomponent/combobox-no_results.ttl +2 -0
- package/data/apps_launchpad/subcomponent/combobox-radio_option.ttl +2 -0
- package/data/apps_launchpad/subcomponent/combobox-search.ttl +6 -4
- package/data/apps_launchpad/subcomponent/description_list-item.ttl +2 -0
- package/data/apps_launchpad/subcomponent/log-line.ttl +2 -0
- package/data/apps_launchpad/subcomponent/modal-content-body.ttl +2 -0
- package/data/apps_launchpad/subcomponent/modal-content-footer.ttl +2 -0
- package/data/apps_launchpad/subcomponent/modal-content-header-close_button.ttl +2 -0
- package/data/apps_launchpad/subcomponent/modal-content-header.ttl +2 -0
- package/data/apps_launchpad/subcomponent/modal-content.ttl +4 -2
- package/data/apps_launchpad/subcomponent/side_panel-content-body.ttl +2 -0
- package/data/apps_launchpad/subcomponent/side_panel-content-footer.ttl +2 -0
- package/data/apps_launchpad/subcomponent/side_panel-content-header-close_button.ttl +2 -0
- package/data/apps_launchpad/subcomponent/side_panel-content-header.ttl +2 -0
- package/data/apps_launchpad/subcomponent/side_panel-content.ttl +2 -0
- package/data/apps_launchpad.ttl +2 -0
- package/data/apps_lxd/component/back_link.ttl +2 -0
- package/data/apps_lxd/component/code_snippet_with_copy_button.ttl +2 -0
- package/data/apps_lxd/component/confirmation_checkbox.ttl +2 -0
- package/data/apps_lxd/component/doc_link.ttl +4 -2
- package/data/apps_lxd/component/meter.ttl +6 -4
- package/data/apps_lxd/component/output_field.ttl +2 -0
- package/data/apps_lxd/component/rename_header.ttl +17 -15
- package/data/apps_lxd/component/tab_links.ttl +6 -4
- package/data/apps_lxd/subcomponent/copy_to_clipboard.ttl +2 -0
- package/data/apps_lxd/view/network_topology.ttl +2 -0
- package/data/apps_lxd.ttl +2 -0
- package/data/apps_notary.ttl +2 -0
- package/data/apps_portal/component/badge.ttl +2 -0
- package/data/apps_portal/component/credit_card_input.ttl +2 -0
- package/data/apps_portal/component/key_value_pair.ttl +2 -0
- package/data/apps_portal/layout/details_view.ttl +18 -0
- package/data/apps_portal/pattern/purchase_summary.ttl +2 -0
- package/data/apps_portal/subcomponent/read_only_modal.ttl +2 -0
- package/data/apps_portal.ttl +2 -0
- package/data/apps_support/component/data_spotlight.ttl +12 -0
- package/data/apps_support/subcomponent/ai_prompt_input.ttl +12 -0
- package/data/apps_support.ttl +6 -0
- package/data/apps_workplaceengineering/component/complex_multi_select.ttl +13 -0
- package/data/apps_workplaceengineering/component/label-highlight.ttl +3 -1
- package/data/apps_workplaceengineering/component/rule.ttl +2 -0
- package/data/apps_workplaceengineering/component/skip_link.ttl +2 -0
- package/data/apps_workplaceengineering/component/theme_switcher.ttl +2 -0
- package/data/apps_workplaceengineering/pattern/callout_numbers_card.ttl +2 -0
- package/data/apps_workplaceengineering/pattern/confirmation_modal.ttl +12 -0
- package/data/apps_workplaceengineering/pattern/event_timeline.ttl +2 -0
- package/data/apps_workplaceengineering/pattern/group_card.ttl +2 -0
- package/data/apps_workplaceengineering/pattern/travel_provider_card.ttl +2 -0
- package/data/apps_workplaceengineering/subcomponent/multi_select_input.ttl +12 -0
- package/data/apps_workplaceengineering.ttl +2 -0
- package/data/concept/Foundations-Baseline.ttl +11 -0
- package/data/concept/Foundations-Density--the-form-channel.ttl +11 -0
- package/data/concept/Foundations-Grid--Layout.ttl +11 -0
- package/data/concept/Foundations-Spacing/-Element-vs-container-owned.ttl +11 -0
- package/data/concept/Foundations-Spacing.ttl +11 -0
- package/data/concept/Foundations-Surfaces.ttl +11 -0
- package/data/concept/Foundations-Typography.ttl +11 -0
- package/data/concept/{How-to-differentiate-components-variantsinheritance.ttl → How-to-differentiate-types-of-UI-blocks-.ttl} +5 -3
- package/data/concept/How-to-indicate-required-fields-in-forms.ttl +11 -0
- package/data/concept/How-to-support-modifiers-in-a-component.ttl +11 -0
- package/data/concept/Intentional-friction.ttl +11 -0
- package/data/concept/Question-mark-vs-information-icon.ttl +3 -1
- package/data/concept/Understanding-the-modifier-contract.ttl +11 -0
- package/data/concepttype/Explanation.ttl +2 -0
- package/data/concepttype/How-to-guide.ttl +2 -0
- package/data/concepttype/Reference.ttl +2 -0
- package/data/concepttype/Tutorial.ttl +2 -0
- package/data/documentation/layout/documentation_layout.ttl +2 -0
- package/data/documentation/pattern/library_side_navigation.ttl +3 -1
- package/data/documentation.ttl +2 -0
- package/data/global/component/accordion.ttl +180 -1
- package/data/global/component/announcement.ttl +13 -2
- package/data/global/component/avatar.ttl +2 -0
- package/data/global/component/badge.ttl +4 -2
- package/data/global/component/breadcrumbs.ttl +77 -2
- package/data/global/component/button.ttl +197 -2
- package/data/global/component/button_link.ttl +2 -0
- package/data/global/component/card.ttl +150 -3
- package/data/global/component/checkbox_field.ttl +269 -2
- package/data/global/component/chip.ttl +3 -1
- package/data/global/component/choices_field.ttl +373 -2
- package/data/global/component/code_snippet-content.ttl +3 -1
- package/data/global/component/code_snippet-header.ttl +21 -2
- package/data/global/component/code_snippet.ttl +28 -1
- package/data/global/component/color_field.ttl +2 -0
- package/data/global/component/combobox_field.ttl +470 -3
- package/data/global/component/contextual_menu.ttl +2 -0
- package/data/global/component/data_tooltip.ttl +149 -2
- package/data/global/component/date_field.ttl +158 -3
- package/data/global/component/date_time_field.ttl +157 -2
- package/data/global/component/drag_and_drop_list.ttl +13 -0
- package/data/global/component/dropdown_button.ttl +2 -0
- package/data/global/component/file_upload_field.ttl +230 -3
- package/data/global/component/heading.ttl +62 -3
- package/data/global/component/hidden_field.ttl +3 -1
- package/data/global/component/icon.ttl +3 -1
- package/data/global/component/icon_in_container.ttl +2 -0
- package/data/global/component/inline_code.ttl +2 -0
- package/data/global/component/keyboard_key.ttl +77 -2
- package/data/global/component/markdown_field.ttl +2 -0
- package/data/global/component/mode_switcher.ttl +2 -0
- package/data/global/component/month_field.ttl +2 -0
- package/data/global/component/notification_inline.ttl +2 -0
- package/data/global/component/notification_toast.ttl +2 -0
- package/data/global/component/number_field.ttl +2 -0
- package/data/global/component/pagination.ttl +2 -0
- package/data/global/component/password_field.ttl +189 -2
- package/data/global/component/phone_field.ttl +173 -2
- package/data/global/component/popover.ttl +2 -0
- package/data/global/component/range_field.ttl +165 -2
- package/data/global/component/rating_field.ttl +2 -0
- package/data/global/component/relative_timestamp.ttl +2 -0
- package/data/global/component/rich_choices_field.ttl +205 -2
- package/data/global/component/rich_text_field.ttl +2 -0
- package/data/global/component/search_field.ttl +2 -0
- package/data/global/component/segmented_control_field.ttl +2 -0
- package/data/global/component/select_field.ttl +158 -3
- package/data/global/component/switch_field.ttl +190 -3
- package/data/global/component/table.ttl +4 -2
- package/data/global/component/tabs.ttl +13 -2
- package/data/global/component/tag.ttl +13 -2
- package/data/global/component/text_field.ttl +173 -2
- package/data/global/component/textarea_field.ttl +157 -2
- package/data/global/component/tile.ttl +108 -1
- package/data/global/component/time_field.ttl +157 -2
- package/data/global/component/timestamp.ttl +2 -0
- package/data/global/component/tooltip.ttl +166 -43
- package/data/global/component/tooltip_wrapper.ttl +61 -2
- package/data/global/group/buttons.ttl +2 -0
- package/data/global/group/cards.ttl +2 -0
- package/data/global/group/code_snippets.ttl +2 -0
- package/data/global/group/keyboard_keys.ttl +101 -2
- package/data/global/group/tiles.ttl +2 -0
- package/data/global/layout/error_layout.ttl +2 -0
- package/data/global/layout/form_layout.ttl +2 -0
- package/data/global/layout/identity_page_form.ttl +2 -0
- package/data/global/modifier/alpha.ttl +2 -0
- package/data/global/modifier/beta.ttl +2 -0
- package/data/global/modifier/caution.ttl +2 -0
- package/data/global/modifier/comfortable.ttl +2 -0
- package/data/global/modifier/completed.ttl +2 -0
- package/data/global/modifier/constructive.ttl +2 -0
- package/data/global/modifier/dark.ttl +2 -0
- package/data/global/modifier/dense.ttl +2 -0
- package/data/global/modifier/destructive.ttl +2 -0
- package/data/global/modifier/editable.ttl +2 -0
- package/data/global/modifier/elevated.ttl +2 -0
- package/data/global/modifier/error.ttl +2 -0
- package/data/global/modifier/experimental.ttl +2 -0
- package/data/global/modifier/failed.ttl +2 -0
- package/data/global/modifier/focused.ttl +2 -0
- package/data/global/modifier/highlighted.ttl +2 -0
- package/data/global/modifier/in_progress.ttl +2 -0
- package/data/global/modifier/information.ttl +2 -0
- package/data/global/modifier/light.ttl +2 -0
- package/data/global/modifier/loading.ttl +2 -0
- package/data/global/modifier/modal.ttl +2 -0
- package/data/global/modifier/muted.ttl +2 -0
- package/data/global/modifier/planned.ttl +2 -0
- package/data/global/modifier/primary.ttl +2 -0
- package/data/global/modifier/secondary.ttl +2 -0
- package/data/global/modifier/stable.ttl +2 -0
- package/data/global/modifier/success.ttl +2 -0
- package/data/global/modifier/surface1.ttl +2 -0
- package/data/global/modifier/surface2.ttl +2 -0
- package/data/global/modifier/surface3.ttl +2 -0
- package/data/global/modifier/tertiary.ttl +2 -0
- package/data/global/modifier/warning.ttl +2 -0
- package/data/global/modifier/wireframe.ttl +2 -0
- package/data/global/modifier_family/_color_luminosity.ttl +2 -0
- package/data/global/modifier_family/_emphasis.ttl +2 -0
- package/data/global/modifier_family/_other.ttl +2 -0
- package/data/global/modifier_family/anticipation.ttl +2 -0
- package/data/global/modifier_family/criticality.ttl +2 -0
- package/data/global/modifier_family/density.ttl +2 -0
- package/data/global/modifier_family/importance.ttl +2 -0
- package/data/global/modifier_family/lifecycle.ttl +2 -0
- package/data/global/modifier_family/mode.ttl +2 -0
- package/data/global/modifier_family/release.ttl +2 -0
- package/data/global/modifier_family/surface.ttl +2 -0
- package/data/global/pattern/description_list.ttl +2 -0
- package/data/global/pattern/field.ttl +2 -0
- package/data/global/pattern/form.ttl +2 -0
- package/data/global/pattern/form_login.ttl +2 -0
- package/data/global/pattern/info_table.ttl +2 -0
- package/data/global/pattern/modal.ttl +431 -4
- package/data/global/pattern/navigation.ttl +2 -0
- package/data/global/pattern/stepper.ttl +2 -0
- package/data/global/pattern/table_of_contents.ttl +85 -2
- package/data/global/pattern/timeline.ttl +48 -13
- package/data/global/subcomponent/accordion-item.ttl +157 -2
- package/data/global/subcomponent/breadcrumbs-item.ttl +69 -2
- package/data/global/subcomponent/card-content.ttl +53 -2
- package/data/global/subcomponent/card-footer.ttl +2 -0
- package/data/global/subcomponent/card-header.ttl +45 -2
- package/data/global/subcomponent/card-image.ttl +13 -2
- package/data/global/subcomponent/card-thumbnail.ttl +37 -2
- package/data/global/subcomponent/chart_legend.ttl +93 -2
- package/data/global/subcomponent/chart_legend_item.ttl +77 -2
- package/data/global/subcomponent/checkbox_input.ttl +165 -2
- package/data/global/subcomponent/color_input.ttl +2 -0
- package/data/global/subcomponent/combobox_input.ttl +398 -3
- package/data/global/subcomponent/date_input.ttl +85 -2
- package/data/global/subcomponent/date_time_input.ttl +85 -2
- package/data/global/subcomponent/field-description.ttl +13 -2
- package/data/global/subcomponent/field-error.ttl +29 -0
- package/data/global/subcomponent/field-label.ttl +37 -2
- package/data/global/subcomponent/file_upload_input.ttl +158 -3
- package/data/global/subcomponent/hidden_input.ttl +3 -1
- package/data/global/subcomponent/kvp_container.ttl +77 -2
- package/data/global/subcomponent/kvpitem_base.ttl +69 -2
- package/data/global/subcomponent/markdown_input.ttl +2 -0
- package/data/global/subcomponent/modal-content.ttl +38 -2
- package/data/global/subcomponent/modal-footer.ttl +262 -2
- package/data/global/subcomponent/modal-header.ttl +294 -2
- package/data/global/subcomponent/month_input.ttl +2 -0
- package/data/global/subcomponent/number_input.ttl +2 -0
- package/data/global/subcomponent/password_input.ttl +117 -2
- package/data/global/subcomponent/phone_input.ttl +101 -2
- package/data/global/subcomponent/radio_input.ttl +94 -3
- package/data/global/subcomponent/range_input.ttl +85 -2
- package/data/global/subcomponent/rating_input.ttl +2 -0
- package/data/global/subcomponent/rich_text_input.ttl +2 -0
- package/data/global/subcomponent/search_input.ttl +5 -3
- package/data/global/subcomponent/segmented_control_input.ttl +2 -0
- package/data/global/subcomponent/select_input.ttl +86 -3
- package/data/global/subcomponent/spin_button.ttl +2 -0
- package/data/global/subcomponent/spinner.ttl +3 -1
- package/data/global/subcomponent/switch_input.ttl +86 -3
- package/data/global/subcomponent/table-cell.ttl +2 -0
- package/data/global/subcomponent/table-row.ttl +2 -0
- package/data/global/subcomponent/text_input.ttl +101 -2
- package/data/global/subcomponent/textarea_input.ttl +85 -2
- package/data/global/subcomponent/tile-content.ttl +45 -2
- package/data/global/subcomponent/tile-header.ttl +45 -2
- package/data/global/subcomponent/time_input.ttl +85 -2
- package/data/global/subcomponent/timeline-content.ttl +37 -2
- package/data/global/subcomponent/timeline-event.ttl +42 -7
- package/data/global/subcomponent/timeline-expansion_indicator.ttl +3 -1
- package/data/global/subcomponent/timeline-header.ttl +3 -1
- package/data/global/variant/tooltip_dense.ttl +2 -0
- package/data/global/view/settings_view.ttl +2 -0
- package/data/global.ttl +2 -0
- package/data/sites/component/blog_card.ttl +2 -0
- package/data/sites/component/quote.ttl +2 -0
- package/data/sites/component/rule.ttl +2 -0
- package/data/sites/component/section.ttl +2 -0
- package/data/sites/group/blog_cards.ttl +2 -0
- package/data/sites/group/xblog_elements.ttl +2 -0
- package/data/sites/layout/blog_page_layout.ttl +2 -0
- package/data/sites/layout/case_study_layout.ttl +2 -0
- package/data/sites/layout/site_layout.ttl +2 -0
- package/data/sites/pattern/hero-github.ttl +2 -0
- package/data/sites/pattern/hero.ttl +2 -0
- package/data/sites/pattern/info_table.ttl +2 -0
- package/data/sites/pattern/pricing_section.ttl +2 -0
- package/data/sites/pattern/pricing_table.ttl +2 -0
- package/data/sites/pattern/read_more_section.ttl +2 -0
- package/data/sites/pattern/skip_link.ttl +2 -0
- package/data/sites.ttl +2 -0
- package/data/sites_webcomponentsprototype/component/blog_cards.ttl +2 -0
- package/data/sites_webcomponentsprototype/component/ctablock.ttl +2 -0
- package/data/sites_webcomponentsprototype/component/list.ttl +2 -0
- package/data/sites_webcomponentsprototype/component/tabs.ttl +2 -0
- package/data/sites_webcomponentsprototype/layout/site_layout.ttl +2 -0
- package/data/sites_webcomponentsprototype/pattern/basic_section.ttl +2 -0
- package/data/sites_webcomponentsprototype/pattern/blog_section.ttl +2 -0
- package/data/sites_webcomponentsprototype/pattern/ctasection.ttl +2 -0
- package/data/sites_webcomponentsprototype/pattern/equal_heights.ttl +2 -0
- package/data/sites_webcomponentsprototype/pattern/hero.ttl +2 -0
- package/data/sites_webcomponentsprototype/pattern/logo_section.ttl +2 -0
- package/data/sites_webcomponentsprototype/pattern/quote_wrapper.ttl +2 -0
- package/data/sites_webcomponentsprototype/pattern/tiered_list.ttl +2 -0
- package/data/sites_webcomponentsprototype.ttl +2 -0
- package/data/stores.ttl +2 -0
- package/data/tag/allgood.ttl +2 -0
- package/data/tag/beta.ttl +2 -0
- package/data/tag/candidate.ttl +2 -0
- package/data/tag/devbatch1.ttl +2 -0
- package/data/tag/devbatch2.ttl +2 -0
- package/data/tag/devbatch3.ttl +9 -0
- package/data/tag/devexternal.ttl +2 -0
- package/data/tag/devreactapproved.ttl +2 -0
- package/data/tag/devreactbase.ttl +2 -0
- package/data/tag/devreactpreapproved.ttl +2 -0
- package/data/tag/devspecial.ttl +2 -0
- package/data/tag/devsveltedone.ttl +2 -0
- package/data/tag/devsveltein-progress.ttl +2 -0
- package/data/tag/divergent.ttl +2 -0
- package/data/tag/docscomplete.ttl +2 -0
- package/data/tag/draft.ttl +2 -0
- package/data/tag/edge.ttl +2 -0
- package/data/tag/global-docs-missing.ttl +2 -0
- package/data/tag/has-no-global-entry.ttl +2 -0
- package/data/tag/lpto-be-upstreamed.ttl +2 -0
- package/data/tag/lptriageblocked-reqs-design.ttl +2 -0
- package/data/tag/lptriageno-upstream.ttl +2 -0
- package/data/tag/lptriagereimplement-and-deprecate.ttl +2 -0
- package/data/tag/lptriagereimplement-and-keep.ttl +2 -0
- package/data/tag/lptriageupstream-and-deprecate.ttl +2 -0
- package/data/tag/minimal.ttl +2 -0
- package/data/tag/needsdefinition.ttl +2 -0
- package/data/tag/needsdiscussion.ttl +2 -0
- package/data/tag/needsdocumentation.ttl +2 -0
- package/data/tag/needsreview.ttl +2 -0
- package/data/tag/needstriage.ttl +2 -0
- package/data/tag/needsupdate.ttl +2 -0
- package/data/tag/notstarted.ttl +2 -0
- package/data/tag/specialadoption-docs.ttl +2 -0
- package/data/tag/stable.ttl +2 -0
- package/data/tag/stylesready.ttl +2 -0
- package/data/tag/triagedbacklog.ttl +2 -0
- package/data/tag/triagedrejected.ttl +2 -0
- package/data/tag/upstream-candidate.ttl +2 -0
- package/data/tag/upstream-compliant.ttl +2 -0
- package/data/tag/upstreamcandidate.ttl +2 -0
- package/data/tag/waiting-for-delta-review.ttl +2 -0
- package/data/tag/wpeinital-implementation.ttl +2 -0
- package/data/tag/wpetriageupstream-and-deprecate.ttl +2 -0
- package/data/tagcategory/channel.ttl +2 -0
- package/data/tagcategory/concept-status.ttl +2 -0
- package/data/tagcategory/concept-type.ttl +2 -0
- package/data/tagcategory/documentation-stage.ttl +2 -0
- package/data/tagcategory/implementation-status.ttl +2 -0
- package/data/tagcategory/lpupstream.ttl +2 -0
- package/data/tagcategory/review-status.ttl +2 -0
- package/data/tagcategory/tmp.ttl +2 -0
- package/definitions/ontology.ttl +78 -1
- package/package.json +34 -8
- package/skills/adoption-a1-styles/SKILL.md +24 -0
- package/skills/adoption-a2-components/SKILL.md +22 -6
- package/skills/anatomy-author/ANATOMY_DSL_SPEC.md +1397 -327
- package/skills/anatomy-author/SKILL.md +840 -137
- package/skills/design-auditor/SKILL.md +133 -9
- package/skills/implement-component/SKILL.md +192 -23
- package/skills/specify-component/SKILL.md +124 -12
- package/skills/specify-pattern/SKILL.md +47 -8
- package/src/collect/generateTurtle.tests.ts +94 -1
- package/src/collect/generateTurtle.ts +65 -3
- package/src/collect/resolvePublicExports.tests.ts +159 -0
- package/src/collect/resolvePublicExports.ts +244 -0
- package/src/collect/types.ts +11 -0
- package/src/collect-implementations.ts +0 -0
- package/src/serializers/TTLSerializer.tests.ts +101 -0
- package/src/serializers/TTLSerializer.ts +17 -2
- package/.github/ISSUE_TEMPLATE/propose-changes-to-existing-ui-block.md +0 -14
- package/.github/ISSUE_TEMPLATE/propose-new-ui-block.md +0 -26
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -22
- package/.github/workflows/ci.yml +0 -49
- package/.github/workflows/sync-coda-manual.yml +0 -25
- package/.github/workflows/sync-coda-scheduled.yml +0 -22
- package/.github/workflows/sync-coda.yml +0 -102
- package/.mcp.json +0 -12
- package/GEMINI.md +0 -2
- package/biome.json +0 -6
- package/bun.lock +0 -392
- package/data/apps_landscape/component/truncated_cell.ttl +0 -38
- package/data/concept/Foundations-Grid.ttl +0 -9
- package/data/concept/Indicating-required-fields-in-forms.ttl +0 -9
- package/data/concepttype/Decision-guide.ttl +0 -5
- package/data/concepttype/Mental-model.ttl +0 -5
- package/examples/form-roster.target.json +0 -550
- package/source.json +0 -205
- package/specs/README.md +0 -17
- package/src/cli.ts +0 -58
- package/src/commands/extract.tests.ts +0 -40
- package/src/commands/extract.ts +0 -50
- package/src/commands/index.ts +0 -4
- package/src/commands/list.tests.ts +0 -25
- package/src/commands/list.ts +0 -26
- package/src/commands/sync.tests.ts +0 -430
- package/src/commands/sync.ts +0 -418
- package/src/commands/transform.tests.ts +0 -213
- package/src/commands/transform.ts +0 -257
- package/src/config/index.ts +0 -2
- package/src/config/source.schema.json +0 -146
- package/src/config/types.ts +0 -129
- package/src/config/validateConfig.tests.ts +0 -46
- package/src/config/validateConfig.ts +0 -21
- package/src/constants.ts +0 -19
- package/src/providers/CodaProvider.tests.ts +0 -335
- package/src/providers/CodaProvider.ts +0 -384
- package/src/providers/CodaProvider.types.generated.ts +0 -12597
- package/src/providers/detectSmartChips.tests.ts +0 -42
- package/src/providers/detectSmartChips.ts +0 -60
- package/src/providers/index.ts +0 -18
- package/src/scripts/checkDataDeletion.ts +0 -68
- package/src/scripts/evaluateDataDeletion.tests.ts +0 -100
- package/src/scripts/evaluateDataDeletion.ts +0 -100
- package/src/sync/constants.ts +0 -52
- package/src/sync/diffRoster.tests.ts +0 -455
- package/src/sync/diffRoster.ts +0 -241
- package/src/sync/loadTargetSpec.tests.ts +0 -208
- package/src/sync/loadTargetSpec.ts +0 -139
- package/src/sync/renderPlan.tests.ts +0 -144
- package/src/sync/renderPlan.ts +0 -88
- package/src/sync/snapshotTable.tests.ts +0 -31
- package/src/sync/snapshotTable.ts +0 -20
- package/src/sync/toLiveEntries.tests.ts +0 -76
- package/src/sync/toLiveEntries.ts +0 -55
- package/src/sync/types.ts +0 -101
- package/src/transform/collectDataMetrics.tests.ts +0 -108
- package/src/transform/collectDataMetrics.ts +0 -114
- package/src/transform/deltaGuards.tests.ts +0 -136
- package/src/transform/deltaGuards.ts +0 -118
- package/src/transform/expectedTables.tests.ts +0 -99
- package/src/transform/expectedTables.ts +0 -34
- package/src/transform/isValidReferenceUri.tests.ts +0 -45
- package/src/transform/isValidReferenceUri.ts +0 -55
- package/src/transform/materializeInverses.tests.ts +0 -81
- package/src/transform/materializeInverses.ts +0 -78
- package/src/transform/resolveReferences.tests.ts +0 -67
- package/src/transform/resolveReferences.ts +0 -36
- package/src/transform/resolveValue.tests.ts +0 -82
- package/src/transform/resolveValue.ts +0 -87
- package/src/transform/rowFilter.tests.ts +0 -100
- package/src/transform/rowFilter.ts +0 -55
- package/src/transform/transform.tests.ts +0 -132
- package/src/transform/transform.ts +0 -145
- package/src/transform/transformRow.malformedRefs.tests.ts +0 -127
- package/src/transform/transformRow.tests.ts +0 -466
- package/src/transform/transformRow.ts +0 -358
- package/src/transform/types.ts +0 -37
- package/tsconfig.json +0 -9
- package/vite.config.ts +0 -11
- package/vitest.config.ts +0 -50
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
4
|
+
|
|
5
|
+
ds:apps_landscape.pattern.typed_confirmation_modal a ds:Pattern;
|
|
6
|
+
ds:name "Typed Confirmation Modal";
|
|
7
|
+
ds:summary "A Landscape wrapper around Canonical's `ConfirmationModal` that adds friction to high-consequence actions. Callers supply a confirmation phrase; the modal is disabled until entered text matches after case-insensitive comparison. The confirm action dispatches an async callback and clears the input only after resolution.\n\nMain use cases:\n\n- Protect irreversible destructive operations (permanent deletion, broad config changes) with required phrase typing. \n- Verify user intent by requiring them to type a resource name or explicit phrase before proceeding.";
|
|
8
|
+
ds:anatomyDsl "node:\n uri: ds:apps_landscape.pattern.typed_confirmation_modal\n role: typed safeguard for consequential action\n edges:\n - node:\n uri: global.component.confirmation_modal\n edges:\n - node:\n semantic: form\n role: confirmation form\n edges:\n - node:\n role: consequence content\n relation:\n cardinality: \"1\"\n slotName: children\n - node:\n role: phrase instruction\n relation:\n cardinality: \"1\"\n - node:\n uri: global.component.input\n role: confirmation text\n relation:\n cardinality: \"1\"\n relation:\n cardinality: \"1\"\n - node:\n role: modal-owned action row\n edges:\n - node:\n uri: global.component.action_button\n role: confirm\n relation:\n cardinality: \"1\"\n relation:\n cardinality: \"1\"\n relation:\n cardinality: \"0..1\"\n condition: isOpen is true";
|
|
9
|
+
ds:anatomyClassic "https://www.figma.com/design/I4WpvwMuQI6v1qhgUl63Sx/Landscape-Pragma-components?node-id=26-14&t=iG2ObZ6Q1XG2A2MB-4\n\nTable 71\n\n";
|
|
10
|
+
ds:usage "### When to use\n\n**High-consequence action**\n\nUse as deliberate friction before irreversible deletion or broad destructive changes.\n\n**Specific target verification**\n\nUse when typing a resource name or explicit phrase helps users verify the target and intent.\n\n### When not to use\n\n**Routine confirmation dialogs**\n\nActions that are reversible or low-risk.\n\n**Incorrect pattern**: Requiring users to type a phrase before saving a form or making a non-destructive change.\n\n**Remediation strategy**: Use a simple `ConfirmationModal` with a single tap/click confirmation, or no confirmation at all for changes that can be undone (drafts, save operations).\n\n**Identity verification or authentication**\n\nConfirming user identity as part of authorization.\n\n**Incorrect pattern**: Using phrase matching as a substitute for password verification or identity confirmation before high-security operations.\n\n**Remediation strategy**: Implement proper authentication flows with passwords, MFA, or OAuth. This component is deliberate friction only—it does not provide security or authorization.\n\n**Error-prone confirmation phrases**\n\nPhrases that are long, ambiguous, locale-specific, or hard to read.\n\n**Incorrect pattern**: Using hidden identifiers (IDs, hashes), translated phrases without review, or unclear resource names as the confirmation text. The current input has no visible label.\n\n**Remediation strategy**: Use short, unambiguous confirmation phrases (e.g., resource names from the UI). Add an accessible label to the input field before adopting in new surfaces. Keep phrases in a single language and verify them with users.";
|
|
11
|
+
ds:guidelines "### Accessibility\n\n- Current source does not give the text Input a label or programmatic accessible name. Placeholder and preceding prose do not establish one. This is an existing accessibility gap, not a completed guideline.\n- Dialog semantics, initial focus, focus trap, Escape, action keyboard behavior, and focus restoration are delegated to Canonical `ConfirmationModal` and are not asserted by local tests.\n- The instruction explains why confirmation is unavailable, but no inline mismatch error or status announcement is rendered.\n- Consumer mutation errors must be surfaced accessibly while the modal remains usable. The wrapper has no error prop or live region.\n\n### Content and safety\n\n- Put target and consequence in `children`; the fixed instruction only communicates the phrase.\n- Phrase instruction text is hardcoded English. `confirmationText`, inherited modal labels/title, and children are caller supplied, but “Type” and “to confirm.” cannot be replaced.\n- Lowercasing uses JavaScript default Unicode casing rather than locale-aware comparison. Products must review behavior for translated phrases.\n- Keep authorization, server validation, and idempotency independent from this client-side safeguard.\n\n### State and async behavior\n\n- `inputText` is the only local state. Change events update it immediately.\n- Confirm can be triggered by the modal action or Form submit. Both paths call `handleSubmit`; the function rechecks validity.\n- A resolved confirmation clears text but does not call `close`. Consumers commonly close in their own mutation handler.\n- A rejected confirmation propagates out of `handleSubmit`; no local `try/catch`, notification, error UI, or reset occurs.\n- Calling the wrapper-provided close path clears text. Directly toggling `isOpen` false and true without that callback preserves text because the component instance/state remains mounted in the parent tree.\n- External loading disables Confirm but does not prevent text edits or locally guard repeated direct calls beyond ConfirmationModal’s button behavior.\n\n### Keyboard and device\n\n- Form submission invokes `handleSubmit`; invalid text causes no action. Local tests click Confirm but do not cover Enter.\n- Source adds no keyboard handlers or focus movement. Tab order and modal keyboard interaction are dependency-owned.\n- Instruction text has no nowrap/truncation style, so it can wrap naturally. The only local style makes the phrase bold and uses `cursor: default`.\n- There are no local breakpoints, maximum phrase length, mobile-keyboard handling, or action-visibility rules. Modal layout is dependency-owned and untested here.";
|
|
12
|
+
ds:tier ds:apps_landscape;
|
|
13
|
+
ds:documentationStage ds:tag.specialadoption-docs;
|
|
14
|
+
ds:hasProperty [
|
|
15
|
+
a ds:Property;
|
|
16
|
+
ds:name "`confirmationText`";
|
|
17
|
+
ds:summary "Supplies the displayed phrase, input placeholder, and comparison target. ";
|
|
18
|
+
ds:propertyType "text";
|
|
19
|
+
ds:defaultValue "—";
|
|
20
|
+
ds:constraints "TypeScript: `string`. Compared as `inputText.toLowerCase() === confirmationText.toLowerCase()` with no trim or locale argument. An empty string makes untouched input valid. "
|
|
21
|
+
], [
|
|
22
|
+
a ds:Property;
|
|
23
|
+
ds:name "`isOpen`";
|
|
24
|
+
ds:summary "Controls whether the complete modal is rendered.";
|
|
25
|
+
ds:propertyType "boolean";
|
|
26
|
+
ds:defaultValue "—";
|
|
27
|
+
ds:constraints "TypeScript: `boolean`. False returns `null` but does not itself clear local text. "
|
|
28
|
+
], [
|
|
29
|
+
a ds:Property;
|
|
30
|
+
ds:name "`close`";
|
|
31
|
+
ds:summary "Handles consumer-owned modal closure.";
|
|
32
|
+
ds:propertyType "callback";
|
|
33
|
+
ds:defaultValue "—";
|
|
34
|
+
ds:constraints "TypeScript: `() => void`. The wrapper's modal-close path invokes it before clearing text. Consumer must update `isOpen`. "
|
|
35
|
+
], [
|
|
36
|
+
a ds:Property;
|
|
37
|
+
ds:name "`onConfirm`";
|
|
38
|
+
ds:summary "Runs the protected asynchronous action.";
|
|
39
|
+
ds:propertyType "callback";
|
|
40
|
+
ds:defaultValue "—";
|
|
41
|
+
ds:constraints "TypeScript: `() => Promise<void>`. Called only when text is valid. Rejection is not caught; text clears only after resolution. The component does not close automatically. "
|
|
42
|
+
], [
|
|
43
|
+
a ds:Property;
|
|
44
|
+
ds:name "`confirmButtonDisabled`";
|
|
45
|
+
ds:summary "Supplies an external disabled condition.";
|
|
46
|
+
ds:propertyType "boolean";
|
|
47
|
+
ds:defaultValue "—";
|
|
48
|
+
ds:constraints "TypeScript: inherited Canonical `ConfirmationModal` `confirmButtonDisabled`. Combined with invalid text and loading. ";
|
|
49
|
+
ds:optional "true"
|
|
50
|
+
], [
|
|
51
|
+
a ds:Property;
|
|
52
|
+
ds:name "`confirmButtonLoading`";
|
|
53
|
+
ds:summary "Controls forwarded loading presentation and contributes to disabled state. ";
|
|
54
|
+
ds:propertyType "boolean";
|
|
55
|
+
ds:defaultValue "—";
|
|
56
|
+
ds:constraints "TypeScript: inherited Canonical `ConfirmationModal` `confirmButtonLoading`. Parent owns transitions; text input and cancel remain enabled unless `ConfirmationModal` changes them. ";
|
|
57
|
+
ds:optional "true"
|
|
58
|
+
], [
|
|
59
|
+
a ds:Property;
|
|
60
|
+
ds:name "`children`";
|
|
61
|
+
ds:summary "Supplies required consequence content before the instruction. ";
|
|
62
|
+
ds:propertyType "node";
|
|
63
|
+
ds:defaultValue "—";
|
|
64
|
+
ds:constraints "TypeScript: `ReactNode`. Supply enough context to identify the target and impact. The wrapper renders it inside the confirmation Form. "
|
|
65
|
+
], [
|
|
66
|
+
a ds:Property;
|
|
67
|
+
ds:name "`confirmButtonLabel`";
|
|
68
|
+
ds:summary "Supplies required content for the modal-owned confirm action. ";
|
|
69
|
+
ds:propertyType "node";
|
|
70
|
+
ds:defaultValue "—";
|
|
71
|
+
ds:constraints "TypeScript: inherited `ReactNode`. Forwarded to `ConfirmationModal`; the action row remains outside the wrapper's Form. "
|
|
72
|
+
], [
|
|
73
|
+
a ds:Property;
|
|
74
|
+
ds:name "`confirmButtonProps`";
|
|
75
|
+
ds:summary "Nominally accepts inherited confirm-action overrides. ";
|
|
76
|
+
ds:propertyType "object";
|
|
77
|
+
ds:defaultValue "`{ type: \"submit\" }`";
|
|
78
|
+
ds:constraints "TypeScript: Canonical `Partial<ActionButtonProps>`. A consumer value enters `...props` and is then discarded because the wrapper replaces it with `{ type: \"submit\" }`; consumer `confirmButtonProps` do not survive the later assignment. ";
|
|
79
|
+
ds:optional "true"
|
|
80
|
+
], [
|
|
81
|
+
a ds:Property;
|
|
82
|
+
ds:name "`...props`";
|
|
83
|
+
ds:summary "Forwards title, labels, appearance, portal behavior, and other modal options. ";
|
|
84
|
+
ds:propertyType "object";
|
|
85
|
+
ds:defaultValue "Canonical defaults";
|
|
86
|
+
ds:constraints "TypeScript: `ComponentProps<typeof ConfirmationModal>`, including inherited supported props and `children`. The wrapper replaces `confirmButtonDisabled`, `confirmButtonProps`, `confirmButtonLoading`, `onConfirm`, and `close`. The explicitly documented inherited props above remain part of this public contract subject to those replacement rules. ";
|
|
87
|
+
ds:optional "true"
|
|
88
|
+
].
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
4
|
+
|
|
5
|
+
ds:apps_landscape.subcomponent.bold_substring a ds:Subcomponent;
|
|
6
|
+
ds:name "Bold Substring";
|
|
7
|
+
ds:summary "Renders a plain string and wraps its first case-insensitive substring match in a semantic `strong` element. Matching is computed from lowercased copies, while all rendered text preserves the casing and character sequence supplied in `text`.";
|
|
8
|
+
ds:anatomyDsl "node:\n uri: ds:apps_landscape.subcomponent.bold_substring\n edges:\n - node:\n role: plain text result\n relation:\n cardinality: \"0..1\"\n condition: substring is empty or no case-insensitive match exists\n - node:\n role: matched text result\n edges:\n - node:\n role: leading text\n relation:\n cardinality: \"0..1\"\n condition: the first match starts after index zero\n - node:\n uri: global.element.strong\n role: first matching substring\n relation:\n cardinality: \"1\"\n - node:\n role: trailing text\n relation:\n cardinality: \"0..1\"\n condition: characters follow the first match\n relation:\n cardinality: \"0..1\"\n condition: substring is non-empty and found";
|
|
9
|
+
ds:anatomyClassic "https://www.figma.com/design/I4WpvwMuQI6v1qhgUl63Sx/Landscape-Pragma-components?node-id=17-7&t=JhmpJ2Kptl96X0Fe-4\n\nTable 13\n\n";
|
|
10
|
+
ds:usage "### When to use\n\n**Search suggestions**\n\nUse to emphasize the first query match in a plain-text suggestion or result label.\n\n**Compact result labels**\n\nUse when one occurrence is enough to show why a compact label matched a case-insensitive query.\n\n### When not to use\n\n**All-match highlighting**\n\nEvery occurrence in the text must be emphasized, not just the first.\n\n**Incorrect pattern**: Rendering every substring occurrence with `BoldSubstring`, but only the first match receives wrapping.\n\n**Remediation strategy**: Use a dedicated highlighting component that walks the string and wraps all occurrences, or implement custom logic to mark each match position before rendering.\n\n**Rich or untrusted markup**\n\nThe input must support React components, HTML entities, or runtime-generated content.\n\n**Incorrect pattern**: Passing JSX, HTML markup, or untrusted strings to `text` or `substring`, expecting them to render as rich content.\n\n**Remediation strategy**: Use a dedicated rich-text or markup renderer; `BoldSubstring` accepts only plain strings and renders them safely as text nodes.\n\n**Locale-aware search**\n\nThe search must respect locale-specific collation, combining marks, or Unicode normalization rules.\n\n**Incorrect pattern**: Relying on case-insensitive matching to work correctly for accented characters or non-ASCII scripts without normalization.\n\n**Remediation strategy**: Normalize both strings with `String.prototype.normalize()` before passing them, or use a dedicated i18n-aware search library.\n\n**Unicode case-fold position changes**\n\nExact match position must be preserved when a character’s lowercased form has a different UTF-16 length.\n\n**Incorrect pattern**: Passing strings where lowercasing changes code-unit count (e.g., some German or Greek characters) and expecting the highlighted slice to align perfectly with the original text.\n\n**Remediation strategy**: Pre-normalize or validate that substring positions remain stable after case folding, or use a locale-aware collation library designed for your target scripts.";
|
|
11
|
+
ds:guidelines "### Accessibility\n\n- The matched branch uses semantic `strong`; the component adds no label, live region, role, or hidden announcement.\n- Keep the complete phrase meaningful without visual weight because the emphasis does not communicate selection, status, or an action.\n- The unmatched branch returns a text node with no additional wrapper or semantics.\n\n### Content\n\n- Pass the exact display label as `text`; the component preserves that source string in both matched and unmatched branches.\n- Pass the literal query fragment to `substring`. Metacharacters have no special meaning because matching is not regular-expression based.\n- Only the first occurrence is highlighted, including when the same substring appears again later in the label.\n\n### Internationalization\n\n- Both strings are consumer-provided; the component contains no visible copy to translate.\n- Case matching depends on JavaScript lowercase conversion and does not provide locale selection, accent folding, or Unicode normalization.\n- Lowercase conversion can expand or otherwise change a Unicode sequence. Because the resulting index is reused against the original string, matching is not position-safe for every Unicode case mapping.\n\n### Keyboard and device\n\n- This subcomponent adds no focus target or keyboard interaction.\n- It applies no layout styles. Wrapping, truncation, and narrow-width behavior belong to the owning text container.";
|
|
12
|
+
ds:tier ds:apps_landscape;
|
|
13
|
+
ds:documentationStage ds:tag.specialadoption-docs;
|
|
14
|
+
ds:hasProperty [
|
|
15
|
+
a ds:Property;
|
|
16
|
+
ds:name "text";
|
|
17
|
+
ds:summary "Complete plain-text value to search and render.";
|
|
18
|
+
ds:propertyType "text";
|
|
19
|
+
ds:defaultValue "None";
|
|
20
|
+
ds:constraints "The rendered slices come from this value, so casing and spacing are preserved.";
|
|
21
|
+
ds:optional "false"
|
|
22
|
+
], [
|
|
23
|
+
a ds:Property;
|
|
24
|
+
ds:name "substring";
|
|
25
|
+
ds:summary "Query used to find the emphasized slice.";
|
|
26
|
+
ds:propertyType "text";
|
|
27
|
+
ds:defaultValue "None";
|
|
28
|
+
ds:constraints "Matching is case-insensitive; only the first occurrence is wrapped; an empty or unmatched value returns `text` directly.";
|
|
29
|
+
ds:optional "false"
|
|
30
|
+
].
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
4
|
+
|
|
5
|
+
ds:apps_landscape.subcomponent.inline_cell_input a ds:Subcomponent;
|
|
6
|
+
ds:name "Inline Cell Input";
|
|
7
|
+
ds:summary "Inline Cell Input wraps Canonical Input with a local string draft. It initializes that draft once from the required `value` prop, updates only local state while typing, and calls the required promise-returning `onChange` callback with the current draft whenever the input blurs.\n\nIt is used for compact table-cell editing where persistence belongs to the parent. Despite the callback name, `onChange` is a blur-commit callback rather than a native change event; the component does not await it, expose pending/success/failure state, or resynchronize the draft when the prop changes later.";
|
|
8
|
+
ds:anatomyDsl "node:\n uri: ds:apps_landscape.subcomponent.inline_cell_input\n edges:\n - node:\n uri: global.component.input\n role: inline editor\n attributes:\n type: text\n autocomplete: off\n relation:\n cardinality: \"1\"";
|
|
9
|
+
ds:anatomyClassic "https://www.figma.com/design/I4WpvwMuQI6v1qhgUl63Sx/Landscape-Pragma-components?node-id=25-60&t=iG2ObZ6Q1XG2A2MB-4\n\nTable 34\n\n";
|
|
10
|
+
ds:usage "### When to use\n\n**Compact table edits**\n\nUse for a short text value that can be edited directly within a data cell.\n\n**Commit on exit**\n\nUse when changes should be submitted after the user leaves the field rather than on every keystroke.\n\n**Parent-owned validation and persistence**\n\nUse when the owning table can provide inherited Input error/help/label props and handle the commit promise outside the component.\n\n### When not to use\n\n**Explicit review required**\n\nEdits need Save and Cancel actions or confirmation before persistence.\n\n**Incorrect pattern**: Using Inline Cell Input and expecting to capture user confirmation or provide a separate Save/Cancel button pair.\n\n**Remediation strategy**: Use a modal form or side-panel edit component with explicit Save and Cancel actions.\n\n**Complex or destructive values**\n\nThe field needs support for multiline, structured, security-sensitive, or destructive edits.\n\n**Incorrect pattern**: Attempting to edit multiline text, JSON objects, or security-sensitive values in a single-line cell input.\n\n**Remediation strategy**: Use a dedicated form component or modal for complex edits, or implement a specialized input that validates and confirms destructive operations.\n\n**Externally replaceable values**\n\nThe displayed value must immediately track later prop changes, server refreshes, row reuse, or reset actions.\n\n**Incorrect pattern**: Expecting the local draft to resynchronize when the `value` prop changes after the component has mounted.\n\n**Remediation strategy**: Remount the component with a stable key when external values change, or use a different controlled input contract that responds to prop updates.\n\n**Visible save lifecycle**\n\nUsers need to see saving, saved, conflict, retry, or failed states.\n\n**Incorrect pattern**: Using Inline Cell Input and expecting it to display loading spinners, success indicators, or error states during or after commit.\n\n**Remediation strategy**: Implement a separate status indicator or use a form component that renders mutation state, or add custom state management around the commit promise.";
|
|
11
|
+
ds:guidelines "### Accessibility\n\n- Provide an accessible label. Current table consumers pass a label plus `u-off-screen`; the wrapper does not infer a name from the table header.\n- Error, required, help, disabled, and described-by behavior are inherited from Canonical Input through forwarded props; no additional ARIA is added locally.\n- A rejected commit promise has no local error announcement or focus restoration. The parent must surface failure without silently losing the user’s context.\n\n### Content\n\n- Use for concise values that remain understandable without a separate form layout.\n- Make saved, saving, and failed states clear in the owning table when persistence is not immediate.\n- Localize labels, placeholders, help, and errors at the call site. The component has no source-owned visible strings.\n\n### Internationalization\n\n- The draft accepts arbitrary strings; any locale-specific parsing or normalization belongs to the parent commit handler.\n- Ensure translated hidden labels remain unique enough to identify the row/field context when table headers alone are insufficient.\n\n### Keyboard navigation\n\n- Tabbing away commits the value; do not intercept Tab or strand focus in the cell.\n- Pointer-induced blur also commits. Pressing Enter has no local save behavior, and Escape does not revert the draft.\n- The component adds no keyboard handler, pending lock, or focus movement.\n\n### Device and layout\n\n- Width, density, wrapping, and touch target come from Canonical Input plus forwarded classes; there is no local stylesheet.\n- Keep a usable width in horizontally constrained tables and do not rely on hover to communicate editability or commit state.";
|
|
12
|
+
ds:tier ds:apps_landscape;
|
|
13
|
+
ds:documentationStage ds:tag.specialadoption-docs;
|
|
14
|
+
ds:hasProperty [
|
|
15
|
+
a ds:Property;
|
|
16
|
+
ds:name "`InlineCellInput.value`";
|
|
17
|
+
ds:summary "Initial value used by `useState`.";
|
|
18
|
+
ds:propertyType "text";
|
|
19
|
+
ds:defaultValue "—";
|
|
20
|
+
ds:constraints "Read on initial mount only; later prop changes do not replace the draft. Local `value` is always passed to Input. "
|
|
21
|
+
], [
|
|
22
|
+
a ds:Property;
|
|
23
|
+
ds:name "`InlineCellInput.onChange`";
|
|
24
|
+
ds:summary "Commit callback invoked on blur with the current draft. ";
|
|
25
|
+
ds:propertyType "callback";
|
|
26
|
+
ds:defaultValue "—";
|
|
27
|
+
ds:constraints "TypeScript: `(value: string) => Promise<void> | Promise<FormikErrors<unknown>>`. The component does not await, catch, inspect Formik errors, or suppress unchanged commits. "
|
|
28
|
+
], [
|
|
29
|
+
a ds:Property;
|
|
30
|
+
ds:name "`InlineCellInput` remaining Input props";
|
|
31
|
+
ds:summary "Forwarded to Canonical Input. Common consumers pass `label`, `labelClassName`, `className`, `wrapperClassName`, `placeholder`, Formik `name`, and `error`. ";
|
|
32
|
+
ds:propertyType "object";
|
|
33
|
+
ds:defaultValue "Canonical Input defaults; local initial `type`/autocomplete values as above ";
|
|
34
|
+
ds:constraints "TypeScript: `Omit<InputProps, \"onBlur\" | \"onChange\">`. Consumers may supply any supported subset. Spread occurs after local `type=\"text\"` and `autoComplete=\"off\"`, so inherited props can override those initial values. ";
|
|
35
|
+
ds:optional "true"
|
|
36
|
+
].
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
4
|
+
|
|
5
|
+
ds:apps_landscape.subcomponent.label_with_description a ds:Subcomponent;
|
|
6
|
+
ds:name "Label With Description";
|
|
7
|
+
ds:summary "Label with Description is a small presentational subcomponent for rich option or summary labels. It renders a primary paragraph, followed by muted supporting content in `<small>`, with an optional fixed-text `learn more` link that opens a new tab.\n\nThe link stops click propagation so it can be activated inside an otherwise clickable option without selecting or triggering the surrounding control. Despite its name, the component does not render a semantic `<label>` or programmatically associate itself with a form field.";
|
|
8
|
+
ds:anatomyDsl "node:\n uri: ds:apps_landscape.subcomponent.label_with_description\n edges:\n - node:\n semantic: paragraph\n role: primary option or item text\n relation:\n cardinality: \"1\"\n slotName: label\n - node:\n semantic: small\n role: supporting content\n edges:\n - node:\n role: explanatory description\n relation:\n cardinality: \"0..1\"\n slotName: description\n - node:\n semantic: link\n role: external supporting resource\n relation:\n cardinality: \"0..1\"\n relation:\n cardinality: \"1\"";
|
|
9
|
+
ds:anatomyClassic "https://www.figma.com/design/I4WpvwMuQI6v1qhgUl63Sx/Landscape-Pragma-components?node-id=25-62&t=iG2ObZ6Q1XG2A2MB-4\n\nTable 36\n\n";
|
|
10
|
+
ds:usage "### When to use\n\n**Clarify a compact choice**\n\nPair a short option name with supporting detail inside rich custom-select options or comparable choice summaries.\n\n**Link optional background**\n\nOffer deeper supporting documentation without making that material necessary to complete the primary interaction.\n\n### When not to use\n\n**Label a form control**\n\nLabeling an input field that needs semantic form control association.\n\n**Incorrect pattern**: Using Label with Description as the main label for a text input, checkbox, or select by relying on its visual presentation without form semantics.\n\n**Remediation strategy**: Use the form component’s native `label` prop and semantic `<label htmlFor>` element; Label with Description is for option or summary content, not form field labeling.\n\n**Present essential instructions**\n\nPlacing critical task information only in optional supporting documentation.\n\n**Incorrect pattern**: Putting required step instructions solely behind a “Learn more” link, expecting users to open it to understand what to do.\n\n**Remediation strategy**: Keep essential task information visible in the main interface; use the component’s description and link only for optional background material.\n\n**Standalone navigation**\n\nUsing the component as a general content or navigation link outside a rich option context.\n\n**Incorrect pattern**: Rendering Label with Description as the entire content of a navigation list item or standalone link.\n\n**Remediation strategy**: Use a plain link or navigation component; Label with Description’s click-propagation stopping and specialized wording are designed for embedded explanatory content inside clickable options.";
|
|
11
|
+
ds:guidelines "### Accessibility\n\n- Do not assume this visual label programmatically labels a form control.\n- The fixed link name `learn more` is generic. Ensure surrounding description provides sufficient accessible context and avoid multiple indistinguishable links in one region.\n- New-tab behavior is not announced by component text. The surrounding experience should follow the product convention for communicating external/new-window destinations.\n- Do not pass interactive descendants in `label` or `description`; nested controls create confusing focus and activation behavior inside clickable options.\n\n### Content\n\n- Make the label independently meaningful and use the description for qualification.\n- Link only to directly relevant background material.\n- Put task-essential information in the description, not only at the linked destination.\n- The component inserts no punctuation or separator between description and link; author description text so the padded link reads naturally.\n\n### Responsive behavior\n\n- Supporting text explicitly allows normal whitespace wrapping. The source defines no breakpoint, truncation, or maximum width.\n- The primary paragraph also follows normal document wrapping. Consumers must ensure the containing option or summary allows sufficient height.\n- The link has left padding; verify it does not appear detached when a translated description wraps.\n\n### Keyboard\n\n- The Learn more link must remain independently focusable inside any surrounding clickable item.\n- Activating the link must not trigger the surrounding control.\n- The component adds no keyboard handlers; native anchor Enter activation is retained. Click propagation is stopped for pointer and synthesized click events.\n\n### Internationalization\n\n- Externalize `label` and `description` at the owning feature.\n- The visible `learn more` text is hardcoded lowercase English in source and cannot be localized through props.\n- Do not depend on English word order between description and link. A localizable upstream contract would need link text or a complete supporting-content slot.";
|
|
12
|
+
ds:tier ds:apps_landscape;
|
|
13
|
+
ds:documentationStage ds:tag.specialadoption-docs;
|
|
14
|
+
ds:hasProperty [
|
|
15
|
+
a ds:Property;
|
|
16
|
+
ds:name "`LabelWithDescription.className`";
|
|
17
|
+
ds:summary "Additional class on the primary paragraph only.";
|
|
18
|
+
ds:propertyType "text";
|
|
19
|
+
ds:defaultValue "—";
|
|
20
|
+
ds:constraints "Does not style the description container or link. Preserve the relationship and visibility of both text levels. ";
|
|
21
|
+
ds:optional "true"
|
|
22
|
+
], [
|
|
23
|
+
a ds:Property;
|
|
24
|
+
ds:name "`LabelWithDescription.description`";
|
|
25
|
+
ds:summary "Supporting content rendered inside `<small>`. ";
|
|
26
|
+
ds:propertyType "node";
|
|
27
|
+
ds:defaultValue "—";
|
|
28
|
+
ds:constraints "TypeScript: `ReactNode`. Use phrasing and inline content valid within `<small>`; block descendants can create unsuitable markup. ";
|
|
29
|
+
ds:optional "true"
|
|
30
|
+
], [
|
|
31
|
+
a ds:Property;
|
|
32
|
+
ds:name "`LabelWithDescription.label`";
|
|
33
|
+
ds:summary "Primary content rendered inside a paragraph.";
|
|
34
|
+
ds:propertyType "node";
|
|
35
|
+
ds:defaultValue "—";
|
|
36
|
+
ds:constraints "TypeScript: `ReactNode`. Use concise inline content valid within `<p>`. This does not label a form control. ";
|
|
37
|
+
ds:optional "true"
|
|
38
|
+
], [
|
|
39
|
+
a ds:Property;
|
|
40
|
+
ds:name "LabelWithDescription.link";
|
|
41
|
+
ds:summary "Destination for the conditional `learn more` anchor. ";
|
|
42
|
+
ds:propertyType "url";
|
|
43
|
+
ds:defaultValue "—";
|
|
44
|
+
ds:constraints "Opens with `target=\"_blank\"` and `rel=\"noopener noreferrer\"`; clicking stops propagation but keyboard activation remains native link behavior. ";
|
|
45
|
+
ds:optional "true"
|
|
46
|
+
].
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
4
|
+
|
|
5
|
+
ds:apps_landscape.subcomponent.nested_dropdown_item a ds:Subcomponent;
|
|
6
|
+
ds:name "Nested Dropdown Item";
|
|
7
|
+
ds:summary "Renders a native button that toggles an adjacent nested panel to the left or right of a contextual-menu item. Valid non-fragment element content is cloned with `inline: true`; outside interaction closes only the nested panel, while any click that bubbles through the open panel optionally asks the owning menu to close.";
|
|
8
|
+
ds:anatomyDsl "node:\n uri: ds:apps_landscape.subcomponent.nested_dropdown_item\n edges:\n - node:\n uri: global.component.button\n role: directional trigger\n edges:\n - node:\n role: label\n relation:\n cardinality: \"0..1\"\n condition: label or el.props.label resolves to content\n slotName: label\n - node:\n uri: global.component.icon\n role: directional chevron\n relation:\n cardinality: \"1\"\n relation:\n cardinality: \"1\"\n - node:\n role: nested panel\n edges:\n - node:\n role: inline filter or action content\n relation:\n cardinality: \"1\"\n slotName: el\n relation:\n cardinality: \"0..1\"\n condition: trigger is open";
|
|
9
|
+
ds:anatomyClassic "https://www.figma.com/design/I4WpvwMuQI6v1qhgUl63Sx/Landscape-Pragma-components?node-id=25-77&t=iG2ObZ6Q1XG2A2MB-4\n\nTable 40\n\n";
|
|
10
|
+
ds:usage "### When to use\n\n**Nested menu filters**\n\nUse inside a contextual menu when a compact filter can render correctly after receiving `inline: true` and benefits from an adjacent panel.\n\n**Grouped secondary actions**\n\nUse for a small set of secondary controls when any click in the panel may close the owning menu through `onMenuClose`.\n\n### When not to use\n\n**Standalone disclosure**\n\nUsing nested menus outside a contextual-menu surface.\n\n**Incorrect pattern**: Placing Nested Dropdown Item in a dialog or regular content area, expecting it to behave as a standalone disclosure or accordion.\n\n**Remediation strategy**: Use a dedicated disclosure, accordion, or popover component; Nested Dropdown Item is designed specifically for contextual-menu integration.\n\n**Deep navigation**\n\nCreating multiple nested menu levels or site navigation with progressive disclosure.\n\n**Incorrect pattern**: Nesting Nested Dropdown Items within each other or using them to build multi-level site navigation hierarchies.\n\n**Remediation strategy**: Avoid deep nesting; site navigation should use breadcrumbs or a navigation tree. If nesting is unavoidable, limit depth to one or two levels and verify focus management.\n\n**Complex workflows**\n\nPlacing long forms or multi-step tasks in the nested panel.\n\n**Incorrect pattern**: Rendering a multi-field form, stepper, or extended task inside the adjacent panel, expecting it to remain open for extended user interaction.\n\n**Remediation strategy**: Use a side panel or modal for complex workflows; the nested panel is lightweight and the owning menu may close unexpectedly from outside clicks.\n\n**Interactive panel regions that must stay open**\n\nRequiring intermediate user actions inside the panel without closing the parent menu.\n\n**Incorrect pattern**: Passing `onMenuClose` and expecting it to fire only on “select” or “submit” clicks, not every click bubbling through the panel.\n\n**Remediation strategy**: If clicks must not close the owning menu, omit `onMenuClose` or build a custom handler that checks the click target; the current implementation calls the callback for all bubbling clicks.";
|
|
11
|
+
ds:guidelines "### Accessibility\n\n- The trigger is a native `type=\"button\"` and forwards disabled semantics through Canonical `Button`.\n- Provide meaningful `label` content or a content element with a meaningful `label` prop. The implementation permits an otherwise icon-only chevron button with no explicit accessible name.\n- The trigger does not set `aria-expanded`, `aria-haspopup`, `aria-controls`, menu roles, or roving-tabindex behavior. Open state is represented visually and by conditional panel mounting only.\n- Icons have no local hidden-text treatment; they must remain supplementary to the trigger label.\n\n### Interaction\n\n- Each trigger activation toggles local `isOpen`; there is no controlled open prop or imperative close API.\n- `useOnClickOutside` closes the nested panel when interaction occurs outside the root and does not notify `onMenuClose`.\n- Any click bubbling through the panel calls `onMenuClose` when supplied. The nested panel itself remains mounted until the owning tree unmounts it or a later outside/trigger interaction closes it.\n- The open trigger receives the active theme background in normal and hover states.\n\n### Content and layout\n\n- Keep labels concise; the trigger has a `12rem` minimum width, full width, left-aligned content, and no local wrapping or truncation rule.\n- Choose `left` when space is available to the trigger’s right and `right` when space is available to its left. The names describe alignment classes, not the side on which the panel appears.\n- The panel is top-aligned and depends on the contextual-menu dropdown class for its remaining presentation. There is no collision detection or viewport auto-adjustment.\n- Visible content is caller-provided; this component contains no translatable text.\n\n### Keyboard\n\n- Enter and Space activation come from the native button. Nested controls retain their own keyboard behavior.\n- The component adds no Arrow key navigation, Escape handler, focus transfer into the panel, or focus return on close.\n- `onMenuClose` is wired through a click event only; keyboard interactions that do not synthesize a click will not notify it.";
|
|
12
|
+
ds:tier ds:apps_landscape;
|
|
13
|
+
ds:documentationStage ds:tag.specialadoption-docs;
|
|
14
|
+
ds:hasProperty [
|
|
15
|
+
a ds:Property;
|
|
16
|
+
ds:name "`el`";
|
|
17
|
+
ds:summary "Supplies the nested panel content.";
|
|
18
|
+
ds:propertyType "element";
|
|
19
|
+
ds:defaultValue "—";
|
|
20
|
+
ds:constraints "TypeScript: `ReactElement<FilterProps, JSXElementConstructor<{ name: string }>> | ReactNode`. Valid non-fragment elements are cloned with `inline: true`; other nodes pass through unchanged. "
|
|
21
|
+
], [
|
|
22
|
+
a ds:Property;
|
|
23
|
+
ds:name "`label`";
|
|
24
|
+
ds:summary "Supplies trigger content before label inference.";
|
|
25
|
+
ds:propertyType "node";
|
|
26
|
+
ds:defaultValue "—";
|
|
27
|
+
ds:constraints "TypeScript: `ReactNode`. Falsy values fall back to `el.props.label`; if neither resolves, the button has no text label. ";
|
|
28
|
+
ds:optional "true"
|
|
29
|
+
], [
|
|
30
|
+
a ds:Property;
|
|
31
|
+
ds:name "`disabled`";
|
|
32
|
+
ds:summary "Disables the native trigger button.";
|
|
33
|
+
ds:propertyType "boolean";
|
|
34
|
+
ds:defaultValue "false";
|
|
35
|
+
ds:constraints "TypeScript: `boolean`. A disabled trigger cannot toggle the panel. ";
|
|
36
|
+
ds:optional "true"
|
|
37
|
+
], [
|
|
38
|
+
a ds:Property;
|
|
39
|
+
ds:name "`onMenuClose`";
|
|
40
|
+
ds:summary "Notifies the owning menu from the panel click handler. ";
|
|
41
|
+
ds:propertyType "callback";
|
|
42
|
+
ds:defaultValue "—";
|
|
43
|
+
ds:constraints "TypeScript: `() => void`. Runs for every click that bubbles to the open content container; outside clicks do not call it. ";
|
|
44
|
+
ds:optional "true"
|
|
45
|
+
], [
|
|
46
|
+
a ds:Property;
|
|
47
|
+
ds:name "`className`";
|
|
48
|
+
ds:summary "Adds classes to the root wrapper.";
|
|
49
|
+
ds:propertyType "text";
|
|
50
|
+
ds:defaultValue "—";
|
|
51
|
+
ds:constraints "TypeScript: `string`. Local root and alignment classes remain applied. ";
|
|
52
|
+
ds:optional "true"
|
|
53
|
+
], [
|
|
54
|
+
a ds:Property;
|
|
55
|
+
ds:name "`position`";
|
|
56
|
+
ds:summary "Selects alignment and directional icon arrangement.";
|
|
57
|
+
ds:propertyType "choice";
|
|
58
|
+
ds:defaultValue "`left`";
|
|
59
|
+
ds:constraints "TypeScript: `\"left\" | \"center\" | \"right\"`. The names select source alignment classes; `left` places the panel to the trigger's right and `right` places it to the trigger's left. ";
|
|
60
|
+
ds:optional "true"
|
|
61
|
+
].
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
4
|
+
|
|
5
|
+
ds:apps_landscape.subcomponent.pluralized_bold_count a ds:Subcomponent;
|
|
6
|
+
ds:name "Pluralized Bold Count";
|
|
7
|
+
ds:summary "Renders a locale-formatted count in a semantic `strong` element followed by the noun in its singular or plural form. The singular form is used only when the count is exactly `1`; every other value, including `0` and negative numbers, uses the plural form.\n\nMain use cases:\n\n- Emphasizing how many records a confirmation or destructive action will affect. \n- Summarizing a selection count inside a sentence in a side panel or modal.";
|
|
8
|
+
ds:anatomyDsl "node:\n uri: ds:apps_landscape.subcomponent.pluralized_bold_count\n edges:\n - node:\n uri: global.element.strong\n role: locale-formatted count\n relation:\n cardinality: \"1\"\n - node:\n role: pluralized noun\n relation:\n cardinality: \"1\"";
|
|
9
|
+
ds:anatomyClassic "https://www.figma.com/design/I4WpvwMuQI6v1qhgUl63Sx/Landscape-Pragma-components?node-id=25-79&t=iG2ObZ6Q1XG2A2MB-4\n\nTable 42\n\n";
|
|
10
|
+
ds:usage "### When to use\n\n**Quantified confirmation copy**\n\nUse inside a sentence when the reader must notice how many items an action covers, such as a removal or upgrade confirmation.\n\n**Inline selection summaries**\n\nUse to report a current selection or result count without breaking the surrounding sentence into a separate label.\n\n### When not to use\n\n**Standalone metric display**\n\nA metric that stands on its own rather than inside a sentence.\n\n**Incorrect pattern**: Placing this subcomponent alone in a card or statistic tile so the bold count carries meaning that only the missing sentence provides.\n\n**Remediation strategy**: Use a labelled statistic or information-grid element that pairs the value with its own visible label.\n\n**Approximate or truncated counts**\n\nA count that represents a capped or estimated total rather than an exact one.\n\n**Incorrect pattern**: Passing a clamped value such as `Math.min(total, 100)` so the sentence states an exact number that the data does not support.\n\n**Remediation strategy**: Call the `pluralize` helper from `@/utils/_helpers` with the `limited` count type, which renders the `100+` form, and apply emphasis in the surrounding copy.\n\n**Irregular or non-English plurals**\n\nA noun whose plural is not formed by appending `s`, or copy that must be translated.\n\n**Incorrect pattern**: Relying on the default plural for a noun such as `policy` or `person`, which yields `policys` and `persons`.\n\n**Remediation strategy**: Pass the correct form explicitly through `plural`, and move the whole sentence into a translation layer when locale-specific plural categories are required.\n\n**Zero-count empty states**\n\nA surface where the absence of items should change the message rather than the number in it.\n\n**Incorrect pattern**: Rendering `0 instances` inside otherwise unchanged action copy when no work can be performed.\n\n**Remediation strategy**: Branch on the empty case in the consumer and render a dedicated empty state or disable the action.";
|
|
11
|
+
ds:guidelines "### Accessibility\n\n- The count uses semantic `strong`, so it is announced as part of the sentence rather than as a separate element.\n- The subcomponent adds no role, label, or live region. Wrap it in the consumer’s own live region when the count updates in response to user action.\n- Keep the sentence readable without the emphasis, because bold weight alone conveys no status or selection state.\n\n### Content\n\n- Write the surrounding sentence so the emphasized number reads naturally in place, for example `You are about to remove 12 instances.`\n- Pass the bare noun without an article or trailing punctuation; the subcomponent renders exactly one space between the count and the noun.\n- Do not pre-format `count` as a string. Number formatting is applied internally and a pre-formatted value would break plural selection.\n\n### Internationalization\n\n- `toLocaleString()` is called without arguments, so grouping separators follow the runtime locale rather than an application-controlled one.\n- Plural selection is a binary `count === 1` check and does not implement locale plural categories such as zero, one, two, few, many, and other.\n- Both nouns are consumer-supplied. The subcomponent contains no translatable copy of its own.\n\n### Keyboard and device\n\n- This subcomponent renders inline text with no focus target and no keyboard interaction.\n- It applies no layout styles. Wrapping and truncation are the responsibility of the surrounding text container.";
|
|
12
|
+
ds:tier ds:apps_landscape;
|
|
13
|
+
ds:documentationStage ds:tag.specialadoption-docs;
|
|
14
|
+
ds:hasProperty [
|
|
15
|
+
a ds:Property;
|
|
16
|
+
ds:name "`count`";
|
|
17
|
+
ds:summary "Supplies the bold quantity and selects the noun form. ";
|
|
18
|
+
ds:propertyType "number";
|
|
19
|
+
ds:defaultValue "—";
|
|
20
|
+
ds:constraints "TypeScript: `number`. Formatted with `toLocaleString()`; singular is selected only when the value is exactly `1`. "
|
|
21
|
+
], [
|
|
22
|
+
a ds:Property;
|
|
23
|
+
ds:name "`singular`";
|
|
24
|
+
ds:summary "Supplies the noun used when `count` is exactly `1`. ";
|
|
25
|
+
ds:propertyType "text";
|
|
26
|
+
ds:defaultValue "—";
|
|
27
|
+
ds:constraints "TypeScript: `string`. Also seeds the default plural form. "
|
|
28
|
+
], [
|
|
29
|
+
a ds:Property;
|
|
30
|
+
ds:name "`plural`";
|
|
31
|
+
ds:summary "Supplies the noun used for every other count.";
|
|
32
|
+
ds:propertyType "text";
|
|
33
|
+
ds:defaultValue "`${singular}s`";
|
|
34
|
+
ds:constraints "TypeScript: `string`. Supply it when the plural is not the singular plus `s`. ";
|
|
35
|
+
ds:optional "true"
|
|
36
|
+
].
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
4
|
+
|
|
5
|
+
ds:apps_landscape.subcomponent.select_all_results_prompt a ds:Subcomponent;
|
|
6
|
+
ds:name "Select All Results Prompt";
|
|
7
|
+
ds:summary "Select All Results Prompt is an informational row that lets a user extend a partial selection to the entire result set. It reports the current selection with an information icon and offers a link-style button labelled `Select all {totalCount} {plural}.` that calls `onClick`. It owns no selection state, scope, or visibility.\n\nMain use cases:\n\n- Extending a page-level selection to every row matching the current search and filters. \n- Confirming how many items are selected before a bulk action is chosen.";
|
|
8
|
+
ds:anatomyDsl "node:\n uri: ds:apps_landscape.subcomponent.select_all_results\n role: prompt row\n edges:\n - node:\n uri: global.component.icon\n role: visual indicator\n relation:\n cardinality: \"1\"\n - node:\n role: selection status\n relation:\n cardinality: \"1\"\n - node:\n uri: global.component.button\n role: selection expansion\n relation:\n cardinality: \"1\"";
|
|
9
|
+
ds:anatomyClassic "https://www.figma.com/design/I4WpvwMuQI6v1qhgUl63Sx/Landscape-Pragma-components?node-id=26-5&t=iG2ObZ6Q1XG2A2MB-4\n\nTable 52\n\n";
|
|
10
|
+
ds:usage "### When to use\n\n- Render after the parent has selected a visible subset and can identify the complete active result scope.\n- Keep `count`, `totalCount`, nouns, and `onClick` aligned with the same search/filter snapshot.\n- Replace the row after activation with updated selection feedback; this component does not acknowledge completion.\n\n### When not to use\n\n**Nothing left to extend**\n\nEvery result in the active scope is already selected, or no selectable results exist.\n\n**Incorrect pattern**: Leaving the row mounted so it offers `Select all 0 instances.` or repeats an action the user has already taken.\n\n**Remediation strategy**: Unmount the row in the parent once `count` reaches `totalCount` or `totalCount` is zero; the component is always rendered and has no internal visibility rule.\n\n**Unknown or unstable total**\n\nThe full result count is still loading, estimated, or capped by the API.\n\n**Incorrect pattern**: Passing a placeholder or partial `totalCount` so the button promises a number the request will not actually select.\n\n**Remediation strategy**: Withhold the row until the exact total is resolved, and show a loading state in the meantime.\n\n**Destructive bulk action**\n\nThe follow-up action deletes, archives, or otherwise cannot be undone.\n\n**Incorrect pattern**: Wiring `onClick` straight to the destructive request so a single link click applies it to every result.\n\n**Remediation strategy**: Keep this row for selection only and route the destructive step through Typed Confirmation Modal so the user confirms the scope explicitly.\n\n**Sole indication of scope**\n\nThe user cannot otherwise tell which search or filter “all” refers to.\n\n**Incorrect pattern**: Relying on the button label alone to communicate the active filters, which it never names.\n\n**Remediation strategy**: Keep the active filters visible alongside the row, for example with Table Filter Chips.\n\n**Mismatched selection scope**\n\n`count` and `totalCount` are derived from different queries or pages.\n\n**Incorrect pattern**: Passing a selection count carried over from a previous filter while `totalCount` reflects the current one, producing a row that misstates both numbers.\n\n**Remediation strategy**: Recompute both values from the same search and filter snapshot, and clear the selection when the scope changes.";
|
|
11
|
+
ds:guidelines "### Accessibility\n\n- Keep status and action adjacent so the button’s purpose is understandable in reading order.\n- Do not rely on the icon; source does not explicitly hide or label it, and it conveys no scope detail.\n- The status is not an `aria-live` region. Announce the completed selection through the parent when users need immediate confirmation.\n- Add loading/disabled behavior in the parent flow to prevent repeated asynchronous selection requests; this component exposes no such prop.\n\n### Content\n\n- Supply concrete nouns that read naturally after a number. The plural should also read correctly in “Select all N {plural}.”\n- Explain the active filter/search scope nearby when “all” could mean all records globally.\n- Visible templates, punctuation, and word order are hardcoded English.\n\n### Internationalization / globalization\n\n- The status `count` is locale-formatted through `Number.toLocaleString()`, while action `totalCount` is interpolated without locale formatting. The component does not accept preformatted values or a formatter.\n- The helper supports only supplied singular/plural forms, not locale plural categories or translated sentence order.\n- A localizable implementation needs configurable status/action messages and number formatting rather than noun props alone.\n\n### Device\n\n- Source adds no flex, wrapping, spacing, or breakpoint styles. Verify natural inline wrapping and adjacent touch targets in the host layout.\n- Long nouns and large totals can wrap independently because the icon, status span, and button are separate inline content.\n\n### Keyboard\n\n- Canonical `Button` supplies native button keyboard activation and follows the status in DOM order.\n- If activation removes this row, move or retain focus deliberately in the parent; the component has no focus management.";
|
|
12
|
+
ds:tier ds:apps_landscape;
|
|
13
|
+
ds:documentationStage ds:tag.specialadoption-docs;
|
|
14
|
+
ds:hasProperty [
|
|
15
|
+
a ds:Property;
|
|
16
|
+
ds:name "`count`";
|
|
17
|
+
ds:summary "Current selected count used in status copy.";
|
|
18
|
+
ds:propertyType "number";
|
|
19
|
+
ds:defaultValue "—";
|
|
20
|
+
ds:constraints "Formatted with `toLocaleString()` by `pluralize(..., \"exact\")`; there is no runtime range validation, so callers must keep it nonnegative and below the total while shown. "
|
|
21
|
+
], [
|
|
22
|
+
a ds:Property;
|
|
23
|
+
ds:name "`itemName`";
|
|
24
|
+
ds:summary "Supplies nouns used by status and action copy.";
|
|
25
|
+
ds:propertyType "object";
|
|
26
|
+
ds:defaultValue "—";
|
|
27
|
+
ds:constraints "TypeScript: `{ plural: string; singular: string }`. Status selects the exact singular or plural; the action always uses `plural`. "
|
|
28
|
+
], [
|
|
29
|
+
a ds:Property;
|
|
30
|
+
ds:name "`itemName.singular`";
|
|
31
|
+
ds:summary "Noun used when the current selected count is one.";
|
|
32
|
+
ds:propertyType "text";
|
|
33
|
+
ds:defaultValue "—";
|
|
34
|
+
ds:constraints "Used only by the status copy through exact pluralization. "
|
|
35
|
+
], [
|
|
36
|
+
a ds:Property;
|
|
37
|
+
ds:name "`itemName.plural`";
|
|
38
|
+
ds:summary "Noun used for plural status and select-all copy.";
|
|
39
|
+
ds:propertyType "text";
|
|
40
|
+
ds:defaultValue "—";
|
|
41
|
+
ds:constraints "The action always uses this value regardless of `totalCount`. "
|
|
42
|
+
], [
|
|
43
|
+
a ds:Property;
|
|
44
|
+
ds:name "`onClick`";
|
|
45
|
+
ds:summary "Handles the select-all button.";
|
|
46
|
+
ds:propertyType "callback";
|
|
47
|
+
ds:defaultValue "—";
|
|
48
|
+
ds:constraints "TypeScript: `() => void`. No arguments, awaiting, disabled state, error handling, or duplicate-activation prevention are provided. "
|
|
49
|
+
], [
|
|
50
|
+
a ds:Property;
|
|
51
|
+
ds:name "`totalCount`";
|
|
52
|
+
ds:summary "Total interpolated directly into the action label.";
|
|
53
|
+
ds:propertyType "number";
|
|
54
|
+
ds:defaultValue "—";
|
|
55
|
+
ds:constraints "Unlike `count`, it does not pass through `toLocaleString()`. There is no equality or scope check; the component still renders when `totalCount <= count`. "
|
|
56
|
+
].
|
package/data/apps_landscape.ttl
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
4
|
+
|
|
5
|
+
ds:apps_launchpad.component.accordion a ds:Component;
|
|
6
|
+
ds:name "Accordion";
|
|
7
|
+
ds:summary "";
|
|
8
|
+
ds:anatomyDsl "";
|
|
9
|
+
ds:anatomyClassic "";
|
|
10
|
+
ds:usage "";
|
|
11
|
+
ds:guidelines "";
|
|
12
|
+
ds:tier ds:apps_launchpad.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
2
4
|
|
|
3
5
|
ds:apps_launchpad.component.avatar a ds:Component;
|
|
4
6
|
ds:name "Avatar";
|
|
@@ -26,6 +28,6 @@ ds:apps_launchpad.component.avatar a ds:Component;
|
|
|
26
28
|
ds:summary "The size of the avatar.";
|
|
27
29
|
ds:propertyType "choice";
|
|
28
30
|
ds:optional "true";
|
|
29
|
-
ds:
|
|
30
|
-
ds:
|
|
31
|
+
ds:defaultValue "medium";
|
|
32
|
+
ds:constraints "small, medium, large"
|
|
31
33
|
].
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
2
4
|
|
|
3
5
|
ds:apps_launchpad.component.badge a ds:Component;
|
|
4
6
|
ds:name "Badge";
|
|
@@ -20,6 +22,6 @@ ds:apps_launchpad.component.badge a ds:Component;
|
|
|
20
22
|
ds:summary "The variant of the badge.";
|
|
21
23
|
ds:propertyType "choice";
|
|
22
24
|
ds:optional "true";
|
|
23
|
-
ds:
|
|
24
|
-
ds:
|
|
25
|
+
ds:defaultValue "neutral";
|
|
26
|
+
ds:constraints "neutral, info, success, warning, danger"
|
|
25
27
|
].
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
2
4
|
|
|
3
5
|
ds:apps_launchpad.component.button a ds:Component;
|
|
4
6
|
ds:name "Button";
|
|
@@ -20,8 +22,8 @@ ds:apps_launchpad.component.button a ds:Component;
|
|
|
20
22
|
ds:summary "The variant of the button.";
|
|
21
23
|
ds:propertyType "choice";
|
|
22
24
|
ds:optional "true";
|
|
23
|
-
ds:
|
|
24
|
-
ds:
|
|
25
|
+
ds:defaultValue "secondary";
|
|
26
|
+
ds:constraints "primary, secondary, tertiary, danger"
|
|
25
27
|
], [
|
|
26
28
|
a ds:Property;
|
|
27
29
|
ds:name "disabled";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
2
4
|
|
|
3
5
|
ds:apps_launchpad.component.checkbox_input a ds:Component;
|
|
4
6
|
ds:name "CheckboxInput";
|
|
@@ -13,15 +15,15 @@ ds:apps_launchpad.component.checkbox_input a ds:Component;
|
|
|
13
15
|
ds:name "checked";
|
|
14
16
|
ds:summary "Whether the checkbox is checked or not.";
|
|
15
17
|
ds:propertyType "boolean";
|
|
16
|
-
ds:
|
|
17
|
-
ds:
|
|
18
|
+
ds:defaultValue "false";
|
|
19
|
+
ds:optional "true"
|
|
18
20
|
], [
|
|
19
21
|
a ds:Property;
|
|
20
22
|
ds:name "disabled";
|
|
21
23
|
ds:summary "Whether the checkbox is disabled or not.";
|
|
22
24
|
ds:propertyType "boolean";
|
|
23
|
-
ds:
|
|
24
|
-
ds:
|
|
25
|
+
ds:defaultValue "false";
|
|
26
|
+
ds:optional "true"
|
|
25
27
|
], [
|
|
26
28
|
a ds:Property;
|
|
27
29
|
ds:name "value";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
2
4
|
|
|
3
5
|
ds:apps_launchpad.component.combobox a ds:Component;
|
|
4
6
|
ds:name "Combobox";
|
|
@@ -32,8 +34,8 @@ ds:apps_launchpad.component.combobox a ds:Component;
|
|
|
32
34
|
ds:summary "Combobox type.";
|
|
33
35
|
ds:propertyType "choice";
|
|
34
36
|
ds:optional "false";
|
|
35
|
-
ds:
|
|
36
|
-
ds:
|
|
37
|
+
ds:defaultValue "multi-select";
|
|
38
|
+
ds:constraints "multi-select, single-select"
|
|
37
39
|
], [
|
|
38
40
|
a ds:Property;
|
|
39
41
|
ds:name "aria-busy";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
2
4
|
|
|
3
5
|
ds:apps_launchpad.component.drawer a ds:Component;
|
|
4
6
|
ds:name "Drawer";
|
|
@@ -13,15 +15,15 @@ ds:apps_launchpad.component.drawer a ds:Component;
|
|
|
13
15
|
ds:name "trigger";
|
|
14
16
|
ds:summary "Snippet that renders the trigger element used to open the side panel.";
|
|
15
17
|
ds:propertyType "Snippet";
|
|
16
|
-
ds:optional "
|
|
17
|
-
ds:
|
|
18
|
+
ds:constraints "Receives commandfor, command show-modal, aria-haspopup dialog, and optional onclick fallback when invoker commands are unsupported.";
|
|
19
|
+
ds:optional "true"
|
|
18
20
|
], [
|
|
19
21
|
a ds:Property;
|
|
20
22
|
ds:name "children";
|
|
21
23
|
ds:summary "Snippet that renders side panel content.";
|
|
22
24
|
ds:propertyType "Snippet";
|
|
23
|
-
ds:
|
|
24
|
-
ds:
|
|
25
|
+
ds:constraints "Receives commandfor and close callback. Can use SidePanel.Content or custom markup.";
|
|
26
|
+
ds:optional "true"
|
|
25
27
|
], [
|
|
26
28
|
a ds:Property;
|
|
27
29
|
ds:name "closeOnOutsideClick";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@prefix ds: <https://ds.canonical.com/>.
|
|
2
|
+
@prefix anatomy: <https://anatomy.canonical.com/>.
|
|
3
|
+
@prefix dt: <https://dt.canonical.com/>.
|
|
4
|
+
|
|
5
|
+
ds:apps_launchpad.component.link a ds:Component;
|
|
6
|
+
ds:name "Link";
|
|
7
|
+
ds:summary "";
|
|
8
|
+
ds:anatomyDsl "";
|
|
9
|
+
ds:anatomyClassic "";
|
|
10
|
+
ds:usage "";
|
|
11
|
+
ds:guidelines "";
|
|
12
|
+
ds:tier ds:apps_launchpad.
|