diff --git a/package.json b/package.json index 87b6123..0b4dfe6 100644 --- a/package.json +++ b/package.json @@ -9,25 +9,25 @@ "@rollup/plugin-inject": "^5.0.5", "autoprefixer": "^10.4.20", "laravel-vite-plugin": "^1.0", - "postcss": "^8.4.45", "prettier": "^3.3.3", "prettier-plugin-tailwindcss": "^0.6.6", "sass": "^1.77.6", - "tailwindcss": "^3.4.11", - "vite": "^5.0" + "vite": "5.4.6", + "postcss": "^8.4.47", + "tailwindcss": "^3.4.13" }, "dependencies": { "@popperjs/core": "^2.11.8", - "jquery": "^3.7.1", - "mini-svg-data-uri": "^1.4.4", - "notie": "^4.3.1", - "sweetalert2": "^11.12.4", - "toastr": "^2.1.4", - "tom-select": "^2.3.1", - "apexcharts": "^3.53.0", + "apexcharts": "^3.54.1", "axios": "^1.7.7", "clipboard": "^2.0.11", "esri-leaflet": "^3.0.12", - "esri-leaflet-geocoder": "^3.1.4" + "esri-leaflet-geocoder": "^3.1.5", + "jquery": "^3.7.1", + "mini-svg-data-uri": "^1.4.4", + "notie": "^4.3.1", + "sweetalert2": "^11.14.3", + "toastr": "^2.1.4", + "tom-select": "^2.3.1" } } diff --git a/postcss.config.js b/postcss.config.js index 2e7af2b..49c0612 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,6 +1,6 @@ export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 0000000..71cafb0 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,9 @@ +const config = { + useTabs: true, + tabWidth: 2, + singleQuote: true, + bracketSameLine: true, + arrowParens: 'always', +}; + +module.exports = config; \ No newline at end of file diff --git a/resources/metronic/core/components/menu/menu.ts b/resources/metronic/core/components/menu/menu.ts index 2cc8dc1..d327be7 100644 --- a/resources/metronic/core/components/menu/menu.ts +++ b/resources/metronic/core/components/menu/menu.ts @@ -36,7 +36,7 @@ export class KTMenu extends KTComponent implements KTMenuInterface { } protected _click(element: HTMLElement, event: Event): void { - if (element.hasAttribute('href') && element.getAttribute('href') !== '#') { + if (element.hasAttribute('href') && element.getAttribute('href') === '#') { return; } @@ -872,7 +872,7 @@ export class KTMenu extends KTComponent implements KTMenuInterface { return KTData.get(subElement, 'menu') as KTMenu; } } - + return null; } @@ -1149,7 +1149,7 @@ export class KTMenu extends KTComponent implements KTMenuInterface { if (menu !== null) { if (target.tagName == 'a' || target.hasAttribute('href')) { menu.dismiss(target); - } + } return menu.link(target, event); } } diff --git a/resources/metronic/core/components/sticky/sticky.ts b/resources/metronic/core/components/sticky/sticky.ts index fc44b93..7d04699 100644 --- a/resources/metronic/core/components/sticky/sticky.ts +++ b/resources/metronic/core/components/sticky/sticky.ts @@ -10,6 +10,7 @@ import { KTStickyInterface, KTStickyConfigInterface } from './types'; export class KTSticky extends KTComponent implements KTStickyInterface { protected override _name: string = 'sticky'; protected override _defaultConfig: KTStickyConfigInterface = { + target: 'body', name: '', class: '', top: '', @@ -23,6 +24,8 @@ export class KTSticky extends KTComponent implements KTStickyInterface { activate: '', }; protected override _config: KTStickyConfigInterface = this._defaultConfig; + protected _targetElement: HTMLElement | Document | null = null; + protected _attributeRoot: string; protected _eventTriggerState: boolean; protected _lastScrollTop: number; @@ -45,11 +48,20 @@ export class KTSticky extends KTComponent implements KTStickyInterface { this._eventTriggerState = true; this._lastScrollTop = 0; + const targetElement = this._getTarget() === 'body' ? document : KTDom.getElement(this._getTarget()); + if (!targetElement) return; + + this._targetElement = targetElement; + this._handlers(); this._process(); this._update(); } + private _getTarget(): string { + return (this._element.getAttribute('data-sticky-target') as string || this._getOption('target') as string); + } + protected _handlers(): void { window.addEventListener('resize', () => { let timer; @@ -63,7 +75,7 @@ export class KTSticky extends KTComponent implements KTStickyInterface { ); }); - window.addEventListener('scroll', () => { + this._targetElement.addEventListener('scroll', () => { this._process(); }); } @@ -77,7 +89,7 @@ export class KTSticky extends KTComponent implements KTStickyInterface { return; } - const st = KTDom.getScrollTop(); + const st = this._getTarget() === 'body' ? KTDom.getScrollTop() : (this._targetElement as HTMLElement).scrollTop; const release = (this._releaseElement && KTDom.isPartiallyInViewport(this._releaseElement)); // Release on reverse scroll mode diff --git a/resources/metronic/core/components/sticky/types.ts b/resources/metronic/core/components/sticky/types.ts index e25cc39..36cb98a 100644 --- a/resources/metronic/core/components/sticky/types.ts +++ b/resources/metronic/core/components/sticky/types.ts @@ -1,4 +1,5 @@ export interface KTStickyConfigInterface { + target: string, name: string, class: string, zindex: string, diff --git a/resources/metronic/core/components/tooltip/tooltip.ts b/resources/metronic/core/components/tooltip/tooltip.ts index 03e31c4..9359ecd 100644 --- a/resources/metronic/core/components/tooltip/tooltip.ts +++ b/resources/metronic/core/components/tooltip/tooltip.ts @@ -79,12 +79,12 @@ export class KTTooltip extends KTComponent implements KTTooltipInterface { } protected _show(): void { - if (this._isOpen) return; - if (this._timeout) { clearTimeout(this._timeout); } + if (this._isOpen) return; + this._timeout = setTimeout(() => { const payload = { cancel: false }; this._fireEvent('show', payload); @@ -120,12 +120,12 @@ export class KTTooltip extends KTComponent implements KTTooltipInterface { } protected _hide(): void { - if (!this._isOpen) return; - if (this._timeout) { clearTimeout(this._timeout); } + if (!this._isOpen) return; + this._timeout = setTimeout(() => { const payload = { cancel: false }; this._fireEvent('hide', payload); diff --git a/resources/metronic/core/helpers/dom.ts b/resources/metronic/core/helpers/dom.ts index bf3c43f..da5d903 100644 --- a/resources/metronic/core/helpers/dom.ts +++ b/resources/metronic/core/helpers/dom.ts @@ -32,7 +32,7 @@ const KTDom = { hasClass(element: HTMLElement, className: string): boolean { // Split classNames string into an array of individual class names const classes = className.split(' '); - + // Loop through each class name for (const className of classes) { // Check if the element has the current class name @@ -41,7 +41,7 @@ const KTDom = { return false; } } - + // Return true if all classes are present return true; }, @@ -154,7 +154,7 @@ const KTDom = { const result: Array = []; const l = element.childNodes.length; - let i = 0; + let i = 0; for (i = 0; i < l; i++) { if (element.childNodes[i].nodeType == 1 && (element.childNodes[i] as HTMLElement).matches(selector)) { @@ -221,7 +221,7 @@ const KTDom = { }, reflow(element: HTMLElement): void { - element.offsetHeight; + element.offsetHeight; }, insertAfter(element: HTMLElement, referenceNode: HTMLElement) { @@ -338,7 +338,7 @@ const KTDom = { } prefix = KTUtils.camelCase(prefix); - + const attributes: { [key: string]: KTOptionType } = {}; const keys = Object.keys(element.dataset).filter((key) => key.startsWith(prefix)); @@ -356,6 +356,9 @@ const KTDom = { document.addEventListener('DOMContentLoaded', () => { callback(); }); + document.addEventListener("livewire:navigated", () => { + callback(); + }); } else { callback(); } diff --git a/resources/metronic/core/plugins/components/card.js b/resources/metronic/core/plugins/components/card.js index ec5dc7c..eef19ca 100644 --- a/resources/metronic/core/plugins/components/card.js +++ b/resources/metronic/core/plugins/components/card.js @@ -1,25 +1,24 @@ -/* eslint-disable max-len */ import plugin from 'tailwindcss/plugin'; -export default plugin(({addComponents, theme}) => { +export default plugin(({ addComponents, theme }) => { // Base addComponents({ '.card': { - 'display': 'flex', + display: 'flex', 'flex-direction': 'column', - 'box-shadow': 'var(--tw-card-box-shadow)', - 'background-color': 'var(--tw-card-background-color)', - 'border-radius': theme('custom.components.common.borderRadius.card'), - 'border': 'var(--tw-card-border)', + 'box-shadow': 'var(--tw-card-box-shadow)', + 'background-color': 'var(--tw-card-background-color)', + 'border-radius': theme('custom.components.common.borderRadius.card'), + border: 'var(--tw-card-border)' }, '.card-title': { 'font-size': theme('fontSize.base'), 'line-height': theme('fontSize.base.1.lineHeight'), 'font-weight': theme('fontWeight.semibold'), - 'color': 'var(--tw-gray-900)', + color: 'var(--tw-gray-900)' }, '.card-header': { - 'display': 'flex', + display: 'flex', 'min-height': '56px', 'align-items': 'center', 'justify-content': 'space-between', @@ -27,37 +26,37 @@ export default plugin(({addComponents, theme}) => { 'padding-left': theme('custom.components.card.px'), 'padding-right': theme('custom.components.card.px'), 'padding-top': theme('custom.components.card.py.header'), - 'padding-bottom': theme('custom.components.card.py.header'), + 'padding-bottom': theme('custom.components.card.py.header') }, '.card-body': { 'flex-grow': '1', 'padding-left': theme('custom.components.card.px'), 'padding-right': theme('custom.components.card.px'), 'padding-top': theme('custom.components.card.py.body'), - 'padding-bottom': theme('custom.components.card.py.body'), + 'padding-bottom': theme('custom.components.card.py.body') }, '.card-footer': { - 'display': 'flex', + display: 'flex', 'align-items': 'center', 'justify-content': 'space-between', 'border-top': 'var(--tw-card-border)', 'padding-left': theme('custom.components.card.px'), 'padding-right': theme('custom.components.card.px'), 'padding-top': theme('custom.components.card.py.footer'), - 'padding-bottom': theme('custom.components.card.py.footer'), + 'padding-bottom': theme('custom.components.card.py.footer') }, '.card-table': { - 'table': { + table: { 'th:first-child, td:first-child': { - 'padding-left': theme('custom.components.card.px'), + 'padding-left': theme('custom.components.card.px') }, 'th:last-child, td:last-child': { - 'padding-right': theme('custom.components.card.px'), + 'padding-right': theme('custom.components.card.px') }, '&.table-border': { - 'border': '0' + border: '0' } - } + } }, '.card-group': { 'padding-left': theme('custom.components.card.px'), @@ -66,33 +65,33 @@ export default plugin(({addComponents, theme}) => { 'padding-bottom': theme('custom.components.card.py.group'), 'border-bottom': 'var(--tw-card-border)', '&:last-child': { - 'border-bottom': '0', - }, + 'border-bottom': '0' + }, '& + .card-footer': { - 'border-top': '0', + 'border-top': '0' } } - }); + }); // Border radius addComponents({ '.table': { 'th:first-child': { - 'border-top-left-radius': theme('custom.components.common.borderRadius.card'), + 'border-top-left-radius': theme('custom.components.common.borderRadius.card') }, 'th:last-child': { - 'border-top-right-radius': theme('custom.components.common.borderRadius.card'), - } + 'border-top-right-radius': theme('custom.components.common.borderRadius.card') + } }, '.card-header + .card-body, .card-header + .card-table': { - 'table': { + table: { 'th:first-child, th:last-child': { 'border-radius': '0' - } + } } } }); - + // Grid addComponents({ '.card-grid': { @@ -101,15 +100,21 @@ export default plugin(({addComponents, theme}) => { 'padding-right': theme('custom.components.card.grid.px') }, '.card-body': { - 'padding': '0', - 'table': { - 'border': '0', + padding: '0', + '.table': { + border: '0', 'th:first-child, td:first-child': { - 'padding-left': theme('custom.components.card.grid.px') + 'padding-left': theme('custom.components.card.grid.px'), + '&.table-cell-center': { + 'padding-right': theme('custom.components.card.grid.px') + } }, 'th:last-child, td:last-child': { - 'padding-right': theme('custom.components.card.grid.px') - } + 'padding-right': theme('custom.components.card.grid.px'), + '&.table-cell-center': { + 'padding-left': theme('custom.components.card.grid.px') + } + } } } } @@ -118,7 +123,7 @@ export default plugin(({addComponents, theme}) => { // Utilities addComponents({ '.card-border': { - 'border': 'var(--tw-card-border)' + border: 'var(--tw-card-border)' }, '.card-rounded': { 'border-radius': theme('custom.components.common.borderRadius.card'), @@ -129,23 +134,23 @@ export default plugin(({addComponents, theme}) => { }, '.card-rounded-b': { 'border-bottom-left-radius': theme('custom.components.common.borderRadius.card'), - 'border-bottom-right-radius': theme('custom.components.common.borderRadius.card'), + 'border-bottom-right-radius': theme('custom.components.common.borderRadius.card') }, '.card-rounded-bl': { - 'border-bottom-left-radius': theme('custom.components.common.borderRadius.card'), + 'border-bottom-left-radius': theme('custom.components.common.borderRadius.card') }, '.card-rounded-br': { - 'border-bottom-right-radius': theme('custom.components.common.borderRadius.card'), + 'border-bottom-right-radius': theme('custom.components.common.borderRadius.card') }, '.card-rounded-t': { 'border-top-left-radius': theme('custom.components.common.borderRadius.card'), - 'border-top-right-radius': theme('custom.components.common.borderRadius.card'), + 'border-top-right-radius': theme('custom.components.common.borderRadius.card') }, '.card-rounded-tl': { - 'border-top-left-radius': theme('custom.components.common.borderRadius.card'), + 'border-top-left-radius': theme('custom.components.common.borderRadius.card') }, '.card-rounded-tr': { - 'border-top-right-radius': theme('custom.components.common.borderRadius.card'), + 'border-top-right-radius': theme('custom.components.common.borderRadius.card') } - }); -}); \ No newline at end of file + }); +}); diff --git a/resources/metronic/core/plugins/components/menu.js b/resources/metronic/core/plugins/components/menu.js index d46804e..6ca77c3 100644 --- a/resources/metronic/core/plugins/components/menu.js +++ b/resources/metronic/core/plugins/components/menu.js @@ -18,7 +18,7 @@ export default plugin(({addComponents, theme}) => { '.menu-default': { 'padding-top': theme('spacing')['2.5'], 'padding-bottom': theme('spacing')['2.5'], - '.menu-link': { + '.menu-link, .menu-label': { 'margin-left': theme('spacing')['2.5'], 'margin-right': theme('spacing')['2.5'], 'padding': theme('spacing')['2.5'], @@ -53,13 +53,13 @@ export default plugin(({addComponents, theme}) => { 'margin-bottom': theme('spacing')['2.5'] }, '.menu-accordion:not(.menu-no-indent)': { - '.menu-item > .menu-link': { + '.menu-item > .menu-link, .menu-item > .menu-label': { 'margin-left': theme('spacing')['5'], }, - '.menu-item > .menu-accordion .menu-item > .menu-link': { + '.menu-item > .menu-accordion .menu-item > .menu-link, .menu-item > .menu-accordion .menu-item > .menu-label': { 'margin-left': theme('spacing')['8'], }, - '.menu-item > .menu-accordion .menu-item > .menu-accordion .menu-item > .menu-link': { + '.menu-item > .menu-accordion .menu-item > .menu-accordion .menu-item > .menu-link, .menu-item > .menu-accordion .menu-item > .menu-accordion .menu-item > .menu-label': { 'margin-left': theme('spacing')['11'], } }, @@ -67,7 +67,7 @@ export default plugin(({addComponents, theme}) => { '.menu-fit': { 'padding-top': '0', 'padding-bottom': '0', - '.menu-link': { + '.menu-link, .menu-label': { 'margin-left': '0', 'margin-right': '0', } @@ -75,7 +75,7 @@ export default plugin(({addComponents, theme}) => { '.menu-space': { 'padding-top': theme('spacing')['2.5'], 'padding-bottom': theme('spacing')['2.5'], - '.menu-link': { + '.menu-link, .menu-label': { 'margin-left': theme('spacing')['2.5'], 'margin-right': theme('spacing')['2.5'], } @@ -95,7 +95,7 @@ export default plugin(({addComponents, theme}) => { '.menu-arrow i': { 'color': 'var(--tw-gray-500)' }, - '.menu-link:hover': { + '.menu-link:hover, .menu-label:hover': { '.menu-title': { 'color': 'var(--tw-gray-900)' }, @@ -104,7 +104,7 @@ export default plugin(({addComponents, theme}) => { } }, '&.active, &.show, &.here, &.focus': { - '> .menu-link': { + '> .menu-link, > .menu-label': { '.menu-title': { 'color': 'var(--tw-gray-900)' }, @@ -114,21 +114,21 @@ export default plugin(({addComponents, theme}) => { } }, '&.active, &.here': { - '> .menu-link': { + '> .menu-link, > .menu-label': { 'background-color': 'var(--tw-gray-100)', '.dark &': { 'background-color': 'var(--tw-coal-300)', } } }, - '& > .menu-link:hover': { + '& > .menu-link:hover, & > .menu-label:hover': { 'background-color': 'var(--tw-gray-100)', '.dark &': { 'background-color': 'var(--tw-coal-300)', } }, '&.disabled': { - '> .menu-link': { + '> .menu-link, > .menu-label': { 'opacity': '0.5' } } diff --git a/resources/metronic/core/plugins/components/modal.js b/resources/metronic/core/plugins/components/modal.js index f193182..c9fe7e3 100644 --- a/resources/metronic/core/plugins/components/modal.js +++ b/resources/metronic/core/plugins/components/modal.js @@ -27,7 +27,8 @@ export default plugin(({addComponents, theme}) => { 'box-shadow': 'var(--tw-modal-box-shadow)', 'background-color': 'var(--tw-modal-background-color)', 'display': 'flex', - 'flex-direction': 'column' + 'flex-direction': 'column', + 'outline': 'none' }, '.modal-header': { @@ -52,7 +53,8 @@ export default plugin(({addComponents, theme}) => { 'padding-left': theme('spacing')['5'], 'padding-right': theme('spacing')['5'], 'padding-top': theme('spacing')['2.5'], - 'padding-bottom': theme('spacing')['2.5'] + 'padding-bottom': theme('spacing')['2.5'], + 'outline': 'none' }, '.modal-footer': { diff --git a/resources/metronic/core/plugins/components/switch.js b/resources/metronic/core/plugins/components/switch.js index 356a098..9923956 100644 --- a/resources/metronic/core/plugins/components/switch.js +++ b/resources/metronic/core/plugins/components/switch.js @@ -1,120 +1,116 @@ /* eslint-disable max-len */ -import plugin from "tailwindcss/plugin"; +import plugin from 'tailwindcss/plugin'; -export default plugin(({ addVariant, addComponents, theme, e }) => { - addComponents({ - ".switch": { - display: "flex", - "align-items": "center", - gap: theme("spacing")["2.5"], - cursor: "pointer", - "input[type=checkbox],input[type=radio]": { - display: "flex", - appearance: "none", - "background-color": "var(--tw-gray-300)", - position: "relative", - cursor: "pointer", - "flex-shrink": "0", - height: theme("custom.components.switch.DEFAULT.height"), - width: theme("custom.components.switch.DEFAULT.width"), - "border-radius": theme( - "custom.components.switch.DEFAULT.height", - ), - transition: "all .15s ease-in-out", - "&:before": { - display: "flex", - position: "absolute", - content: '""', - height: "1rem", - width: "1rem", - "border-radius": "100%", - "background-color": "var(--tw-light)", - left: "0.25rem", - top: "50%", - transform: "translateY(-50%)", - filter: "drop-shadow(0px 3px 4px rgba(0, 0, 0, 0.03))", - transition: "all .15s ease-in-out", - }, - '&:checked, &[aria-checked="true"]': { - "background-color": "var(--tw-primary)", - transition: "all .15s ease-in-out", - "&:before": { - "background-color": "#ffffff", - transition: "all .15s ease-in-out", - left: "calc(100% - 0.25rem)", - transform: "translate(-100%, -50%)", - filter: "none", - }, - }, - "&:disabled": { - "background-color": "var(--tw-gray-100)", - border: "1px solid var(--tw-gray-300)", - cursor: "not-allowed", - opacity: "0.5", - "&:before": { - "background-color": "var(--tw-gray-300)", - }, - '&:checked, &[aria-checked="true"]': { - "background-color": "var(--tw-primary-clarity)", - border: "0", - "&:before": { - "background-color": "var(--tw-light)", - }, - }, - }, - }, - ".switch-label": { - color: "var(--tw-gray-700)", - "font-size": theme("fontSize.sm"), - "font-weight": theme("fontWeight.medium"), - "line-height": theme("lineHeight.4"), - }, - "input[type=checkbox] + .switch-label,input[type=radio] + .switch-label": - { - color: "var(--tw-gray-800)", - }, - "&:has(input[type=checkbox]:disabled),&:has(input[type=radio]:disabled)": - { - ".switch-label": { - color: "var(--tw-gray-500)", - }, - }, - }, - ".switch-sm": { - "input[type=checkbox],input[type=radio]": { - height: theme("custom.components.switch.sm.height"), - width: theme("custom.components.switch.sm.width"), - "border-radius": theme("custom.components.switch.sm.height"), - "&:before": { - height: "0.75rem", - width: "0.75rem", - }, - }, - ".switch-label": { - "font-size": theme("fontSize.2sm"), - }, - }, - ".switch-lg": { - "input[type=checkbox],input[type=radio]": { - height: theme("custom.components.switch.lg.height"), - width: theme("custom.components.switch.lg.width"), - "border-radius": theme("custom.components.switch.lg.height"), - "&:before": { - height: "1.25rem", - width: "1.25rem", - }, - }, - ".switch-label": { - "font-size": theme("fontSize.md"), - }, - }, - }); +export default plugin(({addVariant, addComponents, theme, e}) => { + addComponents({ + '.switch': { + 'display': 'flex', + 'align-items': 'center', + 'gap': theme('spacing')['2.5'], + 'cursor': 'pointer', + 'input[type=checkbox]': { + 'display': 'flex', + 'appearance': 'none', + 'background-color': 'var(--tw-gray-300)', + 'position': 'relative', + 'cursor': 'pointer', + 'flex-shrink': '0', + 'height': theme('custom.components.switch.DEFAULT.height'), + 'width': theme('custom.components.switch.DEFAULT.width'), + 'border-radius': theme('custom.components.switch.DEFAULT.height'), + 'transition': 'all .15s ease-in-out', + '&:before': { + 'display': 'flex', + 'position': 'absolute', + 'content': '""', + 'height': '1rem', + 'width': '1rem', + 'border-radius': '100%', + 'background-color': 'var(--tw-light)', + 'left': '0.25rem', + 'top': '50%', + 'transform': 'translateY(-50%)', + 'filter': 'drop-shadow(0px 3px 4px rgba(0, 0, 0, 0.03))', + 'transition': 'all .15s ease-in-out' + }, + '&:checked, &[aria-checked="true"]': { + 'background-color': 'var(--tw-primary)', + 'transition': 'all .15s ease-in-out', + '&:before': { + 'background-color': '#ffffff', + 'transition': 'all .15s ease-in-out', + 'left': 'calc(100% - 0.25rem)', + 'transform': 'translate(-100%, -50%)', + 'filter': 'none' + } + }, + '&:disabled': { + 'background-color': 'var(--tw-gray-100)', + 'border': '1px solid var(--tw-gray-300)', + 'cursor': 'not-allowed', + 'opacity': '0.5', + '&:before': { + 'background-color': 'var(--tw-gray-300)' + }, + '&:checked, &[aria-checked="true"]': { + 'background-color': 'var(--tw-primary-clarity)', + 'border': '0', + '&:before': { + 'background-color': 'var(--tw-light)' + } + } + } + }, + '.switch-label': { + 'color': 'var(--tw-gray-700)', + 'font-size': theme('fontSize.sm'), + 'font-weight': theme('fontWeight.medium'), + 'line-height': theme('lineHeight.4') + }, + 'input[type=checkbox] + .switch-label': { + 'color': 'var(--tw-gray-800)', + }, + '&:has(input[type=checkbox]:disabled)': { + '.switch-label': { + 'color': 'var(--tw-gray-500)' + } + } + }, + '.switch-sm': { + 'input[type=checkbox]': { + 'height': theme('custom.components.switch.sm.height'), + 'width': theme('custom.components.switch.sm.width'), + 'border-radius': theme('custom.components.switch.sm.height'), + '&:before': { + 'height': '0.75rem', + 'width': '0.75rem', + } + }, + '.switch-label': { + 'font-size': theme('fontSize.2sm'), + } + }, + '.switch-lg': { + 'input[type=checkbox]': { + 'height': theme('custom.components.switch.lg.height'), + 'width': theme('custom.components.switch.lg.width'), + 'border-radius': theme('custom.components.switch.lg.height'), + '&:before': { + 'height': '1.25rem', + 'width': '1.25rem', + } + }, + '.switch-label': { + 'font-size': theme('fontSize.md'), + } + } + }); - addVariant("switch-on", [ - ({ modifySelectors, separator }) => { - modifySelectors(({ className }) => { - return `.switch:has(:checked) .${e(`switch-on${separator}${className}`)}`; - }); - }, - ]); -}); + addVariant('switch-on', [ + ({modifySelectors, separator}) => { + modifySelectors(({className}) => { + return `.switch:has([type="checkbox"]:checked) .${e(`switch-on${separator}${className}`)}`; + }); + } + ]); +}); \ No newline at end of file diff --git a/resources/metronic/core/plugins/components/table.js b/resources/metronic/core/plugins/components/table.js index 084e87f..02c9cad 100644 --- a/resources/metronic/core/plugins/components/table.js +++ b/resources/metronic/core/plugins/components/table.js @@ -22,10 +22,6 @@ export default plugin(({addComponents, theme}) => { }, 'thead, tfoot': { 'td, th': { - 'padding-left': theme('custom.components.table.px'), - 'padding-right': theme('custom.components.table.px'), - 'padding-top': theme('custom.components.table.py.head'), - 'padding-bottom': theme('custom.components.table.py.head'), 'background-color': 'var(--tw-table-head-background-color)', 'color': 'var(--tw-gray-600)', 'font-weight': theme('fontWeight.medium'), @@ -47,11 +43,7 @@ export default plugin(({addComponents, theme}) => { 'tbody': { 'vertical-align': 'inherit', 'tr': { - 'td, th': { - 'padding-left': theme('custom.components.table.px'), - 'padding-right': theme('custom.components.table.px'), - 'padding-top': theme('custom.components.table.py.body'), - 'padding-bottom': theme('custom.components.table.py.body'), + 'td, th': { 'border-bottom': 'var(--tw-table-border)' }, '&:last-child': { @@ -62,8 +54,92 @@ export default plugin(({addComponents, theme}) => { } } } - }); + }); + // Sizes + addComponents({ + '.table': { + 'thead, tfoot': { + 'td, th': { + 'padding-left': theme('custom.components.table.px.DEFAULT'), + 'padding-right': theme('custom.components.table.px.DEFAULT'), + 'padding-top': theme('custom.components.table.py.DEFAULT.head'), + 'padding-bottom': theme('custom.components.table.py.DEFAULT.head') + }, + }, + 'tbody': { + 'tr': { + 'td, th': { + 'padding-left': theme('custom.components.table.px.DEFAULT'), + 'padding-right': theme('custom.components.table.px.DEFAULT'), + 'padding-top': theme('custom.components.table.py.DEFAULT.body'), + 'padding-bottom': theme('custom.components.table.py.DEFAULT.body') + } + } + } + }, + '.table-xs': { + 'thead, tfoot': { + 'td, th': { + 'padding-left': theme('custom.components.table.px.xs'), + 'padding-right': theme('custom.components.table.px.xs'), + 'padding-top': theme('custom.components.table.py.xs.head'), + 'padding-bottom': theme('custom.components.table.py.xs.head') + }, + }, + 'tbody': { + 'tr': { + 'td, th': { + 'padding-left': theme('custom.components.table.px.xs'), + 'padding-right': theme('custom.components.table.px.xs'), + 'padding-top': theme('custom.components.table.py.xs.body'), + 'padding-bottom': theme('custom.components.table.py.xs.body') + } + } + } + }, + '.table-sm': { + 'thead, tfoot': { + 'td, th': { + 'padding-left': theme('custom.components.table.px.sm'), + 'padding-right': theme('custom.components.table.px.sm'), + 'padding-top': theme('custom.components.table.py.sm.head'), + 'padding-bottom': theme('custom.components.table.py.sm.head') + }, + }, + 'tbody': { + 'tr': { + 'td, th': { + 'padding-left': theme('custom.components.table.px.sm'), + 'padding-right': theme('custom.components.table.px.sm'), + 'padding-top': theme('custom.components.table.py.sm.body'), + 'padding-bottom': theme('custom.components.table.py.sm.body') + } + } + } + }, + '.table-lg': { + 'thead, tfoot': { + 'td, th': { + 'padding-left': theme('custom.components.table.px.lg'), + 'padding-right': theme('custom.components.table.px.lg'), + 'padding-top': theme('custom.components.table.py.lg.head'), + 'padding-bottom': theme('custom.components.table.py.lg.head') + }, + }, + 'tbody': { + 'tr': { + 'td, th': { + 'padding-left': theme('custom.components.table.px.lg'), + 'padding-right': theme('custom.components.table.px.lg'), + 'padding-top': theme('custom.components.table.py.lg.body'), + 'padding-bottom': theme('custom.components.table.py.lg.body') + } + } + } + } + }); + // Border addComponents({ '.table-border': { diff --git a/resources/metronic/core/plugins/plugin.js b/resources/metronic/core/plugins/plugin.js index 73d8054..f612ad5 100644 --- a/resources/metronic/core/plugins/plugin.js +++ b/resources/metronic/core/plugins/plugin.js @@ -15,24 +15,12 @@ export default plugin(({config, addBase, addComponents, addVariant, e}) => { 'display': 'flex', 'flex-direction': 'column' }, - '.menu-link': { + '.menu-link, .menu-label, .menu-toggle': { 'cursor': 'pointer', 'display': 'flex', 'align-items': 'center', 'flex-grow': '1', }, - '.menu-label': { - 'display': 'flex', - 'align-items': 'center', - 'flex-grow': '1', - 'line-height': '1', - }, - '.menu-toggle': { - 'display': 'flex', - 'align-items': 'center', - 'flex-grow': '1', - 'line-height': '1', - }, '.menu-title': { 'display': 'flex', 'align-items': 'center', diff --git a/tailwind.config.js b/tailwind.config.js index f9d9f51..d477ae1 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,639 +1,657 @@ /** @type {import('tailwindcss').Config} */ export default { - content: [ - "./resources/**/*.blade.php", - "./resources/**/*.js", - "./resources/**/*.vue", - "./modules/**/*.php", - ], - safelist: [ - 'metronic', - 'hidden', - 'ki-filled', - 'ki-outline', - 'ki-duotone', - 'ki-solid', - { pattern: /^apexcharts-.*$/ }, - { pattern: /^leaflet-.*$/ } - ], - darkMode: 'class', - theme: { - extend: { - base: { - colors: { - gray: { - light: { - 100: '#F9F9F9', - 200: '#F1F1F4', - 300: '#DBDFE9', - 400: '#C4CADA', - 500: '#99A1B7', - 600: '#78829D', - 700: '#4B5675', - 800: '#252F4A', - 900: '#071437', - }, - dark: { - 100: '#1B1C22', - 200: '#26272F', - 300: '#363843', - 400: '#464852', - 500: '#636674', - 600: '#808290', - 700: '#9A9CAE', - 800: '#B5B7C8', - 900: '#F5F5F5' - } - }, - contextual: { - light: { - brand: { - default: '#FF6F1E', - active: '#F15700', - light: '#FFF5EF', - clarity: 'rgba(255, 111, 30, 0.20)', - inverse: '#ffffff' - }, - primary: { - default: '#1B84FF', - active: '#056EE9', - light: '#EFF6FF', - clarity: 'rgba(27, 132, 255, 0.20)', - inverse: '#ffffff' - }, - success: { - default: '#17C653', - active: '#04B440', - light: '#EAFFF1', - clarity: 'rgba(23, 198, 83, 0.20)', - inverse: '#ffffff' - }, - info: { - default: '#7239EA', - active: '#5014D0', - light: '#F8F5FF', - clarity: 'rgba(114, 57, 234, 0.20)', - inverse: '#ffffff' - }, - danger: { - default: '#F8285A', - active: '#D81A48', - light: '#FFEEF3', - clarity: 'rgba(248, 40, 90, 0.20)', - inverse: '#ffffff' - }, - warning: { - default: '#F6B100', - active: '#DFA000', - light: '#FFF8DD', - clarity: 'rgba(246, 177, 0, 0.20)', - inverse: '#ffffff' - }, - dark: { - default: '#1E2129', - active: '#111318', - light: '#F9F9F9', - clarity: 'rgba(30, 33, 41, 0.20)', - inverse: '#ffffff' - }, - light: { - default: '#ffffff', - active: '#FCFCFC', - light: '#ffffff', - clarity: 'rgba(255, 255, 255, 0.20)', - inverse: '#4B5675' - }, - secondary: { - default: '#F9F9F9', - active: '#F9F9F9', - light: '#F9F9F9', - clarity: 'rgba(249, 249, 249, 0.20)', - inverse: '#4B5675' - } - }, - dark: { - brand: { - default: '#D74E00', - active: '#F35700', - light: '#272320', - clarity: 'rgba(215, 78, 0, 0.20)', - inverse: '#ffffff', - }, - primary: { - default: '#006AE6', - active: '#107EFF', - light: '#172331', - clarity: 'rgba(0, 106, 230, 0.20)', - inverse: '#ffffff' - }, - success: { - default: '#00A261', - active: '#01BF73', - light: '#1F2623', - clarity: 'rgba(0, 162, 97, 0.20);', - inverse: '#ffffff' - }, - info: { - default: '#883FFF', - active: '#9E63FF', - light: '#272134', - clarity: 'rgba(136, 63, 255, 0.20)', - inverse: '#ffffff' - }, - danger: { - default: '#E42855', - active: '#FF3767', - light: '#302024', - clarity: 'rgba(228, 40, 85, 0.20)', - inverse: '#ffffff' - }, - warning: { - default: '#C59A00', - active: '#D9AA00', - light: '#242320', - clarity: 'rgba(197, 154, 0, 0.20)', - inverse: '#ffffff' - }, - dark: { - default: '#272A34', - active: '#2D2F39', - light: '#1E2027', - clarity: 'rgba(39, 42, 52, 0.20)', - inverse: '#ffffff' - }, - light: { - default: '#1F212A', - active: '#1F212A', - light: '#1F212A', - clarity: 'rgba(31, 33, 42, 0.20)', - inverse: '#9A9CAE' - }, - secondary: { - default: '#363843', - active: '#464852', - light: '#363843', - clarity: 'rgba(54, 56, 67, 0.20)', - inverse: '#9A9CAE' - }, - } - } - }, - boxShadows: { - light: { - default: '0px 4px 12px 0px rgba(0, 0, 0, 0.09)', - light: '0px 3px 4px 0px rgba(0, 0, 0, 0.03)', - primary: '0px 4px 12px 0px rgba(40, 132, 239, 0.35)', - success: '0px 4px 12px 0px rgba(53, 189, 100, 0.35)', - danger: '0px 4px 12px 0px rgba(241, 65, 108, 0.35)', - info: '0px 4px 12px 0px rgba(114, 57, 234, 0.35)', - warning: '0px 4px 12px 0px rgba(246, 192, 0, 0.35)', - dark: '0px 4px 12px 0px rgba(37, 47, 74, 0.35)' - }, - dark: { - default: 'none', - light: 'none', - primary: 'none', - success: 'none', - danger: 'none', - info: 'none', - warning: 'none', - dark: 'none' - } - } - }, - fontFamily: { - sans: ['Inter', 'system-ui', 'sans-serif'], - }, - colors: { - gray: { - 100: 'var(--tw-gray-100)', - 200: 'var(--tw-gray-200)', - 300: 'var(--tw-gray-300)', - 400: 'var(--tw-gray-400)', - 500: 'var(--tw-gray-500)', - 600: 'var(--tw-gray-600)', - 700: 'var(--tw-gray-700)', - 800: 'var(--tw-gray-800)', - 900: 'var(--tw-gray-900)', - }, - primary: { - DEFAULT: 'var(--tw-primary)', - active: 'var(--tw-primary-active)', - light: 'var(--tw-primary-light)', - clarity: 'var(--tw-primary-clarity)', - inverse: 'var(--tw-primary-inverse)', - }, - success: { - DEFAULT: 'var(--tw-success)', - active: 'var(--tw-success-active)', - light: 'var(--tw-success-light)', - clarity: 'var(--tw-success-clarity)', - inverse: 'var(--tw-success-inverse)', - }, - warning: { - DEFAULT: 'var(--tw-warning)', - active: 'var(--tw-warning-active)', - light: 'var(--tw-warning-light)', - clarity: 'var(--tw-warning-clarity)', - inverse: 'var(--tw-warning-inverse)', - }, - danger: { - DEFAULT: 'var(--tw-danger)', - active: 'var(--tw-danger-active)', - light: 'var(--tw-danger-light)', - clarity: 'var(--tw-danger-clarity)', - inverse: 'var(--tw-danger-inverse)', - }, - info: { - DEFAULT: 'var(--tw-info)', - active: 'var(--tw-info-active)', - light: 'var(--tw-info-light)', - clarity: 'var(--tw-info-clarity)', - inverse: 'var(--tw-info-inverse)', - }, - dark: { - DEFAULT: 'var(--tw-dark)', - active: 'var(--tw-dark-active)', - light: 'var(--tw-dark-light)', - clarity: 'var(--tw-dark-clarity)', - inverse: 'var(--tw-dark-inverse)', - }, - secondary: { - DEFAULT: 'var(--tw-secondary)', - active: 'var(--tw-secondary-active)', - light: 'var(--tw-secondary-light)', - clarity: 'var(--tw-secondary-clarity)', - inverse: 'var(--tw-secondary-inverse)', - }, - light: { - DEFAULT: 'var(--tw-light)', - active: 'var(--tw-light-active)', - light: 'var(--tw-light-light)', - clarity: 'var(--tw-light-clarity)', - inverse: 'var(--tw-light-inverse)', - }, - brand: { - DEFAULT: 'var(--tw-brand)', - active: 'var(--tw-brand-active)', - light: 'var(--tw-brand-light)', - clarity: 'var(--tw-brand-clarity)', - inverse: 'var(--tw-brand-inverse)', - }, - coal: { - 100: '#15171C', - 200: '#13141A', - 300: '#111217', - 400: '#0F1014', - 500: '#0D0E12', - 600: '#0B0C10', - black: '#000000', - clarity: 'rgba(24, 25, 31, 0.50)', - } - }, - boxShadow: { - card: 'var(--tw-card-box-shadow)', - default: 'var(--tw-default-box-shadow)', - light: 'var(--tw-light-box-shadow)', - primary: 'var(--tw-primary-box-shadow)', - success: 'var(--tw-success-box-shadow)', - danger: 'var(--tw-danger-box-shadow)', - info: 'var(--tw-info-box-shadow)', - warning: 'var(--tw-warning-box-shadow)', - dark: 'var(--tw-dark-box-shadow)', - }, - fontSize: { - '4xs': [ - '0.5625rem', // 9px - { - lineHeight: '0.6875rem' // 11px - } - ], - '3xs': [ - '0.625rem', // 10px - { - lineHeight: '0.75rem' // 12px - } - ], - '2xs': [ - '0.6875rem', // 11px - { - lineHeight: '0.75rem', // 12px - } - ], - '2sm': [ - '0.8125rem', // 13px - { - lineHeight: '1.125rem' // 18px - } - ], - 'md': [ - '0.9375rem', // 15px - { - lineHeight: '1.375rem' // 22px - } - ], - '1.5xl': [ - '1.375rem', // 22px - { - lineHeight: '1.8125rem' // 29px - } - ], - '2.5xl': [ - '1.625rem', // 26px - { - lineHeight: '2.125rem' // 34px - } - ] - }, - lineHeight: { - '0': '0', // 0px - '5.5': '1.375rem', // 22px - }, - zIndex: { - 1: '1', - 5: '5', - 15: '15', - 25: '25', - }, - borderWidth: { - 3: '3px', - }, - spacing: { - 0.75: '0.1875rem', // 3px - 1.25: '0.3rem', // 5px - 1.75: '0.4375rem', // 7px - 2.25: '0.563rem', // 9px - 2.75: '0.688rem', // 11px - 4.5: '1.125rem', // 18px - 5.5: '1.375rem', // 22px - 6.5: '1.625rem', // 26px - 7.5: '1.875rem', // 30px - 12.5: '3.125rem', // 40px - }, - screens: { - sm: '640px', - md: '768px', - lg: '1024px', - xl: '1280px', - '2xl': '1536px', - } - }, - custom: ({ theme }) => ({ - components: { - common: { - backgrounds: { - light: { - card: 'white', - tooltip: theme('colors.coal')['400'], - popover: 'white', - modal: 'white', - drawer: 'white', - dropdown: 'white', - backdrop: 'rgba(0, 0, 0, 0.80)', - tableHead: 'var(--tw-light-active)' - }, - dark: { - card: theme('colors.coal')['300'], - tooltip: theme('colors.coal')['600'], - popover: theme('colors.coal')['600'], - modal: theme('colors.coal')['600'], - drawer: theme('colors.coal')['600'], - dropdown: theme('colors.coal')['600'], - backdrop: 'rgba(0, 0, 0, 0.80)', - tableHead: theme('colors.coal')['200'], - }, - }, - borders: { - light: { - card: '1px solid var(--tw-gray-200)', - table: '1px solid var(--tw-gray-200)', - dropdown: '1px solid var(--tw-gray-200)', - popover: '1px solid var(--tw-gray-200)', - tooltip: '0', - }, - dark: { - card: `1px solid ${theme('base.colors.gray.dark')['100']}`, - table: `1px solid ${theme('base.colors.gray.dark')['100']}`, - dropdown: `1px solid ${theme('base.colors.gray.dark')['100']}`, - tooltip: `1px solid ${theme('base.colors.gray.dark')['100']}`, - popover: `1px solid ${theme('base.colors.gray.dark')['100']}` - } - }, - boxShadows: { - light: { - card: '0px 3px 4px 0px rgba(0, 0, 0, 0.03)', - tooltip: '0px 3px 4px 0px rgba(0, 0, 0, 0.03)', - popover: '0px 3px 4px 0px rgba(0, 0, 0, 0.03)', - modal: '0px 10px 14px 0px rgba(15, 42, 81, 0.03)', - drawer: '0px 3px 4px 0px rgba(0, 0, 0, 0.03)', - dropdown: '0px 7px 18px 0px rgba(0, 0, 0, 0.09)', - input: '0px 0px 10px 0px rgba(0, 0, 0, 0.10)' - }, - dark: { - card: '0px 3px 4px 0px rgba(0, 0, 0, 0.03)', - tooltip: '0px 3px 4px 0px rgba(0, 0, 0, 0.03)', - popover: '0px 3px 4px 0px rgba(0, 0, 0, 0.03)', - modal: '0px 10px 14px 0px rgba(15, 42, 81, 0.03)', - drawer: '0px 3px 4px 0px rgba(0, 0, 0, 0.03)', - dropdown: '0px 7px 18px 0px rgba(0, 0, 0, 0.09)', - input: '0px 0px 10px 0px rgba(0, 0, 0, 0.10)' - } - }, - borderRadius: { - btn: theme('borderRadius.md'), - progress: theme('borderRadius.lg'), - dropdown: theme('borderRadius.xl'), - badge: theme('borderRadius.DEFAULT'), - card: theme('borderRadius.xl'), - tooltip: theme('borderRadius.lg'), - popover: theme('borderRadius.lg'), - modal: theme('borderRadius.xl') - } - }, - container: { - fixed: { - px: { - DEFAULT: theme('spacing.6'), - xl: theme('spacing.10'), - }, - 'max-width': theme('screens.xl') - }, - fluid: { - px: { - DEFAULT: theme('spacing.6'), - lg: theme('spacing.10') - } - } - }, - btn: { - xs: { - height: '1.75rem', - px: '0.5rem', - py: '0.35rem', - gap: '0.25rem', - fontSize: theme('fontSize.2xs')[0], - fontWeight: '500', - iconFontSize: '0.75rem', - onlyIconFontSize: '1rem' - }, - sm: { - height: '2rem', - px: '0.75rem', - py: '0.45rem', - gap: '0.275rem', - fontSize: theme('fontSize.xs')[0], - fontWeight: '500', - iconFontSize: '0.875rem', - onlyIconFontSize: '1.125rem', - tabsGap: '0.188rem' - }, - DEFAULT: { - height: '2.5rem', - px: '1rem', - py: '0.55rem', - gap: '0.375rem', - fontSize: theme('fontSize.2sm')[0], - fontWeight: '500', - iconFontSize: '1.125rem', - onlyIconFontSize: '1.5rem', - tabsGap: '0.25rem' - }, - lg: { - height: '3rem', - px: '1.25rem', - py: '0.75rem', - gap: '0.5rem', - fontSize: theme('fontSize.sm')[0], - fontWeight: '500', - iconFontSize: '1.25rem', - onlyIconFontSize: '1.75rem', - tabsGap: '0.313rem' - }, - }, - input: { - sm: { - px: '0.625rem' - }, - DEFAULT: { - px: '0.75rem' - }, - lg: { - gap: '0.875rem' - } - }, - checkbox: { - sm: { - size: '1.125rem', - borderRadius: '0.25rem' - }, - DEFAULT: { - size: '1.375rem', - borderRadius: '0.375rem' - }, - lg: { - size: '1.625rem', - borderRadius: '0.5rem' - } - }, - radio: { - sm: { - size: '1.125rem' - }, - DEFAULT: { - size: '1.375rem' - }, - lg: { - size: '1.625rem' - }, - }, - switch: { - sm: { - height: '1.125rem', - width: '1.875rem' - }, - DEFAULT: { - height: '1.375rem', - width: '2.125rem' - }, - lg: { - height: '1.625rem', - width: '2.375rem' - }, - }, - card: { - px: theme('spacing')['7.5'], - py: { - header: theme('spacing.3'), - body: theme('spacing.5'), - footer: theme('spacing.3'), - group: theme('spacing.3') - }, - grid: { - px: theme('spacing.5') - } - }, - table: { - px: '1rem', - py: { - head: '0.625rem', - body: '0.75rem' - } - } - }, - layouts: { - metronic: { - sidebar: { - width: { - desktop: '280px', - desktopCollapse: '80px', - mobile: '280px' - } - }, - header: { - height: { - desktop: '70px', - mobile: '60px' - } - } - } - } - }) - }, - plugins: [ - require('./resources/metronic/core/plugins/plugin'), - require('./resources/metronic/core/plugins/components/theme'), - require('./resources/metronic/core/plugins/components/breakpoints'), - require('./resources/metronic/core/plugins/components/typography'), - require('./resources/metronic/core/plugins/components/menu'), - require('./resources/metronic/core/plugins/components/dropdown'), - require('./resources/metronic/core/plugins/components/accordion'), - require('./resources/metronic/core/plugins/components/input'), - require('./resources/metronic/core/plugins/components/input-group'), - require('./resources/metronic/core/plugins/components/select'), - require('./resources/metronic/core/plugins/components/textarea'), - require('./resources/metronic/core/plugins/components/file-input'), - require('./resources/metronic/core/plugins/components/switch'), - require('./resources/metronic/core/plugins/components/checkbox'), - require('./resources/metronic/core/plugins/components/radio'), - require('./resources/metronic/core/plugins/components/range'), - require('./resources/metronic/core/plugins/components/container'), - require('./resources/metronic/core/plugins/components/image-input'), - require('./resources/metronic/core/plugins/components/modal'), - require('./resources/metronic/core/plugins/components/drawer'), - require('./resources/metronic/core/plugins/components/tooltip'), - require('./resources/metronic/core/plugins/components/popover'), - require('./resources/metronic/core/plugins/components/btn'), - require('./resources/metronic/core/plugins/components/btn-group'), - require('./resources/metronic/core/plugins/components/tabs'), - require('./resources/metronic/core/plugins/components/pagination'), - require('./resources/metronic/core/plugins/components/card'), - require('./resources/metronic/core/plugins/components/table'), - require('./resources/metronic/core/plugins/components/badge'), - require('./resources/metronic/core/plugins/components/rating'), - require('./resources/metronic/core/plugins/components/scrollable'), - require('./resources/metronic/core/plugins/components/progress'), - require('./resources/metronic/core/plugins/components/apexcharts'), - require('./resources/metronic/core/plugins/components/leaflet') - ] -} - + content: [ + "./resources/**/*.blade.php", + "./resources/**/*.js", + "./resources/**/*.vue", + "./modules/**/*.php", + ], + safelist: [ + "metronic", + "hidden", + "ki-filled", + "ki-outline", + "ki-duotone", + "ki-solid", + { pattern: /^apexcharts-.*$/ }, + { pattern: /^leaflet-.*$/ }, + ], + darkMode: "class", + theme: { + extend: { + base: { + colors: { + gray: { + light: { + 100: "#F9F9F9", + 200: "#F1F1F4", + 300: "#DBDFE9", + 400: "#C4CADA", + 500: "#99A1B7", + 600: "#78829D", + 700: "#4B5675", + 800: "#252F4A", + 900: "#071437", + }, + dark: { + 100: "#1B1C22", + 200: "#26272F", + 300: "#363843", + 400: "#464852", + 500: "#636674", + 600: "#808290", + 700: "#9A9CAE", + 800: "#B5B7C8", + 900: "#F5F5F5", + }, + }, + contextual: { + light: { + brand: { + default: "#FF6F1E", + active: "#F15700", + light: "#FFF5EF", + clarity: "rgba(255, 111, 30, 0.20)", + inverse: "#ffffff", + }, + primary: { + default: "#1B84FF", + active: "#056EE9", + light: "#EFF6FF", + clarity: "rgba(27, 132, 255, 0.20)", + inverse: "#ffffff", + }, + success: { + default: "#17C653", + active: "#04B440", + light: "#EAFFF1", + clarity: "rgba(23, 198, 83, 0.20)", + inverse: "#ffffff", + }, + info: { + default: "#7239EA", + active: "#5014D0", + light: "#F8F5FF", + clarity: "rgba(114, 57, 234, 0.20)", + inverse: "#ffffff", + }, + danger: { + default: "#F8285A", + active: "#D81A48", + light: "#FFEEF3", + clarity: "rgba(248, 40, 90, 0.20)", + inverse: "#ffffff", + }, + warning: { + default: "#F6B100", + active: "#DFA000", + light: "#FFF8DD", + clarity: "rgba(246, 177, 0, 0.20)", + inverse: "#ffffff", + }, + dark: { + default: "#1E2129", + active: "#111318", + light: "#F9F9F9", + clarity: "rgba(30, 33, 41, 0.20)", + inverse: "#ffffff", + }, + light: { + default: "#ffffff", + active: "#FCFCFC", + light: "#ffffff", + clarity: "rgba(255, 255, 255, 0.20)", + inverse: "#4B5675", + }, + secondary: { + default: "#F9F9F9", + active: "#F9F9F9", + light: "#F9F9F9", + clarity: "rgba(249, 249, 249, 0.20)", + inverse: "#4B5675", + }, + }, + dark: { + brand: { + default: "#D74E00", + active: "#F35700", + light: "#272320", + clarity: "rgba(215, 78, 0, 0.20)", + inverse: "#ffffff", + }, + primary: { + default: "#006AE6", + active: "#107EFF", + light: "#172331", + clarity: "rgba(0, 106, 230, 0.20)", + inverse: "#ffffff", + }, + success: { + default: "#00A261", + active: "#01BF73", + light: "#1F2623", + clarity: "rgba(0, 162, 97, 0.20);", + inverse: "#ffffff", + }, + info: { + default: "#883FFF", + active: "#9E63FF", + light: "#272134", + clarity: "rgba(136, 63, 255, 0.20)", + inverse: "#ffffff", + }, + danger: { + default: "#E42855", + active: "#FF3767", + light: "#302024", + clarity: "rgba(228, 40, 85, 0.20)", + inverse: "#ffffff", + }, + warning: { + default: "#C59A00", + active: "#D9AA00", + light: "#242320", + clarity: "rgba(197, 154, 0, 0.20)", + inverse: "#ffffff", + }, + dark: { + default: "#272A34", + active: "#2D2F39", + light: "#1E2027", + clarity: "rgba(39, 42, 52, 0.20)", + inverse: "#ffffff", + }, + light: { + default: "#1F212A", + active: "#1F212A", + light: "#1F212A", + clarity: "rgba(31, 33, 42, 0.20)", + inverse: "#9A9CAE", + }, + secondary: { + default: "#363843", + active: "#464852", + light: "#363843", + clarity: "rgba(54, 56, 67, 0.20)", + inverse: "#9A9CAE", + }, + }, + }, + }, + boxShadows: { + light: { + default: "0px 4px 12px 0px rgba(0, 0, 0, 0.09)", + light: "0px 3px 4px 0px rgba(0, 0, 0, 0.03)", + primary: "0px 4px 12px 0px rgba(40, 132, 239, 0.35)", + success: "0px 4px 12px 0px rgba(53, 189, 100, 0.35)", + danger: "0px 4px 12px 0px rgba(241, 65, 108, 0.35)", + info: "0px 4px 12px 0px rgba(114, 57, 234, 0.35)", + warning: "0px 4px 12px 0px rgba(246, 192, 0, 0.35)", + dark: "0px 4px 12px 0px rgba(37, 47, 74, 0.35)", + }, + dark: { + default: "none", + light: "none", + primary: "none", + success: "none", + danger: "none", + info: "none", + warning: "none", + dark: "none", + }, + }, + }, + fontFamily: { + sans: ["Inter", "system-ui", "sans-serif"], + }, + colors: { + gray: { + 100: "var(--tw-gray-100)", + 200: "var(--tw-gray-200)", + 300: "var(--tw-gray-300)", + 400: "var(--tw-gray-400)", + 500: "var(--tw-gray-500)", + 600: "var(--tw-gray-600)", + 700: "var(--tw-gray-700)", + 800: "var(--tw-gray-800)", + 900: "var(--tw-gray-900)", + }, + primary: { + DEFAULT: "var(--tw-primary)", + active: "var(--tw-primary-active)", + light: "var(--tw-primary-light)", + clarity: "var(--tw-primary-clarity)", + inverse: "var(--tw-primary-inverse)", + }, + success: { + DEFAULT: "var(--tw-success)", + active: "var(--tw-success-active)", + light: "var(--tw-success-light)", + clarity: "var(--tw-success-clarity)", + inverse: "var(--tw-success-inverse)", + }, + warning: { + DEFAULT: "var(--tw-warning)", + active: "var(--tw-warning-active)", + light: "var(--tw-warning-light)", + clarity: "var(--tw-warning-clarity)", + inverse: "var(--tw-warning-inverse)", + }, + danger: { + DEFAULT: "var(--tw-danger)", + active: "var(--tw-danger-active)", + light: "var(--tw-danger-light)", + clarity: "var(--tw-danger-clarity)", + inverse: "var(--tw-danger-inverse)", + }, + info: { + DEFAULT: "var(--tw-info)", + active: "var(--tw-info-active)", + light: "var(--tw-info-light)", + clarity: "var(--tw-info-clarity)", + inverse: "var(--tw-info-inverse)", + }, + dark: { + DEFAULT: "var(--tw-dark)", + active: "var(--tw-dark-active)", + light: "var(--tw-dark-light)", + clarity: "var(--tw-dark-clarity)", + inverse: "var(--tw-dark-inverse)", + }, + secondary: { + DEFAULT: "var(--tw-secondary)", + active: "var(--tw-secondary-active)", + light: "var(--tw-secondary-light)", + clarity: "var(--tw-secondary-clarity)", + inverse: "var(--tw-secondary-inverse)", + }, + light: { + DEFAULT: "var(--tw-light)", + active: "var(--tw-light-active)", + light: "var(--tw-light-light)", + clarity: "var(--tw-light-clarity)", + inverse: "var(--tw-light-inverse)", + }, + brand: { + DEFAULT: "var(--tw-brand)", + active: "var(--tw-brand-active)", + light: "var(--tw-brand-light)", + clarity: "var(--tw-brand-clarity)", + inverse: "var(--tw-brand-inverse)", + }, + coal: { + 100: "#15171C", + 200: "#13141A", + 300: "#111217", + 400: "#0F1014", + 500: "#0D0E12", + 600: "#0B0C10", + black: "#000000", + clarity: "rgba(24, 25, 31, 0.50)", + }, + }, + boxShadow: { + card: "var(--tw-card-box-shadow)", + default: "var(--tw-default-box-shadow)", + light: "var(--tw-light-box-shadow)", + primary: "var(--tw-primary-box-shadow)", + success: "var(--tw-success-box-shadow)", + danger: "var(--tw-danger-box-shadow)", + info: "var(--tw-info-box-shadow)", + warning: "var(--tw-warning-box-shadow)", + dark: "var(--tw-dark-box-shadow)", + }, + fontSize: { + "4xs": [ + "0.5625rem", // 9px + { + lineHeight: "0.6875rem", // 11px + }, + ], + "3xs": [ + "0.625rem", // 10px + { + lineHeight: "0.75rem", // 12px + }, + ], + "2xs": [ + "0.6875rem", // 11px + { + lineHeight: "0.75rem", // 12px + }, + ], + "2sm": [ + "0.8125rem", // 13px + { + lineHeight: "1.125rem", // 18px + }, + ], + md: [ + "0.9375rem", // 15px + { + lineHeight: "1.375rem", // 22px + }, + ], + "1.5xl": [ + "1.375rem", // 22px + { + lineHeight: "1.8125rem", // 29px + }, + ], + "2.5xl": [ + "1.625rem", // 26px + { + lineHeight: "2.125rem", // 34px + }, + ], + }, + lineHeight: { + 0: "0", // 0px + 5.5: "1.375rem", // 22px + }, + zIndex: { + 1: "1", + 5: "5", + 15: "15", + 25: "25", + }, + borderWidth: { + 3: "3px", + }, + spacing: { + 0.75: "0.1875rem", // 3px + 1.25: "0.3rem", // 5px + 1.75: "0.4375rem", // 7px + 2.25: "0.563rem", // 9px + 2.75: "0.688rem", // 11px + 4.5: "1.125rem", // 18px + 5.5: "1.375rem", // 22px + 6.5: "1.625rem", // 26px + 7.5: "1.875rem", // 30px + 12.5: "3.125rem", // 40px + }, + screens: { + sm: "640px", + md: "768px", + lg: "1024px", + xl: "1280px", + "2xl": "1536px", + }, + }, + custom: ({ theme }) => ({ + components: { + common: { + backgrounds: { + light: { + card: "white", + tooltip: theme("colors.coal")["400"], + popover: "white", + modal: "white", + drawer: "white", + dropdown: "white", + backdrop: "rgba(0, 0, 0, 0.80)", + tableHead: "var(--tw-light-active)", + }, + dark: { + card: theme("colors.coal")["300"], + tooltip: theme("colors.coal")["600"], + popover: theme("colors.coal")["600"], + modal: theme("colors.coal")["600"], + drawer: theme("colors.coal")["600"], + dropdown: theme("colors.coal")["600"], + backdrop: "rgba(0, 0, 0, 0.80)", + tableHead: theme("colors.coal")["200"], + }, + }, + borders: { + light: { + card: "1px solid var(--tw-gray-200)", + table: "1px solid var(--tw-gray-200)", + dropdown: "1px solid var(--tw-gray-200)", + popover: "1px solid var(--tw-gray-200)", + tooltip: "0", + }, + dark: { + card: `1px solid ${theme("base.colors.gray.dark")["100"]}`, + table: `1px solid ${theme("base.colors.gray.dark")["100"]}`, + dropdown: `1px solid ${theme("base.colors.gray.dark")["100"]}`, + tooltip: `1px solid ${theme("base.colors.gray.dark")["100"]}`, + popover: `1px solid ${theme("base.colors.gray.dark")["100"]}`, + }, + }, + boxShadows: { + light: { + card: "0px 3px 4px 0px rgba(0, 0, 0, 0.03)", + tooltip: "0px 3px 4px 0px rgba(0, 0, 0, 0.03)", + popover: "0px 3px 4px 0px rgba(0, 0, 0, 0.03)", + modal: "0px 10px 14px 0px rgba(15, 42, 81, 0.03)", + drawer: "0px 3px 4px 0px rgba(0, 0, 0, 0.03)", + dropdown: "0px 7px 18px 0px rgba(0, 0, 0, 0.09)", + input: "0px 0px 10px 0px rgba(0, 0, 0, 0.10)", + }, + dark: { + card: "0px 3px 4px 0px rgba(0, 0, 0, 0.03)", + tooltip: "0px 3px 4px 0px rgba(0, 0, 0, 0.03)", + popover: "0px 3px 4px 0px rgba(0, 0, 0, 0.03)", + modal: "0px 10px 14px 0px rgba(15, 42, 81, 0.03)", + drawer: "0px 3px 4px 0px rgba(0, 0, 0, 0.03)", + dropdown: "0px 7px 18px 0px rgba(0, 0, 0, 0.09)", + input: "0px 0px 10px 0px rgba(0, 0, 0, 0.10)", + }, + }, + borderRadius: { + btn: theme("borderRadius.md"), + progress: theme("borderRadius.lg"), + dropdown: theme("borderRadius.xl"), + badge: theme("borderRadius.DEFAULT"), + card: theme("borderRadius.xl"), + tooltip: theme("borderRadius.lg"), + popover: theme("borderRadius.lg"), + modal: theme("borderRadius.xl"), + }, + }, + container: { + fixed: { + px: { + DEFAULT: theme("spacing")["6"], + xl: theme("spacing")["7.5"], + }, + "max-width": theme("screens.xl"), + }, + fluid: { + px: { + DEFAULT: theme("spacing")["6"], + xl: theme("spacing")["7.5"], + }, + }, + }, + btn: { + xs: { + height: "1.75rem", + px: "0.5rem", + py: "0.35rem", + gap: "0.25rem", + fontSize: theme("fontSize.2xs")[0], + fontWeight: "500", + iconFontSize: "0.75rem", + onlyIconFontSize: "1rem", + }, + sm: { + height: "2rem", + px: "0.75rem", + py: "0.45rem", + gap: "0.275rem", + fontSize: theme("fontSize.xs")[0], + fontWeight: "500", + iconFontSize: "0.875rem", + onlyIconFontSize: "1.125rem", + tabsGap: "0.188rem", + }, + DEFAULT: { + height: "2.5rem", + px: "1rem", + py: "0.55rem", + gap: "0.375rem", + fontSize: theme("fontSize.2sm")[0], + fontWeight: "500", + iconFontSize: "1.125rem", + onlyIconFontSize: "1.5rem", + tabsGap: "0.25rem", + }, + lg: { + height: "3rem", + px: "1.25rem", + py: "0.75rem", + gap: "0.5rem", + fontSize: theme("fontSize.sm")[0], + fontWeight: "500", + iconFontSize: "1.25rem", + onlyIconFontSize: "1.75rem", + tabsGap: "0.313rem", + }, + }, + input: { + sm: { + px: "0.625rem", + }, + DEFAULT: { + px: "0.75rem", + }, + lg: { + gap: "0.875rem", + }, + }, + checkbox: { + sm: { + size: "1.125rem", + borderRadius: "0.25rem", + }, + DEFAULT: { + size: "1.375rem", + borderRadius: "0.375rem", + }, + lg: { + size: "1.625rem", + borderRadius: "0.5rem", + }, + }, + radio: { + sm: { + size: "1.125rem", + }, + DEFAULT: { + size: "1.375rem", + }, + lg: { + size: "1.625rem", + }, + }, + switch: { + sm: { + height: "1.125rem", + width: "1.875rem", + }, + DEFAULT: { + height: "1.375rem", + width: "2.125rem", + }, + lg: { + height: "1.625rem", + width: "2.375rem", + }, + }, + card: { + px: theme("spacing")["7.5"], + py: { + header: theme("spacing.3"), + body: theme("spacing.5"), + footer: theme("spacing.3"), + group: theme("spacing.3"), + }, + grid: { + px: theme("spacing.5"), + }, + }, + table: { + px: { + xs: "0.5rem", + sm: "0.75rem", + DEFAULT: "1rem", + lg: "1.25rem", + }, + py: { + xs: { + head: "0.225rem", + body: "0.35rem", + }, + sm: { + head: "0.425rem", + body: "0.5rem", + }, + DEFAULT: { + head: "0.625rem", + body: "0.75rem", + }, + lg: { + head: "0.825rem", + body: "0.95rem", + }, + }, + }, + }, + layouts: { + metronic: { + sidebar: { + width: { + desktop: "280px", + desktopCollapse: "80px", + mobile: "280px", + }, + }, + header: { + height: { + desktop: "70px", + mobile: "60px", + }, + }, + }, + }, + }), + }, + plugins: [ + require("./resources/metronic/core/plugins/plugin"), + require("./resources/metronic/core/plugins/components/theme"), + require("./resources/metronic/core/plugins/components/breakpoints"), + require("./resources/metronic/core/plugins/components/typography"), + require("./resources/metronic/core/plugins/components/menu"), + require("./resources/metronic/core/plugins/components/dropdown"), + require("./resources/metronic/core/plugins/components/accordion"), + require("./resources/metronic/core/plugins/components/input"), + require("./resources/metronic/core/plugins/components/input-group"), + require("./resources/metronic/core/plugins/components/select"), + require("./resources/metronic/core/plugins/components/textarea"), + require("./resources/metronic/core/plugins/components/file-input"), + require("./resources/metronic/core/plugins/components/switch"), + require("./resources/metronic/core/plugins/components/checkbox"), + require("./resources/metronic/core/plugins/components/radio"), + require("./resources/metronic/core/plugins/components/range"), + require("./resources/metronic/core/plugins/components/container"), + require("./resources/metronic/core/plugins/components/image-input"), + require("./resources/metronic/core/plugins/components/modal"), + require("./resources/metronic/core/plugins/components/drawer"), + require("./resources/metronic/core/plugins/components/tooltip"), + require("./resources/metronic/core/plugins/components/popover"), + require("./resources/metronic/core/plugins/components/btn"), + require("./resources/metronic/core/plugins/components/btn-group"), + require("./resources/metronic/core/plugins/components/tabs"), + require("./resources/metronic/core/plugins/components/pagination"), + require("./resources/metronic/core/plugins/components/card"), + require("./resources/metronic/core/plugins/components/table"), + require("./resources/metronic/core/plugins/components/badge"), + require("./resources/metronic/core/plugins/components/rating"), + require("./resources/metronic/core/plugins/components/scrollable"), + require("./resources/metronic/core/plugins/components/progress"), + require("./resources/metronic/core/plugins/components/apexcharts"), + require("./resources/metronic/core/plugins/components/leaflet"), + ], +};