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.
- package/dist/CustomPopper-DWdMQOgg.js +1 -0
- package/dist/Tabs.css +1 -1
- package/dist/Tabs.js +186 -196
- package/dist/types/components/Tabs/TabContext.d.ts +0 -2
- package/dist/types/components/Tabs/types.d.ts +0 -1
- package/dist/utils-ZE_dEXnJ.js +1 -0
- package/dist/utils.js +0 -1
- package/package.json +2 -2
package/dist/Tabs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
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
|
|
4
|
-
import { T as
|
|
5
|
-
import { a as
|
|
6
|
-
import { u as
|
|
7
|
-
import { P as
|
|
8
|
-
import { C as
|
|
9
|
-
import { b as
|
|
10
|
-
import
|
|
11
|
-
import { m as
|
|
12
|
-
import { c as
|
|
13
|
-
import { Badge as
|
|
14
|
-
import { f as
|
|
15
|
-
import { Icon as
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
var
|
|
21
|
-
const o = (
|
|
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 =
|
|
23
|
+
const t = Z(o);
|
|
24
24
|
if (t)
|
|
25
|
-
return e.find((
|
|
25
|
+
return e.find((l) => l.element === t);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function ue(e, o) {
|
|
28
28
|
if (o != null)
|
|
29
29
|
return e.find((t) => t.id === o);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function w(e) {
|
|
32
32
|
return !(!e || e.disabled || e.dimmed);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const e =
|
|
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
|
|
39
|
-
const { tabId:
|
|
40
|
-
|
|
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
|
|
48
|
-
const
|
|
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
|
-
],
|
|
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:
|
|
65
|
-
compositeElementInFocusOrder:
|
|
66
|
-
orientation:
|
|
67
|
-
focusLoop:
|
|
68
|
-
}), { panels:
|
|
69
|
-
...
|
|
70
|
-
selectedId:
|
|
71
|
-
selectOnMove:
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
const { activeId:
|
|
75
|
-
if (!
|
|
76
|
-
const
|
|
77
|
-
|
|
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
|
|
80
|
-
|
|
81
|
-
if (
|
|
82
|
-
const { activeId:
|
|
83
|
-
if (
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
|
|
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
|
-
|
|
90
|
-
}))),
|
|
91
|
-
if (
|
|
92
|
-
const { activeId:
|
|
93
|
-
if (
|
|
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
|
|
96
|
-
|
|
95
|
+
const c = u.find(w);
|
|
96
|
+
s.setState("selectedId", c == null ? void 0 : c.id);
|
|
97
97
|
}
|
|
98
|
-
})),
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
101
|
-
return f(
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
if (
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
...
|
|
108
|
-
tabId:
|
|
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
|
|
114
|
-
return
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
},
|
|
118
|
-
const { selectedId:
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
if (e && !
|
|
122
|
-
if (
|
|
123
|
-
return
|
|
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
|
-
...
|
|
126
|
-
...
|
|
127
|
-
panels:
|
|
128
|
-
panel:
|
|
129
|
-
setSelectedId: (
|
|
130
|
-
select: (
|
|
131
|
-
|
|
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
|
|
136
|
-
|
|
135
|
+
function be(e, o, t) {
|
|
136
|
+
y(o, [
|
|
137
137
|
t.composite,
|
|
138
138
|
t.combobox,
|
|
139
139
|
o
|
|
140
140
|
]);
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
const [
|
|
144
|
-
return
|
|
145
|
-
...
|
|
146
|
-
panels:
|
|
147
|
-
}), [
|
|
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
|
|
153
|
-
const o =
|
|
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
|
-
}, [
|
|
158
|
-
return
|
|
157
|
+
}, [l, r] = N(fe, a);
|
|
158
|
+
return be(l, r, a);
|
|
159
159
|
}
|
|
160
|
-
const
|
|
161
|
-
function
|
|
162
|
-
const e =
|
|
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
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"
|
|
172
|
-
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"folder-icon": "_folder-
|
|
176
|
-
"folder-icon-
|
|
177
|
-
"folder-icon-
|
|
178
|
-
"folder-icon-
|
|
179
|
-
"folder-icon-
|
|
180
|
-
"folder-icon-
|
|
181
|
-
"folder-icon-
|
|
182
|
-
"folder-icon-
|
|
183
|
-
"folder-icon-
|
|
184
|
-
"
|
|
185
|
-
|
|
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
|
-
],
|
|
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
|
-
],
|
|
258
|
+
], _e = [
|
|
265
259
|
"chat",
|
|
266
260
|
"chat-bubble-user",
|
|
267
261
|
"comment",
|
|
268
262
|
"comment-alt-lines",
|
|
269
263
|
"comment-chart-line"
|
|
270
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
458
|
+
], xe = [
|
|
465
459
|
"folder",
|
|
466
460
|
"folder-open",
|
|
467
461
|
"folder-full",
|
|
468
462
|
"folder-plus",
|
|
469
463
|
"file",
|
|
470
464
|
"image"
|
|
471
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
525
|
-
...
|
|
526
|
-
...
|
|
527
|
-
...
|
|
528
|
-
...
|
|
529
|
-
...
|
|
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
|
-
...
|
|
534
|
-
...
|
|
535
|
-
...Te
|
|
536
|
-
|
|
537
|
-
|
|
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:
|
|
535
|
+
size: a
|
|
542
536
|
}) {
|
|
543
|
-
return e ? typeof e != "string" || !
|
|
544
|
-
|
|
537
|
+
return e ? typeof e != "string" || !ye(e) ? e : /* @__PURE__ */ h(
|
|
538
|
+
le,
|
|
545
539
|
{
|
|
546
|
-
className: o ?
|
|
540
|
+
className: o ? Ee("folder-icon", `folder-icon-${o}${t ? "-active" : ""}`) : void 0,
|
|
547
541
|
name: e,
|
|
548
|
-
size:
|
|
542
|
+
size: a
|
|
549
543
|
}
|
|
550
544
|
) : null;
|
|
551
545
|
}
|
|
552
|
-
const
|
|
553
|
-
({ as: e, badge: o, children: t, className:
|
|
554
|
-
const
|
|
555
|
-
icon:
|
|
556
|
-
iconColor:
|
|
557
|
-
isActive:
|
|
558
|
-
size:
|
|
559
|
-
}),
|
|
560
|
-
return /* @__PURE__ */
|
|
561
|
-
|
|
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:
|
|
564
|
-
id:
|
|
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:
|
|
568
|
-
...
|
|
561
|
+
store: b,
|
|
562
|
+
...x,
|
|
569
563
|
children: [
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
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
|
-
|
|
581
|
-
const
|
|
582
|
-
|
|
583
|
-
const
|
|
584
|
-
({ children: e, className: o, size: t = "lg", store:
|
|
585
|
-
|
|
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:
|
|
590
|
-
ref:
|
|
591
|
-
store:
|
|
592
|
-
...
|
|
593
|
-
children: /* @__PURE__ */ h(
|
|
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
|
-
|
|
598
|
-
const
|
|
587
|
+
q.displayName = "Tabs";
|
|
588
|
+
const He = Object.assign(q, { Panel: B, Tab: V });
|
|
599
589
|
export {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
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 {};
|
package/dist/utils-ZE_dEXnJ.js
CHANGED
package/dist/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "welcome-ui",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
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
|
|
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",
|