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.
Files changed (154) hide show
  1. package/components/EzBaseComponent.ts +648 -0
  2. package/components/EzComponent.ts +89 -0
  3. package/components/EzInput.module.scss +183 -0
  4. package/components/EzInput.ts +104 -0
  5. package/components/EzLabel.ts +22 -0
  6. package/components/EzOutlet.ts +181 -0
  7. package/components/HtmlWrapper.ts +305 -0
  8. package/components/avatar/EzAvatar.module.scss +200 -0
  9. package/components/avatar/EzAvatar.ts +130 -0
  10. package/components/badge/EzBadge.module.scss +202 -0
  11. package/components/badge/EzBadge.ts +77 -0
  12. package/components/button/EzButton.module.scss +402 -0
  13. package/components/button/EzButton.ts +175 -0
  14. package/components/button/EzButtonGroup.ts +48 -0
  15. package/components/card/EzCard.module.scss +71 -0
  16. package/components/card/EzCard.ts +120 -0
  17. package/components/chart/EzBarChart.ts +47 -0
  18. package/components/chart/EzChart.module.scss +14 -0
  19. package/components/chart/EzChart.ts +279 -0
  20. package/components/chart/EzDoughnutChart.ts +47 -0
  21. package/components/chart/EzLineChart.ts +53 -0
  22. package/components/checkbox/EzCheckbox.module.scss +145 -0
  23. package/components/checkbox/EzCheckbox.ts +115 -0
  24. package/components/dataview/EzDataView.module.scss +115 -0
  25. package/components/dataview/EzDataView.ts +355 -0
  26. package/components/dataview/modes/EzDataViewCards.ts +322 -0
  27. package/components/dataview/modes/EzDataViewGrid.ts +76 -0
  28. package/components/datepicker/EzDatePicker.module.scss +348 -0
  29. package/components/datepicker/EzDatePicker.ts +519 -0
  30. package/components/dialog/EzDialog.module.scss +180 -0
  31. package/components/dropdown/EzDropdown.module.scss +107 -0
  32. package/components/dropdown/EzDropdown.ts +235 -0
  33. package/components/feed/EzActivityFeed.module.scss +90 -0
  34. package/components/feed/EzActivityFeed.ts +78 -0
  35. package/components/form/EzForm.ts +364 -0
  36. package/components/form/EzValidators.test.js +421 -0
  37. package/components/form/EzValidators.ts +202 -0
  38. package/components/grid/EzGrid.scss +88 -0
  39. package/components/grid/EzGrid.ts +1085 -0
  40. package/components/grid/EzGridContainer.ts +104 -0
  41. package/components/grid/body/EzGridBody.scss +283 -0
  42. package/components/grid/body/EzGridBody.ts +549 -0
  43. package/components/grid/body/EzGridCell.ts +211 -0
  44. package/components/grid/body/EzGridRow.ts +196 -0
  45. package/components/grid/filter/EzGridFilters.scss +78 -0
  46. package/components/grid/filter/EzGridFilters.ts +285 -0
  47. package/components/grid/footer/EzGridFooter.scss +136 -0
  48. package/components/grid/footer/EzGridFooter.ts +448 -0
  49. package/components/grid/header/EzGridHeader.scss +199 -0
  50. package/components/grid/header/EzGridHeader.ts +430 -0
  51. package/components/grid/query/EzGridQuery.ts +81 -0
  52. package/components/grid/state/EzGridColumns.ts +155 -0
  53. package/components/grid/state/EzGridController.ts +470 -0
  54. package/components/grid/state/EzGridLifecycle.ts +136 -0
  55. package/components/grid/state/EzGridNormalizers.test.js +273 -0
  56. package/components/grid/state/EzGridNormalizers.ts +162 -0
  57. package/components/grid/state/EzGridParts.ts +233 -0
  58. package/components/grid/state/EzGridPersistence.ts +140 -0
  59. package/components/grid/state/EzGridRemote.test.js +573 -0
  60. package/components/grid/state/EzGridRemote.ts +335 -0
  61. package/components/grid/state/EzGridSelection.ts +231 -0
  62. package/components/grid/state/EzGridSort.ts +286 -0
  63. package/components/grid/title/EzGridActionBar.ts +98 -0
  64. package/components/grid/title/EzGridTitle.ts +114 -0
  65. package/components/grid/title/EzGridTitleBar.scss +65 -0
  66. package/components/grid/title/EzGridTitleBar.ts +87 -0
  67. package/components/grid/types.ts +607 -0
  68. package/components/panel/EzPanel.module.scss +133 -0
  69. package/components/panel/EzPanel.ts +147 -0
  70. package/components/radio/EzRadio.module.scss +190 -0
  71. package/components/radio/EzRadio.ts +149 -0
  72. package/components/select/EzSelect.module.scss +153 -0
  73. package/components/select/EzSelect.ts +238 -0
  74. package/components/skeleton/EzSkeleton.module.scss +95 -0
  75. package/components/skeleton/EzSkeleton.ts +70 -0
  76. package/components/store/EzStore.ts +344 -0
  77. package/components/switch/EzSwitch.module.scss +164 -0
  78. package/components/switch/EzSwitch.ts +117 -0
  79. package/components/tabs/EzTabPanel.module.scss +181 -0
  80. package/components/tabs/EzTabPanel.ts +402 -0
  81. package/components/textarea/EzTextarea.module.scss +131 -0
  82. package/components/textarea/EzTextarea.ts +161 -0
  83. package/components/timepicker/EzTimePicker.module.scss +282 -0
  84. package/components/timepicker/EzTimePicker.ts +540 -0
  85. package/components/toast/EzToast.module.scss +291 -0
  86. package/components/tooltip/EzTooltip.module.scss +124 -0
  87. package/components/tooltip/EzTooltip.ts +153 -0
  88. package/core/EzComponentTypes.ts +693 -0
  89. package/core/EzError.ts +63 -0
  90. package/core/EzModel.ts +268 -0
  91. package/core/EzTypes.ts +328 -0
  92. package/core/eventBus.ts +284 -0
  93. package/core/ez.ts +617 -0
  94. package/core/loader.ts +725 -0
  95. package/core/renderer.ts +1010 -0
  96. package/core/router.ts +490 -0
  97. package/core/services.ts +124 -0
  98. package/core/state.ts +142 -0
  99. package/core/utils.ts +81 -0
  100. package/package.json +51 -0
  101. package/services/RouteUI.js +17 -0
  102. package/services/crypto.js +64 -0
  103. package/services/dialog.js +222 -0
  104. package/services/fetchApi.js +63 -0
  105. package/services/firebase.js +30 -0
  106. package/services/toast.js +214 -0
  107. package/template/doc/EzDocs.js +15 -0
  108. package/template/doc/EzDocs.module.scss +627 -0
  109. package/template/doc/EzDocsController.js +164 -0
  110. package/template/doc/data/activityfeed/EzActivityFeedDoc.js +42 -0
  111. package/template/doc/data/avatar/EzAvatarDoc.js +71 -0
  112. package/template/doc/data/badge/EzBadgeDoc.js +92 -0
  113. package/template/doc/data/button/EzButtonDoc.js +77 -0
  114. package/template/doc/data/buttongroup/EzButtonGroupDoc.js +102 -0
  115. package/template/doc/data/card/EzCardDoc.js +39 -0
  116. package/template/doc/data/chart/EzChartDoc.js +60 -0
  117. package/template/doc/data/checkbox/EzCheckboxDoc.js +67 -0
  118. package/template/doc/data/component/EzComponentDoc.js +34 -0
  119. package/template/doc/data/cssmodules/CSSModulesDoc.js +70 -0
  120. package/template/doc/data/datepicker/EzDatePickerDoc.js +126 -0
  121. package/template/doc/data/dialog/EzDialogDoc.js +217 -0
  122. package/template/doc/data/dropdown/EzDropdownDoc.js +178 -0
  123. package/template/doc/data/form/EzFormDoc.js +90 -0
  124. package/template/doc/data/grid/EzGridDoc.js +99 -0
  125. package/template/doc/data/input/EzInputDoc.js +92 -0
  126. package/template/doc/data/label/EzLabelDoc.js +40 -0
  127. package/template/doc/data/model/EzModelDoc.js +53 -0
  128. package/template/doc/data/outlet/EzOutletDoc.js +63 -0
  129. package/template/doc/data/panel/EzPanelDoc.js +214 -0
  130. package/template/doc/data/radio/EzRadioDoc.js +174 -0
  131. package/template/doc/data/router/EzRouterDoc.js +75 -0
  132. package/template/doc/data/select/EzSelectDoc.js +37 -0
  133. package/template/doc/data/skeleton/EzSkeletonDoc.js +149 -0
  134. package/template/doc/data/switch/EzSwitchDoc.js +82 -0
  135. package/template/doc/data/tabpanel/EzTabPanelDoc.js +44 -0
  136. package/template/doc/data/textarea/EzTextareaDoc.js +131 -0
  137. package/template/doc/data/timepicker/EzTimePickerDoc.js +107 -0
  138. package/template/doc/data/tooltip/EzTooltipDoc.js +193 -0
  139. package/template/doc/data/validators/EzValidatorsDoc.js +37 -0
  140. package/template/doc/sidebar/EzDocsSidebar.js +32 -0
  141. package/template/doc/sidebar/category/EzDocsCategory.js +33 -0
  142. package/template/doc/sidebar/item/EzDocsComponentItem.js +24 -0
  143. package/template/doc/viewer/EzDocsViewer.js +18 -0
  144. package/template/doc/viewer/codepanel/EzDocsCodePanel.js +51 -0
  145. package/template/doc/viewer/content/EzDocsContent.js +315 -0
  146. package/template/doc/viewer/header/EzDocsViewerHeader.js +46 -0
  147. package/template/doc/viewer/showcase/EzDocsShowcase.js +59 -0
  148. package/template/doc/viewer/showcase/EzDocsShowcaseSection.js +25 -0
  149. package/template/doc/viewer/showcase/EzDocsVariantItem.js +29 -0
  150. package/template/doc/welcome/EzDocsWelcome.js +48 -0
  151. package/themes/ez-theme.scss +179 -0
  152. package/themes/nature-fresh.scss +169 -0
  153. package/types/global.d.ts +21 -0
  154. package/utils/cssModules.js +81 -0
