@sovereignfs/ui 0.41.0 → 0.54.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/Accordion.module.css +3 -0
- package/dist/Alert.module.css +62 -0
- package/dist/AspectRatio.module.css +15 -0
- package/dist/Badge.module.css +75 -9
- package/dist/Breadcrumb.module.css +49 -0
- package/dist/Button.module.css +12 -3
- package/dist/ButtonGroup.module.css +29 -0
- package/dist/Card.module.css +6 -0
- package/dist/Checkbox.module.css +3 -1
- package/dist/Collapsible.module.css +70 -0
- package/dist/Combobox.module.css +122 -0
- package/dist/Command.module.css +80 -0
- package/dist/ConfirmDialog.module.css +5 -1
- package/dist/DataTable.module.css +28 -0
- package/dist/DatePicker.module.css +6 -2
- package/dist/Dialog.module.css +3 -0
- package/dist/HoverCard.module.css +3 -0
- package/dist/Input.module.css +6 -1
- package/dist/Item.module.css +70 -0
- package/dist/Kbd.module.css +14 -0
- package/dist/Label.module.css +11 -0
- package/dist/LegalLinks.module.css +24 -0
- package/dist/Markdown.module.css +49 -0
- package/dist/Marker.module.css +33 -0
- package/dist/Menu.module.css +8 -1
- package/dist/Message.module.css +99 -0
- package/dist/MessageScroller.module.css +54 -0
- package/dist/MobileAppsDrawer.module.css +81 -0
- package/dist/MobileFooter.module.css +73 -0
- package/dist/MobileHeader.module.css +63 -0
- package/dist/NavigationMenu.module.css +53 -0
- package/dist/PageContainer.module.css +20 -0
- package/dist/Pagination.module.css +98 -0
- package/dist/Progress.module.css +20 -0
- package/dist/RadioGroup.module.css +88 -0
- package/dist/Resizable.module.css +70 -0
- package/dist/ScrollArea.module.css +20 -0
- package/dist/Select.module.css +7 -3
- package/dist/Slider.module.css +95 -0
- package/dist/SwipableMobileCarousel.module.css +55 -0
- package/dist/SwipableMobileCarouselDots.module.css +49 -0
- package/dist/SwipableMobileCarouselSlideParts.module.css +29 -0
- package/dist/Table.module.css +45 -0
- package/dist/Tabs.module.css +6 -1
- package/dist/Toggle.module.css +6 -1
- package/dist/Typography.module.css +47 -0
- package/dist/index.d.ts +1268 -8
- package/dist/index.js +3046 -975
- package/dist/tokens/primitives.css +47 -8
- package/package.json +13 -9
- package/src/components/Accordion/Accordion.module.css +3 -0
- package/src/components/Accordion/Accordion.stories.tsx +110 -0
- package/src/components/Accordion/Accordion.tsx +53 -0
- package/src/components/Accordion/__tests__/Accordion.test.tsx +61 -0
- package/src/components/Alert/Alert.module.css +62 -0
- package/src/components/Alert/Alert.stories.tsx +96 -0
- package/src/components/Alert/Alert.tsx +58 -0
- package/src/components/Alert/__tests__/Alert.test.tsx +75 -0
- package/src/components/AspectRatio/AspectRatio.module.css +15 -0
- package/src/components/AspectRatio/AspectRatio.stories.tsx +78 -0
- package/src/components/AspectRatio/AspectRatio.tsx +21 -0
- package/src/components/AspectRatio/__tests__/AspectRatio.test.tsx +27 -0
- package/src/components/Badge/Badge.module.css +75 -9
- package/src/components/Badge/Badge.stories.tsx +109 -1
- package/src/components/Badge/Badge.tsx +31 -9
- package/src/components/Badge/__tests__/Badge.test.tsx +26 -2
- package/src/components/Breadcrumb/Breadcrumb.module.css +49 -0
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +47 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +57 -0
- package/src/components/Breadcrumb/__tests__/Breadcrumb.test.tsx +52 -0
- package/src/components/Button/Button.module.css +12 -3
- package/src/components/Button/Button.stories.tsx +3 -2
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/Button/__tests__/Button.test.tsx +10 -0
- package/src/components/ButtonGroup/ButtonGroup.module.css +29 -0
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +57 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +27 -0
- package/src/components/ButtonGroup/__tests__/ButtonGroup.test.tsx +29 -0
- package/src/components/Card/Card.module.css +6 -0
- package/src/components/Checkbox/Checkbox.module.css +3 -1
- package/src/components/Collapsible/Collapsible.module.css +70 -0
- package/src/components/Collapsible/Collapsible.stories.tsx +62 -0
- package/src/components/Collapsible/Collapsible.tsx +66 -0
- package/src/components/Collapsible/__tests__/Collapsible.test.tsx +71 -0
- package/src/components/Combobox/Combobox.module.css +122 -0
- package/src/components/Combobox/Combobox.stories.tsx +79 -0
- package/src/components/Combobox/Combobox.tsx +186 -0
- package/src/components/Combobox/__tests__/Combobox.test.tsx +158 -0
- package/src/components/Command/Command.module.css +80 -0
- package/src/components/Command/Command.stories.tsx +104 -0
- package/src/components/Command/Command.tsx +168 -0
- package/src/components/Command/__tests__/Command.test.tsx +162 -0
- package/src/components/ConfirmDialog/ConfirmDialog.module.css +5 -1
- package/src/components/ContextMenu/ContextMenu.stories.tsx +81 -0
- package/src/components/ContextMenu/ContextMenu.tsx +100 -0
- package/src/components/ContextMenu/__tests__/ContextMenu.test.tsx +87 -0
- package/src/components/DataTable/DataTable.module.css +28 -0
- package/src/components/DataTable/DataTable.stories.tsx +74 -0
- package/src/components/DataTable/DataTable.tsx +154 -0
- package/src/components/DataTable/__tests__/DataTable.test.tsx +123 -0
- package/src/components/DatePicker/DatePicker.module.css +6 -2
- package/src/components/DeviceOnlyGate/DeviceOnlyGate.tsx +58 -0
- package/src/components/DeviceOnlyGate/__tests__/DeviceOnlyGate.test.tsx +45 -0
- package/src/components/DeviceStorageKeyGate/DeviceStorageKeyGate.tsx +100 -0
- package/src/components/DeviceStorageKeyGate/__tests__/DeviceStorageKeyGate.test.tsx +119 -0
- package/src/components/Dialog/Dialog.module.css +3 -0
- package/src/components/Dialog/Dialog.tsx +8 -59
- package/src/components/Drawer/Drawer.stories.tsx +44 -0
- package/src/components/Drawer/Drawer.tsx +18 -56
- package/src/components/Drawer/__tests__/Drawer.test.tsx +22 -0
- package/src/components/HoverCard/HoverCard.module.css +3 -0
- package/src/components/HoverCard/HoverCard.stories.tsx +66 -0
- package/src/components/HoverCard/HoverCard.tsx +111 -0
- package/src/components/HoverCard/__tests__/HoverCard.test.tsx +99 -0
- package/src/components/Icon/icons/circle-check.tsx +21 -0
- package/src/components/Icon/icons/circle-x.tsx +22 -0
- package/src/components/Icon/icons/index.ts +16 -0
- package/src/components/Icon/icons/menu.tsx +22 -0
- package/src/components/Icon/icons/smartphone.tsx +21 -0
- package/src/components/Input/Input.module.css +6 -1
- package/src/components/Item/Item.module.css +70 -0
- package/src/components/Item/Item.stories.tsx +62 -0
- package/src/components/Item/Item.tsx +54 -0
- package/src/components/Item/__tests__/Item.test.tsx +39 -0
- package/src/components/Kbd/Kbd.module.css +14 -0
- package/src/components/Kbd/Kbd.stories.tsx +32 -0
- package/src/components/Kbd/Kbd.tsx +12 -0
- package/src/components/Kbd/__tests__/Kbd.test.tsx +14 -0
- package/src/components/Label/Label.module.css +11 -0
- package/src/components/Label/Label.stories.tsx +40 -0
- package/src/components/Label/Label.tsx +24 -0
- package/src/components/Label/__tests__/Label.test.tsx +32 -0
- package/src/components/LegalLinks/LegalLinks.module.css +24 -0
- package/src/components/LegalLinks/LegalLinks.stories.tsx +22 -0
- package/src/components/LegalLinks/LegalLinks.tsx +40 -0
- package/src/components/Markdown/Markdown.module.css +49 -0
- package/src/components/Markdown/Markdown.stories.tsx +30 -0
- package/src/components/Markdown/Markdown.tsx +168 -0
- package/src/components/Marker/Marker.module.css +33 -0
- package/src/components/Marker/Marker.stories.tsx +39 -0
- package/src/components/Marker/Marker.tsx +34 -0
- package/src/components/Marker/__tests__/Marker.test.tsx +23 -0
- package/src/components/Menu/Menu.module.css +8 -1
- package/src/components/Menu/Menu.tsx +30 -8
- package/src/components/Menubar/Menubar.stories.tsx +52 -0
- package/src/components/Menubar/Menubar.tsx +42 -0
- package/src/components/Menubar/__tests__/Menubar.test.tsx +45 -0
- package/src/components/Message/Message.module.css +99 -0
- package/src/components/Message/Message.stories.tsx +79 -0
- package/src/components/Message/Message.tsx +41 -0
- package/src/components/Message/__tests__/Message.test.tsx +46 -0
- package/src/components/MessageScroller/MessageScroller.module.css +54 -0
- package/src/components/MessageScroller/MessageScroller.stories.tsx +84 -0
- package/src/components/MessageScroller/MessageScroller.tsx +72 -0
- package/src/components/MessageScroller/__tests__/MessageScroller.test.tsx +105 -0
- package/src/components/MobileAppsDrawer/MobileAppsDrawer.module.css +81 -0
- package/src/components/MobileAppsDrawer/MobileAppsDrawer.tsx +78 -0
- package/src/components/MobileAppsDrawer/__tests__/MobileAppsDrawer.test.tsx +80 -0
- package/src/components/MobileFooter/MobileFooter.module.css +73 -0
- package/src/components/MobileFooter/MobileFooter.stories.tsx +47 -0
- package/src/components/MobileFooter/MobileFooter.tsx +109 -0
- package/src/components/MobileFooter/__tests__/MobileFooter.test.tsx +71 -0
- package/src/components/MobileHeader/MobileHeader.module.css +63 -0
- package/src/components/MobileHeader/MobileHeader.stories.tsx +57 -0
- package/src/components/MobileHeader/MobileHeader.tsx +77 -0
- package/src/components/MobileHeader/__tests__/MobileHeader.test.tsx +58 -0
- package/src/components/NavTabs/NavTabs.tsx +39 -11
- package/src/components/NavigationMenu/NavigationMenu.module.css +53 -0
- package/src/components/NavigationMenu/NavigationMenu.stories.tsx +58 -0
- package/src/components/NavigationMenu/NavigationMenu.tsx +125 -0
- package/src/components/NavigationMenu/__tests__/NavigationMenu.test.tsx +93 -0
- package/src/components/OfflineGate/OfflineGate.tsx +44 -0
- package/src/components/OfflineGate/__tests__/OfflineGate.test.tsx +66 -0
- package/src/components/PageContainer/PageContainer.module.css +20 -0
- package/src/components/PageContainer/PageContainer.tsx +31 -0
- package/src/components/PageContainer/__tests__/PageContainer.test.tsx +37 -0
- package/src/components/PageHeader/PageHeader.tsx +16 -2
- package/src/components/Pagination/Pagination.module.css +98 -0
- package/src/components/Pagination/Pagination.stories.tsx +49 -0
- package/src/components/Pagination/Pagination.tsx +87 -0
- package/src/components/Pagination/__tests__/Pagination.test.tsx +56 -0
- package/src/components/Progress/Progress.module.css +20 -0
- package/src/components/Progress/Progress.stories.tsx +40 -0
- package/src/components/Progress/Progress.tsx +35 -0
- package/src/components/Progress/__tests__/Progress.test.tsx +31 -0
- package/src/components/RadioGroup/RadioGroup.module.css +88 -0
- package/src/components/RadioGroup/RadioGroup.stories.tsx +69 -0
- package/src/components/RadioGroup/RadioGroup.tsx +99 -0
- package/src/components/RadioGroup/__tests__/RadioGroup.test.tsx +59 -0
- package/src/components/Resizable/Resizable.module.css +70 -0
- package/src/components/Resizable/Resizable.stories.tsx +82 -0
- package/src/components/Resizable/Resizable.tsx +313 -0
- package/src/components/Resizable/__tests__/Resizable.test.tsx +128 -0
- package/src/components/ResponsiveSurface/ResponsiveSurface.tsx +24 -0
- package/src/components/ResponsiveSurface/__tests__/ResponsiveSurface.test.tsx +73 -0
- package/src/components/ScrollArea/ScrollArea.module.css +20 -0
- package/src/components/ScrollArea/ScrollArea.stories.tsx +57 -0
- package/src/components/ScrollArea/ScrollArea.tsx +27 -0
- package/src/components/ScrollArea/__tests__/ScrollArea.test.tsx +39 -0
- package/src/components/Select/Select.module.css +7 -3
- package/src/components/Sheet/Sheet.tsx +9 -51
- package/src/components/Slider/Slider.module.css +95 -0
- package/src/components/Slider/Slider.stories.tsx +64 -0
- package/src/components/Slider/Slider.tsx +77 -0
- package/src/components/Slider/__tests__/Slider.test.tsx +45 -0
- package/src/components/SwipableMobileCarousel/SwipableMobileCarousel.module.css +55 -0
- package/src/components/SwipableMobileCarousel/SwipableMobileCarousel.tsx +227 -0
- package/src/components/SwipableMobileCarousel/SwipableMobileCarouselSlide.tsx +35 -0
- package/src/components/SwipableMobileCarousel/SwipableMobileCarouselSlideBody.tsx +42 -0
- package/src/components/SwipableMobileCarousel/SwipableMobileCarouselSlideFooter.tsx +18 -0
- package/src/components/SwipableMobileCarousel/SwipableMobileCarouselSlideHeader.tsx +21 -0
- package/src/components/SwipableMobileCarousel/SwipableMobileCarouselSlideParts.module.css +29 -0
- package/src/components/SwipableMobileCarousel/__tests__/SwipableMobileCarousel.test.tsx +133 -0
- package/src/components/SwipableMobileCarousel/__tests__/SwipableMobileCarouselDevGuard.test.tsx +61 -0
- package/src/components/SwipableMobileCarousel/context.ts +13 -0
- package/src/components/SwipableMobileCarouselDots/SwipableMobileCarouselDots.module.css +49 -0
- package/src/components/SwipableMobileCarouselDots/SwipableMobileCarouselDots.tsx +62 -0
- package/src/components/SwipableMobileCarouselDots/__tests__/SwipableMobileCarouselDots.test.tsx +63 -0
- package/src/components/Table/Table.module.css +45 -0
- package/src/components/Table/Table.stories.tsx +125 -0
- package/src/components/Table/Table.tsx +51 -0
- package/src/components/Table/__tests__/Table.test.tsx +50 -0
- package/src/components/Tabs/Tabs.module.css +6 -1
- package/src/components/Toggle/Toggle.module.css +6 -1
- package/src/components/Typography/Typography.module.css +47 -0
- package/src/components/Typography/Typography.stories.tsx +62 -0
- package/src/components/Typography/Typography.tsx +30 -0
- package/src/components/Typography/__tests__/Typography.test.tsx +34 -0
- package/src/hooks/__tests__/useCarouselRouteSync.test.tsx +126 -0
- package/src/hooks/__tests__/useIsOffline.test.tsx +53 -0
- package/src/hooks/__tests__/useOfflineTileState.test.tsx +69 -0
- package/src/hooks/__tests__/useResponsiveLayout.test.tsx +87 -0
- package/src/hooks/__tests__/useSnapCarousel.test.tsx +93 -0
- package/src/hooks/__tests__/useSwipeReveal.test.tsx +110 -0
- package/src/hooks/index.ts +18 -0
- package/src/hooks/useCarouselRouteSync.ts +92 -0
- package/src/hooks/useIsOffline.ts +41 -0
- package/src/hooks/useOfflineTileState.ts +45 -0
- package/src/hooks/useResponsiveLayout.ts +36 -0
- package/src/hooks/useSnapCarousel.ts +79 -0
- package/src/hooks/useSwipeReveal.ts +107 -0
- package/src/index.ts +141 -3
- package/src/overlay-shell.ts +94 -0
- package/src/stories/DesignSystemOverview.stories.tsx +936 -3
- package/src/stories/DeviceOnlyGate.stories.tsx +35 -0
- package/src/stories/DeviceStorageKeyGate.stories.tsx +57 -0
- package/src/stories/InteractionHooks.stories.tsx +483 -0
- package/src/stories/MobilePatterns.stories.tsx +255 -4
- package/src/stories/NavTabs.stories.tsx +18 -0
- package/src/stories/OfflineGate.stories.tsx +42 -0
- package/src/stories/PageContainer.stories.tsx +37 -0
- package/src/stories/PageHeader.stories.tsx +11 -0
- package/src/stories/ResponsiveSurface.stories.tsx +47 -0
- package/src/stories/SwipableMobileCarousel.stories.tsx +304 -0
- package/src/stories/TokenGallery.stories.tsx +177 -16
- package/src/tokens/primitives.css +47 -8
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: var(--sv-space-3);
|
|
5
|
+
width: 100%;
|
|
6
|
+
padding: var(--sv-space-3);
|
|
7
|
+
border: none;
|
|
8
|
+
border-radius: var(--sv-radius-md);
|
|
9
|
+
background: transparent;
|
|
10
|
+
text-align: left;
|
|
11
|
+
font-family: var(--sv-font-family);
|
|
12
|
+
color: inherit;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.interactive {
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@media (hover: hover) {
|
|
20
|
+
.interactive:not(:disabled):hover {
|
|
21
|
+
background: var(--sv-color-surface-sunken);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.interactive:focus-visible {
|
|
26
|
+
outline: 2px solid var(--sv-color-focus-ring);
|
|
27
|
+
outline-offset: -2px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.interactive:disabled {
|
|
31
|
+
opacity: 0.5;
|
|
32
|
+
cursor: not-allowed;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (pointer: coarse) {
|
|
36
|
+
.root {
|
|
37
|
+
min-height: var(--sv-touch-target-min, 44px);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.leading,
|
|
42
|
+
.trailing {
|
|
43
|
+
flex-shrink: 0;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.content {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
min-width: 0;
|
|
52
|
+
flex: 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.title {
|
|
56
|
+
font-size: var(--sv-font-size-sm);
|
|
57
|
+
font-weight: var(--sv-font-weight-medium);
|
|
58
|
+
color: var(--sv-color-text-primary);
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
text-overflow: ellipsis;
|
|
61
|
+
white-space: nowrap;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.description {
|
|
65
|
+
font-size: var(--sv-font-size-caption);
|
|
66
|
+
color: var(--sv-color-text-muted);
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
text-overflow: ellipsis;
|
|
69
|
+
white-space: nowrap;
|
|
70
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.kbd {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
min-width: 1.5em;
|
|
6
|
+
padding: var(--sv-space-1) var(--sv-space-2);
|
|
7
|
+
border: 1px solid var(--sv-color-border-strong);
|
|
8
|
+
border-radius: var(--sv-radius-sm);
|
|
9
|
+
background: var(--sv-color-surface-sunken);
|
|
10
|
+
color: var(--sv-color-text-primary);
|
|
11
|
+
font-family: var(--sv-font-family-mono);
|
|
12
|
+
font-size: var(--sv-font-size-xs);
|
|
13
|
+
line-height: 1;
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
margin: var(--sv-space-5) 0 0;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
gap: var(--sv-space-2);
|
|
7
|
+
font-size: var(--sv-font-size-xs);
|
|
8
|
+
color: var(--sv-color-text-muted);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.link {
|
|
12
|
+
color: var(--sv-color-text-muted);
|
|
13
|
+
text-decoration: underline;
|
|
14
|
+
text-underline-offset: 2px;
|
|
15
|
+
text-decoration-color: var(--sv-color-border);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.link:hover {
|
|
19
|
+
color: var(--sv-color-text-primary);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.dot {
|
|
23
|
+
color: var(--sv-color-border);
|
|
24
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* Spacing lives on this wrapper div, not on the Typography-rendered tag
|
|
2
|
+
inside it — Typography's own variants reset margin: 0, which would tie
|
|
3
|
+
for CSS specificity against a bare `.root > * + *` sibling rule and make
|
|
4
|
+
the outcome depend on module load order. A dedicated class avoids that. */
|
|
5
|
+
.block {
|
|
6
|
+
margin-top: var(--sv-space-4);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.block:first-child {
|
|
10
|
+
margin-top: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.block[data-heading] {
|
|
14
|
+
margin-top: var(--sv-space-8);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.block[data-heading]:first-child {
|
|
18
|
+
margin-top: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.blockquote {
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: var(--sv-space-4);
|
|
24
|
+
border-left: 3px solid var(--sv-color-border);
|
|
25
|
+
background: var(--sv-color-surface-sunken);
|
|
26
|
+
border-radius: var(--sv-radius-sm);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.list {
|
|
30
|
+
margin: 0;
|
|
31
|
+
padding-left: var(--sv-space-6);
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
gap: var(--sv-space-2);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.root a {
|
|
38
|
+
color: var(--sv-color-text-primary);
|
|
39
|
+
text-decoration: underline;
|
|
40
|
+
text-underline-offset: 2px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.root code {
|
|
44
|
+
font-family: var(--sv-font-family-mono);
|
|
45
|
+
font-size: 0.9em;
|
|
46
|
+
background: var(--sv-color-surface-sunken);
|
|
47
|
+
padding: 0.1em 0.35em;
|
|
48
|
+
border-radius: var(--sv-radius-sm);
|
|
49
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.marker {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
min-width: 16px;
|
|
6
|
+
height: 16px;
|
|
7
|
+
padding: 0 4px;
|
|
8
|
+
margin: 0 1px;
|
|
9
|
+
border: none;
|
|
10
|
+
border-radius: var(--sv-radius-full);
|
|
11
|
+
background: var(--sv-color-accent-subtle);
|
|
12
|
+
color: var(--sv-color-accent);
|
|
13
|
+
font-family: var(--sv-font-family);
|
|
14
|
+
font-size: var(--sv-font-size-label);
|
|
15
|
+
font-weight: var(--sv-font-weight-semibold);
|
|
16
|
+
line-height: 1;
|
|
17
|
+
vertical-align: super;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
button.marker {
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
button.marker:focus-visible {
|
|
25
|
+
outline: 2px solid var(--sv-color-focus-ring);
|
|
26
|
+
outline-offset: 1px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@media (hover: hover) {
|
|
30
|
+
button.marker:hover {
|
|
31
|
+
background: color-mix(in srgb, var(--sv-color-accent-subtle) 70%, var(--sv-color-accent) 30%);
|
|
32
|
+
}
|
|
33
|
+
}
|
package/dist/Menu.module.css
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/* Menu — the item list shared by both presentations (Popover panel on
|
|
2
2
|
* desktop, Drawer panel on mobile); the presentational chrome around it is
|
|
3
|
-
* entirely owned by those two components, not duplicated here.
|
|
3
|
+
* entirely owned by those two components, not duplicated here.
|
|
4
|
+
*
|
|
5
|
+
* Sizing audit: reviewed against this scale's other compact controls —
|
|
6
|
+
* --sv-radius-sm (6px) and --sv-font-size-sm (14px) already fit. The 44px
|
|
7
|
+
* min-height is a deliberate design choice, kept unconditional (not gated
|
|
8
|
+
* to pointer:coarse like Button/Checkbox) because this menu doubles as a
|
|
9
|
+
* full Drawer sheet on mobile, where every item must stay comfortably
|
|
10
|
+
* tappable. */
|
|
4
11
|
|
|
5
12
|
.list {
|
|
6
13
|
list-style: none;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
.row {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
max-width: 80%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.user {
|
|
8
|
+
align-self: flex-end;
|
|
9
|
+
align-items: flex-end;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.assistant,
|
|
13
|
+
.tool {
|
|
14
|
+
align-self: flex-start;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.bubble {
|
|
19
|
+
padding: var(--sv-space-2) var(--sv-space-3);
|
|
20
|
+
border-radius: var(--sv-radius-xl);
|
|
21
|
+
font-size: var(--sv-font-size-sm);
|
|
22
|
+
line-height: 1.5;
|
|
23
|
+
white-space: pre-wrap;
|
|
24
|
+
overflow-wrap: break-word;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.user .bubble {
|
|
28
|
+
background: var(--sv-color-accent);
|
|
29
|
+
color: var(--sv-color-text-on-accent);
|
|
30
|
+
border-bottom-right-radius: var(--sv-radius-sm);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.assistant .bubble {
|
|
34
|
+
background: var(--sv-color-surface-raised);
|
|
35
|
+
border: 1px solid var(--sv-color-border);
|
|
36
|
+
color: var(--sv-color-text-primary);
|
|
37
|
+
border-bottom-left-radius: var(--sv-radius-sm);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.tool .bubble {
|
|
41
|
+
background: var(--sv-color-surface-sunken);
|
|
42
|
+
color: var(--sv-color-text-muted);
|
|
43
|
+
font-family: var(--sv-font-family-mono);
|
|
44
|
+
font-size: var(--sv-font-size-xs);
|
|
45
|
+
border-bottom-left-radius: var(--sv-radius-sm);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.actions {
|
|
49
|
+
display: flex;
|
|
50
|
+
gap: var(--sv-space-2);
|
|
51
|
+
margin-top: var(--sv-space-1);
|
|
52
|
+
font-size: var(--sv-font-size-caption);
|
|
53
|
+
color: var(--sv-color-text-muted);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Typing indicator — three dots, staggered pulse. */
|
|
57
|
+
.typingDots {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
gap: 3px;
|
|
61
|
+
padding: var(--sv-space-1) 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.dot {
|
|
65
|
+
width: 6px;
|
|
66
|
+
height: 6px;
|
|
67
|
+
border-radius: var(--sv-radius-full);
|
|
68
|
+
background: currentColor;
|
|
69
|
+
opacity: 0.4;
|
|
70
|
+
animation: typing-pulse 1.2s ease-in-out infinite;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.dot:nth-child(2) {
|
|
74
|
+
animation-delay: 0.2s;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.dot:nth-child(3) {
|
|
78
|
+
animation-delay: 0.4s;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@keyframes typing-pulse {
|
|
82
|
+
0%,
|
|
83
|
+
80%,
|
|
84
|
+
100% {
|
|
85
|
+
opacity: 0.4;
|
|
86
|
+
transform: scale(0.85);
|
|
87
|
+
}
|
|
88
|
+
40% {
|
|
89
|
+
opacity: 1;
|
|
90
|
+
transform: scale(1);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@media (prefers-reduced-motion: reduce) {
|
|
95
|
+
.dot {
|
|
96
|
+
animation: none;
|
|
97
|
+
opacity: 0.7;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
position: relative;
|
|
3
|
+
height: 100%;
|
|
4
|
+
min-height: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.scrollContainer {
|
|
8
|
+
height: 100%;
|
|
9
|
+
overflow-y: auto;
|
|
10
|
+
overscroll-behavior: contain;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: var(--sv-space-3);
|
|
14
|
+
padding: var(--sv-space-3);
|
|
15
|
+
scrollbar-width: thin;
|
|
16
|
+
scrollbar-color: var(--sv-color-border-strong) transparent;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.scrollContainer::-webkit-scrollbar {
|
|
20
|
+
width: 8px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.scrollContainer::-webkit-scrollbar-thumb {
|
|
24
|
+
background: var(--sv-color-border-strong);
|
|
25
|
+
border-radius: var(--sv-radius-full);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.jumpButton {
|
|
29
|
+
position: absolute;
|
|
30
|
+
bottom: var(--sv-space-3);
|
|
31
|
+
left: 50%;
|
|
32
|
+
transform: translateX(-50%);
|
|
33
|
+
padding: var(--sv-space-1) var(--sv-space-3);
|
|
34
|
+
border: 1px solid var(--sv-color-border);
|
|
35
|
+
border-radius: var(--sv-radius-full);
|
|
36
|
+
background: var(--sv-color-surface-raised);
|
|
37
|
+
box-shadow: var(--sv-shadow-popover);
|
|
38
|
+
color: var(--sv-color-text-primary);
|
|
39
|
+
font-family: var(--sv-font-family);
|
|
40
|
+
font-size: var(--sv-font-size-caption);
|
|
41
|
+
font-weight: var(--sv-font-weight-medium);
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.jumpButton:focus-visible {
|
|
46
|
+
outline: 2px solid var(--sv-color-focus-ring);
|
|
47
|
+
outline-offset: 2px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (hover: hover) {
|
|
51
|
+
.jumpButton:hover {
|
|
52
|
+
background: var(--sv-color-surface-sunken);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* Matches the runtime shell's own Apps drawer grid exactly
|
|
2
|
+
(runtime/app/(platform)/_components/MobileNav.module.css's .drawerGrid/
|
|
3
|
+
.drawerGridItem/.drawerGridIcon/.drawerGridName) — this component is
|
|
4
|
+
meant to replace that hand-rolled markup for any consumer building its
|
|
5
|
+
own Apps-style launcher. No header row — see the component's own doc
|
|
6
|
+
comment for why. */
|
|
7
|
+
|
|
8
|
+
.grid {
|
|
9
|
+
list-style: none;
|
|
10
|
+
margin: 0;
|
|
11
|
+
/* Drawer's own grab handle already reserves a 44px touch target above this
|
|
12
|
+
— no extra top padding needed beyond a touch of breathing room. Bottom
|
|
13
|
+
gets noticeably more: with no header row to separate the grid from the
|
|
14
|
+
handle, a tight top/bottom balance read as top-heavy (grid crowding the
|
|
15
|
+
handle isn't the issue; the *last* row crowding the panel's bottom
|
|
16
|
+
edge/safe-area is). Drawer's own panel already adds
|
|
17
|
+
env(safe-area-inset-bottom) below everything, so this is on top of that,
|
|
18
|
+
not instead of it. */
|
|
19
|
+
padding: var(--sv-space-1) var(--sv-space-4) var(--sv-space-10);
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: repeat(3, 1fr);
|
|
22
|
+
row-gap: var(--sv-space-5);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.gridItem {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: var(--sv-space-2);
|
|
30
|
+
padding: var(--sv-space-1);
|
|
31
|
+
border: none;
|
|
32
|
+
background: none;
|
|
33
|
+
text-decoration: none;
|
|
34
|
+
color: var(--sv-color-text-primary);
|
|
35
|
+
font: inherit;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
width: 100%;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (hover: hover) {
|
|
41
|
+
.gridItem:hover .gridIcon {
|
|
42
|
+
background: var(--sv-color-border);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.gridItem:focus-visible {
|
|
47
|
+
outline: 2px solid var(--sv-color-focus-ring);
|
|
48
|
+
outline-offset: 2px;
|
|
49
|
+
border-radius: var(--sv-radius-md);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* color: text-primary, not text-muted — the reference's own drawerGridIcon
|
|
53
|
+
uses text-muted only as its monogram-fallback text color for <img>-less
|
|
54
|
+
plugin icons (raster <img> icons don't inherit CSS color at all, so that
|
|
55
|
+
value never actually painted a real icon). Every tile here renders a real
|
|
56
|
+
stroke icon via the Icon component (currentColor), which does inherit —
|
|
57
|
+
matching the reference's own explicit override for that exact case
|
|
58
|
+
(.drawerGridIconSettings, used by its Console tile) rather than the
|
|
59
|
+
fallback default. */
|
|
60
|
+
.gridIcon {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
width: 56px;
|
|
65
|
+
height: 56px;
|
|
66
|
+
border-radius: 14px;
|
|
67
|
+
background: var(--sv-color-surface-sunken);
|
|
68
|
+
font-size: var(--sv-font-size-sm);
|
|
69
|
+
font-weight: var(--sv-font-weight-semibold);
|
|
70
|
+
color: var(--sv-color-text-primary);
|
|
71
|
+
transition: background 0.1s;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.gridName {
|
|
75
|
+
font-size: var(--sv-font-size-sm);
|
|
76
|
+
text-align: center;
|
|
77
|
+
color: var(--sv-color-text-primary);
|
|
78
|
+
line-height: 1.3;
|
|
79
|
+
word-break: break-word;
|
|
80
|
+
max-width: 80px;
|
|
81
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
.footer {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
width: 100%;
|
|
5
|
+
/* Mobile-only component — never render wider than the platform's own
|
|
6
|
+
mobile breakpoint, even if a consumer accidentally mounts it in a wider
|
|
7
|
+
container (e.g. an un-gated preview). At real mobile widths this is a
|
|
8
|
+
no-op since the viewport itself is already narrower. */
|
|
9
|
+
max-width: 768px;
|
|
10
|
+
margin-inline: auto;
|
|
11
|
+
min-height: var(--sv-shell-footer-height, 60px);
|
|
12
|
+
padding: 0 var(--sv-space-4);
|
|
13
|
+
padding-bottom: max(var(--sv-space-2), env(safe-area-inset-bottom));
|
|
14
|
+
background-color: var(--sv-color-surface);
|
|
15
|
+
border-top: 1px solid var(--sv-color-border);
|
|
16
|
+
position: relative;
|
|
17
|
+
z-index: 101;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.navItem {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
flex: 1;
|
|
25
|
+
min-height: 52px;
|
|
26
|
+
border: none;
|
|
27
|
+
background: transparent;
|
|
28
|
+
color: var(--sv-color-text-muted);
|
|
29
|
+
font: inherit;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
text-decoration: none;
|
|
32
|
+
border-radius: var(--sv-radius-md);
|
|
33
|
+
transition: color 0.1s;
|
|
34
|
+
outline: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (hover: hover) {
|
|
38
|
+
.navItem:hover {
|
|
39
|
+
color: var(--sv-color-text-primary);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.navItem:focus-visible {
|
|
44
|
+
outline: 2px solid var(--sv-color-focus-ring);
|
|
45
|
+
outline-offset: -2px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.navItemActive {
|
|
49
|
+
color: var(--sv-color-text-primary);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.navItemApps {
|
|
53
|
+
position: relative;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.navItemAppsOpen {
|
|
57
|
+
color: var(--sv-color-text-primary);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.navItemAppsOpen::before {
|
|
61
|
+
content: '';
|
|
62
|
+
position: absolute;
|
|
63
|
+
width: 48px;
|
|
64
|
+
height: 48px;
|
|
65
|
+
border-radius: var(--sv-radius-full);
|
|
66
|
+
background: var(--sv-color-surface-sunken);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.navItemAppsOpen svg,
|
|
70
|
+
.navItemAppsOpen img {
|
|
71
|
+
position: relative;
|
|
72
|
+
z-index: 1;
|
|
73
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
.header {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
gap: var(--sv-space-3);
|
|
6
|
+
width: 100%;
|
|
7
|
+
/* Mobile-only component — never render wider than the platform's own
|
|
8
|
+
mobile breakpoint, even if a consumer accidentally mounts it in a wider
|
|
9
|
+
container (e.g. an un-gated preview). At real mobile widths this is a
|
|
10
|
+
no-op since the viewport itself is already narrower. */
|
|
11
|
+
max-width: 768px;
|
|
12
|
+
margin-inline: auto;
|
|
13
|
+
min-height: var(--sv-shell-header-height, 60px);
|
|
14
|
+
padding: var(--sv-space-3) var(--sv-space-4);
|
|
15
|
+
padding-top: max(var(--sv-space-3), env(safe-area-inset-top));
|
|
16
|
+
padding-right: max(var(--sv-space-4), env(safe-area-inset-right));
|
|
17
|
+
padding-left: max(var(--sv-space-4), env(safe-area-inset-left));
|
|
18
|
+
background-color: var(--sv-color-surface);
|
|
19
|
+
border-bottom: 1px solid var(--sv-color-border);
|
|
20
|
+
position: sticky;
|
|
21
|
+
top: 0;
|
|
22
|
+
z-index: 101;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.brandGroup {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: var(--sv-space-3);
|
|
29
|
+
min-width: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Matches the runtime shell's own .mobileBrandIcon (shell.module.css) — the
|
|
33
|
+
default logo shown when the consumer doesn't supply one. */
|
|
34
|
+
.defaultLogo {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
flex-shrink: 0;
|
|
39
|
+
width: 36px;
|
|
40
|
+
height: 36px;
|
|
41
|
+
border-radius: var(--sv-radius-md);
|
|
42
|
+
background-color: var(--sv-color-accent);
|
|
43
|
+
color: var(--sv-color-text-on-accent);
|
|
44
|
+
font-weight: var(--sv-font-weight-semibold);
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.title {
|
|
49
|
+
font-size: var(--sv-font-size-md);
|
|
50
|
+
font-weight: var(--sv-font-weight-semibold);
|
|
51
|
+
color: var(--sv-color-text-primary);
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
text-overflow: ellipsis;
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.right {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
gap: var(--sv-space-2);
|
|
61
|
+
margin-left: auto;
|
|
62
|
+
flex-shrink: 0;
|
|
63
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.nav {
|
|
2
|
+
min-width: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.list {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: var(--sv-space-1);
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
list-style: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.link,
|
|
15
|
+
.trigger {
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
height: 36px;
|
|
19
|
+
padding: 0 var(--sv-space-3);
|
|
20
|
+
border: none;
|
|
21
|
+
border-radius: var(--sv-radius-md);
|
|
22
|
+
background: transparent;
|
|
23
|
+
color: var(--sv-color-text-primary);
|
|
24
|
+
font-family: var(--sv-font-family);
|
|
25
|
+
font-size: var(--sv-font-size-sm);
|
|
26
|
+
font-weight: var(--sv-font-weight-medium);
|
|
27
|
+
text-decoration: none;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media (hover: hover) {
|
|
32
|
+
.link:hover,
|
|
33
|
+
.trigger:hover {
|
|
34
|
+
background: var(--sv-color-surface-sunken);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.link:focus-visible,
|
|
39
|
+
.trigger:focus-visible {
|
|
40
|
+
outline: 2px solid var(--sv-color-focus-ring);
|
|
41
|
+
outline-offset: 2px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.triggerOpen {
|
|
45
|
+
background: var(--sv-color-surface-sunken);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (pointer: coarse) {
|
|
49
|
+
.link,
|
|
50
|
+
.trigger {
|
|
51
|
+
min-height: var(--sv-touch-target-min, 44px);
|
|
52
|
+
}
|
|
53
|
+
}
|