stargazer-ui 1.2.1 → 1.3.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 (353) hide show
  1. package/Bar/Bar.type.d.ts +6 -0
  2. package/Bar/index.js +2 -0
  3. package/Bar/index.js.map +1 -0
  4. package/Bar/package.json +1 -0
  5. package/Button/Button.js +12 -0
  6. package/Button/Button.js.map +1 -0
  7. package/{types/components/Button → Button}/Button.types.d.ts +1 -2
  8. package/Button/index.d.ts +3 -0
  9. package/Button/index.js +7 -0
  10. package/Button/index.js.map +1 -0
  11. package/Button/package.json +1 -0
  12. package/ButtonGroup/ButtonGroup.d.ts +4 -0
  13. package/ButtonGroup/ButtonGroup.js +10 -0
  14. package/ButtonGroup/ButtonGroup.js.map +1 -0
  15. package/ButtonGroup/ButtonGroup.types.d.ts +7 -0
  16. package/ButtonGroup/index.d.ts +3 -0
  17. package/ButtonGroup/index.js +7 -0
  18. package/ButtonGroup/index.js.map +1 -0
  19. package/ButtonGroup/package.json +1 -0
  20. package/Card/Card.js +41 -0
  21. package/Card/Card.js.map +1 -0
  22. package/{types/components/Card → Card}/Card.types.d.ts +3 -1
  23. package/Card/index.d.ts +3 -0
  24. package/Card/index.js +7 -0
  25. package/Card/index.js.map +1 -0
  26. package/Card/package.json +1 -0
  27. package/CloseButton/CloseButton.js +11 -0
  28. package/CloseButton/CloseButton.js.map +1 -0
  29. package/{types/components/CloseButton → CloseButton}/CloseButton.types.d.ts +1 -1
  30. package/CloseButton/index.d.ts +3 -0
  31. package/CloseButton/index.js +7 -0
  32. package/CloseButton/index.js.map +1 -0
  33. package/CloseButton/package.json +1 -0
  34. package/Dropdown/Dropdown.js +309 -0
  35. package/Dropdown/Dropdown.js.map +1 -0
  36. package/{types/components/Dropdown → Dropdown}/Dropdown.types.d.ts +3 -10
  37. package/Dropdown/index.d.ts +4 -0
  38. package/Dropdown/index.js +8 -0
  39. package/Dropdown/index.js.map +1 -0
  40. package/Dropdown/package.json +1 -0
  41. package/FileUploadButton/FileUploadButton.d.ts +4 -0
  42. package/FileUploadButton/FileUploadButton.js +21 -0
  43. package/FileUploadButton/FileUploadButton.js.map +1 -0
  44. package/FileUploadButton/FileUploadButton.types.d.ts +7 -0
  45. package/FileUploadButton/index.d.ts +3 -0
  46. package/FileUploadButton/index.js +7 -0
  47. package/FileUploadButton/index.js.map +1 -0
  48. package/FileUploadButton/package.json +1 -0
  49. package/FloatingLabel/FloatingLabel.js +17 -0
  50. package/FloatingLabel/FloatingLabel.js.map +1 -0
  51. package/{types/components/FloatingLabel → FloatingLabel}/FloatingLabel.types.d.ts +1 -1
  52. package/FloatingLabel/index.d.ts +3 -0
  53. package/FloatingLabel/index.js +7 -0
  54. package/FloatingLabel/index.js.map +1 -0
  55. package/FloatingLabel/package.json +1 -0
  56. package/Form/Form.d.ts +42 -0
  57. package/Form/Form.js +370 -0
  58. package/Form/Form.js.map +1 -0
  59. package/Form/Form.types.d.ts +135 -0
  60. package/Form/index.d.ts +4 -0
  61. package/Form/index.js +8 -0
  62. package/Form/index.js.map +1 -0
  63. package/Form/package.json +1 -0
  64. package/InputGroup/InputGroup.d.ts +7 -0
  65. package/InputGroup/InputGroup.js +31 -0
  66. package/InputGroup/InputGroup.js.map +1 -0
  67. package/InputGroup/InputGroup.types.d.ts +16 -0
  68. package/InputGroup/index.d.ts +4 -0
  69. package/InputGroup/index.js +7 -0
  70. package/InputGroup/index.js.map +1 -0
  71. package/InputGroup/package.json +1 -0
  72. package/List/List.d.ts +14 -0
  73. package/List/List.js +76 -0
  74. package/List/List.js.map +1 -0
  75. package/List/List.types.d.ts +28 -0
  76. package/List/index.d.ts +3 -0
  77. package/List/index.js +7 -0
  78. package/List/index.js.map +1 -0
  79. package/List/package.json +1 -0
  80. package/{types/components/Modal → Modal}/Modal.d.ts +1 -1
  81. package/Modal/Modal.js +160 -0
  82. package/Modal/Modal.js.map +1 -0
  83. package/{types/components/Modal → Modal}/Modal.types.d.ts +3 -2
  84. package/Modal/index.d.ts +3 -0
  85. package/Modal/index.js +7 -0
  86. package/Modal/index.js.map +1 -0
  87. package/Modal/package.json +1 -0
  88. package/Nav/Nav.js +28 -0
  89. package/Nav/Nav.js.map +1 -0
  90. package/{types/components/Nav → Nav}/Nav.types.d.ts +1 -1
  91. package/Nav/index.d.ts +4 -0
  92. package/Nav/index.js +7 -0
  93. package/Nav/index.js.map +1 -0
  94. package/Nav/package.json +1 -0
  95. package/{types/components/NavBar → NavBar}/Navbar.d.ts +1 -2
  96. package/NavBar/Navbar.js +36 -0
  97. package/NavBar/Navbar.js.map +1 -0
  98. package/{types/components/NavBar → NavBar}/Navbar.types.d.ts +2 -1
  99. package/NavBar/index.d.ts +4 -0
  100. package/NavBar/index.js +8 -0
  101. package/NavBar/index.js.map +1 -0
  102. package/NavBar/package.json +1 -0
  103. package/{types/components/NavDropdown → NavDropdown}/NavDropdown.d.ts +2 -2
  104. package/NavDropdown/NavDropdown.js +77 -0
  105. package/NavDropdown/NavDropdown.js.map +1 -0
  106. package/NavDropdown/index.d.ts +3 -0
  107. package/NavDropdown/index.js +7 -0
  108. package/NavDropdown/index.js.map +1 -0
  109. package/NavDropdown/package.json +1 -0
  110. package/Overlay/Overlay.d.ts +4 -0
  111. package/Overlay/Overlay.js +236 -0
  112. package/Overlay/Overlay.js.map +1 -0
  113. package/Overlay/Overlay.types.d.ts +22 -0
  114. package/{src/Overlay/index.ts → Overlay/index.d.ts} +3 -3
  115. package/Overlay/index.js +7 -0
  116. package/Overlay/index.js.map +1 -0
  117. package/Overlay/package.json +1 -0
  118. package/Popout/Popout.js +110 -0
  119. package/Popout/Popout.js.map +1 -0
  120. package/{types/components/Popout → Popout}/Popout.types.d.ts +1 -1
  121. package/Popout/index.d.ts +3 -0
  122. package/Popout/index.js +7 -0
  123. package/Popout/index.js.map +1 -0
  124. package/Popout/package.json +1 -0
  125. package/Spinner/Spinner.js +12 -0
  126. package/Spinner/Spinner.js.map +1 -0
  127. package/Spinner/index.d.ts +3 -0
  128. package/Spinner/index.js +7 -0
  129. package/Spinner/index.js.map +1 -0
  130. package/Spinner/package.json +1 -0
  131. package/Table/Table.js +11 -0
  132. package/Table/Table.js.map +1 -0
  133. package/{types/components/Table → Table}/Table.types.d.ts +1 -1
  134. package/Table/index.d.ts +3 -0
  135. package/Table/index.js +7 -0
  136. package/Table/index.js.map +1 -0
  137. package/Table/package.json +1 -0
  138. package/Tabs/Tabs.js +168 -0
  139. package/Tabs/Tabs.js.map +1 -0
  140. package/{types/components/Tabs → Tabs}/Tabs.types.d.ts +12 -1
  141. package/Tabs/index.d.ts +3 -0
  142. package/Tabs/index.js +7 -0
  143. package/Tabs/index.js.map +1 -0
  144. package/Tabs/package.json +1 -0
  145. package/ToggleButton/ToggleButton.d.ts +4 -0
  146. package/ToggleButton/ToggleButton.js +17 -0
  147. package/ToggleButton/ToggleButton.js.map +1 -0
  148. package/ToggleButton/ToggleButton.types.d.ts +7 -0
  149. package/ToggleButton/index.d.ts +3 -0
  150. package/ToggleButton/index.js +7 -0
  151. package/ToggleButton/index.js.map +1 -0
  152. package/ToggleButton/package.json +1 -0
  153. package/{src/hooks/index.ts → hooks/index.d.ts} +6 -6
  154. package/hooks/index.js +7 -0
  155. package/hooks/index.js.map +1 -0
  156. package/hooks/package.json +1 -0
  157. package/hooks/useClassname.d.ts +2 -0
  158. package/hooks/useClassname.js +7 -0
  159. package/hooks/useClassname.js.map +1 -0
  160. package/hooks/useDraggable.d.ts +23 -0
  161. package/hooks/useDraggable.js +147 -0
  162. package/hooks/useDraggable.js.map +1 -0
  163. package/hooks/useKeepElementFocused.d.ts +2 -0
  164. package/hooks/useKeepElementFocused.js +37 -0
  165. package/hooks/useKeepElementFocused.js.map +1 -0
  166. package/hooks/useQueryParams.d.ts +2 -0
  167. package/hooks/useQueryParams.js +13 -0
  168. package/hooks/useQueryParams.js.map +1 -0
  169. package/hooks/useScreenSize.d.ts +5 -0
  170. package/hooks/useScreenSize.js +21 -0
  171. package/hooks/useScreenSize.js.map +1 -0
  172. package/index.d.ts +18 -0
  173. package/index.js +19 -0
  174. package/index.js.map +1 -0
  175. package/package.json +1 -79
  176. package/styles/stargazerui.css +6513 -0
  177. package/styles/stargazerui.css.map +1 -0
  178. package/{src/utils/BaseTypes.ts → utils/BaseTypes.d.ts} +24 -30
  179. package/utils/ContrastingColor.d.ts +1 -0
  180. package/utils/MergeClassnames.d.ts +2 -0
  181. package/utils/MergeClassnames.js +7 -0
  182. package/utils/MergeClassnames.js.map +1 -0
  183. package/utils/MergeRefs.d.ts +2 -0
  184. package/utils/MergeRefs.js +16 -0
  185. package/utils/MergeRefs.js.map +1 -0
  186. package/.babelrc.json +0 -10
  187. package/.eslintrc.cjs +0 -18
  188. package/.gitattributes +0 -2
  189. package/LICENSE +0 -21
  190. package/dev/index.html +0 -12
  191. package/dev/index.jsx +0 -49
  192. package/dev/index.scss +0 -59
  193. package/dev/pages/ButtonPage.jsx +0 -44
  194. package/dev/pages/CardPage.jsx +0 -81
  195. package/dev/pages/DropdownPage.jsx +0 -31
  196. package/dev/pages/FormPage.jsx +0 -130
  197. package/dev/pages/ListPage.jsx +0 -52
  198. package/dev/pages/ModalPage.jsx +0 -37
  199. package/dev/pages/OverlayPage.jsx +0 -35
  200. package/dev/pages/components.jsx +0 -19
  201. package/dev/stargazerui.css +0 -3762
  202. package/dev/stargazerui.css.map +0 -1
  203. package/dev/test.jsx +0 -88
  204. package/rollup.config.js +0 -140
  205. package/scripts/writePackageJsons.js +0 -42
  206. package/src/Bar/Bar.tsx +0 -0
  207. package/src/Bar/Bar.type.ts +0 -9
  208. package/src/Bar/index.ts +0 -0
  209. package/src/Button/Button.tsx +0 -17
  210. package/src/Button/Button.types.ts +0 -8
  211. package/src/Button/index.ts +0 -3
  212. package/src/ButtonGroup/ButtonGroup.tsx +0 -14
  213. package/src/ButtonGroup/ButtonGroup.types.ts +0 -8
  214. package/src/ButtonGroup/index.ts +0 -3
  215. package/src/Card/Card.tsx +0 -70
  216. package/src/Card/Card.types.ts +0 -33
  217. package/src/Card/index.ts +0 -3
  218. package/src/CloseButton/CloseButton.tsx +0 -14
  219. package/src/CloseButton/CloseButton.types.ts +0 -6
  220. package/src/CloseButton/index.ts +0 -3
  221. package/src/Dropdown/Dropdown.tsx +0 -358
  222. package/src/Dropdown/Dropdown.types.ts +0 -52
  223. package/src/Dropdown/index.ts +0 -4
  224. package/src/FileUploadButton/FileUploadButton.tsx +0 -27
  225. package/src/FileUploadButton/FileUploadButton.types.ts +0 -9
  226. package/src/FileUploadButton/index.ts +0 -3
  227. package/src/FloatingLabel/FloatingLabel.tsx +0 -22
  228. package/src/FloatingLabel/FloatingLabel.types.ts +0 -11
  229. package/src/FloatingLabel/index.ts +0 -3
  230. package/src/Form/Form.tsx +0 -445
  231. package/src/Form/Form.types.ts +0 -117
  232. package/src/Form/index.ts +0 -4
  233. package/src/InputGroup/InputGroup.tsx +0 -46
  234. package/src/InputGroup/InputGroup.types.ts +0 -21
  235. package/src/InputGroup/index.ts +0 -4
  236. package/src/List/List.tsx +0 -112
  237. package/src/List/List.types.ts +0 -34
  238. package/src/List/index.ts +0 -4
  239. package/src/Modal/Modal.tsx +0 -220
  240. package/src/Modal/Modal.types.ts +0 -49
  241. package/src/Modal/index.ts +0 -4
  242. package/src/Nav/Nav.tsx +0 -43
  243. package/src/Nav/Nav.types.ts +0 -21
  244. package/src/Nav/index.ts +0 -4
  245. package/src/NavBar/Navbar.tsx +0 -57
  246. package/src/NavBar/Navbar.types.ts +0 -24
  247. package/src/NavBar/index.ts +0 -4
  248. package/src/NavDropdown/NavDropdown.tsx +0 -93
  249. package/src/NavDropdown/NavDropdown.types.ts +0 -6
  250. package/src/NavDropdown/index.ts +0 -3
  251. package/src/Overlay/Overlay.tsx +0 -277
  252. package/src/Overlay/Overlay.types.ts +0 -20
  253. package/src/Popout/Popout.tsx +0 -155
  254. package/src/Popout/Popout.types.ts +0 -42
  255. package/src/Popout/index.ts +0 -3
  256. package/src/Spinner/Spinner.tsx +0 -15
  257. package/src/Spinner/Spinner.types.ts +0 -7
  258. package/src/Spinner/index.ts +0 -3
  259. package/src/Table/Table.tsx +0 -16
  260. package/src/Table/Table.types.ts +0 -9
  261. package/src/Table/index.ts +0 -3
  262. package/src/Tabs/Tabs.tsx +0 -215
  263. package/src/Tabs/Tabs.types.ts +0 -49
  264. package/src/Tabs/index.ts +0 -3
  265. package/src/ToggleButton/ToggleButton.tsx +0 -21
  266. package/src/ToggleButton/ToggleButton.types.ts +0 -8
  267. package/src/ToggleButton/index.ts +0 -3
  268. package/src/hooks/useClassname.ts +0 -5
  269. package/src/hooks/useDraggable.ts +0 -186
  270. package/src/hooks/useKeepElementFocused.ts +0 -37
  271. package/src/hooks/useScreenSize.ts +0 -24
  272. package/src/index.ts +0 -21
  273. package/src/styles/_Card.scss +0 -166
  274. package/src/styles/_CloseButton.scss +0 -51
  275. package/src/styles/_CustomButton.scss +0 -132
  276. package/src/styles/_Dropdown.scss +0 -120
  277. package/src/styles/_FloatingLabel.scss +0 -56
  278. package/src/styles/_Forms.scss +0 -7
  279. package/src/styles/_Grid.scss +0 -178
  280. package/src/styles/_InputGroup.scss +0 -71
  281. package/src/styles/_List.scss +0 -62
  282. package/src/styles/_Modal.scss +0 -234
  283. package/src/styles/_ModalOld.scss +0 -242
  284. package/src/styles/_Nav.scss +0 -36
  285. package/src/styles/_NavBar.scss +0 -116
  286. package/src/styles/_NavDropdown.scss +0 -34
  287. package/src/styles/_OffCanvas.scss +0 -260
  288. package/src/styles/_OverLay.scss +0 -56
  289. package/src/styles/_Popout.scss +0 -75
  290. package/src/styles/_Spinner.scss +0 -19
  291. package/src/styles/_Table.scss +0 -34
  292. package/src/styles/_Tabs.scss +0 -129
  293. package/src/styles/_colors.scss +0 -510
  294. package/src/styles/_components.scss +0 -40
  295. package/src/styles/_functions.scss +0 -134
  296. package/src/styles/_mixins.scss +0 -26
  297. package/src/styles/_reset.scss +0 -231
  298. package/src/styles/_utilities.scss +0 -2480
  299. package/src/styles/_variables.scss +0 -146
  300. package/src/styles/forms/_FormCheck.scss +0 -269
  301. package/src/styles/forms/_FormControl.scss +0 -102
  302. package/src/styles/forms/_FormGroup.scss +0 -21
  303. package/src/styles/forms/_FormLabel.scss +0 -3
  304. package/src/styles/forms/_FormSelect.scss +0 -164
  305. package/src/styles/forms/_FormSlider.scss +0 -116
  306. package/src/styles/forms/_FormText.scss +0 -6
  307. package/src/utils/ContrastingColor.ts +0 -25
  308. package/src/utils/FileImportExport.js +0 -50
  309. package/src/utils/MergeClassnames.ts +0 -5
  310. package/src/utils/MergeRefs.ts +0 -12
  311. package/src/vite-env.d.ts +0 -1
  312. package/tsconfig-build.json +0 -4
  313. package/tsconfig.json +0 -79
  314. package/tsconfig.node.json +0 -10
  315. package/types/BaseTypes.d.ts +0 -19
  316. package/types/components/Button/index.d.ts +0 -1
  317. package/types/components/Card/index.d.ts +0 -1
  318. package/types/components/CloseButton/index.d.ts +0 -1
  319. package/types/components/Dropdown/index.d.ts +0 -1
  320. package/types/components/FloatingLabel/index.d.ts +0 -1
  321. package/types/components/Form/Form.d.ts +0 -17
  322. package/types/components/Form/Form.types.d.ts +0 -50
  323. package/types/components/Form/index.d.ts +0 -1
  324. package/types/components/InputGroup/InputGroup.d.ts +0 -6
  325. package/types/components/InputGroup/InputGroup.types.d.ts +0 -10
  326. package/types/components/InputGroup/index.d.ts +0 -1
  327. package/types/components/Modal/index.d.ts +0 -1
  328. package/types/components/Nav/index.d.ts +0 -1
  329. package/types/components/NavBar/index.d.ts +0 -1
  330. package/types/components/NavDropdown/index.d.ts +0 -1
  331. package/types/components/Popout/index.d.ts +0 -1
  332. package/types/components/Spinner/index.d.ts +0 -1
  333. package/types/components/Table/index.d.ts +0 -1
  334. package/types/components/Tabs/index.d.ts +0 -1
  335. package/types/components/ToggleButton/ToggleButton.d.ts +0 -9
  336. package/types/components/ToggleButton/ToggleButton.types.d.ts +0 -0
  337. package/types/components/ToggleButton/index.d.ts +0 -1
  338. package/types/components/index.d.ts +0 -16
  339. package/types/index.d.ts +0 -1
  340. package/vite.config.js +0 -57
  341. package/vite.config.js.timestamp-1708777378490-e94428ceb2bf9.mjs +0 -42
  342. /package/{types/components/Button → Button}/Button.d.ts +0 -0
  343. /package/{types/components/Card → Card}/Card.d.ts +0 -0
  344. /package/{types/components/CloseButton → CloseButton}/CloseButton.d.ts +0 -0
  345. /package/{types/components/Dropdown → Dropdown}/Dropdown.d.ts +0 -0
  346. /package/{types/components/FloatingLabel → FloatingLabel}/FloatingLabel.d.ts +0 -0
  347. /package/{types/components/Nav → Nav}/Nav.d.ts +0 -0
  348. /package/{types/components/NavDropdown → NavDropdown}/NavDropdown.types.d.ts +0 -0
  349. /package/{types/components/Popout → Popout}/Popout.d.ts +0 -0
  350. /package/{types/components/Spinner → Spinner}/Spinner.d.ts +0 -0
  351. /package/{types/components/Spinner → Spinner}/Spinner.types.d.ts +0 -0
  352. /package/{types/components/Table → Table}/Table.d.ts +0 -0
  353. /package/{types/components/Tabs → Tabs}/Tabs.d.ts +0 -0
