@shortfuse/materialdesignweb 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -24
- package/bin/mdw-css.js +1 -1
- package/components/Badge.js +12 -5
- package/components/Body.js +3 -0
- package/components/BottomAppBar.js +1 -8
- package/components/BottomSheet.js +424 -0
- package/components/Box.js +11 -49
- package/components/Button.js +61 -82
- package/components/Card.js +56 -61
- package/components/Checkbox.js +7 -25
- package/components/CheckboxIcon.js +10 -28
- package/components/Chip.js +13 -11
- package/components/Dialog.js +49 -98
- package/components/Display.js +55 -0
- package/components/Fab.js +83 -17
- package/components/FabContainer.js +48 -0
- package/components/FilterChip.js +34 -32
- package/components/Grid.js +176 -0
- package/components/Headline.js +5 -28
- package/components/Icon.js +54 -69
- package/components/IconButton.js +71 -120
- package/components/Input.js +669 -83
- package/components/InputChip.js +161 -0
- package/components/Label.js +3 -0
- package/components/List.js +1 -5
- package/components/ListItem.js +39 -23
- package/components/ListOption.js +79 -62
- package/components/Listbox.js +19 -10
- package/components/Menu.js +8 -18
- package/components/MenuItem.js +25 -26
- package/components/NavBar.js +53 -19
- package/components/NavDrawer.js +15 -15
- package/components/NavDrawerItem.js +2 -4
- package/components/NavItem.js +40 -33
- package/components/NavRail.js +23 -21
- package/components/NavRailItem.js +5 -2
- package/components/Page.js +105 -0
- package/components/Pane.js +18 -0
- package/components/Popup.js +17 -8
- package/components/Radio.js +2 -5
- package/components/RadioIcon.js +10 -14
- package/components/Ripple.js +11 -7
- package/components/Root.js +209 -0
- package/components/Scrim.js +87 -0
- package/components/Search.js +12 -20
- package/components/SegmentedButton.js +33 -36
- package/components/SegmentedButtonGroup.js +9 -3
- package/components/Select.js +6 -7
- package/components/Shape.js +5 -65
- package/components/SideSheet.js +308 -0
- package/components/Slider.js +71 -34
- package/components/Snackbar.js +22 -16
- package/components/SnackbarContainer.js +42 -0
- package/components/Surface.js +15 -10
- package/components/Switch.js +3 -16
- package/components/SwitchIcon.js +40 -32
- package/components/Tab.js +57 -38
- package/components/TabContent.js +1 -0
- package/components/TabList.js +60 -32
- package/components/TabPanel.js +1 -1
- package/components/Table.js +116 -0
- package/components/TextArea.js +16 -15
- package/components/Title.js +4 -9
- package/components/Tooltip.js +43 -21
- package/components/TopAppBar.js +56 -78
- package/constants/shapes.js +36 -0
- package/constants/typography.js +127 -0
- package/core/Composition.js +354 -192
- package/core/CompositionAdapter.js +11 -12
- package/core/CustomElement.js +588 -236
- package/core/css.js +117 -12
- package/core/customTypes.js +120 -25
- package/core/dom.js +17 -11
- package/core/jsonMergePatch.js +12 -10
- package/core/observe.js +298 -253
- package/core/optimizations.js +9 -9
- package/core/template.js +14 -57
- package/dist/index.min.js +85 -115
- package/dist/index.min.js.map +4 -4
- package/dist/meta.json +1 -1
- package/dom/HTMLOptionsCollectionProxy.js +106 -0
- package/{theming/themableMixinLoader.js → loaders/palette.js} +4 -3
- package/loaders/theme.js +12 -0
- package/mixins/AriaReflectorMixin.js +53 -13
- package/mixins/AriaToolbarMixin.js +3 -0
- package/mixins/ControlMixin.js +76 -33
- package/mixins/DelegatesFocusMixin.js +54 -0
- package/mixins/DensityMixin.js +2 -2
- package/mixins/ElevationMixin.js +62 -0
- package/mixins/FlexableMixin.js +66 -37
- package/mixins/FormAssociatedMixin.js +60 -8
- package/mixins/HyperlinkMixin.js +66 -0
- package/mixins/InputMixin.js +205 -32
- package/mixins/KeyboardNavMixin.js +8 -6
- package/mixins/NavigationListenerMixin.js +33 -0
- package/mixins/PopupMixin.js +176 -208
- package/mixins/ResizeObserverMixin.js +16 -4
- package/mixins/RippleMixin.js +8 -6
- package/mixins/ScrollListenerMixin.js +1 -1
- package/mixins/SemiStickyMixin.js +44 -98
- package/mixins/ShapeMaskedMixin.js +117 -0
- package/mixins/ShapeMixin.js +22 -204
- package/mixins/StateMixin.js +70 -34
- package/mixins/TextFieldMixin.js +107 -143
- package/mixins/ThemableMixin.js +44 -56
- package/mixins/TooltipTriggerMixin.js +291 -359
- package/mixins/TouchTargetMixin.js +1 -1
- package/mixins/TypographyMixin.js +121 -0
- package/package.json +110 -74
- package/services/rtl.js +10 -0
- package/services/svgAlias.js +17 -0
- package/{theming/index.js → services/theme.js} +24 -174
- package/types/bin/mdw-css.d.ts +3 -0
- package/types/bin/mdw-css.d.ts.map +1 -0
- package/types/components/Badge.d.ts +39 -0
- package/types/components/Badge.d.ts.map +1 -0
- package/types/components/Body.d.ts +29 -0
- package/types/components/Body.d.ts.map +1 -0
- package/types/components/BottomAppBar.d.ts +73 -0
- package/types/components/BottomAppBar.d.ts.map +1 -0
- package/types/components/BottomSheet.d.ts +109 -0
- package/types/components/BottomSheet.d.ts.map +1 -0
- package/types/components/Box.d.ts +16 -0
- package/types/components/Box.d.ts.map +1 -0
- package/types/components/Button.d.ts +714 -0
- package/types/components/Button.d.ts.map +1 -0
- package/types/components/Card.d.ts +412 -0
- package/types/components/Card.d.ts.map +1 -0
- package/types/components/Checkbox.d.ts +205 -0
- package/types/components/Checkbox.d.ts.map +1 -0
- package/types/components/CheckboxIcon.d.ts +44 -0
- package/types/components/CheckboxIcon.d.ts.map +1 -0
- package/types/components/Chip.d.ts +1425 -0
- package/types/components/Chip.d.ts.map +1 -0
- package/types/components/Dialog.d.ts +286 -0
- package/types/components/Dialog.d.ts.map +1 -0
- package/types/components/DialogActions.d.ts +4 -0
- package/types/components/DialogActions.d.ts.map +1 -0
- package/types/components/Display.d.ts +45 -0
- package/types/components/Display.d.ts.map +1 -0
- package/types/components/Divider.d.ts +10 -0
- package/types/components/Divider.d.ts.map +1 -0
- package/types/components/Fab.d.ts +741 -0
- package/types/components/Fab.d.ts.map +1 -0
- package/types/components/FabContainer.d.ts +10 -0
- package/types/components/FabContainer.d.ts.map +1 -0
- package/types/components/FilterChip.d.ts +4283 -0
- package/types/components/FilterChip.d.ts.map +1 -0
- package/types/components/Grid.d.ts +37 -0
- package/types/components/Grid.d.ts.map +1 -0
- package/types/components/Headline.d.ts +47 -0
- package/types/components/Headline.d.ts.map +1 -0
- package/types/components/Icon.d.ts +103 -0
- package/types/components/Icon.d.ts.map +1 -0
- package/types/components/IconButton.d.ts +1486 -0
- package/types/components/IconButton.d.ts.map +1 -0
- package/types/components/Input.d.ts +51288 -0
- package/types/components/Input.d.ts.map +1 -0
- package/types/components/InputChip.d.ts +243 -0
- package/types/components/InputChip.d.ts.map +1 -0
- package/types/components/Label.d.ts +29 -0
- package/types/components/Label.d.ts.map +1 -0
- package/types/components/List.d.ts +31 -0
- package/types/components/List.d.ts.map +1 -0
- package/types/components/ListItem.d.ts +349 -0
- package/types/components/ListItem.d.ts.map +1 -0
- package/types/components/ListOption.d.ts +1493 -0
- package/types/components/ListOption.d.ts.map +1 -0
- package/types/components/Listbox.d.ts +12012 -0
- package/types/components/Listbox.d.ts.map +1 -0
- package/types/components/Menu.d.ts +119 -0
- package/types/components/Menu.d.ts.map +1 -0
- package/types/components/MenuItem.d.ts +3109 -0
- package/types/components/MenuItem.d.ts.map +1 -0
- package/types/components/NavBar.d.ts +18 -0
- package/types/components/NavBar.d.ts.map +1 -0
- package/types/components/NavBarItem.d.ts +186 -0
- package/types/components/NavBarItem.d.ts.map +1 -0
- package/types/components/NavDrawer.d.ts +108 -0
- package/types/components/NavDrawer.d.ts.map +1 -0
- package/types/components/NavDrawerItem.d.ts +186 -0
- package/types/components/NavDrawerItem.d.ts.map +1 -0
- package/types/components/NavItem.d.ts +190 -0
- package/types/components/NavItem.d.ts.map +1 -0
- package/types/components/NavRail.d.ts +109 -0
- package/types/components/NavRail.d.ts.map +1 -0
- package/types/components/NavRailItem.d.ts +186 -0
- package/types/components/NavRailItem.d.ts.map +1 -0
- package/types/components/Page.d.ts +24 -0
- package/types/components/Page.d.ts.map +1 -0
- package/types/components/Pane.d.ts +44 -0
- package/types/components/Pane.d.ts.map +1 -0
- package/types/components/Popup.d.ts +76 -0
- package/types/components/Popup.d.ts.map +1 -0
- package/types/components/Progress.d.ts +19 -0
- package/types/components/Progress.d.ts.map +1 -0
- package/types/components/Radio.d.ts +199 -0
- package/types/components/Radio.d.ts.map +1 -0
- package/types/components/RadioIcon.d.ts +46 -0
- package/types/components/RadioIcon.d.ts.map +1 -0
- package/types/components/Ripple.d.ts +34 -0
- package/types/components/Ripple.d.ts.map +1 -0
- package/types/components/Root.d.ts +68 -0
- package/types/components/Root.d.ts.map +1 -0
- package/types/components/Scrim.d.ts +6 -0
- package/types/components/Scrim.d.ts.map +1 -0
- package/types/components/Search.d.ts +16 -0
- package/types/components/Search.d.ts.map +1 -0
- package/types/components/SegmentedButton.d.ts +718 -0
- package/types/components/SegmentedButton.d.ts.map +1 -0
- package/types/components/SegmentedButtonGroup.d.ts +44 -0
- package/types/components/SegmentedButtonGroup.d.ts.map +1 -0
- package/types/components/Select.d.ts +1361 -0
- package/types/components/Select.d.ts.map +1 -0
- package/types/components/Shape.d.ts +10 -0
- package/types/components/Shape.d.ts.map +1 -0
- package/types/components/SideSheet.d.ts +106 -0
- package/types/components/SideSheet.d.ts.map +1 -0
- package/types/components/Slider.d.ts +382 -0
- package/types/components/Slider.d.ts.map +1 -0
- package/types/components/Snackbar.d.ts +65 -0
- package/types/components/Snackbar.d.ts.map +1 -0
- package/types/components/SnackbarContainer.d.ts +6 -0
- package/types/components/SnackbarContainer.d.ts.map +1 -0
- package/types/components/Surface.d.ts +45 -0
- package/types/components/Surface.d.ts.map +1 -0
- package/types/components/Switch.d.ts +183 -0
- package/types/components/Switch.d.ts.map +1 -0
- package/types/components/SwitchIcon.d.ts +169 -0
- package/types/components/SwitchIcon.d.ts.map +1 -0
- package/types/components/Tab.d.ts +879 -0
- package/types/components/Tab.d.ts.map +1 -0
- package/types/components/TabContent.d.ts +122 -0
- package/types/components/TabContent.d.ts.map +1 -0
- package/types/components/TabList.d.ts +6266 -0
- package/types/components/TabList.d.ts.map +1 -0
- package/types/components/TabPanel.d.ts +28 -0
- package/types/components/TabPanel.d.ts.map +1 -0
- package/types/components/Table.d.ts +2 -0
- package/types/components/Table.d.ts.map +1 -0
- package/types/components/TextArea.d.ts +1394 -0
- package/types/components/TextArea.d.ts.map +1 -0
- package/types/components/Title.d.ts +47 -0
- package/types/components/Title.d.ts.map +1 -0
- package/types/components/Tooltip.d.ts +49 -0
- package/types/components/Tooltip.d.ts.map +1 -0
- package/types/components/TopAppBar.d.ts +130 -0
- package/types/components/TopAppBar.d.ts.map +1 -0
- package/types/constants/colorKeywords.d.ts +2 -0
- package/types/constants/colorKeywords.d.ts.map +1 -0
- package/types/constants/shapes.d.ts +38 -0
- package/types/constants/shapes.d.ts.map +1 -0
- package/types/constants/typography.d.ts +212 -0
- package/types/constants/typography.d.ts.map +1 -0
- package/types/core/Composition.d.ts +252 -0
- package/types/core/Composition.d.ts.map +1 -0
- package/types/core/CompositionAdapter.d.ts +92 -0
- package/types/core/CompositionAdapter.d.ts.map +1 -0
- package/types/core/CustomElement.d.ts +302 -0
- package/types/core/CustomElement.d.ts.map +1 -0
- package/types/core/css.d.ts +44 -0
- package/types/core/css.d.ts.map +1 -0
- package/types/core/customTypes.d.ts +26 -0
- package/types/core/customTypes.d.ts.map +1 -0
- package/types/core/dom.d.ts +32 -0
- package/types/core/dom.d.ts.map +1 -0
- package/types/core/jsonMergePatch.d.ts +31 -0
- package/types/core/jsonMergePatch.d.ts.map +1 -0
- package/types/core/observe.d.ts +113 -0
- package/types/core/observe.d.ts.map +1 -0
- package/types/core/optimizations.d.ts +7 -0
- package/types/core/optimizations.d.ts.map +1 -0
- package/types/core/template.d.ts +47 -0
- package/types/core/template.d.ts.map +1 -0
- package/types/core/uid.d.ts +6 -0
- package/types/core/uid.d.ts.map +1 -0
- package/types/dom/HTMLOptionsCollectionProxy.d.ts +18 -0
- package/types/dom/HTMLOptionsCollectionProxy.d.ts.map +1 -0
- package/types/index.d.ts +88 -0
- package/types/index.d.ts.map +1 -0
- package/types/loaders/palette.d.ts +2 -0
- package/types/loaders/palette.d.ts.map +1 -0
- package/types/loaders/theme.d.ts +2 -0
- package/types/loaders/theme.d.ts.map +1 -0
- package/types/mixins/AriaReflectorMixin.d.ts +23 -0
- package/types/mixins/AriaReflectorMixin.d.ts.map +1 -0
- package/types/mixins/AriaToolbarMixin.d.ts +32 -0
- package/types/mixins/AriaToolbarMixin.d.ts.map +1 -0
- package/types/mixins/ControlMixin.d.ts +124 -0
- package/types/mixins/ControlMixin.d.ts.map +1 -0
- package/types/mixins/DelegatesFocusMixin.d.ts +5 -0
- package/types/mixins/DelegatesFocusMixin.d.ts.map +1 -0
- package/types/mixins/DensityMixin.d.ts +5 -0
- package/types/mixins/DensityMixin.d.ts.map +1 -0
- package/types/mixins/ElevationMixin.d.ts +33 -0
- package/types/mixins/ElevationMixin.d.ts.map +1 -0
- package/types/mixins/FlexableMixin.d.ts +13 -0
- package/types/mixins/FlexableMixin.d.ts.map +1 -0
- package/types/mixins/FormAssociatedMixin.d.ts +122 -0
- package/types/mixins/FormAssociatedMixin.d.ts.map +1 -0
- package/types/mixins/HyperlinkMixin.d.ts +22 -0
- package/types/mixins/HyperlinkMixin.d.ts.map +1 -0
- package/types/mixins/InputMixin.d.ts +179 -0
- package/types/mixins/InputMixin.d.ts.map +1 -0
- package/types/mixins/KeyboardNavMixin.d.ts +47 -0
- package/types/mixins/KeyboardNavMixin.d.ts.map +1 -0
- package/types/mixins/NavigationListenerMixin.d.ts +8 -0
- package/types/mixins/NavigationListenerMixin.d.ts.map +1 -0
- package/types/mixins/PopupMixin.d.ts +82 -0
- package/types/mixins/PopupMixin.d.ts.map +1 -0
- package/types/mixins/RTLObserverMixin.d.ts +7 -0
- package/types/mixins/RTLObserverMixin.d.ts.map +1 -0
- package/types/mixins/ResizeObserverMixin.d.ts +12 -0
- package/types/mixins/ResizeObserverMixin.d.ts.map +1 -0
- package/types/mixins/RippleMixin.d.ts +92 -0
- package/types/mixins/RippleMixin.d.ts.map +1 -0
- package/types/mixins/ScrollListenerMixin.d.ts +41 -0
- package/types/mixins/ScrollListenerMixin.d.ts.map +1 -0
- package/types/mixins/SemiStickyMixin.d.ts +50 -0
- package/types/mixins/SemiStickyMixin.d.ts.map +1 -0
- package/types/mixins/ShapeMaskedMixin.d.ts +9 -0
- package/types/mixins/ShapeMaskedMixin.d.ts.map +1 -0
- package/types/mixins/ShapeMixin.d.ts +38 -0
- package/types/mixins/ShapeMixin.d.ts.map +1 -0
- package/types/mixins/StateMixin.d.ts +27 -0
- package/types/mixins/StateMixin.d.ts.map +1 -0
- package/types/mixins/TextFieldMixin.d.ts +1354 -0
- package/types/mixins/TextFieldMixin.d.ts.map +1 -0
- package/types/mixins/ThemableMixin.d.ts +9 -0
- package/types/mixins/ThemableMixin.d.ts.map +1 -0
- package/types/mixins/TooltipTriggerMixin.d.ts +106 -0
- package/types/mixins/TooltipTriggerMixin.d.ts.map +1 -0
- package/types/mixins/TouchTargetMixin.d.ts +3 -0
- package/types/mixins/TouchTargetMixin.d.ts.map +1 -0
- package/types/mixins/TypographyMixin.d.ts +17 -0
- package/types/mixins/TypographyMixin.d.ts.map +1 -0
- package/types/services/rtl.d.ts +3 -0
- package/types/services/rtl.d.ts.map +1 -0
- package/types/services/svgAlias.d.ts +13 -0
- package/types/services/svgAlias.d.ts.map +1 -0
- package/types/services/theme.d.ts +45 -0
- package/types/services/theme.d.ts.map +1 -0
- package/types/utils/cli.d.ts +3 -0
- package/types/utils/cli.d.ts.map +1 -0
- package/types/utils/function.d.ts +3 -0
- package/types/utils/function.d.ts.map +1 -0
- package/types/utils/jsx-runtime.d.ts +20 -0
- package/types/utils/jsx-runtime.d.ts.map +1 -0
- package/types/utils/material-color/blend.d.ts +34 -0
- package/types/utils/material-color/blend.d.ts.map +1 -0
- package/types/utils/material-color/hct/Cam16.d.ts +142 -0
- package/types/utils/material-color/hct/Cam16.d.ts.map +1 -0
- package/types/utils/material-color/hct/Hct.d.ts +93 -0
- package/types/utils/material-color/hct/Hct.d.ts.map +1 -0
- package/types/utils/material-color/hct/ViewingConditions.d.ts +69 -0
- package/types/utils/material-color/hct/ViewingConditions.d.ts.map +1 -0
- package/types/utils/material-color/hct/hctSolver.d.ts +30 -0
- package/types/utils/material-color/hct/hctSolver.d.ts.map +1 -0
- package/types/utils/material-color/helper.d.ts +8 -0
- package/types/utils/material-color/helper.d.ts.map +1 -0
- package/types/utils/material-color/palettes/CorePalette.d.ts +75 -0
- package/types/utils/material-color/palettes/CorePalette.d.ts.map +1 -0
- package/types/utils/material-color/palettes/TonalPalette.d.ts +38 -0
- package/types/utils/material-color/palettes/TonalPalette.d.ts.map +1 -0
- package/types/utils/material-color/scheme/Scheme.d.ts +264 -0
- package/types/utils/material-color/scheme/Scheme.d.ts.map +1 -0
- package/types/utils/material-color/utils/color.d.ts +172 -0
- package/types/utils/material-color/utils/color.d.ts.map +1 -0
- package/types/utils/material-color/utils/math.d.ts +94 -0
- package/types/utils/material-color/utils/math.d.ts.map +1 -0
- package/types/utils/pixelmatch.d.ts +22 -0
- package/types/utils/pixelmatch.d.ts.map +1 -0
- package/types/utils/popup.d.ts +106 -0
- package/types/utils/popup.d.ts.map +1 -0
- package/types/utils/searchParams.d.ts +3 -0
- package/types/utils/searchParams.d.ts.map +1 -0
- package/types/utils/svg.d.ts +7 -0
- package/types/utils/svg.d.ts.map +1 -0
- package/utils/material-color/scheme/Scheme.js +1 -1
- package/utils/pixelmatch.js +360 -0
- package/utils/popup.js +86 -10
- package/utils/searchParams.js +19 -0
- package/components/ExtendedFab.js +0 -32
- package/components/Layout.js +0 -504
- package/components/Nav.js +0 -38
- package/core/DomAdapter.js +0 -586
- package/core/ICustomElement.d.ts +0 -291
- package/core/ICustomElement.js +0 -1
- package/core/test.js +0 -126
- package/core/typings.d.ts +0 -142
- package/core/typings.js +0 -1
- package/mixins/SurfaceMixin.js +0 -127
- package/theming/loader.js +0 -22
- /package/{utils/color_keywords.js → constants/colorKeywords.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextFieldMixin.d.ts","sourceRoot":"","sources":["../../mixins/TextFieldMixin.js"],"names":[],"mappings":"AAIA,0EAA0E;AAE1E;;GAEG;AACH,6CAFW,UAAU,CAAC,0CAAmC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAuuBzD;4BA1uBa,OAAO,0BAA0B,EAAE,OAAO"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {typeof import('../core/CustomElement.js').default} Base
|
|
3
|
+
*/
|
|
4
|
+
export default function ThemableMixin(Base: typeof import("../core/CustomElement.js").default): typeof import("../core/CustomElement.js").default & import("../core/CustomElement.js").Class<{
|
|
5
|
+
color: string;
|
|
6
|
+
ink: string;
|
|
7
|
+
typeStyle: string;
|
|
8
|
+
}, any[]>;
|
|
9
|
+
//# sourceMappingURL=ThemableMixin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemableMixin.d.ts","sourceRoot":"","sources":["../../mixins/ThemableMixin.js"],"names":[],"mappings":"AAwCA;;GAEG;AACH,4CAFW,cAAc,0BAA0B,EAAE,OAAO;;;;UAuF3D"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/** @typedef {import('../components/Tooltip.js').default} Tooltip */
|
|
2
|
+
/**
|
|
3
|
+
* @param {ReturnType<import('./StateMixin.js').default>} Base
|
|
4
|
+
*/
|
|
5
|
+
export default function TooltipTriggerMixin(Base: ReturnType<typeof import("./StateMixin.js").default>): typeof import("../index.js").CustomElement & import("../core/CustomElement.js").Class<{
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
focused: boolean;
|
|
8
|
+
hovered: boolean;
|
|
9
|
+
pressed: boolean;
|
|
10
|
+
_lastInteraction: "key" | "mouse" | "touch" | "pen";
|
|
11
|
+
_hovered: boolean;
|
|
12
|
+
_focused: boolean;
|
|
13
|
+
_focusedSynthetic: boolean;
|
|
14
|
+
_keyPressed: boolean;
|
|
15
|
+
_keyReleased: boolean;
|
|
16
|
+
_pointerPressed: boolean;
|
|
17
|
+
stateLayer: boolean;
|
|
18
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
19
|
+
disabledState: boolean;
|
|
20
|
+
hoveredState: boolean;
|
|
21
|
+
focusedState: boolean;
|
|
22
|
+
pressedState: boolean;
|
|
23
|
+
touchedState: boolean;
|
|
24
|
+
pointedState: boolean;
|
|
25
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
26
|
+
stateTargetElement: HTMLElement;
|
|
27
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
28
|
+
TOOLTIP_MOUSE_IDLE_MS: number;
|
|
29
|
+
TOOLTIP_TOUCH_IDLE_MS: number;
|
|
30
|
+
/** @type {any} */
|
|
31
|
+
_idleDebounce: any;
|
|
32
|
+
/** @type {HTMLElement[]} */
|
|
33
|
+
_watchedParents: HTMLElement[];
|
|
34
|
+
/** @type {ResizeObserver} */
|
|
35
|
+
_resizeObserver: ResizeObserver;
|
|
36
|
+
/** @type {IntersectionObserver} */
|
|
37
|
+
_intersectObserver: IntersectionObserver;
|
|
38
|
+
_parentScrollListener: any;
|
|
39
|
+
tooltipSlotId: string;
|
|
40
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
41
|
+
tooltip: string;
|
|
42
|
+
autoTooltip: boolean;
|
|
43
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
44
|
+
cancelShowTooltip(): void;
|
|
45
|
+
/** @param {'mouse'|'touch'|'keyboard'} type */
|
|
46
|
+
scheduleHideTooltip(type: "mouse" | "touch" | "keyboard"): void;
|
|
47
|
+
/** @param {'mouse'|'touch'|'keyboard'} type */
|
|
48
|
+
scheduleShowTooltip(type: "mouse" | "touch" | "keyboard"): void;
|
|
49
|
+
showTooltip(): void;
|
|
50
|
+
hideTooltip(cancelSchedule?: boolean): void;
|
|
51
|
+
/**
|
|
52
|
+
* TODO: Throttle multiple calls
|
|
53
|
+
* @param {DOMRect} [domRect]
|
|
54
|
+
* @return {void}
|
|
55
|
+
*/
|
|
56
|
+
updateTooltipPosition(domRect?: DOMRect): void;
|
|
57
|
+
recloneTooltip(): void;
|
|
58
|
+
closeIfNotHovered(): void;
|
|
59
|
+
}, any[]>;
|
|
60
|
+
export type Tooltip = typeof import("../index.js").CustomElement & import("../core/CustomElement.js").Class<{
|
|
61
|
+
_ariaRole: string;
|
|
62
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
63
|
+
onConnectAriaValues: Map<string, string>;
|
|
64
|
+
hasFiredConnected: boolean;
|
|
65
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
66
|
+
readAriaProperty(name: keyof HTMLElement & keyof ElementInternals): string | ShadowRoot;
|
|
67
|
+
updateAriaProperty(name: keyof HTMLElement & keyof ElementInternals, value: string): void;
|
|
68
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
69
|
+
disabled: boolean;
|
|
70
|
+
focused: boolean;
|
|
71
|
+
hovered: boolean;
|
|
72
|
+
pressed: boolean;
|
|
73
|
+
_lastInteraction: "key" | "mouse" | "touch" | "pen";
|
|
74
|
+
_hovered: boolean;
|
|
75
|
+
_focused: boolean;
|
|
76
|
+
_focusedSynthetic: boolean;
|
|
77
|
+
_keyPressed: boolean;
|
|
78
|
+
_keyReleased: boolean;
|
|
79
|
+
_pointerPressed: boolean;
|
|
80
|
+
stateLayer: boolean;
|
|
81
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
82
|
+
disabledState: boolean;
|
|
83
|
+
hoveredState: boolean;
|
|
84
|
+
focusedState: boolean;
|
|
85
|
+
pressedState: boolean;
|
|
86
|
+
touchedState: boolean;
|
|
87
|
+
pointedState: boolean;
|
|
88
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
89
|
+
stateTargetElement: HTMLElement;
|
|
90
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
91
|
+
color: string;
|
|
92
|
+
ink: string;
|
|
93
|
+
typeStyle: string;
|
|
94
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
95
|
+
shapeTop: boolean;
|
|
96
|
+
shapeBottom: boolean;
|
|
97
|
+
shapeStart: boolean;
|
|
98
|
+
shapeEnd: boolean;
|
|
99
|
+
shapeStyle: string;
|
|
100
|
+
outlined: boolean;
|
|
101
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
102
|
+
_ariaRole: string;
|
|
103
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
104
|
+
open: boolean;
|
|
105
|
+
}, any[]>;
|
|
106
|
+
//# sourceMappingURL=TooltipTriggerMixin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooltipTriggerMixin.d.ts","sourceRoot":"","sources":["../../mixins/TooltipTriggerMixin.js"],"names":[],"mappings":"AAIA,oEAAoE;AAEpE;;GAEG;AACH,kDAFW,UAAU,CAAC,wCAAiC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;IAOlD,kBAAkB;mBAAP,GAAG;IAEd,4BAA4B;qBAAjB,WAAW,EAAE;IAExB,6BAA6B;qBAAlB,cAAc;IAEzB,mCAAmC;wBAAxB,oBAAoB;;;;;;;;IAoB/B,+CAA+C;8BAAnC,OAAO,GAAC,OAAO,GAAC,UAAU;IAwBtC,+CAA+C;8BAAnC,OAAO,GAAC,OAAO,GAAC,UAAU;;;IAgEtC;;;;OAIG;oCAFQ,OAAO,GACN,IAAI;;;UAyLrB;sBAxTa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAA0C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TouchTargetMixin.d.ts","sourceRoot":"","sources":["../../mixins/TouchTargetMixin.js"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,+CADY,cAAc,0BAA0B,EAAE,OAAO,qDAkC5D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** @param {typeof import('../core/CustomElement.js').default} Base */
|
|
2
|
+
export default function TypographyMixin(Base: typeof import("../core/CustomElement.js").default): typeof import("../core/CustomElement.js").default & import("../core/CustomElement.js").Class<{
|
|
3
|
+
delegatesFocus: boolean;
|
|
4
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
5
|
+
textPadding: string;
|
|
6
|
+
textPaddingTop: string;
|
|
7
|
+
textLeading: string;
|
|
8
|
+
textPaddingBottom: string;
|
|
9
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
10
|
+
_computedTextPaddingTop: string;
|
|
11
|
+
_computedTextPaddingBottom: string;
|
|
12
|
+
_computedTextLeading: string;
|
|
13
|
+
}, any[]> & import("../core/CustomElement.js").Class<{
|
|
14
|
+
_beforeStyle: string;
|
|
15
|
+
_afterStyle: string;
|
|
16
|
+
}, any[]>;
|
|
17
|
+
//# sourceMappingURL=TypographyMixin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypographyMixin.d.ts","sourceRoot":"","sources":["../../mixins/TypographyMixin.js"],"names":[],"mappings":"AAcA,sEAAsE;AACtE,8CADY,cAAc,0BAA0B,EAAE,OAAO;;;;;;;;;;;;;;UA0G5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rtl.d.ts","sourceRoot":"","sources":["../../services/rtl.js"],"names":[],"mappings":"AAIA,qBAAqB;AACrB,oCADa,IAAI,CAKhB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {string} name
|
|
3
|
+
* @param {string} path
|
|
4
|
+
* @param {string} [viewBox]
|
|
5
|
+
*/
|
|
6
|
+
export function addSVGAlias(name: string, path: string, viewBox?: string): void;
|
|
7
|
+
/** @type {Map<string, {path:string, viewBox:string}>} */
|
|
8
|
+
export const svgAliasMap: Map<string, {
|
|
9
|
+
path: string;
|
|
10
|
+
viewBox: string;
|
|
11
|
+
}>;
|
|
12
|
+
export const unaliased: Set<any>;
|
|
13
|
+
//# sourceMappingURL=svgAlias.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svgAlias.d.ts","sourceRoot":"","sources":["../../services/svgAlias.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,kCAJW,MAAM,QACN,MAAM,YACN,MAAM,QAShB;AAhBD,yDAAyD;AACzD,0BADW,GAAG,CAAC,MAAM,EAAE;IAAC,IAAI,EAAC,MAAM,CAAC;IAAC,OAAO,EAAC,MAAM,CAAA;CAAC,CAAC,CAChB;AACrC,iCAAmC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {typeof TYPOGRAPHY_DEFAULT} config
|
|
3
|
+
* @return {string}
|
|
4
|
+
*/
|
|
5
|
+
export function generateTypographyCSS(config?: typeof TYPOGRAPHY_DEFAULT): string;
|
|
6
|
+
/** @return {string} */
|
|
7
|
+
export function generateTypographyGlobalCSS(): string;
|
|
8
|
+
/**
|
|
9
|
+
* @param {typeof SHAPE_ROUNDED_DEFAULT} [config]
|
|
10
|
+
* @return {string}
|
|
11
|
+
*/
|
|
12
|
+
export function generateShapeCSS(config?: typeof SHAPE_ROUNDED_DEFAULT): string;
|
|
13
|
+
/**
|
|
14
|
+
* @param {ThemeOptions} options
|
|
15
|
+
* @return {string}
|
|
16
|
+
*/
|
|
17
|
+
export function generateColorCSS({ color, custom, lightness }: ThemeOptions): string;
|
|
18
|
+
/**
|
|
19
|
+
* @param {ThemeOptions} options
|
|
20
|
+
* @return {void}
|
|
21
|
+
*/
|
|
22
|
+
export function setupTheme({ color, custom, lightness }: ThemeOptions): void;
|
|
23
|
+
/**
|
|
24
|
+
* @param {URLSearchParams} searchParams
|
|
25
|
+
* @return {ThemeOptions}
|
|
26
|
+
*/
|
|
27
|
+
export function themeOptionsFromSearchParams(searchParams: URLSearchParams): ThemeOptions;
|
|
28
|
+
/**
|
|
29
|
+
* @param {ThemeOptions} options
|
|
30
|
+
* @return {string}
|
|
31
|
+
*/
|
|
32
|
+
export function generateThemeCSS({ color, custom, lightness }: ThemeOptions): string;
|
|
33
|
+
export const PALETTES: string[];
|
|
34
|
+
export const TYPE_STYLES: string[];
|
|
35
|
+
export type ThemeOptions = {
|
|
36
|
+
color?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Map()
|
|
39
|
+
*/
|
|
40
|
+
custom?: Iterable<[string, string?]>;
|
|
41
|
+
lightness?: "auto" | "light" | "dark";
|
|
42
|
+
};
|
|
43
|
+
import { TYPOGRAPHY_DEFAULT } from '../constants/typography.js';
|
|
44
|
+
import { SHAPE_ROUNDED_DEFAULT } from '../constants/shapes.js';
|
|
45
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../services/theme.js"],"names":[],"mappings":"AA2FA;;;GAGG;AACH,+CAHW,OAAO,kBAAkB,GACxB,MAAM,CAoGjB;AAED,uBAAuB;AACvB,+CADa,MAAM,CAalB;AAED;;;GAGG;AACH,0CAHW,OAAO,qBAAqB,GAC3B,MAAM,CAsBjB;AAaD;;;GAGG;AACH,+DAHW,YAAY,GACX,MAAM,CAWjB;AAED;;;GAGG;AACH,yDAHW,YAAY,GACX,IAAI,CAiBf;AAED;;;GAGG;AACH,2DAHW,eAAe,GACd,YAAY,CAYvB;AAED;;;GAGG;AACH,+DAHW,YAAY,GACX,MAAM,CAqBjB;AA5TD,gCAME;AAEF,mCAME;;YAIQ,MAAM;;;;aACN,QAAQ,CAAC,CAAC,MAAM,EAAC,MAAM,CAAC,CAAC,CAAC;gBAC1B,MAAM,GAAC,OAAO,GAAC,MAAM;;mCAxBI,4BAA4B;sCADzB,wBAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../utils/cli.js"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,mCADa,eAAe,CAU3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../utils/function.js"],"names":[],"mappings":"AAAA,qBAAqB;AAErB,wBAFa,IAAI,CAEQ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** eslint-env browser */
|
|
2
|
+
export const Fragment: "$FRAGMENT";
|
|
3
|
+
/**
|
|
4
|
+
* @param {string} tagName
|
|
5
|
+
* @param {{ children?: DocumentFragment|string }} attrs
|
|
6
|
+
* @return {HTMLElement|DocumentFragment}
|
|
7
|
+
*/
|
|
8
|
+
export function jsx(tagName: string, attrs?: {
|
|
9
|
+
children?: DocumentFragment | string;
|
|
10
|
+
}): HTMLElement | DocumentFragment;
|
|
11
|
+
/**
|
|
12
|
+
* @param {string} tagName
|
|
13
|
+
* @param {Record<string, any> & { children: HTMLElement[], style:string|CSSStyleDeclaration }} attrs
|
|
14
|
+
* @return {HTMLElement|DocumentFragment}
|
|
15
|
+
*/
|
|
16
|
+
export function jsxs(tagName: string, attrs: Record<string, any> & {
|
|
17
|
+
children: HTMLElement[];
|
|
18
|
+
style: string | CSSStyleDeclaration;
|
|
19
|
+
}): HTMLElement | DocumentFragment;
|
|
20
|
+
//# sourceMappingURL=jsx-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime.d.ts","sourceRoot":"","sources":["../../utils/jsx-runtime.js"],"names":[],"mappings":"AAAA,yBAAyB;AAEzB,mCAAoC;AAkDpC;;;;GAIG;AACH,6BAJW,MAAM,UACN;IAAE,QAAQ,CAAC,EAAE,gBAAgB,GAAC,MAAM,CAAA;CAAE,GACrC,WAAW,GAAC,gBAAgB,CA0CvC;AA7FD;;;;GAIG;AACH,8BAJW,MAAM,SACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;IAAC,KAAK,EAAC,MAAM,GAAC,mBAAmB,CAAA;CAAE,GAClF,WAAW,GAAC,gBAAgB,CA2CvC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Functions for blending in HCT and CAM16.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Blend the design color's HCT hue towards the key color's HCT
|
|
6
|
+
* hue, in a way that leaves the original color recognizable and
|
|
7
|
+
* recognizably shifted towards the key color.
|
|
8
|
+
* @param {number} designColor ARGB representation of an arbitrary color.
|
|
9
|
+
* @param {number} sourceColor ARGB representation of the main theme color.
|
|
10
|
+
* @return {number} The design color with a hue shifted towards the
|
|
11
|
+
* system's color, a slightly warmer/cooler variant of the design
|
|
12
|
+
* color's hue.
|
|
13
|
+
*/
|
|
14
|
+
export function harmonize(designColor: number, sourceColor: number): number;
|
|
15
|
+
/**
|
|
16
|
+
* Blend in CAM16-UCS space.
|
|
17
|
+
* @param {number} from ARGB representation of color
|
|
18
|
+
* @param {number} to ARGB representation of color
|
|
19
|
+
* @param {number} amount how much blending to perform; 0.0 >= and <= 1.0
|
|
20
|
+
* @return {number} from, blended towards to. Hue, chroma, and tone will
|
|
21
|
+
* change.
|
|
22
|
+
*/
|
|
23
|
+
export function cam16Ucs(from: number, to: number, amount: number): number;
|
|
24
|
+
/**
|
|
25
|
+
* Blends hue from one color into another. The chroma and tone of
|
|
26
|
+
* the original color are maintained.
|
|
27
|
+
* @param {number} from ARGB representation of color
|
|
28
|
+
* @param {number} to ARGB representation of color
|
|
29
|
+
* @param {number} amount how much blending to perform; 0.0 >= and <= 1.0
|
|
30
|
+
* @return {number} from, with a hue blended towards to. Chroma and tone
|
|
31
|
+
* are constant.
|
|
32
|
+
*/
|
|
33
|
+
export function hctHue(from: number, to: number, amount: number): number;
|
|
34
|
+
//# sourceMappingURL=blend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blend.d.ts","sourceRoot":"","sources":["../../../utils/material-color/blend.js"],"names":[],"mappings":"AAsBA;;GAEG;AAEH;;;;;;;;;GASG;AACH,uCANW,MAAM,eACN,MAAM,GACL,MAAM,CAcjB;AAED;;;;;;;GAOG;AACH,+BANW,MAAM,MACN,MAAM,UACN,MAAM,GACL,MAAM,CAgBjB;AAED;;;;;;;;GAQG;AACH,6BANW,MAAM,MACN,MAAM,UACN,MAAM,GACL,MAAM,CAajB"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CAM16, a color appearance model. Colors are not just defined by their hex
|
|
3
|
+
* code, but rather, a hex code and viewing conditions.
|
|
4
|
+
*
|
|
5
|
+
* CAM16 instances also have coordinates in the CAM16-UCS space, called J*, a*,
|
|
6
|
+
* b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16
|
|
7
|
+
* specification, and should be used when measuring distances between colors.
|
|
8
|
+
*
|
|
9
|
+
* In traditional color spaces, a color can be identified solely by the
|
|
10
|
+
* observer's measurement of the color. Color appearance models such as CAM16
|
|
11
|
+
* also use information about the environment where the color was
|
|
12
|
+
* observed, known as the viewing conditions.
|
|
13
|
+
*
|
|
14
|
+
* For example, white under the traditional assumption of a midday sun white
|
|
15
|
+
* point is accurately measured as a slightly chromatic blue by CAM16. (roughly,
|
|
16
|
+
* hue 203, chroma 3, lightness 100)
|
|
17
|
+
*/
|
|
18
|
+
export default class Cam16 {
|
|
19
|
+
/**
|
|
20
|
+
* @param {number} argb ARGB representation of a color.
|
|
21
|
+
* @return {Cam16} CAM16 color, assuming the color was viewed in default viewing
|
|
22
|
+
* conditions.
|
|
23
|
+
*/
|
|
24
|
+
static fromInt(argb: number): Cam16;
|
|
25
|
+
/**
|
|
26
|
+
* @param {number} argb ARGB representation of a color.
|
|
27
|
+
* @param {ViewingConditions} viewingConditions Information about the environment where the color
|
|
28
|
+
* was observed.
|
|
29
|
+
* @return {Cam16} CAM16 color.
|
|
30
|
+
*/
|
|
31
|
+
static fromIntInViewingConditions(argb: number, viewingConditions: ViewingConditions): Cam16;
|
|
32
|
+
/**
|
|
33
|
+
* @param {number} j CAM16 lightness
|
|
34
|
+
* @param {number} c CAM16 chroma
|
|
35
|
+
* @param {number} h CAM16 hue
|
|
36
|
+
* @return {Cam16}
|
|
37
|
+
*/
|
|
38
|
+
static fromJch(j: number, c: number, h: number): Cam16;
|
|
39
|
+
/**
|
|
40
|
+
* @param {number} j CAM16 lightness
|
|
41
|
+
* @param {number} c CAM16 chroma
|
|
42
|
+
* @param {number} h CAM16 hue
|
|
43
|
+
* @param {ViewingConditions} viewingConditions Information about the environment where the color
|
|
44
|
+
* was observed.
|
|
45
|
+
*/
|
|
46
|
+
static fromJchInViewingConditions(j: number, c: number, h: number, viewingConditions: ViewingConditions): Cam16;
|
|
47
|
+
/**
|
|
48
|
+
* @param {number} jstar CAM16-UCS lightness.
|
|
49
|
+
* @param {number} astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian
|
|
50
|
+
* coordinate on the Y axis.
|
|
51
|
+
* @param {number} bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian
|
|
52
|
+
* coordinate on the X axis.
|
|
53
|
+
* @return {Cam16}
|
|
54
|
+
*/
|
|
55
|
+
static fromUcs(jstar: number, astar: number, bstar: number): Cam16;
|
|
56
|
+
/**
|
|
57
|
+
* @param {number} jstar CAM16-UCS lightness.
|
|
58
|
+
* @param {number} astar CAM16-UCS a dimension. Like a* in L*a*b*, it is a Cartesian
|
|
59
|
+
* coordinate on the Y axis.
|
|
60
|
+
* @param {number} bstar CAM16-UCS b dimension. Like a* in L*a*b*, it is a Cartesian
|
|
61
|
+
* coordinate on the X axis.
|
|
62
|
+
* @param {ViewingConditions} viewingConditions Information about the environment where the color
|
|
63
|
+
* was observed.
|
|
64
|
+
*/
|
|
65
|
+
static fromUcsInViewingConditions(jstar: number, astar: number, bstar: number, viewingConditions: ViewingConditions): Cam16;
|
|
66
|
+
/**
|
|
67
|
+
* Given color expressed in XYZ and viewed in [viewingConditions], convert to
|
|
68
|
+
* CAM16.
|
|
69
|
+
* @param {number} x
|
|
70
|
+
* @param {number} y
|
|
71
|
+
* @param {number} z
|
|
72
|
+
* @param {ViewingConditions} viewingConditions
|
|
73
|
+
* @return {Cam16}
|
|
74
|
+
*/
|
|
75
|
+
static fromXyzInViewingConditions(x: number, y: number, z: number, viewingConditions: ViewingConditions): Cam16;
|
|
76
|
+
/**
|
|
77
|
+
* All of the CAM16 dimensions can be calculated from 3 of the dimensions, in
|
|
78
|
+
* the following combinations:
|
|
79
|
+
* - {j or q} and {c, m, or s} and hue
|
|
80
|
+
* - jstar, astar, bstar
|
|
81
|
+
* Prefer using a static method that constructs from 3 of those dimensions.
|
|
82
|
+
* This constructor is intended for those methods to use to return all
|
|
83
|
+
* possible dimensions.
|
|
84
|
+
* @param {number} hue
|
|
85
|
+
* @param {number} chroma informally, colorfulness / color intensity. like saturation
|
|
86
|
+
* in HSL, except perceptually accurate.
|
|
87
|
+
* @param {number} j lightness
|
|
88
|
+
* @param {number} q brightness; ratio of lightness to white point's lightness
|
|
89
|
+
* @param {number} m colorfulness
|
|
90
|
+
* @param {number} s saturation; ratio of chroma to white point's chroma
|
|
91
|
+
* @param {number} jstar CAM16-UCS J coordinate
|
|
92
|
+
* @param {number} astar CAM16-UCS a coordinate
|
|
93
|
+
* @param {number} bstar CAM16-UCS b coordinate
|
|
94
|
+
*/
|
|
95
|
+
constructor(hue: number, chroma: number, j: number, q: number, m: number, s: number, jstar: number, astar: number, bstar: number);
|
|
96
|
+
/** @readonly */
|
|
97
|
+
readonly hue: number;
|
|
98
|
+
/** @readonly */
|
|
99
|
+
readonly chroma: number;
|
|
100
|
+
/** @readonly */
|
|
101
|
+
readonly j: number;
|
|
102
|
+
/** @readonly */
|
|
103
|
+
readonly q: number;
|
|
104
|
+
/** @readonly */
|
|
105
|
+
readonly m: number;
|
|
106
|
+
/** @readonly */
|
|
107
|
+
readonly s: number;
|
|
108
|
+
/** @readonly */
|
|
109
|
+
readonly jstar: number;
|
|
110
|
+
/** @readonly */
|
|
111
|
+
readonly astar: number;
|
|
112
|
+
/** @readonly */
|
|
113
|
+
readonly bstar: number;
|
|
114
|
+
/**
|
|
115
|
+
* CAM16 instances also have coordinates in the CAM16-UCS space, called J*,
|
|
116
|
+
* a*, b*, or jstar, astar, bstar in code. CAM16-UCS is included in the CAM16
|
|
117
|
+
* specification, and is used to measure distances between colors.
|
|
118
|
+
* @param {Cam16} other
|
|
119
|
+
* @return {number}
|
|
120
|
+
*/
|
|
121
|
+
distance(other: Cam16): number;
|
|
122
|
+
/**
|
|
123
|
+
* @return {number} ARGB representation of color, assuming the color was viewed in
|
|
124
|
+
* default viewing conditions, which are near-identical to the default
|
|
125
|
+
* viewing conditions for sRGB.
|
|
126
|
+
*/
|
|
127
|
+
toInt(): number;
|
|
128
|
+
/**
|
|
129
|
+
* @param {ViewingConditions} viewingConditions Information about the environment where the color
|
|
130
|
+
* will be viewed.
|
|
131
|
+
* @return {number} ARGB representation of color
|
|
132
|
+
*/
|
|
133
|
+
viewed(viewingConditions: ViewingConditions): number;
|
|
134
|
+
/**
|
|
135
|
+
* XYZ representation of CAM16 seen in [viewingConditions].
|
|
136
|
+
* @param {ViewingConditions} viewingConditions
|
|
137
|
+
* @return {number[]}
|
|
138
|
+
*/
|
|
139
|
+
xyzInViewingConditions(viewingConditions: ViewingConditions): number[];
|
|
140
|
+
}
|
|
141
|
+
import ViewingConditions from './ViewingConditions.js';
|
|
142
|
+
//# sourceMappingURL=Cam16.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Cam16.d.ts","sourceRoot":"","sources":["../../../../utils/material-color/hct/Cam16.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;GAgBG;AACH;IACE;;;;OAIG;IACH,qBAJW,MAAM,GACL,KAAK,CAKhB;IAED;;;;;OAKG;IACH,wCALW,MAAM,qBACN,iBAAiB,GAEhB,KAAK,CA6DhB;IAED;;;;;OAKG;IACH,kBALW,MAAM,KACN,MAAM,KACN,MAAM,GACL,KAAK,CAIhB;IAED;;;;;;OAMG;IACH,qCANW,MAAM,KACN,MAAM,KACN,MAAM,qBACN,iBAAiB,SAgB3B;IAED;;;;;;;OAOG;IACH,sBAPW,MAAM,SACN,MAAM,SAEN,MAAM,GAEL,KAAK,CAIhB;IAED;;;;;;;;OAQG;IACH,yCARW,MAAM,SACN,MAAM,SAEN,MAAM,qBAEN,iBAAiB,SAe3B;IAED;;;;;;;;OAQG;IACH,qCANW,MAAM,KACN,MAAM,KACN,MAAM,qBACN,iBAAiB,GAChB,KAAK,CAkEhB;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,iBAXW,MAAM,UACN,MAAM,KAEN,MAAM,KACN,MAAM,KACN,MAAM,KACN,MAAM,SACN,MAAM,SACN,MAAM,SACN,MAAM,EAqBhB;IAlBC,gBAAgB;IAChB,qBAAc;IACd,gBAAgB;IAChB,wBAAoB;IACpB,gBAAgB;IAChB,mBAAU;IACV,gBAAgB;IAChB,mBAAU;IACV,gBAAgB;IAChB,mBAAU;IACV,gBAAgB;IAChB,mBAAU;IACV,gBAAgB;IAChB,uBAAkB;IAClB,gBAAgB;IAChB,uBAAkB;IAClB,gBAAgB;IAChB,uBAAkB;IAGpB;;;;;;OAMG;IACH,gBAHW,KAAK,GACJ,MAAM,CASjB;IAED;;;;OAIG;IACH,SAJa,MAAM,CAMlB;IAED;;;;OAIG;IACH,0BAJW,iBAAiB,GAEhB,MAAM,CA8CjB;IAED;;;;OAIG;IACH,0CAHW,iBAAiB,GAChB,MAAM,EAAE,CA8CnB;CACF;8BApZ6B,wBAAwB"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HCT, hue, chroma, and tone. A color system that provides a perceptually
|
|
3
|
+
* accurate color measurement system that can also accurately render what colors
|
|
4
|
+
* will appear as in different lighting environments.
|
|
5
|
+
*/
|
|
6
|
+
export default class Hct {
|
|
7
|
+
/**
|
|
8
|
+
* @param hue 0 <= hue < 360; invalid values are corrected.
|
|
9
|
+
* @param chroma 0 <= chroma < ?; Informally, colorfulness. The color
|
|
10
|
+
* returned may be lower than the requested chroma. Chroma has a different
|
|
11
|
+
* maximum for any given hue and tone.
|
|
12
|
+
* @param tone 0 <= tone <= 100; invalid values are corrected.
|
|
13
|
+
* @return HCT representation of a color in default viewing conditions.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* @param {number} hue
|
|
17
|
+
* @param {number} chroma
|
|
18
|
+
* @param {number} tone
|
|
19
|
+
* @return {Hct}
|
|
20
|
+
*/
|
|
21
|
+
static from(hue: number, chroma: number, tone: number): Hct;
|
|
22
|
+
/**
|
|
23
|
+
* @param {number} argb ARGB representation of a color.
|
|
24
|
+
* @return {Hct} HCT representation of a color in default viewing conditions
|
|
25
|
+
*/
|
|
26
|
+
static fromInt(argb: number): Hct;
|
|
27
|
+
/** @param {number} argb */
|
|
28
|
+
constructor(argb: number);
|
|
29
|
+
/** @type {number} */
|
|
30
|
+
internalHue: number;
|
|
31
|
+
/** @type {number} */
|
|
32
|
+
internalChroma: number;
|
|
33
|
+
/** @type {number} */
|
|
34
|
+
internalTone: number;
|
|
35
|
+
argb: number;
|
|
36
|
+
/** @return {number} */
|
|
37
|
+
toInt(): number;
|
|
38
|
+
/**
|
|
39
|
+
* @param {number} newHue 0 <= newHue < 360; invalid values are corrected.
|
|
40
|
+
* Chroma may decrease because chroma has a different maximum for any given
|
|
41
|
+
* hue and tone.
|
|
42
|
+
*/
|
|
43
|
+
set hue(newHue: number);
|
|
44
|
+
/**
|
|
45
|
+
* A number, in degrees, representing ex. red, orange, yellow, etc.
|
|
46
|
+
* Ranges from 0 <= hue < 360.
|
|
47
|
+
* @return {number}
|
|
48
|
+
*/
|
|
49
|
+
get hue(): number;
|
|
50
|
+
/**
|
|
51
|
+
* @param {number} newChroma 0 <= newChroma < ?
|
|
52
|
+
* Chroma may decrease because chroma has a different maximum for any given
|
|
53
|
+
* hue and tone.
|
|
54
|
+
*/
|
|
55
|
+
set chroma(newChroma: number);
|
|
56
|
+
/** @return {number} */
|
|
57
|
+
get chroma(): number;
|
|
58
|
+
/**
|
|
59
|
+
* @param {number} newTone 0 <= newTone <= 100; invalid valids are corrected.
|
|
60
|
+
* Chroma may decrease because chroma has a different maximum for any given
|
|
61
|
+
* hue and tone.
|
|
62
|
+
*/
|
|
63
|
+
set tone(newTone: number);
|
|
64
|
+
/**
|
|
65
|
+
* Lightness. Ranges from 0 to 100.
|
|
66
|
+
* @return {number}
|
|
67
|
+
*/
|
|
68
|
+
get tone(): number;
|
|
69
|
+
/**
|
|
70
|
+
* @private
|
|
71
|
+
* @param {number} argb
|
|
72
|
+
*/
|
|
73
|
+
private setInternalState;
|
|
74
|
+
/**
|
|
75
|
+
* Translates a color into different [ViewingConditions].
|
|
76
|
+
*
|
|
77
|
+
* Colors change appearance. They look different with lights on versus off,
|
|
78
|
+
* the same color, as in hex code, on white looks different when on black.
|
|
79
|
+
* This is called color relativity, most famously explicated by Josef Albers
|
|
80
|
+
* in Interaction of Color.
|
|
81
|
+
*
|
|
82
|
+
* In color science, color appearance models can account for this and
|
|
83
|
+
* calculate the appearance of a color in different settings. HCT is based on
|
|
84
|
+
* CAM16, a color appearance model, and uses it to make these calculations.
|
|
85
|
+
*
|
|
86
|
+
* See [ViewingConditions.make] for parameters affecting color appearance.
|
|
87
|
+
* @param {ViewingConditions} vc
|
|
88
|
+
* @return {Hct}
|
|
89
|
+
*/
|
|
90
|
+
inViewingConditions(vc: ViewingConditions): Hct;
|
|
91
|
+
}
|
|
92
|
+
import ViewingConditions from './ViewingConditions.js';
|
|
93
|
+
//# sourceMappingURL=Hct.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Hct.d.ts","sourceRoot":"","sources":["../../../../utils/material-color/hct/Hct.js"],"names":[],"mappings":"AAuCA;;;;GAIG;AACH;IACE;;;;;;;OAOG;IAEH;;;;;OAKG;IACH,iBALW,MAAM,UACN,MAAM,QACN,MAAM,GACL,GAAG,CAId;IAED;;;OAGG;IACH,qBAHW,MAAM,GACL,GAAG,CAId;IAWD,2BAA2B;IAC3B,kBADY,MAAM,EAOjB;IAhBD,qBAAqB;IACrB,aADW,MAAM,CACL;IAEZ,qBAAqB;IACrB,gBADW,MAAM,CACF;IAEf,qBAAqB;IACrB,cADW,MAAM,CACJ;IAQX,aAAgB;IAGlB,uBAAuB;IACvB,SADa,MAAM,CAGlB;IAWD;;;;OAIG;IACH,wBAQC;IAtBD;;;;OAIG;IACH,kBAEC;IAsBD;;;;OAIG;IACH,8BAQC;IAlBD,uBAAuB;IACvB,qBAEC;IAyBD;;;;OAIG;IACH,0BAQC;IArBD;;;OAGG;IACH,mBAEC;IAiBD;;;OAGG;IACH,yBAMC;IAED;;;;;;;;;;;;;;;OAeG;IACH,wBAHW,iBAAiB,GAChB,GAAG,CAwBd;CACF;8BAjL6B,wBAAwB"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In traditional color spaces, a color can be identified solely by the
|
|
3
|
+
* observer's measurement of the color. Color appearance models such as CAM16
|
|
4
|
+
* also use information about the environment where the color was
|
|
5
|
+
* observed, known as the viewing conditions.
|
|
6
|
+
*
|
|
7
|
+
* For example, white under the traditional assumption of a midday sun white
|
|
8
|
+
* point is accurately measured as a slightly chromatic blue by CAM16. (roughly,
|
|
9
|
+
* hue 203, chroma 3, lightness 100)
|
|
10
|
+
*
|
|
11
|
+
* This class caches intermediate values of the CAM16 conversion process that
|
|
12
|
+
* depend only on viewing conditions, enabling speed ups.
|
|
13
|
+
*/
|
|
14
|
+
export default class ViewingConditions {
|
|
15
|
+
/** sRGB-like viewing conditions. */
|
|
16
|
+
static DEFAULT: ViewingConditions;
|
|
17
|
+
/**
|
|
18
|
+
* Create ViewingConditions from a simple, physically relevant, set of
|
|
19
|
+
* parameters.
|
|
20
|
+
* @param whitePoint White point, measured in the XYZ color space.
|
|
21
|
+
* default = D65, or sunny day afternoon
|
|
22
|
+
* @param {number} adaptingLuminance The luminance of the adapting field. Informally,
|
|
23
|
+
* how bright it is in the room where the color is viewed. Can be
|
|
24
|
+
* calculated from lux by multiplying lux by 0.0586. default = 11.72,
|
|
25
|
+
* or 200 lux.
|
|
26
|
+
* @param {number} backgroundLstar The lightness of the area surrounding the color.
|
|
27
|
+
* measured by L* in L*a*b*. default = 50.0
|
|
28
|
+
* @param {number} surround A general description of the lighting surrounding the
|
|
29
|
+
* color. 0 is pitch dark, like watching a movie in a theater. 1.0 is a
|
|
30
|
+
* dimly light room, like watching TV at home at night. 2.0 means there
|
|
31
|
+
* is no difference between the lighting on the color and around it.
|
|
32
|
+
* default = 2.0
|
|
33
|
+
* @param {boolean} discountingIlluminant Whether the eye accounts for the tint of the
|
|
34
|
+
* ambient lighting, such as knowing an apple is still red in green light.
|
|
35
|
+
* default = false, the eye does not perform this process on
|
|
36
|
+
* self-luminous objects like displays.
|
|
37
|
+
* @return {ViewingConditions}
|
|
38
|
+
*/
|
|
39
|
+
static make(whitePoint?: number[], adaptingLuminance?: number, backgroundLstar?: number, surround?: number, discountingIlluminant?: boolean): ViewingConditions;
|
|
40
|
+
/**
|
|
41
|
+
* Parameters are intermediate values of the CAM16 conversion process. Their
|
|
42
|
+
* names are shorthand for technical color science terminology, this class
|
|
43
|
+
* would not benefit from documenting them individually. A brief overview
|
|
44
|
+
* is available in the CAM16 specification, and a complete overview requires
|
|
45
|
+
* a color science textbook, such as Fairchild's Color Appearance Models.
|
|
46
|
+
* @param {number} n
|
|
47
|
+
* @param {number} aw
|
|
48
|
+
* @param {number} nbb
|
|
49
|
+
* @param {number} ncb
|
|
50
|
+
* @param {number} c
|
|
51
|
+
* @param {number} nc
|
|
52
|
+
* @param {number[]} rgbD
|
|
53
|
+
* @param {number} fl
|
|
54
|
+
* @param {number} fLRoot
|
|
55
|
+
* @param {number} z
|
|
56
|
+
*/
|
|
57
|
+
constructor(n: number, aw: number, nbb: number, ncb: number, c: number, nc: number, rgbD: number[], fl: number, fLRoot: number, z: number);
|
|
58
|
+
n: number;
|
|
59
|
+
aw: number;
|
|
60
|
+
nbb: number;
|
|
61
|
+
ncb: number;
|
|
62
|
+
c: number;
|
|
63
|
+
nc: number;
|
|
64
|
+
rgbD: number[];
|
|
65
|
+
fl: number;
|
|
66
|
+
fLRoot: number;
|
|
67
|
+
z: number;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=ViewingConditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewingConditions.d.ts","sourceRoot":"","sources":["../../../../utils/material-color/hct/ViewingConditions.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;GAYG;AACH;IACE,qCAAqC;IACrC,kCAA0C;IAE1C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,uDAjBW,MAAM,oBAIN,MAAM,aAEN,MAAM,0BAKN,OAAO,GAIN,iBAAiB,CA+C5B;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,eAXW,MAAM,MACN,MAAM,OACN,MAAM,OACN,MAAM,KACN,MAAM,MACN,MAAM,QACN,MAAM,EAAE,MACR,MAAM,UACN,MAAM,KACN,MAAM,EAahB;IAVC,UAAU;IACV,WAAY;IACZ,YAAc;IACd,YAAc;IACd,UAAU;IACV,WAAY;IACZ,eAAgB;IAChB,WAAY;IACZ,eAAoB;IACpB,UAAU;CAEb"}
|