@pismo/marola 1.0.9 → 1.0.10

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.
@@ -0,0 +1,26 @@
1
+ import './assets/Tabs.css';
2
+ import * as _ from "react";
3
+ const a = /* @__PURE__ */ _.createContext(null);
4
+ process.env.NODE_ENV !== "production" && (a.displayName = "TabsContext");
5
+ function o() {
6
+ const t = _.useContext(a);
7
+ if (t == null)
8
+ throw new Error("No TabsContext provided");
9
+ return t;
10
+ }
11
+ const b = "_tabs_o8vxb_1", s = "_tabs__tab_o8vxb_5", e = {
12
+ tabs: b,
13
+ tabs__tab: s,
14
+ "tabs__tab--disabled": "_tabs__tab--disabled_o8vxb_23",
15
+ "tabs__tab--selected": "_tabs__tab--selected_o8vxb_32",
16
+ "tabs__tab--chip": "_tabs__tab--chip_o8vxb_36",
17
+ "tabs__tab--chip--disabled": "_tabs__tab--chip--disabled_o8vxb_59",
18
+ "tabs__tab-panel": "_tabs__tab-panel_o8vxb_69",
19
+ "tabs__tab-icon": "_tabs__tab-icon_o8vxb_73",
20
+ "tabs__tab-content": "_tabs__tab-content_o8vxb_78"
21
+ };
22
+ export {
23
+ a as T,
24
+ e as s,
25
+ o as u
26
+ };
@@ -1 +1 @@
1
- ._tabs_q5he5_1{gap:8px;width:100%}._tabs__tab_q5he5_5{min-width:94px;height:48px;padding:0 4px 0 0;color:var(--gray-75);cursor:pointer;background-color:transparent;border:none;border-bottom:2px solid transparent;display:flex;align-items:center;justify-content:center}._tabs__tab_q5he5_5:hover{color:var(--hover);border-bottom:2px solid var(--hover)}._tabs__tab_q5he5_5:active{color:var(--active);border-bottom:2px solid var(--active)}._tabs__tab--disabled_q5he5_26{color:#00000040;cursor:default;border-bottom:2px solid rgba(0,0,0,.25)}._tabs__tab--disabled_q5he5_26:focus,._tabs__tab--disabled_q5he5_26:active,._tabs__tab--disabled_q5he5_26:hover{color:#00000040;border-bottom:2px solid rgba(0,0,0,.25)}._tabs__tab--selected_q5he5_35{color:var(--accent);border-bottom:2px solid var(--accent)}._tabs__tab--selected_q5he5_35._tabs__tab--chip_q5he5_39{color:var(--accent);border-color:var(--accent)}._tabs__tab--chip_q5he5_39{height:32px;border:1px solid var(--gray-75);border-radius:var(--border-radius);color:var(--gray-75);background-color:transparent}._tabs__tab--chip_q5he5_39:hover{color:var(--hover);border-color:var(--hover);border-bottom:1px solid var(--hover)}._tabs__tab--chip_q5he5_39:active{color:var(--active);border-color:var(--active)}._tabs__tab--chip--disabled_q5he5_59{color:#00000040;cursor:default;border:1px solid rgba(0,0,0,.25)}._tabs__tab--chip--disabled_q5he5_59:focus,._tabs__tab--chip--disabled_q5he5_59:active,._tabs__tab--chip--disabled_q5he5_59:hover{color:#00000040;border:1px solid rgba(0,0,0,.25);background-color:transparent}._tabs__tab-panel_q5he5_69{width:100%;margin-top:16px}._tabs__tab-icon_q5he5_73{height:16px;width:16px;margin-right:12px}
1
+ ._tabs_o8vxb_1{gap:8px;width:100%}._tabs__tab_o8vxb_5{min-width:94px;height:48px;padding:0 4px 0 0;color:var(--gray-75);cursor:pointer;background-color:transparent;border:none;border-bottom:2px solid transparent}._tabs__tab_o8vxb_5:hover{color:var(--hover);border-bottom:2px solid var(--hover)}._tabs__tab_o8vxb_5:active{color:var(--active);border-bottom:2px solid var(--active)}._tabs__tab--disabled_o8vxb_23{color:#00000040;cursor:default;border-bottom:2px solid rgba(0,0,0,.25)}._tabs__tab--disabled_o8vxb_23:focus,._tabs__tab--disabled_o8vxb_23:active,._tabs__tab--disabled_o8vxb_23:hover{color:#00000040;border-bottom:2px solid rgba(0,0,0,.25)}._tabs__tab--selected_o8vxb_32{color:var(--accent);border-bottom:2px solid var(--accent)}._tabs__tab--selected_o8vxb_32._tabs__tab--chip_o8vxb_36{color:var(--accent);border-color:var(--accent)}._tabs__tab--chip_o8vxb_36{display:flex;align-items:center;justify-content:center;height:32px;color:var(--gray-75);background-color:transparent;border:1px solid var(--gray-75);border-radius:var(--border-radius)}._tabs__tab--chip_o8vxb_36:hover{color:var(--hover);border-color:var(--hover);border-bottom:1px solid var(--hover)}._tabs__tab--chip_o8vxb_36:active{color:var(--active);border-color:var(--active)}._tabs__tab--chip--disabled_o8vxb_59{color:#00000040;cursor:default;border:1px solid rgba(0,0,0,.25)}._tabs__tab--chip--disabled_o8vxb_59:focus,._tabs__tab--chip--disabled_o8vxb_59:active,._tabs__tab--chip--disabled_o8vxb_59:hover{color:#00000040;background-color:transparent;border:1px solid rgba(0,0,0,.25)}._tabs__tab-panel_o8vxb_69{width:100%;margin-top:16px}._tabs__tab-icon_o8vxb_73{width:16px;height:16px;margin-right:12px}._tabs__tab-content_o8vxb_78{display:flex;align-items:center;justify-content:center}
@@ -0,0 +1 @@
1
+ export {};
@@ -1,61 +1,61 @@
1
- import { jsx as m, jsxs as j, Fragment as k } from "react/jsx-runtime";
1
+ import { jsx as m, jsxs as j } from "react/jsx-runtime";
2
2
  import * as R from "react";
3
- import { forwardRef as H, useContext as U, useMemo as B } from "react";
4
- import { c as D } from "../../clsx-DB4S2d7J.js";
5
- import { Icon as L } from "../Icon/Icon.js";
6
- import { Skeleton as W } from "../Skeleton/Skeleton.js";
7
- import { u as $, T as q, s as i } from "../../Tabs.module-DSjBjg0Z.js";
8
- import { g as z, a as A, u as F, f as G, b as h, _ as J, c as K, P as e, d as Q, e as X } from "../../useSlotProps-C_I1kEHr.js";
9
- import { u as Y, c as Z } from "../../combineHooksSlotProps-C-zYvfnF.js";
10
- import { u as ee } from "../../useId-BW-oWmul.js";
11
- import { u as te } from "../../useButton-DcihopJG.js";
12
- import { u as oe } from "../../useCompoundItem-B7Eo_qZk.js";
13
- const I = "Tab";
14
- function se(s) {
15
- return z(I, s);
3
+ import { forwardRef as k, useContext as H, useMemo as U } from "react";
4
+ import { c as B } from "../../clsx-DB4S2d7J.js";
5
+ import { Icon as D } from "../Icon/Icon.js";
6
+ import { Skeleton as L } from "../Skeleton/Skeleton.js";
7
+ import { u as W, T as $, s as c } from "../../Tabs.module-By78tLjn.js";
8
+ import { g as q, a as z, u as I, f as A, b as h, _ as G, c as J, P as e, d as K, e as Q } from "../../useSlotProps-C_I1kEHr.js";
9
+ import { u as X, c as Y } from "../../combineHooksSlotProps-C-zYvfnF.js";
10
+ import { u as Z } from "../../useId-BW-oWmul.js";
11
+ import { u as ee } from "../../useButton-DcihopJG.js";
12
+ import { u as te } from "../../useCompoundItem-B7Eo_qZk.js";
13
+ const O = "Tab";
14
+ function se(o) {
15
+ return q(O, o);
16
16
  }
17
- A(I, ["root", "selected", "disabled"]);
18
- function ae(s) {
19
- return s.size;
17
+ z(O, ["root", "selected", "disabled"]);
18
+ function oe(o) {
19
+ return o.size;
20
20
  }
21
- function ne(s) {
21
+ function ae(o) {
22
22
  const {
23
23
  value: t,
24
- rootRef: o,
24
+ rootRef: s,
25
25
  disabled: r = !1,
26
26
  id: d
27
- } = s, a = R.useRef(null), n = ee(d), {
27
+ } = o, a = R.useRef(null), n = Z(d), {
28
28
  value: u,
29
29
  selectionFollowsFocus: b,
30
30
  getTabPanelId: l
31
- } = $(), f = R.useMemo(() => ({
31
+ } = W(), f = R.useMemo(() => ({
32
32
  disabled: r,
33
33
  ref: a,
34
34
  id: n
35
35
  }), [r, a, n]), {
36
- id: c,
36
+ id: i,
37
37
  index: g,
38
38
  totalItemCount: T
39
- } = oe(t ?? ae, f), {
39
+ } = te(t ?? oe, f), {
40
40
  getRootProps: _,
41
41
  highlighted: C,
42
42
  selected: p
43
- } = Y({
44
- item: c
43
+ } = X({
44
+ item: i
45
45
  }), {
46
- getRootProps: y,
46
+ getRootProps: v,
47
47
  rootRef: P,
48
- active: v,
49
- focusVisible: E,
48
+ active: y,
49
+ focusVisible: F,
50
50
  setFocusVisible: S
51
- } = te({
51
+ } = ee({
52
52
  disabled: r,
53
53
  focusableWhenDisabled: !b,
54
54
  type: "button"
55
- }), x = F(a, o, P), V = c !== void 0 ? l(c) : void 0;
55
+ }), x = I(a, s, P), V = i !== void 0 ? l(i) : void 0;
56
56
  return {
57
57
  getRootProps: (N = {}) => {
58
- const w = G(N), M = Z(_, y);
58
+ const w = A(N), M = Y(_, v);
59
59
  return h({}, N, M(w), {
60
60
  role: "tab",
61
61
  "aria-controls": V,
@@ -64,27 +64,27 @@ function ne(s) {
64
64
  ref: x
65
65
  });
66
66
  },
67
- active: v,
68
- focusVisible: E,
67
+ active: y,
68
+ focusVisible: F,
69
69
  highlighted: C,
70
70
  index: g,
71
71
  rootRef: x,
72
72
  // the `selected` state isn't set on the server (it relies on effects to be calculated),
73
73
  // so we fall back to checking the `value` prop with the selectedValue from the TabsContext
74
- selected: p || c === u,
74
+ selected: p || i === u,
75
75
  setFocusVisible: S,
76
76
  totalTabsCount: T
77
77
  };
78
78
  }
79
- const re = ["action", "children", "disabled", "onChange", "onClick", "onFocus", "slotProps", "slots", "value"], le = (s) => {
79
+ const ne = ["action", "children", "disabled", "onChange", "onClick", "onFocus", "slotProps", "slots", "value"], re = (o) => {
80
80
  const {
81
81
  selected: t,
82
- disabled: o
83
- } = s;
84
- return Q({
85
- root: ["root", t && "selected", o && "disabled"]
86
- }, X(se));
87
- }, O = /* @__PURE__ */ R.forwardRef(function(t, o) {
82
+ disabled: s
83
+ } = o;
84
+ return K({
85
+ root: ["root", t && "selected", s && "disabled"]
86
+ }, Q(se));
87
+ }, E = /* @__PURE__ */ R.forwardRef(function(t, s) {
88
88
  var r;
89
89
  const {
90
90
  children: d,
@@ -92,35 +92,35 @@ const re = ["action", "children", "disabled", "onChange", "onClick", "onFocus",
92
92
  slotProps: n = {},
93
93
  slots: u = {},
94
94
  value: b
95
- } = t, l = J(t, re), f = R.useRef(), c = F(f, o), {
95
+ } = t, l = G(t, ne), f = R.useRef(), i = I(f, s), {
96
96
  active: g,
97
97
  highlighted: T,
98
98
  selected: _,
99
99
  getRootProps: C
100
- } = ne(h({}, t, {
101
- rootRef: c,
100
+ } = ae(h({}, t, {
101
+ rootRef: i,
102
102
  value: b
103
103
  })), p = h({}, t, {
104
104
  active: g,
105
105
  disabled: a,
106
106
  highlighted: T,
107
107
  selected: _
108
- }), y = le(p), P = (r = u.root) != null ? r : "button", v = K({
108
+ }), v = re(p), P = (r = u.root) != null ? r : "button", y = J({
109
109
  elementType: P,
110
110
  getSlotProps: C,
111
111
  externalSlotProps: n.root,
112
112
  externalForwardedProps: l,
113
113
  additionalProps: {
114
- ref: o
114
+ ref: s
115
115
  },
116
116
  ownerState: p,
117
- className: y.root
117
+ className: v.root
118
118
  });
119
- return /* @__PURE__ */ m(P, h({}, v, {
119
+ return /* @__PURE__ */ m(P, h({}, y, {
120
120
  children: d
121
121
  }));
122
122
  });
123
- process.env.NODE_ENV !== "production" && (O.propTypes = {
123
+ process.env.NODE_ENV !== "production" && (E.propTypes = {
124
124
  // ┌────────────────────────────── Warning ──────────────────────────────┐
125
125
  // │ These PropTypes are generated from the TypeScript type definitions. │
126
126
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
@@ -166,25 +166,25 @@ process.env.NODE_ENV !== "production" && (O.propTypes = {
166
166
  */
167
167
  value: e.oneOfType([e.number, e.string])
168
168
  });
169
- const Te = H(
170
- ({ children: s, value: t, disabled: o, className: r, "data-testid": d, icon: a, chip: n, isLoading: u }, b) => {
171
- const l = U(q), f = B(
172
- () => D(
173
- i.tabs__tab,
174
- t === (l == null ? void 0 : l.value) && i["tabs__tab--selected"],
175
- o && !n && i["tabs__tab--disabled"],
176
- n && i["tabs__tab--chip"],
177
- n && o && i["tabs__tab--chip--disabled"],
169
+ const ge = k(
170
+ ({ children: o, value: t, disabled: s, className: r, "data-testid": d, icon: a, chip: n, isLoading: u }, b) => {
171
+ const l = H($), f = U(
172
+ () => B(
173
+ c.tabs__tab,
174
+ t === (l == null ? void 0 : l.value) && c["tabs__tab--selected"],
175
+ s && !n && c["tabs__tab--disabled"],
176
+ n && c["tabs__tab--chip"],
177
+ n && s && c["tabs__tab--chip--disabled"],
178
178
  r
179
179
  ),
180
- [t, l, o, n]
180
+ [t, l, s, n]
181
181
  );
182
- return /* @__PURE__ */ m(O, { className: f, disabled: o, value: t, "data-testid": d, ref: b, children: u ? /* @__PURE__ */ m(W, { style: { width: "50px" } }) : /* @__PURE__ */ j(k, { children: [
183
- a && /* @__PURE__ */ m("span", { className: i["tabs__tab-icon"], children: typeof a == "string" ? /* @__PURE__ */ m(L, { icon: a }) : a }),
184
- s
182
+ return /* @__PURE__ */ m(E, { className: f, disabled: s, value: t, "data-testid": d, ref: b, children: u ? /* @__PURE__ */ m(L, { style: { width: "50px", margin: "auto" } }) : /* @__PURE__ */ j("div", { className: c["tabs__tab-content"], children: [
183
+ a && /* @__PURE__ */ m("span", { className: c["tabs__tab-icon"], children: typeof a == "string" ? /* @__PURE__ */ m(D, { icon: a }) : a }),
184
+ o
185
185
  ] }) });
186
186
  }
187
187
  );
188
188
  export {
189
- Te as Tab
189
+ ge as Tab
190
190
  };
@@ -2,7 +2,7 @@ import { jsx as T } from "react/jsx-runtime";
2
2
  import * as P from "react";
3
3
  import { forwardRef as v } from "react";
4
4
  import { c as y } from "../../clsx-DB4S2d7J.js";
5
- import { u as x, s as C } from "../../Tabs.module-DSjBjg0Z.js";
5
+ import { u as x, s as C } from "../../Tabs.module-By78tLjn.js";
6
6
  import { g as N, a as _, u as w, b, _ as O, c as E, P as o, d as I, e as S } from "../../useSlotProps-C_I1kEHr.js";
7
7
  import { u as U } from "../../useId-BW-oWmul.js";
8
8
  import { u as j } from "../../useCompoundItem-B7Eo_qZk.js";
@@ -2,7 +2,7 @@ import { jsx as T } from "react/jsx-runtime";
2
2
  import * as r from "react";
3
3
  import { forwardRef as q } from "react";
4
4
  import { c as B } from "../../clsx-DB4S2d7J.js";
5
- import { T as G, u as J, s as Q } from "../../Tabs.module-DSjBjg0Z.js";
5
+ import { T as G, u as J, s as Q } from "../../Tabs.module-By78tLjn.js";
6
6
  import { Tab as Ie } from "./Tab.js";
7
7
  import { TabPanel as Fe } from "./TabPanel.js";
8
8
  import { g as I, a as _, b as C, _ as F, c as $, P as t, d as N, e as w } from "../../useSlotProps-C_I1kEHr.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pismo/marola",
3
3
  "description": "CDX tribe component library",
4
- "version": "1.0.9",
4
+ "version": "1.0.10",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1,25 +0,0 @@
1
- import './assets/Tabs.css';
2
- import * as _ from "react";
3
- const a = /* @__PURE__ */ _.createContext(null);
4
- process.env.NODE_ENV !== "production" && (a.displayName = "TabsContext");
5
- function e() {
6
- const t = _.useContext(a);
7
- if (t == null)
8
- throw new Error("No TabsContext provided");
9
- return t;
10
- }
11
- const s = "_tabs_q5he5_1", b = "_tabs__tab_q5he5_5", o = {
12
- tabs: s,
13
- tabs__tab: b,
14
- "tabs__tab--disabled": "_tabs__tab--disabled_q5he5_26",
15
- "tabs__tab--selected": "_tabs__tab--selected_q5he5_35",
16
- "tabs__tab--chip": "_tabs__tab--chip_q5he5_39",
17
- "tabs__tab--chip--disabled": "_tabs__tab--chip--disabled_q5he5_59",
18
- "tabs__tab-panel": "_tabs__tab-panel_q5he5_69",
19
- "tabs__tab-icon": "_tabs__tab-icon_q5he5_73"
20
- };
21
- export {
22
- a as T,
23
- o as s,
24
- e as u
25
- };