cmat 0.0.21 → 0.0.23

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 (95) hide show
  1. package/components/material-color-picker/base-color.d.ts +1 -0
  2. package/components/select-tree/select-tree.component.d.ts +1 -1
  3. package/fesm2022/cmat-components-adapter.mjs +9 -9
  4. package/fesm2022/cmat-components-breadcrumb.mjs +9 -9
  5. package/fesm2022/cmat-components-card.mjs +4 -4
  6. package/fesm2022/cmat-components-card.mjs.map +1 -1
  7. package/fesm2022/cmat-components-carousel.mjs +12 -12
  8. package/fesm2022/cmat-components-cascade.mjs +9 -9
  9. package/fesm2022/cmat-components-chip-input.mjs +3 -3
  10. package/fesm2022/cmat-components-custom-formly.mjs +94 -94
  11. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  12. package/fesm2022/cmat-components-date-range.mjs +3 -3
  13. package/fesm2022/cmat-components-drawer.mjs +6 -6
  14. package/fesm2022/cmat-components-fullscreen.mjs +3 -3
  15. package/fesm2022/cmat-components-highlight.mjs +6 -6
  16. package/fesm2022/cmat-components-image-viewer.mjs +3 -3
  17. package/fesm2022/cmat-components-json-editor.mjs +3 -3
  18. package/fesm2022/cmat-components-knob-input.mjs +3 -3
  19. package/fesm2022/cmat-components-masonry.mjs +3 -3
  20. package/fesm2022/cmat-components-material-color-picker.mjs +16 -4
  21. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  22. package/fesm2022/cmat-components-material-datetimepicker.mjs +43 -43
  23. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  24. package/fesm2022/cmat-components-navigation.mjs +40 -40
  25. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  26. package/fesm2022/cmat-components-opt-input.mjs +3 -3
  27. package/fesm2022/cmat-components-org-chart.mjs +9 -9
  28. package/fesm2022/cmat-components-pagination.mjs +15 -13
  29. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  30. package/fesm2022/cmat-components-password-strength.mjs +9 -9
  31. package/fesm2022/cmat-components-popover.mjs +9 -9
  32. package/fesm2022/cmat-components-progress-bar.mjs +4 -4
  33. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  34. package/fesm2022/cmat-components-rating.mjs +3 -3
  35. package/fesm2022/cmat-components-select-search.mjs +9 -9
  36. package/fesm2022/cmat-components-select-table.mjs +4 -4
  37. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  38. package/fesm2022/cmat-components-select-tree.mjs +6 -6
  39. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  40. package/fesm2022/cmat-components-speed-dial.mjs +9 -9
  41. package/fesm2022/cmat-components-timeline.mjs +13 -13
  42. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  43. package/fesm2022/cmat-components-toast.mjs +9 -9
  44. package/fesm2022/cmat-components-transfer-picker.mjs +19 -19
  45. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  46. package/fesm2022/cmat-components-treetable.mjs +6 -6
  47. package/fesm2022/cmat-components-upload.mjs +11 -11
  48. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  49. package/fesm2022/cmat-directives-animate-on-scroll.mjs +9 -11
  50. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  51. package/fesm2022/cmat-directives-arrow-cursor.mjs +3 -3
  52. package/fesm2022/cmat-directives-autofocus.mjs +3 -3
  53. package/fesm2022/cmat-directives-data-exporter.mjs +21 -21
  54. package/fesm2022/cmat-directives-debounce.mjs +9 -9
  55. package/fesm2022/cmat-directives-digit-only.mjs +6 -6
  56. package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
  57. package/fesm2022/cmat-lib-mock-api.mjs +6 -6
  58. package/fesm2022/cmat-pipes-bytes.mjs +3 -3
  59. package/fesm2022/cmat-pipes-date-format.mjs +3 -3
  60. package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
  61. package/fesm2022/cmat-pipes-group-by.mjs +3 -3
  62. package/fesm2022/cmat-pipes-keys.mjs +3 -3
  63. package/fesm2022/cmat-pipes-secure.mjs +3 -3
  64. package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
  65. package/fesm2022/cmat-services-alert.mjs +3 -3
  66. package/fesm2022/cmat-services-config.mjs +6 -6
  67. package/fesm2022/cmat-services-confirmation.mjs +7 -7
  68. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  69. package/fesm2022/cmat-services-data.mjs +3 -3
  70. package/fesm2022/cmat-services-export-as.mjs +7 -7
  71. package/fesm2022/cmat-services-export-as.mjs.map +1 -1
  72. package/fesm2022/cmat-services-loading.mjs +6 -6
  73. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  74. package/fesm2022/cmat-services-media-watcher.mjs +3 -3
  75. package/fesm2022/cmat-services-platform.mjs +3 -3
  76. package/fesm2022/cmat-services-splash-screen.mjs +3 -3
  77. package/fesm2022/cmat-services-title.mjs +3 -3
  78. package/fesm2022/cmat-services-translation.mjs +3 -3
  79. package/fesm2022/cmat-services-utils.mjs +3 -3
  80. package/package.json +56 -56
  81. package/styles/components/bundle.scss +23 -25
  82. package/styles/components/input.scss +2 -0
  83. package/styles/overrides/angular-material.scss +75 -59
  84. package/styles/overrides/fullcalendar.scss +3 -1
  85. package/styles/overrides/quill.scss +8 -6
  86. package/styles/tailwind.scss +99 -15
  87. package/styles/user-themes.scss +1 -1
  88. package/tailwind/plugins/helpers.js +16 -0
  89. package/tailwind/plugins/scrollbar/index.js +31 -0
  90. package/tailwind/plugins/scrollbar/typedefs.js +9 -0
  91. package/tailwind/plugins/scrollbar/utilities.js +201 -0
  92. package/tailwind/plugins/scrollbar/variants.js +30 -0
  93. package/tailwind/plugins/theming.js +257 -256
  94. package/tailwind/plugins/utilities.js +12 -25
  95. package/tailwind/utils/json-to-sass-map.js +28 -36
