@maicol07/material-web 2.3.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 +102 -21
- 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,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
interface ShowPopoverOptions {
|
|
8
|
+
source?: HTMLElement;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface TogglePopoverOptions extends ShowPopoverOptions {
|
|
12
|
+
force?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface HTMLElement {
|
|
16
|
+
showPopover(options?: ShowPopoverOptions | boolean): void;
|
|
17
|
+
togglePopover(options?: TogglePopoverOptions | boolean): boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface ToggleEvent {
|
|
21
|
+
source: Element | null;
|
|
22
|
+
}
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2021 Google LLC
|
|
3
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
// go/keep-sorted start
|
|
7
|
-
@use 'sass:list';
|
|
8
|
-
@use 'sass:string';
|
|
9
|
-
// go/keep-sorted end
|
|
10
|
-
|
|
11
|
-
/// Checks if a string starts with a given prefix.
|
|
12
|
-
///
|
|
13
|
-
/// @example - scss
|
|
14
|
-
/// @debug has-prefix('var(--foo)', 'var('); // true
|
|
15
|
-
///
|
|
16
|
-
/// @param {String} $string - The string to test.
|
|
17
|
-
/// @param {String} $prefix - The prefix to check.
|
|
18
|
-
/// @return {Boolean} True if the string starts with the given prefix.
|
|
19
|
-
@function has-prefix($string, $prefix) {
|
|
20
|
-
@return string.slice($string, 1, string.length($prefix)) == $prefix;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/// Checks if a string ends with a given suffix.
|
|
24
|
-
///
|
|
25
|
-
/// @example - scss
|
|
26
|
-
/// @debug has-suffix('var(--foo)', ')'); // true
|
|
27
|
-
///
|
|
28
|
-
/// @param {String} $string - The string to test.
|
|
29
|
-
/// @param {String} $suffix - The suffix to check.
|
|
30
|
-
/// @return {Boolean} True if the string ends with the given suffix.
|
|
31
|
-
@function has-suffix($string, $suffix) {
|
|
32
|
-
@return string.slice($string, -1 * string.length($suffix)) == $suffix;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/// Trims a repeating prefix from the start of a string.
|
|
36
|
-
///
|
|
37
|
-
/// @example - scss
|
|
38
|
-
/// @debug trim-repeating-prefix(' foo bar ', ' '); // "foo bar "
|
|
39
|
-
///
|
|
40
|
-
/// @param {String} $string - The string to trim.
|
|
41
|
-
/// @param {String} $prefix - The repeating prefix string to trim.
|
|
42
|
-
/// @return {String} The string with the prefix trimmed from the start.
|
|
43
|
-
@function trim-repeating-prefix($string, $prefix) {
|
|
44
|
-
@while has-prefix($string, $prefix) {
|
|
45
|
-
$string: trim-prefix($string, $prefix);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@return $string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/// Trims a prefix from the start of a string.
|
|
52
|
-
///
|
|
53
|
-
/// @example - scss
|
|
54
|
-
/// @debug trim-prefix('var(--foo)', 'var('); // "--foo)"
|
|
55
|
-
///
|
|
56
|
-
/// @param {String} $string - The string to trim.
|
|
57
|
-
/// @param {String} $prefix - The prefix string to trim.
|
|
58
|
-
/// @return {String} The string with the prefix trimmed from the start.
|
|
59
|
-
@function trim-prefix($string, $prefix) {
|
|
60
|
-
@if has-prefix($string, $prefix) {
|
|
61
|
-
$string: string.slice($string, string.length($prefix) + 1);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
@return $string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/// Trims a repeating suffix from the end of a string.
|
|
68
|
-
///
|
|
69
|
-
/// @example - scss
|
|
70
|
-
/// @debug trim-repeating-suffix(' foo bar ', ' '); // " foo bar"
|
|
71
|
-
/// @debug trim-repeating-suffix('var(--foo)', ')'); // "var(--foo"
|
|
72
|
-
///
|
|
73
|
-
/// @param {String} $string - The string to trim.
|
|
74
|
-
/// @param {String} $suffix - The repeating suffix string to trim.
|
|
75
|
-
/// @return {String} The string with the suffix trimmed from the end.
|
|
76
|
-
@function trim-repeating-suffix($string, $suffix) {
|
|
77
|
-
@while has-suffix($string, $suffix) {
|
|
78
|
-
$string: trim-suffix($string, $suffix);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@return $string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/// Trims a suffix from the end of a string.
|
|
85
|
-
///
|
|
86
|
-
/// @example - scss
|
|
87
|
-
/// @debug trim-suffix('var(--foo)', ')'); // "var(--foo"
|
|
88
|
-
///
|
|
89
|
-
/// @param {String} $string - The string to trim.
|
|
90
|
-
/// @param {String} $suffix - The suffix string to trim.
|
|
91
|
-
/// @return {String} The string with the suffix trimmed from the end.
|
|
92
|
-
@function trim-suffix($string, $suffix) {
|
|
93
|
-
@if has-suffix($string, $suffix) {
|
|
94
|
-
$string: string.slice($string, 1, -1 * string.length($suffix) - 1);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
@return $string;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/// Trims a repeating prefix and suffix from the start and end of a string.
|
|
101
|
-
///
|
|
102
|
-
/// If a suffix is not provided, the prefix is used as the suffix to trim.
|
|
103
|
-
///
|
|
104
|
-
/// @example - scss
|
|
105
|
-
/// @debug trim-repeating(' foo bar ', ' '); // "foo bar"
|
|
106
|
-
///
|
|
107
|
-
/// @param {String} $string - The string to trim.
|
|
108
|
-
/// @param {String} $prefix - The repeating prefix string to trim.
|
|
109
|
-
/// @param {String} $suffix [$prefix] - The repeating suffix string to trim.
|
|
110
|
-
/// @return {String} The string with the prefix and suffix trimmed.
|
|
111
|
-
@function trim-repeating($string, $prefix, $suffix: $prefix) {
|
|
112
|
-
@return trim-repeating-prefix(
|
|
113
|
-
trim-repeating-suffix($string, $suffix),
|
|
114
|
-
$prefix
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/// Trims a prefix and suffix from the start and end of a string.
|
|
119
|
-
///
|
|
120
|
-
/// If a suffix is not provided, the prefix is used as the suffix to trim.
|
|
121
|
-
///
|
|
122
|
-
/// @example - scss
|
|
123
|
-
/// @debug trim('var(--foo)', 'var(', ')'); // "--foo"
|
|
124
|
-
///
|
|
125
|
-
/// @param {String} $string - The string to trim.
|
|
126
|
-
/// @param {String} $prefix - The prefix string to trim.
|
|
127
|
-
/// @param {String} $suffix [$prefix] - The suffix string to trim.
|
|
128
|
-
/// @return {String} The string with the prefix and suffix trimmed.
|
|
129
|
-
@function trim($string, $prefix, $suffix: $prefix) {
|
|
130
|
-
@return trim-prefix(trim-suffix($string, $suffix), $prefix);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/// Returns a new string with the first match of a pattern replaced by a
|
|
134
|
-
/// replacement.
|
|
135
|
-
///
|
|
136
|
-
/// @example - scss
|
|
137
|
-
/// @debug trim('foo bar baz', 'bar', 'quux'); // "foo quux baz"
|
|
138
|
-
///
|
|
139
|
-
/// @param {String} $string - The string to be searched.
|
|
140
|
-
/// @param {String} $pattern - The pattern to search for.
|
|
141
|
-
/// @param {String} $replacement - The value to replace the pattern.
|
|
142
|
-
/// @return {String} The string with the first match of pattern replaced by the
|
|
143
|
-
/// replacement or the initial string itself.
|
|
144
|
-
@function replace($string, $pattern, $replacement) {
|
|
145
|
-
$pattern-index: string.index($string, $pattern);
|
|
146
|
-
@if not $pattern-index {
|
|
147
|
-
@return $string;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
$before: string.slice($string, 1, $pattern-index - 1);
|
|
151
|
-
$after: string.slice($string, string.length($pattern) + $pattern-index);
|
|
152
|
-
|
|
153
|
-
@return $before + $replacement + $after;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/// Divides a string into an ordered list of substrings.
|
|
157
|
-
///
|
|
158
|
-
/// @example - scss
|
|
159
|
-
/// @debug split("1px 2px 3px 4px"); // (1px 2px 3px 4px)
|
|
160
|
-
/// @debug split("1px, 2px, 3px, 4px"); // (1px 2px 3px 4px)
|
|
161
|
-
/// @debug split("1px/2px/3px/4px"); // (1px 2px 3px 4px)
|
|
162
|
-
///
|
|
163
|
-
/// @param {String} $str - The string to split
|
|
164
|
-
/// @return {List} The list of substrings
|
|
165
|
-
@function split($str) {
|
|
166
|
-
$list: ();
|
|
167
|
-
$item: '';
|
|
168
|
-
// list separator precedence is comma, slash, space
|
|
169
|
-
$separator: ' ';
|
|
170
|
-
@if string.index($str, ',') {
|
|
171
|
-
$separator: ',';
|
|
172
|
-
} @else if string.index($str, '/') {
|
|
173
|
-
$separator: '/';
|
|
174
|
-
}
|
|
175
|
-
@for $i from 1 through string.length($str) {
|
|
176
|
-
$chr: string.slice($str, $i, $i);
|
|
177
|
-
@if $chr == $separator {
|
|
178
|
-
@if $item != '' {
|
|
179
|
-
// remove surrounding whitespace
|
|
180
|
-
$item: string.unquote(trim($item, ' '));
|
|
181
|
-
$list: list.append($list, $item);
|
|
182
|
-
}
|
|
183
|
-
$item: '';
|
|
184
|
-
} @else {
|
|
185
|
-
$item: $item + $chr;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
// append final item
|
|
189
|
-
@if $item != '' {
|
|
190
|
-
// remove surrounding whitespace
|
|
191
|
-
$item: string.unquote(trim($item, ' '));
|
|
192
|
-
$list: list.append($list, $item);
|
|
193
|
-
}
|
|
194
|
-
@return $list;
|
|
195
|
-
}
|