reaxify 0.0.31 → 0.0.32

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../../node_modules/react/jsx-runtime.cjs.js"),a=require("../../helpers/cn.cjs.js"),r=require("react"),y=require("../../hooks/useClasses.cjs.js");require("../Form/index.cjs.js");const M=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),G=require("../Tabs/index.cjs.js"),c=r.createContext({});function z({as:l,variant:x,color:f,size:p,loading:b,orientation:e="horizontal",className:C,children:m,...j}){const v=l||"div",t=y(o=>o.buttonGroup),{buttonGroupClasses:q}=r.useContext(G.TabsContext),R=r.useMemo(()=>{var n,u;return{horizontal:a("flex-row",(n=t==null?void 0:t.orientation)==null?void 0:n.horizontal),vertical:a("flex-col",(u=t==null?void 0:t.orientation)==null?void 0:u.vertical)}[e]},[e,t==null?void 0:t.orientation]),h=r.useMemo(()=>{var i,s;const o={horizontal:"rounded-none first-of-type:rounded-s last-of-type:rounded-e",vertical:"rounded-none first-of-type:rounded-t last-of-type:rounded-b"},n=(s=(i=t==null?void 0:t.button)==null?void 0:i.orientation)==null?void 0:s[e];return[o[e],n]},[e,t==null?void 0:t.button]);return d.jsxRuntimeExports.jsx(v,{className:M.twMerge("w-fit flex items-stretch justify-center",t==null?void 0:t.base,R,q,C),...j,children:d.jsxRuntimeExports.jsx(c.Provider,{value:{variant:x,color:f,size:p,loading:b,...h},children:m})})}exports.ButtonGroupContext=c;exports.default=z;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../../node_modules/react/jsx-runtime.cjs.js"),M=require("../../helpers/cn.cjs.js"),r=require("react"),R=require("../../hooks/useClasses.cjs.js");require("../Form/index.cjs.js");const h=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),G=require("../Tabs/index.cjs.js"),c=r.createContext({});function g({as:d,variant:l,color:a,size:x,loading:f,orientation:e="horizontal",className:p,children:b,...C}){const m=d||"div",t=R(o=>o.buttonGroup),{buttonGroupClasses:j}=r.useContext(G.TabsContext),q=r.useMemo(()=>{var n;return[{horizontal:"flex-row",vertical:"flex-col"}[e],(n=t==null?void 0:t.orientation)==null?void 0:n[e]]},[e,t==null?void 0:t.orientation]),v=r.useMemo(()=>{var u,s;const o={horizontal:"rounded-none first-of-type:rounded-s last-of-type:rounded-e",vertical:"rounded-none first-of-type:rounded-t last-of-type:rounded-b"},n=(s=(u=t==null?void 0:t.button)==null?void 0:u.orientation)==null?void 0:s[e],y=o[e];return M(y,n)},[e,t==null?void 0:t.button]);return i.jsxRuntimeExports.jsx(m,{className:h.twMerge("w-fit flex items-stretch justify-center",t==null?void 0:t.base,q,j,p),...C,children:i.jsxRuntimeExports.jsx(c.Provider,{value:{variant:l,color:a,size:x,loading:f,buttonClasses:v},children:b})})}exports.ButtonGroupContext=c;exports.default=g;
@@ -1,52 +1,52 @@
1
- import { j as s } from "../../node_modules/react/jsx-runtime.es.js";
2
- import f from "../../helpers/cn.es.js";
3
- import { createContext as z, useContext as G, useMemo as a } from "react";
4
- import R from "../../hooks/useClasses.es.js";
1
+ import { j as i } from "../../node_modules/react/jsx-runtime.es.js";
2
+ import y from "../../helpers/cn.es.js";
3
+ import { createContext as G, useContext as w, useMemo as s } from "react";
4
+ import z from "../../hooks/useClasses.es.js";
5
5
  import "../Form/index.es.js";
6
- import { twMerge as w } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
6
+ import { twMerge as R } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
7
  import { TabsContext as B } from "../Tabs/index.es.js";
8
- const M = z({});
8
+ const M = G({});
9
9
  function A({
10
- as: m,
11
- variant: p,
12
- color: d,
13
- size: l,
14
- loading: x,
10
+ as: f,
11
+ variant: m,
12
+ color: p,
13
+ size: d,
14
+ loading: a,
15
15
  orientation: o = "horizontal",
16
- className: c,
17
- children: C,
18
- ...b
16
+ className: l,
17
+ children: c,
18
+ ...x
19
19
  }) {
20
- const h = m || "div", t = R((n) => n.buttonGroup), { buttonGroupClasses: v } = G(B), j = a(() => {
21
- var r, e;
22
- return {
23
- horizontal: f("flex-row", (r = t == null ? void 0 : t.orientation) == null ? void 0 : r.horizontal),
24
- vertical: f("flex-col", (e = t == null ? void 0 : t.orientation) == null ? void 0 : e.vertical)
25
- }[o];
26
- }, [o, t == null ? void 0 : t.orientation]), y = a(() => {
27
- var i, u;
20
+ const C = f || "div", t = z((n) => n.buttonGroup), { buttonGroupClasses: b } = w(B), h = s(() => {
21
+ var r;
22
+ return [{
23
+ horizontal: "flex-row",
24
+ vertical: "flex-col"
25
+ }[o], (r = t == null ? void 0 : t.orientation) == null ? void 0 : r[o]];
26
+ }, [o, t == null ? void 0 : t.orientation]), j = s(() => {
27
+ var e, u;
28
28
  const n = {
29
29
  horizontal: "rounded-none first-of-type:rounded-s last-of-type:rounded-e",
30
30
  vertical: "rounded-none first-of-type:rounded-t last-of-type:rounded-b"
31
- }, r = (u = (i = t == null ? void 0 : t.button) == null ? void 0 : i.orientation) == null ? void 0 : u[o];
32
- return [n[o], r];
31
+ }, r = (u = (e = t == null ? void 0 : t.button) == null ? void 0 : e.orientation) == null ? void 0 : u[o], v = n[o];
32
+ return y(v, r);
33
33
  }, [o, t == null ? void 0 : t.button]);
34
- return /* @__PURE__ */ s.jsx(
35
- h,
34
+ return /* @__PURE__ */ i.jsx(
35
+ C,
36
36
  {
37
- className: w(
37
+ className: R(
38
38
  "w-fit flex items-stretch justify-center",
39
39
  t == null ? void 0 : t.base,
40
- j,
41
- v,
42
- c
40
+ h,
41
+ b,
42
+ l
43
43
  ),
44
- ...b,
45
- children: /* @__PURE__ */ s.jsx(
44
+ ...x,
45
+ children: /* @__PURE__ */ i.jsx(
46
46
  M.Provider,
47
47
  {
48
- value: { variant: p, color: d, size: l, loading: x, ...y },
49
- children: C
48
+ value: { variant: m, color: p, size: d, loading: a, buttonClasses: j },
49
+ children: c
50
50
  }
51
51
  )
52
52
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reaxify",
3
3
  "private": false,
4
- "version": "0.0.31",
4
+ "version": "0.0.32",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "files": [
@@ -48,6 +48,8 @@
48
48
  "dev": "vite",
49
49
  "build": "tsc && vite build",
50
50
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
51
+ "publish": "npm version patch --no-git-tag-version --no-commit-hooks && npm publish",
52
+ "release": "npm run build && npm run publish",
51
53
  "preview": "vite preview",
52
54
  "storybook": "storybook dev -p 3000",
53
55
  "build-storybook": "storybook build"