@jamsrui/button 0.0.5 → 0.0.6
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-config.d.mts +3 -2
- package/dist/button.mjs +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/spinner.d.mts +2 -2
- package/dist/spinner.mjs +1 -1
- package/package.json +4 -4
package/dist/button-config.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { B as Button } from './button-DLMZNlKx.mjs';
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { GlobalConfigProps } from '@jamsrui/core';
|
|
4
|
+
import 'react';
|
|
4
5
|
import '@jamsrui/utils';
|
|
5
6
|
import './styles.mjs';
|
|
6
7
|
import 'tailwind-variants';
|
|
@@ -8,7 +9,7 @@ import 'tailwind-variants';
|
|
|
8
9
|
declare const useButtonConfig: () => ButtonConfig.Props;
|
|
9
10
|
declare const ButtonConfig: (props: ButtonConfig.Props & {
|
|
10
11
|
merge?: boolean;
|
|
11
|
-
}) =>
|
|
12
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
12
13
|
declare namespace ButtonConfig {
|
|
13
14
|
interface Props extends Button.Props, GlobalConfigProps<Button.Props> {
|
|
14
15
|
}
|
package/dist/button.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
|
1
|
+
import{Fragment as x,jsx as g,jsxs as b}from"react/jsx-runtime";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 S=t=>{const s=f(),o=d(l.defaultVariants,s,t),{size:i}=o,{getButtonProps:p,startContent:a,endContent:m,isLoading:n,spinner:e=g(P,{size:i==="xs"?14:20}),disableRipple:C,spinnerPlacement:r}=B(o),u=b(x,{children:[n&&r==="start"?e:a,t.children,n&&r==="end"?e:m]});return c("button",{props:[p({}),{children:u}]})};export{S as Button};
|
package/dist/index.d.mts
CHANGED
package/dist/spinner.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
3
|
type Props = {
|
|
4
4
|
size?: number;
|
|
5
5
|
};
|
|
6
|
-
declare const LoadingSpinner: (props: Props) =>
|
|
6
|
+
declare const LoadingSpinner: (props: Props) => react_jsx_runtime.JSX.Element;
|
|
7
7
|
|
|
8
8
|
export { LoadingSpinner };
|
package/dist/spinner.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e
|
|
1
|
+
import{jsx as t,jsxs as i}from"react/jsx-runtime";const o=e=>{const{size:r=20}=e;return t("svg",{fill:"currentColor",height:r,viewBox:"0 0 24 24",width:r,xmlns:"http://www.w3.org/2000/svg",children:i("g",{children:[t("rect",{height:5,opacity:".14",width:2,x:11,y:1}),t("rect",{height:5,opacity:".29",transform:"rotate(30 12 12)",width:2,x:11,y:1}),t("rect",{height:5,opacity:".43",transform:"rotate(60 12 12)",width:2,x:11,y:1}),t("rect",{height:5,opacity:".57",transform:"rotate(90 12 12)",width:2,x:11,y:1}),t("rect",{height:5,opacity:".71",transform:"rotate(120 12 12)",width:2,x:11,y:1}),t("rect",{height:5,opacity:".86",transform:"rotate(150 12 12)",width:2,x:11,y:1}),t("rect",{height:5,transform:"rotate(180 12 12)",width:2,x:11,y:1}),t("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{o as LoadingSpinner};
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/button",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19",
|
|
6
6
|
"react-dom": ">=19"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@jamsrui/
|
|
10
|
-
"@jamsrui/
|
|
11
|
-
"@jamsrui/
|
|
9
|
+
"@jamsrui/utils": "^0.0.6",
|
|
10
|
+
"@jamsrui/core": "^0.0.6",
|
|
11
|
+
"@jamsrui/hooks": "^0.0.6"
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|