@shohojdhara/atomix 0.1.21 → 0.1.24
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/CHANGELOG.md +4 -0
- package/NPM_PUBLISHING.md +221 -0
- package/README.md +50 -124
- package/css.d.ts +0 -0
- package/dist/css/atomix.css +1 -1
- package/dist/js/628.js +1 -0
- package/dist/js/atomix.react.cjs.js +1 -0
- package/dist/js/atomix.react.esm.js +1 -1
- package/dist/js/atomix.react.umd.js +1 -1
- package/dist/js/chunks/cjs/202.6e2b9e63a406ff01b151.js +1 -0
- package/dist/js/chunks/cjs/308.86b2e7ea63bf439e01b4.js +1 -0
- package/dist/js/chunks/cjs/54.54733c458fc7ced6d9ba.js +1 -0
- package/dist/js/chunks/cjs/619.8e6863cb2985a3a109af.js +1 -0
- package/dist/js/chunks/cjs/690.17522d562f7ebe2fa7b4.js +1 -0
- package/dist/js/chunks/cjs/894.6edddf7d4bf7ccb11e25.js +1 -0
- package/dist/js/chunks/cjs/897.74f4c88710fe45c1b9e3.js +1 -0
- package/dist/types/components/Breadcrumb/index.d.ts +2 -3
- package/dist/types/components/River/index.d.ts +1 -1
- package/dist/types/components/Tab/index.d.ts +2 -2
- package/dist/types/components/Toggle/index.d.ts +2 -2
- package/dist/types/components/Tooltip/index.d.ts +2 -3
- package/index.d.ts +3 -0
- package/package.json +38 -86
- package/src/components/Accordion/index.ts +0 -0
- package/src/components/AtomixLogo/index.ts +0 -0
- package/src/components/Button/index.ts +0 -0
- package/src/components/Navigation/Menu/Menu.stories.tsx +0 -0
- package/src/components/Navigation/Nav/Nav.stories.tsx +0 -0
- package/src/components/Navigation/README.md +0 -0
- package/src/components/Navigation/SideMenu/SideMenu.README.md +0 -0
- package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +0 -0
- package/src/components/Navigation/SideMenu/SideMenu.tsx +0 -0
- package/src/components/Navigation/SideMenu/SideMenuItem.tsx +0 -0
- package/src/components/Navigation/SideMenu/SideMenuList.tsx +0 -0
- package/src/components/Navigation/scripts/NavbarInteractions.ts +0 -0
- package/src/components/Navigation/scripts/SideMenu.ts +0 -0
- package/src/components/Navigation/scripts/SideMenuBundle.ts +0 -0
- package/src/components/Navigation/scripts/SideMenuInteractions.ts +0 -0
- package/src/components/Navigation/scripts/bundle.ts +0 -0
- package/src/components/Navigation/scripts/index.ts +0 -0
- package/src/components/PhotoViewer/README.md +0 -0
- package/src/components/index.ts +0 -0
- package/src/docs/atomix-component-guidelines.mdx +0 -0
- package/src/index.ts +10 -5
- package/src/layouts/index.ts +5 -0
- package/src/lib/README.md +0 -0
- package/src/lib/composables/useSideMenu.ts +0 -0
- package/src/lib/index.ts +6 -6
- package/src/styles/01-settings/_settings.animations.scss +7 -2
- package/src/styles/01-settings/_settings.box-shadow.scss +9 -5
- package/src/styles/01-settings/_settings.button.scss +5 -0
- package/src/styles/01-settings/_settings.card.scss +2 -1
- package/src/styles/01-settings/_settings.form.scss +3 -0
- package/src/styles/01-settings/_settings.navbar.scss +1 -0
- package/src/styles/01-settings/_settings.typography.scss +2 -2
- package/src/styles/01-settings/_settings.z-layers.scss +19 -1
- package/src/styles/css-modules.d.ts +308 -0
- package/CONTRIBUTING.md +0 -151
- package/NEXTJS_INTEGRATION.md +0 -389
- package/babel.config.js +0 -58
- package/dist/types/layouts/Grid/Container.d.ts +0 -38
- package/dist/types/layouts/Grid/Grid.d.ts +0 -37
- package/dist/types/layouts/Grid/GridCol.d.ts +0 -64
- package/dist/types/layouts/Grid/Row.d.ts +0 -38
- package/dist/types/layouts/Grid/index.d.ts +0 -8
- package/dist/types/layouts/MasonryGrid/MasonryGrid.d.ts +0 -71
- package/dist/types/layouts/MasonryGrid/MasonryGridItem.d.ts +0 -24
- package/dist/types/layouts/MasonryGrid/index.d.ts +0 -4
- package/dist/types/layouts/index.d.ts +0 -2
- package/dist/types/lib/composables/index.d.ts +0 -30
- package/dist/types/lib/composables/useAccordion.d.ts +0 -30
- package/dist/types/lib/composables/useBadge.d.ts +0 -10
- package/dist/types/lib/composables/useBreadcrumb.d.ts +0 -13
- package/dist/types/lib/composables/useButton.d.ts +0 -11
- package/dist/types/lib/composables/useCallout.d.ts +0 -11
- package/dist/types/lib/composables/useCard.d.ts +0 -8
- package/dist/types/lib/composables/useCheckbox.d.ts +0 -11
- package/dist/types/lib/composables/useDataTable.d.ts +0 -66
- package/dist/types/lib/composables/useDatePicker.d.ts +0 -91
- package/dist/types/lib/composables/useDropdown.d.ts +0 -26
- package/dist/types/lib/composables/useEdgePanel.d.ts +0 -15
- package/dist/types/lib/composables/useForm.d.ts +0 -12
- package/dist/types/lib/composables/useFormGroup.d.ts +0 -10
- package/dist/types/lib/composables/useHero.d.ts +0 -53
- package/dist/types/lib/composables/useInput.d.ts +0 -12
- package/dist/types/lib/composables/useMessages.d.ts +0 -38
- package/dist/types/lib/composables/useModal.d.ts +0 -40
- package/dist/types/lib/composables/useNavbar.d.ts +0 -59
- package/dist/types/lib/composables/usePagination.d.ts +0 -13
- package/dist/types/lib/composables/usePhotoViewer.d.ts +0 -57
- package/dist/types/lib/composables/usePopover.d.ts +0 -30
- package/dist/types/lib/composables/useProgress.d.ts +0 -38
- package/dist/types/lib/composables/useRadio.d.ts +0 -10
- package/dist/types/lib/composables/useRating.d.ts +0 -52
- package/dist/types/lib/composables/useRiver.d.ts +0 -107
- package/dist/types/lib/composables/useSelect.d.ts +0 -10
- package/dist/types/lib/composables/useSideMenu.d.ts +0 -28
- package/dist/types/lib/composables/useSpinner.d.ts +0 -10
- package/dist/types/lib/composables/useTextarea.d.ts +0 -10
- package/dist/types/lib/composables/useTodo.d.ts +0 -18
- package/dist/types/lib/constants/components.d.ts +0 -993
- package/dist/types/lib/constants/index.d.ts +0 -1
- package/dist/types/lib/index.d.ts +0 -6
- package/dist/types/lib/types/components.d.ts +0 -2050
- package/dist/types/lib/types/index.d.ts +0 -1
- package/dist/types/lib/utils/dom.d.ts +0 -26
- package/dist/types/lib/utils/icons.d.ts +0 -20
- package/dist/types/lib/utils/index.d.ts +0 -3
- package/dist/types/lib/utils/useForkRef.d.ts +0 -10
- package/examples/nextjs-example.tsx +0 -271
- package/implementation-guide.md +0 -505
- package/next.config.js +0 -90
- package/postcss.config.js +0 -28
- package/tsconfig.json +0 -74
- package/webpack.config.js +0 -473
package/NEXTJS_INTEGRATION.md
DELETED
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
# Next.js Integration Guide
|
|
2
|
-
|
|
3
|
-
This guide explains how to integrate Atomix Design System with Next.js applications, including support for Server-Side Rendering (SSR) and App Router.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @shohojdhara/atomix
|
|
9
|
-
# or
|
|
10
|
-
yarn add @shohojdhara/atomix
|
|
11
|
-
# or
|
|
12
|
-
pnpm add @shohojdhara/atomix
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Basic Setup
|
|
16
|
-
|
|
17
|
-
### 1. Import Styles
|
|
18
|
-
|
|
19
|
-
Add the Atomix CSS to your Next.js application:
|
|
20
|
-
|
|
21
|
-
#### App Router (app directory)
|
|
22
|
-
```tsx
|
|
23
|
-
// app/layout.tsx
|
|
24
|
-
import '@shohojdhara/atomix/css'
|
|
25
|
-
|
|
26
|
-
export default function RootLayout({
|
|
27
|
-
children,
|
|
28
|
-
}: {
|
|
29
|
-
children: React.ReactNode
|
|
30
|
-
}) {
|
|
31
|
-
return (
|
|
32
|
-
<html lang="en">
|
|
33
|
-
<body>{children}</body>
|
|
34
|
-
</html>
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
#### Pages Router (pages directory)
|
|
40
|
-
```tsx
|
|
41
|
-
// pages/_app.tsx
|
|
42
|
-
import '@shohojdhara/atomix/css'
|
|
43
|
-
import type { AppProps } from 'next/app'
|
|
44
|
-
|
|
45
|
-
export default function App({ Component, pageProps }: AppProps) {
|
|
46
|
-
return <Component {...pageProps} />
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### 2. Use Components
|
|
51
|
-
|
|
52
|
-
```tsx
|
|
53
|
-
// app/page.tsx or pages/index.tsx
|
|
54
|
-
import { Button, Hero, Card } from '@shohojdhara/atomix'
|
|
55
|
-
|
|
56
|
-
export default function HomePage() {
|
|
57
|
-
return (
|
|
58
|
-
<div>
|
|
59
|
-
<Hero
|
|
60
|
-
title="Welcome to Next.js with Atomix"
|
|
61
|
-
subtitle="Modern UI Components"
|
|
62
|
-
text="Build beautiful applications with Atomix Design System"
|
|
63
|
-
alignment="center"
|
|
64
|
-
/>
|
|
65
|
-
|
|
66
|
-
<div className="o-container u-py-5">
|
|
67
|
-
<Card>
|
|
68
|
-
<div className="c-card__body">
|
|
69
|
-
<h3 className="c-card__title">Getting Started</h3>
|
|
70
|
-
<p className="c-card__text">
|
|
71
|
-
Start building with Atomix components in your Next.js application.
|
|
72
|
-
</p>
|
|
73
|
-
<Button variant="primary" label="Learn More" />
|
|
74
|
-
</div>
|
|
75
|
-
</Card>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## Advanced Configuration
|
|
83
|
-
|
|
84
|
-
### Next.js Configuration
|
|
85
|
-
|
|
86
|
-
Create or update your `next.config.js` file:
|
|
87
|
-
|
|
88
|
-
```javascript
|
|
89
|
-
/** @type {import('next').NextConfig} */
|
|
90
|
-
const nextConfig = {
|
|
91
|
-
// Transpile Atomix package for better compatibility
|
|
92
|
-
transpilePackages: ['@shohojdhara/atomix'],
|
|
93
|
-
|
|
94
|
-
// Configure webpack for custom assets
|
|
95
|
-
webpack: (config, { isServer }) => {
|
|
96
|
-
// Handle SCSS files from Atomix
|
|
97
|
-
config.module.rules.push({
|
|
98
|
-
test: /\.scss$/,
|
|
99
|
-
use: [
|
|
100
|
-
'style-loader',
|
|
101
|
-
'css-loader',
|
|
102
|
-
{
|
|
103
|
-
loader: 'sass-loader',
|
|
104
|
-
options: {
|
|
105
|
-
implementation: require('sass-embedded'),
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
],
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
// Handle TypeScript declaration files
|
|
112
|
-
config.module.rules.push({
|
|
113
|
-
test: /\.d\.ts$/,
|
|
114
|
-
use: ['ignore-loader'],
|
|
115
|
-
exclude: /node_modules/,
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
// Ignore TypeScript declaration file warnings
|
|
119
|
-
config.ignoreWarnings = [
|
|
120
|
-
...(config.ignoreWarnings || []),
|
|
121
|
-
{ module: /\.d\.ts$/ }
|
|
122
|
-
];
|
|
123
|
-
|
|
124
|
-
// Add fallbacks for Node.js core modules (required for Webpack 5)
|
|
125
|
-
if (!isServer) {
|
|
126
|
-
config.resolve.fallback = {
|
|
127
|
-
...config.resolve.fallback,
|
|
128
|
-
crypto: false, // Provide empty mock for crypto
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return config;
|
|
133
|
-
},
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
module.exports = nextConfig;
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
For the TypeScript declaration files fix, you'll need to install:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
npm install --save-dev ignore-loader
|
|
143
|
-
# or
|
|
144
|
-
yarn add --dev ignore-loader
|
|
145
|
-
# or
|
|
146
|
-
pnpm add --save-dev ignore-loader
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### TypeScript Configuration
|
|
150
|
-
|
|
151
|
-
Ensure your `tsconfig.json` includes proper module resolution:
|
|
152
|
-
|
|
153
|
-
```json
|
|
154
|
-
{
|
|
155
|
-
"compilerOptions": {
|
|
156
|
-
"moduleResolution": "node",
|
|
157
|
-
"esModuleInterop": true,
|
|
158
|
-
"allowSyntheticDefaultImports": true,
|
|
159
|
-
"jsx": "preserve"
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
## Server-Side Rendering (SSR) Support
|
|
165
|
-
|
|
166
|
-
Atomix components are fully compatible with Next.js SSR. All components render correctly on the server and hydrate properly on the client.
|
|
167
|
-
|
|
168
|
-
### Dynamic Imports (if needed)
|
|
169
|
-
|
|
170
|
-
For components with client-side only features, use dynamic imports:
|
|
171
|
-
|
|
172
|
-
```tsx
|
|
173
|
-
import dynamic from 'next/dynamic'
|
|
174
|
-
|
|
175
|
-
const DynamicComponent = dynamic(
|
|
176
|
-
() => import('@shohojdhara/atomix').then(mod => mod.ComponentName),
|
|
177
|
-
{ ssr: false }
|
|
178
|
-
)
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Styling Options
|
|
182
|
-
|
|
183
|
-
### 1. Using Pre-built CSS
|
|
184
|
-
|
|
185
|
-
```tsx
|
|
186
|
-
import '@shohojdhara/atomix/css'
|
|
187
|
-
// or minified version
|
|
188
|
-
import '@shohojdhara/atomix/css/min'
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### 2. Using SCSS (for customization)
|
|
192
|
-
|
|
193
|
-
```scss
|
|
194
|
-
// styles/globals.scss
|
|
195
|
-
@import '@shohojdhara/atomix/scss';
|
|
196
|
-
|
|
197
|
-
// Your custom overrides
|
|
198
|
-
:root {
|
|
199
|
-
--atomix-primary-color: #your-brand-color;
|
|
200
|
-
}
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
### 3. CSS Modules Support
|
|
204
|
-
|
|
205
|
-
Atomix works seamlessly with Next.js CSS Modules:
|
|
206
|
-
|
|
207
|
-
```tsx
|
|
208
|
-
// components/MyComponent.module.scss
|
|
209
|
-
.container {
|
|
210
|
-
@apply u-p-4 u-bg-primary-subtle;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.title {
|
|
214
|
-
@apply c-hero__title;
|
|
215
|
-
}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
## Theme Configuration
|
|
219
|
-
|
|
220
|
-
### Dark Mode Support
|
|
221
|
-
|
|
222
|
-
```tsx
|
|
223
|
-
// app/layout.tsx
|
|
224
|
-
'use client'
|
|
225
|
-
import { useEffect, useState } from 'react'
|
|
226
|
-
|
|
227
|
-
export default function RootLayout({
|
|
228
|
-
children,
|
|
229
|
-
}: {
|
|
230
|
-
children: React.ReactNode
|
|
231
|
-
}) {
|
|
232
|
-
const [theme, setTheme] = useState('light')
|
|
233
|
-
|
|
234
|
-
useEffect(() => {
|
|
235
|
-
document.documentElement.setAttribute('data-atomix-theme', theme)
|
|
236
|
-
}, [theme])
|
|
237
|
-
|
|
238
|
-
return (
|
|
239
|
-
<html lang="en" data-atomix-theme={theme}>
|
|
240
|
-
<body>{children}</body>
|
|
241
|
-
</html>
|
|
242
|
-
)
|
|
243
|
-
}
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
### Custom Theme Variables
|
|
247
|
-
|
|
248
|
-
```css
|
|
249
|
-
/* styles/globals.css */
|
|
250
|
-
:root {
|
|
251
|
-
/* Primary Colors */
|
|
252
|
-
--atomix-primary-50: #eff6ff;
|
|
253
|
-
--atomix-primary-500: #3b82f6;
|
|
254
|
-
--atomix-primary-900: #1e3a8a;
|
|
255
|
-
|
|
256
|
-
/* Custom spacing */
|
|
257
|
-
--atomix-spacing-xs: 0.25rem;
|
|
258
|
-
--atomix-spacing-sm: 0.5rem;
|
|
259
|
-
--atomix-spacing-md: 1rem;
|
|
260
|
-
}
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
## Performance Optimization
|
|
264
|
-
|
|
265
|
-
### Tree Shaking
|
|
266
|
-
|
|
267
|
-
Atomix supports tree shaking out of the box. Import only the components you need:
|
|
268
|
-
|
|
269
|
-
```tsx
|
|
270
|
-
// ✅ Good - tree shaking works
|
|
271
|
-
import { Button, Card } from '@shohojdhara/atomix'
|
|
272
|
-
|
|
273
|
-
// ❌ Avoid - imports entire library
|
|
274
|
-
import * as Atomix from '@shohojdhara/atomix'
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
### Bundle Analysis
|
|
278
|
-
|
|
279
|
-
Use Next.js bundle analyzer to check your bundle size:
|
|
280
|
-
|
|
281
|
-
```bash
|
|
282
|
-
npm install --save-dev @next/bundle-analyzer
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
```javascript
|
|
286
|
-
// next.config.js
|
|
287
|
-
const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
|
288
|
-
enabled: process.env.ANALYZE === 'true',
|
|
289
|
-
})
|
|
290
|
-
|
|
291
|
-
module.exports = withBundleAnalyzer(nextConfig)
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
## Common Issues and Solutions
|
|
295
|
-
|
|
296
|
-
### 1. CSS Not Loading
|
|
297
|
-
|
|
298
|
-
Make sure to import the CSS file in your root layout or _app file:
|
|
299
|
-
|
|
300
|
-
```tsx
|
|
301
|
-
import '@shohojdhara/atomix/css'
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### 2. TypeScript Errors
|
|
305
|
-
|
|
306
|
-
Ensure you have the latest TypeScript definitions:
|
|
307
|
-
|
|
308
|
-
```bash
|
|
309
|
-
npm install --save-dev @types/react @types/react-dom
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
### 3. Hydration Mismatches
|
|
313
|
-
|
|
314
|
-
For components with dynamic content, use the `suppressHydrationWarning` prop:
|
|
315
|
-
|
|
316
|
-
```tsx
|
|
317
|
-
<div suppressHydrationWarning>
|
|
318
|
-
{/* Dynamic content */}
|
|
319
|
-
</div>
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
### 4. Font Loading Issues
|
|
323
|
-
|
|
324
|
-
If using custom fonts, add them to your Next.js font optimization:
|
|
325
|
-
|
|
326
|
-
```tsx
|
|
327
|
-
// app/layout.tsx
|
|
328
|
-
import { Inter } from 'next/font/google'
|
|
329
|
-
|
|
330
|
-
const inter = Inter({ subsets: ['latin'] })
|
|
331
|
-
|
|
332
|
-
export default function RootLayout({
|
|
333
|
-
children,
|
|
334
|
-
}: {
|
|
335
|
-
children: React.ReactNode
|
|
336
|
-
}) {
|
|
337
|
-
return (
|
|
338
|
-
<html lang="en">
|
|
339
|
-
<body className={inter.className}>{children}</body>
|
|
340
|
-
</html>
|
|
341
|
-
)
|
|
342
|
-
}
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
## Example Projects
|
|
346
|
-
|
|
347
|
-
### Minimal Setup
|
|
348
|
-
|
|
349
|
-
```tsx
|
|
350
|
-
// app/page.tsx
|
|
351
|
-
import { Button, Hero } from '@shohojdhara/atomix'
|
|
352
|
-
|
|
353
|
-
export default function Home() {
|
|
354
|
-
return (
|
|
355
|
-
<Hero
|
|
356
|
-
title="Hello Next.js + Atomix"
|
|
357
|
-
actions={<Button variant="primary" label="Get Started" />}
|
|
358
|
-
/>
|
|
359
|
-
)
|
|
360
|
-
}
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
### Full Application Structure
|
|
364
|
-
|
|
365
|
-
```
|
|
366
|
-
my-nextjs-app/
|
|
367
|
-
├── app/
|
|
368
|
-
│ ├── layout.tsx # Import Atomix CSS here
|
|
369
|
-
│ ├── page.tsx # Use Atomix components
|
|
370
|
-
│ └── globals.css # Custom theme variables
|
|
371
|
-
├── components/
|
|
372
|
-
│ └── ui/ # Your custom components using Atomix
|
|
373
|
-
├── next.config.js # Next.js configuration
|
|
374
|
-
└── package.json
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
## Migration from Other UI Libraries
|
|
378
|
-
|
|
379
|
-
If you're migrating from other UI libraries, Atomix provides similar components with consistent APIs. Check our [Component Migration Guide](./MIGRATION.md) for specific mappings.
|
|
380
|
-
|
|
381
|
-
## Support
|
|
382
|
-
|
|
383
|
-
- [Documentation](https://liimonx.github.io/atomix)
|
|
384
|
-
- [Storybook](https://liimonx.github.io/atomix/storybook)
|
|
385
|
-
- [GitHub Issues](https://github.com/liimonx/atomix/issues)
|
|
386
|
-
|
|
387
|
-
## Contributing
|
|
388
|
-
|
|
389
|
-
See our [Contributing Guide](./CONTRIBUTING.md) for information on how to contribute to Atomix.
|
package/babel.config.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
presets: [
|
|
3
|
-
['@babel/preset-env', {
|
|
4
|
-
targets: {
|
|
5
|
-
browsers: [
|
|
6
|
-
'last 2 versions',
|
|
7
|
-
'not dead',
|
|
8
|
-
'not IE 11',
|
|
9
|
-
'> 1%'
|
|
10
|
-
],
|
|
11
|
-
node: '16'
|
|
12
|
-
},
|
|
13
|
-
useBuiltIns: 'usage',
|
|
14
|
-
corejs: 3,
|
|
15
|
-
bugfixes: true,
|
|
16
|
-
loose: false,
|
|
17
|
-
modules: false,
|
|
18
|
-
debug: process.env.NODE_ENV === 'development'
|
|
19
|
-
}],
|
|
20
|
-
['@babel/preset-react', {
|
|
21
|
-
runtime: 'automatic',
|
|
22
|
-
development: process.env.NODE_ENV === 'development',
|
|
23
|
-
importSource: 'react'
|
|
24
|
-
}],
|
|
25
|
-
['@babel/preset-typescript', {
|
|
26
|
-
isTSX: true,
|
|
27
|
-
allExtensions: true,
|
|
28
|
-
allowDeclareFields: true,
|
|
29
|
-
allowNamespaces: true,
|
|
30
|
-
optimizeConstEnums: true
|
|
31
|
-
}]
|
|
32
|
-
],
|
|
33
|
-
plugins: [
|
|
34
|
-
['@babel/plugin-transform-runtime', {
|
|
35
|
-
corejs: 3,
|
|
36
|
-
helpers: true,
|
|
37
|
-
regenerator: true
|
|
38
|
-
}]
|
|
39
|
-
],
|
|
40
|
-
env: {
|
|
41
|
-
production: {
|
|
42
|
-
compact: true,
|
|
43
|
-
comments: false,
|
|
44
|
-
minified: true
|
|
45
|
-
},
|
|
46
|
-
test: {
|
|
47
|
-
presets: [
|
|
48
|
-
['@babel/preset-env', { targets: { node: 'current' } }]
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
ignore: [
|
|
53
|
-
'**/*.d.ts',
|
|
54
|
-
'**/*.test.ts',
|
|
55
|
-
'**/*.test.tsx',
|
|
56
|
-
'node_modules'
|
|
57
|
-
]
|
|
58
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export interface ContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/**
|
|
4
|
-
* The content to be rendered within the container
|
|
5
|
-
*/
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Additional CSS class names
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Container type:
|
|
13
|
-
* - undefined: responsive container with max-width at each breakpoint
|
|
14
|
-
* - 'fluid': full width container
|
|
15
|
-
* - 'sm', 'md', 'lg', 'xl', 'xxl': responsive container with max-width at specified breakpoint
|
|
16
|
-
*/
|
|
17
|
-
type?: 'fluid' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Container component for creating responsive layouts.
|
|
21
|
-
* Uses the CSS container classes defined in _objects.container.scss.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```tsx
|
|
25
|
-
* <Container>
|
|
26
|
-
* Content with responsive max-width
|
|
27
|
-
* </Container>
|
|
28
|
-
*
|
|
29
|
-
* <Container type="fluid">
|
|
30
|
-
* Full width content
|
|
31
|
-
* </Container>
|
|
32
|
-
*
|
|
33
|
-
* <Container type="md">
|
|
34
|
-
* Content with max-width at md breakpoint
|
|
35
|
-
* </Container>
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
export declare const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/**
|
|
4
|
-
* The content to be rendered within the grid
|
|
5
|
-
*/
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Additional CSS class names
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Control the horizontal alignment of items
|
|
13
|
-
*/
|
|
14
|
-
justifyContent?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
|
|
15
|
-
/**
|
|
16
|
-
* Control the vertical alignment of items
|
|
17
|
-
*/
|
|
18
|
-
alignItems?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
19
|
-
/**
|
|
20
|
-
* No gutters between columns
|
|
21
|
-
*/
|
|
22
|
-
noGutters?: boolean;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Grid component for creating responsive layouts.
|
|
26
|
-
* Uses the CSS grid system defined in _objects.grid.scss.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```tsx
|
|
30
|
-
* <Grid>
|
|
31
|
-
* <GridCol sm={6} md={4} lg={3}>Column content</GridCol>
|
|
32
|
-
* <GridCol sm={6} md={4} lg={3}>Column content</GridCol>
|
|
33
|
-
* <GridCol sm={6} md={4} lg={3}>Column content</GridCol>
|
|
34
|
-
* </Grid>
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export interface GridColProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/**
|
|
4
|
-
* The content to be rendered within the column
|
|
5
|
-
*/
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Additional CSS class names
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Number of columns to span at extra small breakpoint (default)
|
|
13
|
-
*/
|
|
14
|
-
xs?: number | 'auto';
|
|
15
|
-
/**
|
|
16
|
-
* Number of columns to span at small breakpoint
|
|
17
|
-
*/
|
|
18
|
-
sm?: number | 'auto';
|
|
19
|
-
/**
|
|
20
|
-
* Number of columns to span at medium breakpoint
|
|
21
|
-
*/
|
|
22
|
-
md?: number | 'auto';
|
|
23
|
-
/**
|
|
24
|
-
* Number of columns to span at large breakpoint
|
|
25
|
-
*/
|
|
26
|
-
lg?: number | 'auto';
|
|
27
|
-
/**
|
|
28
|
-
* Number of columns to span at extra large breakpoint
|
|
29
|
-
*/
|
|
30
|
-
xl?: number | 'auto';
|
|
31
|
-
/**
|
|
32
|
-
* Number of columns to span at extra extra large breakpoint
|
|
33
|
-
*/
|
|
34
|
-
xxl?: number | 'auto';
|
|
35
|
-
/**
|
|
36
|
-
* Offset at extra small breakpoint
|
|
37
|
-
*/
|
|
38
|
-
offsetXs?: number;
|
|
39
|
-
/**
|
|
40
|
-
* Offset at small breakpoint
|
|
41
|
-
*/
|
|
42
|
-
offsetSm?: number;
|
|
43
|
-
/**
|
|
44
|
-
* Offset at medium breakpoint
|
|
45
|
-
*/
|
|
46
|
-
offsetMd?: number;
|
|
47
|
-
/**
|
|
48
|
-
* Offset at large breakpoint
|
|
49
|
-
*/
|
|
50
|
-
offsetLg?: number;
|
|
51
|
-
/**
|
|
52
|
-
* Offset at extra large breakpoint
|
|
53
|
-
*/
|
|
54
|
-
offsetXl?: number;
|
|
55
|
-
/**
|
|
56
|
-
* Offset at extra extra large breakpoint
|
|
57
|
-
*/
|
|
58
|
-
offsetXxl?: number;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* GridCol component for creating columns within a Grid.
|
|
62
|
-
* Uses the CSS grid column classes defined in _objects.grid.scss.
|
|
63
|
-
*/
|
|
64
|
-
export declare const GridCol: React.ForwardRefExoticComponent<GridColProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export interface RowProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/**
|
|
4
|
-
* The content to be rendered within the row
|
|
5
|
-
*/
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Additional CSS class names
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Control the horizontal alignment of items
|
|
13
|
-
*/
|
|
14
|
-
justifyContent?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly';
|
|
15
|
-
/**
|
|
16
|
-
* Control the vertical alignment of items
|
|
17
|
-
*/
|
|
18
|
-
alignItems?: 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
19
|
-
/**
|
|
20
|
-
* No gutters between columns
|
|
21
|
-
*/
|
|
22
|
-
noGutters?: boolean;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Row component for creating rows within a Grid or Container.
|
|
26
|
-
* Uses the CSS row classes defined in _objects.grid.scss.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```tsx
|
|
30
|
-
* <Container>
|
|
31
|
-
* <Row justifyContent="between" alignItems="center">
|
|
32
|
-
* <GridCol md={6}>Column content</GridCol>
|
|
33
|
-
* <GridCol md={6}>Column content</GridCol>
|
|
34
|
-
* </Row>
|
|
35
|
-
* </Container>
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
export declare const Row: React.ForwardRefExoticComponent<RowProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { Grid } from './Grid';
|
|
2
|
-
export type { GridProps } from './Grid';
|
|
3
|
-
export { GridCol } from './GridCol';
|
|
4
|
-
export type { GridColProps } from './GridCol';
|
|
5
|
-
export { Container } from './Container';
|
|
6
|
-
export type { ContainerProps } from './Container';
|
|
7
|
-
export { Row } from './Row';
|
|
8
|
-
export type { RowProps } from './Row';
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export interface MasonryGridProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
/**
|
|
4
|
-
* The content to be rendered within the masonry grid
|
|
5
|
-
*/
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Additional CSS class names
|
|
9
|
-
*/
|
|
10
|
-
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Number of columns at extra small breakpoint (default)
|
|
13
|
-
*/
|
|
14
|
-
xs?: number;
|
|
15
|
-
/**
|
|
16
|
-
* Number of columns at small breakpoint
|
|
17
|
-
*/
|
|
18
|
-
sm?: number;
|
|
19
|
-
/**
|
|
20
|
-
* Number of columns at medium breakpoint
|
|
21
|
-
*/
|
|
22
|
-
md?: number;
|
|
23
|
-
/**
|
|
24
|
-
* Number of columns at large breakpoint
|
|
25
|
-
*/
|
|
26
|
-
lg?: number;
|
|
27
|
-
/**
|
|
28
|
-
* Number of columns at extra large breakpoint
|
|
29
|
-
*/
|
|
30
|
-
xl?: number;
|
|
31
|
-
/**
|
|
32
|
-
* Number of columns at extra extra large breakpoint
|
|
33
|
-
*/
|
|
34
|
-
xxl?: number;
|
|
35
|
-
/**
|
|
36
|
-
* Gap between items (in pixels)
|
|
37
|
-
*/
|
|
38
|
-
gap?: number;
|
|
39
|
-
/**
|
|
40
|
-
* Whether to animate item transitions
|
|
41
|
-
*/
|
|
42
|
-
animate?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Whether to handle image loading to prevent layout shifts
|
|
45
|
-
* When true, items will be shown immediately and positions updated as images load
|
|
46
|
-
*/
|
|
47
|
-
imagesLoaded?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Callback fired when all images are loaded and layout is complete
|
|
50
|
-
*/
|
|
51
|
-
onLayoutComplete?: () => void;
|
|
52
|
-
/**
|
|
53
|
-
* Callback fired each time an image loads and layout is updated
|
|
54
|
-
*/
|
|
55
|
-
onImageLoad?: (loadedCount: number, totalCount: number) => void;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* MasonryGrid component for creating a responsive masonry layout.
|
|
59
|
-
* Uses JavaScript to position items optimally based on available vertical space,
|
|
60
|
-
* similar to how a mason fits stones in a wall.
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```tsx
|
|
64
|
-
* <MasonryGrid xs={1} sm={2} md={3} lg={4}>
|
|
65
|
-
* <MasonryGridItem>Item 1</MasonryGridItem>
|
|
66
|
-
* <MasonryGridItem>Item 2</MasonryGridItem>
|
|
67
|
-
* <MasonryGridItem>Item 3</MasonryGridItem>
|
|
68
|
-
* </MasonryGrid>
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
export declare const MasonryGrid: React.ForwardRefExoticComponent<MasonryGridProps & React.RefAttributes<HTMLDivElement>>;
|