material 3.5.2 → 3.5.4
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/dist/components/badge/api.js +156 -156
- package/dist/components/badge/badge.js +9 -9
- package/dist/components/badge/config.js +43 -43
- package/dist/components/badge/constants.js +13 -13
- package/dist/components/badge/features.js +75 -75
- package/dist/components/bottom-app-bar/bottom-app-bar.js +98 -98
- package/dist/components/bottom-app-bar/config.js +5 -5
- package/dist/components/bottom-app-bar/constants.js +8 -8
- package/dist/components/bottom-sheet/api.js +52 -52
- package/dist/components/bottom-sheet/bottom-sheet.js +9 -9
- package/dist/components/bottom-sheet/config.js +17 -17
- package/dist/components/bottom-sheet/constants.js +24 -24
- package/dist/components/bottom-sheet/features/drag.js +91 -91
- package/dist/components/bottom-sheet/features/state.js +148 -148
- package/dist/components/bottom-sheet/features/structure.js +85 -85
- package/dist/components/button/api.js +265 -265
- package/dist/components/button/button.js +15 -15
- package/dist/components/button/config.js +39 -39
- package/dist/components/button/constants.js +21 -21
- package/dist/components/button/features/progress.js +167 -167
- package/dist/components/button/features/toggle.js +31 -31
- package/dist/components/button-group/button-group.js +389 -389
- package/dist/components/button-group/config.js +106 -106
- package/dist/components/button-group/constants.js +62 -62
- package/dist/components/card/api.js +88 -88
- package/dist/components/card/card.js +11 -11
- package/dist/components/card/config.js +131 -131
- package/dist/components/card/constants.js +39 -39
- package/dist/components/card/content.js +175 -175
- package/dist/components/carousel/api.js +49 -49
- package/dist/components/carousel/arrangement.js +51 -51
- package/dist/components/carousel/carousel.js +2 -2
- package/dist/components/carousel/config.js +31 -31
- package/dist/components/carousel/constants.js +17 -17
- package/dist/components/carousel/features/scroll.js +469 -469
- package/dist/components/carousel/features/slides.js +125 -125
- package/dist/components/carousel/keylines.js +244 -244
- package/dist/components/carousel/strategy.js +185 -185
- package/dist/components/checkbox/api.js +87 -87
- package/dist/components/checkbox/checkbox.js +55 -55
- package/dist/components/checkbox/config.js +44 -44
- package/dist/components/checkbox/constants.js +10 -10
- package/dist/components/chips/api.js +157 -157
- package/dist/components/chips/chip/chip.js +275 -275
- package/dist/components/chips/chips.js +25 -25
- package/dist/components/chips/config.js +73 -73
- package/dist/components/chips/constants.js +2 -2
- package/dist/components/chips/features/chip-items.js +15 -15
- package/dist/components/chips/features/container.js +39 -39
- package/dist/components/chips/features/controller.js +317 -317
- package/dist/components/chips/features/dom.js +52 -52
- package/dist/components/datepicker/api.js +6 -6
- package/dist/components/datepicker/config.js +3 -3
- package/dist/components/datepicker/constants.js +39 -39
- package/dist/components/datepicker/datepicker.js +675 -675
- package/dist/components/datepicker/render.js +153 -153
- package/dist/components/datepicker/types.js +6 -6
- package/dist/components/datepicker/utils.js +157 -157
- package/dist/components/dialog/api.js +109 -109
- package/dist/components/dialog/config.js +29 -29
- package/dist/components/dialog/constants.js +35 -35
- package/dist/components/dialog/dialog.js +16 -16
- package/dist/components/dialog/features.js +739 -739
- package/dist/components/divider/config.js +4 -4
- package/dist/components/divider/constants.js +10 -10
- package/dist/components/divider/divider.js +6 -6
- package/dist/components/divider/features.js +72 -72
- package/dist/components/drawer/api.js +73 -73
- package/dist/components/drawer/config.js +61 -61
- package/dist/components/drawer/constants.js +32 -32
- package/dist/components/drawer/drawer.js +38 -38
- package/dist/components/drawer/features/headline.js +34 -34
- package/dist/components/drawer/features/items.js +203 -203
- package/dist/components/drawer/features/state.js +206 -206
- package/dist/components/extended-fab/api.js +92 -92
- package/dist/components/extended-fab/config.js +65 -65
- package/dist/components/extended-fab/constants.js +30 -30
- package/dist/components/extended-fab/extended-fab.js +51 -51
- package/dist/components/fab/api.js +65 -65
- package/dist/components/fab/config.js +46 -46
- package/dist/components/fab/constants.js +25 -25
- package/dist/components/fab/fab.js +9 -9
- package/dist/components/fab-menu/config.js +9 -9
- package/dist/components/fab-menu/constants.js +15 -15
- package/dist/components/fab-menu/fab-menu.js +310 -310
- package/dist/components/fab-menu/stagger.js +18 -18
- package/dist/components/icon-button/api.js +195 -195
- package/dist/components/icon-button/config.js +79 -79
- package/dist/components/icon-button/constants.js +43 -43
- package/dist/components/icon-button/features/toggle.js +116 -116
- package/dist/components/icon-button/icon-button.js +15 -15
- package/dist/components/list/api.js +55 -55
- package/dist/components/list/config.js +56 -56
- package/dist/components/list/constants.js +25 -25
- package/dist/components/list/features/anatomy.js +41 -41
- package/dist/components/list/features/renderer.js +136 -136
- package/dist/components/list/features/selection.js +118 -118
- package/dist/components/list/list.js +9 -9
- package/dist/components/loading-indicator/api.js +117 -117
- package/dist/components/loading-indicator/config.js +13 -13
- package/dist/components/loading-indicator/constants.js +23 -23
- package/dist/components/loading-indicator/features/motion.js +33 -33
- package/dist/components/loading-indicator/features/renderer.js +121 -121
- package/dist/components/loading-indicator/loading-indicator.js +8 -8
- package/dist/components/menu/api.js +76 -76
- package/dist/components/menu/config.js +73 -73
- package/dist/components/menu/constants.js +45 -45
- package/dist/components/menu/features/controller.js +507 -507
- package/dist/components/menu/features/keyboard.js +292 -292
- package/dist/components/menu/features/layer.js +13 -13
- package/dist/components/menu/features/loader.js +61 -61
- package/dist/components/menu/features/opener.js +288 -288
- package/dist/components/menu/features/position.js +279 -279
- package/dist/components/menu/features/registry.js +7 -7
- package/dist/components/menu/features/submenu.js +386 -386
- package/dist/components/menu/features/tasks.js +45 -45
- package/dist/components/menu/menu.js +16 -16
- package/dist/components/menu/on-demand.js +138 -138
- package/dist/components/navigation-bar/navigation-bar.js +144 -144
- package/dist/components/navigation-rail/config.js +11 -11
- package/dist/components/navigation-rail/constants.js +8 -8
- package/dist/components/navigation-rail/navigation-rail.js +237 -237
- package/dist/components/progress/api.js +207 -207
- package/dist/components/progress/config.js +137 -137
- package/dist/components/progress/constants.js +88 -88
- package/dist/components/progress/features/canvas.js +291 -291
- package/dist/components/progress/features/circular.js +69 -69
- package/dist/components/progress/features/colors.js +41 -41
- package/dist/components/progress/features/linear.js +96 -96
- package/dist/components/progress/features/motion.js +87 -87
- package/dist/components/progress/features/state.js +35 -35
- package/dist/components/progress/progress.js +11 -11
- package/dist/components/radios/api.js +54 -54
- package/dist/components/radios/config.js +19 -19
- package/dist/components/radios/constants.js +10 -10
- package/dist/components/radios/radio.js +161 -161
- package/dist/components/radios/radios.js +12 -12
- package/dist/components/search/api.js +116 -116
- package/dist/components/search/config.js +66 -66
- package/dist/components/search/constants.js +75 -75
- package/dist/components/search/features/input.js +238 -238
- package/dist/components/search/features/states.js +279 -279
- package/dist/components/search/features/structure.js +212 -212
- package/dist/components/search/features/suggestions.js +234 -234
- package/dist/components/search/search.js +30 -30
- package/dist/components/select/api.js +92 -92
- package/dist/components/select/config.js +46 -46
- package/dist/components/select/constants.js +39 -39
- package/dist/components/select/features.js +485 -485
- package/dist/components/select/select.js +17 -17
- package/dist/components/side-sheet/api.js +46 -46
- package/dist/components/side-sheet/config.js +19 -19
- package/dist/components/side-sheet/constants.js +22 -22
- package/dist/components/side-sheet/features/state.js +132 -132
- package/dist/components/side-sheet/features/structure.js +89 -89
- package/dist/components/side-sheet/side-sheet.js +8 -8
- package/dist/components/slider/config.js +54 -54
- package/dist/components/slider/constants.js +54 -54
- package/dist/components/slider/features/axis.js +14 -14
- package/dist/components/slider/features/controller.js +944 -944
- package/dist/components/slider/features/dom.js +104 -104
- package/dist/components/slider/features/states.js +83 -83
- package/dist/components/slider/slider.js +16 -16
- package/dist/components/snackbar/api.js +199 -199
- package/dist/components/snackbar/config.js +24 -24
- package/dist/components/snackbar/constants.js +41 -41
- package/dist/components/snackbar/features.js +115 -115
- package/dist/components/snackbar/layer.js +72 -72
- package/dist/components/snackbar/position.js +20 -20
- package/dist/components/snackbar/queue.js +89 -89
- package/dist/components/snackbar/snackbar.js +12 -12
- package/dist/components/split-button/api.js +137 -137
- package/dist/components/split-button/config.js +11 -11
- package/dist/components/split-button/constants.js +24 -24
- package/dist/components/split-button/features/buttons.js +35 -35
- package/dist/components/split-button/features/menu.js +12 -12
- package/dist/components/split-button/split-button.js +11 -11
- package/dist/components/switch/api.js +101 -101
- package/dist/components/switch/config.js +20 -20
- package/dist/components/switch/constants.js +29 -29
- package/dist/components/switch/features.js +123 -123
- package/dist/components/switch/switch.js +13 -13
- package/dist/components/tabs/api.js +104 -104
- package/dist/components/tabs/config.js +20 -20
- package/dist/components/tabs/constants.js +40 -40
- package/dist/components/tabs/features.js +159 -159
- package/dist/components/tabs/indicator.js +151 -151
- package/dist/components/tabs/responsive.js +59 -59
- package/dist/components/tabs/tab.js +218 -218
- package/dist/components/tabs/tabs.js +27 -27
- package/dist/components/tabs/utils.js +121 -121
- package/dist/components/text-field/api.js +212 -212
- package/dist/components/text-field/config.js +30 -30
- package/dist/components/text-field/constants.js +54 -54
- package/dist/components/text-field/features/counter.js +51 -51
- package/dist/components/text-field/features/density.js +36 -36
- package/dist/components/text-field/features/error.js +55 -55
- package/dist/components/text-field/features/field.js +30 -30
- package/dist/components/text-field/features/leading-icon.js +52 -52
- package/dist/components/text-field/features/placement.js +146 -146
- package/dist/components/text-field/features/prefix-text.js +48 -48
- package/dist/components/text-field/features/required.js +48 -48
- package/dist/components/text-field/features/suffix-text.js +48 -48
- package/dist/components/text-field/features/supporting-text.js +85 -85
- package/dist/components/text-field/features/trailing-icon.js +88 -88
- package/dist/components/text-field/text-field.js +11 -11
- package/dist/components/timepicker/api.js +275 -275
- package/dist/components/timepicker/config.js +31 -31
- package/dist/components/timepicker/constants.js +52 -52
- package/dist/components/timepicker/dial.js +164 -164
- package/dist/components/timepicker/render.js +400 -400
- package/dist/components/timepicker/timepicker.js +40 -40
- package/dist/components/timepicker/types.js +8 -8
- package/dist/components/timepicker/utils.js +67 -67
- package/dist/components/toolbar/config.js +35 -35
- package/dist/components/toolbar/constants.js +17 -17
- package/dist/components/toolbar/toolbar.js +188 -188
- package/dist/components/tooltip/api.js +309 -309
- package/dist/components/tooltip/config.js +32 -32
- package/dist/components/tooltip/constants.js +38 -38
- package/dist/components/tooltip/tooltip.js +20 -20
- package/dist/components/tooltip/types.js +15 -15
- package/dist/components/top-app-bar/config.js +5 -5
- package/dist/components/top-app-bar/constants.js +25 -25
- package/dist/components/top-app-bar/top-app-bar.js +158 -158
- package/dist/core/canvas/animation.js +30 -30
- package/dist/core/canvas/drawing.js +52 -52
- package/dist/core/canvas/resize.js +47 -47
- package/dist/core/canvas/utils.js +101 -101
- package/dist/core/compose/base.js +5 -5
- package/dist/core/compose/cleanup.js +47 -47
- package/dist/core/compose/component.js +132 -132
- package/dist/core/compose/features/badge.js +56 -56
- package/dist/core/compose/features/checkable.js +37 -37
- package/dist/core/compose/features/constants.js +1 -1
- package/dist/core/compose/features/debounce.js +39 -39
- package/dist/core/compose/features/disabled.js +61 -61
- package/dist/core/compose/features/events.js +19 -19
- package/dist/core/compose/features/icon.js +66 -66
- package/dist/core/compose/features/input.js +63 -63
- package/dist/core/compose/features/lifecycle.js +71 -71
- package/dist/core/compose/features/position.js +31 -31
- package/dist/core/compose/features/ripple.js +76 -76
- package/dist/core/compose/features/size.js +5 -5
- package/dist/core/compose/features/style.js +7 -7
- package/dist/core/compose/features/text.js +49 -49
- package/dist/core/compose/features/textinput.js +164 -164
- package/dist/core/compose/features/textlabel.js +47 -47
- package/dist/core/compose/features/throttle.js +39 -39
- package/dist/core/compose/features/track.js +24 -24
- package/dist/core/compose/features/variant.js +5 -5
- package/dist/core/compose/features/withEvents.js +48 -48
- package/dist/core/compose/pipe.js +4 -4
- package/dist/core/compose/utils/type-guards.js +6 -6
- package/dist/core/config/component.js +54 -54
- package/dist/core/config/global.js +6 -6
- package/dist/core/config.js +9 -9
- package/dist/core/dom/attributes.js +38 -38
- package/dist/core/dom/classes.js +74 -74
- package/dist/core/dom/create.js +133 -133
- package/dist/core/dom/direction.js +28 -28
- package/dist/core/dom/events.js +80 -80
- package/dist/core/dom/focus.js +38 -38
- package/dist/core/dom/form-value.js +10 -10
- package/dist/core/dom/html.js +7 -7
- package/dist/core/dom/layer.js +134 -134
- package/dist/core/dom/roving.js +69 -69
- package/dist/core/dom/utils.js +38 -38
- package/dist/core/navigation/destinations.js +103 -103
- package/dist/core/navigation/ripple.js +39 -39
- package/dist/core/shapes/cubic.js +55 -55
- package/dist/core/shapes/material.js +164 -164
- package/dist/core/shapes/polygon.js +198 -198
- package/dist/core/state/emitter.js +29 -29
- package/dist/core/state/events.js +30 -30
- package/dist/core/state/store.js +55 -55
- package/dist/core/theme/tokens.js +28 -28
- package/dist/core/utils/attributes.js +8 -8
- package/dist/core/utils/background.js +29 -29
- package/dist/core/utils/color.js +21 -21
- package/dist/core/utils/mobile.js +28 -28
- package/dist/core/utils/object.js +17 -17
- package/dist/core/utils/performance.js +111 -111
- package/dist/core/utils/theme.js +49 -49
- package/dist/core/utils/url.js +0 -0
- package/dist/core/utils/warn.js +14 -14
- package/dist/elements/adapter.js +51 -51
- package/dist/elements/badge.js +23 -23
- package/dist/elements/bottom-app-bar.js +32 -32
- package/dist/elements/bottom-sheet.js +81 -81
- package/dist/elements/button-group.js +151 -151
- package/dist/elements/button.js +40 -40
- package/dist/elements/card.js +89 -89
- package/dist/elements/carousel.js +101 -101
- package/dist/elements/checkbox.js +44 -44
- package/dist/elements/chips.js +185 -185
- package/dist/elements/datepicker.js +101 -101
- package/dist/elements/define.js +571 -571
- package/dist/elements/dialog.js +134 -134
- package/dist/elements/divider.js +16 -16
- package/dist/elements/drawer.js +118 -118
- package/dist/elements/extended-fab.js +29 -29
- package/dist/elements/fab-menu.js +58 -58
- package/dist/elements/fab.js +18 -18
- package/dist/elements/form-button.js +14 -14
- package/dist/elements/icon-button.js +42 -42
- package/dist/elements/index.js +87 -87
- package/dist/elements/lifecycle.js +8 -8
- package/dist/elements/list.js +162 -162
- package/dist/elements/loading-indicator.js +19 -19
- package/dist/elements/menu.js +169 -169
- package/dist/elements/navigation-bar.js +58 -58
- package/dist/elements/navigation-rail.js +110 -110
- package/dist/elements/preupgrade/badge.css +1 -1
- package/dist/elements/preupgrade/bottom-app-bar.css +1 -1
- package/dist/elements/preupgrade/bottom-sheet.css +1 -1
- package/dist/elements/preupgrade/button-group.css +1 -1
- package/dist/elements/preupgrade/button.css +1 -1
- package/dist/elements/preupgrade/card.css +1 -1
- package/dist/elements/preupgrade/carousel.css +1 -1
- package/dist/elements/preupgrade/checkbox.css +1 -1
- package/dist/elements/preupgrade/chips.css +1 -1
- package/dist/elements/preupgrade/datepicker.css +1 -1
- package/dist/elements/preupgrade/dialog.css +1 -1
- package/dist/elements/preupgrade/divider.css +1 -1
- package/dist/elements/preupgrade/drawer.css +1 -1
- package/dist/elements/preupgrade/extended-fab.css +1 -1
- package/dist/elements/preupgrade/fab-menu.css +1 -1
- package/dist/elements/preupgrade/fab.css +1 -1
- package/dist/elements/preupgrade/icon-button.css +1 -1
- package/dist/elements/preupgrade/list.css +1 -1
- package/dist/elements/preupgrade/loading-indicator.css +1 -1
- package/dist/elements/preupgrade/menu.css +1 -1
- package/dist/elements/preupgrade/navigation-bar.css +1 -1
- package/dist/elements/preupgrade/navigation-rail.css +1 -1
- package/dist/elements/preupgrade/progress.css +1 -1
- package/dist/elements/preupgrade/radios.css +1 -1
- package/dist/elements/preupgrade/search.css +1 -1
- package/dist/elements/preupgrade/select.css +1 -1
- package/dist/elements/preupgrade/side-sheet.css +1 -1
- package/dist/elements/preupgrade/slider.css +1 -1
- package/dist/elements/preupgrade/snackbar.css +1 -1
- package/dist/elements/preupgrade/split-button.css +1 -1
- package/dist/elements/preupgrade/switch.css +1 -1
- package/dist/elements/preupgrade/tabs.css +1 -1
- package/dist/elements/preupgrade/text-field.css +1 -1
- package/dist/elements/preupgrade/timepicker.css +1 -1
- package/dist/elements/preupgrade/toolbar.css +1 -1
- package/dist/elements/preupgrade/tooltip.css +1 -1
- package/dist/elements/preupgrade/top-app-bar.css +1 -1
- package/dist/elements/preupgrade.css +1 -1
- package/dist/elements/preupgrade.js +0 -1
- package/dist/elements/progress.js +32 -32
- package/dist/elements/radios.js +105 -105
- package/dist/elements/search.js +189 -189
- package/dist/elements/select.js +124 -124
- package/dist/elements/sheet.js +49 -49
- package/dist/elements/side-sheet.js +53 -53
- package/dist/elements/slider.js +117 -117
- package/dist/elements/snackbar.js +45 -45
- package/dist/elements/split-button.js +82 -82
- package/dist/elements/styles.js +27 -27
- package/dist/elements/switch.js +43 -43
- package/dist/elements/tabs.js +96 -96
- package/dist/elements/text-field.js +117 -117
- package/dist/elements/timepicker.js +142 -142
- package/dist/elements/toolbar.js +63 -63
- package/dist/elements/tooltip.js +111 -111
- package/dist/elements/top-app-bar.js +75 -75
- package/dist/package.json +1 -1
- package/dist/react/create.js +113 -113
- package/dist/react/shadow.js +8 -8
- package/dist/solid/create.js +122 -122
- package/dist/solid/shadow.js +6 -6
- package/dist/ssr/index.js +17 -17
- package/dist/ssr/react.js +2 -310
- package/dist/ssr/solid.js +1 -16
- package/dist/ssr/svelte.js +1 -73
- package/dist/ssr/vue.js +1 -71
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base.css +1 -1
- package/dist/styles/bottom-app-bar.css +1 -1
- package/dist/styles/bottom-sheet.css +1 -1
- package/dist/styles/button-group.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chips.css +1 -1
- package/dist/styles/contrast.css +1 -1
- package/dist/styles/datepicker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +1 -1
- package/dist/styles/fab-menu.css +1 -1
- package/dist/styles/fab.css +1 -1
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/navigation-bar.css +1 -1
- package/dist/styles/navigation-rail.css +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-sheet.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/timepicker.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/themes/autumn-contrast.css +1 -1
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline-contrast.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige-contrast.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/content-contrast.css +1 -1
- package/dist/themes/content.css +1 -1
- package/dist/themes/desert-contrast.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/expressive-contrast.css +1 -1
- package/dist/themes/expressive.css +1 -1
- package/dist/themes/fidelity-contrast.css +1 -1
- package/dist/themes/fidelity.css +1 -1
- package/dist/themes/forest-contrast.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/fruit-salad-contrast.css +1 -1
- package/dist/themes/fruit-salad.css +1 -1
- package/dist/themes/highcontrast-contrast.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/monochrome-contrast.css +1 -1
- package/dist/themes/monochrome.css +1 -1
- package/dist/themes/neutral-contrast.css +1 -1
- package/dist/themes/neutral.css +1 -1
- package/dist/themes/ocean-contrast.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/rainbow-contrast.css +1 -1
- package/dist/themes/rainbow.css +1 -1
- package/dist/themes/sageivory-contrast.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring-contrast.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer-contrast.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset-contrast.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel-contrast.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/vibrant-contrast.css +1 -1
- package/dist/themes/vibrant.css +1 -1
- package/dist/vue/create.js +123 -123
- package/dist/vue/shadow.js +6 -6
- package/package.json +1 -1
|
@@ -1,75 +1,75 @@
|
|
|
1
1
|
import { createComponentConfig, createElementConfig, } from "../../core/config/component.js";
|
|
2
2
|
import { EXTENDED_FAB_CLASSES } from "./constants.js";
|
|
3
3
|
export const defaultConfig = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
variant: "primary-container",
|
|
5
|
+
type: "button",
|
|
6
|
+
ripple: true,
|
|
7
|
+
iconPosition: "start",
|
|
8
|
+
width: "fixed",
|
|
9
|
+
size: "small",
|
|
10
10
|
};
|
|
11
11
|
export const createBaseConfig = (config = {}) => createComponentConfig(defaultConfig, config, "extended-fab");
|
|
12
12
|
export const getElementConfig = (config) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
13
|
+
const attributes = {
|
|
14
|
+
type: config.type || "button",
|
|
15
|
+
"aria-label": config.ariaLabel,
|
|
16
|
+
};
|
|
17
|
+
if (config.value !== undefined) {
|
|
18
|
+
attributes.value = config.value;
|
|
19
|
+
}
|
|
20
|
+
const classNames = [`${config.prefix}-extended-fab`];
|
|
21
|
+
if (config.variant) {
|
|
22
|
+
classNames.push(`${config.prefix}-extended-fab--${config.variant}`);
|
|
23
|
+
}
|
|
24
|
+
classNames.push(`${config.prefix}-extended-fab--${config.size || "small"}`);
|
|
25
|
+
if (config.iconPosition === "end") {
|
|
26
|
+
classNames.push(`${config.prefix}-${EXTENDED_FAB_CLASSES.ICON_END}`);
|
|
27
|
+
}
|
|
28
|
+
if (config.width) {
|
|
29
|
+
classNames.push(`${config.prefix}-extended-fab--${config.width}`);
|
|
30
|
+
}
|
|
31
|
+
if (config.animate) {
|
|
32
|
+
classNames.push(`${config.prefix}-extended-fab--animate-enter`);
|
|
33
|
+
}
|
|
34
|
+
const position = config.placement === undefined ? config.position : config.placement === "none" ? undefined : config.placement;
|
|
35
|
+
if (position) {
|
|
36
|
+
classNames.push(`${config.prefix}-extended-fab--${position}`);
|
|
37
|
+
}
|
|
38
|
+
if (config.collapseOnScroll) {
|
|
39
|
+
classNames.push(`${config.prefix}-extended-fab--collapsible`);
|
|
40
|
+
}
|
|
41
|
+
if (config.class) {
|
|
42
|
+
classNames.push(config.class);
|
|
43
|
+
}
|
|
44
|
+
if (config.disabled === true) {
|
|
45
|
+
attributes.disabled = true;
|
|
46
|
+
classNames.push(`${config.prefix}-extended-fab--disabled`);
|
|
47
|
+
}
|
|
48
|
+
return createElementConfig(config, {
|
|
49
|
+
tag: "button",
|
|
50
|
+
attributes,
|
|
51
|
+
className: classNames,
|
|
52
|
+
forwardEvents: {
|
|
53
|
+
click: (component) => !component.element.disabled,
|
|
54
|
+
focus: true,
|
|
55
|
+
blur: true,
|
|
56
|
+
},
|
|
57
|
+
interactive: true,
|
|
58
|
+
});
|
|
59
59
|
};
|
|
60
60
|
export const getApiConfig = (comp) => ({
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
61
|
+
disabled: {
|
|
62
|
+
enable: () => comp.disabled.enable(),
|
|
63
|
+
disable: () => comp.disabled.disable(),
|
|
64
|
+
isDisabled: () => comp.disabled.isDisabled(),
|
|
65
|
+
},
|
|
66
|
+
lifecycle: {
|
|
67
|
+
destroy: () => comp.lifecycle.destroy(),
|
|
68
|
+
},
|
|
69
|
+
className: comp.getClass("extended-fab"),
|
|
70
|
+
text: {
|
|
71
|
+
setText: (text) => comp.text.setText(text),
|
|
72
|
+
getText: () => comp.text.getText(),
|
|
73
|
+
},
|
|
74
74
|
});
|
|
75
75
|
export default defaultConfig;
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
export const EXTENDED_FAB_VARIANTS = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
PRIMARY_CONTAINER: 'primary-container',
|
|
3
|
+
SECONDARY_CONTAINER: 'secondary-container',
|
|
4
|
+
TERTIARY_CONTAINER: 'tertiary-container',
|
|
5
|
+
PRIMARY: 'primary',
|
|
6
|
+
SECONDARY: 'secondary',
|
|
7
|
+
TERTIARY: 'tertiary'
|
|
8
8
|
};
|
|
9
9
|
export const EXTENDED_FAB_SIZES = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
SMALL: 'small',
|
|
11
|
+
MEDIUM: 'medium',
|
|
12
|
+
LARGE: 'large'
|
|
13
13
|
};
|
|
14
14
|
export const EXTENDED_FAB_WIDTH = {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
FIXED: 'fixed',
|
|
16
|
+
FLUID: 'fluid'
|
|
17
17
|
};
|
|
18
18
|
export const EXTENDED_FAB_POSITIONS = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
TOP_RIGHT: 'top-right',
|
|
20
|
+
TOP_LEFT: 'top-left',
|
|
21
|
+
BOTTOM_RIGHT: 'bottom-right',
|
|
22
|
+
BOTTOM_LEFT: 'bottom-left'
|
|
23
23
|
};
|
|
24
24
|
export const EXTENDED_FAB_ICON_POSITIONS = {
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
START: 'start',
|
|
26
|
+
END: 'end'
|
|
27
27
|
};
|
|
28
28
|
export const EXTENDED_FAB_CLASSES = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
ROOT: 'extended-fab',
|
|
30
|
+
ICON: 'extended-fab__icon',
|
|
31
|
+
TEXT: 'extended-fab__text',
|
|
32
|
+
FIXED: 'extended-fab--fixed',
|
|
33
|
+
FLUID: 'extended-fab--fluid',
|
|
34
|
+
LOWERED: 'extended-fab--lowered',
|
|
35
|
+
COLLAPSED: 'extended-fab--collapsed',
|
|
36
|
+
ICON_END: 'extended-fab--icon-end'
|
|
37
37
|
};
|
|
38
38
|
export const EXTENDED_FAB_TYPES = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
BUTTON: 'button',
|
|
40
|
+
SUBMIT: 'submit',
|
|
41
|
+
RESET: 'reset'
|
|
42
42
|
};
|
|
43
43
|
export const EXTENDED_FAB_ANIMATIONS = {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
ENTRANCE_DURATION: 250,
|
|
45
|
+
COLLAPSE_DURATION: 200
|
|
46
46
|
};
|
|
@@ -4,56 +4,56 @@ import { withEvents, withIcon, withVariant, withRipple, withDisabled, withLifecy
|
|
|
4
4
|
import { withAPI } from "./api.js";
|
|
5
5
|
import { createBaseConfig, getElementConfig, getApiConfig } from "./config.js";
|
|
6
6
|
const createExtendedFab = (config = {}) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
7
|
+
const fabConfig = createBaseConfig(config);
|
|
8
|
+
const setupScrollCollapse = (component) => {
|
|
9
|
+
if (fabConfig.collapseOnScroll) {
|
|
10
|
+
let lastScrollY = window.scrollY;
|
|
11
|
+
let ticking = false;
|
|
12
|
+
const scrollThreshold = 10;
|
|
13
|
+
const handleScroll = () => {
|
|
14
|
+
if (!ticking) {
|
|
15
|
+
window.requestAnimationFrame(() => {
|
|
16
|
+
const currentScrollY = window.scrollY;
|
|
17
|
+
const scrollDelta = currentScrollY - lastScrollY;
|
|
18
|
+
if (scrollDelta > scrollThreshold) {
|
|
19
|
+
component.collapse();
|
|
20
|
+
}
|
|
21
|
+
else if (scrollDelta < -scrollThreshold) {
|
|
22
|
+
component.expand();
|
|
23
|
+
}
|
|
24
|
+
if (currentScrollY <= 0) {
|
|
25
|
+
component.expand();
|
|
26
|
+
}
|
|
27
|
+
lastScrollY = currentScrollY;
|
|
28
|
+
ticking = false;
|
|
29
|
+
});
|
|
30
|
+
ticking = true;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
window.addEventListener('scroll', handleScroll, { passive: true });
|
|
34
|
+
requestAnimationFrame(() => {
|
|
35
|
+
component.expand();
|
|
36
|
+
});
|
|
37
|
+
const originalDestroy = component.destroy;
|
|
38
|
+
component.destroy = () => {
|
|
39
|
+
window.removeEventListener('scroll', handleScroll);
|
|
40
|
+
originalDestroy.call(component);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
try {
|
|
45
|
+
const extendedFab = pipe(createBase, withEvents(), withElement(getElementConfig(fabConfig)), withVariant(fabConfig), withIcon(fabConfig), component => withText({
|
|
46
|
+
...fabConfig,
|
|
47
|
+
beforeElement: fabConfig.iconPosition === 'end'
|
|
48
|
+
? component.icon.getElement() ?? undefined
|
|
49
|
+
: undefined,
|
|
50
|
+
})(component), withDisabled(fabConfig), withRipple(fabConfig), withLifecycle(), comp => withAPI(getApiConfig(comp))(comp))(fabConfig);
|
|
51
|
+
setupScrollCollapse(extendedFab);
|
|
52
|
+
return extendedFab;
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
console.error('Extended FAB creation error:', error);
|
|
56
|
+
throw new Error(`Failed to create Extended FAB: ${error.message}`);
|
|
57
|
+
}
|
|
58
58
|
};
|
|
59
59
|
export default createExtendedFab;
|
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
export const withAPI = ({ disabled, lifecycle, className }) => (component) => ({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
2
|
+
...component,
|
|
3
|
+
element: component.element,
|
|
4
|
+
getValue: () => component.element.value,
|
|
5
|
+
setValue(value) {
|
|
6
|
+
component.element.value = value;
|
|
7
|
+
return this;
|
|
8
|
+
},
|
|
9
|
+
enable() {
|
|
10
|
+
disabled.enable();
|
|
11
|
+
return this;
|
|
12
|
+
},
|
|
13
|
+
isDisabled() {
|
|
14
|
+
return disabled.isDisabled();
|
|
15
|
+
},
|
|
16
|
+
disable() {
|
|
17
|
+
disabled.disable();
|
|
18
|
+
return this;
|
|
19
|
+
},
|
|
20
|
+
setIcon(icon) {
|
|
21
|
+
component.icon.setIcon(icon);
|
|
22
|
+
return this;
|
|
23
|
+
},
|
|
24
|
+
getIcon() {
|
|
25
|
+
return component.icon.getIcon();
|
|
26
|
+
},
|
|
27
|
+
setPosition(position) {
|
|
28
|
+
const positions = ['top-right', 'top-left', 'bottom-right', 'bottom-left'];
|
|
29
|
+
positions.forEach(pos => {
|
|
30
|
+
component.element.classList.remove(`${className}--${pos}`);
|
|
31
|
+
});
|
|
32
|
+
component.element.classList.add(`${className}--${position}`);
|
|
33
|
+
return this;
|
|
34
|
+
},
|
|
35
|
+
getPosition() {
|
|
36
|
+
const positions = ['top-right', 'top-left', 'bottom-right', 'bottom-left'];
|
|
37
|
+
for (const pos of positions) {
|
|
38
|
+
if (component.element.classList.contains(`${className}--${pos}`)) {
|
|
39
|
+
return pos;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
},
|
|
44
|
+
lower() {
|
|
45
|
+
component.element.classList.add(`${className}--lowered`);
|
|
46
|
+
return this;
|
|
47
|
+
},
|
|
48
|
+
raise() {
|
|
49
|
+
component.element.classList.remove(`${className}--lowered`);
|
|
50
|
+
return this;
|
|
51
|
+
},
|
|
52
|
+
on(event, handler) {
|
|
53
|
+
component.on(event, handler);
|
|
54
|
+
return this;
|
|
55
|
+
},
|
|
56
|
+
off(event, handler) {
|
|
57
|
+
component.off(event, handler);
|
|
58
|
+
return this;
|
|
59
|
+
},
|
|
60
|
+
addClass(...classes) {
|
|
61
|
+
component.addClass(...classes);
|
|
62
|
+
return this;
|
|
63
|
+
},
|
|
64
|
+
destroy() {
|
|
65
|
+
lifecycle.destroy();
|
|
66
|
+
}
|
|
67
67
|
});
|
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
import { PREFIX } from "../../core/config.js";
|
|
2
2
|
import { createComponentConfig, createElementConfig, } from "../../core/config/component.js";
|
|
3
3
|
export const defaultConfig = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
variant: "primary-container",
|
|
5
|
+
size: "default",
|
|
6
|
+
type: "button",
|
|
7
|
+
ripple: true,
|
|
8
8
|
};
|
|
9
9
|
export const createBaseConfig = (config) => createComponentConfig(defaultConfig, config, "fab");
|
|
10
10
|
export const getElementConfig = (config) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
11
|
+
const attributes = {
|
|
12
|
+
type: config.type || "button",
|
|
13
|
+
"aria-label": config.ariaLabel,
|
|
14
|
+
};
|
|
15
|
+
if (config.value !== undefined) {
|
|
16
|
+
attributes.value = config.value;
|
|
17
|
+
}
|
|
18
|
+
if (config.disabled === true) {
|
|
19
|
+
attributes.disabled = true;
|
|
20
|
+
}
|
|
21
|
+
const componentClasses = [];
|
|
22
|
+
componentClasses.push(`${PREFIX}-fab--${config.size || "default"}`);
|
|
23
|
+
if (config.animate) {
|
|
24
|
+
componentClasses.push(`${PREFIX}-fab--animate-enter`);
|
|
25
|
+
}
|
|
26
|
+
const position = config.placement === undefined ? config.position : config.placement === "none" ? undefined : config.placement;
|
|
27
|
+
if (position) {
|
|
28
|
+
componentClasses.push(`${PREFIX}-fab--${position}`);
|
|
29
|
+
}
|
|
30
|
+
if (config.disabled === true) {
|
|
31
|
+
componentClasses.push(`${PREFIX}-fab--disabled`);
|
|
32
|
+
}
|
|
33
|
+
return createElementConfig(config, {
|
|
34
|
+
tag: "button",
|
|
35
|
+
attributes,
|
|
36
|
+
className: componentClasses,
|
|
37
|
+
forwardEvents: {
|
|
38
|
+
click: (component) => !component.element.disabled,
|
|
39
|
+
focus: true,
|
|
40
|
+
blur: true,
|
|
41
|
+
},
|
|
42
|
+
interactive: true,
|
|
43
|
+
});
|
|
44
44
|
};
|
|
45
45
|
export const getApiConfig = (comp) => ({
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
disabled: {
|
|
47
|
+
enable: () => comp.disabled.enable(),
|
|
48
|
+
disable: () => comp.disabled.disable(),
|
|
49
|
+
isDisabled: () => comp.disabled.isDisabled(),
|
|
50
|
+
},
|
|
51
|
+
lifecycle: {
|
|
52
|
+
destroy: () => comp.lifecycle.destroy(),
|
|
53
|
+
},
|
|
54
|
+
className: comp.getClass("fab"),
|
|
55
55
|
});
|
|
56
56
|
export default defaultConfig;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
export const FAB_VARIANTS = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
PRIMARY_CONTAINER: 'primary-container',
|
|
3
|
+
SECONDARY_CONTAINER: 'secondary-container',
|
|
4
|
+
TERTIARY_CONTAINER: 'tertiary-container',
|
|
5
|
+
PRIMARY: 'primary',
|
|
6
|
+
SECONDARY: 'secondary',
|
|
7
|
+
TERTIARY: 'tertiary'
|
|
8
8
|
};
|
|
9
9
|
export const FAB_SIZES = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
DEFAULT: 'default',
|
|
11
|
+
MEDIUM: 'medium',
|
|
12
|
+
LARGE: 'large'
|
|
13
13
|
};
|
|
14
14
|
export const FAB_POSITIONS = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
TOP_RIGHT: 'top-right',
|
|
16
|
+
TOP_LEFT: 'top-left',
|
|
17
|
+
BOTTOM_RIGHT: 'bottom-right',
|
|
18
|
+
BOTTOM_LEFT: 'bottom-left'
|
|
19
19
|
};
|
|
20
20
|
export const FAB_CLASSES = {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
ROOT: 'fab',
|
|
22
|
+
ICON: 'fab__icon',
|
|
23
|
+
LOWERED: 'fab--lowered',
|
|
24
|
+
MEDIUM: 'fab--medium',
|
|
25
|
+
LARGE: 'fab--large'
|
|
26
26
|
};
|
|
27
27
|
export const FAB_TYPES = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
BUTTON: 'button',
|
|
29
|
+
SUBMIT: 'submit',
|
|
30
|
+
RESET: 'reset'
|
|
31
31
|
};
|
|
32
32
|
export const FAB_ICON_SIZES = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
DEFAULT: '24px',
|
|
34
|
+
MEDIUM: '28px',
|
|
35
|
+
LARGE: '32px'
|
|
36
36
|
};
|
|
37
37
|
export const FAB_ANIMATIONS = {
|
|
38
|
-
|
|
38
|
+
ENTRANCE_DURATION: 250
|
|
39
39
|
};
|
|
@@ -4,14 +4,14 @@ import { withEvents, withIcon, withVariant, withRipple, withDisabled, withLifecy
|
|
|
4
4
|
import { withAPI } from "./api.js";
|
|
5
5
|
import { createBaseConfig, getElementConfig, getApiConfig } from "./config.js";
|
|
6
6
|
const createFab = (config) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
const fabConfig = createBaseConfig(config);
|
|
8
|
+
try {
|
|
9
|
+
const fab = pipe(createBase, withEvents(), withElement(getElementConfig(fabConfig)), withVariant(fabConfig), withIcon(fabConfig), withDisabled(fabConfig), withRipple(fabConfig), withLifecycle(), comp => withAPI(getApiConfig(comp))(comp))(fabConfig);
|
|
10
|
+
return fab;
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
console.error('FAB creation error:', error);
|
|
14
|
+
throw new Error(`Failed to create FAB: ${error.message}`);
|
|
15
|
+
}
|
|
16
16
|
};
|
|
17
17
|
export default createFab;
|