@happeouikit/buttons-ds3
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -0,2 +1,3 @@ | ||
/// <reference types="react" /> | ||
import { IconButtonProps } from "./Button.types"; | ||
export declare const IconButton: (props: IconButtonProps) => import("react/jsx-runtime").JSX.Element; | ||
export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>; |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),w=require("react"),r=require("styled-components"),b={sm:r.css` | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("react"),r=require("styled-components"),f={sm:r.css` | ||
height: 32px; | ||
@@ -96,3 +96,3 @@ font: var(--font-body-sm); | ||
} | ||
`}),g={...i("active"),...i("alert"),...i("success"),...i("warning"),blankPrimary:r.css` | ||
`}),p={...i("active"),...i("alert"),...i("success"),...i("warning"),blankPrimary:r.css` | ||
color: var(--color-primary-text-on-dark); | ||
@@ -239,3 +239,3 @@ fill: var(--color-primary-text-on-dark); | ||
} | ||
`,v=r.span({display:"inline-flex",alignSelf:"center",flexShrink:0,width:"20px",height:"20px"}),I=r.button` | ||
`,b=r.span({display:"inline-flex",alignSelf:"center",flexShrink:0,width:"20px",height:"20px"}),I=r.button` | ||
display: flex; | ||
@@ -257,7 +257,7 @@ justify-content: center; | ||
${({size:o})=>r.css` | ||
${b[o]} | ||
${f[o]} | ||
`} | ||
${({variant:o})=>r.css` | ||
${g[o]} | ||
${p[o]} | ||
`} | ||
@@ -274,3 +274,3 @@ | ||
} | ||
`,z=o=>`${o.charAt(0).toUpperCase()}${o.slice(1)}`,L=()=>{},s=w.forwardRef((o,l)=>{const{size:e="lg",colorScheme:f="active",disabled:p=!1,iconButton:n=!1,loading:a=!1,type:x="button",leadingIcon:d,trailingIcon:u,children:h,onClick:k,variant:y="primary",...$}=o,m=`${f}${z(y)}`;return t.jsxs(I,{iconButton:n,ref:l,disabled:p,type:x,size:e,variant:m,onClick:a?L:k,"aria-disabled":a,...$,children:[!n&&d&&!a&&t.jsx(v,{style:{marginRight:"var(--space-xs-plus"},children:d}),a?t.jsx(j,{}):h,!n&&u&&!a&&t.jsx(v,{style:{marginLeft:"var(--space-xs-plus)"},children:u})]})}),P=o=>{const{icon:l,...e}=o;return t.jsx(s,{iconButton:!0,...e,children:l})},R=o=>t.jsx(s,{colorScheme:"media",variant:"primary",...o});exports.Button=s;exports.IconButton=P;exports.MediaButton=R;exports.buttonSizes=b;exports.buttonVariants=g; | ||
`,R=o=>`${o.charAt(0).toUpperCase()}${o.slice(1)}`,z=()=>{},d=g.forwardRef((o,l)=>{const{size:e="lg",colorScheme:n="active",disabled:x=!1,iconButton:s=!1,loading:a=!1,type:h="button",leadingIcon:u,trailingIcon:v,children:k,onClick:y,variant:$="primary",...m}=o,w=`${n}${R($)}`;return t.jsxs(I,{iconButton:s,ref:l,disabled:x,type:h,size:e,variant:w,onClick:a?z:y,"aria-disabled":a,...m,children:[!s&&u&&!a&&t.jsx(b,{style:{marginRight:"var(--space-xs-plus"},children:u}),a?t.jsx(j,{}):k,!s&&v&&!a&&t.jsx(b,{style:{marginLeft:"var(--space-xs-plus)"},children:v})]})}),L=g.forwardRef((o,l)=>{const{icon:e,...n}=o;return t.jsx(d,{iconButton:!0,ref:l,...n,children:e})}),P=o=>t.jsx(d,{colorScheme:"media",variant:"primary",...o});exports.Button=d;exports.IconButton=L;exports.MediaButton=P;exports.buttonSizes=f;exports.buttonVariants=p; | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -1,5 +0,5 @@ | ||
import { jsxs as b, jsx as l } from "react/jsx-runtime"; | ||
import w from "react"; | ||
import e, { css as r, keyframes as B } from "styled-components"; | ||
const C = { | ||
import { jsxs as g, jsx as l } from "react/jsx-runtime"; | ||
import w, { forwardRef as B } from "react"; | ||
import e, { css as r, keyframes as C } from "styled-components"; | ||
const j = { | ||
sm: r` | ||
@@ -107,3 +107,3 @@ height: 32px; | ||
` | ||
}), j = { | ||
}), I = { | ||
...i("active"), | ||
@@ -227,7 +227,7 @@ ...i("alert"), | ||
` | ||
}, I = () => /* @__PURE__ */ b(z, { children: [ | ||
}, L = () => /* @__PURE__ */ g(z, { children: [ | ||
/* @__PURE__ */ l(c, {}), | ||
/* @__PURE__ */ l(c, {}), | ||
/* @__PURE__ */ l(c, {}) | ||
] }), L = B` | ||
] }), R = C` | ||
0% { | ||
@@ -243,3 +243,3 @@ opacity: 0.24; | ||
`, c = e.div` | ||
animation: ${L} 0.8s ease-in-out 0s infinite alternate; | ||
animation: ${R} 0.8s ease-in-out 0s infinite alternate; | ||
@@ -266,3 +266,3 @@ background-color: currentColor; | ||
} | ||
`, u = e.span({ | ||
`, b = e.span({ | ||
display: "inline-flex", | ||
@@ -290,7 +290,7 @@ alignSelf: "center", | ||
${({ size: o }) => r` | ||
${C[o]} | ||
${j[o]} | ||
`} | ||
${({ variant: o }) => r` | ||
${j[o]} | ||
${I[o]} | ||
`} | ||
@@ -307,14 +307,14 @@ | ||
} | ||
`, P = (o) => `${o.charAt(0).toUpperCase()}${o.slice(1)}`, R = () => { | ||
}, g = w.forwardRef( | ||
`, P = (o) => `${o.charAt(0).toUpperCase()}${o.slice(1)}`, V = () => { | ||
}, f = w.forwardRef( | ||
(o, t) => { | ||
const { | ||
size: n = "lg", | ||
colorScheme: f = "active", | ||
colorScheme: d = "active", | ||
disabled: p = !1, | ||
iconButton: d = !1, | ||
iconButton: s = !1, | ||
loading: a = !1, | ||
type: h = "button", | ||
leadingIcon: s, | ||
trailingIcon: v, | ||
leadingIcon: v, | ||
trailingIcon: u, | ||
children: x, | ||
@@ -324,9 +324,9 @@ onClick: k, | ||
...$ | ||
} = o, m = `${f}${P( | ||
} = o, m = `${d}${P( | ||
y | ||
)}`; | ||
return /* @__PURE__ */ b( | ||
return /* @__PURE__ */ g( | ||
F, | ||
{ | ||
iconButton: d, | ||
iconButton: s, | ||
ref: t, | ||
@@ -337,9 +337,9 @@ disabled: p, | ||
variant: m, | ||
onClick: a ? R : k, | ||
onClick: a ? V : k, | ||
"aria-disabled": a, | ||
...$, | ||
children: [ | ||
!d && s && !a && /* @__PURE__ */ l(u, { style: { marginRight: "var(--space-xs-plus" }, children: s }), | ||
a ? /* @__PURE__ */ l(I, {}) : x, | ||
!d && v && !a && /* @__PURE__ */ l(u, { style: { marginLeft: "var(--space-xs-plus)" }, children: v }) | ||
!s && v && !a && /* @__PURE__ */ l(b, { style: { marginRight: "var(--space-xs-plus" }, children: v }), | ||
a ? /* @__PURE__ */ l(L, {}) : x, | ||
!s && u && !a && /* @__PURE__ */ l(b, { style: { marginLeft: "var(--space-xs-plus)" }, children: u }) | ||
] | ||
@@ -349,13 +349,15 @@ } | ||
} | ||
), T = (o) => { | ||
const { icon: t, ...n } = o; | ||
return /* @__PURE__ */ l(g, { iconButton: !0, ...n, children: t }); | ||
}, A = (o) => /* @__PURE__ */ l(g, { colorScheme: "media", variant: "primary", ...o }); | ||
), A = B( | ||
(o, t) => { | ||
const { icon: n, ...d } = o; | ||
return /* @__PURE__ */ l(f, { iconButton: !0, ref: t, ...d, children: n }); | ||
} | ||
), D = (o) => /* @__PURE__ */ l(f, { colorScheme: "media", variant: "primary", ...o }); | ||
export { | ||
g as Button, | ||
T as IconButton, | ||
A as MediaButton, | ||
C as buttonSizes, | ||
j as buttonVariants | ||
f as Button, | ||
A as IconButton, | ||
D as MediaButton, | ||
j as buttonSizes, | ||
I as buttonVariants | ||
}; | ||
//# sourceMappingURL=index.es.js.map |
{ | ||
"name": "@happeouikit/buttons-ds3", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "", | ||
@@ -26,3 +26,3 @@ "type": "module", | ||
}, | ||
"gitHead": "de7f8a7ef20210b5f18d52c1a0e39ee56782b7c1" | ||
"gitHead": "c90fc7e4266fcc3ef398c8a1afc5bff4013e7fc1" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55311
719