@react95/core 8.0.0-alpha.0 → 8.0.0-alpha.2

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 (557) hide show
  1. package/@types/Modal/Modal.d.ts +1 -1
  2. package/@types/Modal/ModalContext.d.ts +1 -2
  3. package/@types/Modal/ModalProvider.d.ts +1 -2
  4. package/@types/TaskBar/TaskBar.d.ts +1 -1
  5. package/@types/Tree/Node.d.ts +1 -2
  6. package/@types/index.d.ts +25 -23
  7. package/@types/themes/all.d.ts +36 -36
  8. package/@types/themes/azureOrange.css.d.ts +1 -1
  9. package/@types/themes/bee.css.d.ts +1 -1
  10. package/@types/themes/blackAndWhite.css.d.ts +1 -1
  11. package/@types/themes/brick.css.d.ts +1 -1
  12. package/@types/themes/candy.css.d.ts +1 -1
  13. package/@types/themes/coldGray.css.d.ts +1 -1
  14. package/@types/themes/contract.css.d.ts +66 -8
  15. package/@types/themes/counterStrike.css.d.ts +1 -1
  16. package/@types/themes/eggplant.css.d.ts +1 -1
  17. package/@types/themes/highContrast.css.d.ts +1 -1
  18. package/@types/themes/lilac.css.d.ts +1 -1
  19. package/@types/themes/lilacRoseDark.css.d.ts +1 -1
  20. package/@types/themes/maple.css.d.ts +1 -1
  21. package/@types/themes/marine.css.d.ts +1 -1
  22. package/@types/themes/matrix.css.d.ts +1 -1
  23. package/@types/themes/millenium.css.d.ts +1 -1
  24. package/@types/themes/modernDark.css.d.ts +1 -1
  25. package/@types/themes/molecule.css.d.ts +1 -1
  26. package/@types/themes/ninjaTurtles.css.d.ts +1 -1
  27. package/@types/themes/olive.css.d.ts +1 -1
  28. package/@types/themes/pamelaAnderson.css.d.ts +1 -1
  29. package/@types/themes/plum.css.d.ts +1 -1
  30. package/@types/themes/rainyDay.css.d.ts +1 -1
  31. package/@types/themes/rose.css.d.ts +1 -1
  32. package/@types/themes/slate.css.d.ts +1 -1
  33. package/@types/themes/spruce.css.d.ts +1 -1
  34. package/@types/themes/storm.css.d.ts +1 -1
  35. package/@types/themes/theSixtiesUSA.css.d.ts +1 -1
  36. package/@types/themes/tokyoDark.css.d.ts +1 -1
  37. package/@types/themes/tooSexy.css.d.ts +1 -1
  38. package/@types/themes/travel.css.d.ts +1 -1
  39. package/@types/themes/vaporTeal.css.d.ts +1 -1
  40. package/@types/themes/vermillion.css.d.ts +1 -1
  41. package/@types/themes/violetDark.css.d.ts +1 -1
  42. package/@types/themes/water.css.d.ts +1 -1
  43. package/@types/themes/win95.css.d.ts +1 -1
  44. package/cjs/Alert/Alert.css.js +8 -22
  45. package/cjs/Alert/Alert.css.ts.vanilla.css +15 -0
  46. package/cjs/Alert/Alert.js +33 -79
  47. package/cjs/Alert/assets/chord.mp3.js +3 -0
  48. package/cjs/Avatar/Avatar.css.js +7 -38
  49. package/cjs/Avatar/Avatar.css.ts.vanilla.css +24 -0
  50. package/cjs/Avatar/Avatar.js +25 -39
  51. package/cjs/Button/Button.css.js +4 -34
  52. package/cjs/Button/Button.css.ts.vanilla.css +31 -0
  53. package/cjs/Button/Button.js +19 -22
  54. package/cjs/Checkbox/Checkbox.css.js +10 -72
  55. package/cjs/Checkbox/Checkbox.css.ts.vanilla.css +59 -0
  56. package/cjs/Checkbox/Checkbox.js +16 -36
  57. package/cjs/Cursor/Cursor.css.js +4 -136
  58. package/cjs/Cursor/Cursor.css.ts.vanilla.css +96 -0
  59. package/cjs/Dropdown/Dropdown.css.js +6 -55
  60. package/cjs/Dropdown/Dropdown.css.ts.vanilla.css +50 -0
  61. package/cjs/Dropdown/Dropdown.js +19 -40
  62. package/cjs/Fieldset/Fieldset.css.js +6 -26
  63. package/cjs/Fieldset/Fieldset.css.ts.vanilla.css +19 -0
  64. package/cjs/Fieldset/Fieldset.js +8 -28
  65. package/cjs/Frame/Frame.js +21 -37
  66. package/cjs/Frame/sprinkles.css.js +46 -72
  67. package/cjs/GlobalStyle/GlobalStyle.css.js +2 -129
  68. package/cjs/GlobalStyle/GlobalStyle.css.ts.vanilla.css +122 -0
  69. package/cjs/GlobalStyle.js +4 -0
  70. package/cjs/Input/Input.css.js +4 -29
  71. package/cjs/Input/Input.css.ts.vanilla.css +21 -0
  72. package/cjs/Input/Input.js +25 -19
  73. package/cjs/List/List.css.js +8 -78
  74. package/cjs/List/List.css.ts.vanilla.css +66 -0
  75. package/cjs/List/List.js +14 -23
  76. package/cjs/List/ListDivider.js +18 -19
  77. package/cjs/List/ListItem.js +11 -34
  78. package/cjs/Modal/Modal.css.js +13 -75
  79. package/cjs/Modal/Modal.css.ts.vanilla.css +55 -0
  80. package/cjs/Modal/Modal.js +131 -155
  81. package/cjs/Modal/ModalContext.js +13 -15
  82. package/cjs/Modal/ModalProvider.js +60 -81
  83. package/cjs/Modal/close.svg.js +3 -0
  84. package/cjs/Modal/help.svg.js +3 -0
  85. package/cjs/ProgressBar/ProgressBar.css.js +10 -39
  86. package/cjs/ProgressBar/ProgressBar.css.ts.vanilla.css +32 -0
  87. package/cjs/ProgressBar/ProgressBar.js +19 -38
  88. package/cjs/RadioButton/RadioButton.css.js +10 -54
  89. package/cjs/RadioButton/RadioButton.css.ts.vanilla.css +44 -0
  90. package/cjs/RadioButton/RadioButton.js +16 -31
  91. package/cjs/Range/Range.css.js +4 -58
  92. package/cjs/Range/Range.css.ts.vanilla.css +84 -0
  93. package/cjs/Range/Range.js +35 -22
  94. package/cjs/Tabs/Tab.js +17 -28
  95. package/cjs/Tabs/Tabs.css.js +9 -55
  96. package/cjs/Tabs/Tabs.css.ts.vanilla.css +54 -0
  97. package/cjs/Tabs/Tabs.js +48 -63
  98. package/cjs/TaskBar/Clock.js +29 -45
  99. package/cjs/TaskBar/TaskBar.css.js +11 -81
  100. package/cjs/TaskBar/TaskBar.css.ts.vanilla.css +51 -0
  101. package/cjs/TaskBar/TaskBar.js +72 -91
  102. package/cjs/TaskBar/WindowButton.js +16 -33
  103. package/cjs/TextArea/TextArea.js +25 -19
  104. package/cjs/TitleBar/TitleBar.css.js +11 -77
  105. package/cjs/TitleBar/TitleBar.css.ts.vanilla.css +62 -0
  106. package/cjs/TitleBar/TitleBar.js +44 -52
  107. package/cjs/Tooltip/Tooltip.css.js +6 -30
  108. package/cjs/Tooltip/Tooltip.css.ts.vanilla.css +25 -0
  109. package/cjs/Tooltip/Tooltip.js +66 -54
  110. package/cjs/Tree/Node.js +116 -131
  111. package/cjs/Tree/Tree.css.js +17 -115
  112. package/cjs/Tree/Tree.css.ts.vanilla.css +90 -0
  113. package/cjs/Tree/Tree.js +12 -31
  114. package/cjs/Video/Video.css.js +21 -105
  115. package/cjs/Video/Video.css.ts.vanilla.css +83 -0
  116. package/cjs/Video/Video.js +207 -231
  117. package/cjs/Video/buttons/Fullscreen.js +33 -20
  118. package/cjs/Video/buttons/Pause.js +28 -18
  119. package/cjs/Video/buttons/Play.js +28 -18
  120. package/cjs/Video/buttons/Stop.js +28 -18
  121. package/cjs/index.js +49 -170
  122. package/cjs/themes/azureOrange.css.js +2 -41
  123. package/cjs/themes/azureOrange.css.ts.vanilla.css +58 -0
  124. package/cjs/themes/bee.css.js +2 -41
  125. package/cjs/themes/bee.css.ts.vanilla.css +58 -0
  126. package/cjs/themes/blackAndWhite.css.js +2 -41
  127. package/cjs/themes/blackAndWhite.css.ts.vanilla.css +58 -0
  128. package/cjs/themes/brick.css.js +2 -41
  129. package/cjs/themes/brick.css.ts.vanilla.css +58 -0
  130. package/cjs/themes/candy.css.js +2 -41
  131. package/cjs/themes/candy.css.ts.vanilla.css +58 -0
  132. package/cjs/themes/coldGray.css.js +2 -41
  133. package/cjs/themes/coldGray.css.ts.vanilla.css +58 -0
  134. package/cjs/themes/counterStrike.css.js +2 -41
  135. package/cjs/themes/counterStrike.css.ts.vanilla.css +58 -0
  136. package/cjs/themes/eggplant.css.js +2 -41
  137. package/cjs/themes/eggplant.css.ts.vanilla.css +58 -0
  138. package/cjs/themes/highContrast.css.js +2 -41
  139. package/cjs/themes/highContrast.css.ts.vanilla.css +58 -0
  140. package/cjs/themes/lilac.css.js +2 -41
  141. package/cjs/themes/lilac.css.ts.vanilla.css +58 -0
  142. package/cjs/themes/lilacRoseDark.css.js +2 -41
  143. package/cjs/themes/lilacRoseDark.css.ts.vanilla.css +58 -0
  144. package/cjs/themes/maple.css.js +2 -41
  145. package/cjs/themes/maple.css.ts.vanilla.css +58 -0
  146. package/cjs/themes/marine.css.js +2 -41
  147. package/cjs/themes/marine.css.ts.vanilla.css +58 -0
  148. package/cjs/themes/matrix.css.js +2 -41
  149. package/cjs/themes/matrix.css.ts.vanilla.css +58 -0
  150. package/cjs/themes/millenium.css.js +2 -41
  151. package/cjs/themes/millenium.css.ts.vanilla.css +58 -0
  152. package/cjs/themes/modernDark.css.js +2 -41
  153. package/cjs/themes/modernDark.css.ts.vanilla.css +58 -0
  154. package/cjs/themes/molecule.css.js +2 -41
  155. package/cjs/themes/molecule.css.ts.vanilla.css +58 -0
  156. package/cjs/themes/ninjaTurtles.css.js +2 -41
  157. package/cjs/themes/ninjaTurtles.css.ts.vanilla.css +58 -0
  158. package/cjs/themes/olive.css.js +2 -41
  159. package/cjs/themes/olive.css.ts.vanilla.css +58 -0
  160. package/cjs/themes/pamelaAnderson.css.js +2 -41
  161. package/cjs/themes/pamelaAnderson.css.ts.vanilla.css +58 -0
  162. package/cjs/themes/plum.css.js +2 -41
  163. package/cjs/themes/plum.css.ts.vanilla.css +58 -0
  164. package/cjs/themes/rainyDay.css.js +2 -41
  165. package/cjs/themes/rainyDay.css.ts.vanilla.css +58 -0
  166. package/cjs/themes/rose.css.js +2 -41
  167. package/cjs/themes/rose.css.ts.vanilla.css +58 -0
  168. package/cjs/themes/slate.css.js +2 -41
  169. package/cjs/themes/slate.css.ts.vanilla.css +58 -0
  170. package/cjs/themes/sprinkles.css.ts.vanilla.css +399 -0
  171. package/cjs/themes/spruce.css.js +2 -41
  172. package/cjs/themes/spruce.css.ts.vanilla.css +58 -0
  173. package/cjs/themes/storm.css.js +2 -41
  174. package/cjs/themes/storm.css.ts.vanilla.css +58 -0
  175. package/cjs/themes/theSixtiesUSA.css.js +2 -41
  176. package/cjs/themes/theSixtiesUSA.css.ts.vanilla.css +58 -0
  177. package/cjs/themes/tokyoDark.css.js +2 -41
  178. package/cjs/themes/tokyoDark.css.ts.vanilla.css +58 -0
  179. package/cjs/themes/tooSexy.css.js +2 -41
  180. package/cjs/themes/tooSexy.css.ts.vanilla.css +58 -0
  181. package/cjs/themes/travel.css.js +2 -41
  182. package/cjs/themes/travel.css.ts.vanilla.css +58 -0
  183. package/cjs/themes/vaporTeal.css.js +2 -41
  184. package/cjs/themes/vaporTeal.css.ts.vanilla.css +58 -0
  185. package/cjs/themes/vermillion.css.js +2 -41
  186. package/cjs/themes/vermillion.css.ts.vanilla.css +58 -0
  187. package/cjs/themes/violetDark.css.js +2 -41
  188. package/cjs/themes/violetDark.css.ts.vanilla.css +58 -0
  189. package/cjs/themes/water.css.js +2 -41
  190. package/cjs/themes/water.css.ts.vanilla.css +58 -0
  191. package/cjs/themes/win95.css.js +2 -41
  192. package/cjs/themes/win95.css.ts.vanilla.css +58 -0
  193. package/cjs/themes.js +72 -0
  194. package/esm/Alert/Alert.css.js +9 -17
  195. package/esm/Alert/Alert.css.ts.vanilla.css +15 -0
  196. package/esm/Alert/Alert.js +34 -71
  197. package/esm/Alert/assets/chord.mp3.js +4 -0
  198. package/esm/Avatar/Avatar.css.js +8 -33
  199. package/esm/Avatar/Avatar.css.ts.vanilla.css +24 -0
  200. package/esm/Avatar/Avatar.js +9 -30
  201. package/esm/Button/Button.css.js +5 -29
  202. package/esm/Button/Button.css.ts.vanilla.css +31 -0
  203. package/esm/Button/Button.js +20 -13
  204. package/esm/Checkbox/Checkbox.css.js +11 -66
  205. package/esm/Checkbox/Checkbox.css.ts.vanilla.css +59 -0
  206. package/esm/Checkbox/Checkbox.js +17 -28
  207. package/esm/Cursor/Cursor.css.js +5 -130
  208. package/esm/Cursor/Cursor.css.ts.vanilla.css +96 -0
  209. package/esm/Dropdown/Dropdown.css.js +7 -49
  210. package/esm/Dropdown/Dropdown.css.ts.vanilla.css +50 -0
  211. package/esm/Dropdown/Dropdown.js +20 -31
  212. package/esm/Fieldset/Fieldset.css.js +7 -21
  213. package/esm/Fieldset/Fieldset.css.ts.vanilla.css +19 -0
  214. package/esm/Fieldset/Fieldset.js +9 -20
  215. package/esm/Frame/Frame.js +22 -29
  216. package/esm/Frame/sprinkles.css.js +47 -67
  217. package/esm/GlobalStyle/GlobalStyle.css.js +2 -123
  218. package/esm/GlobalStyle/GlobalStyle.css.ts.vanilla.css +122 -0
  219. package/esm/GlobalStyle.js +4 -0
  220. package/esm/Input/Input.css.js +5 -24
  221. package/esm/Input/Input.css.ts.vanilla.css +21 -0
  222. package/esm/Input/Input.js +9 -11
  223. package/esm/List/List.css.js +9 -72
  224. package/esm/List/List.css.ts.vanilla.css +66 -0
  225. package/esm/List/List.js +15 -17
  226. package/esm/List/ListDivider.js +19 -13
  227. package/esm/List/ListItem.js +12 -25
  228. package/esm/Modal/Modal.css.js +14 -70
  229. package/esm/Modal/Modal.css.ts.vanilla.css +55 -0
  230. package/esm/Modal/Modal.js +115 -146
  231. package/esm/Modal/ModalContext.js +14 -9
  232. package/esm/Modal/ModalProvider.js +44 -74
  233. package/esm/Modal/close.svg.js +4 -0
  234. package/esm/Modal/help.svg.js +4 -0
  235. package/esm/ProgressBar/ProgressBar.css.js +11 -34
  236. package/esm/ProgressBar/ProgressBar.css.ts.vanilla.css +32 -0
  237. package/esm/ProgressBar/ProgressBar.js +20 -29
  238. package/esm/RadioButton/RadioButton.css.js +11 -49
  239. package/esm/RadioButton/RadioButton.css.ts.vanilla.css +44 -0
  240. package/esm/RadioButton/RadioButton.js +17 -23
  241. package/esm/Range/Range.css.js +4 -52
  242. package/esm/Range/Range.css.ts.vanilla.css +84 -0
  243. package/esm/Range/Range.js +19 -13
  244. package/esm/Tabs/Tab.js +18 -19
  245. package/esm/Tabs/Tabs.css.js +10 -50
  246. package/esm/Tabs/Tabs.css.ts.vanilla.css +54 -0
  247. package/esm/Tabs/Tabs.js +49 -54
  248. package/esm/TaskBar/Clock.js +30 -36
  249. package/esm/TaskBar/TaskBar.css.js +12 -76
  250. package/esm/TaskBar/TaskBar.css.ts.vanilla.css +51 -0
  251. package/esm/TaskBar/TaskBar.js +73 -82
  252. package/esm/TaskBar/WindowButton.js +17 -25
  253. package/esm/TextArea/TextArea.js +9 -11
  254. package/esm/TitleBar/TitleBar.css.js +12 -72
  255. package/esm/TitleBar/TitleBar.css.ts.vanilla.css +62 -0
  256. package/esm/TitleBar/TitleBar.js +44 -42
  257. package/esm/Tooltip/Tooltip.css.js +7 -25
  258. package/esm/Tooltip/Tooltip.css.ts.vanilla.css +25 -0
  259. package/esm/Tooltip/Tooltip.js +50 -45
  260. package/esm/Tree/Node.js +92 -114
  261. package/esm/Tree/Tree.css.js +17 -109
  262. package/esm/Tree/Tree.css.ts.vanilla.css +90 -0
  263. package/esm/Tree/Tree.js +13 -23
  264. package/esm/Video/Video.css.js +22 -100
  265. package/esm/Video/Video.css.ts.vanilla.css +83 -0
  266. package/esm/Video/Video.js +191 -222
  267. package/esm/Video/buttons/Fullscreen.js +17 -11
  268. package/esm/Video/buttons/Pause.js +12 -9
  269. package/esm/Video/buttons/Play.js +12 -9
  270. package/esm/Video/buttons/Stop.js +12 -9
  271. package/esm/index.js +50 -23
  272. package/esm/themes/azureOrange.css.js +2 -36
  273. package/esm/themes/azureOrange.css.ts.vanilla.css +58 -0
  274. package/esm/themes/bee.css.js +2 -36
  275. package/esm/themes/bee.css.ts.vanilla.css +58 -0
  276. package/esm/themes/blackAndWhite.css.js +2 -36
  277. package/esm/themes/blackAndWhite.css.ts.vanilla.css +58 -0
  278. package/esm/themes/brick.css.js +2 -36
  279. package/esm/themes/brick.css.ts.vanilla.css +58 -0
  280. package/esm/themes/candy.css.js +2 -36
  281. package/esm/themes/candy.css.ts.vanilla.css +58 -0
  282. package/esm/themes/coldGray.css.js +2 -36
  283. package/esm/themes/coldGray.css.ts.vanilla.css +58 -0
  284. package/esm/themes/counterStrike.css.js +2 -36
  285. package/esm/themes/counterStrike.css.ts.vanilla.css +58 -0
  286. package/esm/themes/eggplant.css.js +2 -36
  287. package/esm/themes/eggplant.css.ts.vanilla.css +58 -0
  288. package/esm/themes/highContrast.css.js +2 -36
  289. package/esm/themes/highContrast.css.ts.vanilla.css +58 -0
  290. package/esm/themes/lilac.css.js +2 -36
  291. package/esm/themes/lilac.css.ts.vanilla.css +58 -0
  292. package/esm/themes/lilacRoseDark.css.js +2 -36
  293. package/esm/themes/lilacRoseDark.css.ts.vanilla.css +58 -0
  294. package/esm/themes/maple.css.js +2 -36
  295. package/esm/themes/maple.css.ts.vanilla.css +58 -0
  296. package/esm/themes/marine.css.js +2 -36
  297. package/esm/themes/marine.css.ts.vanilla.css +58 -0
  298. package/esm/themes/matrix.css.js +2 -36
  299. package/esm/themes/matrix.css.ts.vanilla.css +58 -0
  300. package/esm/themes/millenium.css.js +2 -36
  301. package/esm/themes/millenium.css.ts.vanilla.css +58 -0
  302. package/esm/themes/modernDark.css.js +2 -36
  303. package/esm/themes/modernDark.css.ts.vanilla.css +58 -0
  304. package/esm/themes/molecule.css.js +2 -36
  305. package/esm/themes/molecule.css.ts.vanilla.css +58 -0
  306. package/esm/themes/ninjaTurtles.css.js +2 -36
  307. package/esm/themes/ninjaTurtles.css.ts.vanilla.css +58 -0
  308. package/esm/themes/olive.css.js +2 -36
  309. package/esm/themes/olive.css.ts.vanilla.css +58 -0
  310. package/esm/themes/pamelaAnderson.css.js +2 -36
  311. package/esm/themes/pamelaAnderson.css.ts.vanilla.css +58 -0
  312. package/esm/themes/plum.css.js +2 -36
  313. package/esm/themes/plum.css.ts.vanilla.css +58 -0
  314. package/esm/themes/rainyDay.css.js +2 -36
  315. package/esm/themes/rainyDay.css.ts.vanilla.css +58 -0
  316. package/esm/themes/rose.css.js +2 -36
  317. package/esm/themes/rose.css.ts.vanilla.css +58 -0
  318. package/esm/themes/slate.css.js +2 -36
  319. package/esm/themes/slate.css.ts.vanilla.css +58 -0
  320. package/esm/themes/sprinkles.css.ts.vanilla.css +399 -0
  321. package/esm/themes/spruce.css.js +2 -36
  322. package/esm/themes/spruce.css.ts.vanilla.css +58 -0
  323. package/esm/themes/storm.css.js +2 -36
  324. package/esm/themes/storm.css.ts.vanilla.css +58 -0
  325. package/esm/themes/theSixtiesUSA.css.js +2 -36
  326. package/esm/themes/theSixtiesUSA.css.ts.vanilla.css +58 -0
  327. package/esm/themes/tokyoDark.css.js +2 -36
  328. package/esm/themes/tokyoDark.css.ts.vanilla.css +58 -0
  329. package/esm/themes/tooSexy.css.js +2 -36
  330. package/esm/themes/tooSexy.css.ts.vanilla.css +58 -0
  331. package/esm/themes/travel.css.js +2 -36
  332. package/esm/themes/travel.css.ts.vanilla.css +58 -0
  333. package/esm/themes/vaporTeal.css.js +2 -36
  334. package/esm/themes/vaporTeal.css.ts.vanilla.css +58 -0
  335. package/esm/themes/vermillion.css.js +2 -36
  336. package/esm/themes/vermillion.css.ts.vanilla.css +58 -0
  337. package/esm/themes/violetDark.css.js +2 -36
  338. package/esm/themes/violetDark.css.ts.vanilla.css +58 -0
  339. package/esm/themes/water.css.js +2 -36
  340. package/esm/themes/water.css.ts.vanilla.css +58 -0
  341. package/esm/themes/win95.css.js +2 -36
  342. package/esm/themes/win95.css.ts.vanilla.css +58 -0
  343. package/esm/themes.js +72 -0
  344. package/package.json +20 -2
  345. package/@types/Alert/index.d.ts +0 -2
  346. package/@types/Avatar/index.d.ts +0 -2
  347. package/@types/Button/index.d.ts +0 -2
  348. package/@types/Checkbox/index.d.ts +0 -2
  349. package/@types/Cursor/index.d.ts +0 -2
  350. package/@types/Dropdown/index.d.ts +0 -2
  351. package/@types/Fieldset/index.d.ts +0 -2
  352. package/@types/Frame/index.d.ts +0 -2
  353. package/@types/GlobalStyle/utils.d.ts +0 -15
  354. package/@types/Input/index.d.ts +0 -2
  355. package/@types/List/index.d.ts +0 -2
  356. package/@types/Modal/index.d.ts +0 -4
  357. package/@types/ProgressBar/index.d.ts +0 -2
  358. package/@types/RadioButton/index.d.ts +0 -2
  359. package/@types/Range/index.d.ts +0 -2
  360. package/@types/Tabs/index.d.ts +0 -3
  361. package/@types/TaskBar/index.d.ts +0 -2
  362. package/@types/TextArea/index.d.ts +0 -2
  363. package/@types/TitleBar/index.d.ts +0 -2
  364. package/@types/Tooltip/index.d.ts +0 -2
  365. package/@types/Tree/index.d.ts +0 -2
  366. package/@types/Video/index.d.ts +0 -2
  367. package/@types/shared/test/utils.d.ts +0 -4
  368. package/cjs/Alert/assets/chord.mp3 +0 -0
  369. package/cjs/Alert/index.js +0 -8
  370. package/cjs/Avatar/index.js +0 -8
  371. package/cjs/Button/index.js +0 -8
  372. package/cjs/Checkbox/imgs/check-disabled.svg +0 -1
  373. package/cjs/Checkbox/imgs/check.svg +0 -1
  374. package/cjs/Checkbox/index.js +0 -8
  375. package/cjs/Cursor/cursors/AngleUpLeft.png +0 -0
  376. package/cjs/Cursor/cursors/AngleUpRight.png +0 -0
  377. package/cjs/Cursor/cursors/AppStarting.png +0 -0
  378. package/cjs/Cursor/cursors/Arrow.png +0 -0
  379. package/cjs/Cursor/cursors/ArrowRight.png +0 -0
  380. package/cjs/Cursor/cursors/Circle.png +0 -0
  381. package/cjs/Cursor/cursors/ColRezise.png +0 -0
  382. package/cjs/Cursor/cursors/Copy.png +0 -0
  383. package/cjs/Cursor/cursors/Cross.png +0 -0
  384. package/cjs/Cursor/cursors/Crosshair.png +0 -0
  385. package/cjs/Cursor/cursors/DND-ask.png +0 -0
  386. package/cjs/Cursor/cursors/DND-copy.png +0 -0
  387. package/cjs/Cursor/cursors/DND-link.png +0 -0
  388. package/cjs/Cursor/cursors/DownArrow.png +0 -0
  389. package/cjs/Cursor/cursors/DownLeftArrow.png +0 -0
  390. package/cjs/Cursor/cursors/DownRightArrow.png +0 -0
  391. package/cjs/Cursor/cursors/Hand.png +0 -0
  392. package/cjs/Cursor/cursors/HandPointer.png +0 -0
  393. package/cjs/Cursor/cursors/Handsqueezed.png +0 -0
  394. package/cjs/Cursor/cursors/Handwriting.png +0 -0
  395. package/cjs/Cursor/cursors/Help.png +0 -0
  396. package/cjs/Cursor/cursors/LeftArrow.png +0 -0
  397. package/cjs/Cursor/cursors/LeftRight.png +0 -0
  398. package/cjs/Cursor/cursors/LeftRightArrow.png +0 -0
  399. package/cjs/Cursor/cursors/Link.png +0 -0
  400. package/cjs/Cursor/cursors/Move.png +0 -0
  401. package/cjs/Cursor/cursors/NO.png +0 -0
  402. package/cjs/Cursor/cursors/RightArrow.png +0 -0
  403. package/cjs/Cursor/cursors/RowResize.png +0 -0
  404. package/cjs/Cursor/cursors/SizeAll.png +0 -0
  405. package/cjs/Cursor/cursors/Text.png +0 -0
  406. package/cjs/Cursor/cursors/UpArrow.png +0 -0
  407. package/cjs/Cursor/cursors/UpDownArrow.png +0 -0
  408. package/cjs/Cursor/cursors/UpLeftArrow.png +0 -0
  409. package/cjs/Cursor/cursors/UpRightArrow.png +0 -0
  410. package/cjs/Cursor/cursors/VText.png +0 -0
  411. package/cjs/Cursor/cursors/Wait.png +0 -0
  412. package/cjs/Cursor/cursors/X.png +0 -0
  413. package/cjs/Cursor/cursors/ZoomIn.png +0 -0
  414. package/cjs/Cursor/cursors/ZoomOut.png +0 -0
  415. package/cjs/Cursor/index.js +0 -8
  416. package/cjs/Dropdown/imgs/downcaret.png +0 -0
  417. package/cjs/Dropdown/imgs/downcaret.svg +0 -1
  418. package/cjs/Dropdown/index.js +0 -8
  419. package/cjs/Fieldset/index.js +0 -8
  420. package/cjs/Frame/index.js +0 -8
  421. package/cjs/Frame/props.js +0 -162
  422. package/cjs/GlobalStyle/font/MS-Sans-Serif-8pt-bold.ttf +0 -0
  423. package/cjs/GlobalStyle/font/MS-Sans-Serif-8pt.ttf +0 -0
  424. package/cjs/GlobalStyle/font/React95Video-Numbers.eot +0 -0
  425. package/cjs/GlobalStyle/font/React95Video-Numbers.ttf +0 -0
  426. package/cjs/GlobalStyle/font/React95Video-Numbers.woff +0 -0
  427. package/cjs/GlobalStyle/font/React95Video-Numbers.woff2 +0 -0
  428. package/cjs/GlobalStyle/imgs/downcaret.svg +0 -1
  429. package/cjs/GlobalStyle/imgs/dropdown.png +0 -0
  430. package/cjs/GlobalStyle/imgs/leftcaret.svg +0 -1
  431. package/cjs/GlobalStyle/imgs/rightcaret.svg +0 -1
  432. package/cjs/GlobalStyle/imgs/upcaret.svg +0 -1
  433. package/cjs/GlobalStyle/utils.js +0 -23
  434. package/cjs/Input/index.js +0 -8
  435. package/cjs/List/index.js +0 -8
  436. package/cjs/Modal/close.svg +0 -1
  437. package/cjs/Modal/help.svg +0 -1
  438. package/cjs/Modal/index.js +0 -27
  439. package/cjs/Modal/maximize.svg +0 -1
  440. package/cjs/Modal/minimize.svg +0 -1
  441. package/cjs/Modal/restore.svg +0 -1
  442. package/cjs/ProgressBar/index.js +0 -8
  443. package/cjs/RadioButton/imgs/radio-checked-disabled.png +0 -0
  444. package/cjs/RadioButton/imgs/radio-checked.png +0 -0
  445. package/cjs/RadioButton/imgs/radio-unchecked-disabled.png +0 -0
  446. package/cjs/RadioButton/imgs/radio-unchecked.png +0 -0
  447. package/cjs/RadioButton/index.js +0 -8
  448. package/cjs/RadioButton/radioButtonStates.js +0 -34
  449. package/cjs/Range/index.js +0 -8
  450. package/cjs/Tabs/index.js +0 -19
  451. package/cjs/TaskBar/index.js +0 -8
  452. package/cjs/TextArea/index.js +0 -8
  453. package/cjs/TitleBar/index.js +0 -8
  454. package/cjs/Tooltip/index.js +0 -8
  455. package/cjs/Tree/index.js +0 -8
  456. package/cjs/Video/buttons/index.js +0 -34
  457. package/cjs/Video/index.js +0 -8
  458. package/cjs/shared/test/utils.js +0 -74
  459. package/cjs/themes/all.js +0 -250
  460. package/cjs/themes/baseTheme.css.js +0 -69
  461. package/cjs/themes/contract.css.js +0 -21
  462. package/esm/Alert/assets/chord.mp3 +0 -0
  463. package/esm/Alert/index.js +0 -2
  464. package/esm/Avatar/index.js +0 -2
  465. package/esm/Button/index.js +0 -2
  466. package/esm/Checkbox/imgs/check-disabled.svg +0 -1
  467. package/esm/Checkbox/imgs/check.svg +0 -1
  468. package/esm/Checkbox/index.js +0 -2
  469. package/esm/Cursor/cursors/AngleUpLeft.png +0 -0
  470. package/esm/Cursor/cursors/AngleUpRight.png +0 -0
  471. package/esm/Cursor/cursors/AppStarting.png +0 -0
  472. package/esm/Cursor/cursors/Arrow.png +0 -0
  473. package/esm/Cursor/cursors/ArrowRight.png +0 -0
  474. package/esm/Cursor/cursors/Circle.png +0 -0
  475. package/esm/Cursor/cursors/ColRezise.png +0 -0
  476. package/esm/Cursor/cursors/Copy.png +0 -0
  477. package/esm/Cursor/cursors/Cross.png +0 -0
  478. package/esm/Cursor/cursors/Crosshair.png +0 -0
  479. package/esm/Cursor/cursors/DND-ask.png +0 -0
  480. package/esm/Cursor/cursors/DND-copy.png +0 -0
  481. package/esm/Cursor/cursors/DND-link.png +0 -0
  482. package/esm/Cursor/cursors/DownArrow.png +0 -0
  483. package/esm/Cursor/cursors/DownLeftArrow.png +0 -0
  484. package/esm/Cursor/cursors/DownRightArrow.png +0 -0
  485. package/esm/Cursor/cursors/Hand.png +0 -0
  486. package/esm/Cursor/cursors/HandPointer.png +0 -0
  487. package/esm/Cursor/cursors/Handsqueezed.png +0 -0
  488. package/esm/Cursor/cursors/Handwriting.png +0 -0
  489. package/esm/Cursor/cursors/Help.png +0 -0
  490. package/esm/Cursor/cursors/LeftArrow.png +0 -0
  491. package/esm/Cursor/cursors/LeftRight.png +0 -0
  492. package/esm/Cursor/cursors/LeftRightArrow.png +0 -0
  493. package/esm/Cursor/cursors/Link.png +0 -0
  494. package/esm/Cursor/cursors/Move.png +0 -0
  495. package/esm/Cursor/cursors/NO.png +0 -0
  496. package/esm/Cursor/cursors/RightArrow.png +0 -0
  497. package/esm/Cursor/cursors/RowResize.png +0 -0
  498. package/esm/Cursor/cursors/SizeAll.png +0 -0
  499. package/esm/Cursor/cursors/Text.png +0 -0
  500. package/esm/Cursor/cursors/UpArrow.png +0 -0
  501. package/esm/Cursor/cursors/UpDownArrow.png +0 -0
  502. package/esm/Cursor/cursors/UpLeftArrow.png +0 -0
  503. package/esm/Cursor/cursors/UpRightArrow.png +0 -0
  504. package/esm/Cursor/cursors/VText.png +0 -0
  505. package/esm/Cursor/cursors/Wait.png +0 -0
  506. package/esm/Cursor/cursors/X.png +0 -0
  507. package/esm/Cursor/cursors/ZoomIn.png +0 -0
  508. package/esm/Cursor/cursors/ZoomOut.png +0 -0
  509. package/esm/Cursor/index.js +0 -2
  510. package/esm/Dropdown/imgs/downcaret.png +0 -0
  511. package/esm/Dropdown/imgs/downcaret.svg +0 -1
  512. package/esm/Dropdown/index.js +0 -2
  513. package/esm/Fieldset/index.js +0 -2
  514. package/esm/Frame/index.js +0 -2
  515. package/esm/Frame/props.js +0 -156
  516. package/esm/GlobalStyle/font/MS-Sans-Serif-8pt-bold.ttf +0 -0
  517. package/esm/GlobalStyle/font/MS-Sans-Serif-8pt.ttf +0 -0
  518. package/esm/GlobalStyle/font/React95Video-Numbers.eot +0 -0
  519. package/esm/GlobalStyle/font/React95Video-Numbers.ttf +0 -0
  520. package/esm/GlobalStyle/font/React95Video-Numbers.woff +0 -0
  521. package/esm/GlobalStyle/font/React95Video-Numbers.woff2 +0 -0
  522. package/esm/GlobalStyle/imgs/downcaret.svg +0 -1
  523. package/esm/GlobalStyle/imgs/dropdown.png +0 -0
  524. package/esm/GlobalStyle/imgs/leftcaret.svg +0 -1
  525. package/esm/GlobalStyle/imgs/rightcaret.svg +0 -1
  526. package/esm/GlobalStyle/imgs/upcaret.svg +0 -1
  527. package/esm/GlobalStyle/utils.js +0 -17
  528. package/esm/Input/index.js +0 -2
  529. package/esm/List/index.js +0 -2
  530. package/esm/Modal/close.svg +0 -1
  531. package/esm/Modal/help.svg +0 -1
  532. package/esm/Modal/index.js +0 -4
  533. package/esm/Modal/maximize.svg +0 -1
  534. package/esm/Modal/minimize.svg +0 -1
  535. package/esm/Modal/restore.svg +0 -1
  536. package/esm/ProgressBar/index.js +0 -2
  537. package/esm/RadioButton/imgs/radio-checked-disabled.png +0 -0
  538. package/esm/RadioButton/imgs/radio-checked.png +0 -0
  539. package/esm/RadioButton/imgs/radio-unchecked-disabled.png +0 -0
  540. package/esm/RadioButton/imgs/radio-unchecked.png +0 -0
  541. package/esm/RadioButton/index.js +0 -2
  542. package/esm/RadioButton/radioButtonStates.js +0 -5
  543. package/esm/Range/index.js +0 -2
  544. package/esm/Tabs/index.js +0 -3
  545. package/esm/TaskBar/index.js +0 -2
  546. package/esm/TextArea/index.js +0 -2
  547. package/esm/TitleBar/index.js +0 -2
  548. package/esm/Tooltip/index.js +0 -2
  549. package/esm/Tree/index.js +0 -2
  550. package/esm/Video/buttons/index.js +0 -5
  551. package/esm/Video/index.js +0 -2
  552. package/esm/shared/test/utils.js +0 -49
  553. package/esm/themes/all.js +0 -36
  554. package/esm/themes/baseTheme.css.js +0 -63
  555. package/esm/themes/contract.css.js +0 -15
  556. /package/@types/{GlobalStyle/GlobalStyle.css.d.ts → shared/font-names.d.ts} +0 -0
  557. /package/@types/themes/{baseTheme.css.d.ts → baseTheme.d.ts} +0 -0