@@ -1 +1 @@
1
- $user-themes: (default: (selector: ".theme-default", primary: (50: #eef2ff, 100: #e0e7ff, 200: #c7d2fe, 300: #a5b4fc, 400: #818cf8, 500: #6366f1, 600: #4f46e5, 700: #4338ca, 800: #3730a3, 900: #312e81, 950: #1e1b4b, DEFAULT: #4f46e5, contrast: (50: #1e1b4b, 100: #1e1b4b, 200: #1e1b4b, 300: #1e1b4b, 400: #1e1b4b, 500: #FFFFFF, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #FFFFFF)), accent: (50: #fdf2f8, 100: #fce7f3, 200: #fbcfe8, 300: #f9a8d4, 400: #f472b6, 500: #ec4899, 600: #db2777, 700: #be185d, 800: #9d174d, 900: #831843, 950: #500724, DEFAULT: #db2777, contrast: (50: #500724, 100: #500724, 200: #500724, 300: #500724, 400: #500724, 500: #500724, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #FFFFFF)), warn: (50: #fef2f2, 100: #fee2e2, 200: #fecaca, 300: #fca5a5, 400: #f87171, 500: #ef4444, 600: #dc2626, 700: #b91c1c, 800: #991b1b, 900: #7f1d1d, 950: #450a0a, DEFAULT: #dc2626, contrast: (50: #450a0a, 100: #450a0a, 200: #450a0a, 300: #450a0a, 400: #450a0a, 500: #fef2f2, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #FFFFFF))), sky: (selector: ".theme-sky", primary: (50: #f0f9ff, 100: #e0f2fe, 200: #bae6fd, 300: #7dd3fc, 400: #38bdf8, 500: #0ea5e9, 600: #0284c7, 700: #0369a1, 800: #075985, 900: #0c4a6e, 950: #082f49, DEFAULT: #0ea5e9, contrast: (50: #082f49, 100: #082f49, 200: #082f49, 300: #082f49, 400: #082f49, 500: #082f49, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #082f49)), accent: (50: #f8fafc, 100: #f1f5f9, 200: #e2e8f0, 300: #cbd5e1, 400: #94a3b8, 500: #64748b, 600: #475569, 700: #334155, 800: #1e293b, 900: #0f172a, 950: #020617, DEFAULT: #475569, contrast: (50: #020617, 100: #020617, 200: #020617, 300: #020617, 400: #020617, 500: #FFFFFF, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #FFFFFF)), warn: (50: #fef2f2, 100: #fee2e2, 200: #fecaca, 300: #fca5a5, 400: #f87171, 500: #ef4444, 600: #dc2626, 700: #b91c1c, 800: #991b1b, 900: #7f1d1d, 950: #450a0a, DEFAULT: #dc2626, contrast: (50: #450a0a, 100: #450a0a, 200: #450a0a, 300: #450a0a, 400: #450a0a, 500: #fef2f2, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #FFFFFF))), teal: (selector: ".theme-teal", primary: (50: #f0fdfa, 100: #ccfbf1, 200: #99f6e4, 300: #5eead4, 400: #2dd4bf, 500: #14b8a6, 600: #0d9488, 700: #0f766e, 800: #115e59, 900: #134e4a, 950: #042f2e, DEFAULT: #0d9488, contrast: (50: #042f2e, 100: #042f2e, 200: #042f2e, 300: #042f2e, 400: #042f2e, 500: #042f2e, 600: #042f2e, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #042f2e)), accent: (50: #fff7ed, 100: #ffedd5, 200: #fed7aa, 300: #fdba74, 400: #fb923c, 500: #f97316, 600: #ea580c, 700: #c2410c, 800: #9a3412, 900: #7c2d12, 950: #431407, DEFAULT: #ea580c, contrast: (50: #431407, 100: #431407, 200: #431407, 300: #431407, 400: #431407, 500: #431407, 600: #431407, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #431407)), warn: (50: #fef2f2, 100: #fee2e2, 200: #fecaca, 300: #fca5a5, 400: #f87171, 500: #ef4444, 600: #dc2626, 700: #b91c1c, 800: #991b1b, 900: #7f1d1d, 950: #450a0a, DEFAULT: #dc2626, contrast: (50: #450a0a, 100: #450a0a, 200: #450a0a, 300: #450a0a, 400: #450a0a, 500: #fef2f2, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #FFFFFF))), rose: (selector: ".theme-rose", primary: (50: #fff1f2, 100: #ffe4e6, 200: #fecdd3, 300: #fda4af, 400: #fb7185, 500: #f43f5e, 600: #e11d48, 700: #be123c, 800: #9f1239, 900: #881337, 950: #4c0519, DEFAULT: #f43f5e, contrast: (50: #4c0519, 100: #4c0519, 200: #4c0519, 300: #4c0519, 400: #4c0519, 500: #4c0519, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #4c0519)), accent: (50: #eef2ff, 100: #e0e7ff, 200: #c7d2fe, 300: #a5b4fc, 400: #818cf8, 500: #6366f1, 600: #4f46e5, 700: #4338ca, 800: #3730a3, 900: #312e81, 950: #1e1b4b, DEFAULT: #6366f1, contrast: (50: #1e1b4b, 100: #1e1b4b, 200: #1e1b4b, 300: #1e1b4b, 400: #1e1b4b, 500: #FFFFFF, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #FFFFFF)), warn: (50: #fef2f2, 100: #fee2e2, 200: #fecaca, 300: #fca5a5, 400: #f87171, 500: #ef4444, 600: #dc2626, 700: #b91c1c, 800: #991b1b, 900: #7f1d1d, 950: #450a0a, DEFAULT: #dc2626, contrast: (50: #450a0a, 100: #450a0a, 200: #450a0a, 300: #450a0a, 400: #450a0a, 500: #fef2f2, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #FFFFFF))), violet: (selector: ".theme-violet", primary: (50: #f5f3ff, 100: #ede9fe, 200: #ddd6fe, 300: #c4b5fd, 400: #a78bfa, 500: #8b5cf6, 600: #7c3aed, 700: #6d28d9, 800: #5b21b6, 900: #4c1d95, 950: #2e1065, DEFAULT: #7c3aed, contrast: (50: #2e1065, 100: #2e1065, 200: #2e1065, 300: #2e1065, 400: #2e1065, 500: #FFFFFF, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #FFFFFF)), accent: (50: #ecfdf5, 100: #d1fae5, 200: #a7f3d0, 300: #6ee7b7, 400: #34d399, 500: #10b981, 600: #059669, 700: #047857, 800: #065f46, 900: #064e3b, 950: #022c22, DEFAULT: #059669, contrast: (50: #022c22, 100: #022c22, 200: #022c22, 300: #022c22, 400: #022c22, 500: #022c22, 600: #022c22, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #022c22)), warn: (50: #fef2f2, 100: #fee2e2, 200: #fecaca, 300: #fca5a5, 400: #f87171, 500: #ef4444, 600: #dc2626, 700: #b91c1c, 800: #991b1b, 900: #7f1d1d, 950: #450a0a, DEFAULT: #dc2626, contrast: (50: #450a0a, 100: #450a0a, 200: #450a0a, 300: #450a0a, 400: #450a0a, 500: #fef2f2, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #FFFFFF))), amber: (selector: ".theme-amber", primary: (50: #fffbeb, 100: #fef3c7, 200: #fde68a, 300: #fcd34d, 400: #fbbf24, 500: #f59e0b, 600: #d97706, 700: #b45309, 800: #92400e, 900: #78350f, 950: #451a03, DEFAULT: #f59e0b, contrast: (50: #451a03, 100: #451a03, 200: #451a03, 300: #451a03, 400: #451a03, 500: #451a03, 600: #451a03, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #451a03)), accent: (50: #f5f3ff, 100: #ede9fe, 200: #ddd6fe, 300: #c4b5fd, 400: #a78bfa, 500: #8b5cf6, 600: #7c3aed, 700: #6d28d9, 800: #5b21b6, 900: #4c1d95, 950: #2e1065, DEFAULT: #8b5cf6, contrast: (50: #2e1065, 100: #2e1065, 200: #2e1065, 300: #2e1065, 400: #2e1065, 500: #FFFFFF, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #FFFFFF)), warn: (50: #fef2f2, 100: #fee2e2, 200: #fecaca, 300: #fca5a5, 400: #f87171, 500: #ef4444, 600: #dc2626, 700: #b91c1c, 800: #991b1b, 900: #7f1d1d, 950: #450a0a, DEFAULT: #dc2626, contrast: (50: #450a0a, 100: #450a0a, 200: #450a0a, 300: #450a0a, 400: #450a0a, 500: #fef2f2, 600: #FFFFFF, 700: #FFFFFF, 800: #FFFFFF, 900: #FFFFFF, 950: #FFFFFF, DEFAULT: #FFFFFF))));
1
+ $user-themes: (default: (selector: ".theme-default", primary: (50: #eef2ff, 100: #e0e7ff, 200: #c6d2ff, 300: #a3b3ff, 400: #7c86ff, 500: #615fff, 600: #4f39f6, 700: #432dd7, 800: #372aac, 900: #312c85, 950: #1e1a4d, DEFAULT: #4f39f6, contrast: (50: #1e1a4d, 100: #1e1a4d, 200: #1e1a4d, 300: #1e1a4d, 400: #1e1a4d, 500: #fff, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #fff)), accent: (50: #fdf2f8, 100: #fce7f3, 200: #fccee8, 300: #fda5d5, 400: #fb64b6, 500: #f6339a, 600: #e60076, 700: #c6005c, 800: #a3004c, 900: #861043, 950: #510424, DEFAULT: #e60076, contrast: (50: #510424, 100: #510424, 200: #510424, 300: #510424, 400: #510424, 500: #510424, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #fff)), warn: (50: #fef2f2, 100: #ffe2e2, 200: #ffc9c9, 300: #ffa2a2, 400: #ff6467, 500: #fb2c36, 600: #e7000b, 700: #c10007, 800: #9f0712, 900: #82181a, 950: #460809, DEFAULT: #e7000b, contrast: (50: #460809, 100: #460809, 200: #460809, 300: #460809, 400: #460809, 500: #fef2f2, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #fff))), sky: (selector: ".theme-sky", primary: (50: #f0f9ff, 100: #dff2fe, 200: #b8e6fe, 300: #74d4ff, 400: #00bcff, 500: #00a6f4, 600: #0084d1, 700: #0069a8, 800: #00598a, 900: #024a70, 950: #052f4a, DEFAULT: #00a6f4, contrast: (50: #052f4a, 100: #052f4a, 200: #052f4a, 300: #052f4a, 400: #052f4a, 500: #052f4a, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #052f4a)), accent: (50: #f8fafc, 100: #f1f5f9, 200: #e2e8f0, 300: #cad5e2, 400: #90a1b9, 500: #62748e, 600: #45556c, 700: #314158, 800: #1d293d, 900: #0f172b, 950: #020618, DEFAULT: #45556c, contrast: (50: #020618, 100: #020618, 200: #020618, 300: #020618, 400: #020618, 500: #fff, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #fff)), warn: (50: #fef2f2, 100: #ffe2e2, 200: #ffc9c9, 300: #ffa2a2, 400: #ff6467, 500: #fb2c36, 600: #e7000b, 700: #c10007, 800: #9f0712, 900: #82181a, 950: #460809, DEFAULT: #e7000b, contrast: (50: #460809, 100: #460809, 200: #460809, 300: #460809, 400: #460809, 500: #fef2f2, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #fff))), teal: (selector: ".theme-teal", primary: (50: #f0fdfa, 100: #cbfbf1, 200: #96f7e4, 300: #46ecd5, 400: #00d5be, 500: #00bba7, 600: #009689, 700: #00786f, 800: #005f5a, 900: #0b4f4a, 950: #022f2e, DEFAULT: #009689, contrast: (50: #022f2e, 100: #022f2e, 200: #022f2e, 300: #022f2e, 400: #022f2e, 500: #022f2e, 600: #022f2e, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #022f2e)), accent: (50: #fff7ed, 100: #ffedd4, 200: #ffd6a7, 300: #ffb86a, 400: #ff8904, 500: #ff6900, 600: #f54900, 700: #ca3500, 800: #9f2d00, 900: #7e2a0c, 950: #441306, DEFAULT: #f54900, contrast: (50: #441306, 100: #441306, 200: #441306, 300: #441306, 400: #441306, 500: #441306, 600: #441306, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #441306)), warn: (50: #fef2f2, 100: #ffe2e2, 200: #ffc9c9, 300: #ffa2a2, 400: #ff6467, 500: #fb2c36, 600: #e7000b, 700: #c10007, 800: #9f0712, 900: #82181a, 950: #460809, DEFAULT: #e7000b, contrast: (50: #460809, 100: #460809, 200: #460809, 300: #460809, 400: #460809, 500: #fef2f2, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #fff))), rose: (selector: ".theme-rose", primary: (50: #fff1f2, 100: #ffe4e6, 200: #ffccd3, 300: #ffa1ad, 400: #ff637e, 500: #ff2056, 600: #ec003f, 700: #c70036, 800: #a50036, 900: #8b0836, 950: #4d0218, DEFAULT: #ff2056, contrast: (50: #4d0218, 100: #4d0218, 200: #4d0218, 300: #4d0218, 400: #4d0218, 500: #4d0218, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #4d0218)), accent: (50: #eef2ff, 100: #e0e7ff, 200: #c6d2ff, 300: #a3b3ff, 400: #7c86ff, 500: #615fff, 600: #4f39f6, 700: #432dd7, 800: #372aac, 900: #312c85, 950: #1e1a4d, DEFAULT: #615fff, contrast: (50: #1e1a4d, 100: #1e1a4d, 200: #1e1a4d, 300: #1e1a4d, 400: #1e1a4d, 500: #fff, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #fff)), warn: (50: #fef2f2, 100: #ffe2e2, 200: #ffc9c9, 300: #ffa2a2, 400: #ff6467, 500: #fb2c36, 600: #e7000b, 700: #c10007, 800: #9f0712, 900: #82181a, 950: #460809, DEFAULT: #e7000b, contrast: (50: #460809, 100: #460809, 200: #460809, 300: #460809, 400: #460809, 500: #fef2f2, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #fff))), violet: (selector: ".theme-violet", primary: (50: #f5f3ff, 100: #ede9fe, 200: #ddd6ff, 300: #c4b4ff, 400: #a684ff, 500: #8e51ff, 600: #7f22fe, 700: #7008e7, 800: #5d0ec0, 900: #4d179a, 950: #2f0d68, DEFAULT: #7f22fe, contrast: (50: #2f0d68, 100: #2f0d68, 200: #2f0d68, 300: #2f0d68, 400: #2f0d68, 500: #fff, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #fff)), accent: (50: #ecfdf5, 100: #d0fae5, 200: #a4f4cf, 300: #5ee9b5, 400: #00d492, 500: #00bc7d, 600: #096, 700: #007a55, 800: #006045, 900: #004f3b, 950: #002c22, DEFAULT: #096, contrast: (50: #002c22, 100: #002c22, 200: #002c22, 300: #002c22, 400: #002c22, 500: #002c22, 600: #002c22, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #002c22)), warn: (50: #fef2f2, 100: #ffe2e2, 200: #ffc9c9, 300: #ffa2a2, 400: #ff6467, 500: #fb2c36, 600: #e7000b, 700: #c10007, 800: #9f0712, 900: #82181a, 950: #460809, DEFAULT: #e7000b, contrast: (50: #460809, 100: #460809, 200: #460809, 300: #460809, 400: #460809, 500: #fef2f2, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #fff))), amber: (selector: ".theme-amber", primary: (50: #fffbeb, 100: #fef3c6, 200: #fee685, 300: #ffd230, 400: #ffba00, 500: #fd9a00, 600: #e17100, 700: #bb4d00, 800: #973c00, 900: #7b3306, 950: #461901, DEFAULT: #fd9a00, contrast: (50: #461901, 100: #461901, 200: #461901, 300: #461901, 400: #461901, 500: #461901, 600: #461901, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #461901)), accent: (50: #f5f3ff, 100: #ede9fe, 200: #ddd6ff, 300: #c4b4ff, 400: #a684ff, 500: #8e51ff, 600: #7f22fe, 700: #7008e7, 800: #5d0ec0, 900: #4d179a, 950: #2f0d68, DEFAULT: #8e51ff, contrast: (50: #2f0d68, 100: #2f0d68, 200: #2f0d68, 300: #2f0d68, 400: #2f0d68, 500: #fff, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #fff)), warn: (50: #fef2f2, 100: #ffe2e2, 200: #ffc9c9, 300: #ffa2a2, 400: #ff6467, 500: #fb2c36, 600: #e7000b, 700: #c10007, 800: #9f0712, 900: #82181a, 950: #460809, DEFAULT: #e7000b, contrast: (50: #460809, 100: #460809, 200: #460809, 300: #460809, 400: #460809, 500: #fef2f2, 600: #fff, 700: #fff, 800: #fff, 900: #fff, 950: #fff, DEFAULT: #fff))));
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Gets the underlying default import of a module.
3
+ *
4
+ * This is used to handle internal imoprts from Tailwind, since Tailwind Play
5
+ * handles these imports differently.
6
+ *
7
+ * @template T
8
+ * @param {T | { __esModule: unknown, default: T }} mod The module
9
+ * @returns {T} The bare export
10
+ */
11
+ // eslint-disable-next-line no-underscore-dangle
12
+ const importDefault = mod => (mod && mod.__esModule ? mod.default : mod);
13
+
14
+ module.exports = {
15
+ importDefault
16
+ };
@@ -0,0 +1,31 @@
1
+ // TODO: Figure out why the linter is unhappy with this import
2
+ // eslint-disable-next-line import/no-unresolved
3
+ const plugin = require('tailwindcss/plugin');
4
+ const {
5
+ addBaseStyles,
6
+ addBaseSizeUtilities,
7
+ addColorUtilities,
8
+ addRoundedUtilities,
9
+ addSizeUtilities
10
+ } = require('./utilities');
11
+ const { addVariants } = require('./variants');
12
+
13
+ module.exports = plugin.withOptions((options = {}) => tailwind => {
14
+ let preferredStrategy = options.preferredStrategy ?? 'standard';
15
+
16
+ if (preferredStrategy !== 'standard' && preferredStrategy !== 'pseudoelements') {
17
+ // eslint-disable-next-line no-console
18
+ console.warn('WARNING: tailwind-scrollbar preferredStrategy should be \'standard\' or \'pseudoelements\'');
19
+ preferredStrategy = 'standard';
20
+ }
21
+
22
+ addBaseStyles(tailwind, preferredStrategy);
23
+ addBaseSizeUtilities(tailwind, preferredStrategy);
24
+ addColorUtilities(tailwind);
25
+ addVariants(tailwind);
26
+
27
+ if (options.nocompatible) {
28
+ addRoundedUtilities(tailwind);
29
+ addSizeUtilities(tailwind);
30
+ }
31
+ });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @typedef {object} TailwindPlugin
3
+ * @property {Function} matchUtilities - Adds utilities to tailwind
4
+ * @property {Function} theme - Accesses tailwind's theme
5
+ * @property {Function} addVariant - Adds a variant to tailwind
6
+ * @property {Function} config - Accesses tailwind's configuration
7
+ */
8
+
9
+ exports.unused = {};
@@ -0,0 +1,201 @@
1
+ const path = require('path');
2
+ const flattenColorPaletteImport = require('tailwindcss/lib/util/flattenColorPalette');
3
+ const typedefs = require(path.resolve(__dirname, ('./typedefs')));
4
+ const { importDefault } = require(path.resolve(__dirname, ('../helpers')));
5
+
6
+ // Tailwind Play will import these internal imports as ES6 imports, while most
7
+ // other workflows will import them as CommonJS imports.
8
+ const flattenColorPalette = importDefault(flattenColorPaletteImport);
9
+
10
+ const COMPONENTS = ['track', 'thumb', 'corner'];
11
+
12
+ /**
13
+ * @param {Record<never, unknown>} properties - The properties to assign
14
+ * @param {boolean} preferPseudoElements - If true, only browsers that cannot
15
+ * use pseudoelements will specify scrollbar properties
16
+ * @returns {Record<string, unknown>} - The generated CSS rules
17
+ */
18
+ const scrollbarProperties = (properties, preferPseudoElements) => {
19
+ if (preferPseudoElements) {
20
+ return {
21
+ '@supports (-moz-appearance:none)': properties
22
+ };
23
+ }
24
+
25
+ return properties;
26
+ };
27
+
28
+ /**
29
+ * Base resets to make the plugin's utilities work
30
+ *
31
+ * @param {typedefs.TailwindPlugin} tailwind - Tailwind's plugin object
32
+ * @param {'standard' | 'peseudoelements'} preferredStrategy - The preferred
33
+ * scrollbar styling strategy: standards track or pseudoelements
34
+ */
35
+ const addBaseStyles = ({ addBase }, preferredStrategy) => {
36
+ addBase({
37
+ '*': scrollbarProperties({
38
+ 'scrollbar-color': 'initial',
39
+ 'scrollbar-width': 'initial'
40
+ }, preferredStrategy === 'pseudoelements')
41
+ });
42
+ };
43
+
44
+ /**
45
+ * Generates utilties that tell an element what to do with
46
+ * --scrollbar-track and --scrollbar-thumb custom properties
47
+ *
48
+ * @returns {Record<string, unknown>} - The generated CSS
49
+ */
50
+ const generateBaseUtilities = () => ({
51
+ ...Object.fromEntries(COMPONENTS.map(component => {
52
+ const base = `&::-webkit-scrollbar-${component}`;
53
+
54
+ return [
55
+ [base, {
56
+ 'background-color': `var(--scrollbar-${component})`,
57
+ 'border-radius': `var(--scrollbar-${component}-radius)`
58
+ }]
59
+ ];
60
+ }).flat())
61
+ });
62
+
63
+ /**
64
+ * Utilities for initializing a custom styled scrollbar, which implicitly set
65
+ * the scrollbar's size
66
+ *
67
+ * @param {object} options - Options
68
+ * @param {boolean} options.preferPseudoElements - If true, only browsers that
69
+ * cannot use pseudoelements will specify scrollbar-width
70
+ * @returns {Record<string, unknown>} - Base size utilities for scrollbars
71
+ */
72
+ const generateScrollbarSizeUtilities = ({ preferPseudoElements }) => ({
73
+ '.scrollbar': {
74
+ ...generateBaseUtilities(),
75
+ ...scrollbarProperties({
76
+ 'scrollbar-width': 'auto',
77
+ 'scrollbar-color': 'var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)'
78
+ }, preferPseudoElements),
79
+
80
+ '&::-webkit-scrollbar': {
81
+ display: 'block',
82
+ width: 'var(--scrollbar-width, 16px)',
83
+ height: 'var(--scrollbar-height, 16px)'
84
+ }
85
+ },
86
+
87
+ '.scrollbar-thin': {
88
+ ...generateBaseUtilities(),
89
+ ...scrollbarProperties({
90
+ 'scrollbar-width': 'thin',
91
+ 'scrollbar-color': 'var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)'
92
+ }, preferPseudoElements),
93
+
94
+ '&::-webkit-scrollbar': {
95
+ display: 'block',
96
+ width: '8px',
97
+ height: '8px'
98
+ }
99
+ },
100
+
101
+ '.scrollbar-none': {
102
+ ...scrollbarProperties({
103
+ 'scrollbar-width': 'none'
104
+ }, preferPseudoElements),
105
+
106
+ '&::-webkit-scrollbar': {
107
+ display: 'none'
108
+ }
109
+ }
110
+ });
111
+
112
+ /**
113
+ * Converts a color value or function to a color value
114
+ *
115
+ * @param {string | Function} maybeFunction - The color value or function
116
+ * @returns {string} - The color value
117
+ */
118
+ const toColorValue = maybeFunction => (typeof maybeFunction === 'function' ? maybeFunction({}) : maybeFunction);
119
+
120
+ /**
121
+ * Adds scrollbar-COMPONENT-COLOR utilities for every scrollbar component.
122
+ *
123
+ * @param {typedefs.TailwindPlugin} tailwind - Tailwind's plugin object
124
+ */
125
+ const addColorUtilities = ({ matchUtilities, theme }) => {
126
+ const themeColors = flattenColorPalette(theme('colors'));
127
+ const colors = Object.fromEntries(
128
+ Object.entries(themeColors).map(([k, v]) => [k, toColorValue(v)])
129
+ );
130
+
131
+ COMPONENTS.forEach(component => {
132
+ matchUtilities(
133
+ {
134
+ [`scrollbar-${component}`]: value => ({
135
+ [`--scrollbar-${component}`]: toColorValue(value).replace(/<alpha-value>/g, '1')
136
+ })
137
+ },
138
+ {
139
+ values: colors,
140
+ type: 'color'
141
+ }
142
+ );
143
+ });
144
+ };
145
+
146
+ /**
147
+ * Adds scrollbar-COMPONENT-rounded-VALUE utilities for every scrollbar
148
+ * component.
149
+ *
150
+ * @param {typedefs.TailwindPlugin} tailwind - Tailwind's plugin object
151
+ */
152
+ const addRoundedUtilities = ({ theme, matchUtilities }) => {
153
+ COMPONENTS.forEach(component => {
154
+ matchUtilities(
155
+ {
156
+ [`scrollbar-${component}-rounded`]: value => ({
157
+ [`--scrollbar-${component}-radius`]: value
158
+ })
159
+ },
160
+ {
161
+ values: theme('borderRadius')
162
+ }
163
+ );
164
+ });
165
+ };
166
+
167
+ /**
168
+ * @param {typedefs.TailwindPlugin} tailwind - Tailwind's plugin object
169
+ * @param {'standard' | 'peseudoelements'} preferredStrategy - The preferred
170
+ * scrollbar styling strategy: standards track or pseudoelements
171
+ */
172
+ const addBaseSizeUtilities = ({ addUtilities }, preferredStrategy) => {
173
+ addUtilities(generateScrollbarSizeUtilities({
174
+ preferPseudoElements: preferredStrategy === 'pseudoelements'
175
+ }));
176
+ };
177
+
178
+ /**
179
+ * Adds scrollbar-w-* and scrollbar-h-* utilities
180
+ *
181
+ * @param {typedefs.TailwindPlugin} tailwind - Tailwind's plugin object
182
+ */
183
+ const addSizeUtilities = ({ matchUtilities, theme }) => {
184
+ ['width', 'height'].forEach(dimension => {
185
+ matchUtilities({
186
+ [`scrollbar-${dimension[0]}`]: value => ({
187
+ [`--scrollbar-${dimension}`]: value
188
+ })
189
+ }, {
190
+ values: theme(dimension)
191
+ });
192
+ });
193
+ };
194
+
195
+ module.exports = {
196
+ addBaseStyles,
197
+ addBaseSizeUtilities,
198
+ addColorUtilities,
199
+ addRoundedUtilities,
200
+ addSizeUtilities
201
+ };
@@ -0,0 +1,30 @@
1
+ /** @typedef {import('./typedefs').TailwindPlugin} TailwindPlugin */
2
+
3
+ /**
4
+ * Adds scrollbar variants for styling webkit scrollbars' hover and active
5
+ * states.
6
+ *
7
+ * Earlier iterations of this plugin hijacked the hover: and active: variants
8
+ * directly to create a cleaner syntax, but there are several issues with that
9
+ * approach:
10
+ * - It made the plugin prone to breaking other unrelated styles
11
+ * - It made logic like "make an element's scrollbar green when the
12
+ * _element_ is hovered impossible. (This is unusual, but should still
13
+ * be possible.)
14
+ * - It straight up does not work in Tailwind v4.
15
+ *
16
+ * @param {TailwindPlugin} tailwind - Tailwind's plugin object
17
+ */
18
+ const addVariants = ({ addVariant }) => {
19
+ addVariant('scrollbar-hover', '&::-webkit-scrollbar-thumb:hover');
20
+ addVariant('scrollbar-track-hover', '&::-webkit-scrollbar-track:hover');
21
+ addVariant('scrollbar-corner-hover', '&::-webkit-scrollbar-corner:hover');
22
+
23
+ addVariant('scrollbar-active', '&::-webkit-scrollbar-thumb:active');
24
+ addVariant('scrollbar-track-active', '&::-webkit-scrollbar-track:active');
25
+ // Corners can't be active, so they don't get their own active variant.
26
+ };
27
+
28
+ module.exports = {
29
+ addVariants
30
+ };