@shohojdhara/atomix 0.2.4 → 0.2.5
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/README.md +19 -0
- package/dist/atomix.css +1266 -1412
- package/dist/atomix.min.css +3 -3
- package/dist/index.d.ts +1232 -876
- package/dist/index.esm.js +16212 -26364
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +15652 -22298
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/themes/applemix.css +15008 -0
- package/dist/themes/applemix.min.css +72 -0
- package/dist/themes/boomdevs.css +1266 -1413
- package/dist/themes/boomdevs.min.css +3 -3
- package/dist/themes/esrar.css +1267 -1413
- package/dist/themes/esrar.min.css +3 -3
- package/dist/themes/flashtrade.css +15159 -0
- package/dist/themes/flashtrade.min.css +86 -0
- package/dist/themes/mashroom.css +1264 -1410
- package/dist/themes/mashroom.min.css +5 -5
- package/dist/themes/shaj-default.css +1266 -1412
- package/dist/themes/shaj-default.min.css +3 -3
- package/package.json +6 -17
- package/src/components/Accordion/Accordion.stories.tsx +4 -26
- package/src/components/Accordion/Accordion.tsx +21 -12
- package/src/components/AtomixGlass/AtomixGlass.test.tsx +106 -72
- package/src/components/AtomixGlass/AtomixGlass.tsx +487 -1215
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +400 -0
- package/src/components/AtomixGlass/GlassFilter.tsx +156 -0
- package/src/components/AtomixGlass/README.md +124 -2
- package/src/components/AtomixGlass/atomixGLass.old.tsx +1266 -0
- package/src/components/AtomixGlass/glass-utils.ts +263 -0
- package/src/components/AtomixGlass/shader-utils.ts +404 -236
- package/src/components/AtomixGlass/{AtomixGlass.stories.tsx → stories/AtomixGlass.stories.tsx} +55 -35
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +57 -89
- package/src/components/AtomixGlass/stories/Modes.stories.tsx +149 -149
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +95 -32
- package/src/components/AtomixGlass/stories/ShaderVariants.stories.tsx +0 -2
- package/src/components/AtomixGlass/stories/shared-components.tsx +9 -18
- package/src/components/AtomixGlass/utils.ts +3 -3
- package/src/components/Avatar/Avatar.tsx +3 -0
- package/src/components/Avatar/AvatarGroup.tsx +2 -1
- package/src/components/Badge/Badge.stories.tsx +74 -54
- package/src/components/Badge/Badge.tsx +8 -12
- package/src/components/Breadcrumb/Breadcrumb.tsx +23 -4
- package/src/components/Button/Button.tsx +3 -5
- package/src/components/Callout/Callout.stories.tsx +86 -35
- package/src/components/Callout/Callout.tsx +4 -0
- package/src/components/Card/Card.stories.tsx +89 -85
- package/src/components/Card/Card.tsx +15 -4
- package/src/components/Card/ElevationCard.tsx +2 -0
- package/src/components/Chart/AnimatedChart.tsx +179 -156
- package/src/components/Chart/AreaChart.tsx +123 -12
- package/src/components/Chart/BarChart.tsx +91 -100
- package/src/components/Chart/BaseChart.tsx +80 -0
- package/src/components/Chart/BubbleChart.tsx +114 -290
- package/src/components/Chart/CandlestickChart.tsx +282 -622
- package/src/components/Chart/Chart.stories.tsx +576 -179
- package/src/components/Chart/Chart.tsx +374 -75
- package/src/components/Chart/ChartRenderer.tsx +371 -220
- package/src/components/Chart/ChartToolbar.tsx +372 -61
- package/src/components/Chart/ChartTooltip.tsx +33 -18
- package/src/components/Chart/DonutChart.tsx +172 -254
- package/src/components/Chart/FunnelChart.tsx +169 -240
- package/src/components/Chart/GaugeChart.tsx +224 -392
- package/src/components/Chart/HeatmapChart.tsx +302 -440
- package/src/components/Chart/LineChart.tsx +148 -103
- package/src/components/Chart/MultiAxisChart.tsx +267 -395
- package/src/components/Chart/PieChart.tsx +114 -64
- package/src/components/Chart/RadarChart.tsx +202 -218
- package/src/components/Chart/ScatterChart.tsx +111 -97
- package/src/components/Chart/TreemapChart.tsx +147 -222
- package/src/components/Chart/WaterfallChart.tsx +253 -291
- package/src/components/Chart/index.ts +11 -9
- package/src/components/Chart/types.ts +85 -9
- package/src/components/Chart/utils.ts +66 -0
- package/src/components/ColorModeToggle/ColorModeToggle.tsx +6 -3
- package/src/components/Countdown/Countdown.tsx +4 -0
- package/src/components/DataTable/DataTable.tsx +2 -1
- package/src/components/DatePicker/DatePicker.stories.tsx +0 -11
- package/src/components/DatePicker/DatePicker.tsx +3 -9
- package/src/components/DatePicker/types.ts +5 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +32 -25
- package/src/components/Dropdown/Dropdown.tsx +26 -28
- package/src/components/EdgePanel/EdgePanel.stories.tsx +13 -15
- package/src/components/EdgePanel/EdgePanel.tsx +20 -5
- package/src/components/Footer/Footer.stories.tsx +187 -60
- package/src/components/Footer/Footer.test.tsx +134 -0
- package/src/components/Footer/Footer.tsx +133 -34
- package/src/components/Footer/FooterLink.tsx +1 -1
- package/src/components/Footer/FooterSection.tsx +53 -36
- package/src/components/Footer/FooterSocialLink.tsx +32 -29
- package/src/components/Footer/README.md +82 -3
- package/src/components/Footer/index.ts +1 -1
- package/src/components/Form/Checkbox.stories.tsx +13 -5
- package/src/components/Form/Checkbox.tsx +3 -6
- package/src/components/Form/Form.stories.tsx +10 -3
- package/src/components/Form/Form.tsx +2 -0
- package/src/components/Form/FormGroup.tsx +2 -1
- package/src/components/Form/Input.stories.tsx +12 -11
- package/src/components/Form/Input.tsx +97 -95
- package/src/components/Form/Radio.stories.tsx +22 -7
- package/src/components/Form/Radio.tsx +3 -6
- package/src/components/Form/Select.stories.tsx +21 -6
- package/src/components/Form/Select.tsx +3 -5
- package/src/components/Form/Textarea.stories.tsx +13 -11
- package/src/components/Form/Textarea.tsx +88 -86
- package/src/components/Hero/Hero.stories.tsx +2 -3
- package/src/components/Hero/Hero.tsx +5 -6
- package/src/components/Icon/Icon.tsx +12 -1
- package/src/components/List/List.tsx +2 -1
- package/src/components/List/ListGroup.tsx +2 -1
- package/src/components/Messages/Messages.tsx +3 -2
- package/src/components/Modal/Modal.stories.tsx +48 -34
- package/src/components/Modal/Modal.tsx +19 -23
- package/src/components/Navigation/Menu/MegaMenu.tsx +2 -2
- package/src/components/Navigation/Menu/Menu.tsx +2 -2
- package/src/components/Navigation/Nav/Nav.tsx +6 -1
- package/src/components/Navigation/Nav/NavDropdown.tsx +10 -1
- package/src/components/Navigation/Navbar/Navbar.tsx +4 -1
- package/src/components/Navigation/SideMenu/SideMenu.tsx +3 -2
- package/src/components/Pagination/Pagination.stories.tsx +13 -6
- package/src/components/Pagination/Pagination.tsx +7 -6
- package/src/components/PhotoViewer/PhotoViewer.tsx +2 -1
- package/src/components/Popover/Popover.stories.tsx +32 -24
- package/src/components/Popover/Popover.tsx +4 -1
- package/src/components/ProductReview/ProductReview.tsx +8 -2
- package/src/components/Progress/Progress.tsx +2 -1
- package/src/components/Rating/Rating.stories.tsx +11 -6
- package/src/components/Rating/Rating.tsx +3 -5
- package/src/components/River/River.tsx +5 -5
- package/src/components/SectionIntro/SectionIntro.tsx +8 -2
- package/src/components/Slider/Slider.stories.tsx +4 -4
- package/src/components/Slider/Slider.tsx +4 -3
- package/src/components/Spinner/Spinner.tsx +2 -1
- package/src/components/Steps/Steps.stories.tsx +5 -4
- package/src/components/Steps/Steps.tsx +8 -5
- package/src/components/Tab/Tab.stories.tsx +4 -3
- package/src/components/Tab/Tab.tsx +8 -6
- package/src/components/Testimonial/Testimonial.tsx +8 -2
- package/src/components/Todo/Todo.tsx +2 -1
- package/src/components/Toggle/Toggle.stories.tsx +5 -4
- package/src/components/Toggle/Toggle.tsx +8 -5
- package/src/components/Tooltip/Tooltip.stories.tsx +40 -30
- package/src/components/Tooltip/Tooltip.tsx +9 -2
- package/src/components/Upload/Upload.stories.tsx +252 -0
- package/src/components/Upload/Upload.tsx +92 -53
- package/src/components/VideoPlayer/VideoPlayer.tsx +3 -1
- package/src/components/index.ts +0 -4
- package/src/layouts/Grid/Grid.stories.tsx +10 -23
- package/src/layouts/Grid/Grid.tsx +20 -1
- package/src/layouts/Grid/GridCol.tsx +76 -48
- package/src/lib/composables/useAtomixGlass.ts +861 -44
- package/src/lib/composables/useBarChart.ts +13 -6
- package/src/lib/composables/useChart.ts +17 -13
- package/src/lib/composables/useChartExport.ts +19 -78
- package/src/lib/composables/useChartToolbar.ts +0 -1
- package/src/lib/composables/useEdgePanel.ts +111 -103
- package/src/lib/composables/useFooter.ts +3 -3
- package/src/lib/composables/useGlassContainer.ts +16 -7
- package/src/lib/composables/useLineChart.ts +8 -1
- package/src/lib/composables/useRiver.ts +5 -0
- package/src/lib/composables/useSlider.ts +62 -24
- package/src/lib/composables/useVideoPlayer.ts +60 -63
- package/src/lib/constants/components.ts +146 -32
- package/src/lib/types/components.ts +258 -10
- package/src/lib/utils/displacement-generator.ts +55 -49
- package/src/lib/utils/icons.ts +1 -1
- package/src/lib/utils/index.ts +16 -10
- package/src/styles/01-settings/_settings.accordion.scss +19 -19
- package/src/styles/01-settings/_settings.animations.scss +5 -5
- package/src/styles/01-settings/_settings.avatar-group.scss +1 -1
- package/src/styles/01-settings/_settings.avatar.scss +17 -17
- package/src/styles/01-settings/_settings.background.scss +1 -4
- package/src/styles/01-settings/_settings.badge.scss +1 -1
- package/src/styles/01-settings/_settings.breadcrumb.scss +1 -1
- package/src/styles/01-settings/_settings.card.scss +1 -1
- package/src/styles/01-settings/_settings.chart.scss +65 -2
- package/src/styles/01-settings/_settings.dropdown.scss +1 -1
- package/src/styles/01-settings/_settings.footer.scss +35 -42
- package/src/styles/01-settings/_settings.input.scss +1 -1
- package/src/styles/01-settings/_settings.list.scss +1 -1
- package/src/styles/01-settings/_settings.rating.scss +1 -1
- package/src/styles/01-settings/_settings.tabs.scss +1 -1
- package/src/styles/01-settings/_settings.upload.scss +6 -5
- package/src/styles/02-tools/_tools.animations.scss +4 -5
- package/src/styles/02-tools/_tools.background.scss +1 -13
- package/src/styles/02-tools/_tools.glass.scss +0 -1
- package/src/styles/02-tools/_tools.utility-api.scss +42 -34
- package/src/styles/03-generic/_generic.root.scss +1 -4
- package/src/styles/04-elements/_elements.body.scss +0 -1
- package/src/styles/06-components/_components.atomix-glass.scss +216 -39
- package/src/styles/06-components/_components.badge.scss +6 -8
- package/src/styles/06-components/_components.button.scss +8 -3
- package/src/styles/06-components/_components.card.scss +2 -14
- package/src/styles/06-components/_components.chart.scss +969 -1449
- package/src/styles/06-components/_components.dropdown.scss +19 -7
- package/src/styles/06-components/_components.edge-panel.scss +4 -2
- package/src/styles/06-components/_components.footer.scss +166 -85
- package/src/styles/06-components/_components.input.scss +8 -9
- package/src/styles/06-components/_components.list.scss +1 -0
- package/src/styles/06-components/_components.modal.scss +5 -3
- package/src/styles/06-components/_components.skeleton.scss +8 -6
- package/src/styles/06-components/_components.upload.scss +219 -4
- package/src/styles/06-components/old.chart.styles.scss +1 -30
- package/src/styles/99-utilities/_utilities.opacity.scss +1 -1
- package/src/styles/99-utilities/_utilities.scss +1 -1
- package/src/components/Chart/AdvancedChart.tsx +0 -624
- package/src/components/Chart/LineChartNew.tsx +0 -167
- package/src/components/Chart/RealTimeChart.tsx +0 -436
- package/src/components/DatePicker/DatePicker copy.tsx +0 -551
|
@@ -6,99 +6,101 @@ import { AtomixGlass } from '../AtomixGlass/AtomixGlass';
|
|
|
6
6
|
/**
|
|
7
7
|
* Textarea - A component for multiline text input
|
|
8
8
|
*/
|
|
9
|
-
export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
9
|
+
export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
10
|
+
(
|
|
11
|
+
{
|
|
12
|
+
value,
|
|
13
|
+
onChange,
|
|
14
|
+
onBlur,
|
|
15
|
+
onFocus,
|
|
16
|
+
placeholder,
|
|
17
|
+
className = '',
|
|
18
|
+
style,
|
|
19
|
+
disabled = false,
|
|
20
|
+
required = false,
|
|
21
|
+
readOnly = false,
|
|
22
|
+
id,
|
|
23
|
+
name,
|
|
24
|
+
rows = 4,
|
|
25
|
+
cols,
|
|
26
|
+
maxLength,
|
|
27
|
+
minLength,
|
|
28
|
+
size = 'md',
|
|
29
|
+
variant,
|
|
30
|
+
invalid = false,
|
|
31
|
+
valid = false,
|
|
32
|
+
autoFocus = false,
|
|
33
|
+
ariaLabel,
|
|
34
|
+
ariaDescribedBy,
|
|
35
|
+
glass,
|
|
36
|
+
},
|
|
37
|
+
ref
|
|
38
|
+
) => {
|
|
39
|
+
const { generateTextareaClass } = useTextarea({
|
|
40
|
+
size,
|
|
41
|
+
variant,
|
|
42
|
+
disabled,
|
|
43
|
+
invalid,
|
|
44
|
+
valid,
|
|
45
|
+
});
|
|
41
46
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
const textareaClass = generateTextareaClass({
|
|
48
|
+
className: `${className} ${glass ? 'c-input--glass' : ''}`.trim(),
|
|
49
|
+
size,
|
|
50
|
+
variant,
|
|
51
|
+
disabled,
|
|
52
|
+
invalid,
|
|
53
|
+
valid,
|
|
54
|
+
});
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
// Custom styles for glass effect
|
|
57
|
+
const glassStyles = glass ? {} : {};
|
|
53
58
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
59
|
+
const textareaElement = (
|
|
60
|
+
<textarea
|
|
61
|
+
ref={ref}
|
|
62
|
+
className={textareaClass}
|
|
63
|
+
value={value}
|
|
64
|
+
onChange={onChange}
|
|
65
|
+
onBlur={onBlur}
|
|
66
|
+
onFocus={onFocus}
|
|
67
|
+
placeholder={placeholder}
|
|
68
|
+
disabled={disabled}
|
|
69
|
+
required={required}
|
|
70
|
+
readOnly={readOnly}
|
|
71
|
+
id={id}
|
|
72
|
+
name={name}
|
|
73
|
+
rows={rows}
|
|
74
|
+
cols={cols}
|
|
75
|
+
maxLength={maxLength}
|
|
76
|
+
minLength={minLength}
|
|
77
|
+
autoFocus={autoFocus}
|
|
78
|
+
aria-label={ariaLabel}
|
|
79
|
+
aria-describedby={ariaDescribedBy}
|
|
80
|
+
aria-invalid={invalid}
|
|
81
|
+
style={glass ? { ...glassStyles, ...style } : style}
|
|
82
|
+
/>
|
|
83
|
+
);
|
|
79
84
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
if (glass) {
|
|
86
|
+
// Default glass settings for textareas
|
|
87
|
+
const defaultGlassProps = {
|
|
88
|
+
displacementScale: 60,
|
|
89
|
+
blurAmount: 1,
|
|
90
|
+
saturation: 180,
|
|
91
|
+
aberrationIntensity: 1,
|
|
92
|
+
cornerRadius: 8,
|
|
93
|
+
mode: 'shader' as const,
|
|
94
|
+
};
|
|
90
95
|
|
|
91
|
-
|
|
96
|
+
const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
92
97
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
{textareaElement}
|
|
96
|
-
</AtomixGlass>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
98
|
+
return <AtomixGlass {...glassProps}>{textareaElement}</AtomixGlass>;
|
|
99
|
+
}
|
|
99
100
|
|
|
100
|
-
|
|
101
|
-
}
|
|
101
|
+
return textareaElement;
|
|
102
|
+
}
|
|
103
|
+
);
|
|
102
104
|
|
|
103
105
|
Textarea.displayName = 'Textarea';
|
|
104
106
|
|
|
@@ -178,7 +178,7 @@ export const WithCustomGlassEffect: Story = {
|
|
|
178
178
|
aberrationIntensity: 0,
|
|
179
179
|
cornerRadius: 45,
|
|
180
180
|
mode: 'standard',
|
|
181
|
-
elasticity: .2,
|
|
181
|
+
elasticity: 0.2,
|
|
182
182
|
showBorderEffects: true,
|
|
183
183
|
showHoverEffects: true,
|
|
184
184
|
onClick: () => {
|
|
@@ -190,7 +190,6 @@ export const WithCustomGlassEffect: Story = {
|
|
|
190
190
|
},
|
|
191
191
|
};
|
|
192
192
|
|
|
193
|
-
|
|
194
193
|
/**
|
|
195
194
|
* Hero with left-aligned content and image on right
|
|
196
195
|
*/
|
|
@@ -345,4 +344,4 @@ export const VideoBackgroundWithImage: Story = {
|
|
|
345
344
|
imageSrc: 'https://picsum.photos/id/180/712/500',
|
|
346
345
|
imageAlt: 'Product showcase',
|
|
347
346
|
},
|
|
348
|
-
};
|
|
347
|
+
};
|
|
@@ -19,6 +19,7 @@ export const Hero: React.FC<HeroProps> = ({
|
|
|
19
19
|
contentColSize = 5,
|
|
20
20
|
contentWidth,
|
|
21
21
|
className = '',
|
|
22
|
+
style,
|
|
22
23
|
parallax = false,
|
|
23
24
|
parallaxIntensity = 0.5,
|
|
24
25
|
videoBackground,
|
|
@@ -54,11 +55,10 @@ export const Hero: React.FC<HeroProps> = ({
|
|
|
54
55
|
});
|
|
55
56
|
|
|
56
57
|
// Create custom style for hero element with content width if provided
|
|
57
|
-
const heroStyle: React.CSSProperties | undefined =
|
|
58
|
-
?
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
: undefined;
|
|
58
|
+
const heroStyle: React.CSSProperties | undefined = {
|
|
59
|
+
...(contentWidth ? { '--atomix-hero-content-width': contentWidth } : {}),
|
|
60
|
+
...style,
|
|
61
|
+
};
|
|
62
62
|
|
|
63
63
|
const renderVideoBackground = () => {
|
|
64
64
|
if (!videoBackground) return null;
|
|
@@ -128,7 +128,6 @@ export const Hero: React.FC<HeroProps> = ({
|
|
|
128
128
|
cornerRadius={8}
|
|
129
129
|
overLight={false}
|
|
130
130
|
mode="standard"
|
|
131
|
-
|
|
132
131
|
>
|
|
133
132
|
<div className="u-p-4">
|
|
134
133
|
{subtitle && <p className={HERO.SELECTORS.SUBTITLE.replace('.', '')}>{subtitle}</p>}
|
|
@@ -36,6 +36,11 @@ export interface IconProps {
|
|
|
36
36
|
*/
|
|
37
37
|
className?: string;
|
|
38
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Custom style
|
|
41
|
+
*/
|
|
42
|
+
style?: React.CSSProperties;
|
|
43
|
+
|
|
39
44
|
/**
|
|
40
45
|
* Alt text for accessibility
|
|
41
46
|
*/
|
|
@@ -60,6 +65,7 @@ export const Icon: React.FC<IconProps> = ({
|
|
|
60
65
|
weight = 'regular',
|
|
61
66
|
color,
|
|
62
67
|
className = '',
|
|
68
|
+
style,
|
|
63
69
|
alt,
|
|
64
70
|
}) => {
|
|
65
71
|
// Get the icon component from Phosphor
|
|
@@ -76,7 +82,12 @@ export const Icon: React.FC<IconProps> = ({
|
|
|
76
82
|
const pixelSize = typeof size === 'string' ? sizeMap[size as IconSize] || 24 : size;
|
|
77
83
|
|
|
78
84
|
return (
|
|
79
|
-
<span
|
|
85
|
+
<span
|
|
86
|
+
className={`c-icon c-icon--${size} ${className}`}
|
|
87
|
+
style={style}
|
|
88
|
+
aria-hidden={!alt}
|
|
89
|
+
title={alt}
|
|
90
|
+
>
|
|
80
91
|
<IconComponent size={pixelSize} weight={weight} color={color} aria-label={alt} />
|
|
81
92
|
</span>
|
|
82
93
|
);
|
|
@@ -6,6 +6,7 @@ export const List: React.FC<ListProps> = ({
|
|
|
6
6
|
children,
|
|
7
7
|
variant = 'default',
|
|
8
8
|
className = '',
|
|
9
|
+
style,
|
|
9
10
|
...props
|
|
10
11
|
}) => {
|
|
11
12
|
// Generate CSS classes
|
|
@@ -17,7 +18,7 @@ export const List: React.FC<ListProps> = ({
|
|
|
17
18
|
const ListElement = ['number', 'text'].includes(variant) ? 'ol' : 'ul';
|
|
18
19
|
|
|
19
20
|
return (
|
|
20
|
-
<ListElement className={listClasses} {...props}>
|
|
21
|
+
<ListElement className={listClasses} style={style} {...props}>
|
|
21
22
|
{React.Children.map(children, child => {
|
|
22
23
|
if (React.isValidElement(child)) {
|
|
23
24
|
return <li className="c-list__item">{child}</li>;
|
|
@@ -7,6 +7,7 @@ import { List } from './List';
|
|
|
7
7
|
export const ListGroup: React.FC<ListGroupProps> = ({
|
|
8
8
|
children,
|
|
9
9
|
className = '',
|
|
10
|
+
style,
|
|
10
11
|
variant = 'default',
|
|
11
12
|
}) => {
|
|
12
13
|
// Generate CSS classes
|
|
@@ -18,7 +19,7 @@ export const ListGroup: React.FC<ListGroupProps> = ({
|
|
|
18
19
|
) as React.ReactElement[];
|
|
19
20
|
|
|
20
21
|
return (
|
|
21
|
-
<div className={listGroupClasses}>
|
|
22
|
+
<div className={listGroupClasses} style={style}>
|
|
22
23
|
{validLists.map((child, index) => {
|
|
23
24
|
const childProps = child.props as any;
|
|
24
25
|
return React.cloneElement(child as React.ReactElement<any>, {
|
|
@@ -18,6 +18,7 @@ export const Messages: React.FC<MessagesProps> = ({
|
|
|
18
18
|
onSendMessage,
|
|
19
19
|
placeholder = 'Type a message',
|
|
20
20
|
className = '',
|
|
21
|
+
style,
|
|
21
22
|
bodyHeight,
|
|
22
23
|
disabled = false,
|
|
23
24
|
id,
|
|
@@ -175,7 +176,7 @@ export const Messages: React.FC<MessagesProps> = ({
|
|
|
175
176
|
return (
|
|
176
177
|
<div
|
|
177
178
|
className={messagesClasses}
|
|
178
|
-
style={{ '--atomix-messages-width': width } as React.CSSProperties}
|
|
179
|
+
style={{ '--atomix-messages-width': width, ...style } as React.CSSProperties}
|
|
179
180
|
id={messagesId}
|
|
180
181
|
aria-label="Chat messages"
|
|
181
182
|
role="log"
|
|
@@ -196,7 +197,7 @@ export const Messages: React.FC<MessagesProps> = ({
|
|
|
196
197
|
return (
|
|
197
198
|
<div
|
|
198
199
|
className={messagesClasses}
|
|
199
|
-
style={{ '--atomix-messages-width': width } as React.CSSProperties}
|
|
200
|
+
style={{ '--atomix-messages-width': width, ...style } as React.CSSProperties}
|
|
200
201
|
id={messagesId}
|
|
201
202
|
aria-label="Chat messages"
|
|
202
203
|
role="log"
|
|
@@ -313,23 +313,27 @@ export const GlassModal: Story = {
|
|
|
313
313
|
glass={true}
|
|
314
314
|
>
|
|
315
315
|
<p>
|
|
316
|
-
This modal demonstrates the glass morphism effect with a translucent, frosted
|
|
317
|
-
The glass effect creates a modern, elegant look that works well over
|
|
316
|
+
This modal demonstrates the glass morphism effect with a translucent, frosted
|
|
317
|
+
appearance. The glass effect creates a modern, elegant look that works well over
|
|
318
|
+
colorful backgrounds.
|
|
318
319
|
</p>
|
|
319
320
|
<p>
|
|
320
|
-
The glass effect includes displacement, blur, and chromatic aberration for a premium
|
|
321
|
+
The glass effect includes displacement, blur, and chromatic aberration for a premium
|
|
322
|
+
feel.
|
|
321
323
|
</p>
|
|
322
324
|
</Modal>
|
|
323
325
|
</>
|
|
324
326
|
);
|
|
325
327
|
},
|
|
326
328
|
decorators: [
|
|
327
|
-
|
|
328
|
-
<div
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
329
|
+
Story => (
|
|
330
|
+
<div
|
|
331
|
+
style={{
|
|
332
|
+
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
|
333
|
+
minHeight: '100vh',
|
|
334
|
+
padding: '2rem',
|
|
335
|
+
}}
|
|
336
|
+
>
|
|
333
337
|
<Story />
|
|
334
338
|
</div>
|
|
335
339
|
),
|
|
@@ -359,14 +363,16 @@ export const GlassModalCustom: Story = {
|
|
|
359
363
|
onOpenChange={setIsOpen}
|
|
360
364
|
title="Custom Glass Modal"
|
|
361
365
|
subtitle="This modal has customized glass effect settings."
|
|
362
|
-
glass={
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
366
|
+
glass={
|
|
367
|
+
{
|
|
368
|
+
displacementScale: 120,
|
|
369
|
+
blurAmount: 3,
|
|
370
|
+
saturation: 200,
|
|
371
|
+
aberrationIntensity: 2,
|
|
372
|
+
cornerRadius: 20,
|
|
373
|
+
mode: 'polar',
|
|
374
|
+
} as any
|
|
375
|
+
}
|
|
370
376
|
footer={
|
|
371
377
|
<>
|
|
372
378
|
<div
|
|
@@ -392,22 +398,26 @@ export const GlassModalCustom: Story = {
|
|
|
392
398
|
}
|
|
393
399
|
>
|
|
394
400
|
<p>
|
|
395
|
-
This modal uses custom glass settings with enhanced displacement, blur, and chromatic
|
|
396
|
-
The polar mode creates a different visual effect compared to the standard
|
|
401
|
+
This modal uses custom glass settings with enhanced displacement, blur, and chromatic
|
|
402
|
+
aberration. The polar mode creates a different visual effect compared to the standard
|
|
403
|
+
shader mode.
|
|
397
404
|
</p>
|
|
398
405
|
</Modal>
|
|
399
406
|
</>
|
|
400
407
|
);
|
|
401
408
|
},
|
|
402
409
|
decorators: [
|
|
403
|
-
|
|
404
|
-
<div
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
410
|
+
Story => (
|
|
411
|
+
<div
|
|
412
|
+
style={{
|
|
413
|
+
background:
|
|
414
|
+
'url(https://images.unsplash.com/photo-1744872665943-fd335d371059?q=80&w=3024&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D)',
|
|
415
|
+
height: '100vh',
|
|
416
|
+
width: '100vw',
|
|
417
|
+
backgroundSize: 'cover',
|
|
418
|
+
backgroundPosition: 'center',
|
|
419
|
+
}}
|
|
420
|
+
>
|
|
411
421
|
<Story />
|
|
412
422
|
</div>
|
|
413
423
|
),
|
|
@@ -502,18 +512,22 @@ export const GlassModalSizes: Story = {
|
|
|
502
512
|
}
|
|
503
513
|
>
|
|
504
514
|
<p>This is a {size.toUpperCase()} sized glass modal.</p>
|
|
505
|
-
<p>
|
|
515
|
+
<p>
|
|
516
|
+
The glass effect adapts to different modal sizes while maintaining its visual appeal.
|
|
517
|
+
</p>
|
|
506
518
|
</Modal>
|
|
507
519
|
</div>
|
|
508
520
|
);
|
|
509
521
|
},
|
|
510
522
|
decorators: [
|
|
511
|
-
|
|
512
|
-
<div
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
523
|
+
Story => (
|
|
524
|
+
<div
|
|
525
|
+
style={{
|
|
526
|
+
background: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
|
|
527
|
+
minHeight: '100vh',
|
|
528
|
+
padding: '2rem',
|
|
529
|
+
}}
|
|
530
|
+
>
|
|
517
531
|
<Story />
|
|
518
532
|
</div>
|
|
519
533
|
),
|
|
@@ -88,6 +88,7 @@ export const Modal: React.FC<ModalProps> = ({
|
|
|
88
88
|
backdrop = true,
|
|
89
89
|
keyboard = true,
|
|
90
90
|
className = '',
|
|
91
|
+
style,
|
|
91
92
|
closeButton = true,
|
|
92
93
|
footer,
|
|
93
94
|
glass,
|
|
@@ -184,7 +185,7 @@ export const Modal: React.FC<ModalProps> = ({
|
|
|
184
185
|
<div
|
|
185
186
|
ref={modalRef}
|
|
186
187
|
className={modalClasses}
|
|
187
|
-
style={{ display: isOpenState ? 'block' : 'none' }}
|
|
188
|
+
style={{ display: isOpenState ? 'block' : 'none', ...style }}
|
|
188
189
|
role="dialog"
|
|
189
190
|
aria-modal="true"
|
|
190
191
|
aria-hidden={!isOpenState}
|
|
@@ -192,28 +193,23 @@ export const Modal: React.FC<ModalProps> = ({
|
|
|
192
193
|
>
|
|
193
194
|
<div ref={backdropRef} className="c-modal__backdrop" onClick={handleBackdropClick} />
|
|
194
195
|
<div ref={dialogRef} className="c-modal__dialog">
|
|
195
|
-
{glass
|
|
196
|
-
// Default glass settings for modals
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
<AtomixGlass {...glassProps}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
);
|
|
213
|
-
})()
|
|
214
|
-
) : (
|
|
215
|
-
modalContent
|
|
216
|
-
)}
|
|
196
|
+
{glass
|
|
197
|
+
? // Default glass settings for modals
|
|
198
|
+
(() => {
|
|
199
|
+
const defaultGlassProps = {
|
|
200
|
+
displacementScale: 100,
|
|
201
|
+
blurAmount: 2,
|
|
202
|
+
aberrationIntensity: 1,
|
|
203
|
+
cornerRadius: 12,
|
|
204
|
+
mode: 'shader' as const,
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const glassProps =
|
|
208
|
+
glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
209
|
+
|
|
210
|
+
return <AtomixGlass {...glassProps}>{modalContent}</AtomixGlass>;
|
|
211
|
+
})()
|
|
212
|
+
: modalContent}
|
|
217
213
|
</div>
|
|
218
214
|
</div>
|
|
219
215
|
);
|
|
@@ -8,9 +8,9 @@ import { Icon } from '../../Icon/Icon';
|
|
|
8
8
|
import { mapIconName } from './Menu'; // Import the mapping function
|
|
9
9
|
|
|
10
10
|
export const MegaMenu: React.FC<MegaMenuProps> = forwardRef<HTMLDivElement, MegaMenuProps>(
|
|
11
|
-
({ children, className = '', disabled = false }, ref) => {
|
|
11
|
+
({ children, className = '', style, disabled = false }, ref) => {
|
|
12
12
|
return (
|
|
13
|
-
<div ref={ref} className={`c-menu c-menu--mega ${className}`}>
|
|
13
|
+
<div ref={ref} className={`c-menu c-menu--mega ${className}`} style={style}>
|
|
14
14
|
<div className="c-menu__container">
|
|
15
15
|
<div className="c-menu__grid o-grid">
|
|
16
16
|
{React.Children.map(children, child => {
|
|
@@ -3,9 +3,9 @@ import { MenuProps, MenuItemProps } from '../../../lib/types/components';
|
|
|
3
3
|
import { Icon } from '../../Icon/Icon';
|
|
4
4
|
|
|
5
5
|
export const Menu: React.FC<MenuProps> = forwardRef<HTMLDivElement, MenuProps>(
|
|
6
|
-
({ children, className = '', disabled = false }, ref) => {
|
|
6
|
+
({ children, className = '', style, disabled = false }, ref) => {
|
|
7
7
|
return (
|
|
8
|
-
<div ref={ref} className={`c-menu ${className}`}>
|
|
8
|
+
<div ref={ref} className={`c-menu ${className}`} style={style}>
|
|
9
9
|
<ul className="c-menu__list" role="menu">
|
|
10
10
|
{React.Children.map(children, child => {
|
|
11
11
|
if (React.isValidElement(child)) {
|
|
@@ -28,7 +28,12 @@ export const Nav = forwardRef<HTMLUListElement, NavProps>(
|
|
|
28
28
|
const navClass = generateNavClass({ alignment, variant, className });
|
|
29
29
|
|
|
30
30
|
const navContent = (
|
|
31
|
-
<ul
|
|
31
|
+
<ul
|
|
32
|
+
ref={ref}
|
|
33
|
+
className={navClass + (glass ? ' c-nav--glass' : '')}
|
|
34
|
+
role="menubar"
|
|
35
|
+
aria-orientation="horizontal"
|
|
36
|
+
>
|
|
32
37
|
{React.Children.map(children, child => {
|
|
33
38
|
if (React.isValidElement(child)) {
|
|
34
39
|
const childProps = child.props as any;
|
|
@@ -6,7 +6,15 @@ import { Icon } from '../../Icon/Icon';
|
|
|
6
6
|
|
|
7
7
|
export const NavDropdown: React.FC<NavDropdownProps> = forwardRef<HTMLLIElement, NavDropdownProps>(
|
|
8
8
|
(
|
|
9
|
-
{
|
|
9
|
+
{
|
|
10
|
+
title,
|
|
11
|
+
children,
|
|
12
|
+
alignment = 'start',
|
|
13
|
+
megaMenu = false,
|
|
14
|
+
className = '',
|
|
15
|
+
style,
|
|
16
|
+
disabled = false,
|
|
17
|
+
},
|
|
10
18
|
ref
|
|
11
19
|
) => {
|
|
12
20
|
const { generateDropdownMenuClass, getIconName } = useNavDropdown({
|
|
@@ -90,6 +98,7 @@ export const NavDropdown: React.FC<NavDropdownProps> = forwardRef<HTMLLIElement,
|
|
|
90
98
|
href="#"
|
|
91
99
|
onClick={handleToggle}
|
|
92
100
|
aria-expanded={isActive}
|
|
101
|
+
style={style}
|
|
93
102
|
>
|
|
94
103
|
{titleWithIcon}
|
|
95
104
|
{menuContent}
|
|
@@ -30,6 +30,7 @@ export const Navbar = forwardRef<HTMLElement, NavbarProps>(
|
|
|
30
30
|
expanded,
|
|
31
31
|
onToggle,
|
|
32
32
|
className = '',
|
|
33
|
+
style,
|
|
33
34
|
disabled = false,
|
|
34
35
|
backdrop = false,
|
|
35
36
|
closeOnOutsideClick = true,
|
|
@@ -159,6 +160,7 @@ export const Navbar = forwardRef<HTMLElement, NavbarProps>(
|
|
|
159
160
|
left: 0,
|
|
160
161
|
right: 0,
|
|
161
162
|
top: 0,
|
|
163
|
+
zIndex: 1000,
|
|
162
164
|
}}
|
|
163
165
|
>
|
|
164
166
|
<nav
|
|
@@ -166,6 +168,7 @@ export const Navbar = forwardRef<HTMLElement, NavbarProps>(
|
|
|
166
168
|
className={navbarClass + ' c-navbar--glass'}
|
|
167
169
|
aria-label={ariaLabel}
|
|
168
170
|
id={id}
|
|
171
|
+
style={style}
|
|
169
172
|
>
|
|
170
173
|
{navbarContent}
|
|
171
174
|
</nav>
|
|
@@ -174,7 +177,7 @@ export const Navbar = forwardRef<HTMLElement, NavbarProps>(
|
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
return (
|
|
177
|
-
<nav ref={ref} className={navbarClass} aria-label={ariaLabel} id={id}>
|
|
180
|
+
<nav ref={ref} className={navbarClass} aria-label={ariaLabel} id={id} style={style}>
|
|
178
181
|
{navbarContent}
|
|
179
182
|
</nav>
|
|
180
183
|
);
|
|
@@ -30,6 +30,7 @@ export const SideMenu = forwardRef<HTMLDivElement, SideMenuProps>(
|
|
|
30
30
|
onToggle,
|
|
31
31
|
collapsible = true,
|
|
32
32
|
className = '',
|
|
33
|
+
style,
|
|
33
34
|
disabled = false,
|
|
34
35
|
toggleIcon,
|
|
35
36
|
id,
|
|
@@ -105,7 +106,7 @@ export const SideMenu = forwardRef<HTMLDivElement, SideMenuProps>(
|
|
|
105
106
|
const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
|
|
106
107
|
return (
|
|
107
108
|
<AtomixGlass {...glassProps}>
|
|
108
|
-
<div ref={ref} className={sideMenuClass + ' c-side-menu--glass'} id={id}>
|
|
109
|
+
<div ref={ref} className={sideMenuClass + ' c-side-menu--glass'} id={id} style={style}>
|
|
109
110
|
{sideMenuContent}
|
|
110
111
|
</div>
|
|
111
112
|
</AtomixGlass>
|
|
@@ -113,7 +114,7 @@ export const SideMenu = forwardRef<HTMLDivElement, SideMenuProps>(
|
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
return (
|
|
116
|
-
<div ref={ref} className={sideMenuClass} id={id}>
|
|
117
|
+
<div ref={ref} className={sideMenuClass} id={id} style={style}>
|
|
117
118
|
{sideMenuContent}
|
|
118
119
|
</div>
|
|
119
120
|
);
|