@francofantomius/material-components 1.1.1 → 1.2.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/CHANGELOG.md +44 -0
- package/README.md +2 -1
- package/custom-elements.json +1049 -300
- package/dist/chunks/{account-menu-Dau0UHTl.js → account-menu-Bo7NghIm.js} +181 -223
- package/dist/chunks/{account-menu-Dau0UHTl.js.map → account-menu-Bo7NghIm.js.map} +1 -1
- package/dist/chunks/app-drawer-DjKSuatE.js +855 -0
- package/dist/chunks/{app-drawer-Du1ePzxZ.js.map → app-drawer-DjKSuatE.js.map} +1 -1
- package/dist/chunks/{badge-G4EjcMoy.js → badge-sZzNelZz.js} +30 -34
- package/dist/chunks/{badge-G4EjcMoy.js.map → badge-sZzNelZz.js.map} +1 -1
- package/dist/chunks/{bottom-sheet-q79BBYAj.js → bottom-sheet-BGgbUmKd.js} +98 -109
- package/dist/chunks/{bottom-sheet-q79BBYAj.js.map → bottom-sheet-BGgbUmKd.js.map} +1 -1
- package/dist/chunks/{button-D2vn7kJ8.js → button-DeQQlYds.js} +62 -72
- package/dist/chunks/{button-D2vn7kJ8.js.map → button-DeQQlYds.js.map} +1 -1
- package/dist/chunks/button-group-R2jN8FXK.js +136 -0
- package/dist/chunks/{button-group-CNqvJx1n.js.map → button-group-R2jN8FXK.js.map} +1 -1
- package/dist/chunks/{card-DVffdPpv.js → card-CVhWizDF.js} +45 -50
- package/dist/chunks/{card-DVffdPpv.js.map → card-CVhWizDF.js.map} +1 -1
- package/dist/chunks/{carousel-item-BG6kjjjk.js → carousel-item-DNp2zhP9.js} +62 -73
- package/dist/chunks/{carousel-item-BG6kjjjk.js.map → carousel-item-DNp2zhP9.js.map} +1 -1
- package/dist/chunks/{checkbox-BqlboAHd.js → checkbox-CsqUHVOF.js} +59 -64
- package/dist/chunks/{checkbox-BqlboAHd.js.map → checkbox-CsqUHVOF.js.map} +1 -1
- package/dist/chunks/{chip-CI1ZINnr.js → chip-B5c-I8bj.js} +56 -63
- package/dist/chunks/{chip-CI1ZINnr.js.map → chip-B5c-I8bj.js.map} +1 -1
- package/dist/chunks/code-CM6hIZNx.js +1531 -0
- package/dist/chunks/{code-C5UFBkCh.js.map → code-CM6hIZNx.js.map} +1 -1
- package/dist/chunks/date-picker-B15_rR0f.js +774 -0
- package/dist/chunks/date-picker-B15_rR0f.js.map +1 -0
- package/dist/chunks/decorate-DknOJ8FJ.js +40 -0
- package/dist/chunks/{decorate-DXuynaiA.js.map → decorate-DknOJ8FJ.js.map} +1 -1
- package/dist/chunks/{dialog-DGVEE5m_.js → dialog-Czknf8dl.js} +47 -52
- package/dist/chunks/{dialog-DGVEE5m_.js.map → dialog-Czknf8dl.js.map} +1 -1
- package/dist/chunks/divider-DIyCOosa.js +78 -0
- package/dist/chunks/{divider-DNepwoZv.js.map → divider-DIyCOosa.js.map} +1 -1
- package/dist/chunks/{fab-C9j3WBHE.js → fab-aZC0-lHo.js} +38 -44
- package/dist/chunks/{fab-C9j3WBHE.js.map → fab-aZC0-lHo.js.map} +1 -1
- package/dist/chunks/{fab-menu.css-3pu930sZ.js → fab-menu.css-BdVg1k4c.js} +5 -6
- package/dist/chunks/{fab-menu.css-3pu930sZ.js.map → fab-menu.css-BdVg1k4c.js.map} +1 -1
- package/dist/chunks/focus-ring-K6SY_mIm.js +69 -0
- package/dist/chunks/{focus-ring-CuiJuM-y.js.map → focus-ring-K6SY_mIm.js.map} +1 -1
- package/dist/chunks/form-associated-Do5uXckv.js +69 -0
- package/dist/chunks/{form-associated-Cty_ZaS9.js.map → form-associated-Do5uXckv.js.map} +1 -1
- package/dist/chunks/icon-FvKeXi61.js +59 -0
- package/dist/chunks/{icon-DrNqcNEL.js.map → icon-FvKeXi61.js.map} +1 -1
- package/dist/chunks/{icon-button-BQz73GLa.js → icon-button-CulnCZpZ.js} +58 -67
- package/dist/chunks/{icon-button-BQz73GLa.js.map → icon-button-CulnCZpZ.js.map} +1 -1
- package/dist/chunks/{list-D8olR7oZ.js → list-D7yrbJRL.js} +64 -72
- package/dist/chunks/{list-D8olR7oZ.js.map → list-D7yrbJRL.js.map} +1 -1
- package/dist/chunks/{loading-indicator-CvWnZr9o.js → loading-indicator-D9AyxNQh.js} +41 -46
- package/dist/chunks/{loading-indicator-CvWnZr9o.js.map → loading-indicator-D9AyxNQh.js.map} +1 -1
- package/dist/chunks/{menu-item-BBSp5Cqc.js → menu-item-C3entPo7.js} +77 -91
- package/dist/chunks/{menu-item-BBSp5Cqc.js.map → menu-item-C3entPo7.js.map} +1 -1
- package/dist/chunks/{navigation-bar-item-C9DfOEzg.js → navigation-bar-item-CWHCQeNw.js} +98 -115
- package/dist/chunks/{navigation-bar-item-C9DfOEzg.js.map → navigation-bar-item-CWHCQeNw.js.map} +1 -1
- package/dist/chunks/{navigation-drawer-CKl44Ef5.js → navigation-drawer-pGer0t4z.js} +116 -138
- package/dist/chunks/{navigation-drawer-CKl44Ef5.js.map → navigation-drawer-pGer0t4z.js.map} +1 -1
- package/dist/chunks/{navigation-rail-item-6pdhNHJK.js → navigation-rail-item-CWvGjLjC.js} +70 -86
- package/dist/chunks/{navigation-rail-item-6pdhNHJK.js.map → navigation-rail-item-CWvGjLjC.js.map} +1 -1
- package/dist/chunks/{player-C4ydiIpr.js → player-dT08kxeG.js} +423 -466
- package/dist/chunks/{player-C4ydiIpr.js.map → player-dT08kxeG.js.map} +1 -1
- package/dist/chunks/{progress-LQmLMDjX.js → progress-etZuX_VD.js} +46 -53
- package/dist/chunks/{progress-LQmLMDjX.js.map → progress-etZuX_VD.js.map} +1 -1
- package/dist/chunks/radio-jPCwykIa.js +197 -0
- package/dist/chunks/{radio-Bily78NT.js.map → radio-jPCwykIa.js.map} +1 -1
- package/dist/chunks/ripple-CBOKeVfm.js +132 -0
- package/dist/chunks/{ripple-squbKHhj.js.map → ripple-CBOKeVfm.js.map} +1 -1
- package/dist/chunks/{search-bar-fUD0qU2P.js → search-bar-B6xxVT7u.js} +244 -203
- package/dist/chunks/search-bar-B6xxVT7u.js.map +1 -0
- package/dist/chunks/segmented-button-Fon9kOHV.js +253 -0
- package/dist/chunks/{segmented-button-B0BvGSQ7.js.map → segmented-button-Fon9kOHV.js.map} +1 -1
- package/dist/chunks/{side-sheet-S2w081AK.js → side-sheet-sQ8qGKVm.js} +73 -81
- package/dist/chunks/{side-sheet-S2w081AK.js.map → side-sheet-sQ8qGKVm.js.map} +1 -1
- package/dist/chunks/slider-OIyEcUU9.js +448 -0
- package/dist/chunks/slider-OIyEcUU9.js.map +1 -0
- package/dist/chunks/{snackbar-Wsz3BzEY.js → snackbar-Yi6fF9vM.js} +57 -62
- package/dist/chunks/{snackbar-Wsz3BzEY.js.map → snackbar-Yi6fF9vM.js.map} +1 -1
- package/dist/chunks/{split-button-DUfjukQY.js → split-button-CLjVJe3I.js} +155 -172
- package/dist/chunks/{split-button-DUfjukQY.js.map → split-button-CLjVJe3I.js.map} +1 -1
- package/dist/chunks/{switch-DdukrvXb.js → switch-mtu6AVEh.js} +54 -57
- package/dist/chunks/{switch-DdukrvXb.js.map → switch-mtu6AVEh.js.map} +1 -1
- package/dist/chunks/table-C5rCvdFc.js +724 -0
- package/dist/chunks/{table-CqHnneAj.js.map → table-C5rCvdFc.js.map} +1 -1
- package/dist/chunks/tabs-C0mtURlT.js +182 -0
- package/dist/chunks/{tabs-BfOtoeir.js.map → tabs-C0mtURlT.js.map} +1 -1
- package/dist/chunks/{text-field-hN6-2HQy.js → text-field-MifFD7uk.js} +92 -110
- package/dist/chunks/{text-field-hN6-2HQy.js.map → text-field-MifFD7uk.js.map} +1 -1
- package/dist/chunks/time-picker-JTcLcJuz.js +810 -0
- package/dist/chunks/time-picker-JTcLcJuz.js.map +1 -0
- package/dist/chunks/{toolbar-DXVQbQKJ.js → toolbar-CsxKc2Yd.js} +48 -55
- package/dist/chunks/{toolbar-DXVQbQKJ.js.map → toolbar-CsxKc2Yd.js.map} +1 -1
- package/dist/chunks/tooltip-Ds3lNowS.js +380 -0
- package/dist/chunks/{tooltip-CE7JMHMu.js.map → tooltip-Ds3lNowS.js.map} +1 -1
- package/dist/chunks/{top-app-bar-Dgbp6CFv.js → top-app-bar-TrnjKzOX.js} +52 -53
- package/dist/chunks/top-app-bar-TrnjKzOX.js.map +1 -0
- package/dist/components/account-menu/account-menu.js +2 -8
- package/dist/components/app-drawer/app-drawer.js +2 -9
- package/dist/components/badge/badge.js +2 -4
- package/dist/components/bottom-sheet/bottom-sheet.js +2 -4
- package/dist/components/button/button.js +2 -4
- package/dist/components/button-group/button-group.js +2 -4
- package/dist/components/card/card.js +2 -4
- package/dist/components/carousel/carousel-item.js +2 -4
- package/dist/components/carousel/carousel.js +214 -232
- package/dist/components/carousel/carousel.js.map +1 -1
- package/dist/components/checkbox/checkbox.js +2 -4
- package/dist/components/chip/chip.js +2 -5
- package/dist/components/code/code.js +2 -5
- package/dist/components/date-picker/date-picker.js +2 -4
- package/dist/components/dialog/dialog.js +2 -4
- package/dist/components/divider/divider.js +2 -4
- package/dist/components/fab/fab.js +2 -4
- package/dist/components/fab-menu/fab-menu-item.js +53 -61
- package/dist/components/fab-menu/fab-menu-item.js.map +1 -1
- package/dist/components/fab-menu/fab-menu.js +98 -111
- package/dist/components/fab-menu/fab-menu.js.map +1 -1
- package/dist/components/icon/icon.js +2 -4
- package/dist/components/icon-button/icon-button.js +2 -4
- package/dist/components/list/list.js +2 -5
- package/dist/components/loading-indicator/loading-indicator.js +2 -4
- package/dist/components/menu/menu-item.js +2 -4
- package/dist/components/menu/menu.js +165 -183
- package/dist/components/menu/menu.js.map +1 -1
- package/dist/components/navigation-bar/navigation-bar-item.js +2 -5
- package/dist/components/navigation-bar/navigation-bar.js +131 -143
- package/dist/components/navigation-bar/navigation-bar.js.map +1 -1
- package/dist/components/navigation-drawer/navigation-drawer.js +2 -8
- package/dist/components/navigation-rail/navigation-rail-item.js +2 -5
- package/dist/components/navigation-rail/navigation-rail.js +92 -102
- package/dist/components/navigation-rail/navigation-rail.js.map +1 -1
- package/dist/components/player/player.js +2 -7
- package/dist/components/progress/progress.js +2 -5
- package/dist/components/radio/radio.js +2 -5
- package/dist/components/search-bar/search-bar.js +2 -5
- package/dist/components/segmented-button/segmented-button.js +2 -5
- package/dist/components/side-sheet/side-sheet.js +2 -4
- package/dist/components/slider/slider.js +2 -4
- package/dist/components/snackbar/snackbar.js +2 -4
- package/dist/components/split-button/split-button.js +2 -4
- package/dist/components/switch/switch.js +2 -4
- package/dist/components/table/table.js +2 -13
- package/dist/components/tabs/tabs.js +2 -5
- package/dist/components/text-field/text-field.js +2 -4
- package/dist/components/time-picker/time-picker.js +2 -4
- package/dist/components/toolbar/toolbar.js +2 -4
- package/dist/components/tooltip/tooltip.js +2 -4
- package/dist/components/top-app-bar/top-app-bar.js +2 -5
- package/dist/index.js +52 -150
- package/dist/internal/focus-ring/focus-ring.js +2 -4
- package/dist/internal/ripple/ripple.js +2 -4
- package/dist/tokens/index.js +468 -314
- package/dist/tokens/index.js.map +1 -1
- package/llms.txt +74 -8
- package/package.json +2 -14
- package/dist/chunks/app-drawer-Du1ePzxZ.js +0 -903
- package/dist/chunks/button-group-CNqvJx1n.js +0 -143
- package/dist/chunks/code-C5UFBkCh.js +0 -1830
- package/dist/chunks/date-picker-DJeHi4w-.js +0 -777
- package/dist/chunks/date-picker-DJeHi4w-.js.map +0 -1
- package/dist/chunks/decorate-DXuynaiA.js +0 -39
- package/dist/chunks/divider-DNepwoZv.js +0 -82
- package/dist/chunks/focus-ring-CuiJuM-y.js +0 -71
- package/dist/chunks/form-associated-Cty_ZaS9.js +0 -73
- package/dist/chunks/icon-DrNqcNEL.js +0 -62
- package/dist/chunks/radio-Bily78NT.js +0 -205
- package/dist/chunks/ripple-squbKHhj.js +0 -135
- package/dist/chunks/search-bar-fUD0qU2P.js.map +0 -1
- package/dist/chunks/segmented-button-B0BvGSQ7.js +0 -265
- package/dist/chunks/slider-D-mnO8yQ.js +0 -450
- package/dist/chunks/slider-D-mnO8yQ.js.map +0 -1
- package/dist/chunks/table-CqHnneAj.js +0 -773
- package/dist/chunks/tabs-BfOtoeir.js +0 -191
- package/dist/chunks/time-picker-CZnb2sWz.js +0 -785
- package/dist/chunks/time-picker-CZnb2sWz.js.map +0 -1
- package/dist/chunks/tooltip-CE7JMHMu.js +0 -398
- package/dist/chunks/top-app-bar-Dgbp6CFv.js.map +0 -1
- package/dist/components/account-menu/account-menu.css.d.ts +0 -3
- package/dist/components/account-menu/account-menu.css.d.ts.map +0 -1
- package/dist/components/account-menu/account-menu.d.ts +0 -111
- package/dist/components/account-menu/account-menu.d.ts.map +0 -1
- package/dist/components/app-drawer/app-drawer.css.d.ts +0 -3
- package/dist/components/app-drawer/app-drawer.css.d.ts.map +0 -1
- package/dist/components/app-drawer/app-drawer.d.ts +0 -173
- package/dist/components/app-drawer/app-drawer.d.ts.map +0 -1
- package/dist/components/badge/badge.css.d.ts +0 -2
- package/dist/components/badge/badge.css.d.ts.map +0 -1
- package/dist/components/badge/badge.d.ts +0 -16
- package/dist/components/badge/badge.d.ts.map +0 -1
- package/dist/components/bottom-sheet/bottom-sheet.css.d.ts +0 -2
- package/dist/components/bottom-sheet/bottom-sheet.css.d.ts.map +0 -1
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -69
- package/dist/components/bottom-sheet/bottom-sheet.d.ts.map +0 -1
- package/dist/components/button/button.css.d.ts +0 -2
- package/dist/components/button/button.css.d.ts.map +0 -1
- package/dist/components/button/button.d.ts +0 -25
- package/dist/components/button/button.d.ts.map +0 -1
- package/dist/components/button-group/button-group.css.d.ts +0 -2
- package/dist/components/button-group/button-group.css.d.ts.map +0 -1
- package/dist/components/button-group/button-group.d.ts +0 -28
- package/dist/components/button-group/button-group.d.ts.map +0 -1
- package/dist/components/card/card.css.d.ts +0 -2
- package/dist/components/card/card.css.d.ts.map +0 -1
- package/dist/components/card/card.d.ts +0 -18
- package/dist/components/card/card.d.ts.map +0 -1
- package/dist/components/carousel/carousel-item.d.ts +0 -33
- package/dist/components/carousel/carousel-item.d.ts.map +0 -1
- package/dist/components/carousel/carousel.css.d.ts +0 -3
- package/dist/components/carousel/carousel.css.d.ts.map +0 -1
- package/dist/components/carousel/carousel.d.ts +0 -81
- package/dist/components/carousel/carousel.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox.css.d.ts +0 -2
- package/dist/components/checkbox/checkbox.css.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox.d.ts +0 -24
- package/dist/components/checkbox/checkbox.d.ts.map +0 -1
- package/dist/components/chip/chip.css.d.ts +0 -3
- package/dist/components/chip/chip.css.d.ts.map +0 -1
- package/dist/components/chip/chip.d.ts +0 -27
- package/dist/components/chip/chip.d.ts.map +0 -1
- package/dist/components/code/code.css.d.ts +0 -2
- package/dist/components/code/code.css.d.ts.map +0 -1
- package/dist/components/code/code.d.ts +0 -106
- package/dist/components/code/code.d.ts.map +0 -1
- package/dist/components/code/highlighter.d.ts +0 -8
- package/dist/components/code/highlighter.d.ts.map +0 -1
- package/dist/components/code/linter.d.ts +0 -44
- package/dist/components/code/linter.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker.css.d.ts +0 -2
- package/dist/components/date-picker/date-picker.css.d.ts.map +0 -1
- package/dist/components/date-picker/date-picker.d.ts +0 -59
- package/dist/components/date-picker/date-picker.d.ts.map +0 -1
- package/dist/components/dialog/dialog.css.d.ts +0 -2
- package/dist/components/dialog/dialog.css.d.ts.map +0 -1
- package/dist/components/dialog/dialog.d.ts +0 -22
- package/dist/components/dialog/dialog.d.ts.map +0 -1
- package/dist/components/divider/divider.css.d.ts +0 -2
- package/dist/components/divider/divider.css.d.ts.map +0 -1
- package/dist/components/divider/divider.d.ts +0 -16
- package/dist/components/divider/divider.d.ts.map +0 -1
- package/dist/components/fab/fab.css.d.ts +0 -2
- package/dist/components/fab/fab.css.d.ts.map +0 -1
- package/dist/components/fab/fab.d.ts +0 -19
- package/dist/components/fab/fab.d.ts.map +0 -1
- package/dist/components/fab-menu/fab-menu-item.d.ts +0 -35
- package/dist/components/fab-menu/fab-menu-item.d.ts.map +0 -1
- package/dist/components/fab-menu/fab-menu.css.d.ts +0 -3
- package/dist/components/fab-menu/fab-menu.css.d.ts.map +0 -1
- package/dist/components/fab-menu/fab-menu.d.ts +0 -72
- package/dist/components/fab-menu/fab-menu.d.ts.map +0 -1
- package/dist/components/icon/icon.css.d.ts +0 -2
- package/dist/components/icon/icon.css.d.ts.map +0 -1
- package/dist/components/icon/icon.d.ts +0 -15
- package/dist/components/icon/icon.d.ts.map +0 -1
- package/dist/components/icon-button/icon-button.css.d.ts +0 -2
- package/dist/components/icon-button/icon-button.css.d.ts.map +0 -1
- package/dist/components/icon-button/icon-button.d.ts +0 -22
- package/dist/components/icon-button/icon-button.d.ts.map +0 -1
- package/dist/components/list/list.css.d.ts +0 -3
- package/dist/components/list/list.css.d.ts.map +0 -1
- package/dist/components/list/list.d.ts +0 -25
- package/dist/components/list/list.d.ts.map +0 -1
- package/dist/components/loading-indicator/loading-indicator.css.d.ts +0 -2
- package/dist/components/loading-indicator/loading-indicator.css.d.ts.map +0 -1
- package/dist/components/loading-indicator/loading-indicator.d.ts +0 -48
- package/dist/components/loading-indicator/loading-indicator.d.ts.map +0 -1
- package/dist/components/menu/menu-item.d.ts +0 -41
- package/dist/components/menu/menu-item.d.ts.map +0 -1
- package/dist/components/menu/menu.css.d.ts +0 -3
- package/dist/components/menu/menu.css.d.ts.map +0 -1
- package/dist/components/menu/menu.d.ts +0 -91
- package/dist/components/menu/menu.d.ts.map +0 -1
- package/dist/components/navigation-bar/navigation-bar-item.d.ts +0 -49
- package/dist/components/navigation-bar/navigation-bar-item.d.ts.map +0 -1
- package/dist/components/navigation-bar/navigation-bar.css.d.ts +0 -3
- package/dist/components/navigation-bar/navigation-bar.css.d.ts.map +0 -1
- package/dist/components/navigation-bar/navigation-bar.d.ts +0 -50
- package/dist/components/navigation-bar/navigation-bar.d.ts.map +0 -1
- package/dist/components/navigation-drawer/navigation-drawer.css.d.ts +0 -3
- package/dist/components/navigation-drawer/navigation-drawer.css.d.ts.map +0 -1
- package/dist/components/navigation-drawer/navigation-drawer.d.ts +0 -76
- package/dist/components/navigation-drawer/navigation-drawer.d.ts.map +0 -1
- package/dist/components/navigation-rail/navigation-rail-item.d.ts +0 -36
- package/dist/components/navigation-rail/navigation-rail-item.d.ts.map +0 -1
- package/dist/components/navigation-rail/navigation-rail.css.d.ts +0 -3
- package/dist/components/navigation-rail/navigation-rail.css.d.ts.map +0 -1
- package/dist/components/navigation-rail/navigation-rail.d.ts +0 -43
- package/dist/components/navigation-rail/navigation-rail.d.ts.map +0 -1
- package/dist/components/player/player.css.d.ts +0 -2
- package/dist/components/player/player.css.d.ts.map +0 -1
- package/dist/components/player/player.d.ts +0 -99
- package/dist/components/player/player.d.ts.map +0 -1
- package/dist/components/progress/progress.css.d.ts +0 -2
- package/dist/components/progress/progress.css.d.ts.map +0 -1
- package/dist/components/progress/progress.d.ts +0 -21
- package/dist/components/progress/progress.d.ts.map +0 -1
- package/dist/components/radio/radio.css.d.ts +0 -3
- package/dist/components/radio/radio.css.d.ts.map +0 -1
- package/dist/components/radio/radio.d.ts +0 -38
- package/dist/components/radio/radio.d.ts.map +0 -1
- package/dist/components/search-bar/search-bar.css.d.ts +0 -2
- package/dist/components/search-bar/search-bar.css.d.ts.map +0 -1
- package/dist/components/search-bar/search-bar.d.ts +0 -81
- package/dist/components/search-bar/search-bar.d.ts.map +0 -1
- package/dist/components/segmented-button/segmented-button.css.d.ts +0 -3
- package/dist/components/segmented-button/segmented-button.css.d.ts.map +0 -1
- package/dist/components/segmented-button/segmented-button.d.ts +0 -40
- package/dist/components/segmented-button/segmented-button.d.ts.map +0 -1
- package/dist/components/side-sheet/side-sheet.css.d.ts +0 -2
- package/dist/components/side-sheet/side-sheet.css.d.ts.map +0 -1
- package/dist/components/side-sheet/side-sheet.d.ts +0 -57
- package/dist/components/side-sheet/side-sheet.d.ts.map +0 -1
- package/dist/components/slider/slider.css.d.ts +0 -2
- package/dist/components/slider/slider.css.d.ts.map +0 -1
- package/dist/components/slider/slider.d.ts +0 -51
- package/dist/components/slider/slider.d.ts.map +0 -1
- package/dist/components/snackbar/snackbar.css.d.ts +0 -2
- package/dist/components/snackbar/snackbar.css.d.ts.map +0 -1
- package/dist/components/snackbar/snackbar.d.ts +0 -24
- package/dist/components/snackbar/snackbar.d.ts.map +0 -1
- package/dist/components/split-button/split-button.css.d.ts +0 -2
- package/dist/components/split-button/split-button.css.d.ts.map +0 -1
- package/dist/components/split-button/split-button.d.ts +0 -89
- package/dist/components/split-button/split-button.d.ts.map +0 -1
- package/dist/components/switch/switch.css.d.ts +0 -2
- package/dist/components/switch/switch.css.d.ts.map +0 -1
- package/dist/components/switch/switch.d.ts +0 -22
- package/dist/components/switch/switch.d.ts.map +0 -1
- package/dist/components/table/table.css.d.ts +0 -8
- package/dist/components/table/table.css.d.ts.map +0 -1
- package/dist/components/table/table.d.ts +0 -158
- package/dist/components/table/table.d.ts.map +0 -1
- package/dist/components/tabs/tabs.css.d.ts +0 -3
- package/dist/components/tabs/tabs.css.d.ts.map +0 -1
- package/dist/components/tabs/tabs.d.ts +0 -33
- package/dist/components/tabs/tabs.d.ts.map +0 -1
- package/dist/components/text-field/text-field.css.d.ts +0 -2
- package/dist/components/text-field/text-field.css.d.ts.map +0 -1
- package/dist/components/text-field/text-field.d.ts +0 -40
- package/dist/components/text-field/text-field.d.ts.map +0 -1
- package/dist/components/time-picker/time-picker.css.d.ts +0 -2
- package/dist/components/time-picker/time-picker.css.d.ts.map +0 -1
- package/dist/components/time-picker/time-picker.d.ts +0 -87
- package/dist/components/time-picker/time-picker.d.ts.map +0 -1
- package/dist/components/toolbar/toolbar.css.d.ts +0 -2
- package/dist/components/toolbar/toolbar.css.d.ts.map +0 -1
- package/dist/components/toolbar/toolbar.d.ts +0 -53
- package/dist/components/toolbar/toolbar.d.ts.map +0 -1
- package/dist/components/tooltip/tooltip.css.d.ts +0 -2
- package/dist/components/tooltip/tooltip.css.d.ts.map +0 -1
- package/dist/components/tooltip/tooltip.d.ts +0 -89
- package/dist/components/tooltip/tooltip.d.ts.map +0 -1
- package/dist/components/top-app-bar/top-app-bar.css.d.ts +0 -2
- package/dist/components/top-app-bar/top-app-bar.css.d.ts.map +0 -1
- package/dist/components/top-app-bar/top-app-bar.d.ts +0 -29
- package/dist/components/top-app-bar/top-app-bar.d.ts.map +0 -1
- package/dist/index.d.ts +0 -52
- package/dist/index.d.ts.map +0 -1
- package/dist/internal/base-component.d.ts +0 -13
- package/dist/internal/base-component.d.ts.map +0 -1
- package/dist/internal/focus-ring/focus-ring.css.d.ts +0 -2
- package/dist/internal/focus-ring/focus-ring.css.d.ts.map +0 -1
- package/dist/internal/focus-ring/focus-ring.d.ts +0 -18
- package/dist/internal/focus-ring/focus-ring.d.ts.map +0 -1
- package/dist/internal/form-associated.d.ts +0 -26
- package/dist/internal/form-associated.d.ts.map +0 -1
- package/dist/internal/ripple/ripple.css.d.ts +0 -2
- package/dist/internal/ripple/ripple.css.d.ts.map +0 -1
- package/dist/internal/ripple/ripple.d.ts +0 -23
- package/dist/internal/ripple/ripple.d.ts.map +0 -1
- package/dist/tokens/colors.d.ts +0 -42
- package/dist/tokens/colors.d.ts.map +0 -1
- package/dist/tokens/elevation.d.ts +0 -9
- package/dist/tokens/elevation.d.ts.map +0 -1
- package/dist/tokens/index.d.ts +0 -7
- package/dist/tokens/index.d.ts.map +0 -1
- package/dist/tokens/motion.d.ts +0 -21
- package/dist/tokens/motion.d.ts.map +0 -1
- package/dist/tokens/shape.d.ts +0 -10
- package/dist/tokens/shape.d.ts.map +0 -1
- package/dist/tokens/theme.css.d.ts +0 -4
- package/dist/tokens/theme.css.d.ts.map +0 -1
- package/dist/tokens/typography.d.ts +0 -101
- package/dist/tokens/typography.d.ts.map +0 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import "./icon-
|
|
3
|
-
import { css as n, html as
|
|
4
|
-
import { customElement as
|
|
5
|
-
|
|
1
|
+
import { n as e, t } from "./decorate-DknOJ8FJ.js";
|
|
2
|
+
import "./icon-FvKeXi61.js";
|
|
3
|
+
import { css as n, html as r, nothing as i } from "lit";
|
|
4
|
+
import { customElement as a, property as o } from "lit/decorators.js";
|
|
5
|
+
//#region src/components/snackbar/snackbar.css.ts
|
|
6
|
+
var s = n`
|
|
6
7
|
:host {
|
|
7
8
|
display: block;
|
|
8
9
|
position: fixed;
|
|
@@ -84,78 +85,72 @@ var c = n`
|
|
|
84
85
|
.close-btn:hover {
|
|
85
86
|
background-color: rgba(255, 255, 255, 0.08);
|
|
86
87
|
}
|
|
87
|
-
`,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
88
|
+
`, c = class extends e {
|
|
89
|
+
constructor(...e) {
|
|
90
|
+
super(...e), this.open = !1, this.message = "", this.actionText = "", this.closeable = !1, this.timeoutMs = 4e3, this.timerId = null, this.handleAction = () => {
|
|
91
|
+
this.emitEvent("action"), this.close();
|
|
92
|
+
}, this.handleClose = () => {
|
|
93
|
+
this.close();
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
static {
|
|
97
|
+
this.styles = [e.styles, s];
|
|
98
|
+
}
|
|
99
|
+
updated(e) {
|
|
100
|
+
super.updated(e), e.has("open") && (this.open ? this.startTimer() : this.clearTimer());
|
|
101
|
+
}
|
|
102
|
+
show() {
|
|
103
|
+
this.open = !0;
|
|
104
|
+
}
|
|
105
|
+
close() {
|
|
106
|
+
this.open = !1, this.emitEvent("close");
|
|
107
|
+
}
|
|
108
|
+
startTimer() {
|
|
109
|
+
this.clearTimer(), this.timeoutMs > 0 && (this.timerId = window.setTimeout(() => {
|
|
110
|
+
this.close();
|
|
111
|
+
}, this.timeoutMs));
|
|
112
|
+
}
|
|
113
|
+
clearTimer() {
|
|
114
|
+
this.timerId !== null && (clearTimeout(this.timerId), this.timerId = null);
|
|
115
|
+
}
|
|
116
|
+
render() {
|
|
117
|
+
return r`
|
|
117
118
|
<div class="snackbar" role="status" aria-live="polite">
|
|
118
119
|
<div class="message">
|
|
119
120
|
<slot>${this.message}</slot>
|
|
120
121
|
</div>
|
|
121
122
|
|
|
122
123
|
<div class="actions">
|
|
123
|
-
${this.actionText ?
|
|
124
|
+
${this.actionText ? r`
|
|
124
125
|
<button class="action-btn" @click=${this.handleAction}>
|
|
125
126
|
${this.actionText}
|
|
126
127
|
</button>
|
|
127
|
-
` :
|
|
128
|
+
` : i}
|
|
128
129
|
|
|
129
|
-
${this.closeable ?
|
|
130
|
+
${this.closeable ? r`
|
|
130
131
|
<button class="close-btn" aria-label="Dismiss" @click=${this.handleClose}>
|
|
131
132
|
<md-icon name="close" size="18"></md-icon>
|
|
132
133
|
</button>
|
|
133
|
-
` :
|
|
134
|
+
` : i}
|
|
134
135
|
</div>
|
|
135
136
|
</div>
|
|
136
137
|
`;
|
|
137
|
-
|
|
138
|
-
};
|
|
139
|
-
t([s({
|
|
140
|
-
type: Boolean,
|
|
141
|
-
reflect: !0
|
|
142
|
-
})], e.prototype, "open", void 0);
|
|
143
|
-
t([s({ type: String })], e.prototype, "message", void 0);
|
|
144
|
-
t([s({
|
|
145
|
-
type: String,
|
|
146
|
-
attribute: "action-text"
|
|
147
|
-
})], e.prototype, "actionText", void 0);
|
|
148
|
-
t([s({
|
|
149
|
-
type: Boolean,
|
|
150
|
-
reflect: !0
|
|
151
|
-
})], e.prototype, "closeable", void 0);
|
|
152
|
-
t([s({
|
|
153
|
-
type: Number,
|
|
154
|
-
attribute: "timeout-ms"
|
|
155
|
-
})], e.prototype, "timeoutMs", void 0);
|
|
156
|
-
e = t([l("md-snackbar")], e);
|
|
157
|
-
export {
|
|
158
|
-
e as t
|
|
138
|
+
}
|
|
159
139
|
};
|
|
140
|
+
t([o({
|
|
141
|
+
type: Boolean,
|
|
142
|
+
reflect: !0
|
|
143
|
+
})], c.prototype, "open", void 0), t([o({ type: String })], c.prototype, "message", void 0), t([o({
|
|
144
|
+
type: String,
|
|
145
|
+
attribute: "action-text"
|
|
146
|
+
})], c.prototype, "actionText", void 0), t([o({
|
|
147
|
+
type: Boolean,
|
|
148
|
+
reflect: !0
|
|
149
|
+
})], c.prototype, "closeable", void 0), t([o({
|
|
150
|
+
type: Number,
|
|
151
|
+
attribute: "timeout-ms"
|
|
152
|
+
})], c.prototype, "timeoutMs", void 0), c = t([a("md-snackbar")], c);
|
|
153
|
+
//#endregion
|
|
154
|
+
export { c as t };
|
|
160
155
|
|
|
161
|
-
//# sourceMappingURL=snackbar-
|
|
156
|
+
//# sourceMappingURL=snackbar-Yi6fF9vM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar-
|
|
1
|
+
{"version":3,"file":"snackbar-Yi6fF9vM.js","names":[],"sources":["../../src/components/snackbar/snackbar.css.ts","../../src/components/snackbar/snackbar.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const snackbarStyles = css`\n :host {\n display: block;\n position: fixed;\n bottom: 24px;\n left: 50%;\n transform: translateX(-50%) translateY(100px);\n opacity: 0;\n pointer-events: none;\n z-index: 2000;\n transition: transform 250ms cubic-bezier(0.2, 0, 0, 1),\n opacity 250ms cubic-bezier(0.2, 0, 0, 1);\n }\n\n :host([open]) {\n transform: translateX(-50%) translateY(0);\n opacity: 1;\n pointer-events: auto;\n }\n\n .snackbar {\n display: flex;\n align-items: center;\n min-width: 288px;\n max-width: 568px;\n min-height: 48px;\n padding: 8px 16px;\n box-sizing: border-box;\n border-radius: var(--md-sys-shape-corner-extra-small, 4px);\n background-color: var(--md-sys-color-inverse-surface, #313033);\n color: var(--md-sys-color-inverse-on-surface, #F4EFF4);\n box-shadow: var(--md-sys-elevation-level3, 0px 1px 3px 0px rgba(0,0,0,0.30));\n font-family: var(--md-sys-typescale-font-family, inherit);\n font-size: var(--md-sys-typescale-body-medium-size, 14px);\n line-height: 20px;\n gap: 12px;\n }\n\n .message {\n flex: 1;\n }\n\n .actions {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n\n .action-btn {\n background: transparent;\n border: none;\n color: var(--md-sys-color-inverse-primary, #D0BCFF);\n font-family: inherit;\n font-size: var(--md-sys-typescale-label-large-size, 14px);\n font-weight: 500;\n cursor: pointer;\n padding: 0 8px;\n height: 36px;\n border-radius: var(--md-sys-shape-corner-extra-small, 4px);\n outline: none;\n }\n\n .action-btn:hover {\n background-color: rgba(208, 188, 255, 0.08);\n }\n\n .close-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: transparent;\n border: none;\n color: var(--md-sys-color-inverse-on-surface, #F4EFF4);\n cursor: pointer;\n padding: 4px;\n border-radius: 50%;\n outline: none;\n }\n\n .close-btn:hover {\n background-color: rgba(255, 255, 255, 0.08);\n }\n`;\n\n","import { html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { MdBaseElement } from '../../internal/base-component.js';\nimport '../icon/icon.js';\nimport { snackbarStyles } from './snackbar.css.js';\n\n@customElement('md-snackbar')\nexport class MdSnackbar extends MdBaseElement {\n static override styles = [MdBaseElement.styles, snackbarStyles];\n\n @property({ type: Boolean, reflect: true })\n open = false;\n\n @property({ type: String })\n message = '';\n\n @property({ type: String, attribute: 'action-text' })\n actionText = '';\n\n @property({ type: Boolean, reflect: true })\n closeable = false;\n\n @property({ type: Number, attribute: 'timeout-ms' })\n timeoutMs = 4000;\n\n private timerId: number | null = null;\n\n override updated(changedProperties: Map<string, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('open')) {\n if (this.open) {\n this.startTimer();\n } else {\n this.clearTimer();\n }\n }\n }\n\n show() {\n this.open = true;\n }\n\n close() {\n this.open = false;\n this.emitEvent('close');\n }\n\n private startTimer() {\n this.clearTimer();\n if (this.timeoutMs > 0) {\n this.timerId = window.setTimeout(() => {\n this.close();\n }, this.timeoutMs);\n }\n }\n\n private clearTimer() {\n if (this.timerId !== null) {\n clearTimeout(this.timerId);\n this.timerId = null;\n }\n }\n\n private handleAction = () => {\n this.emitEvent('action');\n this.close();\n };\n\n private handleClose = () => {\n this.close();\n };\n\n override render() {\n return html`\n <div class=\"snackbar\" role=\"status\" aria-live=\"polite\">\n <div class=\"message\">\n <slot>${this.message}</slot>\n </div>\n\n <div class=\"actions\">\n ${this.actionText\n ? html`\n <button class=\"action-btn\" @click=${this.handleAction}>\n ${this.actionText}\n </button>\n `\n : nothing}\n\n ${this.closeable\n ? html`\n <button class=\"close-btn\" aria-label=\"Dismiss\" @click=${this.handleClose}>\n <md-icon name=\"close\" size=\"18\"></md-icon>\n </button>\n `\n : nothing}\n </div>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'md-snackbar': MdSnackbar;\n }\n}\n\n"],"mappings":";;;;;AAEA,IAAa,IAAiB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCKpB,IAAN,cAAyB,EAAc;;EA6DhB,aAzDrB,KAAA,OAAA,IAGG,KAAA,UAAA,IAGG,KAAA,aAAA,IAGD,KAAA,YAAA,IAGA,KAAA,YAAA,KAEqB,KAAA,UAAA,MAsCJ,KAAA,qBAAA;GAE3B,AADA,KAAK,UAAU,QAAQ,GACvB,KAAK,MAAM;EACb,GAE4B,KAAA,oBAAA;GAC1B,KAAK,MAAM;EACb;;;EA9DyB,KAAA,SAAA,CAAC,EAAc,QAAQ,CAAc;;CAmB9D,QAAiB,GAAyC;EAExD,AADA,MAAM,QAAQ,CAAiB,GAC3B,EAAkB,IAAI,MAAM,MAC1B,KAAK,OACP,KAAK,WAAW,IAEhB,KAAK,WAAW;CAGtB;CAEA,OAAO;EACL,KAAK,OAAO;CACd;CAEA,QAAQ;EAEN,AADA,KAAK,OAAO,IACZ,KAAK,UAAU,OAAO;CACxB;CAEA,aAAqB;EAEnB,AADA,KAAK,WAAW,GACZ,KAAK,YAAY,MACnB,KAAK,UAAU,OAAO,iBAAiB;GACrC,KAAK,MAAM;EACb,GAAG,KAAK,SAAS;CAErB;CAEA,aAAqB;EACnB,AAAI,KAAK,YAAY,SACnB,aAAa,KAAK,OAAO,GACzB,KAAK,UAAU;CAEnB;CAWA,SAAkB;EAChB,OAAO,CAAI;;;kBAGG,KAAK,QAAQ;;;;YAInB,KAAK,aACH,CAAI;oDACkC,KAAK,aAAa;oBAClD,KAAK,WAAW;;kBAGtB,EAAQ;;YAEV,KAAK,YACH,CAAI;wEACsD,KAAK,YAAY;;;kBAI3E,EAAQ;;;;CAIpB;AACF;AAzFG,EAAA,CAAA,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAGzC,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,WAAA,KAAA,CAAA,GAGzB,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAc,CAAC,CAAA,GAAA,EAAA,WAAA,cAAA,KAAA,CAAA,GAGnD,EAAA,CAAA,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAGzC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAa,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAhBpD,IAAA,EAAA,CAAA,EAAc,aAAa,CAAA,GAAA,CAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import "./ripple-
|
|
3
|
-
import "./focus-ring-
|
|
4
|
-
import "./icon-
|
|
5
|
-
import { css as
|
|
6
|
-
import { customElement as
|
|
7
|
-
|
|
1
|
+
import { n as e, t } from "./decorate-DknOJ8FJ.js";
|
|
2
|
+
import "./ripple-CBOKeVfm.js";
|
|
3
|
+
import "./focus-ring-K6SY_mIm.js";
|
|
4
|
+
import "./icon-FvKeXi61.js";
|
|
5
|
+
import { css as n, html as r, nothing as i } from "lit";
|
|
6
|
+
import { customElement as a, property as o, query as s, queryAssignedElements as c } from "lit/decorators.js";
|
|
7
|
+
//#region src/components/split-button/split-button.css.ts
|
|
8
|
+
var l = n`
|
|
8
9
|
:host {
|
|
9
10
|
display: inline-flex;
|
|
10
11
|
vertical-align: middle;
|
|
@@ -232,118 +233,117 @@ var f = m`
|
|
|
232
233
|
background-color: var(--md-sys-color-outline-variant, #cac4d0);
|
|
233
234
|
border-radius: 3px;
|
|
234
235
|
}
|
|
235
|
-
`,
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
return p`
|
|
236
|
+
`, u = class extends e {
|
|
237
|
+
constructor(...e) {
|
|
238
|
+
super(...e), this.variant = "filled", this.disabled = !1, this.label = "", this.icon = "", this.trailingIcon = "arrow_drop_down", this.open = !1, this.type = "button", this.actionAriaLabel = "", this.menuAriaLabel = "More options", this.menuPlacement = "bottom-end", this.stayOpenOnFocusout = !1, this.closeOnItemClick = !0, this.handleDocumentClick = (e) => {
|
|
239
|
+
this.open && (e.composedPath().includes(this) || this.close());
|
|
240
|
+
}, this.handleWindowKeyDown = (e) => {
|
|
241
|
+
this.open && e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), this.close(), this.menuButton?.focus());
|
|
242
|
+
}, this.handleSurfaceKeyDown = (e) => {
|
|
243
|
+
let t = this.getItems(!0);
|
|
244
|
+
if (t.length === 0) return;
|
|
245
|
+
let n = null;
|
|
246
|
+
try {
|
|
247
|
+
n = document.activeElement;
|
|
248
|
+
} catch {
|
|
249
|
+
n = null;
|
|
250
|
+
}
|
|
251
|
+
let r = t.findIndex((e) => e === n || e.contains(n));
|
|
252
|
+
switch (e.key) {
|
|
253
|
+
case "ArrowDown":
|
|
254
|
+
e.preventDefault(), t[r >= 0 && r < t.length - 1 ? r + 1 : 0]?.focus();
|
|
255
|
+
break;
|
|
256
|
+
case "ArrowUp":
|
|
257
|
+
e.preventDefault(), t[r > 0 ? r - 1 : t.length - 1]?.focus();
|
|
258
|
+
break;
|
|
259
|
+
case "Home":
|
|
260
|
+
e.preventDefault(), t[0]?.focus();
|
|
261
|
+
break;
|
|
262
|
+
case "End":
|
|
263
|
+
e.preventDefault(), t[t.length - 1]?.focus();
|
|
264
|
+
break;
|
|
265
|
+
case "Tab": this.stayOpenOnFocusout || this.close();
|
|
266
|
+
}
|
|
267
|
+
}, this.handleItemSelection = (e) => {
|
|
268
|
+
let t = e.detail;
|
|
269
|
+
this.emitEvent("select", t), !t?.keepOpen && this.closeOnItemClick && (this.close(), this.menuButton?.focus());
|
|
270
|
+
}, this.handleActionClick = (e) => {
|
|
271
|
+
if (this.disabled) {
|
|
272
|
+
e.preventDefault(), e.stopImmediatePropagation();
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
if (this.type === "submit" || this.type === "reset") {
|
|
276
|
+
let e = this.closest("form");
|
|
277
|
+
e && (this.type === "submit" ? e.requestSubmit() : e.reset());
|
|
278
|
+
}
|
|
279
|
+
this.emitEvent("action", {
|
|
280
|
+
target: this,
|
|
281
|
+
open: this.open
|
|
282
|
+
});
|
|
283
|
+
}, this.handleMenuClick = (e) => {
|
|
284
|
+
if (e.stopPropagation(), this.disabled) {
|
|
285
|
+
e.preventDefault(), e.stopImmediatePropagation();
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
this.open = !this.open, this.emitEvent("trailing-click", {
|
|
289
|
+
target: this,
|
|
290
|
+
open: this.open
|
|
291
|
+
}), this.emitEvent("toggle", {
|
|
292
|
+
target: this,
|
|
293
|
+
open: this.open
|
|
294
|
+
});
|
|
295
|
+
}, this.handleBackdropClick = (e) => {
|
|
296
|
+
e.stopPropagation(), this.close();
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
static {
|
|
300
|
+
this.styles = [e.styles, l];
|
|
301
|
+
}
|
|
302
|
+
handleSlotChange() {
|
|
303
|
+
let e = !!(this.icon || this.assignedIcons && this.assignedIcons.length > 0);
|
|
304
|
+
this.toggleAttribute("has-icon", e);
|
|
305
|
+
}
|
|
306
|
+
connectedCallback() {
|
|
307
|
+
super.connectedCallback(), window.addEventListener("keydown", this.handleWindowKeyDown), document.addEventListener("pointerdown", this.handleDocumentClick), this.addEventListener("item-click", this.handleItemSelection), this.addEventListener("menu-item-click", this.handleItemSelection);
|
|
308
|
+
}
|
|
309
|
+
disconnectedCallback() {
|
|
310
|
+
super.disconnectedCallback(), window.removeEventListener("keydown", this.handleWindowKeyDown), document.removeEventListener("pointerdown", this.handleDocumentClick), this.removeEventListener("item-click", this.handleItemSelection), this.removeEventListener("menu-item-click", this.handleItemSelection);
|
|
311
|
+
}
|
|
312
|
+
firstUpdated() {
|
|
313
|
+
this.handleSlotChange();
|
|
314
|
+
}
|
|
315
|
+
updated(e) {
|
|
316
|
+
super.updated(e), e.has("open") && (this.open ? (this.emitEvent("open"), setTimeout(() => {
|
|
317
|
+
this.focusFirstItem();
|
|
318
|
+
}, 16)) : this.emitEvent("close"));
|
|
319
|
+
}
|
|
320
|
+
show() {
|
|
321
|
+
this.open ||= !0;
|
|
322
|
+
}
|
|
323
|
+
close() {
|
|
324
|
+
this.open &&= !1;
|
|
325
|
+
}
|
|
326
|
+
toggle() {
|
|
327
|
+
this.open = !this.open;
|
|
328
|
+
}
|
|
329
|
+
getItems(e = !1) {
|
|
330
|
+
let t = Array.from(this.querySelectorAll("md-menu-item, [role=\"menuitem\"], button.menu-item"));
|
|
331
|
+
return e ? t.filter((e) => !(e.hasAttribute("disabled") || e.disabled)) : t;
|
|
332
|
+
}
|
|
333
|
+
focusFirstItem() {
|
|
334
|
+
let e = this.getItems(!0);
|
|
335
|
+
e.length > 0 ? e[0].focus() : this.menuSurfaceElement && this.menuSurfaceElement.focus();
|
|
336
|
+
}
|
|
337
|
+
focusLastItem() {
|
|
338
|
+
let e = this.getItems(!0);
|
|
339
|
+
e.length > 0 && e[e.length - 1].focus();
|
|
340
|
+
}
|
|
341
|
+
focusItemAtIndex(e) {
|
|
342
|
+
let t = this.getItems(!0);
|
|
343
|
+
e >= 0 && e < t.length && t[e].focus();
|
|
344
|
+
}
|
|
345
|
+
render() {
|
|
346
|
+
return r`
|
|
347
347
|
<div class="backdrop" @click=${this.handleBackdropClick}></div>
|
|
348
348
|
|
|
349
349
|
<div class="container" role="group">
|
|
@@ -351,14 +351,14 @@ var f = m`
|
|
|
351
351
|
type=${this.type}
|
|
352
352
|
class="action-button"
|
|
353
353
|
?disabled=${this.disabled}
|
|
354
|
-
aria-label=${this.actionAriaLabel ||
|
|
354
|
+
aria-label=${this.actionAriaLabel || i}
|
|
355
355
|
@click=${this.handleActionClick}
|
|
356
356
|
>
|
|
357
357
|
<md-ripple ?disabled=${this.disabled}></md-ripple>
|
|
358
358
|
<md-focus-ring></md-focus-ring>
|
|
359
359
|
<span class="content">
|
|
360
360
|
<slot name="icon" @slotchange=${this.handleSlotChange}>
|
|
361
|
-
${this.icon ?
|
|
361
|
+
${this.icon ? r`<md-icon name=${this.icon}></md-icon>` : i}
|
|
362
362
|
</slot>
|
|
363
363
|
<slot name="label">${this.label}</slot>
|
|
364
364
|
</span>
|
|
@@ -396,55 +396,38 @@ var f = m`
|
|
|
396
396
|
</div>
|
|
397
397
|
</div>
|
|
398
398
|
`;
|
|
399
|
-
|
|
399
|
+
}
|
|
400
400
|
};
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
})],
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
})],
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
type: Boolean,
|
|
435
|
-
attribute: "stay-open-on-focusout"
|
|
436
|
-
})], n.prototype, "stayOpenOnFocusout", void 0);
|
|
437
|
-
i([s({
|
|
438
|
-
type: Boolean,
|
|
439
|
-
attribute: "close-on-item-click"
|
|
440
|
-
})], n.prototype, "closeOnItemClick", void 0);
|
|
441
|
-
i([l(".action-button")], n.prototype, "actionButton", void 0);
|
|
442
|
-
i([l(".menu-button")], n.prototype, "menuButton", void 0);
|
|
443
|
-
i([l(".menu-surface")], n.prototype, "menuSurfaceElement", void 0);
|
|
444
|
-
i([b({ slot: "icon" })], n.prototype, "assignedIcons", void 0);
|
|
445
|
-
n = i([h("md-split-button")], n);
|
|
446
|
-
export {
|
|
447
|
-
n as t
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
//# sourceMappingURL=split-button-DUfjukQY.js.map
|
|
401
|
+
t([o({
|
|
402
|
+
type: String,
|
|
403
|
+
reflect: !0
|
|
404
|
+
})], u.prototype, "variant", void 0), t([o({
|
|
405
|
+
type: Boolean,
|
|
406
|
+
reflect: !0
|
|
407
|
+
})], u.prototype, "disabled", void 0), t([o({ type: String })], u.prototype, "label", void 0), t([o({ type: String })], u.prototype, "icon", void 0), t([o({
|
|
408
|
+
type: String,
|
|
409
|
+
attribute: "trailing-icon"
|
|
410
|
+
})], u.prototype, "trailingIcon", void 0), t([o({
|
|
411
|
+
type: Boolean,
|
|
412
|
+
reflect: !0
|
|
413
|
+
})], u.prototype, "open", void 0), t([o({ type: String })], u.prototype, "type", void 0), t([o({
|
|
414
|
+
type: String,
|
|
415
|
+
attribute: "action-aria-label"
|
|
416
|
+
})], u.prototype, "actionAriaLabel", void 0), t([o({
|
|
417
|
+
type: String,
|
|
418
|
+
attribute: "menu-aria-label"
|
|
419
|
+
})], u.prototype, "menuAriaLabel", void 0), t([o({
|
|
420
|
+
type: String,
|
|
421
|
+
attribute: "menu-placement",
|
|
422
|
+
reflect: !0
|
|
423
|
+
})], u.prototype, "menuPlacement", void 0), t([o({
|
|
424
|
+
type: Boolean,
|
|
425
|
+
attribute: "stay-open-on-focusout"
|
|
426
|
+
})], u.prototype, "stayOpenOnFocusout", void 0), t([o({
|
|
427
|
+
type: Boolean,
|
|
428
|
+
attribute: "close-on-item-click"
|
|
429
|
+
})], u.prototype, "closeOnItemClick", void 0), t([s(".action-button")], u.prototype, "actionButton", void 0), t([s(".menu-button")], u.prototype, "menuButton", void 0), t([s(".menu-surface")], u.prototype, "menuSurfaceElement", void 0), t([c({ slot: "icon" })], u.prototype, "assignedIcons", void 0), u = t([a("md-split-button")], u);
|
|
430
|
+
//#endregion
|
|
431
|
+
export { u as t };
|
|
432
|
+
|
|
433
|
+
//# sourceMappingURL=split-button-CLjVJe3I.js.map
|