@salesforce/afv-skills 1.13.0 → 1.15.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/package.json +3 -3
- package/skills/applying-slds/SKILL.md +322 -0
- package/skills/applying-slds/checklists.md +83 -0
- package/skills/applying-slds/examples.md +283 -0
- package/skills/applying-slds/guidance/README.md +83 -0
- package/skills/applying-slds/guidance/blueprints-index.md +213 -0
- package/skills/applying-slds/guidance/icons-guidance.md +186 -0
- package/skills/applying-slds/guidance/overviews/borders.md +236 -0
- package/skills/applying-slds/guidance/overviews/color.md +266 -0
- package/skills/applying-slds/guidance/overviews/display-density.md +366 -0
- package/skills/applying-slds/guidance/overviews/icons.md +240 -0
- package/skills/applying-slds/guidance/overviews/illustrations.md +235 -0
- package/skills/applying-slds/guidance/overviews/shadows.md +176 -0
- package/skills/applying-slds/guidance/overviews/spacing.md +216 -0
- package/skills/applying-slds/guidance/overviews/typography.md +323 -0
- package/skills/applying-slds/guidance/overviews/utilities.md +542 -0
- package/skills/applying-slds/guidance/slds-development-guide.md +288 -0
- package/skills/applying-slds/guidance/styling-hooks/borders.md +202 -0
- package/skills/applying-slds/guidance/styling-hooks/color/expressive-palette-hooks.md +153 -0
- package/skills/applying-slds/guidance/styling-hooks/color/index.md +171 -0
- package/skills/applying-slds/guidance/styling-hooks/color/semantic/accent-hooks.md +204 -0
- package/skills/applying-slds/guidance/styling-hooks/color/semantic/feedback-hooks.md +768 -0
- package/skills/applying-slds/guidance/styling-hooks/color/semantic/surface-hooks.md +337 -0
- package/skills/applying-slds/guidance/styling-hooks/color/system-hooks.md +132 -0
- package/skills/applying-slds/guidance/styling-hooks/index.md +327 -0
- package/skills/applying-slds/guidance/styling-hooks/shadows.md +238 -0
- package/skills/applying-slds/guidance/styling-hooks/spacing.md +254 -0
- package/skills/applying-slds/guidance/styling-hooks/typography.md +448 -0
- package/skills/applying-slds/guidance/utilities/alignment.md +119 -0
- package/skills/applying-slds/guidance/utilities/borders.md +131 -0
- package/skills/applying-slds/guidance/utilities/box.md +125 -0
- package/skills/applying-slds/guidance/utilities/color.md +165 -0
- package/skills/applying-slds/guidance/utilities/dark-mode.md +111 -0
- package/skills/applying-slds/guidance/utilities/description-list.md +168 -0
- package/skills/applying-slds/guidance/utilities/floats.md +117 -0
- package/skills/applying-slds/guidance/utilities/grid.md +264 -0
- package/skills/applying-slds/guidance/utilities/horizontal-list.md +110 -0
- package/skills/applying-slds/guidance/utilities/hyphenation.md +84 -0
- package/skills/applying-slds/guidance/utilities/index.md +205 -0
- package/skills/applying-slds/guidance/utilities/interactions.md +89 -0
- package/skills/applying-slds/guidance/utilities/layout.md +109 -0
- package/skills/applying-slds/guidance/utilities/line-clamp.md +131 -0
- package/skills/applying-slds/guidance/utilities/margin.md +155 -0
- package/skills/applying-slds/guidance/utilities/media-object.md +161 -0
- package/skills/applying-slds/guidance/utilities/name-value-list.md +152 -0
- package/skills/applying-slds/guidance/utilities/padding.md +155 -0
- package/skills/applying-slds/guidance/utilities/position.md +177 -0
- package/skills/applying-slds/guidance/utilities/print.md +114 -0
- package/skills/applying-slds/guidance/utilities/scrollable.md +126 -0
- package/skills/applying-slds/guidance/utilities/sizing.md +190 -0
- package/skills/applying-slds/guidance/utilities/themes.md +121 -0
- package/skills/applying-slds/guidance/utilities/truncate.md +127 -0
- package/skills/applying-slds/guidance/utilities/typography.md +166 -0
- package/skills/applying-slds/guidance/utilities/vertical-list.md +166 -0
- package/skills/applying-slds/guidance/utilities/visibility.md +228 -0
- package/skills/applying-slds/metadata/README.md +84 -0
- package/skills/applying-slds/metadata/blueprints/components/accordion.yaml +304 -0
- package/skills/applying-slds/metadata/blueprints/components/activity-timeline.yaml +92 -0
- package/skills/applying-slds/metadata/blueprints/components/alert.yaml +103 -0
- package/skills/applying-slds/metadata/blueprints/components/app-launcher.yaml +94 -0
- package/skills/applying-slds/metadata/blueprints/components/avatar-group.yaml +81 -0
- package/skills/applying-slds/metadata/blueprints/components/avatar.yaml +97 -0
- package/skills/applying-slds/metadata/blueprints/components/badges.yaml +102 -0
- package/skills/applying-slds/metadata/blueprints/components/brand-band.yaml +198 -0
- package/skills/applying-slds/metadata/blueprints/components/breadcrumbs.yaml +95 -0
- package/skills/applying-slds/metadata/blueprints/components/builder-header.yaml +192 -0
- package/skills/applying-slds/metadata/blueprints/components/button-groups.yaml +82 -0
- package/skills/applying-slds/metadata/blueprints/components/button-icons.yaml +295 -0
- package/skills/applying-slds/metadata/blueprints/components/buttons.yaml +230 -0
- package/skills/applying-slds/metadata/blueprints/components/cards.yaml +124 -0
- package/skills/applying-slds/metadata/blueprints/components/carousel.yaml +140 -0
- package/skills/applying-slds/metadata/blueprints/components/chat.yaml +179 -0
- package/skills/applying-slds/metadata/blueprints/components/checkbox-button-group.yaml +192 -0
- package/skills/applying-slds/metadata/blueprints/components/checkbox-button.yaml +204 -0
- package/skills/applying-slds/metadata/blueprints/components/checkbox-toggle.yaml +177 -0
- package/skills/applying-slds/metadata/blueprints/components/checkbox.yaml +108 -0
- package/skills/applying-slds/metadata/blueprints/components/color-picker.yaml +172 -0
- package/skills/applying-slds/metadata/blueprints/components/combobox.yaml +136 -0
- package/skills/applying-slds/metadata/blueprints/components/counter.yaml +147 -0
- package/skills/applying-slds/metadata/blueprints/components/data-tables.yaml +157 -0
- package/skills/applying-slds/metadata/blueprints/components/datepickers.yaml +130 -0
- package/skills/applying-slds/metadata/blueprints/components/datetime-picker.yaml +155 -0
- package/skills/applying-slds/metadata/blueprints/components/docked-composer.yaml +201 -0
- package/skills/applying-slds/metadata/blueprints/components/docked-form-footer.yaml +161 -0
- package/skills/applying-slds/metadata/blueprints/components/docked-utility-bar.yaml +175 -0
- package/skills/applying-slds/metadata/blueprints/components/drop-zone.yaml +115 -0
- package/skills/applying-slds/metadata/blueprints/components/dueling-picklist.yaml +196 -0
- package/skills/applying-slds/metadata/blueprints/components/dynamic-icons.yaml +128 -0
- package/skills/applying-slds/metadata/blueprints/components/dynamic-menu.yaml +141 -0
- package/skills/applying-slds/metadata/blueprints/components/expandable-section.yaml +115 -0
- package/skills/applying-slds/metadata/blueprints/components/expression.yaml +143 -0
- package/skills/applying-slds/metadata/blueprints/components/feeds.yaml +125 -0
- package/skills/applying-slds/metadata/blueprints/components/file-selector.yaml +154 -0
- package/skills/applying-slds/metadata/blueprints/components/files.yaml +119 -0
- package/skills/applying-slds/metadata/blueprints/components/form-element.yaml +145 -0
- package/skills/applying-slds/metadata/blueprints/components/global-header.yaml +120 -0
- package/skills/applying-slds/metadata/blueprints/components/global-navigation.yaml +100 -0
- package/skills/applying-slds/metadata/blueprints/components/icons.yaml +138 -0
- package/skills/applying-slds/metadata/blueprints/components/illustration.yaml +205 -0
- package/skills/applying-slds/metadata/blueprints/components/input.yaml +151 -0
- package/skills/applying-slds/metadata/blueprints/components/list-builder.yaml +127 -0
- package/skills/applying-slds/metadata/blueprints/components/lookups.yaml +132 -0
- package/skills/applying-slds/metadata/blueprints/components/map.yaml +118 -0
- package/skills/applying-slds/metadata/blueprints/components/menus.yaml +134 -0
- package/skills/applying-slds/metadata/blueprints/components/modals.yaml +152 -0
- package/skills/applying-slds/metadata/blueprints/components/notifications.yaml +88 -0
- package/skills/applying-slds/metadata/blueprints/components/page-headers.yaml +135 -0
- package/skills/applying-slds/metadata/blueprints/components/panels.yaml +149 -0
- package/skills/applying-slds/metadata/blueprints/components/path.yaml +154 -0
- package/skills/applying-slds/metadata/blueprints/components/picklist.yaml +125 -0
- package/skills/applying-slds/metadata/blueprints/components/pills.yaml +154 -0
- package/skills/applying-slds/metadata/blueprints/components/popovers.yaml +120 -0
- package/skills/applying-slds/metadata/blueprints/components/progress-bar.yaml +110 -0
- package/skills/applying-slds/metadata/blueprints/components/progress-indicator.yaml +133 -0
- package/skills/applying-slds/metadata/blueprints/components/progress-ring.yaml +102 -0
- package/skills/applying-slds/metadata/blueprints/components/prompt.yaml +126 -0
- package/skills/applying-slds/metadata/blueprints/components/publishers.yaml +178 -0
- package/skills/applying-slds/metadata/blueprints/components/radio-button-group.yaml +172 -0
- package/skills/applying-slds/metadata/blueprints/components/radio-group.yaml +112 -0
- package/skills/applying-slds/metadata/blueprints/components/rich-text-editor.yaml +135 -0
- package/skills/applying-slds/metadata/blueprints/components/scoped-notifications.yaml +188 -0
- package/skills/applying-slds/metadata/blueprints/components/scoped-tabs.yaml +97 -0
- package/skills/applying-slds/metadata/blueprints/components/select.yaml +127 -0
- package/skills/applying-slds/metadata/blueprints/components/setup-assistant.yaml +152 -0
- package/skills/applying-slds/metadata/blueprints/components/slider.yaml +111 -0
- package/skills/applying-slds/metadata/blueprints/components/spinners.yaml +135 -0
- package/skills/applying-slds/metadata/blueprints/components/split-view.yaml +112 -0
- package/skills/applying-slds/metadata/blueprints/components/summary-detail.yaml +103 -0
- package/skills/applying-slds/metadata/blueprints/components/tabs.yaml +138 -0
- package/skills/applying-slds/metadata/blueprints/components/textarea.yaml +116 -0
- package/skills/applying-slds/metadata/blueprints/components/tiles.yaml +108 -0
- package/skills/applying-slds/metadata/blueprints/components/timepicker.yaml +111 -0
- package/skills/applying-slds/metadata/blueprints/components/toast.yaml +154 -0
- package/skills/applying-slds/metadata/blueprints/components/tooltips.yaml +107 -0
- package/skills/applying-slds/metadata/blueprints/components/tree-grid.yaml +116 -0
- package/skills/applying-slds/metadata/blueprints/components/trees.yaml +116 -0
- package/skills/applying-slds/metadata/blueprints/components/trial-bar.yaml +112 -0
- package/skills/applying-slds/metadata/blueprints/components/vertical-navigation.yaml +130 -0
- package/skills/applying-slds/metadata/blueprints/components/vertical-tabs.yaml +140 -0
- package/skills/applying-slds/metadata/blueprints/components/visual-picker.yaml +150 -0
- package/skills/applying-slds/metadata/blueprints/components/welcome-mat.yaml +136 -0
- package/skills/applying-slds/metadata/hooks-index.json +6272 -0
- package/skills/applying-slds/metadata/icon-metadata.json +38466 -0
- package/skills/applying-slds/metadata/utilities-index.json +21912 -0
- package/skills/applying-slds/references/component-selection.md +112 -0
- package/skills/applying-slds/references/icons-decision-guide.md +124 -0
- package/skills/applying-slds/references/styling-decision-guide.md +228 -0
- package/skills/applying-slds/references/utilities-quick-ref.md +125 -0
- package/skills/applying-slds/scripts/search-blueprints.cjs +117 -0
- package/skills/applying-slds/scripts/search-hooks.cjs +139 -0
- package/skills/applying-slds/scripts/search-icons.cjs +174 -0
- package/skills/applying-slds/scripts/search-utilities.cjs +161 -0
- package/skills/building-ui-bundle-app/SKILL.md +33 -8
- package/skills/generating-custom-application/SKILL.md +1 -1
- package/skills/generating-custom-lightning-type/SKILL.md +17 -39
- package/skills/generating-custom-lightning-type/assets/primitive-types-and-constraints.md +41 -0
- package/skills/generating-custom-lightning-type/references/widget-rendition.md +124 -0
- package/skills/generating-ui-bundle-custom-app/SKILL.md +93 -0
- package/skills/generating-ui-bundle-custom-app/docs/configure-metadata-custom-application.md +70 -0
- package/skills/generating-ui-bundle-metadata/SKILL.md +39 -1
- package/skills/investigating-agentforce-architecture/README.md +156 -0
- package/skills/investigating-agentforce-architecture/SKILL.md +230 -0
- package/skills/investigating-agentforce-architecture/assets/cli/describe_sobject.yaml +16 -0
- package/skills/investigating-agentforce-architecture/assets/cli/describe_tooling_sobject.yaml +17 -0
- package/skills/investigating-agentforce-architecture/assets/cli/list_metadata_genaiprompttemplate.yaml +17 -0
- package/skills/investigating-agentforce-architecture/assets/cli/org_display.yaml +15 -0
- package/skills/investigating-agentforce-architecture/assets/cli/retrieve_genai_plugin.yaml +18 -0
- package/skills/investigating-agentforce-architecture/assets/cli/show_access_token.yaml +27 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/action_tree.mmd +20 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/data_flow.mmd +19 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/dependency_graph.mmd +19 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/invocation_sequence.mmd +20 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/planner_state.mmd +18 -0
- package/skills/investigating-agentforce-architecture/assets/soql/apex_class_bodies_by_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/apex_class_bodies_by_names.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/bot_definition_details.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/bot_version_lookup.soql +4 -0
- package/skills/investigating-agentforce-architecture/assets/soql/flow_definition_by_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/flow_definition_ids_by_names.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/flow_definition_view_by_durable_ids.soql +4 -0
- package/skills/investigating-agentforce-architecture/assets/soql/flow_metadata_by_id.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/functions_by_plugins.soql +5 -0
- package/skills/investigating-agentforce-architecture/assets/soql/planner_attrs_by_parent_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/planner_bundle_functions.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/planner_definition_by_agent_chain.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/plugin_functions_by_plugin_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/plugin_instructions_by_plugin_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/plugins_by_planner.soql +4 -0
- package/skills/investigating-agentforce-architecture/references/architecture_sections.md +243 -0
- package/skills/investigating-agentforce-architecture/references/contract.json +244 -0
- package/skills/investigating-agentforce-architecture/references/soql_fields.md +512 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/__init__.py +1 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/fs_guard.py +329 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/paths.py +110 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/runtime.py +59 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/sql.py +10 -0
- package/skills/investigating-agentforce-architecture/scripts/cache_check.py +234 -0
- package/skills/investigating-agentforce-architecture/scripts/config.py +131 -0
- package/skills/investigating-agentforce-architecture/scripts/fetch_soql.py +689 -0
- package/skills/investigating-agentforce-architecture/scripts/finalize.py +295 -0
- package/skills/investigating-agentforce-architecture/scripts/main.py +2835 -0
- package/skills/investigating-agentforce-architecture/scripts/metadata_listing.py +265 -0
- package/skills/investigating-agentforce-architecture/scripts/parallel_retrieve.py +69 -0
- package/skills/investigating-agentforce-architecture/scripts/parse_bundle.py +215 -0
- package/skills/investigating-agentforce-architecture/scripts/parse_wave.py +845 -0
- package/skills/investigating-agentforce-architecture/scripts/probe_channels.py +302 -0
- package/skills/investigating-agentforce-architecture/scripts/render_architecture.py +1043 -0
- package/skills/investigating-agentforce-architecture/scripts/resolve_bot.py +255 -0
- package/skills/investigating-agentforce-architecture/scripts/resolve_invocation_target.py +130 -0
- package/skills/investigating-agentforce-architecture/scripts/rest_client.py +763 -0
- package/skills/investigating-agentforce-architecture/scripts/retrieve_planner.py +13 -0
- package/skills/investigating-agentforce-architecture/scripts/sf_cli.py +242 -0
- package/skills/investigating-agentforce-architecture/scripts/soql_loader.py +253 -0
- package/skills/investigating-agentforce-architecture/scripts/summarize_tree.py +143 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/__init__.py +0 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/_bootstrap.py +23 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/fixtures/__init__.py +0 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/fixtures/genai_payloads.py +400 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_cache_check.py +307 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_cache_check_main.py +283 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_config.py +115 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_end_to_end_fixture.py +651 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_finalize.py +278 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_flow_children_inflation.py +582 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_fs_guard.py +113 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_iterative_wave_b.py +478 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_main_pipeline.py +3359 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parallel_retrieve.py +131 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_bundle.py +400 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_wave.py +644 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_wave_classifiers.py +224 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_wave_helpers.py +380 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_wave_main.py +397 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_per_branch_visited.py +244 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_probe_channels.py +359 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_probe_cli_recipes.py +185 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_render_architecture.py +810 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_resolve_bot.py +203 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_resolve_creds.py +157 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_resolve_invocation_target.py +145 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_rest_client.py +1253 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_runtime_override.py +100 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_sf_cli.py +261 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_signature_stamping.py +466 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_soql_loader.py +501 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_summarize_tree.py +241 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_write_emit_ctx.py +480 -0
- package/skills/investigating-agentforce-architecture/tools/emit_env.py +157 -0
- package/skills/investigating-agentforce-architecture/tools/emit_result.py +262 -0
- package/skills/investigating-agentforce-architecture/tools/sanitize.py +33 -0
- package/skills/investigating-agentforce-architecture/tools/write_emit_ctx.py +332 -0
- package/skills/investigating-agentforce-d360/README.md +123 -0
- package/skills/investigating-agentforce-d360/SKILL.md +163 -0
- package/skills/investigating-agentforce-d360/assets/dc/app_generation.sql +51 -0
- package/skills/investigating-agentforce-d360/assets/dc/content_category.sql +44 -0
- package/skills/investigating-agentforce-d360/assets/dc/content_quality.sql +41 -0
- package/skills/investigating-agentforce-d360/assets/dc/discover_sessions.sql +36 -0
- package/skills/investigating-agentforce-d360/assets/dc/feedback.sql +47 -0
- package/skills/investigating-agentforce-d360/assets/dc/feedback_details.sql +38 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_records.sql +45 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_request_llm.sql +50 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_request_metadata.sql +44 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_request_tags.sql +42 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_requests.sql +89 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_responses.sql +43 -0
- package/skills/investigating-agentforce-d360/assets/dc/generations.sql +52 -0
- package/skills/investigating-agentforce-d360/assets/dc/interactions.sql +53 -0
- package/skills/investigating-agentforce-d360/assets/dc/messages.sql +53 -0
- package/skills/investigating-agentforce-d360/assets/dc/messaging_session.sql +37 -0
- package/skills/investigating-agentforce-d360/assets/dc/moment_interactions.sql +34 -0
- package/skills/investigating-agentforce-d360/assets/dc/moments.sql +39 -0
- package/skills/investigating-agentforce-d360/assets/dc/participants.sql +48 -0
- package/skills/investigating-agentforce-d360/assets/dc/sessions.sql +78 -0
- package/skills/investigating-agentforce-d360/assets/dc/steps.sql +64 -0
- package/skills/investigating-agentforce-d360/assets/dc/tag_associations.sql +46 -0
- package/skills/investigating-agentforce-d360/assets/dc/tag_definition_associations.sql +37 -0
- package/skills/investigating-agentforce-d360/assets/dc/tag_definitions.sql +50 -0
- package/skills/investigating-agentforce-d360/assets/dc/tags.sql +37 -0
- package/skills/investigating-agentforce-d360/assets/dc/telemetry_spans.sql +55 -0
- package/skills/investigating-agentforce-d360/references/artifacts.md +50 -0
- package/skills/investigating-agentforce-d360/references/dc_dmo_fields.md +823 -0
- package/skills/investigating-agentforce-d360/references/dc_pipeline_contract.md +608 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/__init__.py +2 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/cli_override.py +98 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/fs_guard.py +334 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/paths.py +155 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/runtime.py +59 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/sql.py +14 -0
- package/skills/investigating-agentforce-d360/scripts/assemble_dc.py +1624 -0
- package/skills/investigating-agentforce-d360/scripts/config.py +45 -0
- package/skills/investigating-agentforce-d360/scripts/dc.py +188 -0
- package/skills/investigating-agentforce-d360/scripts/discover_sessions.py +556 -0
- package/skills/investigating-agentforce-d360/scripts/fetch_dc.py +1045 -0
- package/skills/investigating-agentforce-d360/scripts/render_dc.py +1750 -0
- package/skills/investigating-agentforce-d360/scripts/resolve_session.py +264 -0
- package/skills/investigating-agentforce-d360/scripts/storage.py +92 -0
- package/skills/investigating-agentforce-d360/scripts/tests/__init__.py +0 -0
- package/skills/investigating-agentforce-d360/scripts/tests/_bootstrap.py +15 -0
- package/skills/investigating-agentforce-d360/scripts/tests/fixtures/__init__.py +0 -0
- package/skills/investigating-agentforce-d360/scripts/tests/fixtures/synthetic_session.py +424 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_bootstrap_and_mode.py +115 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_gateway_direct.py +220 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_gateway_direct_integration.py +158 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_helpers.py +287 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_integration.py +247 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_dc_and_resolve_session.py +433 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_discover_sessions.py +458 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_discover_sessions_grep_ci.py +193 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_helpers.py +266 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_identity.py +528 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_main.py +251 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_waterfall.py +229 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_waterfall_full.py +283 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_identity_coherence.py +327 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_branches.py +256 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_gateway_direct.py +130 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_helpers.py +291 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_integration.py +220 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_planner_llm_calls.py +284 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_show_prompts_gating.py +215 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_resolve_from_disk.py +100 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_resolve_session_main.py +149 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_runtime_override.py +104 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_session_shape.py +95 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_session_shape_dropped_by_stdm.py +85 -0
- package/skills/managing-managed-event-subscription/SKILL.md +152 -0
- package/skills/managing-managed-event-subscription/assets/managed-event-subscription-template.xml +20 -0
- package/skills/managing-managed-event-subscription/references/delete-guide.md +57 -0
- package/skills/managing-managed-event-subscription/references/topic-name-formats.md +26 -0
- package/skills/managing-managed-event-subscription/references/update-constraints.md +30 -0
- package/skills/reviewing-lwc-mobile-offline/SKILL.md +168 -0
- package/skills/reviewing-lwc-mobile-offline/references/grounding.md +7 -0
- package/skills/reviewing-lwc-mobile-offline/references/inline-graphql.md +43 -0
- package/skills/reviewing-lwc-mobile-offline/references/komaci-eslint.md +125 -0
- package/skills/reviewing-lwc-mobile-offline/references/lwc-if.md +78 -0
- package/skills/reviewing-lwc-mobile-offline/scripts/komaci.config.mjs +18 -0
- package/skills/reviewing-lwc-mobile-offline/scripts/package.json +10 -0
- package/skills/reviewing-lwc-mobile-offline/scripts/run-komaci.sh +69 -0
- package/skills/uplifting-components-to-slds2/SKILL.md +3 -2
- package/skills/uplifting-components-to-slds2/references/color-hooks-decision-guide.md +30 -9
- package/skills/uplifting-components-to-slds2/references/examples.md +24 -6
- package/skills/using-mobile-native-capabilities/SKILL.md +182 -0
- package/skills/using-mobile-native-capabilities/references/app-review.md +68 -0
- package/skills/using-mobile-native-capabilities/references/ar-space-capture.md +125 -0
- package/skills/using-mobile-native-capabilities/references/barcode-scanner.md +219 -0
- package/skills/using-mobile-native-capabilities/references/base-capability.md +22 -0
- package/skills/using-mobile-native-capabilities/references/biometrics.md +90 -0
- package/skills/using-mobile-native-capabilities/references/calendar.md +213 -0
- package/skills/using-mobile-native-capabilities/references/contacts.md +232 -0
- package/skills/using-mobile-native-capabilities/references/document-scanner.md +342 -0
- package/skills/using-mobile-native-capabilities/references/geofencing.md +123 -0
- package/skills/using-mobile-native-capabilities/references/location.md +158 -0
- package/skills/using-mobile-native-capabilities/references/mobile-capabilities.md +30 -0
- package/skills/using-mobile-native-capabilities/references/nfc.md +181 -0
- package/skills/using-mobile-native-capabilities/references/payments.md +95 -0
- package/skills/validating-slds/SKILL.md +262 -0
- package/skills/validating-slds/references/quality-checks.md +308 -0
- package/skills/validating-slds/references/report-format.md +302 -0
- package/skills/validating-slds/scripts/analyze-quality.cjs +521 -0
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: slds.guidance.overview.utilities
|
|
3
|
+
title: Utility Classes Overview
|
|
4
|
+
description: Foundational principles and constraints for utility class decisions in SLDS
|
|
5
|
+
summary: "Comprehensive guidance on SLDS utility classes covering core principles, naming conventions, responsive patterns, accessibility considerations, and when to use utilities vs. other styling approaches."
|
|
6
|
+
|
|
7
|
+
artifact_type: overview
|
|
8
|
+
domain: overviews
|
|
9
|
+
topic: utilities
|
|
10
|
+
|
|
11
|
+
content_format: narrative
|
|
12
|
+
complexity: foundational
|
|
13
|
+
audience: [implementer, designer]
|
|
14
|
+
|
|
15
|
+
tasks: [learn, choose, implement]
|
|
16
|
+
|
|
17
|
+
refs:
|
|
18
|
+
- slds.guidance.utilities
|
|
19
|
+
- slds.guidance.hooks.spacing
|
|
20
|
+
- slds.guidance.hooks.typography
|
|
21
|
+
- slds.guidance.hooks.color
|
|
22
|
+
|
|
23
|
+
tags: [utilities, css-classes, layout, spacing, typography, responsive, mobile-first]
|
|
24
|
+
keywords: [utility classes, slds-grid, spacing scale, responsive breakpoints, mobile-first, flexbox, naming convention]
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
# Utility Classes Guidance for SLDS Implementation
|
|
28
|
+
|
|
29
|
+
**Purpose:** This document provides the foundational principles and constraints for all utility class decisions in Salesforce Lightning Design System. Utility classes are single-purpose CSS classes that provide rapid styling capabilities for layout, spacing, typography, visibility, and common visual patterns. When implementing components and layouts, follow these guidelines to ensure consistency, maintainability, and integration with the SLDS design system.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Core Principles
|
|
34
|
+
|
|
35
|
+
When working with utility classes in UI interfaces, adhere to these foundational principles:
|
|
36
|
+
|
|
37
|
+
1. **Prefer utilities over custom CSS.** Utility classes are pre-built, tested, and optimized for consistency with the Salesforce design language. They integrate seamlessly with SLDS design tokens, reduce CSS bundle size, and provide responsive behavior out of the box. Use utilities as the first approach before writing custom CSS.
|
|
38
|
+
|
|
39
|
+
2. **Respect the system's scale.** SLDS provides deliberate scales for spacing (`none` through `xx-large`), sizing (fractional widths from `1-of-2` through `12-of-12`), and typography (heading hierarchy and body text sizes). These scales create visual rhythm and hierarchy. Do not invent arbitrary values—work within the defined scales to maintain design consistency.
|
|
40
|
+
|
|
41
|
+
3. **Compose, don't customize.** Combining 2-3 utility classes is the intended pattern for achieving complex styling. The grid system demonstrates this: `slds-grid` + `slds-wrap` + `slds-gutters` + sizing classes compose to create responsive layouts. Prefer composition over creating one-off custom classes.
|
|
42
|
+
|
|
43
|
+
4. **Design mobile-first.** SLDS responsive utilities follow a mobile-first approach where base classes apply to all viewport sizes and responsive modifiers (`slds-small-`, `slds-medium-`, `slds-large-`) progressively enhance for larger screens. This ensures optimal performance and progressive enhancement across all devices.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## What Are Utility Classes?
|
|
48
|
+
|
|
49
|
+
Utility classes are single-purpose CSS classes that apply specific styling to elements. The Salesforce Lightning Design System provides utility classes across multiple categories for rapid component styling without writing custom CSS.
|
|
50
|
+
|
|
51
|
+
**Utility classes solve these problems:**
|
|
52
|
+
- Provide consistent spacing, sizing, and typography aligned with SLDS design tokens
|
|
53
|
+
- Enable responsive layouts through mobile-first breakpoint modifiers
|
|
54
|
+
- Reduce CSS bundle size by reusing common patterns instead of duplicating styles
|
|
55
|
+
- Ensure accessibility patterns are built-in (screen reader utilities, focus states)
|
|
56
|
+
- Allow rapid prototyping and styling without context-switching to CSS files
|
|
57
|
+
|
|
58
|
+
**SLDS utility naming convention:**
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
slds-[property]-[direction]_[size/value]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Examples:**
|
|
65
|
+
- `slds-m-top_small` — Small top margin
|
|
66
|
+
- `slds-p-around_medium` — Medium padding on all sides
|
|
67
|
+
- `slds-text-heading_large` — Large heading typography
|
|
68
|
+
- `slds-size_1-of-2` — 50% width
|
|
69
|
+
- `slds-grid_align-center` — Center-aligned grid
|
|
70
|
+
|
|
71
|
+
**Key naming patterns:**
|
|
72
|
+
- Underscores (`_`) separate the modifier value
|
|
73
|
+
- Hyphens (`-`) separate compound words
|
|
74
|
+
- Direction modifiers: `top`, `bottom`, `left`, `right`, `horizontal`, `vertical`, `around`
|
|
75
|
+
- Size scale: `none`, `xxx-small`, `xx-small`, `x-small`, `small`, `medium`, `large`, `x-large`, `xx-large`, `xxx-large`
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Utilities vs. Other Styling Approaches
|
|
80
|
+
|
|
81
|
+
SLDS provides multiple styling mechanisms. Understanding when to use each approach ensures maintainable, consistent code.
|
|
82
|
+
|
|
83
|
+
### Styling Hierarchy
|
|
84
|
+
|
|
85
|
+
**1. Component Classes** — Complete component patterns with built-in structure, accessibility, and interaction states. Use first when a full component pattern exists.
|
|
86
|
+
|
|
87
|
+
**2. Utility Classes** — Layout composition, spacing, sizing, typography, visibility, and common visual patterns. Utilities are the "glue" between components, handling relationships and responsive behavior.
|
|
88
|
+
|
|
89
|
+
**3. Styling Hooks** — Colors, theming, border radius, shadows, and brand customization via CSS custom properties. Use for visual customization that needs to adapt across themes.
|
|
90
|
+
|
|
91
|
+
**4. Custom CSS** — Component-specific styling, animations, and business-logic-driven needs not covered by the above. Use as last resort.
|
|
92
|
+
|
|
93
|
+
### When NOT to Use Utility Classes
|
|
94
|
+
|
|
95
|
+
**Don't use utilities when:**
|
|
96
|
+
- A component class already handles the pattern (use `slds-card`, not utilities to recreate it)
|
|
97
|
+
- You need colors or theming (use styling hooks instead)
|
|
98
|
+
- The styling is component-specific logic (write scoped custom CSS)
|
|
99
|
+
- You're combining more than 5 utilities on a single element (indicates missing component class)
|
|
100
|
+
|
|
101
|
+
<!--
|
|
102
|
+
PENDING REVIEW - NOT FOR LLM GUIDANCE CONSUMPTION
|
|
103
|
+
|
|
104
|
+
The following edge cases need design system team validation:
|
|
105
|
+
- Specific threshold for when utility composition becomes unwieldy (current guidance says 4-5+ utilities suggests missing component, but is this team consensus?)
|
|
106
|
+
- Whether color utilities (slds-color__text_gray-*, slds-color__background_gray-*) should ever be used given that styling hooks exist for colors
|
|
107
|
+
- Team position on mixing utility classes with component-level custom properties in the same element
|
|
108
|
+
- Whether there are scenarios where writing custom CSS is preferred over complex utility composition
|
|
109
|
+
|
|
110
|
+
Source references for review:
|
|
111
|
+
- packages/knowledge/utility-classes/index.md (lines 17-43: utility philosophy section)
|
|
112
|
+
- packages/guidance/utilities/borders.md (lines 126-137: box vs card decision framework)
|
|
113
|
+
- packages/guidance/styling-hooks/index.md (guidance on when to use styling hooks)
|
|
114
|
+
-->
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## SLDS 2 Design Philosophy
|
|
119
|
+
|
|
120
|
+
SLDS 2 introduced several changes to utility classes focused on consistency, accessibility, and modern CSS practices.
|
|
121
|
+
|
|
122
|
+
### Naming Convention Standardization
|
|
123
|
+
|
|
124
|
+
SLDS 2 standardized the naming convention from double-hyphen (`--`) to underscore (`_`) for modifiers:
|
|
125
|
+
- SLDS 1: `slds-m-top--small`
|
|
126
|
+
- SLDS 2: `slds-m-top_small`
|
|
127
|
+
|
|
128
|
+
This convention applies consistently across all utility classes, making the naming system more predictable and easier to learn.
|
|
129
|
+
|
|
130
|
+
### Deprecated Utilities
|
|
131
|
+
|
|
132
|
+
Several utility classes have been deprecated in SLDS 2, primarily for accessibility or consistency reasons. **Avoid using these classes:**
|
|
133
|
+
|
|
134
|
+
**Visibility utilities:**
|
|
135
|
+
- `.slds-collapsed` → Use `slds-is-collapsed` instead
|
|
136
|
+
- `.slds-expanded` → Use `slds-is-expanded` instead
|
|
137
|
+
|
|
138
|
+
**Media object utilities:**
|
|
139
|
+
- `.slds-media_reverse` → Deprecated for accessibility reasons (WCAG 1.3.2 reading order concerns)
|
|
140
|
+
- `.slds-media_double` → Deprecated for accessibility reasons
|
|
141
|
+
|
|
142
|
+
**Vertical list utilities:**
|
|
143
|
+
- `.slds-has-dividers` (on `slds-list_vertical`) → Use positional divider helpers instead (`has-dividers_top`, `has-dividers_bottom`)
|
|
144
|
+
- `.slds-has-cards` → Use `has-dividers_around` instead
|
|
145
|
+
- `.slds-has-divider` → Spacing now comes from divider position utilities
|
|
146
|
+
|
|
147
|
+
The presence of `_deprecate.scss` files in the source code (visibility, media-objects, vertical-list, horizontal-list, grid) indicates active deprecation tracking. Refer to per-utility guidance for specific deprecated classes and replacements. Use the utility class names documented in this guidance. When uncertain about a class name, refer to the per-category utility guides (`slds.guidance.utilities.*`).
|
|
148
|
+
|
|
149
|
+
### Relationship to SLDS 2 System
|
|
150
|
+
|
|
151
|
+
Utility classes in SLDS 2 work alongside the styling hooks system:
|
|
152
|
+
- Utilities provide structural layout and spacing
|
|
153
|
+
- Styling hooks provide semantic theming and color customization
|
|
154
|
+
- Together they enable fully themeable, responsive components without custom CSS
|
|
155
|
+
|
|
156
|
+
<!--
|
|
157
|
+
PENDING REVIEW - NOT FOR LLM GUIDANCE CONSUMPTION
|
|
158
|
+
|
|
159
|
+
The following SLDS 2 migration details need design system team validation:
|
|
160
|
+
- Complete list of all deprecated utility classes between SLDS 1 and SLDS 2 (beyond the ones documented in _deprecate.scss files)
|
|
161
|
+
- Whether any utility categories were added in SLDS 2 that didn't exist in SLDS 1
|
|
162
|
+
- Whether any utility categories were removed or significantly restructured
|
|
163
|
+
- Specific migration steps for uplifting SLDS 1 code that uses deprecated utilities
|
|
164
|
+
- Whether variable-density utilities (slds-var-m-*, slds-var-p-*) are SLDS 2 specific or existed in SLDS 1
|
|
165
|
+
- Whether the removal of decorative borders in SLDS 2 (documented in borders overview) affects border utilities usage patterns
|
|
166
|
+
|
|
167
|
+
Source references for filling this in:
|
|
168
|
+
- source-data/reference-documentation/salesforce-design-system-develop/packages/design-system/ui/utilities/*/RELEASENOTES.md
|
|
169
|
+
- SLDS 2 migration guides or release notes (if they exist in documentation)
|
|
170
|
+
- Design system team knowledge of SLDS 1 vs SLDS 2 utility differences
|
|
171
|
+
-->
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Responsive Utilities
|
|
176
|
+
|
|
177
|
+
SLDS utility classes support responsive design through a mobile-first breakpoint system. Responsive modifiers allow different styling at different viewport sizes without writing media queries.
|
|
178
|
+
|
|
179
|
+
### Breakpoint System
|
|
180
|
+
|
|
181
|
+
SLDS uses a mobile-first approach with three primary responsive breakpoints:
|
|
182
|
+
|
|
183
|
+
| Breakpoint | Min Width | Modifier Prefix | Use For |
|
|
184
|
+
|------------|-----------|-----------------|---------|
|
|
185
|
+
| Default (Mobile) | 0px | `slds-` | Base styling, applies to all sizes |
|
|
186
|
+
| Small (Tablet) | 480px (30em) | `slds-small-` | Tablet and larger |
|
|
187
|
+
| Medium (Desktop) | 768px (48em) | `slds-medium-` | Desktop and larger |
|
|
188
|
+
| Large (Wide Desktop) | 1024px (64em) | `slds-large-` | Large desktop screens |
|
|
189
|
+
|
|
190
|
+
**Max breakpoints** (uncommon, use sparingly):
|
|
191
|
+
- `slds-max-small-` — Up to 480px
|
|
192
|
+
- `slds-max-medium-` — Up to 768px
|
|
193
|
+
- `slds-max-large-` — Up to 1024px
|
|
194
|
+
|
|
195
|
+
### Which Utilities Support Responsive Modifiers
|
|
196
|
+
|
|
197
|
+
**Sizing utilities:**
|
|
198
|
+
- Width classes: `slds-size_*`, `slds-small-size_*`, `slds-medium-size_*`, `slds-large-size_*`
|
|
199
|
+
- Supports all fractional widths (1-of-2 through 12-of-12)
|
|
200
|
+
|
|
201
|
+
**Visibility utilities:**
|
|
202
|
+
- Show/hide: `slds-show_*`, `slds-hide_*` for each breakpoint
|
|
203
|
+
- Enables mobile vs. desktop content differentiation
|
|
204
|
+
|
|
205
|
+
**Ordering utilities:**
|
|
206
|
+
- Column order: `slds-order_*`, `slds-small-order_*`, `slds-medium-order_*`, `slds-large-order_*`
|
|
207
|
+
- Supports visual reordering up to 12 positions
|
|
208
|
+
|
|
209
|
+
### Mobile-First Approach
|
|
210
|
+
|
|
211
|
+
Always start with the mobile (base) class and progressively enhance for larger screens:
|
|
212
|
+
|
|
213
|
+
```html
|
|
214
|
+
<!-- Correct: Mobile-first responsive sizing -->
|
|
215
|
+
<div class="slds-col slds-size_1-of-1 slds-small-size_1-of-2 slds-medium-size_1-of-3 slds-large-size_1-of-4">
|
|
216
|
+
100% mobile → 50% tablet → 33% desktop → 25% wide desktop
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
<!-- Incorrect: Desktop-first approach -->
|
|
220
|
+
<div class="slds-col slds-large-size_1-of-4">
|
|
221
|
+
Missing base mobile sizing, will break on mobile
|
|
222
|
+
</div>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Responsive Layout Pattern
|
|
226
|
+
|
|
227
|
+
The grid system requires `slds-wrap` when using responsive sizing that may exceed 12 columns:
|
|
228
|
+
|
|
229
|
+
```html
|
|
230
|
+
<div class="slds-grid slds-wrap slds-gutters">
|
|
231
|
+
<div class="slds-col slds-size_1-of-1 slds-medium-size_1-of-2 slds-large-size_1-of-3">
|
|
232
|
+
Column 1: Stacked mobile, half tablet, third desktop
|
|
233
|
+
</div>
|
|
234
|
+
<div class="slds-col slds-size_1-of-1 slds-medium-size_1-of-2 slds-large-size_1-of-3">
|
|
235
|
+
Column 2
|
|
236
|
+
</div>
|
|
237
|
+
<div class="slds-col slds-size_1-of-1 slds-medium-size_1-of-2 slds-large-size_1-of-3">
|
|
238
|
+
Column 3
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Responsive Visibility Pattern
|
|
244
|
+
|
|
245
|
+
Show or hide content at specific breakpoints for device-appropriate experiences:
|
|
246
|
+
|
|
247
|
+
```html
|
|
248
|
+
<!-- Mobile: show hamburger menu, hide full navigation -->
|
|
249
|
+
<button class="slds-button slds-show slds-hide_medium">
|
|
250
|
+
<svg class="slds-icon"><!-- menu icon --></svg>
|
|
251
|
+
Menu
|
|
252
|
+
</button>
|
|
253
|
+
|
|
254
|
+
<!-- Desktop: hide hamburger, show full navigation -->
|
|
255
|
+
<nav class="slds-hide slds-show_medium">
|
|
256
|
+
<ul class="slds-list_horizontal">
|
|
257
|
+
<li><a href="#">Home</a></li>
|
|
258
|
+
<li><a href="#">About</a></li>
|
|
259
|
+
<li><a href="#">Contact</a></li>
|
|
260
|
+
</ul>
|
|
261
|
+
</nav>
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Accessibility Considerations
|
|
267
|
+
|
|
268
|
+
SLDS utility classes include built-in accessibility patterns and considerations. Follow these guidelines to ensure WCAG compliance.
|
|
269
|
+
|
|
270
|
+
### DOM Order vs. Visual Order (WCAG 1.3.2)
|
|
271
|
+
|
|
272
|
+
**Critical:** The grid ordering utilities (`slds-order_*`) and flexbox reordering can create visual order that differs from DOM order. This violates WCAG 1.3.2 (Meaningful Sequence) and creates barriers for screen reader users and keyboard navigation.
|
|
273
|
+
|
|
274
|
+
**Accessibility Warning from SLDS Grid Documentation:**
|
|
275
|
+
> "You can visually reorder columns independently from their position in the markup, but you should avoid doing so if you wish to remain WCAG compliant."
|
|
276
|
+
|
|
277
|
+
**Rule:** Structure HTML in the correct semantic order. Do not use visual reordering utilities (`slds-order_*`). If visual reordering is required by a design specification that cannot be achieved by restructuring the DOM, ensure:
|
|
278
|
+
- The DOM order still makes logical sense when read sequentially
|
|
279
|
+
- Tab order follows a logical flow for keyboard users
|
|
280
|
+
- Screen reader testing confirms the experience is coherent
|
|
281
|
+
|
|
282
|
+
### Visibility Utilities and Screen Readers
|
|
283
|
+
|
|
284
|
+
Different visibility utilities have different screen reader behavior:
|
|
285
|
+
|
|
286
|
+
| Utility | Visual Display | Screen Reader | Layout Space |
|
|
287
|
+
|---------|----------------|---------------|--------------|
|
|
288
|
+
| `slds-show` | Visible | Read | Occupies space |
|
|
289
|
+
| `slds-hide` | Hidden | Not read | No space |
|
|
290
|
+
| `slds-hidden` | Hidden | Not read | Occupies space |
|
|
291
|
+
| `slds-assistive-text` | Hidden | Read | No space |
|
|
292
|
+
|
|
293
|
+
**Use `slds-assistive-text` when:**
|
|
294
|
+
- Providing context for icon-only buttons
|
|
295
|
+
- Adding descriptive labels for screen readers
|
|
296
|
+
- Including skip navigation links
|
|
297
|
+
- Supplementing visual-only information with text equivalents
|
|
298
|
+
|
|
299
|
+
```html
|
|
300
|
+
<!-- Icon button with screen reader label -->
|
|
301
|
+
<button class="slds-button slds-button_icon">
|
|
302
|
+
<svg class="slds-icon slds-icon_small">
|
|
303
|
+
<use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#edit"></use>
|
|
304
|
+
</svg>
|
|
305
|
+
<span class="slds-assistive-text">Edit Record</span>
|
|
306
|
+
</button>
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Focus State Preservation
|
|
310
|
+
|
|
311
|
+
The interactions utilities include focus management classes:
|
|
312
|
+
- `slds-has-blur-focus` — Apply blur focus styles
|
|
313
|
+
- `slds-has-input-focus` — Apply input-specific focus styles
|
|
314
|
+
|
|
315
|
+
Never remove focus indicators with utilities or custom CSS. Focus visibility is required for keyboard navigation (WCAG 2.4.7).
|
|
316
|
+
|
|
317
|
+
### Touch Target Sizing
|
|
318
|
+
|
|
319
|
+
When using spacing and sizing utilities for interactive elements, ensure touch targets meet minimum size requirements:
|
|
320
|
+
- Minimum touch target (Level AA): 24×24px (WCAG 2.5.8)
|
|
321
|
+
- Minimum touch target (Level AAA): 44×44px (WCAG 2.5.5)
|
|
322
|
+
- Recommended touch target: 48×48px
|
|
323
|
+
|
|
324
|
+
Combine padding utilities with component classes to achieve appropriate interactive areas:
|
|
325
|
+
|
|
326
|
+
```html
|
|
327
|
+
<!-- Adequate touch target for mobile -->
|
|
328
|
+
<button class="slds-button slds-button_neutral slds-p-around_medium">
|
|
329
|
+
Button with comfortable touch area
|
|
330
|
+
</button>
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### Truncation Accessibility
|
|
334
|
+
|
|
335
|
+
When using `slds-truncate` or `slds-line-clamp` utilities, always provide the full text:
|
|
336
|
+
- Add `title` attribute for hover tooltips (benefits sighted mouse users)
|
|
337
|
+
- Screen readers read the full content regardless of visual truncation
|
|
338
|
+
- Consider providing "Read more" interactions for truncated content in critical contexts
|
|
339
|
+
|
|
340
|
+
```html
|
|
341
|
+
<!-- Truncated text with full content accessible -->
|
|
342
|
+
<td class="slds-truncate" title="Full customer name visible on hover">
|
|
343
|
+
Very Long Customer Name That Is Truncated Visually
|
|
344
|
+
</td>
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### Color and Meaning
|
|
348
|
+
|
|
349
|
+
When using text color utilities (`slds-text-color_error`, `slds-text-color_success`, `slds-text-color_warning`), do not rely on color alone to convey meaning (WCAG 1.4.1). Supplement with:
|
|
350
|
+
- Icons that convey status
|
|
351
|
+
- Text labels that describe the state
|
|
352
|
+
- ARIA attributes for dynamic state changes
|
|
353
|
+
|
|
354
|
+
```html
|
|
355
|
+
<!-- Error message with icon, not just color -->
|
|
356
|
+
<div class="slds-text-color_error slds-m-top_small">
|
|
357
|
+
<svg class="slds-icon slds-icon_x-small">
|
|
358
|
+
<use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#error"></use>
|
|
359
|
+
</svg>
|
|
360
|
+
Please correct the errors below
|
|
361
|
+
</div>
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## Implementation Workflow
|
|
367
|
+
|
|
368
|
+
Follow this sequence when implementing utility class solutions:
|
|
369
|
+
|
|
370
|
+
### Step 1: Identify the Styling Need
|
|
371
|
+
|
|
372
|
+
Determine what aspect of styling you're addressing:
|
|
373
|
+
|
|
374
|
+
- **Layout?** → Grid, position, scrollable, float utilities
|
|
375
|
+
- **Spacing?** → Margin and padding utilities
|
|
376
|
+
- **Sizing?** → Width and height utilities with responsive variants
|
|
377
|
+
- **Typography?** → Text, truncate, line-clamp utilities
|
|
378
|
+
- **Visibility?** → Show, hide, assistive-text utilities
|
|
379
|
+
- **Visual styling?** → Border, box, color, themes, dark mode utilities
|
|
380
|
+
- **Specialized patterns?** → Media object, list, description list utilities
|
|
381
|
+
|
|
382
|
+
### Step 2: Check Component Classes First
|
|
383
|
+
|
|
384
|
+
Before adding utilities, verify whether an SLDS component class already provides the pattern:
|
|
385
|
+
|
|
386
|
+
```html
|
|
387
|
+
<!-- Component class provides the foundation -->
|
|
388
|
+
<div class="slds-card">
|
|
389
|
+
<div class="slds-card__header">Card Header</div>
|
|
390
|
+
<div class="slds-card__body slds-card__body_inner">Card Content</div>
|
|
391
|
+
</div>
|
|
392
|
+
|
|
393
|
+
<!-- Add utilities only for additional composition needs -->
|
|
394
|
+
<div class="slds-card slds-m-bottom_medium">
|
|
395
|
+
<div class="slds-card__body slds-p-around_large">
|
|
396
|
+
Override default padding with utility when needed
|
|
397
|
+
</div>
|
|
398
|
+
</div>
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
Component classes like `slds-card`, `slds-button`, `slds-form-element`, `slds-table` already include padding, borders, and structural styling. Don't recreate these patterns with utilities.
|
|
402
|
+
|
|
403
|
+
### Step 3: Compose Utilities
|
|
404
|
+
|
|
405
|
+
Combine 2-3 utilities to achieve the desired styling. The grid system demonstrates the composition pattern:
|
|
406
|
+
|
|
407
|
+
```html
|
|
408
|
+
<!-- Grid composition: container + behavior + spacing + sizing -->
|
|
409
|
+
<div class="slds-grid slds-wrap slds-gutters">
|
|
410
|
+
<div class="slds-col slds-size_1-of-1 slds-medium-size_1-of-2">
|
|
411
|
+
Composed layout from 4 utilities
|
|
412
|
+
</div>
|
|
413
|
+
</div>
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
**Composition best practices:**
|
|
417
|
+
- Start with structural utilities (grid, position)
|
|
418
|
+
- Add spacing utilities (margin, padding)
|
|
419
|
+
- Apply typography utilities (text styling, alignment)
|
|
420
|
+
- Include responsive modifiers last
|
|
421
|
+
|
|
422
|
+
### Step 4: Apply Responsive Modifiers
|
|
423
|
+
|
|
424
|
+
Add breakpoint-specific overrides following mobile-first approach:
|
|
425
|
+
|
|
426
|
+
```html
|
|
427
|
+
<!-- Base + responsive modifiers -->
|
|
428
|
+
<div class="slds-col
|
|
429
|
+
slds-size_1-of-1
|
|
430
|
+
slds-small-size_1-of-2
|
|
431
|
+
slds-medium-size_1-of-3
|
|
432
|
+
slds-large-size_1-of-4">
|
|
433
|
+
Progressive enhancement from mobile to large desktop
|
|
434
|
+
</div>
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Step 5: Validate Implementation
|
|
438
|
+
|
|
439
|
+
Before finalizing, verify the implementation using the Pre-Implementation Checklist below to ensure all requirements are met.
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
## Pre-Implementation Checklist
|
|
444
|
+
|
|
445
|
+
Before generating or modifying any utility class code, verify:
|
|
446
|
+
|
|
447
|
+
| Requirement | Status |
|
|
448
|
+
|-------------|--------|
|
|
449
|
+
| **Appropriateness** | |
|
|
450
|
+
| Utility classes used for layout, spacing, sizing, typography, visibility | [ ] |
|
|
451
|
+
| Component classes checked first (not recreating patterns with utilities) | [ ] |
|
|
452
|
+
| Utilities preferred over custom CSS where applicable | [ ] |
|
|
453
|
+
| Not combining more than 4-5 utilities on single element | [ ] |
|
|
454
|
+
| **Naming & Convention** | |
|
|
455
|
+
| Utility class names spelled correctly (exact SLDS naming) | [ ] |
|
|
456
|
+
| Underscore (`_`) used for modifiers, not double-hyphen | [ ] |
|
|
457
|
+
| No deprecated utilities used (checked against current SLDS docs) | [ ] |
|
|
458
|
+
| Naming convention followed: `slds-[property]-[direction]_[size]` | [ ] |
|
|
459
|
+
| **Consistency** | |
|
|
460
|
+
| Spacing utilities use consistent size scale (e.g., all `medium`) | [ ] |
|
|
461
|
+
| Typography utilities match content hierarchy (headings → body → small) | [ ] |
|
|
462
|
+
| Visual rhythm maintained across similar components | [ ] |
|
|
463
|
+
| **Responsiveness** | |
|
|
464
|
+
| Mobile-first approach: base class → responsive modifiers | [ ] |
|
|
465
|
+
| Breakpoint modifiers ordered correctly (small → medium → large) | [ ] |
|
|
466
|
+
| `slds-wrap` added to grids with responsive sizing | [ ] |
|
|
467
|
+
| Responsive visibility tested at actual breakpoints (480px, 768px, 1024px) | [ ] |
|
|
468
|
+
| **Accessibility** | |
|
|
469
|
+
| `slds-assistive-text` used for screen reader-only content | [ ] |
|
|
470
|
+
| `title` attributes added to all truncated text | [ ] |
|
|
471
|
+
| Semantic HTML tags used with utility classes (h1, h2, p, ul, li) | [ ] |
|
|
472
|
+
| Visual order matches DOM order (no `slds-order_*` reordering) | [ ] |
|
|
473
|
+
| Focus states maintained and visible (not removed by utilities) | [ ] |
|
|
474
|
+
| Color utilities supplemented with icons/text (not color alone for meaning) | [ ] |
|
|
475
|
+
| Touch targets meet minimum 44×44px size for interactive elements | [ ] |
|
|
476
|
+
| **Code Quality** | |
|
|
477
|
+
| Utilities combined efficiently (not redundant or contradictory) | [ ] |
|
|
478
|
+
| Markup is clean and readable | [ ] |
|
|
479
|
+
| Comments added for non-obvious utility combinations | [ ] |
|
|
480
|
+
|
|
481
|
+
**Target outcome:** Consistent, accessible, responsive interfaces built with composable utility classes that integrate seamlessly with SLDS component classes and styling hooks.
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
## Utility Class Categories
|
|
486
|
+
|
|
487
|
+
SLDS organizes utility classes into the following categories. For detailed per-category guidance, refer to the individual utility reference documentation.
|
|
488
|
+
|
|
489
|
+
### Layout & Positioning
|
|
490
|
+
- **Grid** — Flexbox layout system: `slds-grid`, `slds-col`, alignment, gutters
|
|
491
|
+
- **Position** — CSS positioning: `slds-is-relative`, `slds-is-absolute`, `slds-is-fixed`
|
|
492
|
+
- **Scrollable** — Overflow control: `slds-scrollable`, `slds-scrollable_x/y`
|
|
493
|
+
- **Float** — Legacy float positioning (prefer grid for new layouts)
|
|
494
|
+
- **Alignment** — Absolute centering: `slds-align_absolute-center`
|
|
495
|
+
- **Layout** — Global spacing: `slds-has-buffer`, magnet utilities
|
|
496
|
+
|
|
497
|
+
### Spacing
|
|
498
|
+
- **Margin** — External spacing: `slds-m-[direction]_[size]`
|
|
499
|
+
- **Padding** — Internal spacing: `slds-p-[direction]_[size]`
|
|
500
|
+
|
|
501
|
+
### Sizing
|
|
502
|
+
- **Sizing** — Fractional widths, responsive breakpoints, full width/height
|
|
503
|
+
|
|
504
|
+
### Typography
|
|
505
|
+
- **Text** — Headings, body text, alignment, colors, transforms
|
|
506
|
+
- **Truncate** — Single-line ellipsis, container-based truncation
|
|
507
|
+
- **Line Clamp** — Multi-line truncation (2, 3, 5, 7 lines)
|
|
508
|
+
- **Hyphenation** — Word breaking for long text
|
|
509
|
+
|
|
510
|
+
### Visual Styling
|
|
511
|
+
- **Color** — Text and background grays (prefer styling hooks)
|
|
512
|
+
- **Borders** — Directional borders: `slds-border_top/bottom/left/right`
|
|
513
|
+
- **Box** — Container styling with padding variants
|
|
514
|
+
- **Visibility** — Show/hide, responsive display, screen reader utilities
|
|
515
|
+
- **Themes** — Semantic surface theming: `slds-theme_default`, `slds-theme_inverse`, success/error/warning backgrounds
|
|
516
|
+
- **Dark Mode** — Future dark mode support (currently use styling hooks)
|
|
517
|
+
|
|
518
|
+
### Specialized
|
|
519
|
+
- **Media Object** — Image/icon with text layout pattern
|
|
520
|
+
- **Vertical List** — Lists with dividers, selection states
|
|
521
|
+
- **Horizontal List** — Inline list layouts
|
|
522
|
+
- **Description List** — Name-value pair layouts
|
|
523
|
+
- **Name Value List** — Structured data display
|
|
524
|
+
|
|
525
|
+
### Special Purpose
|
|
526
|
+
- **Interactions** — Link styling, focus patterns
|
|
527
|
+
- **Print** — Print-specific visibility
|
|
528
|
+
|
|
529
|
+
> For detailed usage guidance, code examples, and best practices for each category, refer to the [per-category utility reference documentation](ref:slds.guidance.utilities).
|
|
530
|
+
|
|
531
|
+
---
|
|
532
|
+
|
|
533
|
+
## Related Documentation
|
|
534
|
+
|
|
535
|
+
For detailed implementation guidance, refer to:
|
|
536
|
+
|
|
537
|
+
- **Utility Reference Documentation** (`slds.guidance.utilities`) — Individual category guides with complete class listings and code examples
|
|
538
|
+
- **Spacing and Sizing Styling Hooks** (`slds.guidance.hooks.spacing`) — For density-aware spacing and when to use hooks vs. utilities
|
|
539
|
+
- **Typography Overview** (`slds.guidance.overview.typography`) — For understanding type hierarchy that utilities implement
|
|
540
|
+
- **Borders Overview** (`slds.guidance.overview.borders`) — For understanding when borders are appropriate in SLDS 2
|
|
541
|
+
- **Accessibility Overview** (`slds.guidance.accessibility.overview`) — For comprehensive accessibility requirements across all utilities
|
|
542
|
+
|