@shortfuse/materialdesignweb 0.7.6 → 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.
Files changed (412) hide show
  1. package/README.md +87 -90
  2. package/bin/mdw-css.js +1 -1
  3. package/components/Badge.js +14 -7
  4. package/components/Body.js +3 -0
  5. package/components/BottomAppBar.js +4 -13
  6. package/components/BottomSheet.js +424 -0
  7. package/components/Box.js +20 -28
  8. package/components/Button.js +85 -79
  9. package/components/Button.md +9 -9
  10. package/components/Card.js +60 -72
  11. package/components/Checkbox.js +33 -42
  12. package/components/CheckboxIcon.js +11 -29
  13. package/components/Chip.js +13 -11
  14. package/components/Dialog.js +214 -394
  15. package/components/DialogActions.js +2 -2
  16. package/components/Display.js +55 -0
  17. package/components/Divider.js +3 -3
  18. package/components/Fab.js +83 -18
  19. package/components/FabContainer.js +48 -0
  20. package/components/FilterChip.js +35 -33
  21. package/components/Grid.js +176 -0
  22. package/components/Headline.js +5 -28
  23. package/components/Icon.js +61 -76
  24. package/components/IconButton.js +72 -126
  25. package/components/Input.js +859 -1
  26. package/components/InputChip.js +161 -0
  27. package/components/Label.js +3 -0
  28. package/components/List.js +4 -6
  29. package/components/ListItem.js +46 -30
  30. package/components/ListOption.js +86 -53
  31. package/components/Listbox.js +248 -0
  32. package/components/Menu.js +69 -528
  33. package/components/MenuItem.js +33 -36
  34. package/components/NavBar.js +49 -86
  35. package/components/NavDrawer.js +16 -15
  36. package/components/NavDrawerItem.js +4 -5
  37. package/components/NavItem.js +58 -41
  38. package/components/NavRail.js +30 -20
  39. package/components/NavRailItem.js +8 -3
  40. package/components/Page.js +105 -0
  41. package/components/Pane.js +11 -274
  42. package/components/Popup.js +29 -0
  43. package/components/Progress.js +24 -23
  44. package/components/Radio.js +40 -36
  45. package/components/RadioIcon.js +12 -16
  46. package/components/Ripple.js +13 -10
  47. package/components/Root.js +209 -0
  48. package/components/Scrim.js +87 -0
  49. package/components/Search.js +77 -0
  50. package/components/SegmentedButton.js +33 -45
  51. package/components/SegmentedButtonGroup.js +25 -13
  52. package/components/Select.js +10 -11
  53. package/components/Shape.js +5 -65
  54. package/components/SideSheet.js +308 -0
  55. package/components/Slider.js +108 -78
  56. package/components/Snackbar.js +26 -21
  57. package/components/SnackbarContainer.js +42 -0
  58. package/components/Surface.js +17 -12
  59. package/components/Switch.js +45 -24
  60. package/components/SwitchIcon.js +49 -39
  61. package/components/Tab.js +64 -43
  62. package/components/TabContent.js +5 -3
  63. package/components/TabList.js +62 -34
  64. package/components/TabPanel.js +11 -8
  65. package/components/Table.js +116 -0
  66. package/components/TextArea.js +54 -50
  67. package/components/Title.js +4 -9
  68. package/components/Tooltip.js +44 -22
  69. package/components/TopAppBar.js +68 -172
  70. package/constants/shapes.js +36 -0
  71. package/constants/typography.js +127 -0
  72. package/core/Composition.js +1164 -645
  73. package/core/CompositionAdapter.js +314 -0
  74. package/core/CustomElement.js +701 -286
  75. package/core/css.js +121 -15
  76. package/core/customTypes.js +157 -40
  77. package/core/dom.js +17 -11
  78. package/{utils → core}/jsonMergePatch.js +42 -18
  79. package/core/observe.js +343 -244
  80. package/core/optimizations.js +23 -0
  81. package/core/template.js +19 -56
  82. package/core/uid.js +13 -0
  83. package/dist/index.min.js +85 -184
  84. package/dist/index.min.js.map +4 -4
  85. package/dist/meta.json +1 -1
  86. package/dom/HTMLOptionsCollectionProxy.js +106 -0
  87. package/loaders/palette.js +13 -0
  88. package/loaders/theme.js +12 -0
  89. package/mixins/AriaReflectorMixin.js +53 -14
  90. package/mixins/AriaToolbarMixin.js +5 -3
  91. package/mixins/ControlMixin.js +92 -41
  92. package/mixins/DelegatesFocusMixin.js +54 -0
  93. package/mixins/DensityMixin.js +2 -3
  94. package/mixins/ElevationMixin.js +62 -0
  95. package/mixins/FlexableMixin.js +67 -39
  96. package/mixins/FormAssociatedMixin.js +71 -16
  97. package/mixins/HyperlinkMixin.js +66 -0
  98. package/mixins/InputMixin.js +205 -39
  99. package/mixins/KeyboardNavMixin.js +22 -7
  100. package/mixins/NavigationListenerMixin.js +33 -0
  101. package/mixins/PopupMixin.js +725 -0
  102. package/mixins/RTLObserverMixin.js +0 -1
  103. package/mixins/ResizeObserverMixin.js +16 -5
  104. package/mixins/RippleMixin.js +11 -10
  105. package/mixins/ScrollListenerMixin.js +42 -33
  106. package/mixins/SemiStickyMixin.js +97 -0
  107. package/mixins/ShapeMaskedMixin.js +117 -0
  108. package/mixins/ShapeMixin.js +17 -194
  109. package/mixins/StateMixin.js +80 -39
  110. package/mixins/TextFieldMixin.js +139 -183
  111. package/mixins/ThemableMixin.js +71 -161
  112. package/mixins/TooltipTriggerMixin.js +292 -366
  113. package/mixins/TouchTargetMixin.js +5 -4
  114. package/mixins/TypographyMixin.js +121 -0
  115. package/package.json +111 -71
  116. package/services/rtl.js +10 -0
  117. package/services/svgAlias.js +17 -0
  118. package/{theming/index.js → services/theme.js} +25 -175
  119. package/types/bin/mdw-css.d.ts +3 -0
  120. package/types/bin/mdw-css.d.ts.map +1 -0
  121. package/types/components/Badge.d.ts +39 -0
  122. package/types/components/Badge.d.ts.map +1 -0
  123. package/types/components/Body.d.ts +29 -0
  124. package/types/components/Body.d.ts.map +1 -0
  125. package/types/components/BottomAppBar.d.ts +73 -0
  126. package/types/components/BottomAppBar.d.ts.map +1 -0
  127. package/types/components/BottomSheet.d.ts +109 -0
  128. package/types/components/BottomSheet.d.ts.map +1 -0
  129. package/types/components/Box.d.ts +16 -0
  130. package/types/components/Box.d.ts.map +1 -0
  131. package/types/components/Button.d.ts +714 -0
  132. package/types/components/Button.d.ts.map +1 -0
  133. package/types/components/Card.d.ts +412 -0
  134. package/types/components/Card.d.ts.map +1 -0
  135. package/types/components/Checkbox.d.ts +205 -0
  136. package/types/components/Checkbox.d.ts.map +1 -0
  137. package/types/components/CheckboxIcon.d.ts +44 -0
  138. package/types/components/CheckboxIcon.d.ts.map +1 -0
  139. package/types/components/Chip.d.ts +1425 -0
  140. package/types/components/Chip.d.ts.map +1 -0
  141. package/types/components/Dialog.d.ts +286 -0
  142. package/types/components/Dialog.d.ts.map +1 -0
  143. package/types/components/DialogActions.d.ts +4 -0
  144. package/types/components/DialogActions.d.ts.map +1 -0
  145. package/types/components/Display.d.ts +45 -0
  146. package/types/components/Display.d.ts.map +1 -0
  147. package/types/components/Divider.d.ts +10 -0
  148. package/types/components/Divider.d.ts.map +1 -0
  149. package/types/components/Fab.d.ts +741 -0
  150. package/types/components/Fab.d.ts.map +1 -0
  151. package/types/components/FabContainer.d.ts +10 -0
  152. package/types/components/FabContainer.d.ts.map +1 -0
  153. package/types/components/FilterChip.d.ts +4283 -0
  154. package/types/components/FilterChip.d.ts.map +1 -0
  155. package/types/components/Grid.d.ts +37 -0
  156. package/types/components/Grid.d.ts.map +1 -0
  157. package/types/components/Headline.d.ts +47 -0
  158. package/types/components/Headline.d.ts.map +1 -0
  159. package/types/components/Icon.d.ts +103 -0
  160. package/types/components/Icon.d.ts.map +1 -0
  161. package/types/components/IconButton.d.ts +1486 -0
  162. package/types/components/IconButton.d.ts.map +1 -0
  163. package/types/components/Input.d.ts +51288 -0
  164. package/types/components/Input.d.ts.map +1 -0
  165. package/types/components/InputChip.d.ts +243 -0
  166. package/types/components/InputChip.d.ts.map +1 -0
  167. package/types/components/Label.d.ts +29 -0
  168. package/types/components/Label.d.ts.map +1 -0
  169. package/types/components/List.d.ts +31 -0
  170. package/types/components/List.d.ts.map +1 -0
  171. package/types/components/ListItem.d.ts +349 -0
  172. package/types/components/ListItem.d.ts.map +1 -0
  173. package/types/components/ListOption.d.ts +1493 -0
  174. package/types/components/ListOption.d.ts.map +1 -0
  175. package/types/components/Listbox.d.ts +12012 -0
  176. package/types/components/Listbox.d.ts.map +1 -0
  177. package/types/components/Menu.d.ts +119 -0
  178. package/types/components/Menu.d.ts.map +1 -0
  179. package/types/components/MenuItem.d.ts +3109 -0
  180. package/types/components/MenuItem.d.ts.map +1 -0
  181. package/types/components/NavBar.d.ts +18 -0
  182. package/types/components/NavBar.d.ts.map +1 -0
  183. package/types/components/NavBarItem.d.ts +186 -0
  184. package/types/components/NavBarItem.d.ts.map +1 -0
  185. package/types/components/NavDrawer.d.ts +108 -0
  186. package/types/components/NavDrawer.d.ts.map +1 -0
  187. package/types/components/NavDrawerItem.d.ts +186 -0
  188. package/types/components/NavDrawerItem.d.ts.map +1 -0
  189. package/types/components/NavItem.d.ts +190 -0
  190. package/types/components/NavItem.d.ts.map +1 -0
  191. package/types/components/NavRail.d.ts +109 -0
  192. package/types/components/NavRail.d.ts.map +1 -0
  193. package/types/components/NavRailItem.d.ts +186 -0
  194. package/types/components/NavRailItem.d.ts.map +1 -0
  195. package/types/components/Page.d.ts +24 -0
  196. package/types/components/Page.d.ts.map +1 -0
  197. package/types/components/Pane.d.ts +44 -0
  198. package/types/components/Pane.d.ts.map +1 -0
  199. package/types/components/Popup.d.ts +76 -0
  200. package/types/components/Popup.d.ts.map +1 -0
  201. package/types/components/Progress.d.ts +19 -0
  202. package/types/components/Progress.d.ts.map +1 -0
  203. package/types/components/Radio.d.ts +199 -0
  204. package/types/components/Radio.d.ts.map +1 -0
  205. package/types/components/RadioIcon.d.ts +46 -0
  206. package/types/components/RadioIcon.d.ts.map +1 -0
  207. package/types/components/Ripple.d.ts +34 -0
  208. package/types/components/Ripple.d.ts.map +1 -0
  209. package/types/components/Root.d.ts +68 -0
  210. package/types/components/Root.d.ts.map +1 -0
  211. package/types/components/Scrim.d.ts +6 -0
  212. package/types/components/Scrim.d.ts.map +1 -0
  213. package/types/components/Search.d.ts +16 -0
  214. package/types/components/Search.d.ts.map +1 -0
  215. package/types/components/SegmentedButton.d.ts +718 -0
  216. package/types/components/SegmentedButton.d.ts.map +1 -0
  217. package/types/components/SegmentedButtonGroup.d.ts +44 -0
  218. package/types/components/SegmentedButtonGroup.d.ts.map +1 -0
  219. package/types/components/Select.d.ts +1361 -0
  220. package/types/components/Select.d.ts.map +1 -0
  221. package/types/components/Shape.d.ts +10 -0
  222. package/types/components/Shape.d.ts.map +1 -0
  223. package/types/components/SideSheet.d.ts +106 -0
  224. package/types/components/SideSheet.d.ts.map +1 -0
  225. package/types/components/Slider.d.ts +382 -0
  226. package/types/components/Slider.d.ts.map +1 -0
  227. package/types/components/Snackbar.d.ts +65 -0
  228. package/types/components/Snackbar.d.ts.map +1 -0
  229. package/types/components/SnackbarContainer.d.ts +6 -0
  230. package/types/components/SnackbarContainer.d.ts.map +1 -0
  231. package/types/components/Surface.d.ts +45 -0
  232. package/types/components/Surface.d.ts.map +1 -0
  233. package/types/components/Switch.d.ts +183 -0
  234. package/types/components/Switch.d.ts.map +1 -0
  235. package/types/components/SwitchIcon.d.ts +169 -0
  236. package/types/components/SwitchIcon.d.ts.map +1 -0
  237. package/types/components/Tab.d.ts +879 -0
  238. package/types/components/Tab.d.ts.map +1 -0
  239. package/types/components/TabContent.d.ts +122 -0
  240. package/types/components/TabContent.d.ts.map +1 -0
  241. package/types/components/TabList.d.ts +6266 -0
  242. package/types/components/TabList.d.ts.map +1 -0
  243. package/types/components/TabPanel.d.ts +28 -0
  244. package/types/components/TabPanel.d.ts.map +1 -0
  245. package/types/components/Table.d.ts +2 -0
  246. package/types/components/Table.d.ts.map +1 -0
  247. package/types/components/TextArea.d.ts +1394 -0
  248. package/types/components/TextArea.d.ts.map +1 -0
  249. package/types/components/Title.d.ts +47 -0
  250. package/types/components/Title.d.ts.map +1 -0
  251. package/types/components/Tooltip.d.ts +49 -0
  252. package/types/components/Tooltip.d.ts.map +1 -0
  253. package/types/components/TopAppBar.d.ts +130 -0
  254. package/types/components/TopAppBar.d.ts.map +1 -0
  255. package/types/constants/colorKeywords.d.ts +2 -0
  256. package/types/constants/colorKeywords.d.ts.map +1 -0
  257. package/types/constants/shapes.d.ts +38 -0
  258. package/types/constants/shapes.d.ts.map +1 -0
  259. package/types/constants/typography.d.ts +212 -0
  260. package/types/constants/typography.d.ts.map +1 -0
  261. package/types/core/Composition.d.ts +252 -0
  262. package/types/core/Composition.d.ts.map +1 -0
  263. package/types/core/CompositionAdapter.d.ts +92 -0
  264. package/types/core/CompositionAdapter.d.ts.map +1 -0
  265. package/types/core/CustomElement.d.ts +302 -0
  266. package/types/core/CustomElement.d.ts.map +1 -0
  267. package/types/core/css.d.ts +44 -0
  268. package/types/core/css.d.ts.map +1 -0
  269. package/types/core/customTypes.d.ts +26 -0
  270. package/types/core/customTypes.d.ts.map +1 -0
  271. package/types/core/dom.d.ts +32 -0
  272. package/types/core/dom.d.ts.map +1 -0
  273. package/types/core/jsonMergePatch.d.ts +31 -0
  274. package/types/core/jsonMergePatch.d.ts.map +1 -0
  275. package/types/core/observe.d.ts +113 -0
  276. package/types/core/observe.d.ts.map +1 -0
  277. package/types/core/optimizations.d.ts +7 -0
  278. package/types/core/optimizations.d.ts.map +1 -0
  279. package/types/core/template.d.ts +47 -0
  280. package/types/core/template.d.ts.map +1 -0
  281. package/types/core/uid.d.ts +6 -0
  282. package/types/core/uid.d.ts.map +1 -0
  283. package/types/dom/HTMLOptionsCollectionProxy.d.ts +18 -0
  284. package/types/dom/HTMLOptionsCollectionProxy.d.ts.map +1 -0
  285. package/types/index.d.ts +88 -0
  286. package/types/index.d.ts.map +1 -0
  287. package/types/loaders/palette.d.ts +2 -0
  288. package/types/loaders/palette.d.ts.map +1 -0
  289. package/types/loaders/theme.d.ts +2 -0
  290. package/types/loaders/theme.d.ts.map +1 -0
  291. package/types/mixins/AriaReflectorMixin.d.ts +23 -0
  292. package/types/mixins/AriaReflectorMixin.d.ts.map +1 -0
  293. package/types/mixins/AriaToolbarMixin.d.ts +32 -0
  294. package/types/mixins/AriaToolbarMixin.d.ts.map +1 -0
  295. package/types/mixins/ControlMixin.d.ts +124 -0
  296. package/types/mixins/ControlMixin.d.ts.map +1 -0
  297. package/types/mixins/DelegatesFocusMixin.d.ts +5 -0
  298. package/types/mixins/DelegatesFocusMixin.d.ts.map +1 -0
  299. package/types/mixins/DensityMixin.d.ts +5 -0
  300. package/types/mixins/DensityMixin.d.ts.map +1 -0
  301. package/types/mixins/ElevationMixin.d.ts +33 -0
  302. package/types/mixins/ElevationMixin.d.ts.map +1 -0
  303. package/types/mixins/FlexableMixin.d.ts +13 -0
  304. package/types/mixins/FlexableMixin.d.ts.map +1 -0
  305. package/types/mixins/FormAssociatedMixin.d.ts +122 -0
  306. package/types/mixins/FormAssociatedMixin.d.ts.map +1 -0
  307. package/types/mixins/HyperlinkMixin.d.ts +22 -0
  308. package/types/mixins/HyperlinkMixin.d.ts.map +1 -0
  309. package/types/mixins/InputMixin.d.ts +179 -0
  310. package/types/mixins/InputMixin.d.ts.map +1 -0
  311. package/types/mixins/KeyboardNavMixin.d.ts +47 -0
  312. package/types/mixins/KeyboardNavMixin.d.ts.map +1 -0
  313. package/types/mixins/NavigationListenerMixin.d.ts +8 -0
  314. package/types/mixins/NavigationListenerMixin.d.ts.map +1 -0
  315. package/types/mixins/PopupMixin.d.ts +82 -0
  316. package/types/mixins/PopupMixin.d.ts.map +1 -0
  317. package/types/mixins/RTLObserverMixin.d.ts +7 -0
  318. package/types/mixins/RTLObserverMixin.d.ts.map +1 -0
  319. package/types/mixins/ResizeObserverMixin.d.ts +12 -0
  320. package/types/mixins/ResizeObserverMixin.d.ts.map +1 -0
  321. package/types/mixins/RippleMixin.d.ts +92 -0
  322. package/types/mixins/RippleMixin.d.ts.map +1 -0
  323. package/types/mixins/ScrollListenerMixin.d.ts +41 -0
  324. package/types/mixins/ScrollListenerMixin.d.ts.map +1 -0
  325. package/types/mixins/SemiStickyMixin.d.ts +50 -0
  326. package/types/mixins/SemiStickyMixin.d.ts.map +1 -0
  327. package/types/mixins/ShapeMaskedMixin.d.ts +9 -0
  328. package/types/mixins/ShapeMaskedMixin.d.ts.map +1 -0
  329. package/types/mixins/ShapeMixin.d.ts +38 -0
  330. package/types/mixins/ShapeMixin.d.ts.map +1 -0
  331. package/types/mixins/StateMixin.d.ts +27 -0
  332. package/types/mixins/StateMixin.d.ts.map +1 -0
  333. package/types/mixins/TextFieldMixin.d.ts +1354 -0
  334. package/types/mixins/TextFieldMixin.d.ts.map +1 -0
  335. package/types/mixins/ThemableMixin.d.ts +9 -0
  336. package/types/mixins/ThemableMixin.d.ts.map +1 -0
  337. package/types/mixins/TooltipTriggerMixin.d.ts +106 -0
  338. package/types/mixins/TooltipTriggerMixin.d.ts.map +1 -0
  339. package/types/mixins/TouchTargetMixin.d.ts +3 -0
  340. package/types/mixins/TouchTargetMixin.d.ts.map +1 -0
  341. package/types/mixins/TypographyMixin.d.ts +17 -0
  342. package/types/mixins/TypographyMixin.d.ts.map +1 -0
  343. package/types/services/rtl.d.ts +3 -0
  344. package/types/services/rtl.d.ts.map +1 -0
  345. package/types/services/svgAlias.d.ts +13 -0
  346. package/types/services/svgAlias.d.ts.map +1 -0
  347. package/types/services/theme.d.ts +45 -0
  348. package/types/services/theme.d.ts.map +1 -0
  349. package/types/utils/cli.d.ts +3 -0
  350. package/types/utils/cli.d.ts.map +1 -0
  351. package/types/utils/function.d.ts +3 -0
  352. package/types/utils/function.d.ts.map +1 -0
  353. package/types/utils/jsx-runtime.d.ts +20 -0
  354. package/types/utils/jsx-runtime.d.ts.map +1 -0
  355. package/types/utils/material-color/blend.d.ts +34 -0
  356. package/types/utils/material-color/blend.d.ts.map +1 -0
  357. package/types/utils/material-color/hct/Cam16.d.ts +142 -0
  358. package/types/utils/material-color/hct/Cam16.d.ts.map +1 -0
  359. package/types/utils/material-color/hct/Hct.d.ts +93 -0
  360. package/types/utils/material-color/hct/Hct.d.ts.map +1 -0
  361. package/types/utils/material-color/hct/ViewingConditions.d.ts +69 -0
  362. package/types/utils/material-color/hct/ViewingConditions.d.ts.map +1 -0
  363. package/types/utils/material-color/hct/hctSolver.d.ts +30 -0
  364. package/types/utils/material-color/hct/hctSolver.d.ts.map +1 -0
  365. package/types/utils/material-color/helper.d.ts +8 -0
  366. package/types/utils/material-color/helper.d.ts.map +1 -0
  367. package/types/utils/material-color/palettes/CorePalette.d.ts +75 -0
  368. package/types/utils/material-color/palettes/CorePalette.d.ts.map +1 -0
  369. package/types/utils/material-color/palettes/TonalPalette.d.ts +38 -0
  370. package/types/utils/material-color/palettes/TonalPalette.d.ts.map +1 -0
  371. package/types/utils/material-color/scheme/Scheme.d.ts +264 -0
  372. package/types/utils/material-color/scheme/Scheme.d.ts.map +1 -0
  373. package/types/utils/material-color/utils/color.d.ts +172 -0
  374. package/types/utils/material-color/utils/color.d.ts.map +1 -0
  375. package/types/utils/material-color/utils/math.d.ts +94 -0
  376. package/types/utils/material-color/utils/math.d.ts.map +1 -0
  377. package/types/utils/pixelmatch.d.ts +22 -0
  378. package/types/utils/pixelmatch.d.ts.map +1 -0
  379. package/types/utils/popup.d.ts +106 -0
  380. package/types/utils/popup.d.ts.map +1 -0
  381. package/types/utils/searchParams.d.ts +3 -0
  382. package/types/utils/searchParams.d.ts.map +1 -0
  383. package/types/utils/svg.d.ts +7 -0
  384. package/types/utils/svg.d.ts.map +1 -0
  385. package/utils/{hct → material-color}/blend.js +8 -10
  386. package/utils/{hct → material-color/hct}/Cam16.js +196 -69
  387. package/utils/{hct → material-color/hct}/Hct.js +61 -19
  388. package/utils/{hct → material-color/hct}/ViewingConditions.js +3 -3
  389. package/utils/{hct → material-color/hct}/hctSolver.js +9 -16
  390. package/utils/{hct → material-color}/helper.js +11 -18
  391. package/utils/{hct → material-color/palettes}/CorePalette.js +79 -19
  392. package/utils/{hct → material-color/palettes}/TonalPalette.js +12 -4
  393. package/utils/material-color/scheme/Scheme.js +376 -0
  394. package/utils/{hct/colorUtils.js → material-color/utils/color.js} +61 -1
  395. package/utils/pixelmatch.js +360 -0
  396. package/utils/popup.js +127 -30
  397. package/utils/searchParams.js +19 -0
  398. package/components/ExtendedFab.js +0 -36
  399. package/components/Layout.js +0 -35
  400. package/components/ListSelect.js +0 -220
  401. package/components/Nav.js +0 -40
  402. package/components/Option.js +0 -91
  403. package/core/ICustomElement.d.ts +0 -291
  404. package/core/ICustomElement.js +0 -1
  405. package/core/identify.js +0 -40
  406. package/core/typings.d.ts +0 -136
  407. package/core/typings.js +0 -1
  408. package/mixins/SurfaceMixin.js +0 -181
  409. package/theming/loader.js +0 -22
  410. package/utils/hct/Scheme.js +0 -587
  411. /package/{utils/color_keywords.js → constants/colorKeywords.js} +0 -0
  412. /package/utils/{hct/mathUtils.js → material-color/utils/math.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,3 @@
1
+ /** @param {typeof import('../core/CustomElement.js').default} Base */
2
+ export default function TouchTargetMixin(Base: typeof import("../core/CustomElement.js").default): typeof import("../core/CustomElement.js").default;
3
+ //# sourceMappingURL=TouchTargetMixin.d.ts.map
@@ -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,3 @@
1
+ /** @return {void} */
2
+ export function loadGlobalStyles(): void;
3
+ //# sourceMappingURL=rtl.d.ts.map
@@ -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,3 @@
1
+ /** @return {URLSearchParams} */
2
+ export function getSearchParams(): URLSearchParams;
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -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,3 @@
1
+ /** @return {void} */
2
+ export function noop(): void;
3
+ //# sourceMappingURL=function.d.ts.map
@@ -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"}