@ids-group-ltd/ids-design-system 0.11.4 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +373 -53
- package/components/README.md +86 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +85 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +70 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +573 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +86 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +615 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +30 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +188 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +59 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +92 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +204 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +100 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs +23 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +180 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +78 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +49 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +73 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +397 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +1231 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +51 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs +35 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +109 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +111 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +52 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +92 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs +62 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +164 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +85 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +223 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +63 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +53 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs +43 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +293 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +329 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +612 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +69 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +191 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs +23 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +43 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +85 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs +95 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +240 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +41 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +248 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs +62 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +173 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +123 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +461 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +107 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +185 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +32 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +204 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs +25 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +63 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +99 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs +26 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +74 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +76 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +440 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +186 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs +227 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +1593 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +381 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +44 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +158 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +671 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +41 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +549 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +34 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +218 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +18 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +153 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +48 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +1338 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +333 -0
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +65 -0
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs +56 -0
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +37 -0
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +75 -14267
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.10.0.json +1 -1
- package/migrations/0.10.1.json +1 -1
- package/migrations/0.10.2.json +1 -30
- package/migrations/0.11.0.json +0 -2
- package/migrations/0.11.1.json +2 -24
- package/migrations/0.11.2.json +2 -1
- package/migrations/0.11.3.json +3 -2
- package/migrations/0.11.4.json +32 -6
- package/migrations/0.12.0.json +22 -0
- package/migrations/0.12.1.json +215 -0
- package/migrations/0.4.0.json +2 -1
- package/migrations/0.5.0.json +0 -54
- package/migrations/0.5.1.json +3 -1
- package/migrations/0.7.0.json +0 -11
- package/migrations/0.7.1.json +2 -1
- package/migrations/0.9.0.json +22 -3
- package/migrations/0.9.1.json +1 -1
- package/package.json +597 -1
- package/styles/_check-box.scss +84 -0
- package/styles/_check-mark.scss +59 -0
- package/styles/_dropdown-overlay.scss +12 -2
- package/styles/_field-group-segment.scss +4 -1
- package/styles/_focus.scss +103 -50
- package/styles/_link.scss +4 -2
- package/styles/_tokens.scss +20 -0
- package/styles/_typography.scss +6 -0
- package/themes/README.md +4 -4
- package/themes/_semantic.scss +7 -8
- package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +48 -0
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +32 -0
- package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +260 -0
- package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +75 -0
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +226 -0
- package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +13 -0
- package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +99 -0
- package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +25 -0
- package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +41 -0
- package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +61 -0
- package/types/ids-group-ltd-ids-design-system-components-breadcrumbs.d.ts +66 -0
- package/types/ids-group-ltd-ids-design-system-components-button-group.d.ts +10 -0
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +90 -0
- package/types/ids-group-ltd-ids-design-system-components-calendar-day.d.ts +41 -0
- package/types/ids-group-ltd-ids-design-system-components-card.d.ts +24 -0
- package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +41 -0
- package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +79 -0
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +251 -0
- package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +25 -0
- package/types/ids-group-ltd-ids-design-system-components-divider.d.ts +22 -0
- package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +38 -0
- package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +45 -0
- package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +22 -0
- package/types/ids-group-ltd-ids-design-system-components-field-group.d.ts +73 -0
- package/types/ids-group-ltd-ids-design-system-components-field-message.d.ts +36 -0
- package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +83 -0
- package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +56 -0
- package/types/ids-group-ltd-ids-design-system-components-input.d.ts +121 -0
- package/types/ids-group-ltd-ids-design-system-components-layout.d.ts +39 -0
- package/types/ids-group-ltd-ids-design-system-components-list.d.ts +29 -0
- package/types/ids-group-ltd-ids-design-system-components-loading-overlay.d.ts +31 -0
- package/types/ids-group-ltd-ids-design-system-components-menu.d.ts +85 -0
- package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +124 -0
- package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +213 -0
- package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +31 -0
- package/types/ids-group-ltd-ids-design-system-components-otp-input.d.ts +52 -0
- package/types/ids-group-ltd-ids-design-system-components-page-footer.d.ts +13 -0
- package/types/ids-group-ltd-ids-design-system-components-page-header.d.ts +21 -0
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +32 -0
- package/types/ids-group-ltd-ids-design-system-components-password-rules.d.ts +80 -0
- package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +48 -0
- package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +22 -0
- package/types/ids-group-ltd-ids-design-system-components-radio-group.d.ts +110 -0
- package/types/ids-group-ltd-ids-design-system-components-reserve-messages.d.ts +33 -0
- package/types/ids-group-ltd-ids-design-system-components-search.d.ts +82 -0
- package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +40 -0
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +152 -0
- package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +92 -0
- package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +131 -0
- package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +16 -0
- package/types/ids-group-ltd-ids-design-system-components-slider.d.ts +51 -0
- package/types/ids-group-ltd-ids-design-system-components-spinner.d.ts +11 -0
- package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +39 -0
- package/types/ids-group-ltd-ids-design-system-components-stat.d.ts +44 -0
- package/types/ids-group-ltd-ids-design-system-components-status-dot.d.ts +12 -0
- package/types/ids-group-ltd-ids-design-system-components-stepper.d.ts +32 -0
- package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +40 -0
- package/types/ids-group-ltd-ids-design-system-components-table-columns.d.ts +43 -0
- package/types/ids-group-ltd-ids-design-system-components-table-export.d.ts +48 -0
- package/types/ids-group-ltd-ids-design-system-components-table-resize.d.ts +79 -0
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +815 -0
- package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +118 -0
- package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +26 -0
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +85 -0
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +188 -0
- package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +24 -0
- package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +167 -0
- package/types/ids-group-ltd-ids-design-system-components-toggle-button.d.ts +18 -0
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +66 -0
- package/types/ids-group-ltd-ids-design-system-components-topbar.d.ts +8 -0
- package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +46 -0
- package/types/ids-group-ltd-ids-design-system-components-w3w.d.ts +18 -0
- package/types/ids-group-ltd-ids-design-system-components.d.ts +604 -0
- package/types/ids-group-ltd-ids-design-system-core.d.ts +436 -0
- package/types/ids-group-ltd-ids-design-system-icons.d.ts +52 -0
- package/types/ids-group-ltd-ids-design-system-overlay.d.ts +32 -0
- package/types/ids-group-ltd-ids-design-system-theme.d.ts +29 -0
- package/types/ids-group-ltd-ids-design-system.d.ts +75 -5594
- package/LICENSE +0 -21
- package/README.md +0 -73
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@use 'check-mark' as check-mark;
|
|
2
|
+
@use 'press' as press;
|
|
3
|
+
|
|
4
|
+
// The box a checkbox draws, in one place.
|
|
5
|
+
//
|
|
6
|
+
// ds-checkbox is a native `<input type="checkbox">` with `appearance: none` and a styled `::after`,
|
|
7
|
+
// so anything else that already renders a native checkbox — ds-table's row selection — becomes the
|
|
8
|
+
// design system's checkbox by including this, without swapping in a component or rewiring an
|
|
9
|
+
// event.
|
|
10
|
+
|
|
11
|
+
// Declared on the SCOPE rather than on the box, so a state override on the host (error, warning)
|
|
12
|
+
// still reaches the box through the cascade: a declaration on the element itself would outrank the
|
|
13
|
+
// inherited one and pin the resting colour.
|
|
14
|
+
@mixin resolvers {
|
|
15
|
+
--_checkbox-bg: var(--ds-checkbox-bg-color, var(--surface-default));
|
|
16
|
+
--_checkbox-border: var(--ds-checkbox-border-color, var(--border-strong));
|
|
17
|
+
--_checkbox-hover-border: var(--ds-checkbox-hover-border-color, var(--accent));
|
|
18
|
+
--_checkbox-selected-bg: var(--ds-checkbox-selected-bg-color, var(--accent));
|
|
19
|
+
--_checkbox-selected-border: var(--ds-checkbox-selected-border-color, var(--accent));
|
|
20
|
+
--_checkbox-radius: var(--ds-checkbox-radius, var(--ds-radius-inner));
|
|
21
|
+
--_checkbox-glyph: var(--check-size);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Every reference to a `--_checkbox-*` resolver carries that resolver's OWN default, so a box which
|
|
25
|
+
// never saw `resolvers` still paints. The `:root` tokens it also reads — `--check-bw`,
|
|
26
|
+
// `--check-size`, `--icon-on-primary` — are global and need no fallback; strip the token layer and
|
|
27
|
+
// the border goes invalid again. That is not belt and braces: a checkbox inside a portaled CDK panel is
|
|
28
|
+
// outside its component's host, custom properties inherit by DOM position, and the whole
|
|
29
|
+
// declaration is then invalid at computed-value time — measured on ds-table's column picker, where
|
|
30
|
+
// six boxes came out 12x12 with no border and no fill, invisible on the panel.
|
|
31
|
+
@mixin box {
|
|
32
|
+
appearance: none;
|
|
33
|
+
width: var(--_checkbox-glyph, var(--check-size));
|
|
34
|
+
height: var(--_checkbox-glyph, var(--check-size));
|
|
35
|
+
border: var(--check-bw) solid
|
|
36
|
+
var(--_checkbox-border, var(--ds-checkbox-border-color, var(--border-strong)));
|
|
37
|
+
background: var(--_checkbox-bg, var(--ds-checkbox-bg-color, var(--surface-default)));
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
display: inline-grid;
|
|
40
|
+
place-items: center;
|
|
41
|
+
flex-shrink: 0;
|
|
42
|
+
margin: 0;
|
|
43
|
+
border-radius: var(--_checkbox-radius, var(--ds-checkbox-radius, var(--ds-radius-inner)));
|
|
44
|
+
transition: background-color var(--duration-fast) var(--ease-standard),
|
|
45
|
+
border-color var(--duration-fast) var(--ease-standard);
|
|
46
|
+
|
|
47
|
+
&:hover:not(:disabled) {
|
|
48
|
+
border-color: var(--_checkbox-hover-border, var(--ds-checkbox-hover-border-color, var(--accent)));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@include press.feedback;
|
|
52
|
+
&:disabled {
|
|
53
|
+
background: var(--surface-disabled);
|
|
54
|
+
border-color: var(--border-disabled);
|
|
55
|
+
cursor: not-allowed;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// The mark paints in currentColor, and an input inherits the label's text colour — so without
|
|
59
|
+
// this the tick would come out dark on the filled box.
|
|
60
|
+
color: var(--icon-on-primary);
|
|
61
|
+
|
|
62
|
+
// Persistent pseudo (content always set) so the check/indeterminate mark scales + fades in and
|
|
63
|
+
// out — a checked-only ::after would just pop in.
|
|
64
|
+
&::after {
|
|
65
|
+
content: "";
|
|
66
|
+
|
|
67
|
+
@include check-mark.mark;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:checked {
|
|
71
|
+
background: var(--_checkbox-selected-bg, var(--ds-checkbox-selected-bg-color, var(--accent)));
|
|
72
|
+
border-color: var(--_checkbox-selected-border, var(--ds-checkbox-selected-border-color, var(--accent)));
|
|
73
|
+
&::after { @include check-mark.shown; }
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:indeterminate {
|
|
77
|
+
background: var(--_checkbox-selected-bg, var(--ds-checkbox-selected-bg-color, var(--accent)));
|
|
78
|
+
border-color: var(--_checkbox-selected-border, var(--ds-checkbox-selected-border-color, var(--accent)));
|
|
79
|
+
&::after {
|
|
80
|
+
@include check-mark.shown;
|
|
81
|
+
@include check-mark.dash;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// The tick a selection draws, in one place.
|
|
2
|
+
//
|
|
3
|
+
// ds-checkbox owns the canonical mark; multi-select and autocomplete draw their own box in an
|
|
4
|
+
// option row rather than composing ds-checkbox, so they need the mark on its own. Do not reach
|
|
5
|
+
// for `ds-icon name="check"` in those boxes: it is a 24-viewBox path at stroke 1.75, which at a
|
|
6
|
+
// 13px glyph paints a 0.95px line against this mark's 2px — one box, two different ticks.
|
|
7
|
+
//
|
|
8
|
+
// Painted as a MASK over `currentColor`, not as a coloured image: the same mark then serves a
|
|
9
|
+
// filled box (white on the accent) and a bare trailing indicator in a select row (accent on the
|
|
10
|
+
// surface) without a second copy of the path.
|
|
11
|
+
@mixin mark {
|
|
12
|
+
--_check-mark-enter-duration: var(--ds-check-mark-enter-duration, var(--ds-motion-check-enter-duration));
|
|
13
|
+
--_check-mark-enter-easing: var(--ds-check-mark-enter-easing, var(--ds-motion-check-enter-easing));
|
|
14
|
+
--_check-mark-exit-duration: var(--ds-check-mark-exit-duration, var(--ds-motion-check-exit-duration));
|
|
15
|
+
--_check-mark-exit-easing: var(--ds-check-mark-exit-easing, var(--ds-motion-check-exit-easing));
|
|
16
|
+
|
|
17
|
+
width: var(--check-tick-size);
|
|
18
|
+
height: var(--check-tick-size);
|
|
19
|
+
|
|
20
|
+
// Always rendered, so it can scale and fade rather than pop: an element that does not exist has
|
|
21
|
+
// no resting state to transition from. `.checked` on the box is what brings it in.
|
|
22
|
+
transform: scale(0.6);
|
|
23
|
+
opacity: 0;
|
|
24
|
+
transform-origin: center;
|
|
25
|
+
|
|
26
|
+
// The resting rule carries the EXIT timing and the entered rule the enter timing — a transition
|
|
27
|
+
// belongs to the state being moved TO, which is the only way one property pair can run two
|
|
28
|
+
// different curves in the two directions.
|
|
29
|
+
transition: transform var(--_check-mark-exit-duration) var(--_check-mark-exit-easing),
|
|
30
|
+
opacity var(--_check-mark-exit-duration) var(--_check-mark-exit-easing);
|
|
31
|
+
background-color: currentcolor;
|
|
32
|
+
|
|
33
|
+
// Forced colours override `background-color` and leave `background-image` alone, so moving the
|
|
34
|
+
// tick from an image to a masked fill made it vanish under Windows High Contrast: the mark was
|
|
35
|
+
// forced to Canvas, the same colour the box fill becomes, leaving checked and unchecked
|
|
36
|
+
// pixel-identical. The mask itself survives, so naming the text colour puts the glyph back.
|
|
37
|
+
@media (forced-colors: active) {
|
|
38
|
+
background-color: CanvasText;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2 6.5l2.5 2.5L10 3.5' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// The entered state, for a box that carries `.checked` rather than a `:checked` input.
|
|
45
|
+
@mixin shown {
|
|
46
|
+
transform: scale(1);
|
|
47
|
+
opacity: 1;
|
|
48
|
+
transition: transform var(--_check-mark-enter-duration) var(--_check-mark-enter-easing),
|
|
49
|
+
opacity var(--_check-mark-enter-duration) var(--_check-mark-enter-easing);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// The bar a mixed selection draws, on the SAME element as the tick: a second span would sit beside
|
|
53
|
+
// it in the centred box rather than replacing it, and the two could not cross-fade.
|
|
54
|
+
@mixin dash {
|
|
55
|
+
width: var(--check-indet-w);
|
|
56
|
+
height: var(--check-indet-h);
|
|
57
|
+
border-radius: var(--ds-radius-inner);
|
|
58
|
+
mask: none;
|
|
59
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
@use 'focus' as focus;
|
|
2
|
+
|
|
1
3
|
// GLOBAL because the panel is portaled via CDK Overlay outside the host
|
|
2
4
|
// component's DOM tree, so emulated encapsulation (and any `:host ::ng-deep`
|
|
3
5
|
// selector) cannot reach it. The component sets `panelClass: 'ds-dropdown-panel'`
|
|
4
6
|
// on the overlay config; this partial declares the matching rules.
|
|
5
7
|
|
|
8
|
+
@use 'check-mark' as check-mark;
|
|
6
9
|
@use 'text-clip' as text-clip;
|
|
7
10
|
@use 'visually-hidden' as visually-hidden;
|
|
8
11
|
|
|
@@ -140,11 +143,19 @@
|
|
|
140
143
|
@include visually-hidden.visually-hidden;
|
|
141
144
|
}
|
|
142
145
|
|
|
146
|
+
// Persistent, not rendered only when selected: an element that does not exist has no resting
|
|
147
|
+
// state to transition from, which is why this was the one selection mark that popped in.
|
|
143
148
|
.option-check {
|
|
149
|
+
@include check-mark.mark;
|
|
150
|
+
|
|
144
151
|
color: var(--_option-check-color);
|
|
145
152
|
flex: 0 0 auto;
|
|
146
153
|
}
|
|
147
154
|
|
|
155
|
+
.option-check.is-shown {
|
|
156
|
+
@include check-mark.shown;
|
|
157
|
+
}
|
|
158
|
+
|
|
148
159
|
&:disabled {
|
|
149
160
|
color: var(--text-disabled);
|
|
150
161
|
cursor: not-allowed;
|
|
@@ -166,8 +177,7 @@
|
|
|
166
177
|
}
|
|
167
178
|
|
|
168
179
|
&:focus-visible {
|
|
169
|
-
|
|
170
|
-
box-shadow: var(--ds-control-focus-shadow);
|
|
180
|
+
@include focus.ring(calc(-1 * var(--focus-ring-width)));
|
|
171
181
|
}
|
|
172
182
|
|
|
173
183
|
&.is-selected {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use 'focus' as focus;
|
|
2
|
+
|
|
1
3
|
// `display: flex` on the host is load-bearing: the group stretches the host, but a
|
|
2
4
|
// block host gives the box no height to resolve a percentage against, and the value
|
|
3
5
|
// ends up at the top of the row instead of its centre.
|
|
@@ -23,7 +25,8 @@
|
|
|
23
25
|
&:focus-within {
|
|
24
26
|
border: 0;
|
|
25
27
|
box-shadow: none;
|
|
26
|
-
|
|
28
|
+
|
|
29
|
+
@include focus.own-indicator;
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
/* No blanket reset here on purpose: the block above clears the segment BOX and
|
package/styles/_focus.scss
CHANGED
|
@@ -1,19 +1,78 @@
|
|
|
1
1
|
// Focus-indicator style, switched in ONE place: `<html data-focus="…">`.
|
|
2
2
|
//
|
|
3
|
-
// Two families
|
|
4
|
-
//
|
|
5
|
-
// `--
|
|
6
|
-
//
|
|
3
|
+
// Two families, two mechanisms, because one property cannot give both:
|
|
4
|
+
// controls — an `outline`, drawn by the `ring` mixin off `--focus-ring-width`
|
|
5
|
+
// / `--focus-ring-color` / `--focus-ring-offset`;
|
|
6
|
+
// fields — a soft halo, resolved through the `--ds-field-focus-shadow` role.
|
|
7
|
+
//
|
|
8
|
+
// An outline is what the control family needs: `outline-offset` leaves its gap
|
|
9
|
+
// UNPAINTED, so the ring floats over whatever the control actually sits on, while a
|
|
10
|
+
// shadow gap has to be filled with a guessed colour that is a coloured rim everywhere
|
|
11
|
+
// the guess is wrong. A negative offset draws the ring inside the element, where an
|
|
12
|
+
// `overflow` ancestor cannot clip it.
|
|
7
13
|
|
|
8
|
-
//
|
|
9
|
-
//
|
|
14
|
+
// The control indicator.
|
|
15
|
+
//
|
|
16
|
+
// Does NOT touch box-shadow, so a focused card keeps its elevation. Where a state paints its
|
|
17
|
+
// own shadow on the same element, that one still has to yield — `state-shadow` below, and its
|
|
18
|
+
// conditions.
|
|
10
19
|
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
20
|
+
// Usage — @include inside the element's own `&:focus-visible` block:
|
|
21
|
+
// @use '../../styles/focus' as focus;
|
|
22
|
+
// &:focus-visible { @include focus.ring; }
|
|
23
|
+
// &:focus-visible { @include focus.ring(calc(-1 * var(--focus-ring-offset))); } // clipped
|
|
24
|
+
@mixin ring($offset: var(--focus-ring-offset)) {
|
|
25
|
+
outline: var(--focus-ring-width) solid var(--focus-ring-color);
|
|
26
|
+
outline-offset: $offset;
|
|
27
|
+
|
|
28
|
+
// An ANIMATION, not a transition, and the distinction is load-bearing. `transition` is one
|
|
29
|
+
// property: 46 component stylesheets declare their own list, and whichever rule wins REPLACES
|
|
30
|
+
// the other's entirely — a transition here would silently drop the component's background and
|
|
31
|
+
// border easing for as long as the element held focus. `animation` is a separate property that
|
|
32
|
+
// nothing else on a focusable element sets, so both survive.
|
|
33
|
+
//
|
|
34
|
+
// Colour only: animating `outline-offset` makes the ring lag the caret on a fast Tab, and the
|
|
35
|
+
// indicator is a keyboard user's only signal of where they are.
|
|
36
|
+
animation: ds-focus-ring-in var(--duration-fast) var(--ease-standard);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Catches anything focusable that styles nothing itself, so it cannot fall through to
|
|
40
|
+
// the browser default. Same mechanism as `ring`, so a shell that rings on `:focus-within`
|
|
41
|
+
// silences its control with `owns-the-focus-ring` and no second ring appears.
|
|
14
42
|
:where(:focus-visible) {
|
|
15
|
-
|
|
16
|
-
|
|
43
|
+
@include ring;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Only the FROM value is declared: the to-value is whatever the ring resolves to on that element,
|
|
47
|
+
// so one keyframe serves every colour, width and offset the tokens can take.
|
|
48
|
+
@keyframes ds-focus-ring-in {
|
|
49
|
+
from {
|
|
50
|
+
outline-color: transparent;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// A shell that rings on its control's behalf: the whole contract in one call.
|
|
55
|
+
//
|
|
56
|
+
// The SELECTOR is the reason this exists. `:focus-within` is the obvious spelling and it is wrong
|
|
57
|
+
// here — it matches a POINTER focus too, and a checkbox or radio is not granted `:focus-visible`
|
|
58
|
+
// on click, so a clicked control kept its ring until focus moved away. `:has(:focus-visible)` asks
|
|
59
|
+
// the question that was meant: is something inside focused THE WAY A KEYBOARD FOCUSES IT. Written
|
|
60
|
+
// per component, that choice was got wrong once and would be got wrong again.
|
|
61
|
+
//
|
|
62
|
+
// It also silences $control, because a shell that rings without silencing paints two rings — the
|
|
63
|
+
// other half of the same contract, and the reason `tools/check-focus-rings.mjs` exists. One call
|
|
64
|
+
// cannot forget the half the other is checking for.
|
|
65
|
+
//
|
|
66
|
+
// NOT for a field shell: those ring with the `--ds-field-focus-shadow` halo, and `:focus-within`
|
|
67
|
+
// is correct there because clicking into a text input DOES grant it `:focus-visible`.
|
|
68
|
+
//
|
|
69
|
+
// Usage: `.control-line { @include focus.ring-for('.check'); }`
|
|
70
|
+
@mixin ring-for($control, $offset: var(--focus-ring-offset)) {
|
|
71
|
+
&:has(:focus-visible) {
|
|
72
|
+
@include ring($offset);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@include owns-the-focus-ring($control);
|
|
17
76
|
}
|
|
18
77
|
|
|
19
78
|
// `$control` names ONE control and must never be a blanket: a box-wide reset also
|
|
@@ -21,74 +80,68 @@
|
|
|
21
80
|
// then tabbing from the field to that button changes nothing on screen.
|
|
22
81
|
@mixin owns-the-focus-ring($control) {
|
|
23
82
|
#{$control}:where(:focus-visible) {
|
|
24
|
-
|
|
83
|
+
@include own-indicator;
|
|
25
84
|
}
|
|
26
85
|
}
|
|
27
86
|
|
|
28
|
-
//
|
|
29
|
-
// row inside a clipping list, a swatch in a grid — where the outset halo is eaten by the
|
|
30
|
-
// `overflow` ancestor.
|
|
87
|
+
// Turns the base indicator off, for a control whose SHELL rings on its behalf.
|
|
31
88
|
//
|
|
32
|
-
//
|
|
33
|
-
//
|
|
89
|
+
// The media query is the whole point and a bare `outline: none` is the bug it replaces.
|
|
90
|
+
// Forced colours drops `box-shadow` entirely, so a field whose shell rings with the halo
|
|
91
|
+
// has nothing left once the control is silenced — the one mode where an indicator is
|
|
92
|
+
// mandatory is the one where it disappeared. Skipping the suppression there costs a
|
|
93
|
+
// second ring in a palette the author does not control anyway, which is the cheaper wrong.
|
|
94
|
+
@mixin own-indicator {
|
|
95
|
+
@media not (forced-colors: active) {
|
|
96
|
+
outline: none;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// For a persistent state — selected, active, current — that paints its own box-shadow on
|
|
101
|
+
// the element that also carries the focus ring. One property cannot hold both, so the
|
|
102
|
+
// later rule wins and one signal vanishes silently; this hands the ring the tie by
|
|
103
|
+
// intent rather than by line order.
|
|
34
104
|
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
105
|
+
// Only for a state whose OTHER properties keep it identifiable while focused (a fill, a
|
|
106
|
+
// label colour). A state carried by the shadow ALONE must not use it — the state would
|
|
107
|
+
// go unreadable exactly while the user stands on it.
|
|
108
|
+
//
|
|
109
|
+
// Usage: `&.active { @include focus.state-shadow(inset 3px 0 0 var(--_rail)); }`
|
|
110
|
+
@mixin state-shadow($shadow) {
|
|
111
|
+
&:not(:focus-visible) {
|
|
112
|
+
box-shadow: $shadow;
|
|
113
|
+
}
|
|
42
114
|
}
|
|
43
115
|
|
|
116
|
+
// Fields ring like controls: the halo role is retargeted at the ring token so both
|
|
117
|
+
// families read the same colour and thickness.
|
|
44
118
|
:root[data-focus='ring'] {
|
|
45
119
|
--ds-field-focus-shadow: var(--focus-ring);
|
|
46
120
|
--ds-field-focus-shadow-error: var(--focus-ring-error);
|
|
47
121
|
}
|
|
48
122
|
|
|
49
|
-
|
|
50
|
-
--ds-control-focus-shadow: var(--focus-field);
|
|
51
|
-
--ds-control-focus-shadow-error: var(--focus-field-error);
|
|
52
|
-
}
|
|
53
|
-
|
|
123
|
+
// Hairline flush against the element — no gap in either family.
|
|
54
124
|
:root[data-focus='edge'] {
|
|
125
|
+
--focus-ring-offset: 0px;
|
|
55
126
|
--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);
|
|
56
127
|
--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error);
|
|
57
|
-
--ds-control-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);
|
|
58
|
-
--ds-control-focus-shadow-error: 0 0 0 var(--border-width-default)
|
|
59
|
-
var(--error);
|
|
60
128
|
}
|
|
61
129
|
|
|
62
130
|
// The one style NOT pinned to :root, because a clipping ancestor is a local problem:
|
|
63
131
|
// set it on the clipping element and everything inside keeps an indicator.
|
|
64
132
|
[data-focus='inset'] {
|
|
133
|
+
--focus-ring-offset: calc(-1 * var(--focus-ring-width));
|
|
65
134
|
--ds-field-focus-shadow: var(--focus-ring-inset);
|
|
66
135
|
--ds-field-focus-shadow-error: var(--focus-ring-inset-error);
|
|
67
|
-
--ds-control-focus-shadow: var(--focus-ring-inset);
|
|
68
|
-
--ds-control-focus-shadow-error: var(--focus-ring-inset-error);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
:root[data-focus='outline'] {
|
|
72
|
-
--ds-field-focus-shadow: none;
|
|
73
|
-
--ds-field-focus-shadow-error: none;
|
|
74
|
-
--ds-control-focus-shadow: none;
|
|
75
|
-
--ds-control-focus-shadow-error: none;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// The only style that emits a rule of its own: an `outline` cannot be carried by a
|
|
79
|
-
// box-shadow token, so the roles go to `none` above and this draws the indicator.
|
|
80
|
-
:root[data-focus='outline'] :where(:focus-visible) {
|
|
81
|
-
outline: var(--border-width-strong) solid var(--primary);
|
|
82
|
-
outline-offset: var(--focus-ring-offset);
|
|
83
136
|
}
|
|
84
137
|
|
|
85
138
|
// Not part of the switch — it applies under every style, because Windows High
|
|
86
|
-
// Contrast DROPS box-shadow and
|
|
139
|
+
// Contrast DROPS box-shadow and the field family's halo vanishes there completely.
|
|
87
140
|
@media (forced-colors: active) {
|
|
88
141
|
// CanvasText, not a brand colour: the palette is replaced, and a system keyword is
|
|
89
142
|
// the only value guaranteed to contrast with the forced background.
|
|
90
143
|
:where(:focus-visible) {
|
|
91
|
-
outline: var(--
|
|
144
|
+
outline: var(--focus-ring-width) solid CanvasText;
|
|
92
145
|
outline-offset: var(--focus-ring-offset);
|
|
93
146
|
}
|
|
94
147
|
}
|
package/styles/_link.scss
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use 'focus' as focus;
|
|
2
|
+
|
|
1
3
|
/* Global .link helper — pure CSS class (no Angular wrapper) so consumers
|
|
2
4
|
can apply it to inline anchors inside <p> text without disrupting line
|
|
3
5
|
flow. Modifiers: .quiet, .inline, .standalone, .xs, .sm, .lg. */
|
|
@@ -28,8 +30,8 @@
|
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
&:focus-visible {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
@include focus.ring;
|
|
34
|
+
|
|
33
35
|
border-radius: var(--radius-sm);
|
|
34
36
|
text-decoration-color: var(--_link-color);
|
|
35
37
|
}
|
package/styles/_tokens.scss
CHANGED
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
--border-width-default: 1px;
|
|
62
62
|
--border-width-strong: 2px;
|
|
63
63
|
|
|
64
|
+
/* 2px is the floor WCAG 2.4.13 measures against, and only the CONTRASTING part counts —
|
|
65
|
+
an indicator whose 2px is half gap does not meet it. The offset is a real gap: the
|
|
66
|
+
outline is not painted there, so whatever the control sits on shows through. */
|
|
67
|
+
--focus-ring-width: 2px;
|
|
64
68
|
--focus-ring-offset: 2px;
|
|
65
69
|
|
|
66
70
|
/* Shadows are composed from a channel-split tint so a theme can re-colour them:
|
|
@@ -148,6 +152,15 @@
|
|
|
148
152
|
--ds-motion-exit-large-duration: var(--duration-base);
|
|
149
153
|
--ds-motion-exit-large-easing: var(--ease-accelerate);
|
|
150
154
|
|
|
155
|
+
/* The check mark landing in a box. Its own role because the mark overshoots and
|
|
156
|
+
nothing else at this scale does: --ease-spring exists for exactly this and is
|
|
157
|
+
documented as sparing. Enter and exit differ so the mark leaves faster than it
|
|
158
|
+
arrives, which is what makes the overshoot read as weight rather than as lag. */
|
|
159
|
+
--ds-motion-check-enter-duration: var(--duration-base);
|
|
160
|
+
--ds-motion-check-enter-easing: var(--ease-spring);
|
|
161
|
+
--ds-motion-check-exit-duration: var(--duration-fast);
|
|
162
|
+
--ds-motion-check-exit-easing: var(--ease-accelerate);
|
|
163
|
+
|
|
151
164
|
--opacity-disabled: 0.5;
|
|
152
165
|
--opacity-text-disabled: 0.38; /* WCAG-derived */
|
|
153
166
|
--opacity-scrim: 0.55;
|
|
@@ -238,6 +251,13 @@
|
|
|
238
251
|
/* Two focus families: fields get the soft halo, interactive controls and nav
|
|
239
252
|
the crisp ring. Components default their own --ds-*-focus-shadow to these,
|
|
240
253
|
so a consumer can retune a whole family or a single component. */
|
|
254
|
+
|
|
255
|
+
/* The flat tokens, NOT the --accent-focus-* aliases, and that is not an oversight — see
|
|
256
|
+
docs/todo.md, "zone colour and data-focus shape cannot both reach one role". A `var()`
|
|
257
|
+
inside a custom property is substituted where that property is DECLARED, so anything
|
|
258
|
+
written here is frozen with :root's inputs and a ds-color zone can never reach it. A zone
|
|
259
|
+
changing the colour and the switch changing the shape are therefore mutually exclusive at
|
|
260
|
+
this indirection; the switch wins here because it is the documented one. */
|
|
241
261
|
--ds-field-focus-shadow: var(--focus-field);
|
|
242
262
|
--ds-field-focus-shadow-error: var(--focus-field-error);
|
|
243
263
|
--ds-control-focus-shadow: var(--focus-ring);
|
package/styles/_typography.scss
CHANGED
|
@@ -139,6 +139,10 @@
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
.t-mono {
|
|
142
|
+
// JetBrains Mono ligates operators by default, so `===` paints as one triple-bar glyph
|
|
143
|
+
// and `!=` as a struck equals: prose that NAMES an operator then shows something other
|
|
144
|
+
// than the characters it discusses. Set --ds-t-mono-ligatures to `normal` to get them back.
|
|
145
|
+
font-variant-ligatures: var(--ds-t-mono-ligatures, none);
|
|
142
146
|
font-weight: var(--ds-t-mono-font-weight, var(--font-weight-medium));
|
|
143
147
|
font-size: var(--ds-t-mono-font-size, var(--font-size-mono));
|
|
144
148
|
line-height: var(--ds-t-mono-line-height, var(--line-height-base));
|
|
@@ -146,6 +150,7 @@
|
|
|
146
150
|
}
|
|
147
151
|
|
|
148
152
|
.t-mono-inline {
|
|
153
|
+
font-variant-ligatures: var(--ds-t-mono-ligatures, none);
|
|
149
154
|
font-weight: var(--ds-t-mono-inline-font-weight, var(--font-weight-regular));
|
|
150
155
|
font-size: var(--ds-t-mono-inline-font-size, var(--font-size-mono));
|
|
151
156
|
line-height: var(--ds-t-mono-inline-line-height, 1);
|
|
@@ -157,6 +162,7 @@
|
|
|
157
162
|
}
|
|
158
163
|
|
|
159
164
|
.t-mono-block {
|
|
165
|
+
font-variant-ligatures: var(--ds-t-mono-ligatures, none);
|
|
160
166
|
font-weight: var(--ds-t-mono-block-font-weight, var(--font-weight-regular));
|
|
161
167
|
font-size: var(--ds-t-mono-block-font-size, var(--font-size-mono));
|
|
162
168
|
line-height: var(--ds-t-mono-block-line-height, var(--line-height-loose));
|
package/themes/README.md
CHANGED
|
@@ -4,11 +4,11 @@ Colour is layered in three concerns: a **base palette** (theme-independent primi
|
|
|
4
4
|
|
|
5
5
|
## Architecture: three layers
|
|
6
6
|
|
|
7
|
-
| Layer | Lives in | Examples
|
|
8
|
-
| ----------------------------- | ---------------------------------------------- |
|
|
7
|
+
| Layer | Lives in | Examples | Applied at |
|
|
8
|
+
| ----------------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
|
|
9
9
|
| **Base palette** (primitives) | `themes/_base-palette.scss` | `--blue-600`, `--cool-gray-*`, `--brand-gray-*`, `--red-h/s/l`, `--static-ink`, fonts, `--shadow-tint-h/s` | `:root` (theme-independent) |
|
|
10
|
-
| **Theme** (role map) | `themes/_semantic.scss` + `themes/<t>/_*.scss` | `--primary`, `--surface-canvas`, `--text-primary`, the `--neutral-*` slot, `--focus-ring`
|
|
11
|
-
| **Component / scale** | `styles/_tokens.scss`, `*.component.scss` | `--space-*`, `--radius-*`, `--ds-button-bg-color`, `--duration-fast`
|
|
10
|
+
| **Theme** (role map) | `themes/_semantic.scss` + `themes/<t>/_*.scss` | `--primary`, `--surface-canvas`, `--text-primary`, the `--neutral-*` slot, `--focus-ring` | `:root` (light) / `:root[data-theme='dark']` |
|
|
11
|
+
| **Component / scale** | `styles/_tokens.scss`, `*.component.scss` | `--space-*`, `--radius-*`, `--ds-button-bg-color`, `--duration-fast` | `:root` (theme-independent) |
|
|
12
12
|
|
|
13
13
|
**Hard rule:** components NEVER consume base-palette primitives directly. `var(--blue-600)` inside `button.component.scss` is a bug — use a Tier-2 role (`--primary`, `--text-secondary`) or a component token.
|
|
14
14
|
|
package/themes/_semantic.scss
CHANGED
|
@@ -203,15 +203,14 @@
|
|
|
203
203
|
|
|
204
204
|
/* Focus rings.
|
|
205
205
|
Outer halos use hsla() composed from brand/danger HSL channels
|
|
206
|
-
so re-skinning --primary-h propagates into focus state.
|
|
206
|
+
so re-skinning --primary-h propagates into focus state. */
|
|
207
207
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
--focus-ring-inner: transparent;
|
|
208
|
+
/* Separates the two bands of the FIELD halo, and nothing else — controls draw an
|
|
209
|
+
`outline`, whose gap needs no colour at all. It cannot be `transparent`: a transparent
|
|
210
|
+
shadow layer is a no-op, not a hole, so the outer band would show through as one solid
|
|
211
|
+
4px slab. `--surface-default` and not `--surface-canvas`: a field sits on the surface,
|
|
212
|
+
and painting the page ground here drew a dark rim around a light card. */
|
|
213
|
+
--focus-ring-inner: var(--surface-default);
|
|
215
214
|
--focus-ring-outer-h: var(--primary-h);
|
|
216
215
|
--focus-ring-outer-s: var(--primary-s);
|
|
217
216
|
--focus-ring-outer-l: var(--primary-l);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/** Contract that ds-accordion-item reads from its parent ds-accordion. */
|
|
5
|
+
interface AccordionContract {
|
|
6
|
+
readonly multi: () => boolean;
|
|
7
|
+
/** Called when an item opens; coordinator may close other items. */
|
|
8
|
+
notifyOpen(item: AccordionItemRef): void;
|
|
9
|
+
}
|
|
10
|
+
/** Contract ds-accordion reads back from each projected item. */
|
|
11
|
+
interface AccordionItemRef {
|
|
12
|
+
/** Closes this item (sets expanded to false). */
|
|
13
|
+
closeItem(): void;
|
|
14
|
+
}
|
|
15
|
+
declare const ACCORDION: InjectionToken<AccordionContract>;
|
|
16
|
+
|
|
17
|
+
declare class AccordionComponent implements AccordionContract {
|
|
18
|
+
/** When false, opening one item automatically closes all others. */
|
|
19
|
+
readonly multi: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
20
|
+
private readonly items;
|
|
21
|
+
notifyOpen(opened: AccordionItemRef): void;
|
|
22
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionComponent, never>;
|
|
23
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AccordionComponent, "ds-accordion", never, { "multi": { "alias": "multi"; "required": false; "isSignal": true; }; }, {}, ["items"], ["*"], true, never>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare class AccordionItemComponent implements AccordionItemRef {
|
|
27
|
+
/** Header text shown in the toggle button. */
|
|
28
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
29
|
+
/** Open state, two-way bound. */
|
|
30
|
+
readonly expanded: _angular_core.ModelSignal<boolean>;
|
|
31
|
+
/** Disables the toggle button; state stays as-is. */
|
|
32
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
33
|
+
protected readonly uid: string;
|
|
34
|
+
protected readonly headId: string;
|
|
35
|
+
protected readonly bodyId: string;
|
|
36
|
+
private readonly accordion;
|
|
37
|
+
/** Tracks last expanded state so we only notify on a true open transition. */
|
|
38
|
+
private previousExpanded;
|
|
39
|
+
constructor();
|
|
40
|
+
protected toggle(): void;
|
|
41
|
+
/** Called by the accordion coordinator to enforce single-open mode. */
|
|
42
|
+
closeItem(): void;
|
|
43
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AccordionItemComponent, never>;
|
|
44
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AccordionItemComponent, "ds-accordion-item", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, ["[badge]", "*"], true, never>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { ACCORDION, AccordionComponent, AccordionItemComponent };
|
|
48
|
+
export type { AccordionContract, AccordionItemRef };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { IconName } from '@ids-group-ltd/ids-design-system/core';
|
|
3
|
+
|
|
4
|
+
type AlertVariant = 'info' | 'success' | 'warning' | 'error' | 'neutral';
|
|
5
|
+
|
|
6
|
+
declare class AlertComponent {
|
|
7
|
+
/** Severity — drives colour, the default icon and the ARIA role/live. */
|
|
8
|
+
readonly variant: _angular_core.InputSignal<AlertVariant>;
|
|
9
|
+
/** Optional bold heading above the message. */
|
|
10
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
11
|
+
/** Show a close button that emits `closed`. */
|
|
12
|
+
readonly dismissible: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
13
|
+
/** Override the variant's default icon. */
|
|
14
|
+
readonly icon: _angular_core.InputSignal<IconName | null>;
|
|
15
|
+
/** Fires when the user dismisses the alert. */
|
|
16
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
17
|
+
/** Announce this alert to a screen reader when it appears. Off by default — see
|
|
18
|
+
* `ds-banner`'s `announce` for why, and prefer `ToastService` for anything
|
|
19
|
+
* transient. */
|
|
20
|
+
readonly announce: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
21
|
+
protected get ariaRole(): 'alert' | 'status' | null;
|
|
22
|
+
protected get ariaLive(): 'assertive' | 'polite' | null;
|
|
23
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
24
|
+
protected readonly defaultIcon: _angular_core.Signal<IconName>;
|
|
25
|
+
protected readonly resolvedIcon: _angular_core.Signal<IconName>;
|
|
26
|
+
protected onDismiss(): void;
|
|
27
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertComponent, never>;
|
|
28
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AlertComponent, "ds-alert", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "announce": { "alias": "announce"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, never, ["*", "[actions]"], true, never>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { AlertComponent };
|
|
32
|
+
export type { AlertVariant };
|