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,82 @@
1
+ ez.define('EzSwitchDoc', {
2
+ controller: 'EzDocs',
3
+ template() {
4
+ const sections = [
5
+ {
6
+ title: 'Basic',
7
+ variants: [
8
+ { label: 'Off', config: { eztype: 'EzSwitch' } },
9
+ { label: 'On', config: { eztype: 'EzSwitch', value: true } }
10
+ ]
11
+ },
12
+ {
13
+ title: 'With Label',
14
+ variants: [
15
+ { label: 'Label Right', config: { eztype: 'EzSwitch', label: 'Enable notifications' } },
16
+ { label: 'Label Right (On)', config: { eztype: 'EzSwitch', label: 'Dark mode', value: true } }
17
+ ]
18
+ },
19
+ {
20
+ title: 'Label Position',
21
+ variants: [
22
+ { label: 'Label Left', config: { eztype: 'EzSwitch', label: 'Airplane mode', labelPosition: 'left' } },
23
+ { label: 'Label Right (Default)', config: { eztype: 'EzSwitch', label: 'Airplane mode' } }
24
+ ]
25
+ },
26
+ {
27
+ title: 'Sizes',
28
+ variants: [
29
+ { label: 'Small', config: { eztype: 'EzSwitch', label: 'Small switch', size: 'sm' } },
30
+ { label: 'Default', config: { eztype: 'EzSwitch', label: 'Default switch' } },
31
+ { label: 'Large', config: { eztype: 'EzSwitch', label: 'Large switch', size: 'lg' } }
32
+ ]
33
+ },
34
+ {
35
+ title: 'States',
36
+ variants: [
37
+ { label: 'Disabled Off', config: { eztype: 'EzSwitch', label: 'Disabled', disabled: true } },
38
+ { label: 'Disabled On', config: { eztype: 'EzSwitch', label: 'Disabled', value: true, disabled: true } }
39
+ ]
40
+ },
41
+ {
42
+ title: 'With onChange',
43
+ variants: [
44
+ {
45
+ label: 'Interactive',
46
+ config: {
47
+ eztype: 'EzSwitch',
48
+ label: 'Toggle me',
49
+ onChange: (value) => ez.toast.info(`Switch is now ${value ? 'ON' : 'OFF'}`)
50
+ }
51
+ }
52
+ ]
53
+ },
54
+ {
55
+ title: 'Common Use Cases',
56
+ variants: [
57
+ { label: 'Wi-Fi', config: { eztype: 'EzSwitch', label: 'Wi-Fi', labelPosition: 'left', value: true } },
58
+ { label: 'Bluetooth', config: { eztype: 'EzSwitch', label: 'Bluetooth', labelPosition: 'left' } },
59
+ { label: 'Location', config: { eztype: 'EzSwitch', label: 'Location Services', labelPosition: 'left', value: true } }
60
+ ]
61
+ }
62
+ ];
63
+
64
+ return {
65
+ eztype: 'EzComponent',
66
+ cls: 'ez-docs-showcase-container',
67
+ layout: 'hbox',
68
+ items: [
69
+ {
70
+ eztype: 'EzComponent',
71
+ cls: 'ez-docs-showcase-panel',
72
+ flex: 1,
73
+ items: sections.map(section => ({
74
+ eztype: 'EzDocsShowcaseSection',
75
+ props: { section }
76
+ }))
77
+ },
78
+ { eztype: 'EzDocsCodePanel' }
79
+ ]
80
+ };
81
+ }
82
+ });
@@ -0,0 +1,44 @@
1
+ ez.define('EzTabPanelDoc', {
2
+ controller: 'EzDocs',
3
+ template() {
4
+ const ctrl = ez.getControllerSync('EzDocs');
5
+ const sections = [
6
+ {
7
+ title: 'Basic Tabs',
8
+ variants: [
9
+ { label: 'Simple', config: { eztype: 'EzTabPanel', style: { minHeight: '120px' }, tabs: [
10
+ { id: 'tab1', title: 'First', items: [{ eztype: 'EzLabel', text: 'First tab content', style: { padding: '16px' } }] },
11
+ { id: 'tab2', title: 'Second', items: [{ eztype: 'EzLabel', text: 'Second tab content', style: { padding: '16px' } }] }
12
+ ]}}
13
+ ]
14
+ },
15
+ {
16
+ title: 'With Icons',
17
+ variants: [
18
+ { label: 'Icon Tabs', config: { eztype: 'EzTabPanel', style: { minHeight: '120px' }, tabs: [
19
+ { id: 'preview', title: 'Preview', icon: 'fa-solid fa-eye', items: [{ eztype: 'EzLabel', text: 'Preview', style: { padding: '16px' } }] },
20
+ { id: 'code', title: 'Code', icon: 'fa-solid fa-code', items: [{ eztype: 'EzLabel', text: 'Code', style: { padding: '16px' } }] }
21
+ ]}}
22
+ ]
23
+ },
24
+ {
25
+ title: 'Variants',
26
+ variants: [
27
+ { label: 'Boxed', config: { eztype: 'EzTabPanel', variant: 'boxed', style: { minHeight: '100px' }, tabs: [{ id: 't1', title: 'Tab 1', items: [{ eztype: 'EzLabel', text: 'Boxed', style: { padding: '16px' } }] }] } },
28
+ { label: 'Pills', config: { eztype: 'EzTabPanel', variant: 'pills', style: { minHeight: '100px' }, tabs: [{ id: 't1', title: 'Tab 1', items: [{ eztype: 'EzLabel', text: 'Pills', style: { padding: '16px' } }] }] } },
29
+ { label: 'Minimal', config: { eztype: 'EzTabPanel', variant: 'minimal', style: { minHeight: '100px' }, tabs: [{ id: 't1', title: 'Tab 1', items: [{ eztype: 'EzLabel', text: 'Minimal', style: { padding: '16px' } }] }] } }
30
+ ]
31
+ }
32
+ ];
33
+
34
+ return {
35
+ eztype: 'EzComponent',
36
+ cls: 'ez-docs-showcase-container',
37
+ layout: 'hbox',
38
+ items: [
39
+ { eztype: 'EzComponent', cls: 'ez-docs-showcase-panel', flex: 1, items: sections.map(section => ({ eztype: 'EzDocsShowcaseSection', props: { section } })) },
40
+ { eztype: 'EzDocsCodePanel' }
41
+ ]
42
+ };
43
+ }
44
+ });
@@ -0,0 +1,131 @@
1
+ ez.define('EzTextareaDoc', {
2
+ controller: 'EzDocs',
3
+ template() {
4
+ const sections = [
5
+ {
6
+ title: 'Basic',
7
+ variants: [
8
+ { label: 'Default', config: { eztype: 'EzTextarea', placeholder: 'Enter your message...' } },
9
+ { label: 'With Value', config: { eztype: 'EzTextarea', value: 'This is some pre-filled text content.' } }
10
+ ]
11
+ },
12
+ {
13
+ title: 'With Rows',
14
+ variants: [
15
+ { label: '2 Rows', config: { eztype: 'EzTextarea', rows: 2, placeholder: '2 rows...' } },
16
+ { label: '4 Rows', config: { eztype: 'EzTextarea', rows: 4, placeholder: '4 rows...' } },
17
+ { label: '6 Rows', config: { eztype: 'EzTextarea', rows: 6, placeholder: '6 rows...' } }
18
+ ]
19
+ },
20
+ {
21
+ title: 'Auto Resize',
22
+ variants: [
23
+ {
24
+ label: 'Auto Grow',
25
+ config: {
26
+ eztype: 'EzTextarea',
27
+ autoResize: true,
28
+ placeholder: 'Start typing and watch it grow...',
29
+ minRows: 2
30
+ }
31
+ },
32
+ {
33
+ label: 'With Max Rows',
34
+ config: {
35
+ eztype: 'EzTextarea',
36
+ autoResize: true,
37
+ minRows: 2,
38
+ maxRows: 6,
39
+ placeholder: 'Grows up to 6 rows...'
40
+ }
41
+ }
42
+ ]
43
+ },
44
+ {
45
+ title: 'Character Counter',
46
+ variants: [
47
+ {
48
+ label: 'Show Count',
49
+ config: {
50
+ eztype: 'EzTextarea',
51
+ showCount: true,
52
+ placeholder: 'Type to see character count...'
53
+ }
54
+ },
55
+ {
56
+ label: 'With Max Length',
57
+ config: {
58
+ eztype: 'EzTextarea',
59
+ showCount: true,
60
+ maxLength: 100,
61
+ placeholder: 'Limited to 100 characters...'
62
+ }
63
+ },
64
+ {
65
+ label: 'Max 280 (Twitter-like)',
66
+ config: {
67
+ eztype: 'EzTextarea',
68
+ showCount: true,
69
+ maxLength: 280,
70
+ placeholder: "What's happening?"
71
+ }
72
+ }
73
+ ]
74
+ },
75
+ {
76
+ title: 'Sizes',
77
+ variants: [
78
+ { label: 'Small', config: { eztype: 'EzTextarea', size: 'sm', placeholder: 'Small textarea', rows: 2 } },
79
+ { label: 'Default', config: { eztype: 'EzTextarea', placeholder: 'Default textarea', rows: 2 } },
80
+ { label: 'Large', config: { eztype: 'EzTextarea', size: 'lg', placeholder: 'Large textarea', rows: 2 } }
81
+ ]
82
+ },
83
+ {
84
+ title: 'Resize Control',
85
+ variants: [
86
+ { label: 'Resizable (Default)', config: { eztype: 'EzTextarea', placeholder: 'Drag corner to resize...', rows: 3 } },
87
+ { label: 'No Resize', config: { eztype: 'EzTextarea', resize: false, placeholder: 'Cannot be resized...', rows: 3 } }
88
+ ]
89
+ },
90
+ {
91
+ title: 'States',
92
+ variants: [
93
+ { label: 'Disabled', config: { eztype: 'EzTextarea', disabled: true, placeholder: 'Disabled textarea' } },
94
+ { label: 'Disabled with Value', config: { eztype: 'EzTextarea', disabled: true, value: 'This content is disabled.' } },
95
+ { label: 'Readonly', config: { eztype: 'EzTextarea', readonly: true, value: 'This content is read-only and cannot be modified.' } }
96
+ ]
97
+ },
98
+ {
99
+ title: 'With onChange',
100
+ variants: [
101
+ {
102
+ label: 'Interactive',
103
+ config: {
104
+ eztype: 'EzTextarea',
105
+ placeholder: 'Type and see character count in toast...',
106
+ onChange: (value) => ez.toast.info(`${value.length} characters typed`)
107
+ }
108
+ }
109
+ ]
110
+ }
111
+ ];
112
+
113
+ return {
114
+ eztype: 'EzComponent',
115
+ cls: 'ez-docs-showcase-container',
116
+ layout: 'hbox',
117
+ items: [
118
+ {
119
+ eztype: 'EzComponent',
120
+ cls: 'ez-docs-showcase-panel',
121
+ flex: 1,
122
+ items: sections.map(section => ({
123
+ eztype: 'EzDocsShowcaseSection',
124
+ props: { section }
125
+ }))
126
+ },
127
+ { eztype: 'EzDocsCodePanel' }
128
+ ]
129
+ };
130
+ }
131
+ });
@@ -0,0 +1,107 @@
1
+ ez.define('EzTimePickerDoc', {
2
+ controller: 'EzDocs',
3
+ template() {
4
+ const sections = [
5
+ {
6
+ title: 'Basic',
7
+ variants: [
8
+ { label: 'Default', config: { eztype: 'EzTimePicker', placeholder: 'Select time...' } },
9
+ { label: 'With Value', config: { eztype: 'EzTimePicker', value: '14:30' } }
10
+ ]
11
+ },
12
+ {
13
+ title: '12-Hour Format (AM/PM)',
14
+ variants: [
15
+ { label: '12-Hour', config: { eztype: 'EzTimePicker', use12Hour: true, placeholder: 'Select time...' } },
16
+ { label: '12-Hour with Value', config: { eztype: 'EzTimePicker', use12Hour: true, value: '14:30' } },
17
+ { label: 'Morning Time', config: { eztype: 'EzTimePicker', use12Hour: true, value: '09:15' } }
18
+ ]
19
+ },
20
+ {
21
+ title: 'With Seconds',
22
+ variants: [
23
+ { label: '24-Hour + Seconds', config: { eztype: 'EzTimePicker', showSeconds: true, placeholder: 'HH:mm:ss' } },
24
+ { label: '12-Hour + Seconds', config: { eztype: 'EzTimePicker', showSeconds: true, use12Hour: true, placeholder: 'hh:mm:ss AM/PM' } },
25
+ { label: 'With Value', config: { eztype: 'EzTimePicker', showSeconds: true, value: '14:30:45' } }
26
+ ]
27
+ },
28
+ {
29
+ title: 'Minute Step',
30
+ variants: [
31
+ { label: '1 Minute (Default)', config: { eztype: 'EzTimePicker', minuteStep: 1, placeholder: 'Every minute...' } },
32
+ { label: '5 Minutes', config: { eztype: 'EzTimePicker', minuteStep: 5, placeholder: 'Every 5 minutes...' } },
33
+ { label: '15 Minutes', config: { eztype: 'EzTimePicker', minuteStep: 15, placeholder: 'Every 15 minutes...' } },
34
+ { label: '30 Minutes', config: { eztype: 'EzTimePicker', minuteStep: 30, placeholder: 'Every 30 minutes...' } }
35
+ ]
36
+ },
37
+ {
38
+ title: 'Sizes',
39
+ variants: [
40
+ { label: 'Small', config: { eztype: 'EzTimePicker', size: 'sm', placeholder: 'Small...' } },
41
+ { label: 'Default', config: { eztype: 'EzTimePicker', placeholder: 'Default...' } },
42
+ { label: 'Large', config: { eztype: 'EzTimePicker', size: 'lg', placeholder: 'Large...' } }
43
+ ]
44
+ },
45
+ {
46
+ title: 'States',
47
+ variants: [
48
+ { label: 'Disabled', config: { eztype: 'EzTimePicker', disabled: true, placeholder: 'Disabled...' } },
49
+ { label: 'Disabled with Value', config: { eztype: 'EzTimePicker', disabled: true, value: '09:00' } }
50
+ ]
51
+ },
52
+ {
53
+ title: 'With onChange',
54
+ variants: [
55
+ {
56
+ label: 'Interactive',
57
+ config: {
58
+ eztype: 'EzTimePicker',
59
+ placeholder: 'Select and see toast...',
60
+ onChange: (value) => ez.toast.info(`Selected: ${value}`)
61
+ }
62
+ }
63
+ ]
64
+ },
65
+ {
66
+ title: 'Common Configurations',
67
+ variants: [
68
+ {
69
+ label: 'Business Hours',
70
+ config: {
71
+ eztype: 'EzTimePicker',
72
+ minuteStep: 30,
73
+ placeholder: 'Select meeting time...'
74
+ }
75
+ },
76
+ {
77
+ label: 'Appointment Slot',
78
+ config: {
79
+ eztype: 'EzTimePicker',
80
+ use12Hour: true,
81
+ minuteStep: 15,
82
+ placeholder: 'Schedule appointment...'
83
+ }
84
+ }
85
+ ]
86
+ }
87
+ ];
88
+
89
+ return {
90
+ eztype: 'EzComponent',
91
+ cls: 'ez-docs-showcase-container',
92
+ layout: 'hbox',
93
+ items: [
94
+ {
95
+ eztype: 'EzComponent',
96
+ cls: 'ez-docs-showcase-panel',
97
+ flex: 1,
98
+ items: sections.map(section => ({
99
+ eztype: 'EzDocsShowcaseSection',
100
+ props: { section }
101
+ }))
102
+ },
103
+ { eztype: 'EzDocsCodePanel' }
104
+ ]
105
+ };
106
+ }
107
+ });
@@ -0,0 +1,193 @@
1
+ ez.define('EzTooltipDoc', {
2
+ controller: 'EzDocs',
3
+ template() {
4
+ const sections = [
5
+ {
6
+ title: 'Positions',
7
+ variants: [
8
+ {
9
+ label: 'Top',
10
+ config: {
11
+ eztype: 'EzTooltip',
12
+ text: 'Tooltip on top',
13
+ position: 'top',
14
+ items: [{ eztype: 'EzButton', text: 'Hover me (Top)' }]
15
+ }
16
+ },
17
+ {
18
+ label: 'Bottom',
19
+ config: {
20
+ eztype: 'EzTooltip',
21
+ text: 'Tooltip on bottom',
22
+ position: 'bottom',
23
+ items: [{ eztype: 'EzButton', text: 'Hover me (Bottom)' }]
24
+ }
25
+ },
26
+ {
27
+ label: 'Left',
28
+ config: {
29
+ eztype: 'EzTooltip',
30
+ text: 'Tooltip on left',
31
+ position: 'left',
32
+ items: [{ eztype: 'EzButton', text: 'Hover me (Left)' }]
33
+ }
34
+ },
35
+ {
36
+ label: 'Right',
37
+ config: {
38
+ eztype: 'EzTooltip',
39
+ text: 'Tooltip on right',
40
+ position: 'right',
41
+ items: [{ eztype: 'EzButton', text: 'Hover me (Right)' }]
42
+ }
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ title: 'Variants',
48
+ variants: [
49
+ {
50
+ label: 'Dark (Default)',
51
+ config: {
52
+ eztype: 'EzTooltip',
53
+ text: 'Dark tooltip',
54
+ variant: 'dark',
55
+ items: [{ eztype: 'EzButton', text: 'Dark Tooltip' }]
56
+ }
57
+ },
58
+ {
59
+ label: 'Light',
60
+ config: {
61
+ eztype: 'EzTooltip',
62
+ text: 'Light tooltip',
63
+ variant: 'light',
64
+ items: [{ eztype: 'EzButton', text: 'Light Tooltip' }]
65
+ }
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ title: 'Custom Delay',
71
+ variants: [
72
+ {
73
+ label: 'No Delay',
74
+ config: {
75
+ eztype: 'EzTooltip',
76
+ text: 'Instant tooltip',
77
+ delay: 0,
78
+ items: [{ eztype: 'EzButton', text: 'Instant (0ms)' }]
79
+ }
80
+ },
81
+ {
82
+ label: 'Short Delay',
83
+ config: {
84
+ eztype: 'EzTooltip',
85
+ text: 'Quick tooltip',
86
+ delay: 200,
87
+ items: [{ eztype: 'EzButton', text: 'Quick (200ms)' }]
88
+ }
89
+ },
90
+ {
91
+ label: 'Long Delay',
92
+ config: {
93
+ eztype: 'EzTooltip',
94
+ text: 'Slow tooltip',
95
+ delay: 500,
96
+ items: [{ eztype: 'EzButton', text: 'Slow (500ms)' }]
97
+ }
98
+ }
99
+ ]
100
+ },
101
+ {
102
+ title: 'On Different Elements',
103
+ variants: [
104
+ {
105
+ label: 'On Button',
106
+ config: {
107
+ eztype: 'EzTooltip',
108
+ text: 'Click to submit',
109
+ items: [{ eztype: 'EzButton', text: 'Submit', variant: 'primary' }]
110
+ }
111
+ },
112
+ {
113
+ label: 'On Icon',
114
+ config: {
115
+ eztype: 'EzTooltip',
116
+ text: 'More information',
117
+ items: [{ eztype: 'i', cls: 'fa-solid fa-circle-info', style: { fontSize: '20px', color: '#3b82f6', cursor: 'pointer' } }]
118
+ }
119
+ },
120
+ {
121
+ label: 'On Badge',
122
+ config: {
123
+ eztype: 'EzTooltip',
124
+ text: '5 new notifications',
125
+ items: [{ eztype: 'EzBadge', text: '5', variant: 'danger', pill: true }]
126
+ }
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ title: 'Long Content',
132
+ variants: [
133
+ {
134
+ label: 'Long Text',
135
+ config: {
136
+ eztype: 'EzTooltip',
137
+ text: 'This is a tooltip with much longer content that wraps to multiple lines',
138
+ items: [{ eztype: 'EzButton', text: 'Long Tooltip' }]
139
+ }
140
+ }
141
+ ]
142
+ },
143
+ {
144
+ title: 'Icon Buttons with Tooltips',
145
+ variants: [
146
+ {
147
+ label: 'Action Icons',
148
+ config: {
149
+ eztype: 'EzComponent',
150
+ layout: 'hbox',
151
+ style: { gap: '8px' },
152
+ items: [
153
+ {
154
+ eztype: 'EzTooltip',
155
+ text: 'Edit',
156
+ items: [{ eztype: 'EzButton', icon: 'fa-solid fa-edit', variant: 'ghost' }]
157
+ },
158
+ {
159
+ eztype: 'EzTooltip',
160
+ text: 'Delete',
161
+ items: [{ eztype: 'EzButton', icon: 'fa-solid fa-trash', variant: 'ghost' }]
162
+ },
163
+ {
164
+ eztype: 'EzTooltip',
165
+ text: 'Share',
166
+ items: [{ eztype: 'EzButton', icon: 'fa-solid fa-share', variant: 'ghost' }]
167
+ }
168
+ ]
169
+ }
170
+ }
171
+ ]
172
+ }
173
+ ];
174
+
175
+ return {
176
+ eztype: 'EzComponent',
177
+ cls: 'ez-docs-showcase-container',
178
+ layout: 'hbox',
179
+ items: [
180
+ {
181
+ eztype: 'EzComponent',
182
+ cls: 'ez-docs-showcase-panel',
183
+ flex: 1,
184
+ items: sections.map(section => ({
185
+ eztype: 'EzDocsShowcaseSection',
186
+ props: { section }
187
+ }))
188
+ },
189
+ { eztype: 'EzDocsCodePanel' }
190
+ ]
191
+ };
192
+ }
193
+ });
@@ -0,0 +1,37 @@
1
+ ez.define('EzValidatorsDoc', {
2
+ template() {
3
+ return {
4
+ eztype: 'EzDocsContent',
5
+ props: {
6
+ componentName: 'EzValidators',
7
+ docs: {
8
+ features: [
9
+ 'Required field validation',
10
+ 'String length validation (minLength, maxLength)',
11
+ 'Email, URL, phone format validation',
12
+ 'Regex pattern matching',
13
+ 'Cross-field matching (password confirmation)',
14
+ 'Custom validation functions'
15
+ ],
16
+ usage: `{
17
+ eztype: 'EzForm',
18
+ formData: 'form',
19
+ items: [
20
+ { name: 'email', validate: { required: true, email: true } },
21
+ { name: 'password', inputType: 'password', validate: { required: true, minLength: 8 } },
22
+ { name: 'confirmPassword', validate: { required: true, match: 'password' } }
23
+ ]
24
+ }`,
25
+ api: [
26
+ { method: 'required', description: 'Field must have a value' },
27
+ { method: 'minLength: n', description: 'Minimum n characters' },
28
+ { method: 'maxLength: n', description: 'Maximum n characters' },
29
+ { method: 'email', description: 'Valid email format' },
30
+ { method: 'pattern: regex', description: 'Match regex pattern' },
31
+ { method: 'match: fieldName', description: 'Match another field' }
32
+ ]
33
+ }
34
+ }
35
+ };
36
+ }
37
+ });
@@ -0,0 +1,32 @@
1
+ ez.define('EzDocsSidebar', {
2
+ eztype: 'EzComponent',
3
+ controller: 'EzDocs',
4
+ cls: 'ez-docs-sidebar',
5
+ items: [
6
+ {
7
+ eztype: 'EzComponent',
8
+ cls: 'ez-docs-header',
9
+ onClick: () => ez.go('/admin/docs'),
10
+ items: [
11
+ {
12
+ eztype: 'i',
13
+ cls: ['fa-solid', 'fa-book', 'ez-docs-header-icon']
14
+ },
15
+ {
16
+ eztype: 'EzLabel',
17
+ cls: 'ez-docs-header-title',
18
+ text: 'Ez Docs'
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ eztype: 'ul',
24
+ cls: 'ez-docs-categories',
25
+ bind: { data: 'EzDocs:categories' },
26
+ itemRender: (category) => ({
27
+ eztype: 'EzDocsCategory',
28
+ props: category
29
+ })
30
+ }
31
+ ]
32
+ });
@@ -0,0 +1,33 @@
1
+ ez.define('EzDocsCategory', {
2
+ template(props) {
3
+ return {
4
+ eztype: 'EzComponent',
5
+ cls: 'ez-docs-category',
6
+ items: [
7
+ {
8
+ eztype: 'EzComponent',
9
+ cls: 'ez-docs-category-header',
10
+ items: [
11
+ {
12
+ eztype: 'i',
13
+ cls: ['fa-solid', props.icon, 'ez-docs-category-icon']
14
+ },
15
+ {
16
+ eztype: 'EzLabel',
17
+ cls: 'ez-docs-category-name',
18
+ text: props.name
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ eztype: 'ul',
24
+ cls: 'ez-docs-component-list',
25
+ items: props.components.map(comp => ({
26
+ eztype: 'EzDocsComponentItem',
27
+ props: comp
28
+ }))
29
+ }
30
+ ]
31
+ };
32
+ }
33
+ });