@jamsr-ui/utils
Advanced tools
Comparing version 0.0.21 to 0.0.22
"use client" | ||
"use strict";var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var l=(n,t)=>{for(var o in t)r(n,o,{get:t[o],enumerable:!0})},p=(n,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of u(t))!a.call(n,e)&&e!==o&&r(n,e,{get:()=>t[e],enumerable:!(s=i(t,e))||s.enumerable});return n};var c=n=>p(r({},"__esModule",{value:!0}),n);var k={};l(k,{dataAttr:()=>f,getBoolean:()=>x,isBoolean:()=>g,isDecNum:()=>h,isEmpty:()=>d,isString:()=>b,isTrue:()=>y});module.exports=c(k);var f=n=>n?"true":void 0,b=n=>typeof n=="string",g=n=>typeof n=="boolean",y=n=>n===!0,d=n=>typeof n=="object"&&n!==null?Object.keys(n).length===0:Array.isArray(n)?n.length===0:!n,x=n=>n,h=n=>/^\d+(\.\d+)?$/.test(n.toString());0&&(module.exports={dataAttr,getBoolean,isBoolean,isDecNum,isEmpty,isString,isTrue}); | ||
"use strict";var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var u=(t,e)=>{for(var o in e)r(t,o,{get:e[o],enumerable:!0})},p=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a(e))!l.call(t,n)&&n!==o&&r(t,n,{get:()=>e[n],enumerable:!(s=i(e,n))||s.enumerable});return t};var c=t=>p(r({},"__esModule",{value:!0}),t);var k={};u(k,{dataAttr:()=>f,getBoolean:()=>d,isBoolean:()=>g,isDecNum:()=>h,isEmpty:()=>x,isString:()=>b,isTrue:()=>y});module.exports=c(k);var f=t=>t?"true":"false",b=t=>typeof t=="string",g=t=>typeof t=="boolean",y=t=>t===!0,x=t=>typeof t=="object"&&t!==null?Object.keys(t).length===0:Array.isArray(t)?t.length===0:!t,d=t=>t,h=t=>/^\d+(\.\d+)?$/.test(t.toString());0&&(module.exports={dataAttr,getBoolean,isBoolean,isDecNum,isEmpty,isString,isTrue}); |
"use client" | ||
"use strict";var i=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var r=(e,s)=>{for(var t in s)i(e,t,{get:s[t],enumerable:!0})},f=(e,s,t,u)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of a(s))!n.call(e,o)&&o!==t&&i(e,o,{get:()=>s[o],enumerable:!(u=l(s,o))||u.enumerable});return e};var c=e=>f(i({},"__esModule",{value:!0}),e);var C={};r(C,{absoluteFullClasses:()=>x,dataFocusVisibleClasses:()=>g,focusVisibleClasses:()=>b,groupDataFocusVisibleClasses:()=>p,ringClasses:()=>v,translateCenterClasses:()=>d});module.exports=c(C);var b=["focus-visible:z-10","focus-visible:outline-2","focus-visible:outline-focus","focus-visible:outline-offset-2"],g=["outline-none","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],p=["outline-none","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],v=["outline-none","ring-2","ring-focus","ring-offset-2","ring-offset-background"],d=["absolute","top-1/2","left-1/2","-translate-x-1/2","-translate-y-1/2"],x=["absolute","inset-0"];0&&(module.exports={absoluteFullClasses,dataFocusVisibleClasses,focusVisibleClasses,groupDataFocusVisibleClasses,ringClasses,translateCenterClasses}); | ||
"use strict";var i=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var r=(e,s)=>{for(var t in s)i(e,t,{get:s[t],enumerable:!0})},f=(e,s,t,u)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of a(s))!n.call(e,o)&&o!==t&&i(e,o,{get:()=>s[o],enumerable:!(u=l(s,o))||u.enumerable});return e};var c=e=>f(i({},"__esModule",{value:!0}),e);var C={};r(C,{absoluteFullClasses:()=>x,dataFocusVisibleClasses:()=>g,focusVisibleClasses:()=>b,groupDataFocusVisibleClasses:()=>p,ringClasses:()=>v,translateCenterClasses:()=>d});module.exports=c(C);var b=["focus-visible:z-10","focus-visible:outline-primary","focus-visible:outline-2","focus-visible:outline-focus","focus-visible:outline-offset-2"],g=["outline-none","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],p=["outline-none","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],v=["outline-none","ring-2","ring-focus","ring-offset-2","ring-offset-background"],d=["absolute","top-1/2","left-1/2","-translate-x-1/2","-translate-y-1/2"],x=["absolute","inset-0"];0&&(module.exports={absoluteFullClasses,dataFocusVisibleClasses,focusVisibleClasses,groupDataFocusVisibleClasses,ringClasses,translateCenterClasses}); |
"use client" | ||
"use strict";var y=Object.create;var g=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var T=(e,r)=>{for(var t in r)g(e,t,{get:r[t],enumerable:!0})},i=(e,r,t,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of w(r))!C.call(e,o)&&o!==t&&g(e,o,{get:()=>r[o],enumerable:!(u=m(r,o))||u.enumerable});return e},n=(e,r,t)=>(i(e,r,"default"),t&&i(t,r,"default")),l=(e,r,t)=>(t=e!=null?y(h(e)):{},i(r||!e||!e.__esModule?g(t,"default",{value:e,enumerable:!0}):t,e)),v=e=>i(g({},"__esModule",{value:!0}),e);var s={};T(s,{TRANSITION_VARIANTS:()=>L,absoluteFullClasses:()=>F,cn:()=>p,colorVariants:()=>H,createContext:()=>J,dataAttr:()=>k,dataFocusVisibleClasses:()=>z,focusVisibleClasses:()=>K,getBoolean:()=>O,groupDataFocusVisibleClasses:()=>j,isBoolean:()=>R,isDecNum:()=>P,isEmpty:()=>N,isString:()=>V,isTrue:()=>S,mapPropsVariants:()=>Q,ringClasses:()=>B,translateCenterClasses:()=>E});module.exports=v(s);n(s,require("tailwind-variants"),module.exports);var k=e=>e?"true":void 0,V=e=>typeof e=="string",R=e=>typeof e=="boolean",S=e=>e===!0,N=e=>typeof e=="object"&&e!==null?Object.keys(e).length===0:Array.isArray(e)?e.length===0:!e,O=e=>e,P=e=>/^\d+(\.\d+)?$/.test(e.toString());var x=l(require("clsx")),b=require("tailwind-merge"),A=(0,b.extendTailwindMerge)({extend:{classGroups:{gap:["gap-responsive"],"font-size":["text-size-inherit"],shadow:["shadow-card"]}}}),p=(...e)=>A((0,x.default)(e));var K=["focus-visible:z-10","focus-visible:outline-2","focus-visible:outline-focus","focus-visible:outline-offset-2"],z=["outline-none","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],j=["outline-none","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],B=["outline-none","ring-2","ring-focus","ring-offset-2","ring-offset-background"],E=["absolute","top-1/2","left-1/2","-translate-x-1/2","-translate-y-1/2"],F=["absolute","inset-0"];var I={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",error:"bg-error text-error-foreground",foreground:"bg-foreground text-background"},M={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",error:"shadow-lg shadow-error/40 bg-error text-error-foreground",foreground:"shadow-lg shadow-foreground/40 bg-foreground text-background"},D={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",error:"bg-transparent border-error text-error",foreground:"bg-transparent border-foreground text-foreground"},G={default:"bg-default/40 text-default-foreground",primary:"bg-primary/20 text-primary",secondary:"bg-secondary/20 text-secondary",success:"bg-success/20 text-success-600 dark:text-success",warning:"bg-warning/20 text-warning-600 dark:text-warning",error:"bg-error/20 text-error dark:text-error-500",foreground:"bg-foreground/10 text-foreground"},_={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",error:"border-default bg-default-100 text-error",foreground:"border-default bg-default-100 text-foreground"},$={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",error:"bg-transparent text-error",foreground:"bg-transparent text-foreground"},q={default:"border-default text-default-foreground hover:!bg-default",primary:"border-primary text-primary hover:!text-primary-foreground hover:!bg-primary",secondary:"border-secondary text-secondary hover:text-secondary-foreground hover:!bg-secondary",success:"border-success text-success hover:!text-success-foreground hover:!bg-success",warning:"border-warning text-warning hover:!text-warning-foreground hover:!bg-warning",error:"border-error text-error hover:!text-error-foreground hover:!bg-error",foreground:"border-foreground text-foreground hover:!bg-foreground"},H={solid:I,shadow:M,outline:D,flat:G,faded:_,light:$,ghost:q};var c=l(require("react"));function J(e={}){let{strict:r=!0,errorMessage:t="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:u}=e,o=c.createContext(void 0);o.displayName=u;function a(){let d=c.useContext(o);if(!d&&r){let f=new Error(t);throw f.name="ContextError",Error.captureStackTrace?.(f,a),f}return d}return[o.Provider,a,o]}var L={collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}};var Q=(e,r,t=!0)=>{if(!r)return[e,{}];let u=r.reduce((o,a)=>a in e?{...o,[a]:e[a]}:o,{});return t?[Object.keys(e).filter(a=>!r.includes(a)).reduce((a,d)=>({...a,[d]:e[d]}),{}),u]:[e,u]};0&&(module.exports={TRANSITION_VARIANTS,absoluteFullClasses,cn,colorVariants,createContext,dataAttr,dataFocusVisibleClasses,focusVisibleClasses,getBoolean,groupDataFocusVisibleClasses,isBoolean,isDecNum,isEmpty,isString,isTrue,mapPropsVariants,ringClasses,translateCenterClasses,...require("tailwind-variants")}); | ||
"use strict";var y=Object.create;var g=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var v=(e,r)=>{for(var t in r)g(e,t,{get:r[t],enumerable:!0})},d=(e,r,t,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of w(r))!C.call(e,o)&&o!==t&&g(e,o,{get:()=>r[o],enumerable:!(u=m(r,o))||u.enumerable});return e},n=(e,r,t)=>(d(e,r,"default"),t&&d(t,r,"default")),l=(e,r,t)=>(t=e!=null?y(h(e)):{},d(r||!e||!e.__esModule?g(t,"default",{value:e,enumerable:!0}):t,e)),T=e=>d(g({},"__esModule",{value:!0}),e);var s={};v(s,{TRANSITION_VARIANTS:()=>L,absoluteFullClasses:()=>F,cn:()=>p,colorVariants:()=>H,createContext:()=>J,dataAttr:()=>k,dataFocusVisibleClasses:()=>z,focusVisibleClasses:()=>K,getBoolean:()=>O,groupDataFocusVisibleClasses:()=>j,isBoolean:()=>R,isDecNum:()=>P,isEmpty:()=>N,isString:()=>V,isTrue:()=>S,mapPropsVariants:()=>Q,ringClasses:()=>B,translateCenterClasses:()=>E});module.exports=T(s);n(s,require("tailwind-variants"),module.exports);var k=e=>e?"true":"false",V=e=>typeof e=="string",R=e=>typeof e=="boolean",S=e=>e===!0,N=e=>typeof e=="object"&&e!==null?Object.keys(e).length===0:Array.isArray(e)?e.length===0:!e,O=e=>e,P=e=>/^\d+(\.\d+)?$/.test(e.toString());var x=l(require("clsx")),b=require("tailwind-merge"),A=(0,b.extendTailwindMerge)({extend:{classGroups:{gap:["gap-responsive"],"font-size":["text-size-inherit"],shadow:["shadow-card"]}}}),p=(...e)=>A((0,x.default)(e));var K=["focus-visible:z-10","focus-visible:outline-primary","focus-visible:outline-2","focus-visible:outline-focus","focus-visible:outline-offset-2"],z=["outline-none","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],j=["outline-none","group-data-[focus-visible=true]:z-10","group-data-[focus-visible=true]:ring-2","group-data-[focus-visible=true]:ring-focus","group-data-[focus-visible=true]:ring-offset-2","group-data-[focus-visible=true]:ring-offset-background"],B=["outline-none","ring-2","ring-focus","ring-offset-2","ring-offset-background"],E=["absolute","top-1/2","left-1/2","-translate-x-1/2","-translate-y-1/2"],F=["absolute","inset-0"];var I={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",error:"bg-error text-error-foreground",foreground:"bg-foreground text-background"},M={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",error:"shadow-lg shadow-error/40 bg-error text-error-foreground",foreground:"shadow-lg shadow-foreground/40 bg-foreground text-background"},D={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",error:"bg-transparent border-error text-error",foreground:"bg-transparent border-foreground text-foreground"},G={default:"bg-default/40 text-default-foreground",primary:"bg-primary/20 text-primary",secondary:"bg-secondary/20 text-secondary",success:"bg-success/20 text-success-600 dark:text-success",warning:"bg-warning/20 text-warning-600 dark:text-warning",error:"bg-error/20 text-error dark:text-error-500",foreground:"bg-foreground/10 text-foreground"},_={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",error:"border-default bg-default-100 text-error",foreground:"border-default bg-default-100 text-foreground"},$={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",error:"bg-transparent text-error",foreground:"bg-transparent text-foreground"},q={default:"border-default text-default-foreground hover:!bg-default",primary:"border-primary text-primary hover:!text-primary-foreground hover:!bg-primary",secondary:"border-secondary text-secondary hover:text-secondary-foreground hover:!bg-secondary",success:"border-success text-success hover:!text-success-foreground hover:!bg-success",warning:"border-warning text-warning hover:!text-warning-foreground hover:!bg-warning",error:"border-error text-error hover:!text-error-foreground hover:!bg-error",foreground:"border-foreground text-foreground hover:!bg-foreground"},H={solid:I,shadow:M,outline:D,flat:G,faded:_,light:$,ghost:q};var c=l(require("react"));function J(e={}){let{strict:r=!0,errorMessage:t="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:u}=e,o=c.createContext(void 0);o.displayName=u;function a(){let i=c.useContext(o);if(!i&&r){let f=new Error(t);throw f.name="ContextError",Error.captureStackTrace?.(f,a),f}return i}return[o.Provider,a,o]}var L={collapse:{enter:{opacity:1,height:"auto",transition:{height:{type:"spring",bounce:0,duration:.3},opacity:{easings:"ease",duration:.4}}},exit:{opacity:0,height:0,transition:{easings:"ease",duration:.3}}}};var Q=(e,r,t=!0)=>{if(!r)return[e,{}];let u=r.reduce((o,a)=>a in e?{...o,[a]:e[a]}:o,{});return t?[Object.keys(e).filter(a=>!r.includes(a)).reduce((a,i)=>({...a,[i]:e[i]}),{}),u]:[e,u]};0&&(module.exports={TRANSITION_VARIANTS,absoluteFullClasses,cn,colorVariants,createContext,dataAttr,dataFocusVisibleClasses,focusVisibleClasses,getBoolean,groupDataFocusVisibleClasses,isBoolean,isDecNum,isEmpty,isString,isTrue,mapPropsVariants,ringClasses,translateCenterClasses,...require("tailwind-variants")}); |
{ | ||
"name": "@jamsr-ui/utils", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.mjs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
36287
305