welcome-ui 0.0.0-dev.1789563648976 → 0.0.0-dev.1789571589259

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,4 +1,5 @@
1
1
  "use client";
2
+ import './CustomPopper.css';
2
3
  var sn = Object.defineProperty;
3
4
  var cn = (a, n, t) => n in a ? sn(a, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[n] = t;
4
5
  var w = (a, n, t) => cn(a, typeof n != "symbol" ? n + "" : n, t);
package/dist/Tabs.css CHANGED
@@ -1 +1 @@
1
- @layer components{._root_6qdcx_2{display:flex;align-items:center;transition-property:background-color,border-color,color,box-shadow;transition-timing-function:ease-in-out;cursor:pointer;border-radius:var(--radius-md);transition-duration:var(--duration-medium);font-weight:var(--font-weight-medium);gap:var(--tabGap);max-height:var(--tabItemMaxHeight);padding-block:var(--tabPaddingBlock);padding-inline:var(--tabPaddingInline);font-size:var(--tabFontSize);background-color:var(--tabItemBackgroundColor, var(--tab-color-background-unchecked-default));color:var(--tabItemColor, var(--tab-color-text-unchecked-default));box-shadow:inset 0 0 0 var(--tabItemBorderSize, var(--tab-border-width-unchecked)) var(--tabItemBorderColor, var(--tab-color-border-unchecked-default)),var(--tabItemBoxShadow, var(--elevation-10))}._root_6qdcx_2:focus{outline:none!important;--tabItemColor: var(--tab-color-text-unchecked-pressed);--tabItemBackgroundColor: var(--tab-color-background-unchecked-pressed);--tabItemBorderColor: var(--tab-color-border-unchecked-pressed)}._root_6qdcx_2:focus[aria-selected=true]{--tabItemColor: var(--tab-color-text-checked-default);--tabItemBackgroundColor: var(--tab-color-background-checked-default);--tabItemBorderColor: var(--tab-color-border-checked-default)}._root_6qdcx_2[aria-selected=true]{--tabItemColor: var(--tab-color-text-checked-default);--tabItemBackgroundColor: var(--tab-color-background-checked-default);--tabItemBorderColor: var(--tab-color-border-checked-default);--tabItemBorderSize: var(--tab-border-width-checked)}._root_6qdcx_2[aria-selected=true]:hover{--tabItemColor: var(--tab-color-text-checked-hover);--tabItemBackgroundColor: var(--tab-color-background-checked-hover);--tabItemBorderColor: var(--tab-color-border-checked-hover);--tabItemBorderSize: var(--tab-border-width-checked);--tabItemBoxShadow: var(--elevation-20)}._root_6qdcx_2[aria-disabled=true]{cursor:not-allowed;--tabItemColor: var(--button-color-text-secondary-main-disabled);background:repeating-linear-gradient(-45deg,transparent,transparent 2.4px,color-mix(in srgb,var(--color-neutral-50) 12%,transparent) 2.4px,color-mix(in srgb,var(--color-neutral-50) 12%,transparent) 4.3px),var(--button-color-background-secondary-main-disabled)}._root_6qdcx_2:hover:not([aria-selected=true]):not([aria-disabled=true]){--tabItemColor: var(--tab-color-text-unchecked-hover);--tabItemBackgroundColor: var(--tab-color-background-unchecked-hover);--tabItemBorderColor: var(--tab-color-border-unchecked-hover);--tabItemBoxShadow: var(--elevation-20)}._root_6qdcx_2._orientation-vertical_6qdcx_58{width:100%}._content_6qdcx_61{display:flex;flex:1;align-items:center;gap:var(--tabGap)}._size-lg_6qdcx_67{--tabItemMaxHeight: var(--tab-size-max-height-lg);--tabPaddingBlock: var(--tab-padding-block-lg);--tabPaddingInline: var(--tab-padding-inline-lg);--tabFontSize: var(--font-size-sm);--tabGap: var(--tab-gap-content-lg)}._size-md_6qdcx_74{--tabItemMaxHeight: var(--tab-size-max-height-md);--tabPaddingBlock: var(--tab-padding-block-md);--tabPaddingInline: var(--tab-padding-inline-md);--tabFontSize: var(--font-size-xs);--tabGap: var(--tab-gap-content-md)}._folder-icon_6qdcx_84{color:var(--tabIconColor)}._folder-icon-blue_6qdcx_87{--tabIconColor: var(--color-background-accent-blue-primary)}._folder-icon-blue-active_6qdcx_90{--tabIconColor: var(--color-background-accent-blue-strong)}._folder-icon-green_6qdcx_93{--tabIconColor: var(--color-background-accent-green-primary)}._folder-icon-green-active_6qdcx_96{--tabIconColor: var(--color-background-accent-green-strong)}._folder-icon-orange_6qdcx_99{--tabIconColor: var(--color-background-accent-orange-primary)}._folder-icon-orange-active_6qdcx_102{--tabIconColor: var(--color-background-accent-orange-strong)}._folder-icon-pink_6qdcx_105{--tabIconColor: var(--color-background-accent-pink-primary)}._folder-icon-pink-active_6qdcx_108{--tabIconColor: var(--color-background-accent-pink-strong)}._folder-icon-teal_6qdcx_111{--tabIconColor: var(--color-background-accent-teal-primary)}._folder-icon-teal-active_6qdcx_114{--tabIconColor: var(--color-background-accent-teal-strong)}._folder-icon-violet_6qdcx_117{--tabIconColor: var(--color-background-accent-violet-primary)}._folder-icon-violet-active_6qdcx_120{--tabIconColor: var(--color-background-accent-violet-strong)}._folder-icon-warm_6qdcx_123{--tabIconColor: var(--color-background-warm-stronger)}._folder-icon-warm-active_6qdcx_126{--tabIconColor: var(--color-beige-60)}._tab-list_6qdcx_132{display:flex;align-items:center;gap:var(--tabsGap, 0)}._tab-list_6qdcx_132._size-lg_6qdcx_67{--tabsGap: var(--tab-gap-content-lg)}._tab-list_6qdcx_132._size-md_6qdcx_74{--tabsGap: var(--tab-gap-content-md)}._tab-list_6qdcx_132._orientation-vertical_6qdcx_58{flex-direction:column;align-items:stretch;--tabsGap: var(--tab-gap-content-lg)}}
1
+ @layer components{._root_ijogm_2{display:flex;align-items:center;transition-property:background-color,border-color,color,box-shadow;transition-timing-function:ease-in-out;cursor:pointer;border-radius:var(--radius-md);transition-duration:var(--duration-medium);font-weight:var(--font-weight-medium);gap:var(--tabGap);max-height:var(--tabItemMaxHeight);padding-block:var(--tabPaddingBlock);padding-inline:var(--tabPaddingInline);font-size:var(--tabFontSize);background-color:var(--tabItemBackgroundColor, var(--tab-color-background-unchecked-default));color:var(--tabItemColor, var(--tab-color-text-unchecked-default));box-shadow:inset 0 0 0 var(--tabItemBorderSize, var(--tab-border-width-unchecked)) var(--tabItemBorderColor, var(--tab-color-border-unchecked-default)),var(--tabItemBoxShadow, var(--elevation-10))}._root_ijogm_2:focus{outline:none!important;--tabItemColor: var(--tab-color-text-unchecked-pressed);--tabItemBackgroundColor: var(--tab-color-background-unchecked-pressed);--tabItemBorderColor: var(--tab-color-border-unchecked-pressed)}._root_ijogm_2:focus[aria-selected=true]{--tabItemColor: var(--tab-color-text-checked-default);--tabItemBackgroundColor: var(--tab-color-background-checked-default);--tabItemBorderColor: var(--tab-color-border-checked-default)}._root_ijogm_2[aria-selected=true]{--tabItemColor: var(--tab-color-text-checked-default);--tabItemBackgroundColor: var(--tab-color-background-checked-default);--tabItemBorderColor: var(--tab-color-border-checked-default);--tabItemBorderSize: var(--tab-border-width-checked)}._root_ijogm_2[aria-selected=true]:hover{--tabItemColor: var(--tab-color-text-checked-hover);--tabItemBackgroundColor: var(--tab-color-background-checked-hover);--tabItemBorderColor: var(--tab-color-border-checked-hover);--tabItemBorderSize: var(--tab-border-width-checked);--tabItemBoxShadow: var(--elevation-20)}._root_ijogm_2[aria-disabled=true]{cursor:not-allowed;--tabItemColor: var(--button-color-text-secondary-main-disabled);background:repeating-linear-gradient(-45deg,transparent,transparent 2.4px,color-mix(in srgb,var(--color-neutral-50) 12%,transparent) 2.4px,color-mix(in srgb,var(--color-neutral-50) 12%,transparent) 4.3px),var(--button-color-background-secondary-main-disabled)}._root_ijogm_2:hover:not([aria-selected=true]):not([aria-disabled=true]){--tabItemColor: var(--tab-color-text-unchecked-hover);--tabItemBackgroundColor: var(--tab-color-background-unchecked-hover);--tabItemBorderColor: var(--tab-color-border-unchecked-hover);--tabItemBoxShadow: var(--elevation-20)}._size-lg_ijogm_58{--tabItemMaxHeight: var(--tab-size-max-height-lg);--tabPaddingBlock: var(--tab-padding-block-lg);--tabPaddingInline: var(--tab-padding-inline-lg);--tabFontSize: var(--font-size-sm);--tabGap: var(--tab-gap-content-lg)}._size-md_ijogm_65{--tabItemMaxHeight: var(--tab-size-max-height-md);--tabPaddingBlock: var(--tab-padding-block-md);--tabPaddingInline: var(--tab-padding-inline-md);--tabFontSize: var(--font-size-xs);--tabGap: var(--tab-gap-content-md)}._folder-icon_ijogm_75{color:var(--tabIconColor)}._folder-icon-blue_ijogm_78{--tabIconColor: var(--color-background-accent-blue-primary)}._folder-icon-blue-active_ijogm_81{--tabIconColor: var(--color-background-accent-blue-strong)}._folder-icon-green_ijogm_84{--tabIconColor: var(--color-background-accent-green-primary)}._folder-icon-green-active_ijogm_87{--tabIconColor: var(--color-background-accent-green-strong)}._folder-icon-orange_ijogm_90{--tabIconColor: var(--color-background-accent-orange-primary)}._folder-icon-orange-active_ijogm_93{--tabIconColor: var(--color-background-accent-orange-strong)}._folder-icon-pink_ijogm_96{--tabIconColor: var(--color-background-accent-pink-primary)}._folder-icon-pink-active_ijogm_99{--tabIconColor: var(--color-background-accent-pink-strong)}._folder-icon-teal_ijogm_102{--tabIconColor: var(--color-background-accent-teal-primary)}._folder-icon-teal-active_ijogm_105{--tabIconColor: var(--color-background-accent-teal-strong)}._folder-icon-violet_ijogm_108{--tabIconColor: var(--color-background-accent-violet-primary)}._folder-icon-violet-active_ijogm_111{--tabIconColor: var(--color-background-accent-violet-strong)}._folder-icon-warm_ijogm_114{--tabIconColor: var(--color-background-warm-stronger)}._folder-icon-warm-active_ijogm_117{--tabIconColor: var(--color-beige-60)}._tab-list_ijogm_123{display:flex;align-items:center;gap:var(--tabsGap, 0)}._tab-list_ijogm_123._size-lg_ijogm_58{--tabsGap: var(--tab-gap-content-lg)}._tab-list_ijogm_123._size-md_ijogm_65{--tabsGap: var(--tab-gap-content-md)}}
package/dist/Tabs.js CHANGED
@@ -1,51 +1,51 @@
1
1
  "use client";
2
2
  import './Tabs.css';
3
- import { jsx as h, jsxs as E } from "react/jsx-runtime";
4
- import { T as R, b as W, a as K } from "./tab-panel-DMICXMJc.js";
5
- import { a as U } from "./combobox-context-COdkPD-I.js";
6
- import { u as D } from "./composite-store-BbsZpdXc.js";
7
- import { P as G, b as H } from "./popover-context-B2YQ_e3N.js";
8
- import { C as J, a as Q, c as X, m as Y } from "./composite-item-CzuZunbi.js";
9
- import { b as Z, w as v, V as C, ab as ee, x as O } from "./D5lwkpmX-BTxFdaqc.js";
10
- import q, { createContext as V, useMemo as te, forwardRef as $, useEffect as oe } from "react";
11
- import { m as re, o as N, c as ae, s as _, d as f, g as ne, a as B, b as F, u as se } from "./index-B0vSTNCB.js";
12
- import { c as T } from "./index-B6iGEm-i.js";
13
- import { Badge as le } from "./Badge.js";
14
- import { f as ce } from "./forwardRefWithAs-8eP3ZN15.js";
15
- import { Icon as ie } from "./Icon.js";
16
- const de = Z([H, Q], [G, J]), ue = de.useContext;
17
- V(!1);
18
- V(null);
19
- function me(e) {
20
- var r;
21
- const o = (r = e[0]) == null ? void 0 : r.element;
3
+ import { jsx as h, jsxs as L } from "react/jsx-runtime";
4
+ import { T as A, b as R, a as W } from "./tab-panel-DMICXMJc.js";
5
+ import { a as K } from "./combobox-context-COdkPD-I.js";
6
+ import { u as U } from "./composite-store-BbsZpdXc.js";
7
+ import { P as D, b as G } from "./popover-context-B2YQ_e3N.js";
8
+ import { C as H, a as J, c as Q, m as X } from "./composite-item-CzuZunbi.js";
9
+ import { b as Y, w as _, V as z, ab as Z, x as y } from "./D5lwkpmX-BTxFdaqc.js";
10
+ import O, { createContext as F, useMemo as ee, forwardRef as M } from "react";
11
+ import { m as te, o as E, c as oe, s as I, d as f, g as re, a as N, b as C, u as se } from "./index-B0vSTNCB.js";
12
+ import { c as j } from "./index-B6iGEm-i.js";
13
+ import { Badge as ae } from "./Badge.js";
14
+ import { f as ne } from "./forwardRefWithAs-8eP3ZN15.js";
15
+ import { Icon as le } from "./Icon.js";
16
+ const ie = Y([G, J], [D, H]), ce = ie.useContext;
17
+ F(!1);
18
+ F(null);
19
+ function de(e) {
20
+ var a;
21
+ const o = (a = e[0]) == null ? void 0 : a.element;
22
22
  if (!o) return;
23
- const t = ee(o);
23
+ const t = Z(o);
24
24
  if (t)
25
- return e.find((s) => s.element === t);
25
+ return e.find((l) => l.element === t);
26
26
  }
27
- function fe(e, o) {
27
+ function ue(e, o) {
28
28
  if (o != null)
29
29
  return e.find((t) => t.id === o);
30
30
  }
31
- function k(e) {
31
+ function w(e) {
32
32
  return !(!e || e.disabled || e.dimmed);
33
33
  }
34
- function be() {
35
- const e = Y(), o = /* @__PURE__ */ new Map();
34
+ function me() {
35
+ const e = X(), o = /* @__PURE__ */ new Map();
36
36
  return f(e, ["items"], (t) => {
37
37
  o.clear();
38
- for (const r of t.items) {
39
- const { tabId: s } = r;
40
- s != null && (o.has(s) || o.set(s, r));
38
+ for (const a of t.items) {
39
+ const { tabId: l } = a;
40
+ l != null && (o.has(l) || o.set(l, a));
41
41
  }
42
42
  }), {
43
43
  panels: e,
44
44
  panel: (t) => t == null ? null : o.get(t) || null
45
45
  };
46
46
  }
47
- function ge({ composite: e, combobox: o, ...t } = {}) {
48
- const r = [
47
+ function fe({ composite: e, combobox: o, ...t } = {}) {
48
+ const a = [
49
49
  "items",
50
50
  "renderedItems",
51
51
  "moves",
@@ -59,136 +59,130 @@ function ge({ composite: e, combobox: o, ...t } = {}) {
59
59
  "focusShift",
60
60
  "focusWrap",
61
61
  "selectOnMove"
62
- ], s = re(t.store, N(e, r), N(o, r)), a = s == null ? void 0 : s.getState(), i = X({
62
+ ], l = te(t.store, E(e, a), E(o, a)), r = l == null ? void 0 : l.getState(), m = Q({
63
63
  ...t,
64
- store: s,
65
- compositeElementInFocusOrder: v(t.compositeElementInFocusOrder, t.includesBaseElement, a == null ? void 0 : a.compositeElementInFocusOrder, a == null ? void 0 : a.includesBaseElement, !1),
66
- orientation: v(t.orientation, a == null ? void 0 : a.orientation, "horizontal"),
67
- focusLoop: v(t.focusLoop, a == null ? void 0 : a.focusLoop, !0)
68
- }), { panels: g, panel: w } = be(), S = {
69
- ...i.getState(),
70
- selectedId: v(t.selectedId, a == null ? void 0 : a.selectedId, t.defaultSelectedId),
71
- selectOnMove: v(t.selectOnMove, a == null ? void 0 : a.selectOnMove, !0)
72
- }, n = ae(S, i, s);
73
- _(n, () => f(n, ["moves"], () => {
74
- const { activeId: l, selectOnMove: c } = n.getState();
75
- if (!c || !l) return;
76
- const m = i.item(l);
77
- k(m) && n.setState("selectedId", m.id);
64
+ store: l,
65
+ compositeElementInFocusOrder: _(t.compositeElementInFocusOrder, t.includesBaseElement, r == null ? void 0 : r.compositeElementInFocusOrder, r == null ? void 0 : r.includesBaseElement, !1),
66
+ orientation: _(t.orientation, r == null ? void 0 : r.orientation, "horizontal"),
67
+ focusLoop: _(t.focusLoop, r == null ? void 0 : r.focusLoop, !0)
68
+ }), { panels: b, panel: x } = me(), S = {
69
+ ...m.getState(),
70
+ selectedId: _(t.selectedId, r == null ? void 0 : r.selectedId, t.defaultSelectedId),
71
+ selectOnMove: _(t.selectOnMove, r == null ? void 0 : r.selectOnMove, !0)
72
+ }, s = oe(S, m, l);
73
+ I(s, () => f(s, ["moves"], () => {
74
+ const { activeId: n, selectOnMove: d } = s.getState();
75
+ if (!d || !n) return;
76
+ const u = m.item(n);
77
+ w(u) && s.setState("selectedId", u.id);
78
78
  }));
79
- let p = !1, x;
80
- _(n, () => (p = !1, ne(n, ["selectedId"], (l, c) => {
81
- if (p && (p = !1, l.selectedId === x) || e && l.selectedId === c.selectedId) return;
82
- const { activeId: m, renderedItems: d } = n.getState();
83
- if (m === l.selectedId) return;
84
- const u = me(d), I = fe(d, l.selectedId);
85
- if (u && k(I)) {
86
- i.move(I.id);
79
+ let g = !1, v;
80
+ I(s, () => (g = !1, re(s, ["selectedId"], (n, d) => {
81
+ if (g && (g = !1, n.selectedId === v) || e && n.selectedId === d.selectedId) return;
82
+ const { activeId: u, renderedItems: i } = s.getState();
83
+ if (u === n.selectedId) return;
84
+ const c = de(i), k = ue(i, n.selectedId);
85
+ if (c && w(k)) {
86
+ m.move(k.id);
87
87
  return;
88
88
  }
89
- n.setState("activeId", l.selectedId);
90
- }))), _(n, () => f(n, ["selectedId", "renderedItems"], (l) => {
91
- if (l.selectedId !== void 0) return;
92
- const { activeId: c, renderedItems: m } = n.getState(), d = i.item(c);
93
- if (k(d)) n.setState("selectedId", d.id);
89
+ s.setState("activeId", n.selectedId);
90
+ }))), I(s, () => f(s, ["selectedId", "renderedItems"], (n) => {
91
+ if (n.selectedId !== void 0) return;
92
+ const { activeId: d, renderedItems: u } = s.getState(), i = m.item(d);
93
+ if (w(i)) s.setState("selectedId", i.id);
94
94
  else {
95
- const u = m.find(k);
96
- n.setState("selectedId", u == null ? void 0 : u.id);
95
+ const c = u.find(w);
96
+ s.setState("selectedId", c == null ? void 0 : c.id);
97
97
  }
98
- })), _(n, () => f(n, ["renderedItems"], (l) => {
99
- const c = l.renderedItems;
100
- if (c.length)
101
- return f(g, ["renderedItems"], (m) => {
102
- const d = m.renderedItems;
103
- d.some((u) => !u.tabId) && d.forEach((u, I) => {
104
- if (u.tabId) return;
105
- const y = c[I];
106
- y && g.renderItem({
107
- ...u,
108
- tabId: y.id
98
+ })), I(s, () => f(s, ["renderedItems"], (n) => {
99
+ const d = n.renderedItems;
100
+ if (d.length)
101
+ return f(b, ["renderedItems"], (u) => {
102
+ const i = u.renderedItems;
103
+ i.some((c) => !c.tabId) && i.forEach((c, k) => {
104
+ if (c.tabId) return;
105
+ const P = d[k];
106
+ P && b.renderItem({
107
+ ...c,
108
+ tabId: P.id
109
109
  });
110
110
  });
111
111
  });
112
112
  }));
113
- let b = null;
114
- return _(n, () => {
115
- const l = () => {
116
- b = n.getState().selectedId;
117
- }, c = () => {
118
- const { selectedId: u } = n.getState();
119
- u !== b && (p = !0, x = b, n.setState("selectedId", b));
120
- }, m = !!e && "setSelectedValue" in e, d = m ? e : o;
121
- if (e && !m && "setSelectElement" in e) return C(f(e, ["value"], l), f(e, ["mounted"], c));
122
- if (d)
123
- return C(f(d, ["selectedValue"], l), f(d, ["mounted"], c));
113
+ let p = null;
114
+ return I(s, () => {
115
+ const n = () => {
116
+ p = s.getState().selectedId;
117
+ }, d = () => {
118
+ const { selectedId: c } = s.getState();
119
+ c !== p && (g = !0, v = p, s.setState("selectedId", p));
120
+ }, u = !!e && "setSelectedValue" in e, i = u ? e : o;
121
+ if (e && !u && "setSelectElement" in e) return z(f(e, ["value"], n), f(e, ["mounted"], d));
122
+ if (i)
123
+ return z(f(i, ["selectedValue"], n), f(i, ["mounted"], d));
124
124
  }), {
125
- ...i,
126
- ...n,
127
- panels: g,
128
- panel: w,
129
- setSelectedId: (l) => n.setState("selectedId", l),
130
- select: (l) => {
131
- n.setState("selectedId", l), i.move(l);
125
+ ...m,
126
+ ...s,
127
+ panels: b,
128
+ panel: x,
129
+ setSelectedId: (n) => s.setState("selectedId", n),
130
+ select: (n) => {
131
+ s.setState("selectedId", n), m.move(n);
132
132
  }
133
133
  };
134
134
  }
135
- function pe(e, o, t) {
136
- O(o, [
135
+ function be(e, o, t) {
136
+ y(o, [
137
137
  t.composite,
138
138
  t.combobox,
139
139
  o
140
140
  ]);
141
- const r = D(e, o, t);
142
- F(r, t, "selectedId", "setSelectedId"), F(r, t, "selectOnMove");
143
- const [s, a] = B(() => r.panels, {});
144
- return O(a, [r, a]), Object.assign(te(() => ({
145
- ...r,
146
- panels: s
147
- }), [r, s]), {
141
+ const a = U(e, o, t);
142
+ C(a, t, "selectedId", "setSelectedId"), C(a, t, "selectOnMove");
143
+ const [l, r] = N(() => a.panels, {});
144
+ return y(r, [a, r]), Object.assign(ee(() => ({
145
+ ...a,
146
+ panels: l
147
+ }), [a, l]), {
148
148
  composite: t.composite,
149
149
  combobox: t.combobox
150
150
  });
151
151
  }
152
- function Qe(e = {}) {
153
- const o = U(), t = ue() || o, r = {
152
+ function Ge(e = {}) {
153
+ const o = K(), t = ce() || o, a = {
154
154
  ...e,
155
155
  composite: e.composite !== void 0 ? e.composite : t,
156
156
  combobox: e.combobox !== void 0 ? e.combobox : o
157
- }, [s, a] = B(ge, r);
158
- return pe(s, a, r);
157
+ }, [l, r] = N(fe, a);
158
+ return be(l, r, a);
159
159
  }
160
- const z = q.createContext(null);
161
- function he() {
162
- const e = q.useContext(z);
160
+ const $ = O.createContext(null);
161
+ function ge() {
162
+ const e = O.useContext($);
163
163
  return (e == null ? void 0 : e.size) || "lg";
164
164
  }
165
- function ve() {
166
- const e = q.useContext(z);
167
- return (e == null ? void 0 : e.vertical) ?? !1;
168
- }
169
- const _e = "_root_6qdcx_2", xe = "_content_6qdcx_61", P = {
170
- root: _e,
171
- "orientation-vertical": "_orientation-vertical_6qdcx_58",
172
- content: xe,
173
- "size-lg": "_size-lg_6qdcx_67",
174
- "size-md": "_size-md_6qdcx_74",
175
- "folder-icon": "_folder-icon_6qdcx_84",
176
- "folder-icon-blue": "_folder-icon-blue_6qdcx_87",
177
- "folder-icon-blue-active": "_folder-icon-blue-active_6qdcx_90",
178
- "folder-icon-green": "_folder-icon-green_6qdcx_93",
179
- "folder-icon-green-active": "_folder-icon-green-active_6qdcx_96",
180
- "folder-icon-orange": "_folder-icon-orange_6qdcx_99",
181
- "folder-icon-orange-active": "_folder-icon-orange-active_6qdcx_102",
182
- "folder-icon-pink": "_folder-icon-pink_6qdcx_105",
183
- "folder-icon-pink-active": "_folder-icon-pink-active_6qdcx_108",
184
- "folder-icon-teal": "_folder-icon-teal_6qdcx_111",
185
- "folder-icon-teal-active": "_folder-icon-teal-active_6qdcx_114",
186
- "folder-icon-violet": "_folder-icon-violet_6qdcx_117",
187
- "folder-icon-violet-active": "_folder-icon-violet-active_6qdcx_120",
188
- "folder-icon-warm": "_folder-icon-warm_6qdcx_123",
189
- "folder-icon-warm-active": "_folder-icon-warm-active_6qdcx_126",
190
- "tab-list": "_tab-list_6qdcx_132"
191
- }, Ie = [
165
+ const pe = "_root_ijogm_2", T = {
166
+ root: pe,
167
+ "size-lg": "_size-lg_ijogm_58",
168
+ "size-md": "_size-md_ijogm_65",
169
+ "folder-icon": "_folder-icon_ijogm_75",
170
+ "folder-icon-blue": "_folder-icon-blue_ijogm_78",
171
+ "folder-icon-blue-active": "_folder-icon-blue-active_ijogm_81",
172
+ "folder-icon-green": "_folder-icon-green_ijogm_84",
173
+ "folder-icon-green-active": "_folder-icon-green-active_ijogm_87",
174
+ "folder-icon-orange": "_folder-icon-orange_ijogm_90",
175
+ "folder-icon-orange-active": "_folder-icon-orange-active_ijogm_93",
176
+ "folder-icon-pink": "_folder-icon-pink_ijogm_96",
177
+ "folder-icon-pink-active": "_folder-icon-pink-active_ijogm_99",
178
+ "folder-icon-teal": "_folder-icon-teal_ijogm_102",
179
+ "folder-icon-teal-active": "_folder-icon-teal-active_ijogm_105",
180
+ "folder-icon-violet": "_folder-icon-violet_ijogm_108",
181
+ "folder-icon-violet-active": "_folder-icon-violet-active_ijogm_111",
182
+ "folder-icon-warm": "_folder-icon-warm_ijogm_114",
183
+ "folder-icon-warm-active": "_folder-icon-warm-active_ijogm_117",
184
+ "tab-list": "_tab-list_ijogm_123"
185
+ }, he = [
192
186
  "angle-left-b",
193
187
  "angle-right-b",
194
188
  "angle-up",
@@ -205,7 +199,7 @@ const _e = "_root_6qdcx_2", xe = "_content_6qdcx_61", P = {
205
199
  "angle-double-right",
206
200
  "angle-left",
207
201
  "angle-right"
208
- ], ke = [
202
+ ], ve = [
209
203
  "asterisk",
210
204
  "info-circle",
211
205
  "chart-line",
@@ -261,13 +255,13 @@ const _e = "_root_6qdcx_2", xe = "_content_6qdcx_61", P = {
261
255
  "share",
262
256
  "bulk",
263
257
  "bulk-active"
264
- ], we = [
258
+ ], _e = [
265
259
  "chat",
266
260
  "chat-bubble-user",
267
261
  "comment",
268
262
  "comment-alt-lines",
269
263
  "comment-chart-line"
270
- ], Se = [
264
+ ], Ie = [
271
265
  "music",
272
266
  "rocket",
273
267
  "file-alt",
@@ -355,7 +349,7 @@ const _e = "_root_6qdcx_2", xe = "_content_6qdcx_61", P = {
355
349
  // (not unicons, personal mashup)
356
350
  "plug",
357
351
  "hourglass"
358
- ], qe = [
352
+ ], ke = [
359
353
  "play",
360
354
  "play-solid",
361
355
  "stop-circle-solid",
@@ -385,7 +379,7 @@ const _e = "_root_6qdcx_2", xe = "_content_6qdcx_61", P = {
385
379
  "volume-up",
386
380
  "volume-mute",
387
381
  "closed-captioning"
388
- ], Te = [
382
+ ], we = [
389
383
  "icons",
390
384
  "package",
391
385
  "basketball",
@@ -461,14 +455,14 @@ const _e = "_root_6qdcx_2", xe = "_content_6qdcx_61", P = {
461
455
  "redo",
462
456
  "play",
463
457
  "ban"
464
- ], ze = [
458
+ ], xe = [
465
459
  "folder",
466
460
  "folder-open",
467
461
  "folder-full",
468
462
  "folder-plus",
469
463
  "file",
470
464
  "image"
471
- ], Pe = [
465
+ ], Se = [
472
466
  "bold",
473
467
  "arrow",
474
468
  "brackets-curly",
@@ -494,7 +488,7 @@ const _e = "_root_6qdcx_2", xe = "_content_6qdcx_61", P = {
494
488
  // (not unicons, original creation)
495
489
  "font",
496
490
  "underline"
497
- ], ye = [
491
+ ], je = [
498
492
  "behance",
499
493
  "dribbble",
500
494
  "facebook",
@@ -521,84 +515,80 @@ const _e = "_root_6qdcx_2", xe = "_content_6qdcx_61", P = {
521
515
  // (not unicons)
522
516
  "medium"
523
517
  // (not unicons)
524
- ], Ee = ["symbol", "wttj"], Ce = ["flag-fr", "flag-en", "flag-us"], Oe = [
525
- ...ke,
526
- ...Ie,
527
- ...ye,
528
- ...we,
529
- ...ze,
530
- ...Ce,
518
+ ], Te = ["symbol", "wttj"], Pe = ["flag-fr", "flag-en", "flag-us"], ze = [
519
+ ...ve,
520
+ ...he,
521
+ ...je,
522
+ ..._e,
523
+ ...xe,
531
524
  ...Pe,
532
525
  ...Se,
533
- ...qe,
534
- ...Ee,
535
- ...Te
536
- ], Ne = (e) => Oe.includes(e), Fe = T(P);
537
- function Me({
526
+ ...Ie,
527
+ ...ke,
528
+ ...Te,
529
+ ...we
530
+ ], ye = (e) => ze.includes(e), Ee = j(T);
531
+ function Ce({
538
532
  icon: e,
539
533
  iconColor: o,
540
534
  isActive: t,
541
- size: r
535
+ size: a
542
536
  }) {
543
- return e ? typeof e != "string" || !Ne(e) ? e : /* @__PURE__ */ h(
544
- ie,
537
+ return e ? typeof e != "string" || !ye(e) ? e : /* @__PURE__ */ h(
538
+ le,
545
539
  {
546
- className: o ? Fe("folder-icon", `folder-icon-${o}${t ? "-active" : ""}`) : void 0,
540
+ className: o ? Ee("folder-icon", `folder-icon-${o}${t ? "-active" : ""}`) : void 0,
547
541
  name: e,
548
- size: r
542
+ size: a
549
543
  }
550
544
  ) : null;
551
545
  }
552
- const M = T(P), j = ce(
553
- ({ as: e, badge: o, children: t, className: r, icon: s, iconColor: a = "violet", id: i, store: g, ...w }, S) => {
554
- const n = he(), p = ve(), { selectedId: x } = se(g), b = x === i, l = Me({
555
- icon: s,
556
- iconColor: a,
557
- isActive: b,
558
- size: n
559
- }), c = b ? "neutral" : "warm";
560
- return /* @__PURE__ */ E(
561
- R,
546
+ const Oe = j(T), V = ne(
547
+ ({ as: e, badge: o, children: t, className: a, icon: l, iconColor: r = "violet", id: m, store: b, ...x }, S) => {
548
+ const s = ge(), { selectedId: g } = se(b), v = g === m, p = Ce({
549
+ icon: l,
550
+ iconColor: r,
551
+ isActive: v,
552
+ size: s
553
+ }), n = v ? "neutral" : "warm";
554
+ return /* @__PURE__ */ L(
555
+ A,
562
556
  {
563
- className: M("root", `size-${n}`, p && "orientation-vertical", r),
564
- id: i,
557
+ className: Oe("root", `size-${s}`, a),
558
+ id: m,
565
559
  ref: S,
566
560
  render: e ? /* @__PURE__ */ h(e, {}) : void 0,
567
- store: g,
568
- ...w,
561
+ store: b,
562
+ ...x,
569
563
  children: [
570
- /* @__PURE__ */ E("span", { className: M("content"), children: [
571
- l,
572
- t
573
- ] }),
574
- o ? /* @__PURE__ */ h(le, { size: n, variant: c, children: o }) : null
564
+ p,
565
+ t,
566
+ o ? /* @__PURE__ */ h(ae, { size: s, variant: n, children: o }) : null
575
567
  ]
576
568
  }
577
569
  );
578
570
  }
579
571
  );
580
- j.displayName = "Tabs.Tab";
581
- const L = $(({ children: e, ...o }, t) => /* @__PURE__ */ h(W, { ref: t, ...o, children: e }));
582
- L.displayName = "Tabs.Panel";
583
- const Ve = T(P), A = $(
584
- ({ children: e, className: o, size: t = "lg", store: r, vertical: s = !1, ...a }, i) => (oe(() => {
585
- r == null || r.setState("orientation", s ? "vertical" : "horizontal");
586
- }, [r, s]), /* @__PURE__ */ h(
587
- K,
572
+ V.displayName = "Tabs.Tab";
573
+ const B = M(({ children: e, ...o }, t) => /* @__PURE__ */ h(R, { ref: t, ...o, children: e }));
574
+ B.displayName = "Tabs.Panel";
575
+ const Fe = j(T), q = M(
576
+ ({ children: e, className: o, size: t = "lg", store: a, ...l }, r) => /* @__PURE__ */ h(
577
+ W,
588
578
  {
589
- className: Ve("tab-list", `size-${t}`, s && "orientation-vertical", o),
590
- ref: i,
591
- store: r,
592
- ...a,
593
- children: /* @__PURE__ */ h(z.Provider, { value: { size: t, vertical: s }, children: e })
579
+ className: Fe("tab-list", `size-${t}`, o),
580
+ ref: r,
581
+ store: a,
582
+ ...l,
583
+ children: /* @__PURE__ */ h($.Provider, { value: { size: t }, children: e })
594
584
  }
595
- ))
585
+ )
596
586
  );
597
- A.displayName = "Tabs";
598
- const Xe = Object.assign(A, { Panel: L, Tab: j });
587
+ q.displayName = "Tabs";
588
+ const He = Object.assign(q, { Panel: B, Tab: V });
599
589
  export {
600
- Xe as Tabs,
601
- A as TabsComponent,
602
- P as tabsClasses,
603
- Qe as useTab
590
+ He as Tabs,
591
+ q as TabsComponent,
592
+ T as tabsClasses,
593
+ Ge as useTab
604
594
  };
@@ -2,9 +2,7 @@ import { default as React } from 'react';
2
2
  import { Size } from './types';
3
3
  type TabContextType = {
4
4
  size?: Size;
5
- vertical?: boolean;
6
5
  };
7
6
  export declare const TabContext: React.Context<TabContextType>;
8
7
  export declare function useTabSize(): Size;
9
- export declare function useTabVertical(): boolean;
10
8
  export {};
@@ -7,7 +7,6 @@ export type TabListProps = {
7
7
  className?: string;
8
8
  size?: Size;
9
9
  store: UseTab;
10
- vertical?: boolean;
11
10
  };
12
11
  export interface TabOptions {
13
12
  badge?: number | string;
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import './utils.css';
2
3
  import { g as J } from "./index-B6iGEm-i.js";
3
4
  const Y = {
4
5
  "custom-header": "_custom-header_1w74t_2",
package/dist/utils.js CHANGED
@@ -1,5 +1,4 @@
1
1
  "use client";
2
- import './utils.css';
3
2
  import { u, b as f } from "./index-B6iGEm-i.js";
4
3
  import { c as b } from "./index-B6iGEm-i.js";
5
4
  import { f as S } from "./forwardRefWithAs-8eP3ZN15.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "welcome-ui",
3
- "version": "0.0.0-dev.1789563648976",
3
+ "version": "0.0.0-dev.1789571589259",
4
4
  "description": "Customizable design system with react, typescript, tailwindcss and ariakit.",
5
5
  "files": [
6
6
  "dist"
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "scripts": {
30
30
  "start": "vite build --watch",
31
- "build": "vite build && node ./scripts/patch-css-imports.js",
31
+ "build": "vite build",
32
32
  "tokens:build": "node ./src/theme/scripts/build-tokens.js",
33
33
  "tokens:generate-theme-variables": "tsx src/theme/scripts/generate-theme-variables.ts",
34
34
  "theme:generate": "yarn tokens:build && tsx src/theme/scripts/generate-theme.ts && yarn run -T prettier --write 'src/theme/generated/theme.css' && yarn tokens:generate-theme-variables",