@canonical/design-system 0.2.5 → 0.43.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/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 +70 -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-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,75 @@
|
|
|
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.component.managed_file_input a ds:Component;
|
|
6
|
+
ds:name "Managed File Input";
|
|
7
|
+
ds:summary "Managed File Input is a controlled single-file workflow with two mutually exclusive render states. When `value` is `null`, it renders Canonical Input as a native file picker and awaits `onFileUpload([...files])`; when `value` is a `File`, it replaces the picker with a filename, a dense delete-icon Button that invokes the supplied promise-returning remove callback, and optional label/help/error text.\n\nThe component does not retain the selected `File`, upload progress, removal progress, or failures. The parent must update `value` and surface callback errors. Its custom blur contract is unusual: the empty-state input stores its last blur event and invokes the inherited `onBlur` only after a later successful upload.";
|
|
8
|
+
ds:anatomyDsl "node:\n uri: ds:apps_landscape.component.managed_file_input\n edges:\n - node:\n uri: global.component.input\n attributes:\n type: file\n multiple: false\n relation:\n cardinality: \"0..1\"\n condition: value is null\n - node:\n role: selected file state\n edges:\n - node:\n semantic: label\n role: selected-state label\n relation:\n cardinality: \"0..1\"\n condition: label is truthy\n - node:\n semantic: p\n role: help text\n relation:\n cardinality: \"0..1\"\n condition: help is truthy\n - node:\n role: filename\n relation:\n cardinality: \"1\"\n - node:\n uri: global.component.button\n role: remove file\n relation:\n cardinality: \"1\"\n - node:\n semantic: p\n role: validation message\n relation:\n cardinality: \"0..1\"\n condition: error is truthy\n relation:\n cardinality: \"0..1\"\n condition: value is a File";
|
|
9
|
+
ds:anatomyClassic "https://www.figma.com/design/I4WpvwMuQI6v1qhgUl63Sx/Landscape-Pragma-components?node-id=25-75&t=iG2ObZ6Q1XG2A2MB-4\n\nTable 38\n\n";
|
|
10
|
+
ds:usage "### When to use\n\n**Managed single upload**\n\nUse when selecting a file immediately invokes an asynchronous upload or preparation step.\n\n**Replace-by-removal flow**\n\nUse when the chosen file should be summarized by name and explicitly removed before another is selected.\n\n**Parent-controlled asynchronous processing**\n\nUse when a parent can await upload/removal work, update `value`, and pass resulting error/help state back into the component.\n\n### When not to use\n\n**Multiple files**\n\nUploading more than one file in a single operation.\n\n**Incorrect pattern**: Using Managed File Input when the application needs to accept and display multiple uploaded files simultaneously.\n\n**Remediation strategy**: Use a dedicated multi-file upload component or build a wrapper that manages an array of Managed File Input instances.\n\n**Deferred form upload**\n\nCollecting files locally without uploading until form submission.\n\n**Incorrect pattern**: Selecting a file into Managed File Input expecting it to remain local until the parent form is submitted as a whole.\n\n**Remediation strategy**: If files must remain entirely local, manage the File state in a plain state variable; Managed File Input is designed for immediate upload on selection.\n\n**Progress, cancellation, or replacement in place**\n\nShowing upload progress, retry/cancel options, file preview, or replacing files without explicit removal.\n\n**Incorrect pattern**: Expecting Managed File Input to display progress bars, cancel buttons, thumbnail previews, or allow drag-and-drop file replacement without removing the current file first.\n\n**Remediation strategy**: None of these features are implemented. For advanced file handling, build a custom component or use a specialized file-upload library.\n\n**Native blur semantics**\n\nTreating onBlur as a normal form input blur callback.\n\n**Incorrect pattern**: Assuming `onBlur` fires whenever the file picker loses focus, like standard input controls.\n\n**Remediation strategy**: Understand that `onBlur` is delayed until after a successful file upload and requires a previously stored blur event; the wrapper does not fire blur on picker close alone.";
|
|
11
|
+
ds:guidelines "### Accessibility\n\n- Empty-state label/error/help semantics are inherited from Canonical Input. Provide a visible or programmatic label.\n- Selected-state remove Button has off-screen text “Remove” plus a delete Icon, but the local source does not include the filename in the text label or set explicit ARIA on the Icon. Multiple controls need surrounding context and verification of the installed Canonical Icon behavior, or a more specific upstream label.\n- The Button always receives `aria-errormessage=\"${value.name}-error-message\"`, even when the error paragraph is absent. The id uses the filename without sanitization or uniqueness handling.\n- Selected-state `<label>` has no associated input. Treat it as visual text rather than claiming native label semantics.\n\n### Content and security\n\n- State accepted file types, size limits, and whether selection uploads immediately.\n- Validate content and size on the server; the accept attribute is only user guidance.\n- Show actionable upload or removal failures without exposing sensitive paths.\n- The selected error prefix and remove action text are hardcoded English.\n\n### Internationalization\n\n- Localize caller-supplied label, help, and error content. An upstream-ready version must also externalize “Remove” and “Error:”.\n- Preserve filenames verbatim; do not translate them. Allow bidirectional and non-ASCII names without using the raw value as an unsafe or duplicate DOM id.\n- Long filenames may need visible truncation with an accessible full value; no such behavior is implemented locally.\n\n### Keyboard navigation\n\n- The picker and remove action must remain reachable and operable by keyboard.\n- Native file-picker keyboard/device behavior comes from the browser and Canonical Input. The component adds no drag/drop or custom picker keys.\n- Removing does not locally restore focus to a newly rendered picker; parent state changes determine what appears next.\n\n### Device and layout\n\n- The selected-state filename and dense Button share normal inline flow. The only direct spacing override is the Button’s literal inline `marginLeft: \"0.5rem\"` plus `u-no-padding--left`.\n- No local stylesheet handles long filenames, wrapping, mobile layout, or touch targets; verify these in each containing form.";
|
|
12
|
+
ds:tier ds:apps_landscape;
|
|
13
|
+
ds:documentationStage ds:tag.specialadoption-docs;
|
|
14
|
+
ds:hasProperty [
|
|
15
|
+
a ds:Property;
|
|
16
|
+
ds:name "`ManagedFileInput.value`";
|
|
17
|
+
ds:summary "Selects empty or selected render state.";
|
|
18
|
+
ds:propertyType "object";
|
|
19
|
+
ds:defaultValue "—";
|
|
20
|
+
ds:constraints "TypeScript: `File | null`. Only one file is represented; parent updates control state. "
|
|
21
|
+
], [
|
|
22
|
+
a ds:Property;
|
|
23
|
+
ds:name "`ManagedFileInput.onFileUpload`";
|
|
24
|
+
ds:summary "Awaited after a non-empty native `FileList` is copied to an array. ";
|
|
25
|
+
ds:propertyType "callback";
|
|
26
|
+
ds:defaultValue "—";
|
|
27
|
+
ds:constraints "TypeScript: `(files: File[]) => Promise<void>`. The picker forces `multiple={false}`, so normal UI selection supplies one item despite the array API. Rejections are not caught. "
|
|
28
|
+
], [
|
|
29
|
+
a ds:Property;
|
|
30
|
+
ds:name "`ManagedFileInput.onFileRemove`";
|
|
31
|
+
ds:summary "Passed directly to the remove Button's click handler. ";
|
|
32
|
+
ds:propertyType "callback";
|
|
33
|
+
ds:defaultValue "—";
|
|
34
|
+
ds:constraints "TypeScript: `() => Promise<void>`. Parent must update `value`; no local pending, disabled, or error behavior is added. Rejections are not caught. "
|
|
35
|
+
], [
|
|
36
|
+
a ds:Property;
|
|
37
|
+
ds:name "`ManagedFileInput.error`";
|
|
38
|
+
ds:summary "Empty state passes it to Canonical Input; selected state adds `is-error` and renders custom error markup. ";
|
|
39
|
+
ds:propertyType "text";
|
|
40
|
+
ds:defaultValue "—";
|
|
41
|
+
ds:constraints "TypeScript: `string | undefined`. The selected error id is derived verbatim from `value.name`; Button has `aria-errormessage` even when no error exists. ";
|
|
42
|
+
ds:optional "true"
|
|
43
|
+
], [
|
|
44
|
+
a ds:Property;
|
|
45
|
+
ds:name "ManagedFileInput.help";
|
|
46
|
+
ds:summary "Empty state passes it to Input; selected state renders it before the filename. ";
|
|
47
|
+
ds:propertyType "node";
|
|
48
|
+
ds:defaultValue "—";
|
|
49
|
+
ds:constraints "TypeScript: `string | ReactNode`. React content is supported according to `InputProps`. ";
|
|
50
|
+
ds:optional "true"
|
|
51
|
+
], [
|
|
52
|
+
a ds:Property;
|
|
53
|
+
ds:name "`ManagedFileInput.label`";
|
|
54
|
+
ds:summary "Labels the empty-state Input; selected state renders label-styled text. ";
|
|
55
|
+
ds:propertyType "node";
|
|
56
|
+
ds:defaultValue "—";
|
|
57
|
+
ds:constraints "TypeScript: `string | ReactNode`. The selected-state `<label>` is not associated with a form control. ";
|
|
58
|
+
ds:optional "true"
|
|
59
|
+
], [
|
|
60
|
+
a ds:Property;
|
|
61
|
+
ds:name "`ManagedFileInput.onBlur`";
|
|
62
|
+
ds:summary "Not forwarded normally. The picker stores its blur event, then calls this callback only after a later awaited upload if such an event exists. ";
|
|
63
|
+
ds:propertyType "callback";
|
|
64
|
+
ds:defaultValue "—";
|
|
65
|
+
ds:constraints "TypeScript: `(event: FocusEvent<HTMLInputElement>) => void`. There is no callback on blur alone, after a rejected upload, or without a stored event. ";
|
|
66
|
+
ds:optional "true"
|
|
67
|
+
], [
|
|
68
|
+
a ds:Property;
|
|
69
|
+
ds:name "`ManagedFileInput` remaining Input props";
|
|
70
|
+
ds:summary "Forwarded to the empty-state Canonical Input, including contracts such as `accept`, `name`, `required`, `disabled`, classes, and data/ARIA props where supported. ";
|
|
71
|
+
ds:propertyType "object";
|
|
72
|
+
ds:defaultValue "Canonical Input defaults";
|
|
73
|
+
ds:constraints "TypeScript: `Omit<InputProps, \"multiple\" | \"onChange\" | \"type\" | \"value\">`. Consumers may supply any supported subset. They are not forwarded to selected-state markup. Local feedback, label, multiple, blur, and change props cannot be overridden. ";
|
|
74
|
+
ds:optional "true"
|
|
75
|
+
].
|
|
@@ -0,0 +1,323 @@
|
|
|
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.component.multi_select_field a ds:Component;
|
|
6
|
+
ds:name "Multi-Select Field";
|
|
7
|
+
ds:summary "Wraps Canonical `MultiSelect` in Landscape form-field presentation: optional outer label and help, error or caution styling, persistent feedback, a composed dropdown footer, wrapper refs, and observed open/close callbacks. Selection remains controlled by the inherited `MultiSelectProps` contract; the wrapper does not store selected items.";
|
|
8
|
+
ds:anatomyDsl "node:\n uri: ds:apps_landscape.component.multi_select_field\n edges:\n - node:\n role: field wrapper\n edges:\n - node:\n semantic: label\n role: outer field label\n relation:\n cardinality: \"0..1\"\n condition: label is non-empty\n - node:\n semantic: paragraph\n role: help text\n relation:\n cardinality: \"0..1\"\n condition: help is truthy\n slotName: help\n - node:\n uri: global.component.multi_select\n role: controlled selection control\n edges:\n - node:\n role: dropdown footer\n relation:\n cardinality: \"0..1\"\n condition: dropdownFooter or error is truthy\n slotName: dropdownFooter\n relation:\n cardinality: \"1\"\n - node:\n semantic: paragraph\n role: persistent error message\n relation:\n cardinality: \"0..1\"\n condition: error is truthy\n slotName: error\n - node:\n semantic: paragraph\n role: persistent warning message\n relation:\n cardinality: \"0..1\"\n condition: warning is truthy\n slotName: warning\n relation:\n cardinality: \"1\"";
|
|
9
|
+
ds:anatomyClassic "https://www.figma.com/design/I4WpvwMuQI6v1qhgUl63Sx/Landscape-Pragma-components?node-id=25-76&t=iG2ObZ6Q1XG2A2MB-4\n\nTable 39\n\n";
|
|
10
|
+
ds:usage "### When to use\n\n**Searchable multiple choice**\n\nUse when Canonical `MultiSelect` is the appropriate multiple-choice interaction and the field also needs Landscape label, help, feedback, or lifecycle integration.\n\n**Complete form-field treatment**\n\nUse when Canonical MultiSelect needs label, help, warning, validation, footer, or open/close callbacks.\n\n### When not to use\n\n**Small visible set**\n\nChoosing between a small number of options all visible at once.\n\n**Incorrect pattern**: Using Multi-Select Field’s portalled dropdown menu when fewer than five options exist and a checkbox group would make all choices easier to compare.\n\n**Remediation strategy**: Use Canonical CheckboxGroup or a simpler checkbox list; reserve Multi-Select Field for larger or dynamically growing option sets.\n\n**Single selection**\n\nChoosing exactly one item from a list.\n\n**Incorrect pattern**: Using Multi-Select Field when only one choice is allowed; the control inherits Canonical MultiSelect’s multiple-choice semantics.\n\n**Remediation strategy**: Use a Select component, RadioGroup, or Combobox—all designed for single selection.\n\n**Lifecycle as authoritative state**\n\nUsing open/close callbacks to control menu state.\n\n**Incorrect pattern**: Treating `onOpen` and `onClose` as controlled open-state props, expecting them to drive whether the menu shows or hides.\n\n**Remediation strategy**: Understand that `onOpen` and `onClose` are observation-only callbacks that watch `aria-expanded` for side effects; they do not control the menu state. Selection and item state are controlled through the inherited `MultiSelectProps` contract.";
|
|
11
|
+
ds:guidelines "### Accessibility\n\n- Combobox/listbox roles, option state, focus management, and the accessible label are delegated to Canonical `MultiSelect`.\n- The outer label is visual markup without `htmlFor`; the same `label` string is passed to MultiSelect for its own labeling behavior.\n- Help, persistent error, and warning paragraphs are not assigned ids or connected with `aria-describedby` by this wrapper.\n- Error content is passed to MultiSelect and rendered both in the dropdown footer and below the control; verify the underlying component does not cause duplicate announcements.\n- Disabled state is passed programmatically, and a fully disabled field also supplies every item as disabled.\n\n### Content\n\n- Use concise option labels and put selection constraints in `help` or directly relevant `dropdownFooter` content.\n- `warning`, `help`, and footer content are arbitrary React nodes; `error` is a string. Keep feedback brief and avoid nested form workflows inside the portalled menu.\n- The wrapper contains no internal visible strings.\n\n### Internationalization\n\n- All wrapper-visible content is caller-provided and can be localized.\n- The component performs no string formatting, pluralization, or direction-aware layout of its own; option behavior remains with Canonical MultiSelect.\n\n### Keyboard and device\n\n- The wrapper adds no keyboard handlers or focus targets; all option navigation, selection, dismissal, and chip behavior is delegated to Canonical MultiSelect.\n- The menu is portalled, which is why lifecycle callbacks observe `aria-expanded` rather than wrapper focus. Verify portal positioning and focus return in side panels, small viewports, and zoomed layouts.\n- The only local styles target error and caution backgrounds/borders across default, hover, and expanded states; no media queries or width rules are defined here.";
|
|
12
|
+
ds:tier ds:apps_landscape;
|
|
13
|
+
ds:documentationStage ds:tag.specialadoption-docs;
|
|
14
|
+
ds:hasProperty [
|
|
15
|
+
a ds:Property;
|
|
16
|
+
ds:name "`items`";
|
|
17
|
+
ds:summary "Supplies the available options.";
|
|
18
|
+
ds:propertyType "list of objects";
|
|
19
|
+
ds:defaultValue "—";
|
|
20
|
+
ds:constraints "TypeScript: `MultiSelectItem[]`. When `disabled` is true, this array also replaces `disabledItems`. "
|
|
21
|
+
], [
|
|
22
|
+
a ds:Property;
|
|
23
|
+
ds:name "`items[].label`";
|
|
24
|
+
ds:summary "Supplies an option's visible label.";
|
|
25
|
+
ds:propertyType "text";
|
|
26
|
+
ds:defaultValue "—";
|
|
27
|
+
ds:constraints "TypeScript: `string`."
|
|
28
|
+
], [
|
|
29
|
+
a ds:Property;
|
|
30
|
+
ds:name "`items[].value`";
|
|
31
|
+
ds:summary "Supplies an option's submitted identity.";
|
|
32
|
+
ds:propertyType "text";
|
|
33
|
+
ds:defaultValue "—";
|
|
34
|
+
ds:constraints "TypeScript: `string | number`."
|
|
35
|
+
], [
|
|
36
|
+
a ds:Property;
|
|
37
|
+
ds:name "`items[].group`";
|
|
38
|
+
ds:summary "Assigns an option to a group.";
|
|
39
|
+
ds:propertyType "text";
|
|
40
|
+
ds:defaultValue "—";
|
|
41
|
+
ds:constraints "TypeScript: `string`.";
|
|
42
|
+
ds:optional "true"
|
|
43
|
+
], [
|
|
44
|
+
a ds:Property;
|
|
45
|
+
ds:name "`selectedItems`";
|
|
46
|
+
ds:summary "Supplies the caller-owned selected options.";
|
|
47
|
+
ds:propertyType "list of objects";
|
|
48
|
+
ds:defaultValue "—";
|
|
49
|
+
ds:constraints "TypeScript: `MultiSelectItem[]`. The wrapper stores no selected-item state. ";
|
|
50
|
+
ds:optional "true"
|
|
51
|
+
], [
|
|
52
|
+
a ds:Property;
|
|
53
|
+
ds:name "`disabledItems`";
|
|
54
|
+
ds:summary "Supplies individually disabled options while the field is enabled. ";
|
|
55
|
+
ds:propertyType "list of objects";
|
|
56
|
+
ds:defaultValue "—";
|
|
57
|
+
ds:constraints "TypeScript: `MultiSelectItem[]`. Ignored in favor of all `items` when `disabled` is true. ";
|
|
58
|
+
ds:optional "true"
|
|
59
|
+
], [
|
|
60
|
+
a ds:Property;
|
|
61
|
+
ds:name "`disabled`";
|
|
62
|
+
ds:summary "Disables the control.";
|
|
63
|
+
ds:propertyType "boolean";
|
|
64
|
+
ds:defaultValue "—";
|
|
65
|
+
ds:constraints "TypeScript: `boolean`. A true value also disables every item. ";
|
|
66
|
+
ds:optional "true"
|
|
67
|
+
], [
|
|
68
|
+
a ds:Property;
|
|
69
|
+
ds:name "`error`";
|
|
70
|
+
ds:summary "Applies error styling and displays validation feedback. ";
|
|
71
|
+
ds:propertyType "text";
|
|
72
|
+
ds:defaultValue "—";
|
|
73
|
+
ds:constraints "TypeScript: `string`. A truthy value is forwarded and rendered in both the dropdown footer and persistent feedback. ";
|
|
74
|
+
ds:optional "true"
|
|
75
|
+
], [
|
|
76
|
+
a ds:Property;
|
|
77
|
+
ds:name "`help`";
|
|
78
|
+
ds:summary "Renders persistent help before the control.";
|
|
79
|
+
ds:propertyType "node";
|
|
80
|
+
ds:defaultValue "—";
|
|
81
|
+
ds:constraints "TypeScript: `ReactNode`. Truthiness controls rendering; the wrapper adds no `aria-describedby` relationship. ";
|
|
82
|
+
ds:optional "true"
|
|
83
|
+
], [
|
|
84
|
+
a ds:Property;
|
|
85
|
+
ds:name "`helpClassName`";
|
|
86
|
+
ds:summary "Supplies Canonical MultiSelect help classes.";
|
|
87
|
+
ds:propertyType "text";
|
|
88
|
+
ds:defaultValue "—";
|
|
89
|
+
ds:constraints "TypeScript: `string`. The wrapper consumes `help`, so this has no wrapper-owned help target. ";
|
|
90
|
+
ds:optional "true"
|
|
91
|
+
], [
|
|
92
|
+
a ds:Property;
|
|
93
|
+
ds:name "`label`";
|
|
94
|
+
ds:summary "Renders the outer label and labels Canonical MultiSelect. ";
|
|
95
|
+
ds:propertyType "text";
|
|
96
|
+
ds:defaultValue "—";
|
|
97
|
+
ds:constraints "TypeScript: `string`. The outer label has no `htmlFor`. ";
|
|
98
|
+
ds:optional "true"
|
|
99
|
+
], [
|
|
100
|
+
a ds:Property;
|
|
101
|
+
ds:name "`listSelected`";
|
|
102
|
+
ds:summary "Selects Canonical MultiSelect's selected-item listing behavior. ";
|
|
103
|
+
ds:propertyType "boolean";
|
|
104
|
+
ds:defaultValue "—";
|
|
105
|
+
ds:constraints "TypeScript: `boolean`. Forwarded unchanged. ";
|
|
106
|
+
ds:optional "true"
|
|
107
|
+
], [
|
|
108
|
+
a ds:Property;
|
|
109
|
+
ds:name "`onDeselectItem`";
|
|
110
|
+
ds:summary "Handles deselection of one option.";
|
|
111
|
+
ds:propertyType "callback";
|
|
112
|
+
ds:defaultValue "—";
|
|
113
|
+
ds:constraints "TypeScript: `(item: MultiSelectItem) => void`. ";
|
|
114
|
+
ds:optional "true"
|
|
115
|
+
], [
|
|
116
|
+
a ds:Property;
|
|
117
|
+
ds:name "`onItemsUpdate`";
|
|
118
|
+
ds:summary "Handles changes to the selected option array.";
|
|
119
|
+
ds:propertyType "callback";
|
|
120
|
+
ds:defaultValue "—";
|
|
121
|
+
ds:constraints "TypeScript: `(items: MultiSelectItem[]) => void`. ";
|
|
122
|
+
ds:optional "true"
|
|
123
|
+
], [
|
|
124
|
+
a ds:Property;
|
|
125
|
+
ds:name "`onSelectItem`";
|
|
126
|
+
ds:summary "Handles selection of one option.";
|
|
127
|
+
ds:propertyType "callback";
|
|
128
|
+
ds:defaultValue "—";
|
|
129
|
+
ds:constraints "TypeScript: `(item: MultiSelectItem) => void`. ";
|
|
130
|
+
ds:optional "true"
|
|
131
|
+
], [
|
|
132
|
+
a ds:Property;
|
|
133
|
+
ds:name "`placeholder`";
|
|
134
|
+
ds:summary "Supplies placeholder text for the control.";
|
|
135
|
+
ds:propertyType "text";
|
|
136
|
+
ds:defaultValue "—";
|
|
137
|
+
ds:constraints "TypeScript: `string`.";
|
|
138
|
+
ds:optional "true"
|
|
139
|
+
], [
|
|
140
|
+
a ds:Property;
|
|
141
|
+
ds:name "`required`";
|
|
142
|
+
ds:summary "Adds required visual treatment to the outer label.";
|
|
143
|
+
ds:propertyType "boolean";
|
|
144
|
+
ds:defaultValue "—";
|
|
145
|
+
ds:constraints "TypeScript: `boolean`. It is not forwarded to Canonical MultiSelect. ";
|
|
146
|
+
ds:optional "true"
|
|
147
|
+
], [
|
|
148
|
+
a ds:Property;
|
|
149
|
+
ds:name "`renderItem`";
|
|
150
|
+
ds:summary "Customizes option rendering.";
|
|
151
|
+
ds:propertyType "callback";
|
|
152
|
+
ds:defaultValue "—";
|
|
153
|
+
ds:constraints "TypeScript: `(item: MultiSelectItem) => ReactNode`. ";
|
|
154
|
+
ds:optional "true"
|
|
155
|
+
], [
|
|
156
|
+
a ds:Property;
|
|
157
|
+
ds:name "`dropdownHeader`";
|
|
158
|
+
ds:summary "Supplies content at the start of the dropdown.";
|
|
159
|
+
ds:propertyType "node";
|
|
160
|
+
ds:defaultValue "—";
|
|
161
|
+
ds:constraints "TypeScript: `ReactNode`.";
|
|
162
|
+
ds:optional "true"
|
|
163
|
+
], [
|
|
164
|
+
a ds:Property;
|
|
165
|
+
ds:name "`dropdownFooter`";
|
|
166
|
+
ds:summary "Supplies content at the end of the dropdown.";
|
|
167
|
+
ds:propertyType "node";
|
|
168
|
+
ds:defaultValue "—";
|
|
169
|
+
ds:constraints "TypeScript: `ReactNode`. With an error, it follows the dropdown error copy inside a validation wrapper. ";
|
|
170
|
+
ds:optional "true"
|
|
171
|
+
], [
|
|
172
|
+
a ds:Property;
|
|
173
|
+
ds:name "`footerClassName`";
|
|
174
|
+
ds:summary "Adds classes to the dropdown footer.";
|
|
175
|
+
ds:propertyType "text";
|
|
176
|
+
ds:defaultValue "—";
|
|
177
|
+
ds:constraints "TypeScript: `string`.";
|
|
178
|
+
ds:optional "true"
|
|
179
|
+
], [
|
|
180
|
+
a ds:Property;
|
|
181
|
+
ds:name "`inputClassName`";
|
|
182
|
+
ds:summary "Adds classes to the Canonical MultiSelect input.";
|
|
183
|
+
ds:propertyType "text";
|
|
184
|
+
ds:defaultValue "—";
|
|
185
|
+
ds:constraints "TypeScript: `string`.";
|
|
186
|
+
ds:optional "true"
|
|
187
|
+
], [
|
|
188
|
+
a ds:Property;
|
|
189
|
+
ds:name "`dropdownClassName`";
|
|
190
|
+
ds:summary "Adds classes to the dropdown.";
|
|
191
|
+
ds:propertyType "text";
|
|
192
|
+
ds:defaultValue "—";
|
|
193
|
+
ds:constraints "TypeScript: `string`.";
|
|
194
|
+
ds:optional "true"
|
|
195
|
+
], [
|
|
196
|
+
a ds:Property;
|
|
197
|
+
ds:name "`emptyState`";
|
|
198
|
+
ds:summary "Supplies custom empty-state content.";
|
|
199
|
+
ds:propertyType "node";
|
|
200
|
+
ds:defaultValue "—";
|
|
201
|
+
ds:constraints "TypeScript: `ReactNode`.";
|
|
202
|
+
ds:optional "true"
|
|
203
|
+
], [
|
|
204
|
+
a ds:Property;
|
|
205
|
+
ds:name "`emptyMessage`";
|
|
206
|
+
ds:summary "Supplies the empty-state message.";
|
|
207
|
+
ds:propertyType "text";
|
|
208
|
+
ds:defaultValue "—";
|
|
209
|
+
ds:constraints "TypeScript: `string`.";
|
|
210
|
+
ds:optional "true"
|
|
211
|
+
], [
|
|
212
|
+
a ds:Property;
|
|
213
|
+
ds:name "`showDropdownFooter`";
|
|
214
|
+
ds:summary "Controls Canonical MultiSelect footer visibility.";
|
|
215
|
+
ds:propertyType "boolean";
|
|
216
|
+
ds:defaultValue "—";
|
|
217
|
+
ds:constraints "TypeScript: `boolean`.";
|
|
218
|
+
ds:optional "true"
|
|
219
|
+
], [
|
|
220
|
+
a ds:Property;
|
|
221
|
+
ds:name "`variant`";
|
|
222
|
+
ds:summary "Selects the Canonical MultiSelect trigger variant.";
|
|
223
|
+
ds:propertyType "choice";
|
|
224
|
+
ds:defaultValue "—";
|
|
225
|
+
ds:constraints "TypeScript: `\"condensed\" | \"search\"`. ";
|
|
226
|
+
ds:optional "true"
|
|
227
|
+
], [
|
|
228
|
+
a ds:Property;
|
|
229
|
+
ds:name "`scrollOverflow`";
|
|
230
|
+
ds:summary "Controls dropdown overflow behavior.";
|
|
231
|
+
ds:propertyType "boolean";
|
|
232
|
+
ds:defaultValue "true";
|
|
233
|
+
ds:constraints "TypeScript: `boolean`. Forwarded values override the wrapper fallback. ";
|
|
234
|
+
ds:optional "true"
|
|
235
|
+
], [
|
|
236
|
+
a ds:Property;
|
|
237
|
+
ds:name "`isSortedAlphabetically`";
|
|
238
|
+
ds:summary "Controls alphabetical option sorting.";
|
|
239
|
+
ds:propertyType "boolean";
|
|
240
|
+
ds:defaultValue "—";
|
|
241
|
+
ds:constraints "TypeScript: `boolean`.";
|
|
242
|
+
ds:optional "true"
|
|
243
|
+
], [
|
|
244
|
+
a ds:Property;
|
|
245
|
+
ds:name "`hasSelectedItemsFirst`";
|
|
246
|
+
ds:summary "Controls whether selected options appear first.";
|
|
247
|
+
ds:propertyType "boolean";
|
|
248
|
+
ds:defaultValue "—";
|
|
249
|
+
ds:constraints "TypeScript: `boolean`.";
|
|
250
|
+
ds:optional "true"
|
|
251
|
+
], [
|
|
252
|
+
a ds:Property;
|
|
253
|
+
ds:name "`id`";
|
|
254
|
+
ds:summary "Supplies the Canonical MultiSelect identifier.";
|
|
255
|
+
ds:propertyType "text";
|
|
256
|
+
ds:defaultValue "—";
|
|
257
|
+
ds:constraints "TypeScript: `string`.";
|
|
258
|
+
ds:optional "true"
|
|
259
|
+
], [
|
|
260
|
+
a ds:Property;
|
|
261
|
+
ds:name "`onSearchChange`";
|
|
262
|
+
ds:summary "Handles search-text changes.";
|
|
263
|
+
ds:propertyType "callback";
|
|
264
|
+
ds:defaultValue "—";
|
|
265
|
+
ds:constraints "TypeScript: `(value: string) => void`. ";
|
|
266
|
+
ds:optional "true"
|
|
267
|
+
], [
|
|
268
|
+
a ds:Property;
|
|
269
|
+
ds:name "`onOpen`";
|
|
270
|
+
ds:summary "Notifies when observed `aria-expanded` becomes `\"true\"`. ";
|
|
271
|
+
ds:propertyType "callback";
|
|
272
|
+
ds:defaultValue "—";
|
|
273
|
+
ds:constraints "TypeScript: `() => void`. A `MutationObserver` watches the first descendant with `[aria-expanded]`; no initial callback fires. ";
|
|
274
|
+
ds:optional "true"
|
|
275
|
+
], [
|
|
276
|
+
a ds:Property;
|
|
277
|
+
ds:name "`onClose`";
|
|
278
|
+
ds:summary "Notifies when observed `aria-expanded` changes away from `\"true\"`. ";
|
|
279
|
+
ds:propertyType "callback";
|
|
280
|
+
ds:defaultValue "—";
|
|
281
|
+
ds:constraints "TypeScript: `() => void`. Observation depends on Canonical MultiSelect's rendered control. ";
|
|
282
|
+
ds:optional "true"
|
|
283
|
+
], [
|
|
284
|
+
a ds:Property;
|
|
285
|
+
ds:name "`searchButtonType`";
|
|
286
|
+
ds:summary "Selects the search trigger's native button type. ";
|
|
287
|
+
ds:propertyType "choice";
|
|
288
|
+
ds:defaultValue "—";
|
|
289
|
+
ds:constraints "TypeScript: `\"submit\" | \"button\"`. ";
|
|
290
|
+
ds:optional "true"
|
|
291
|
+
], [
|
|
292
|
+
a ds:Property;
|
|
293
|
+
ds:name "`className`";
|
|
294
|
+
ds:summary "Adds classes to the root wrapper.";
|
|
295
|
+
ds:propertyType "text";
|
|
296
|
+
ds:defaultValue "—";
|
|
297
|
+
ds:constraints "TypeScript: `string`. Local validation and state classes remain applied. ";
|
|
298
|
+
ds:optional "true"
|
|
299
|
+
], [
|
|
300
|
+
a ds:Property;
|
|
301
|
+
ds:name "`innerRef`";
|
|
302
|
+
ds:summary "Receives the root wrapper node.";
|
|
303
|
+
ds:propertyType "object";
|
|
304
|
+
ds:defaultValue "—";
|
|
305
|
+
ds:constraints "TypeScript: `Ref<HTMLDivElement>`. Supports callback and mutable object refs; the implementation does not explicitly write `null` on unmount. ";
|
|
306
|
+
ds:optional "true"
|
|
307
|
+
], [
|
|
308
|
+
a ds:Property;
|
|
309
|
+
ds:name "`labelClassName`";
|
|
310
|
+
ds:summary "Adds classes to the outer label.";
|
|
311
|
+
ds:propertyType "text";
|
|
312
|
+
ds:defaultValue "—";
|
|
313
|
+
ds:constraints "TypeScript: `string`. Has no effect when `label` is absent. ";
|
|
314
|
+
ds:optional "true"
|
|
315
|
+
], [
|
|
316
|
+
a ds:Property;
|
|
317
|
+
ds:name "`warning`";
|
|
318
|
+
ds:summary "Applies caution styling and renders feedback below the control. ";
|
|
319
|
+
ds:propertyType "node";
|
|
320
|
+
ds:defaultValue "—";
|
|
321
|
+
ds:constraints "TypeScript: `ReactNode`. It is not forwarded or included in the dropdown footer. ";
|
|
322
|
+
ds:optional "true"
|
|
323
|
+
].
|
|
@@ -0,0 +1,13 @@
|
|
|
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.component.pass_rate_filter a ds:Component;
|
|
6
|
+
ds:name "Pass Rate Filter";
|
|
7
|
+
ds:summary "Composes a custom `TableFilter` with a Formik range form backed by the `passRateFrom` and `passRateTo` page parameters. Its badge counts bounds that differ from the URL defaults of 0 and 100; Reset writes those defaults immediately, while Apply writes the current valid form values.";
|
|
8
|
+
ds:anatomyDsl "node:\n uri: ds:apps_landscape.component.pass_rate_filter\n edges:\n - node:\n uri: ds:apps_landscape.pattern.table_filter\n role: custom filter disclosure\n edges:\n - node:\n role: Pass rate toggle label\n edges:\n - node:\n uri: global.component.badge\n role: active-bound count\n relation:\n cardinality: \"0..1\"\n condition: passRateFrom is greater than 0 or passRateTo is less than 100\n relation:\n cardinality: \"1\"\n - node:\n semantic: form\n role: pass-rate range form\n edges:\n - node:\n uri: global.component.input\n role: minimum pass rate\n relation:\n cardinality: \"1\"\n - node:\n role: minimum percent suffix\n relation:\n cardinality: \"1\"\n - node:\n uri: global.component.input\n role: maximum pass rate\n relation:\n cardinality: \"1\"\n - node:\n role: maximum percent suffix\n relation:\n cardinality: \"1\"\n - node:\n uri: global.component.button\n role: reset action\n relation:\n cardinality: \"1\"\n - node:\n uri: global.component.button\n role: apply action\n relation:\n cardinality: \"1\"\n relation:\n cardinality: \"1\"\n relation:\n cardinality: \"1\"";
|
|
9
|
+
ds:anatomyClassic "https://www.figma.com/design/I4WpvwMuQI6v1qhgUl63Sx/Landscape-Pragma-components?node-id=25-78&t=iG2ObZ6Q1XG2A2MB-4\n\nTable 41\n\n";
|
|
10
|
+
ds:usage "### When to use\n\n**Filter by a percentage range**\n\nUse for result sets whose pass rate is represented by inclusive lower and upper values on a fixed 0-100 scale.\n\n**Persist range in the URL**\n\nUse only where the shared page-parameter manager’s `passRateFrom` and `passRateTo` keys are the intended source of truth.\n\n### When not to use\n\n**Choose one threshold**\n\nA workflow that requires selecting only a minimum or maximum value, not a range.\n\n**Incorrect pattern**: Using Pass Rate Filter to constrain input when a single numeric bound is the actual requirement.\n\n**Remediation strategy**: Use a single `Input` with type `\"number\"` and appropriate `min`/`max` constraints, or use a single-value slider component if visual range selection is preferred.\n\n**Edit a non-percentage range**\n\nA domain-specific control problem where the valid values are not 0-100 or percent units.\n\n**Incorrect pattern**: Adapting Pass Rate Filter for temperature ranges, price bands, or other non-percentage scales.\n\n**Remediation strategy**: Use a domain-specific range control designed for the actual numeric scale and units. For percentage ranges outside 0-100, reconsider the UX or build a custom range component.\n\n**Reusable controlled range input**\n\nA use case where the range component must accept values and callbacks as props rather than being coupled to page parameters.\n\n**Incorrect pattern**: Wrapping Pass Rate Filter and trying to pass custom `from` and `to` values as props to override the page-parameter binding.\n\n**Remediation strategy**: Build a controlled range component that accepts `min`, `max`, `onChange`, and `onReset` props. Alternatively, use a generic range slider library or Canonical’s form components directly.";
|
|
11
|
+
ds:guidelines "### Accessibility\n\n- Canonical `Input` supplies visible `From` and `To` labels, native number inputs, and field error rendering through `getFormikError`.\n- HTML `min` and `max` attributes mirror the current opposite bound, while Yup supplies validation messages after Formik interaction.\n- Apply is a native submit button disabled when `formik.isValid` is false; Reset is a native `type=\"button\"`.\n- The adjacent percent signs are plain text and are not locally connected to the inputs with `aria-describedby` or an accessible unit label.\n\n### Content\n\n- Visible copy is fixed to `Pass rate`, `From`, `To`, `%`, `Reset`, and `Apply`, plus hard-coded Yup validation messages.\n- Badge state is computed directly: From greater than 0 adds one and To less than 100 adds one. Values outside those comparisons do not increase the badge count further.\n- Reset writes exactly 0 and 100; it does not call Formik’s `resetForm` directly.\n\n### Internationalization\n\n- All labels, actions, units, and validation messages are hard-coded in English. The component exposes no translation or content props.\n- Number parsing and formatting are delegated to the browser number input and Yup; no locale-specific display formatting is applied.\n\n### Keyboard\n\n- DOM order is From, To, Reset, Apply. Enter submits the Formik form when normal form semantics permit and validation succeeds.\n- The component adds no custom arrow-key, focus-opening, focus-return, or Escape behavior; menu behavior comes from `TableFilter`/Canonical `ContextualMenu`.\n\n### Device and layout\n\n- The form uses fixed `13rem` input widths, horizontal input/suffix rows, side padding, and right-aligned actions separated by a top border.\n- No media query or narrow-width variant is defined locally; consumers should verify the custom menu can accommodate the fixed field width.";
|
|
12
|
+
ds:tier ds:apps_landscape;
|
|
13
|
+
ds:documentationStage ds:tag.specialadoption-docs.
|
|
@@ -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_landscape.component.password_constraints a ds:Component;
|
|
4
6
|
ds:name "PasswordConstraints";
|
|
@@ -8,6 +10,7 @@ ds:apps_landscape.component.password_constraints a ds:Component;
|
|
|
8
10
|
ds:usage "**When to Use**\n\n- **Password Creation:** Use in registration or \"change password\" forms where specific complexity rules are enforced.\n- **Real-time Validation:** Use to provide immediate feedback as the user types, rather than waiting for form submission.\n\n**When Not to Use**\n\n- **Simple Inputs:** Do not use for standard text fields that do not require complex validation logic.\n- **Hidden logic:** Do not use if the password requirements are not publicly disclosed to the user.";
|
|
9
11
|
ds:guidelines "Do not rely solely on color (red/green) to convey the state of a constraint. The component correctly uses icons (checkmarks/crosses) alongside text to ensure users with color blindness can distinguish between passed and failed states.\n\n\n\nValidation logic triggers on every keystroke (`password` prop update). Ensure the icons transition smoothly between states to prevent visual jarring (flickering).\n\n";
|
|
10
12
|
ds:tier ds:apps_landscape;
|
|
13
|
+
ds:documentationStage ds:tag.specialadoption-docs;
|
|
11
14
|
ds:hasProperty [
|
|
12
15
|
a ds:Property;
|
|
13
16
|
ds:name "password";
|
|
@@ -0,0 +1,100 @@
|
|
|
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.component.progress_bar a ds:Component;
|
|
6
|
+
ds:name "Progress Bar";
|
|
7
|
+
ds:summary "Progress Bar shows determinate operation progress with a semantic `progressbar`, a visual fill, and optional percentage and estimated-time labels. It clamps progress to `0`–`100`, rounds it to the nearest integer, and includes the percentage and ETA in `aria-valuetext` when the ETA is enabled.\n\nThe component can stretch its bar to the available width and show a decorative spinner for work in flight. A `null` estimate displays configurable estimating copy; estimates of five seconds or less display configurable almost-done copy; longer estimates are formatted into seconds, minutes, or hours.";
|
|
8
|
+
ds:anatomyDsl "node:\n uri: ds:apps_landscape.component.progress_bar_with_eta\n role: progress assembly\n edges:\n - node:\n uri: global.component.icon\n role: supplemental activity signal\n description: Decorative spinner shown while work is actively in flight.\n relation:\n cardinality: \"0..1\"\n condition: loading is true\n - node:\n role: indicator and labels\n edges:\n - node:\n semantic: progressbar\n role: determinate progress indicator\n description: Reports the rounded and clamped percentage with an accessible name and value text.\n edges:\n - node:\n role: visual completion indicator\n description: Uses an inline percentage width to show completed progress.\n relation:\n cardinality: \"1\"\n relation:\n cardinality: \"1\"\n - node:\n role: visible progress value\n description: Displays the rounded and clamped percentage without duplicating it in the accessibility tree.\n relation:\n cardinality: \"0..1\"\n condition: showPercentage is true\n - node:\n role: visible remaining time\n description: Displays a formatted estimate or configurable estimating or almost-done copy without duplicating it in the accessibility tree.\n relation:\n cardinality: \"0..1\"\n condition: showEta is true\n relation:\n cardinality: \"1\"";
|
|
9
|
+
ds:anatomyClassic "https://www.figma.com/design/I4WpvwMuQI6v1qhgUl63Sx/Landscape-Pragma-components?node-id=53-18&t=iG2ObZ6Q1XG2A2MB-4\n\nTable 72\n\n";
|
|
10
|
+
ds:usage "### When to use\n\n**Known-length operations**\n\nUse when an operation can report a meaningful completion percentage, such as preparing an export or applying a managed operation.\n\n**Progress with a useful estimate**\n\nUse when remaining time helps the user judge whether to wait, continue other work, or return later. Pass `null` while the estimate is still being calculated.\n\n**Compact status rows**\n\nUse in tables, side panels, and operation details where the percentage and ETA need to remain aligned with a compact progress track.\n\n### When not to use\n\n**Indeterminate loading**\n\nThe operation cannot provide a meaningful percentage.\n\n**Incorrect pattern**: Advancing a synthetic percentage while waiting for an unknown-duration request.\n\n**Remediation strategy**: Use Loading State or a contextual pending indicator until determinate progress is available.\n\n**Completion without ongoing work**\n\nThe operation is already complete and the user primarily needs its final status or result.\n\n**Incorrect pattern**: Leaving a 100% progress bar in a list indefinitely as the only success indication.\n\n**Remediation strategy**: Replace it with the relevant completed status and expose the resulting action or output.\n\n**Multiple unrelated operations in one indicator**\n\nSeveral tasks have independent durations or failure states.\n\n**Incorrect pattern**: Averaging unrelated task percentages into one bar without explaining what completion means.\n\n**Remediation strategy**: Show progress per operation or provide a clearly defined aggregate with separate failure reporting.";
|
|
11
|
+
ds:guidelines "### Accessibility\n\n- Give each progressbar a specific accessible name. Use `labelledBy` when a visible operation label already exists; otherwise provide `label` rather than relying on the generic default.\n- Keep visible percentage and ETA text hidden from assistive technology because `aria-valuenow` and `aria-valuetext` already report them.\n- Do not use the decorative loading spinner as the only state signal. The semantic progressbar must continue to describe the operation.\n- Announce failures and completion separately; the component exposes progress values but no live-region, error, or completed-state semantics.\n\n### Content\n\n- Keep estimating and almost-done labels concise enough for the fixed ETA column.\n- Ensure the estimate describes the same operation as the percentage. Do not combine independent sources with different update timing.\n- Replace the component with a durable final status after completion when the surrounding workflow remains visible.\n\n### Responsive behavior\n\n- The default track has an `8rem` maximum width; use `fullWidth` when the bar should consume remaining container space.\n- The percentage reserves `2.5rem` and ETA reserves `6rem`. Long ETA copy truncates with an ellipsis, so preserve the full state in the accessible value text.\n- Test narrow table cells and translated labels. The content row does not wrap.\n\n### Keyboard\n\n- Progress Bar with ETA is read-only and contains no focusable controls.\n- Do not add the progressbar or decorative spinner to the tab order.\n- Keep cancellation, retry, or details actions as adjacent semantic controls owned by the surrounding workflow.\n\n### Internationalization\n\n- Supply localized `label`, `estimatingLabel`, and `almostDoneLabel` values; the source defaults are English.\n- The built-in duration formatter uses fixed abbreviated units (`h`, `m`, and `s`) rather than `Intl.DurationFormat` or localized unit strings.\n- Percentage formatting uses an integer followed by `%` and does not use locale-aware percent formatting.";
|
|
12
|
+
ds:tier ds:apps_landscape;
|
|
13
|
+
ds:documentationStage ds:tag.specialadoption-docs;
|
|
14
|
+
ds:hasProperty [
|
|
15
|
+
a ds:Property;
|
|
16
|
+
ds:name "`ProgressBar.progress`";
|
|
17
|
+
ds:summary "Current completion percentage.";
|
|
18
|
+
ds:propertyType "number";
|
|
19
|
+
ds:defaultValue "—";
|
|
20
|
+
ds:constraints "Rounded to the nearest integer and clamped to `0`–`100`; callers must provide a finite number. "
|
|
21
|
+
], [
|
|
22
|
+
a ds:Property;
|
|
23
|
+
ds:name "`ProgressBar.secondsRemaining`";
|
|
24
|
+
ds:summary "Estimated seconds remaining, or an unresolved estimate. ";
|
|
25
|
+
ds:propertyType "number";
|
|
26
|
+
ds:defaultValue "—";
|
|
27
|
+
ds:constraints "Accepts `null` to show estimating copy; values at or below five seconds show almost-done copy. "
|
|
28
|
+
], [
|
|
29
|
+
a ds:Property;
|
|
30
|
+
ds:name "`ProgressBar.fullWidth`";
|
|
31
|
+
ds:summary "Removes the progress track's default maximum width. ";
|
|
32
|
+
ds:propertyType "boolean";
|
|
33
|
+
ds:defaultValue "false";
|
|
34
|
+
ds:constraints "The outer wrapper remains full width in either mode. ";
|
|
35
|
+
ds:optional "true"
|
|
36
|
+
], [
|
|
37
|
+
a ds:Property;
|
|
38
|
+
ds:name "`ProgressBar.loading`";
|
|
39
|
+
ds:summary "Adds a decorative spinner before the progress content. ";
|
|
40
|
+
ds:propertyType "boolean";
|
|
41
|
+
ds:defaultValue "false";
|
|
42
|
+
ds:constraints "The spinner is `aria-hidden`; determinate progress remains represented by the progressbar. ";
|
|
43
|
+
ds:optional "true"
|
|
44
|
+
], [
|
|
45
|
+
a ds:Property;
|
|
46
|
+
ds:name "`ProgressBar.label`";
|
|
47
|
+
ds:summary "Accessible name used when no labelled-by relationship exists. ";
|
|
48
|
+
ds:propertyType "text";
|
|
49
|
+
ds:defaultValue "`Progress`";
|
|
50
|
+
ds:constraints "Ignored when `labelledBy` is provided.";
|
|
51
|
+
ds:optional "true"
|
|
52
|
+
], [
|
|
53
|
+
a ds:Property;
|
|
54
|
+
ds:name "`ProgressBar.labelledBy`";
|
|
55
|
+
ds:summary "ID of an existing visible label for the progressbar. ";
|
|
56
|
+
ds:propertyType "text";
|
|
57
|
+
ds:defaultValue "—";
|
|
58
|
+
ds:constraints "Suppresses `aria-label`; the referenced element must exist and identify this operation. ";
|
|
59
|
+
ds:optional "true"
|
|
60
|
+
], [
|
|
61
|
+
a ds:Property;
|
|
62
|
+
ds:name "`ProgressBar.className`";
|
|
63
|
+
ds:summary "Additional class names applied to the outer wrapper. ";
|
|
64
|
+
ds:propertyType "text";
|
|
65
|
+
ds:defaultValue "—";
|
|
66
|
+
ds:constraints "Use for placement only; do not obscure the indicator or visible status labels. ";
|
|
67
|
+
ds:optional "true"
|
|
68
|
+
], [
|
|
69
|
+
a ds:Property;
|
|
70
|
+
ds:name "`ProgressBar.showPercentage`";
|
|
71
|
+
ds:summary "Controls the visible percentage label.";
|
|
72
|
+
ds:propertyType "boolean";
|
|
73
|
+
ds:defaultValue "true";
|
|
74
|
+
ds:constraints "The semantic current value remains available when the visible label is hidden. ";
|
|
75
|
+
ds:optional "true"
|
|
76
|
+
], [
|
|
77
|
+
a ds:Property;
|
|
78
|
+
ds:name "`ProgressBar.showEta`";
|
|
79
|
+
ds:summary "Controls the visible ETA and ETA portion of value text. ";
|
|
80
|
+
ds:propertyType "boolean";
|
|
81
|
+
ds:defaultValue "true";
|
|
82
|
+
ds:constraints "When false, `aria-valuetext` contains only the percentage. ";
|
|
83
|
+
ds:optional "true"
|
|
84
|
+
], [
|
|
85
|
+
a ds:Property;
|
|
86
|
+
ds:name "`ProgressBar.estimatingLabel`";
|
|
87
|
+
ds:summary "Copy displayed while the estimate is unresolved.";
|
|
88
|
+
ds:propertyType "text";
|
|
89
|
+
ds:defaultValue "`Estimating...`";
|
|
90
|
+
ds:constraints "Used only when `secondsRemaining` is `null`. ";
|
|
91
|
+
ds:optional "true"
|
|
92
|
+
], [
|
|
93
|
+
a ds:Property;
|
|
94
|
+
ds:name "`ProgressBar.almostDoneLabel`";
|
|
95
|
+
ds:summary "Copy displayed when little time remains.";
|
|
96
|
+
ds:propertyType "text";
|
|
97
|
+
ds:defaultValue "`Almost done`";
|
|
98
|
+
ds:constraints "Used when `secondsRemaining` is five seconds or less, including negative input. ";
|
|
99
|
+
ds:optional "true"
|
|
100
|
+
].
|
|
@@ -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.component.read_only_field a ds:Component;
|
|
6
|
+
ds:name "Read-Only Field";
|
|
7
|
+
ds:summary "Read-Only Field presents an immutable value in a form-like vertical field layout. It always renders a label element, a Canonical Tooltip wrapper positioned bottom-left with `followMouse`, a full-width locked-value row, and a lock icon. A truthy string is shown as the value; every falsy value falls back to the shared `NoData` text (`---`).\n\nThis is display markup, not a native input with `readOnly` or `disabled`. The optional tooltip can explain why the value cannot be changed, but the current trigger and follow-pointer behavior do not establish an equivalent persistent explanation for keyboard or touch users.";
|
|
8
|
+
ds:anatomyDsl "node:\n uri: ds:apps_landscape.component.read_only_field\n styles:\n layout.display: flex\n layout.direction: column\n edges:\n - node:\n semantic: label\n role: read-only value name\n relation:\n cardinality: \"1\"\n - node:\n uri: global.component.tooltip\n role: locked-state explanation\n edges:\n - node:\n role: locked value row\n styles:\n layout.display: flex\n layout.align: center\n layout.justify: space-between\n edges:\n - node:\n role: displayed value or no-data fallback\n relation:\n cardinality: \"1\"\n - node:\n uri: global.component.icon\n role: locked-state indicator\n name: lock-locked\n relation:\n cardinality: \"1\"\n relation:\n cardinality: \"1\"\n relation:\n cardinality: \"1\"";
|
|
9
|
+
ds:anatomyClassic "https://www.figma.com/design/I4WpvwMuQI6v1qhgUl63Sx/Landscape-Pragma-components?node-id=25-81&t=iG2ObZ6Q1XG2A2MB-4\n\nTable 45\n\n";
|
|
10
|
+
ds:usage "### When to use\n\n**Immutable form context**\n\nUse when an immutable string value belongs among editable fields in a form or review workflow and should retain field-like alignment.\n\n**Explain locked state**\n\nUse when a short explanation helps users understand why editing is unavailable.\n\n**Show absent immutable data**\n\nUse when the shared `---` no-data convention accurately represents a missing string in the surrounding form context.\n\n### When not to use\n\n**Temporarily unavailable input**\n\nA form field where editing will later become available to the user after permission is granted or a prerequisite is satisfied.\n\n**Incorrect pattern**: Rendering a disabled `Input` component temporarily while data is loading or permissions are being checked, and then showing Read-Only Field instead.\n\n**Remediation strategy**: Use a native `Input` with `disabled` attribute, or use a state-driven component that shows either editable or locked presentation based on permission/loading state. Read-Only Field signals permanent immutability.\n\n**General detail display**\n\nA view showing arbitrary metadata or summary information outside a form context—such as in a detail panel or summary card.\n\n**Incorrect pattern**: Using Read-Only Field to display structured data like account status, creation date, or author information alongside editable fields in a non-form layout.\n\n**Remediation strategy**: Use a definition list (`<dl>`), data table, or information grid component. Read-Only Field is designed for form-like vertical layouts where field-level alignment matters.\n\n**Selectable or copy-critical values**\n\nA value that users need to select, copy, or reveal—especially if truncation, structured/non-string content, or a dedicated copy action is necessary.\n\n**Incorrect pattern**: Rendering a long API key, token, or sensitive string in Read-Only Field and expecting users to be able to select and copy it easily.\n\n**Remediation strategy**: Use a dedicated reveal/copy component, code display component, or data cell with selection and copy affordances. Read-Only Field provides none of these contracts.\n\n**Required explanation on touch or keyboard**\n\nA scenario where the reason for immutability must be discoverable without hover or a mouse pointer.\n\n**Incorrect pattern**: Relying on `tooltipMessage` as the only way to explain why a field is locked, especially in a touch interface or for keyboard-only navigation.\n\n**Remediation strategy**: Provide the explanation in persistent text before or after the field (not just in a tooltip). Use `tooltipMessage` only as supplementary, and ensure the workflow remains complete and clear without hovering.";
|
|
11
|
+
ds:guidelines "### Accessibility\n\n- Treat this as text display, not a native form control. The `<label>` has no `htmlFor`, and the value row has no labelled-by relationship.\n- The lock icon has no source-provided `aria-hidden` or accessible label. Ensure the visible context communicates immutability without depending on the icon.\n- Do not depend on the `followMouse` tooltip; keyboard and touch users need the same explanation in persistent text when it is necessary to understand or complete the task.\n- The literal required asterisk has no hidden explanation and no `aria-required` semantics. Do not assume it communicates a required contract to assistive technology.\n- The `---` fallback must be understood from surrounding context; the shared NoData component adds no expanded accessible phrase.\n\n### Content\n\n- Explain why the value is locked and, when useful, where it can be changed.\n- Use concise labels parallel to neighboring editable fields.\n- Distinguish a missing value from an intentionally empty string before passing data; both become `---` under the current truthiness check.\n- Do not pass formatted React content, links, or controls as the value; the public type is string-only.\n\n### Keyboard\n\n- The component defines no keyboard handlers and should not itself add a tab stop.\n- Verify the installed Tooltip behavior before relying on keyboard discovery; this wrapper supplies no explicit focusable trigger.\n- Put any required action, such as navigating to where the value can be changed, in a separate labelled control rather than inside the locked row.\n\n### Responsive behavior\n\n- The field and locked row use flex layout at every width. The value and icon are spaced apart, and the row is full width.\n- Source defines no overflow, truncation, word-break, or responsive breakpoint. Long unbroken values can compete with the lock icon; callers must avoid unsuitable content or provide a different display pattern.\n- The Tooltip trigger wrapper is forced to full width, while the tooltip is positioned bottom-left and follows pointer movement.\n\n### Internationalization\n\n- Externalize `label` and `tooltipMessage` at the owning feature.\n- Allow translated labels and explanations to wrap in surrounding layout; no truncation is provided.\n- The required marker and no-data text are fixed source output rather than localizable props. `NoData` currently renders `---`.";
|
|
12
|
+
ds:tier ds:apps_landscape;
|
|
13
|
+
ds:documentationStage ds:tag.specialadoption-docs;
|
|
14
|
+
ds:hasProperty [
|
|
15
|
+
a ds:Property;
|
|
16
|
+
ds:name "`label`";
|
|
17
|
+
ds:summary "Supplies text for the always-rendered label element. ";
|
|
18
|
+
ds:propertyType "text";
|
|
19
|
+
ds:defaultValue "—";
|
|
20
|
+
ds:constraints "TypeScript: `string`. The label has no `htmlFor` and does not programmatically label a control. ";
|
|
21
|
+
ds:optional "true"
|
|
22
|
+
], [
|
|
23
|
+
a ds:Property;
|
|
24
|
+
ds:name "`value`";
|
|
25
|
+
ds:summary "Supplies the immutable value displayed in the locked row. ";
|
|
26
|
+
ds:propertyType "text";
|
|
27
|
+
ds:defaultValue "—";
|
|
28
|
+
ds:constraints "TypeScript: `string`. Every falsy value, including `\"\"`, renders shared `NoData` text `---`; whitespace-only strings remain visible. ";
|
|
29
|
+
ds:optional "true"
|
|
30
|
+
], [
|
|
31
|
+
a ds:Property;
|
|
32
|
+
ds:name "`tooltipMessage`";
|
|
33
|
+
ds:summary "Supplies the message passed to Canonical Tooltip.";
|
|
34
|
+
ds:propertyType "text";
|
|
35
|
+
ds:defaultValue "—";
|
|
36
|
+
ds:constraints "TypeScript: `string`. The Tooltip renders even when this prop is absent and uses `followMouse`. ";
|
|
37
|
+
ds:optional "true"
|
|
38
|
+
], [
|
|
39
|
+
a ds:Property;
|
|
40
|
+
ds:name "`required`";
|
|
41
|
+
ds:summary "Prefixes the label with the literal text `*` . ";
|
|
42
|
+
ds:propertyType "boolean";
|
|
43
|
+
ds:defaultValue "—";
|
|
44
|
+
ds:constraints "TypeScript: `boolean`. Adds no native `required`, `aria-required`, validation, or explanatory legend. ";
|
|
45
|
+
ds:optional "true"
|
|
46
|
+
].
|