@@ -1,134 +0,0 @@
1
- @use "sass:map";
2
- @use 'sass:color';
3
- @use 'sass:math';
4
- @use 'sass:list';
5
- @use 'sass:string';
6
-
7
- $color-contrast-dark: black !default;
8
- $color-contrast-light: white !default;
9
- $min-contrast-ratio: 4.5 !default;
10
- $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 .0033 .0037 .004 .0044 .0048 .0052 .0056 .006 .0065 .007 .0075 .008 .0086 .0091 .0097 .0103 .011 .0116 .0123 .013 .0137 .0144 .0152 .016 .0168 .0176 .0185 .0194 .0203 .0212 .0222 .0232 .0242 .0252 .0262 .0273 .0284 .0296 .0307 .0319 .0331 .0343 .0356 .0369 .0382 .0395 .0409 .0423 .0437 .0452 .0467 .0482 .0497 .0513 .0529 .0545 .0561 .0578 .0595 .0612 .063 .0648 .0666 .0685 .0704 .0723 .0742 .0762 .0782 .0802 .0823 .0844 .0865 .0887 .0908 .0931 .0953 .0976 .0999 .1022 .1046 .107 .1095 .1119 .1144 .117 .1195 .1221 .1248 .1274 .1301 .1329 .1356 .1384 .1413 .1441 .147 .15 .1529 .1559 .159 .162 .1651 .1683 .1714 .1746 .1779 .1812 .1845 .1878 .1912 .1946 .1981 .2016 .2051 .2086 .2122 .2159 .2195 .2232 .227 .2307 .2346 .2384 .2423 .2462 .2502 .2542 .2582 .2623 .2664 .2705 .2747 .2789 .2831 .2874 .2918 .2961 .3005 .305 .3095 .314 .3185 .3231 .3278 .3325 .3372 .3419 .3467 .3515 .3564 .3613 .3663 .3712 .3763 .3813 .3864 .3916 .3968 .402 .4072 .4125 .4179 .4233 .4287 .4342 .4397 .4452 .4508 .4564 .4621 .4678 .4735 .4793 .4851 .491 .4969 .5029 .5089 .5149 .521 .5271 .5333 .5395 .5457 .552 .5583 .5647 .5711 .5776 .5841 .5906 .5972 .6038 .6105 .6172 .624 .6308 .6376 .6445 .6514 .6584 .6654 .6724 .6795 .6867 .6939 .7011 .7084 .7157 .7231 .7305 .7379 .7454 .7529 .7605 .7682 .7758 .7835 .7913 .7991 .807 .8148 .8228 .8308 .8388 .8469 .855 .8632 .8714 .8796 .8879 .8963 .9047 .9131 .9216 .9301 .9387 .9473 .956 .9647 .9734 .9823 .9911 1;
11
-
12
-
13
- @function color-contrast($background, $color-contrast-dark: $color-contrast-dark, $color-contrast-light: $color-contrast-light, $min-contrast-ratio: $min-contrast-ratio) {
14
- $foregrounds: $color-contrast-light, $color-contrast-dark, white, black;
15
- $max-ratio: 0;
16
- $max-ratio-color: null;
17
-
18
- @each $color in $foregrounds {
19
- $contrast-ratio: contrast-ratio($background, $color);
20
- @if $contrast-ratio > $min-contrast-ratio {
21
- @return $color;
22
- } @else if $contrast-ratio > $max-ratio {
23
- $max-ratio: $contrast-ratio;
24
- $max-ratio-color: $color;
25
- }
26
- }
27
-
28
- @warn "Found no color leading to #{$min-contrast-ratio}:1 contrast ratio against #{$background}...";
29
-
30
- @return $max-ratio-color;
31
- }
32
-
33
- @function contrast-ratio($background, $foreground: $color-contrast-light) {
34
- $l1: luminance($background);
35
- $l2: luminance(opaque($background, $foreground));
36
- @if $l1 > $l2 {
37
- $lum: math.div($l1 + .05, $l2 + .05);
38
- }
39
- @else {
40
- $lum: math.div($l2 + .05, $l1 + .05);
41
- }
42
- @return if($l1 > $l2, math.div($l1 + .05, $l2 + .05), math.div($l2 + .05, $l1 + .05));
43
- }
44
-
45
- // Return WCAG2.1 relative luminance
46
- // See https://www.w3.org/TR/WCAG/#dfn-relative-luminance
47
- // See https://www.w3.org/TR/WCAG/#dfn-contrast-ratio
48
- @function luminance($color) {
49
- $rgb: (
50
- "r": red($color),
51
- "g": green($color),
52
- "b": blue($color)
53
- );
54
-
55
- @each $name, $value in $rgb {
56
- $value: if(math.div($value, 255) < .03928, math.div(math.div($value, 255), 12.92), nth($_luminance-list, $value + 1));
57
- $rgb: map-merge($rgb, ($name: $value));
58
- }
59
-
60
- @return (map-get($rgb, "r") * .2126) + (map-get($rgb, "g") * .7152) + (map-get($rgb, "b") * .0722);
61
- }
62
-
63
- // Return opaque color
64
- // opaque(#fff, rgba(0, 0, 0, .5)) => #808080
65
- @function opaque($background, $foreground) {
66
- @return mix(rgba($foreground, 1), $background, opacity($foreground) * 100%);
67
- }
68
-
69
-
70
- @function str-replace($string, $search, $replace: "") {
71
- $index: string.index($string, $search);
72
-
73
- @if $index {
74
- @return string.slice($string, 1, $index - 1) + $replace + str-replace(string.slice($string, $index + string.length($search)), $search, $replace);
75
- }
76
-
77
- @return $string;
78
- }
79
-
80
- @function escape-svg($string) {
81
- @if string.index($string, "data:image/svg+xml") {
82
- @each $char, $encoded in $escaped-characters {
83
- // Do not escape the url brackets
84
- @if string.index($string, "url(") == 1 {
85
- $string: url("#{str-replace(string.slice($string, 6, -3), $char, $encoded)}");
86
- } @else {
87
- $string: str-replace($string, $char, $encoded);
88
- }
89
- }
90
- }
91
-
92
- @return $string;
93
- }
94
-
95
-
96
- @function hsb($h, $s, $b, $a: 1) {
97
- $h-int: $h;//math.div($h, if(math.unit($h) == "", 1, 1*math.unit($h)) );
98
- $s-int: math.div($s, if(math.unit($s) == "", 1, $s * 0 + 1 ) );
99
- $b-int: math.div($b, if(math.unit($b) == "", 1, $b * 0 + 1 ) );
100
- @if $b-int == 0 {
101
- @return hsla(0, 0 * 1%, 0 * 1%, $a)
102
- } @else {
103
- $l-hsl: calc( ($b-int/2) * (2 - ($s-int /(100))) );
104
- $s-hsl: math.div( ($b-int * $s-int), if($l-hsl < 50, $l-hsl * 2, 200 - $l-hsl * 2) );
105
- @return hsla($h-int, calc($s-hsl * 1%), calc($l-hsl * 1%), $a);
106
- }
107
- }
108
- @function shade-creator($color) {
109
- $h-int: color.hue($color);
110
-
111
- $s-int: color.saturation($color);
112
- $s-max: calc(100 * 1%);
113
- $s-min: calc(7 * 1%);
114
- $s-step-light: calc(($s-int - 7 * 1%)/4);
115
- $s-step-dark: calc((100 * 1% - $s-int)/4);
116
-
117
- $b-int: calc( (2 * color.lightness($color) / (2 - ($s-int/(100 * 1%)))) );
118
- $b-max: calc(100 * 1%);
119
- $b-min: calc(20 * 1%);
120
- $b-step-light: calc(($b-int - 20 * 1%)/4);
121
- $b-step-dark: calc((100 * 1% - $b-int)/4);
122
-
123
- @return (
124
- "100": hsb($h-int, $s-min, $b-max),
125
- "200": hsb($h-int, $s-min + $s-step-light, $b-max - $b-step-dark),
126
- "300": hsb($h-int, $s-min + 2*$s-step-light, $b-max - 2*$b-step-dark),
127
- "400": hsb($h-int, $s-min + 3*$s-step-light, $b-max - 3*$b-step-dark),
128
- "500": hsb($h-int, $s-int, $b-int),
129
- "600": hsb($h-int, $s-max - 3*$s-step-dark, $b-min + 3*$b-step-light),
130
- "700": hsb($h-int, $s-max - 2*$s-step-dark, $b-min + 2*$b-step-light),
131
- "800": hsb($h-int, $s-max - $s-step-dark, $b-min + $b-step-light),
132
- "900": hsb($h-int, $s-max, $b-min),
133
- );
134
- }
@@ -1,26 +0,0 @@
1
- @mixin border-top-radius($radius: 0.375rem) {
2
- border-top-left-radius: $radius;
3
- border-top-right-radius: $radius;
4
- }
5
-
6
- @mixin border-end-radius($radius: 0.375rem) {
7
- border-top-right-radius: $radius;
8
- border-bottom-right-radius: $radius;
9
- }
10
-
11
- @mixin border-bottom-radius($radius: 0.375rem) {
12
- border-bottom-right-radius: $radius;
13
- border-bottom-left-radius: $radius;
14
- }
15
-
16
- @mixin border-start-radius($radius: 0.375rem) {
17
- border-top-left-radius: $radius;
18
- border-bottom-left-radius: $radius;
19
- }
20
-
21
- @mixin sg-focus-visible($text-color: white, $color:#0d6efd) {
22
- box-shadow: 0 0 0 3px $text-color;
23
- //border: 1px solid $text-color;
24
- outline: 2px solid $color;
25
- z-index: 5;
26
- }
@@ -1,231 +0,0 @@
1
- @use "sass:color";
2
- @use "sass:map";
3
-
4
- :root {
5
- --sg-body-bg: #212529;
6
- --sg-body-color: white;
7
- --sg-nav-color: #1a1b1d;
8
- --sg-code-color: #fc5d5d;
9
- --sg-font-monospace: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
10
- --sg-highlight-bg: #fff3cd;
11
- --sg-link-color: #fc5d5d;// #4D9DE0;// #0d6efd;
12
- --sg-link-hover-color: color.mix(black, #E15554, 15%);// #62a4da;// #0a58ca;
13
-
14
- --sg-primary: rgb(73, 149, 213);
15
- --sg-secondary: rgb(108, 117, 125);
16
- --sg-success: rgb(31, 173, 97); //hsl(148, 50%, 46%)
17
- --sg-info: rgb(145, 132, 189);
18
- --sg-warning: rgb(224, 188, 41);
19
- --sg-danger: rgb(252, 95, 95);
20
- --sg-light: rgb(248, 249, 250);
21
- --sg-dark: rgb(33, 37, 41);
22
-
23
- --red-2: rgb(248, 113, 113);
24
- --orange-2: rgb(251 146 60);
25
- --yellow-2: rgb(251 191 36);
26
-
27
- --nav-bar-height: 3.5rem;
28
- --tab-controls-height: 2.5rem;
29
- --column-header-height: 2rem;
30
-
31
- font-size: 18px;
32
- line-height: 1.4;
33
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
34
- 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
35
- sans-serif;
36
- -webkit-font-smoothing: antialiased;
37
- -moz-osx-font-smoothing: grayscale;
38
- }
39
-
40
- body {
41
- margin: 0;
42
- padding: 0;
43
- height: 100dvh;
44
- color: var(--sg-body-color);
45
- background-color: var(--sg-body-bg);
46
- }
47
-
48
- #root {
49
- height: 100%;
50
- overflow: auto;
51
- }
52
-
53
- .visually-hidden {
54
- border: 0;
55
- clip: rect(0 0 0 0);
56
- height: auto;
57
- margin: 0;
58
- overflow: hidden;
59
- padding: 0;
60
- position: absolute;
61
- width: 1px;
62
- white-space: nowrap;
63
- }
64
-
65
- ::-webkit-scrollbar {
66
- display: none;
67
- }
68
-
69
- .full-width {
70
- width: 100%;
71
- }
72
- .top-left-grid {
73
- border-top-left-radius: 0.375rem;
74
- border-bottom-left-radius: 0;
75
- }
76
- .top-right-grid {
77
- border-top-right-radius: 0.375rem;
78
- border-bottom-right-radius: 0;
79
- }
80
- .middle-grid {
81
- border-radius: 0;
82
- }
83
- .bottom-left-grid {
84
- border-bottom-left-radius: 0.375rem;
85
- border-top-left-radius: 0;
86
- }
87
- .bottom-right-grid {
88
- border-bottom-right-radius: 0.375rem;
89
- border-top-right-radius: 0;
90
- }
91
-
92
- :focus-visible {
93
- //z-index: 9999;
94
- }
95
- .flex-column {
96
- display: flex;
97
- flex-direction: column;
98
- }
99
- .flex-row {
100
- display: flex;
101
- flex-direction: row;
102
- }
103
-
104
- .test-red {
105
- background-color: red;
106
- }
107
-
108
- * {
109
- box-sizing: border-box;
110
- scrollbar-color: var(--sg-link-color) rgba(0,0,0,0);
111
- scrollbar-width: thin;
112
- }
113
-
114
- dialog {
115
- padding: 0;
116
- margin: 0;
117
- color: inherit
118
- }
119
-
120
- input, textarea, select {
121
- font-size: 1rem * 0.85;
122
- }
123
-
124
- button {
125
- cursor: pointer;
126
- font-size: calc(1rem * 0.85);
127
- }
128
-
129
- hr {
130
- margin: 0.5rem 0;
131
- color: inherit;
132
- border: 0;
133
- border-top: 1px solid;
134
- opacity: 0.25;
135
- }
136
-
137
- h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
138
- margin-top: 0;
139
- margin-bottom: 0.5rem;
140
- font-weight: 500;
141
- line-height: 1.2;
142
- }
143
-
144
- h1, .h1 {
145
- --unit: 1rem;
146
- font-size: calc(1.375*var(--unit) + 1.5vw);
147
- }
148
- @media (min-width: 1200px) {
149
- h1, .h1 {
150
- font-size: calc(2.5*var(--unit));
151
- }
152
- }
153
-
154
- h2, .h2 {
155
- --unit: 1rem;
156
- font-size: calc(1.325*var(--unit) + 0.9vw);
157
- }
158
- @media (min-width: 1200px) {
159
- h2, .h2 {
160
- font-size: calc(2*var(--unit));
161
- }
162
- }
163
-
164
- h3, .h3 {
165
- --unit: 1rem;
166
- font-size: calc(1.3*var(--unit) + 0.6vw);
167
- }
168
- @media (min-width: 1200px) {
169
- h3, .h3 {
170
- font-size: calc(1.75*var(--unit));
171
- }
172
- }
173
-
174
- h4, .h4 {
175
- --unit: 1rem;
176
- font-size: calc(1.275*var(--unit) + 0.3vw);
177
- }
178
- @media (min-width: 1200px) {
179
- h4, .h4 {
180
- font-size: calc(1.5*var(--unit));
181
- }
182
- }
183
-
184
- h5, .h5 {
185
- --unit: 1rem;
186
- font-size: calc(1.25*var(--unit));
187
- }
188
-
189
- h6, .h6 {
190
- --unit: 1rem;
191
- font-size: calc(1*var(--unit));
192
- }
193
-
194
- p {
195
- margin-top: 0;
196
- margin-bottom: 1rem;
197
- }
198
-
199
- ol, ul, dl {
200
- margin-top: 0;
201
- margin-bottom: 0;
202
- }
203
-
204
- dt {
205
- font-weight: 700;
206
- }
207
-
208
- dd {
209
- margin-bottom: 0.5rem;
210
- margin-left: 0;
211
- }
212
-
213
- b, strong {
214
- font-weight: bolder;
215
- }
216
-
217
- a {
218
- color: var(--sg-link-color);
219
- text-decoration: underline;
220
- }
221
- a:hover {
222
- color: var(--sg-link-hover-color);
223
- }
224
-
225
- img, svg {
226
- vertical-align: middle;
227
- }
228
-
229
- label {
230
- display: inline-block;
231
- }