@dxos/react-ui-tabs 0.8.4-main.ead640a → 0.8.4-main.effb148878
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/LICENSE +102 -5
- package/dist/lib/browser/index.mjs +161 -199
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +161 -199
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/Tabs.d.ts +44 -12
- package/dist/types/src/Tabs.d.ts.map +1 -1
- package/dist/types/src/Tabs.stories.d.ts +17 -4
- package/dist/types/src/Tabs.stories.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +23 -23
- package/src/Tabs.stories.tsx +48 -41
- package/src/Tabs.tsx +154 -137
package/LICENSE
CHANGED
|
@@ -1,8 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2024 DXOS
|
|
1
|
+
# Functional Source License, Version 1.1, ALv2 Future License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
## Abbreviation
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
FSL-1.1-Apache-2.0
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2026 DXOS
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the Apache License, Version 2.0 that is effective on the second anniversary of
|
|
91
|
+
the date we make the Software available. On or after that date, you may use the
|
|
92
|
+
Software under the Apache License, Version 2.0, in which case the following
|
|
93
|
+
will apply:
|
|
94
|
+
|
|
95
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
96
|
+
this file except in compliance with the License.
|
|
97
|
+
|
|
98
|
+
You may obtain a copy of the License at
|
|
99
|
+
|
|
100
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
101
|
+
|
|
102
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
103
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
104
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
105
|
+
specific language governing permissions and limitations under the License.
|
|
@@ -1,216 +1,178 @@
|
|
|
1
1
|
// src/Tabs.tsx
|
|
2
|
-
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
3
2
|
import { useArrowNavigationGroup, useFocusFinders, useFocusableGroup } from "@fluentui/react-tabster";
|
|
4
3
|
import { createContext } from "@radix-ui/react-context";
|
|
5
4
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
6
5
|
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
7
|
-
import React, { useCallback, useLayoutEffect
|
|
8
|
-
import { Button, IconButton } from "@dxos/react-ui";
|
|
6
|
+
import React, { Activity, forwardRef, useCallback, useLayoutEffect } from "react";
|
|
7
|
+
import { Button, IconButton, useForwardedRef } from "@dxos/react-ui";
|
|
9
8
|
import { useAttention } from "@dxos/react-ui-attention";
|
|
10
|
-
import {
|
|
9
|
+
import { mx } from "@dxos/ui-theme";
|
|
11
10
|
var TABS_NAME = "Tabs";
|
|
12
11
|
var [TabsContextProvider, useTabsContext] = createContext(TABS_NAME, {
|
|
12
|
+
orientation: "vertical",
|
|
13
13
|
activePart: "list",
|
|
14
14
|
setActivePart: () => {
|
|
15
|
-
},
|
|
16
|
-
orientation: "vertical"
|
|
17
|
-
});
|
|
18
|
-
var TabsRoot = ({ children, classNames, activePart: propsActivePart, onActivePartChange, defaultActivePart, value: propsValue, onValueChange, defaultValue, orientation = "vertical", activationMode = "manual", verticalVariant = "stateful", attendableId, ...props }) => {
|
|
19
|
-
var _effect = _useSignals();
|
|
20
|
-
try {
|
|
21
|
-
const _1 = useArrowNavigationGroup();
|
|
22
|
-
const _2 = useFocusableGroup();
|
|
23
|
-
const [activePart = "list", setActivePart] = useControllableState({
|
|
24
|
-
prop: propsActivePart,
|
|
25
|
-
onChange: onActivePartChange,
|
|
26
|
-
defaultProp: defaultActivePart
|
|
27
|
-
});
|
|
28
|
-
const [value, setValue] = useControllableState({
|
|
29
|
-
prop: propsValue,
|
|
30
|
-
onChange: onValueChange,
|
|
31
|
-
defaultProp: defaultValue
|
|
32
|
-
});
|
|
33
|
-
const handleValueChange = useCallback((nextValue) => {
|
|
34
|
-
setActivePart("panel");
|
|
35
|
-
setValue(nextValue);
|
|
36
|
-
}, [
|
|
37
|
-
value
|
|
38
|
-
]);
|
|
39
|
-
const { findFirstFocusable } = useFocusFinders();
|
|
40
|
-
const tabsRoot = useRef(null);
|
|
41
|
-
useLayoutEffect(() => {
|
|
42
|
-
if (tabsRoot.current) {
|
|
43
|
-
findFirstFocusable(tabsRoot.current)?.focus();
|
|
44
|
-
}
|
|
45
|
-
}, [
|
|
46
|
-
activePart
|
|
47
|
-
]);
|
|
48
|
-
return /* @__PURE__ */ React.createElement(TabsContextProvider, {
|
|
49
|
-
orientation,
|
|
50
|
-
activePart,
|
|
51
|
-
setActivePart,
|
|
52
|
-
value,
|
|
53
|
-
attendableId,
|
|
54
|
-
verticalVariant
|
|
55
|
-
}, /* @__PURE__ */ React.createElement(TabsPrimitive.Root, {
|
|
56
|
-
activationMode,
|
|
57
|
-
"data-active": activePart,
|
|
58
|
-
orientation,
|
|
59
|
-
...props,
|
|
60
|
-
value,
|
|
61
|
-
onValueChange: handleValueChange,
|
|
62
|
-
className: mx("overflow-hidden", orientation === "vertical" && verticalVariant === "stateful" && "[&[data-active=list]_[role=tabpanel]]:invisible @md:[&[data-active=list]_[role=tabpanel]]:visible", classNames),
|
|
63
|
-
ref: tabsRoot
|
|
64
|
-
}, children));
|
|
65
|
-
} finally {
|
|
66
|
-
_effect.f();
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
var TabsViewport = ({ classNames, children, ...props }) => {
|
|
70
|
-
var _effect = _useSignals();
|
|
71
|
-
try {
|
|
72
|
-
const { orientation, activePart, verticalVariant } = useTabsContext("TabsViewport");
|
|
73
|
-
return /* @__PURE__ */ React.createElement("div", {
|
|
74
|
-
role: "none",
|
|
75
|
-
...props,
|
|
76
|
-
"data-active": activePart,
|
|
77
|
-
className: mx(orientation === "vertical" && verticalVariant === "stateful" && [
|
|
78
|
-
"grid is-[200%] grid-cols-2 data-[active=panel]:mis-[-100%]",
|
|
79
|
-
"@md:is-auto @md:data-[active=panel]:mis-0 @md:grid-cols-[minmax(min-content,1fr)_3fr] @md:gap-1"
|
|
80
|
-
], classNames)
|
|
81
|
-
}, children);
|
|
82
|
-
} finally {
|
|
83
|
-
_effect.f();
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
var TabsTablist = ({ children, classNames, ...props }) => {
|
|
87
|
-
var _effect = _useSignals();
|
|
88
|
-
try {
|
|
89
|
-
const { orientation, verticalVariant } = useTabsContext("TabsTablist");
|
|
90
|
-
return /* @__PURE__ */ React.createElement(TabsPrimitive.List, {
|
|
91
|
-
...props,
|
|
92
|
-
"data-arrow-keys": orientation === "vertical" ? "up down" : "left right",
|
|
93
|
-
className: mx(
|
|
94
|
-
"max-bs-full is-full",
|
|
95
|
-
// NOTE: Padding should be common to Toolbar.
|
|
96
|
-
orientation === "vertical" ? "overflow-y-auto" : "flex items-stretch justify-start overflow-x-auto p-1 gap-1",
|
|
97
|
-
orientation === "vertical" && verticalVariant === "stateful" && "place-self-start p-1",
|
|
98
|
-
classNames
|
|
99
|
-
)
|
|
100
|
-
}, children);
|
|
101
|
-
} finally {
|
|
102
|
-
_effect.f();
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
var TabsBackButton = ({ onClick, classNames, ...props }) => {
|
|
106
|
-
var _effect = _useSignals();
|
|
107
|
-
try {
|
|
108
|
-
const { setActivePart } = useTabsContext("TabsBackButton");
|
|
109
|
-
const handleClick = useCallback((event) => {
|
|
110
|
-
setActivePart("list");
|
|
111
|
-
return onClick?.(event);
|
|
112
|
-
}, [
|
|
113
|
-
onClick,
|
|
114
|
-
setActivePart
|
|
115
|
-
]);
|
|
116
|
-
return /* @__PURE__ */ React.createElement(Button, {
|
|
117
|
-
...props,
|
|
118
|
-
classNames: [
|
|
119
|
-
"is-full text-start @md:hidden mbe-2",
|
|
120
|
-
classNames
|
|
121
|
-
],
|
|
122
|
-
onClick: handleClick
|
|
123
|
-
});
|
|
124
|
-
} finally {
|
|
125
|
-
_effect.f();
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
var TabsTabGroupHeading = ({ children, classNames, ...props }) => {
|
|
129
|
-
var _effect = _useSignals();
|
|
130
|
-
try {
|
|
131
|
-
return /* @__PURE__ */ React.createElement("h2", {
|
|
132
|
-
...props,
|
|
133
|
-
className: mx("mlb-1 pli-2 text-sm text-unAccent", classNames)
|
|
134
|
-
}, children);
|
|
135
|
-
} finally {
|
|
136
|
-
_effect.f();
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
var TabsTab = ({ value, classNames, children, onClick, ...props }) => {
|
|
140
|
-
var _effect = _useSignals();
|
|
141
|
-
try {
|
|
142
|
-
const { setActivePart, orientation, value: contextValue, attendableId } = useTabsContext("TabsTab");
|
|
143
|
-
const { hasAttention } = useAttention(attendableId);
|
|
144
|
-
const handleClick = useCallback(
|
|
145
|
-
// NOTE: This handler is only called if the tab is *already active*.
|
|
146
|
-
(event) => {
|
|
147
|
-
setActivePart("panel");
|
|
148
|
-
onClick?.(event);
|
|
149
|
-
},
|
|
150
|
-
[
|
|
151
|
-
setActivePart,
|
|
152
|
-
onClick
|
|
153
|
-
]
|
|
154
|
-
);
|
|
155
|
-
return /* @__PURE__ */ React.createElement(TabsPrimitive.Trigger, {
|
|
156
|
-
value,
|
|
157
|
-
asChild: true
|
|
158
|
-
}, /* @__PURE__ */ React.createElement(Button, {
|
|
159
|
-
density: "fine",
|
|
160
|
-
variant: orientation === "horizontal" && contextValue === value ? hasAttention ? "primary" : "default" : "ghost",
|
|
161
|
-
...props,
|
|
162
|
-
onClick: handleClick,
|
|
163
|
-
classNames: [
|
|
164
|
-
orientation === "vertical" && "block justify-start text-start is-full",
|
|
165
|
-
orientation === "vertical" && ghostSelectedContainerMd,
|
|
166
|
-
classNames
|
|
167
|
-
]
|
|
168
|
-
}, children));
|
|
169
|
-
} finally {
|
|
170
|
-
_effect.f();
|
|
171
15
|
}
|
|
172
|
-
};
|
|
173
|
-
var
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
16
|
+
});
|
|
17
|
+
var TabsRoot = /* @__PURE__ */ forwardRef(({ children, classNames, activePart: propsActivePart, onActivePartChange, defaultActivePart, value: propsValue, onValueChange, defaultValue, orientation = "vertical", activationMode = "manual", attendableId, ...props }, forwardedRef) => {
|
|
18
|
+
const tabsRoot = useForwardedRef(forwardedRef);
|
|
19
|
+
const _1 = useArrowNavigationGroup();
|
|
20
|
+
const _2 = useFocusableGroup();
|
|
21
|
+
const [activePart = "list", setActivePart] = useControllableState({
|
|
22
|
+
prop: propsActivePart,
|
|
23
|
+
onChange: onActivePartChange,
|
|
24
|
+
defaultProp: defaultActivePart
|
|
25
|
+
});
|
|
26
|
+
const [value, setValue] = useControllableState({
|
|
27
|
+
prop: propsValue,
|
|
28
|
+
onChange: onValueChange,
|
|
29
|
+
defaultProp: defaultValue
|
|
30
|
+
});
|
|
31
|
+
const handleValueChange = useCallback((nextValue) => {
|
|
32
|
+
setActivePart("panel");
|
|
33
|
+
setValue(nextValue);
|
|
34
|
+
}, [
|
|
35
|
+
value
|
|
36
|
+
]);
|
|
37
|
+
const { findFirstFocusable } = useFocusFinders();
|
|
38
|
+
useLayoutEffect(() => {
|
|
39
|
+
if (tabsRoot.current) {
|
|
40
|
+
findFirstFocusable(tabsRoot.current)?.focus();
|
|
41
|
+
}
|
|
42
|
+
}, [
|
|
43
|
+
activePart
|
|
44
|
+
]);
|
|
45
|
+
return /* @__PURE__ */ React.createElement(TabsContextProvider, {
|
|
46
|
+
orientation,
|
|
47
|
+
activePart,
|
|
48
|
+
setActivePart,
|
|
49
|
+
value,
|
|
50
|
+
attendableId
|
|
51
|
+
}, /* @__PURE__ */ React.createElement(TabsPrimitive.Root, {
|
|
52
|
+
...props,
|
|
53
|
+
className: mx("overflow-hidden", classNames),
|
|
54
|
+
orientation,
|
|
55
|
+
activationMode,
|
|
56
|
+
"data-active": activePart,
|
|
57
|
+
value,
|
|
58
|
+
onValueChange: handleValueChange,
|
|
59
|
+
ref: tabsRoot
|
|
60
|
+
}, children));
|
|
61
|
+
});
|
|
62
|
+
TabsRoot.displayName = "Tabs.Root";
|
|
63
|
+
function TabsViewport({ classNames, children, ...props }) {
|
|
64
|
+
const { activePart } = useTabsContext("TabsViewport");
|
|
65
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
66
|
+
...props,
|
|
67
|
+
"data-active": activePart,
|
|
68
|
+
className: mx(classNames)
|
|
69
|
+
}, children);
|
|
70
|
+
}
|
|
71
|
+
TabsViewport.displayName = "Tabs.Viewport";
|
|
72
|
+
function TabsTablist({ children, classNames, ...props }) {
|
|
73
|
+
const { orientation } = useTabsContext("TabsTablist");
|
|
74
|
+
return /* @__PURE__ */ React.createElement(TabsPrimitive.List, {
|
|
75
|
+
...props,
|
|
76
|
+
"data-arrow-keys": orientation === "vertical" ? "up down" : "left right",
|
|
77
|
+
className: mx(
|
|
78
|
+
"max-h-full w-full",
|
|
79
|
+
// TODO(burdon): Should be embeddable inside Toolbar (if horizontal).
|
|
80
|
+
orientation === "vertical" ? "overflow-y-auto" : "flex p-1 gap-1 items-stretch justify-start overflow-x-auto",
|
|
81
|
+
classNames
|
|
82
|
+
)
|
|
83
|
+
}, children);
|
|
84
|
+
}
|
|
85
|
+
TabsTablist.displayName = "Tabs.Tablist";
|
|
86
|
+
function TabsBackButton({ onClick, classNames, ...props }) {
|
|
87
|
+
const { setActivePart } = useTabsContext("TabsBackButton");
|
|
88
|
+
const handleClick = useCallback((event) => {
|
|
89
|
+
setActivePart("list");
|
|
90
|
+
return onClick?.(event);
|
|
91
|
+
}, [
|
|
92
|
+
setActivePart,
|
|
93
|
+
onClick
|
|
94
|
+
]);
|
|
95
|
+
return /* @__PURE__ */ React.createElement(Button, {
|
|
96
|
+
...props,
|
|
97
|
+
classNames: [
|
|
98
|
+
"@md:hidden text-start",
|
|
99
|
+
classNames
|
|
100
|
+
],
|
|
101
|
+
onClick: handleClick
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
TabsBackButton.displayName = "Tabs.BackButton";
|
|
105
|
+
function TabsTabGroupHeading({ children, classNames, ...props }) {
|
|
106
|
+
return /* @__PURE__ */ React.createElement("h2", {
|
|
107
|
+
...props,
|
|
108
|
+
className: mx("my-1 px-2 text-sm text-un-accent", classNames)
|
|
109
|
+
}, children);
|
|
110
|
+
}
|
|
111
|
+
TabsTabGroupHeading.displayName = "Tabs.TabGroupHeading";
|
|
112
|
+
function TabsTab({ value, classNames, children, onClick, ...props }) {
|
|
113
|
+
const { setActivePart, orientation, value: contextValue, attendableId } = useTabsContext("TabsTab");
|
|
114
|
+
const { hasAttention } = useAttention(attendableId);
|
|
115
|
+
const handleClick = useCallback(
|
|
116
|
+
// NOTE: This handler is only called if the tab is *already active*.
|
|
117
|
+
(event) => {
|
|
179
118
|
setActivePart("panel");
|
|
180
119
|
onClick?.(event);
|
|
181
|
-
},
|
|
120
|
+
},
|
|
121
|
+
[
|
|
182
122
|
setActivePart,
|
|
183
123
|
onClick
|
|
184
|
-
]
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
124
|
+
]
|
|
125
|
+
);
|
|
126
|
+
return /* @__PURE__ */ React.createElement(TabsPrimitive.Trigger, {
|
|
127
|
+
value,
|
|
128
|
+
asChild: true
|
|
129
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
130
|
+
...props,
|
|
131
|
+
variant: orientation === "horizontal" && contextValue === value ? hasAttention ? "primary" : "default" : "ghost",
|
|
132
|
+
classNames: [
|
|
133
|
+
orientation === "vertical" && "block justify-start text-start w-full",
|
|
134
|
+
orientation === "vertical" && "dx-selected",
|
|
135
|
+
classNames
|
|
136
|
+
],
|
|
137
|
+
onClick: handleClick
|
|
138
|
+
}, children));
|
|
139
|
+
}
|
|
140
|
+
TabsTab.displayName = "Tabs.Tab";
|
|
141
|
+
function TabsIconTab({ value, classNames, onClick, ...props }) {
|
|
142
|
+
const { setActivePart, orientation, value: contextValue, attendableId } = useTabsContext("TabsTab");
|
|
143
|
+
const { hasAttention } = useAttention(attendableId);
|
|
144
|
+
const handleClick = useCallback((event) => {
|
|
145
|
+
setActivePart("panel");
|
|
146
|
+
onClick?.(event);
|
|
147
|
+
}, [
|
|
148
|
+
setActivePart,
|
|
149
|
+
onClick
|
|
150
|
+
]);
|
|
151
|
+
return /* @__PURE__ */ React.createElement(TabsPrimitive.Trigger, {
|
|
152
|
+
value,
|
|
153
|
+
asChild: true
|
|
154
|
+
}, /* @__PURE__ */ React.createElement(IconButton, {
|
|
155
|
+
...props,
|
|
156
|
+
variant: orientation === "horizontal" && contextValue === value ? hasAttention ? "primary" : "default" : "ghost",
|
|
157
|
+
classNames: [
|
|
158
|
+
orientation === "vertical" && "justify-start text-start w-full",
|
|
159
|
+
orientation === "vertical" && "dx-selected",
|
|
160
|
+
classNames
|
|
161
|
+
],
|
|
162
|
+
onClick: handleClick
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
165
|
+
TabsIconTab.displayName = "Tabs.IconTab";
|
|
166
|
+
function TabsPanel({ classNames, children, ...props }) {
|
|
167
|
+
const { value: contextValue } = useTabsContext("TabsTab");
|
|
168
|
+
return /* @__PURE__ */ React.createElement(Activity, {
|
|
169
|
+
mode: contextValue === props.value ? "visible" : "hidden"
|
|
170
|
+
}, /* @__PURE__ */ React.createElement(TabsPrimitive.Content, {
|
|
171
|
+
...props,
|
|
172
|
+
className: mx("p-0! dx-focus-ring-inset-over-all", classNames)
|
|
173
|
+
}, children));
|
|
174
|
+
}
|
|
175
|
+
TabsPanel.displayName = "Tabs.Panel";
|
|
214
176
|
var Tabs = {
|
|
215
177
|
Root: TabsRoot,
|
|
216
178
|
Tablist: TabsTablist,
|
|
@@ -218,7 +180,7 @@ var Tabs = {
|
|
|
218
180
|
IconTab: TabsIconTab,
|
|
219
181
|
TabPrimitive: TabsPrimitive.Trigger,
|
|
220
182
|
TabGroupHeading: TabsTabGroupHeading,
|
|
221
|
-
|
|
183
|
+
Panel: TabsPanel,
|
|
222
184
|
BackButton: TabsBackButton,
|
|
223
185
|
Viewport: TabsViewport
|
|
224
186
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/Tabs.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { useArrowNavigationGroup, useFocusFinders, useFocusableGroup } from '@fluentui/react-tabster';\nimport { createContext } from '@radix-ui/react-context';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["useArrowNavigationGroup", "useFocusFinders", "useFocusableGroup", "createContext", "TabsPrimitive", "useControllableState", "React", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { useArrowNavigationGroup, useFocusFinders, useFocusableGroup } from '@fluentui/react-tabster';\nimport { createContext } from '@radix-ui/react-context';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, {\n Activity,\n type ComponentPropsWithoutRef,\n type MouseEvent,\n forwardRef,\n useCallback,\n useLayoutEffect,\n} from 'react';\n\nimport {\n Button,\n type ButtonProps,\n IconButton,\n type IconButtonProps,\n type ThemedClassName,\n useForwardedRef,\n} from '@dxos/react-ui';\nimport { useAttention } from '@dxos/react-ui-attention';\nimport { mx } from '@dxos/ui-theme';\n\ntype TabsActivePart = 'list' | 'panel';\n\nconst TABS_NAME = 'Tabs';\n\ntype TabsContextValue = {\n activePart: TabsActivePart;\n setActivePart: (nextActivePart: TabsActivePart) => void;\n attendableId?: string;\n} & Pick<TabsPrimitive.TabsProps, 'orientation' | 'value'>;\n\nconst [TabsContextProvider, useTabsContext] = createContext<TabsContextValue>(TABS_NAME, {\n orientation: 'vertical',\n activePart: 'list',\n setActivePart: () => {},\n});\n\ntype TabsRootProps = ThemedClassName<TabsPrimitive.TabsProps> &\n Partial<\n Pick<TabsContextValue, 'activePart' | 'attendableId'> & {\n onActivePartChange: (nextActivePart: TabsActivePart) => void;\n defaultActivePart: TabsActivePart;\n }\n >;\n\nconst TabsRoot = forwardRef<HTMLDivElement, TabsRootProps>(\n (\n {\n children,\n classNames,\n activePart: propsActivePart,\n onActivePartChange,\n defaultActivePart,\n value: propsValue,\n onValueChange,\n defaultValue,\n orientation = 'vertical',\n activationMode = 'manual',\n attendableId,\n ...props\n },\n forwardedRef,\n ) => {\n // const tabsRoot = useRef<HTMLDivElement | null>(null);\n const tabsRoot = useForwardedRef(forwardedRef);\n\n // TODO(thure): Without these, we get Groupper/Mover `API used before initialization`, but why?\n const _1 = useArrowNavigationGroup();\n const _2 = useFocusableGroup();\n const [activePart = 'list', setActivePart] = useControllableState({\n prop: propsActivePart,\n onChange: onActivePartChange,\n defaultProp: defaultActivePart,\n });\n\n const [value, setValue] = useControllableState({\n prop: propsValue,\n onChange: onValueChange,\n defaultProp: defaultValue,\n });\n\n const handleValueChange = useCallback(\n (nextValue: string) => {\n setActivePart('panel');\n setValue(nextValue);\n },\n [value],\n );\n\n const { findFirstFocusable } = useFocusFinders();\n\n useLayoutEffect(() => {\n if (tabsRoot.current) {\n findFirstFocusable(tabsRoot.current)?.focus();\n }\n }, [activePart]);\n\n return (\n <TabsContextProvider\n orientation={orientation}\n activePart={activePart}\n setActivePart={setActivePart}\n value={value}\n attendableId={attendableId}\n >\n <TabsPrimitive.Root\n {...props}\n className={mx('overflow-hidden', classNames)}\n orientation={orientation}\n activationMode={activationMode}\n data-active={activePart}\n value={value}\n onValueChange={handleValueChange}\n ref={tabsRoot}\n >\n {children}\n </TabsPrimitive.Root>\n </TabsContextProvider>\n );\n },\n);\n\nTabsRoot.displayName = 'Tabs.Root';\n\ntype TabsViewportProps = ThemedClassName<ComponentPropsWithoutRef<'div'>>;\n\nfunction TabsViewport({ classNames, children, ...props }: TabsViewportProps) {\n const { activePart } = useTabsContext('TabsViewport');\n return (\n <div {...props} data-active={activePart} className={mx(classNames)}>\n {children}\n </div>\n );\n}\n\nTabsViewport.displayName = 'Tabs.Viewport';\n\ntype TabsTablistProps = ThemedClassName<TabsPrimitive.TabsListProps>;\n\nfunction TabsTablist({ children, classNames, ...props }: TabsTablistProps) {\n const { orientation } = useTabsContext('TabsTablist');\n return (\n <TabsPrimitive.List\n {...props}\n data-arrow-keys={orientation === 'vertical' ? 'up down' : 'left right'}\n className={mx(\n 'max-h-full w-full',\n // TODO(burdon): Should be embeddable inside Toolbar (if horizontal).\n orientation === 'vertical' ? 'overflow-y-auto' : 'flex p-1 gap-1 items-stretch justify-start overflow-x-auto',\n classNames,\n )}\n >\n {children}\n </TabsPrimitive.List>\n );\n}\n\nTabsTablist.displayName = 'Tabs.Tablist';\n\nfunction TabsBackButton({ onClick, classNames, ...props }: ButtonProps) {\n const { setActivePart } = useTabsContext('TabsBackButton');\n const handleClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n setActivePart('list');\n return onClick?.(event);\n },\n [setActivePart, onClick],\n );\n\n return <Button {...props} classNames={['@md:hidden text-start', classNames]} onClick={handleClick} />;\n}\n\nTabsBackButton.displayName = 'Tabs.BackButton';\n\ntype TabsTabGroupHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'h2'>>;\n\nfunction TabsTabGroupHeading({ children, classNames, ...props }: ThemedClassName<TabsTabGroupHeadingProps>) {\n return (\n <h2 {...props} className={mx('my-1 px-2 text-sm text-un-accent', classNames)}>\n {children}\n </h2>\n );\n}\n\nTabsTabGroupHeading.displayName = 'Tabs.TabGroupHeading';\n\ntype TabsTabProps = ButtonProps & Pick<TabsPrimitive.TabsTriggerProps, 'value'>;\n\nfunction TabsTab({ value, classNames, children, onClick, ...props }: TabsTabProps) {\n const { setActivePart, orientation, value: contextValue, attendableId } = useTabsContext('TabsTab');\n const { hasAttention } = useAttention(attendableId);\n\n const handleClick = useCallback(\n // NOTE: This handler is only called if the tab is *already active*.\n (event: MouseEvent<HTMLButtonElement>) => {\n setActivePart('panel');\n onClick?.(event);\n },\n [setActivePart, onClick],\n );\n\n return (\n <TabsPrimitive.Trigger value={value} asChild>\n <Button\n {...props}\n variant={\n orientation === 'horizontal' && contextValue === value ? (hasAttention ? 'primary' : 'default') : 'ghost'\n }\n classNames={[\n orientation === 'vertical' && 'block justify-start text-start w-full',\n orientation === 'vertical' && 'dx-selected',\n classNames,\n ]}\n onClick={handleClick}\n >\n {children}\n </Button>\n </TabsPrimitive.Trigger>\n );\n}\n\nTabsTab.displayName = 'Tabs.Tab';\n\ntype TabsIconTabProps = IconButtonProps & Pick<TabsPrimitive.TabsTriggerProps, 'value'>;\n\nfunction TabsIconTab({ value, classNames, onClick, ...props }: TabsIconTabProps) {\n const { setActivePart, orientation, value: contextValue, attendableId } = useTabsContext('TabsTab');\n const { hasAttention } = useAttention(attendableId);\n\n // NOTE: This handler is only called if the tab is *already active*.\n const handleClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n setActivePart('panel');\n onClick?.(event);\n },\n [setActivePart, onClick],\n );\n\n return (\n <TabsPrimitive.Trigger value={value} asChild>\n <IconButton\n {...props}\n variant={\n orientation === 'horizontal' && contextValue === value ? (hasAttention ? 'primary' : 'default') : 'ghost'\n }\n classNames={[\n orientation === 'vertical' && 'justify-start text-start w-full',\n orientation === 'vertical' && 'dx-selected',\n classNames,\n ]}\n onClick={handleClick}\n />\n </TabsPrimitive.Trigger>\n );\n}\n\nTabsIconTab.displayName = 'Tabs.IconTab';\n\ntype TabsPanelProps = ThemedClassName<TabsPrimitive.TabsContentProps>;\n\nfunction TabsPanel({ classNames, children, ...props }: TabsPanelProps) {\n const { value: contextValue } = useTabsContext('TabsTab');\n return (\n <Activity mode={contextValue === props.value ? 'visible' : 'hidden'}>\n <TabsPrimitive.Content {...props} className={mx('p-0! dx-focus-ring-inset-over-all', classNames)}>\n {children}\n </TabsPrimitive.Content>\n </Activity>\n );\n}\n\nTabsPanel.displayName = 'Tabs.Panel';\n\ntype TabsTabPrimitiveProps = TabsPrimitive.TabsTriggerProps;\n\nexport const Tabs = {\n Root: TabsRoot,\n Tablist: TabsTablist,\n Tab: TabsTab,\n IconTab: TabsIconTab,\n TabPrimitive: TabsPrimitive.Trigger,\n TabGroupHeading: TabsTabGroupHeading,\n Panel: TabsPanel,\n BackButton: TabsBackButton,\n Viewport: TabsViewport,\n};\n\nexport type {\n TabsActivePart,\n TabsRootProps,\n TabsTablistProps,\n TabsTabProps,\n TabsTabPrimitiveProps,\n TabsTabGroupHeadingProps,\n TabsPanelProps,\n TabsViewportProps,\n};\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,yBAAyBC,iBAAiBC,yBAAyB;AAC5E,SAASC,qBAAqB;AAC9B,YAAYC,mBAAmB;AAC/B,SAASC,4BAA4B;AACrC,OAAOC,SACLC,UAGAC,YACAC,aACAC,uBACK;AAEP,SACEC,QAEAC,YAGAC,uBACK;AACP,SAASC,oBAAoB;AAC7B,SAASC,UAAU;AAInB,IAAMC,YAAY;AAQlB,IAAM,CAACC,qBAAqBC,cAAAA,IAAkBf,cAAgCa,WAAW;EACvFG,aAAa;EACbC,YAAY;EACZC,eAAe,MAAA;EAAO;AACxB,CAAA;AAUA,IAAMC,WAAWd,2BACf,CACE,EACEe,UACAC,YACAJ,YAAYK,iBACZC,oBACAC,mBACAC,OAAOC,YACPC,eACAC,cACAZ,cAAc,YACda,iBAAiB,UACjBC,cACA,GAAGC,MAAAA,GAELC,iBAAAA;AAGA,QAAMC,WAAWvB,gBAA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", "createContext", "TabsPrimitive", "useControllableState", "React", "Activity", "forwardRef", "useCallback", "useLayoutEffect", "Button", "IconButton", "useForwardedRef", "useAttention", "mx", "TABS_NAME", "TabsContextProvider", "useTabsContext", "orientation", "activePart", "setActivePart", "TabsRoot", "children", "classNames", "propsActivePart", "onActivePartChange", "defaultActivePart", "value", "propsValue", "onValueChange", "defaultValue", "activationMode", "attendableId", "props", "forwardedRef", "tabsRoot", "_1", "_2", "prop", "onChange", "defaultProp", "setValue", "handleValueChange", "nextValue", "findFirstFocusable", "current", "focus", "Root", "className", "data-active", "ref", "displayName", "TabsViewport", "div", "TabsTablist", "List", "data-arrow-keys", "TabsBackButton", "onClick", "handleClick", "event", "TabsTabGroupHeading", "h2", "TabsTab", "contextValue", "hasAttention", "Trigger", "asChild", "variant", "TabsIconTab", "TabsPanel", "mode", "Content", "Tabs", "Tablist", "Tab", "IconTab", "TabPrimitive", "TabGroupHeading", "Panel", "BackButton", "Viewport"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/Tabs.tsx":{"bytes":
|
|
1
|
+
{"inputs":{"src/Tabs.tsx":{"bytes":26019,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-tabs","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":368,"imports":[{"path":"src/Tabs.tsx","kind":"import-statement","original":"./Tabs"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13922},"dist/lib/browser/index.mjs":{"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-tabs","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-attention","kind":"import-statement","external":true},{"path":"@dxos/ui-theme","kind":"import-statement","external":true}],"exports":["Tabs"],"entryPoint":"src/index.ts","inputs":{"src/Tabs.tsx":{"bytesInOutput":6480},"src/index.ts":{"bytesInOutput":0}},"bytes":6550}}}
|