@noxlovette/material 0.3.2 → 0.4.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/README.md +1 -0
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.js +1 -0
- package/dist/actions/rovingFocusGroup.d.ts +20 -0
- package/dist/actions/rovingFocusGroup.js +82 -0
- package/dist/components/badge/theme.d.ts +8 -8
- package/dist/components/buttons/button-group/ButtonGroup.stories.svelte +83 -0
- package/dist/components/buttons/button-group/ButtonGroup.stories.svelte.d.ts +19 -0
- package/dist/components/buttons/button-group/ButtonGroup.svelte +10 -29
- package/dist/components/buttons/button-group/ButtonGroup.svelte.d.ts +7 -3
- package/dist/components/buttons/button-group/index.d.ts +0 -1
- package/dist/components/buttons/button-group/index.js +3 -1
- package/dist/components/buttons/button-group/theme.d.ts +17 -103
- package/dist/components/buttons/button-group/theme.js +7 -35
- package/dist/components/buttons/button-group/types.d.ts +9 -20
- package/dist/components/buttons/connected/ConnectedButtonGroup.stories.svelte +118 -0
- package/dist/components/buttons/connected/ConnectedButtonGroup.stories.svelte.d.ts +19 -0
- package/dist/components/buttons/connected/ConnectedButtonGroup.svelte +52 -0
- package/dist/components/buttons/connected/ConnectedButtonGroup.svelte.d.ts +12 -0
- package/dist/components/buttons/connected/ConnectedButtonGroupItem.svelte +37 -0
- package/dist/components/buttons/connected/ConnectedButtonGroupItem.svelte.d.ts +9 -0
- package/dist/components/buttons/connected/index.d.ts +3 -1
- package/dist/components/buttons/connected/index.js +3 -1
- package/dist/components/buttons/connected/theme.d.ts +125 -0
- package/dist/components/buttons/connected/theme.js +38 -0
- package/dist/components/buttons/connected/types.d.ts +32 -13
- package/dist/components/buttons/index.d.ts +1 -0
- package/dist/components/buttons/index.js +1 -0
- package/dist/components/buttons/split-button/SplitButton.stories.svelte +103 -0
- package/dist/components/buttons/split-button/SplitButton.stories.svelte.d.ts +19 -0
- package/dist/components/buttons/split-button/SplitButton.svelte +104 -0
- package/dist/components/buttons/split-button/SplitButton.svelte.d.ts +19 -0
- package/dist/components/buttons/split-button/index.d.ts +3 -0
- package/dist/components/{containers/panes → buttons/split-button}/index.js +1 -3
- package/dist/components/buttons/split-button/theme.d.ts +35 -0
- package/dist/components/buttons/split-button/theme.js +26 -0
- package/dist/components/buttons/split-button/types.d.ts +33 -0
- package/dist/components/buttons/theme.d.ts +142 -142
- package/dist/components/buttons/theme.js +2 -2
- package/dist/components/cards/Card.stories.svelte +58 -0
- package/dist/components/cards/Card.stories.svelte.d.ts +2 -17
- package/dist/components/cards/Card.svelte +76 -8
- package/dist/components/cards/theme.d.ts +26 -14
- package/dist/components/cards/theme.js +5 -1
- package/dist/components/cards/types.d.ts +39 -1
- package/dist/components/chips/Chip.stories.svelte +64 -0
- package/dist/components/chips/Chip.stories.svelte.d.ts +19 -0
- package/dist/components/chips/Chip.svelte +115 -0
- package/dist/components/chips/Chip.svelte.d.ts +14 -0
- package/dist/components/chips/index.d.ts +3 -0
- package/dist/components/chips/index.js +6 -0
- package/dist/components/chips/theme.d.ts +78 -0
- package/dist/components/chips/theme.js +72 -0
- package/dist/components/chips/types.d.ts +43 -0
- package/dist/components/containers/action-rail/ActionRail.stories.svelte +36 -0
- package/dist/components/containers/{panes/SinglePane.stories.svelte.d.ts → action-rail/ActionRail.stories.svelte.d.ts} +4 -4
- package/dist/components/containers/action-rail/ActionRail.svelte +35 -0
- package/dist/components/containers/action-rail/ActionRail.svelte.d.ts +17 -0
- package/dist/components/containers/action-rail/index.d.ts +3 -0
- package/dist/components/containers/action-rail/index.js +6 -0
- package/dist/components/containers/action-rail/theme.d.ts +45 -0
- package/dist/components/containers/action-rail/theme.js +26 -0
- package/dist/components/containers/action-rail/types.d.ts +20 -0
- package/dist/components/containers/action-rail/types.js +1 -0
- package/dist/components/containers/app/App.svelte +6 -6
- package/dist/components/containers/app/App.svelte.d.ts +4 -2
- package/dist/components/containers/app/theme.d.ts +1 -1
- package/dist/components/containers/app/types.d.ts +9 -4
- package/dist/components/containers/bottom-sheet/BottomSheet.stories.svelte +1 -1
- package/dist/components/containers/bottom-sheet/BottomSheet.svelte +1 -1
- package/dist/components/containers/context-menu/ContextMenu.stories.svelte +44 -0
- package/dist/components/containers/context-menu/ContextMenu.svelte +21 -5
- package/dist/components/containers/context-menu/ContextMenu.svelte.d.ts +11 -0
- package/dist/components/containers/context-menu/theme.d.ts +20 -2
- package/dist/components/containers/context-menu/theme.js +31 -8
- package/dist/components/containers/context-menu/types.d.ts +14 -2
- package/dist/components/containers/dialogue/theme.d.ts +20 -20
- package/dist/components/containers/divider/theme.d.ts +17 -17
- package/dist/components/containers/index.d.ts +2 -3
- package/dist/components/containers/index.js +2 -3
- package/dist/components/containers/link-preview/theme.d.ts +11 -11
- package/dist/components/containers/list/ListItem.stories.svelte +100 -0
- package/dist/components/containers/list/ListItem.stories.svelte.d.ts +19 -0
- package/dist/components/containers/list/theme.d.ts +14 -14
- package/dist/components/containers/list/theme.js +3 -3
- package/dist/components/containers/menu/Menu.stories.svelte +105 -3
- package/dist/components/containers/menu/Menu.stories.svelte.d.ts +2 -17
- package/dist/components/containers/menu/Menu.svelte +9 -7
- package/dist/components/containers/menu/MenuCheckboxItem.svelte +55 -0
- package/dist/components/containers/menu/MenuCheckboxItem.svelte.d.ts +25 -0
- package/dist/components/containers/menu/MenuGroup.svelte +43 -0
- package/dist/components/containers/menu/MenuGroup.svelte.d.ts +28 -0
- package/dist/components/containers/menu/MenuRadioGroup.svelte +39 -0
- package/dist/components/containers/menu/MenuRadioGroup.svelte.d.ts +27 -0
- package/dist/components/containers/menu/MenuRadioItem.svelte +49 -0
- package/dist/components/containers/menu/MenuRadioItem.svelte.d.ts +17 -0
- package/dist/components/containers/menu/MenuSub.svelte +91 -0
- package/dist/components/containers/menu/MenuSub.svelte.d.ts +29 -0
- package/dist/components/containers/menu/index.d.ts +7 -0
- package/dist/components/containers/menu/index.js +8 -0
- package/dist/components/containers/menu/menu-item/MenuItem.svelte +71 -0
- package/dist/components/containers/{menu-item → menu/menu-item}/MenuItem.svelte.d.ts +2 -1
- package/dist/components/containers/{menu-item → menu/menu-item}/types.d.ts +5 -1
- package/dist/components/containers/menu/menu-item/types.js +1 -0
- package/dist/components/containers/menu/theme.d.ts +68 -0
- package/dist/components/containers/menu/theme.js +36 -0
- package/dist/components/containers/menu/types.d.ts +113 -2
- package/dist/components/containers/pane/DraggablePane.stories.svelte +199 -0
- package/dist/components/containers/pane/DraggablePane.stories.svelte.d.ts +4 -0
- package/dist/components/containers/pane/DraggablePane.svelte +533 -0
- package/dist/components/containers/pane/DraggablePane.svelte.d.ts +29 -0
- package/dist/components/containers/pane/Pane.stories.svelte +104 -0
- package/dist/components/containers/pane/Pane.stories.svelte.d.ts +19 -0
- package/dist/components/containers/pane/Pane.svelte +78 -0
- package/dist/components/containers/pane/Pane.svelte.d.ts +18 -0
- package/dist/components/containers/pane/PaneGrid.stories.svelte +134 -0
- package/dist/components/containers/pane/PaneGrid.stories.svelte.d.ts +19 -0
- package/dist/components/containers/pane/PaneGrid.svelte +43 -0
- package/dist/components/containers/pane/PaneGrid.svelte.d.ts +13 -0
- package/dist/components/containers/pane/PaneHandle.svelte +90 -0
- package/dist/components/containers/pane/PaneHandle.svelte.d.ts +12 -0
- package/dist/components/containers/pane/dragStore.svelte.d.ts +16 -0
- package/dist/components/containers/pane/dragStore.svelte.js +38 -0
- package/dist/components/containers/pane/index.d.ts +8 -0
- package/dist/components/containers/pane/index.js +11 -0
- package/dist/components/containers/pane/resizeStore.svelte.d.ts +10 -0
- package/dist/components/containers/pane/resizeStore.svelte.js +30 -0
- package/dist/components/containers/pane/theme.d.ts +571 -0
- package/dist/components/containers/pane/theme.js +211 -0
- package/dist/components/containers/pane/types.d.ts +249 -0
- package/dist/components/containers/pane/types.js +1 -0
- package/dist/components/containers/popover/Popover.stories.svelte +4 -4
- package/dist/components/containers/popover/Popover.svelte +3 -1
- package/dist/components/containers/popover/theme.d.ts +20 -20
- package/dist/components/containers/popover/types.d.ts +6 -2
- package/dist/components/containers/scroll-area/theme.d.ts +2 -2
- package/dist/components/containers/side-sheet/SideSheet.stories.svelte +16 -24
- package/dist/components/containers/side-sheet/SideSheet.svelte +73 -7
- package/dist/components/containers/side-sheet/SideSheet.svelte.d.ts +5 -0
- package/dist/components/containers/stack/theme.d.ts +44 -44
- package/dist/components/date/DateField.stories.svelte +57 -0
- package/dist/components/{containers/panes/SplitPane.stories.svelte.d.ts → date/DateField.stories.svelte.d.ts} +4 -4
- package/dist/components/date/DateField.svelte +11 -2
- package/dist/components/date/DateRangeField.stories.svelte +53 -0
- package/dist/components/{containers/panes/SupportingPane.stories.svelte.d.ts → date/DateRangeField.stories.svelte.d.ts} +4 -4
- package/dist/components/date/DateRangeField.svelte +2 -1
- package/dist/components/date/theme.d.ts +73 -4
- package/dist/components/date/theme.js +95 -26
- package/dist/components/date/types.d.ts +5 -0
- package/dist/components/forms/checkbox/Checkbox.svelte +7 -9
- package/dist/components/forms/checkbox/theme.d.ts +8 -8
- package/dist/components/forms/checkbox/theme.js +31 -9
- package/dist/components/forms/command/Command.stories.svelte +86 -0
- package/dist/components/forms/command/Command.stories.svelte.d.ts +19 -0
- package/dist/components/forms/command/theme.d.ts +35 -35
- package/dist/components/forms/command/theme.js +4 -4
- package/dist/components/forms/pin/theme.d.ts +2 -2
- package/dist/components/forms/radio-group/theme.d.ts +2 -2
- package/dist/components/forms/search/theme.d.ts +8 -8
- package/dist/components/forms/select/Select.svelte +3 -2
- package/dist/components/forms/select/theme.d.ts +26 -2
- package/dist/components/forms/select/theme.js +56 -22
- package/dist/components/forms/slider/theme.d.ts +20 -20
- package/dist/components/forms/switch/theme.d.ts +2 -2
- package/dist/components/forms/textfield/Textfield.stories.svelte +22 -0
- package/dist/components/forms/textfield/Textfield.svelte +10 -1
- package/dist/components/forms/textfield/theme.d.ts +44 -2
- package/dist/components/forms/textfield/theme.js +56 -16
- package/dist/components/forms/toggle-group/ToggleGroup.svelte +2 -2
- package/dist/components/forms/toggle-group/ToggleGroup.svelte.d.ts +2 -2
- package/dist/components/forms/toggle-group/ToggleGroupItem.svelte +1 -1
- package/dist/components/forms/toggle-group/ToggleGroupItem.svelte.d.ts +1 -1
- package/dist/components/forms/toggle-group/theme.d.ts +16 -16
- package/dist/components/forms/toggle-group/types.d.ts +2 -2
- package/dist/components/forms/tooltip/Tooltip.stories.svelte +90 -0
- package/dist/components/forms/tooltip/Tooltip.stories.svelte.d.ts +19 -0
- package/dist/components/forms/tooltip/Tooltip.svelte +5 -4
- package/dist/components/forms/tooltip/theme.d.ts +5 -2
- package/dist/components/forms/tooltip/theme.js +6 -5
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/misc/Avatar.stories.svelte +63 -0
- package/dist/components/misc/Avatar.stories.svelte.d.ts +19 -0
- package/dist/components/misc/Avatar.svelte +35 -10
- package/dist/components/misc/DicebearAvatarBuilder.d.ts +59 -0
- package/dist/components/misc/DicebearAvatarBuilder.js +115 -0
- package/dist/components/misc/ThemeSettings.svelte +1 -1
- package/dist/components/misc/ThemeSwitcher.svelte +2 -2
- package/dist/components/misc/dicebearStyles.d.ts +21 -0
- package/dist/components/misc/dicebearStyles.js +169 -0
- package/dist/components/misc/index.d.ts +3 -0
- package/dist/components/misc/index.js +3 -0
- package/dist/components/misc/materialAvatarPalette.d.ts +6 -0
- package/dist/components/misc/materialAvatarPalette.js +44 -0
- package/dist/components/misc/theme.d.ts +20 -2
- package/dist/components/misc/theme.js +9 -3
- package/dist/components/misc/types.d.ts +20 -2
- package/dist/components/nav/appbar/AppBar.stories.svelte +1 -1
- package/dist/components/nav/appbar/AppBar.svelte +46 -15
- package/dist/components/nav/appbar/AppBar.svelte.d.ts +5 -0
- package/dist/components/nav/appbar/theme.d.ts +20 -14
- package/dist/components/nav/appbar/theme.js +11 -7
- package/dist/components/nav/appbar/types.d.ts +3 -1
- package/dist/components/nav/breadcrumb/Breadcrumb.stories.svelte +50 -0
- package/dist/components/nav/breadcrumb/Breadcrumb.stories.svelte.d.ts +19 -0
- package/dist/components/nav/breadcrumb/Breadcrumb.svelte +46 -0
- package/dist/components/nav/breadcrumb/Breadcrumb.svelte.d.ts +13 -0
- package/dist/components/nav/breadcrumb/index.d.ts +3 -0
- package/dist/components/nav/breadcrumb/index.js +6 -0
- package/dist/components/nav/breadcrumb/theme.d.ts +84 -0
- package/dist/components/nav/breadcrumb/theme.js +35 -0
- package/dist/components/nav/breadcrumb/types.d.ts +14 -0
- package/dist/components/nav/breadcrumb/types.js +1 -0
- package/dist/components/nav/index.d.ts +1 -0
- package/dist/components/nav/index.js +1 -0
- package/dist/components/nav/navbar/theme.d.ts +19 -19
- package/dist/components/nav/rail/Rail.stories.svelte +1 -5
- package/dist/components/nav/rail/Rail.svelte +3 -25
- package/dist/components/nav/rail/theme.d.ts +4 -4
- package/dist/components/nav/rail/types.d.ts +0 -5
- package/dist/components/nav/tabs/TabHolder.svelte +2 -1
- package/dist/components/nav/tabs/theme.d.ts +21 -21
- package/dist/components/nav/tabs/theme.js +6 -0
- package/dist/components/nav/tabs/types.d.ts +2 -2
- package/dist/components/pill/theme.d.ts +35 -35
- package/dist/components/snackbar/theme.d.ts +8 -8
- package/dist/components/table/Table.stories.svelte +267 -0
- package/dist/components/table/Table.stories.svelte.d.ts +19 -0
- package/dist/components/table/Table.svelte +1 -1
- package/dist/components/table/TableBody.svelte +16 -3
- package/dist/components/table/TableBody.svelte.d.ts +5 -1
- package/dist/components/table/TableRow.svelte +1 -1
- package/dist/components/table/theme.d.ts +2 -2
- package/dist/components/table/theme.js +2 -2
- package/dist/components/table/types.d.ts +7 -0
- package/dist/components/time/theme.d.ts +29 -29
- package/dist/components/time/theme.js +2 -2
- package/dist/components/toolbar/Toolbar.stories.svelte +71 -0
- package/dist/components/toolbar/Toolbar.stories.svelte.d.ts +19 -0
- package/dist/components/toolbar/Toolbar.svelte +19 -3
- package/dist/components/toolbar/Toolbar.svelte.d.ts +8 -2
- package/dist/components/toolbar/ToolbarButton.svelte +28 -4
- package/dist/components/toolbar/ToolbarDivider.svelte +4 -3
- package/dist/components/toolbar/ToolbarGroup.svelte +7 -2
- package/dist/components/toolbar/ToolbarGroupItem.svelte +29 -4
- package/dist/components/toolbar/ToolbarSection.svelte +35 -0
- package/dist/components/toolbar/ToolbarSection.svelte.d.ts +9 -0
- package/dist/components/toolbar/ToolbarSpacer.svelte +18 -0
- package/dist/components/toolbar/ToolbarSpacer.svelte.d.ts +9 -0
- package/dist/components/toolbar/index.d.ts +2 -0
- package/dist/components/toolbar/index.js +2 -0
- package/dist/components/toolbar/theme.d.ts +36 -21
- package/dist/components/toolbar/theme.js +27 -11
- package/dist/components/toolbar/types.d.ts +37 -4
- package/dist/components/typography/body/theme.d.ts +14 -14
- package/dist/components/typography/display/theme.d.ts +14 -14
- package/dist/components/typography/headline/theme.d.ts +14 -14
- package/dist/components/typography/kbd/Kbd.stories.svelte +41 -0
- package/dist/components/typography/kbd/Kbd.stories.svelte.d.ts +19 -0
- package/dist/components/typography/kbd/theme.d.ts +9 -9
- package/dist/components/typography/kbd/theme.js +2 -2
- package/dist/components/typography/label/theme.d.ts +14 -14
- package/dist/components/typography/title/theme.d.ts +14 -14
- package/dist/styles/component.css +126 -4
- package/dist/styles/motion.css +6 -3
- package/dist/utils/Layer.svelte +7 -3
- package/dist/utils/Theme.svelte +20 -20
- package/dist/utils/ThemeScript.svelte +1 -1
- package/dist/utils/icon/theme.d.ts +14 -14
- package/package.json +38 -37
- package/bin/install-skill.js +0 -29
- package/dist/components/buttons/button-group/ButtonGroupItem.svelte +0 -41
- package/dist/components/buttons/button-group/ButtonGroupItem.svelte.d.ts +0 -8
- package/dist/components/buttons/connected/ConnectedButtons.svelte +0 -14
- package/dist/components/buttons/connected/ConnectedButtons.svelte.d.ts +0 -8
- package/dist/components/containers/menu-item/MenuItem.svelte +0 -74
- package/dist/components/containers/merger/InputMerger.svelte +0 -29
- package/dist/components/containers/merger/InputMerger.svelte.d.ts +0 -14
- package/dist/components/containers/merger/index.d.ts +0 -1
- package/dist/components/containers/merger/index.js +0 -3
- package/dist/components/containers/panes/SinglePane.stories.svelte +0 -67
- package/dist/components/containers/panes/SinglePane.svelte +0 -32
- package/dist/components/containers/panes/SinglePane.svelte.d.ts +0 -5
- package/dist/components/containers/panes/SplitPane.stories.svelte +0 -124
- package/dist/components/containers/panes/SplitPane.svelte +0 -144
- package/dist/components/containers/panes/SplitPane.svelte.d.ts +0 -8
- package/dist/components/containers/panes/SupportingPane.stories.svelte +0 -113
- package/dist/components/containers/panes/SupportingPane.svelte +0 -175
- package/dist/components/containers/panes/SupportingPane.svelte.d.ts +0 -9
- package/dist/components/containers/panes/index.d.ts +0 -5
- package/dist/components/containers/panes/theme.d.ts +0 -490
- package/dist/components/containers/panes/theme.js +0 -185
- package/dist/components/containers/panes/types.d.ts +0 -108
- package/dist/components/nav/rail/RailNavContext.svelte +0 -14
- package/dist/components/nav/rail/RailNavContext.svelte.d.ts +0 -8
- /package/dist/components/{containers/menu-item → buttons/split-button}/types.js +0 -0
- /package/dist/components/{containers/panes → chips}/types.js +0 -0
- /package/dist/components/containers/{menu-item → menu/menu-item}/index.d.ts +0 -0
- /package/dist/components/containers/{menu-item → menu/menu-item}/index.js +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Breadcrumb from './Breadcrumb.svelte';
|
|
4
|
+
import AppBar from '../appbar/AppBar.svelte';
|
|
5
|
+
|
|
6
|
+
const { Story } = defineMeta({
|
|
7
|
+
title: 'Navigation/Breadcrumb',
|
|
8
|
+
component: Breadcrumb,
|
|
9
|
+
argTypes: {
|
|
10
|
+
color: { control: 'select', options: ['primary', 'secondary', 'tertiary', 'surface'] }
|
|
11
|
+
},
|
|
12
|
+
args: {
|
|
13
|
+
color: 'primary',
|
|
14
|
+
items: [
|
|
15
|
+
{ label: 'Docs', href: '/docs' },
|
|
16
|
+
{ label: 'Navigation', href: '/docs' },
|
|
17
|
+
{ label: 'App Bar' }
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<Story name="Playground">
|
|
24
|
+
{#snippet template(args)}
|
|
25
|
+
<Breadcrumb {...args} />
|
|
26
|
+
{/snippet}
|
|
27
|
+
</Story>
|
|
28
|
+
|
|
29
|
+
<Story name="Deep Trail" asChild>
|
|
30
|
+
<Breadcrumb
|
|
31
|
+
items={[
|
|
32
|
+
{ label: 'Home', href: '#' },
|
|
33
|
+
{ label: 'Library', href: '#' },
|
|
34
|
+
{ label: 'Data', href: '#' },
|
|
35
|
+
{ label: 'Sample Files' }
|
|
36
|
+
]}
|
|
37
|
+
/>
|
|
38
|
+
</Story>
|
|
39
|
+
|
|
40
|
+
<Story name="In App Bar" asChild>
|
|
41
|
+
<AppBar title="Sample Files" ghost={false}>
|
|
42
|
+
<Breadcrumb
|
|
43
|
+
items={[
|
|
44
|
+
{ label: 'Home', href: '#' },
|
|
45
|
+
{ label: 'Library', href: '#' },
|
|
46
|
+
{ label: 'Sample Files' }
|
|
47
|
+
]}
|
|
48
|
+
/>
|
|
49
|
+
</AppBar>
|
|
50
|
+
</Story>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Breadcrumb from './Breadcrumb.svelte';
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const Breadcrumb: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
16
|
+
[evt: string]: CustomEvent<any>;
|
|
17
|
+
}, {}, {}, string>;
|
|
18
|
+
type Breadcrumb = InstanceType<typeof Breadcrumb>;
|
|
19
|
+
export default Breadcrumb;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
Breadcrumb trail: `label-large` text links separated by chevron icons, wayfinding for
|
|
4
|
+
where the current screen sits in a hierarchy. Designed to sit inside `AppBar`, via its
|
|
5
|
+
`children` snippet, below the title row.
|
|
6
|
+
|
|
7
|
+
M3 doesn't define a breadcrumb pattern, so this follows the repo's own typescale/color-role
|
|
8
|
+
conventions instead of a spec page. The last item is always rendered as static text with
|
|
9
|
+
`aria-current="page"`, regardless of whether it has an `href`.
|
|
10
|
+
-->
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { Icon, Layer } from '../../../utils/index.js';
|
|
13
|
+
import clsx from 'clsx';
|
|
14
|
+
import { breadcrumb } from './theme.js';
|
|
15
|
+
import type { BreadcrumbProps } from './types.js';
|
|
16
|
+
|
|
17
|
+
let { items, color = 'primary', class: className, ...rest }: BreadcrumbProps = $props();
|
|
18
|
+
|
|
19
|
+
const { base, list, item, link, text, current, separator } = $derived(breadcrumb({ color }));
|
|
20
|
+
const navCls = $derived(base({ class: clsx(className) }));
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<nav aria-label="Breadcrumb" {...rest} class={navCls}>
|
|
24
|
+
<ol class={list()}>
|
|
25
|
+
{#each items as crumb, i (crumb.label + i)}
|
|
26
|
+
{@const isLast = i === items.length - 1}
|
|
27
|
+
<li class={item()}>
|
|
28
|
+
{#if isLast}
|
|
29
|
+
<span class={current()} aria-current="page">{crumb.label}</span>
|
|
30
|
+
{:else if crumb.href}
|
|
31
|
+
<a href={crumb.href} class={link()}>
|
|
32
|
+
<Layer />
|
|
33
|
+
{crumb.label}
|
|
34
|
+
</a>
|
|
35
|
+
{:else}
|
|
36
|
+
<span class={text()}>{crumb.label}</span>
|
|
37
|
+
{/if}
|
|
38
|
+
{#if !isLast}
|
|
39
|
+
<span class={separator()} aria-hidden="true">
|
|
40
|
+
<Icon name="chevron_right" size="sm" />
|
|
41
|
+
</span>
|
|
42
|
+
{/if}
|
|
43
|
+
</li>
|
|
44
|
+
{/each}
|
|
45
|
+
</ol>
|
|
46
|
+
</nav>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BreadcrumbProps } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Breadcrumb trail: `label-large` text links separated by chevron icons, wayfinding for
|
|
4
|
+
* where the current screen sits in a hierarchy. Designed to sit inside `AppBar`, via its
|
|
5
|
+
* `children` snippet, below the title row.
|
|
6
|
+
*
|
|
7
|
+
* M3 doesn't define a breadcrumb pattern, so this follows the repo's own typescale/color-role
|
|
8
|
+
* conventions instead of a spec page. The last item is always rendered as static text with
|
|
9
|
+
* `aria-current="page"`, regardless of whether it has an `href`.
|
|
10
|
+
*/
|
|
11
|
+
declare const Breadcrumb: import("svelte").Component<BreadcrumbProps, {}, "">;
|
|
12
|
+
type Breadcrumb = ReturnType<typeof Breadcrumb>;
|
|
13
|
+
export default Breadcrumb;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// THIS FILE IS AUTO-GENERATED BY scripts/generate-components-index.ts - DO NOT EDIT MANUALLY
|
|
2
|
+
// re-export TS/JS modules from this folder
|
|
3
|
+
export * from './theme.js';
|
|
4
|
+
export * from './types.js';
|
|
5
|
+
// default exports for components in this folder
|
|
6
|
+
export { default as Breadcrumb } from './Breadcrumb.svelte';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
export type BreadcrumbVariants = VariantProps<typeof breadcrumb>;
|
|
3
|
+
export declare const breadcrumb: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
color: {
|
|
5
|
+
primary: {
|
|
6
|
+
current: string;
|
|
7
|
+
link: string;
|
|
8
|
+
};
|
|
9
|
+
secondary: {
|
|
10
|
+
current: string;
|
|
11
|
+
link: string;
|
|
12
|
+
};
|
|
13
|
+
tertiary: {
|
|
14
|
+
current: string;
|
|
15
|
+
link: string;
|
|
16
|
+
};
|
|
17
|
+
surface: {
|
|
18
|
+
current: string;
|
|
19
|
+
link: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
base: string;
|
|
24
|
+
list: string;
|
|
25
|
+
item: string;
|
|
26
|
+
link: string;
|
|
27
|
+
text: string;
|
|
28
|
+
current: string;
|
|
29
|
+
separator: string;
|
|
30
|
+
}, undefined, {
|
|
31
|
+
color: {
|
|
32
|
+
primary: {
|
|
33
|
+
current: string;
|
|
34
|
+
link: string;
|
|
35
|
+
};
|
|
36
|
+
secondary: {
|
|
37
|
+
current: string;
|
|
38
|
+
link: string;
|
|
39
|
+
};
|
|
40
|
+
tertiary: {
|
|
41
|
+
current: string;
|
|
42
|
+
link: string;
|
|
43
|
+
};
|
|
44
|
+
surface: {
|
|
45
|
+
current: string;
|
|
46
|
+
link: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
}, {
|
|
50
|
+
base: string;
|
|
51
|
+
list: string;
|
|
52
|
+
item: string;
|
|
53
|
+
link: string;
|
|
54
|
+
text: string;
|
|
55
|
+
current: string;
|
|
56
|
+
separator: string;
|
|
57
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
58
|
+
color: {
|
|
59
|
+
primary: {
|
|
60
|
+
current: string;
|
|
61
|
+
link: string;
|
|
62
|
+
};
|
|
63
|
+
secondary: {
|
|
64
|
+
current: string;
|
|
65
|
+
link: string;
|
|
66
|
+
};
|
|
67
|
+
tertiary: {
|
|
68
|
+
current: string;
|
|
69
|
+
link: string;
|
|
70
|
+
};
|
|
71
|
+
surface: {
|
|
72
|
+
current: string;
|
|
73
|
+
link: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
}, {
|
|
77
|
+
base: string;
|
|
78
|
+
list: string;
|
|
79
|
+
item: string;
|
|
80
|
+
link: string;
|
|
81
|
+
text: string;
|
|
82
|
+
current: string;
|
|
83
|
+
separator: string;
|
|
84
|
+
}>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
export const breadcrumb = tv({
|
|
3
|
+
slots: {
|
|
4
|
+
base: 'flex',
|
|
5
|
+
list: 'flex flex-wrap items-center gap-1',
|
|
6
|
+
item: 'flex items-center gap-1',
|
|
7
|
+
link: 'md-sys-typescale-label-large text-md-sys-color-on-surface-variant md-sys-state-focus-indicator relative inline-flex min-h-12 items-center rounded-full px-3 transition-colors',
|
|
8
|
+
text: 'md-sys-typescale-label-large text-md-sys-color-on-surface-variant px-1 py-0.5',
|
|
9
|
+
current: 'md-sys-typescale-label-large font-bold px-1 py-0.5',
|
|
10
|
+
separator: 'text-md-sys-color-on-surface-variant inline-flex shrink-0'
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
color: {
|
|
14
|
+
primary: {
|
|
15
|
+
current: 'text-md-sys-color-primary',
|
|
16
|
+
link: 'hover:text-md-sys-color-primary'
|
|
17
|
+
},
|
|
18
|
+
secondary: {
|
|
19
|
+
current: 'text-md-sys-color-secondary',
|
|
20
|
+
link: 'hover:text-md-sys-color-secondary'
|
|
21
|
+
},
|
|
22
|
+
tertiary: {
|
|
23
|
+
current: 'text-md-sys-color-tertiary',
|
|
24
|
+
link: 'hover:text-md-sys-color-tertiary'
|
|
25
|
+
},
|
|
26
|
+
surface: {
|
|
27
|
+
current: 'text-md-sys-color-on-surface',
|
|
28
|
+
link: 'hover:text-md-sys-color-on-surface'
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
color: 'primary'
|
|
34
|
+
}
|
|
35
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
import type { BreadcrumbVariants } from './theme.js';
|
|
3
|
+
export type BreadcrumbItem = {
|
|
4
|
+
/** Text shown for this crumb. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Destination URL. Omit for a non-navigable crumb (e.g. the current page — the last item is always rendered as static text regardless of href). */
|
|
7
|
+
href?: string;
|
|
8
|
+
};
|
|
9
|
+
export type BreadcrumbProps = HTMLAttributes<HTMLElementTagNameMap['nav']> & {
|
|
10
|
+
/** Ordered from root to current page. */
|
|
11
|
+
items: BreadcrumbItem[];
|
|
12
|
+
/** Text color of the current (last) crumb, and the hover color of the links before it. Defaults to 'primary'. */
|
|
13
|
+
color?: BreadcrumbVariants['color'];
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// THIS FILE IS AUTO-GENERATED BY scripts/generate-components-index.ts - DO NOT EDIT MANUALLY
|
|
2
2
|
// folder re-exports (export everything from these folders)
|
|
3
3
|
export * from './appbar/index.js';
|
|
4
|
+
export * from './breadcrumb/index.js';
|
|
4
5
|
export * from './navbar/index.js';
|
|
5
6
|
export * from './rail/index.js';
|
|
6
7
|
export * from './tabs/index.js';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export declare const navbar: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
[key: string]: {
|
|
3
|
-
[key: string]: import("tailwind-
|
|
4
|
-
base?: import("tailwind-
|
|
5
|
-
items?: import("tailwind-
|
|
6
|
-
ghost?: import("tailwind-
|
|
7
|
-
fab?: import("tailwind-
|
|
3
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
4
|
+
base?: import("tailwind-variants").ClassValue;
|
|
5
|
+
items?: import("tailwind-variants").ClassValue;
|
|
6
|
+
ghost?: import("tailwind-variants").ClassValue;
|
|
7
|
+
fab?: import("tailwind-variants").ClassValue;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
} | {
|
|
11
11
|
[x: string]: {
|
|
12
|
-
[x: string]: import("tailwind-
|
|
13
|
-
base?: import("tailwind-
|
|
14
|
-
items?: import("tailwind-
|
|
15
|
-
ghost?: import("tailwind-
|
|
16
|
-
fab?: import("tailwind-
|
|
12
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
13
|
+
base?: import("tailwind-variants").ClassValue;
|
|
14
|
+
items?: import("tailwind-variants").ClassValue;
|
|
15
|
+
ghost?: import("tailwind-variants").ClassValue;
|
|
16
|
+
fab?: import("tailwind-variants").ClassValue;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
} | {}, {
|
|
@@ -23,11 +23,11 @@ export declare const navbar: import("tailwind-variants").TVReturnType<{
|
|
|
23
23
|
ghost: string;
|
|
24
24
|
}, undefined, {
|
|
25
25
|
[key: string]: {
|
|
26
|
-
[key: string]: import("tailwind-
|
|
27
|
-
base?: import("tailwind-
|
|
28
|
-
items?: import("tailwind-
|
|
29
|
-
ghost?: import("tailwind-
|
|
30
|
-
fab?: import("tailwind-
|
|
26
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
27
|
+
base?: import("tailwind-variants").ClassValue;
|
|
28
|
+
items?: import("tailwind-variants").ClassValue;
|
|
29
|
+
ghost?: import("tailwind-variants").ClassValue;
|
|
30
|
+
fab?: import("tailwind-variants").ClassValue;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
} | {}, {
|
|
@@ -35,12 +35,12 @@ export declare const navbar: import("tailwind-variants").TVReturnType<{
|
|
|
35
35
|
items: string;
|
|
36
36
|
fab: string;
|
|
37
37
|
ghost: string;
|
|
38
|
-
}, import("tailwind-variants").
|
|
38
|
+
}, import("tailwind-variants").TVReturnTypeLike<unknown, {
|
|
39
39
|
base: string;
|
|
40
40
|
items: string;
|
|
41
41
|
fab: string;
|
|
42
42
|
ghost: string;
|
|
43
|
-
}
|
|
43
|
+
}>>;
|
|
44
44
|
export declare const navitem: import("tailwind-variants").TVReturnType<{
|
|
45
45
|
active: {
|
|
46
46
|
true: {
|
|
@@ -79,7 +79,7 @@ export declare const navitem: import("tailwind-variants").TVReturnType<{
|
|
|
79
79
|
iconContainer: string;
|
|
80
80
|
icon: string;
|
|
81
81
|
label: string;
|
|
82
|
-
}, import("tailwind-variants").
|
|
82
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
83
83
|
active: {
|
|
84
84
|
true: {
|
|
85
85
|
content: string;
|
|
@@ -98,4 +98,4 @@ export declare const navitem: import("tailwind-variants").TVReturnType<{
|
|
|
98
98
|
iconContainer: string;
|
|
99
99
|
icon: string;
|
|
100
100
|
label: string;
|
|
101
|
-
}
|
|
101
|
+
}>>;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import Rail from './Rail.svelte';
|
|
4
4
|
import RailItem from './RailItem.svelte';
|
|
5
5
|
import FAB from '../../buttons/FAB.svelte';
|
|
6
|
-
import Avatar from '../../misc/Avatar.svelte';
|
|
7
6
|
|
|
8
7
|
const { Story } = defineMeta({
|
|
9
8
|
title: 'Navigation/Rail',
|
|
@@ -48,7 +47,7 @@
|
|
|
48
47
|
{/snippet}
|
|
49
48
|
</Story>
|
|
50
49
|
|
|
51
|
-
<Story name="With FAB
|
|
50
|
+
<Story name="With FAB">
|
|
52
51
|
{#snippet template(args)}
|
|
53
52
|
<div class="bg-md-sys-color-surface-variant relative h-[420px] overflow-hidden rounded-2xl">
|
|
54
53
|
<Rail
|
|
@@ -61,9 +60,6 @@
|
|
|
61
60
|
{#snippet fab()}
|
|
62
61
|
<FAB size="small" iconProps={{ name: 'add' }} label="New" />
|
|
63
62
|
{/snippet}
|
|
64
|
-
{#snippet railFooter()}
|
|
65
|
-
<Avatar seed="DV" />
|
|
66
|
-
{/snippet}
|
|
67
63
|
<RailItem label="Home" href="/" iconProps={{ name: 'house' }} selected />
|
|
68
64
|
<RailItem label="Inbox" href="#" iconProps={{ name: 'mail' }} badge={4} />
|
|
69
65
|
<RailItem label="Settings" href="#" iconProps={{ name: 'settings' }} />
|
|
@@ -10,27 +10,22 @@ On mobile (< md) it automatically renders as a bottom navigation bar.
|
|
|
10
10
|
<script lang="ts">
|
|
11
11
|
import { clickOutside } from '../../../actions/index.js';
|
|
12
12
|
import clsx from 'clsx';
|
|
13
|
-
import { setContext } from 'svelte';
|
|
13
|
+
import { setContext, untrack } from 'svelte';
|
|
14
14
|
import type { RailProps } from './types';
|
|
15
15
|
import ButtonIcon from '../../buttons/ButtonIcon.svelte';
|
|
16
16
|
import { rail } from './theme';
|
|
17
17
|
import { NavigationMenu } from 'bits-ui';
|
|
18
18
|
import { railStore } from './railStore.svelte.js';
|
|
19
|
-
import RailNavContext from './RailNavContext.svelte';
|
|
20
|
-
import Navbar from '../navbar/Navbar.svelte';
|
|
21
19
|
|
|
22
20
|
let {
|
|
23
21
|
children,
|
|
24
22
|
rounded = false,
|
|
25
23
|
expandable = true,
|
|
26
24
|
fab,
|
|
27
|
-
railFooter,
|
|
28
25
|
collapsed = $bindable(true),
|
|
29
26
|
anchor = 'viewport',
|
|
30
27
|
railTop = 0,
|
|
31
|
-
|
|
32
|
-
class: className,
|
|
33
|
-
navbarProps
|
|
28
|
+
class: className
|
|
34
29
|
}: RailProps = $props();
|
|
35
30
|
|
|
36
31
|
const expanded = $derived(!collapsed);
|
|
@@ -85,28 +80,11 @@ On mobile (< md) it automatically renders as a bottom navigation bar.
|
|
|
85
80
|
|
|
86
81
|
<NavigationMenu.Root orientation="vertical" class="w-full">
|
|
87
82
|
<NavigationMenu.List class={`${items()} rail-items`}>
|
|
88
|
-
|
|
89
|
-
{@render children?.()}
|
|
90
|
-
</RailNavContext>
|
|
83
|
+
{@render children?.()}
|
|
91
84
|
</NavigationMenu.List>
|
|
92
85
|
</NavigationMenu.Root>
|
|
93
|
-
|
|
94
|
-
{#if railFooter}
|
|
95
|
-
<div class="mt-auto flex flex-col items-center pb-2">
|
|
96
|
-
{@render railFooter()}
|
|
97
|
-
</div>
|
|
98
|
-
{/if}
|
|
99
86
|
</div>
|
|
100
87
|
|
|
101
|
-
<!-- Mobile bottom navbar (md:hidden) -->
|
|
102
|
-
{#if withNavbar}
|
|
103
|
-
<Navbar {...navbarProps}>
|
|
104
|
-
<RailNavContext mobile={true}>
|
|
105
|
-
{@render children?.()}
|
|
106
|
-
</RailNavContext>
|
|
107
|
-
</Navbar>
|
|
108
|
-
{/if}
|
|
109
|
-
|
|
110
88
|
<style>
|
|
111
89
|
.rail-scrim {
|
|
112
90
|
opacity: 0;
|
|
@@ -67,7 +67,7 @@ export declare const rail: import("tailwind-variants").TVReturnType<{
|
|
|
67
67
|
items: string;
|
|
68
68
|
ghost: string;
|
|
69
69
|
scrim: string;
|
|
70
|
-
}, import("tailwind-variants").
|
|
70
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
71
71
|
anchor: {
|
|
72
72
|
viewport: {
|
|
73
73
|
base: string;
|
|
@@ -100,7 +100,7 @@ export declare const rail: import("tailwind-variants").TVReturnType<{
|
|
|
100
100
|
items: string;
|
|
101
101
|
ghost: string;
|
|
102
102
|
scrim: string;
|
|
103
|
-
}
|
|
103
|
+
}>>;
|
|
104
104
|
export declare const railElement: import("tailwind-variants").TVReturnType<{
|
|
105
105
|
active: {
|
|
106
106
|
true: {
|
|
@@ -195,7 +195,7 @@ export declare const railElement: import("tailwind-variants").TVReturnType<{
|
|
|
195
195
|
iconContainer: string;
|
|
196
196
|
icon: string;
|
|
197
197
|
label: string;
|
|
198
|
-
}, import("tailwind-variants").
|
|
198
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
199
199
|
active: {
|
|
200
200
|
true: {
|
|
201
201
|
content: string;
|
|
@@ -242,4 +242,4 @@ export declare const railElement: import("tailwind-variants").TVReturnType<{
|
|
|
242
242
|
iconContainer: string;
|
|
243
243
|
icon: string;
|
|
244
244
|
label: string;
|
|
245
|
-
}
|
|
245
|
+
}>>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { IconProps } from '../../../utils/index.js';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
-
import type { NavBarProps } from '../navbar/types.js';
|
|
5
4
|
import type { RailItemVariants, RailVariants } from './theme.js';
|
|
6
5
|
/**
|
|
7
6
|
* Props for the RailItem component.
|
|
@@ -36,8 +35,6 @@ export type RailProps = RailVariants & HTMLAttributes<HTMLDivElement> & {
|
|
|
36
35
|
expandable?: boolean;
|
|
37
36
|
/** An optional Floating Action Button snippet. */
|
|
38
37
|
fab?: Snippet;
|
|
39
|
-
/** An optional snippet rendered at the bottom of the rail (e.g. avatar/settings). */
|
|
40
|
-
railFooter?: Snippet;
|
|
41
38
|
/** Whether the rail is currently collapsed. */
|
|
42
39
|
collapsed?: boolean;
|
|
43
40
|
/** Where the rail should be anchored. */
|
|
@@ -46,6 +43,4 @@ export type RailProps = RailVariants & HTMLAttributes<HTMLDivElement> & {
|
|
|
46
43
|
railTop?: number;
|
|
47
44
|
/** Render a bottom navbar on mobile. */
|
|
48
45
|
withNavbar?: boolean;
|
|
49
|
-
/** Customise the navbar inside the rail */
|
|
50
|
-
navbarProps?: Omit<NavBarProps, 'children'>;
|
|
51
46
|
};
|
|
@@ -20,12 +20,13 @@ Use TabContent for content-panel tabs; omit it for navigation (href) tabs.
|
|
|
20
20
|
onValueChange,
|
|
21
21
|
activationMode = 'automatic',
|
|
22
22
|
variant = 'primary',
|
|
23
|
+
rounded = false,
|
|
23
24
|
children
|
|
24
25
|
}: TabHolderProps & { children?: Snippet } = $props();
|
|
25
26
|
|
|
26
27
|
const idx = $derived(items.findIndex((i) => i.value === value));
|
|
27
28
|
const count = $derived(items.length);
|
|
28
|
-
const { base, bar } = tabHolder();
|
|
29
|
+
const { base, bar } = $derived(tabHolder({ rounded }));
|
|
29
30
|
</script>
|
|
30
31
|
|
|
31
32
|
<Tabs.Root bind:value {onValueChange} {activationMode}>
|
|
@@ -2,36 +2,36 @@ import { type VariantProps } from 'tailwind-variants';
|
|
|
2
2
|
export type TabVariants = VariantProps<typeof tab>;
|
|
3
3
|
export type TabHolderVariants = VariantProps<typeof tabHolder>;
|
|
4
4
|
export declare const tabHolder: import("tailwind-variants").TVReturnType<{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
base
|
|
8
|
-
bar?: import("tailwind-merge").ClassNameValue;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
} | {
|
|
12
|
-
[x: string]: {
|
|
13
|
-
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
14
|
-
base?: import("tailwind-merge").ClassNameValue;
|
|
15
|
-
bar?: import("tailwind-merge").ClassNameValue;
|
|
5
|
+
rounded: {
|
|
6
|
+
true: {
|
|
7
|
+
base: string;
|
|
16
8
|
};
|
|
9
|
+
false: {};
|
|
17
10
|
};
|
|
18
|
-
}
|
|
11
|
+
}, {
|
|
19
12
|
base: string;
|
|
20
13
|
bar: string;
|
|
21
14
|
}, undefined, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
base
|
|
25
|
-
bar?: import("tailwind-merge").ClassNameValue;
|
|
15
|
+
rounded: {
|
|
16
|
+
true: {
|
|
17
|
+
base: string;
|
|
26
18
|
};
|
|
19
|
+
false: {};
|
|
27
20
|
};
|
|
28
|
-
}
|
|
21
|
+
}, {
|
|
29
22
|
base: string;
|
|
30
23
|
bar: string;
|
|
31
|
-
}, import("tailwind-variants").
|
|
24
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
25
|
+
rounded: {
|
|
26
|
+
true: {
|
|
27
|
+
base: string;
|
|
28
|
+
};
|
|
29
|
+
false: {};
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
32
|
base: string;
|
|
33
33
|
bar: string;
|
|
34
|
-
}
|
|
34
|
+
}>>;
|
|
35
35
|
export declare const tab: import("tailwind-variants").TVReturnType<{
|
|
36
36
|
variant: {
|
|
37
37
|
primary: {
|
|
@@ -70,7 +70,7 @@ export declare const tab: import("tailwind-variants").TVReturnType<{
|
|
|
70
70
|
base: string;
|
|
71
71
|
label: string;
|
|
72
72
|
icon: string;
|
|
73
|
-
}, import("tailwind-variants").
|
|
73
|
+
}, import("tailwind-variants").TVReturnTypeLike<{
|
|
74
74
|
variant: {
|
|
75
75
|
primary: {
|
|
76
76
|
base: string;
|
|
@@ -89,4 +89,4 @@ export declare const tab: import("tailwind-variants").TVReturnType<{
|
|
|
89
89
|
base: string;
|
|
90
90
|
label: string;
|
|
91
91
|
icon: string;
|
|
92
|
-
}
|
|
92
|
+
}>>;
|
|
@@ -3,6 +3,12 @@ export const tabHolder = tv({
|
|
|
3
3
|
slots: {
|
|
4
4
|
base: 'relative flex w-full bg-md-sys-color-surface',
|
|
5
5
|
bar: 'absolute bottom-0 h-[3px] rounded-t-full bg-md-sys-color-primary transition-transform duration-200 ease-out'
|
|
6
|
+
},
|
|
7
|
+
variants: {
|
|
8
|
+
rounded: {
|
|
9
|
+
true: { base: 'rounded-t-md' },
|
|
10
|
+
false: {}
|
|
11
|
+
}
|
|
6
12
|
}
|
|
7
13
|
});
|
|
8
14
|
export const tab = tv({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IconProps } from '../../../utils/index.js';
|
|
2
|
-
import type { TabVariants } from './theme.js';
|
|
2
|
+
import type { TabHolderVariants, TabVariants } from './theme.js';
|
|
3
3
|
export type TabProps = {
|
|
4
4
|
/** Props for the Icon component. Omit for secondary tabs. */
|
|
5
5
|
iconProps?: IconProps;
|
|
@@ -30,7 +30,7 @@ export type TabHolderProps = {
|
|
|
30
30
|
variant?: TabVariants['variant'];
|
|
31
31
|
/** Tab items to render. */
|
|
32
32
|
items: TabProps[];
|
|
33
|
-
};
|
|
33
|
+
} & TabHolderVariants;
|
|
34
34
|
export type TabContentProps = {
|
|
35
35
|
/** Must match the value of the corresponding Tab. */
|
|
36
36
|
value: string;
|