@shohojdhara/atomix 0.6.4 → 0.6.6
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 +117 -38
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +1 -1
- package/dist/atomix.min.css.map +1 -1
- package/dist/atomix.umd.js +1 -1
- package/dist/atomix.umd.js.map +1 -1
- package/dist/atomix.umd.min.js +1 -1
- package/dist/charts.d.ts +30 -1
- package/dist/charts.js +625 -846
- package/dist/charts.js.map +1 -1
- package/dist/core.d.ts +30 -1
- package/dist/core.js +659 -873
- package/dist/core.js.map +1 -1
- package/dist/forms.d.ts +30 -1
- package/dist/forms.js +1171 -1402
- package/dist/forms.js.map +1 -1
- package/dist/heavy.d.ts +31 -89
- package/dist/heavy.js +975 -1195
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +383 -140
- package/dist/index.esm.js +1567 -1679
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1556 -1667
- 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 +1 -1
- package/src/components/Accordion/Accordion.tsx +2 -5
- package/src/components/AtomixGlass/AtomixGlass.test.tsx +14 -16
- package/src/components/AtomixGlass/AtomixGlass.tsx +137 -364
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +32 -251
- package/src/components/AtomixGlass/GlassFilter.tsx +62 -68
- package/src/components/AtomixGlass/README.md +2 -1
- package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +19 -18
- package/src/components/AtomixGlass/glass-border-styles.test.ts +58 -0
- package/src/components/AtomixGlass/glass-border-styles.ts +136 -0
- package/src/components/AtomixGlass/glass-utils.ts +456 -22
- package/src/components/AtomixGlass/shader-utils.ts +19 -77
- package/src/components/AtomixGlass/stories/AnimationFeatures.stories.tsx +158 -537
- package/src/components/AtomixGlass/stories/Border.stories.tsx +149 -0
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +229 -89
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +29 -340
- package/src/components/AtomixGlass/stories/argTypes.ts +30 -13
- package/src/components/AtomixGlass/stories/premium-presets.ts +206 -0
- package/src/components/AtomixGlass/stories/shared-components.tsx +52 -8
- package/src/components/Badge/Badge.tsx +4 -4
- package/src/components/Button/Button.tsx +2 -6
- package/src/components/Callout/Callout.test.tsx +4 -3
- package/src/components/Callout/Callout.tsx +2 -5
- package/src/components/Dropdown/Dropdown.tsx +3 -7
- package/src/components/Form/Checkbox.tsx +2 -8
- package/src/components/Form/Input.tsx +2 -9
- package/src/components/Form/Radio.tsx +2 -9
- package/src/components/Form/Select.test.tsx +6 -6
- package/src/components/Form/Select.tsx +2 -7
- package/src/components/Form/Textarea.stories.tsx +5 -5
- package/src/components/Form/Textarea.tsx +2 -9
- package/src/components/Messages/Messages.tsx +2 -8
- package/src/components/Modal/Modal.tsx +4 -5
- package/src/components/Navigation/Nav/Nav.tsx +2 -6
- package/src/components/Navigation/Navbar/Navbar.tsx +2 -9
- package/src/components/Navigation/SideMenu/SideMenu.tsx +2 -6
- package/src/components/Pagination/Pagination.tsx +2 -10
- package/src/components/Popover/Popover.tsx +2 -9
- package/src/components/Progress/Progress.tsx +2 -7
- package/src/components/Rating/Rating.tsx +2 -10
- package/src/components/Spinner/Spinner.tsx +2 -7
- package/src/components/Steps/Steps.tsx +2 -10
- package/src/components/Tabs/Tabs.tsx +2 -9
- package/src/components/Toggle/Toggle.tsx +2 -10
- package/src/components/Tooltip/Tooltip.tsx +2 -5
- package/src/lib/composables/useAtomixGlass.ts +42 -143
- package/src/lib/composables/useAtomixGlassStyles.ts +61 -77
- package/src/lib/composables/usePerformanceMonitor.ts +5 -66
- package/src/lib/constants/components.ts +363 -46
- package/src/lib/types/components.ts +33 -1
- package/src/styles/01-settings/_settings.atomix-glass.scss +66 -28
- package/src/styles/02-tools/_tools.button.scss +51 -42
- package/src/styles/02-tools/_tools.glass.scss +45 -3
- package/src/styles/06-components/_components.atomix-glass.scss +116 -79
- package/src/components/AtomixGlass/PerformanceDashboard.tsx +0 -171
- package/src/components/AtomixGlass/animation-system.ts +0 -578
- package/src/components/AtomixGlass/deprecated/AtomixGlass.deprecated.tsx +0 -390
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Liquid glass border variants — conic rim, inner highlight, light/dark contexts.
|
|
3
|
+
*/
|
|
4
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import AtomixGlass from '../AtomixGlass';
|
|
7
|
+
import { PREMIUM_GLASS } from './premium-presets';
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof AtomixGlass> = {
|
|
10
|
+
title: 'Components/AtomixGlass/Border',
|
|
11
|
+
component: AtomixGlass,
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: 'centered',
|
|
14
|
+
docs: {
|
|
15
|
+
description: {
|
|
16
|
+
component:
|
|
17
|
+
'Apple-style liquid glass borders: dual-tone conic rim with corner bloom, top-left inner highlight, and backdrop-aware rim shadows. Default rim width is a **0.5px hairline** (`--atomix-glass-border-width` / `$glass-border-width`). Tune via `--atomix-glass-border-*` tokens in `_settings.atomix-glass.scss` or the `border` prop.',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
tags: ['autodocs'],
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default meta;
|
|
25
|
+
type Story = StoryObj<typeof AtomixGlass>;
|
|
26
|
+
|
|
27
|
+
const panelStyle: React.CSSProperties = {
|
|
28
|
+
padding: '2rem 2.5rem',
|
|
29
|
+
minWidth: 280,
|
|
30
|
+
color: '#fff',
|
|
31
|
+
fontWeight: 500,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const Scene = ({
|
|
35
|
+
children,
|
|
36
|
+
background,
|
|
37
|
+
}: {
|
|
38
|
+
children: React.ReactNode;
|
|
39
|
+
background: string;
|
|
40
|
+
}) => (
|
|
41
|
+
<div
|
|
42
|
+
style={{
|
|
43
|
+
padding: '3rem',
|
|
44
|
+
borderRadius: 24,
|
|
45
|
+
background,
|
|
46
|
+
minWidth: 360,
|
|
47
|
+
}}
|
|
48
|
+
>
|
|
49
|
+
{children}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
export const DarkChrome: Story = {
|
|
54
|
+
name: 'Dark chrome (default rim)',
|
|
55
|
+
render: () => (
|
|
56
|
+
<Scene background="linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%)">
|
|
57
|
+
<AtomixGlass {...PREMIUM_GLASS.card} borderRadius={20} withBorder>
|
|
58
|
+
<div style={panelStyle}>Conic rim + inner highlight on dark UI</div>
|
|
59
|
+
</AtomixGlass>
|
|
60
|
+
</Scene>
|
|
61
|
+
),
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const OverLight: Story = {
|
|
65
|
+
name: 'Over light (bright backdrop)',
|
|
66
|
+
render: () => (
|
|
67
|
+
<Scene background="linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%)">
|
|
68
|
+
<AtomixGlass {...PREMIUM_GLASS.card} borderRadius={20} overLight withBorder>
|
|
69
|
+
<div style={{ ...panelStyle, color: '#0f172a' }}>Dark rim + white inner catch on light BG</div>
|
|
70
|
+
</AtomixGlass>
|
|
71
|
+
</Scene>
|
|
72
|
+
),
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const BorderOff: Story = {
|
|
76
|
+
name: 'Border disabled (comparison)',
|
|
77
|
+
render: () => (
|
|
78
|
+
<Scene background="linear-gradient(145deg, #1a1a2e 0%, #0f3460 100%)">
|
|
79
|
+
<div style={{ display: 'flex', gap: '1.5rem', flexWrap: 'wrap' }}>
|
|
80
|
+
<AtomixGlass {...PREMIUM_GLASS.card} borderRadius={16} withBorder>
|
|
81
|
+
<div style={{ ...panelStyle, minWidth: 200 }}>withBorder</div>
|
|
82
|
+
</AtomixGlass>
|
|
83
|
+
<AtomixGlass {...PREMIUM_GLASS.card} borderRadius={16} border={false}>
|
|
84
|
+
<div style={{ ...panelStyle, minWidth: 200 }}>border=false</div>
|
|
85
|
+
</AtomixGlass>
|
|
86
|
+
</div>
|
|
87
|
+
</Scene>
|
|
88
|
+
),
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const StructuredBorder: Story = {
|
|
92
|
+
name: 'Structured border prop',
|
|
93
|
+
render: () => (
|
|
94
|
+
<Scene background="linear-gradient(145deg, #1a1a2e 0%, #0f3460 100%)">
|
|
95
|
+
<AtomixGlass
|
|
96
|
+
{...PREMIUM_GLASS.card}
|
|
97
|
+
borderRadius={20}
|
|
98
|
+
border={{ width: '0.5px', opacity: 1.2, animated: true }}
|
|
99
|
+
>
|
|
100
|
+
<div style={panelStyle}>border={ width, opacity, animated }</div>
|
|
101
|
+
</AtomixGlass>
|
|
102
|
+
</Scene>
|
|
103
|
+
),
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const Sizes: Story = {
|
|
107
|
+
name: 'Border radius sizes',
|
|
108
|
+
render: () => (
|
|
109
|
+
<Scene background="radial-gradient(circle at 30% 20%, #334155 0%, #0f172a 70%)">
|
|
110
|
+
<div style={{ display: 'flex', gap: '1rem', flexWrap: 'wrap', alignItems: 'center' }}>
|
|
111
|
+
{[8, 16, 24, 40].map((radius) => (
|
|
112
|
+
<AtomixGlass key={radius} blurAmount={22} borderRadius={radius} withBorder>
|
|
113
|
+
<div style={{ ...panelStyle, padding: '1.25rem 1.5rem', minWidth: 120 }}>{radius}px</div>
|
|
114
|
+
</AtomixGlass>
|
|
115
|
+
))}
|
|
116
|
+
</div>
|
|
117
|
+
</Scene>
|
|
118
|
+
),
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/** Reproduces nested rounded inner content — corner seam regression check. */
|
|
122
|
+
export const NestedInnerContent: Story = {
|
|
123
|
+
name: 'Nested inner content (corner artifact)',
|
|
124
|
+
render: () => (
|
|
125
|
+
<Scene background="linear-gradient(160deg, #0b1220 0%, #1e293b 100%)">
|
|
126
|
+
<AtomixGlass {...PREMIUM_GLASS.card} borderRadius={20} withBorder>
|
|
127
|
+
<div
|
|
128
|
+
style={{
|
|
129
|
+
padding: '1.25rem',
|
|
130
|
+
background: '#0f172a',
|
|
131
|
+
borderRadius: 16,
|
|
132
|
+
}}
|
|
133
|
+
>
|
|
134
|
+
<div
|
|
135
|
+
style={{
|
|
136
|
+
padding: '1.5rem 2rem',
|
|
137
|
+
background: 'linear-gradient(145deg, #1e3a5f 0%, #2563eb 100%)',
|
|
138
|
+
borderRadius: 12,
|
|
139
|
+
color: '#e2e8f0',
|
|
140
|
+
fontWeight: 500,
|
|
141
|
+
}}
|
|
142
|
+
>
|
|
143
|
+
Inspect bottom-left inner corner for stray rim lines
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</AtomixGlass>
|
|
147
|
+
</Scene>
|
|
148
|
+
),
|
|
149
|
+
};
|