@shohojdhara/atomix 0.5.0 → 0.5.2
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/atomix.config.ts +12 -0
- package/build-tools/webpack-loader.js +5 -4
- package/dist/atomix.css +230 -83
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +1 -1
- package/dist/atomix.min.css.map +1 -1
- package/dist/build-tools/webpack-loader.js +5 -4
- package/dist/charts.d.ts +24 -23
- package/dist/charts.js +271 -369
- package/dist/charts.js.map +1 -1
- package/dist/config.d.ts +624 -0
- package/dist/config.js +59 -0
- package/dist/config.js.map +1 -0
- package/dist/core.d.ts +3 -2
- package/dist/core.js +342 -382
- package/dist/core.js.map +1 -1
- package/dist/forms.d.ts +4 -6
- package/dist/forms.js +233 -334
- package/dist/forms.js.map +1 -1
- package/dist/heavy.d.ts +11 -2
- package/dist/heavy.js +406 -445
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +109 -65
- package/dist/index.esm.js +654 -748
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +621 -717
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/layout.js +59 -60
- package/dist/layout.js.map +1 -1
- package/dist/theme.js +4 -4
- package/dist/theme.js.map +1 -1
- package/package.json +24 -9
- package/scripts/atomix-cli.js +15 -1
- package/scripts/cli/__tests__/complexity-utils.test.js +24 -0
- package/scripts/cli/__tests__/detector.test.js +50 -0
- package/scripts/cli/__tests__/template-engine.test.js +23 -0
- package/scripts/cli/__tests__/test-setup.js +1 -133
- package/scripts/cli/commands/doctor.js +15 -3
- package/scripts/cli/commands/generate.js +113 -51
- package/scripts/cli/internal/ai-engine.js +30 -10
- package/scripts/cli/internal/complexity-utils.js +60 -0
- package/scripts/cli/internal/component-validator.js +49 -16
- package/scripts/cli/internal/generator.js +89 -36
- package/scripts/cli/internal/hook-generator.js +5 -2
- package/scripts/cli/internal/itcss-generator.js +16 -12
- package/scripts/cli/templates/next-templates.js +81 -30
- package/scripts/cli/templates/storybook-templates.js +12 -2
- package/scripts/cli/utils/detector.js +45 -7
- package/scripts/cli/utils/diagnostics.js +78 -0
- package/scripts/cli/utils/telemetry.js +13 -0
- package/src/components/Accordion/Accordion.stories.tsx +4 -0
- package/src/components/AtomixGlass/AtomixGlass.tsx +188 -128
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +63 -91
- package/src/components/AtomixGlass/PerformanceDashboard.tsx +153 -201
- package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +9 -6
- package/src/components/AtomixGlass/glass-utils.ts +51 -1
- package/src/components/AtomixGlass/stories/AnimationFeatures.stories.tsx +52 -46
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +573 -236
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +88 -41
- package/src/components/AtomixGlass/stories/argTypes.ts +19 -19
- package/src/components/AtomixGlass/stories/shared-components.tsx +7 -12
- package/src/components/AtomixGlass/stories/types.ts +3 -3
- package/src/components/Button/Button.tsx +114 -57
- package/src/components/Callout/Callout.tsx +4 -4
- package/src/components/Chart/ChartRenderer.tsx +1 -1
- package/src/components/Chart/DonutChart.tsx +11 -8
- package/src/components/EdgePanel/EdgePanel.tsx +119 -115
- package/src/components/Form/Select.tsx +4 -4
- package/src/components/List/List.tsx +4 -4
- package/src/components/Navigation/SideMenu/SideMenu.tsx +6 -6
- package/src/components/PhotoViewer/PhotoViewerImage.tsx +1 -1
- package/src/components/ProductReview/ProductReview.tsx +4 -2
- package/src/components/Rating/Rating.tsx +4 -2
- package/src/components/SectionIntro/SectionIntro.tsx +4 -2
- package/src/components/Steps/Steps.tsx +1 -1
- package/src/components/Tabs/Tabs.tsx +5 -5
- package/src/components/Testimonial/Testimonial.tsx +4 -2
- package/src/components/VideoPlayer/VideoPlayer.tsx +4 -2
- package/src/layouts/CssGrid/CssGrid.stories.tsx +464 -0
- package/src/layouts/CssGrid/CssGrid.tsx +215 -0
- package/src/layouts/CssGrid/index.ts +8 -0
- package/src/layouts/CssGrid/scripts/CssGrid.js +284 -0
- package/src/layouts/CssGrid/scripts/index.js +43 -0
- package/src/layouts/Grid/scripts/Container.js +139 -0
- package/src/layouts/Grid/scripts/Grid.js +184 -0
- package/src/layouts/Grid/scripts/GridCol.js +273 -0
- package/src/layouts/Grid/scripts/Row.js +154 -0
- package/src/layouts/Grid/scripts/index.js +48 -0
- package/src/layouts/MasonryGrid/MasonryGrid.tsx +71 -59
- package/src/lib/composables/atomix-glass/useGlassSize.ts +1 -1
- package/src/lib/composables/useAccordion.ts +5 -5
- package/src/lib/composables/useAtomixGlass.ts +111 -74
- package/src/lib/composables/useAtomixGlassStyles.ts +0 -2
- package/src/lib/composables/useBarChart.ts +2 -2
- package/src/lib/composables/useChart.ts +3 -2
- package/src/lib/composables/useChartToolbar.ts +48 -66
- package/src/lib/composables/useDataTable.ts +1 -1
- package/src/lib/composables/useDatePicker.ts +2 -2
- package/src/lib/composables/useEdgePanel.ts +45 -54
- package/src/lib/composables/useHeroBackgroundSlider.ts +5 -5
- package/src/lib/composables/usePhotoViewer.ts +2 -3
- package/src/lib/composables/usePieChart.ts +1 -1
- package/src/lib/composables/usePopover.ts +151 -139
- package/src/lib/composables/useSideMenu.ts +28 -41
- package/src/lib/composables/useSlider.ts +2 -6
- package/src/lib/composables/useTooltip.ts +2 -2
- package/src/lib/config/index.ts +39 -0
- package/src/lib/constants/components.ts +1 -0
- package/src/lib/theme/devtools/Comparator.tsx +1 -1
- package/src/lib/theme/devtools/Inspector.tsx +1 -1
- package/src/lib/theme/devtools/LiveEditor.tsx +1 -1
- package/src/lib/theme/runtime/ThemeProvider.tsx +1 -1
- package/src/lib/types/components.ts +1 -0
- package/src/styles/01-settings/_index.scss +1 -0
- package/src/styles/01-settings/_settings.atomix-glass.scss +174 -0
- package/src/styles/01-settings/_settings.masonry-grid.scss +42 -6
- package/src/styles/02-tools/_tools.glass.scss +6 -0
- package/src/styles/05-objects/_objects.masonry-grid.scss +162 -24
- package/src/styles/06-components/_components.atomix-glass.scss +160 -99
- package/scripts/cli/__tests__/README.md +0 -81
- package/scripts/cli/__tests__/basic.test.js +0 -116
- package/scripts/cli/__tests__/clean.test.js +0 -278
- package/scripts/cli/__tests__/component-generator.test.js +0 -332
- package/scripts/cli/__tests__/component-validator.test.js +0 -433
- package/scripts/cli/__tests__/generator.test.js +0 -613
- package/scripts/cli/__tests__/glass-motion.test.js +0 -256
- package/scripts/cli/__tests__/integration.test.js +0 -938
- package/scripts/cli/__tests__/migrate.test.js +0 -74
- package/scripts/cli/__tests__/security.test.js +0 -206
- package/scripts/cli/__tests__/theme-bridge.test.js +0 -507
- package/scripts/cli/__tests__/token-manager.test.js +0 -251
- package/scripts/cli/__tests__/token-provider.test.js +0 -361
- package/scripts/cli/__tests__/utils.test.js +0 -165
- package/src/components/AtomixGlass/stories/AnimationTests.stories.tsx +0 -95
- package/src/components/AtomixGlass/stories/CardExamples.stories.tsx +0 -212
- package/src/components/AtomixGlass/stories/Customization.stories.tsx +0 -131
- package/src/components/AtomixGlass/stories/DashboardExamples.stories.tsx +0 -348
- package/src/components/AtomixGlass/stories/EcommerceExamples.stories.tsx +0 -410
- package/src/components/AtomixGlass/stories/FormExamples.stories.tsx +0 -436
- package/src/components/AtomixGlass/stories/HeroExamples.stories.tsx +0 -264
- package/src/components/AtomixGlass/stories/InteractivePlayground.stories.tsx +0 -247
- package/src/components/AtomixGlass/stories/MobileUIExamples.stories.tsx +0 -418
- package/src/components/AtomixGlass/stories/ModalExamples.stories.tsx +0 -402
- package/src/components/AtomixGlass/stories/Modes.stories.tsx +0 -1082
- package/src/components/AtomixGlass/stories/Overview.stories.tsx +0 -497
- package/src/components/AtomixGlass/stories/Performance.stories.tsx +0 -103
- package/src/components/AtomixGlass/stories/PresetGallery.stories.tsx +0 -335
- package/src/components/AtomixGlass/stories/Shaders.stories.tsx +0 -395
- package/src/components/AtomixGlass/stories/WidgetExamples.stories.tsx +0 -441
- package/src/components/TypedButton/TypedButton.stories.tsx +0 -59
- package/src/components/TypedButton/TypedButton.tsx +0 -39
- package/src/components/TypedButton/index.ts +0 -2
- package/src/lib/composables/useBreadcrumb.ts +0 -81
- package/src/lib/composables/useChartInteractions.ts +0 -123
- package/src/lib/composables/useChartPerformance.ts +0 -347
- package/src/lib/composables/useDropdown.ts +0 -338
- package/src/lib/composables/useModal.ts +0 -110
- package/src/lib/composables/useTypedButton.ts +0 -66
- package/src/lib/hooks/usePerformanceMonitor.ts +0 -148
- package/src/lib/utils/displacement-generator.ts +0 -92
- package/src/lib/utils/memoryMonitor.ts +0 -191
- package/src/styles/01-settings/_settings.testtypecheck.scss +0 -53
- package/src/styles/01-settings/_settings.typedbutton.scss +0 -53
- package/src/styles/06-components/_components.testbutton.scss +0 -212
- package/src/styles/06-components/_components.testtypecheck.scss +0 -212
- package/src/styles/06-components/_components.typedbutton.scss +0 -212
|
@@ -253,7 +253,7 @@ const BackgroundWrapper = ({
|
|
|
253
253
|
<div
|
|
254
254
|
key={bg.url}
|
|
255
255
|
style={{
|
|
256
|
-
position: '
|
|
256
|
+
position: 'fixed',
|
|
257
257
|
inset: 0,
|
|
258
258
|
backgroundImage: `url(${bg.url})`,
|
|
259
259
|
backgroundSize: 'cover',
|
|
@@ -360,7 +360,9 @@ export const Playground: Story = {
|
|
|
360
360
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
361
361
|
const [copiedCode, setCopiedCode] = useState(false);
|
|
362
362
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
363
|
-
const [controlTab, setControlTab] = useState<'optics' | 'animation' | 'responsive' | 'flags'>(
|
|
363
|
+
const [controlTab, setControlTab] = useState<'optics' | 'animation' | 'responsive' | 'flags'>(
|
|
364
|
+
'optics'
|
|
365
|
+
);
|
|
364
366
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
365
367
|
const backgroundsArrayRef = useRef<typeof backgrounds | null>(null);
|
|
366
368
|
|
|
@@ -1157,7 +1159,12 @@ export const Playground: Story = {
|
|
|
1157
1159
|
{/* Time Animation Toggle */}
|
|
1158
1160
|
<div className="u-mb-3">
|
|
1159
1161
|
<button
|
|
1160
|
-
onClick={() =>
|
|
1162
|
+
onClick={() =>
|
|
1163
|
+
setSettings(prev => ({
|
|
1164
|
+
...prev,
|
|
1165
|
+
withTimeAnimation: !prev.withTimeAnimation,
|
|
1166
|
+
}))
|
|
1167
|
+
}
|
|
1161
1168
|
className="u-flex u-items-center u-gap-2 u-px-3 u-py-2 u-rounded u-text-start u-w-100"
|
|
1162
1169
|
style={{
|
|
1163
1170
|
background: settings.withTimeAnimation
|
|
@@ -1175,16 +1182,22 @@ export const Playground: Story = {
|
|
|
1175
1182
|
width: '10px',
|
|
1176
1183
|
height: '10px',
|
|
1177
1184
|
borderRadius: '50%',
|
|
1178
|
-
background: settings.withTimeAnimation
|
|
1185
|
+
background: settings.withTimeAnimation
|
|
1186
|
+
? '#f472b6'
|
|
1187
|
+
: 'rgba(255,255,255,0.2)',
|
|
1179
1188
|
flexShrink: 0,
|
|
1180
|
-
boxShadow: settings.withTimeAnimation
|
|
1189
|
+
boxShadow: settings.withTimeAnimation
|
|
1190
|
+
? '0 0 8px rgba(244,114,182,0.6)'
|
|
1191
|
+
: 'none',
|
|
1181
1192
|
}}
|
|
1182
1193
|
/>
|
|
1183
1194
|
<span
|
|
1184
1195
|
className="u-text-xs u-font-medium"
|
|
1185
|
-
style={{
|
|
1186
|
-
color: settings.withTimeAnimation
|
|
1187
|
-
|
|
1196
|
+
style={{
|
|
1197
|
+
color: settings.withTimeAnimation
|
|
1198
|
+
? '#f472b6'
|
|
1199
|
+
: 'rgba(255,255,255,0.6)',
|
|
1200
|
+
flex: 1,
|
|
1188
1201
|
}}
|
|
1189
1202
|
>
|
|
1190
1203
|
Time Animation
|
|
@@ -1228,7 +1241,7 @@ export const Playground: Story = {
|
|
|
1228
1241
|
className="premium-slider u-absolute u-w-100 u-m-0"
|
|
1229
1242
|
style={{
|
|
1230
1243
|
height: '2px',
|
|
1231
|
-
background: `linear-gradient(to right, #f472b6 ${(
|
|
1244
|
+
background: `linear-gradient(to right, #f472b6 ${(settings.animationSpeed / 3) * 100}%, rgba(255,255,255,0.15) ${(settings.animationSpeed / 3) * 100}%)`,
|
|
1232
1245
|
borderRadius: '2px',
|
|
1233
1246
|
outline: 'none',
|
|
1234
1247
|
appearance: 'none',
|
|
@@ -1244,7 +1257,12 @@ export const Playground: Story = {
|
|
|
1244
1257
|
{/* Multi-Layer Distortion Toggle */}
|
|
1245
1258
|
<div className="u-mb-3">
|
|
1246
1259
|
<button
|
|
1247
|
-
onClick={() =>
|
|
1260
|
+
onClick={() =>
|
|
1261
|
+
setSettings(prev => ({
|
|
1262
|
+
...prev,
|
|
1263
|
+
withMultiLayerDistortion: !prev.withMultiLayerDistortion,
|
|
1264
|
+
}))
|
|
1265
|
+
}
|
|
1248
1266
|
className="u-flex u-items-center u-gap-2 u-px-3 u-py-2 u-rounded u-text-start u-w-100"
|
|
1249
1267
|
style={{
|
|
1250
1268
|
background: settings.withMultiLayerDistortion
|
|
@@ -1262,16 +1280,22 @@ export const Playground: Story = {
|
|
|
1262
1280
|
width: '10px',
|
|
1263
1281
|
height: '10px',
|
|
1264
1282
|
borderRadius: '50%',
|
|
1265
|
-
background: settings.withMultiLayerDistortion
|
|
1283
|
+
background: settings.withMultiLayerDistortion
|
|
1284
|
+
? '#a78bfa'
|
|
1285
|
+
: 'rgba(255,255,255,0.2)',
|
|
1266
1286
|
flexShrink: 0,
|
|
1267
|
-
boxShadow: settings.withMultiLayerDistortion
|
|
1287
|
+
boxShadow: settings.withMultiLayerDistortion
|
|
1288
|
+
? '0 0 8px rgba(167,139,250,0.6)'
|
|
1289
|
+
: 'none',
|
|
1268
1290
|
}}
|
|
1269
1291
|
/>
|
|
1270
1292
|
<span
|
|
1271
1293
|
className="u-text-xs u-font-medium"
|
|
1272
|
-
style={{
|
|
1273
|
-
color: settings.withMultiLayerDistortion
|
|
1274
|
-
|
|
1294
|
+
style={{
|
|
1295
|
+
color: settings.withMultiLayerDistortion
|
|
1296
|
+
? '#a78bfa'
|
|
1297
|
+
: 'rgba(255,255,255,0.6)',
|
|
1298
|
+
flex: 1,
|
|
1275
1299
|
}}
|
|
1276
1300
|
>
|
|
1277
1301
|
Multi-Layer Distortion
|
|
@@ -1427,7 +1451,7 @@ export const Playground: Story = {
|
|
|
1427
1451
|
</div>
|
|
1428
1452
|
</>
|
|
1429
1453
|
)}
|
|
1430
|
-
|
|
1454
|
+
|
|
1431
1455
|
{/* === CONTROLS: RESPONSIVE & PERFORMANCE === */}
|
|
1432
1456
|
{controlTab === 'responsive' && (
|
|
1433
1457
|
<div className="u-mb-4 u-animation-fade-in">
|
|
@@ -1448,7 +1472,7 @@ export const Playground: Story = {
|
|
|
1448
1472
|
Responsive & Performance
|
|
1449
1473
|
</span>
|
|
1450
1474
|
</div>
|
|
1451
|
-
|
|
1475
|
+
|
|
1452
1476
|
{/* Device Preset Selector */}
|
|
1453
1477
|
<div className="u-mb-4">
|
|
1454
1478
|
<label className="u-block u-mb-2 u-text-white u-font-semibold u-text-xs">
|
|
@@ -1461,7 +1485,9 @@ export const Playground: Story = {
|
|
|
1461
1485
|
{(['performance', 'balanced', 'quality'] as const).map(preset => (
|
|
1462
1486
|
<button
|
|
1463
1487
|
key={preset}
|
|
1464
|
-
onClick={() =>
|
|
1488
|
+
onClick={() =>
|
|
1489
|
+
setSettings(prev => ({ ...prev, devicePreset: preset }))
|
|
1490
|
+
}
|
|
1465
1491
|
className="u-py-2 u-rounded u-text-center u-text-xs u-font-bold"
|
|
1466
1492
|
style={{
|
|
1467
1493
|
background:
|
|
@@ -1472,13 +1498,18 @@ export const Playground: Story = {
|
|
|
1472
1498
|
settings.devicePreset === preset
|
|
1473
1499
|
? '1px solid rgba(16,185,129,0.5)'
|
|
1474
1500
|
: '1px solid rgba(255,255,255,0.1)',
|
|
1475
|
-
color:
|
|
1501
|
+
color:
|
|
1502
|
+
settings.devicePreset === preset
|
|
1503
|
+
? '#10b981'
|
|
1504
|
+
: 'rgba(255,255,255,0.55)',
|
|
1476
1505
|
cursor: 'pointer',
|
|
1477
1506
|
transition: 'all 0.2s',
|
|
1478
1507
|
outline: 'none',
|
|
1479
1508
|
textTransform: 'capitalize',
|
|
1480
1509
|
boxShadow:
|
|
1481
|
-
settings.devicePreset === preset
|
|
1510
|
+
settings.devicePreset === preset
|
|
1511
|
+
? '0 2px 12px rgba(16,185,129,0.15)'
|
|
1512
|
+
: 'none',
|
|
1482
1513
|
}}
|
|
1483
1514
|
>
|
|
1484
1515
|
{preset}
|
|
@@ -1486,16 +1517,24 @@ export const Playground: Story = {
|
|
|
1486
1517
|
))}
|
|
1487
1518
|
</div>
|
|
1488
1519
|
<p className="u-mt-2 u-text-xs u-opacity-60">
|
|
1489
|
-
{settings.devicePreset === 'performance' &&
|
|
1490
|
-
|
|
1491
|
-
{settings.devicePreset === '
|
|
1520
|
+
{settings.devicePreset === 'performance' &&
|
|
1521
|
+
'⚡ Optimized for low-end devices with reduced quality'}
|
|
1522
|
+
{settings.devicePreset === 'balanced' &&
|
|
1523
|
+
'⚖️ Balanced quality and performance (recommended)'}
|
|
1524
|
+
{settings.devicePreset === 'quality' &&
|
|
1525
|
+
'💎 Maximum visual quality for high-end devices'}
|
|
1492
1526
|
</p>
|
|
1493
1527
|
</div>
|
|
1494
|
-
|
|
1528
|
+
|
|
1495
1529
|
{/* Disable Responsive Breakpoints Toggle */}
|
|
1496
1530
|
<div className="u-mb-4">
|
|
1497
1531
|
<button
|
|
1498
|
-
onClick={() =>
|
|
1532
|
+
onClick={() =>
|
|
1533
|
+
setSettings(prev => ({
|
|
1534
|
+
...prev,
|
|
1535
|
+
disableResponsiveBreakpoints: !prev.disableResponsiveBreakpoints,
|
|
1536
|
+
}))
|
|
1537
|
+
}
|
|
1499
1538
|
className="u-flex u-items-center u-gap-2 u-px-3 u-py-2 u-rounded u-text-start u-w-100"
|
|
1500
1539
|
style={{
|
|
1501
1540
|
background: settings.disableResponsiveBreakpoints
|
|
@@ -1513,38 +1552,43 @@ export const Playground: Story = {
|
|
|
1513
1552
|
width: '10px',
|
|
1514
1553
|
height: '10px',
|
|
1515
1554
|
borderRadius: '50%',
|
|
1516
|
-
background: settings.disableResponsiveBreakpoints
|
|
1555
|
+
background: settings.disableResponsiveBreakpoints
|
|
1556
|
+
? '#ef4444'
|
|
1557
|
+
: 'rgba(255,255,255,0.2)',
|
|
1517
1558
|
flexShrink: 0,
|
|
1518
|
-
boxShadow: settings.disableResponsiveBreakpoints
|
|
1559
|
+
boxShadow: settings.disableResponsiveBreakpoints
|
|
1560
|
+
? '0 0 8px rgba(239,68,68,0.6)'
|
|
1561
|
+
: 'none',
|
|
1519
1562
|
}}
|
|
1520
1563
|
/>
|
|
1521
1564
|
<span
|
|
1522
1565
|
className="u-text-xs u-font-medium"
|
|
1523
|
-
style={{
|
|
1524
|
-
color: settings.disableResponsiveBreakpoints
|
|
1525
|
-
|
|
1566
|
+
style={{
|
|
1567
|
+
color: settings.disableResponsiveBreakpoints
|
|
1568
|
+
? '#ef4444'
|
|
1569
|
+
: 'rgba(255,255,255,0.6)',
|
|
1570
|
+
flex: 1,
|
|
1526
1571
|
}}
|
|
1527
1572
|
>
|
|
1528
1573
|
Disable Responsive Breakpoints
|
|
1529
1574
|
</span>
|
|
1530
1575
|
</button>
|
|
1531
1576
|
<p className="u-mt-1 u-text-xs u-opacity-50">
|
|
1532
|
-
When enabled, prevents automatic parameter adjustment based on viewport
|
|
1577
|
+
When enabled, prevents automatic parameter adjustment based on viewport
|
|
1578
|
+
size
|
|
1533
1579
|
</p>
|
|
1534
1580
|
</div>
|
|
1535
|
-
|
|
1581
|
+
|
|
1536
1582
|
{/* Debug Options */}
|
|
1537
1583
|
<div className="u-mb-3">
|
|
1538
1584
|
<label className="u-block u-mb-2 u-text-white u-font-semibold u-text-xs">
|
|
1539
1585
|
🔍 Debug Options
|
|
1540
1586
|
</label>
|
|
1541
|
-
<div
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
] as const
|
|
1547
|
-
).map(key => {
|
|
1587
|
+
<div
|
|
1588
|
+
className="u-grid u-gap-3"
|
|
1589
|
+
style={{ gridTemplateColumns: '1fr 1fr' }}
|
|
1590
|
+
>
|
|
1591
|
+
{(['debugPerformance', 'debugOverLight'] as const).map(key => {
|
|
1548
1592
|
const isOn = settings[key] as boolean;
|
|
1549
1593
|
const label = key
|
|
1550
1594
|
.replace(/([A-Z])/g, ' $1')
|
|
@@ -1589,7 +1633,7 @@ export const Playground: Story = {
|
|
|
1589
1633
|
</div>
|
|
1590
1634
|
</div>
|
|
1591
1635
|
)}
|
|
1592
|
-
|
|
1636
|
+
|
|
1593
1637
|
{/* === CONTROLS: ACCESSIBILITY FLAGS === */}
|
|
1594
1638
|
{controlTab === 'flags' && (
|
|
1595
1639
|
<div className="u-mb-4 u-animation-fade-in">
|
|
@@ -2008,7 +2052,10 @@ export const Playground: Story = {
|
|
|
2008
2052
|
{backgrounds[backgroundIndex]?.tag}
|
|
2009
2053
|
</span>
|
|
2010
2054
|
</div>
|
|
2011
|
-
<div
|
|
2055
|
+
<div
|
|
2056
|
+
className="u-mt-1 u-text-xs u-opacity-35"
|
|
2057
|
+
style={{ letterSpacing: '0.3px' }}
|
|
2058
|
+
>
|
|
2012
2059
|
Use ← → arrow keys to navigate
|
|
2013
2060
|
</div>
|
|
2014
2061
|
</div>
|
|
@@ -16,7 +16,7 @@ import type { ArgTypeDefinition, ArgTypeCategory } from './types';
|
|
|
16
16
|
export const baseArgTypes = {
|
|
17
17
|
// Content category
|
|
18
18
|
children: {
|
|
19
|
-
control: 'text',
|
|
19
|
+
control: { type: 'text' },
|
|
20
20
|
description: 'Content to display inside the glass effect',
|
|
21
21
|
table: {
|
|
22
22
|
category: 'Content' as ArgTypeCategory,
|
|
@@ -125,7 +125,7 @@ export const baseArgTypes = {
|
|
|
125
125
|
},
|
|
126
126
|
},
|
|
127
127
|
className: {
|
|
128
|
-
control: 'text',
|
|
128
|
+
control: { type: 'text' },
|
|
129
129
|
description: 'Additional CSS class names',
|
|
130
130
|
table: {
|
|
131
131
|
category: 'Style' as ArgTypeCategory,
|
|
@@ -133,7 +133,7 @@ export const baseArgTypes = {
|
|
|
133
133
|
},
|
|
134
134
|
},
|
|
135
135
|
style: {
|
|
136
|
-
control: 'object',
|
|
136
|
+
control: { type: 'object' },
|
|
137
137
|
description: 'CSS style object',
|
|
138
138
|
table: {
|
|
139
139
|
category: 'Style' as ArgTypeCategory,
|
|
@@ -161,7 +161,7 @@ export const baseArgTypes = {
|
|
|
161
161
|
},
|
|
162
162
|
},
|
|
163
163
|
disableResponsiveBreakpoints: {
|
|
164
|
-
control: 'boolean',
|
|
164
|
+
control: { type: 'boolean' },
|
|
165
165
|
description: 'Disable responsive breakpoint system (default: false)',
|
|
166
166
|
table: {
|
|
167
167
|
category: 'Performance' as ArgTypeCategory,
|
|
@@ -171,7 +171,7 @@ export const baseArgTypes = {
|
|
|
171
171
|
|
|
172
172
|
// Animation category (Phase 1)
|
|
173
173
|
withTimeAnimation: {
|
|
174
|
-
control: 'boolean',
|
|
174
|
+
control: { type: 'boolean' },
|
|
175
175
|
description: 'Enable time-based animation (Phase 1, default: true)',
|
|
176
176
|
table: {
|
|
177
177
|
category: 'Animation' as ArgTypeCategory,
|
|
@@ -187,7 +187,7 @@ export const baseArgTypes = {
|
|
|
187
187
|
},
|
|
188
188
|
},
|
|
189
189
|
withMultiLayerDistortion: {
|
|
190
|
-
control: 'boolean',
|
|
190
|
+
control: { type: 'boolean' },
|
|
191
191
|
description: 'Enable multi-layer distortion using FBM (Phase 1, default: false)',
|
|
192
192
|
table: {
|
|
193
193
|
category: 'Animation' as ArgTypeCategory,
|
|
@@ -229,7 +229,7 @@ export const baseArgTypes = {
|
|
|
229
229
|
|
|
230
230
|
// Debug category
|
|
231
231
|
debugPerformance: {
|
|
232
|
-
control: 'boolean',
|
|
232
|
+
control: { type: 'boolean' },
|
|
233
233
|
description: 'Enable performance monitoring dashboard (development only)',
|
|
234
234
|
table: {
|
|
235
235
|
category: 'Debug' as ArgTypeCategory,
|
|
@@ -237,7 +237,7 @@ export const baseArgTypes = {
|
|
|
237
237
|
},
|
|
238
238
|
},
|
|
239
239
|
debugBorderRadius: {
|
|
240
|
-
control: 'boolean',
|
|
240
|
+
control: { type: 'boolean' },
|
|
241
241
|
description: 'Debug mode for corner radius extraction',
|
|
242
242
|
table: {
|
|
243
243
|
category: 'Debug' as ArgTypeCategory,
|
|
@@ -247,7 +247,7 @@ export const baseArgTypes = {
|
|
|
247
247
|
|
|
248
248
|
// Accessibility category
|
|
249
249
|
'aria-label': {
|
|
250
|
-
control: 'text',
|
|
250
|
+
control: { type: 'text' },
|
|
251
251
|
description: 'ARIA label for accessibility',
|
|
252
252
|
table: {
|
|
253
253
|
category: 'Accessibility' as ArgTypeCategory,
|
|
@@ -255,7 +255,7 @@ export const baseArgTypes = {
|
|
|
255
255
|
},
|
|
256
256
|
},
|
|
257
257
|
'aria-describedby': {
|
|
258
|
-
control: 'text',
|
|
258
|
+
control: { type: 'text' },
|
|
259
259
|
description: 'ARIA describedby attribute for additional description',
|
|
260
260
|
table: {
|
|
261
261
|
category: 'Accessibility' as ArgTypeCategory,
|
|
@@ -263,7 +263,7 @@ export const baseArgTypes = {
|
|
|
263
263
|
},
|
|
264
264
|
},
|
|
265
265
|
role: {
|
|
266
|
-
control: 'text',
|
|
266
|
+
control: { type: 'text' },
|
|
267
267
|
description: 'ARIA role attribute',
|
|
268
268
|
table: {
|
|
269
269
|
category: 'Accessibility' as ArgTypeCategory,
|
|
@@ -271,7 +271,7 @@ export const baseArgTypes = {
|
|
|
271
271
|
},
|
|
272
272
|
},
|
|
273
273
|
tabIndex: {
|
|
274
|
-
control: 'number',
|
|
274
|
+
control: { type: 'number' },
|
|
275
275
|
description: 'Tab index for keyboard navigation',
|
|
276
276
|
table: {
|
|
277
277
|
category: 'Accessibility' as ArgTypeCategory,
|
|
@@ -279,7 +279,7 @@ export const baseArgTypes = {
|
|
|
279
279
|
},
|
|
280
280
|
},
|
|
281
281
|
reducedMotion: {
|
|
282
|
-
control: 'boolean',
|
|
282
|
+
control: { type: 'boolean' },
|
|
283
283
|
description: 'Override for reduced motion preference (default: false)',
|
|
284
284
|
table: {
|
|
285
285
|
category: 'Accessibility' as ArgTypeCategory,
|
|
@@ -287,7 +287,7 @@ export const baseArgTypes = {
|
|
|
287
287
|
},
|
|
288
288
|
},
|
|
289
289
|
highContrast: {
|
|
290
|
-
control: 'boolean',
|
|
290
|
+
control: { type: 'boolean' },
|
|
291
291
|
description: 'Override for high contrast preference (default: false)',
|
|
292
292
|
table: {
|
|
293
293
|
category: 'Accessibility' as ArgTypeCategory,
|
|
@@ -295,7 +295,7 @@ export const baseArgTypes = {
|
|
|
295
295
|
},
|
|
296
296
|
},
|
|
297
297
|
withoutEffects: {
|
|
298
|
-
control: 'boolean',
|
|
298
|
+
control: { type: 'boolean' },
|
|
299
299
|
description: 'Disable all visual effects (default: false)',
|
|
300
300
|
table: {
|
|
301
301
|
category: 'Accessibility' as ArgTypeCategory,
|
|
@@ -326,7 +326,7 @@ export const minimalArgTypes = {
|
|
|
326
326
|
export const advancedArgTypes = {
|
|
327
327
|
...baseArgTypes,
|
|
328
328
|
globalMousePosition: {
|
|
329
|
-
control: 'object',
|
|
329
|
+
control: { type: 'object' },
|
|
330
330
|
description: 'External global mouse position { x: number; y: number }',
|
|
331
331
|
table: {
|
|
332
332
|
category: 'Interaction' as ArgTypeCategory,
|
|
@@ -334,7 +334,7 @@ export const advancedArgTypes = {
|
|
|
334
334
|
},
|
|
335
335
|
},
|
|
336
336
|
mouseOffset: {
|
|
337
|
-
control: 'object',
|
|
337
|
+
control: { type: 'object' },
|
|
338
338
|
description: 'External mouse offset { x: number; y: number }',
|
|
339
339
|
table: {
|
|
340
340
|
category: 'Interaction' as ArgTypeCategory,
|
|
@@ -361,7 +361,7 @@ export function pickArgTypeCategories<T extends Record<string, ArgTypeDefinition
|
|
|
361
361
|
const result: Partial<T> = {};
|
|
362
362
|
Object.entries(argTypes).forEach(([key, value]) => {
|
|
363
363
|
if (value.table?.category && categories.includes(value.table.category)) {
|
|
364
|
-
result[key as keyof T] = value;
|
|
364
|
+
result[key as keyof T] = value as any;
|
|
365
365
|
}
|
|
366
366
|
});
|
|
367
367
|
return result;
|
|
@@ -377,7 +377,7 @@ export function excludeArgTypeCategories<T extends Record<string, ArgTypeDefinit
|
|
|
377
377
|
const result: Partial<T> = {};
|
|
378
378
|
Object.entries(argTypes).forEach(([key, value]) => {
|
|
379
379
|
if (value.table?.category && !categories.includes(value.table.category)) {
|
|
380
|
-
result[key as keyof T] = value;
|
|
380
|
+
result[key as keyof T] = value as any;
|
|
381
381
|
}
|
|
382
382
|
});
|
|
383
383
|
return result;
|
|
@@ -79,6 +79,7 @@ export const BackgroundWrapper: React.FC<BackgroundWrapperProps> = ({
|
|
|
79
79
|
backgroundSize: 'cover',
|
|
80
80
|
backgroundPosition: 'center',
|
|
81
81
|
backgroundRepeat: 'no-repeat',
|
|
82
|
+
backgroundAttachment: 'fixed',
|
|
82
83
|
height,
|
|
83
84
|
width,
|
|
84
85
|
borderRadius,
|
|
@@ -100,7 +101,7 @@ export const BackgroundWrapper: React.FC<BackgroundWrapperProps> = ({
|
|
|
100
101
|
padding,
|
|
101
102
|
objectPosition: 'center',
|
|
102
103
|
objectFit: 'cover',
|
|
103
|
-
backgroundPosition: 'fixed'
|
|
104
|
+
backgroundPosition: 'fixed',
|
|
104
105
|
}}
|
|
105
106
|
/>
|
|
106
107
|
)}
|
|
@@ -197,7 +198,6 @@ export const StoryContainer: React.FC<StoryContainerProps> = ({
|
|
|
197
198
|
* Collection of high-quality background images for different moods and scenarios
|
|
198
199
|
*/
|
|
199
200
|
export const backgroundImages = [
|
|
200
|
-
'https://images.unsplash.com/photo-1773609108583-4f0040c75e7f?q=80&w=2532&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
201
201
|
'https://images.unsplash.com/photo-1593433073755-4233a78ee359?q=80&w=987&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
202
202
|
'https://images.unsplash.com/photo-1637825891028-564f672aa42c?ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&q=80&w=2670',
|
|
203
203
|
'https://images.unsplash.com/photo-1773062278803-0643c4782445?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
@@ -225,14 +225,12 @@ export class StoryErrorBoundary extends React.Component<
|
|
|
225
225
|
return { hasError: true, error };
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
|
|
229
|
-
console.error('Story
|
|
230
|
-
|
|
231
|
-
this.props.onError(error, errorInfo);
|
|
232
|
-
}
|
|
228
|
+
override componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {
|
|
229
|
+
console.error('Story Error:', error, errorInfo);
|
|
230
|
+
this.setState({ hasError: true, error });
|
|
233
231
|
}
|
|
234
232
|
|
|
235
|
-
render() {
|
|
233
|
+
override render() {
|
|
236
234
|
if (this.state.hasError) {
|
|
237
235
|
if (this.props.fallback) {
|
|
238
236
|
return this.props.fallback;
|
|
@@ -249,10 +247,7 @@ export class StoryErrorBoundary extends React.Component<
|
|
|
249
247
|
}}
|
|
250
248
|
>
|
|
251
249
|
<div className="u-text-center">
|
|
252
|
-
<h3
|
|
253
|
-
className="u-mb-2 u-text-xl u-font-bold"
|
|
254
|
-
style={{ color: '#dc2626' }}
|
|
255
|
-
>
|
|
250
|
+
<h3 className="u-mb-2 u-text-xl u-font-bold" style={{ color: '#dc2626' }}>
|
|
256
251
|
Story Rendering Error
|
|
257
252
|
</h3>
|
|
258
253
|
<p className="u-mb-4 u-text-sm" style={{ color: '#7f1d1d' }}>
|
|
@@ -56,14 +56,14 @@ export type ArgTypeCategory =
|
|
|
56
56
|
* Enhanced argType definition with category support
|
|
57
57
|
*/
|
|
58
58
|
export interface ArgTypeDefinition {
|
|
59
|
-
control:
|
|
60
|
-
description
|
|
59
|
+
control?: { type: 'text' | 'boolean' | 'object' | 'range' | 'number' | 'color' | 'select' | 'radio' | 'inline-radio' | 'check' | 'inline-check' | 'multi-select' | 'date' | 'file'; [key: string]: unknown } | boolean;
|
|
60
|
+
description?: string;
|
|
61
61
|
table: {
|
|
62
62
|
category?: ArgTypeCategory;
|
|
63
63
|
defaultValue?: { summary: string };
|
|
64
64
|
type?: { summary: string };
|
|
65
65
|
};
|
|
66
|
-
options?:
|
|
66
|
+
options?: unknown[];
|
|
67
67
|
action?: string;
|
|
68
68
|
}
|
|
69
69
|
|