@neoptocom/neopto-ui 0.13.0 → 0.14.0

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/index.cjs CHANGED
@@ -153,6 +153,7 @@ function Card({
153
153
  style,
154
154
  showDecorations = false,
155
155
  variant = "default",
156
+ elevated = false,
156
157
  ...props
157
158
  }) {
158
159
  const isAppBackground = variant === "app-background";
@@ -164,7 +165,8 @@ function Card({
164
165
  // Safari support
165
166
  color: "var(--fg)",
166
167
  overflow: "hidden",
167
- transition: "background-color 0.3s ease, color 0.3s ease",
168
+ transition: "background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease",
169
+ boxShadow: elevated ? "var(--shadow-elevated)" : void 0,
168
170
  ...style,
169
171
  // Apply position: relative by default, but allow user override via style prop
170
172
  position: style?.position || "relative"
package/dist/index.d.cts CHANGED
@@ -49,8 +49,10 @@ type CardProps = React.HTMLAttributes<HTMLDivElement> & {
49
49
  showDecorations?: boolean;
50
50
  /** Card variant (default: "default") */
51
51
  variant?: "default" | "app-background";
52
+ /** Apply elevated shadow effect (default: false) */
53
+ elevated?: boolean;
52
54
  };
53
- declare function Card({ children, className, style, showDecorations, variant, ...props }: CardProps): react_jsx_runtime.JSX.Element;
55
+ declare function Card({ children, className, style, showDecorations, variant, elevated, ...props }: CardProps): react_jsx_runtime.JSX.Element;
54
56
 
55
57
  type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> & {
56
58
  /** Input visual variant */
package/dist/index.d.ts CHANGED
@@ -49,8 +49,10 @@ type CardProps = React.HTMLAttributes<HTMLDivElement> & {
49
49
  showDecorations?: boolean;
50
50
  /** Card variant (default: "default") */
51
51
  variant?: "default" | "app-background";
52
+ /** Apply elevated shadow effect (default: false) */
53
+ elevated?: boolean;
52
54
  };
53
- declare function Card({ children, className, style, showDecorations, variant, ...props }: CardProps): react_jsx_runtime.JSX.Element;
55
+ declare function Card({ children, className, style, showDecorations, variant, elevated, ...props }: CardProps): react_jsx_runtime.JSX.Element;
54
56
 
55
57
  type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> & {
56
58
  /** Input visual variant */
package/dist/index.js CHANGED
@@ -132,6 +132,7 @@ function Card({
132
132
  style,
133
133
  showDecorations = false,
134
134
  variant = "default",
135
+ elevated = false,
135
136
  ...props
136
137
  }) {
137
138
  const isAppBackground = variant === "app-background";
@@ -143,7 +144,8 @@ function Card({
143
144
  // Safari support
144
145
  color: "var(--fg)",
145
146
  overflow: "hidden",
146
- transition: "background-color 0.3s ease, color 0.3s ease",
147
+ transition: "background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease",
148
+ boxShadow: elevated ? "var(--shadow-elevated)" : void 0,
147
149
  ...style,
148
150
  // Apply position: relative by default, but allow user override via style prop
149
151
  position: style?.position || "relative"
package/dist/styles.css CHANGED
@@ -60,6 +60,7 @@
60
60
  /* Shadows */
61
61
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
62
62
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.10), 0 2px 4px -2px rgb(0 0 0 / 0.10);
63
+ --shadow-elevated: 0 4px 4px 0 rgba(0, 0, 0, 0.25), 2px 2px 24px 0 rgba(0, 0, 0, 0.10);
63
64
 
64
65
  /* Motion */
65
66
  --motion-fast: 150ms;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neoptocom/neopto-ui",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "private": false,
5
5
  "description": "A modern React component library built with Tailwind CSS v4 and TypeScript. Features dark mode, design tokens, and comprehensive Storybook documentation. Requires Tailwind v4+.",
6
6
  "keywords": [
@@ -10,6 +10,8 @@ export type CardProps = React.HTMLAttributes<HTMLDivElement> & {
10
10
  showDecorations?: boolean;
11
11
  /** Card variant (default: "default") */
12
12
  variant?: "default" | "app-background";
13
+ /** Apply elevated shadow effect (default: false) */
14
+ elevated?: boolean;
13
15
  };
14
16
 
15
17
  export function Card({
@@ -18,6 +20,7 @@ export function Card({
18
20
  style,
19
21
  showDecorations = false,
20
22
  variant = "default",
23
+ elevated = false,
21
24
  ...props
22
25
  }: CardProps) {
23
26
  const isAppBackground = variant === "app-background";
@@ -32,7 +35,8 @@ export function Card({
32
35
  WebkitBackdropFilter: isAppBackground ? undefined : "blur(75px)", // Safari support
33
36
  color: "var(--fg)",
34
37
  overflow: "hidden",
35
- transition: "background-color 0.3s ease, color 0.3s ease",
38
+ transition: "background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease",
39
+ boxShadow: elevated ? "var(--shadow-elevated)" : undefined,
36
40
  ...style,
37
41
  // Apply position: relative by default, but allow user override via style prop
38
42
  position: style?.position || "relative",
@@ -82,6 +82,64 @@ export const AppBackgroundLarge: Story = {
82
82
  ),
83
83
  };
84
84
 
85
+ export const Elevated: Story = {
86
+ render: () => (
87
+ <div className="max-w-md">
88
+ <Card elevated>
89
+ <Typo variant="headline-sm" bold="semibold">Elevated Card</Typo>
90
+ <Typo variant="body-md" className="mt-2">
91
+ This card uses the elevated shadow effect for a floating appearance.
92
+ </Typo>
93
+ <div className="mt-4">
94
+ <Button variant="primary">Take Action</Button>
95
+ </div>
96
+ </Card>
97
+ </div>
98
+ ),
99
+ };
100
+
101
+ export const ElevatedComparison: Story = {
102
+ render: () => (
103
+ <div className="grid grid-cols-2 gap-6 max-w-4xl">
104
+ <div>
105
+ <Typo variant="label-lg" bold="semibold" className="mb-3">Default</Typo>
106
+ <Card>
107
+ <Typo variant="title-md" bold="semibold">Regular Card</Typo>
108
+ <Typo variant="body-sm" className="mt-2">
109
+ Standard card with glassmorphic effect, no shadow.
110
+ </Typo>
111
+ </Card>
112
+ </div>
113
+ <div>
114
+ <Typo variant="label-lg" bold="semibold" className="mb-3">Elevated</Typo>
115
+ <Card elevated>
116
+ <Typo variant="title-md" bold="semibold">Elevated Card</Typo>
117
+ <Typo variant="body-sm" className="mt-2">
118
+ Enhanced with elevated shadow for emphasis.
119
+ </Typo>
120
+ </Card>
121
+ </div>
122
+ </div>
123
+ ),
124
+ };
125
+
126
+ export const ElevatedAppBackground: Story = {
127
+ render: () => (
128
+ <div className="max-w-md">
129
+ <Card variant="app-background" elevated className="p-8">
130
+ <Typo variant="headline-sm" bold="semibold">Elevated + App Background</Typo>
131
+ <Typo variant="body-md" className="mt-3">
132
+ Combining the app-background variant with elevated shadow creates a stunning effect.
133
+ </Typo>
134
+ <div className="mt-6 flex gap-3">
135
+ <Button variant="primary">Primary</Button>
136
+ <Button variant="secondary">Secondary</Button>
137
+ </div>
138
+ </Card>
139
+ </div>
140
+ ),
141
+ };
142
+
85
143
  export const CustomPadding: Story = {
86
144
  render: () => (
87
145
  <div className="max-w-md space-y-4">
@@ -44,6 +44,7 @@
44
44
  /* Shadows */
45
45
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
46
46
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.10), 0 2px 4px -2px rgb(0 0 0 / 0.10);
47
+ --shadow-elevated: 0 4px 4px 0 rgba(0, 0, 0, 0.25), 2px 2px 24px 0 rgba(0, 0, 0, 0.10);
47
48
 
48
49
  /* Motion */
49
50
  --motion-fast: 150ms;