@re-code/aurora 0.2.0 → 0.3.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/README.md +1 -1
- package/dist/aurora/aurora.esm.js +1 -1
- package/dist/aurora/{p-8ed72e5b.entry.js → p-01ff4d34.entry.js} +1 -1
- package/dist/aurora/{p-c3668073.entry.js → p-0554ffea.entry.js} +1 -1
- package/dist/aurora/{p-278d3434.entry.js → p-0a0a2bfe.entry.js} +1 -1
- package/dist/aurora/{p-e1c97234.entry.js → p-0a7e9e8e.entry.js} +1 -1
- package/dist/aurora/{p-c330982c.entry.js → p-1670a9bd.entry.js} +1 -1
- package/dist/aurora/{p-efd60427.entry.js → p-17c6de2c.entry.js} +1 -1
- package/dist/aurora/{p-a87dc1d3.entry.js → p-24ff90e0.entry.js} +1 -1
- package/dist/aurora/p-27da7b8a.entry.js +1 -0
- package/dist/aurora/p-380d8ebe.entry.js +1 -0
- package/dist/aurora/{p-a1e257c7.entry.js → p-3cfccef1.entry.js} +1 -1
- package/dist/aurora/{p-e72126a2.entry.js → p-4fd71d14.entry.js} +1 -1
- package/dist/aurora/{p-89b66c7a.entry.js → p-5606ed9c.entry.js} +1 -1
- package/dist/aurora/p-56fc4315.entry.js +1 -0
- package/dist/aurora/{p-685b9e53.entry.js → p-5a027df1.entry.js} +1 -1
- package/dist/aurora/{p-487df7d8.entry.js → p-5dd73182.entry.js} +1 -1
- package/dist/aurora/{p-17e65032.entry.js → p-62d79933.entry.js} +1 -1
- package/dist/aurora/p-6a1363da.entry.js +1 -0
- package/dist/aurora/{p-fd4e9cdd.entry.js → p-6e9c8e27.entry.js} +1 -1
- package/dist/aurora/{p-31a86367.entry.js → p-742abb2c.entry.js} +1 -1
- package/dist/aurora/{p-40bb52c3.entry.js → p-7a9bc20f.entry.js} +1 -1
- package/dist/aurora/{p-35edd036.entry.js → p-7cc6bb71.entry.js} +1 -1
- package/dist/aurora/{p-689f37db.entry.js → p-7fa0ee48.entry.js} +1 -1
- package/dist/aurora/{p-ee2ea46e.entry.js → p-815611f9.entry.js} +1 -1
- package/dist/aurora/{p-a8e984e1.entry.js → p-8800c466.entry.js} +1 -1
- package/dist/aurora/{p-5d2a88ca.entry.js → p-9e9377b5.entry.js} +1 -1
- package/dist/aurora/p-DMeUBbqF.js +7 -0
- package/dist/aurora/{p-DXbj-yic.js → p-DNpzZvak.js} +1 -1
- package/dist/aurora/p-DjW6oMgu.js +7 -0
- package/dist/aurora/{p-DzNA1eDU.js → p-DqAwSryz.js} +1 -1
- package/dist/aurora/p-NvNa2Iiu.js +1 -0
- package/dist/aurora/p-a376a248.entry.js +1 -0
- package/dist/aurora/{p-0608e910.entry.js → p-a63d1f80.entry.js} +1 -1
- package/dist/aurora/p-b0ebcc51.entry.js +1 -0
- package/dist/aurora/p-be98a1d7.entry.js +1 -0
- package/dist/aurora/{p-ed998b0c.entry.js → p-bf922703.entry.js} +1 -1
- package/dist/aurora/{p-ee4475a6.entry.js → p-c1422894.entry.js} +1 -1
- package/dist/aurora/{p-372a3416.entry.js → p-c2164ffe.entry.js} +1 -1
- package/dist/aurora/{p-2a16d544.entry.js → p-cb63ca43.entry.js} +1 -1
- package/dist/aurora/p-cc1015fe.entry.js +1 -0
- package/dist/aurora/{p-88b72de7.entry.js → p-cf16464e.entry.js} +1 -1
- package/dist/aurora/p-cfa0166b.entry.js +1 -0
- package/dist/aurora/{p-e7c81a6b.entry.js → p-d85e1d60.entry.js} +1 -1
- package/dist/aurora/{p-64229ad2.entry.js → p-f176be8b.entry.js} +1 -1
- package/dist/aurora/{p-bd1f6486.entry.js → p-f3383f3c.entry.js} +1 -1
- package/dist/aurora/p-f5d3aefa.entry.js +1 -0
- package/dist/aurora/{p-038b2190.entry.js → p-f85687a5.entry.js} +1 -1
- package/dist/aurora/{p-546a2f69.entry.js → p-fe143404.entry.js} +1 -1
- package/dist/cjs/au-alert.cjs.entry.js +1 -1
- package/dist/cjs/au-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/au-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/au-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/au-combobox.cjs.entry.js +6 -6
- package/dist/cjs/au-container.cjs.entry.js +1 -1
- package/dist/cjs/au-dialog.cjs.entry.js +4 -4
- package/dist/cjs/au-divider.cjs.entry.js +1 -1
- package/dist/cjs/au-field.cjs.entry.js +1 -1
- package/dist/cjs/{au-icon-D0L9Wwy0.js → au-icon-0-khGfX2.js} +1 -1
- package/dist/cjs/au-icon.cjs.entry.js +1 -1
- package/dist/cjs/au-input.cjs.entry.js +6 -6
- package/dist/cjs/au-kbd.cjs.entry.js +355 -0
- package/dist/cjs/au-list-item.cjs.entry.js +195 -0
- package/dist/cjs/au-list.cjs.entry.js +78 -0
- package/dist/cjs/au-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/au-menu.cjs.entry.js +1 -1
- package/dist/cjs/au-nav-link.cjs.entry.js +1 -1
- package/dist/cjs/au-navbar.cjs.entry.js +4 -4
- package/dist/cjs/au-number-input.cjs.entry.js +4 -4
- package/dist/cjs/au-popover.cjs.entry.js +1 -1
- package/dist/cjs/au-progress.cjs.entry.js +107 -0
- package/dist/cjs/au-radio-group.cjs.entry.js +3 -3
- package/dist/cjs/au-radio.cjs.entry.js +1 -1
- package/dist/cjs/au-segmented-control.cjs.entry.js +3 -3
- package/dist/cjs/au-segmented-option.cjs.entry.js +1 -1
- package/dist/cjs/au-select.cjs.entry.js +4 -4
- package/dist/cjs/au-sidebar-nav.cjs.entry.js +1 -1
- package/dist/cjs/au-skeleton.cjs.entry.js +106 -0
- package/dist/cjs/au-slider.cjs.entry.js +3 -3
- package/dist/cjs/au-splitter.cjs.entry.js +2 -2
- package/dist/cjs/au-stat.cjs.entry.js +262 -0
- package/dist/cjs/au-switch.cjs.entry.js +4 -4
- package/dist/cjs/au-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/au-tab.cjs.entry.js +1 -1
- package/dist/cjs/au-table.cjs.entry.js +337 -0
- package/dist/cjs/au-tabs.cjs.entry.js +4 -4
- package/dist/cjs/au-textarea.cjs.entry.js +3 -3
- package/dist/cjs/au-toast-region.cjs.entry.js +1 -1
- package/dist/cjs/au-toast.cjs.entry.js +1 -1
- package/dist/cjs/au-toc.cjs.entry.js +1 -1
- package/dist/cjs/au-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/aurora.cjs.js +1 -1
- package/dist/cjs/{icon-loader-DyRasOnf.js → icon-loader-Dij7pYkP.js} +3 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/trending-down-BKjmYE1H.js +19 -0
- package/dist/cjs/trending-up-CoWuXxqz.js +19 -0
- package/dist/collection/collection-manifest.json +7 -0
- package/dist/collection/components/data-display/au-kbd/au-kbd.constants.js +85 -0
- package/dist/collection/components/data-display/au-kbd/au-kbd.css +98 -0
- package/dist/collection/components/data-display/au-kbd/au-kbd.js +189 -0
- package/dist/collection/components/data-display/au-kbd/au-kbd.types.js +1 -0
- package/dist/collection/components/data-display/au-kbd/index.js +2 -0
- package/dist/collection/components/data-display/au-kbd/internal/describe.js +67 -0
- package/dist/collection/components/data-display/au-kbd/internal/parse.js +85 -0
- package/dist/collection/components/data-display/au-kbd/internal/platform.js +19 -0
- package/dist/collection/components/data-display/au-list/au-list.constants.js +8 -0
- package/dist/collection/components/data-display/au-list/au-list.css +30 -0
- package/dist/collection/components/data-display/au-list/au-list.js +132 -0
- package/dist/collection/components/data-display/au-list/au-list.types.js +1 -0
- package/dist/collection/components/data-display/au-list/index.js +2 -0
- package/dist/collection/components/data-display/au-list-item/au-list-item.css +196 -0
- package/dist/collection/components/data-display/au-list-item/au-list-item.js +305 -0
- package/dist/collection/components/data-display/au-list-item/index.js +1 -0
- package/dist/collection/components/data-display/au-list-item/internal/interactive-content.js +29 -0
- package/dist/collection/components/data-display/au-stat/au-stat.constants.js +44 -0
- package/dist/collection/components/data-display/au-stat/au-stat.css +139 -0
- package/dist/collection/components/data-display/au-stat/au-stat.js +491 -0
- package/dist/collection/components/data-display/au-stat/au-stat.types.js +1 -0
- package/dist/collection/components/data-display/au-stat/index.js +2 -0
- package/dist/collection/components/data-display/au-stat/internal/announcement.js +13 -0
- package/dist/collection/components/data-display/au-table/au-table.constants.js +21 -0
- package/dist/collection/components/data-display/au-table/au-table.css +20 -0
- package/dist/collection/components/data-display/au-table/au-table.js +482 -0
- package/dist/collection/components/data-display/au-table/au-table.types.js +1 -0
- package/dist/collection/components/data-display/au-table/index.js +2 -0
- package/dist/collection/components/data-display/au-table/internal/scroller-label.js +11 -0
- package/dist/collection/components/data-display/au-table/internal/sort.js +17 -0
- package/dist/collection/components/feedback/au-alert/au-alert.js +1 -1
- package/dist/collection/components/feedback/au-progress/au-progress.constants.js +38 -0
- package/dist/collection/components/feedback/au-progress/au-progress.css +201 -0
- package/dist/collection/components/feedback/au-progress/au-progress.js +226 -0
- package/dist/collection/components/feedback/au-progress/au-progress.types.js +1 -0
- package/dist/collection/components/feedback/au-progress/index.js +2 -0
- package/dist/collection/components/feedback/au-skeleton/au-skeleton.constants.js +33 -0
- package/dist/collection/components/feedback/au-skeleton/au-skeleton.css +108 -0
- package/dist/collection/components/feedback/au-skeleton/au-skeleton.js +159 -0
- package/dist/collection/components/feedback/au-skeleton/au-skeleton.types.js +1 -0
- package/dist/collection/components/feedback/au-skeleton/index.js +2 -0
- package/dist/collection/components/feedback/au-toast/au-toast.js +1 -1
- package/dist/collection/components/feedback/au-toast-region/au-toast-region.js +1 -1
- package/dist/collection/components/forms/au-checkbox/au-checkbox.js +4 -4
- package/dist/collection/components/forms/au-combobox/au-combobox.js +6 -6
- package/dist/collection/components/forms/au-field/au-field.js +1 -1
- package/dist/collection/components/forms/au-input/au-input.js +6 -6
- package/dist/collection/components/forms/au-number-input/au-number-input.js +4 -4
- package/dist/collection/components/forms/au-radio/au-radio.js +1 -1
- package/dist/collection/components/forms/au-radio-group/au-radio-group.js +3 -3
- package/dist/collection/components/forms/au-segmented-control/au-segmented-control.js +3 -3
- package/dist/collection/components/forms/au-segmented-option/au-segmented-option.js +1 -1
- package/dist/collection/components/forms/au-select/au-select.js +4 -4
- package/dist/collection/components/forms/au-slider/au-slider.js +3 -3
- package/dist/collection/components/forms/au-switch/au-switch.js +4 -4
- package/dist/collection/components/forms/au-textarea/au-textarea.js +3 -3
- package/dist/collection/components/layout/au-container/au-container.js +1 -1
- package/dist/collection/components/layout/au-divider/au-divider.js +1 -1
- package/dist/collection/components/layout/au-splitter/au-splitter.js +2 -2
- package/dist/collection/components/navigation/au-breadcrumb/au-breadcrumb.js +1 -1
- package/dist/collection/components/navigation/au-breadcrumb-item/au-breadcrumb-item.js +1 -1
- package/dist/collection/components/navigation/au-nav-link/au-nav-link.js +1 -1
- package/dist/collection/components/navigation/au-navbar/au-navbar.js +4 -4
- package/dist/collection/components/navigation/au-sidebar-nav/au-sidebar-nav.js +1 -1
- package/dist/collection/components/navigation/au-tab/au-tab.js +1 -1
- package/dist/collection/components/navigation/au-tab-panel/au-tab-panel.js +1 -1
- package/dist/collection/components/navigation/au-tabs/au-tabs.js +4 -4
- package/dist/collection/components/navigation/au-toc/au-toc.js +1 -1
- package/dist/collection/components/overlays/au-dialog/au-dialog.js +4 -4
- package/dist/collection/components/overlays/au-menu/au-menu.js +1 -1
- package/dist/collection/components/overlays/au-menu-item/au-menu-item.js +1 -1
- package/dist/collection/components/overlays/au-popover/au-popover.js +1 -1
- package/dist/collection/components/overlays/au-tooltip/au-tooltip.js +1 -1
- package/dist/collection/components/primitives/au-icon/core-icons.js +2 -0
- package/dist/components/au-alert.js +1 -1
- package/dist/components/au-avatar.js +1 -1
- package/dist/components/au-breadcrumb-item.js +1 -1
- package/dist/components/au-breadcrumb.js +1 -1
- package/dist/components/au-checkbox.js +1 -1
- package/dist/components/au-chip.js +1 -1
- package/dist/components/au-code-block.js +1 -1
- package/dist/components/au-combobox.js +1 -1
- package/dist/components/au-container.js +1 -1
- package/dist/components/au-dialog.js +1 -1
- package/dist/components/au-divider.js +1 -1
- package/dist/components/au-field.js +1 -1
- package/dist/components/au-icon.js +1 -1
- package/dist/components/au-input.js +1 -1
- package/dist/components/au-kbd.d.ts +11 -0
- package/dist/components/au-kbd.js +1 -0
- package/dist/components/au-list-item.d.ts +11 -0
- package/dist/components/au-list-item.js +1 -0
- package/dist/components/au-list.d.ts +11 -0
- package/dist/components/au-list.js +1 -0
- package/dist/components/au-menu-item.js +1 -1
- package/dist/components/au-menu.js +1 -1
- package/dist/components/au-nav-link.js +1 -1
- package/dist/components/au-navbar.js +1 -1
- package/dist/components/au-number-input.js +1 -1
- package/dist/components/au-popover.js +1 -1
- package/dist/components/au-progress.d.ts +11 -0
- package/dist/components/au-progress.js +1 -0
- package/dist/components/au-radio-group.js +1 -1
- package/dist/components/au-radio.js +1 -1
- package/dist/components/au-segmented-control.js +1 -1
- package/dist/components/au-segmented-option.js +1 -1
- package/dist/components/au-select.js +1 -1
- package/dist/components/au-sidebar-nav.js +1 -1
- package/dist/components/au-skeleton.d.ts +11 -0
- package/dist/components/au-skeleton.js +1 -0
- package/dist/components/au-slider.js +1 -1
- package/dist/components/au-splitter.js +1 -1
- package/dist/components/au-stat.d.ts +11 -0
- package/dist/components/au-stat.js +1 -0
- package/dist/components/au-switch.js +1 -1
- package/dist/components/au-tab-panel.js +1 -1
- package/dist/components/au-tab.js +1 -1
- package/dist/components/au-table.d.ts +11 -0
- package/dist/components/au-table.js +1 -0
- package/dist/components/au-tabs.js +1 -1
- package/dist/components/au-textarea.js +1 -1
- package/dist/components/au-toast-region.js +1 -1
- package/dist/components/au-toast.js +1 -1
- package/dist/components/au-toc.js +1 -1
- package/dist/components/au-tooltip.js +1 -1
- package/dist/components/p-B5BhPkwP.js +1 -0
- package/dist/components/p-DMeUBbqF.js +7 -0
- package/dist/components/p-DjW6oMgu.js +7 -0
- package/dist/components/{p-DzNA1eDU.js → p-DqAwSryz.js} +1 -1
- package/dist/components/{p-DAqsVCAy.js → p-Dw0zb4x_.js} +1 -1
- package/dist/components/{p-DIL-tsh4.js → p-ZpauIcNt.js} +1 -1
- package/dist/custom-elements.json +1338 -66
- package/dist/esm/au-alert.entry.js +1 -1
- package/dist/esm/au-breadcrumb-item.entry.js +1 -1
- package/dist/esm/au-breadcrumb.entry.js +1 -1
- package/dist/esm/au-checkbox.entry.js +4 -4
- package/dist/esm/au-code-block.entry.js +1 -1
- package/dist/esm/au-combobox.entry.js +7 -7
- package/dist/esm/au-container.entry.js +1 -1
- package/dist/esm/au-dialog.entry.js +4 -4
- package/dist/esm/au-divider.entry.js +1 -1
- package/dist/esm/au-field.entry.js +1 -1
- package/dist/esm/{au-icon-B17psn7x.js → au-icon-6iJTkDID.js} +1 -1
- package/dist/esm/au-icon.entry.js +1 -1
- package/dist/esm/au-input.entry.js +6 -6
- package/dist/esm/au-kbd.entry.js +353 -0
- package/dist/esm/au-list-item.entry.js +193 -0
- package/dist/esm/au-list.entry.js +76 -0
- package/dist/esm/au-menu-item.entry.js +1 -1
- package/dist/esm/au-menu.entry.js +1 -1
- package/dist/esm/au-nav-link.entry.js +1 -1
- package/dist/esm/au-navbar.entry.js +4 -4
- package/dist/esm/au-number-input.entry.js +4 -4
- package/dist/esm/au-popover.entry.js +1 -1
- package/dist/esm/au-progress.entry.js +105 -0
- package/dist/esm/au-radio-group.entry.js +3 -3
- package/dist/esm/au-radio.entry.js +1 -1
- package/dist/esm/au-segmented-control.entry.js +3 -3
- package/dist/esm/au-segmented-option.entry.js +1 -1
- package/dist/esm/au-select.entry.js +4 -4
- package/dist/esm/au-sidebar-nav.entry.js +1 -1
- package/dist/esm/au-skeleton.entry.js +104 -0
- package/dist/esm/au-slider.entry.js +3 -3
- package/dist/esm/au-splitter.entry.js +2 -2
- package/dist/esm/au-stat.entry.js +260 -0
- package/dist/esm/au-switch.entry.js +4 -4
- package/dist/esm/au-tab-panel.entry.js +1 -1
- package/dist/esm/au-tab.entry.js +1 -1
- package/dist/esm/au-table.entry.js +335 -0
- package/dist/esm/au-tabs.entry.js +4 -4
- package/dist/esm/au-textarea.entry.js +3 -3
- package/dist/esm/au-toast-region.entry.js +2 -2
- package/dist/esm/au-toast.entry.js +1 -1
- package/dist/esm/au-toc.entry.js +1 -1
- package/dist/esm/au-tooltip.entry.js +1 -1
- package/dist/esm/aurora.js +1 -1
- package/dist/esm/{icon-loader-CqLCmu4h.js → icon-loader-B2WSNZ27.js} +3 -1
- package/dist/esm/{live-announcer-CXd2OhYs.js → live-announcer-IAjNBWYI.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/trending-down-DjW6oMgu.js +17 -0
- package/dist/esm/trending-up-DMeUBbqF.js +17 -0
- package/dist/styles.css +139 -0
- package/dist/types/components/data-display/au-kbd/au-kbd.constants.d.ts +41 -0
- package/dist/types/components/data-display/au-kbd/au-kbd.d.ts +36 -0
- package/dist/types/components/data-display/au-kbd/au-kbd.types.d.ts +1 -0
- package/dist/types/components/data-display/au-kbd/index.d.ts +3 -0
- package/dist/types/components/data-display/au-kbd/internal/describe.d.ts +13 -0
- package/dist/types/components/data-display/au-kbd/internal/parse.d.ts +18 -0
- package/dist/types/components/data-display/au-kbd/internal/platform.d.ts +13 -0
- package/dist/types/components/data-display/au-list/au-list.constants.d.ts +8 -0
- package/dist/types/components/data-display/au-list/au-list.d.ts +29 -0
- package/dist/types/components/data-display/au-list/au-list.types.d.ts +1 -0
- package/dist/types/components/data-display/au-list/index.d.ts +3 -0
- package/dist/types/components/data-display/au-list-item/au-list-item.d.ts +61 -0
- package/dist/types/components/data-display/au-list-item/index.d.ts +1 -0
- package/dist/types/components/data-display/au-list-item/internal/interactive-content.d.ts +2 -0
- package/dist/types/components/data-display/au-stat/au-stat.constants.d.ts +44 -0
- package/dist/types/components/data-display/au-stat/au-stat.d.ts +67 -0
- package/dist/types/components/data-display/au-stat/au-stat.types.d.ts +1 -0
- package/dist/types/components/data-display/au-stat/index.d.ts +3 -0
- package/dist/types/components/data-display/au-stat/internal/announcement.d.ts +16 -0
- package/dist/types/components/data-display/au-table/au-table.constants.d.ts +26 -0
- package/dist/types/components/data-display/au-table/au-table.d.ts +86 -0
- package/dist/types/components/data-display/au-table/au-table.types.d.ts +1 -0
- package/dist/types/components/data-display/au-table/index.d.ts +3 -0
- package/dist/types/components/data-display/au-table/internal/scroller-label.d.ts +9 -0
- package/dist/types/components/data-display/au-table/internal/sort.d.ts +11 -0
- package/dist/types/components/feedback/au-progress/au-progress.constants.d.ts +31 -0
- package/dist/types/components/feedback/au-progress/au-progress.d.ts +32 -0
- package/dist/types/components/feedback/au-progress/au-progress.types.d.ts +1 -0
- package/dist/types/components/feedback/au-progress/index.d.ts +3 -0
- package/dist/types/components/feedback/au-skeleton/au-skeleton.constants.d.ts +27 -0
- package/dist/types/components/feedback/au-skeleton/au-skeleton.d.ts +31 -0
- package/dist/types/components/feedback/au-skeleton/au-skeleton.types.d.ts +1 -0
- package/dist/types/components/feedback/au-skeleton/index.d.ts +3 -0
- package/dist/types/components.d.ts +712 -0
- package/dist/types/vue.d.ts +7 -0
- package/package.json +53 -1
- package/dist/aurora/p-746825ce.entry.js +0 -1
- package/dist/aurora/p-CoyAdNcI.js +0 -1
- package/dist/aurora/p-b2feddb2.entry.js +0 -1
- package/dist/aurora/p-f89bde2b.entry.js +0 -1
- package/dist/components/p-M21eKzKU.js +0 -1
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--_item-color: var(--aurora-list-item-color, var(--aurora-color-text, #202733));
|
|
3
|
+
--_item-description-color: var(
|
|
4
|
+
--aurora-list-item-description-color,
|
|
5
|
+
var(--aurora-color-text-muted, #566273)
|
|
6
|
+
);
|
|
7
|
+
--_item-hover-background: var(
|
|
8
|
+
--aurora-list-item-hover-background,
|
|
9
|
+
var(--aurora-color-surface-muted, rgba(127, 127, 127, 0.12))
|
|
10
|
+
);
|
|
11
|
+
--_item-radius: var(--aurora-list-item-radius, var(--aurora-radius-md, 0.5rem));
|
|
12
|
+
--_item-indicator-color: var(
|
|
13
|
+
--aurora-list-item-current-indicator-color,
|
|
14
|
+
var(--aurora-color-primary, #0b5cad)
|
|
15
|
+
);
|
|
16
|
+
--_item-thickness: var(--aurora-list-item-current-indicator-thickness, 3px);
|
|
17
|
+
--_item-padding-inline: var(
|
|
18
|
+
--aurora-list-item-padding-inline,
|
|
19
|
+
var(--aurora-spacing-medium, 1rem)
|
|
20
|
+
);
|
|
21
|
+
--_item-gap: var(--aurora-list-item-gap, var(--aurora-spacing-small, 0.5rem));
|
|
22
|
+
--_item-focus-ring: var(
|
|
23
|
+
--aurora-list-item-focus-ring-color,
|
|
24
|
+
var(--aurora-focus-ring-color, var(--aurora-color-focus, Highlight))
|
|
25
|
+
);
|
|
26
|
+
--_item-transition-duration: var(
|
|
27
|
+
--aurora-list-item-transition-duration,
|
|
28
|
+
var(--aurora-motion-duration-fast, 120ms)
|
|
29
|
+
);
|
|
30
|
+
border-block-start: var(--_aurora-list-divider-width, 0) solid var(--aurora-list-divider-color, var(--aurora-color-border, #d4d9e1));
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host(:first-child) {
|
|
35
|
+
border-block-start-width: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.item {
|
|
39
|
+
align-items: center;
|
|
40
|
+
border-inline-start: var(--_item-thickness) solid transparent;
|
|
41
|
+
border-radius: var(--_item-radius);
|
|
42
|
+
box-sizing: border-box;
|
|
43
|
+
color: var(--_item-color);
|
|
44
|
+
display: flex;
|
|
45
|
+
font-family: var(--aurora-font-family, inherit);
|
|
46
|
+
font-size: var(--_aurora-list-item-font-size, var(--aurora-font-size-md, 1rem));
|
|
47
|
+
gap: var(--_item-gap);
|
|
48
|
+
isolation: isolate;
|
|
49
|
+
line-height: var(--aurora-line-height-normal, 1.5);
|
|
50
|
+
padding-block: var(--_aurora-list-item-padding-block, var(--aurora-spacing-small, 0.5rem));
|
|
51
|
+
padding-inline-end: var(--_item-padding-inline);
|
|
52
|
+
padding-inline-start: calc(var(--_item-padding-inline) - var(--_item-thickness));
|
|
53
|
+
position: relative;
|
|
54
|
+
transition-duration: var(--_item-transition-duration);
|
|
55
|
+
transition-property: background-color;
|
|
56
|
+
transition-timing-function: var(--aurora-motion-easing-standard, ease);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host(:not([has-leading])) .item__leading,
|
|
60
|
+
:host(:not([has-description])) .item__description,
|
|
61
|
+
:host(:not([has-trailing])) .item__trailing {
|
|
62
|
+
display: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.item__leading,
|
|
66
|
+
.item__trailing {
|
|
67
|
+
align-items: center;
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
flex: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.item__trailing {
|
|
73
|
+
color: var(--_item-description-color);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.item__content {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex: 1 1 auto;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
min-inline-size: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.item__label,
|
|
84
|
+
.item__link {
|
|
85
|
+
min-inline-size: 0;
|
|
86
|
+
overflow-wrap: anywhere;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.item__description {
|
|
90
|
+
color: var(--_item-description-color);
|
|
91
|
+
font-size: 0.875em;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.item--link {
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.item--link:hover {
|
|
99
|
+
background: var(--_item-hover-background);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.item__link {
|
|
103
|
+
color: var(--_item-color);
|
|
104
|
+
cursor: inherit;
|
|
105
|
+
font-weight: var(--aurora-font-weight-medium, 500);
|
|
106
|
+
text-decoration: none;
|
|
107
|
+
transition-duration: var(--_item-transition-duration);
|
|
108
|
+
transition-property: color;
|
|
109
|
+
transition-timing-function: var(--aurora-motion-easing-standard, ease);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.item__link::after {
|
|
113
|
+
border-radius: var(--_item-radius);
|
|
114
|
+
content: "";
|
|
115
|
+
inset: 0;
|
|
116
|
+
position: absolute;
|
|
117
|
+
z-index: 1;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.item__link:focus-visible {
|
|
121
|
+
outline: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.item__link:focus-visible::after {
|
|
125
|
+
outline: var(--aurora-focus-ring-width, 2px) solid var(--_item-focus-ring);
|
|
126
|
+
outline-offset: calc(-1 * var(--aurora-focus-ring-width, 2px));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.item--current {
|
|
130
|
+
border-inline-start-color: var(--_item-indicator-color);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.item--current .item__link,
|
|
134
|
+
.item--current .item__label {
|
|
135
|
+
font-weight: var(--aurora-font-weight-semibold, 600);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.item__link[aria-disabled=true] {
|
|
139
|
+
cursor: var(--aurora-disabled-cursor, not-allowed);
|
|
140
|
+
opacity: var(--aurora-disabled-opacity, 0.58);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.item__new-tab-icon {
|
|
144
|
+
block-size: 0.875em;
|
|
145
|
+
flex: none;
|
|
146
|
+
inline-size: 0.875em;
|
|
147
|
+
margin-inline-start: 0.25em;
|
|
148
|
+
vertical-align: -0.1em;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.item__visually-hidden {
|
|
152
|
+
border: 0;
|
|
153
|
+
clip: rect(0 0 0 0);
|
|
154
|
+
clip-path: inset(50%);
|
|
155
|
+
height: 1px;
|
|
156
|
+
margin: -1px;
|
|
157
|
+
overflow: hidden;
|
|
158
|
+
padding: 0;
|
|
159
|
+
position: absolute;
|
|
160
|
+
white-space: nowrap;
|
|
161
|
+
width: 1px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@media (prefers-reduced-motion: reduce) {
|
|
165
|
+
.item,
|
|
166
|
+
.item__link {
|
|
167
|
+
transition-duration: 0s;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
@media (forced-colors: active) {
|
|
171
|
+
:host {
|
|
172
|
+
border-block-start-color: CanvasText;
|
|
173
|
+
}
|
|
174
|
+
.item,
|
|
175
|
+
.item__description,
|
|
176
|
+
.item__trailing,
|
|
177
|
+
.item__label {
|
|
178
|
+
color: CanvasText;
|
|
179
|
+
}
|
|
180
|
+
.item--link:hover {
|
|
181
|
+
background: transparent;
|
|
182
|
+
}
|
|
183
|
+
.item--current {
|
|
184
|
+
border-inline-start-color: Highlight;
|
|
185
|
+
}
|
|
186
|
+
.item__link {
|
|
187
|
+
color: LinkText;
|
|
188
|
+
}
|
|
189
|
+
.item__link[aria-disabled=true] {
|
|
190
|
+
color: GrayText;
|
|
191
|
+
opacity: 1;
|
|
192
|
+
}
|
|
193
|
+
.item__link:focus-visible::after {
|
|
194
|
+
outline-color: Highlight;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { NEW_TAB_ICON_PATHS, normalizeAriaCurrent, resolveLinkState, } from "../../../shared/navigation/index.js";
|
|
3
|
+
import { warnOncePerDocument } from "../../../shared/warn-once.js";
|
|
4
|
+
import { hasInteractiveContent } from "./internal/interactive-content.js";
|
|
5
|
+
const LIST_TAG = 'au-list';
|
|
6
|
+
const SLOT_NAMES = ['default', 'leading', 'description', 'trailing'];
|
|
7
|
+
/**
|
|
8
|
+
* One row of an `au-list`. The host is the `listitem` (component-owned role). The title is the
|
|
9
|
+
* default slot; `leading`, `description` and `trailing` hold decorative or secondary content.
|
|
10
|
+
* With an `href` the row is one native link: the link wraps the title only and is stretched over
|
|
11
|
+
* the whole row, so the row has one tab stop, one focus ring and the title as its name.
|
|
12
|
+
*
|
|
13
|
+
* @slot - The title, phrasing content.
|
|
14
|
+
* @slot leading - A decorative icon or avatar.
|
|
15
|
+
* @slot description - A subtitle. In link mode it is the link's description.
|
|
16
|
+
* @slot trailing - Short metadata, a badge or a decorative chevron.
|
|
17
|
+
*/
|
|
18
|
+
export class AuListItem {
|
|
19
|
+
host;
|
|
20
|
+
/** Destination. A non-blank value turns the row into a link. Rendered as written. Not reflected. */
|
|
21
|
+
href;
|
|
22
|
+
/** Link target. `_blank` adds `rel` tokens and the new-tab indicator. Not reflected. */
|
|
23
|
+
target;
|
|
24
|
+
/** Link `rel` tokens. Merged with `noopener noreferrer` for `_blank`. Not reflected. */
|
|
25
|
+
rel;
|
|
26
|
+
/** Visually hidden text that tells a screen reader a link opens a new tab. Localizable. */
|
|
27
|
+
newTabLabel;
|
|
28
|
+
/**
|
|
29
|
+
* The current item: `page`, `step`, `location`, `date`, `time` or `true`. `false` is omitted. Set
|
|
30
|
+
* by the consumer or router. On a link it is `aria-current` of the inner link; on a static item
|
|
31
|
+
* it is `aria-current` of the host. Never reflected.
|
|
32
|
+
*/
|
|
33
|
+
current;
|
|
34
|
+
/** Makes a link row unavailable (not focusable, click canceled). Ignored on a static item. */
|
|
35
|
+
disabled = false;
|
|
36
|
+
/** True while the slot holds an element or non-blank text. Written to `has-*` host attributes. */
|
|
37
|
+
hasLeading = false;
|
|
38
|
+
hasDescription = false;
|
|
39
|
+
hasTrailing = false;
|
|
40
|
+
slots = {};
|
|
41
|
+
hrefChanged() {
|
|
42
|
+
this.inspectInteractiveContent();
|
|
43
|
+
}
|
|
44
|
+
componentWillLoad() {
|
|
45
|
+
const doc = this.host.ownerDocument;
|
|
46
|
+
if (this.host.hasAttribute('aria-current')) {
|
|
47
|
+
warnOncePerDocument(doc, 'au-list-item:aria-current', 'au-list-item: aria-current on the host is not supported and was removed. Use the current attribute: the item writes aria-current on its link, or on itself when it is static.');
|
|
48
|
+
}
|
|
49
|
+
if (this.host.parentElement?.localName !== LIST_TAG) {
|
|
50
|
+
warnOncePerDocument(doc, 'au-list-item:no-parent', 'au-list-item: this item is not a child of au-list, so it is a listitem without a list.');
|
|
51
|
+
}
|
|
52
|
+
this.measure();
|
|
53
|
+
}
|
|
54
|
+
componentWillRender() {
|
|
55
|
+
if (normalizeAriaCurrent(this.current).invalid) {
|
|
56
|
+
warnOncePerDocument(this.host.ownerDocument, 'au-list-item:current', `au-list-item: current="${this.current}" is not supported and was not rendered. Use page, step, location, date, time or true.`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
componentDidLoad() {
|
|
60
|
+
this.inspectInteractiveContent();
|
|
61
|
+
}
|
|
62
|
+
componentDidRender() {
|
|
63
|
+
this.enforceHostCurrent();
|
|
64
|
+
}
|
|
65
|
+
linkInput() {
|
|
66
|
+
return {
|
|
67
|
+
href: this.href,
|
|
68
|
+
target: this.target,
|
|
69
|
+
rel: this.rel,
|
|
70
|
+
newTabLabel: this.newTabLabel,
|
|
71
|
+
unavailable: this.disabled,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
get isLink() {
|
|
75
|
+
return resolveLinkState(this.linkInput()).isLink;
|
|
76
|
+
}
|
|
77
|
+
/** Only a static item has `aria-current` on its host (LS-D7). */
|
|
78
|
+
get hostCurrent() {
|
|
79
|
+
return this.isLink ? null : normalizeAriaCurrent(this.current).value;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Stencil only removes attributes it rendered, so a consumer's host `aria-current` would
|
|
83
|
+
* survive. The item is its one writer: make the attribute match what it renders.
|
|
84
|
+
*/
|
|
85
|
+
enforceHostCurrent() {
|
|
86
|
+
const expected = this.hostCurrent;
|
|
87
|
+
if (this.host.getAttribute('aria-current') === expected)
|
|
88
|
+
return;
|
|
89
|
+
if (expected)
|
|
90
|
+
this.host.setAttribute('aria-current', expected);
|
|
91
|
+
else
|
|
92
|
+
this.host.removeAttribute('aria-current');
|
|
93
|
+
}
|
|
94
|
+
/** The nodes in a slot: the assigned ones once rendered, else the matching light-DOM children. */
|
|
95
|
+
nodesIn(name) {
|
|
96
|
+
const slot = this.slots[name];
|
|
97
|
+
if (slot)
|
|
98
|
+
return slot.assignedNodes({ flatten: true });
|
|
99
|
+
return Array.from(this.host.childNodes).filter((node) => {
|
|
100
|
+
if (node.nodeType !== 1)
|
|
101
|
+
return name === 'default';
|
|
102
|
+
const slotName = node.getAttribute('slot');
|
|
103
|
+
return name === 'default' ? !slotName : slotName === name;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
has(name) {
|
|
107
|
+
return this.nodesIn(name).some((node) => node.nodeType === 1 || (node.nodeType === 3 && (node.textContent ?? '').trim() !== ''));
|
|
108
|
+
}
|
|
109
|
+
measure() {
|
|
110
|
+
this.hasLeading = this.has('leading');
|
|
111
|
+
this.hasDescription = this.has('description');
|
|
112
|
+
this.hasTrailing = this.has('trailing');
|
|
113
|
+
}
|
|
114
|
+
/** A link row is one tab stop: a control in a slot would sit under the overlay (LS-D6). */
|
|
115
|
+
inspectInteractiveContent() {
|
|
116
|
+
if (!this.isLink)
|
|
117
|
+
return;
|
|
118
|
+
const elements = SLOT_NAMES.flatMap((name) => this.nodesIn(name)).filter((node) => node.nodeType === 1);
|
|
119
|
+
if (!hasInteractiveContent(elements))
|
|
120
|
+
return;
|
|
121
|
+
warnOncePerDocument(this.host.ownerDocument, 'au-list-item:interactive-content', 'au-list-item: a link row holds interactive content (a link, button or form control) in a slot. The row is already one link, so it would sit under the link overlay and add a tab stop. Keep the slots to phrasing content, or use a static item.');
|
|
122
|
+
}
|
|
123
|
+
handleSlotChange = () => {
|
|
124
|
+
this.measure();
|
|
125
|
+
this.inspectInteractiveContent();
|
|
126
|
+
};
|
|
127
|
+
handleClick = (event) => {
|
|
128
|
+
// An <a> without href still fires click, unlike a disabled <button>: stop it here.
|
|
129
|
+
if (!this.isLink || !this.disabled)
|
|
130
|
+
return;
|
|
131
|
+
event.preventDefault();
|
|
132
|
+
event.stopPropagation();
|
|
133
|
+
};
|
|
134
|
+
slotRef(name) {
|
|
135
|
+
return (element) => {
|
|
136
|
+
if (element)
|
|
137
|
+
this.slots[name] = element;
|
|
138
|
+
else
|
|
139
|
+
delete this.slots[name];
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
baseClasses() {
|
|
143
|
+
const link = resolveLinkState(this.linkInput());
|
|
144
|
+
return {
|
|
145
|
+
item: true,
|
|
146
|
+
'item--link': link.isLink && !this.disabled,
|
|
147
|
+
'item--current': normalizeAriaCurrent(this.current).value !== null,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
renderLink() {
|
|
151
|
+
const link = resolveLinkState(this.linkInput());
|
|
152
|
+
const current = normalizeAriaCurrent(this.current).value;
|
|
153
|
+
return (h("a", { part: "link", class: "item__link", ...link.attributes, ...(current ? { 'aria-current': current } : {}), ...(this.hasDescription ? { 'aria-describedby': 'description' } : {}), onClick: this.handleClick }, h("slot", { onSlotchange: this.handleSlotChange, ref: this.slotRef('default') }), link.opensNewTab ? h("span", { class: "item__visually-hidden" }, link.newTabText) : null, link.opensNewTab ? (h("svg", { class: "item__new-tab-icon", part: "new-tab-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", focusable: "false" }, NEW_TAB_ICON_PATHS.map((d) => (h("path", { d: d }))))) : null));
|
|
154
|
+
}
|
|
155
|
+
render() {
|
|
156
|
+
const hostCurrent = this.hostCurrent;
|
|
157
|
+
return (h(Host, { key: '6f9fad5b74348be1b065d3edd9d78f5961408377', role: "listitem", ...(hostCurrent ? { 'aria-current': hostCurrent } : {}), ...(this.hasLeading ? { 'has-leading': '' } : {}), ...(this.hasDescription ? { 'has-description': '' } : {}), ...(this.hasTrailing ? { 'has-trailing': '' } : {}) }, h("div", { key: '1f7d7ccc9155bc777d7b4eeb6e5a182c3f069212', part: "base", class: this.baseClasses() }, h("span", { key: '72bb82751fc36d3a9fddc452524e94edac0f17f6', part: "leading", class: "item__leading" }, h("slot", { key: 'd9f12466ee4509954993b56bc14cf60a7ba461a2', name: "leading", onSlotchange: this.handleSlotChange, ref: this.slotRef('leading') })), h("span", { key: 'e47c1e2bf2155f1d65b23794ce232e064a40d754', part: "content", class: "item__content" }, this.isLink ? (this.renderLink()) : (h("span", { part: "label", class: "item__label" }, h("slot", { onSlotchange: this.handleSlotChange, ref: this.slotRef('default') }))), h("span", { key: '96800d9596606c096b5db5d0f804d020fe464cfa', part: "description", class: "item__description", id: "description" }, h("slot", { key: 'ab490cb957be7bbfd37a474d11b684b3121ab83d', name: "description", onSlotchange: this.handleSlotChange, ref: this.slotRef('description') }))), h("span", { key: '751e0323c390abfc10fd8f5085fcb30ba732b9ca', part: "trailing", class: "item__trailing" }, h("slot", { key: 'fe96baeb9ec8f2d647763441c7d48bdb244f0e74', name: "trailing", onSlotchange: this.handleSlotChange, ref: this.slotRef('trailing') })))));
|
|
158
|
+
}
|
|
159
|
+
static get is() { return "au-list-item"; }
|
|
160
|
+
static get encapsulation() { return "shadow"; }
|
|
161
|
+
static get delegatesFocus() { return true; }
|
|
162
|
+
static get originalStyleUrls() {
|
|
163
|
+
return {
|
|
164
|
+
"$": ["au-list-item.scss"]
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
static get styleUrls() {
|
|
168
|
+
return {
|
|
169
|
+
"$": ["au-list-item.css"]
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
static get properties() {
|
|
173
|
+
return {
|
|
174
|
+
"href": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"mutable": false,
|
|
177
|
+
"complexType": {
|
|
178
|
+
"original": "string",
|
|
179
|
+
"resolved": "string | undefined",
|
|
180
|
+
"references": {}
|
|
181
|
+
},
|
|
182
|
+
"required": false,
|
|
183
|
+
"optional": true,
|
|
184
|
+
"docs": {
|
|
185
|
+
"tags": [],
|
|
186
|
+
"text": "Destination. A non-blank value turns the row into a link. Rendered as written. Not reflected."
|
|
187
|
+
},
|
|
188
|
+
"getter": false,
|
|
189
|
+
"setter": false,
|
|
190
|
+
"reflect": false,
|
|
191
|
+
"attribute": "href"
|
|
192
|
+
},
|
|
193
|
+
"target": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"mutable": false,
|
|
196
|
+
"complexType": {
|
|
197
|
+
"original": "string",
|
|
198
|
+
"resolved": "string | undefined",
|
|
199
|
+
"references": {}
|
|
200
|
+
},
|
|
201
|
+
"required": false,
|
|
202
|
+
"optional": true,
|
|
203
|
+
"docs": {
|
|
204
|
+
"tags": [],
|
|
205
|
+
"text": "Link target. `_blank` adds `rel` tokens and the new-tab indicator. Not reflected."
|
|
206
|
+
},
|
|
207
|
+
"getter": false,
|
|
208
|
+
"setter": false,
|
|
209
|
+
"reflect": false,
|
|
210
|
+
"attribute": "target"
|
|
211
|
+
},
|
|
212
|
+
"rel": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"mutable": false,
|
|
215
|
+
"complexType": {
|
|
216
|
+
"original": "string",
|
|
217
|
+
"resolved": "string | undefined",
|
|
218
|
+
"references": {}
|
|
219
|
+
},
|
|
220
|
+
"required": false,
|
|
221
|
+
"optional": true,
|
|
222
|
+
"docs": {
|
|
223
|
+
"tags": [],
|
|
224
|
+
"text": "Link `rel` tokens. Merged with `noopener noreferrer` for `_blank`. Not reflected."
|
|
225
|
+
},
|
|
226
|
+
"getter": false,
|
|
227
|
+
"setter": false,
|
|
228
|
+
"reflect": false,
|
|
229
|
+
"attribute": "rel"
|
|
230
|
+
},
|
|
231
|
+
"newTabLabel": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"mutable": false,
|
|
234
|
+
"complexType": {
|
|
235
|
+
"original": "string",
|
|
236
|
+
"resolved": "string | undefined",
|
|
237
|
+
"references": {}
|
|
238
|
+
},
|
|
239
|
+
"required": false,
|
|
240
|
+
"optional": true,
|
|
241
|
+
"docs": {
|
|
242
|
+
"tags": [],
|
|
243
|
+
"text": "Visually hidden text that tells a screen reader a link opens a new tab. Localizable."
|
|
244
|
+
},
|
|
245
|
+
"getter": false,
|
|
246
|
+
"setter": false,
|
|
247
|
+
"reflect": false,
|
|
248
|
+
"attribute": "new-tab-label"
|
|
249
|
+
},
|
|
250
|
+
"current": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"mutable": false,
|
|
253
|
+
"complexType": {
|
|
254
|
+
"original": "string",
|
|
255
|
+
"resolved": "string | undefined",
|
|
256
|
+
"references": {}
|
|
257
|
+
},
|
|
258
|
+
"required": false,
|
|
259
|
+
"optional": true,
|
|
260
|
+
"docs": {
|
|
261
|
+
"tags": [],
|
|
262
|
+
"text": "The current item: `page`, `step`, `location`, `date`, `time` or `true`. `false` is omitted. Set\nby the consumer or router. On a link it is `aria-current` of the inner link; on a static item\nit is `aria-current` of the host. Never reflected."
|
|
263
|
+
},
|
|
264
|
+
"getter": false,
|
|
265
|
+
"setter": false,
|
|
266
|
+
"reflect": false,
|
|
267
|
+
"attribute": "current"
|
|
268
|
+
},
|
|
269
|
+
"disabled": {
|
|
270
|
+
"type": "boolean",
|
|
271
|
+
"mutable": false,
|
|
272
|
+
"complexType": {
|
|
273
|
+
"original": "boolean",
|
|
274
|
+
"resolved": "boolean",
|
|
275
|
+
"references": {}
|
|
276
|
+
},
|
|
277
|
+
"required": false,
|
|
278
|
+
"optional": false,
|
|
279
|
+
"docs": {
|
|
280
|
+
"tags": [],
|
|
281
|
+
"text": "Makes a link row unavailable (not focusable, click canceled). Ignored on a static item."
|
|
282
|
+
},
|
|
283
|
+
"getter": false,
|
|
284
|
+
"setter": false,
|
|
285
|
+
"reflect": true,
|
|
286
|
+
"attribute": "disabled",
|
|
287
|
+
"defaultValue": "false"
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
static get states() {
|
|
292
|
+
return {
|
|
293
|
+
"hasLeading": {},
|
|
294
|
+
"hasDescription": {},
|
|
295
|
+
"hasTrailing": {}
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
static get elementRef() { return "host"; }
|
|
299
|
+
static get watchers() {
|
|
300
|
+
return [{
|
|
301
|
+
"propName": "href",
|
|
302
|
+
"methodName": "hrefChanged"
|
|
303
|
+
}];
|
|
304
|
+
}
|
|
305
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AuListItem } from './au-list-item.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elements that take focus or activation of their own. Inside a link row they would sit under the
|
|
3
|
+
* stretched link overlay and add a second tab stop (spec phase5-step9-list, LS-D6).
|
|
4
|
+
*/
|
|
5
|
+
const INTERACTIVE_SELECTOR = [
|
|
6
|
+
'a[href]',
|
|
7
|
+
'button',
|
|
8
|
+
'input',
|
|
9
|
+
'select',
|
|
10
|
+
'textarea',
|
|
11
|
+
'summary',
|
|
12
|
+
'iframe',
|
|
13
|
+
'[contenteditable]:not([contenteditable="false"])',
|
|
14
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
15
|
+
'au-button',
|
|
16
|
+
'au-chip',
|
|
17
|
+
'au-nav-link',
|
|
18
|
+
'au-input',
|
|
19
|
+
'au-checkbox',
|
|
20
|
+
'au-switch',
|
|
21
|
+
'au-select',
|
|
22
|
+
'au-combobox',
|
|
23
|
+
'au-segmented-control',
|
|
24
|
+
'au-slider',
|
|
25
|
+
].join(',');
|
|
26
|
+
/** True when an element, or one of its descendants, is interactive content. */
|
|
27
|
+
export function hasInteractiveContent(elements) {
|
|
28
|
+
return elements.some((element) => element.matches(INTERACTIVE_SELECTOR) || element.querySelector(INTERACTIVE_SELECTOR) !== null);
|
|
29
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** Literals only: no import of the generated constants, so the `/constants` subpath stays standalone. */
|
|
2
|
+
export const STAT_SIZE = {
|
|
3
|
+
small: 'small',
|
|
4
|
+
medium: 'medium',
|
|
5
|
+
large: 'large',
|
|
6
|
+
};
|
|
7
|
+
/** Direction of the change. Independent of `intent` (ST-D4): the component never infers one from the other. */
|
|
8
|
+
export const STAT_TREND = {
|
|
9
|
+
up: 'up',
|
|
10
|
+
down: 'down',
|
|
11
|
+
flat: 'flat',
|
|
12
|
+
};
|
|
13
|
+
/** Color of the delta row only. */
|
|
14
|
+
export const STAT_INTENT = {
|
|
15
|
+
neutral: 'neutral',
|
|
16
|
+
success: 'success',
|
|
17
|
+
danger: 'danger',
|
|
18
|
+
};
|
|
19
|
+
/** `polite` announces value changes through the document announcer. `off` (default) never does. */
|
|
20
|
+
export const STAT_LIVE = {
|
|
21
|
+
off: 'off',
|
|
22
|
+
polite: 'polite',
|
|
23
|
+
};
|
|
24
|
+
/** Defaults of the four localizable labels (hidden direction words and the empty state). */
|
|
25
|
+
export const STAT_DEFAULT_LABELS = {
|
|
26
|
+
up: 'Up',
|
|
27
|
+
down: 'Down',
|
|
28
|
+
flat: 'Unchanged',
|
|
29
|
+
empty: 'No data',
|
|
30
|
+
};
|
|
31
|
+
/** The decorative icon of each direction. Literals typed `BuiltInIconName`, pinned to the core icons by AC-8.IC6. */
|
|
32
|
+
export const STAT_TREND_ICON = {
|
|
33
|
+
up: 'trending-up',
|
|
34
|
+
down: 'trending-down',
|
|
35
|
+
flat: 'minus',
|
|
36
|
+
};
|
|
37
|
+
const sizes = new Set(Object.values(STAT_SIZE));
|
|
38
|
+
const trends = new Set(Object.values(STAT_TREND));
|
|
39
|
+
const intents = new Set(Object.values(STAT_INTENT));
|
|
40
|
+
const lives = new Set(Object.values(STAT_LIVE));
|
|
41
|
+
export const isStatSize = (value) => typeof value === 'string' && sizes.has(value);
|
|
42
|
+
export const isStatTrend = (value) => typeof value === 'string' && trends.has(value);
|
|
43
|
+
export const isStatIntent = (value) => typeof value === 'string' && intents.has(value);
|
|
44
|
+
export const isStatLive = (value) => typeof value === 'string' && lives.has(value);
|