liquid-glass-for-react 0.0.4 → 0.0.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/dist/App.d.ts.map +1 -1
- package/dist/components/Alert/Alert.d.ts +16 -2
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +5 -2
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/liquid-glass-for-react.es.js +539 -403
- package/dist/liquid-glass-for-react.umd.js +59 -38
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(f,
|
|
1
|
+
(function(f,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("react"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","react","framer-motion"],d):(f=typeof globalThis<"u"?globalThis:f||self,d(f.LiquidGlassForReact={},f.React,f.FramerMotion))})(this,function(f,d,u){"use strict";var V={exports:{}},D={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Q;function pe(){if(Q)return D;Q=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(a,s,l){var m=null;if(l!==void 0&&(m=""+l),s.key!==void 0&&(m=""+s.key),"key"in s){l={};for(var h in s)h!=="key"&&(l[h]=s[h])}else l=s;return s=l.ref,{$$typeof:e,type:a,key:m,ref:s!==void 0?s:null,props:l}}return D.Fragment=t,D.jsx=o,D.jsxs=o,D}var I={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,79 +14,100 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var ee;function xe(){return ee||(ee=1,process.env.NODE_ENV!=="production"&&function(){function e(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===W?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case _:return"Profiler";case j:return"StrictMode";case F:return"Suspense";case L:return"SuspenseList";case B:return"Activity"}if(typeof r=="object")switch(typeof r.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case y:return"Portal";case S:return(r.displayName||"Context")+".Provider";case $:return(r._context.displayName||"Context")+".Consumer";case T:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case U:return i=r.displayName||null,i!==null?i:e(r.type)||"Memo";case A:i=r._payload,r=r._init;try{return e(r(i))}catch{}}return null}function t(r){return""+r}function o(r){try{t(r);var i=!1}catch{i=!0}if(i){i=console;var p=i.error,k=typeof Symbol=="function"&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object";return p.call(i,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",k),t(r)}}function a(r){if(r===w)return"<>";if(typeof r=="object"&&r!==null&&r.$$typeof===A)return"<...>";try{var i=e(r);return i?"<"+i+">":"<...>"}catch{return"<...>"}}function s(){var r=H.A;return r===null?null:r.getOwner()}function l(){return Error("react-stack-top-frame")}function m(r){if(de.call(r,"key")){var i=Object.getOwnPropertyDescriptor(r,"key").get;if(i&&i.isReactWarning)return!1}return r.key!==void 0}function h(r,i){function p(){ue||(ue=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",i))}p.isReactWarning=!0,Object.defineProperty(r,"key",{get:p,configurable:!0})}function x(){var r=e(this.type);return he[r]||(he[r]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),r=this.props.ref,r!==void 0?r:null}function N(r,i,p,k,O,E,Z,M){return p=E.ref,r={$$typeof:v,type:r,key:i,props:E,_owner:O},(p!==void 0?p:null)!==null?Object.defineProperty(r,"ref",{enumerable:!1,get:x}):Object.defineProperty(r,"ref",{enumerable:!1,value:null}),r._store={},Object.defineProperty(r._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(r,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.defineProperty(r,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}function c(r,i,p,k,O,E,Z,M){var C=i.children;if(C!==void 0)if(k)if(gt(C)){for(k=0;k<C.length;k++)b(C[k]);Object.freeze&&Object.freeze(C)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else b(C);if(de.call(i,"key")){C=e(r);var R=Object.keys(i).filter(function(wt){return wt!=="key"});k=0<R.length?"{key: someKey, "+R.join(": ..., ")+": ...}":"{key: someKey}",me[C+k]||(R=0<R.length?"{"+R.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,
|
|
22
|
+
<%s key={someKey} {...props} />`,k,C,R,C),me[C+k]=!0)}if(C=null,p!==void 0&&(o(p),C=""+p),m(i)&&(o(i.key),C=""+i.key),"key"in i){p={};for(var K in i)K!=="key"&&(p[K]=i[K])}else p=i;return C&&h(p,typeof r=="function"?r.displayName||r.name||"Unknown":r),N(r,C,E,O,s(),p,Z,M)}function b(r){typeof r=="object"&&r!==null&&r.$$typeof===v&&r._store&&(r._store.validated=1)}var g=d,v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),S=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),W=Symbol.for("react.client.reference"),H=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de=Object.prototype.hasOwnProperty,gt=Array.isArray,X=console.createTask?console.createTask:function(){return null};g={"react-stack-bottom-frame":function(r){return r()}};var ue,he={},be=g["react-stack-bottom-frame"].bind(g,l)(),fe=X(a(l)),me={};I.Fragment=w,I.jsx=function(r,i,p,k,O){var E=1e4>H.recentlyCreatedOwnerStacks++;return c(r,i,p,!1,k,O,E?Error("react-stack-top-frame"):be,E?X(a(r)):fe)},I.jsxs=function(r,i,p,k,O){var E=1e4>H.recentlyCreatedOwnerStacks++;return c(r,i,p,!0,k,O,E?Error("react-stack-top-frame"):be,E?X(a(r)):fe)}}()),I}var te;function ge(){return te||(te=1,process.env.NODE_ENV==="production"?V.exports=pe():V.exports=xe()),V.exports}var n=ge();/**
|
|
23
23
|
* @license lucide-react v0.525.0 - ISC
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
-
*/const
|
|
27
|
+
*/const we=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ve=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,a)=>a?a.toUpperCase():o.toLowerCase()),re=e=>{const t=ve(e);return t.charAt(0).toUpperCase()+t.slice(1)},ne=(...e)=>e.filter((t,o,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===o).join(" ").trim(),ye=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
28
28
|
* @license lucide-react v0.525.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/var
|
|
32
|
+
*/var je={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
33
33
|
* @license lucide-react v0.525.0 - ISC
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the ISC license.
|
|
36
36
|
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/const
|
|
37
|
+
*/const ke=d.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:s="",children:l,iconNode:m,...h},x)=>d.createElement("svg",{ref:x,...je,width:t,height:t,stroke:e,strokeWidth:a?Number(o)*24/Number(t):o,className:ne("lucide",s),...!l&&!ye(h)&&{"aria-hidden":"true"},...h},[...m.map(([N,c])=>d.createElement(N,c)),...Array.isArray(l)?l:[l]]));/**
|
|
38
38
|
* @license lucide-react v0.525.0 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
42
|
+
*/const P=(e,t)=>{const o=d.forwardRef(({className:a,...s},l)=>d.createElement(ke,{ref:l,iconNode:t,className:ne(`lucide-${we(re(e))}`,`lucide-${e}`,a),...s}));return o.displayName=re(e),o};/**
|
|
43
43
|
* @license lucide-react v0.525.0 - ISC
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/const
|
|
47
|
+
*/const Ce=P("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
48
48
|
* @license lucide-react v0.525.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
52
|
+
*/const Ne=P("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
53
53
|
* @license lucide-react v0.525.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const P
|
|
57
|
+
*/const z=P("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
58
58
|
* @license lucide-react v0.525.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
62
|
+
*/const _e=P("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
63
63
|
* @license lucide-react v0.525.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
67
|
+
*/const Ee=P("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
|
|
68
68
|
* @license lucide-react v0.525.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
*/const oe=P("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Oe="bg-white/20 backdrop-blur-lg shadow-lg",Pe="bg-white/10 backdrop-blur-sm shadow-lg",$e={hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1},exit:{opacity:0,scale:.9}};let J="";function Se(e){const{title:t,icon:o,description:a,color:s,variant:l,radius:m,isClearble:h,startContent:x,endContent:N,isDefaultVisible:c,isClosable:b,hideIcon:g,hideIconWrapper:v,className:y,onClose:w,onVisibleChange:j}=e,[_,$]=d.useState(c);let S="px-6 py-3",T="",F="",L="",U="",A="",B="",W="";switch(s){case"primary":h?(T="text-black",F="text-indigo-800",L="bg-white/1 backdrop-blur-sm shadow-lg",U="hover:bg-white-400",A="border border-solid",B="border-white/60",W="p-[1px]"):(T="text-white",F="text-indigo-800",L="bg-white/20 backdrop-blur-lg shadow-lg",A="border border-solid",B="border-indigo-600",W="p-[1px]");break}function H(){$(!1),w&&w()}return h?J=Pe:J=Oe,n.jsx(u.AnimatePresence,{children:_&&n.jsx(u.motion.div,{variants:$e,initial:"hidden",animate:"visible",exit:"exit",className:`
|
|
73
|
+
w-full
|
|
74
|
+
`,children:n.jsx("div",{className:`
|
|
75
|
+
${A}
|
|
76
|
+
${W}
|
|
77
|
+
${B}
|
|
78
|
+
p-4
|
|
79
|
+
`,children:n.jsxs("div",{className:`
|
|
80
|
+
${S}
|
|
81
|
+
${J}
|
|
82
|
+
${T}
|
|
83
|
+
${L}
|
|
84
|
+
font-semibold
|
|
85
|
+
transition-colors
|
|
86
|
+
duration-300
|
|
87
|
+
${U}
|
|
88
|
+
${y}
|
|
89
|
+
flex
|
|
90
|
+
items-center
|
|
91
|
+
space-x-4
|
|
92
|
+
`,children:[n.jsx(_e,{className:F,size:24}),n.jsx("div",{className:"flex-grow",children:n.jsx("span",{className:T,children:t})}),n.jsx(u.motion.button,{whileHover:{scale:1.2},whileTap:{scale:.8},onClick:H,children:n.jsx(oe,{className:"text-white/70 hover:text-white",size:20})})]})})})})}const Te="backdrop-blur-lg shadow-lg";function Y({children:e,variant:t="solid",color:o="default",radius:a="full",onPress:s,className:l,isIconOnly:m=!1,isHoverZoom:h=!0,isPressZoom:x=!0}){let N="px-6 py-3";m&&(N="p-2");let c="",b="",g="",v="",y="",w="",j="",_="";switch(a){case"full":_="rounded-full";break;case"none":_="rounded-sone";break;case"lg":_="rounded-lg";break;case"md":_="rounded-md";break;case"sm":_="rounded-sm";break}switch(o){case"primary":switch(t){case"solid":c="text-white",b="bg-blue-500",g="text-white",v="hover:bg-sky-400",y="",w="bg-[conic-gradient(from_-45deg,#38bdf8,#3b82f6,#38bdf8,#3b82f6,#38bdf8)] shadow-md shadow-sky-400/40",j="p-[1px]";break;case"clear":c="text-blue-950",b="bg-blue-500/8",g="hover:text-white",v="hover:bg-sky-400",y="border border-solid",w="border-sky-500",j="p-[1px]";break}break;case"success":switch(t){case"solid":c="text-white",b="bg-emerald-500",g="text-white",v="hover:bg-green-400",y="",w="bg-[conic-gradient(from_-45deg,#22c55e,#34d399,#22c55e,#34d399,#22c55e)] shadow-md shadow-green-400/40",j="p-[1px]";break;case"clear":c="text-emerald-950",b="bg-emerald-500/8",g="hover:text-white",v="hover:bg-green-400",y="border border-solid",w="border-green-500",j="p-[1px]";break}break;case"secondary":switch(t){case"solid":c="text-white",b="bg-slate-500",g="text-white",v="hover:bg-gray-400",y="",w="bg-[conic-gradient(from_-45deg,#94a3b8,#d1d5db,#94a3b8,#d1d5db,#94a3b8)] shadow-md shadow-gray-400/40",j="p-[1px]";break;case"clear":c="text-slate-950",b="bg-slate-500/8",g="hover:text-white",v="hover:bg-gray-400",y="border border-solid",w="border-gray-500",j="p-[1px]";break}break;case"warning":switch(t){case"solid":c="text-white",b="bg-amber-500",g="text-white",v="hover:bg-yellow-400",y="",w="bg-[conic-gradient(from_-45deg,#eab308,#fbbf24,#eab308,#fbbf24,#eab308)] shadow-md shadow-amber-400/40",j="p-[1px]";break;case"clear":c="text-yellow-950",b="bg-yellow-500/8",g="hover:text-white",v="hover:bg-amber-400",y="border border-solid",w="border-amber-500",j="p-[1px]";break}break;case"danger":switch(t){case"solid":c="text-white",b="bg-red-600",g="text-white",v="hover:bg-rose-400",y="",w="bg-[conic-gradient(from_-45deg,#fb7185,#dc2626,#fb7185,#dc2626,#fb7185)] shadow-md shadow-rose-400/40",j="p-[1px]";break;case"clear":c="text-rose-950",b="bg-rose-500/8",g="hover:text-white",v="hover:bg-red-400",y="border border-solid",w="border-red-500",j="p-[1px]";break}break;default:switch(t){case"solid":c="text-black",b="bg-white/80",g="",v="hover:bg-white/40",y="",w="bg-[conic-gradient(from_-45deg,#fafafa,#e2e8f0,#fafafa,#e2e8f0,#fafafa)] shadow-sm shadow-white/30",j="p-[1px]";break;case"clear":c="text-black",b="bg-white/1",g="hover:text-black",v="hover:bg-white/50",y="border border-solid",w="border-white",j="p-[1px]";break}break}let $={};h&&($={scale:1.75});let S={};return h&&(S={scale:1.25}),n.jsx(u.motion.button,{whileTap:$,whileHover:S,onClick:s,children:n.jsx("div",{className:`
|
|
93
|
+
${_}
|
|
76
94
|
${y}
|
|
95
|
+
${j}
|
|
96
|
+
${w}
|
|
77
97
|
`,children:n.jsx("div",{className:`
|
|
78
|
-
${
|
|
79
|
-
${
|
|
80
|
-
|
|
81
|
-
${
|
|
82
|
-
${
|
|
98
|
+
${N}
|
|
99
|
+
${Te}
|
|
100
|
+
${_}
|
|
101
|
+
${c}
|
|
102
|
+
${g}
|
|
103
|
+
${b}
|
|
83
104
|
font-semibold
|
|
84
105
|
transition-colors
|
|
85
106
|
duration-300
|
|
86
|
-
${
|
|
87
|
-
${
|
|
88
|
-
`,children:
|
|
89
|
-
${
|
|
107
|
+
${v}
|
|
108
|
+
${l}
|
|
109
|
+
`,children:e})})})}const Ae="bg-white/10 backdrop-blur-md border border-white/20 shadow-inner";function Re(e){const{isDefaultChecked:t,label:o,onValueChange:a}=e,[s,l]=d.useState(t);function m(){a&&a(!s),l(!s)}return n.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer text-white",children:[n.jsx(u.motion.div,{whileTap:{scale:1.75},whileHover:{scale:1.25},className:`
|
|
110
|
+
${Ae}
|
|
90
111
|
w-6
|
|
91
112
|
h-6
|
|
92
113
|
rounded-md
|
|
@@ -94,25 +115,25 @@ React keys must be passed directly to JSX without using spread:
|
|
|
94
115
|
items-center
|
|
95
116
|
justify-center
|
|
96
117
|
transition-colors
|
|
97
|
-
${
|
|
98
|
-
`,onClick:()=>
|
|
99
|
-
${
|
|
118
|
+
${s?"bg-blue-500/50":""}
|
|
119
|
+
`,onClick:()=>m(),children:n.jsx(u.AnimatePresence,{children:s&&n.jsx(u.motion.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:n.jsx(Ce,{size:16})})})}),n.jsx("span",{children:o})]})}var ae={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},se=d.createContext&&d.createContext(ae),De=["attr","size","title"];function Ie(e,t){if(e==null)return{};var o=ze(e,t),a,s;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(s=0;s<l.length;s++)a=l[s],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}function ze(e,t){if(e==null)return{};var o={};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;o[a]=e[a]}return o}function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},G.apply(this,arguments)}function le(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),o.push.apply(o,a)}return o}function q(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?le(Object(o),!0).forEach(function(a){Ye(e,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):le(Object(o)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(o,a))})}return e}function Ye(e,t,o){return t=Fe(t),t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Fe(e){var t=Le(e,"string");return typeof t=="symbol"?t:t+""}function Le(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var a=o.call(e,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ie(e){return e&&e.map((t,o)=>d.createElement(t.tag,q({key:o},t.attr),ie(t.child)))}function Be(e){return t=>d.createElement(We,G({attr:q({},e.attr)},t),ie(e.child))}function We(e){var t=o=>{var{attr:a,size:s,title:l}=e,m=Ie(e,De),h=s||o.size||"1em",x;return o.className&&(x=o.className),e.className&&(x=(x?x+" ":"")+e.className),d.createElement("svg",G({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},o.attr,a,m,{className:x,style:q(q({color:e.color||o.color},o.style),e.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),l&&d.createElement("title",null,l),e.children)};return se!==void 0?d.createElement(se.Consumer,null,o=>t(o)):t(ae)}function He(e){return Be({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z"},child:[]}]})(e)}const Ve={hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1},exit:{opacity:0,scale:.9}},Ge={hidden:{opacity:0},visible:{opacity:1}},qe="backdrop-blur-lg shadow-lg";function Ue(e){const{isOpen:t,children:o,onClose:a,title:s}=e;let l="bg-white/80 ";return n.jsx(u.AnimatePresence,{children:t&&n.jsx(u.motion.div,{variants:Ge,initial:"hidden",animate:"visible",exit:"hidden",className:"fixed inset-0 text-black bg-black/10 backdrop-blur-sm flex items-center justify-center z-50 p-4",onClick:a,children:n.jsxs(u.motion.div,{variants:Ve,className:`${qe} rounded-3xl w-full max-w-md overflow-hidden`,onClick:h=>h.stopPropagation(),children:[n.jsxs("div",{className:`p-6 border-b border-white/20 flex justify-between items-center ${l}`,children:[n.jsx("h3",{className:"text-xl font-bold",children:s}),n.jsx(Y,{onPress:a,isIconOnly:!0,children:n.jsx(He,{})})]}),n.jsx("div",{className:`${l} p-6`,children:o}),n.jsxs("div",{className:`${l} p-4 flex justify-end space-x-3`,children:[n.jsx(Y,{onPress:a,color:"default",variant:"solid",children:"キャンセル"}),n.jsx(Y,{onPress:a,color:"primary",variant:"solid",children:"OK"})]})]})})})}function Je({children:e}){return n.jsx("div",{className:"flex items-center rounded-full bg-white/10 p-2 px-0",children:d.Children.map(e,t=>d.isValidElement(t)?d.cloneElement(t,{radius:"none",isHoverZoom:!1,isPressZoom:!1}):t)})}const Xe="bg-white/20 backdrop-blur-lg border border-white/30 shadow-lg";function Ze(){const e=[{label:"ホーム",icon:n.jsx(Ee,{size:16})},{label:"製品",icon:null},{label:"カテゴリA",icon:null}];return n.jsx("nav",{className:`${Xe} rounded-full px-4 py-2`,children:n.jsx("ol",{className:"flex items-center space-x-2",children:e.map((t,o)=>n.jsxs("li",{className:"flex items-center space-x-2 text-white/80",children:[n.jsxs(u.motion.a,{href:"#",className:"flex items-center space-x-1 hover:text-white",whileHover:{scale:1.05},children:[t.icon,n.jsx("span",{className:"text-sm",children:t.label})]}),o<e.length-1&&n.jsx(z,{size:16,className:"text-white/50"})]},t.label))})})}const Me="bg-white/20 backdrop-blur-lg border border-white/30 shadow-lg";function Ke(e){const{children:t,className:o}=e;return n.jsx(u.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`
|
|
120
|
+
${Me}
|
|
100
121
|
rounded-3xl
|
|
101
122
|
overflow-hidden
|
|
102
123
|
w-full
|
|
103
124
|
max-w-sm
|
|
104
|
-
${
|
|
105
|
-
`,children:t})}function
|
|
106
|
-
${
|
|
125
|
+
${o}
|
|
126
|
+
`,children:t})}function Qe(e){const{children:t}=e;return n.jsx("div",{className:"p-6 border-b border-white/20",children:t})}function et(e){const{children:t}=e;return n.jsx("div",{className:"p-6",children:t})}function tt(e){const{children:t}=e;return n.jsx("div",{className:"p-6 bg-black/10",children:t})}const rt="bg-white/20 backdrop-blur-lg border border-white/30 shadow-lg";function nt(e){const{children:t,className:o}=e;return n.jsx(u.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`
|
|
127
|
+
${rt}
|
|
107
128
|
rounded-full
|
|
108
129
|
px-4
|
|
109
130
|
py-1.5
|
|
110
131
|
text-sm
|
|
111
132
|
text-white
|
|
112
133
|
font-medium
|
|
113
|
-
${
|
|
114
|
-
`,children:t})}const
|
|
115
|
-
${
|
|
134
|
+
${o}
|
|
135
|
+
`,children:t})}const ot="bg-white/20 backdrop-blur-lg border border-white/30 shadow-lg";function at(e){const{label:t,onRemove:o}=e;return n.jsxs(u.motion.div,{layout:!0,initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},className:`
|
|
136
|
+
${ot}
|
|
116
137
|
rounded-full
|
|
117
138
|
px-4
|
|
118
139
|
py-1.5
|
|
@@ -121,8 +142,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
121
142
|
font-medium
|
|
122
143
|
flex
|
|
123
144
|
items-center
|
|
124
|
-
space-x-2`,children:[n.jsx("span",{children:t}),
|
|
125
|
-
${
|
|
145
|
+
space-x-2`,children:[n.jsx("span",{children:t}),o&&n.jsx(u.motion.button,{whileHover:{scale:1.2},whileTap:{scale:.8},onClick:o,children:n.jsx(oe,{size:14,className:"text-white/70 hover:text-white"})})]})}const st="bg-white/10 backdrop-blur-md border border-white/20 shadow-inner";function lt(e){const{children:t}=e;return n.jsx("pre",{className:`${st} p-4 rounded-xl overflow-x-auto`,children:n.jsx("code",{className:"text-sm text-white/90 font-mono",children:t})})}const it={hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1},exit:{opacity:0,scale:.9}},ct="bg-white/20 backdrop-blur-lg border border-white/30 shadow-lg";function ce(e){const{onDateSelect:t}=e;function o(c){t&&t(c)}const[a,s]=d.useState(new Date),l=new Date(a.getFullYear(),a.getMonth()+1,0).getDate(),m=new Date(a.getFullYear(),a.getMonth(),1).getDay(),h=new Date,x=d.useMemo(()=>Array.from({length:l},(c,b)=>b+1).map(c=>{const b=new Date(a.getFullYear(),a.getMonth(),c),g=b.toDateString()===h.toDateString();return n.jsx(u.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>o(b),className:`w-10 h-10 flex items-center justify-center rounded-full cursor-pointer transition-colors ${g?"bg-blue-500/50 text-white font-bold":"text-white/80 hover:bg-white/20"}`,children:c},c)}),[a,l,m,t,h]),N=c=>s(b=>new Date(b.getFullYear(),b.getMonth()+c,1));return n.jsxs(u.motion.div,{variants:it,initial:"hidden",animate:"visible",exit:"exit",className:`${ct} p-6 rounded-3xl w-full max-w-xs`,children:[n.jsxs("div",{className:"flex items-center justify-between mb-4 text-white",children:[n.jsx(u.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>N(-1),className:"p-2 rounded-full hover:bg-white/20",children:n.jsx(z,{className:"rotate-180",size:20})}),n.jsxs("h3",{className:"font-bold text-lg",children:[a.toLocaleString("default",{month:"long"})," ",a.getFullYear()]}),n.jsx(u.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>N(1),className:"p-2 rounded-full hover:bg-white/20",children:n.jsx(z,{size:20})})]}),n.jsx("div",{className:"grid grid-cols-7 gap-2 text-center text-white/60 text-sm mb-2",children:["日","月","火","水","木","金","土"].map(c=>n.jsx("div",{children:c},c))}),n.jsxs("div",{className:"grid grid-cols-7 gap-y-2",children:[Array.from({length:m}).map((c,b)=>n.jsx("div",{},`empty-${b}`)),x]})]})}const dt="bg-white/10 backdrop-blur-md border border-white/20 shadow-inner",ut=e=>n.jsx("input",{...e,className:`${dt} w-full px-4 py-3 rounded-full text-white placeholder-white/50 focus:outline-none focus:ring-2 focus:ring-white/50 ${e.className}`});function ht(){const[e,t]=d.useState(null),[o,a]=d.useState(!1),s=d.useRef(null);d.useEffect(()=>{const m=h=>{s.current&&!s.current.contains(h.target)&&a(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const l=m=>{t(m),a(!1)};return n.jsxs("div",{className:"relative",ref:s,children:[n.jsx(ut,{readOnly:!0,value:e?e.toLocaleDateString("ja-JP"):"",onClick:()=>a(!o),placeholder:"日付を選択"}),n.jsx(u.AnimatePresence,{children:o&&n.jsx("div",{className:"absolute top-full mt-2 z-20",children:n.jsx(ce,{onDateSelect:l})})})]})}const bt="bg-white/20 backdrop-blur-lg border border-white/30 shadow-lg";function ft(){const[e,t]=d.useState(!1),o=["プロフィール","設定","ヘルプ","ログアウト"];return n.jsxs("div",{className:"relative",children:[n.jsxs(Y,{onPress:()=>t(!e),className:"flex items-center space-x-2",children:[n.jsx("span",{children:"メニュー"}),n.jsx(u.motion.div,{animate:{rotate:e?180:0},children:n.jsx(Ne,{size:20})})]}),n.jsx(u.AnimatePresence,{children:e&&n.jsx(u.motion.ul,{initial:{opacity:0,y:-10},animate:{opacity:1,y:10},exit:{opacity:0,y:-10},className:`${bt} absolute top-full mt-2 w-48 rounded-2xl p-2 z-10`,children:o.map(a=>n.jsx("li",{className:"text-white/80 hover:bg-white/20 hover:text-white p-2 rounded-lg cursor-pointer transition-colors",onClick:()=>t(!1),children:a},a))})})]})}function mt(e){const{defaultPage:t,totalPages:o,onPageChange:a}=e,s=Array.from({length:o},(x,N)=>N+1),[l,m]=d.useState(t);function h(x){m(x),a&&a(x)}return n.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[n.jsx(u.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},disabled:l===1,onClick:()=>h(l-1),className:"p-2 rounded-full disabled:opacity-50 disabled:cursor-not-allowed hover:bg-white/20",children:n.jsx(z,{className:"rotate-180"})}),s.map(x=>n.jsx(u.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>h(x),className:`w-10 h-10 rounded-full transition-colors ${l===x?"bg-blue-500/50":"hover:bg-white/20"}`,children:x},x)),n.jsx(u.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},disabled:l===o,onClick:()=>h(l+1),className:"p-2 rounded-full disabled:opacity-50 disabled:cursor-not-allowed hover:bg-white/20",children:n.jsx(z,{})})]})}const pt="bg-white/10 backdrop-blur-md border border-white/20 shadow-inner";function xt(e){const{label:t,value:o,selected:a,onChange:s}=e;return n.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer text-white",onClick:()=>s(o),children:[n.jsx("div",{className:`
|
|
146
|
+
${pt}
|
|
126
147
|
w-6
|
|
127
148
|
h-6
|
|
128
149
|
rounded-full
|
|
@@ -130,4 +151,4 @@ React keys must be passed directly to JSX without using spread:
|
|
|
130
151
|
items-center
|
|
131
152
|
justify-center
|
|
132
153
|
transition-colors
|
|
133
|
-
`,children:n.jsx(
|
|
154
|
+
`,children:n.jsx(u.AnimatePresence,{children:a===o&&n.jsx(u.motion.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},className:"w-3 h-3 bg-blue-400 rounded-full"})})}),n.jsx("span",{children:t})]})}f.Alert=Se,f.Badge=nt,f.Breadcrumbs=Ze,f.Button=Y,f.ButtonGroup=Je,f.Calendar=ce,f.Card=Ke,f.CardBody=et,f.CardFooter=tt,f.CardHeader=Qe,f.Checkbox=Re,f.Chip=at,f.Code=lt,f.DatePicker=ht,f.Dropdown=ft,f.Modal=Ue,f.Pagination=mt,f.Radio=xt,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "liquid-glass-for-react",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/liquid-glass-for-react.umd.js",
|
|
7
7
|
"module": "./dist/liquid-glass-for-react.es.js",
|
|
@@ -23,9 +23,12 @@
|
|
|
23
23
|
"preview": "vite preview"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
26
27
|
"framer-motion": "^12.23.0",
|
|
27
28
|
"lucide-react": "^0.525.0",
|
|
28
|
-
"
|
|
29
|
+
"postcss": "^8.5.6",
|
|
30
|
+
"react-icons": "^5.5.0",
|
|
31
|
+
"tailwindcss": "^4.0.0"
|
|
29
32
|
},
|
|
30
33
|
"peerDependencies": {
|
|
31
34
|
"react": "^18.2.0 || ^19.0.0",
|
|
@@ -36,14 +39,11 @@
|
|
|
36
39
|
"@types/react": "^18.3.3",
|
|
37
40
|
"@types/react-dom": "^18.3.0",
|
|
38
41
|
"@vitejs/plugin-react-swc": "^3.5.0",
|
|
39
|
-
"autoprefixer": "^10.4.19",
|
|
40
42
|
"eslint": "^8.57.0",
|
|
41
43
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
42
44
|
"eslint-plugin-react-refresh": "^0.4.7",
|
|
43
|
-
"postcss": "^8.4.38",
|
|
44
45
|
"react": "^19.1.0",
|
|
45
46
|
"react-dom": "^19.1.0",
|
|
46
|
-
"tailwindcss": "^3.4.4",
|
|
47
47
|
"typescript": "^5.4.5",
|
|
48
48
|
"vite": "^6.3.5",
|
|
49
49
|
"vite-plugin-dts": "^4.5.4"
|