@jamsrui/button 0.0.2 → 0.0.3
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/{button-Dm01AUgs.d.mts → button-DLMZNlKx.d.mts} +1 -1
- package/dist/button-config.d.mts +1 -1
- package/dist/button-config.mjs +1 -1
- package/dist/button.d.mts +1 -1
- package/dist/button.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/spinner.mjs +1 -1
- package/dist/styles.mjs +1 -1
- package/dist/use-button.d.mts +1 -1
- package/dist/use-button.mjs +1 -1
- package/package.json +4 -4
- package/dist/button-Bbcz7Kbb.d.ts +0 -68
- package/dist/button-config.d.ts +0 -17
- package/dist/button-config.js +0 -1
- package/dist/button.d.ts +0 -5
- package/dist/button.js +0 -1
- package/dist/chunk-7FO77XRV.js +0 -1
- package/dist/chunk-BH7ZAA7C.js +0 -1
- package/dist/chunk-KSTOSIKK.mjs +0 -1
- package/dist/chunk-L5HTCZJ2.js +0 -1
- package/dist/chunk-MRE5MIBI.js +0 -1
- package/dist/chunk-NLV7744X.mjs +0 -1
- package/dist/chunk-TDZC6RKV.js +0 -1
- package/dist/chunk-VQVHFE3C.mjs +0 -1
- package/dist/chunk-WUQOKAKL.mjs +0 -1
- package/dist/chunk-YO2JOETJ.mjs +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -1
- package/dist/spinner.d.ts +0 -8
- package/dist/spinner.js +0 -1
- package/dist/styles.d.ts +0 -125
- package/dist/styles.js +0 -1
- package/dist/use-button.d.ts +0 -5
- package/dist/use-button.js +0 -1
|
@@ -8,7 +8,7 @@ declare const useButton: (props: useButton.Props) => {
|
|
|
8
8
|
endContent: react.ReactNode;
|
|
9
9
|
isLoading: boolean | undefined;
|
|
10
10
|
spinner: react.ReactNode;
|
|
11
|
-
spinnerPlacement: "
|
|
11
|
+
spinnerPlacement: "start" | "end";
|
|
12
12
|
disableRipple: boolean | undefined;
|
|
13
13
|
};
|
|
14
14
|
declare namespace useButton {
|
package/dist/button-config.d.mts
CHANGED
package/dist/button-config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createConfigContext as o}from"@jamsrui/utils";const[n,r]=o({displayName:"ButtonConfigContext"});export{n as ButtonConfig,r as useButtonConfig};
|
package/dist/button.d.mts
CHANGED
package/dist/button.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useRenderElement as c}from"@jamsrui/hooks";import{mergeConfigProps as d}from"@jamsrui/utils";import{useButtonConfig as f}from"./button-config";import{LoadingSpinner as P}from"./spinner";import{buttonVariant as l}from"./styles";import{useButton as B}from"./use-button";const L=t=>{const s=f(),o=d(l.defaultVariants,s,t),{size:i}=o,{getButtonProps:p,startContent:a,endContent:m,isLoading:n,spinner:e=React.createElement(P,{size:i==="xs"?14:20}),disableRipple:g,spinnerPlacement:r}=B(o),u=React.createElement(React.Fragment,null,n&&r==="start"?e:a,t.children,n&&r==="end"?e:m);return c("button",{props:[p({}),{children:u}]})};export{L as Button};
|
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{Button as n}from"./button";import{ButtonConfig as u,useButtonConfig as f}from"./button-config";export{n as Button,u as ButtonConfig,f as useButtonConfig};
|
package/dist/spinner.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=r=>{const{size:t=20}=r;return React.createElement("svg",{fill:"currentColor",height:t,viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg"},React.createElement("g",null,React.createElement("rect",{height:5,opacity:".14",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".29",transform:"rotate(30 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".43",transform:"rotate(60 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".57",transform:"rotate(90 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".71",transform:"rotate(120 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".86",transform:"rotate(150 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,transform:"rotate(180 12 12)",width:2,x:11,y:1}),React.createElement("animateTransform",{attributeName:"transform",calcMode:"discrete",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12"})))};export{e as LoadingSpinner};
|
package/dist/styles.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{allColors as i,allVariants as r,colorVariants as s,radiusBaseVariant as e,tv as o}from"@jamsrui/utils";const n="",d=o({base:["relative cursor-pointer inline-flex py-2 px-4 rounded-full justify-center items-center gap-2 shrink-0","data-[loading]:cursor-progress","disabled:cursor-not-allowed disabled:opacity-70","focus-visible:outline-2 focus-visible:outline-primary focus-visible:outline-offset-2"],variants:{color:{default:"shadow-default",primary:"shadow-primary",secondary:"shadow-primary",success:"shadow-primary",warning:"shadow-primary",danger:"shadow-primary"},variant:{solid:"",bordered:"border-2",light:"",text:"",flat:""},isFullWidth:{true:"w-full"},size:{xs:"px-2 py-1 text-xs",sm:"min-w-16 gap-1 px-3 py-1.5 text-xs",md:"min-w-20 gap-2 px-4 py-2 text-sm",lg:"min-w-40 gap-2 px-6 py-2.5 text-base font-medium"},radius:e,disableAnimation:{true:"",false:""}},compoundVariants:[...r.flatMap(a=>i.map(t=>({variant:a,color:t,className:s[a][t]})))],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md",disableAnimation:!1,isFullWidth:!1}});export{d as buttonVariant,n as test};
|
package/dist/use-button.d.mts
CHANGED
package/dist/use-button.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useCallback as f,useMemo as B}from"react";import{cn as x,mapPropsVariants as y}from"@jamsrui/utils";import{buttonVariant as c}from"./styles";const g=m=>{const[u,b]=y(m,c.variantKeys),{isDisabled:P,disableRipple:e,endContent:o,spinner:n,spinnerPlacement:s="start",startContent:a,disabled:R,isLoading:t,className:r,...i}=u,p=R??P??t,l=c(b),d=f(()=>({...i,disabled:p,className:x(l,r),"data-loading":t}),[r,p,t,i,l]);return B(()=>({getButtonProps:d,startContent:a,endContent:o,isLoading:t,spinner:n,spinnerPlacement:s,disableRipple:e}),[d,a,o,t,n,s,e])};export{g as useButton};
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/button",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19",
|
|
6
6
|
"react-dom": ">=19"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@jamsrui/hooks": "^0.0.
|
|
10
|
-
"@jamsrui/core": "^0.0.
|
|
11
|
-
"@jamsrui/utils": "^0.0.
|
|
9
|
+
"@jamsrui/hooks": "^0.0.3",
|
|
10
|
+
"@jamsrui/core": "^0.0.3",
|
|
11
|
+
"@jamsrui/utils": "^0.0.3"
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { PropGetter, UIProps } from '@jamsrui/utils';
|
|
3
|
-
import { ButtonVariantProps } from './styles.js';
|
|
4
|
-
|
|
5
|
-
declare const useButton: (props: useButton.Props) => {
|
|
6
|
-
getButtonProps: PropGetter<Button.Props>;
|
|
7
|
-
startContent: react.ReactNode;
|
|
8
|
-
endContent: react.ReactNode;
|
|
9
|
-
isLoading: boolean | undefined;
|
|
10
|
-
spinner: react.ReactNode;
|
|
11
|
-
spinnerPlacement: "end" | "start";
|
|
12
|
-
disableRipple: boolean | undefined;
|
|
13
|
-
};
|
|
14
|
-
declare namespace useButton {
|
|
15
|
-
interface VariantProps extends Button.VariantProps {
|
|
16
|
-
}
|
|
17
|
-
interface Props extends VariantProps, UIProps<"button"> {
|
|
18
|
-
/**
|
|
19
|
-
* If `true`, the button will show a spinner and be non-interactive.
|
|
20
|
-
* Useful for indicating a loading state during async operations.
|
|
21
|
-
*/
|
|
22
|
-
isLoading?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* If `true`, the button will be disabled.
|
|
25
|
-
* Takes precedence over `isLoading`.
|
|
26
|
-
*/
|
|
27
|
-
isDisabled?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Element to be rendered at the **start** of the button content.
|
|
30
|
-
* Commonly used for icons or prepended text.
|
|
31
|
-
*/
|
|
32
|
-
startContent?: React.ReactNode;
|
|
33
|
-
/**
|
|
34
|
-
* Element to be rendered at the **end** of the button content.
|
|
35
|
-
* Commonly used for icons or appended text.
|
|
36
|
-
*/
|
|
37
|
-
endContent?: React.ReactNode;
|
|
38
|
-
/**
|
|
39
|
-
* Determines where the spinner appears when `isLoading` is true.
|
|
40
|
-
* Can be `"start"` or `"end"`. Defaults to `"start"`.
|
|
41
|
-
*/
|
|
42
|
-
spinnerPlacement?: "start" | "end";
|
|
43
|
-
/**
|
|
44
|
-
* If `true`, disables the ripple effect on click.
|
|
45
|
-
* Recommended for a more minimal or static UI feel.
|
|
46
|
-
*/
|
|
47
|
-
disableRipple?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* If `true`, disables all animations on the button.
|
|
50
|
-
* Useful for performance-sensitive environments or reduced motion settings.
|
|
51
|
-
*/
|
|
52
|
-
disableAnimation?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* A custom spinner element to replace the default loading indicator.
|
|
55
|
-
*/
|
|
56
|
-
spinner?: React.ReactNode;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
declare const Button: (props: Button.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
61
|
-
declare namespace Button {
|
|
62
|
-
interface VariantProps extends ButtonVariantProps {
|
|
63
|
-
}
|
|
64
|
-
interface Props extends useButton.Props {
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export { Button as B, useButton as u };
|
package/dist/button-config.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { B as Button } from './button-Bbcz7Kbb.js';
|
|
2
|
-
import * as react from 'react';
|
|
3
|
-
import { GlobalConfigProps } from '@jamsrui/core';
|
|
4
|
-
import '@jamsrui/utils';
|
|
5
|
-
import './styles.js';
|
|
6
|
-
import 'tailwind-variants';
|
|
7
|
-
|
|
8
|
-
declare const useButtonConfig: () => ButtonConfig.Props;
|
|
9
|
-
declare const ButtonConfig: (props: ButtonConfig.Props & {
|
|
10
|
-
merge?: boolean;
|
|
11
|
-
}) => react.JSX.Element;
|
|
12
|
-
declare namespace ButtonConfig {
|
|
13
|
-
interface Props extends Button.Props, GlobalConfigProps<Button.Props> {
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { ButtonConfig, useButtonConfig };
|
package/dist/button-config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMRE5MIBIjs = require('./chunk-MRE5MIBI.js');exports.ButtonConfig = _chunkMRE5MIBIjs.a; exports.useButtonConfig = _chunkMRE5MIBIjs.b;
|
package/dist/button.d.ts
DELETED
package/dist/button.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkL5HTCZJ2js = require('./chunk-L5HTCZJ2.js');require('./chunk-MRE5MIBI.js');require('./chunk-7FO77XRV.js');require('./chunk-TDZC6RKV.js');require('./chunk-BH7ZAA7C.js');exports.Button = _chunkL5HTCZJ2js.a;
|
package/dist/chunk-7FO77XRV.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var e=r=>{let{size:t=20}=r;return React.createElement("svg",{fill:"currentColor",height:t,viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg"},React.createElement("g",null,React.createElement("rect",{height:5,opacity:".14",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".29",transform:"rotate(30 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".43",transform:"rotate(60 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".57",transform:"rotate(90 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".71",transform:"rotate(120 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".86",transform:"rotate(150 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,transform:"rotate(180 12 12)",width:2,x:11,y:1}),React.createElement("animateTransform",{attributeName:"transform",calcMode:"discrete",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12"})))};exports.a = e;
|
package/dist/chunk-BH7ZAA7C.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utils = require('@jamsrui/utils');var n="",d= exports.b =_utils.tv.call(void 0, {base:["relative cursor-pointer inline-flex py-2 px-4 rounded-full justify-center items-center gap-2 shrink-0","data-[loading]:cursor-progress","disabled:cursor-not-allowed disabled:opacity-70","focus-visible:outline-2 focus-visible:outline-primary focus-visible:outline-offset-2"],variants:{color:{default:"shadow-default",primary:"shadow-primary",secondary:"shadow-primary",success:"shadow-primary",warning:"shadow-primary",danger:"shadow-primary"},variant:{solid:"",bordered:"border-2",light:"",text:"",flat:""},isFullWidth:{true:"w-full"},size:{xs:"px-2 py-1 text-xs",sm:"min-w-16 gap-1 px-3 py-1.5 text-xs",md:"min-w-20 gap-2 px-4 py-2 text-sm",lg:"min-w-40 gap-2 px-6 py-2.5 text-base font-medium"},radius:_utils.radiusBaseVariant,disableAnimation:{true:"",false:""}},compoundVariants:[..._utils.allVariants.flatMap(a=>_utils.allColors.map(t=>({variant:a,color:t,className:_utils.colorVariants[a][t]})))],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md",disableAnimation:!1,isFullWidth:!1}});exports.a = n; exports.b = d;
|
package/dist/chunk-KSTOSIKK.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-WUQOKAKL.mjs";import{useCallback as f,useMemo as B}from"react";import{cn as x,mapPropsVariants as y}from"@jamsrui/utils";var g=m=>{let[u,b]=y(m,e.variantKeys),{isDisabled:P,disableRipple:o,endContent:n,spinner:s,spinnerPlacement:a="start",startContent:r,disabled:R,isLoading:t,className:i,...p}=u,l=R??P??t,d=e(b),c=f(()=>({...p,disabled:l,className:x(d,i),"data-loading":t}),[i,l,t,p,d]);return B(()=>({getButtonProps:c,startContent:r,endContent:n,isLoading:t,spinner:s,spinnerPlacement:a,disableRipple:o}),[c,r,n,t,s,a,o])};export{g as a};
|
package/dist/chunk-L5HTCZJ2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMRE5MIBIjs = require('./chunk-MRE5MIBI.js');var _chunk7FO77XRVjs = require('./chunk-7FO77XRV.js');var _chunkTDZC6RKVjs = require('./chunk-TDZC6RKV.js');var _chunkBH7ZAA7Cjs = require('./chunk-BH7ZAA7C.js');var _hooks = require('@jamsrui/hooks');var _utils = require('@jamsrui/utils');var L=t=>{let m=_chunkMRE5MIBIjs.b.call(void 0, ),o=_utils.mergeConfigProps.call(void 0, _chunkBH7ZAA7Cjs.b.defaultVariants,m,t),{size:u}=o,{getButtonProps:c,startContent:d,endContent:f,isLoading:n,spinner:e=React.createElement(_chunk7FO77XRVjs.a,{size:u==="xs"?14:20}),disableRipple:g,spinnerPlacement:r}=_chunkTDZC6RKVjs.a.call(void 0, o),P=React.createElement(React.Fragment,null,n&&r==="start"?e:d,t.children,n&&r==="end"?e:f);return _hooks.useRenderElement.call(void 0, "button",{props:[c({}),{children:P}]})};exports.a = L;
|
package/dist/chunk-MRE5MIBI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utils = require('@jamsrui/utils');var[n,r]=_utils.createConfigContext.call(void 0, {displayName:"ButtonConfigContext"});exports.a = n; exports.b = r;
|
package/dist/chunk-NLV7744X.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=r=>{let{size:t=20}=r;return React.createElement("svg",{fill:"currentColor",height:t,viewBox:"0 0 24 24",width:t,xmlns:"http://www.w3.org/2000/svg"},React.createElement("g",null,React.createElement("rect",{height:5,opacity:".14",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".29",transform:"rotate(30 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".43",transform:"rotate(60 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".57",transform:"rotate(90 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".71",transform:"rotate(120 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,opacity:".86",transform:"rotate(150 12 12)",width:2,x:11,y:1}),React.createElement("rect",{height:5,transform:"rotate(180 12 12)",width:2,x:11,y:1}),React.createElement("animateTransform",{attributeName:"transform",calcMode:"discrete",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12"})))};export{e as a};
|
package/dist/chunk-TDZC6RKV.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkBH7ZAA7Cjs = require('./chunk-BH7ZAA7C.js');var _react = require('react');var _utils = require('@jamsrui/utils');var g=m=>{let[u,b]=_utils.mapPropsVariants.call(void 0, m,_chunkBH7ZAA7Cjs.b.variantKeys),{isDisabled:P,disableRipple:o,endContent:n,spinner:s,spinnerPlacement:a="start",startContent:r,disabled:R,isLoading:t,className:i,...p}=u,l=_nullishCoalesce(_nullishCoalesce(R, () => (P)), () => (t)),d=_chunkBH7ZAA7Cjs.b.call(void 0, b),c=_react.useCallback.call(void 0, ()=>({...p,disabled:l,className:_utils.cn.call(void 0, d,i),"data-loading":t}),[i,l,t,p,d]);return _react.useMemo.call(void 0, ()=>({getButtonProps:c,startContent:r,endContent:n,isLoading:t,spinner:s,spinnerPlacement:a,disableRipple:o}),[c,r,n,t,s,a,o])};exports.a = g;
|
package/dist/chunk-VQVHFE3C.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as s}from"./chunk-YO2JOETJ.mjs";import{a as i}from"./chunk-NLV7744X.mjs";import{a}from"./chunk-KSTOSIKK.mjs";import{b as p}from"./chunk-WUQOKAKL.mjs";import{useRenderElement as l}from"@jamsrui/hooks";import{mergeConfigProps as B}from"@jamsrui/utils";var L=t=>{let m=s(),o=B(p.defaultVariants,m,t),{size:u}=o,{getButtonProps:c,startContent:d,endContent:f,isLoading:n,spinner:e=React.createElement(i,{size:u==="xs"?14:20}),disableRipple:g,spinnerPlacement:r}=a(o),P=React.createElement(React.Fragment,null,n&&r==="start"?e:d,t.children,n&&r==="end"?e:f);return l("button",{props:[c({}),{children:P}]})};export{L as a};
|
package/dist/chunk-WUQOKAKL.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{allColors as i,allVariants as r,colorVariants as s,radiusBaseVariant as e,tv as o}from"@jamsrui/utils";var n="",d=o({base:["relative cursor-pointer inline-flex py-2 px-4 rounded-full justify-center items-center gap-2 shrink-0","data-[loading]:cursor-progress","disabled:cursor-not-allowed disabled:opacity-70","focus-visible:outline-2 focus-visible:outline-primary focus-visible:outline-offset-2"],variants:{color:{default:"shadow-default",primary:"shadow-primary",secondary:"shadow-primary",success:"shadow-primary",warning:"shadow-primary",danger:"shadow-primary"},variant:{solid:"",bordered:"border-2",light:"",text:"",flat:""},isFullWidth:{true:"w-full"},size:{xs:"px-2 py-1 text-xs",sm:"min-w-16 gap-1 px-3 py-1.5 text-xs",md:"min-w-20 gap-2 px-4 py-2 text-sm",lg:"min-w-40 gap-2 px-6 py-2.5 text-base font-medium"},radius:e,disableAnimation:{true:"",false:""}},compoundVariants:[...r.flatMap(a=>i.map(t=>({variant:a,color:t,className:s[a][t]})))],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"md",disableAnimation:!1,isFullWidth:!1}});export{n as a,d as b};
|
package/dist/chunk-YO2JOETJ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createConfigContext as o}from"@jamsrui/utils";var[n,r]=o({displayName:"ButtonConfigContext"});export{n as a,r as b};
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkL5HTCZJ2js = require('./chunk-L5HTCZJ2.js');var _chunkMRE5MIBIjs = require('./chunk-MRE5MIBI.js');require('./chunk-7FO77XRV.js');require('./chunk-TDZC6RKV.js');require('./chunk-BH7ZAA7C.js');exports.Button = _chunkL5HTCZJ2js.a; exports.ButtonConfig = _chunkMRE5MIBIjs.a; exports.useButtonConfig = _chunkMRE5MIBIjs.b;
|
package/dist/spinner.d.ts
DELETED
package/dist/spinner.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7FO77XRVjs = require('./chunk-7FO77XRV.js');exports.LoadingSpinner = _chunk7FO77XRVjs.a;
|
package/dist/styles.d.ts
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
-
import { VariantProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const test = "";
|
|
5
|
-
declare const buttonVariant: tailwind_variants.TVReturnType<{
|
|
6
|
-
color: {
|
|
7
|
-
default: string;
|
|
8
|
-
primary: string;
|
|
9
|
-
secondary: string;
|
|
10
|
-
success: string;
|
|
11
|
-
warning: string;
|
|
12
|
-
danger: string;
|
|
13
|
-
};
|
|
14
|
-
variant: {
|
|
15
|
-
solid: string;
|
|
16
|
-
bordered: string;
|
|
17
|
-
light: string;
|
|
18
|
-
text: string;
|
|
19
|
-
flat: string;
|
|
20
|
-
};
|
|
21
|
-
isFullWidth: {
|
|
22
|
-
true: string;
|
|
23
|
-
};
|
|
24
|
-
size: {
|
|
25
|
-
xs: string;
|
|
26
|
-
sm: string;
|
|
27
|
-
md: string;
|
|
28
|
-
lg: string;
|
|
29
|
-
};
|
|
30
|
-
radius: {
|
|
31
|
-
readonly sm: "rounded";
|
|
32
|
-
readonly md: "rounded-md";
|
|
33
|
-
readonly lg: "rounded-lg";
|
|
34
|
-
readonly xl: "rounded-xl";
|
|
35
|
-
readonly "2xl": "rounded-2xl";
|
|
36
|
-
readonly "3xl": "rounded-3xl";
|
|
37
|
-
readonly full: "rounded-full";
|
|
38
|
-
readonly none: "rounded-none";
|
|
39
|
-
};
|
|
40
|
-
disableAnimation: {
|
|
41
|
-
true: string;
|
|
42
|
-
false: string;
|
|
43
|
-
};
|
|
44
|
-
}, undefined, string[], {
|
|
45
|
-
color: {
|
|
46
|
-
default: string;
|
|
47
|
-
primary: string;
|
|
48
|
-
secondary: string;
|
|
49
|
-
success: string;
|
|
50
|
-
warning: string;
|
|
51
|
-
danger: string;
|
|
52
|
-
};
|
|
53
|
-
variant: {
|
|
54
|
-
solid: string;
|
|
55
|
-
bordered: string;
|
|
56
|
-
light: string;
|
|
57
|
-
text: string;
|
|
58
|
-
flat: string;
|
|
59
|
-
};
|
|
60
|
-
isFullWidth: {
|
|
61
|
-
true: string;
|
|
62
|
-
};
|
|
63
|
-
size: {
|
|
64
|
-
xs: string;
|
|
65
|
-
sm: string;
|
|
66
|
-
md: string;
|
|
67
|
-
lg: string;
|
|
68
|
-
};
|
|
69
|
-
radius: {
|
|
70
|
-
readonly sm: "rounded";
|
|
71
|
-
readonly md: "rounded-md";
|
|
72
|
-
readonly lg: "rounded-lg";
|
|
73
|
-
readonly xl: "rounded-xl";
|
|
74
|
-
readonly "2xl": "rounded-2xl";
|
|
75
|
-
readonly "3xl": "rounded-3xl";
|
|
76
|
-
readonly full: "rounded-full";
|
|
77
|
-
readonly none: "rounded-none";
|
|
78
|
-
};
|
|
79
|
-
disableAnimation: {
|
|
80
|
-
true: string;
|
|
81
|
-
false: string;
|
|
82
|
-
};
|
|
83
|
-
}, undefined, tailwind_variants.TVReturnType<{
|
|
84
|
-
color: {
|
|
85
|
-
default: string;
|
|
86
|
-
primary: string;
|
|
87
|
-
secondary: string;
|
|
88
|
-
success: string;
|
|
89
|
-
warning: string;
|
|
90
|
-
danger: string;
|
|
91
|
-
};
|
|
92
|
-
variant: {
|
|
93
|
-
solid: string;
|
|
94
|
-
bordered: string;
|
|
95
|
-
light: string;
|
|
96
|
-
text: string;
|
|
97
|
-
flat: string;
|
|
98
|
-
};
|
|
99
|
-
isFullWidth: {
|
|
100
|
-
true: string;
|
|
101
|
-
};
|
|
102
|
-
size: {
|
|
103
|
-
xs: string;
|
|
104
|
-
sm: string;
|
|
105
|
-
md: string;
|
|
106
|
-
lg: string;
|
|
107
|
-
};
|
|
108
|
-
radius: {
|
|
109
|
-
readonly sm: "rounded";
|
|
110
|
-
readonly md: "rounded-md";
|
|
111
|
-
readonly lg: "rounded-lg";
|
|
112
|
-
readonly xl: "rounded-xl";
|
|
113
|
-
readonly "2xl": "rounded-2xl";
|
|
114
|
-
readonly "3xl": "rounded-3xl";
|
|
115
|
-
readonly full: "rounded-full";
|
|
116
|
-
readonly none: "rounded-none";
|
|
117
|
-
};
|
|
118
|
-
disableAnimation: {
|
|
119
|
-
true: string;
|
|
120
|
-
false: string;
|
|
121
|
-
};
|
|
122
|
-
}, undefined, string[], unknown, unknown, undefined>>;
|
|
123
|
-
type ButtonVariantProps = VariantProps<typeof buttonVariant>;
|
|
124
|
-
|
|
125
|
-
export { type ButtonVariantProps, buttonVariant, test };
|
package/dist/styles.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBH7ZAA7Cjs = require('./chunk-BH7ZAA7C.js');exports.buttonVariant = _chunkBH7ZAA7Cjs.b; exports.test = _chunkBH7ZAA7Cjs.a;
|
package/dist/use-button.d.ts
DELETED
package/dist/use-button.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTDZC6RKVjs = require('./chunk-TDZC6RKV.js');require('./chunk-BH7ZAA7C.js');exports.useButton = _chunkTDZC6RKVjs.a;
|