@pgcorp/ui-kit 0.1.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.
Files changed (251) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +157 -0
  3. package/docs/accessibility.md +27 -0
  4. package/docs/getting-started.md +80 -0
  5. package/docs/licensing.md +30 -0
  6. package/docs/public-api.md +39 -0
  7. package/docs/security.md +21 -0
  8. package/docs/theming.md +35 -0
  9. package/docs/versioning.md +23 -0
  10. package/index.ts +3 -0
  11. package/package.json +592 -0
  12. package/src/components/icons/_internal/generatedSputnigUiIconMarkup.ts +971 -0
  13. package/src/components/icons/sputnigUiIcons.ts +530 -0
  14. package/src/components/layout/SAppShell.vue +232 -0
  15. package/src/components/layout/SDockRegion.vue +200 -0
  16. package/src/components/layout/SResizeHandle.vue +251 -0
  17. package/src/components/layout/SSideMenuButton.vue +104 -0
  18. package/src/components/layout/SSideMenuRail.vue +47 -0
  19. package/src/components/layout/SStack.css +25 -0
  20. package/src/components/layout/SStack.vue +57 -0
  21. package/src/components/layout/SStatusBarShell.css +15 -0
  22. package/src/components/layout/SStatusBarShell.vue +26 -0
  23. package/src/components/layout/SWorkbenchLayout.vue +53 -0
  24. package/src/components/layout/SWorkbenchPanelShell.css +161 -0
  25. package/src/components/layout/SWorkbenchPanelShell.vue +286 -0
  26. package/src/components/layout/_internal/SAppBrand.css +45 -0
  27. package/src/components/layout/_internal/SAppBrand.vue +37 -0
  28. package/src/components/layout/_internal/SAppBrandContent.vue +30 -0
  29. package/src/components/layout/types.ts +28 -0
  30. package/src/components/shared/_internal/SDialogSurface.css +127 -0
  31. package/src/components/shared/_internal/SDialogSurface.vue +117 -0
  32. package/src/components/shared/_internal/SDisclosureSummary.css +92 -0
  33. package/src/components/shared/_internal/SDisclosureSummary.vue +121 -0
  34. package/src/components/shared/_internal/SListboxGroup.css +18 -0
  35. package/src/components/shared/_internal/SListboxGroup.vue +24 -0
  36. package/src/components/shared/_internal/SMenuItem.css +112 -0
  37. package/src/components/shared/_internal/SMenuItem.vue +213 -0
  38. package/src/components/shared/_internal/SMenuLayer.css +21 -0
  39. package/src/components/shared/_internal/SMenuLayer.vue +48 -0
  40. package/src/components/shared/_internal/SMenuSeparator.css +5 -0
  41. package/src/components/shared/_internal/SMenuSeparator.vue +13 -0
  42. package/src/components/shared/_internal/SToastItem.css +65 -0
  43. package/src/components/shared/_internal/SToastItem.vue +58 -0
  44. package/src/components/shared/_internal/STreeNode.vue +761 -0
  45. package/src/components/shared/_internal/dialogSurface.ts +105 -0
  46. package/src/components/shared/_internal/focusTrap.ts +40 -0
  47. package/src/components/shared/_internal/listboxContext.ts +16 -0
  48. package/src/components/shared/_internal/markerContract.ts +10 -0
  49. package/src/components/shared/_internal/menuContext.ts +23 -0
  50. package/src/components/shared/_internal/selectionContract.ts +239 -0
  51. package/src/components/shared/_internal/sidebarGroupContext.ts +31 -0
  52. package/src/components/shared/_internal/tabsContext.ts +57 -0
  53. package/src/components/shared/_internal/treeRuntime.ts +203 -0
  54. package/src/components/shared/_internal/useSelectionRoving.ts +162 -0
  55. package/src/components/shared/codeLanguages.ts +168 -0
  56. package/src/components/shared/complex/SKanbanCard.css +8 -0
  57. package/src/components/shared/complex/SKanbanCard.vue +76 -0
  58. package/src/components/shared/complex/SKanbanLane.vue +82 -0
  59. package/src/components/shared/complex/STree.css +24 -0
  60. package/src/components/shared/complex/STree.vue +288 -0
  61. package/src/components/shared/complex/treeAdapter.ts +210 -0
  62. package/src/components/shared/complex/types.ts +102 -0
  63. package/src/components/shared/containers/SCloudChrome.css +103 -0
  64. package/src/components/shared/containers/SCloudChrome.vue +87 -0
  65. package/src/components/shared/containers/SCloudChromeEmpty.css +10 -0
  66. package/src/components/shared/containers/SCloudChromeEmpty.vue +18 -0
  67. package/src/components/shared/containers/SCloudChromeRow.css +78 -0
  68. package/src/components/shared/containers/SCloudChromeRow.vue +108 -0
  69. package/src/components/shared/containers/SCollapsiblePanel.css +57 -0
  70. package/src/components/shared/containers/SCollapsiblePanel.vue +360 -0
  71. package/src/components/shared/containers/SDrawer.css +60 -0
  72. package/src/components/shared/containers/SDrawer.vue +86 -0
  73. package/src/components/shared/containers/SFormGrid.css +26 -0
  74. package/src/components/shared/containers/SFormGrid.vue +46 -0
  75. package/src/components/shared/containers/SFormGridItem.css +18 -0
  76. package/src/components/shared/containers/SFormGridItem.vue +29 -0
  77. package/src/components/shared/containers/SLeftSidebar.vue +74 -0
  78. package/src/components/shared/containers/SModal.css +27 -0
  79. package/src/components/shared/containers/SModal.vue +105 -0
  80. package/src/components/shared/containers/SPageHeader.css +66 -0
  81. package/src/components/shared/containers/SPageHeader.vue +45 -0
  82. package/src/components/shared/containers/SPanel.css +134 -0
  83. package/src/components/shared/containers/SPanel.vue +169 -0
  84. package/src/components/shared/containers/SPopover.css +35 -0
  85. package/src/components/shared/containers/SPopover.vue +551 -0
  86. package/src/components/shared/containers/SSidebarGroup.css +12 -0
  87. package/src/components/shared/containers/SSidebarGroup.vue +443 -0
  88. package/src/components/shared/containers/SSidebarSection.css +41 -0
  89. package/src/components/shared/containers/SSidebarSection.vue +268 -0
  90. package/src/components/shared/containers/disclosureSummary.ts +48 -0
  91. package/src/components/shared/containers/popover.ts +72 -0
  92. package/src/components/shared/containers/sidebar.ts +206 -0
  93. package/src/components/shared/controls/SButton.css +274 -0
  94. package/src/components/shared/controls/SButton.vue +211 -0
  95. package/src/components/shared/controls/SCheckbox.css +65 -0
  96. package/src/components/shared/controls/SCheckbox.vue +130 -0
  97. package/src/components/shared/controls/SCheckboxGroup.vue +134 -0
  98. package/src/components/shared/controls/SChoiceCards.css +29 -0
  99. package/src/components/shared/controls/SChoiceCards.vue +145 -0
  100. package/src/components/shared/controls/SColorSelect.vue +146 -0
  101. package/src/components/shared/controls/SComboboxTrigger.css +35 -0
  102. package/src/components/shared/controls/SComboboxTrigger.vue +122 -0
  103. package/src/components/shared/controls/SContextMenu.css +11 -0
  104. package/src/components/shared/controls/SContextMenu.vue +186 -0
  105. package/src/components/shared/controls/SContextToggleButton.vue +64 -0
  106. package/src/components/shared/controls/SDragHandle.vue +100 -0
  107. package/src/components/shared/controls/SDropdownMenu.css +5 -0
  108. package/src/components/shared/controls/SDropdownMenu.vue +188 -0
  109. package/src/components/shared/controls/SField.css +79 -0
  110. package/src/components/shared/controls/SField.vue +89 -0
  111. package/src/components/shared/controls/SFieldGroup.css +58 -0
  112. package/src/components/shared/controls/SFieldGroup.vue +117 -0
  113. package/src/components/shared/controls/SFieldLabel.css +12 -0
  114. package/src/components/shared/controls/SFieldLabel.vue +51 -0
  115. package/src/components/shared/controls/SInlineTokenEditor.css +61 -0
  116. package/src/components/shared/controls/SInlineTokenEditor.vue +1081 -0
  117. package/src/components/shared/controls/SInputText.css +66 -0
  118. package/src/components/shared/controls/SInputText.vue +321 -0
  119. package/src/components/shared/controls/SInteractiveSurface.css +72 -0
  120. package/src/components/shared/controls/SInteractiveSurface.vue +326 -0
  121. package/src/components/shared/controls/SLink.css +114 -0
  122. package/src/components/shared/controls/SLink.ts +85 -0
  123. package/src/components/shared/controls/SLink.vue +114 -0
  124. package/src/components/shared/controls/SListbox.css +31 -0
  125. package/src/components/shared/controls/SListbox.vue +388 -0
  126. package/src/components/shared/controls/SListboxOption.css +63 -0
  127. package/src/components/shared/controls/SListboxOption.vue +85 -0
  128. package/src/components/shared/controls/SMarker.css +19 -0
  129. package/src/components/shared/controls/SMarker.vue +33 -0
  130. package/src/components/shared/controls/SMenuSurface.css +20 -0
  131. package/src/components/shared/controls/SMenuSurface.vue +333 -0
  132. package/src/components/shared/controls/SSegmentedControl.css +38 -0
  133. package/src/components/shared/controls/SSegmentedControl.vue +134 -0
  134. package/src/components/shared/controls/SSelect.css +12 -0
  135. package/src/components/shared/controls/SSelect.vue +338 -0
  136. package/src/components/shared/controls/STextarea.css +31 -0
  137. package/src/components/shared/controls/STextarea.vue +316 -0
  138. package/src/components/shared/controls/_internal/SInlineTokenSurface.vue +224 -0
  139. package/src/components/shared/controls/menu.ts +178 -0
  140. package/src/components/shared/data-display/SActionCard.css +6 -0
  141. package/src/components/shared/data-display/SActionCard.vue +49 -0
  142. package/src/components/shared/data-display/SActionList.css +15 -0
  143. package/src/components/shared/data-display/SActionList.vue +34 -0
  144. package/src/components/shared/data-display/SActionListItem.css +114 -0
  145. package/src/components/shared/data-display/SActionListItem.vue +230 -0
  146. package/src/components/shared/data-display/SBadge.css +73 -0
  147. package/src/components/shared/data-display/SBadge.vue +52 -0
  148. package/src/components/shared/data-display/SCodeBlock.css +56 -0
  149. package/src/components/shared/data-display/SCodeBlock.vue +188 -0
  150. package/src/components/shared/data-display/SCodeEditor.css +178 -0
  151. package/src/components/shared/data-display/SCodeEditor.vue +274 -0
  152. package/src/components/shared/data-display/SCodeSearchPanel.vue +327 -0
  153. package/src/components/shared/data-display/SCopyField.vue +77 -0
  154. package/src/components/shared/data-display/SDocBlock.css +136 -0
  155. package/src/components/shared/data-display/SDocBlock.vue +358 -0
  156. package/src/components/shared/data-display/SEmptyState.css +42 -0
  157. package/src/components/shared/data-display/SEmptyState.vue +79 -0
  158. package/src/components/shared/data-display/SExpandableText.vue +314 -0
  159. package/src/components/shared/data-display/SJsonTree.css +6 -0
  160. package/src/components/shared/data-display/SJsonTree.vue +111 -0
  161. package/src/components/shared/data-display/SKeyValueGrid.css +37 -0
  162. package/src/components/shared/data-display/SKeyValueGrid.vue +277 -0
  163. package/src/components/shared/data-display/SLinkedSystemsList.vue +270 -0
  164. package/src/components/shared/data-display/SMessage.css +88 -0
  165. package/src/components/shared/data-display/SMessage.vue +152 -0
  166. package/src/components/shared/data-display/SMetricCard.css +32 -0
  167. package/src/components/shared/data-display/SMetricCard.vue +117 -0
  168. package/src/components/shared/data-display/SProgressBar.css +84 -0
  169. package/src/components/shared/data-display/SProgressBar.vue +114 -0
  170. package/src/components/shared/data-display/SProgressIndicator.css +59 -0
  171. package/src/components/shared/data-display/SProgressIndicator.vue +104 -0
  172. package/src/components/shared/data-display/SSectionHeader.css +84 -0
  173. package/src/components/shared/data-display/SSectionHeader.vue +58 -0
  174. package/src/components/shared/data-display/SStatus.css +90 -0
  175. package/src/components/shared/data-display/SStatus.vue +79 -0
  176. package/src/components/shared/data-display/STable.css +83 -0
  177. package/src/components/shared/data-display/STable.vue +339 -0
  178. package/src/components/shared/data-display/SToastContainer.css +53 -0
  179. package/src/components/shared/data-display/SToastContainer.vue +31 -0
  180. package/src/components/shared/data-display/STooltip.css +114 -0
  181. package/src/components/shared/data-display/STooltip.vue +550 -0
  182. package/src/components/shared/data-display/STooltipAnchor.css +21 -0
  183. package/src/components/shared/data-display/STooltipAnchor.vue +119 -0
  184. package/src/components/shared/data-display/SVirtualList.css +24 -0
  185. package/src/components/shared/data-display/SVirtualList.ts +19 -0
  186. package/src/components/shared/data-display/SVirtualList.vue +361 -0
  187. package/src/components/shared/data-display/json.ts +136 -0
  188. package/src/components/shared/data-display/table.ts +76 -0
  189. package/src/components/shared/database/SDataGrid.css +3 -0
  190. package/src/components/shared/database/SDataGrid.vue +464 -0
  191. package/src/components/shared/database/SSqlEditor.vue +363 -0
  192. package/src/components/shared/database/dataGrid.ts +61 -0
  193. package/src/components/shared/feedback/SAsyncState.css +26 -0
  194. package/src/components/shared/feedback/SAsyncState.vue +190 -0
  195. package/src/components/shared/graph/SGraphViewport.ts +1 -0
  196. package/src/components/shared/graph/SGraphViewport.vue +858 -0
  197. package/src/components/shared/graph/_internal/graphViewportContract.ts +362 -0
  198. package/src/components/shared/markdown.ts +169 -0
  199. package/src/components/shared/navigation/SBottomNav.vue +692 -0
  200. package/src/components/shared/navigation/SBreadcrumbs.css +26 -0
  201. package/src/components/shared/navigation/SBreadcrumbs.vue +155 -0
  202. package/src/components/shared/navigation/SCatalogNavigator.css +100 -0
  203. package/src/components/shared/navigation/SCatalogNavigator.vue +308 -0
  204. package/src/components/shared/navigation/STab.vue +363 -0
  205. package/src/components/shared/navigation/STabList.vue +442 -0
  206. package/src/components/shared/navigation/STabPanel.vue +165 -0
  207. package/src/components/shared/navigation/STabPanels.vue +33 -0
  208. package/src/components/shared/navigation/STabs.vue +617 -0
  209. package/src/components/shared/navigation/SWizardSteps.css +69 -0
  210. package/src/components/shared/navigation/SWizardSteps.vue +171 -0
  211. package/src/components/shared/navigation/_internal/SCatalogNavigatorGroup.vue +63 -0
  212. package/src/components/shared/persona/SPersonaProjectPicker.css +36 -0
  213. package/src/components/shared/persona/SPersonaProjectPicker.vue +361 -0
  214. package/src/components/shared/persona/SPersonaRunWorkbench.css +109 -0
  215. package/src/components/shared/persona/SPersonaRunWorkbench.vue +549 -0
  216. package/src/components/shared/persona/_internal/SPersonaRunConsole.css +40 -0
  217. package/src/components/shared/persona/_internal/SPersonaRunConsole.vue +298 -0
  218. package/src/components/shared/persona/_internal/inventory.ts +110 -0
  219. package/src/components/shared/persona/_internal/labels.ts +79 -0
  220. package/src/components/shared/persona/presentation.ts +371 -0
  221. package/src/components/shared/persona/types.ts +256 -0
  222. package/src/composables/uiPreferencesReset.ts +52 -0
  223. package/src/composables/useClipboard.ts +37 -0
  224. package/src/composables/useDialogOverlay.ts +85 -0
  225. package/src/composables/useDisclosure.ts +40 -0
  226. package/src/composables/useFloatingPosition.ts +245 -0
  227. package/src/composables/useNotifier.ts +26 -0
  228. package/src/composables/useSidebarPanelState.ts +610 -0
  229. package/src/internal/codeEditorContract.ts +110 -0
  230. package/src/internal/codeEditorExtensions.ts +27 -0
  231. package/src/internal/feedbackPresentation.ts +136 -0
  232. package/src/internal/fieldSurface.ts +59 -0
  233. package/src/internal/focusNavigation.ts +69 -0
  234. package/src/internal/inlineTokenEditorContract.ts +136 -0
  235. package/src/internal/interactiveElement.ts +33 -0
  236. package/src/internal/layerStack.ts +202 -0
  237. package/src/internal/linkTarget.ts +256 -0
  238. package/src/internal/ownedAttrs.ts +464 -0
  239. package/src/internal/passiveContentContract.ts +129 -0
  240. package/src/internal/pointerInteractionLease.ts +81 -0
  241. package/src/internal/runtimeContract.ts +194 -0
  242. package/src/internal/runtimeTheme.ts +159 -0
  243. package/src/internal/semanticSizing.ts +60 -0
  244. package/src/internal/useMenuLayer.ts +129 -0
  245. package/src/stores/useNotifierStore.ts +69 -0
  246. package/src/styles/reference.css +4 -0
  247. package/src/styles/style.css +151 -0
  248. package/src/styles/tokens.css +836 -0
  249. package/src/theme.ts +449 -0
  250. package/src/types/highlight-js-lib.d.ts +76 -0
  251. package/src/variants.ts +15 -0
