@dashadmin/dash-styles 0.0.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 (69) hide show
  1. package/.editorconfig +12 -0
  2. package/.eslintignore +0 -0
  3. package/.eslintrc.json +7 -0
  4. package/.prettierignore +5 -0
  5. package/.prettierrc.cjs +3 -0
  6. package/README.md +1 -0
  7. package/commitlint.config.cjs +40 -0
  8. package/dist/README.md +1 -0
  9. package/dist/index.d.ts +3 -0
  10. package/dist/index.js +927 -0
  11. package/dist/package.json +34 -0
  12. package/package.json +34 -0
  13. package/src/assets/fonts/Montserrat-Black.ttf +0 -0
  14. package/src/assets/fonts/Montserrat-Bold.ttf +0 -0
  15. package/src/assets/fonts/Montserrat-Medium.ttf +0 -0
  16. package/src/assets/fonts/Montserrat-Regular.ttf +0 -0
  17. package/src/assets/fonts/Montserrat-SemiBold.ttf +0 -0
  18. package/src/dash-css-transformer.less +766 -0
  19. package/src/dash-variables.less +10 -0
  20. package/src/dash.less +38 -0
  21. package/src/helpers/getAllCssVariablesFromStyleSheets.tsx +46 -0
  22. package/src/index.tsx +1052 -0
  23. package/src/index.tsx.suffixed +680 -0
  24. package/src/styles/button.less +120 -0
  25. package/src/styles/buttons.less +10 -0
  26. package/src/styles/card.less +337 -0
  27. package/src/styles/common.less +62 -0
  28. package/src/styles/components/notfound.less +50 -0
  29. package/src/styles/extra.less +25 -0
  30. package/src/styles/filters.less +7 -0
  31. package/src/styles/forms.less +41 -0
  32. package/src/styles/framed.less +45 -0
  33. package/src/styles/header.less +879 -0
  34. package/src/styles/input.copy.less +223 -0
  35. package/src/styles/input.less +223 -0
  36. package/src/styles/layout.less +296 -0
  37. package/src/styles/links.less +28 -0
  38. package/src/styles/loader.less +20 -0
  39. package/src/styles/login.less +331 -0
  40. package/src/styles/modal.less +0 -0
  41. package/src/styles/module.less +29 -0
  42. package/src/styles/mui-overrides.less +62 -0
  43. package/src/styles/notification.less +46 -0
  44. package/src/styles/pages/profile.less +139 -0
  45. package/src/styles/pagination.less +90 -0
  46. package/src/styles/popover.less +21 -0
  47. package/src/styles/react-admin/common.less +184 -0
  48. package/src/styles/react-admin/toolbar.less +22 -0
  49. package/src/styles/root.less +13 -0
  50. package/src/styles/sidebar.less +705 -0
  51. package/src/styles/splash.less +44 -0
  52. package/src/styles/static.less +59 -0
  53. package/src/styles/stats.less +5 -0
  54. package/src/styles/svg.less +30 -0
  55. package/src/styles/switch.less +7 -0
  56. package/src/styles/table.less +196 -0
  57. package/src/styles/tabs.less +173 -0
  58. package/src/styles/tags.less +97 -0
  59. package/src/styles/toast.less +83 -0
  60. package/src/styles/toolbar.less +90 -0
  61. package/src/styles/transition.less +226 -0
  62. package/src/styles/uploader.less +38 -0
  63. package/src/variables/breakpoints.less +35 -0
  64. package/src/variables/colors.less +205 -0
  65. package/src/variables/dash-colors.less +52 -0
  66. package/src/variables/sizes.less +150 -0
  67. package/tsconfig.eslint.json +12 -0
  68. package/tsconfig.json +22 -0
  69. package/vite.config.mts +7 -0
@@ -0,0 +1,10 @@
1
+ @import './variables/colors.less';
2
+ @import './variables/dash-colors.less';
3
+ @import './variables/sizes.less';
4
+ @import './variables/breakpoints.less';
5
+
6
+ @theme: dash;
7
+ // An override for the html selector for theme prefixes
8
+ @html-selector: html;
9
+ @font-family: 'noirpro', sans-serif;
10
+ @class-prefix: dash;
package/src/dash.less ADDED
@@ -0,0 +1,38 @@
1
+ @import './styles/root.less';
2
+ @import './styles/splash.less';
3
+ @import './styles/transition.less';
4
+ @import './styles/loader.less';
5
+ @import './styles/layout.less';
6
+ @import './styles/header.less';
7
+ @import './styles/sidebar.less';
8
+ @import './styles/toolbar.less';
9
+ @import './styles/common.less';
10
+ @import './styles/module.less';
11
+ @import './styles/mui-overrides.less';
12
+ @import './styles/links.less';
13
+ @import './styles/buttons.less';
14
+ @import './styles/pagination.less';
15
+ @import './styles/static.less';
16
+ @import './styles/components/notfound.less';
17
+ @import './styles/forms.less';
18
+ @import './styles/filters.less';
19
+ @import './styles/extra.less';
20
+ @import './styles/notification.less';
21
+ @import './styles/table.less';
22
+ @import './styles/login.less';
23
+ @import './styles/input.less';
24
+ @import './styles/button.less';
25
+ @import './styles/modal.less';
26
+ @import './styles/card.less';
27
+ @import './styles/tabs.less';
28
+ @import './styles/toast.less';
29
+ @import './styles/popover.less';
30
+ @import './styles/login.less';
31
+ @import './styles/tags.less';
32
+ @import './styles/uploader.less';
33
+ @import './styles/svg.less';
34
+ @import './styles/stats.less';
35
+ @import './styles/pages/profile.less';
36
+ @import './styles/react-admin/common.less';
37
+ @import './styles/react-admin/toolbar.less';
38
+ @import './styles/mui-overrides.less';
@@ -0,0 +1,46 @@
1
+ const getAllCssVariablesFromStyleSheets = (selector: string) => {
2
+
3
+ const cssVariables = {};
4
+
5
+ // Loop through all style sheets
6
+ for (let i = 0; i < document.styleSheets.length; i++) {
7
+ try {
8
+ const styleSheet = document.styleSheets[i];
9
+ // Skip if the stylesheet is from a different origin and can't be accessed
10
+ if (!styleSheet.cssRules) continue;
11
+
12
+ // Loop through all CSS rules in the stylesheet
13
+ for (let j = 0; j < styleSheet.cssRules.length; j++) {
14
+ const rule = styleSheet.cssRules[j];
15
+
16
+ // Check if it's a style rule (type 1)
17
+
18
+ /* @ts-ignore */
19
+ if (rule.selectorText === selector) {
20
+
21
+ /* @ts-ignore */
22
+ const style = rule.style;
23
+
24
+ // Loop through all style properties
25
+ for (let k = 0; k < style.length; k++) {
26
+ const prop = style[k];
27
+ if (prop.startsWith('--')) {
28
+ //console.log(prop,style.getPropertyValue(prop).trim());
29
+ cssVariables[prop] = style.getPropertyValue(prop).trim();
30
+ }
31
+ }
32
+ }
33
+
34
+ }
35
+ } catch (e) {
36
+ // Skip cross-origin stylesheets that throw security errors
37
+ console.warn('Could not access stylesheet:', e);
38
+ }
39
+ }
40
+
41
+
42
+ return cssVariables;
43
+ };
44
+
45
+
46
+ export default getAllCssVariablesFromStyleSheets;