ezfw-core 1.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.
- package/components/EzBaseComponent.ts +648 -0
- package/components/EzComponent.ts +89 -0
- package/components/EzInput.module.scss +183 -0
- package/components/EzInput.ts +104 -0
- package/components/EzLabel.ts +22 -0
- package/components/EzOutlet.ts +181 -0
- package/components/HtmlWrapper.ts +305 -0
- package/components/avatar/EzAvatar.module.scss +200 -0
- package/components/avatar/EzAvatar.ts +130 -0
- package/components/badge/EzBadge.module.scss +202 -0
- package/components/badge/EzBadge.ts +77 -0
- package/components/button/EzButton.module.scss +402 -0
- package/components/button/EzButton.ts +175 -0
- package/components/button/EzButtonGroup.ts +48 -0
- package/components/card/EzCard.module.scss +71 -0
- package/components/card/EzCard.ts +120 -0
- package/components/chart/EzBarChart.ts +47 -0
- package/components/chart/EzChart.module.scss +14 -0
- package/components/chart/EzChart.ts +279 -0
- package/components/chart/EzDoughnutChart.ts +47 -0
- package/components/chart/EzLineChart.ts +53 -0
- package/components/checkbox/EzCheckbox.module.scss +145 -0
- package/components/checkbox/EzCheckbox.ts +115 -0
- package/components/dataview/EzDataView.module.scss +115 -0
- package/components/dataview/EzDataView.ts +355 -0
- package/components/dataview/modes/EzDataViewCards.ts +322 -0
- package/components/dataview/modes/EzDataViewGrid.ts +76 -0
- package/components/datepicker/EzDatePicker.module.scss +348 -0
- package/components/datepicker/EzDatePicker.ts +519 -0
- package/components/dialog/EzDialog.module.scss +180 -0
- package/components/dropdown/EzDropdown.module.scss +107 -0
- package/components/dropdown/EzDropdown.ts +235 -0
- package/components/feed/EzActivityFeed.module.scss +90 -0
- package/components/feed/EzActivityFeed.ts +78 -0
- package/components/form/EzForm.ts +364 -0
- package/components/form/EzValidators.test.js +421 -0
- package/components/form/EzValidators.ts +202 -0
- package/components/grid/EzGrid.scss +88 -0
- package/components/grid/EzGrid.ts +1085 -0
- package/components/grid/EzGridContainer.ts +104 -0
- package/components/grid/body/EzGridBody.scss +283 -0
- package/components/grid/body/EzGridBody.ts +549 -0
- package/components/grid/body/EzGridCell.ts +211 -0
- package/components/grid/body/EzGridRow.ts +196 -0
- package/components/grid/filter/EzGridFilters.scss +78 -0
- package/components/grid/filter/EzGridFilters.ts +285 -0
- package/components/grid/footer/EzGridFooter.scss +136 -0
- package/components/grid/footer/EzGridFooter.ts +448 -0
- package/components/grid/header/EzGridHeader.scss +199 -0
- package/components/grid/header/EzGridHeader.ts +430 -0
- package/components/grid/query/EzGridQuery.ts +81 -0
- package/components/grid/state/EzGridColumns.ts +155 -0
- package/components/grid/state/EzGridController.ts +470 -0
- package/components/grid/state/EzGridLifecycle.ts +136 -0
- package/components/grid/state/EzGridNormalizers.test.js +273 -0
- package/components/grid/state/EzGridNormalizers.ts +162 -0
- package/components/grid/state/EzGridParts.ts +233 -0
- package/components/grid/state/EzGridPersistence.ts +140 -0
- package/components/grid/state/EzGridRemote.test.js +573 -0
- package/components/grid/state/EzGridRemote.ts +335 -0
- package/components/grid/state/EzGridSelection.ts +231 -0
- package/components/grid/state/EzGridSort.ts +286 -0
- package/components/grid/title/EzGridActionBar.ts +98 -0
- package/components/grid/title/EzGridTitle.ts +114 -0
- package/components/grid/title/EzGridTitleBar.scss +65 -0
- package/components/grid/title/EzGridTitleBar.ts +87 -0
- package/components/grid/types.ts +607 -0
- package/components/panel/EzPanel.module.scss +133 -0
- package/components/panel/EzPanel.ts +147 -0
- package/components/radio/EzRadio.module.scss +190 -0
- package/components/radio/EzRadio.ts +149 -0
- package/components/select/EzSelect.module.scss +153 -0
- package/components/select/EzSelect.ts +238 -0
- package/components/skeleton/EzSkeleton.module.scss +95 -0
- package/components/skeleton/EzSkeleton.ts +70 -0
- package/components/store/EzStore.ts +344 -0
- package/components/switch/EzSwitch.module.scss +164 -0
- package/components/switch/EzSwitch.ts +117 -0
- package/components/tabs/EzTabPanel.module.scss +181 -0
- package/components/tabs/EzTabPanel.ts +402 -0
- package/components/textarea/EzTextarea.module.scss +131 -0
- package/components/textarea/EzTextarea.ts +161 -0
- package/components/timepicker/EzTimePicker.module.scss +282 -0
- package/components/timepicker/EzTimePicker.ts +540 -0
- package/components/toast/EzToast.module.scss +291 -0
- package/components/tooltip/EzTooltip.module.scss +124 -0
- package/components/tooltip/EzTooltip.ts +153 -0
- package/core/EzComponentTypes.ts +693 -0
- package/core/EzError.ts +63 -0
- package/core/EzModel.ts +268 -0
- package/core/EzTypes.ts +328 -0
- package/core/eventBus.ts +284 -0
- package/core/ez.ts +617 -0
- package/core/loader.ts +725 -0
- package/core/renderer.ts +1010 -0
- package/core/router.ts +490 -0
- package/core/services.ts +124 -0
- package/core/state.ts +142 -0
- package/core/utils.ts +81 -0
- package/package.json +51 -0
- package/services/RouteUI.js +17 -0
- package/services/crypto.js +64 -0
- package/services/dialog.js +222 -0
- package/services/fetchApi.js +63 -0
- package/services/firebase.js +30 -0
- package/services/toast.js +214 -0
- package/template/doc/EzDocs.js +15 -0
- package/template/doc/EzDocs.module.scss +627 -0
- package/template/doc/EzDocsController.js +164 -0
- package/template/doc/data/activityfeed/EzActivityFeedDoc.js +42 -0
- package/template/doc/data/avatar/EzAvatarDoc.js +71 -0
- package/template/doc/data/badge/EzBadgeDoc.js +92 -0
- package/template/doc/data/button/EzButtonDoc.js +77 -0
- package/template/doc/data/buttongroup/EzButtonGroupDoc.js +102 -0
- package/template/doc/data/card/EzCardDoc.js +39 -0
- package/template/doc/data/chart/EzChartDoc.js +60 -0
- package/template/doc/data/checkbox/EzCheckboxDoc.js +67 -0
- package/template/doc/data/component/EzComponentDoc.js +34 -0
- package/template/doc/data/cssmodules/CSSModulesDoc.js +70 -0
- package/template/doc/data/datepicker/EzDatePickerDoc.js +126 -0
- package/template/doc/data/dialog/EzDialogDoc.js +217 -0
- package/template/doc/data/dropdown/EzDropdownDoc.js +178 -0
- package/template/doc/data/form/EzFormDoc.js +90 -0
- package/template/doc/data/grid/EzGridDoc.js +99 -0
- package/template/doc/data/input/EzInputDoc.js +92 -0
- package/template/doc/data/label/EzLabelDoc.js +40 -0
- package/template/doc/data/model/EzModelDoc.js +53 -0
- package/template/doc/data/outlet/EzOutletDoc.js +63 -0
- package/template/doc/data/panel/EzPanelDoc.js +214 -0
- package/template/doc/data/radio/EzRadioDoc.js +174 -0
- package/template/doc/data/router/EzRouterDoc.js +75 -0
- package/template/doc/data/select/EzSelectDoc.js +37 -0
- package/template/doc/data/skeleton/EzSkeletonDoc.js +149 -0
- package/template/doc/data/switch/EzSwitchDoc.js +82 -0
- package/template/doc/data/tabpanel/EzTabPanelDoc.js +44 -0
- package/template/doc/data/textarea/EzTextareaDoc.js +131 -0
- package/template/doc/data/timepicker/EzTimePickerDoc.js +107 -0
- package/template/doc/data/tooltip/EzTooltipDoc.js +193 -0
- package/template/doc/data/validators/EzValidatorsDoc.js +37 -0
- package/template/doc/sidebar/EzDocsSidebar.js +32 -0
- package/template/doc/sidebar/category/EzDocsCategory.js +33 -0
- package/template/doc/sidebar/item/EzDocsComponentItem.js +24 -0
- package/template/doc/viewer/EzDocsViewer.js +18 -0
- package/template/doc/viewer/codepanel/EzDocsCodePanel.js +51 -0
- package/template/doc/viewer/content/EzDocsContent.js +315 -0
- package/template/doc/viewer/header/EzDocsViewerHeader.js +46 -0
- package/template/doc/viewer/showcase/EzDocsShowcase.js +59 -0
- package/template/doc/viewer/showcase/EzDocsShowcaseSection.js +25 -0
- package/template/doc/viewer/showcase/EzDocsVariantItem.js +29 -0
- package/template/doc/welcome/EzDocsWelcome.js +48 -0
- package/themes/ez-theme.scss +179 -0
- package/themes/nature-fresh.scss +169 -0
- package/types/global.d.ts +21 -0
- package/utils/cssModules.js +81 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// ==========================================================
|
|
2
|
+
// Ez Framework - Theme System (Ocean Depths)
|
|
3
|
+
// ==========================================================
|
|
4
|
+
// Primary: Lyons Blue (#005871) + Limpet Shell (#98DDDF)
|
|
5
|
+
// ==========================================================
|
|
6
|
+
|
|
7
|
+
:root,
|
|
8
|
+
[data-ez-theme="ocean-depths"] {
|
|
9
|
+
// Core Brand Colors
|
|
10
|
+
--ez-primary: #005871;
|
|
11
|
+
--ez-primary-hover: #004a5f;
|
|
12
|
+
--ez-primary-light: #e0f4f7;
|
|
13
|
+
--ez-primary-dark: #003d52;
|
|
14
|
+
|
|
15
|
+
--ez-secondary: #98DDDF;
|
|
16
|
+
--ez-secondary-hover: #7fd0d3;
|
|
17
|
+
|
|
18
|
+
--ez-accent: #2E5283;
|
|
19
|
+
--ez-accent-hover: #234169;
|
|
20
|
+
|
|
21
|
+
// Semantic Colors
|
|
22
|
+
--ez-success: #059669;
|
|
23
|
+
--ez-success-light: #d1fae5;
|
|
24
|
+
--ez-success-dark: #065f46;
|
|
25
|
+
|
|
26
|
+
--ez-warning: #E3BD33;
|
|
27
|
+
--ez-warning-light: #fef9e7;
|
|
28
|
+
--ez-warning-dark: #92400e;
|
|
29
|
+
|
|
30
|
+
--ez-danger: #dc2626;
|
|
31
|
+
--ez-danger-light: #fee2e2;
|
|
32
|
+
--ez-danger-dark: #991b1b;
|
|
33
|
+
|
|
34
|
+
--ez-info: #0891b2;
|
|
35
|
+
--ez-info-light: #cffafe;
|
|
36
|
+
--ez-info-dark: #155e75;
|
|
37
|
+
|
|
38
|
+
// Surface Colors
|
|
39
|
+
--ez-surface-primary: #f0f9fa;
|
|
40
|
+
--ez-surface-secondary: #ffffff;
|
|
41
|
+
--ez-surface-tertiary: #f8fcfc;
|
|
42
|
+
--ez-surface-elevated: #ffffff;
|
|
43
|
+
--ez-surface-overlay: rgba(0, 61, 82, 0.5);
|
|
44
|
+
|
|
45
|
+
// Text Colors
|
|
46
|
+
--ez-text-primary: #003d52;
|
|
47
|
+
--ez-text-secondary: #4a7c8c;
|
|
48
|
+
--ez-text-tertiary: #6b9aa8;
|
|
49
|
+
--ez-text-inverse: #ffffff;
|
|
50
|
+
--ez-text-on-primary: #ffffff;
|
|
51
|
+
|
|
52
|
+
// Border Colors
|
|
53
|
+
--ez-border-primary: #c8e6eb;
|
|
54
|
+
--ez-border-secondary: #e0f0f2;
|
|
55
|
+
--ez-border-focus: #005871;
|
|
56
|
+
|
|
57
|
+
// Sidebar
|
|
58
|
+
--ez-sidebar-bg: #003d52;
|
|
59
|
+
--ez-sidebar-text: #ffffff;
|
|
60
|
+
--ez-sidebar-text-muted: #7fb8c4;
|
|
61
|
+
--ez-sidebar-hover: rgba(152, 221, 223, 0.15);
|
|
62
|
+
--ez-sidebar-active: #005871;
|
|
63
|
+
--ez-sidebar-active-text: #98DDDF;
|
|
64
|
+
--ez-sidebar-border: #004a5f;
|
|
65
|
+
|
|
66
|
+
// Header
|
|
67
|
+
--ez-header-bg: #ffffff;
|
|
68
|
+
--ez-header-text: #003d52;
|
|
69
|
+
--ez-header-border: #e0f0f2;
|
|
70
|
+
|
|
71
|
+
// Cards & Panels
|
|
72
|
+
--ez-card-bg: #ffffff;
|
|
73
|
+
--ez-card-border: #e0f0f2;
|
|
74
|
+
--ez-card-shadow: 0 1px 3px rgba(0, 88, 113, 0.08);
|
|
75
|
+
--ez-card-header-bg: #f8fcfc;
|
|
76
|
+
|
|
77
|
+
// Inputs & Forms
|
|
78
|
+
--ez-input-bg: #ffffff;
|
|
79
|
+
--ez-input-border: #c8e6eb;
|
|
80
|
+
--ez-input-border-focus: #005871;
|
|
81
|
+
--ez-input-text: #003d52;
|
|
82
|
+
--ez-input-placeholder: #6b9aa8;
|
|
83
|
+
|
|
84
|
+
// Tables & Grids
|
|
85
|
+
--ez-table-header-bg: #f0f9fa;
|
|
86
|
+
--ez-table-header-text: #003d52;
|
|
87
|
+
--ez-table-row-bg: #ffffff;
|
|
88
|
+
--ez-table-row-alt-bg: #f8fcfc;
|
|
89
|
+
--ez-table-row-hover: #e8f6f7;
|
|
90
|
+
--ez-table-border: #e0f0f2;
|
|
91
|
+
--ez-table-row-selected: #cff3f5;
|
|
92
|
+
|
|
93
|
+
// Typography & Spacing
|
|
94
|
+
--ez-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
95
|
+
--ez-font-mono: 'Monaco', 'Menlo', 'Consolas', monospace;
|
|
96
|
+
|
|
97
|
+
--ez-radius-sm: 4px;
|
|
98
|
+
--ez-radius-md: 6px;
|
|
99
|
+
--ez-radius-lg: 8px;
|
|
100
|
+
--ez-radius-xl: 12px;
|
|
101
|
+
--ez-radius-full: 9999px;
|
|
102
|
+
|
|
103
|
+
--ez-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
104
|
+
--ez-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
|
|
105
|
+
--ez-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
|
|
106
|
+
|
|
107
|
+
--ez-transition-fast: 0.1s ease;
|
|
108
|
+
--ez-transition-base: 0.15s ease;
|
|
109
|
+
--ez-transition-slow: 0.3s ease;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Dark Mode
|
|
113
|
+
[data-ez-theme="ocean-depths-dark"] {
|
|
114
|
+
--ez-surface-primary: #0a1a1f;
|
|
115
|
+
--ez-surface-secondary: #0f252c;
|
|
116
|
+
--ez-surface-tertiary: #142f38;
|
|
117
|
+
--ez-surface-elevated: #1a3a45;
|
|
118
|
+
--ez-surface-overlay: rgba(0, 0, 0, 0.7);
|
|
119
|
+
|
|
120
|
+
--ez-text-primary: #e8f6f7;
|
|
121
|
+
--ez-text-secondary: #98DDDF;
|
|
122
|
+
--ez-text-tertiary: #6b9aa8;
|
|
123
|
+
--ez-text-inverse: #003d52;
|
|
124
|
+
|
|
125
|
+
--ez-border-primary: #1a3a45;
|
|
126
|
+
--ez-border-secondary: #0f252c;
|
|
127
|
+
|
|
128
|
+
--ez-sidebar-bg: #061218;
|
|
129
|
+
--ez-sidebar-border: #0f252c;
|
|
130
|
+
|
|
131
|
+
--ez-header-bg: #0f252c;
|
|
132
|
+
--ez-header-border: #1a3a45;
|
|
133
|
+
|
|
134
|
+
--ez-card-bg: #0f252c;
|
|
135
|
+
--ez-card-border: #1a3a45;
|
|
136
|
+
--ez-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
137
|
+
--ez-card-header-bg: #142f38;
|
|
138
|
+
|
|
139
|
+
--ez-input-bg: #0f252c;
|
|
140
|
+
--ez-input-border: #1a3a45;
|
|
141
|
+
--ez-input-text: #e8f6f7;
|
|
142
|
+
--ez-input-placeholder: #4a7c8c;
|
|
143
|
+
|
|
144
|
+
--ez-table-header-bg: #0f252c;
|
|
145
|
+
--ez-table-header-text: #98DDDF;
|
|
146
|
+
--ez-table-row-bg: #0f252c;
|
|
147
|
+
--ez-table-row-alt-bg: #142f38;
|
|
148
|
+
--ez-table-row-hover: #1a3a45;
|
|
149
|
+
--ez-table-border: #1a3a45;
|
|
150
|
+
--ez-table-row-selected: rgba(152, 221, 223, 0.15);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Utility Classes
|
|
154
|
+
.ez-text-primary { color: var(--ez-text-primary); }
|
|
155
|
+
.ez-text-secondary { color: var(--ez-text-secondary); }
|
|
156
|
+
.ez-text-tertiary { color: var(--ez-text-tertiary); }
|
|
157
|
+
.ez-text-inverse { color: var(--ez-text-inverse); }
|
|
158
|
+
|
|
159
|
+
.ez-bg-primary { background-color: var(--ez-primary); color: var(--ez-text-on-primary); }
|
|
160
|
+
.ez-bg-secondary { background-color: var(--ez-secondary); }
|
|
161
|
+
.ez-bg-surface { background-color: var(--ez-surface-primary); }
|
|
162
|
+
|
|
163
|
+
.ez-bg-success { background-color: var(--ez-success); color: white; }
|
|
164
|
+
.ez-bg-success-light { background-color: var(--ez-success-light); color: var(--ez-success-dark); }
|
|
165
|
+
.ez-bg-warning { background-color: var(--ez-warning); color: white; }
|
|
166
|
+
.ez-bg-warning-light { background-color: var(--ez-warning-light); color: var(--ez-warning-dark); }
|
|
167
|
+
.ez-bg-danger { background-color: var(--ez-danger); color: white; }
|
|
168
|
+
.ez-bg-danger-light { background-color: var(--ez-danger-light); color: var(--ez-danger-dark); }
|
|
169
|
+
|
|
170
|
+
.ez-border { border: 1px solid var(--ez-border-primary); }
|
|
171
|
+
.ez-shadow-sm { box-shadow: var(--ez-shadow-sm); }
|
|
172
|
+
.ez-shadow-md { box-shadow: var(--ez-shadow-md); }
|
|
173
|
+
.ez-shadow-lg { box-shadow: var(--ez-shadow-lg); }
|
|
174
|
+
|
|
175
|
+
.ez-rounded-sm { border-radius: var(--ez-radius-sm); }
|
|
176
|
+
.ez-rounded-md { border-radius: var(--ez-radius-md); }
|
|
177
|
+
.ez-rounded-lg { border-radius: var(--ez-radius-lg); }
|
|
178
|
+
.ez-rounded-xl { border-radius: var(--ez-radius-xl); }
|
|
179
|
+
.ez-rounded-full { border-radius: var(--ez-radius-full); }
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
// ==========================================================
|
|
2
|
+
// Ez Framework - Nature Fresh Theme
|
|
3
|
+
// ==========================================================
|
|
4
|
+
// An eco-friendly, fresh palette inspired by nature.
|
|
5
|
+
// Primary: Kashmir (#6F8D6A) + White Grape (#A6BE47)
|
|
6
|
+
// ==========================================================
|
|
7
|
+
|
|
8
|
+
// Theme Name: nature-fresh
|
|
9
|
+
// Author: Ez Framework
|
|
10
|
+
// Version: 1.0.0
|
|
11
|
+
// Status: Reserved for future implementation
|
|
12
|
+
|
|
13
|
+
[data-ez-theme="nature-fresh"] {
|
|
14
|
+
// ======================================================
|
|
15
|
+
// Core Brand Colors
|
|
16
|
+
// ======================================================
|
|
17
|
+
--theme-primary: #6F8D6A;
|
|
18
|
+
--theme-primary-hover: #5d7a59;
|
|
19
|
+
--theme-primary-light: #e8f0e7;
|
|
20
|
+
--theme-primary-dark: #2d4a2d;
|
|
21
|
+
|
|
22
|
+
--theme-secondary: #A6BE47;
|
|
23
|
+
--theme-secondary-hover: #94ab3a;
|
|
24
|
+
|
|
25
|
+
--theme-accent: #E3BD33;
|
|
26
|
+
--theme-accent-hover: #d4ad24;
|
|
27
|
+
|
|
28
|
+
// ======================================================
|
|
29
|
+
// Semantic Colors
|
|
30
|
+
// ======================================================
|
|
31
|
+
--theme-success: #22c55e;
|
|
32
|
+
--theme-success-light: #dcfce7;
|
|
33
|
+
--theme-success-dark: #166534;
|
|
34
|
+
|
|
35
|
+
--theme-warning: #E3BD33;
|
|
36
|
+
--theme-warning-light: #fef9e7;
|
|
37
|
+
--theme-warning-dark: #92400e;
|
|
38
|
+
|
|
39
|
+
--theme-danger: #dc2626;
|
|
40
|
+
--theme-danger-light: #fee2e2;
|
|
41
|
+
--theme-danger-dark: #991b1b;
|
|
42
|
+
|
|
43
|
+
--theme-info: #0891b2;
|
|
44
|
+
--theme-info-light: #cffafe;
|
|
45
|
+
--theme-info-dark: #155e75;
|
|
46
|
+
|
|
47
|
+
// ======================================================
|
|
48
|
+
// Surface Colors (Light Mode)
|
|
49
|
+
// ======================================================
|
|
50
|
+
--theme-surface-primary: #f8faf5;
|
|
51
|
+
--theme-surface-secondary: #ffffff;
|
|
52
|
+
--theme-surface-tertiary: #f3f7f0;
|
|
53
|
+
--theme-surface-elevated: #ffffff;
|
|
54
|
+
--theme-surface-overlay: rgba(45, 74, 45, 0.5);
|
|
55
|
+
|
|
56
|
+
// ======================================================
|
|
57
|
+
// Text Colors
|
|
58
|
+
// ======================================================
|
|
59
|
+
--theme-text-primary: #1a2e1a;
|
|
60
|
+
--theme-text-secondary: #4a6a4a;
|
|
61
|
+
--theme-text-tertiary: #6b8a6b;
|
|
62
|
+
--theme-text-inverse: #ffffff;
|
|
63
|
+
--theme-text-on-primary: #ffffff;
|
|
64
|
+
|
|
65
|
+
// ======================================================
|
|
66
|
+
// Border Colors
|
|
67
|
+
// ======================================================
|
|
68
|
+
--theme-border-primary: #d4e4d0;
|
|
69
|
+
--theme-border-secondary: #e4ebd8;
|
|
70
|
+
--theme-border-focus: #6F8D6A;
|
|
71
|
+
|
|
72
|
+
// ======================================================
|
|
73
|
+
// Sidebar
|
|
74
|
+
// ======================================================
|
|
75
|
+
--theme-sidebar-bg: #1a2e1a;
|
|
76
|
+
--theme-sidebar-text: #ffffff;
|
|
77
|
+
--theme-sidebar-text-muted: #8aaa8a;
|
|
78
|
+
--theme-sidebar-hover: rgba(166, 190, 71, 0.1);
|
|
79
|
+
--theme-sidebar-active: #2d4a2d;
|
|
80
|
+
--theme-sidebar-active-text: #A6BE47;
|
|
81
|
+
--theme-sidebar-border: #2d4a2d;
|
|
82
|
+
|
|
83
|
+
// ======================================================
|
|
84
|
+
// Header
|
|
85
|
+
// ======================================================
|
|
86
|
+
--theme-header-bg: #ffffff;
|
|
87
|
+
--theme-header-text: #1a2e1a;
|
|
88
|
+
--theme-header-border: #e4ebd8;
|
|
89
|
+
|
|
90
|
+
// ======================================================
|
|
91
|
+
// Cards & Panels
|
|
92
|
+
// ======================================================
|
|
93
|
+
--theme-card-bg: #ffffff;
|
|
94
|
+
--theme-card-border: #e4ebd8;
|
|
95
|
+
--theme-card-shadow: 0 1px 3px rgba(45, 74, 45, 0.08);
|
|
96
|
+
--theme-card-header-bg: #f8faf5;
|
|
97
|
+
|
|
98
|
+
// ======================================================
|
|
99
|
+
// Inputs & Forms
|
|
100
|
+
// ======================================================
|
|
101
|
+
--theme-input-bg: #ffffff;
|
|
102
|
+
--theme-input-border: #d4e4d0;
|
|
103
|
+
--theme-input-border-focus: #6F8D6A;
|
|
104
|
+
--theme-input-text: #1a2e1a;
|
|
105
|
+
--theme-input-placeholder: #6b8a6b;
|
|
106
|
+
|
|
107
|
+
// ======================================================
|
|
108
|
+
// Tables & Grids
|
|
109
|
+
// ======================================================
|
|
110
|
+
--theme-table-header-bg: #f3f7f0;
|
|
111
|
+
--theme-table-header-text: #1a2e1a;
|
|
112
|
+
--theme-table-row-bg: #ffffff;
|
|
113
|
+
--theme-table-row-alt-bg: #f8faf5;
|
|
114
|
+
--theme-table-row-hover: #ecf3e8;
|
|
115
|
+
--theme-table-border: #e4ebd8;
|
|
116
|
+
--theme-table-row-selected: #d7e8bc;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// ==========================================================
|
|
120
|
+
// Dark Mode Variant
|
|
121
|
+
// ==========================================================
|
|
122
|
+
|
|
123
|
+
[data-ez-theme="nature-fresh-dark"] {
|
|
124
|
+
// Surface Colors (Dark Mode)
|
|
125
|
+
--theme-surface-primary: #0a120a;
|
|
126
|
+
--theme-surface-secondary: #121e12;
|
|
127
|
+
--theme-surface-tertiary: #1a2e1a;
|
|
128
|
+
--theme-surface-elevated: #243824;
|
|
129
|
+
--theme-surface-overlay: rgba(0, 0, 0, 0.7);
|
|
130
|
+
|
|
131
|
+
// Text Colors
|
|
132
|
+
--theme-text-primary: #e8f0e7;
|
|
133
|
+
--theme-text-secondary: #A6BE47;
|
|
134
|
+
--theme-text-tertiary: #6b8a6b;
|
|
135
|
+
--theme-text-inverse: #1a2e1a;
|
|
136
|
+
|
|
137
|
+
// Border Colors
|
|
138
|
+
--theme-border-primary: #2d4a2d;
|
|
139
|
+
--theme-border-secondary: #1a2e1a;
|
|
140
|
+
|
|
141
|
+
// Sidebar
|
|
142
|
+
--theme-sidebar-bg: #0a120a;
|
|
143
|
+
--theme-sidebar-border: #1a2e1a;
|
|
144
|
+
|
|
145
|
+
// Header
|
|
146
|
+
--theme-header-bg: #121e12;
|
|
147
|
+
--theme-header-border: #2d4a2d;
|
|
148
|
+
|
|
149
|
+
// Cards
|
|
150
|
+
--theme-card-bg: #121e12;
|
|
151
|
+
--theme-card-border: #2d4a2d;
|
|
152
|
+
--theme-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
|
153
|
+
--theme-card-header-bg: #1a2e1a;
|
|
154
|
+
|
|
155
|
+
// Inputs
|
|
156
|
+
--theme-input-bg: #121e12;
|
|
157
|
+
--theme-input-border: #2d4a2d;
|
|
158
|
+
--theme-input-text: #e8f0e7;
|
|
159
|
+
--theme-input-placeholder: #4a6a4a;
|
|
160
|
+
|
|
161
|
+
// Tables
|
|
162
|
+
--theme-table-header-bg: #121e12;
|
|
163
|
+
--theme-table-header-text: #A6BE47;
|
|
164
|
+
--theme-table-row-bg: #121e12;
|
|
165
|
+
--theme-table-row-alt-bg: #1a2e1a;
|
|
166
|
+
--theme-table-row-hover: #243824;
|
|
167
|
+
--theme-table-border: #2d4a2d;
|
|
168
|
+
--theme-table-row-selected: rgba(166, 190, 71, 0.15);
|
|
169
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// CSS Module declarations
|
|
2
|
+
declare module '*.module.scss' {
|
|
3
|
+
const classes: { [key: string]: string };
|
|
4
|
+
export default classes;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
declare module '*.module.css' {
|
|
8
|
+
const classes: { [key: string]: string };
|
|
9
|
+
export default classes;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Vite environment
|
|
13
|
+
interface ImportMetaEnv {
|
|
14
|
+
readonly DEV: boolean;
|
|
15
|
+
readonly PROD: boolean;
|
|
16
|
+
readonly MODE: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface ImportMeta {
|
|
20
|
+
readonly env: ImportMetaEnv;
|
|
21
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS Modules Utility
|
|
3
|
+
*
|
|
4
|
+
* Creates a helper function for working with CSS Module class names.
|
|
5
|
+
* Supports BEM-style naming and automatic fallback for global classes.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import styles from './EzButton.module.scss';
|
|
9
|
+
* import { cx } from '../../utils/cssModules.js';
|
|
10
|
+
*
|
|
11
|
+
* const cls = cx(styles);
|
|
12
|
+
*
|
|
13
|
+
* // Single class
|
|
14
|
+
* el.className = cls('button'); // => 'EzButton_button_x7ks2'
|
|
15
|
+
*
|
|
16
|
+
* // Multiple classes
|
|
17
|
+
* el.className = cls('button', 'button--primary'); // => 'EzButton_button_x7ks2 EzButton_button--primary_a3f1'
|
|
18
|
+
*
|
|
19
|
+
* // Conditional classes
|
|
20
|
+
* el.className = cls('button', isActive && 'button--active'); // falsy values ignored
|
|
21
|
+
*
|
|
22
|
+
* // Mixed with global classes (FontAwesome, theme classes)
|
|
23
|
+
* el.className = cls('icon', 'fa-solid fa-check'); // Global classes pass through
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Creates a class name helper bound to a CSS Module styles object.
|
|
28
|
+
*
|
|
29
|
+
* @param {Object} styles - CSS Module styles object
|
|
30
|
+
* @returns {Function} Helper function that resolves class names
|
|
31
|
+
*/
|
|
32
|
+
export function cx(styles = {}) {
|
|
33
|
+
/**
|
|
34
|
+
* Resolves class names from the CSS Module or passes through global classes.
|
|
35
|
+
*
|
|
36
|
+
* @param {...(string|boolean|null|undefined)} names - Class names or falsy values
|
|
37
|
+
* @returns {string} Space-separated class names
|
|
38
|
+
*/
|
|
39
|
+
return function (...names) {
|
|
40
|
+
return names
|
|
41
|
+
.filter(Boolean)
|
|
42
|
+
.flatMap(name => {
|
|
43
|
+
// Handle space-separated class strings (e.g., 'fa-solid fa-check')
|
|
44
|
+
if (typeof name === 'string' && name.includes(' ')) {
|
|
45
|
+
return name.split(/\s+/).map(n => styles[n] || n);
|
|
46
|
+
}
|
|
47
|
+
// Single class - lookup in styles or pass through
|
|
48
|
+
return styles[name] || name;
|
|
49
|
+
})
|
|
50
|
+
.join(' ');
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Merges multiple class names (like clsx/classnames library).
|
|
56
|
+
* Works without CSS Modules - just combines class names.
|
|
57
|
+
*
|
|
58
|
+
* @param {...(string|boolean|null|undefined|Object)} args - Class names or condition objects
|
|
59
|
+
* @returns {string} Space-separated class names
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* clsx('foo', 'bar'); // => 'foo bar'
|
|
63
|
+
* clsx('foo', isActive && 'active'); // => 'foo active' or 'foo'
|
|
64
|
+
* clsx({ active: isActive, disabled }); // => 'active' if isActive is true
|
|
65
|
+
*/
|
|
66
|
+
export function clsx(...args) {
|
|
67
|
+
return args
|
|
68
|
+
.flatMap(arg => {
|
|
69
|
+
if (!arg) return [];
|
|
70
|
+
if (typeof arg === 'string') return arg;
|
|
71
|
+
if (typeof arg === 'object') {
|
|
72
|
+
return Object.entries(arg)
|
|
73
|
+
.filter(([, value]) => Boolean(value))
|
|
74
|
+
.map(([key]) => key);
|
|
75
|
+
}
|
|
76
|
+
return [];
|
|
77
|
+
})
|
|
78
|
+
.join(' ');
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export default cx;
|