@@ -0,0 +1,104 @@
1
+ <template>
2
+ <div :class="{ 'mt-2': offsetTop }">
3
+ <SDropdownMenu
4
+ v-if="contextMenuItems.length && contextMenuTrigger === 'click'"
5
+ v-slot="{ triggerAttrs }"
6
+ :items="contextMenuItems"
7
+ @select="$emit('context-menu-select', $event)"
8
+ >
9
+ <SButton
10
+ v-bind="{ ...buttonProps, ...triggerAttrs }"
11
+ @click="$emit('click', $event)"
12
+ />
13
+ </SDropdownMenu>
14
+ <SContextMenu
15
+ v-else-if="contextMenuItems.length"
16
+ :items="contextMenuItems"
17
+ :trigger="contextMenuTrigger"
18
+ @select="$emit('context-menu-select', $event)"
19
+ >
20
+ <SButton v-bind="buttonProps" @click="$emit('click', $event)" />
21
+ </SContextMenu>
22
+ <SButton v-else v-bind="buttonProps" @click="$emit('click', $event)" />
23
+ </div>
24
+ </template>
25
+
26
+ <script setup lang="ts">
27
+ import { computed, type Component } from 'vue'
28
+ import SContextMenu from '@pgcorp/ui-kit/shared/controls/SContextMenu.vue'
29
+ import SDropdownMenu from '@pgcorp/ui-kit/shared/controls/SDropdownMenu.vue'
30
+ import SButton from '@pgcorp/ui-kit/shared/controls/SButton.vue'
31
+ import type { SMenuEntry, SMenuSelectableEntry } from '@pgcorp/ui-kit/shared/controls/menu'
32
+ import type { BadgeSeverity } from '@pgcorp/ui-kit/shared/data-display/SBadge.vue'
33
+ import { useOwnedAttrs } from '../../internal/ownedAttrs'
34
+
35
+ defineOptions({
36
+ inheritAttrs: false,
37
+ })
38
+
39
+ const props = withDefaults(defineProps<{
40
+ title: string
41
+ icon: Component
42
+ badge?: string | number
43
+ badgeSeverity?: BadgeSeverity
44
+ active?: boolean
45
+ offsetTop?: boolean
46
+ disabled?: boolean
47
+ showLabel?: boolean
48
+ shortcut?: string | null
49
+ contextMenuItems?: readonly SMenuEntry[]
50
+ contextMenuTrigger?: 'contextmenu' | 'click' | 'both'
51
+ autofocus?: boolean
52
+ }>(), {
53
+ active: false,
54
+ badge: undefined,
55
+ badgeSeverity: 'secondary',
56
+ offsetTop: false,
57
+ disabled: false,
58
+ showLabel: false,
59
+ shortcut: null,
60
+ contextMenuItems: () => [],
61
+ contextMenuTrigger: 'contextmenu',
62
+ autofocus: false,
63
+ })
64
+
65
+ const ownedAttrs = useOwnedAttrs({ component: 'SSideMenuButton', owner: 'descendant SButton' })
66
+
67
+ defineEmits<{
68
+ (e: 'click', event: MouseEvent): void
69
+ (e: 'context-menu-select', entry: SMenuSelectableEntry): void
70
+ }>()
71
+
72
+ const resolvedTitle = computed(() => {
73
+ if (!props.shortcut) return props.title
74
+ return `${props.title} (${props.shortcut})`
75
+ })
76
+
77
+ const buttonProps = computed(() => {
78
+ const forwardedAttrs = ownedAttrs.bindings()
79
+ const forwardedDataTestId = forwardedAttrs['data-testid']
80
+ if (forwardedDataTestId !== undefined && typeof forwardedDataTestId !== 'string') {
81
+ throw new Error('SSideMenuButton: native attribute "data-testid" must be a string')
82
+ }
83
+ return {
84
+ ...forwardedAttrs,
85
+ 'aria-current': props.active && !props.disabled ? 'page' as const : undefined,
86
+ 'aria-label': props.title,
87
+ 'autofocus': props.autofocus,
88
+ 'data-testid': forwardedDataTestId,
89
+ 'title': resolvedTitle.value,
90
+ 'appearance': props.active && !props.disabled ? 'soft' as const : 'ghost' as const,
91
+ 'badge': props.badge,
92
+ 'badgeSeverity': props.badgeSeverity,
93
+ 'contentAlign': props.showLabel ? 'start' as const : 'center' as const,
94
+ 'disabled': props.disabled,
95
+ 'iconOnly': !props.showLabel,
96
+ 'label': props.showLabel ? props.title : undefined,
97
+ 'leadingIcon': props.icon,
98
+ 'severity': props.active && !props.disabled ? 'primary' as const : 'secondary' as const,
99
+ 'shape': props.showLabel ? 'row' as const : 'circle' as const,
100
+ 'size': 'md' as const,
101
+ 'width': props.showLabel ? 'full' as const : 'auto' as const,
102
+ }
103
+ })
104
+ </script>
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <div
3
+ v-if="visible"
4
+ v-bind="ownedAttrs.bindings()"
5
+ class="flex h-full min-h-0 flex-shrink-0 flex-col gap-1 overflow-x-hidden overflow-y-auto border-r border-surface-200 bg-surface-0 p-1 transition-[width] duration-[var(--s-motion-fast)] dark:border-surface-800 dark:bg-surface-950"
6
+ :class="expanded ? 'w-56 items-stretch' : 'w-12 items-center'"
7
+ >
8
+ <div class="flex flex-col gap-1" :class="expanded ? 'items-stretch' : 'items-center'">
9
+ <slot name="top" />
10
+ </div>
11
+
12
+ <div
13
+ class="mt-auto flex flex-col gap-1"
14
+ :class="expanded ? 'items-stretch' : 'items-center'"
15
+ >
16
+ <slot name="bottom" />
17
+ </div>
18
+ </div>
19
+ </template>
20
+
21
+ <script setup lang="ts">
22
+ import { watchEffect } from 'vue'
23
+ import { useOwnedAttrs } from '../../internal/ownedAttrs'
24
+
25
+ defineOptions({ inheritAttrs: false })
26
+
27
+ const props = withDefaults(defineProps<{
28
+ visible?: boolean
29
+ expanded?: boolean
30
+ }>(), {
31
+ visible: true,
32
+ expanded: false,
33
+ })
34
+
35
+ const ownedAttrs = useOwnedAttrs({
36
+ component: 'SSideMenuRail',
37
+ owner: 'visible side-menu rail root',
38
+ })
39
+
40
+ watchEffect(() => {
41
+ if (!props.visible) {
42
+ ownedAttrs.reject('side-menu rail is hidden')
43
+ return
44
+ }
45
+ ownedAttrs.bindings()
46
+ })
47
+ </script>
@@ -0,0 +1,25 @@
1
+ @reference "../../styles/reference.css";
2
+
3
+ .s-stack {
4
+ @apply flex min-h-0 min-w-0 flex-col;
5
+ }
6
+
7
+ .s-stack[data-fill='container'] {
8
+ @apply h-full flex-1;
9
+ }
10
+
11
+ .s-stack[data-align='start'] { @apply items-start; }
12
+ .s-stack[data-align='center'] { @apply items-center; }
13
+ .s-stack[data-align='end'] { @apply items-end; }
14
+ .s-stack[data-align='stretch'] { @apply items-stretch; }
15
+
16
+ .s-stack[data-gap='tight'] { gap: 0.25rem; }
17
+ .s-stack[data-gap='control'] { gap: var(--s-space-control-gap); }
18
+ .s-stack[data-gap='content'] { gap: var(--s-space-content-gap); }
19
+ .s-stack[data-gap='section'] { gap: var(--s-space-section-gap); }
20
+ .s-stack[data-gap='panel'] { gap: var(--s-space-panel-gap); }
21
+
22
+ .s-stack[data-padding-end='control'] { padding-block-end: var(--s-space-control-gap); }
23
+ .s-stack[data-padding-end='content'] { padding-block-end: var(--s-space-content-gap); }
24
+ .s-stack[data-padding-end='section'] { padding-block-end: var(--s-space-section-gap); }
25
+ .s-stack[data-padding-end='panel'] { padding-block-end: var(--s-space-panel-gap); }
@@ -0,0 +1,57 @@
1
+ <template>
2
+ <component
3
+ :is="as"
4
+ v-bind="ownedAttrs.bindings()"
5
+ class="s-stack"
6
+ :data-gap="gap"
7
+ :data-padding-end="paddingEnd"
8
+ :data-fill="fill"
9
+ :data-align="align"
10
+ >
11
+ <slot />
12
+ </component>
13
+ </template>
14
+
15
+ <script setup lang="ts">
16
+ import type { VNodeChild } from 'vue'
17
+ import { useOwnedAttrs } from '../../internal/ownedAttrs'
18
+
19
+ defineOptions({ inheritAttrs: false })
20
+
21
+ export type SStackGap = 'none' | 'tight' | 'control' | 'content' | 'section' | 'panel'
22
+ export type SStackPadding = 'none' | 'control' | 'content' | 'section' | 'panel'
23
+
24
+ /**
25
+ * Вертикальный layout-owner с ограниченной семантической шкалой интервалов.
26
+ * Vertical layout owner with a constrained semantic spacing scale.
27
+ */
28
+ export interface Props {
29
+ /** Семантический HTML-container без интерактивной роли. / Semantic non-interactive HTML container. */
30
+ as?: 'div' | 'section' | 'article' | 'ul' | 'ol'
31
+ /** Интервал между непосредственными участниками. / Gap between direct participants. */
32
+ gap?: SStackGap
33
+ /** Нижний внутренний отступ для scroll-safe composition. / End padding for scroll-safe composition. */
34
+ paddingEnd?: SStackPadding
35
+ /** Container заполняет доступную высоту. / Container fills the available height. */
36
+ fill?: 'content' | 'container'
37
+ /** Выравнивание участников по поперечной оси. / Cross-axis participant alignment. */
38
+ align?: 'stretch' | 'start' | 'center' | 'end'
39
+ }
40
+
41
+ withDefaults(defineProps<Props>(), {
42
+ as: 'div',
43
+ gap: 'content',
44
+ paddingEnd: 'none',
45
+ fill: 'content',
46
+ align: 'stretch',
47
+ })
48
+
49
+ const ownedAttrs = useOwnedAttrs({ component: 'SStack', owner: 'semantic stack root' })
50
+
51
+ defineSlots<{
52
+ /** Участники вертикальной композиции. / Vertical-composition participants. */
53
+ default?: () => VNodeChild
54
+ }>()
55
+ </script>
56
+
57
+ <style lang="postcss" src="./SStack.css" scoped></style>
@@ -0,0 +1,15 @@
1
+ @reference "../../styles/reference.css";
2
+
3
+ .s-status-bar-shell {
4
+ @apply relative isolate flex h-6 flex-shrink-0 items-center justify-between overflow-hidden border-t border-surface-200 bg-surface-0 px-3 text-xs text-surface-500 dark:border-surface-800 dark:bg-surface-950 dark:text-surface-400;
5
+ z-index: var(--s-layer-status);
6
+ }
7
+
8
+ .s-status-bar-shell__left,
9
+ .s-status-bar-shell__right {
10
+ @apply flex items-center gap-2;
11
+ }
12
+
13
+ .s-status-bar-shell__left {
14
+ @apply min-w-0;
15
+ }
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <footer
3
+ v-bind="ownedAttrs.bindings()"
4
+ class="s-status-bar-shell"
5
+ >
6
+ <div class="s-status-bar-shell__left">
7
+ <slot name="left" />
8
+ </div>
9
+
10
+ <div class="s-status-bar-shell__right">
11
+ <slot name="right" />
12
+ </div>
13
+
14
+ <slot />
15
+ </footer>
16
+ </template>
17
+
18
+ <script setup lang="ts">
19
+ import { useOwnedAttrs } from '../../internal/ownedAttrs'
20
+
21
+ defineOptions({ inheritAttrs: false })
22
+
23
+ const ownedAttrs = useOwnedAttrs({ component: 'SStatusBarShell', owner: 'status bar footer' })
24
+ </script>
25
+
26
+ <style lang="postcss" src="./SStatusBarShell.css" scoped></style>
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <div
3
+ v-bind="ownedAttrs.bindings()"
4
+ :id="resolvedScrollContainerId"
5
+ class="flex h-full w-full flex-col text-surface-700 dark:text-surface-200"
6
+ :class="{ 's-workbench-layout--mobile': isMobile }"
7
+ >
8
+ <div v-if="!isMobile" class="s-workbench-layout__header">
9
+ <slot name="header" />
10
+ </div>
11
+ <slot name="filter-banner" />
12
+ <slot name="search-panel" />
13
+ <div
14
+ :id="contentId"
15
+ class="relative flex-grow"
16
+ :class="{ 'overflow-y-auto': !isMobile }"
17
+ >
18
+ <slot />
19
+ </div>
20
+ <slot name="bottom-nav" :scroll-container-id="contentId" />
21
+ </div>
22
+ </template>
23
+
24
+ <script setup lang="ts">
25
+ import { computed } from 'vue'
26
+ import { useOwnedAttrs } from '../../internal/ownedAttrs'
27
+
28
+ defineOptions({ inheritAttrs: false })
29
+
30
+ const props = withDefaults(defineProps<{
31
+ scrollContainerId?: string
32
+ isMobile?: boolean
33
+ }>(), {
34
+ scrollContainerId: 's-workbench-scroll',
35
+ isMobile: false,
36
+ })
37
+
38
+ const resolvedScrollContainerId = computed(() => props.scrollContainerId)
39
+ const ownedAttrs = useOwnedAttrs({ component: 'SWorkbenchLayout', owner: 'workbench layout root' })
40
+ const contentId = computed(() => `${resolvedScrollContainerId.value}-content`)
41
+ </script>
42
+
43
+ <style scoped lang="postcss">
44
+ @reference "../../styles/reference.css";
45
+
46
+ .s-workbench-layout__header {
47
+ @apply shrink-0 border-b border-surface-200 px-4 py-3 dark:border-surface-700;
48
+ }
49
+
50
+ .s-workbench-layout--mobile {
51
+ padding-top: 0;
52
+ }
53
+ </style>
@@ -0,0 +1,161 @@
1
+ @reference "../../styles/reference.css";
2
+
3
+ .workbench-panel {
4
+ @apply flex h-full min-h-0 w-full flex-col bg-surface-0 text-surface-700 dark:bg-surface-900 dark:text-surface-200;
5
+ }
6
+
7
+ .workbench-header {
8
+ @apply flex shrink-0 items-center gap-2 border-b border-surface-200 px-2 py-1.5 dark:border-surface-700;
9
+ }
10
+
11
+ .title-container {
12
+ @apply min-w-0 flex-grow;
13
+ }
14
+
15
+ .workbench-shell {
16
+ @apply relative flex min-h-0 flex-grow gap-2 px-4 pb-0 pt-0;
17
+ --workbench-shell-bottom-inset: calc(env(safe-area-inset-bottom) + 0.75rem);
18
+ --workbench-resize-hitbox-clearance: 1rem;
19
+ --workbench-scroll-end-padding: calc(var(--workbench-shell-bottom-inset) + 0.25rem);
20
+ --workbench-secondary-overlay-offset: calc(
21
+ var(--workbench-secondary-size) + var(--workbench-shell-bottom-inset) + var(--workbench-resize-hitbox-clearance)
22
+ );
23
+ padding-bottom: 0;
24
+ }
25
+
26
+ .workbench-shell--none,
27
+ .workbench-shell--right-drawer {
28
+ @apply flex-row;
29
+ }
30
+
31
+ .workbench-shell--bottom-dock {
32
+ @apply flex-col gap-0;
33
+ }
34
+
35
+ .workbench-shell-main {
36
+ @apply min-h-0 min-w-0 flex-1 overflow-y-auto;
37
+ overscroll-behavior: contain;
38
+ scroll-padding-block-start: 0;
39
+ scroll-padding-block-end: var(--workbench-scroll-end-padding);
40
+ scrollbar-gutter: stable;
41
+ }
42
+
43
+ .workbench-shell--bottom-dock.workbench-shell--secondary-open .workbench-shell-main {
44
+ scroll-padding-block-end: var(--workbench-secondary-overlay-offset);
45
+ }
46
+
47
+ .workbench-shell-main-content {
48
+ @apply flex h-full min-h-full min-w-0 flex-1 flex-col gap-2 pb-0;
49
+ }
50
+
51
+ .workbench-shell--bottom-dock.workbench-shell--secondary-open .workbench-shell-main-content {
52
+ padding-bottom: 0;
53
+ }
54
+
55
+ .workbench-shell--bottom-dock.workbench-shell--secondary-open .workbench-shell-main-content::after {
56
+ width: 100%;
57
+ height: var(--workbench-secondary-overlay-offset);
58
+ display: block;
59
+ flex-shrink: 0;
60
+ content: "";
61
+ pointer-events: none;
62
+ }
63
+
64
+ .workbench-shell-secondary-wrap {
65
+ @apply relative min-h-0 min-w-0;
66
+ }
67
+
68
+ .workbench-shell-secondary-wrap--right-drawer {
69
+ @apply flex flex-shrink-0 flex-col px-2 py-3;
70
+ }
71
+
72
+ .workbench-shell-secondary-wrap--bottom-dock {
73
+ @apply pointer-events-none absolute inset-x-0 bottom-0 z-20 flex w-full flex-col justify-end px-5;
74
+ height: var(--workbench-secondary-overlay-offset);
75
+ padding-top: var(--workbench-resize-hitbox-clearance);
76
+ padding-bottom: var(--workbench-shell-bottom-inset);
77
+ }
78
+
79
+ .workbench-shell-secondary {
80
+ @apply relative min-h-0 min-w-0 flex-1 overflow-hidden rounded-xl border border-surface-200/80 bg-surface-0/92 shadow-md backdrop-blur-md dark:border-surface-700/80 dark:bg-surface-850/92;
81
+ background-clip: padding-box;
82
+ }
83
+
84
+ .workbench-shell-secondary--right-drawer {
85
+ @apply flex h-full w-full flex-col;
86
+ }
87
+
88
+ .workbench-shell-secondary--bottom-dock {
89
+ @apply pointer-events-auto h-full w-full flex-none flex-col;
90
+ }
91
+
92
+ .workbench-shell-secondary-header {
93
+ @apply flex items-center justify-between gap-3 border-b border-surface-200/80 px-4 py-3 dark:border-surface-700/80;
94
+ }
95
+
96
+ .workbench-shell-secondary-header--sticky {
97
+ @apply sticky top-0 z-10 bg-surface-0/92 backdrop-blur-md dark:bg-surface-850/92;
98
+ }
99
+
100
+ .workbench-shell-secondary-header-main {
101
+ @apply min-w-0 flex-1;
102
+ }
103
+
104
+ .workbench-shell-secondary-header-actions {
105
+ @apply flex shrink-0 items-center gap-2;
106
+ }
107
+
108
+ .workbench-shell-secondary-content {
109
+ @apply min-h-0 min-w-0 flex-1 overflow-y-auto px-5 pt-4;
110
+ padding-bottom: calc(var(--workbench-scroll-end-padding) + 1rem);
111
+ overscroll-behavior: contain;
112
+ scroll-padding-block-end: var(--workbench-scroll-end-padding);
113
+ scrollbar-gutter: stable;
114
+ }
115
+
116
+ .workbench-shell-secondary--right-drawer .workbench-shell-secondary-content {
117
+ padding-bottom: calc(var(--workbench-scroll-end-padding) + 1.25rem);
118
+ }
119
+
120
+ .workbench-shell-secondary--bottom-dock .workbench-shell-secondary-content {
121
+ @apply overflow-hidden p-0;
122
+ padding-bottom: 0;
123
+ }
124
+
125
+ .loading-message-full {
126
+ @apply flex h-full items-center justify-center text-surface-500 dark:text-surface-400;
127
+ }
128
+
129
+ @media (max-width: 1023px) {
130
+ .workbench-shell {
131
+ --workbench-shell-bottom-inset: max(4.25rem, calc(env(safe-area-inset-bottom) + 3.5rem));
132
+ --workbench-scroll-end-padding: calc(var(--workbench-shell-bottom-inset) + 1rem);
133
+ }
134
+
135
+ .workbench-shell--right-drawer.workbench-shell--secondary-responsive-stack {
136
+ flex-direction: column;
137
+ gap: 0.5rem;
138
+ }
139
+
140
+ .workbench-shell--secondary-responsive-stack .workbench-shell-secondary-wrap--right-drawer {
141
+ width: 100%;
142
+ max-width: none;
143
+ height: min(16rem, 38%);
144
+ flex: none;
145
+ padding: 0;
146
+ }
147
+
148
+ .workbench-shell--secondary-responsive-stack
149
+ .workbench-shell-secondary--right-drawer
150
+ .workbench-shell-secondary-content {
151
+ padding-bottom: 1rem;
152
+ }
153
+
154
+ .workbench-shell-secondary-content {
155
+ padding-bottom: calc(var(--workbench-scroll-end-padding) + 1.75rem);
156
+ }
157
+
158
+ .workbench-shell-secondary--right-drawer .workbench-shell-secondary-content {
159
+ padding-bottom: calc(var(--workbench-scroll-end-padding) + 2rem);
160
+ }
161
+ }