welcome-ui 10.6.9 → 10.7.0
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/InputText.css +1 -1
- package/dist/InputText.js +32 -32
- package/dist/Table.css +1 -1
- package/dist/Table.js +23 -22
- package/dist/Tabs.css +1 -1
- package/dist/Tabs.js +161 -147
- package/dist/types/components/Table/types.d.ts +4 -0
- package/dist/types/components/Tabs/types.d.ts +3 -0
- package/package.json +1 -1
package/dist/InputText.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{._input-text-
|
|
1
|
+
@layer components{._input-text-wrapper_1y939_2{position:relative;width:100%;width:var(--inputTextWrapperWidth, 100%)}._root_1y939_8{border-radius:var(--input-border-radius);border-style:solid;border-width:var(--input-border-width-default);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--font-line-height-md);outline:none;width:100%;transition:var(--duration-medium);-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--inputTextBackgroundColor, var(--input-color-background-default));color:var(--inputTextColor, var(--input-color-text-default));border-color:var(--inputTextBorderColor, var(--input-color-border-default));box-shadow:var(--inputTextBoxShadow, inset var(--inset-10));height:var(--inputTextHeight);padding-inline:var(--inputTextPaddingInline);padding-block:var(--inputTextPaddingBlock)}._root_1y939_8:disabled,._root_1y939_8[aria-disabled]{--inputTextBackgroundColor: var( --inputTextBackgroundColorDisabled, var(--input-color-background-disabled) );--inputTextColor: var(--input-color-text-disabled);cursor:not-allowed}._root_1y939_8:hover:not(:disabled):not([aria-disabled]){--borderColor: var(--borderColorHover, var(--color-border-neutral-subtlest));--inputTextBoxShadow: var(--inputTextBoxShadowHover, inset var(--inset-20))}._root_1y939_8:active:not(:disabled):not([aria-disabled]),._root_1y939_8:focus:not(:disabled):not([aria-disabled]){--inputTextBorderColor: var(--input-color-border-focused);--inputTextBoxShadow: none}._root_1y939_8::placeholder{color:var(--input-color-text-placeholder)}._variant-danger_1y939_47{--inputTextBorderColor: var(--input-color-border-error);--inputTextBoxShadow: none;--inputTextBoxShadowHover: none}._variant-warning_1y939_52{--inputTextBorderColor: var(--input-color-border-warning);--inputTextBoxShadow: none;--inputTextBoxShadowHover: none}._variant-success_1y939_57{--inputTextBorderColor: var(--input-color-border-success);--inputTextBoxShadow: none;--inputTextBoxShadowHover: none}._placement-left_1y939_63._size-sm_1y939_63{padding-left:1.75rem}._placement-left_1y939_63._size-md_1y939_66,._placement-left_1y939_63._size-lg_1y939_66{padding-left:2.75rem}._placement-right_1y939_69._size-sm_1y939_63{padding-right:1.75rem}._placement-right_1y939_69._size-md_1y939_66,._placement-right_1y939_69._size-lg_1y939_66{padding-right:2.75rem}._transparent_1y939_75{--inputTextBackgroundColor: var(--input-color-background-transparent)}._transparent_1y939_75:not(:disabled):not([aria-disabled]){--inputTextBoxShadow: none;--inputTextBoxShadowHover: none}._transparent_1y939_75:not(:focus,:active,:disabled,[aria-disabled],._variant-danger_1y939_47,._variant-warning_1y939_52,._variant-success_1y939_57){--inputTextBorderColor: transparent}._transparent_1y939_75:not(:focus,:active,:disabled,[aria-disabled],._variant-danger_1y939_47,._variant-warning_1y939_52,._variant-success_1y939_57):hover{--inputTextBorderColor: var(--input-color-border-hover-transparent)}._size-sm_1y939_63{--inputTextHeight: var(--input-max-height-sm);--inputTextPaddingBlock: var(--input-padding-block-sm);--inputTextPaddingInline: var(--input-padding-inline-sm)}._size-md_1y939_66{--inputTextHeight: var(--input-max-height-md);--inputTextPaddingBlock: var(--input-padding-block-md);--inputTextPaddingInline: var(--input-padding-inline-md)}._size-lg_1y939_66{--inputTextHeight: var(--input-max-height-lg);--inputTextPaddingBlock: var(--input-padding-block-lg);--inputTextPaddingInline: var(--input-padding-inline-lg)}._clearable_1y939_115{padding-right:var(--border-radius-2xl)}._icon-wrapper_1y939_118{position:absolute;top:0;bottom:0;left:var(--inputTextIconLeft);right:var(--inputTextIconRight);display:flex;justify-content:center;align-items:center;pointer-events:none;transition:var(--duration-medium);transition-timing-function:var(--timing-primary);color:var(--inputTextIconColor, var(--input-color-icon-placeholder));gap:var(--input-padding-block-sm);--inputTextIconLeft: auto;--inputTextIconRight: auto}._icon-wrapper_1y939_118>button{pointer-events:auto}._icon-wrapper_1y939_118._disabled_1y939_139{--inputTextIconColor: var(--input-color-icon-disabled)}._icon-placement-left-sm_1y939_142{--inputTextIconLeft: var(--input-padding-inline-sm)}._icon-placement-left-md_1y939_145{--inputTextIconLeft: var(--input-padding-inline-md)}._icon-placement-right-sm_1y939_148{--inputTextIconRight: var(--input-padding-inline-sm)}._icon-placement-right-md_1y939_151{--inputTextIconRight: var(--input-padding-inline-md)}}
|
package/dist/InputText.js
CHANGED
|
@@ -6,26 +6,26 @@ import { CloseButton as E } from "./CloseButton.js";
|
|
|
6
6
|
import { useField as j } from "./Field.js";
|
|
7
7
|
import { Icon as g } from "./Icon.js";
|
|
8
8
|
import { c as B } from "./index-B6iGEm-i.js";
|
|
9
|
-
const C = "
|
|
10
|
-
"input-text-wrapper": "_input-text-
|
|
9
|
+
const C = "_root_1y939_8", D = "_transparent_1y939_75", F = "_clearable_1y939_115", L = "_disabled_1y939_139", k = {
|
|
10
|
+
"input-text-wrapper": "_input-text-wrapper_1y939_2",
|
|
11
11
|
root: C,
|
|
12
|
-
"variant-danger": "_variant-
|
|
13
|
-
"variant-warning": "_variant-
|
|
14
|
-
"variant-success": "_variant-
|
|
15
|
-
"placement-left": "_placement-
|
|
16
|
-
"size-sm": "_size-
|
|
17
|
-
"size-md": "_size-
|
|
18
|
-
"size-lg": "_size-
|
|
19
|
-
"placement-right": "_placement-
|
|
12
|
+
"variant-danger": "_variant-danger_1y939_47",
|
|
13
|
+
"variant-warning": "_variant-warning_1y939_52",
|
|
14
|
+
"variant-success": "_variant-success_1y939_57",
|
|
15
|
+
"placement-left": "_placement-left_1y939_63",
|
|
16
|
+
"size-sm": "_size-sm_1y939_63",
|
|
17
|
+
"size-md": "_size-md_1y939_66",
|
|
18
|
+
"size-lg": "_size-lg_1y939_66",
|
|
19
|
+
"placement-right": "_placement-right_1y939_69",
|
|
20
20
|
transparent: D,
|
|
21
21
|
clearable: F,
|
|
22
|
-
"icon-wrapper": "_icon-
|
|
22
|
+
"icon-wrapper": "_icon-wrapper_1y939_118",
|
|
23
23
|
disabled: L,
|
|
24
|
-
"icon-placement-left-sm": "_icon-placement-left-
|
|
25
|
-
"icon-placement-left-md": "_icon-placement-left-
|
|
26
|
-
"icon-placement-right-sm": "_icon-placement-right-
|
|
27
|
-
"icon-placement-right-md": "_icon-placement-right-
|
|
28
|
-
},
|
|
24
|
+
"icon-placement-left-sm": "_icon-placement-left-sm_1y939_142",
|
|
25
|
+
"icon-placement-left-md": "_icon-placement-left-md_1y939_145",
|
|
26
|
+
"icon-placement-right-sm": "_icon-placement-right-sm_1y939_148",
|
|
27
|
+
"icon-placement-right-md": "_icon-placement-right-md_1y939_151"
|
|
28
|
+
}, a = B(k), O = { lg: "md", md: "md", sm: "sm" }, V = T(
|
|
29
29
|
({
|
|
30
30
|
children: p,
|
|
31
31
|
className: h,
|
|
@@ -33,47 +33,47 @@ const C = "_root_1l0yu_8", D = "_transparent_1l0yu_68", F = "_clearable_1l0yu_88
|
|
|
33
33
|
iconPlacement: n = "left",
|
|
34
34
|
isClearable: c,
|
|
35
35
|
name: _,
|
|
36
|
-
onChange:
|
|
36
|
+
onChange: r,
|
|
37
37
|
size: m = "lg",
|
|
38
38
|
transparent: v,
|
|
39
39
|
type: x = "text",
|
|
40
|
-
value:
|
|
40
|
+
value: d,
|
|
41
41
|
variant: w,
|
|
42
42
|
...z
|
|
43
43
|
}, I) => {
|
|
44
|
-
const { getInputProps: b, variant: N } = j(),
|
|
45
|
-
|
|
44
|
+
const { getInputProps: b, variant: N } = j(), u = N || w, i = t && n, f = i && n === "right", $ = i && n === "left", s = O[m], l = b(z), o = !!p, R = c || f || o, S = () => {
|
|
45
|
+
r && r({
|
|
46
46
|
preventDefault: () => null,
|
|
47
47
|
target: { name: _, value: "" }
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
|
-
return /* @__PURE__ */ y("div", { className:
|
|
50
|
+
return /* @__PURE__ */ y("div", { className: a("input-text-wrapper", "field-input"), children: [
|
|
51
51
|
/* @__PURE__ */ e(
|
|
52
52
|
"input",
|
|
53
53
|
{
|
|
54
|
-
...
|
|
55
|
-
className:
|
|
54
|
+
...l,
|
|
55
|
+
className: a(
|
|
56
56
|
"root",
|
|
57
57
|
`size-${m}`,
|
|
58
|
-
|
|
58
|
+
u && `variant-${u}`,
|
|
59
59
|
v && "transparent",
|
|
60
|
-
|
|
60
|
+
i && `placement-${n}`,
|
|
61
61
|
h
|
|
62
62
|
),
|
|
63
63
|
name: _,
|
|
64
|
-
onChange:
|
|
64
|
+
onChange: r,
|
|
65
65
|
ref: I,
|
|
66
66
|
type: x,
|
|
67
|
-
value:
|
|
67
|
+
value: d
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
70
|
$ ? /* @__PURE__ */ e(
|
|
71
71
|
"div",
|
|
72
72
|
{
|
|
73
|
-
className:
|
|
73
|
+
className: a(
|
|
74
74
|
"icon-wrapper",
|
|
75
75
|
`icon-placement-left-${s}`,
|
|
76
|
-
|
|
76
|
+
l.disabled && "disabled"
|
|
77
77
|
),
|
|
78
78
|
children: /* @__PURE__ */ e(g, { ...t.props, name: t.props.name, size: s })
|
|
79
79
|
}
|
|
@@ -81,13 +81,13 @@ const C = "_root_1l0yu_8", D = "_transparent_1l0yu_68", F = "_clearable_1l0yu_88
|
|
|
81
81
|
R ? /* @__PURE__ */ y(
|
|
82
82
|
"div",
|
|
83
83
|
{
|
|
84
|
-
className:
|
|
84
|
+
className: a(
|
|
85
85
|
"icon-wrapper",
|
|
86
86
|
`icon-placement-right-${s}`,
|
|
87
|
-
|
|
87
|
+
l.disabled && "disabled"
|
|
88
88
|
),
|
|
89
89
|
children: [
|
|
90
|
-
c &&
|
|
90
|
+
c && d ? /* @__PURE__ */ e(E, { onClick: S, size: "sm" }) : null,
|
|
91
91
|
f && !o ? /* @__PURE__ */ e(g, { ...t.props, name: t.props.name, size: s }) : null,
|
|
92
92
|
o ? p : null
|
|
93
93
|
]
|
package/dist/Table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._root_1jybv_2{width:100%;overflow:hidden;border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}._content_1jybv_8{width:100%;overflow-x:auto}._content_1jybv_8 table{--borderWidth: var(--table-cell-border-width);--borderColorChecked: var(--table-cell-color-border-checked);width:100%;border-collapse:collapse}._content_1jybv_8 table tr{font-family:var(--font-family-body);font-size:var(--font-size-sm);border-bottom-color:var(--table-cell-color-border-default);border-bottom-width:var(--borderWidth);border-bottom-style:solid}._content_1jybv_8 table tr[data-clickable=true]{cursor:pointer}._content_1jybv_8 table tr[data-clickable=true]:hover{border-top-width:var(--borderWidth);border-top-style:solid;background-color:var(--table-cell-color-background-hover);border-color:var(--borderColorChecked)}._content_1jybv_8 table th,._content_1jybv_8 table td{padding:var(--table-cell-padding);text-align:left}._content_1jybv_8 table th:has(>[aria-checked]:only-child),._content_1jybv_8 table td:has(>[aria-checked]:only-child){max-width:var(--table-cell-size-checkbox)}._content_1jybv_8 table thead{background-color:var(--table-header-color-background-warm)}._content_1jybv_8 table thead th{line-height:var(--font-line-height-xs);font-weight:var(--font-weight-medium)}._content_1jybv_8 table tbody tr{line-height:var(--font-line-height-md);font-weight:var(--font-weight-regular)}._content_1jybv_8 table tbody tr[aria-selected=true]{background-color:var(--table-cell-color-background-checked);border-bottom-width:0}._content_1jybv_8 table tbody tr[aria-selected=true]:not(tr[aria-selected=true]+tr[aria-selected=true]){border-top-width:var(--borderWidth);border-top-color:var(--borderColorChecked)}._content_1jybv_8 table tbody tr[aria-selected=true]:not(:has(+tr[aria-selected=true])){border-bottom-width:var(--borderWidth);border-bottom-color:var(--borderColorChecked)}._content_1jybv_8 table:has(tbody tr[data-clickable=true]:first-child:hover) thead tr,._content_1jybv_8 table:has(tbody tr:first-child[aria-selected=true]) thead tr{border-bottom-width:0}._content_1jybv_8 table tr:has(+tr[data-clickable=true]:hover),._content_1jybv_8 table tr:has(+tr[aria-selected=true]){border-bottom-width:0}._withElevation_1jybv_73{border:1px solid var(--table-header-color-border);box-shadow:var(--elevation-20)}._withColumnDivider_1jybv_77 table tbody td{border-right-color:var(--table-cell-color-border-default);border-right-width:var(--table-cell-border-width);border-right-style:solid}._withColumnDivider_1jybv_77 table tbody td:last-child{border-right:none}}
|
package/dist/Table.js
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Table.css';
|
|
3
3
|
import { jsx as e } from "react/jsx-runtime";
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { c as
|
|
6
|
-
const
|
|
7
|
-
root:
|
|
8
|
-
content:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
import { forwardRef as h } from "react";
|
|
5
|
+
import { c as v } from "./index-B6iGEm-i.js";
|
|
6
|
+
const y = "_root_1jybv_2", _ = "_content_1jybv_8", p = "_withElevation_1jybv_73", u = "_withColumnDivider_1jybv_77", w = {
|
|
7
|
+
root: y,
|
|
8
|
+
content: _,
|
|
9
|
+
withElevation: p,
|
|
10
|
+
withColumnDivider: u
|
|
11
|
+
}, n = v(w), s = h(
|
|
12
|
+
({ children: t, className: a, withColumnDivider: o = !1, withElevation: b = !1, ...m }, T) => /* @__PURE__ */ e("div", { className: n("root", b && "withElevation", a), ref: T, ...m, children: /* @__PURE__ */ e("div", { className: n("content", o && "withColumnDivider"), children: /* @__PURE__ */ e("table", { children: t }) }) })
|
|
12
13
|
);
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
14
|
+
s.displayName = "Table";
|
|
15
|
+
const l = (t) => /* @__PURE__ */ e("tbody", { ...t });
|
|
16
|
+
l.displayName = "Table.Tbody";
|
|
17
|
+
const i = (t) => /* @__PURE__ */ e("th", { ...t });
|
|
18
|
+
i.displayName = "Table.Th";
|
|
19
|
+
const r = (t) => /* @__PURE__ */ e("thead", { ...t });
|
|
20
|
+
r.displayName = "Table.Thead";
|
|
20
21
|
const c = (t) => /* @__PURE__ */ e("td", { ...t });
|
|
21
22
|
c.displayName = "Table.Td";
|
|
22
23
|
const d = ({ className: t, onClick: a, ...o }) => /* @__PURE__ */ e("tr", { className: t, "data-clickable": !!a, onClick: a, ...o });
|
|
23
24
|
d.displayName = "Table.Tr";
|
|
24
|
-
const
|
|
25
|
-
Tbody:
|
|
25
|
+
const C = Object.assign(s, {
|
|
26
|
+
Tbody: l,
|
|
26
27
|
Td: c,
|
|
27
|
-
Th:
|
|
28
|
-
Thead:
|
|
28
|
+
Th: i,
|
|
29
|
+
Thead: r,
|
|
29
30
|
Tr: d
|
|
30
31
|
});
|
|
31
32
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
C as Table,
|
|
34
|
+
s as TableComponent,
|
|
35
|
+
w as tableClasses
|
|
35
36
|
};
|
package/dist/Tabs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._root_393s0_2{display:flex;align-items:center;transition-property:background-color,border-color,color,box-shadow,outline;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(--tabItemTextColor, 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_393s0_2:focus:not(._dashed_393s0_23,._root_393s0_2[aria-selected=true]){outline:none!important;--tabItemTextColor: var(--tab-color-text-unchecked-pressed);--tabItemBackgroundColor: var(--tab-color-background-unchecked-pressed);--tabItemBorderColor: var(--tab-color-border-unchecked-pressed)}._root_393s0_2[aria-selected=true]{--tabItemTextColor: 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_393s0_2[aria-selected=true]:hover{--tabItemTextColor: 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_393s0_2._dashed_393s0_23{--tabItemBackgroundColor: var(--color-background-transparent-white-none);--tabItemBorderColor: var( --color-background-transparent-white-none );--tabItemDashedBorderSize: var(--tab-border-width-unchecked);outline-style:dashed;outline-color:var(--tab-color-border-dashed-default);outline-width:var(--tabItemDashedBorderSize);outline-offset:calc(var(--tabItemDashedBorderSize) * -1);--tabItemTextColor: var(--tab-color-text-dashed-default)}._root_393s0_2._dashed_393s0_23:focus-visible:not([aria-disabled=true]){outline-color:var(--tab-color-border-dashed-pressed);--tabItemDashedBorderSize: var(--tab-border-width-checked)}._root_393s0_2._dashed_393s0_23:active:not([aria-disabled=true]){outline-color:var(--tab-color-border-dashed-pressed)}._root_393s0_2._dashed_393s0_23[aria-selected=true]{outline-color:var(--tab-color-border-checked-default);--tabItemDashedBorderSize: var(--tab-border-width-checked);--tabItemTextColor: var(--tab-color-text-checked-default);--tabItemBackgroundColor: var(--tab-color-background-checked-default)}._root_393s0_2._dashed_393s0_23[aria-selected=true]:hover{outline-color:var(--tab-color-border-checked-hover);--tabItemBorderColor: var( --color-background-transparent-white-none );--tabItemDashedBorderSize: var(--tab-border-width-checked);--tabItemBackgroundColor: var(--tab-color-background-checked-hover)}._root_393s0_2._dashed_393s0_23:hover{outline-color:var(--tab-color-border-dashed-hover);--tabItemBackgroundColor: var(--tab-color-background-unchecked-hover);--tabItemBoxShadow: var(--elevation-20)}._root_393s0_2[aria-disabled=true]{cursor:not-allowed;--tabItemTextColor: 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_393s0_2:hover:not([aria-selected=true],[aria-disabled=true],._dashed_393s0_23){--tabItemTextColor: 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_393s0_2._orientation-vertical_393s0_91{width:100%}._content_393s0_94{display:flex;flex:1;align-items:center;gap:var(--tabGap);min-width:0}._content_393s0_94 ._icon_393s0_101{display:flex;flex-shrink:0}._size-lg_393s0_105{--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_393s0_112{--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_393s0_122{color:var(--tabIconColor)}._folder-icon-blue_393s0_125{--tabIconColor: var(--color-background-accent-blue-primary)}._folder-icon-blue-active_393s0_128{--tabIconColor: var(--color-background-accent-blue-strong)}._folder-icon-green_393s0_131{--tabIconColor: var(--color-background-accent-green-primary)}._folder-icon-green-active_393s0_134{--tabIconColor: var(--color-background-accent-green-strong)}._folder-icon-orange_393s0_137{--tabIconColor: var(--color-background-accent-orange-primary)}._folder-icon-orange-active_393s0_140{--tabIconColor: var(--color-background-accent-orange-strong)}._folder-icon-pink_393s0_143{--tabIconColor: var(--color-background-accent-pink-primary)}._folder-icon-pink-active_393s0_146{--tabIconColor: var(--color-background-accent-pink-strong)}._folder-icon-teal_393s0_149{--tabIconColor: var(--color-background-accent-teal-primary)}._folder-icon-teal-active_393s0_152{--tabIconColor: var(--color-background-accent-teal-strong)}._folder-icon-violet_393s0_155{--tabIconColor: var(--color-background-accent-violet-primary)}._folder-icon-violet-active_393s0_158{--tabIconColor: var(--color-background-accent-violet-strong)}._folder-icon-warm_393s0_161{--tabIconColor: var(--color-background-warm-stronger)}._folder-icon-warm-active_393s0_164{--tabIconColor: var(--color-beige-60)}._tab-list_393s0_170{display:flex;align-items:center;gap:var(--tabsGap, 0)}._tab-list_393s0_170._size-lg_393s0_105{--tabsGap: var(--tab-gap-content-lg)}._tab-list_393s0_170._size-md_393s0_112{--tabsGap: var(--tab-gap-content-md)}._tab-list_393s0_170._orientation-vertical_393s0_91{flex-direction:column;align-items:stretch;--tabsGap: var(--tab-gap-content-lg)}}
|
package/dist/Tabs.js
CHANGED
|
@@ -6,19 +6,19 @@ import { a as D } from "./combobox-context-COdkPD-I.js";
|
|
|
6
6
|
import { u as G } from "./composite-store-BbsZpdXc.js";
|
|
7
7
|
import { P as H, b as J } from "./popover-context-B2YQ_e3N.js";
|
|
8
8
|
import { C as Q, a as X, c as Y, m as Z } from "./composite-item-CzuZunbi.js";
|
|
9
|
-
import { b as ee, w as
|
|
9
|
+
import { b as ee, w as I, V as N, ab as te, x as V } from "./D5lwkpmX-BTxFdaqc.js";
|
|
10
10
|
import z, { createContext as $, useMemo as oe, forwardRef as B } from "react";
|
|
11
|
-
import { m as
|
|
11
|
+
import { m as se, o as F, c as ne, s as k, d as f, g as re, a as j, b as M, u as q } from "./index-B0vSTNCB.js";
|
|
12
12
|
import { c as P } from "./index-B6iGEm-i.js";
|
|
13
|
-
import { Badge as
|
|
13
|
+
import { Badge as ae } from "./Badge.js";
|
|
14
14
|
import { f as ie } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
15
15
|
import { Icon as le } from "./Icon.js";
|
|
16
16
|
const ce = ee([J, X], [H, Q]), de = ce.useContext;
|
|
17
17
|
$(!1);
|
|
18
18
|
$(null);
|
|
19
19
|
function ue(e) {
|
|
20
|
-
var
|
|
21
|
-
const o = (
|
|
20
|
+
var n;
|
|
21
|
+
const o = (n = e[0]) == null ? void 0 : n.element;
|
|
22
22
|
if (!o) return;
|
|
23
23
|
const t = te(o);
|
|
24
24
|
if (t)
|
|
@@ -28,16 +28,16 @@ function me(e, o) {
|
|
|
28
28
|
if (o != null)
|
|
29
29
|
return e.find((t) => t.id === o);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function S(e) {
|
|
32
32
|
return !(!e || e.disabled || e.dimmed);
|
|
33
33
|
}
|
|
34
34
|
function fe() {
|
|
35
35
|
const e = Z(), o = /* @__PURE__ */ new Map();
|
|
36
|
-
return
|
|
36
|
+
return f(e, ["items"], (t) => {
|
|
37
37
|
o.clear();
|
|
38
|
-
for (const
|
|
39
|
-
const { tabId: i } =
|
|
40
|
-
i != null && (o.has(i) || o.set(i,
|
|
38
|
+
for (const n of t.items) {
|
|
39
|
+
const { tabId: i } = n;
|
|
40
|
+
i != null && (o.has(i) || o.set(i, n));
|
|
41
41
|
}
|
|
42
42
|
}), {
|
|
43
43
|
panels: e,
|
|
@@ -45,7 +45,7 @@ function fe() {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
function be({ composite: e, combobox: o, ...t } = {}) {
|
|
48
|
-
const
|
|
48
|
+
const n = [
|
|
49
49
|
"items",
|
|
50
50
|
"renderedItems",
|
|
51
51
|
"moves",
|
|
@@ -59,106 +59,106 @@ function be({ composite: e, combobox: o, ...t } = {}) {
|
|
|
59
59
|
"focusShift",
|
|
60
60
|
"focusWrap",
|
|
61
61
|
"selectOnMove"
|
|
62
|
-
], i =
|
|
62
|
+
], i = se(t.store, F(e, n), F(o, n)), s = i == null ? void 0 : i.getState(), m = Y({
|
|
63
63
|
...t,
|
|
64
64
|
store: i,
|
|
65
|
-
compositeElementInFocusOrder:
|
|
66
|
-
orientation:
|
|
67
|
-
focusLoop:
|
|
68
|
-
}), { panels:
|
|
69
|
-
...
|
|
70
|
-
selectedId:
|
|
71
|
-
selectOnMove:
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
const { activeId:
|
|
75
|
-
if (!l || !
|
|
76
|
-
const
|
|
77
|
-
|
|
65
|
+
compositeElementInFocusOrder: I(t.compositeElementInFocusOrder, t.includesBaseElement, s == null ? void 0 : s.compositeElementInFocusOrder, s == null ? void 0 : s.includesBaseElement, !1),
|
|
66
|
+
orientation: I(t.orientation, s == null ? void 0 : s.orientation, "horizontal"),
|
|
67
|
+
focusLoop: I(t.focusLoop, s == null ? void 0 : s.focusLoop, !0)
|
|
68
|
+
}), { panels: b, panel: h } = fe(), w = {
|
|
69
|
+
...m.getState(),
|
|
70
|
+
selectedId: I(t.selectedId, s == null ? void 0 : s.selectedId, t.defaultSelectedId),
|
|
71
|
+
selectOnMove: I(t.selectOnMove, s == null ? void 0 : s.selectOnMove, !0)
|
|
72
|
+
}, r = ne(w, m, i);
|
|
73
|
+
k(r, () => f(r, ["moves"], () => {
|
|
74
|
+
const { activeId: a, selectOnMove: l } = r.getState();
|
|
75
|
+
if (!l || !a) return;
|
|
76
|
+
const c = m.item(a);
|
|
77
|
+
S(c) && r.setState("selectedId", c.id);
|
|
78
78
|
}));
|
|
79
|
-
let p = !1,
|
|
80
|
-
|
|
81
|
-
if (p && (p = !1,
|
|
82
|
-
const { activeId:
|
|
83
|
-
if (
|
|
84
|
-
const u = ue(d),
|
|
85
|
-
if (u && x
|
|
86
|
-
|
|
79
|
+
let p = !1, v;
|
|
80
|
+
k(r, () => (p = !1, re(r, ["selectedId"], (a, l) => {
|
|
81
|
+
if (p && (p = !1, a.selectedId === v) || e && a.selectedId === l.selectedId) return;
|
|
82
|
+
const { activeId: c, renderedItems: d } = r.getState();
|
|
83
|
+
if (c === a.selectedId) return;
|
|
84
|
+
const u = ue(d), x = me(d, a.selectedId);
|
|
85
|
+
if (u && S(x)) {
|
|
86
|
+
m.move(x.id);
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
-
|
|
90
|
-
}))),
|
|
91
|
-
if (
|
|
92
|
-
const { activeId: l, renderedItems:
|
|
93
|
-
if (
|
|
89
|
+
r.setState("activeId", a.selectedId);
|
|
90
|
+
}))), k(r, () => f(r, ["selectedId", "renderedItems"], (a) => {
|
|
91
|
+
if (a.selectedId !== void 0) return;
|
|
92
|
+
const { activeId: l, renderedItems: c } = r.getState(), d = m.item(l);
|
|
93
|
+
if (S(d)) r.setState("selectedId", d.id);
|
|
94
94
|
else {
|
|
95
|
-
const u =
|
|
96
|
-
|
|
95
|
+
const u = c.find(S);
|
|
96
|
+
r.setState("selectedId", u == null ? void 0 : u.id);
|
|
97
97
|
}
|
|
98
|
-
})),
|
|
99
|
-
const l =
|
|
98
|
+
})), k(r, () => f(r, ["renderedItems"], (a) => {
|
|
99
|
+
const l = a.renderedItems;
|
|
100
100
|
if (l.length)
|
|
101
|
-
return b
|
|
102
|
-
const d =
|
|
103
|
-
d.some((u) => !u.tabId) && d.forEach((u,
|
|
101
|
+
return f(b, ["renderedItems"], (c) => {
|
|
102
|
+
const d = c.renderedItems;
|
|
103
|
+
d.some((u) => !u.tabId) && d.forEach((u, x) => {
|
|
104
104
|
if (u.tabId) return;
|
|
105
|
-
const C = l[
|
|
106
|
-
C &&
|
|
105
|
+
const C = l[x];
|
|
106
|
+
C && b.renderItem({
|
|
107
107
|
...u,
|
|
108
108
|
tabId: C.id
|
|
109
109
|
});
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
112
|
}));
|
|
113
|
-
let
|
|
114
|
-
return
|
|
115
|
-
const
|
|
116
|
-
|
|
113
|
+
let _ = null;
|
|
114
|
+
return k(r, () => {
|
|
115
|
+
const a = () => {
|
|
116
|
+
_ = r.getState().selectedId;
|
|
117
117
|
}, l = () => {
|
|
118
|
-
const { selectedId: u } =
|
|
119
|
-
u !==
|
|
120
|
-
},
|
|
121
|
-
if (e && !
|
|
118
|
+
const { selectedId: u } = r.getState();
|
|
119
|
+
u !== _ && (p = !0, v = _, r.setState("selectedId", _));
|
|
120
|
+
}, c = !!e && "setSelectedValue" in e, d = c ? e : o;
|
|
121
|
+
if (e && !c && "setSelectElement" in e) return N(f(e, ["value"], a), f(e, ["mounted"], l));
|
|
122
122
|
if (d)
|
|
123
|
-
return N(
|
|
123
|
+
return N(f(d, ["selectedValue"], a), f(d, ["mounted"], l));
|
|
124
124
|
}), {
|
|
125
|
-
...
|
|
126
|
-
...
|
|
127
|
-
panels:
|
|
128
|
-
panel:
|
|
129
|
-
setSelectedId: (
|
|
130
|
-
select: (
|
|
131
|
-
|
|
125
|
+
...m,
|
|
126
|
+
...r,
|
|
127
|
+
panels: b,
|
|
128
|
+
panel: h,
|
|
129
|
+
setSelectedId: (a) => r.setState("selectedId", a),
|
|
130
|
+
select: (a) => {
|
|
131
|
+
r.setState("selectedId", a), m.move(a);
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
|
|
135
|
+
function ge(e, o, t) {
|
|
136
|
+
V(o, [
|
|
137
137
|
t.composite,
|
|
138
138
|
t.combobox,
|
|
139
139
|
o
|
|
140
140
|
]);
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
const [i,
|
|
144
|
-
return
|
|
145
|
-
...
|
|
141
|
+
const n = G(e, o, t);
|
|
142
|
+
M(n, t, "selectedId", "setSelectedId"), M(n, t, "selectOnMove");
|
|
143
|
+
const [i, s] = j(() => n.panels, {});
|
|
144
|
+
return V(s, [n, s]), Object.assign(oe(() => ({
|
|
145
|
+
...n,
|
|
146
146
|
panels: i
|
|
147
|
-
}), [
|
|
147
|
+
}), [n, i]), {
|
|
148
148
|
composite: t.composite,
|
|
149
149
|
combobox: t.combobox
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
const o = D(), t = de() || o,
|
|
152
|
+
function Xe(e = {}) {
|
|
153
|
+
const o = D(), t = de() || o, n = {
|
|
154
154
|
...e,
|
|
155
155
|
composite: e.composite !== void 0 ? e.composite : t,
|
|
156
156
|
combobox: e.combobox !== void 0 ? e.combobox : o
|
|
157
|
-
}, [i,
|
|
158
|
-
return
|
|
157
|
+
}, [i, s] = j(be, n);
|
|
158
|
+
return ge(i, s, n);
|
|
159
159
|
}
|
|
160
160
|
const y = z.createContext(null);
|
|
161
|
-
function
|
|
161
|
+
function he() {
|
|
162
162
|
const e = z.useContext(y);
|
|
163
163
|
return (e == null ? void 0 : e.orientation) ?? "horizontal";
|
|
164
164
|
}
|
|
@@ -166,30 +166,31 @@ function pe() {
|
|
|
166
166
|
const e = z.useContext(y);
|
|
167
167
|
return (e == null ? void 0 : e.size) || "lg";
|
|
168
168
|
}
|
|
169
|
-
const ve = "
|
|
169
|
+
const ve = "_root_393s0_2", _e = "_dashed_393s0_23", Ie = "_content_393s0_94", ke = "_icon_393s0_101", E = {
|
|
170
170
|
root: ve,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
"size-
|
|
176
|
-
"
|
|
177
|
-
"folder-icon
|
|
178
|
-
"folder-icon-blue
|
|
179
|
-
"folder-icon-
|
|
180
|
-
"folder-icon-green
|
|
181
|
-
"folder-icon-
|
|
182
|
-
"folder-icon-orange
|
|
183
|
-
"folder-icon-
|
|
184
|
-
"folder-icon-pink
|
|
185
|
-
"folder-icon-
|
|
186
|
-
"folder-icon-teal
|
|
187
|
-
"folder-icon-
|
|
188
|
-
"folder-icon-violet
|
|
189
|
-
"folder-icon-
|
|
190
|
-
"folder-icon-warm
|
|
191
|
-
"
|
|
192
|
-
|
|
171
|
+
dashed: _e,
|
|
172
|
+
"orientation-vertical": "_orientation-vertical_393s0_91",
|
|
173
|
+
content: Ie,
|
|
174
|
+
icon: ke,
|
|
175
|
+
"size-lg": "_size-lg_393s0_105",
|
|
176
|
+
"size-md": "_size-md_393s0_112",
|
|
177
|
+
"folder-icon": "_folder-icon_393s0_122",
|
|
178
|
+
"folder-icon-blue": "_folder-icon-blue_393s0_125",
|
|
179
|
+
"folder-icon-blue-active": "_folder-icon-blue-active_393s0_128",
|
|
180
|
+
"folder-icon-green": "_folder-icon-green_393s0_131",
|
|
181
|
+
"folder-icon-green-active": "_folder-icon-green-active_393s0_134",
|
|
182
|
+
"folder-icon-orange": "_folder-icon-orange_393s0_137",
|
|
183
|
+
"folder-icon-orange-active": "_folder-icon-orange-active_393s0_140",
|
|
184
|
+
"folder-icon-pink": "_folder-icon-pink_393s0_143",
|
|
185
|
+
"folder-icon-pink-active": "_folder-icon-pink-active_393s0_146",
|
|
186
|
+
"folder-icon-teal": "_folder-icon-teal_393s0_149",
|
|
187
|
+
"folder-icon-teal-active": "_folder-icon-teal-active_393s0_152",
|
|
188
|
+
"folder-icon-violet": "_folder-icon-violet_393s0_155",
|
|
189
|
+
"folder-icon-violet-active": "_folder-icon-violet-active_393s0_158",
|
|
190
|
+
"folder-icon-warm": "_folder-icon-warm_393s0_161",
|
|
191
|
+
"folder-icon-warm-active": "_folder-icon-warm-active_393s0_164",
|
|
192
|
+
"tab-list": "_tab-list_393s0_170"
|
|
193
|
+
}, we = [
|
|
193
194
|
"angle-left-b",
|
|
194
195
|
"angle-right-b",
|
|
195
196
|
"angle-up",
|
|
@@ -206,7 +207,7 @@ const ve = "_root_2romh_2", _e = "_content_2romh_61", Ie = "_icon_2romh_68", E =
|
|
|
206
207
|
"angle-double-right",
|
|
207
208
|
"angle-left",
|
|
208
209
|
"angle-right"
|
|
209
|
-
],
|
|
210
|
+
], xe = [
|
|
210
211
|
"asterisk",
|
|
211
212
|
"info-circle",
|
|
212
213
|
"chart-line",
|
|
@@ -262,13 +263,13 @@ const ve = "_root_2romh_2", _e = "_content_2romh_61", Ie = "_icon_2romh_68", E =
|
|
|
262
263
|
"share",
|
|
263
264
|
"bulk",
|
|
264
265
|
"bulk-active"
|
|
265
|
-
],
|
|
266
|
+
], Se = [
|
|
266
267
|
"chat",
|
|
267
268
|
"chat-bubble-user",
|
|
268
269
|
"comment",
|
|
269
270
|
"comment-alt-lines",
|
|
270
271
|
"comment-chart-line"
|
|
271
|
-
],
|
|
272
|
+
], Te = [
|
|
272
273
|
"music",
|
|
273
274
|
"rocket",
|
|
274
275
|
"file-alt",
|
|
@@ -357,7 +358,7 @@ const ve = "_root_2romh_2", _e = "_content_2romh_61", Ie = "_icon_2romh_68", E =
|
|
|
357
358
|
"plug",
|
|
358
359
|
"hourglass",
|
|
359
360
|
"focus-target"
|
|
360
|
-
],
|
|
361
|
+
], ze = [
|
|
361
362
|
"play",
|
|
362
363
|
"play-solid",
|
|
363
364
|
"stop-circle-solid",
|
|
@@ -387,7 +388,7 @@ const ve = "_root_2romh_2", _e = "_content_2romh_61", Ie = "_icon_2romh_68", E =
|
|
|
387
388
|
"volume-up",
|
|
388
389
|
"volume-mute",
|
|
389
390
|
"closed-captioning"
|
|
390
|
-
],
|
|
391
|
+
], Pe = [
|
|
391
392
|
"icons",
|
|
392
393
|
"package",
|
|
393
394
|
"basketball",
|
|
@@ -463,14 +464,14 @@ const ve = "_root_2romh_2", _e = "_content_2romh_61", Ie = "_icon_2romh_68", E =
|
|
|
463
464
|
"redo",
|
|
464
465
|
"play",
|
|
465
466
|
"ban"
|
|
466
|
-
],
|
|
467
|
+
], ye = [
|
|
467
468
|
"folder",
|
|
468
469
|
"folder-open",
|
|
469
470
|
"folder-full",
|
|
470
471
|
"folder-plus",
|
|
471
472
|
"file",
|
|
472
473
|
"image"
|
|
473
|
-
],
|
|
474
|
+
], Ee = [
|
|
474
475
|
"bold",
|
|
475
476
|
"arrow",
|
|
476
477
|
"brackets-curly",
|
|
@@ -496,7 +497,7 @@ const ve = "_root_2romh_2", _e = "_content_2romh_61", Ie = "_icon_2romh_68", E =
|
|
|
496
497
|
// (not unicons, original creation)
|
|
497
498
|
"font",
|
|
498
499
|
"underline"
|
|
499
|
-
],
|
|
500
|
+
], Ce = [
|
|
500
501
|
"behance",
|
|
501
502
|
"dribbble",
|
|
502
503
|
"facebook",
|
|
@@ -523,62 +524,75 @@ const ve = "_root_2romh_2", _e = "_content_2romh_61", Ie = "_icon_2romh_68", E =
|
|
|
523
524
|
// (not unicons)
|
|
524
525
|
"medium"
|
|
525
526
|
// (not unicons)
|
|
526
|
-
],
|
|
527
|
-
...we,
|
|
528
|
-
...ke,
|
|
529
|
-
...Ee,
|
|
527
|
+
], Oe = ["symbol", "wttj"], Ne = ["flag-fr", "flag-en", "flag-us"], Ve = [
|
|
530
528
|
...xe,
|
|
531
|
-
...
|
|
532
|
-
...
|
|
533
|
-
...ye,
|
|
529
|
+
...we,
|
|
530
|
+
...Ce,
|
|
534
531
|
...Se,
|
|
532
|
+
...ye,
|
|
533
|
+
...Ne,
|
|
534
|
+
...Ee,
|
|
535
535
|
...Te,
|
|
536
|
-
...
|
|
537
|
-
...
|
|
538
|
-
|
|
539
|
-
|
|
536
|
+
...ze,
|
|
537
|
+
...Oe,
|
|
538
|
+
...Pe
|
|
539
|
+
], Fe = (e) => Ve.includes(e), Me = P(E);
|
|
540
|
+
function $e({
|
|
540
541
|
icon: e,
|
|
541
542
|
iconColor: o,
|
|
542
543
|
isActive: t,
|
|
543
|
-
size:
|
|
544
|
+
size: n
|
|
544
545
|
}) {
|
|
545
546
|
return e ? typeof e != "string" || !Fe(e) ? e : /* @__PURE__ */ g(
|
|
546
547
|
le,
|
|
547
548
|
{
|
|
548
549
|
className: o ? Me("folder-icon", `folder-icon-${o}${t ? "-active" : ""}`) : void 0,
|
|
549
550
|
name: e,
|
|
550
|
-
size:
|
|
551
|
+
size: n
|
|
551
552
|
}
|
|
552
553
|
) : null;
|
|
553
554
|
}
|
|
554
555
|
const T = P(E), L = ie(
|
|
555
|
-
({
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
556
|
+
({
|
|
557
|
+
as: e,
|
|
558
|
+
badge: o,
|
|
559
|
+
badgeVariant: t,
|
|
560
|
+
children: n,
|
|
561
|
+
className: i,
|
|
562
|
+
dashed: s,
|
|
563
|
+
icon: m,
|
|
564
|
+
iconColor: b = "violet",
|
|
565
|
+
id: h,
|
|
566
|
+
store: w,
|
|
567
|
+
...r
|
|
568
|
+
}, p) => {
|
|
569
|
+
const v = pe(), _ = he(), { selectedId: a } = q(w), l = a === h, c = $e({
|
|
570
|
+
icon: m,
|
|
571
|
+
iconColor: b,
|
|
572
|
+
isActive: l,
|
|
573
|
+
size: v
|
|
574
|
+
}), d = l ? "neutral" : t || "warm";
|
|
562
575
|
return /* @__PURE__ */ O(
|
|
563
576
|
W,
|
|
564
577
|
{
|
|
565
578
|
className: T(
|
|
566
579
|
"root",
|
|
567
|
-
`size-${
|
|
568
|
-
|
|
569
|
-
|
|
580
|
+
`size-${v}`,
|
|
581
|
+
_ === "vertical" && "orientation-vertical",
|
|
582
|
+
s && "dashed",
|
|
583
|
+
i
|
|
570
584
|
),
|
|
571
|
-
id:
|
|
572
|
-
ref:
|
|
585
|
+
id: h,
|
|
586
|
+
ref: p,
|
|
573
587
|
render: e ? /* @__PURE__ */ g(e, {}) : void 0,
|
|
574
|
-
store:
|
|
575
|
-
...
|
|
588
|
+
store: w,
|
|
589
|
+
...r,
|
|
576
590
|
children: [
|
|
577
591
|
/* @__PURE__ */ O("span", { className: T("content"), children: [
|
|
578
|
-
|
|
579
|
-
|
|
592
|
+
c ? /* @__PURE__ */ g("span", { className: T("icon"), children: c }) : null,
|
|
593
|
+
n
|
|
580
594
|
] }),
|
|
581
|
-
o ? /* @__PURE__ */ g(
|
|
595
|
+
o ? /* @__PURE__ */ g(ae, { size: v, variant: d, children: o }) : null
|
|
582
596
|
]
|
|
583
597
|
}
|
|
584
598
|
);
|
|
@@ -587,26 +601,26 @@ const T = P(E), L = ie(
|
|
|
587
601
|
L.displayName = "Tabs.Tab";
|
|
588
602
|
const A = B(({ children: e, ...o }, t) => /* @__PURE__ */ g(K, { ref: t, ...o, children: e }));
|
|
589
603
|
A.displayName = "Tabs.Panel";
|
|
590
|
-
const
|
|
591
|
-
({ children: e, className: o, size: t = "lg", store:
|
|
592
|
-
const { orientation:
|
|
604
|
+
const Be = P(E), R = B(
|
|
605
|
+
({ children: e, className: o, size: t = "lg", store: n, ...i }, s) => {
|
|
606
|
+
const { orientation: m } = q(n), b = m === "vertical", h = b ? "vertical" : "horizontal";
|
|
593
607
|
return /* @__PURE__ */ g(
|
|
594
608
|
U,
|
|
595
609
|
{
|
|
596
|
-
className:
|
|
597
|
-
ref:
|
|
598
|
-
store:
|
|
610
|
+
className: Be("tab-list", `size-${t}`, b && "orientation-vertical", o),
|
|
611
|
+
ref: s,
|
|
612
|
+
store: n,
|
|
599
613
|
...i,
|
|
600
|
-
children: /* @__PURE__ */ g(y.Provider, { value: { orientation:
|
|
614
|
+
children: /* @__PURE__ */ g(y.Provider, { value: { orientation: h, size: t }, children: e })
|
|
601
615
|
}
|
|
602
616
|
);
|
|
603
617
|
}
|
|
604
618
|
);
|
|
605
619
|
R.displayName = "Tabs";
|
|
606
|
-
const
|
|
620
|
+
const Ye = Object.assign(R, { Panel: A, Tab: L });
|
|
607
621
|
export {
|
|
608
|
-
|
|
622
|
+
Ye as Tabs,
|
|
609
623
|
R as TabsComponent,
|
|
610
624
|
E as tabsClasses,
|
|
611
|
-
|
|
625
|
+
Xe as useTab
|
|
612
626
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TabPanelProps as AriakitTabPanelProps, TabStore, TabStoreProps } from '@ariakit/react';
|
|
2
2
|
import { IconName } from '../Icon/types';
|
|
3
|
+
import { BadgeProps } from '../Badge/types';
|
|
3
4
|
import { UseTab } from './index';
|
|
4
5
|
export type Size = 'lg' | 'md';
|
|
5
6
|
export type TabListProps = {
|
|
@@ -10,8 +11,10 @@ export type TabListProps = {
|
|
|
10
11
|
};
|
|
11
12
|
export interface TabOptions {
|
|
12
13
|
badge?: number | string;
|
|
14
|
+
badgeVariant?: BadgeProps['variant'];
|
|
13
15
|
children: React.ReactNode;
|
|
14
16
|
className?: string;
|
|
17
|
+
dashed?: boolean;
|
|
15
18
|
icon?: IconName | React.ReactNode;
|
|
16
19
|
iconColor?: 'blue' | 'green' | 'orange' | 'pink' | 'teal' | 'violet' | 'warm';
|
|
17
20
|
id?: string;
|