@@ -0,0 +1,214 @@
1
+ ez.define('EzPanelDoc', {
2
+ controller: 'EzDocs',
3
+ template() {
4
+ const sections = [
5
+ {
6
+ title: 'Basic',
7
+ variants: [
8
+ {
9
+ label: 'With Title',
10
+ config: {
11
+ eztype: 'EzPanel',
12
+ title: 'Panel Title',
13
+ items: [
14
+ { eztype: 'EzLabel', text: 'Panel content goes here.' }
15
+ ]
16
+ }
17
+ },
18
+ {
19
+ label: 'With Icon',
20
+ config: {
21
+ eztype: 'EzPanel',
22
+ icon: 'fa-solid fa-gear',
23
+ title: 'Settings',
24
+ items: [
25
+ { eztype: 'EzLabel', text: 'Configure your preferences.' }
26
+ ]
27
+ }
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ title: 'With Badge',
33
+ variants: [
34
+ {
35
+ label: 'Counter Badge',
36
+ config: {
37
+ eztype: 'EzPanel',
38
+ icon: 'fa-solid fa-bell',
39
+ title: 'Notifications',
40
+ badge: '5',
41
+ items: [
42
+ { eztype: 'EzLabel', text: 'You have 5 new notifications.' }
43
+ ]
44
+ }
45
+ },
46
+ {
47
+ label: 'Status Badge',
48
+ config: {
49
+ eztype: 'EzPanel',
50
+ icon: 'fa-solid fa-server',
51
+ title: 'Server Status',
52
+ badge: 'Online',
53
+ items: [
54
+ { eztype: 'EzLabel', text: 'All systems operational.' }
55
+ ]
56
+ }
57
+ }
58
+ ]
59
+ },
60
+ {
61
+ title: 'With Tools',
62
+ variants: [
63
+ {
64
+ label: 'Action Buttons',
65
+ config: {
66
+ eztype: 'EzPanel',
67
+ title: 'User Profile',
68
+ tools: [
69
+ { eztype: 'EzButton', icon: 'fa-solid fa-edit', variant: 'ghost', size: 'sm' },
70
+ { eztype: 'EzButton', icon: 'fa-solid fa-trash', variant: 'ghost', size: 'sm' }
71
+ ],
72
+ items: [
73
+ { eztype: 'EzLabel', text: 'Profile information and settings.' }
74
+ ]
75
+ }
76
+ },
77
+ {
78
+ label: 'Dropdown Tool',
79
+ config: {
80
+ eztype: 'EzPanel',
81
+ icon: 'fa-solid fa-chart-bar',
82
+ title: 'Analytics',
83
+ tools: [
84
+ {
85
+ eztype: 'EzDropdown',
86
+ trigger: { eztype: 'EzButton', icon: 'fa-solid fa-ellipsis-v', variant: 'ghost', size: 'sm' },
87
+ items: [
88
+ { text: 'Export', icon: 'fa-solid fa-download' },
89
+ { text: 'Refresh', icon: 'fa-solid fa-refresh' }
90
+ ]
91
+ }
92
+ ],
93
+ items: [
94
+ { eztype: 'EzLabel', text: 'Dashboard analytics data.' }
95
+ ]
96
+ }
97
+ }
98
+ ]
99
+ },
100
+ {
101
+ title: 'Variants',
102
+ variants: [
103
+ {
104
+ label: 'Default',
105
+ config: {
106
+ eztype: 'EzPanel',
107
+ title: 'Default',
108
+ items: [{ eztype: 'EzLabel', text: 'Standard panel style.' }]
109
+ }
110
+ },
111
+ {
112
+ label: 'Elevated',
113
+ config: {
114
+ eztype: 'EzPanel',
115
+ title: 'Elevated',
116
+ variant: 'elevated',
117
+ items: [{ eztype: 'EzLabel', text: 'With shadow, no border.' }]
118
+ }
119
+ },
120
+ {
121
+ label: 'Flat',
122
+ config: {
123
+ eztype: 'EzPanel',
124
+ title: 'Flat',
125
+ variant: 'flat',
126
+ items: [{ eztype: 'EzLabel', text: 'Subtle background.' }]
127
+ }
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ title: 'Collapsible',
133
+ variants: [
134
+ {
135
+ label: 'Expanded',
136
+ config: {
137
+ eztype: 'EzPanel',
138
+ icon: 'fa-solid fa-filter',
139
+ title: 'Filters',
140
+ collapsible: true,
141
+ items: [
142
+ { eztype: 'EzInput', placeholder: 'Search...' },
143
+ { eztype: 'EzSelect', placeholder: 'Category', options: ['All', 'Active', 'Archived'] }
144
+ ]
145
+ }
146
+ },
147
+ {
148
+ label: 'Collapsed',
149
+ config: {
150
+ eztype: 'EzPanel',
151
+ icon: 'fa-solid fa-info-circle',
152
+ title: 'Details',
153
+ collapsible: true,
154
+ collapsed: true,
155
+ items: [
156
+ { eztype: 'EzLabel', text: 'This content is hidden by default.' }
157
+ ]
158
+ }
159
+ }
160
+ ]
161
+ },
162
+ {
163
+ title: 'No Padding',
164
+ variants: [
165
+ {
166
+ label: 'List Content',
167
+ config: {
168
+ eztype: 'EzPanel',
169
+ icon: 'fa-solid fa-list',
170
+ title: 'Recent Items',
171
+ badge: '3',
172
+ noPadding: true,
173
+ items: [
174
+ {
175
+ eztype: 'EzComponent',
176
+ style: { borderBottom: '1px solid #e2e8f0', padding: '12px 16px', cursor: 'pointer' },
177
+ items: [{ eztype: 'EzLabel', text: 'Item One' }]
178
+ },
179
+ {
180
+ eztype: 'EzComponent',
181
+ style: { borderBottom: '1px solid #e2e8f0', padding: '12px 16px', cursor: 'pointer' },
182
+ items: [{ eztype: 'EzLabel', text: 'Item Two' }]
183
+ },
184
+ {
185
+ eztype: 'EzComponent',
186
+ style: { padding: '12px 16px', cursor: 'pointer' },
187
+ items: [{ eztype: 'EzLabel', text: 'Item Three' }]
188
+ }
189
+ ]
190
+ }
191
+ }
192
+ ]
193
+ }
194
+ ];
195
+
196
+ return {
197
+ eztype: 'EzComponent',
198
+ cls: 'ez-docs-showcase-container',
199
+ layout: 'hbox',
200
+ items: [
201
+ {
202
+ eztype: 'EzComponent',
203
+ cls: 'ez-docs-showcase-panel',
204
+ flex: 1,
205
+ items: sections.map(section => ({
206
+ eztype: 'EzDocsShowcaseSection',
207
+ props: { section }
208
+ }))
209
+ },
210
+ { eztype: 'EzDocsCodePanel' }
211
+ ]
212
+ };
213
+ }
214
+ });
@@ -0,0 +1,174 @@
1
+ ez.define('EzRadioDoc', {
2
+ controller: 'EzDocs',
3
+ template() {
4
+ const sections = [
5
+ {
6
+ title: 'Vertical Layout (Default)',
7
+ variants: [
8
+ {
9
+ label: 'Basic',
10
+ config: {
11
+ eztype: 'EzRadio',
12
+ name: 'demo1',
13
+ options: [
14
+ { value: 'option1', label: 'Option 1' },
15
+ { value: 'option2', label: 'Option 2' },
16
+ { value: 'option3', label: 'Option 3' }
17
+ ]
18
+ }
19
+ },
20
+ {
21
+ label: 'With Selection',
22
+ config: {
23
+ eztype: 'EzRadio',
24
+ name: 'demo2',
25
+ value: 'medium',
26
+ options: [
27
+ { value: 'small', label: 'Small' },
28
+ { value: 'medium', label: 'Medium' },
29
+ { value: 'large', label: 'Large' }
30
+ ]
31
+ }
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ title: 'Horizontal Layout',
37
+ variants: [
38
+ {
39
+ label: 'Inline Options',
40
+ config: {
41
+ eztype: 'EzRadio',
42
+ name: 'demo3',
43
+ layout: 'horizontal',
44
+ options: [
45
+ { value: 'yes', label: 'Yes' },
46
+ { value: 'no', label: 'No' },
47
+ { value: 'maybe', label: 'Maybe' }
48
+ ]
49
+ }
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ title: 'Sizes',
55
+ variants: [
56
+ {
57
+ label: 'Small',
58
+ config: {
59
+ eztype: 'EzRadio',
60
+ name: 'demo4',
61
+ size: 'sm',
62
+ layout: 'horizontal',
63
+ options: [
64
+ { value: 'a', label: 'A' },
65
+ { value: 'b', label: 'B' },
66
+ { value: 'c', label: 'C' }
67
+ ]
68
+ }
69
+ },
70
+ {
71
+ label: 'Default',
72
+ config: {
73
+ eztype: 'EzRadio',
74
+ name: 'demo5',
75
+ layout: 'horizontal',
76
+ options: [
77
+ { value: 'a', label: 'A' },
78
+ { value: 'b', label: 'B' },
79
+ { value: 'c', label: 'C' }
80
+ ]
81
+ }
82
+ },
83
+ {
84
+ label: 'Large',
85
+ config: {
86
+ eztype: 'EzRadio',
87
+ name: 'demo6',
88
+ size: 'lg',
89
+ layout: 'horizontal',
90
+ options: [
91
+ { value: 'a', label: 'A' },
92
+ { value: 'b', label: 'B' },
93
+ { value: 'c', label: 'C' }
94
+ ]
95
+ }
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ title: 'With Disabled Options',
101
+ variants: [
102
+ {
103
+ label: 'Some Disabled',
104
+ config: {
105
+ eztype: 'EzRadio',
106
+ name: 'demo7',
107
+ options: [
108
+ { value: 'free', label: 'Free Plan' },
109
+ { value: 'basic', label: 'Basic Plan', disabled: true },
110
+ { value: 'pro', label: 'Pro Plan' },
111
+ { value: 'enterprise', label: 'Enterprise', disabled: true }
112
+ ]
113
+ }
114
+ }
115
+ ]
116
+ },
117
+ {
118
+ title: 'All Disabled',
119
+ variants: [
120
+ {
121
+ label: 'Disabled Group',
122
+ config: {
123
+ eztype: 'EzRadio',
124
+ name: 'demo8',
125
+ disabled: true,
126
+ value: 'selected',
127
+ options: [
128
+ { value: 'selected', label: 'Selected' },
129
+ { value: 'other', label: 'Other' }
130
+ ]
131
+ }
132
+ }
133
+ ]
134
+ },
135
+ {
136
+ title: 'With onChange',
137
+ variants: [
138
+ {
139
+ label: 'Interactive',
140
+ config: {
141
+ eztype: 'EzRadio',
142
+ name: 'demo9',
143
+ layout: 'horizontal',
144
+ options: [
145
+ { value: 'red', label: 'Red' },
146
+ { value: 'green', label: 'Green' },
147
+ { value: 'blue', label: 'Blue' }
148
+ ],
149
+ onChange: (value) => ez.toast.info(`Selected: ${value}`)
150
+ }
151
+ }
152
+ ]
153
+ }
154
+ ];
155
+
156
+ return {
157
+ eztype: 'EzComponent',
158
+ cls: 'ez-docs-showcase-container',
159
+ layout: 'hbox',
160
+ items: [
161
+ {
162
+ eztype: 'EzComponent',
163
+ cls: 'ez-docs-showcase-panel',
164
+ flex: 1,
165
+ items: sections.map(section => ({
166
+ eztype: 'EzDocsShowcaseSection',
167
+ props: { section }
168
+ }))
169
+ },
170
+ { eztype: 'EzDocsCodePanel' }
171
+ ]
172
+ };
173
+ }
174
+ });
@@ -0,0 +1,75 @@
1
+ ez.define('EzRouterDoc', {
2
+ template() {
3
+ return {
4
+ eztype: 'EzDocsContent',
5
+ props: {
6
+ componentName: 'EzRouter',
7
+ docs: {
8
+ features: [
9
+ 'Route matching with dynamic parameters (:id)',
10
+ 'Nested routes with child views',
11
+ 'Route guards for protected routes',
12
+ 'Global and per-route middleware',
13
+ 'History API integration (pushState)',
14
+ 'Popstate handling (back/forward buttons)',
15
+ 'Route prefetching on link hover',
16
+ 'Layout management with smart reuse',
17
+ 'Error handling hooks'
18
+ ],
19
+ usage: `// Define routes
20
+ ez.routes([
21
+ {
22
+ path: '/',
23
+ view: 'Home'
24
+ },
25
+ {
26
+ path: '/login',
27
+ view: 'Login'
28
+ },
29
+ {
30
+ path: '/admin',
31
+ view: 'AdminLayout',
32
+ protected: ['AuthController:isAuthenticated'],
33
+ children: [
34
+ { path: '/dashboard', view: 'Dashboard' },
35
+ { path: '/users', view: 'UserList' },
36
+ { path: '/users/:id', view: 'UserDetail' }
37
+ ]
38
+ }
39
+ ]);
40
+
41
+ // Navigate programmatically
42
+ ez.go('/admin/users/123');
43
+
44
+ // Route guards
45
+ {
46
+ path: '/billing',
47
+ view: 'Billing',
48
+ protected: [
49
+ 'AuthController:isAuthenticated',
50
+ 'BillingController:hasPaymentMethod'
51
+ ]
52
+ }
53
+
54
+ // Global middleware
55
+ ez.router.beforeEach(async (context, next) => {
56
+ if (context.meta.requiresAuth && !isLoggedIn()) {
57
+ ez.go('/login');
58
+ return;
59
+ }
60
+ await next();
61
+ });`,
62
+ api: [
63
+ { method: 'ez.routes(definitions)', description: 'Register route definitions' },
64
+ { method: 'ez.go(path)', description: 'Navigate to a path using History API' },
65
+ { method: 'router.beforeEach(fn)', description: 'Register global before middleware' },
66
+ { method: 'router.afterEach(fn)', description: 'Register global after middleware' },
67
+ { method: 'router.onError(fn)', description: 'Register navigation error handler' },
68
+ { method: 'router.prefetch(path)', description: 'Prefetch a route\'s view module' },
69
+ { method: 'router.enableLinkPrefetch()', description: 'Auto-prefetch on link hover' }
70
+ ]
71
+ }
72
+ }
73
+ };
74
+ }
75
+ });
@@ -0,0 +1,37 @@
1
+ ez.define('EzSelectDoc', {
2
+ controller: 'EzDocs',
3
+ template() {
4
+ const ctrl = ez.getControllerSync('EzDocs');
5
+ const sections = [
6
+ {
7
+ title: 'Basic Select',
8
+ variants: [
9
+ { label: 'Simple Options', config: { eztype: 'EzSelect', placeholder: 'Select a fruit...', options: ['Apple', 'Banana', 'Orange', 'Mango'] } },
10
+ { label: 'With Value', config: { eztype: 'EzSelect', value: 'banana', options: [{ value: 'apple', label: 'Apple' }, { value: 'banana', label: 'Banana' }, { value: 'orange', label: 'Orange' }] } }
11
+ ]
12
+ },
13
+ {
14
+ title: 'Object Options',
15
+ variants: [
16
+ { label: 'Countries', config: { eztype: 'EzSelect', placeholder: 'Select country...', options: [{ value: 'us', label: 'United States' }, { value: 'uk', label: 'United Kingdom' }, { value: 'de', label: 'Germany' }] } },
17
+ { label: 'Status', config: { eztype: 'EzSelect', placeholder: 'Select status...', options: [{ value: 'active', label: 'Active' }, { value: 'pending', label: 'Pending' }, { value: 'inactive', label: 'Inactive' }] } }
18
+ ]
19
+ }
20
+ ];
21
+
22
+ return {
23
+ eztype: 'EzComponent',
24
+ cls: 'ez-docs-showcase-container',
25
+ layout: 'hbox',
26
+ items: [
27
+ {
28
+ eztype: 'EzComponent',
29
+ cls: 'ez-docs-showcase-panel',
30
+ flex: 1,
31
+ items: sections.map(section => ({ eztype: 'EzDocsShowcaseSection', props: { section } }))
32
+ },
33
+ { eztype: 'EzDocsCodePanel' }
34
+ ]
35
+ };
36
+ }
37
+ });
@@ -0,0 +1,149 @@
1
+ ez.define('EzSkeletonDoc', {
2
+ controller: 'EzDocs',
3
+ template() {
4
+ const sections = [
5
+ {
6
+ title: 'Variants',
7
+ variants: [
8
+ { label: 'Text (Default)', config: { eztype: 'EzSkeleton', variant: 'text', width: 200 } },
9
+ { label: 'Rectangle', config: { eztype: 'EzSkeleton', variant: 'rect', width: 200, height: 100 } },
10
+ { label: 'Circle', config: { eztype: 'EzSkeleton', variant: 'circle', size: 50 } }
11
+ ]
12
+ },
13
+ {
14
+ title: 'Circle Sizes',
15
+ variants: [
16
+ { label: 'Small (32px)', config: { eztype: 'EzSkeleton', variant: 'circle', size: 32 } },
17
+ { label: 'Medium (48px)', config: { eztype: 'EzSkeleton', variant: 'circle', size: 48 } },
18
+ { label: 'Large (64px)', config: { eztype: 'EzSkeleton', variant: 'circle', size: 64 } },
19
+ { label: 'XL (80px)', config: { eztype: 'EzSkeleton', variant: 'circle', size: 80 } }
20
+ ]
21
+ },
22
+ {
23
+ title: 'Animations',
24
+ variants: [
25
+ { label: 'Pulse (Default)', config: { eztype: 'EzSkeleton', variant: 'rect', width: 200, height: 60, animation: 'pulse' } },
26
+ { label: 'Shimmer', config: { eztype: 'EzSkeleton', variant: 'rect', width: 200, height: 60, animation: 'shimmer' } }
27
+ ]
28
+ },
29
+ {
30
+ title: 'Rounded',
31
+ variants: [
32
+ { label: 'Rounded Rect', config: { eztype: 'EzSkeleton', variant: 'rect', width: 200, height: 60, rounded: true } },
33
+ { label: 'Rounded Text', config: { eztype: 'EzSkeleton', variant: 'text', width: 150, rounded: true } }
34
+ ]
35
+ },
36
+ {
37
+ title: 'Multiple (count)',
38
+ variants: [
39
+ {
40
+ label: 'Text Lines',
41
+ config: { eztype: 'EzSkeleton', variant: 'text', count: 3, gap: 8, width: 250 }
42
+ },
43
+ {
44
+ label: 'Avatars Row',
45
+ config: {
46
+ eztype: 'EzComponent',
47
+ layout: 'hbox',
48
+ style: { gap: '8px' },
49
+ items: [
50
+ { eztype: 'EzSkeleton', variant: 'circle', size: 40 },
51
+ { eztype: 'EzSkeleton', variant: 'circle', size: 40 },
52
+ { eztype: 'EzSkeleton', variant: 'circle', size: 40 }
53
+ ]
54
+ }
55
+ }
56
+ ]
57
+ },
58
+ {
59
+ title: 'Custom Dimensions',
60
+ variants: [
61
+ { label: 'Wide', config: { eztype: 'EzSkeleton', variant: 'rect', width: '100%', height: 20 } },
62
+ { label: 'Tall', config: { eztype: 'EzSkeleton', variant: 'rect', width: 100, height: 150 } },
63
+ { label: 'Square', config: { eztype: 'EzSkeleton', variant: 'rect', width: 80, height: 80 } }
64
+ ]
65
+ },
66
+ {
67
+ title: 'Card Skeleton Example',
68
+ variants: [
69
+ {
70
+ label: 'User Card',
71
+ config: {
72
+ eztype: 'EzComponent',
73
+ layout: 'hbox',
74
+ style: { gap: '16px', padding: '16px', background: '#f8fafc', borderRadius: '8px' },
75
+ items: [
76
+ { eztype: 'EzSkeleton', variant: 'circle', size: 60 },
77
+ {
78
+ eztype: 'EzComponent',
79
+ layout: 'vbox',
80
+ style: { gap: '8px', flex: '1' },
81
+ items: [
82
+ { eztype: 'EzSkeleton', variant: 'text', width: 150, height: 20 },
83
+ { eztype: 'EzSkeleton', variant: 'text', width: 200, height: 14 },
84
+ { eztype: 'EzSkeleton', variant: 'text', width: 100, height: 14 }
85
+ ]
86
+ }
87
+ ]
88
+ }
89
+ }
90
+ ]
91
+ },
92
+ {
93
+ title: 'Table Row Skeleton',
94
+ variants: [
95
+ {
96
+ label: 'Table Rows',
97
+ config: {
98
+ eztype: 'EzComponent',
99
+ layout: 'vbox',
100
+ style: { gap: '12px', width: '100%' },
101
+ items: [
102
+ {
103
+ eztype: 'EzComponent',
104
+ layout: 'hbox',
105
+ style: { gap: '16px' },
106
+ items: [
107
+ { eztype: 'EzSkeleton', variant: 'circle', size: 32 },
108
+ { eztype: 'EzSkeleton', variant: 'text', width: 120 },
109
+ { eztype: 'EzSkeleton', variant: 'text', width: 180 },
110
+ { eztype: 'EzSkeleton', variant: 'text', width: 80 }
111
+ ]
112
+ },
113
+ {
114
+ eztype: 'EzComponent',
115
+ layout: 'hbox',
116
+ style: { gap: '16px' },
117
+ items: [
118
+ { eztype: 'EzSkeleton', variant: 'circle', size: 32 },
119
+ { eztype: 'EzSkeleton', variant: 'text', width: 120 },
120
+ { eztype: 'EzSkeleton', variant: 'text', width: 180 },
121
+ { eztype: 'EzSkeleton', variant: 'text', width: 80 }
122
+ ]
123
+ }
124
+ ]
125
+ }
126
+ }
127
+ ]
128
+ }
129
+ ];
130
+
131
+ return {
132
+ eztype: 'EzComponent',
133
+ cls: 'ez-docs-showcase-container',
134
+ layout: 'hbox',
135
+ items: [
136
+ {
137
+ eztype: 'EzComponent',
138
+ cls: 'ez-docs-showcase-panel',
139
+ flex: 1,
140
+ items: sections.map(section => ({
141
+ eztype: 'EzDocsShowcaseSection',
142
+ props: { section }
143
+ }))
144
+ },
145
+ { eztype: 'EzDocsCodePanel' }
146
+ ]
147
+ };
148
+ }
149
+ });