liquid-glass-for-react 0.0.3 → 0.0.4
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 +3 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/components/Alert/Alert.d.ts +7 -0
- package/dist/components/Alert/Alert.d.ts.map +1 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Alert/index.d.ts.map +1 -0
- package/dist/components/Badge/Badge.d.ts +7 -0
- package/dist/components/Badge/Badge.d.ts.map +1 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/index.d.ts +2 -0
- package/dist/components/Breadcrumbs/index.d.ts.map +1 -0
- package/dist/components/Button/Button.d.ts +11 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +6 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
- package/dist/components/ButtonGroup/index.d.ts +2 -0
- package/dist/components/ButtonGroup/index.d.ts.map +1 -0
- package/dist/components/Calendar/Calendar.d.ts +5 -0
- package/dist/components/Calendar/Calendar.d.ts.map +1 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Calendar/index.d.ts.map +1 -0
- package/dist/components/Card/Card.d.ts +7 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/CardBody.d.ts +6 -0
- package/dist/components/Card/CardBody.d.ts.map +1 -0
- package/dist/components/Card/CardFooter.d.ts +6 -0
- package/dist/components/Card/CardFooter.d.ts.map +1 -0
- package/dist/components/Card/CardHeader.d.ts +14 -0
- package/dist/components/Card/CardHeader.d.ts.map +1 -0
- package/dist/components/Card/index.d.ts +3 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +7 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/Chip/Chip.d.ts +6 -0
- package/dist/components/Chip/Chip.d.ts.map +1 -0
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/Chip/index.d.ts.map +1 -0
- package/dist/components/Code/Code.d.ts +6 -0
- package/dist/components/Code/Code.d.ts.map +1 -0
- package/dist/components/Code/index.d.ts +2 -0
- package/dist/components/Code/index.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +2 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +2 -0
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Dropdown/index.d.ts.map +1 -0
- package/dist/components/Input/Input.d.ts +3 -0
- package/dist/components/Input/Input.d.ts.map +1 -0
- package/dist/components/Modal/Modal.d.ts +9 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +7 -0
- package/dist/components/Pagination/Pagination.d.ts.map +1 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/index.d.ts.map +1 -0
- package/dist/components/Radio/Radio.d.ts +8 -0
- package/dist/components/Radio/Radio.d.ts.map +1 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +16 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/liquid-glass-for-react.es.js +837 -174
- package/dist/liquid-glass-for-react.umd.js +115 -4
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/vite.config.d.ts +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(f,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","react","framer-motion"],u):(f=typeof globalThis<"u"?globalThis:f||self,u(f.LiquidGlassForReact={},f.React,f.FramerMotion))})(this,function(f,u,c){"use strict";var T={exports:{}},E={};/**
|
|
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 L;function ae(){if(L)return E;L=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(s,o,l){var h=null;if(l!==void 0&&(h=""+l),o.key!==void 0&&(h=""+o.key),"key"in o){l={};for(var b in o)b!=="key"&&(l[b]=o[b])}else l=o;return o=l.ref,{$$typeof:e,type:s,key:h,ref:o!==void 0?o:null,props:l}}return E.Fragment=t,E.jsx=a,E.jsxs=a,E}var O={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,9 +14,120 @@
|
|
|
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 B;function se(){return B||(B=1,process.env.NODE_ENV!=="production"&&function(){function e(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===mt?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case R:return"Fragment";case lt:return"Profiler";case ot:return"StrictMode";case ut:return"Suspense";case ht:return"SuspenseList";case bt: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 st:return"Portal";case ct:return(r.displayName||"Context")+".Provider";case it:return(r._context.displayName||"Context")+".Consumer";case dt:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ft:return i=r.displayName||null,i!==null?i:e(r.type)||"Memo";case K:i=r._payload,r=r._init;try{return e(r(i))}catch{}}return null}function t(r){return""+r}function a(r){try{t(r);var i=!1}catch{i=!0}if(i){i=console;var p=i.error,g=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.",g),t(r)}}function s(r){if(r===R)return"<>";if(typeof r=="object"&&r!==null&&r.$$typeof===K)return"<...>";try{var i=e(r);return i?"<"+i+">":"<...>"}catch{return"<...>"}}function o(){var r=D.A;return r===null?null:r.getOwner()}function l(){return Error("react-stack-top-frame")}function h(r){if(Q.call(r,"key")){var i=Object.getOwnPropertyDescriptor(r,"key").get;if(i&&i.isReactWarning)return!1}return r.key!==void 0}function b(r,i){function p(){M||(M=!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 d(){var r=e(this.type);return ee[r]||(ee[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 w(r,i,p,g,N,k,z,Y){return p=k.ref,r={$$typeof:j,type:r,key:i,props:k,_owner:N},(p!==void 0?p:null)!==null?Object.defineProperty(r,"ref",{enumerable:!1,get:d}):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:Y}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}function m(r,i,p,g,N,k,z,Y){var v=i.children;if(v!==void 0)if(g)if(pt(v)){for(g=0;g<v.length;g++)x(v[g]);Object.freeze&&Object.freeze(v)}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 x(v);if(Q.call(i,"key")){v=e(r);var C=Object.keys(i).filter(function(xt){return xt!=="key"});g=0<C.length?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}",ne[v+g]||(C=0<C.length?"{"+C.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} />`,g,v,C,v),ne[v+g]=!0)}if(v=null,p!==void 0&&(a(p),v=""+p),h(i)&&(a(i.key),v=""+i.key),"key"in i){p={};for(var F in i)F!=="key"&&(p[F]=i[F])}else p=i;return v&&b(p,typeof r=="function"?r.displayName||r.name||"Unknown":r),w(r,v,k,N,o(),p,z,Y)}function x(r){typeof r=="object"&&r!==null&&r.$$typeof===j&&r._store&&(r._store.validated=1)}var y=u,j=Symbol.for("react.transitional.element"),st=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),ot=Symbol.for("react.strict_mode"),lt=Symbol.for("react.profiler"),it=Symbol.for("react.consumer"),ct=Symbol.for("react.context"),dt=Symbol.for("react.forward_ref"),ut=Symbol.for("react.suspense"),ht=Symbol.for("react.suspense_list"),ft=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),bt=Symbol.for("react.activity"),mt=Symbol.for("react.client.reference"),D=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=Object.prototype.hasOwnProperty,pt=Array.isArray,I=console.createTask?console.createTask:function(){return null};y={"react-stack-bottom-frame":function(r){return r()}};var M,ee={},te=y["react-stack-bottom-frame"].bind(y,l)(),re=I(s(l)),ne={};O.Fragment=R,O.jsx=function(r,i,p,g,N){var k=1e4>D.recentlyCreatedOwnerStacks++;return m(r,i,p,!1,g,N,k?Error("react-stack-top-frame"):te,k?I(s(r)):re)},O.jsxs=function(r,i,p,g,N){var k=1e4>D.recentlyCreatedOwnerStacks++;return m(r,i,p,!0,g,N,k?Error("react-stack-top-frame"):te,k?I(s(r)):re)}}()),O}var H;function oe(){return H||(H=1,process.env.NODE_ENV==="production"?T.exports=ae():T.exports=se()),T.exports}var n=oe();/**
|
|
23
|
+
* @license lucide-react v0.525.0 - ISC
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the ISC license.
|
|
26
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/const le=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ie=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,s)=>s?s.toUpperCase():a.toLowerCase()),W=e=>{const t=ie(e);return t.charAt(0).toUpperCase()+t.slice(1)},V=(...e)=>e.filter((t,a,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===a).join(" ").trim(),ce=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
28
|
+
* @license lucide-react v0.525.0 - ISC
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the ISC license.
|
|
31
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/var de={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
|
+
* @license lucide-react v0.525.0 - ISC
|
|
34
|
+
*
|
|
35
|
+
* This source code is licensed under the ISC license.
|
|
36
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
+
*/const ue=u.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:o="",children:l,iconNode:h,...b},d)=>u.createElement("svg",{ref:d,...de,width:t,height:t,stroke:e,strokeWidth:s?Number(a)*24/Number(t):a,className:V("lucide",o),...!l&&!ce(b)&&{"aria-hidden":"true"},...b},[...h.map(([w,m])=>u.createElement(w,m)),...Array.isArray(l)?l:[l]]));/**
|
|
38
|
+
* @license lucide-react v0.525.0 - ISC
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the ISC license.
|
|
41
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/const _=(e,t)=>{const a=u.forwardRef(({className:s,...o},l)=>u.createElement(ue,{ref:l,iconNode:t,className:V(`lucide-${le(W(e))}`,`lucide-${e}`,s),...o}));return a.displayName=W(e),a};/**
|
|
43
|
+
* @license lucide-react v0.525.0 - ISC
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the ISC license.
|
|
46
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/const he=_("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
48
|
+
* @license lucide-react v0.525.0 - ISC
|
|
49
|
+
*
|
|
50
|
+
* This source code is licensed under the ISC license.
|
|
51
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
+
*/const fe=_("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
53
|
+
* @license lucide-react v0.525.0 - ISC
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the ISC license.
|
|
56
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/const P=_("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
58
|
+
* @license lucide-react v0.525.0 - ISC
|
|
59
|
+
*
|
|
60
|
+
* This source code is licensed under the ISC license.
|
|
61
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
+
*/const be=_("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
|
+
* @license lucide-react v0.525.0 - ISC
|
|
64
|
+
*
|
|
65
|
+
* This source code is licensed under the ISC license.
|
|
66
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
+
*/const me=_("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
|
+
* @license lucide-react v0.525.0 - ISC
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the ISC license.
|
|
71
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/const G=_("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),pe="bg-white/20 backdrop-blur-lg border border-white/30 shadow-lg",xe={hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1},exit:{opacity:0,scale:.9}};function we(e){const{message:t,isDefaultVisible:a,onClose:s}=e,[o,l]=u.useState(a);function h(){l(!1),s&&s()}return n.jsx(c.AnimatePresence,{children:o&&n.jsxs(c.motion.div,{variants:xe,initial:"hidden",animate:"visible",exit:"exit",className:`${pe} rounded-2xl p-4 flex items-center space-x-4 w-full max-w-md`,children:[n.jsx(be,{className:"text-yellow-300",size:24}),n.jsx("span",{className:"text-white flex-grow",children:t}),n.jsx(c.motion.button,{whileHover:{scale:1.2},whileTap:{scale:.8},onClick:h,children:n.jsx(G,{className:"text-white/70 hover:text-white",size:20})})]})})}const ge="backdrop-blur-lg shadow-lg";function S(e){const{children:t,variant:a,color:s,className:o,onPress:l,isIconOnly:h}=e;let b="px-6 py-3";h&&(b="p-2");let d="",w="",m="",x="",y="",j="";switch(s){case"primary":d="text-white",w="bg-blue-500",m="hover:bg-sky-400",x="",y="bg-[conic-gradient(from_-45deg,#38bdf8,#3b82f6,#38bdf8,#3b82f6,#38bdf8)] shadow-md shadow-sky-400/40",j="p-[1px]";break;case"success":d="text-white",w="bg-emerald-500",m="hover:bg-green-400",x="",y="bg-[conic-gradient(from_-45deg,#22c55e,#34d399,#22c55e,#34d399,#22c55e)] shadow-md shadow-green-400/40",j="p-[1px]";break;case"secondary":d="text-white",w="bg-slate-500",m="hover:bg-gray-400",x="",y="bg-[conic-gradient(from_-45deg,#94a3b8,#d1d5db,#94a3b8,#d1d5db,#94a3b8)] shadow-md shadow-gray-400/40",j="p-[1px]";break;case"warning":d="text-white",w="bg-amber-500",m="hover:bg-yellow-400",x="",y="bg-[conic-gradient(from_-45deg,#eab308,#fbbf24,#eab308,#fbbf24,#eab308)] shadow-md shadow-amber-400/40",j="p-[1px]";break;case"danger":d="text-white",w="bg-red-600",m="hover:bg-rose-400",x="",y="bg-[conic-gradient(from_-45deg,#fb7185,#dc2626,#fb7185,#dc2626,#fb7185)] shadow-md shadow-rose-400/40",j="p-[1px]";break;default:d="text-black",w="bg-white/80",m="hover:bg-white/40",x="",y="bg-[conic-gradient(from_-45deg,#fafafa,#e2e8f0,#fafafa,#e2e8f0,#fafafa)] shadow-sm shadow-white/30",j="p-[1px]";break}return n.jsx(c.motion.button,{whileTap:{scale:1.75},whileHover:{scale:1.25},onClick:l,children:n.jsx("div",{className:`
|
|
73
|
+
rounded-full
|
|
74
|
+
${x}
|
|
75
|
+
${j}
|
|
76
|
+
${y}
|
|
77
|
+
`,children:n.jsx("div",{className:`
|
|
78
|
+
${b}
|
|
79
|
+
${ge}
|
|
80
|
+
rounded-full
|
|
81
|
+
${d}
|
|
82
|
+
${w}
|
|
83
|
+
font-semibold
|
|
84
|
+
transition-colors
|
|
85
|
+
duration-300
|
|
86
|
+
${m}
|
|
87
|
+
${o}
|
|
88
|
+
`,children:t})})})}const ve="bg-white/10 backdrop-blur-md border border-white/20 shadow-inner";function ye(e){const{isDefaultChecked:t,label:a,onValueChange:s}=e,[o,l]=u.useState(t);function h(){s&&s(!o),l(!o)}return n.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer text-white",children:[n.jsx(c.motion.div,{whileTap:{scale:1.75},whileHover:{scale:1.25},className:`
|
|
89
|
+
${ve}
|
|
90
|
+
w-6
|
|
91
|
+
h-6
|
|
92
|
+
rounded-md
|
|
93
|
+
flex
|
|
94
|
+
items-center
|
|
95
|
+
justify-center
|
|
96
|
+
transition-colors
|
|
97
|
+
${o?"bg-blue-500/50":""}
|
|
98
|
+
`,onClick:()=>h(),children:n.jsx(c.AnimatePresence,{children:o&&n.jsx(c.motion.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:n.jsx(he,{size:16})})})}),n.jsx("span",{children:a})]})}var q={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},U=u.createContext&&u.createContext(q),je=["attr","size","title"];function ke(e,t){if(e==null)return{};var a=Ne(e,t),s,o;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(o=0;o<l.length;o++)s=l[o],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function Ne(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},$.apply(this,arguments)}function J(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),a.push.apply(a,s)}return a}function A(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?J(Object(a),!0).forEach(function(s){_e(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):J(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function _e(e,t,a){return t=Ce(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Ce(e){var t=Ee(e,"string");return typeof t=="symbol"?t:t+""}function Ee(e,t){if(typeof e!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function X(e){return e&&e.map((t,a)=>u.createElement(t.tag,A({key:a},t.attr),X(t.child)))}function Oe(e){return t=>u.createElement(Pe,$({attr:A({},e.attr)},t),X(e.child))}function Pe(e){var t=a=>{var{attr:s,size:o,title:l}=e,h=ke(e,je),b=o||a.size||"1em",d;return a.className&&(d=a.className),e.className&&(d=(d?d+" ":"")+e.className),u.createElement("svg",$({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},a.attr,s,h,{className:d,style:A(A({color:e.color||a.color},a.style),e.style),height:b,width:b,xmlns:"http://www.w3.org/2000/svg"}),l&&u.createElement("title",null,l),e.children)};return U!==void 0?u.createElement(U.Consumer,null,a=>t(a)):t(q)}function Se(e){return Oe({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 Te={hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1},exit:{opacity:0,scale:.9}},$e={hidden:{opacity:0},visible:{opacity:1}},Ae="backdrop-blur-lg shadow-lg";function Re(e){const{isOpen:t,children:a,onClose:s,title:o}=e;let l="bg-white/80 ";return n.jsx(c.AnimatePresence,{children:t&&n.jsx(c.motion.div,{variants:$e,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:s,children:n.jsxs(c.motion.div,{variants:Te,className:`${Ae} rounded-3xl w-full max-w-md overflow-hidden`,onClick:b=>b.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:o}),n.jsx(S,{onPress:s,isIconOnly:!0,children:n.jsx(Se,{})})]}),n.jsx("div",{className:`${l} p-6`,children:a}),n.jsxs("div",{className:`${l} p-4 flex justify-end space-x-3`,children:[n.jsx(S,{onPress:s,color:"default",variant:"solid",children:"キャンセル"}),n.jsx(S,{onPress:s,color:"primary",variant:"solid",children:"OK"})]})]})})})}function De(e){const{children:t}=e;return n.jsx("div",{className:"flex space-x-2 p-2 bg-white/10 rounded-full",children:t})}const Ie="bg-white/20 backdrop-blur-lg border border-white/30 shadow-lg";function ze(){const e=[{label:"ホーム",icon:n.jsx(me,{size:16})},{label:"製品",icon:null},{label:"カテゴリA",icon:null}];return n.jsx("nav",{className:`${Ie} rounded-full px-4 py-2`,children:n.jsx("ol",{className:"flex items-center space-x-2",children:e.map((t,a)=>n.jsxs("li",{className:"flex items-center space-x-2 text-white/80",children:[n.jsxs(c.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})]}),a<e.length-1&&n.jsx(P,{size:16,className:"text-white/50"})]},t.label))})})}const Ye="bg-white/20 backdrop-blur-lg border border-white/30 shadow-lg";function Fe(e){const{children:t,className:a}=e;return n.jsx(c.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`
|
|
99
|
+
${Ye}
|
|
100
|
+
rounded-3xl
|
|
101
|
+
overflow-hidden
|
|
102
|
+
w-full
|
|
103
|
+
max-w-sm
|
|
104
|
+
${a}
|
|
105
|
+
`,children:t})}function Le(e){const{children:t}=e;return n.jsx("div",{className:"p-6 border-b border-white/20",children:t})}function Be(e){const{children:t}=e;return n.jsx("div",{className:"p-6",children:t})}function He(e){const{children:t}=e;return n.jsx("div",{className:"p-6 bg-black/10",children:t})}const We="bg-white/20 backdrop-blur-lg border border-white/30 shadow-lg";function Ve(e){const{children:t,className:a}=e;return n.jsx(c.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`
|
|
106
|
+
${We}
|
|
107
|
+
rounded-full
|
|
108
|
+
px-4
|
|
109
|
+
py-1.5
|
|
110
|
+
text-sm
|
|
111
|
+
text-white
|
|
112
|
+
font-medium
|
|
113
|
+
${a}
|
|
114
|
+
`,children:t})}const Ge="bg-white/20 backdrop-blur-lg border border-white/30 shadow-lg";function qe(e){const{label:t,onRemove:a}=e;return n.jsxs(c.motion.div,{layout:!0,initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},className:`
|
|
115
|
+
${Ge}
|
|
116
|
+
rounded-full
|
|
117
|
+
px-4
|
|
118
|
+
py-1.5
|
|
119
|
+
text-sm
|
|
120
|
+
text-white
|
|
121
|
+
font-medium
|
|
122
|
+
flex
|
|
123
|
+
items-center
|
|
124
|
+
space-x-2`,children:[n.jsx("span",{children:t}),a&&n.jsx(c.motion.button,{whileHover:{scale:1.2},whileTap:{scale:.8},onClick:a,children:n.jsx(G,{size:14,className:"text-white/70 hover:text-white"})})]})}const Ue="bg-white/10 backdrop-blur-md border border-white/20 shadow-inner";function Je(e){const{children:t}=e;return n.jsx("pre",{className:`${Ue} p-4 rounded-xl overflow-x-auto`,children:n.jsx("code",{className:"text-sm text-white/90 font-mono",children:t})})}const Xe={hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1},exit:{opacity:0,scale:.9}},Ze="bg-white/20 backdrop-blur-lg border border-white/30 shadow-lg";function Z(e){const{onDateSelect:t}=e;function a(m){t&&t(m)}const[s,o]=u.useState(new Date),l=new Date(s.getFullYear(),s.getMonth()+1,0).getDate(),h=new Date(s.getFullYear(),s.getMonth(),1).getDay(),b=new Date,d=u.useMemo(()=>Array.from({length:l},(m,x)=>x+1).map(m=>{const x=new Date(s.getFullYear(),s.getMonth(),m),y=x.toDateString()===b.toDateString();return n.jsx(c.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>a(x),className:`w-10 h-10 flex items-center justify-center rounded-full cursor-pointer transition-colors ${y?"bg-blue-500/50 text-white font-bold":"text-white/80 hover:bg-white/20"}`,children:m},m)}),[s,l,h,t,b]),w=m=>o(x=>new Date(x.getFullYear(),x.getMonth()+m,1));return n.jsxs(c.motion.div,{variants:Xe,initial:"hidden",animate:"visible",exit:"exit",className:`${Ze} 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(c.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>w(-1),className:"p-2 rounded-full hover:bg-white/20",children:n.jsx(P,{className:"rotate-180",size:20})}),n.jsxs("h3",{className:"font-bold text-lg",children:[s.toLocaleString("default",{month:"long"})," ",s.getFullYear()]}),n.jsx(c.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>w(1),className:"p-2 rounded-full hover:bg-white/20",children:n.jsx(P,{size:20})})]}),n.jsx("div",{className:"grid grid-cols-7 gap-2 text-center text-white/60 text-sm mb-2",children:["日","月","火","水","木","金","土"].map(m=>n.jsx("div",{children:m},m))}),n.jsxs("div",{className:"grid grid-cols-7 gap-y-2",children:[Array.from({length:h}).map((m,x)=>n.jsx("div",{},`empty-${x}`)),d]})]})}const Ke="bg-white/10 backdrop-blur-md border border-white/20 shadow-inner",Qe=e=>n.jsx("input",{...e,className:`${Ke} 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 Me(){const[e,t]=u.useState(null),[a,s]=u.useState(!1),o=u.useRef(null);u.useEffect(()=>{const h=b=>{o.current&&!o.current.contains(b.target)&&s(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);const l=h=>{t(h),s(!1)};return n.jsxs("div",{className:"relative",ref:o,children:[n.jsx(Qe,{readOnly:!0,value:e?e.toLocaleDateString("ja-JP"):"",onClick:()=>s(!a),placeholder:"日付を選択"}),n.jsx(c.AnimatePresence,{children:a&&n.jsx("div",{className:"absolute top-full mt-2 z-20",children:n.jsx(Z,{onDateSelect:l})})})]})}const et="bg-white/20 backdrop-blur-lg border border-white/30 shadow-lg";function tt(){const[e,t]=u.useState(!1),a=["プロフィール","設定","ヘルプ","ログアウト"];return n.jsxs("div",{className:"relative",children:[n.jsxs(S,{onPress:()=>t(!e),className:"flex items-center space-x-2",children:[n.jsx("span",{children:"メニュー"}),n.jsx(c.motion.div,{animate:{rotate:e?180:0},children:n.jsx(fe,{size:20})})]}),n.jsx(c.AnimatePresence,{children:e&&n.jsx(c.motion.ul,{initial:{opacity:0,y:-10},animate:{opacity:1,y:10},exit:{opacity:0,y:-10},className:`${et} absolute top-full mt-2 w-48 rounded-2xl p-2 z-10`,children:a.map(s=>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:s},s))})})]})}function rt(e){const{defaultPage:t,totalPages:a,onPageChange:s}=e,o=Array.from({length:a},(d,w)=>w+1),[l,h]=u.useState(t);function b(d){h(d),s&&s(d)}return n.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[n.jsx(c.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},disabled:l===1,onClick:()=>b(l-1),className:"p-2 rounded-full disabled:opacity-50 disabled:cursor-not-allowed hover:bg-white/20",children:n.jsx(P,{className:"rotate-180"})}),o.map(d=>n.jsx(c.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>b(d),className:`w-10 h-10 rounded-full transition-colors ${l===d?"bg-blue-500/50":"hover:bg-white/20"}`,children:d},d)),n.jsx(c.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},disabled:l===a,onClick:()=>b(l+1),className:"p-2 rounded-full disabled:opacity-50 disabled:cursor-not-allowed hover:bg-white/20",children:n.jsx(P,{})})]})}const nt="bg-white/10 backdrop-blur-md border border-white/20 shadow-inner";function at(e){const{label:t,value:a,selected:s,onChange:o}=e;return n.jsxs("label",{className:"flex items-center space-x-3 cursor-pointer text-white",onClick:()=>o(a),children:[n.jsx("div",{className:`
|
|
125
|
+
${nt}
|
|
126
|
+
w-6
|
|
127
|
+
h-6
|
|
128
|
+
rounded-full
|
|
129
|
+
flex
|
|
130
|
+
items-center
|
|
131
|
+
justify-center
|
|
132
|
+
transition-colors
|
|
133
|
+
`,children:n.jsx(c.AnimatePresence,{children:s===a&&n.jsx(c.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=we,f.Badge=Ve,f.Breadcrumbs=ze,f.Button=S,f.ButtonGroup=De,f.Calendar=Z,f.Card=Fe,f.CardBody=Be,f.CardFooter=He,f.CardHeader=Le,f.Checkbox=ye,f.Chip=qe,f.Code=Je,f.DatePicker=Me,f.Dropdown=tt,f.Modal=Re,f.Pagination=rt,f.Radio=at,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.tsx"],"names":[],"mappings":"AAIA,OAAO,sBAAsB,CAAA"}
|
package/package.json
CHANGED
package/dist/vite.config.d.ts
DELETED