@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.
- package/LICENSE +21 -0
- package/README.md +157 -0
- package/docs/accessibility.md +27 -0
- package/docs/getting-started.md +80 -0
- package/docs/licensing.md +30 -0
- package/docs/public-api.md +39 -0
- package/docs/security.md +21 -0
- package/docs/theming.md +35 -0
- package/docs/versioning.md +23 -0
- package/index.ts +3 -0
- package/package.json +592 -0
- package/src/components/icons/_internal/generatedSputnigUiIconMarkup.ts +971 -0
- package/src/components/icons/sputnigUiIcons.ts +530 -0
- package/src/components/layout/SAppShell.vue +232 -0
- package/src/components/layout/SDockRegion.vue +200 -0
- package/src/components/layout/SResizeHandle.vue +251 -0
- package/src/components/layout/SSideMenuButton.vue +104 -0
- package/src/components/layout/SSideMenuRail.vue +47 -0
- package/src/components/layout/SStack.css +25 -0
- package/src/components/layout/SStack.vue +57 -0
- package/src/components/layout/SStatusBarShell.css +15 -0
- package/src/components/layout/SStatusBarShell.vue +26 -0
- package/src/components/layout/SWorkbenchLayout.vue +53 -0
- package/src/components/layout/SWorkbenchPanelShell.css +161 -0
- package/src/components/layout/SWorkbenchPanelShell.vue +286 -0
- package/src/components/layout/_internal/SAppBrand.css +45 -0
- package/src/components/layout/_internal/SAppBrand.vue +37 -0
- package/src/components/layout/_internal/SAppBrandContent.vue +30 -0
- package/src/components/layout/types.ts +28 -0
- package/src/components/shared/_internal/SDialogSurface.css +127 -0
- package/src/components/shared/_internal/SDialogSurface.vue +117 -0
- package/src/components/shared/_internal/SDisclosureSummary.css +92 -0
- package/src/components/shared/_internal/SDisclosureSummary.vue +121 -0
- package/src/components/shared/_internal/SListboxGroup.css +18 -0
- package/src/components/shared/_internal/SListboxGroup.vue +24 -0
- package/src/components/shared/_internal/SMenuItem.css +112 -0
- package/src/components/shared/_internal/SMenuItem.vue +213 -0
- package/src/components/shared/_internal/SMenuLayer.css +21 -0
- package/src/components/shared/_internal/SMenuLayer.vue +48 -0
- package/src/components/shared/_internal/SMenuSeparator.css +5 -0
- package/src/components/shared/_internal/SMenuSeparator.vue +13 -0
- package/src/components/shared/_internal/SToastItem.css +65 -0
- package/src/components/shared/_internal/SToastItem.vue +58 -0
- package/src/components/shared/_internal/STreeNode.vue +761 -0
- package/src/components/shared/_internal/dialogSurface.ts +105 -0
- package/src/components/shared/_internal/focusTrap.ts +40 -0
- package/src/components/shared/_internal/listboxContext.ts +16 -0
- package/src/components/shared/_internal/markerContract.ts +10 -0
- package/src/components/shared/_internal/menuContext.ts +23 -0
- package/src/components/shared/_internal/selectionContract.ts +239 -0
- package/src/components/shared/_internal/sidebarGroupContext.ts +31 -0
- package/src/components/shared/_internal/tabsContext.ts +57 -0
- package/src/components/shared/_internal/treeRuntime.ts +203 -0
- package/src/components/shared/_internal/useSelectionRoving.ts +162 -0
- package/src/components/shared/codeLanguages.ts +168 -0
- package/src/components/shared/complex/SKanbanCard.css +8 -0
- package/src/components/shared/complex/SKanbanCard.vue +76 -0
- package/src/components/shared/complex/SKanbanLane.vue +82 -0
- package/src/components/shared/complex/STree.css +24 -0
- package/src/components/shared/complex/STree.vue +288 -0
- package/src/components/shared/complex/treeAdapter.ts +210 -0
- package/src/components/shared/complex/types.ts +102 -0
- package/src/components/shared/containers/SCloudChrome.css +103 -0
- package/src/components/shared/containers/SCloudChrome.vue +87 -0
- package/src/components/shared/containers/SCloudChromeEmpty.css +10 -0
- package/src/components/shared/containers/SCloudChromeEmpty.vue +18 -0
- package/src/components/shared/containers/SCloudChromeRow.css +78 -0
- package/src/components/shared/containers/SCloudChromeRow.vue +108 -0
- package/src/components/shared/containers/SCollapsiblePanel.css +57 -0
- package/src/components/shared/containers/SCollapsiblePanel.vue +360 -0
- package/src/components/shared/containers/SDrawer.css +60 -0
- package/src/components/shared/containers/SDrawer.vue +86 -0
- package/src/components/shared/containers/SFormGrid.css +26 -0
- package/src/components/shared/containers/SFormGrid.vue +46 -0
- package/src/components/shared/containers/SFormGridItem.css +18 -0
- package/src/components/shared/containers/SFormGridItem.vue +29 -0
- package/src/components/shared/containers/SLeftSidebar.vue +74 -0
- package/src/components/shared/containers/SModal.css +27 -0
- package/src/components/shared/containers/SModal.vue +105 -0
- package/src/components/shared/containers/SPageHeader.css +66 -0
- package/src/components/shared/containers/SPageHeader.vue +45 -0
- package/src/components/shared/containers/SPanel.css +134 -0
- package/src/components/shared/containers/SPanel.vue +169 -0
- package/src/components/shared/containers/SPopover.css +35 -0
- package/src/components/shared/containers/SPopover.vue +551 -0
- package/src/components/shared/containers/SSidebarGroup.css +12 -0
- package/src/components/shared/containers/SSidebarGroup.vue +443 -0
- package/src/components/shared/containers/SSidebarSection.css +41 -0
- package/src/components/shared/containers/SSidebarSection.vue +268 -0
- package/src/components/shared/containers/disclosureSummary.ts +48 -0
- package/src/components/shared/containers/popover.ts +72 -0
- package/src/components/shared/containers/sidebar.ts +206 -0
- package/src/components/shared/controls/SButton.css +274 -0
- package/src/components/shared/controls/SButton.vue +211 -0
- package/src/components/shared/controls/SCheckbox.css +65 -0
- package/src/components/shared/controls/SCheckbox.vue +130 -0
- package/src/components/shared/controls/SCheckboxGroup.vue +134 -0
- package/src/components/shared/controls/SChoiceCards.css +29 -0
- package/src/components/shared/controls/SChoiceCards.vue +145 -0
- package/src/components/shared/controls/SColorSelect.vue +146 -0
- package/src/components/shared/controls/SComboboxTrigger.css +35 -0
- package/src/components/shared/controls/SComboboxTrigger.vue +122 -0
- package/src/components/shared/controls/SContextMenu.css +11 -0
- package/src/components/shared/controls/SContextMenu.vue +186 -0
- package/src/components/shared/controls/SContextToggleButton.vue +64 -0
- package/src/components/shared/controls/SDragHandle.vue +100 -0
- package/src/components/shared/controls/SDropdownMenu.css +5 -0
- package/src/components/shared/controls/SDropdownMenu.vue +188 -0
- package/src/components/shared/controls/SField.css +79 -0
- package/src/components/shared/controls/SField.vue +89 -0
- package/src/components/shared/controls/SFieldGroup.css +58 -0
- package/src/components/shared/controls/SFieldGroup.vue +117 -0
- package/src/components/shared/controls/SFieldLabel.css +12 -0
- package/src/components/shared/controls/SFieldLabel.vue +51 -0
- package/src/components/shared/controls/SInlineTokenEditor.css +61 -0
- package/src/components/shared/controls/SInlineTokenEditor.vue +1081 -0
- package/src/components/shared/controls/SInputText.css +66 -0
- package/src/components/shared/controls/SInputText.vue +321 -0
- package/src/components/shared/controls/SInteractiveSurface.css +72 -0
- package/src/components/shared/controls/SInteractiveSurface.vue +326 -0
- package/src/components/shared/controls/SLink.css +114 -0
- package/src/components/shared/controls/SLink.ts +85 -0
- package/src/components/shared/controls/SLink.vue +114 -0
- package/src/components/shared/controls/SListbox.css +31 -0
- package/src/components/shared/controls/SListbox.vue +388 -0
- package/src/components/shared/controls/SListboxOption.css +63 -0
- package/src/components/shared/controls/SListboxOption.vue +85 -0
- package/src/components/shared/controls/SMarker.css +19 -0
- package/src/components/shared/controls/SMarker.vue +33 -0
- package/src/components/shared/controls/SMenuSurface.css +20 -0
- package/src/components/shared/controls/SMenuSurface.vue +333 -0
- package/src/components/shared/controls/SSegmentedControl.css +38 -0
- package/src/components/shared/controls/SSegmentedControl.vue +134 -0
- package/src/components/shared/controls/SSelect.css +12 -0
- package/src/components/shared/controls/SSelect.vue +338 -0
- package/src/components/shared/controls/STextarea.css +31 -0
- package/src/components/shared/controls/STextarea.vue +316 -0
- package/src/components/shared/controls/_internal/SInlineTokenSurface.vue +224 -0
- package/src/components/shared/controls/menu.ts +178 -0
- package/src/components/shared/data-display/SActionCard.css +6 -0
- package/src/components/shared/data-display/SActionCard.vue +49 -0
- package/src/components/shared/data-display/SActionList.css +15 -0
- package/src/components/shared/data-display/SActionList.vue +34 -0
- package/src/components/shared/data-display/SActionListItem.css +114 -0
- package/src/components/shared/data-display/SActionListItem.vue +230 -0
- package/src/components/shared/data-display/SBadge.css +73 -0
- package/src/components/shared/data-display/SBadge.vue +52 -0
- package/src/components/shared/data-display/SCodeBlock.css +56 -0
- package/src/components/shared/data-display/SCodeBlock.vue +188 -0
- package/src/components/shared/data-display/SCodeEditor.css +178 -0
- package/src/components/shared/data-display/SCodeEditor.vue +274 -0
- package/src/components/shared/data-display/SCodeSearchPanel.vue +327 -0
- package/src/components/shared/data-display/SCopyField.vue +77 -0
- package/src/components/shared/data-display/SDocBlock.css +136 -0
- package/src/components/shared/data-display/SDocBlock.vue +358 -0
- package/src/components/shared/data-display/SEmptyState.css +42 -0
- package/src/components/shared/data-display/SEmptyState.vue +79 -0
- package/src/components/shared/data-display/SExpandableText.vue +314 -0
- package/src/components/shared/data-display/SJsonTree.css +6 -0
- package/src/components/shared/data-display/SJsonTree.vue +111 -0
- package/src/components/shared/data-display/SKeyValueGrid.css +37 -0
- package/src/components/shared/data-display/SKeyValueGrid.vue +277 -0
- package/src/components/shared/data-display/SLinkedSystemsList.vue +270 -0
- package/src/components/shared/data-display/SMessage.css +88 -0
- package/src/components/shared/data-display/SMessage.vue +152 -0
- package/src/components/shared/data-display/SMetricCard.css +32 -0
- package/src/components/shared/data-display/SMetricCard.vue +117 -0
- package/src/components/shared/data-display/SProgressBar.css +84 -0
- package/src/components/shared/data-display/SProgressBar.vue +114 -0
- package/src/components/shared/data-display/SProgressIndicator.css +59 -0
- package/src/components/shared/data-display/SProgressIndicator.vue +104 -0
- package/src/components/shared/data-display/SSectionHeader.css +84 -0
- package/src/components/shared/data-display/SSectionHeader.vue +58 -0
- package/src/components/shared/data-display/SStatus.css +90 -0
- package/src/components/shared/data-display/SStatus.vue +79 -0
- package/src/components/shared/data-display/STable.css +83 -0
- package/src/components/shared/data-display/STable.vue +339 -0
- package/src/components/shared/data-display/SToastContainer.css +53 -0
- package/src/components/shared/data-display/SToastContainer.vue +31 -0
- package/src/components/shared/data-display/STooltip.css +114 -0
- package/src/components/shared/data-display/STooltip.vue +550 -0
- package/src/components/shared/data-display/STooltipAnchor.css +21 -0
- package/src/components/shared/data-display/STooltipAnchor.vue +119 -0
- package/src/components/shared/data-display/SVirtualList.css +24 -0
- package/src/components/shared/data-display/SVirtualList.ts +19 -0
- package/src/components/shared/data-display/SVirtualList.vue +361 -0
- package/src/components/shared/data-display/json.ts +136 -0
- package/src/components/shared/data-display/table.ts +76 -0
- package/src/components/shared/database/SDataGrid.css +3 -0
- package/src/components/shared/database/SDataGrid.vue +464 -0
- package/src/components/shared/database/SSqlEditor.vue +363 -0
- package/src/components/shared/database/dataGrid.ts +61 -0
- package/src/components/shared/feedback/SAsyncState.css +26 -0
- package/src/components/shared/feedback/SAsyncState.vue +190 -0
- package/src/components/shared/graph/SGraphViewport.ts +1 -0
- package/src/components/shared/graph/SGraphViewport.vue +858 -0
- package/src/components/shared/graph/_internal/graphViewportContract.ts +362 -0
- package/src/components/shared/markdown.ts +169 -0
- package/src/components/shared/navigation/SBottomNav.vue +692 -0
- package/src/components/shared/navigation/SBreadcrumbs.css +26 -0
- package/src/components/shared/navigation/SBreadcrumbs.vue +155 -0
- package/src/components/shared/navigation/SCatalogNavigator.css +100 -0
- package/src/components/shared/navigation/SCatalogNavigator.vue +308 -0
- package/src/components/shared/navigation/STab.vue +363 -0
- package/src/components/shared/navigation/STabList.vue +442 -0
- package/src/components/shared/navigation/STabPanel.vue +165 -0
- package/src/components/shared/navigation/STabPanels.vue +33 -0
- package/src/components/shared/navigation/STabs.vue +617 -0
- package/src/components/shared/navigation/SWizardSteps.css +69 -0
- package/src/components/shared/navigation/SWizardSteps.vue +171 -0
- package/src/components/shared/navigation/_internal/SCatalogNavigatorGroup.vue +63 -0
- package/src/components/shared/persona/SPersonaProjectPicker.css +36 -0
- package/src/components/shared/persona/SPersonaProjectPicker.vue +361 -0
- package/src/components/shared/persona/SPersonaRunWorkbench.css +109 -0
- package/src/components/shared/persona/SPersonaRunWorkbench.vue +549 -0
- package/src/components/shared/persona/_internal/SPersonaRunConsole.css +40 -0
- package/src/components/shared/persona/_internal/SPersonaRunConsole.vue +298 -0
- package/src/components/shared/persona/_internal/inventory.ts +110 -0
- package/src/components/shared/persona/_internal/labels.ts +79 -0
- package/src/components/shared/persona/presentation.ts +371 -0
- package/src/components/shared/persona/types.ts +256 -0
- package/src/composables/uiPreferencesReset.ts +52 -0
- package/src/composables/useClipboard.ts +37 -0
- package/src/composables/useDialogOverlay.ts +85 -0
- package/src/composables/useDisclosure.ts +40 -0
- package/src/composables/useFloatingPosition.ts +245 -0
- package/src/composables/useNotifier.ts +26 -0
- package/src/composables/useSidebarPanelState.ts +610 -0
- package/src/internal/codeEditorContract.ts +110 -0
- package/src/internal/codeEditorExtensions.ts +27 -0
- package/src/internal/feedbackPresentation.ts +136 -0
- package/src/internal/fieldSurface.ts +59 -0
- package/src/internal/focusNavigation.ts +69 -0
- package/src/internal/inlineTokenEditorContract.ts +136 -0
- package/src/internal/interactiveElement.ts +33 -0
- package/src/internal/layerStack.ts +202 -0
- package/src/internal/linkTarget.ts +256 -0
- package/src/internal/ownedAttrs.ts +464 -0
- package/src/internal/passiveContentContract.ts +129 -0
- package/src/internal/pointerInteractionLease.ts +81 -0
- package/src/internal/runtimeContract.ts +194 -0
- package/src/internal/runtimeTheme.ts +159 -0
- package/src/internal/semanticSizing.ts +60 -0
- package/src/internal/useMenuLayer.ts +129 -0
- package/src/stores/useNotifierStore.ts +69 -0
- package/src/styles/reference.css +4 -0
- package/src/styles/style.css +151 -0
- package/src/styles/tokens.css +836 -0
- package/src/theme.ts +449 -0
- package/src/types/highlight-js-lib.d.ts +76 -0
- package/src/variants.ts +15 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PGCorp
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# @pgcorp/ui-kit
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@pgcorp/ui-kit)
|
|
4
|
+
[](https://www.npmjs.com/package/@pgcorp/ui-kit)
|
|
5
|
+
[](https://vuejs.org/)
|
|
6
|
+
[](./LICENSE)
|
|
7
|
+
|
|
8
|
+
Production design system PGCorp для Vue 3: типизированные компоненты, layout-примитивы,
|
|
9
|
+
design tokens, темы, accessibility-контракты и готовые сложные интерфейсные паттерны.
|
|
10
|
+
|
|
11
|
+
PGCorp production design system for Vue 3: typed components, layout primitives,
|
|
12
|
+
design tokens, themes, accessibility contracts, and reusable complex UI patterns.
|
|
13
|
+
|
|
14
|
+
## Возможности / Features
|
|
15
|
+
|
|
16
|
+
- 118 точных package exports без wildcard и private imports.
|
|
17
|
+
- Vue Single-File Components с TypeScript-контрактами.
|
|
18
|
+
- Светлые и тёмные темы на semantic CSS tokens.
|
|
19
|
+
- Controls, navigation, data display, overlays, workbench layouts, editors and graphs.
|
|
20
|
+
- Keyboard, focus, ARIA, disabled, loading and error states.
|
|
21
|
+
- Проверяемые unit, Storybook, browser, accessibility и visual contracts.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
- 118 exact package exports without wildcards or private imports.
|
|
26
|
+
- Vue Single-File Components with TypeScript contracts.
|
|
27
|
+
- Light and dark themes built on semantic CSS tokens.
|
|
28
|
+
- Controls, navigation, data display, overlays, workbench layouts, editors, and graphs.
|
|
29
|
+
- Keyboard, focus, ARIA, disabled, loading, and error states.
|
|
30
|
+
- Executable unit, Storybook, browser, accessibility, and visual contracts.
|
|
31
|
+
|
|
32
|
+
## Установка / Installation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install @pgcorp/ui-kit vue pinia vue-router
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Требования:
|
|
39
|
+
|
|
40
|
+
- Node.js `>=20.19`;
|
|
41
|
+
- npm `>=11.10 <12`;
|
|
42
|
+
- Vue `^3.5`;
|
|
43
|
+
- Pinia `^3.0`;
|
|
44
|
+
- Vue Router `^5.0`;
|
|
45
|
+
- Vite-based Vue application.
|
|
46
|
+
|
|
47
|
+
Requirements:
|
|
48
|
+
|
|
49
|
+
- Node.js `>=20.19`;
|
|
50
|
+
- npm `>=11.10 <12`;
|
|
51
|
+
- Vue `^3.5`;
|
|
52
|
+
- Pinia `^3.0`;
|
|
53
|
+
- Vue Router `^5.0`;
|
|
54
|
+
- a Vite-based Vue application.
|
|
55
|
+
|
|
56
|
+
## Быстрый старт / Quick start
|
|
57
|
+
|
|
58
|
+
Подключите базовые стили один раз в entrypoint приложения:
|
|
59
|
+
|
|
60
|
+
Import the base stylesheet once in the application entrypoint:
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { createApp } from 'vue'
|
|
64
|
+
import '@pgcorp/ui-kit/style.css'
|
|
65
|
+
|
|
66
|
+
import App from './App.vue'
|
|
67
|
+
|
|
68
|
+
createApp(App).mount('#app')
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Импортируйте компоненты только через документированные subpaths:
|
|
72
|
+
|
|
73
|
+
Import components only through documented subpaths:
|
|
74
|
+
|
|
75
|
+
```vue
|
|
76
|
+
<script setup lang="ts">
|
|
77
|
+
import SButton from '@pgcorp/ui-kit/shared/controls/SButton.vue'
|
|
78
|
+
import SPanel from '@pgcorp/ui-kit/shared/containers/SPanel.vue'
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<template>
|
|
82
|
+
<SPanel>
|
|
83
|
+
<template #header>Профиль</template>
|
|
84
|
+
<SButton variant="primary">Сохранить</SButton>
|
|
85
|
+
</SPanel>
|
|
86
|
+
</template>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Стили и темы / Styling and themes
|
|
90
|
+
|
|
91
|
+
`style.css` подключает semantic tokens и базовый визуальный контракт. Для token-only
|
|
92
|
+
интеграции доступен отдельный export:
|
|
93
|
+
|
|
94
|
+
`style.css` provides semantic tokens and the base visual contract. A token-only
|
|
95
|
+
integration is available as a separate export:
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
import '@pgcorp/ui-kit/tokens.css'
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Компоненты используют semantic tokens. Consumer не переоформляет внутренний DOM
|
|
102
|
+
компонентов через deep selectors; варианты задаются публичными props, slots и tokens.
|
|
103
|
+
|
|
104
|
+
Components consume semantic tokens. Consumers do not restyle component internals
|
|
105
|
+
through deep selectors; variants are expressed through public props, slots, and tokens.
|
|
106
|
+
|
|
107
|
+
Подробнее: [темы и tokens](./docs/theming.md).
|
|
108
|
+
|
|
109
|
+
Learn more: [themes and tokens](./docs/theming.md).
|
|
110
|
+
|
|
111
|
+
## Публичный API / Public API
|
|
112
|
+
|
|
113
|
+
Корневой export содержит theme, variants и icon registry:
|
|
114
|
+
|
|
115
|
+
The root export contains theme, variants, and the icon registry:
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
import { applyThemeIdToDocument, uiVariantClasses } from '@pgcorp/ui-kit'
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Компоненты и модули импортируются через exact subpaths из `package.json#exports`.
|
|
122
|
+
Wildcard imports и доступ к внутренним путям пакета не поддерживаются.
|
|
123
|
+
|
|
124
|
+
Components and modules are imported through exact subpaths declared in
|
|
125
|
+
`package.json#exports`. Wildcard imports and package-internal paths are unsupported.
|
|
126
|
+
|
|
127
|
+
Полный маршрут по API: [Public API](./docs/public-api.md).
|
|
128
|
+
|
|
129
|
+
Complete API guide: [Public API](./docs/public-api.md).
|
|
130
|
+
|
|
131
|
+
## Документация / Documentation
|
|
132
|
+
|
|
133
|
+
- [Начало работы / Getting started](./docs/getting-started.md)
|
|
134
|
+
- [Public API](./docs/public-api.md)
|
|
135
|
+
- [Темы и design tokens / Themes and design tokens](./docs/theming.md)
|
|
136
|
+
- [Accessibility](./docs/accessibility.md)
|
|
137
|
+
- [Версии и релизы / Versioning and releases](./docs/versioning.md)
|
|
138
|
+
- [Лицензирование и Enterprise / Licensing and Enterprise](./docs/licensing.md)
|
|
139
|
+
- [Безопасность / Security](./docs/security.md)
|
|
140
|
+
|
|
141
|
+
## Поддержка / Support
|
|
142
|
+
|
|
143
|
+
Ошибки и запросы на изменение принимаются по адресу
|
|
144
|
+
[remand-gambol4g@icloud.com](mailto:remand-gambol4g@icloud.com).
|
|
145
|
+
Security reports отправляются по процессу из [Security](./docs/security.md).
|
|
146
|
+
|
|
147
|
+
Bugs and change requests are accepted at
|
|
148
|
+
[remand-gambol4g@icloud.com](mailto:remand-gambol4g@icloud.com).
|
|
149
|
+
Security reports follow the process documented in [Security](./docs/security.md).
|
|
150
|
+
|
|
151
|
+
## Лицензия / License
|
|
152
|
+
|
|
153
|
+
`@pgcorp/ui-kit` распространяется по лицензии MIT. Copyright и текст лицензии
|
|
154
|
+
должны сохраняться в копиях и существенных частях пакета. См. [LICENSE](./LICENSE).
|
|
155
|
+
|
|
156
|
+
`@pgcorp/ui-kit` is distributed under the MIT License. The copyright and license
|
|
157
|
+
notice must be retained in copies and substantial portions. See [LICENSE](./LICENSE).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Accessibility
|
|
2
|
+
|
|
3
|
+
## Русский
|
|
4
|
+
|
|
5
|
+
Интерактивная семантика принадлежит leaf-компонентам UI-kit. Они отвечают за:
|
|
6
|
+
|
|
7
|
+
- keyboard navigation и ожидаемые клавиши;
|
|
8
|
+
- видимый focus и focus restoration;
|
|
9
|
+
- accessible name, roles и ARIA state;
|
|
10
|
+
- disabled, loading, invalid и error states;
|
|
11
|
+
- hitbox и поведение на узком viewport.
|
|
12
|
+
|
|
13
|
+
Consumer обязан передавать человекочитаемые labels и не заменять семантику
|
|
14
|
+
компонента локальными DOM listeners или CSS.
|
|
15
|
+
|
|
16
|
+
## English
|
|
17
|
+
|
|
18
|
+
Interactive semantics belong to UI-kit leaf components. They own:
|
|
19
|
+
|
|
20
|
+
- keyboard navigation and expected keys;
|
|
21
|
+
- visible focus and focus restoration;
|
|
22
|
+
- accessible names, roles, and ARIA state;
|
|
23
|
+
- disabled, loading, invalid, and error states;
|
|
24
|
+
- hitboxes and narrow-viewport behavior.
|
|
25
|
+
|
|
26
|
+
Consumers must provide human-readable labels and must not replace component
|
|
27
|
+
semantics with local DOM listeners or CSS.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Начало работы / Getting started
|
|
2
|
+
|
|
3
|
+
## Русский
|
|
4
|
+
|
|
5
|
+
### Установка
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @pgcorp/ui-kit vue pinia vue-router
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
UI-kit поставляется как Vue 3 SFC/TypeScript package для Vite-based приложений.
|
|
12
|
+
Consumer отвечает за единственные экземпляры `vue`, `pinia` и `vue-router`.
|
|
13
|
+
|
|
14
|
+
### Подключение
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import { createApp } from 'vue'
|
|
18
|
+
import { createPinia } from 'pinia'
|
|
19
|
+
import router from './router'
|
|
20
|
+
import '@pgcorp/ui-kit/style.css'
|
|
21
|
+
|
|
22
|
+
import App from './App.vue'
|
|
23
|
+
|
|
24
|
+
createApp(App).use(createPinia()).use(router).mount('#app')
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Каждый компонент импортируется через точный публичный subpath:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import SButton from '@pgcorp/ui-kit/shared/controls/SButton.vue'
|
|
31
|
+
import SModal from '@pgcorp/ui-kit/shared/containers/SModal.vue'
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Не используйте пути `@pgcorp/ui-kit/src/*`: они не являются public API.
|
|
35
|
+
|
|
36
|
+
### Проверка интеграции
|
|
37
|
+
|
|
38
|
+
Production build consumer-приложения должен выполняться без alias на исходный
|
|
39
|
+
monorepo и без копирования файлов UI-kit. TypeScript и Vue language tools должны
|
|
40
|
+
разрешать типы непосредственно из package exports.
|
|
41
|
+
|
|
42
|
+
## English
|
|
43
|
+
|
|
44
|
+
### Installation
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install @pgcorp/ui-kit vue pinia vue-router
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The UI kit is distributed as a Vue 3 SFC/TypeScript package for Vite-based
|
|
51
|
+
applications. The consumer owns the single `vue`, `pinia`, and `vue-router`
|
|
52
|
+
instances.
|
|
53
|
+
|
|
54
|
+
### Setup
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { createApp } from 'vue'
|
|
58
|
+
import { createPinia } from 'pinia'
|
|
59
|
+
import router from './router'
|
|
60
|
+
import '@pgcorp/ui-kit/style.css'
|
|
61
|
+
|
|
62
|
+
import App from './App.vue'
|
|
63
|
+
|
|
64
|
+
createApp(App).use(createPinia()).use(router).mount('#app')
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Import every component through an exact public subpath:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
import SButton from '@pgcorp/ui-kit/shared/controls/SButton.vue'
|
|
71
|
+
import SModal from '@pgcorp/ui-kit/shared/containers/SModal.vue'
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Do not use `@pgcorp/ui-kit/src/*`; internal paths are not public API.
|
|
75
|
+
|
|
76
|
+
### Integration verification
|
|
77
|
+
|
|
78
|
+
The consumer production build must succeed without a monorepo source alias or
|
|
79
|
+
copied UI-kit files. TypeScript and Vue language tools must resolve types directly
|
|
80
|
+
from package exports.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Лицензирование и Enterprise / Licensing and Enterprise
|
|
2
|
+
|
|
3
|
+
## Русский
|
|
4
|
+
|
|
5
|
+
`@pgcorp/ui-kit` распространяется по лицензии MIT. Каждая опубликованная версия
|
|
6
|
+
сохраняет условия MIT бессрочно: полученные пользователями права не отзываются
|
|
7
|
+
последующим релизом или изменением коммерческой модели.
|
|
8
|
+
|
|
9
|
+
Enterprise-возможности могут распространяться отдельным закрытым пакетом,
|
|
10
|
+
приложением или сервисом по коммерческой лицензии. Такой продукт может зависеть
|
|
11
|
+
от `@pgcorp/ui-kit`, но не изменяет лицензию уже опубликованной открытой базы.
|
|
12
|
+
Copyright notice и текст MIT сохраняются во всех копиях и существенных частях
|
|
13
|
+
MIT-компонентов.
|
|
14
|
+
|
|
15
|
+
Название PGCorp и связанные товарные знаки не лицензируются условиями MIT.
|
|
16
|
+
|
|
17
|
+
## English
|
|
18
|
+
|
|
19
|
+
`@pgcorp/ui-kit` is distributed under the MIT License. Every published version
|
|
20
|
+
remains available under its original MIT terms indefinitely: rights already
|
|
21
|
+
granted to recipients are not revoked by a later release or business-model
|
|
22
|
+
change.
|
|
23
|
+
|
|
24
|
+
Enterprise capabilities may be distributed as a separate private package,
|
|
25
|
+
application, or service under a commercial license. Such a product may depend
|
|
26
|
+
on `@pgcorp/ui-kit`, but it does not change the license of the published
|
|
27
|
+
open-source base. The copyright notice and MIT text must remain in all copies
|
|
28
|
+
or substantial portions of MIT components.
|
|
29
|
+
|
|
30
|
+
The PGCorp name and related trademarks are not licensed by the MIT License.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Публичный API / Public API
|
|
2
|
+
|
|
3
|
+
## Русский
|
|
4
|
+
|
|
5
|
+
`package.json#exports` является машинно-читаемым источником истины. Каждый export
|
|
6
|
+
явный; wildcard отсутствуют.
|
|
7
|
+
|
|
8
|
+
Основные группы:
|
|
9
|
+
|
|
10
|
+
- `layout/*` — каркас приложения, dock regions, stack и workbench layouts;
|
|
11
|
+
- `shared/controls/*` — buttons, fields, inputs, selects, menus и selection controls;
|
|
12
|
+
- `shared/containers/*` — panels, modal, drawer, popover и sidebars;
|
|
13
|
+
- `shared/data-display/*` — badges, tables, code, JSON, progress, status и tooltips;
|
|
14
|
+
- `shared/navigation/*` — tabs, breadcrumbs, catalog navigation и wizard steps;
|
|
15
|
+
- `shared/database/*`, `shared/graph/*`, `shared/persona/*` — доменные сложные поверхности;
|
|
16
|
+
- `composables/*`, `stores/*`, `theme`, `variants`, `icons` — typed runtime modules;
|
|
17
|
+
- `style.css`, `tokens.css`, `reference.css` — документированные style entrypoints.
|
|
18
|
+
|
|
19
|
+
Компонентный contract выражается через typed props, slots, events и exposed
|
|
20
|
+
methods. Внутренний DOM, CSS-классы и private modules не являются API.
|
|
21
|
+
|
|
22
|
+
## English
|
|
23
|
+
|
|
24
|
+
`package.json#exports` is the machine-readable source of truth. Every export is
|
|
25
|
+
explicit and no wildcard exports are provided.
|
|
26
|
+
|
|
27
|
+
Primary groups:
|
|
28
|
+
|
|
29
|
+
- `layout/*` — application shells, dock regions, stacks, and workbench layouts;
|
|
30
|
+
- `shared/controls/*` — buttons, fields, inputs, selects, menus, and selection controls;
|
|
31
|
+
- `shared/containers/*` — panels, modal, drawer, popover, and sidebars;
|
|
32
|
+
- `shared/data-display/*` — badges, tables, code, JSON, progress, status, and tooltips;
|
|
33
|
+
- `shared/navigation/*` — tabs, breadcrumbs, catalog navigation, and wizard steps;
|
|
34
|
+
- `shared/database/*`, `shared/graph/*`, `shared/persona/*` — complex domain surfaces;
|
|
35
|
+
- `composables/*`, `stores/*`, `theme`, `variants`, `icons` — typed runtime modules;
|
|
36
|
+
- `style.css`, `tokens.css`, `reference.css` — documented style entrypoints.
|
|
37
|
+
|
|
38
|
+
Component contracts are expressed through typed props, slots, events, and exposed
|
|
39
|
+
methods. Internal DOM, CSS classes, and private modules are not API.
|
package/docs/security.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Безопасность / Security
|
|
2
|
+
|
|
3
|
+
## Русский
|
|
4
|
+
|
|
5
|
+
Не публикуйте сведения об уязвимости в public issue до согласования исправления.
|
|
6
|
+
Отправьте private security report на
|
|
7
|
+
[remand-gambol4g@icloud.com](mailto:remand-gambol4g@icloud.com) с темой
|
|
8
|
+
`[SECURITY] @pgcorp/ui-kit`.
|
|
9
|
+
|
|
10
|
+
Укажите версию пакета, затронутый component/subpath, воспроизводимый сценарий,
|
|
11
|
+
impact и известные ограничения.
|
|
12
|
+
|
|
13
|
+
## English
|
|
14
|
+
|
|
15
|
+
Do not disclose a vulnerability in a public issue before a fix is coordinated.
|
|
16
|
+
Send a private security report to
|
|
17
|
+
[remand-gambol4g@icloud.com](mailto:remand-gambol4g@icloud.com) with the subject
|
|
18
|
+
`[SECURITY] @pgcorp/ui-kit`.
|
|
19
|
+
|
|
20
|
+
Include the package version, affected component/subpath, reproducible scenario,
|
|
21
|
+
impact, and known constraints.
|
package/docs/theming.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Темы и design tokens / Themes and design tokens
|
|
2
|
+
|
|
3
|
+
## Русский
|
|
4
|
+
|
|
5
|
+
`tokens.css` содержит primitive и semantic tokens. `style.css` подключает tokens,
|
|
6
|
+
color-scheme, typography, field surfaces, focus contracts и общие utilities.
|
|
7
|
+
|
|
8
|
+
Поддерживаемые theme identifiers и runtime API экспортируются из `theme`:
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { applyThemeIdToDocument } from '@pgcorp/ui-kit/theme'
|
|
12
|
+
|
|
13
|
+
applyThemeIdToDocument(document, 'classic-light')
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Переопределяйте только документированные CSS custom properties на корневом
|
|
17
|
+
theme-контейнере. Не стилизуйте внутренний DOM компонентов через `:deep`,
|
|
18
|
+
private selectors или зависимость от структуры template.
|
|
19
|
+
|
|
20
|
+
## English
|
|
21
|
+
|
|
22
|
+
`tokens.css` contains primitive and semantic tokens. `style.css` includes tokens,
|
|
23
|
+
color scheme, typography, field surfaces, focus contracts, and shared utilities.
|
|
24
|
+
|
|
25
|
+
Supported theme identifiers and runtime APIs are exported from `theme`:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { applyThemeIdToDocument } from '@pgcorp/ui-kit/theme'
|
|
29
|
+
|
|
30
|
+
applyThemeIdToDocument(document, 'classic-light')
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Override documented CSS custom properties on the root theme container only. Do
|
|
34
|
+
not style component internals through `:deep`, private selectors, or template
|
|
35
|
+
structure dependencies.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Версии и релизы / Versioning and releases
|
|
2
|
+
|
|
3
|
+
## Русский
|
|
4
|
+
|
|
5
|
+
Пакет использует Semantic Versioning:
|
|
6
|
+
|
|
7
|
+
- patch — исправление без изменения документированного контракта;
|
|
8
|
+
- minor — обратно совместимое расширение public API;
|
|
9
|
+
- major — несовместимое изменение exports, props, events, tokens или поведения.
|
|
10
|
+
|
|
11
|
+
Официальный release публикуется из защищённого git tag после package contract,
|
|
12
|
+
consumer builds и browser proof. Один и тот же номер версии не публикуется повторно.
|
|
13
|
+
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
The package follows Semantic Versioning:
|
|
17
|
+
|
|
18
|
+
- patch — a fix that preserves the documented contract;
|
|
19
|
+
- minor — a backward-compatible public API extension;
|
|
20
|
+
- major — an incompatible change to exports, props, events, tokens, or behavior.
|
|
21
|
+
|
|
22
|
+
An official release is published from a protected git tag after package-contract,
|
|
23
|
+
consumer-build, and browser-proof checks. A version number is never republished.
|
package/index.ts
ADDED