@maicol07/material-web 2.2.0 → 2.5.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/button/internal/_shared.scss +2 -2
- package/button/internal/_touch-target.scss +1 -1
- package/labs/gb/components/appbar/_app-bar-tokens.scss +136 -0
- package/labs/gb/components/appbar/app-bar.scss +167 -0
- package/labs/gb/components/badge/_badge-tokens.scss +18 -0
- package/labs/gb/components/badge/badge.scss +49 -0
- package/labs/gb/components/button/_button-tokens.scss +200 -0
- package/labs/gb/components/button/button.scss +130 -0
- package/labs/gb/components/card/_card-tokens.scss +56 -0
- package/labs/gb/components/card/card.scss +74 -0
- package/labs/gb/components/checkbox/_checkbox-tokens.scss +66 -0
- package/labs/gb/components/checkbox/checkbox.scss +105 -0
- package/labs/gb/components/chip/_chip-tokens.scss +167 -0
- package/labs/gb/components/chip/chip.scss +99 -0
- package/labs/gb/components/divider/_divider-tokens.scss +11 -0
- package/labs/gb/components/divider/divider.scss +31 -0
- package/labs/gb/components/fab/_fab-tokens.scss +89 -0
- package/labs/gb/components/fab/fab.scss +78 -0
- package/labs/gb/components/focus/focus-ring.scss +91 -0
- package/labs/gb/components/iconbutton/_icon-button-tokens.scss +213 -0
- package/labs/gb/components/iconbutton/icon-button.scss +160 -0
- package/labs/gb/components/list/_list-tokens.scss +103 -0
- package/labs/gb/components/list/list.scss +217 -0
- package/labs/gb/components/menu/_menu-tokens.scss +161 -0
- package/labs/gb/components/menu/menu.scss +174 -0
- package/labs/gb/components/radio/_radio-tokens.scss +39 -0
- package/labs/gb/components/radio/radio.scss +74 -0
- package/labs/gb/components/ripple/ripple.scss +103 -0
- package/labs/gb/components/splitbutton/_split-button-tokens.scss +139 -0
- package/labs/gb/components/splitbutton/split-button.scss +164 -0
- package/labs/gb/components/switch/_switch-tokens.scss +58 -0
- package/labs/gb/components/switch/switch.scss +109 -0
- package/labs/gb/styles/color/internal/_color-tokens.scss +95 -0
- package/labs/gb/styles/color/md-color-tokens-full.scss +17 -0
- package/labs/gb/styles/color/md-color-tokens.scss +15 -0
- package/labs/gb/styles/elevation/md-elevation-tokens.scss +25 -0
- package/labs/gb/styles/icon/md-icon.scss +63 -0
- package/labs/gb/styles/m3.scss +14 -0
- package/labs/gb/styles/motion/md-motion-tokens-easing.scss +35 -0
- package/labs/gb/styles/shape/md-shape-tokens.scss +23 -0
- package/labs/gb/styles/space/md-space-tokens.scss +28 -0
- package/labs/gb/styles/tailwind.scss +349 -0
- package/labs/gb/styles/typography/internal/_typography-tokens.scss +149 -0
- package/labs/gb/styles/typography/md-typography-tokens.scss +14 -0
- package/list/internal/listitem/_list-item.scss +3 -0
- package/menu/internal/menuitem/_menu-item.scss +4 -1
- package/package.json +145 -27
- package/sass/ext/_assert.scss +82 -0
- package/sass/ext/_list_ext.scss +114 -0
- package/sass/ext/_map_ext.scss +222 -0
- package/sass/ext/_string_ext.scss +153 -0
- package/sass/ext/_throw.scss +83 -0
- package/sass/ext/_type.scss +66 -0
- package/{internal/sass → sass/ext}/_var.scss +86 -96
- package/sass/ext/tests.scss +18 -0
- package/slider/internal/_slider.scss +1 -0
- package/switch/internal/_switch.scss +1 -0
- package/tabs/internal/_tab.scss +0 -1
- package/tokens/_index.scss +57 -57
- package/tokens/_md-comp-assist-chip.scss +8 -8
- package/tokens/_md-comp-badge.scss +4 -4
- package/tokens/_md-comp-checkbox.scss +6 -6
- package/tokens/_md-comp-circular-progress.scss +4 -4
- package/tokens/_md-comp-dialog.scss +8 -8
- package/tokens/_md-comp-divider.scss +3 -3
- package/tokens/_md-comp-elevated-button.scss +8 -8
- package/tokens/_md-comp-elevated-card.scss +6 -6
- package/tokens/_md-comp-elevation.scss +3 -3
- package/tokens/_md-comp-fab-branded.scss +10 -10
- package/tokens/_md-comp-fab.scss +17 -17
- package/tokens/_md-comp-filled-button.scss +8 -8
- package/tokens/_md-comp-filled-card.scss +6 -6
- package/tokens/_md-comp-filled-field.scss +7 -7
- package/tokens/_md-comp-filled-icon-button.scss +6 -6
- package/tokens/_md-comp-filled-select.scss +8 -8
- package/tokens/_md-comp-filled-text-field.scss +7 -7
- package/tokens/_md-comp-filled-tonal-button.scss +8 -8
- package/tokens/_md-comp-filled-tonal-icon-button.scss +6 -6
- package/tokens/_md-comp-filter-chip.scss +8 -8
- package/tokens/_md-comp-focus-ring.scss +5 -5
- package/tokens/_md-comp-full-screen-dialog.scss +6 -6
- package/tokens/_md-comp-icon-button.scss +5 -5
- package/tokens/_md-comp-icon.scss +1 -1
- package/tokens/_md-comp-input-chip.scss +8 -8
- package/tokens/_md-comp-item.scss +4 -4
- package/tokens/_md-comp-linear-progress.scss +4 -4
- package/tokens/_md-comp-list-item.scss +5 -5
- package/tokens/_md-comp-list.scss +3 -3
- package/tokens/_md-comp-menu-item.scss +8 -8
- package/tokens/_md-comp-menu.scss +5 -5
- package/tokens/_md-comp-navigation-bar.scss +6 -6
- package/tokens/_md-comp-navigation-drawer.scss +6 -6
- package/tokens/_md-comp-outlined-button.scss +7 -7
- package/tokens/_md-comp-outlined-card.scss +6 -6
- package/tokens/_md-comp-outlined-field.scss +7 -7
- package/tokens/_md-comp-outlined-icon-button.scss +6 -6
- package/tokens/_md-comp-outlined-segmented-button.scss +7 -7
- package/tokens/_md-comp-outlined-select.scss +8 -8
- package/tokens/_md-comp-outlined-text-field.scss +6 -6
- package/tokens/_md-comp-primary-tab.scss +8 -8
- package/tokens/_md-comp-radio.scss +4 -4
- package/tokens/_md-comp-ripple.scss +4 -4
- package/tokens/_md-comp-secondary-tab.scss +8 -8
- package/tokens/_md-comp-slider.scss +7 -7
- package/tokens/_md-comp-suggestion-chip.scss +8 -8
- package/tokens/_md-comp-switch.scss +6 -6
- package/tokens/_md-comp-test-table.scss +2 -2
- package/tokens/_md-comp-text-button.scss +7 -7
- package/tokens/_md-ref-palette.scss +2 -2
- package/tokens/_md-ref-typeface.scss +2 -2
- package/tokens/_md-sys-color.scss +3 -3
- package/tokens/_md-sys-elevation.scss +1 -1
- package/tokens/_md-sys-motion.scss +1 -1
- package/tokens/_md-sys-shape.scss +2 -2
- package/tokens/_md-sys-state.scss +1 -1
- package/tokens/_md-sys-typescale.scss +3 -3
- package/tokens/v0_192/_index.scss +3 -102
- package/tokens/v0_192/_md-comp-assist-chip.scss +1 -106
- package/tokens/v0_192/_md-comp-badge.scss +1 -56
- package/tokens/v0_192/_md-comp-banner.scss +1 -71
- package/tokens/v0_192/_md-comp-bottom-app-bar.scss +1 -31
- package/tokens/v0_192/_md-comp-carousel-item.scss +1 -61
- package/tokens/v0_192/_md-comp-checkbox.scss +1 -124
- package/tokens/v0_192/_md-comp-circular-progress-indicator.scss +1 -36
- package/tokens/v0_192/_md-comp-data-table.scss +1 -94
- package/tokens/v0_192/_md-comp-date-input-modal.scss +1 -85
- package/tokens/v0_192/_md-comp-date-picker-docked.scss +1 -242
- package/tokens/v0_192/_md-comp-date-picker-modal.scss +1 -301
- package/tokens/v0_192/_md-comp-dialog.scss +1 -119
- package/tokens/v0_192/_md-comp-divider.scss +1 -23
- package/tokens/v0_192/_md-comp-elevated-button.scss +1 -87
- package/tokens/v0_192/_md-comp-elevated-card.scss +1 -55
- package/tokens/v0_192/_md-comp-extended-fab-branded.scss +1 -84
- package/tokens/v0_192/_md-comp-extended-fab-primary.scss +1 -92
- package/tokens/v0_192/_md-comp-extended-fab-secondary.scss +1 -93
- package/tokens/v0_192/_md-comp-extended-fab-surface.scss +1 -88
- package/tokens/v0_192/_md-comp-extended-fab-tertiary.scss +1 -93
- package/tokens/v0_192/_md-comp-fab-branded-large.scss +1 -58
- package/tokens/v0_192/_md-comp-fab-branded.scss +1 -58
- package/tokens/v0_192/_md-comp-fab-primary-large.scss +1 -63
- package/tokens/v0_192/_md-comp-fab-primary-small.scss +1 -63
- package/tokens/v0_192/_md-comp-fab-primary.scss +1 -63
- package/tokens/v0_192/_md-comp-fab-secondary-large.scss +1 -64
- package/tokens/v0_192/_md-comp-fab-secondary-small.scss +1 -64
- package/tokens/v0_192/_md-comp-fab-secondary.scss +1 -64
- package/tokens/v0_192/_md-comp-fab-surface-large.scss +1 -62
- package/tokens/v0_192/_md-comp-fab-surface-small.scss +1 -62
- package/tokens/v0_192/_md-comp-fab-surface.scss +1 -62
- package/tokens/v0_192/_md-comp-fab-tertiary-large.scss +1 -64
- package/tokens/v0_192/_md-comp-fab-tertiary-small.scss +1 -64
- package/tokens/v0_192/_md-comp-fab-tertiary.scss +1 -64
- package/tokens/v0_192/_md-comp-filled-autocomplete.scss +1 -234
- package/tokens/v0_192/_md-comp-filled-button.scss +1 -87
- package/tokens/v0_192/_md-comp-filled-card.scss +1 -57
- package/tokens/v0_192/_md-comp-filled-icon-button.scss +1 -78
- package/tokens/v0_192/_md-comp-filled-menu-button.scss +1 -96
- package/tokens/v0_192/_md-comp-filled-select.scss +1 -268
- package/tokens/v0_192/_md-comp-filled-text-field.scss +1 -188
- package/tokens/v0_192/_md-comp-filled-tonal-button.scss +1 -97
- package/tokens/v0_192/_md-comp-filled-tonal-icon-button.scss +1 -85
- package/tokens/v0_192/_md-comp-filter-chip.scss +1 -205
- package/tokens/v0_192/_md-comp-full-screen-dialog.scss +1 -109
- package/tokens/v0_192/_md-comp-icon-button.scss +1 -69
- package/tokens/v0_192/_md-comp-input-chip.scss +1 -182
- package/tokens/v0_192/_md-comp-linear-progress-indicator.scss +1 -38
- package/tokens/v0_192/_md-comp-list.scss +1 -250
- package/tokens/v0_192/_md-comp-menu.scss +1 -39
- package/tokens/v0_192/_md-comp-navigation-bar.scss +1 -110
- package/tokens/v0_192/_md-comp-navigation-drawer.scss +1 -160
- package/tokens/v0_192/_md-comp-navigation-rail.scss +1 -114
- package/tokens/v0_192/_md-comp-outlined-autocomplete.scss +1 -224
- package/tokens/v0_192/_md-comp-outlined-button.scss +1 -82
- package/tokens/v0_192/_md-comp-outlined-card.scss +1 -61
- package/tokens/v0_192/_md-comp-outlined-icon-button.scss +1 -78
- package/tokens/v0_192/_md-comp-outlined-menu-button.scss +1 -92
- package/tokens/v0_192/_md-comp-outlined-segmented-button.scss +1 -110
- package/tokens/v0_192/_md-comp-outlined-select.scss +1 -258
- package/tokens/v0_192/_md-comp-outlined-text-field.scss +1 -169
- package/tokens/v0_192/_md-comp-plain-tooltip.scss +1 -53
- package/tokens/v0_192/_md-comp-primary-navigation-tab.scss +1 -119
- package/tokens/v0_192/_md-comp-radio-button.scss +1 -66
- package/tokens/v0_192/_md-comp-rich-tooltip.scss +1 -117
- package/tokens/v0_192/_md-comp-scrim.scss +1 -23
- package/tokens/v0_192/_md-comp-search-bar.scss +1 -95
- package/tokens/v0_192/_md-comp-search-view.scss +1 -89
- package/tokens/v0_192/_md-comp-secondary-navigation-tab.scss +1 -82
- package/tokens/v0_192/_md-comp-sheet-bottom.scss +1 -41
- package/tokens/v0_192/_md-comp-sheet-floating.scss +1 -30
- package/tokens/v0_192/_md-comp-sheet-side.scss +1 -89
- package/tokens/v0_192/_md-comp-slider.scss +1 -113
- package/tokens/v0_192/_md-comp-snackbar.scss +1 -125
- package/tokens/v0_192/_md-comp-standard-menu-button.scss +1 -96
- package/tokens/v0_192/_md-comp-suggestion-chip.scss +1 -122
- package/tokens/v0_192/_md-comp-switch.scss +1 -136
- package/tokens/v0_192/_md-comp-text-button.scss +1 -75
- package/tokens/v0_192/_md-comp-time-input.scss +1 -215
- package/tokens/v0_192/_md-comp-time-picker.scss +1 -262
- package/tokens/v0_192/_md-comp-top-app-bar-large.scss +1 -59
- package/tokens/v0_192/_md-comp-top-app-bar-medium.scss +1 -59
- package/tokens/v0_192/_md-comp-top-app-bar-small-centered.scss +1 -66
- package/tokens/v0_192/_md-comp-top-app-bar-small.scss +1 -62
- package/tokens/v0_192/_md-ref-palette.scss +1 -104
- package/tokens/v0_192/_md-ref-typeface.scss +1 -18
- package/tokens/v0_192/_md-sys-color.scss +1 -130
- package/tokens/v0_192/_md-sys-elevation.scss +1 -19
- package/tokens/v0_192/_md-sys-motion.scss +1 -50
- package/tokens/v0_192/_md-sys-shape.scss +1 -28
- package/tokens/v0_192/_md-sys-state.scss +1 -17
- package/tokens/v0_192/_md-sys-typescale.scss +1 -281
- package/tokens/versions/latest/sass/_index.scss +241 -0
- package/tokens/versions/latest/sass/_md-comp-app-bar-large-flexible.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-app-bar-large.scss +35 -0
- package/tokens/versions/latest/sass/_md-comp-app-bar-medium-flexible.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-app-bar-medium.scss +35 -0
- package/tokens/versions/latest/sass/_md-comp-app-bar-small.scss +42 -0
- package/tokens/versions/latest/sass/_md-comp-app-bar.scss +59 -0
- package/tokens/versions/latest/sass/_md-comp-assist-chip.scss +134 -0
- package/tokens/versions/latest/sass/_md-comp-badge.scss +53 -0
- package/tokens/versions/latest/sass/_md-comp-banner.scss +147 -0
- package/tokens/versions/latest/sass/_md-comp-banners-basic.scss +86 -0
- package/tokens/versions/latest/sass/_md-comp-banners-rich.scss +89 -0
- package/tokens/versions/latest/sass/_md-comp-banners.scss +43 -0
- package/tokens/versions/latest/sass/_md-comp-bottom-app-bar.scss +37 -0
- package/tokens/versions/latest/sass/_md-comp-button-elevated.scss +125 -0
- package/tokens/versions/latest/sass/_md-comp-button-filled.scss +125 -0
- package/tokens/versions/latest/sass/_md-comp-button-group-connected-large.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-button-group-connected-medium.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-button-group-connected-small.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-button-group-connected-xlarge.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-button-group-connected-xsmall.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-button-group-standard-large.scss +29 -0
- package/tokens/versions/latest/sass/_md-comp-button-group-standard-medium.scss +29 -0
- package/tokens/versions/latest/sass/_md-comp-button-group-standard-small.scss +29 -0
- package/tokens/versions/latest/sass/_md-comp-button-group-standard-xlarge.scss +29 -0
- package/tokens/versions/latest/sass/_md-comp-button-group-standard-xsmall.scss +29 -0
- package/tokens/versions/latest/sass/_md-comp-button-large.scss +51 -0
- package/tokens/versions/latest/sass/_md-comp-button-medium.scss +51 -0
- package/tokens/versions/latest/sass/_md-comp-button-outlined.scss +124 -0
- package/tokens/versions/latest/sass/_md-comp-button-small.scss +51 -0
- package/tokens/versions/latest/sass/_md-comp-button-text.scss +60 -0
- package/tokens/versions/latest/sass/_md-comp-button-tonal.scss +125 -0
- package/tokens/versions/latest/sass/_md-comp-button-xlarge.scss +51 -0
- package/tokens/versions/latest/sass/_md-comp-button-xsmall.scss +51 -0
- package/tokens/versions/latest/sass/_md-comp-button.scss +163 -0
- package/tokens/versions/latest/sass/_md-comp-carousel-item.scss +79 -0
- package/tokens/versions/latest/sass/_md-comp-checkbox.scss +216 -0
- package/tokens/versions/latest/sass/_md-comp-circular-progress-indicator.scss +52 -0
- package/tokens/versions/latest/sass/_md-comp-data-table.scss +110 -0
- package/tokens/versions/latest/sass/_md-comp-date-input-modal.scss +80 -0
- package/tokens/versions/latest/sass/_md-comp-date-picker-docked.scss +241 -0
- package/tokens/versions/latest/sass/_md-comp-date-picker-modal.scss +295 -0
- package/tokens/versions/latest/sass/_md-comp-dialog.scss +157 -0
- package/tokens/versions/latest/sass/_md-comp-divider.scss +23 -0
- package/tokens/versions/latest/sass/_md-comp-drag-handle.scss +54 -0
- package/tokens/versions/latest/sass/_md-comp-elevated-button.scss +190 -0
- package/tokens/versions/latest/sass/_md-comp-elevated-card.scss +75 -0
- package/tokens/versions/latest/sass/_md-comp-extended-fab-branded.scss +100 -0
- package/tokens/versions/latest/sass/_md-comp-extended-fab-large.scss +36 -0
- package/tokens/versions/latest/sass/_md-comp-extended-fab-medium.scss +36 -0
- package/tokens/versions/latest/sass/_md-comp-extended-fab-primary-container.scss +61 -0
- package/tokens/versions/latest/sass/_md-comp-extended-fab-primary.scss +174 -0
- package/tokens/versions/latest/sass/_md-comp-extended-fab-secondary-container.scss +61 -0
- package/tokens/versions/latest/sass/_md-comp-extended-fab-secondary.scss +174 -0
- package/tokens/versions/latest/sass/_md-comp-extended-fab-small.scss +36 -0
- package/tokens/versions/latest/sass/_md-comp-extended-fab-surface.scss +108 -0
- package/tokens/versions/latest/sass/_md-comp-extended-fab-tertiary-container.scss +61 -0
- package/tokens/versions/latest/sass/_md-comp-extended-fab-tertiary.scss +174 -0
- package/tokens/versions/latest/sass/_md-comp-extended-fab.scss +36 -0
- package/tokens/versions/latest/sass/_md-comp-fab-branded-large.scss +127 -0
- package/tokens/versions/latest/sass/_md-comp-fab-branded.scss +75 -0
- package/tokens/versions/latest/sass/_md-comp-fab-large.scss +27 -0
- package/tokens/versions/latest/sass/_md-comp-fab-medium.scss +27 -0
- package/tokens/versions/latest/sass/_md-comp-fab-menu-primary-close-button.scss +51 -0
- package/tokens/versions/latest/sass/_md-comp-fab-menu-primary-container.scss +59 -0
- package/tokens/versions/latest/sass/_md-comp-fab-menu-secondary-close-button.scss +51 -0
- package/tokens/versions/latest/sass/_md-comp-fab-menu-secondary-container.scss +59 -0
- package/tokens/versions/latest/sass/_md-comp-fab-menu-tertiary-close-button.scss +51 -0
- package/tokens/versions/latest/sass/_md-comp-fab-menu-tertiary-container.scss +59 -0
- package/tokens/versions/latest/sass/_md-comp-fab-menu.scss +53 -0
- package/tokens/versions/latest/sass/_md-comp-fab-primary-container.scss +53 -0
- package/tokens/versions/latest/sass/_md-comp-fab-primary-large.scss +131 -0
- package/tokens/versions/latest/sass/_md-comp-fab-primary-small.scss +131 -0
- package/tokens/versions/latest/sass/_md-comp-fab-primary.scss +131 -0
- package/tokens/versions/latest/sass/_md-comp-fab-secondary-container.scss +53 -0
- package/tokens/versions/latest/sass/_md-comp-fab-secondary-large.scss +131 -0
- package/tokens/versions/latest/sass/_md-comp-fab-secondary-small.scss +131 -0
- package/tokens/versions/latest/sass/_md-comp-fab-secondary.scss +131 -0
- package/tokens/versions/latest/sass/_md-comp-fab-small.scss +27 -0
- package/tokens/versions/latest/sass/_md-comp-fab-surface-large.scss +139 -0
- package/tokens/versions/latest/sass/_md-comp-fab-surface.scss +83 -0
- package/tokens/versions/latest/sass/_md-comp-fab-tertiary-container.scss +53 -0
- package/tokens/versions/latest/sass/_md-comp-fab-tertiary-large.scss +131 -0
- package/tokens/versions/latest/sass/_md-comp-fab-tertiary-small.scss +131 -0
- package/tokens/versions/latest/sass/_md-comp-fab-tertiary.scss +131 -0
- package/tokens/versions/latest/sass/_md-comp-fab.scss +27 -0
- package/tokens/versions/latest/sass/_md-comp-filled-autocomplete.scss +279 -0
- package/tokens/versions/latest/sass/_md-comp-filled-button.scss +206 -0
- package/tokens/versions/latest/sass/_md-comp-filled-card.scss +75 -0
- package/tokens/versions/latest/sass/_md-comp-filled-icon-button.scss +178 -0
- package/tokens/versions/latest/sass/_md-comp-filled-menu-button.scss +118 -0
- package/tokens/versions/latest/sass/_md-comp-filled-select.scss +269 -0
- package/tokens/versions/latest/sass/_md-comp-filled-text-field.scss +221 -0
- package/tokens/versions/latest/sass/_md-comp-filled-tonal-button.scss +186 -0
- package/tokens/versions/latest/sass/_md-comp-filled-tonal-icon-button.scss +178 -0
- package/tokens/versions/latest/sass/_md-comp-filter-chip.scss +276 -0
- package/tokens/versions/latest/sass/_md-comp-full-screen-dialog.scss +199 -0
- package/tokens/versions/latest/sass/_md-comp-icon-button-filled.scss +82 -0
- package/tokens/versions/latest/sass/_md-comp-icon-button-large.scss +52 -0
- package/tokens/versions/latest/sass/_md-comp-icon-button-medium.scss +52 -0
- package/tokens/versions/latest/sass/_md-comp-icon-button-outlined.scss +86 -0
- package/tokens/versions/latest/sass/_md-comp-icon-button-small.scss +52 -0
- package/tokens/versions/latest/sass/_md-comp-icon-button-standard.scss +72 -0
- package/tokens/versions/latest/sass/_md-comp-icon-button-tonal.scss +82 -0
- package/tokens/versions/latest/sass/_md-comp-icon-button-xlarge.scss +52 -0
- package/tokens/versions/latest/sass/_md-comp-icon-button-xsmall.scss +52 -0
- package/tokens/versions/latest/sass/_md-comp-icon-button.scss +193 -0
- package/tokens/versions/latest/sass/_md-comp-input-chip.scss +300 -0
- package/tokens/versions/latest/sass/_md-comp-linear-progress-indicator.scss +60 -0
- package/tokens/versions/latest/sass/_md-comp-list-expand.scss +36 -0
- package/tokens/versions/latest/sass/_md-comp-list-reorder.scss +45 -0
- package/tokens/versions/latest/sass/_md-comp-list-reveal.scss +50 -0
- package/tokens/versions/latest/sass/_md-comp-list.scss +408 -0
- package/tokens/versions/latest/sass/_md-comp-loading-indicator.scss +38 -0
- package/tokens/versions/latest/sass/_md-comp-menu.scss +218 -0
- package/tokens/versions/latest/sass/_md-comp-menus-standard.scss +188 -0
- package/tokens/versions/latest/sass/_md-comp-menus-vibrant.scss +160 -0
- package/tokens/versions/latest/sass/_md-comp-menus.scss +141 -0
- package/tokens/versions/latest/sass/_md-comp-nav-bar-item-horizontal.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-nav-bar-item-vertical.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-nav-bar.scss +68 -0
- package/tokens/versions/latest/sass/_md-comp-nav-rail-collapsed.scss +35 -0
- package/tokens/versions/latest/sass/_md-comp-nav-rail-expanded.scss +47 -0
- package/tokens/versions/latest/sass/_md-comp-nav-rail-item-horizontal.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-nav-rail-item-vertical.scss +33 -0
- package/tokens/versions/latest/sass/_md-comp-nav-rail-item.scss +39 -0
- package/tokens/versions/latest/sass/_md-comp-nav-rail.scss +48 -0
- package/tokens/versions/latest/sass/_md-comp-navigation-bar.scss +150 -0
- package/tokens/versions/latest/sass/_md-comp-navigation-drawer.scss +187 -0
- package/tokens/versions/latest/sass/_md-comp-navigation-rail.scss +233 -0
- package/tokens/versions/latest/sass/_md-comp-outlined-autocomplete.scss +275 -0
- package/tokens/versions/latest/sass/_md-comp-outlined-button.scss +182 -0
- package/tokens/versions/latest/sass/_md-comp-outlined-card.scss +87 -0
- package/tokens/versions/latest/sass/_md-comp-outlined-menu-button.scss +117 -0
- package/tokens/versions/latest/sass/_md-comp-outlined-segmented-button.scss +121 -0
- package/tokens/versions/latest/sass/_md-comp-outlined-select.scss +266 -0
- package/tokens/versions/latest/sass/_md-comp-outlined-text-field.scss +216 -0
- package/tokens/versions/latest/sass/_md-comp-plain-tooltip.scss +45 -0
- package/tokens/versions/latest/sass/_md-comp-primary-navigation-tab.scss +130 -0
- package/tokens/versions/latest/sass/_md-comp-progress-indicator-circular.scss +47 -0
- package/tokens/versions/latest/sass/_md-comp-progress-indicator-linear.scss +65 -0
- package/tokens/versions/latest/sass/_md-comp-progress-indicator.scss +48 -0
- package/tokens/versions/latest/sass/_md-comp-radio-button.scss +72 -0
- package/tokens/versions/latest/sass/_md-comp-rich-tooltip.scss +113 -0
- package/tokens/versions/latest/sass/_md-comp-scrim.scss +23 -0
- package/tokens/versions/latest/sass/_md-comp-search-bar.scss +137 -0
- package/tokens/versions/latest/sass/_md-comp-search-view.scss +108 -0
- package/tokens/versions/latest/sass/_md-comp-secondary-navigation-tab.scss +104 -0
- package/tokens/versions/latest/sass/_md-comp-sheet-bottom.scss +52 -0
- package/tokens/versions/latest/sass/_md-comp-sheet-floating.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-sheet-side.scss +96 -0
- package/tokens/versions/latest/sass/_md-comp-slider-large.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-slider-medium.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-slider-small.scss +27 -0
- package/tokens/versions/latest/sass/_md-comp-slider-xlarge.scss +31 -0
- package/tokens/versions/latest/sass/_md-comp-slider-xsmall.scss +27 -0
- package/tokens/versions/latest/sass/_md-comp-slider.scss +307 -0
- package/tokens/versions/latest/sass/_md-comp-snackbar.scss +115 -0
- package/tokens/versions/latest/sass/_md-comp-split-button-large.scss +43 -0
- package/tokens/versions/latest/sass/_md-comp-split-button-medium.scss +43 -0
- package/tokens/versions/latest/sass/_md-comp-split-button-small.scss +43 -0
- package/tokens/versions/latest/sass/_md-comp-split-button-xlarge.scss +43 -0
- package/tokens/versions/latest/sass/_md-comp-split-button-xsmall.scss +45 -0
- package/tokens/versions/latest/sass/_md-comp-standard-menu-button.scss +103 -0
- package/tokens/versions/latest/sass/_md-comp-suggestion-chip.scss +134 -0
- package/tokens/versions/latest/sass/_md-comp-switch.scss +191 -0
- package/tokens/versions/latest/sass/_md-comp-text-button.scss +154 -0
- package/tokens/versions/latest/sass/_md-comp-time-input.scss +206 -0
- package/tokens/versions/latest/sass/_md-comp-time-picker.scss +257 -0
- package/tokens/versions/latest/sass/_md-comp-toolbar-docked.scss +36 -0
- package/tokens/versions/latest/sass/_md-comp-toolbar-floating-fab.scss +51 -0
- package/tokens/versions/latest/sass/_md-comp-toolbar-floating.scss +75 -0
- package/tokens/versions/latest/sass/_md-comp-toolbar-standard.scss +87 -0
- package/tokens/versions/latest/sass/_md-comp-toolbar-vibrant.scss +87 -0
- package/tokens/versions/latest/sass/_md-comp-top-app-bar-large.scss +92 -0
- package/tokens/versions/latest/sass/_md-comp-top-app-bar-medium.scss +92 -0
- package/tokens/versions/latest/sass/_md-comp-top-app-bar-small-centered.scss +112 -0
- package/tokens/versions/latest/sass/_md-comp-top-app-bar-small.scss +104 -0
- package/tokens/versions/latest/sass/_md-fab-surface-small.scss +139 -0
- package/tokens/versions/latest/sass/_md-outlined-icon-button.scss +166 -0
- package/tokens/versions/latest/sass/_md-ref-palette.scss +495 -0
- package/tokens/versions/latest/sass/_md-ref-typeface.scss +27 -0
- package/tokens/versions/latest/sass/_md-sys-color.scss +209 -0
- package/tokens/versions/latest/sass/_md-sys-color__dark.scss +209 -0
- package/tokens/versions/latest/sass/_md-sys-color__dark__high-contrast.scss +209 -0
- package/tokens/versions/latest/sass/_md-sys-color__dark__medium-contrast.scss +209 -0
- package/tokens/versions/latest/sass/_md-sys-color__high-contrast.scss +209 -0
- package/tokens/versions/latest/sass/_md-sys-color__medium-contrast.scss +209 -0
- package/tokens/versions/latest/sass/_md-sys-elevation.scss +35 -0
- package/tokens/versions/latest/sass/_md-sys-motion.scss +107 -0
- package/tokens/versions/latest/sass/_md-sys-shape.scss +67 -0
- package/tokens/versions/latest/sass/_md-sys-state-focus-indicator.scss +23 -0
- package/tokens/versions/latest/sass/_md-sys-state.scss +27 -0
- package/tokens/versions/latest/sass/_md-sys-typescale-emphasized.scss +559 -0
- package/tokens/versions/latest/sass/_md-sys-typescale.scss +571 -0
- package/tokens/versions/v0_192/_index.scss +107 -0
- package/tokens/versions/v0_192/_md-comp-assist-chip.scss +111 -0
- package/tokens/versions/v0_192/_md-comp-badge.scss +61 -0
- package/tokens/versions/v0_192/_md-comp-banner.scss +76 -0
- package/tokens/versions/v0_192/_md-comp-bottom-app-bar.scss +36 -0
- package/tokens/versions/v0_192/_md-comp-carousel-item.scss +66 -0
- package/tokens/versions/v0_192/_md-comp-checkbox.scss +129 -0
- package/tokens/versions/v0_192/_md-comp-circular-progress-indicator.scss +41 -0
- package/tokens/versions/v0_192/_md-comp-data-table.scss +99 -0
- package/tokens/versions/v0_192/_md-comp-date-input-modal.scss +90 -0
- package/tokens/versions/v0_192/_md-comp-date-picker-docked.scss +247 -0
- package/tokens/versions/v0_192/_md-comp-date-picker-modal.scss +306 -0
- package/tokens/versions/v0_192/_md-comp-dialog.scss +124 -0
- package/tokens/versions/v0_192/_md-comp-divider.scss +28 -0
- package/tokens/versions/v0_192/_md-comp-elevated-button.scss +92 -0
- package/tokens/versions/v0_192/_md-comp-elevated-card.scss +60 -0
- package/tokens/versions/v0_192/_md-comp-extended-fab-branded.scss +89 -0
- package/tokens/versions/v0_192/_md-comp-extended-fab-primary.scss +97 -0
- package/tokens/versions/v0_192/_md-comp-extended-fab-secondary.scss +98 -0
- package/tokens/versions/v0_192/_md-comp-extended-fab-surface.scss +93 -0
- package/tokens/versions/v0_192/_md-comp-extended-fab-tertiary.scss +98 -0
- package/tokens/versions/v0_192/_md-comp-fab-branded-large.scss +63 -0
- package/tokens/versions/v0_192/_md-comp-fab-branded.scss +63 -0
- package/tokens/versions/v0_192/_md-comp-fab-primary-large.scss +68 -0
- package/tokens/versions/v0_192/_md-comp-fab-primary-small.scss +68 -0
- package/tokens/versions/v0_192/_md-comp-fab-primary.scss +68 -0
- package/tokens/versions/v0_192/_md-comp-fab-secondary-large.scss +69 -0
- package/tokens/versions/v0_192/_md-comp-fab-secondary-small.scss +69 -0
- package/tokens/versions/v0_192/_md-comp-fab-secondary.scss +69 -0
- package/tokens/versions/v0_192/_md-comp-fab-surface-large.scss +67 -0
- package/tokens/versions/v0_192/_md-comp-fab-surface-small.scss +67 -0
- package/tokens/versions/v0_192/_md-comp-fab-surface.scss +67 -0
- package/tokens/versions/v0_192/_md-comp-fab-tertiary-large.scss +69 -0
- package/tokens/versions/v0_192/_md-comp-fab-tertiary-small.scss +69 -0
- package/tokens/versions/v0_192/_md-comp-fab-tertiary.scss +69 -0
- package/tokens/versions/v0_192/_md-comp-filled-autocomplete.scss +239 -0
- package/tokens/versions/v0_192/_md-comp-filled-button.scss +92 -0
- package/tokens/versions/v0_192/_md-comp-filled-card.scss +62 -0
- package/tokens/versions/v0_192/_md-comp-filled-icon-button.scss +83 -0
- package/tokens/versions/v0_192/_md-comp-filled-menu-button.scss +101 -0
- package/tokens/versions/v0_192/_md-comp-filled-select.scss +273 -0
- package/tokens/versions/v0_192/_md-comp-filled-text-field.scss +193 -0
- package/tokens/versions/v0_192/_md-comp-filled-tonal-button.scss +102 -0
- package/tokens/versions/v0_192/_md-comp-filled-tonal-icon-button.scss +90 -0
- package/tokens/versions/v0_192/_md-comp-filter-chip.scss +210 -0
- package/tokens/versions/v0_192/_md-comp-full-screen-dialog.scss +114 -0
- package/tokens/versions/v0_192/_md-comp-icon-button.scss +74 -0
- package/tokens/versions/v0_192/_md-comp-input-chip.scss +187 -0
- package/tokens/versions/v0_192/_md-comp-linear-progress-indicator.scss +43 -0
- package/tokens/versions/v0_192/_md-comp-list.scss +255 -0
- package/tokens/versions/v0_192/_md-comp-menu.scss +44 -0
- package/tokens/versions/v0_192/_md-comp-navigation-bar.scss +115 -0
- package/tokens/versions/v0_192/_md-comp-navigation-drawer.scss +165 -0
- package/tokens/versions/v0_192/_md-comp-navigation-rail.scss +119 -0
- package/tokens/versions/v0_192/_md-comp-outlined-autocomplete.scss +229 -0
- package/tokens/versions/v0_192/_md-comp-outlined-button.scss +87 -0
- package/tokens/versions/v0_192/_md-comp-outlined-card.scss +66 -0
- package/tokens/versions/v0_192/_md-comp-outlined-icon-button.scss +83 -0
- package/tokens/versions/v0_192/_md-comp-outlined-menu-button.scss +97 -0
- package/tokens/versions/v0_192/_md-comp-outlined-segmented-button.scss +115 -0
- package/tokens/versions/v0_192/_md-comp-outlined-select.scss +263 -0
- package/tokens/versions/v0_192/_md-comp-outlined-text-field.scss +174 -0
- package/tokens/versions/v0_192/_md-comp-plain-tooltip.scss +58 -0
- package/tokens/versions/v0_192/_md-comp-primary-navigation-tab.scss +124 -0
- package/tokens/versions/v0_192/_md-comp-radio-button.scss +71 -0
- package/tokens/versions/v0_192/_md-comp-rich-tooltip.scss +122 -0
- package/tokens/versions/v0_192/_md-comp-scrim.scss +28 -0
- package/tokens/versions/v0_192/_md-comp-search-bar.scss +100 -0
- package/tokens/versions/v0_192/_md-comp-search-view.scss +94 -0
- package/tokens/versions/v0_192/_md-comp-secondary-navigation-tab.scss +87 -0
- package/tokens/versions/v0_192/_md-comp-sheet-bottom.scss +46 -0
- package/tokens/versions/v0_192/_md-comp-sheet-floating.scss +35 -0
- package/tokens/versions/v0_192/_md-comp-sheet-side.scss +94 -0
- package/tokens/versions/v0_192/_md-comp-slider.scss +118 -0
- package/tokens/versions/v0_192/_md-comp-snackbar.scss +130 -0
- package/tokens/versions/v0_192/_md-comp-standard-menu-button.scss +101 -0
- package/tokens/versions/v0_192/_md-comp-suggestion-chip.scss +127 -0
- package/tokens/versions/v0_192/_md-comp-switch.scss +141 -0
- package/tokens/versions/v0_192/_md-comp-text-button.scss +80 -0
- package/tokens/versions/v0_192/_md-comp-time-input.scss +220 -0
- package/tokens/versions/v0_192/_md-comp-time-picker.scss +267 -0
- package/tokens/versions/v0_192/_md-comp-top-app-bar-large.scss +64 -0
- package/tokens/versions/v0_192/_md-comp-top-app-bar-medium.scss +64 -0
- package/tokens/versions/v0_192/_md-comp-top-app-bar-small-centered.scss +71 -0
- package/tokens/versions/v0_192/_md-comp-top-app-bar-small.scss +67 -0
- package/tokens/versions/v0_192/_md-ref-palette.scss +109 -0
- package/tokens/versions/v0_192/_md-ref-typeface.scss +23 -0
- package/tokens/versions/v0_192/_md-sys-color.scss +135 -0
- package/tokens/versions/v0_192/_md-sys-elevation.scss +24 -0
- package/tokens/versions/v0_192/_md-sys-motion.scss +55 -0
- package/tokens/versions/v0_192/_md-sys-shape.scss +33 -0
- package/tokens/versions/v0_192/_md-sys-state.scss +22 -0
- package/tokens/versions/v0_192/_md-sys-typescale.scss +286 -0
- package/tokens/versions/v0_192/index.test.scss +584 -0
- package/tokens/versions/v0_192/lib.test.scss +663 -0
- package/types/command-event.d.ts +22 -0
- package/types/css-imports.d.ts +12 -0
- package/types/popover.d.ts +22 -0
- package/internal/sass/_string-ext.scss +0 -195
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 Google LLC
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
// go/keep-sorted start by_regex='(.+) prefix_order=sass:
|
|
7
|
+
@use 'sass:list';
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
@use 'sass:meta';
|
|
10
|
+
@use 'sass:string';
|
|
11
|
+
@use '../../../../../sass/ext/map_ext';
|
|
12
|
+
@use '../../../../../tokens/versions/latest/sass/md-ref-typeface';
|
|
13
|
+
@use '../../../../../tokens/versions/latest/sass/md-sys-typescale';
|
|
14
|
+
@use '../../../../../tokens/versions/latest/sass/md-sys-typescale-emphasized';
|
|
15
|
+
@use '../../../../../tokens/versions/latest/sass/md-sys-typescale-emphasized-meta';
|
|
16
|
+
@use '../../../../../tokens/versions/latest/sass/md-sys-typescale-meta';
|
|
17
|
+
// go/keep-sorted end
|
|
18
|
+
|
|
19
|
+
@mixin emit-custom-properties(
|
|
20
|
+
$typescale-vars: meta.module-variables(md-sys-typescale),
|
|
21
|
+
$typescale-meta: meta.module-variables(md-sys-typescale-meta),
|
|
22
|
+
$typescale-emphasized-vars: meta.module-variables(md-sys-typescale-emphasized),
|
|
23
|
+
$typescale-emphasized-meta:
|
|
24
|
+
meta.module-variables(md-sys-typescale-emphasized-meta),
|
|
25
|
+
$typeface-vars:
|
|
26
|
+
map.merge(
|
|
27
|
+
meta.module-variables(md-ref-typeface),
|
|
28
|
+
(
|
|
29
|
+
'plain': (
|
|
30
|
+
'Roboto Flex',
|
|
31
|
+
'Roboto',
|
|
32
|
+
'Noto Sans',
|
|
33
|
+
system-ui,
|
|
34
|
+
sans-serif,
|
|
35
|
+
),
|
|
36
|
+
'brand': var(--md-ref-typeface-plain),
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
) {
|
|
40
|
+
--md-ref-typeface-brand: #{map_ext.get-strict($typeface-vars, 'brand')};
|
|
41
|
+
--md-ref-typeface-plain: #{map_ext.get-strict($typeface-vars, 'plain')};
|
|
42
|
+
--md-ref-typeface-weight-regular: #{map_ext.get-strict(
|
|
43
|
+
$typeface-vars,
|
|
44
|
+
'weight-regular'
|
|
45
|
+
)};
|
|
46
|
+
--md-ref-typeface-weight-medium: #{map_ext.get-strict(
|
|
47
|
+
$typeface-vars,
|
|
48
|
+
'weight-medium'
|
|
49
|
+
)};
|
|
50
|
+
--md-ref-typeface-weight-bold: #{map_ext.get-strict(
|
|
51
|
+
$typeface-vars,
|
|
52
|
+
'weight-bold'
|
|
53
|
+
)};
|
|
54
|
+
|
|
55
|
+
$scales: ('label', 'body', 'title', 'headline', 'display');
|
|
56
|
+
$sizes: (
|
|
57
|
+
'small': 'sm',
|
|
58
|
+
'medium': 'md',
|
|
59
|
+
'large': 'lg',
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
@each $scale in $scales {
|
|
63
|
+
@each $long-size, $short-size in $sizes {
|
|
64
|
+
$typescale: '#{$scale}-#{$long-size}';
|
|
65
|
+
|
|
66
|
+
$font: _font($typescale, $typescale-vars, $typescale-meta);
|
|
67
|
+
$tracking: map_ext.get-strict($typescale-vars, '#{$typescale}-tracking');
|
|
68
|
+
$axes: _axes($typescale, $typescale-vars);
|
|
69
|
+
$emphasized-font: _font(
|
|
70
|
+
$typescale,
|
|
71
|
+
$typescale-emphasized-vars,
|
|
72
|
+
$typescale-emphasized-meta
|
|
73
|
+
);
|
|
74
|
+
$emphasized-axes: _axes-emphasized(
|
|
75
|
+
$typescale,
|
|
76
|
+
$typescale-emphasized-vars
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
--md-sys-typescale-#{$scale}-#{$short-size}: #{$font};
|
|
80
|
+
--md-sys-typescale-#{$scale}-#{$short-size}-tracking: #{$tracking};
|
|
81
|
+
--md-sys-typescale-#{$scale}-#{$short-size}-axes: #{$axes};
|
|
82
|
+
--md-sys-typescale-emphasized-#{$scale}-#{$short-size}: #{$emphasized-font};
|
|
83
|
+
--md-sys-typescale-emphasized-#{$scale}-#{$short-size}-axes: #{$emphasized-axes};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/// Returns the `font` shorthand for a typescale from the provided token and
|
|
89
|
+
/// metadata variable maps.
|
|
90
|
+
@function _font($typescale, $vars, $meta) {
|
|
91
|
+
$weight: map_ext.get-strict($meta, '#{$typescale}-weight--resolved');
|
|
92
|
+
$size: map_ext.get-strict($vars, '#{$typescale}-size');
|
|
93
|
+
$line-height: map_ext.get-strict($vars, '#{$typescale}-line-height');
|
|
94
|
+
$family: map_ext.get-strict($meta, '#{$typescale}-font--resolved');
|
|
95
|
+
@return #{$weight} #{$size} / #{$line-height} #{$family};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/// Returns the `font-variation-settings` value for a typescale from the
|
|
99
|
+
/// provided token variable map. Returns `normal` if no axes are changed from
|
|
100
|
+
/// their default values.
|
|
101
|
+
@function _axes($typescale, $vars) {
|
|
102
|
+
$axes: ();
|
|
103
|
+
$axes: _append-axis($axes, map_ext.get-strict($vars, '#{$typescale}-rond'));
|
|
104
|
+
$axes: _append-axis($axes, map_ext.get-strict($vars, '#{$typescale}-grad'));
|
|
105
|
+
@if list.length($axes) == 0 {
|
|
106
|
+
@return normal;
|
|
107
|
+
}
|
|
108
|
+
@return $axes;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// TODO: Remove this function once emphasized tokens are fixed to use `'ROND' 100`
|
|
112
|
+
@function _axes-emphasized($typescale, $vars) {
|
|
113
|
+
$axes: ();
|
|
114
|
+
$axes: _append-axis($axes, ('ROND' 100));
|
|
115
|
+
$axes: _append-axis($axes, map_ext.get-strict($vars, '#{$typescale}-grad'));
|
|
116
|
+
@return $axes;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/// Appends a font axis to a list if it is not the default value for the axis.
|
|
120
|
+
@function _append-axis($axes, $axis) {
|
|
121
|
+
// Not all axes from Carbon are supported in gBreeze.
|
|
122
|
+
// - 'opsz': use `font-size`
|
|
123
|
+
// - 'slnt': use `font-style`
|
|
124
|
+
// - 'wdth': use `font-stretch`/`font-width`
|
|
125
|
+
// - 'wght': use `font-weight`
|
|
126
|
+
$default-axes: (
|
|
127
|
+
'ROND': 0,
|
|
128
|
+
'GRAD': 0,
|
|
129
|
+
// These axes are unused in Material, but included for Carbon completeness.
|
|
130
|
+
'CRSV': 0,
|
|
131
|
+
'FILL': 0,
|
|
132
|
+
'HEXP': 0,
|
|
133
|
+
);
|
|
134
|
+
$axis-tag: list.nth($axis, 1);
|
|
135
|
+
$axis-value: list.nth($axis, 2);
|
|
136
|
+
@if not map.has-key($default-axes, $axis-tag) {
|
|
137
|
+
// Do not append unsupported axes.
|
|
138
|
+
@return $axes;
|
|
139
|
+
}
|
|
140
|
+
@if map.get($default-axes, $axis-tag) == $axis-value {
|
|
141
|
+
// Do not append axes with default values.
|
|
142
|
+
@return $axes;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Manually add quotes since Sass removes them for custom property values,
|
|
146
|
+
// even with string.quote().
|
|
147
|
+
$axis: '"#{$axis-tag}" #{$axis-value}';
|
|
148
|
+
@return list.append($axes, $axis, $separator: comma);
|
|
149
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2026 Google LLC
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// go/keep-sorted start by_regex='(.+) prefix_order=sass:
|
|
7
|
+
@use 'internal/typography-tokens';
|
|
8
|
+
// go/keep-sorted end
|
|
9
|
+
|
|
10
|
+
@layer md.sys.typescale {
|
|
11
|
+
:root {
|
|
12
|
+
@include typography-tokens.emit-custom-properties;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
:host {
|
|
35
35
|
border-radius: map.get($tokens, 'container-shape');
|
|
36
36
|
display: flex;
|
|
37
|
+
gap: 16px;
|
|
37
38
|
-webkit-tap-highlight-color: transparent;
|
|
38
39
|
|
|
39
40
|
@include ripple.theme(
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
border-radius: inherit;
|
|
78
79
|
display: flex;
|
|
79
80
|
flex: 1;
|
|
81
|
+
gap: inherit;
|
|
80
82
|
max-width: inherit;
|
|
81
83
|
min-width: inherit;
|
|
82
84
|
outline: none;
|
|
@@ -116,6 +118,7 @@
|
|
|
116
118
|
padding-bottom: map.get($tokens, 'bottom-space');
|
|
117
119
|
padding-inline-start: map.get($tokens, 'leading-space');
|
|
118
120
|
padding-inline-end: map.get($tokens, 'trailing-space');
|
|
121
|
+
gap: inherit;
|
|
119
122
|
}
|
|
120
123
|
|
|
121
124
|
md-item[multiline] {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
@error 'Token `#{$token}` is not a supported token.';
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
@if $value
|
|
27
|
+
@if $value {
|
|
28
28
|
--md-menu-item-#{$token}: #{$value};
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
:host {
|
|
37
37
|
border-radius: map.get($tokens, 'container-shape');
|
|
38
38
|
display: flex;
|
|
39
|
+
gap: 16px;
|
|
39
40
|
|
|
40
41
|
@include ripple.theme(
|
|
41
42
|
(
|
|
@@ -78,6 +79,7 @@
|
|
|
78
79
|
border-radius: inherit;
|
|
79
80
|
display: flex;
|
|
80
81
|
flex: 1;
|
|
82
|
+
gap: inherit;
|
|
81
83
|
max-width: inherit;
|
|
82
84
|
min-width: inherit;
|
|
83
85
|
outline: none;
|
|
@@ -110,6 +112,7 @@
|
|
|
110
112
|
padding-bottom: map.get($tokens, 'bottom-space');
|
|
111
113
|
padding-inline-start: map.get($tokens, 'leading-space');
|
|
112
114
|
padding-inline-end: map.get($tokens, 'trailing-space');
|
|
115
|
+
gap: inherit;
|
|
113
116
|
}
|
|
114
117
|
|
|
115
118
|
md-item[multiline] {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maicol07/material-web",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -27,14 +27,17 @@
|
|
|
27
27
|
"build:ts": "wireit",
|
|
28
28
|
"build:css-to-ts": "wireit",
|
|
29
29
|
"build:sass": "wireit",
|
|
30
|
+
"build:manifest": "wireit",
|
|
30
31
|
"test": "wireit",
|
|
31
32
|
"build:catalog": "wireit",
|
|
32
33
|
"build:scripts": "wireit",
|
|
33
34
|
"update-docs": "wireit",
|
|
35
|
+
"update-docs:components": "wireit",
|
|
36
|
+
"update-docs:sass-ext": "wireit",
|
|
34
37
|
"update-size": "wireit"
|
|
35
38
|
},
|
|
36
|
-
"customElement": "custom-elements.json",
|
|
37
39
|
"type": "module",
|
|
40
|
+
"customElements": "custom-elements.json",
|
|
38
41
|
"files": [
|
|
39
42
|
"**/*.js",
|
|
40
43
|
"**/*.js.map",
|
|
@@ -55,18 +58,24 @@
|
|
|
55
58
|
"testing/harness.{js,js.map,d.ts}",
|
|
56
59
|
"testing/transform-pseudo-classes.{js,js.map,d.ts}"
|
|
57
60
|
],
|
|
58
|
-
"workspaces": [
|
|
61
|
+
"workspaces": [
|
|
62
|
+
"catalog"
|
|
63
|
+
],
|
|
59
64
|
"dependencies": {
|
|
65
|
+
"@lit/context": "^1.1.6",
|
|
60
66
|
"lit": "^2.8.0 || ^3.0.0",
|
|
67
|
+
"safevalues": "^1.2.0",
|
|
61
68
|
"tslib": "^2.4.0"
|
|
62
69
|
},
|
|
63
70
|
"devDependencies": {
|
|
64
|
-
"@lit-labs/analyzer": "
|
|
65
|
-
"@lit-labs/gen-manifest": "
|
|
71
|
+
"@lit-labs/analyzer": "^0.14.0",
|
|
72
|
+
"@lit-labs/gen-manifest": "^0.3.6",
|
|
73
|
+
"@lit-labs/gen-utils": "^0.3.4",
|
|
66
74
|
"@rollup/plugin-multi-entry": "^6.0.1",
|
|
67
75
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
68
|
-
"@rollup/plugin-terser": "^0.
|
|
76
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
69
77
|
"@types/jasmine": "^4.0.3",
|
|
78
|
+
"@types/node": "^24.10.1",
|
|
70
79
|
"@web/test-runner": "^0.18.2",
|
|
71
80
|
"@web/test-runner-playwright": "^0.11.0",
|
|
72
81
|
"custom-element-jet-brains-integration": "^1.6.2",
|
|
@@ -75,23 +84,34 @@
|
|
|
75
84
|
"jasmine": "^4.5.0",
|
|
76
85
|
"playwright": "^1.49.0",
|
|
77
86
|
"rollup": "^2.79.1",
|
|
78
|
-
"sass": "^1.
|
|
87
|
+
"sass": "^1.93.2",
|
|
79
88
|
"sass-true": "^6.1.0",
|
|
80
|
-
"typescript": "5.
|
|
89
|
+
"typescript": "5.9.2",
|
|
81
90
|
"web-test-runner-jasmine": "^0.0.6",
|
|
82
|
-
"wireit": "^0.
|
|
91
|
+
"wireit": "^0.14.12"
|
|
83
92
|
},
|
|
84
93
|
"wireit": {
|
|
85
94
|
"build": {
|
|
86
|
-
"dependencies": [
|
|
95
|
+
"dependencies": [
|
|
96
|
+
"build:ts",
|
|
97
|
+
"build:manifest"
|
|
98
|
+
]
|
|
87
99
|
},
|
|
88
100
|
"build:ts": {
|
|
101
|
+
"dependencies": [
|
|
102
|
+
"build:ts:main",
|
|
103
|
+
"build:ts:labs-gb"
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"build:ts:main": {
|
|
89
107
|
"command": "tsc --pretty",
|
|
90
108
|
"files": [
|
|
91
109
|
"tsconfig.json",
|
|
110
|
+
"tsconfig.base.json",
|
|
92
111
|
"**/*.ts",
|
|
93
112
|
"!**/*.d.ts",
|
|
94
|
-
"
|
|
113
|
+
"!**/*.cssresult.ts",
|
|
114
|
+
"!labs/gb/**",
|
|
95
115
|
"!catalog/",
|
|
96
116
|
"!scripts/"
|
|
97
117
|
],
|
|
@@ -103,39 +123,113 @@
|
|
|
103
123
|
"!web-test-runner.config.js",
|
|
104
124
|
"!commitlint.config.js",
|
|
105
125
|
"!types/",
|
|
126
|
+
"!labs/gb/**",
|
|
106
127
|
"!catalog/",
|
|
107
128
|
"!scripts/"
|
|
108
129
|
],
|
|
109
130
|
"clean": "if-file-deleted",
|
|
110
|
-
"dependencies": [
|
|
131
|
+
"dependencies": [
|
|
132
|
+
"build:css-to-ts"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"build:ts:labs-gb": {
|
|
136
|
+
"command": "tsc --pretty -p labs/gb/tsconfig.json",
|
|
137
|
+
"files": [
|
|
138
|
+
"tsconfig.base.json",
|
|
139
|
+
"labs/gb/tsconfig.json",
|
|
140
|
+
"labs/gb/**/*.ts",
|
|
141
|
+
"!labs/gb/**/*.d.ts"
|
|
142
|
+
],
|
|
143
|
+
"output": [
|
|
144
|
+
".tsbuildinfo",
|
|
145
|
+
"labs/gb/**/*.js",
|
|
146
|
+
"labs/gb/**/*.js.map",
|
|
147
|
+
"labs/gb/**/*.d.ts"
|
|
148
|
+
],
|
|
149
|
+
"clean": "if-file-deleted",
|
|
150
|
+
"dependencies": [
|
|
151
|
+
"build:css-to-ts"
|
|
152
|
+
]
|
|
111
153
|
},
|
|
112
154
|
"build:css-to-ts": {
|
|
113
|
-
"command": "find . \\( -path ./.wireit -o -path ./node_modules -o -path ./catalog \\) -prune -o -name '
|
|
114
|
-
"files": [
|
|
115
|
-
|
|
116
|
-
|
|
155
|
+
"command": "find . \\( -path ./.wireit -o -path ./node_modules -o -path ./catalog \\) -prune -o -name '*.css' -print | xargs -L1 node scripts/css-to-ts.js --suffix=.cssresult",
|
|
156
|
+
"files": [
|
|
157
|
+
"**/*.css",
|
|
158
|
+
"!catalog/"
|
|
159
|
+
],
|
|
160
|
+
"output": [
|
|
161
|
+
"**/*.cssresult.ts",
|
|
162
|
+
"!catalog/"
|
|
163
|
+
],
|
|
164
|
+
"clean": "if-file-deleted",
|
|
165
|
+
"dependencies": [
|
|
166
|
+
"build:scripts",
|
|
167
|
+
"build:sass"
|
|
168
|
+
]
|
|
117
169
|
},
|
|
118
170
|
"build:sass": {
|
|
119
171
|
"command": "sass --style=compressed --load-path=node_modules --load-path=node_modules/sass-true/sass $(ls -d */ | grep -vE 'node_modules|catalog')",
|
|
120
|
-
"files": [
|
|
121
|
-
|
|
172
|
+
"files": [
|
|
173
|
+
"**/*.scss",
|
|
174
|
+
"!catalog/"
|
|
175
|
+
],
|
|
176
|
+
"output": [
|
|
177
|
+
"**/*.css",
|
|
178
|
+
"**/*.css.map",
|
|
179
|
+
"!catalog/"
|
|
180
|
+
],
|
|
181
|
+
"dependencies": [
|
|
182
|
+
"build:sass:generate"
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
"build:sass:generate": {
|
|
186
|
+
"command": "find tokens/versions/ -type f -name '_md-*.scss' ! -name '*-meta.scss' -print0 | xargs -0 node scripts/generate-sass-token-meta.js",
|
|
187
|
+
"files": [
|
|
188
|
+
"tokens/versions/**/_md-*.scss",
|
|
189
|
+
"!tokens/versions/**/*-meta.scss"
|
|
190
|
+
],
|
|
191
|
+
"output": [
|
|
192
|
+
"tokens/versions/**/*-meta.scss"
|
|
193
|
+
],
|
|
194
|
+
"dependencies": [
|
|
195
|
+
"build:scripts"
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
"build:manifest": {
|
|
199
|
+
"command": "node scripts/analyzer/generate-manifest.js",
|
|
200
|
+
"files": [
|
|
201
|
+
"**/*.ts"
|
|
202
|
+
],
|
|
203
|
+
"output": [
|
|
204
|
+
"custom-elements.json",
|
|
205
|
+
"web-types.json"
|
|
206
|
+
],
|
|
207
|
+
"dependencies": [
|
|
208
|
+
"build:scripts",
|
|
209
|
+
"build:ts"
|
|
210
|
+
]
|
|
122
211
|
},
|
|
123
212
|
"test": {
|
|
124
213
|
"command": "wtr",
|
|
125
|
-
"dependencies": [
|
|
126
|
-
|
|
214
|
+
"dependencies": [
|
|
215
|
+
"build:ts"
|
|
216
|
+
],
|
|
217
|
+
"files": [
|
|
218
|
+
"web-test-runner.config.js"
|
|
219
|
+
],
|
|
127
220
|
"output": []
|
|
128
221
|
},
|
|
129
222
|
"build:catalog": {
|
|
130
|
-
"dependencies": [
|
|
223
|
+
"dependencies": [
|
|
224
|
+
"./catalog:build:prod"
|
|
225
|
+
]
|
|
131
226
|
},
|
|
132
227
|
"build:scripts": {
|
|
133
228
|
"command": "tsc -b scripts/tsconfig.json --pretty",
|
|
134
229
|
"files": [
|
|
135
230
|
"scripts/tsconfig.json",
|
|
136
231
|
"scripts/**/*.ts",
|
|
137
|
-
"!**/*.d.ts"
|
|
138
|
-
"!**/*-styles.ts"
|
|
232
|
+
"!**/*.d.ts"
|
|
139
233
|
],
|
|
140
234
|
"output": [
|
|
141
235
|
"scripts/.tsbuildinfo",
|
|
@@ -146,22 +240,46 @@
|
|
|
146
240
|
"clean": "if-file-deleted"
|
|
147
241
|
},
|
|
148
242
|
"update-docs": {
|
|
243
|
+
"dependencies": [
|
|
244
|
+
"update-docs:components",
|
|
245
|
+
"update-docs:sass-ext"
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
"update-docs:components": {
|
|
149
249
|
"command": "node scripts/analyzer/update-docs.js",
|
|
150
250
|
"files": [
|
|
151
251
|
"docs/components/*.md",
|
|
152
252
|
"**/*.ts",
|
|
153
253
|
"!**/*.d.ts",
|
|
154
|
-
"
|
|
254
|
+
"!**/*.cssresult.ts",
|
|
155
255
|
"!catalog/",
|
|
156
256
|
"!scripts/",
|
|
157
257
|
"scripts/analyzer/update-docs.js"
|
|
158
258
|
],
|
|
159
|
-
"output": [
|
|
160
|
-
"dependencies": [
|
|
259
|
+
"output": [],
|
|
260
|
+
"dependencies": [
|
|
261
|
+
"build:scripts"
|
|
262
|
+
]
|
|
263
|
+
},
|
|
264
|
+
"update-docs:sass-ext": {
|
|
265
|
+
"command": "node scripts/update-sass-ext-docs.js --input=./sass/ext/ --output=./docs/sass/sass-ext.md",
|
|
266
|
+
"files": [
|
|
267
|
+
"docs/sass/sass-ext.md",
|
|
268
|
+
"sass/ext/_*.scss",
|
|
269
|
+
"!sass/ext/*_test.scss",
|
|
270
|
+
"scripts/update-sass-ext-docs.js"
|
|
271
|
+
],
|
|
272
|
+
"output": [],
|
|
273
|
+
"dependencies": [
|
|
274
|
+
"build:scripts"
|
|
275
|
+
]
|
|
161
276
|
},
|
|
162
277
|
"update-size": {
|
|
163
278
|
"command": "node scripts/size/update-size.js",
|
|
164
|
-
"dependencies": [
|
|
279
|
+
"dependencies": [
|
|
280
|
+
"build:scripts",
|
|
281
|
+
"build"
|
|
282
|
+
]
|
|
165
283
|
}
|
|
166
284
|
},
|
|
167
285
|
"web-types": "./web-types.json"
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 Google LLC
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
// Utility assert functions that throw errors.
|
|
7
|
+
|
|
8
|
+
// go/keep-sorted start by_regex='(.+) prefix_order=sass:
|
|
9
|
+
@use 'sass:meta';
|
|
10
|
+
@use 'throw';
|
|
11
|
+
@use 'type';
|
|
12
|
+
// go/keep-sorted end
|
|
13
|
+
|
|
14
|
+
/// Asserts that the argument is a specific type. If it is, the argument is
|
|
15
|
+
/// returned, otherwise an error is thrown.
|
|
16
|
+
///
|
|
17
|
+
/// @example scss
|
|
18
|
+
/// @mixin multiply($a, $b) {
|
|
19
|
+
/// $a: assert.is-type($a, 'number');
|
|
20
|
+
/// $b: assert.is-type($b, 'number');
|
|
21
|
+
/// @return $a * $b;
|
|
22
|
+
/// }
|
|
23
|
+
///
|
|
24
|
+
/// @function is-empty($value) {
|
|
25
|
+
/// $value: assert.is-type(
|
|
26
|
+
/// $value,
|
|
27
|
+
/// 'list|map|null',
|
|
28
|
+
/// $message: '$value must be a list, map, or null',
|
|
29
|
+
/// $source: 'is-empty'
|
|
30
|
+
/// );
|
|
31
|
+
/// @return $value and list.length($value) == 0;
|
|
32
|
+
/// }
|
|
33
|
+
///
|
|
34
|
+
/// @param {*} $arg - The argument to check.
|
|
35
|
+
/// @param {string} $type - The string type to assert the argument matches.
|
|
36
|
+
/// Multiple types may be separated by '|'.
|
|
37
|
+
/// @param {string} $message - Optional custom error message.
|
|
38
|
+
/// @param {string} $source - Optional source of the error message.
|
|
39
|
+
/// @return {*} The argument if it matches the type string.
|
|
40
|
+
/// @throw Error if the argument does not match the type string.
|
|
41
|
+
@function is-type(
|
|
42
|
+
$arg,
|
|
43
|
+
$type,
|
|
44
|
+
$message: 'Argument must be type #{meta.inspect($type)}. $arg: #{meta.inspect($arg)}',
|
|
45
|
+
$source: 'assert.is-type'
|
|
46
|
+
) {
|
|
47
|
+
@if type.matches($arg, $type) {
|
|
48
|
+
@return $arg;
|
|
49
|
+
}
|
|
50
|
+
@return throw.error($message, $source);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/// Asserts that the argument is not a specific type. The argument is returned
|
|
54
|
+
/// if it does not match. An error is thrown if the argument matches the type.
|
|
55
|
+
///
|
|
56
|
+
/// @example scss
|
|
57
|
+
/// @function get-strict($map, $key) {
|
|
58
|
+
/// @return assert.not-type(
|
|
59
|
+
/// map.get($map, $key),
|
|
60
|
+
/// 'null',
|
|
61
|
+
/// $message: 'Key must be in the map'
|
|
62
|
+
/// );
|
|
63
|
+
/// }
|
|
64
|
+
///
|
|
65
|
+
/// @param {*} $arg - The argument to check.
|
|
66
|
+
/// @param {string} $type - The string type to assert the argument does not
|
|
67
|
+
/// match. Multiple types may be separated by '|'.
|
|
68
|
+
/// @param {string} $message - Optional custom error message.
|
|
69
|
+
/// @param {string} $source - Optional source of the error message.
|
|
70
|
+
/// @return {*} The argument if it does not match the type string.
|
|
71
|
+
/// @throw Error if the argument matches the type string.
|
|
72
|
+
@function not-type(
|
|
73
|
+
$arg,
|
|
74
|
+
$type,
|
|
75
|
+
$message: 'Argument may not be type #{meta.inspect($type)}. $arg: #{meta.inspect($arg)}',
|
|
76
|
+
$source: 'assert.not-type'
|
|
77
|
+
) {
|
|
78
|
+
@if type.matches($arg, $type) {
|
|
79
|
+
@return throw.error($message, $source);
|
|
80
|
+
}
|
|
81
|
+
@return $arg;
|
|
82
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 Google LLC
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
// Extensions to the go/sass:list built-in module.
|
|
7
|
+
|
|
8
|
+
// go/keep-sorted start by_regex='(.+) prefix_order=sass:
|
|
9
|
+
@use 'sass:list';
|
|
10
|
+
@use 'assert';
|
|
11
|
+
@use 'throw';
|
|
12
|
+
// go/keep-sorted end
|
|
13
|
+
|
|
14
|
+
/// Returns the difference between two lists.
|
|
15
|
+
///
|
|
16
|
+
/// @example scss
|
|
17
|
+
/// $listA: ('apple', 'banana', 'cherry', 'date');
|
|
18
|
+
/// $listB: ('banana', 'cherry', 'apple');
|
|
19
|
+
/// $listC: ('apple', 'banana', 'date');
|
|
20
|
+
///
|
|
21
|
+
/// @debug list_ext.difference($listA, $listB); // ('date')
|
|
22
|
+
/// @debug list_ext.difference($listA, $listC); // ('cherry')
|
|
23
|
+
///
|
|
24
|
+
/// @param {list} $listA - The first list to compare.
|
|
25
|
+
/// @param {list} $listB - The second list to compare.
|
|
26
|
+
/// @return {list} All items in $listA that are not in $listB.
|
|
27
|
+
@function difference($listA, $listB) {
|
|
28
|
+
$listA: assert.is-type($listA, 'list', $source: 'list_ext.difference');
|
|
29
|
+
$listB: assert.is-type($listB, 'list', $source: 'list_ext.difference');
|
|
30
|
+
$error: throw.get-error($listA, $listB);
|
|
31
|
+
@if $error {
|
|
32
|
+
@return $error;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
$result: ();
|
|
36
|
+
@each $item in $listA {
|
|
37
|
+
@if not list.index($listB, $item) {
|
|
38
|
+
$result: list.append($result, $item, list.separator($listA));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
@return $result;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/// Checks if two lists contain the same elements, regardless of their order.
|
|
45
|
+
///
|
|
46
|
+
/// The function iterates through each list and verifies that every element in
|
|
47
|
+
/// one list is present in the other. The order of elements does not affect the
|
|
48
|
+
/// result.
|
|
49
|
+
///
|
|
50
|
+
/// @example scss
|
|
51
|
+
/// $listA: ('apple', 'banana', 'cherry');
|
|
52
|
+
/// $listB: ('banana', 'cherry', 'apple');
|
|
53
|
+
/// $listC: ('apple', 'banana', 'date');
|
|
54
|
+
///
|
|
55
|
+
/// @debug list_ext.are-equal($listA, $listB); // true
|
|
56
|
+
/// @debug list_ext.are-equal($listA, $listC); // false
|
|
57
|
+
///
|
|
58
|
+
/// @param {list} $listA - The first list to compare.
|
|
59
|
+
/// @param {list} $listB - The second list to compare.
|
|
60
|
+
/// @return {boolean} `true` if the lists contain the same elements, otherwise
|
|
61
|
+
/// `false`.
|
|
62
|
+
@function are-equal($listA, $listB) {
|
|
63
|
+
$listA: assert.is-type($listA, 'list', $source: 'list_ext.are-equal');
|
|
64
|
+
$listB: assert.is-type($listB, 'list', $source: 'list_ext.are-equal');
|
|
65
|
+
$error: throw.get-error($listA, $listB);
|
|
66
|
+
@if $error {
|
|
67
|
+
@return $error;
|
|
68
|
+
}
|
|
69
|
+
@if list.length($listA) != list.length($listB) {
|
|
70
|
+
@return false;
|
|
71
|
+
}
|
|
72
|
+
$result: true;
|
|
73
|
+
@each $key in $listA {
|
|
74
|
+
@if not list.index($listB, $key) {
|
|
75
|
+
$result: false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@each $key in $listB {
|
|
80
|
+
@if not list.index($listA, $key) {
|
|
81
|
+
$result: false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
@return $result;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/// Returns the intersection of two lists.
|
|
88
|
+
///
|
|
89
|
+
/// @example scss
|
|
90
|
+
/// $listA: ('apple', 'banana', 'cherry', 'date');
|
|
91
|
+
/// $listB: ('banana', 'cherry', 'apple');
|
|
92
|
+
/// $listC: ('apple', 'banana', 'date');
|
|
93
|
+
///
|
|
94
|
+
/// @debug list_ext.intersection($listA, $listB); // ('apple', 'banana', 'cherry')
|
|
95
|
+
/// @debug list_ext.intersection($listA, $listC); // ('apple', 'banana')
|
|
96
|
+
///
|
|
97
|
+
/// @param {list} $listA - The first list to compare.
|
|
98
|
+
/// @param {list} $listB - The second list to compare.
|
|
99
|
+
/// @return {list} All items in $listA that are also in $listB.
|
|
100
|
+
@function intersection($listA, $listB) {
|
|
101
|
+
$listA: assert.is-type($listA, 'list', $source: 'list_ext.intersection');
|
|
102
|
+
$listB: assert.is-type($listB, 'list', $source: 'list_ext.intersection');
|
|
103
|
+
$error: throw.get-error($listA, $listB);
|
|
104
|
+
@if $error {
|
|
105
|
+
@return $error;
|
|
106
|
+
}
|
|
107
|
+
$result: ();
|
|
108
|
+
@each $item in $listA {
|
|
109
|
+
@if list.index($listB, $item) {
|
|
110
|
+
$result: list.append($result, $item, list.separator($listA));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
@return $result;
|
|
114
|
+
}
|