@nanonansen2/nook-ui
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,26 +0,54 @@ | ||
import { jsxs as A, jsx as e } from "react/jsx-runtime"; | ||
import { c as $, L as j } from "../../index-Cl7XVjXY.js"; | ||
import '../../assets/index.css';const v = "_button_10oad_1", y = { | ||
button: v | ||
}, a = $.bind(y); | ||
function m({ | ||
children: o, | ||
import { jsxs as p, jsx as o } from "react/jsx-runtime"; | ||
import { c as z, L as N } from "../../index-Cl7XVjXY.js"; | ||
import '../../assets/index.css';const h = "_button_81ryv_1", x = "_content_81ryv_40", A = "_icon_81ryv_41", $ = "_loader_81ryv_306", j = { | ||
button: h, | ||
"full-width": "_full-width_81ryv_22", | ||
"is-rounded": "_is-rounded_81ryv_25", | ||
"is-elevated": "_is-elevated_81ryv_28", | ||
"is-loading": "_is-loading_81ryv_37", | ||
content: x, | ||
icon: A, | ||
"size-small": "_size-small_81ryv_45", | ||
"has-icon": "_has-icon_81ryv_49", | ||
"size-medium": "_size-medium_81ryv_53", | ||
"size-large": "_size-large_81ryv_61", | ||
"size-xlarge": "_size-xlarge_81ryv_69", | ||
"color-neutral": "_color-neutral_81ryv_77", | ||
"variant-solid": "_variant-solid_81ryv_77", | ||
"variant-outline": "_variant-outline_81ryv_88", | ||
"variant-ghost": "_variant-ghost_81ryv_100", | ||
"variant-faded": "_variant-faded_81ryv_111", | ||
"color-primary": "_color-primary_81ryv_123", | ||
"color-critical": "_color-critical_81ryv_169", | ||
"color-positive": "_color-positive_81ryv_215", | ||
"button-group": "_button-group_81ryv_261", | ||
"button-aligner": "_button-aligner_81ryv_275", | ||
"align-start": "_align-start_81ryv_282", | ||
"align-end": "_align-end_81ryv_285", | ||
"align-top": "_align-top_81ryv_288", | ||
"align-bottom": "_align-bottom_81ryv_291", | ||
"start-icon": "_start-icon_81ryv_299", | ||
"end-icon": "_end-icon_81ryv_302", | ||
loader: $ | ||
}, a = z.bind(j); | ||
function v({ | ||
children: _, | ||
variant: n = "solid", | ||
color: s = "neutral", | ||
size: t = "medium", | ||
icon: l, | ||
endIcon: r, | ||
fullWidth: d = !1, | ||
loading: u = !1, | ||
rounded: b = !1, | ||
elevated: f = !1, | ||
as: N = "button", | ||
href: i, | ||
className: p, | ||
color: t = "neutral", | ||
size: r = "medium", | ||
icon: i, | ||
endIcon: e, | ||
fullWidth: u = !1, | ||
loading: s = !1, | ||
rounded: d = !1, | ||
elevated: y = !1, | ||
as: m = "button", | ||
href: l, | ||
className: g, | ||
disabled: c, | ||
onClick: g, | ||
...x | ||
onClick: b, | ||
...f | ||
}) { | ||
return /* @__PURE__ */ A( | ||
i ? "a" : N, | ||
return /* @__PURE__ */ p( | ||
l ? "a" : m, | ||
{ | ||
@@ -31,28 +59,28 @@ className: a( | ||
[`variant-${n}`]: n, | ||
[`color-${s}`]: s, | ||
[`size-${t}`]: t, | ||
"full-width": d, | ||
"is-loading": u, | ||
"is-rounded": b, | ||
"is-elevated": f, | ||
"has-icon": l && !o, | ||
[`color-${t}`]: t, | ||
[`size-${r}`]: r, | ||
"full-width": u, | ||
"is-loading": s, | ||
"is-rounded": d, | ||
"is-elevated": y, | ||
"has-icon": i && !_, | ||
"is-disabled": c | ||
}, | ||
p | ||
g | ||
), | ||
disabled: c || u, | ||
href: i, | ||
onClick: g, | ||
...x, | ||
disabled: c || s, | ||
href: l, | ||
onClick: b, | ||
...f, | ||
children: [ | ||
u && /* @__PURE__ */ e( | ||
j, | ||
s && /* @__PURE__ */ o( | ||
N, | ||
{ | ||
size: t === "small" ? "small" : "medium", | ||
size: r === "small" ? "small" : "medium", | ||
className: a("loader") | ||
} | ||
), | ||
l && /* @__PURE__ */ e(l, { className: a("icon", "start-icon") }), | ||
o && /* @__PURE__ */ e("span", { className: a("content"), children: o }), | ||
r && /* @__PURE__ */ e(r, { className: a("icon", "end-icon") }) | ||
i && /* @__PURE__ */ o(i, { className: a("icon", "start-icon") }), | ||
_ && /* @__PURE__ */ o("span", { className: a("content"), children: _ }), | ||
e && /* @__PURE__ */ o(e, { className: a("icon", "end-icon") }) | ||
] | ||
@@ -62,17 +90,17 @@ } | ||
} | ||
m.Group = function({ | ||
v.Group = function({ | ||
children: n, | ||
className: s, | ||
...t | ||
className: t, | ||
...r | ||
}) { | ||
return /* @__PURE__ */ e("div", { className: a("button-group", s), ...t, children: n }); | ||
return /* @__PURE__ */ o("div", { className: a("button-group", t), ...r, children: n }); | ||
}; | ||
m.Aligner = function({ | ||
v.Aligner = function({ | ||
children: n, | ||
position: s, | ||
className: t, | ||
...l | ||
position: t, | ||
className: r, | ||
...i | ||
}) { | ||
const r = Array.isArray(s) ? s : [s]; | ||
return /* @__PURE__ */ e( | ||
const e = Array.isArray(t) ? t : [t]; | ||
return /* @__PURE__ */ o( | ||
"div", | ||
@@ -83,7 +111,7 @@ { | ||
{ | ||
[`align-${r.join("-")}`]: s | ||
[`align-${e.join("-")}`]: t | ||
}, | ||
t | ||
r | ||
), | ||
...l, | ||
...i, | ||
children: n | ||
@@ -94,3 +122,3 @@ } | ||
export { | ||
m as Button | ||
v as Button | ||
}; |
export { Button } from './components/Button'; | ||
export { NookProvider } from './components/NookProvider'; |
@@ -1,4 +0,6 @@ | ||
import { Button as r } from "./components/Button/index.js"; | ||
export { | ||
r as Button | ||
import { Button as t } from "./components/Button/index.js"; | ||
import { NookProvider as f } from "./components/NookProvider/index.js"; | ||
import './assets/main.css';export { | ||
t as Button, | ||
f as NookProvider | ||
}; |
{ | ||
"name": "@nanonansen2/nook-ui", | ||
"private": false, | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"type": "module", | ||
@@ -10,3 +10,4 @@ "exports": { | ||
"default": "./dist/main.js" | ||
} | ||
}, | ||
"./style.css": "./dist/assets/main.css" | ||
}, | ||
@@ -13,0 +14,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
29528
20
469
1