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,164 @@
|
|
|
1
|
+
ez.defineController('EzDocsController', {
|
|
2
|
+
state: {
|
|
3
|
+
selectedComponent: null,
|
|
4
|
+
currentPath: null,
|
|
5
|
+
selectedVariant: null,
|
|
6
|
+
|
|
7
|
+
categories: [
|
|
8
|
+
{
|
|
9
|
+
name: 'Layout',
|
|
10
|
+
icon: 'fa-layer-group',
|
|
11
|
+
components: [
|
|
12
|
+
{ name: 'EzComponent', description: 'Base layout component with flex support' },
|
|
13
|
+
{ name: 'EzPanel', description: 'Panel with header, title, tools and content' },
|
|
14
|
+
{ name: 'EzForm', description: 'Form container with validation' },
|
|
15
|
+
{ name: 'EzOutlet', description: 'Dynamic view container for routing' },
|
|
16
|
+
{ name: 'EzTabPanel', description: 'Tabbed content panel with variants' }
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'Navigation',
|
|
21
|
+
icon: 'fa-compass',
|
|
22
|
+
components: [
|
|
23
|
+
{ name: 'EzRouter', description: 'Client-side router with guards and middleware' }
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Inputs',
|
|
28
|
+
icon: 'fa-keyboard',
|
|
29
|
+
components: [
|
|
30
|
+
{ name: 'EzInput', description: 'Text input with icons and variants' },
|
|
31
|
+
{ name: 'EzTextarea', description: 'Multi-line text input with auto-resize' },
|
|
32
|
+
{ name: 'EzSelect', description: 'Dropdown select component' },
|
|
33
|
+
{ name: 'EzCheckbox', description: 'Checkbox input with label' },
|
|
34
|
+
{ name: 'EzRadio', description: 'Radio button group' },
|
|
35
|
+
{ name: 'EzSwitch', description: 'Toggle switch component' },
|
|
36
|
+
{ name: 'EzDatePicker', description: 'Date picker with range support' },
|
|
37
|
+
{ name: 'EzTimePicker', description: 'Time picker with 12/24 hour format' }
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Data',
|
|
42
|
+
icon: 'fa-table',
|
|
43
|
+
components: [
|
|
44
|
+
{ name: 'EzGrid', description: 'Data grid with sorting, filtering, and pagination' },
|
|
45
|
+
{ name: 'EzModel', description: 'Data schema with type coercion and computed fields' }
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'Display',
|
|
50
|
+
icon: 'fa-eye',
|
|
51
|
+
components: [
|
|
52
|
+
{ name: 'EzLabel', description: 'Text label with binding support' },
|
|
53
|
+
{ name: 'EzButton', description: 'Button with variants and sizes' },
|
|
54
|
+
{ name: 'EzButtonGroup', description: 'Group buttons together with connected styling' },
|
|
55
|
+
{ name: 'EzBadge', description: 'Badge for status, labels, and notifications' },
|
|
56
|
+
{ name: 'EzAvatar', description: 'User avatar component' },
|
|
57
|
+
{ name: 'EzCard', description: 'Card container with header and actions' },
|
|
58
|
+
{ name: 'EzActivityFeed', description: 'Activity feed with icons and timestamps' },
|
|
59
|
+
{ name: 'EzSkeleton', description: 'Loading placeholder for content' }
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'Feedback',
|
|
64
|
+
icon: 'fa-comment-dots',
|
|
65
|
+
components: [
|
|
66
|
+
{ name: 'EzDialog', description: 'Modal dialog with sizes and async loading' },
|
|
67
|
+
{ name: 'EzDropdown', description: 'Dropdown menu with icons and shortcuts' },
|
|
68
|
+
{ name: 'EzTooltip', description: 'Tooltip with positions and variants' }
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'Charts',
|
|
73
|
+
icon: 'fa-chart-bar',
|
|
74
|
+
components: [
|
|
75
|
+
{ name: 'EzChart', description: 'Base chart component with Chart.js' },
|
|
76
|
+
{ name: 'EzLineChart', description: 'Line chart with simplified API' },
|
|
77
|
+
{ name: 'EzBarChart', description: 'Bar chart with simplified API' },
|
|
78
|
+
{ name: 'EzDoughnutChart', description: 'Doughnut chart with simplified API' }
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'Validation',
|
|
83
|
+
icon: 'fa-check-circle',
|
|
84
|
+
components: [
|
|
85
|
+
{ name: 'EzValidators', description: 'Built-in form validators' }
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'Utilities',
|
|
90
|
+
icon: 'fa-tools',
|
|
91
|
+
components: [
|
|
92
|
+
{ name: 'CSSModules', description: 'Style isolation with scoped class names' }
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
async onRouteChange({ fullPath, chain }) {
|
|
99
|
+
this.state.currentPath = fullPath;
|
|
100
|
+
|
|
101
|
+
const outlet = ez._refs.docsOutlet;
|
|
102
|
+
if (!outlet) return;
|
|
103
|
+
|
|
104
|
+
const next = chain?.[0];
|
|
105
|
+
|
|
106
|
+
if (!next) {
|
|
107
|
+
this.state.selectedComponent = null;
|
|
108
|
+
await outlet.open('EzDocsWelcome', {}, []);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
this.state.selectedComponent = next.params?.component || null;
|
|
113
|
+
|
|
114
|
+
const remainingChain = chain.slice(1);
|
|
115
|
+
await outlet.open(next.view, next.params, remainingChain);
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
getComponentInfo(name) {
|
|
119
|
+
for (const cat of this.state.categories) {
|
|
120
|
+
const comp = cat.components.find(c => c.name === name);
|
|
121
|
+
if (comp) {
|
|
122
|
+
return { ...comp, category: cat.name };
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return null;
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
goToComponent(componentName) {
|
|
129
|
+
ez.go(`/admin/docs/${componentName}`);
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
goToHome() {
|
|
133
|
+
ez.go('/admin/docs');
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
selectVariant(variant) {
|
|
137
|
+
this.state.selectedVariant = variant;
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
formatCode(config) {
|
|
141
|
+
const replacer = (key, value) => {
|
|
142
|
+
if (typeof value === 'function') {
|
|
143
|
+
return `__FN__${value.toString()}__FN__`;
|
|
144
|
+
}
|
|
145
|
+
return value;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
let result = JSON.stringify(config, replacer, 4)
|
|
149
|
+
.replace(/"([^"]+)":/g, '$1:')
|
|
150
|
+
.replace(/"/g, "'");
|
|
151
|
+
|
|
152
|
+
// Process functions - clean up to single line
|
|
153
|
+
result = result.replace(/'__FN__(.*?)__FN__'/gs, (match, fnStr) => {
|
|
154
|
+
return fnStr
|
|
155
|
+
.replace(/\\r\\n|\\r|\\n/g, ' ')
|
|
156
|
+
.replace(/\\'/g, "'")
|
|
157
|
+
.replace(/\\"/g, '"')
|
|
158
|
+
.replace(/\s+/g, ' ')
|
|
159
|
+
.trim();
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
return result;
|
|
163
|
+
}
|
|
164
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
ez.define('EzActivityFeedDoc', {
|
|
2
|
+
controller: 'EzDocs',
|
|
3
|
+
template() {
|
|
4
|
+
const ctrl = ez.getControllerSync('EzDocs');
|
|
5
|
+
const sections = [
|
|
6
|
+
{
|
|
7
|
+
title: 'Basic Feed',
|
|
8
|
+
variants: [
|
|
9
|
+
{ label: 'Activity List', config: {
|
|
10
|
+
eztype: 'EzActivityFeed',
|
|
11
|
+
maxHeight: 200,
|
|
12
|
+
items: [
|
|
13
|
+
{ icon: 'fa-solid fa-user-plus', variant: 'success', description: 'New user registered', timestamp: '2 min ago' },
|
|
14
|
+
{ icon: 'fa-solid fa-shopping-cart', variant: 'primary', description: 'Order completed', timestamp: '15 min ago' },
|
|
15
|
+
{ icon: 'fa-solid fa-star', variant: 'warning', description: 'Review submitted', timestamp: '1 hour ago' }
|
|
16
|
+
]
|
|
17
|
+
}}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
title: 'Icon Variants',
|
|
22
|
+
variants: [
|
|
23
|
+
{ label: 'Primary', config: { eztype: 'EzActivityFeed', items: [{ icon: 'fa-solid fa-bell', variant: 'primary', description: 'Primary notification', timestamp: 'Now' }] } },
|
|
24
|
+
{ label: 'Success', config: { eztype: 'EzActivityFeed', items: [{ icon: 'fa-solid fa-check', variant: 'success', description: 'Success message', timestamp: 'Now' }] } },
|
|
25
|
+
{ label: 'Warning', config: { eztype: 'EzActivityFeed', items: [{ icon: 'fa-solid fa-exclamation', variant: 'warning', description: 'Warning alert', timestamp: 'Now' }] } },
|
|
26
|
+
{ label: 'Danger', config: { eztype: 'EzActivityFeed', items: [{ icon: 'fa-solid fa-times', variant: 'danger', description: 'Error occurred', timestamp: 'Now' }] } },
|
|
27
|
+
{ label: 'Info', config: { eztype: 'EzActivityFeed', items: [{ icon: 'fa-solid fa-info', variant: 'info', description: 'Information', timestamp: 'Now' }] } }
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
eztype: 'EzComponent',
|
|
34
|
+
cls: 'ez-docs-showcase-container',
|
|
35
|
+
layout: 'hbox',
|
|
36
|
+
items: [
|
|
37
|
+
{ eztype: 'EzComponent', cls: 'ez-docs-showcase-panel', flex: 1, items: sections.map(section => ({ eztype: 'EzDocsShowcaseSection', props: { section } })) },
|
|
38
|
+
{ eztype: 'EzDocsCodePanel' }
|
|
39
|
+
]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
ez.define('EzAvatarDoc', {
|
|
2
|
+
controller: 'EzDocs',
|
|
3
|
+
template() {
|
|
4
|
+
const ctrl = ez.getControllerSync('EzDocs');
|
|
5
|
+
const sections = [
|
|
6
|
+
{
|
|
7
|
+
title: 'With Initials',
|
|
8
|
+
variants: [
|
|
9
|
+
{ label: 'From Name', config: { eztype: 'EzAvatar', name: 'John Doe' } },
|
|
10
|
+
{ label: 'Single Name', config: { eztype: 'EzAvatar', name: 'Alice' } },
|
|
11
|
+
{ label: 'Custom Initials', config: { eztype: 'EzAvatar', initials: 'AB' } }
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
title: 'Sizes',
|
|
16
|
+
variants: [
|
|
17
|
+
{ label: 'Extra Small', config: { eztype: 'EzAvatar', name: 'XS', size: 'xs' } },
|
|
18
|
+
{ label: 'Small', config: { eztype: 'EzAvatar', name: 'SM', size: 'sm' } },
|
|
19
|
+
{ label: 'Default', config: { eztype: 'EzAvatar', name: 'MD' } },
|
|
20
|
+
{ label: 'Large', config: { eztype: 'EzAvatar', name: 'LG', size: 'lg' } },
|
|
21
|
+
{ label: 'Extra Large', config: { eztype: 'EzAvatar', name: 'XL', size: 'xl' } }
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
title: 'Colors',
|
|
26
|
+
variants: [
|
|
27
|
+
{ label: 'Default', config: { eztype: 'EzAvatar', name: 'John Doe' } },
|
|
28
|
+
{ label: 'Primary', config: { eztype: 'EzAvatar', name: 'John Doe', color: 'primary' } },
|
|
29
|
+
{ label: 'Success', config: { eztype: 'EzAvatar', name: 'John Doe', color: 'success' } },
|
|
30
|
+
{ label: 'Warning', config: { eztype: 'EzAvatar', name: 'John Doe', color: 'warning' } },
|
|
31
|
+
{ label: 'Danger', config: { eztype: 'EzAvatar', name: 'John Doe', color: 'danger' } }
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
title: 'Variants',
|
|
36
|
+
variants: [
|
|
37
|
+
{ label: 'Circle', config: { eztype: 'EzAvatar', name: 'John Doe' } },
|
|
38
|
+
{ label: 'Rounded', config: { eztype: 'EzAvatar', name: 'John Doe', variant: 'rounded' } },
|
|
39
|
+
{ label: 'Square', config: { eztype: 'EzAvatar', name: 'John Doe', variant: 'square' } }
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
title: 'Status Indicators',
|
|
44
|
+
variants: [
|
|
45
|
+
{ label: 'Online', config: { eztype: 'EzAvatar', name: 'John Doe', status: 'online' } },
|
|
46
|
+
{ label: 'Offline', config: { eztype: 'EzAvatar', name: 'John Doe', status: 'offline' } },
|
|
47
|
+
{ label: 'Busy', config: { eztype: 'EzAvatar', name: 'John Doe', status: 'busy' } },
|
|
48
|
+
{ label: 'Away', config: { eztype: 'EzAvatar', name: 'John Doe', status: 'away' } }
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
eztype: 'EzComponent',
|
|
55
|
+
cls: 'ez-docs-showcase-container',
|
|
56
|
+
layout: 'hbox',
|
|
57
|
+
items: [
|
|
58
|
+
{
|
|
59
|
+
eztype: 'EzComponent',
|
|
60
|
+
cls: 'ez-docs-showcase-panel',
|
|
61
|
+
flex: 1,
|
|
62
|
+
items: sections.map(section => ({
|
|
63
|
+
eztype: 'EzDocsShowcaseSection',
|
|
64
|
+
props: { section }
|
|
65
|
+
}))
|
|
66
|
+
},
|
|
67
|
+
{ eztype: 'EzDocsCodePanel' }
|
|
68
|
+
]
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
ez.define('EzBadgeDoc', {
|
|
2
|
+
controller: 'EzDocs',
|
|
3
|
+
template() {
|
|
4
|
+
const sections = [
|
|
5
|
+
{
|
|
6
|
+
title: 'Variants',
|
|
7
|
+
variants: [
|
|
8
|
+
{ label: 'Default', config: { eztype: 'EzBadge', text: 'Default' } },
|
|
9
|
+
{ label: 'Primary', config: { eztype: 'EzBadge', text: 'Primary', variant: 'primary' } },
|
|
10
|
+
{ label: 'Success', config: { eztype: 'EzBadge', text: 'Success', variant: 'success' } },
|
|
11
|
+
{ label: 'Warning', config: { eztype: 'EzBadge', text: 'Warning', variant: 'warning' } },
|
|
12
|
+
{ label: 'Danger', config: { eztype: 'EzBadge', text: 'Danger', variant: 'danger' } }
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
title: 'Outline Variants',
|
|
17
|
+
variants: [
|
|
18
|
+
{ label: 'Outline Default', config: { eztype: 'EzBadge', text: 'Default', outline: true } },
|
|
19
|
+
{ label: 'Outline Primary', config: { eztype: 'EzBadge', text: 'Primary', variant: 'primary', outline: true } },
|
|
20
|
+
{ label: 'Outline Success', config: { eztype: 'EzBadge', text: 'Success', variant: 'success', outline: true } },
|
|
21
|
+
{ label: 'Outline Warning', config: { eztype: 'EzBadge', text: 'Warning', variant: 'warning', outline: true } },
|
|
22
|
+
{ label: 'Outline Danger', config: { eztype: 'EzBadge', text: 'Danger', variant: 'danger', outline: true } }
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: 'Sizes',
|
|
27
|
+
variants: [
|
|
28
|
+
{ label: 'Small', config: { eztype: 'EzBadge', text: 'Small', size: 'sm' } },
|
|
29
|
+
{ label: 'Default', config: { eztype: 'EzBadge', text: 'Default' } },
|
|
30
|
+
{ label: 'Large', config: { eztype: 'EzBadge', text: 'Large', size: 'lg' } }
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
title: 'Pill Style',
|
|
35
|
+
variants: [
|
|
36
|
+
{ label: 'Pill Default', config: { eztype: 'EzBadge', text: 'Pill', pill: true } },
|
|
37
|
+
{ label: 'Pill Primary', config: { eztype: 'EzBadge', text: '99+', variant: 'primary', pill: true } },
|
|
38
|
+
{ label: 'Pill Danger', config: { eztype: 'EzBadge', text: 'New', variant: 'danger', pill: true } }
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: 'Dot Indicator',
|
|
43
|
+
variants: [
|
|
44
|
+
{ label: 'Dot Default', config: { eztype: 'EzBadge', dot: true } },
|
|
45
|
+
{ label: 'Dot Primary', config: { eztype: 'EzBadge', dot: true, variant: 'primary' } },
|
|
46
|
+
{ label: 'Dot Success', config: { eztype: 'EzBadge', dot: true, variant: 'success' } },
|
|
47
|
+
{ label: 'Dot Danger', config: { eztype: 'EzBadge', dot: true, variant: 'danger' } }
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: 'With Icons',
|
|
52
|
+
variants: [
|
|
53
|
+
{ label: 'Check Icon', config: { eztype: 'EzBadge', text: 'Verified', icon: 'fa-solid fa-check', variant: 'success' } },
|
|
54
|
+
{ label: 'Star Icon', config: { eztype: 'EzBadge', text: 'Featured', icon: 'fa-solid fa-star', variant: 'warning' } },
|
|
55
|
+
{ label: 'Info Icon', config: { eztype: 'EzBadge', text: 'Info', icon: 'fa-solid fa-info-circle', variant: 'primary' } }
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: 'Closable',
|
|
60
|
+
variants: [
|
|
61
|
+
{ label: 'Closable Default', config: { eztype: 'EzBadge', text: 'Closable', closable: true } },
|
|
62
|
+
{ label: 'Closable Primary', config: { eztype: 'EzBadge', text: 'Tag', variant: 'primary', closable: true } },
|
|
63
|
+
{ label: 'Closable Pill', config: { eztype: 'EzBadge', text: 'Remove me', variant: 'danger', pill: true, closable: true } }
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
title: 'Clickable',
|
|
68
|
+
variants: [
|
|
69
|
+
{ label: 'Clickable', config: { eztype: 'EzBadge', text: 'Click me', variant: 'primary', onClick: () => ez.toast.info('Badge clicked!') } }
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
eztype: 'EzComponent',
|
|
76
|
+
cls: 'ez-docs-showcase-container',
|
|
77
|
+
layout: 'hbox',
|
|
78
|
+
items: [
|
|
79
|
+
{
|
|
80
|
+
eztype: 'EzComponent',
|
|
81
|
+
cls: 'ez-docs-showcase-panel',
|
|
82
|
+
flex: 1,
|
|
83
|
+
items: sections.map(section => ({
|
|
84
|
+
eztype: 'EzDocsShowcaseSection',
|
|
85
|
+
props: { section }
|
|
86
|
+
}))
|
|
87
|
+
},
|
|
88
|
+
{ eztype: 'EzDocsCodePanel' }
|
|
89
|
+
]
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
ez.define('EzButtonDoc', {
|
|
2
|
+
controller: 'EzDocs',
|
|
3
|
+
template() {
|
|
4
|
+
const ctrl = ez.getControllerSync('EzDocs');
|
|
5
|
+
const sections = [
|
|
6
|
+
{
|
|
7
|
+
title: 'Variants',
|
|
8
|
+
variants: [
|
|
9
|
+
{ label: 'Default', config: { eztype: 'EzButton', text: 'Default' } },
|
|
10
|
+
{ label: 'Primary', config: { eztype: 'EzButton', text: 'Primary', variant: 'primary' } },
|
|
11
|
+
{ label: 'Danger', config: { eztype: 'EzButton', text: 'Danger', variant: 'danger' } },
|
|
12
|
+
{ label: 'Success', config: { eztype: 'EzButton', text: 'Success', variant: 'success' } },
|
|
13
|
+
{ label: 'Warning', config: { eztype: 'EzButton', text: 'Warning', variant: 'warning' } },
|
|
14
|
+
{ label: 'Ghost', config: { eztype: 'EzButton', text: 'Ghost', variant: 'ghost' } },
|
|
15
|
+
{ label: 'Text', config: { eztype: 'EzButton', text: 'Text', variant: 'text' } }
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
title: 'Outline Variants',
|
|
20
|
+
variants: [
|
|
21
|
+
{ label: 'Outline', config: { eztype: 'EzButton', text: 'Outline', variant: 'outline' } },
|
|
22
|
+
{ label: 'Outline Primary', config: { eztype: 'EzButton', text: 'Primary', variant: 'outline-primary' } },
|
|
23
|
+
{ label: 'Outline Danger', config: { eztype: 'EzButton', text: 'Danger', variant: 'outline-danger' } },
|
|
24
|
+
{ label: 'Outline Success', config: { eztype: 'EzButton', text: 'Success', variant: 'outline-success' } },
|
|
25
|
+
{ label: 'Outline Warning', config: { eztype: 'EzButton', text: 'Warning', variant: 'outline-warning' } }
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: 'Sizes',
|
|
30
|
+
variants: [
|
|
31
|
+
{ label: 'Small', config: { eztype: 'EzButton', text: 'Small', size: 'sm' } },
|
|
32
|
+
{ label: 'Medium', config: { eztype: 'EzButton', text: 'Medium' } },
|
|
33
|
+
{ label: 'Large', config: { eztype: 'EzButton', text: 'Large', size: 'lg' } }
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
title: 'With Icons',
|
|
38
|
+
variants: [
|
|
39
|
+
{ label: 'Icon Left', config: { eztype: 'EzButton', text: 'Save', icon: 'fa-solid fa-save', variant: 'primary' } },
|
|
40
|
+
{ label: 'Icon Right', config: { eztype: 'EzButton', text: 'Next', icon: 'fa-solid fa-arrow-right', iconPosition: 'right', variant: 'primary' } },
|
|
41
|
+
{ label: 'Icon Only', config: { eztype: 'EzButton', icon: 'fa-solid fa-home', variant: 'primary' } }
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
title: 'States',
|
|
46
|
+
variants: [
|
|
47
|
+
{ label: 'Loading', config: { eztype: 'EzButton', text: 'Loading', loading: true, variant: 'primary' } },
|
|
48
|
+
{ label: 'Disabled', config: { eztype: 'EzButton', text: 'Disabled', disabled: true } }
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
title: 'Block Mode',
|
|
53
|
+
variants: [
|
|
54
|
+
{ label: 'Block Button', config: { eztype: 'EzButton', text: 'Full Width Button', variant: 'primary', block: true } }
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
eztype: 'EzComponent',
|
|
61
|
+
cls: 'ez-docs-showcase-container',
|
|
62
|
+
layout: 'hbox',
|
|
63
|
+
items: [
|
|
64
|
+
{
|
|
65
|
+
eztype: 'EzComponent',
|
|
66
|
+
cls: 'ez-docs-showcase-panel',
|
|
67
|
+
flex: 1,
|
|
68
|
+
items: sections.map(section => ({
|
|
69
|
+
eztype: 'EzDocsShowcaseSection',
|
|
70
|
+
props: { section }
|
|
71
|
+
}))
|
|
72
|
+
},
|
|
73
|
+
{ eztype: 'EzDocsCodePanel' }
|
|
74
|
+
]
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
ez.define('EzButtonGroupDoc', {
|
|
2
|
+
controller: 'EzDocs',
|
|
3
|
+
template() {
|
|
4
|
+
const sections = [
|
|
5
|
+
{
|
|
6
|
+
title: 'Horizontal Group',
|
|
7
|
+
variants: [
|
|
8
|
+
{
|
|
9
|
+
label: 'Default',
|
|
10
|
+
config: {
|
|
11
|
+
eztype: 'EzButtonGroup',
|
|
12
|
+
items: [
|
|
13
|
+
{ eztype: 'EzButton', text: 'Left' },
|
|
14
|
+
{ eztype: 'EzButton', text: 'Center' },
|
|
15
|
+
{ eztype: 'EzButton', text: 'Right' }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
label: 'Primary',
|
|
21
|
+
config: {
|
|
22
|
+
eztype: 'EzButtonGroup',
|
|
23
|
+
items: [
|
|
24
|
+
{ eztype: 'EzButton', text: 'One', variant: 'primary' },
|
|
25
|
+
{ eztype: 'EzButton', text: 'Two', variant: 'primary' },
|
|
26
|
+
{ eztype: 'EzButton', text: 'Three', variant: 'primary' }
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: 'Vertical Group',
|
|
34
|
+
variants: [
|
|
35
|
+
{
|
|
36
|
+
label: 'Vertical',
|
|
37
|
+
config: {
|
|
38
|
+
eztype: 'EzButtonGroup',
|
|
39
|
+
vertical: true,
|
|
40
|
+
items: [
|
|
41
|
+
{ eztype: 'EzButton', text: 'Top' },
|
|
42
|
+
{ eztype: 'EzButton', text: 'Middle' },
|
|
43
|
+
{ eztype: 'EzButton', text: 'Bottom' }
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: 'With Icons',
|
|
51
|
+
variants: [
|
|
52
|
+
{
|
|
53
|
+
label: 'Icon Buttons',
|
|
54
|
+
config: {
|
|
55
|
+
eztype: 'EzButtonGroup',
|
|
56
|
+
items: [
|
|
57
|
+
{ eztype: 'EzButton', icon: 'fa-solid fa-align-left' },
|
|
58
|
+
{ eztype: 'EzButton', icon: 'fa-solid fa-align-center' },
|
|
59
|
+
{ eztype: 'EzButton', icon: 'fa-solid fa-align-right' },
|
|
60
|
+
{ eztype: 'EzButton', icon: 'fa-solid fa-align-justify' }
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
title: 'Outline Variants',
|
|
68
|
+
variants: [
|
|
69
|
+
{
|
|
70
|
+
label: 'Outline',
|
|
71
|
+
config: {
|
|
72
|
+
eztype: 'EzButtonGroup',
|
|
73
|
+
items: [
|
|
74
|
+
{ eztype: 'EzButton', text: 'Day', variant: 'outline' },
|
|
75
|
+
{ eztype: 'EzButton', text: 'Week', variant: 'outline' },
|
|
76
|
+
{ eztype: 'EzButton', text: 'Month', variant: 'outline' }
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
eztype: 'EzComponent',
|
|
86
|
+
cls: 'ez-docs-showcase-container',
|
|
87
|
+
layout: 'hbox',
|
|
88
|
+
items: [
|
|
89
|
+
{
|
|
90
|
+
eztype: 'EzComponent',
|
|
91
|
+
cls: 'ez-docs-showcase-panel',
|
|
92
|
+
flex: 1,
|
|
93
|
+
items: sections.map(section => ({
|
|
94
|
+
eztype: 'EzDocsShowcaseSection',
|
|
95
|
+
props: { section }
|
|
96
|
+
}))
|
|
97
|
+
},
|
|
98
|
+
{ eztype: 'EzDocsCodePanel' }
|
|
99
|
+
]
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
ez.define('EzCardDoc', {
|
|
2
|
+
controller: 'EzDocs',
|
|
3
|
+
template() {
|
|
4
|
+
const ctrl = ez.getControllerSync('EzDocs');
|
|
5
|
+
const sections = [
|
|
6
|
+
{
|
|
7
|
+
title: 'Basic Cards',
|
|
8
|
+
variants: [
|
|
9
|
+
{ label: 'Simple Card', config: { eztype: 'EzCard', title: 'Card Title', items: [{ eztype: 'EzLabel', text: 'This is the card content.' }] } },
|
|
10
|
+
{ label: 'With Subtitle', config: { eztype: 'EzCard', title: 'Card Title', subtitle: 'Optional subtitle text', items: [{ eztype: 'EzLabel', text: 'Card content goes here.' }] } }
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
title: 'With Actions',
|
|
15
|
+
variants: [
|
|
16
|
+
{ label: 'Header Actions', config: { eztype: 'EzCard', title: 'Settings', headerActions: [{ eztype: 'EzButton', icon: 'fa-solid fa-edit', variant: 'ghost', size: 'sm' }], items: [{ eztype: 'EzLabel', text: 'Card with action buttons.' }] } }
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: 'Variants',
|
|
21
|
+
variants: [
|
|
22
|
+
{ label: 'Default', config: { eztype: 'EzCard', title: 'Default', items: [{ eztype: 'EzLabel', text: 'Default card' }] } },
|
|
23
|
+
{ label: 'Elevated', config: { eztype: 'EzCard', title: 'Elevated', variant: 'elevated', items: [{ eztype: 'EzLabel', text: 'With shadow' }] } },
|
|
24
|
+
{ label: 'Flat', config: { eztype: 'EzCard', title: 'Flat', variant: 'flat', items: [{ eztype: 'EzLabel', text: 'Flat background' }] } }
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
eztype: 'EzComponent',
|
|
31
|
+
cls: 'ez-docs-showcase-container',
|
|
32
|
+
layout: 'hbox',
|
|
33
|
+
items: [
|
|
34
|
+
{ eztype: 'EzComponent', cls: 'ez-docs-showcase-panel', flex: 1, items: sections.map(section => ({ eztype: 'EzDocsShowcaseSection', props: { section } })) },
|
|
35
|
+
{ eztype: 'EzDocsCodePanel' }
|
|
36
|
+
]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
ez.define('EzChartDoc', {
|
|
2
|
+
controller: 'EzDocs',
|
|
3
|
+
template() {
|
|
4
|
+
const ctrl = ez.getControllerSync('EzDocs');
|
|
5
|
+
const sections = [
|
|
6
|
+
{
|
|
7
|
+
title: 'Line Chart',
|
|
8
|
+
variants: [
|
|
9
|
+
{ label: 'EzLineChart', config: {
|
|
10
|
+
eztype: 'EzLineChart',
|
|
11
|
+
height: 200,
|
|
12
|
+
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
|
|
13
|
+
datasets: [{
|
|
14
|
+
label: 'Users',
|
|
15
|
+
data: [120, 190, 150, 220, 280],
|
|
16
|
+
borderColor: '#005871',
|
|
17
|
+
backgroundColor: 'rgba(0, 88, 113, 0.1)'
|
|
18
|
+
}]
|
|
19
|
+
}}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
title: 'Bar Chart',
|
|
24
|
+
variants: [
|
|
25
|
+
{ label: 'EzBarChart', config: {
|
|
26
|
+
eztype: 'EzBarChart',
|
|
27
|
+
height: 200,
|
|
28
|
+
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
|
|
29
|
+
datasets: [{
|
|
30
|
+
label: 'Revenue',
|
|
31
|
+
data: [65, 72, 81, 78, 95],
|
|
32
|
+
backgroundColor: '#005871'
|
|
33
|
+
}]
|
|
34
|
+
}}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
title: 'Doughnut Chart',
|
|
39
|
+
variants: [
|
|
40
|
+
{ label: 'EzDoughnutChart', config: {
|
|
41
|
+
eztype: 'EzDoughnutChart',
|
|
42
|
+
height: 200,
|
|
43
|
+
labels: ['Premium', 'Standard', 'Free'],
|
|
44
|
+
values: [35, 45, 20]
|
|
45
|
+
}}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
eztype: 'EzComponent',
|
|
52
|
+
cls: 'ez-docs-showcase-container',
|
|
53
|
+
layout: 'hbox',
|
|
54
|
+
items: [
|
|
55
|
+
{ eztype: 'EzComponent', cls: 'ez-docs-showcase-panel', flex: 1, items: sections.map(section => ({ eztype: 'EzDocsShowcaseSection', props: { section } })) },
|
|
56
|
+
{ eztype: 'EzDocsCodePanel' }
|
|
57
|
+
]
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|