@mostrom/app-shell 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -49
- package/bun.lock +4 -62
- package/package.json +2 -8
- package/src/AppShell.tsx +4 -6
- package/src/components/data-table/index.ts +1 -1
- package/src/components/global-header/CategoriesButton.tsx +0 -1
- package/src/components/global-header/ServicesMenu.tsx +1 -1
- package/src/components/layout/AppBreadcrumb.tsx +0 -1
- package/src/components/layout/AppLayout.tsx +1 -1
- package/src/components/layout/AppNavigation.tsx +2 -2
- package/src/components/layout/AppSidebar.tsx +2 -3
- package/src/components/patterns/p-navigation-menu-2.tsx +69 -0
- package/src/components/patterns/p-navigation-menu-4.tsx +130 -0
- package/src/components/reui/filters.tsx +1 -8
- package/src/components/reui/index.ts +0 -1
- package/src/components/sectioned-list-table/README.md +1 -1
- package/src/components/ui/actions-dropdown.tsx +0 -1
- package/src/components/ui/badge.tsx +1 -1
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/field.tsx +1 -1
- package/src/components/ui/index.ts +2 -0
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/select.tsx +1 -3
- package/src/components/ui/separator.tsx +3 -1
- package/src/components/ui/simple-input.tsx +114 -0
- package/src/components/ui/simple-select.tsx +310 -0
- package/src/index.ts +1 -1
- package/src/styles.css +16 -821
- package/src/vite.js +34 -1
- package/.claude/ralph-loop.local.md +0 -9
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# App Shell
|
|
2
2
|
|
|
3
|
-
Shared
|
|
3
|
+
Shared layout shell used by all platform services. Provides a consistent layout pattern with global header, service navigation, and content areas.
|
|
4
4
|
|
|
5
5
|
## Publishing to npm
|
|
6
6
|
|
|
@@ -33,11 +33,24 @@ npm run publish:npm -- --tag next
|
|
|
33
33
|
|
|
34
34
|
The script reads `NODE_AUTH_TOKEN` from environment variables, and also checks `app-shell/.env` for that key. It stores the last successful version in `scripts/.publish-version` and auto-increments patch versions on subsequent runs.
|
|
35
35
|
|
|
36
|
+
No init script is shipped in the published package.
|
|
37
|
+
|
|
36
38
|
## Quick Start
|
|
37
39
|
|
|
38
40
|
### Setup (No Init Script)
|
|
39
41
|
|
|
40
|
-
App setup is
|
|
42
|
+
App setup is file-based and does not require running an init command.
|
|
43
|
+
|
|
44
|
+
Install using npm aliases so existing imports stay as `@platform/*`:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@platform/app-shell": "npm:@mostrom/app-shell@latest",
|
|
50
|
+
"@platform/service-catalog": "npm:@mostrom/service-catalog@latest"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
41
54
|
|
|
42
55
|
Required app files:
|
|
43
56
|
|
|
@@ -82,66 +95,55 @@ Required app files:
|
|
|
82
95
|
+--------+-----------------------------------------+---------------+
|
|
83
96
|
```
|
|
84
97
|
|
|
85
|
-
##
|
|
86
|
-
|
|
87
|
-
### Global Header (top-most, full width)
|
|
88
|
-
|
|
89
|
-
Cloudscape `TopNavigation`.
|
|
90
|
-
|
|
91
|
-
| Position | Element | Cloudscape Component | Behavior |
|
|
92
|
-
| -------- | -------- | ------------------------------------------------------ | ---------------------- |
|
|
93
|
-
| Left | Logo | `TopNavigation` `identity` | Navigate to home |
|
|
94
|
-
| Center | Search | `TopNavigation` `search` with `Input` or `Autosuggest` | Global search |
|
|
95
|
-
| Right | Apps | `TopNavigation` utility with `Icon` `grid-view` | Opens dropdown (empty) |
|
|
96
|
-
| Right | Settings | `TopNavigation` utility with `Icon` `settings` | Opens dropdown (empty) |
|
|
97
|
-
| Right | User | `TopNavigation` utility with `Icon` `user-profile` | User menu |
|
|
98
|
+
## UI Components
|
|
98
99
|
|
|
99
|
-
|
|
100
|
+
App Shell provides a comprehensive set of UI components built with Radix UI and Tailwind CSS:
|
|
100
101
|
|
|
101
|
-
|
|
102
|
+
### Layout Components
|
|
102
103
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
| Center | Breadcrumbs | `BreadcrumbGroup` | Single breadcrumb source |
|
|
108
|
-
| Right | Panel Toggle | `Button` (icon-only) with `Icon` `view-vertical` | Toggles Right Panel |
|
|
104
|
+
| Component | Description |
|
|
105
|
+
| --------- | ----------- |
|
|
106
|
+
| `AppShell` | Main layout wrapper with header, navigation, and content areas |
|
|
107
|
+
| `SpaceBetween` | Flexbox container with consistent gap sizing (xxxs to xxl) |
|
|
109
108
|
|
|
110
|
-
###
|
|
109
|
+
### Form & Input Components
|
|
111
110
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
| Component | Description |
|
|
112
|
+
| --------- | ----------- |
|
|
113
|
+
| `Button` | Primary, normal, outline, ghost, link, and destructive variants |
|
|
114
|
+
| `Input` | Text input with validation states |
|
|
115
|
+
| `Select` | Dropdown selection with search/filter support |
|
|
116
|
+
| `Toggle` | On/off switch component |
|
|
116
117
|
|
|
117
|
-
###
|
|
118
|
+
### Display Components
|
|
118
119
|
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
| Component | Description |
|
|
121
|
+
| --------- | ----------- |
|
|
122
|
+
| `Badge` | Status indicators with color variants (blue, green, grey, red) |
|
|
123
|
+
| `Avatar` | User/entity avatars with fallback initials |
|
|
124
|
+
| `Card` | Content container with header/footer slots |
|
|
121
125
|
|
|
122
|
-
###
|
|
126
|
+
### Data Components
|
|
123
127
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
- Renders `children` passed to `AppShell`
|
|
130
|
-
|
|
131
|
-
## Required Cloudscape Packages
|
|
132
|
-
|
|
133
|
-
- `@cloudscape-design/components`
|
|
134
|
-
- `@cloudscape-design/global-styles` (import once per app for base styles/fonts)
|
|
128
|
+
| Component | Description |
|
|
129
|
+
| --------- | ----------- |
|
|
130
|
+
| `DataTable` | Full-featured table with sorting, filtering, and pagination |
|
|
131
|
+
| `SectionedListBoard` | Kanban-style board with drag-and-drop |
|
|
132
|
+
| `SectionedListTable` | Grouped list view with collapsible sections |
|
|
135
133
|
|
|
136
134
|
## Service Catalog Dependency
|
|
137
135
|
|
|
138
|
-
The App Shell builds the **All services** menu and global search suggestions from
|
|
139
|
-
|
|
140
|
-
|
|
136
|
+
The App Shell builds the **All services** menu and global search suggestions from service-catalog.
|
|
137
|
+
|
|
138
|
+
Use this alias in consuming apps:
|
|
141
139
|
|
|
142
|
-
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"@platform/service-catalog": "npm:@mostrom/service-catalog@latest"
|
|
143
|
+
}
|
|
144
|
+
```
|
|
143
145
|
|
|
144
146
|
## Notes
|
|
145
147
|
|
|
146
|
-
-
|
|
147
|
-
-
|
|
148
|
+
- Use the provided UI components for consistent styling across all services.
|
|
149
|
+
- Import `@platform/app-shell/styles.css` in your app's entry point.
|
package/bun.lock
CHANGED
|
@@ -6,15 +6,13 @@
|
|
|
6
6
|
"name": "@platform/app-shell",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@base-ui/react": "^1.1.0",
|
|
9
|
-
"@cloudscape-design/components": "*",
|
|
10
|
-
"@cloudscape-design/global-styles": "*",
|
|
11
9
|
"@dnd-kit/core": "^6.3.1",
|
|
12
10
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
13
11
|
"@dnd-kit/sortable": "^10.0.0",
|
|
14
12
|
"@dnd-kit/utilities": "^3.2.2",
|
|
15
13
|
"@floating-ui/dom": "^1.7.5",
|
|
16
14
|
"@hookform/resolvers": "^5.2.2",
|
|
17
|
-
"@platform/service-catalog": "
|
|
15
|
+
"@platform/service-catalog": "npm:@mostrom/service-catalog@latest",
|
|
18
16
|
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
19
17
|
"@tanstack/react-table": "^8.21.3",
|
|
20
18
|
"class-variance-authority": "^0.7.1",
|
|
@@ -52,18 +50,6 @@
|
|
|
52
50
|
|
|
53
51
|
"@base-ui/utils": ["@base-ui/utils@0.2.4", "", { "dependencies": { "@babel/runtime": "^7.28.4", "@floating-ui/utils": "^0.2.10", "reselect": "^5.1.1", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "@types/react": "^17 || ^18 || ^19", "react": "^17 || ^18 || ^19", "react-dom": "^17 || ^18 || ^19" }, "optionalPeers": ["@types/react"] }, "sha512-smZwpMhjO29v+jrZusBSc5T+IJ3vBb9cjIiBjtKcvWmRj9Z4DWGVR3efr1eHR56/bqY5a4qyY9ElkOY5ljo3ng=="],
|
|
54
52
|
|
|
55
|
-
"@cloudscape-design/collection-hooks": ["@cloudscape-design/collection-hooks@1.0.82", "", { "dependencies": { "@cloudscape-design/component-toolkit": "^1.0.0-beta" }, "peerDependencies": { "react": ">=16.8.0" } }, "sha512-e9l8aRGlwXuZ46lK3pSc7OsGj3eKiAzkNTGhTkjxSBa749K1dY/MZ001elJPWpq+ZI5rui5j5950cNPM5sG+sQ=="],
|
|
56
|
-
|
|
57
|
-
"@cloudscape-design/component-toolkit": ["@cloudscape-design/component-toolkit@1.0.0-beta.138", "", { "dependencies": { "tslib": "^2.3.1", "weekstart": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0" } }, "sha512-soKxjnmFvY5XroSVqsD0FkYI2ZclF0FipdM8cfrF+eGhuOe5Vs2kcVH+OJz4ZYJddgwaGHCbTO6s0iOA16yVeA=="],
|
|
58
|
-
|
|
59
|
-
"@cloudscape-design/components": ["@cloudscape-design/components@3.0.1200", "", { "dependencies": { "@cloudscape-design/collection-hooks": "^1.0.0", "@cloudscape-design/component-toolkit": "^1.0.0-beta", "@cloudscape-design/test-utils-core": "^1.0.0", "@cloudscape-design/theming-runtime": "^1.0.0", "@dnd-kit/core": "^6.0.8", "@dnd-kit/sortable": "^7.0.2", "@dnd-kit/utilities": "^3.2.1", "ace-builds": "^1.34.0", "clsx": "^1.1.0", "d3-shape": "^1.3.7", "date-fns": "^2.25.0", "intl-messageformat": "^10.3.1", "mnth": "^2.0.0", "react-keyed-flatten-children": "^2.2.1", "react-transition-group": "^4.4.2", "tslib": "^2.4.0", "weekstart": "^1.1.0" }, "peerDependencies": { "react": ">=16.8.0" } }, "sha512-V/2Ah+f2D4IbNTGu5gI+9dZTWf0V+CVpyKCVxSGlfiti/OLH5kjzeZTzFxSVVDH2ZzMm0CdZH1W8iw94wGnVvQ=="],
|
|
60
|
-
|
|
61
|
-
"@cloudscape-design/global-styles": ["@cloudscape-design/global-styles@1.0.50", "", {}, "sha512-IF/z6yhFvN+jWJeXgpHqvs5Eib52R3xOIzPkX/HcoXcDIO818IIwx9cFFgnt9ZHKyduIlmQ1wtBbCdIixMISHw=="],
|
|
62
|
-
|
|
63
|
-
"@cloudscape-design/test-utils-core": ["@cloudscape-design/test-utils-core@1.0.71", "", { "dependencies": { "css-selector-tokenizer": "^0.8.0", "css.escape": "^1.5.1" } }, "sha512-4rXQlsd6Rdg+KCNoltLa1+0wjgNugbduuK7L4nTa/Aw/gJIYqrTU78ip5A2VmbDhiE6fiGqtCFmU6LcKCMP//A=="],
|
|
64
|
-
|
|
65
|
-
"@cloudscape-design/theming-runtime": ["@cloudscape-design/theming-runtime@1.0.91", "", { "dependencies": { "@material/material-color-utilities": "^0.3.0", "tslib": "^2.4.0" } }, "sha512-umIE/M+tzrFo9c4Skrh4AFFtaDC4eANkjp+xYikUj7ng6wTXj6kkSzxbVbg2fBEmIUgLYAzMHYbyKUzQWuz0ag=="],
|
|
66
|
-
|
|
67
53
|
"@date-fns/tz": ["@date-fns/tz@1.4.1", "", {}, "sha512-P5LUNhtbj6YfI3iJjw5EL9eUAG6OitD0W3fWQcpQjDRc/QIsL0tRNuO1PcDvPccWL1fSTXXdE1ds+l95DV/OFA=="],
|
|
68
54
|
|
|
69
55
|
"@dnd-kit/accessibility": ["@dnd-kit/accessibility@3.1.1", "", { "dependencies": { "tslib": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0" } }, ""],
|
|
@@ -84,21 +70,9 @@
|
|
|
84
70
|
|
|
85
71
|
"@floating-ui/utils": ["@floating-ui/utils@0.2.10", "", {}, "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ=="],
|
|
86
72
|
|
|
87
|
-
"@formatjs/ecma402-abstract": ["@formatjs/ecma402-abstract@2.3.6", "", { "dependencies": { "@formatjs/fast-memoize": "2.2.7", "@formatjs/intl-localematcher": "0.6.2", "decimal.js": "^10.4.3", "tslib": "^2.8.0" } }, "sha512-HJnTFeRM2kVFVr5gr5kH1XP6K0JcJtE7Lzvtr3FS/so5f1kpsqqqxy5JF+FRaO6H2qmcMfAUIox7AJteieRtVw=="],
|
|
88
|
-
|
|
89
|
-
"@formatjs/fast-memoize": ["@formatjs/fast-memoize@2.2.7", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-Yabmi9nSvyOMrlSeGGWDiH7rf3a7sIwplbvo/dlz9WCIjzIQAfy1RMf4S0X3yG724n5Ghu2GmEl5NJIV6O9sZQ=="],
|
|
90
|
-
|
|
91
|
-
"@formatjs/icu-messageformat-parser": ["@formatjs/icu-messageformat-parser@2.11.4", "", { "dependencies": { "@formatjs/ecma402-abstract": "2.3.6", "@formatjs/icu-skeleton-parser": "1.8.16", "tslib": "^2.8.0" } }, "sha512-7kR78cRrPNB4fjGFZg3Rmj5aah8rQj9KPzuLsmcSn4ipLXQvC04keycTI1F7kJYDwIXtT2+7IDEto842CfZBtw=="],
|
|
92
|
-
|
|
93
|
-
"@formatjs/icu-skeleton-parser": ["@formatjs/icu-skeleton-parser@1.8.16", "", { "dependencies": { "@formatjs/ecma402-abstract": "2.3.6", "tslib": "^2.8.0" } }, "sha512-H13E9Xl+PxBd8D5/6TVUluSpxGNvFSlN/b3coUp0e0JpuWXXnQDiavIpY3NnvSp4xhEMoXyyBvVfdFX8jglOHQ=="],
|
|
94
|
-
|
|
95
|
-
"@formatjs/intl-localematcher": ["@formatjs/intl-localematcher@0.6.2", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-XOMO2Hupl0wdd172Y06h6kLpBz6Dv+J4okPLl4LPtzbr8f66WbIoy4ev98EBuZ6ZK4h5ydTN6XneT4QVpD7cdA=="],
|
|
96
|
-
|
|
97
73
|
"@hookform/resolvers": ["@hookform/resolvers@5.2.2", "", { "dependencies": { "@standard-schema/utils": "^0.3.0" }, "peerDependencies": { "react-hook-form": "^7.55.0" } }, "sha512-A/IxlMLShx3KjV/HeTcTfaMxdwy690+L/ZADoeaTltLx+CVuzkeVIPuybK3jrRfw7YZnmdKsVVHAlEPIAEUNlA=="],
|
|
98
74
|
|
|
99
|
-
"@
|
|
100
|
-
|
|
101
|
-
"@platform/service-catalog": ["@platform/service-catalog@file:../service-catalog", {}],
|
|
75
|
+
"@platform/service-catalog": ["@mostrom/service-catalog@0.1.3", "", {}, "sha512-q3GMS6sz4+KTRSFrI5zOPYInCYqnNp6HdZ4yjNq8J6X8Pn2HyEih4QVfB/C4LtJ5g6Qa6P6GS9/GEzctkAnJzA=="],
|
|
102
76
|
|
|
103
77
|
"@radix-ui/number": ["@radix-ui/number@1.1.1", "", {}, "sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g=="],
|
|
104
78
|
|
|
@@ -248,8 +222,6 @@
|
|
|
248
222
|
|
|
249
223
|
"@types/react-dom": ["@types/react-dom@19.2.3", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ=="],
|
|
250
224
|
|
|
251
|
-
"ace-builds": ["ace-builds@1.43.6", "", {}, "sha512-L1ddibQ7F3vyXR2k2fg+I8TQTPWVA6CKeDQr/h2+8CeyTp3W6EQL8xNFZRTztuP8xNOAqL3IYPqdzs31GCjDvg=="],
|
|
252
|
-
|
|
253
225
|
"aria-hidden": ["aria-hidden@1.2.6", "", { "dependencies": { "tslib": "^2.0.0" } }, "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA=="],
|
|
254
226
|
|
|
255
227
|
"class-variance-authority": ["class-variance-authority@0.7.1", "", { "dependencies": { "clsx": "^2.1.1" } }, "sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg=="],
|
|
@@ -258,12 +230,6 @@
|
|
|
258
230
|
|
|
259
231
|
"cmdk": ["cmdk@1.1.1", "", { "dependencies": { "@radix-ui/react-compose-refs": "^1.1.1", "@radix-ui/react-dialog": "^1.1.6", "@radix-ui/react-id": "^1.1.0", "@radix-ui/react-primitive": "^2.0.2" }, "peerDependencies": { "react": "^18 || ^19 || ^19.0.0-rc", "react-dom": "^18 || ^19 || ^19.0.0-rc" } }, "sha512-Vsv7kFaXm+ptHDMZ7izaRsP70GgrW9NBNGswt9OZaVBLlE0SNpDq8eu/VGXyF9r7M0azK3Wy7OlYXsuyYLFzHg=="],
|
|
260
232
|
|
|
261
|
-
"css-selector-tokenizer": ["css-selector-tokenizer@0.8.0", "", { "dependencies": { "cssesc": "^3.0.0", "fastparse": "^1.1.2" } }, "sha512-Jd6Ig3/pe62/qe5SBPTN8h8LeUg/pT4lLgtavPf7updwwHpvFzxvOQBHYj2LZDMjUnBzgvIUSjRcf6oT5HzHFg=="],
|
|
262
|
-
|
|
263
|
-
"css.escape": ["css.escape@1.5.1", "", {}, "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg=="],
|
|
264
|
-
|
|
265
|
-
"cssesc": ["cssesc@3.0.0", "", { "bin": { "cssesc": "bin/cssesc" } }, "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg=="],
|
|
266
|
-
|
|
267
233
|
"csstype": ["csstype@3.2.3", "", {}, ""],
|
|
268
234
|
|
|
269
235
|
"d3-array": ["d3-array@3.2.4", "", { "dependencies": { "internmap": "1 - 2" } }, "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg=="],
|
|
@@ -276,11 +242,11 @@
|
|
|
276
242
|
|
|
277
243
|
"d3-interpolate": ["d3-interpolate@3.0.1", "", { "dependencies": { "d3-color": "1 - 3" } }, "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g=="],
|
|
278
244
|
|
|
279
|
-
"d3-path": ["d3-path@1.0
|
|
245
|
+
"d3-path": ["d3-path@3.1.0", "", {}, "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ=="],
|
|
280
246
|
|
|
281
247
|
"d3-scale": ["d3-scale@4.0.2", "", { "dependencies": { "d3-array": "2.10.0 - 3", "d3-format": "1 - 3", "d3-interpolate": "1.2.0 - 3", "d3-time": "2.1.1 - 3", "d3-time-format": "2 - 4" } }, "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ=="],
|
|
282
248
|
|
|
283
|
-
"d3-shape": ["d3-shape@
|
|
249
|
+
"d3-shape": ["d3-shape@3.2.0", "", { "dependencies": { "d3-path": "^3.1.0" } }, "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA=="],
|
|
284
250
|
|
|
285
251
|
"d3-time": ["d3-time@3.1.0", "", { "dependencies": { "d3-array": "2 - 3" } }, "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q=="],
|
|
286
252
|
|
|
@@ -292,8 +258,6 @@
|
|
|
292
258
|
|
|
293
259
|
"date-fns-jalali": ["date-fns-jalali@4.1.0-0", "", {}, "sha512-hTIP/z+t+qKwBDcmmsnmjWTduxCg+5KfdqWQvb2X/8C9+knYY6epN/pfxdDuyVlSVeFz0sM5eEfwIUQ70U4ckg=="],
|
|
294
260
|
|
|
295
|
-
"decimal.js": ["decimal.js@10.6.0", "", {}, "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg=="],
|
|
296
|
-
|
|
297
261
|
"decimal.js-light": ["decimal.js-light@2.5.1", "", {}, "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg=="],
|
|
298
262
|
|
|
299
263
|
"detect-node-es": ["detect-node-es@1.1.0", "", {}, "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ=="],
|
|
@@ -304,14 +268,10 @@
|
|
|
304
268
|
|
|
305
269
|
"fast-equals": ["fast-equals@5.4.0", "", {}, "sha512-jt2DW/aNFNwke7AUd+Z+e6pz39KO5rzdbbFCg2sGafS4mk13MI7Z8O5z9cADNn5lhGODIgLwug6TZO2ctf7kcw=="],
|
|
306
270
|
|
|
307
|
-
"fastparse": ["fastparse@1.1.2", "", {}, "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ=="],
|
|
308
|
-
|
|
309
271
|
"get-nonce": ["get-nonce@1.0.1", "", {}, "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q=="],
|
|
310
272
|
|
|
311
273
|
"internmap": ["internmap@2.0.3", "", {}, "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg=="],
|
|
312
274
|
|
|
313
|
-
"intl-messageformat": ["intl-messageformat@10.7.18", "", { "dependencies": { "@formatjs/ecma402-abstract": "2.3.6", "@formatjs/fast-memoize": "2.2.7", "@formatjs/icu-messageformat-parser": "2.11.4", "tslib": "^2.8.0" } }, "sha512-m3Ofv/X/tV8Y3tHXLohcuVuhWKo7BBq62cqY15etqmLxg2DZ34AGGgQDeR+SCta2+zICb1NX83af0GJmbQ1++g=="],
|
|
314
|
-
|
|
315
275
|
"js-tokens": ["js-tokens@4.0.0", "", {}, ""],
|
|
316
276
|
|
|
317
277
|
"lodash": ["lodash@4.17.23", "", {}, "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w=="],
|
|
@@ -320,8 +280,6 @@
|
|
|
320
280
|
|
|
321
281
|
"lucide-react": ["lucide-react@0.563.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-8dXPB2GI4dI8jV4MgUDGBeLdGk8ekfqVZ0BdLcrRzocGgG75ltNEmWS+gE7uokKF/0oSUuczNDT+g9hFJ23FkA=="],
|
|
322
282
|
|
|
323
|
-
"mnth": ["mnth@2.0.0", "", { "dependencies": { "@babel/runtime": "^7.8.0" } }, "sha512-3ZH4UWBGpAwCKdfjynLQpUDVZWMe6vRHwarIpMdGLUp89CVR9hjzgyWERtMyqx+fPEqQ/PsAxFwvwPxLFxW40A=="],
|
|
324
|
-
|
|
325
283
|
"next-themes": ["next-themes@0.4.6", "", { "peerDependencies": { "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" } }, "sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA=="],
|
|
326
284
|
|
|
327
285
|
"object-assign": ["object-assign@4.1.1", "", {}, ""],
|
|
@@ -340,8 +298,6 @@
|
|
|
340
298
|
|
|
341
299
|
"react-is": ["react-is@18.3.1", "", {}, ""],
|
|
342
300
|
|
|
343
|
-
"react-keyed-flatten-children": ["react-keyed-flatten-children@2.2.1", "", { "dependencies": { "react-is": "^18.2.0" }, "peerDependencies": { "react": ">=15.0.0" } }, "sha512-6yBLVO6suN8c/OcJk1mzIrUHdeEzf5rtRVBhxEXAHO49D7SlJ70cG4xrSJrBIAG7MMeQ+H/T151mM2dRDNnFaA=="],
|
|
344
|
-
|
|
345
301
|
"react-remove-scroll": ["react-remove-scroll@2.7.2", "", { "dependencies": { "react-remove-scroll-bar": "^2.3.7", "react-style-singleton": "^2.2.3", "tslib": "^2.1.0", "use-callback-ref": "^1.3.3", "use-sidecar": "^1.1.3" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q=="],
|
|
346
302
|
|
|
347
303
|
"react-remove-scroll-bar": ["react-remove-scroll-bar@2.3.8", "", { "dependencies": { "react-style-singleton": "^2.2.2", "tslib": "^2.0.0" }, "peerDependencies": { "@types/react": "*", "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "optionalPeers": ["@types/react"] }, "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q=="],
|
|
@@ -382,22 +338,8 @@
|
|
|
382
338
|
|
|
383
339
|
"victory-vendor": ["victory-vendor@36.9.2", "", { "dependencies": { "@types/d3-array": "^3.0.3", "@types/d3-ease": "^3.0.0", "@types/d3-interpolate": "^3.0.1", "@types/d3-scale": "^4.0.2", "@types/d3-shape": "^3.1.0", "@types/d3-time": "^3.0.0", "@types/d3-timer": "^3.0.0", "d3-array": "^3.1.6", "d3-ease": "^3.0.1", "d3-interpolate": "^3.0.1", "d3-scale": "^4.0.2", "d3-shape": "^3.1.0", "d3-time": "^3.0.0", "d3-timer": "^3.0.1" } }, "sha512-PnpQQMuxlwYdocC8fIJqVXvkeViHYzotI+NJrCuav0ZYFoq912ZHBk3mCeuj+5/VpodOjPe1z0Fk2ihgzlXqjQ=="],
|
|
384
340
|
|
|
385
|
-
"weekstart": ["weekstart@1.1.0", "", {}, "sha512-ZO3I7c7J9nwGN1PZKZeBYAsuwWEsCOZi5T68cQoVNYrzrpp5Br0Bgi0OF4l8kH/Ez7nKfxa5mSsXjsgris3+qg=="],
|
|
386
|
-
|
|
387
341
|
"zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="],
|
|
388
342
|
|
|
389
|
-
"@cloudscape-design/component-toolkit/weekstart": ["weekstart@2.0.0", "", {}, "sha512-HjYc14IQUwDcnGICuc8tVtqAd6EFpoAQMqgrqcNtWWZB+F1b7iTq44GzwM1qvnH4upFgbhJsaNHuK93NOFheSg=="],
|
|
390
|
-
|
|
391
|
-
"@cloudscape-design/components/@dnd-kit/sortable": ["@dnd-kit/sortable@7.0.2", "", { "dependencies": { "@dnd-kit/utilities": "^3.2.0", "tslib": "^2.0.0" }, "peerDependencies": { "@dnd-kit/core": "^6.0.7", "react": ">=16.8.0" } }, "sha512-wDkBHHf9iCi1veM834Gbk1429bd4lHX4RpAwT0y2cHLf246GAvU2sVw/oxWNpPKQNQRQaeGXhAVgrOl1IT+iyA=="],
|
|
392
|
-
|
|
393
|
-
"@cloudscape-design/components/clsx": ["clsx@1.2.1", "", {}, "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg=="],
|
|
394
|
-
|
|
395
|
-
"@cloudscape-design/components/date-fns": ["date-fns@2.30.0", "", { "dependencies": { "@babel/runtime": "^7.21.0" } }, "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw=="],
|
|
396
|
-
|
|
397
343
|
"prop-types/react-is": ["react-is@16.13.1", "", {}, "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="],
|
|
398
|
-
|
|
399
|
-
"victory-vendor/d3-shape": ["d3-shape@3.2.0", "", { "dependencies": { "d3-path": "^3.1.0" } }, "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA=="],
|
|
400
|
-
|
|
401
|
-
"victory-vendor/d3-shape/d3-path": ["d3-path@3.1.0", "", {}, "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ=="],
|
|
402
344
|
}
|
|
403
345
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mostrom/app-shell",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"app-shell": "./bin/init.js",
|
|
8
|
-
"app-shell-init": "./bin/init.js"
|
|
9
|
-
},
|
|
10
6
|
"exports": {
|
|
11
7
|
".": "./src/index.ts",
|
|
12
8
|
"./styles.css": "./src/styles.css",
|
|
@@ -27,15 +23,13 @@
|
|
|
27
23
|
},
|
|
28
24
|
"dependencies": {
|
|
29
25
|
"@base-ui/react": "^1.1.0",
|
|
30
|
-
"@cloudscape-design/components": "*",
|
|
31
|
-
"@cloudscape-design/global-styles": "*",
|
|
32
26
|
"@dnd-kit/core": "^6.3.1",
|
|
33
27
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
34
28
|
"@dnd-kit/sortable": "^10.0.0",
|
|
35
29
|
"@dnd-kit/utilities": "^3.2.2",
|
|
36
30
|
"@floating-ui/dom": "^1.7.5",
|
|
37
31
|
"@hookform/resolvers": "^5.2.2",
|
|
38
|
-
"@platform/service-catalog": "npm:@mostrom/service-catalog@^0.1.
|
|
32
|
+
"@platform/service-catalog": "npm:@mostrom/service-catalog@^0.1.4",
|
|
39
33
|
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
40
34
|
"@tanstack/react-table": "^8.21.3",
|
|
41
35
|
"class-variance-authority": "^0.7.1",
|
package/src/AppShell.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AppShell Component
|
|
3
3
|
*
|
|
4
|
-
* The primary layout wrapper for all platform services.
|
|
5
|
-
*
|
|
4
|
+
* The primary layout wrapper for all platform services. Provides consistent
|
|
5
|
+
* visual and behavioral patterns across the platform.
|
|
6
6
|
*
|
|
7
7
|
* LAYOUT STRUCTURE:
|
|
8
8
|
* ┌─────────────────────────────────────────────────────────────────────────────┐
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
|
|
44
44
|
import React from "react";
|
|
45
45
|
|
|
46
|
-
import "@cloudscape-design/global-styles/index.css";
|
|
47
46
|
import "./styles.css";
|
|
48
47
|
|
|
49
48
|
import { AppFlashbar, type FlashbarMessage } from "./components/layout/AppFlashbar";
|
|
@@ -72,7 +71,7 @@ import { GlobalHeaderSearch } from "./components/global-header/GlobalHeaderSearc
|
|
|
72
71
|
import { type SearchOption } from "./components/search/GlobalSearch";
|
|
73
72
|
import { HeaderUtilities } from "./components/global-header/HeaderUtilities";
|
|
74
73
|
|
|
75
|
-
/**
|
|
74
|
+
/** Drawer configuration for slide-in panels */
|
|
76
75
|
interface Drawer {
|
|
77
76
|
id: string;
|
|
78
77
|
ariaLabels?: {
|
|
@@ -640,10 +639,9 @@ export function AppShell({
|
|
|
640
639
|
* Left-side collapsible panel containing service-specific navigation.
|
|
641
640
|
* Shows the service name in the header and hierarchical navigation items.
|
|
642
641
|
*/
|
|
643
|
-
// Cast to internal type - both Cloudscape and custom types share the same shape
|
|
644
642
|
const normalizedNavigationItems = (navigationItems ?? []) as ReadonlyArray<NavigationItem>;
|
|
645
643
|
|
|
646
|
-
// Adapter to normalize
|
|
644
|
+
// Adapter to normalize NavigationFollowEvent
|
|
647
645
|
const handleNavigationFollow = onNavigationFollow
|
|
648
646
|
? (event: NavigationFollowEvent) => {
|
|
649
647
|
onNavigationFollow(event as CompatibleNavigationFollowEvent);
|
|
@@ -27,6 +27,6 @@ export type {
|
|
|
27
27
|
export { CreateButtonGroup } from "../ui/create-button-group"
|
|
28
28
|
export type { CreateButtonGroupProps } from "../ui/create-button-group"
|
|
29
29
|
|
|
30
|
-
// Actions dropdown
|
|
30
|
+
// Actions dropdown
|
|
31
31
|
export { ActionsDropdown } from "../ui/actions-dropdown"
|
|
32
32
|
export type { ActionsDropdownProps, ActionsDropdownItem } from "../ui/actions-dropdown"
|
|
@@ -2,7 +2,7 @@ import { useState, useMemo, type MouseEvent } from "react";
|
|
|
2
2
|
|
|
3
3
|
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// Menu dropdown types
|
|
6
6
|
export interface MenuDropdownItem {
|
|
7
7
|
id: string;
|
|
8
8
|
text: string;
|
|
@@ -26,7 +26,6 @@ export interface AppBreadcrumbProps {
|
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* AppBreadcrumb - A wrapper around reui Breadcrumb components
|
|
29
|
-
* that provides a similar API to Cloudscape's BreadcrumbGroup
|
|
30
29
|
*/
|
|
31
30
|
export function AppBreadcrumb({ items, onFollow, className }: AppBreadcrumbProps) {
|
|
32
31
|
if (!items || items.length === 0) {
|
|
@@ -54,7 +54,7 @@ const HEADER_HEIGHT = 56;
|
|
|
54
54
|
const SERVICE_BAR_HEIGHT = 56;
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
|
-
* AppLayout - A custom layout component
|
|
57
|
+
* AppLayout - A custom layout component for platform services.
|
|
58
58
|
*
|
|
59
59
|
* Layout structure:
|
|
60
60
|
* ┌──────────────────────────────────────────────────────────────────────┐
|
|
@@ -100,8 +100,8 @@ export interface AppNavigationProps {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/**
|
|
103
|
-
* AppNavigation - A navigation component
|
|
104
|
-
*
|
|
103
|
+
* AppNavigation - A navigation component using Tailwind styling.
|
|
104
|
+
* Designed to work within AppLayout's navigation slot.
|
|
105
105
|
*/
|
|
106
106
|
export function AppNavigation({
|
|
107
107
|
serviceName,
|
|
@@ -35,8 +35,7 @@ export interface AppSidebarProps {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* AppSidebar - A sidebar wrapper
|
|
39
|
-
* using shadcn Sidebar components internally.
|
|
38
|
+
* AppSidebar - A sidebar wrapper using shadcn Sidebar components internally.
|
|
40
39
|
*/
|
|
41
40
|
export function AppSidebar({
|
|
42
41
|
serviceName,
|
|
@@ -226,4 +225,4 @@ export function AppSidebar({
|
|
|
226
225
|
);
|
|
227
226
|
}
|
|
228
227
|
|
|
229
|
-
export { useSidebar, SidebarProvider, SidebarTrigger, SidebarInset } from "
|
|
228
|
+
export { useSidebar, SidebarProvider, SidebarTrigger, SidebarInset } from "../ui/sidebar";
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NavigationMenu,
|
|
3
|
+
NavigationMenuContent,
|
|
4
|
+
NavigationMenuItem,
|
|
5
|
+
NavigationMenuLink,
|
|
6
|
+
NavigationMenuList,
|
|
7
|
+
NavigationMenuTrigger,
|
|
8
|
+
} from "@/components/ui/navigation-menu"
|
|
9
|
+
|
|
10
|
+
const components = [
|
|
11
|
+
{
|
|
12
|
+
title: "Alert Dialog",
|
|
13
|
+
href: "#",
|
|
14
|
+
description:
|
|
15
|
+
"A modal dialog that interrupts the user with important content.",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: "Hover Card",
|
|
19
|
+
href: "#",
|
|
20
|
+
description:
|
|
21
|
+
"For sighted users to preview content available behind a link.",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: "Progress",
|
|
25
|
+
href: "#",
|
|
26
|
+
description:
|
|
27
|
+
"Displays an indicator showing the completion progress of a task.",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: "Scroll-area",
|
|
31
|
+
href: "#",
|
|
32
|
+
description: "Visually or semantically separates content.",
|
|
33
|
+
},
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
export function Pattern() {
|
|
37
|
+
return (
|
|
38
|
+
<div className="flex items-center justify-center">
|
|
39
|
+
<NavigationMenu>
|
|
40
|
+
<NavigationMenuList>
|
|
41
|
+
<NavigationMenuItem>
|
|
42
|
+
<NavigationMenuTrigger>Components</NavigationMenuTrigger>
|
|
43
|
+
<NavigationMenuContent>
|
|
44
|
+
<ul className="grid w-[400px] gap-2 md:w-[500px] md:grid-cols-2">
|
|
45
|
+
{components.map((component) => (
|
|
46
|
+
<li key={component.title}>
|
|
47
|
+
<NavigationMenuLink
|
|
48
|
+
asChild
|
|
49
|
+
className="flex flex-col items-start gap-2 p-3"
|
|
50
|
+
>
|
|
51
|
+
<a href={component.href}>
|
|
52
|
+
<div className="text-sm leading-none font-medium">
|
|
53
|
+
{component.title}
|
|
54
|
+
</div>
|
|
55
|
+
<p className="text-muted-foreground line-clamp-2 text-sm leading-snug">
|
|
56
|
+
{component.description}
|
|
57
|
+
</p>
|
|
58
|
+
</a>
|
|
59
|
+
</NavigationMenuLink>
|
|
60
|
+
</li>
|
|
61
|
+
))}
|
|
62
|
+
</ul>
|
|
63
|
+
</NavigationMenuContent>
|
|
64
|
+
</NavigationMenuItem>
|
|
65
|
+
</NavigationMenuList>
|
|
66
|
+
</NavigationMenu>
|
|
67
|
+
</div>
|
|
68
|
+
)
|
|
69
|
+
}
|