@shohojdhara/atomix 0.1.25 → 0.1.26

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.
@@ -1,153 +0,0 @@
1
- // Components Index - Explicit exports for better tree-shaking and compatibility
2
-
3
- // Import components directly to ensure they exist before exporting
4
- import { Accordion } from './Accordion/Accordion';
5
- import { Avatar } from './Avatar/Avatar';
6
- import { AvatarGroup } from './Avatar/AvatarGroup';
7
- import { Badge } from './Badge/Badge';
8
- import { Breadcrumb } from './Breadcrumb/Breadcrumb';
9
- import { Button } from './Button/Button';
10
- import { Callout } from './Callout/Callout';
11
- import { Card } from './Card/Card';
12
- import { Checkbox } from './Form/Checkbox';
13
- import { ColorModeToggle } from './ColorModeToggle/ColorModeToggle';
14
- import { Container } from './Grid/Container';
15
- import { Countdown } from './Countdown/Countdown';
16
- import { DataTable } from './DataTable/DataTable';
17
- import { DatePicker } from './DatePicker/DatePicker';
18
- import { Dropdown } from './Dropdown/Dropdown';
19
- import { EdgePanel } from './EdgePanel/EdgePanel';
20
- import { Form } from './Form/Form';
21
- import { Grid } from './Grid/Grid';
22
- import { GridCol } from './Grid/GridCol';
23
- import { Hero } from './Hero/Hero';
24
- import { Icon } from './Icon/Icon';
25
- import { Input } from './Form/Input';
26
- import { List } from './List/List';
27
- import { MasonryGrid } from './MasonryGrid/MasonryGrid';
28
- import { MasonryGridItem } from './MasonryGrid/MasonryGridItem';
29
- import { Messages } from './Messages/Messages';
30
- import { Modal } from './Modal/Modal';
31
- import { Navbar } from './Navigation/Navbar/Navbar';
32
- import { Pagination } from './Pagination/Pagination';
33
- import { PhotoViewer } from './PhotoViewer/PhotoViewer';
34
- import { Popover } from './Popover/Popover';
35
- import { ProductReview } from './ProductReview/ProductReview';
36
- import { Progress } from './Progress/Progress';
37
- import { Radio } from './Form/Radio';
38
- import { Rating } from './Rating/Rating';
39
- import { River } from './River/River';
40
- import { Row } from './Grid/Row';
41
- import { SectionIntro } from './SectionIntro/SectionIntro';
42
- import { Select } from './Form/Select';
43
- import { Spinner } from './Spinner/Spinner';
44
- import { Steps } from './Steps/Steps';
45
- import { Tab } from './Tab/Tab';
46
- import { Testimonial } from './Testimonial/Testimonial';
47
- import { Textarea } from './Form/Textarea';
48
- import { Todo } from './Todo/Todo';
49
- import { Toggle } from './Toggle/Toggle';
50
- import { Tooltip } from './Tooltip/Tooltip';
51
- import { Upload } from './Upload/Upload';
52
-
53
- // Export types
54
- export type { AccordionProps } from './Accordion/Accordion';
55
- export type { AvatarProps } from './Avatar/Avatar';
56
- export type { AvatarGroupProps } from './Avatar/AvatarGroup';
57
- export type { BadgeProps } from './Badge/Badge';
58
- export type { BreadcrumbProps } from './Breadcrumb/Breadcrumb';
59
- export type { ButtonProps } from './Button/Button';
60
- export type { CalloutProps } from './Callout/Callout';
61
- export type { CardProps } from './Card/Card';
62
- export type { CheckboxProps } from './Form/Checkbox';
63
- export type { ColorModeToggleProps } from './ColorModeToggle/ColorModeToggle';
64
- export type { ContainerProps } from './Grid/Container';
65
- export type { CountdownProps } from './Countdown/Countdown';
66
- export type { DataTableProps } from './DataTable/DataTable';
67
- export type { DatePickerProps } from './DatePicker/DatePicker';
68
- export type { DropdownProps } from './Dropdown/Dropdown';
69
- export type { EdgePanelProps } from './EdgePanel/EdgePanel';
70
- export type { FormProps } from './Form/Form';
71
- export type { GridProps } from './Grid/Grid';
72
- export type { GridColProps } from './Grid/GridCol';
73
- export type { HeroProps } from './Hero/Hero';
74
- export type { IconProps } from './Icon/Icon';
75
- export type { InputProps } from './Form/Input';
76
- export type { ListProps } from './List/List';
77
- export type { MasonryGridProps } from './MasonryGrid/MasonryGrid';
78
- export type { MasonryGridItemProps } from './MasonryGrid/MasonryGridItem';
79
- export type { MessagesProps } from './Messages/Messages';
80
- export type { ModalProps } from './Modal/Modal';
81
- export type { NavbarProps } from './Navigation/Navbar/Navbar';
82
- export type { PaginationProps } from './Pagination/Pagination';
83
- export type { PhotoViewerProps } from './PhotoViewer/PhotoViewer';
84
- export type { PopoverProps } from './Popover/Popover';
85
- export type { ProductReviewProps } from './ProductReview/ProductReview';
86
- export type { ProgressProps } from './Progress/Progress';
87
- export type { RadioProps } from './Form/Radio';
88
- export type { RatingProps } from './Rating/Rating';
89
- export type { RiverProps } from './River/River';
90
- export type { RowProps } from './Grid/Row';
91
- export type { SectionIntroProps } from './SectionIntro/SectionIntro';
92
- export type { SelectProps } from './Form/Select';
93
- export type { SpinnerProps } from './Spinner/Spinner';
94
- export type { StepsProps } from './Steps/Steps';
95
- export type { TabProps } from './Tab/Tab';
96
- export type { TestimonialProps } from './Testimonial/Testimonial';
97
- export type { TextareaProps } from './Form/Textarea';
98
- export type { TodoProps } from './Todo/Todo';
99
- export type { ToggleProps } from './Toggle/Toggle';
100
- export type { TooltipProps } from './Tooltip/Tooltip';
101
- export type { UploadProps } from './Upload/Upload';
102
-
103
- // Export components
104
- export {
105
- Accordion,
106
- Avatar,
107
- AvatarGroup,
108
- Badge,
109
- Breadcrumb,
110
- Button,
111
- Callout,
112
- Card,
113
- Checkbox,
114
- ColorModeToggle,
115
- Container,
116
- Countdown,
117
- DataTable,
118
- DatePicker,
119
- Dropdown,
120
- EdgePanel,
121
- Form,
122
- Grid,
123
- GridCol,
124
- Hero,
125
- Icon,
126
- Input,
127
- List,
128
- MasonryGrid,
129
- MasonryGridItem,
130
- Messages,
131
- Modal,
132
- Navbar,
133
- Pagination,
134
- PhotoViewer,
135
- Popover,
136
- ProductReview,
137
- Progress,
138
- Radio,
139
- Rating,
140
- River,
141
- Row,
142
- SectionIntro,
143
- Select,
144
- Spinner,
145
- Steps,
146
- Tab,
147
- Testimonial,
148
- Textarea,
149
- Todo,
150
- Toggle,
151
- Tooltip,
152
- Upload
153
- };
@@ -1,318 +0,0 @@
1
- // Entry point for HTML components
2
- import { initializeButton } from './components/Button/scripts';
3
- import { initializeAccordionsWithCustomBehavior } from './components/Accordion/scripts';
4
- import { initializeTooltipsWithCustomBehavior } from './components/Tooltip/scripts/tooltipInteractions';
5
- import { initializeToggles } from './components/Toggle/scripts';
6
- import { initializeTabs } from './components/Tab/scripts';
7
- import { initializeSteps } from './components/Steps/scripts';
8
- import { initializeTestimonials } from './components/Testimonial/scripts';
9
- import { initializeRivers } from './components/River/scripts';
10
- import { initializeUploads } from './components/Upload/scripts';
11
- import { initializeEdgePanelsWithCustomBehavior } from './components/EdgePanel/scripts/edgePanelInteractions';
12
- import { initializeModals } from './components/Modal/scripts/index';
13
- import { setupModalEventDelegation } from './components/Modal/scripts/modalInteractions';
14
- import { initializeHeroesWithCustomBehavior } from './components/Hero/scripts/heroInteractions';
15
- import { Avatar } from './components/Avatar/scripts';
16
- import Breadcrumb from './components/Breadcrumb/scripts';
17
- import Card from './components/Card/scripts';
18
- import Countdown from './components/Countdown/scripts';
19
- import { Todo } from './components/Todo/scripts';
20
- import Pagination from './components/Pagination/scripts';
21
- import { DataTable } from './components/DataTable/scripts';
22
- import { initFromDataAttributes as initializeDatePickers } from './components/DatePicker/scripts/componentInteractions';
23
-
24
- /**
25
- * Initialize all Button components in the document
26
- */
27
- function initializeButtons(): void {
28
- // Select all button elements with the c-btn class
29
- const buttons = document.querySelectorAll<HTMLButtonElement>('.c-btn');
30
-
31
- // Initialize each button with default functionality
32
- buttons.forEach(button => {
33
- initializeButton(button);
34
- });
35
- }
36
-
37
- /**
38
- * Initialize all Accordion components in the document
39
- */
40
- function initializeAccordions(): void {
41
- // Initialize accordions with custom animations and behavior
42
- initializeAccordionsWithCustomBehavior();
43
- }
44
-
45
- /**
46
- * Initialize all Tooltip components in the document
47
- */
48
- function initializeTooltips(): void {
49
- // Initialize tooltips with custom behavior
50
- initializeTooltipsWithCustomBehavior();
51
- }
52
-
53
- /**
54
- * Initialize all Toggle components in the document
55
- */
56
- function initializeToggleComponents(): void {
57
- // Initialize toggles with default settings
58
- initializeToggles();
59
- }
60
-
61
- /**
62
- * Initialize all Tab components in the document
63
- */
64
- function initializeTabComponents(): void {
65
- // Initialize tabs with default settings
66
- initializeTabs();
67
- }
68
-
69
- /**
70
- * Initialize all Steps components in the document
71
- */
72
- function initializeStepComponents(): void {
73
- // Initialize steps with default settings
74
- initializeSteps();
75
- }
76
-
77
- /**
78
- * Initialize all Testimonial components in the document
79
- */
80
- function initializeTestimonialComponents(): void {
81
- // Initialize testimonials with default settings
82
- initializeTestimonials();
83
- }
84
-
85
- /**
86
- * Initialize all River components in the document
87
- */
88
- function initializeRiverComponents(): void {
89
- // Initialize rivers with default settings
90
- initializeRivers();
91
- }
92
-
93
- /**
94
- * Initialize all Upload components in the document
95
- */
96
- function initializeUploadComponents(): void {
97
- // Initialize uploads with default settings
98
- initializeUploads();
99
- }
100
-
101
- /**
102
- * Initialize all EdgePanel components in the document
103
- */
104
- function initializeEdgePanels(): void {
105
- // Initialize edge panels with custom animations and behavior
106
- initializeEdgePanelsWithCustomBehavior();
107
- }
108
-
109
- /**
110
- * Initialize all Modal components in the document
111
- */
112
- function initializeModalComponents(): void {
113
- // Initialize modals with default behavior
114
- initializeModals();
115
- setupModalEventDelegation();
116
- }
117
-
118
- /**
119
- * Initialize all Hero components in the document
120
- */
121
- function initializeHeroComponents(): void {
122
- // Initialize heroes with custom behavior
123
- initializeHeroesWithCustomBehavior();
124
- }
125
-
126
- /**
127
- * Initialize all Avatar components in the document
128
- */
129
- function initializeAvatarComponents(): void {
130
- // Initialize avatars with default settings
131
- Avatar.initializeAll();
132
- }
133
-
134
- /**
135
- * Initialize all Breadcrumb components in the document
136
- */
137
- function initializeBreadcrumbComponents(): void {
138
- // Initialize breadcrumbs with default settings
139
- Breadcrumb.initializeAll();
140
- }
141
-
142
- /**
143
- * Initialize all Card components in the document
144
- */
145
- function initializeCardComponents(): void {
146
- // Initialize cards with default settings
147
- Card.initializeAll();
148
- }
149
-
150
- /**
151
- * Initialize all Countdown components in the document
152
- */
153
- function initializeCountdownComponents(): void {
154
- // Initialize countdowns with default settings
155
- Countdown.initializeAll();
156
- }
157
-
158
- /**
159
- * Initialize all Todo components in the document
160
- */
161
- function initializeTodoComponents(): void {
162
- // Initialize todos with default settings
163
- Todo.initializeAll();
164
- }
165
-
166
- /**
167
- * Initialize all Pagination components in the document
168
- */
169
- function initializePaginationComponents(): void {
170
- // Initialize pagination with default settings
171
- Pagination.initializeAll();
172
- }
173
-
174
- /**
175
- * Initialize all DataTable components in the document
176
- */
177
- function initializeDataTableComponents(): void {
178
- // Initialize data tables with default settings
179
- DataTable.initializeAll();
180
- }
181
-
182
- /**
183
- * Initialize all DatePicker components in the document
184
- */
185
- function initializeDatePickerComponents(): void {
186
- // Initialize date pickers with default settings
187
- initializeDatePickers();
188
- }
189
-
190
- /**
191
- * Initialize all components
192
- */
193
- function initializeComponents(): void {
194
- initializeButtons();
195
- initializeAccordions();
196
- initializeTooltips();
197
- initializeToggleComponents();
198
- initializeTabComponents();
199
- initializeStepComponents();
200
- initializeTestimonialComponents();
201
- initializeRiverComponents();
202
- initializeUploadComponents();
203
- initializeEdgePanels();
204
- initializeModalComponents();
205
- initializeHeroComponents();
206
- initializeAvatarComponents();
207
- initializeBreadcrumbComponents();
208
- initializeCardComponents();
209
- initializeCountdownComponents();
210
- initializeTodoComponents();
211
- initializePaginationComponents();
212
- initializeDataTableComponents();
213
- initializeDatePickerComponents();
214
- }
215
-
216
- /**
217
- * DOM ready function
218
- * @param callback - Function to call when DOM is ready
219
- */
220
- function onDomReady(callback: () => void): void {
221
- if (document.readyState === 'loading') {
222
- document.addEventListener('DOMContentLoaded', callback);
223
- } else {
224
- callback();
225
- }
226
- }
227
-
228
- // Initialize all components when the DOM is ready
229
- onDomReady(initializeComponents);
230
-
231
- // Export the Atomix namespace for vanilla JS usage
232
- const Atomix = {
233
- // Component initializers
234
- Button: {
235
- init: initializeButton,
236
- initializeAll: initializeButtons,
237
- },
238
- Accordion: {
239
- init: initializeAccordionsWithCustomBehavior,
240
- initializeAll: initializeAccordions,
241
- },
242
- Tooltip: {
243
- init: initializeTooltipsWithCustomBehavior,
244
- initializeAll: initializeTooltips,
245
- },
246
- Toggle: {
247
- init: initializeToggles,
248
- initializeAll: initializeToggleComponents,
249
- },
250
- Tab: {
251
- init: initializeTabs,
252
- initializeAll: initializeTabComponents,
253
- },
254
- Steps: {
255
- init: initializeSteps,
256
- initializeAll: initializeStepComponents,
257
- },
258
- Testimonial: {
259
- init: initializeTestimonials,
260
- initializeAll: initializeTestimonialComponents,
261
- },
262
- River: {
263
- init: initializeRivers,
264
- initializeAll: initializeRiverComponents,
265
- },
266
- Upload: {
267
- init: initializeUploads,
268
- initializeAll: initializeUploadComponents,
269
- },
270
- EdgePanel: {
271
- init: initializeEdgePanelsWithCustomBehavior,
272
- initializeAll: initializeEdgePanels,
273
- },
274
- Modal: {
275
- init: initializeModals,
276
- initializeAll: initializeModalComponents,
277
- },
278
- Hero: {
279
- init: initializeHeroesWithCustomBehavior,
280
- initializeAll: initializeHeroComponents,
281
- },
282
- Avatar: {
283
- init: Avatar.initializeAll,
284
- initializeAll: Avatar.initializeAll,
285
- },
286
- Breadcrumb: {
287
- init: Breadcrumb.initializeAll,
288
- initializeAll: Breadcrumb.initializeAll,
289
- },
290
- Card: {
291
- init: Card.initializeAll,
292
- initializeAll: Card.initializeAll,
293
- },
294
- Countdown: {
295
- init: Countdown.initializeAll,
296
- initializeAll: Countdown.initializeAll,
297
- },
298
- Todo: {
299
- init: Todo.initializeAll,
300
- initializeAll: Todo.initializeAll,
301
- },
302
- Pagination: {
303
- init: Pagination.initializeAll,
304
- initializeAll: Pagination.initializeAll,
305
- },
306
- DataTable: {
307
- init: DataTable.initializeAll,
308
- initializeAll: DataTable.initializeAll,
309
- },
310
- DatePicker: {
311
- init: initializeDatePickers,
312
- initializeAll: initializeDatePickerComponents,
313
- },
314
- // Global initialization
315
- initializeAll: initializeComponents,
316
- };
317
-
318
- export default Atomix;