@shohojdhara/atomix 0.4.0 → 0.4.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/dist/atomix.css +0 -14
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +4 -4
- package/dist/atomix.min.css.map +1 -1
- package/dist/charts.d.ts +12 -19
- package/dist/charts.js +555 -359
- package/dist/charts.js.map +1 -1
- package/dist/core.d.ts +98 -28
- package/dist/core.js +1082 -733
- package/dist/core.js.map +1 -1
- package/dist/forms.d.ts +26 -21
- package/dist/forms.js +937 -350
- package/dist/forms.js.map +1 -1
- package/dist/heavy.d.ts +14 -21
- package/dist/heavy.js +409 -256
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +518 -284
- package/dist/index.esm.js +1993 -1237
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1994 -1237
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +2 -2
- package/scripts/atomix-cli.js +43 -1
- package/scripts/cli/__tests__/utils.test.js +6 -2
- package/scripts/cli/migration-tools.js +2 -2
- package/scripts/cli/theme-bridge.js +7 -9
- package/scripts/cli/utils.js +2 -1
- package/src/components/Accordion/Accordion.stories.tsx +40 -0
- package/src/components/Accordion/Accordion.tsx +174 -56
- package/src/components/Accordion/AccordionCompound.test.tsx +70 -0
- package/src/components/AtomixGlass/AtomixGlass.tsx +82 -54
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +17 -18
- package/src/components/AtomixGlass/README.md +5 -5
- package/src/components/AtomixGlass/stories/Customization.stories.tsx +2 -2
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +42 -42
- package/src/components/AtomixGlass/stories/Modes.stories.tsx +5 -5
- package/src/components/AtomixGlass/stories/Overview.stories.tsx +3 -3
- package/src/components/AtomixGlass/stories/Performance.stories.tsx +2 -2
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +45 -45
- package/src/components/AtomixGlass/stories/Shaders.stories.tsx +3 -3
- package/src/components/Badge/Badge.stories.tsx +1 -1
- package/src/components/Badge/Badge.tsx +1 -1
- package/src/components/Breadcrumb/Breadcrumb.tsx +185 -65
- package/src/components/Breadcrumb/BreadcrumbCompound.test.tsx +84 -0
- package/src/components/Breadcrumb/index.ts +2 -2
- package/src/components/Button/Button.stories.tsx +1 -1
- package/src/components/Button/README.md +2 -2
- package/src/components/Callout/Callout.stories.tsx +166 -1011
- package/src/components/Callout/Callout.test.tsx +3 -3
- package/src/components/Callout/Callout.tsx +196 -84
- package/src/components/Callout/CalloutCompound.test.tsx +72 -0
- package/src/components/Callout/README.md +2 -2
- package/src/components/Chart/Chart.stories.tsx +1 -1
- package/src/components/Chart/Chart.tsx +5 -5
- package/src/components/Chart/TreemapChart.tsx +37 -29
- package/src/components/DatePicker/readme.md +3 -3
- package/src/components/Dropdown/Dropdown.stories.tsx +1 -1
- package/src/components/Dropdown/Dropdown.tsx +133 -20
- package/src/components/Dropdown/DropdownCompound.test.tsx +64 -0
- package/src/components/EdgePanel/EdgePanel.stories.tsx +7 -7
- package/src/components/EdgePanel/EdgePanel.tsx +164 -112
- package/src/components/EdgePanel/EdgePanelCompound.test.tsx +53 -0
- package/src/components/Form/Checkbox.stories.tsx +1 -1
- package/src/components/Form/Checkbox.tsx +1 -1
- package/src/components/Form/Input.stories.tsx +1 -1
- package/src/components/Form/Input.tsx +1 -1
- package/src/components/Form/Radio.stories.tsx +1 -1
- package/src/components/Form/Radio.tsx +1 -1
- package/src/components/Form/Select.stories.tsx +24 -1
- package/src/components/Form/Select.test.tsx +99 -0
- package/src/components/Form/Select.tsx +145 -94
- package/src/components/Form/SelectOption.tsx +88 -0
- package/src/components/Form/Textarea.stories.tsx +1 -1
- package/src/components/Form/Textarea.tsx +1 -1
- package/src/components/Hero/Hero.stories.tsx +39 -2
- package/src/components/Hero/Hero.test.tsx +142 -0
- package/src/components/Hero/Hero.tsx +143 -4
- package/src/components/List/List.test.tsx +62 -0
- package/src/components/List/List.tsx +16 -5
- package/src/components/List/ListItem.tsx +20 -0
- package/src/components/Messages/Messages.stories.tsx +1 -1
- package/src/components/Messages/Messages.tsx +2 -2
- package/src/components/Modal/Modal.stories.tsx +66 -2
- package/src/components/Modal/Modal.tsx +115 -35
- package/src/components/Modal/ModalCompound.test.tsx +94 -0
- package/src/components/Navigation/Nav/Nav.stories.tsx +2 -2
- package/src/components/Navigation/Nav/Nav.tsx +1 -1
- package/src/components/Navigation/Navbar/Navbar.stories.tsx +3 -3
- package/src/components/Navigation/Navbar/Navbar.tsx +1 -1
- package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +2 -2
- package/src/components/Navigation/SideMenu/SideMenu.tsx +1 -1
- package/src/components/Pagination/Pagination.stories.tsx +1 -1
- package/src/components/Pagination/Pagination.tsx +1 -1
- package/src/components/Popover/Popover.stories.tsx +1 -1
- package/src/components/Popover/Popover.tsx +1 -1
- package/src/components/Progress/Progress.tsx +1 -1
- package/src/components/Rating/Rating.stories.tsx +1 -1
- package/src/components/Rating/Rating.test.tsx +73 -0
- package/src/components/Rating/Rating.tsx +25 -37
- package/src/components/Spinner/Spinner.tsx +1 -1
- package/src/components/Steps/Steps.stories.tsx +1 -1
- package/src/components/Steps/Steps.tsx +125 -22
- package/src/components/Steps/StepsCompound.test.tsx +81 -0
- package/src/components/Tabs/Tabs.stories.tsx +1 -1
- package/src/components/Tabs/Tabs.tsx +198 -45
- package/src/components/Tabs/TabsCompound.test.tsx +64 -0
- package/src/components/Todo/Todo.tsx +0 -1
- package/src/components/Toggle/Toggle.stories.tsx +1 -1
- package/src/components/Toggle/Toggle.tsx +1 -1
- package/src/components/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/components/VideoPlayer/VideoPlayer.stories.tsx +2 -2
- package/src/lib/composables/__tests__/useAtomixGlassPerf.test.tsx +88 -0
- package/src/lib/composables/__tests__/useChart.test.ts +50 -0
- package/src/lib/composables/__tests__/useChart.test.tsx +139 -0
- package/src/lib/composables/__tests__/useHeroBackgroundSlider.test.tsx +59 -0
- package/src/lib/composables/__tests__/useSliderAutoplay.test.tsx +68 -0
- package/src/lib/composables/atomix-glass/useGlassBackgroundDetection.ts +329 -0
- package/src/lib/composables/atomix-glass/useGlassCornerRadius.ts +82 -0
- package/src/lib/composables/atomix-glass/useGlassMouseTracking.ts +153 -0
- package/src/lib/composables/atomix-glass/useGlassOverLight.ts +198 -0
- package/src/lib/composables/atomix-glass/useGlassSize.ts +117 -0
- package/src/lib/composables/atomix-glass/useGlassState.ts +112 -0
- package/src/lib/composables/atomix-glass/useGlassTransforms.ts +160 -0
- package/src/lib/composables/glass-styles.ts +302 -0
- package/src/lib/composables/index.ts +0 -8
- package/src/lib/composables/useAtomixGlass.ts +331 -537
- package/src/lib/composables/useAtomixGlassStyles.ts +307 -0
- package/src/lib/composables/useBarChart.ts +1 -1
- package/src/lib/composables/useBreadcrumb.ts +6 -6
- package/src/lib/composables/useChart.ts +104 -21
- package/src/lib/composables/useHeroBackgroundSlider.ts +16 -7
- package/src/lib/composables/useSlider.ts +66 -34
- package/src/lib/theme/devtools/CLI.ts +2 -10
- package/src/lib/theme/utils/__tests__/themeUtils.test.ts +213 -0
- package/src/lib/types/components.ts +21 -23
- package/src/lib/utils/__tests__/componentUtils.test.ts +57 -2
- package/src/lib/utils/__tests__/dom.test.ts +100 -0
- package/src/lib/utils/__tests__/fontPreloader.test.ts +102 -0
- package/src/lib/utils/__tests__/themeNaming.test.ts +117 -0
- package/src/lib/utils/themeNaming.ts +1 -1
- package/src/styles/06-components/_components.accordion.scss +0 -2
- package/src/styles/06-components/_components.chart.scss +0 -1
- package/src/styles/06-components/_components.dropdown.scss +0 -1
- package/src/styles/06-components/_components.edge-panel.scss +0 -2
- package/src/styles/06-components/_components.photoviewer.scss +0 -1
- package/src/styles/06-components/_components.river.scss +0 -1
- package/src/styles/06-components/_components.slider.scss +0 -3
- package/src/styles/99-utilities/_utilities.glass-fixes.scss +0 -1
package/dist/core.d.ts
CHANGED
|
@@ -383,20 +383,20 @@ interface OverLightObjectConfig {
|
|
|
383
383
|
/**
|
|
384
384
|
* AtomixGlass component props interface
|
|
385
385
|
*/
|
|
386
|
-
interface AtomixGlassProps {
|
|
386
|
+
interface AtomixGlassProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
387
387
|
children?: React.ReactNode;
|
|
388
388
|
displacementScale?: number;
|
|
389
389
|
blurAmount?: number;
|
|
390
390
|
saturation?: number;
|
|
391
391
|
aberrationIntensity?: number;
|
|
392
392
|
elasticity?: number;
|
|
393
|
-
|
|
393
|
+
borderRadius?: number;
|
|
394
394
|
globalMousePosition?: MousePosition;
|
|
395
395
|
mouseOffset?: MousePosition;
|
|
396
396
|
mouseContainer?: React.RefObject<HTMLElement | null> | null;
|
|
397
|
-
className?: string;
|
|
398
397
|
padding?: string;
|
|
399
|
-
|
|
398
|
+
height?: string | number;
|
|
399
|
+
width?: string | number;
|
|
400
400
|
overLight?: OverLightConfig;
|
|
401
401
|
mode?: DisplacementMode;
|
|
402
402
|
onClick?: () => void;
|
|
@@ -404,30 +404,23 @@ interface AtomixGlassProps {
|
|
|
404
404
|
* Shader variant for shader mode
|
|
405
405
|
*/
|
|
406
406
|
shaderVariant?: 'liquidGlass' | 'premiumGlass' | 'appleFluid' | 'liquidMetal' | 'plasma' | 'waves' | 'noise';
|
|
407
|
-
/**
|
|
408
|
-
* Accessibility props
|
|
409
|
-
*/
|
|
410
|
-
'aria-label'?: string;
|
|
411
|
-
'aria-describedby'?: string;
|
|
412
|
-
role?: string;
|
|
413
|
-
tabIndex?: number;
|
|
414
407
|
/**
|
|
415
408
|
* Performance and accessibility options
|
|
416
409
|
*/
|
|
417
410
|
reducedMotion?: boolean;
|
|
418
411
|
highContrast?: boolean;
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
412
|
+
withoutEffects?: boolean;
|
|
413
|
+
withLiquidBlur?: boolean;
|
|
414
|
+
withBorder?: boolean;
|
|
415
|
+
withOverLightLayers?: boolean;
|
|
423
416
|
/**
|
|
424
417
|
* Performance monitoring
|
|
425
418
|
*/
|
|
426
|
-
|
|
419
|
+
debugPerformance?: boolean;
|
|
427
420
|
/**
|
|
428
|
-
* Debug mode for
|
|
421
|
+
* Debug mode for borderRadius extraction
|
|
429
422
|
*/
|
|
430
|
-
|
|
423
|
+
debugBorderRadius?: boolean;
|
|
431
424
|
/**
|
|
432
425
|
* Debug mode for overLight detection and configuration
|
|
433
426
|
*
|
|
@@ -484,7 +477,7 @@ interface BaseComponentProps {
|
|
|
484
477
|
* Icon position options
|
|
485
478
|
*/
|
|
486
479
|
type IconPosition = 'left' | 'right';
|
|
487
|
-
type listvariant = 'dash' | 'number' | 'text';
|
|
480
|
+
type listvariant = 'dash' | 'number' | 'text' | 'default';
|
|
488
481
|
/**;
|
|
489
482
|
* List component properties
|
|
490
483
|
*/
|
|
@@ -1058,7 +1051,23 @@ interface ElevationCardProps extends CardProps {
|
|
|
1058
1051
|
}
|
|
1059
1052
|
|
|
1060
1053
|
type AccordionProps = AccordionProps$1;
|
|
1061
|
-
|
|
1054
|
+
interface AccordionHeaderProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'title'> {
|
|
1055
|
+
title?: ReactNode;
|
|
1056
|
+
icon?: ReactNode;
|
|
1057
|
+
iconPosition?: 'left' | 'right';
|
|
1058
|
+
isOpen?: boolean;
|
|
1059
|
+
}
|
|
1060
|
+
declare const AccordionHeader: React$1.ForwardRefExoticComponent<AccordionHeaderProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1061
|
+
interface AccordionBodyProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
1062
|
+
panelRef?: React$1.RefObject<HTMLDivElement>;
|
|
1063
|
+
contentRef?: React$1.RefObject<HTMLDivElement>;
|
|
1064
|
+
}
|
|
1065
|
+
declare const AccordionBody: React$1.ForwardRefExoticComponent<AccordionBodyProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1066
|
+
type AccordionComponent = React$1.FC<AccordionProps> & {
|
|
1067
|
+
Header: typeof AccordionHeader;
|
|
1068
|
+
Body: typeof AccordionBody;
|
|
1069
|
+
};
|
|
1070
|
+
declare const _default: AccordionComponent;
|
|
1062
1071
|
|
|
1063
1072
|
declare const Badge: React$1.FC<BadgeProps>;
|
|
1064
1073
|
|
|
@@ -1194,7 +1203,7 @@ interface BlockProps extends HTMLAttributes<HTMLElement> {
|
|
|
1194
1203
|
*/
|
|
1195
1204
|
declare const Block: React$1.ForwardRefExoticComponent<BlockProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1196
1205
|
|
|
1197
|
-
interface
|
|
1206
|
+
interface BreadcrumbItemData {
|
|
1198
1207
|
/**
|
|
1199
1208
|
* Text to display
|
|
1200
1209
|
*/
|
|
@@ -1224,11 +1233,38 @@ interface BreadcrumbItem {
|
|
|
1224
1233
|
*/
|
|
1225
1234
|
className?: string;
|
|
1226
1235
|
}
|
|
1236
|
+
interface BreadcrumbItemProps extends React$1.HTMLAttributes<HTMLLIElement> {
|
|
1237
|
+
/**
|
|
1238
|
+
* URL for the breadcrumb item
|
|
1239
|
+
*/
|
|
1240
|
+
href?: string;
|
|
1241
|
+
/**
|
|
1242
|
+
* Whether this item is active (current page)
|
|
1243
|
+
*/
|
|
1244
|
+
active?: boolean;
|
|
1245
|
+
/**
|
|
1246
|
+
* Optional icon to display before the label
|
|
1247
|
+
*/
|
|
1248
|
+
icon?: ReactNode;
|
|
1249
|
+
/**
|
|
1250
|
+
* Optional click handler for the link
|
|
1251
|
+
*/
|
|
1252
|
+
onClick?: (event: React$1.MouseEvent<any>) => void;
|
|
1253
|
+
/**
|
|
1254
|
+
* Optional custom link component
|
|
1255
|
+
*/
|
|
1256
|
+
linkAs?: React$1.ElementType<any>;
|
|
1257
|
+
/**
|
|
1258
|
+
* Link props to pass to the underlying anchor or LinkComponent
|
|
1259
|
+
*/
|
|
1260
|
+
linkProps?: Record<string, any>;
|
|
1261
|
+
}
|
|
1262
|
+
declare const BreadcrumbItem: React$1.ForwardRefExoticComponent<BreadcrumbItemProps & React$1.RefAttributes<HTMLLIElement>>;
|
|
1227
1263
|
interface BreadcrumbProps {
|
|
1228
1264
|
/**
|
|
1229
|
-
* Array of breadcrumb items
|
|
1265
|
+
* Array of breadcrumb items (Legacy)
|
|
1230
1266
|
*/
|
|
1231
|
-
items
|
|
1267
|
+
items?: BreadcrumbItemData[];
|
|
1232
1268
|
/**
|
|
1233
1269
|
* Custom divider character or element
|
|
1234
1270
|
*/
|
|
@@ -1249,8 +1285,16 @@ interface BreadcrumbProps {
|
|
|
1249
1285
|
* Custom style for the breadcrumb
|
|
1250
1286
|
*/
|
|
1251
1287
|
style?: React$1.CSSProperties;
|
|
1288
|
+
/**
|
|
1289
|
+
* Children (Compound)
|
|
1290
|
+
*/
|
|
1291
|
+
children?: ReactNode;
|
|
1252
1292
|
}
|
|
1253
|
-
declare const
|
|
1293
|
+
declare const BreadcrumbComponent: React$1.FC<BreadcrumbProps>;
|
|
1294
|
+
type BreadcrumbType = typeof BreadcrumbComponent & {
|
|
1295
|
+
Item: typeof BreadcrumbItem;
|
|
1296
|
+
};
|
|
1297
|
+
declare const Breadcrumb: BreadcrumbType;
|
|
1254
1298
|
|
|
1255
1299
|
type ButtonAsProp = {
|
|
1256
1300
|
as?: ElementType;
|
|
@@ -1261,14 +1305,32 @@ type ButtonAsProp = {
|
|
|
1261
1305
|
};
|
|
1262
1306
|
declare const Button: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<Omit<ButtonProps & ButtonAsProp, "ref"> & React$1.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>>;
|
|
1263
1307
|
|
|
1264
|
-
declare const Card: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<
|
|
1308
|
+
declare const Card: React$1.MemoExoticComponent<React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement | HTMLAnchorElement>>>;
|
|
1265
1309
|
|
|
1266
1310
|
declare const ElevationCard: React$1.FC<ElevationCardProps>;
|
|
1267
1311
|
|
|
1312
|
+
declare const CalloutIcon: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1313
|
+
declare const CalloutMessage: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1314
|
+
declare const CalloutTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1315
|
+
declare const CalloutText: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1316
|
+
declare const CalloutActions: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1317
|
+
interface CalloutCloseButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
1318
|
+
}
|
|
1319
|
+
declare const CalloutCloseButton: React$1.ForwardRefExoticComponent<CalloutCloseButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1320
|
+
declare const CalloutContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1268
1321
|
/**
|
|
1269
1322
|
* Callout component for displaying important messages, notifications, or alerts
|
|
1270
1323
|
*/
|
|
1271
|
-
|
|
1324
|
+
type CalloutComponent = React$1.FC<CalloutProps> & {
|
|
1325
|
+
Icon: typeof CalloutIcon;
|
|
1326
|
+
Message: typeof CalloutMessage;
|
|
1327
|
+
Title: typeof CalloutTitle;
|
|
1328
|
+
Text: typeof CalloutText;
|
|
1329
|
+
Actions: typeof CalloutActions;
|
|
1330
|
+
CloseButton: typeof CalloutCloseButton;
|
|
1331
|
+
Content: typeof CalloutContent;
|
|
1332
|
+
};
|
|
1333
|
+
declare const Callout: CalloutComponent;
|
|
1272
1334
|
|
|
1273
1335
|
type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
1274
1336
|
type IconWeight = 'thin' | 'light' | 'regular' | 'bold' | 'fill' | 'duotone';
|
|
@@ -1308,12 +1370,20 @@ interface IconProps {
|
|
|
1308
1370
|
*/
|
|
1309
1371
|
declare const Icon: React$1.FC<IconProps>;
|
|
1310
1372
|
|
|
1311
|
-
|
|
1373
|
+
interface ListItemProps extends React$1.LiHTMLAttributes<HTMLLIElement> {
|
|
1374
|
+
children?: React$1.ReactNode;
|
|
1375
|
+
}
|
|
1376
|
+
declare const ListItem: React$1.ForwardRefExoticComponent<ListItemProps & React$1.RefAttributes<HTMLLIElement>>;
|
|
1377
|
+
|
|
1378
|
+
type ListComponent = React$1.FC<ListProps> & {
|
|
1379
|
+
Item: typeof ListItem;
|
|
1380
|
+
};
|
|
1381
|
+
declare const List: ListComponent;
|
|
1312
1382
|
|
|
1313
1383
|
type ListGroupProps = ListGroupProps$1;
|
|
1314
1384
|
declare const ListGroup: React$1.FC<ListGroupProps>;
|
|
1315
1385
|
|
|
1316
1386
|
declare const Spinner: React$1.FC<SpinnerProps>;
|
|
1317
1387
|
|
|
1318
|
-
export { Accordion, Badge, Block, Breadcrumb, Button, Callout, Card, ElevationCard, Icon, List, ListGroup, Spinner };
|
|
1388
|
+
export { _default as Accordion, Badge, Block, Breadcrumb, Button, Callout, Card, ElevationCard, Icon, List, ListGroup, Spinner };
|
|
1319
1389
|
export type { AccordionProps, BadgeProps, BlockProps, BreadcrumbProps, ButtonProps, CalloutProps, CardProps, ElevationCardProps, IconProps, ListGroupProps, ListProps, SpinnerProps };
|