@@ -1,100 +1,22 @@
1
- import { globalStyle, style } from '@vanilla-extract/css';
2
- import { recipe } from '@vanilla-extract/recipes';
3
- import { contract } from '../themes/contract.css';
4
- import { R95VideoNumbers } from '../GlobalStyle/GlobalStyle.css';
5
- import { calc } from '@vanilla-extract/css-utils';
6
- export var videoTag = recipe({
7
- base: {
8
- width: '100%',
9
- padding: contract.space[2]
10
- },
11
- variants: {
12
- visible: {
13
- "true": {
14
- display: 'block'
15
- },
16
- "false": {
17
- display: 'none'
18
- }
19
- }
20
- }
21
- });
22
- export var controls = style({
23
- display: 'flex',
24
- alignItems: 'center',
25
- paddingTop: contract.space[2],
26
- paddingBottom: contract.space[2]
27
- });
28
- export var countDownContainer = style({
29
- display: 'flex',
30
- padding: contract.space[6],
31
- marginBottom: contract.space[4],
32
- boxShadow: contract.shadows["in"],
33
- backgroundColor: contract.colors.canvas,
34
- height: '50px',
35
- color: contract.colors.canvasText
36
- });
37
- export var videoFont = style({
38
- fontFamily: R95VideoNumbers,
39
- textTransform: 'uppercase'
40
- });
41
- export var currentTime = style({
42
- marginTop: 'auto',
43
- fontSize: 22
44
- });
45
- export var elapsedTime = style({
46
- height: contract.space[12]
47
- });
48
- export var divider = style({
49
- display: 'block',
50
- height: contract.space[1],
51
- borderTopStyle: 'solid',
52
- borderTopWidth: contract.space[1],
53
- borderTopColor: contract.colors.borderDark,
54
- borderBottomWidth: contract.space[1],
55
- borderBottomStyle: 'solid',
56
- borderBottomColor: contract.colors.borderLightest,
57
- marginBottom: contract.space[2]
58
- });
59
- export var controlBtn = style({
60
- display: 'inline-flex',
61
- justifyContent: 'center',
62
- alignItems: 'center',
63
- width: contract.space[20],
64
- height: contract.space[20],
65
- padding: contract.space[7],
66
- selectors: {
67
- '&:active, &:focus': {
68
- width: contract.space[20],
69
- height: contract.space[20],
70
- padding: contract.space[7]
71
- },
72
- '&:disabled': {
73
- padding: contract.space[4]
74
- }
75
- }
76
- });
77
- globalStyle("".concat(controlBtn, " svg"), {
78
- fill: contract.colors.materialText
79
- });
80
- globalStyle("".concat(controlBtn, ":disabled svg"), {
81
- fill: contract.colors.borderDark,
82
- borderBottomWidth: contract.space[1],
83
- borderBottomStyle: 'solid',
84
- borderBottomColor: contract.colors.borderLightest,
85
- borderRightWidth: contract.space[1],
86
- borderRightStyle: 'solid',
87
- borderRightColor: contract.colors.borderLightest
88
- });
89
- export var range = style({
90
- selectors: {
91
- '&::-webkit-slider-thumb': {
92
- height: contract.space[18],
93
- marginTop: calc.negate(contract.space[7]),
94
- width: contract.space[10]
95
- },
96
- "&[value='0']::-webkit-slider-thumb": {
97
- marginLeft: calc.negate(contract.space[2])
98
- }
99
- }
100
- });
1
+ import './Video.css.ts.vanilla.css';
2
+ /* empty css */import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
3
+ var controlBtn = "r95_13gnpv09";
4
+ var controls = "r95_13gnpv03";
5
+ var countDownContainer = "r95_13gnpv04";
6
+ var currentTime = "r95_13gnpv06";
7
+ var divider = "r95_13gnpv08";
8
+ var elapsedTime = "r95_13gnpv07";
9
+ var range = "r95_13gnpv0a";
10
+ var videoFont = "r95_13gnpv05";
11
+ var videoTag = createRuntimeFn({ defaultClassName: "r95_13gnpv00", variantClassNames: { visible: { true: "r95_13gnpv01", false: "r95_13gnpv02" } }, defaultVariants: {}, compoundVariants: [] });
12
+ export {
13
+ controlBtn,
14
+ controls,
15
+ countDownContainer,
16
+ currentTime,
17
+ divider,
18
+ elapsedTime,
19
+ range,
20
+ videoFont,
21
+ videoTag
22
+ };
@@ -0,0 +1,83 @@
1
+ .r95_13gnpv00 {
2
+ width: 100%;
3
+ padding: var(--r95-space-2);
4
+ }
5
+ .r95_13gnpv01 {
6
+ display: block;
7
+ }
8
+ .r95_13gnpv02 {
9
+ display: none;
10
+ }
11
+ .r95_13gnpv03 {
12
+ display: flex;
13
+ align-items: center;
14
+ padding-top: var(--r95-space-2);
15
+ padding-bottom: var(--r95-space-2);
16
+ }
17
+ .r95_13gnpv04 {
18
+ display: flex;
19
+ padding: var(--r95-space-6);
20
+ margin-bottom: var(--r95-space-4);
21
+ box-shadow: var(--r95-shadow-in);
22
+ background-color: var(--r95-color-canvas);
23
+ height: 50px;
24
+ color: var(--r95-color-canvasText);
25
+ }
26
+ .r95_13gnpv05 {
27
+ font-family: React95Video-Numbers;
28
+ text-transform: uppercase;
29
+ }
30
+ .r95_13gnpv06 {
31
+ margin-top: auto;
32
+ font-size: 22px;
33
+ }
34
+ .r95_13gnpv07 {
35
+ height: var(--r95-space-12);
36
+ }
37
+ .r95_13gnpv08 {
38
+ display: block;
39
+ height: var(--r95-space-1);
40
+ border-top-style: solid;
41
+ border-top-width: var(--r95-space-1);
42
+ border-top-color: var(--r95-color-borderDark);
43
+ border-bottom-width: var(--r95-space-1);
44
+ border-bottom-style: solid;
45
+ border-bottom-color: var(--r95-color-borderLightest);
46
+ margin-bottom: var(--r95-space-2);
47
+ }
48
+ .r95_13gnpv09 {
49
+ display: inline-flex;
50
+ justify-content: center;
51
+ align-items: center;
52
+ width: var(--r95-space-20);
53
+ height: var(--r95-space-20);
54
+ padding: var(--r95-space-7);
55
+ }
56
+ .r95_13gnpv09:active, .r95_13gnpv09:focus {
57
+ width: var(--r95-space-20);
58
+ height: var(--r95-space-20);
59
+ padding: var(--r95-space-7);
60
+ }
61
+ .r95_13gnpv09:disabled {
62
+ padding: var(--r95-space-4);
63
+ }
64
+ .r95_13gnpv09 svg {
65
+ fill: var(--r95-color-materialText);
66
+ }
67
+ .r95_13gnpv09:disabled svg {
68
+ fill: var(--r95-color-borderDark);
69
+ border-bottom-width: var(--r95-space-1);
70
+ border-bottom-style: solid;
71
+ border-bottom-color: var(--r95-color-borderLightest);
72
+ border-right-width: var(--r95-space-1);
73
+ border-right-style: solid;
74
+ border-right-color: var(--r95-color-borderLightest);
75
+ }
76
+ .r95_13gnpv0a::-webkit-slider-thumb {
77
+ height: var(--r95-space-18);
78
+ margin-top: calc(var(--r95-space-7) * -1);
79
+ width: var(--r95-space-10);
80
+ }
81
+ .r95_13gnpv0a[value='0']::-webkit-slider-thumb {
82
+ margin-left: calc(var(--r95-space-2) * -1);
83
+ }
@@ -1,237 +1,206 @@
1
- var _excluded = ["name", "src", "videoProps"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
8
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
- import * as React from 'react';
12
- import { Mplayer113, User4 } from '@react95/icons';
13
- import * as styles from './Video.css';
14
- import { Frame } from '../Frame/Frame';
15
- import Button from '../Button';
16
- import Range from '../Range';
17
- import TitleBar from '../TitleBar';
18
- import { Play, Pause, Stop, Fullscreen } from './buttons';
19
- import cn from 'classnames';
20
- var Source = function Source(_ref) {
21
- var src = _ref.src;
22
- return /*#__PURE__*/React.createElement("source", {
23
- src: src,
24
- type: "video/".concat(src.substring(src.length - 3))
25
- });
26
- };
27
- var PlayOrPause = function PlayOrPause(_ref2) {
28
- var playing = _ref2.playing;
29
- return playing ? /*#__PURE__*/React.createElement(Pause, null) : /*#__PURE__*/React.createElement(Play, null);
30
- };
31
- var arrayFy = function arrayFy(str) {
32
- return [].concat(str);
33
- };
1
+ import * as React from "react";
2
+ import { Mplayer113, User4 } from "@react95/icons";
3
+ import { videoTag, divider, countDownContainer, videoFont, currentTime, elapsedTime, controls, controlBtn, range } from "./Video.css.js";
4
+ import { Frame } from "../Frame/Frame.js";
5
+ import { Button } from "../Button/Button.js";
6
+ import { Range } from "../Range/Range.js";
7
+ import { TitleBar } from "../TitleBar/TitleBar.js";
8
+ import Play from "./buttons/Play.js";
9
+ import Pause from "./buttons/Pause.js";
10
+ import Stop from "./buttons/Stop.js";
11
+ import Fullscreen from "./buttons/Fullscreen.js";
12
+ import cn from "classnames";
13
+ const Source = ({ src }) => /* @__PURE__ */ React.createElement("source", { src, type: `video/${src.substring(src.length - 3)}` });
14
+ const PlayOrPause = ({ playing }) => playing ? /* @__PURE__ */ React.createElement(Pause, null) : /* @__PURE__ */ React.createElement(Play, null);
15
+ const arrayFy = (str) => [].concat(str);
34
16
  function updateProgressBar(player, updateProgress) {
35
- var percentage = Math.floor(100 / player.duration * player.currentTime);
17
+ const percentage = Math.floor(100 / player.duration * player.currentTime);
36
18
  updateProgress(percentage);
37
19
  }
38
20
  function parseCurrentTime(secs) {
39
21
  if (!secs) {
40
- return '00:00';
22
+ return "00:00";
41
23
  }
42
- var sec = parseInt(secs.toString(), 10);
43
- var hours = Math.floor(sec / 3600);
44
- var minutes = Math.floor(sec / 60) % 60;
45
- var seconds = sec % 60;
46
- return [hours, minutes, seconds].map(function (v) {
47
- return v < 10 ? "0".concat(v) : v;
48
- }).filter(function (v, i) {
49
- return v !== '00' || i > 0;
50
- }).join(':');
24
+ const sec = parseInt(secs.toString(), 10);
25
+ const hours = Math.floor(sec / 3600);
26
+ const minutes = Math.floor(sec / 60) % 60;
27
+ const seconds = sec % 60;
28
+ return [hours, minutes, seconds].map((v) => v < 10 ? `0${v}` : v).filter((v, i) => v !== "00" || i > 0).join(":");
51
29
  }
52
- var VideoRenderer = function VideoRenderer(_ref3, ref) {
53
- var name = _ref3.name,
54
- src = _ref3.src,
55
- videoProps = _ref3.videoProps,
56
- props = _objectWithoutProperties(_ref3, _excluded);
57
- var _React$useState = React.useState(false),
58
- _React$useState2 = _slicedToArray(_React$useState, 2),
59
- playing = _React$useState2[0],
60
- setPlaying = _React$useState2[1];
61
- var _React$useState3 = React.useState(false),
62
- _React$useState4 = _slicedToArray(_React$useState3, 2),
63
- loadeddata = _React$useState4[0],
64
- setLoadeddata = _React$useState4[1];
65
- var _React$useState5 = React.useState(0),
66
- _React$useState6 = _slicedToArray(_React$useState5, 2),
67
- progress = _React$useState6[0],
68
- setProgress = _React$useState6[1];
69
- var player = React.useRef(null);
70
- var progressRef = React.useRef(null);
71
- var wrapperRef = React.useRef(null);
72
- var playPauseRef = React.useRef(null);
73
- var stopRef = React.useRef(null);
74
- var fullScreenRef = React.useRef(null);
75
- var paths = arrayFy(src);
76
- var _paths = _slicedToArray(paths, 1),
77
- pathname = _paths[0];
78
- var normalizedName = name || pathname.replace(/^.*[\\/]/, '');
79
- var title = "".concat(normalizedName).concat(!loadeddata ? ' (Opening)' : '');
80
- React.useImperativeHandle(ref, function () {
81
- return {
82
- get video() {
83
- return player;
84
- },
85
- get progress() {
86
- return progressRef;
30
+ const VideoRenderer = ({ name, src, videoProps, ...props }, ref) => {
31
+ const [playing, setPlaying] = React.useState(false);
32
+ const [loadeddata, setLoadeddata] = React.useState(false);
33
+ const [progress, setProgress] = React.useState(0);
34
+ const player = React.useRef(null);
35
+ const progressRef = React.useRef(null);
36
+ const wrapperRef = React.useRef(null);
37
+ const playPauseRef = React.useRef(null);
38
+ const stopRef = React.useRef(null);
39
+ const fullScreenRef = React.useRef(null);
40
+ const paths = arrayFy(src);
41
+ const [pathname] = paths;
42
+ const normalizedName = name || pathname.replace(/^.*[\\/]/, "");
43
+ const title = `${normalizedName}${!loadeddata ? " (Opening)" : ""}`;
44
+ React.useImperativeHandle(ref, () => ({
45
+ get video() {
46
+ return player;
47
+ },
48
+ get progress() {
49
+ return progressRef;
50
+ },
51
+ get wrapper() {
52
+ return wrapperRef;
53
+ },
54
+ get playpause() {
55
+ return playPauseRef;
56
+ },
57
+ get stop() {
58
+ return stopRef;
59
+ },
60
+ get fullScreen() {
61
+ return fullScreenRef;
62
+ }
63
+ }));
64
+ React.useEffect(() => {
65
+ var _a, _b, _c, _d;
66
+ (_a = player.current) == null ? void 0 : _a.addEventListener(
67
+ "ended",
68
+ () => {
69
+ setPlaying(false);
70
+ setProgress(0);
87
71
  },
88
- get wrapper() {
89
- return wrapperRef;
72
+ false
73
+ );
74
+ (_b = player.current) == null ? void 0 : _b.addEventListener(
75
+ "timeupdate",
76
+ () => {
77
+ if (player.current) {
78
+ updateProgressBar(player.current, setProgress);
79
+ }
90
80
  },
91
- get playpause() {
92
- return playPauseRef;
81
+ false
82
+ );
83
+ (_c = player.current) == null ? void 0 : _c.addEventListener(
84
+ "loadeddata",
85
+ () => {
86
+ setLoadeddata(true);
93
87
  },
94
- get stop() {
95
- return stopRef;
88
+ false
89
+ );
90
+ (_d = player.current) == null ? void 0 : _d.addEventListener(
91
+ "playing",
92
+ () => {
93
+ setPlaying(true);
96
94
  },
97
- get fullScreen() {
98
- return fullScreenRef;
99
- }
100
- };
101
- });
102
- React.useEffect(function () {
103
- var _player$current, _player$current2, _player$current3, _player$current4;
104
- (_player$current = player.current) === null || _player$current === void 0 || _player$current.addEventListener('ended', function () {
105
- setPlaying(false);
106
- setProgress(0);
107
- }, false);
108
- (_player$current2 = player.current) === null || _player$current2 === void 0 || _player$current2.addEventListener('timeupdate', function () {
109
- if (player.current) {
110
- updateProgressBar(player.current, setProgress);
111
- }
112
- }, false);
113
- (_player$current3 = player.current) === null || _player$current3 === void 0 || _player$current3.addEventListener('loadeddata', function () {
114
- setLoadeddata(true);
115
- }, false);
116
- (_player$current4 = player.current) === null || _player$current4 === void 0 || _player$current4.addEventListener('playing', function () {
117
- setPlaying(true);
118
- }, false);
95
+ false
96
+ );
119
97
  }, [player.current]);
120
- return /*#__PURE__*/React.createElement(Frame, _extends({}, props, {
121
- padding: "$2",
122
- boxShadow: "$out",
123
- backgroundColor: "$material",
124
- ref: wrapperRef
125
- }), /*#__PURE__*/React.createElement(TitleBar, {
126
- icon: /*#__PURE__*/React.createElement(Mplayer113, {
127
- variant: "16x16_4"
128
- }),
129
- title: title
130
- }), /*#__PURE__*/React.createElement("video", _extends({
131
- className: styles.videoTag({
132
- visible: loadeddata
133
- })
134
- }, videoProps, {
135
- ref: player
136
- }), paths.map(function (s) {
137
- return /*#__PURE__*/React.createElement(Source, {
138
- key: s,
139
- src: s
140
- });
141
- })), loadeddata && /*#__PURE__*/React.createElement("span", {
142
- className: styles.divider
143
- }), /*#__PURE__*/React.createElement(Frame, {
144
- maxWidth: "250px",
145
- mx: "auto",
146
- mb: "$4"
147
- }, /*#__PURE__*/React.createElement("div", {
148
- className: styles.countDownContainer
149
- }, /*#__PURE__*/React.createElement(Frame, {
150
- display: "flex",
151
- flexDirection: "column",
152
- w: "40%"
153
- }, /*#__PURE__*/React.createElement("div", {
154
- className: styles.videoFont,
155
- style: {
156
- marginTop: 'auto'
157
- }
158
- }, player.current && parseCurrentTime(player.current.duration)), /*#__PURE__*/React.createElement("div", {
159
- className: styles.videoFont,
160
- style: {
161
- height: 12
162
- }
163
- }, !loadeddata && 'Openning')), /*#__PURE__*/React.createElement(Frame, {
164
- display: "flex",
165
- flexDirection: "column",
166
- w: "40%"
167
- }, /*#__PURE__*/React.createElement("div", {
168
- className: cn(styles.videoFont, styles.currentTime)
169
- }, player.current && parseCurrentTime(player.current.currentTime)), /*#__PURE__*/React.createElement("div", {
170
- className: cn(styles.videoFont, styles.elapsedTime)
171
- }, "time"))), /*#__PURE__*/React.createElement("div", {
172
- className: styles.controls
173
- }, /*#__PURE__*/React.createElement(Button, {
174
- className: styles.controlBtn,
175
- disabled: !loadeddata,
176
- onClick: function onClick() {
177
- if (!playing) {
178
- var _player$current5;
179
- (_player$current5 = player.current) === null || _player$current5 === void 0 || _player$current5.play();
180
- } else {
181
- var _player$current6;
182
- (_player$current6 = player.current) === null || _player$current6 === void 0 || _player$current6.pause();
183
- }
184
- setPlaying(!playing);
185
- },
186
- ref: playPauseRef
187
- }, loadeddata ? /*#__PURE__*/React.createElement(PlayOrPause, {
188
- playing: playing
189
- }) : /*#__PURE__*/React.createElement(User4, {
190
- style: {
191
- borderRight: 'none',
192
- borderBottom: 'none'
193
- },
194
- variant: "32x32_4"
195
- })), /*#__PURE__*/React.createElement(Button, {
196
- className: styles.controlBtn,
197
- disabled: !loadeddata,
198
- onClick: function onClick() {
199
- if (player.current) {
200
- player.current.pause();
201
- player.current.currentTime = 0;
202
- }
203
- setPlaying(false);
98
+ return /* @__PURE__ */ React.createElement(
99
+ Frame,
100
+ {
101
+ ...props,
102
+ padding: "$2",
103
+ boxShadow: "$out",
104
+ backgroundColor: "$material",
105
+ ref: wrapperRef
204
106
  },
205
- ref: stopRef
206
- }, /*#__PURE__*/React.createElement(Stop, null)), /*#__PURE__*/React.createElement(Button, {
207
- className: styles.controlBtn,
208
- disabled: !loadeddata,
209
- onClick: function onClick() {
210
- var _player$current7;
211
- player === null || player === void 0 || (_player$current7 = player.current) === null || _player$current7 === void 0 || _player$current7.requestFullscreen();
212
- },
213
- ref: fullScreenRef
214
- }, /*#__PURE__*/React.createElement(Fullscreen, null)), /*#__PURE__*/React.createElement(Range, {
215
- className: styles.range,
216
- ref: progressRef,
217
- min: "0",
218
- max: "100",
219
- step: "1",
220
- value: progress,
221
- style: {
222
- width: '70%',
223
- marginLeft: 20
224
- },
225
- onChange: function onChange(_ref4) {
226
- var target = _ref4.target;
227
- var video = player.current;
228
- if (video) {
229
- var _value = parseInt(target.value);
230
- var percent = _value / 100;
231
- video.currentTime = percent * video.duration;
232
- setProgress(_value);
107
+ /* @__PURE__ */ React.createElement(TitleBar, { icon: /* @__PURE__ */ React.createElement(Mplayer113, { variant: "16x16_4" }), title }),
108
+ /* @__PURE__ */ React.createElement(
109
+ "video",
110
+ {
111
+ className: videoTag({ visible: loadeddata }),
112
+ ...videoProps,
113
+ ref: player
114
+ },
115
+ paths.map((s) => /* @__PURE__ */ React.createElement(Source, { key: s, src: s }))
116
+ ),
117
+ loadeddata && /* @__PURE__ */ React.createElement("span", { className: divider }),
118
+ /* @__PURE__ */ React.createElement(Frame, { maxWidth: "250px", mx: "auto", mb: "$4" }, /* @__PURE__ */ React.createElement("div", { className: countDownContainer }, /* @__PURE__ */ React.createElement(Frame, { display: "flex", flexDirection: "column", w: "40%" }, /* @__PURE__ */ React.createElement(
119
+ "div",
120
+ {
121
+ className: videoFont,
122
+ style: {
123
+ marginTop: "auto"
124
+ }
125
+ },
126
+ player.current && parseCurrentTime(player.current.duration)
127
+ ), /* @__PURE__ */ React.createElement("div", { className: videoFont, style: { height: 12 } }, !loadeddata && "Openning")), /* @__PURE__ */ React.createElement(Frame, { display: "flex", flexDirection: "column", w: "40%" }, /* @__PURE__ */ React.createElement("div", { className: cn(videoFont, currentTime) }, player.current && parseCurrentTime(player.current.currentTime)), /* @__PURE__ */ React.createElement("div", { className: cn(videoFont, elapsedTime) }, "time"))), /* @__PURE__ */ React.createElement("div", { className: controls }, /* @__PURE__ */ React.createElement(
128
+ Button,
129
+ {
130
+ className: controlBtn,
131
+ disabled: !loadeddata,
132
+ onClick: () => {
133
+ var _a, _b;
134
+ if (!playing) {
135
+ (_a = player.current) == null ? void 0 : _a.play();
136
+ } else {
137
+ (_b = player.current) == null ? void 0 : _b.pause();
138
+ }
139
+ setPlaying(!playing);
140
+ },
141
+ ref: playPauseRef
142
+ },
143
+ loadeddata ? /* @__PURE__ */ React.createElement(PlayOrPause, { playing }) : /* @__PURE__ */ React.createElement(
144
+ User4,
145
+ {
146
+ style: { borderRight: "none", borderBottom: "none" },
147
+ variant: "32x32_4"
148
+ }
149
+ )
150
+ ), /* @__PURE__ */ React.createElement(
151
+ Button,
152
+ {
153
+ className: controlBtn,
154
+ disabled: !loadeddata,
155
+ onClick: () => {
156
+ if (player.current) {
157
+ player.current.pause();
158
+ player.current.currentTime = 0;
159
+ }
160
+ setPlaying(false);
161
+ },
162
+ ref: stopRef
163
+ },
164
+ /* @__PURE__ */ React.createElement(Stop, null)
165
+ ), /* @__PURE__ */ React.createElement(
166
+ Button,
167
+ {
168
+ className: controlBtn,
169
+ disabled: !loadeddata,
170
+ onClick: () => {
171
+ var _a;
172
+ (_a = player == null ? void 0 : player.current) == null ? void 0 : _a.requestFullscreen();
173
+ },
174
+ ref: fullScreenRef
175
+ },
176
+ /* @__PURE__ */ React.createElement(Fullscreen, null)
177
+ ), /* @__PURE__ */ React.createElement(
178
+ Range,
179
+ {
180
+ className: range,
181
+ ref: progressRef,
182
+ min: "0",
183
+ max: "100",
184
+ step: "1",
185
+ value: progress,
186
+ style: {
187
+ width: "70%",
188
+ marginLeft: 20
189
+ },
190
+ onChange: ({ target }) => {
191
+ const { current: video } = player;
192
+ if (video) {
193
+ const value = parseInt(target.value);
194
+ const percent = value / 100;
195
+ video.currentTime = percent * video.duration;
196
+ setProgress(value);
197
+ }
198
+ }
233
199
  }
234
- }
235
- }))));
200
+ )))
201
+ );
202
+ };
203
+ const Video = React.forwardRef(VideoRenderer);
204
+ export {
205
+ Video
236
206
  };
237
- export var Video = /*#__PURE__*/React.forwardRef(VideoRenderer);