@dxos/react-ui-tabs 0.8.4-main.69d29f4 → 0.8.4-main.6fa680abb7
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/lib/browser/index.mjs +7 -7
- package/dist/lib/browser/index.mjs.map +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +7 -7
- package/dist/lib/node-esm/index.mjs.map +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/Tabs.stories.tsx +2 -2
- package/src/Tabs.tsx +7 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-tabs",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.6fa680abb7",
|
|
4
4
|
"description": "Components for facilitating a Tabs pattern.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -36,25 +36,25 @@
|
|
|
36
36
|
"@radix-ui/react-slot": "1.1.2",
|
|
37
37
|
"@radix-ui/react-tabs": "1.1.3",
|
|
38
38
|
"@radix-ui/react-use-controllable-state": "1.1.0",
|
|
39
|
-
"@dxos/react-ui-attention": "0.8.4-main.
|
|
40
|
-
"@dxos/util": "0.8.4-main.
|
|
39
|
+
"@dxos/react-ui-attention": "0.8.4-main.6fa680abb7",
|
|
40
|
+
"@dxos/util": "0.8.4-main.6fa680abb7"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/react": "~19.2.7",
|
|
44
44
|
"@types/react-dom": "~19.2.3",
|
|
45
45
|
"react": "~19.2.3",
|
|
46
46
|
"react-dom": "~19.2.3",
|
|
47
|
-
"vite": "7.1.
|
|
48
|
-
"@dxos/random": "0.8.4-main.
|
|
49
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
50
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
51
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
47
|
+
"vite": "^7.1.11",
|
|
48
|
+
"@dxos/random": "0.8.4-main.6fa680abb7",
|
|
49
|
+
"@dxos/react-ui": "0.8.4-main.6fa680abb7",
|
|
50
|
+
"@dxos/storybook-utils": "0.8.4-main.6fa680abb7",
|
|
51
|
+
"@dxos/ui-theme": "0.8.4-main.6fa680abb7"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"react": "~19.2.3",
|
|
55
55
|
"react-dom": "~19.2.3",
|
|
56
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
57
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
56
|
+
"@dxos/react-ui": "0.8.4-main.6fa680abb7",
|
|
57
|
+
"@dxos/ui-theme": "0.8.4-main.6fa680abb7"
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
package/src/Tabs.stories.tsx
CHANGED
|
@@ -36,7 +36,7 @@ export const DefaultStory = () => {
|
|
|
36
36
|
<Icon icon='ph--arrow-left--bold' size={4} />
|
|
37
37
|
<span>Back to tab list</span>
|
|
38
38
|
</NaturalTabs.BackButton>
|
|
39
|
-
<p className='
|
|
39
|
+
<p className='px-1'>{panel}</p>
|
|
40
40
|
</NaturalTabs.Tabpanel>
|
|
41
41
|
);
|
|
42
42
|
})}
|
|
@@ -60,7 +60,7 @@ const meta = {
|
|
|
60
60
|
title: 'ui/react-ui-tabs/Tabs',
|
|
61
61
|
component: NaturalTabs.Root,
|
|
62
62
|
render: DefaultStory,
|
|
63
|
-
decorators: [withTheme],
|
|
63
|
+
decorators: [withTheme()],
|
|
64
64
|
} satisfies Meta<typeof DefaultStory>;
|
|
65
65
|
|
|
66
66
|
export default meta;
|
package/src/Tabs.tsx
CHANGED
|
@@ -147,8 +147,8 @@ const TabsViewport = ({ classNames, children, ...props }: TabsViewportProps) =>
|
|
|
147
147
|
className={mx(
|
|
148
148
|
orientation === 'vertical' &&
|
|
149
149
|
verticalVariant === 'stateful' && [
|
|
150
|
-
'grid
|
|
151
|
-
'@md:
|
|
150
|
+
'grid w-[200%] grid-cols-2 data-[active=panel]:ms-[-100%]',
|
|
151
|
+
'@md:w-auto @md:data-[active=panel]:ms-0 @md:grid-cols-[minmax(min-content,1fr)_3fr] @md:gap-1',
|
|
152
152
|
],
|
|
153
153
|
classNames,
|
|
154
154
|
)}
|
|
@@ -167,7 +167,7 @@ const TabsTablist = ({ children, classNames, ...props }: TabsTablistProps) => {
|
|
|
167
167
|
{...props}
|
|
168
168
|
data-arrow-keys={orientation === 'vertical' ? 'up down' : 'left right'}
|
|
169
169
|
className={mx(
|
|
170
|
-
'max-
|
|
170
|
+
'max-h-full w-full',
|
|
171
171
|
// NOTE: Padding should be common to Toolbar.
|
|
172
172
|
orientation === 'vertical' ? 'overflow-y-auto' : 'flex items-stretch justify-start overflow-x-auto p-1 gap-1',
|
|
173
173
|
orientation === 'vertical' && verticalVariant === 'stateful' && 'place-self-start p-1',
|
|
@@ -189,14 +189,14 @@ const TabsBackButton = ({ onClick, classNames, ...props }: ButtonProps) => {
|
|
|
189
189
|
[onClick, setActivePart],
|
|
190
190
|
);
|
|
191
191
|
|
|
192
|
-
return <Button {...props} classNames={['
|
|
192
|
+
return <Button {...props} classNames={['w-full text-start @md:hidden mb-2', classNames]} onClick={handleClick} />;
|
|
193
193
|
};
|
|
194
194
|
|
|
195
195
|
type TabsTabGroupHeadingProps = ThemedClassName<ComponentPropsWithoutRef<'h2'>>;
|
|
196
196
|
|
|
197
197
|
const TabsTabGroupHeading = ({ children, classNames, ...props }: ThemedClassName<TabsTabGroupHeadingProps>) => {
|
|
198
198
|
return (
|
|
199
|
-
<h2 {...props} className={mx('
|
|
199
|
+
<h2 {...props} className={mx('my-1 px-2 text-sm text-un-accent', classNames)}>
|
|
200
200
|
{children}
|
|
201
201
|
</h2>
|
|
202
202
|
);
|
|
@@ -227,7 +227,7 @@ const TabsTab = ({ value, classNames, children, onClick, ...props }: TabsTabProp
|
|
|
227
227
|
{...props}
|
|
228
228
|
onClick={handleClick}
|
|
229
229
|
classNames={[
|
|
230
|
-
orientation === 'vertical' && 'block justify-start text-start
|
|
230
|
+
orientation === 'vertical' && 'block justify-start text-start w-full',
|
|
231
231
|
orientation === 'vertical' && ghostSelectedContainerMd,
|
|
232
232
|
classNames,
|
|
233
233
|
]}
|
|
@@ -263,7 +263,7 @@ const TabsIconTab = ({ value, classNames, onClick, ...props }: TabsIconTabProps)
|
|
|
263
263
|
{...props}
|
|
264
264
|
onClick={handleClick}
|
|
265
265
|
classNames={[
|
|
266
|
-
orientation === 'vertical' && 'justify-start text-start
|
|
266
|
+
orientation === 'vertical' && 'justify-start text-start w-full',
|
|
267
267
|
orientation === 'vertical' && ghostSelectedContainerMd,
|
|
268
268
|
classNames,
|
|
269
269
|
]}
|