gcp-material-ui 0.0.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/.agents/skills/charts/SKILL.MD +103 -0
- package/.agents/skills/creating-common-components/SKILL.MD +121 -0
- package/.agents/skills/creating-pages/SKILL.MD +205 -0
- package/.agents/skills/sidebar/SKILL.MD +63 -0
- package/.agents/skills/workflow-graph/SKILL.MD +160 -0
- package/.dockerignore +4 -0
- package/.editorconfig +17 -0
- package/.prettierrc +12 -0
- package/Dockerfile +14 -0
- package/PUBLISH_GUIDE.md +33 -0
- package/README.md +48 -0
- package/angular.json +79 -0
- package/deploy.sh +47 -0
- package/nginx.conf +15 -0
- package/package.json +48 -0
- package/public/favicon.ico +0 -0
- package/public/google-cloud-combined.svg +1 -0
- package/publish.sh +14 -0
- package/src/_variables.scss +183 -0
- package/src/app/app.config.ts +19 -0
- package/src/app/app.html +1 -0
- package/src/app/app.routes.ts +65 -0
- package/src/app/app.scss +0 -0
- package/src/app/app.spec.ts +23 -0
- package/src/app/app.ts +12 -0
- package/src/app/auth/auth.guard.ts +7 -0
- package/src/app/auth/auth.service.ts +50 -0
- package/src/app/components/page/page.html +20 -0
- package/src/app/components/page/page.scss +41 -0
- package/src/app/components/page/page.ts +15 -0
- package/src/app/dashboard/dashboard.html +287 -0
- package/src/app/dashboard/dashboard.scss +196 -0
- package/src/app/dashboard/dashboard.ts +24 -0
- package/src/app/demo-components/buttons/buttons-demo.html +92 -0
- package/src/app/demo-components/buttons/buttons-demo.scss +38 -0
- package/src/app/demo-components/buttons/buttons-demo.ts +23 -0
- package/src/app/demo-components/card/card-demo.html +52 -0
- package/src/app/demo-components/card/card-demo.scss +47 -0
- package/src/app/demo-components/card/card-demo.ts +21 -0
- package/src/app/demo-components/charts/charts-demo.html +88 -0
- package/src/app/demo-components/charts/charts-demo.scss +50 -0
- package/src/app/demo-components/charts/charts-demo.ts +201 -0
- package/src/app/demo-components/chips/chips-demo.html +87 -0
- package/src/app/demo-components/chips/chips-demo.scss +6 -0
- package/src/app/demo-components/chips/chips-demo.ts +57 -0
- package/src/app/demo-components/code-snippet/code-snippet-demo.html +52 -0
- package/src/app/demo-components/code-snippet/code-snippet-demo.scss +20 -0
- package/src/app/demo-components/code-snippet/code-snippet-demo.ts +31 -0
- package/src/app/demo-components/dialog/dialog-demo.html +47 -0
- package/src/app/demo-components/dialog/dialog-demo.ts +90 -0
- package/src/app/demo-components/dialog/dialog-examples.ts +126 -0
- package/src/app/demo-components/expand-button/expand-button-demo.html +28 -0
- package/src/app/demo-components/expand-button/expand-button-demo.scss +45 -0
- package/src/app/demo-components/expand-button/expand-button-demo.ts +28 -0
- package/src/app/demo-components/expansion/expansion-demo.html +105 -0
- package/src/app/demo-components/expansion/expansion-demo.scss +11 -0
- package/src/app/demo-components/expansion/expansion-demo.ts +49 -0
- package/src/app/demo-components/forms/forms-demo.html +114 -0
- package/src/app/demo-components/forms/forms-demo.scss +43 -0
- package/src/app/demo-components/forms/forms-demo.ts +57 -0
- package/src/app/demo-components/message/message-demo.html +47 -0
- package/src/app/demo-components/message/message-demo.ts +33 -0
- package/src/app/demo-components/message/message.html +15 -0
- package/src/app/demo-components/message/message.scss +115 -0
- package/src/app/demo-components/message/message.ts +39 -0
- package/src/app/demo-components/sidebar/sidebar-demo.html +46 -0
- package/src/app/demo-components/sidebar/sidebar-demo.scss +47 -0
- package/src/app/demo-components/sidebar/sidebar-demo.ts +27 -0
- package/src/app/demo-components/sidebar/sidebar.html +15 -0
- package/src/app/demo-components/sidebar/sidebar.scss +25 -0
- package/src/app/demo-components/sidebar/sidebar.ts +87 -0
- package/src/app/demo-components/slide-toggle/slide-toggle-demo.html +110 -0
- package/src/app/demo-components/slide-toggle/slide-toggle-demo.scss +45 -0
- package/src/app/demo-components/slide-toggle/slide-toggle-demo.ts +39 -0
- package/src/app/demo-components/stepper/stepper-demo.html +99 -0
- package/src/app/demo-components/stepper/stepper-demo.ts +84 -0
- package/src/app/demo-components/tables/clean_tables_scss.py +16 -0
- package/src/app/demo-components/tables/tables-demo.html +64 -0
- package/src/app/demo-components/tables/tables-demo.scss +18 -0
- package/src/app/demo-components/tables/tables-demo.ts +89 -0
- package/src/app/demo-components/tabs/tabs-demo.html +168 -0
- package/src/app/demo-components/tabs/tabs-demo.scss +22 -0
- package/src/app/demo-components/tabs/tabs-demo.ts +76 -0
- package/src/app/demo-components/toolbars/toolbars-demo.html +50 -0
- package/src/app/demo-components/toolbars/toolbars-demo.scss +29 -0
- package/src/app/demo-components/toolbars/toolbars-demo.ts +25 -0
- package/src/app/demo-components/tooltip/tooltip-demo.html +80 -0
- package/src/app/demo-components/tooltip/tooltip-demo.scss +30 -0
- package/src/app/demo-components/tooltip/tooltip-demo.ts +27 -0
- package/src/app/demo-components/typography/typography-demo.html +23 -0
- package/src/app/demo-components/typography/typography-demo.scss +49 -0
- package/src/app/demo-components/typography/typography-demo.ts +72 -0
- package/src/app/demo-components/workflow-graph/workflow-graph-demo.html +25 -0
- package/src/app/demo-components/workflow-graph/workflow-graph-demo.scss +48 -0
- package/src/app/demo-components/workflow-graph/workflow-graph-demo.ts +133 -0
- package/src/app/layout/layout.html +12 -0
- package/src/app/layout/layout.scss +21 -0
- package/src/app/layout/layout.ts +19 -0
- package/src/app/layout/side-menu/side-menu.html +32 -0
- package/src/app/layout/side-menu/side-menu.scss +52 -0
- package/src/app/layout/side-menu/side-menu.ts +70 -0
- package/src/app/layout/top-action-bar/top-action-bar.html +41 -0
- package/src/app/layout/top-action-bar/top-action-bar.scss +98 -0
- package/src/app/layout/top-action-bar/top-action-bar.ts +68 -0
- package/src/app/page-templates/complex-form/complex-form.html +103 -0
- package/src/app/page-templates/complex-form/complex-form.scss +110 -0
- package/src/app/page-templates/complex-form/complex-form.ts +66 -0
- package/src/app/page-templates/firewall-add/firewall-add.html +78 -0
- package/src/app/page-templates/firewall-add/firewall-add.scss +1 -0
- package/src/app/page-templates/firewall-add/firewall-add.ts +94 -0
- package/src/app/page-templates/firewall-details/firewall-details.html +115 -0
- package/src/app/page-templates/firewall-details/firewall-details.scss +21 -0
- package/src/app/page-templates/firewall-details/firewall-details.ts +91 -0
- package/src/app/page-templates/firewall-list/firewall-list.html +99 -0
- package/src/app/page-templates/firewall-list/firewall-list.scss +21 -0
- package/src/app/page-templates/firewall-list/firewall-list.ts +85 -0
- package/src/app/page-templates/firewall.service.ts +84 -0
- package/src/app/services/project.service.ts +24 -0
- package/src/index.html +17 -0
- package/src/main.ts +6 -0
- package/src/styles.scss +739 -0
- package/start_server.sh +4 -0
- package/tsconfig.app.json +15 -0
- package/tsconfig.json +33 -0
- package/tsconfig.spec.json +15 -0
package/Dockerfile
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Build stage
|
|
2
|
+
FROM node:20-slim AS build
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
COPY package.json ./
|
|
5
|
+
RUN npm install
|
|
6
|
+
COPY . .
|
|
7
|
+
RUN npm run build
|
|
8
|
+
|
|
9
|
+
# Production stage
|
|
10
|
+
FROM nginx:alpine
|
|
11
|
+
COPY --from=build /app/dist/components/browser /usr/share/nginx/html
|
|
12
|
+
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
13
|
+
EXPOSE 8080
|
|
14
|
+
CMD ["nginx", "-g", "daemon off;"]
|
package/PUBLISH_GUIDE.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Publishing Guide for gcp-material-ui
|
|
2
|
+
|
|
3
|
+
This document describes how to publish new versions of `gcp-material-ui` to npm.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
1. **npm account**: You need a valid npm account.
|
|
8
|
+
2. **Access rights**: You need publish access to the package scope (if using one).
|
|
9
|
+
3. **Authentication**: Run `npm login` before running the publish script if you are not already logged in.
|
|
10
|
+
|
|
11
|
+
## Step-by-step Guide
|
|
12
|
+
|
|
13
|
+
### 1. Make Changes
|
|
14
|
+
Make your changes to the components, styles, or variables in the `src/` directory.
|
|
15
|
+
|
|
16
|
+
### 2. Verify Changes
|
|
17
|
+
Run `npm run build` (or `npm run start` for dev) to ensure there are no compilation errors.
|
|
18
|
+
|
|
19
|
+
### 3. Publish
|
|
20
|
+
|
|
21
|
+
Run the provided `publish.sh` script to bump version and publish:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
cd gcp-material-ui
|
|
25
|
+
./publish.sh [patch|minor|major]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- Leaving it blank defaults to a **patch** version bump (0.0.1 -> 0.0.2).
|
|
29
|
+
- Specify `minor` for new features (0.1.0).
|
|
30
|
+
- Specify `major` for breaking changes (1.0.0).
|
|
31
|
+
|
|
32
|
+
> [!NOTE]
|
|
33
|
+
> The script disables standard git tag creation so it won't pollute the root monorepo history as it's a nested sub-folder package. To commit `package.json` changes, do it manually for the monorepo.
|
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
## 🧩 Component Demos
|
|
2
|
+
|
|
3
|
+
This repository contains a rich set of shared component demos showcasing standard Material 3 usage and best practices.
|
|
4
|
+
|
|
5
|
+
Explore the following directories in `src/app/components`:
|
|
6
|
+
|
|
7
|
+
- `buttons`, `charts`, `chips`, `dialog`, `expansion`, `forms`, `message`, `page`, `sidebar`, `stepper`, `tables`, `tabs`, `toolbars`, `workflow-graph`
|
|
8
|
+
|
|
9
|
+
To run the application locally and explore demos:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
ng serve
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 📄 Page Templates
|
|
16
|
+
|
|
17
|
+
The project includes pre-built page templates for common UI workflows (GCP-style):
|
|
18
|
+
|
|
19
|
+
- `complex-form`: Advanced multi-input forms
|
|
20
|
+
- `firewall-list`: Tabular listing with filters
|
|
21
|
+
- `firewall-add`: Left-aligned creation forms
|
|
22
|
+
- `firewall-details`: Immersive detail views
|
|
23
|
+
|
|
24
|
+
## 🎨 Shared Styling & Variables
|
|
25
|
+
|
|
26
|
+
You can use this workspace as a central design system in other apps via local linking.
|
|
27
|
+
|
|
28
|
+
### How to use in other apps:
|
|
29
|
+
|
|
30
|
+
1. **Add Dependency**: In your consumer app's `package.json`:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"components": "file:../components"
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. **Run Sync**: Run `npm install` to symlink.
|
|
39
|
+
|
|
40
|
+
3. **Import System**:
|
|
41
|
+
|
|
42
|
+
```scss
|
|
43
|
+
// Global themes and reset
|
|
44
|
+
@use 'components/styles';
|
|
45
|
+
|
|
46
|
+
// Just variables (no CSS duplication)
|
|
47
|
+
@use 'components/variables' as theme;
|
|
48
|
+
```
|
package/angular.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"cli": {
|
|
5
|
+
"packageManager": "npm",
|
|
6
|
+
"analytics": false
|
|
7
|
+
},
|
|
8
|
+
"newProjectRoot": "projects",
|
|
9
|
+
"projects": {
|
|
10
|
+
"components": {
|
|
11
|
+
"projectType": "application",
|
|
12
|
+
"schematics": {
|
|
13
|
+
"@schematics/angular:component": {
|
|
14
|
+
"style": "scss"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"root": "",
|
|
18
|
+
"sourceRoot": "src",
|
|
19
|
+
"prefix": "app",
|
|
20
|
+
"architect": {
|
|
21
|
+
"build": {
|
|
22
|
+
"builder": "@angular/build:application",
|
|
23
|
+
"options": {
|
|
24
|
+
"browser": "src/main.ts",
|
|
25
|
+
"tsConfig": "tsconfig.app.json",
|
|
26
|
+
"inlineStyleLanguage": "scss",
|
|
27
|
+
"assets": [
|
|
28
|
+
{
|
|
29
|
+
"glob": "**/*",
|
|
30
|
+
"input": "public"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"styles": [
|
|
34
|
+
"src/styles.scss"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"configurations": {
|
|
38
|
+
"production": {
|
|
39
|
+
"budgets": [
|
|
40
|
+
{
|
|
41
|
+
"type": "initial",
|
|
42
|
+
"maximumWarning": "2MB",
|
|
43
|
+
"maximumError": "3MB"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "anyComponentStyle",
|
|
47
|
+
"maximumWarning": "5MB",
|
|
48
|
+
"maximumError": "10MB"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"outputHashing": "all"
|
|
52
|
+
},
|
|
53
|
+
"development": {
|
|
54
|
+
"optimization": false,
|
|
55
|
+
"extractLicenses": false,
|
|
56
|
+
"sourceMap": true
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"defaultConfiguration": "production"
|
|
60
|
+
},
|
|
61
|
+
"serve": {
|
|
62
|
+
"builder": "@angular/build:dev-server",
|
|
63
|
+
"configurations": {
|
|
64
|
+
"production": {
|
|
65
|
+
"buildTarget": "components:build:production"
|
|
66
|
+
},
|
|
67
|
+
"development": {
|
|
68
|
+
"buildTarget": "components:build:development"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"defaultConfiguration": "development"
|
|
72
|
+
},
|
|
73
|
+
"test": {
|
|
74
|
+
"builder": "@angular/build:unit-test"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
package/deploy.sh
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Exit on error
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
# Configuration
|
|
7
|
+
PROJECT_ID="cn-fe-ai-apps"
|
|
8
|
+
APP_NAME=$(basename "$PWD")
|
|
9
|
+
# Use hyphens instead of underscores for Cloud Run service name compliance if needed,
|
|
10
|
+
# but user specifically asked for "root folder of this application" (e.g. react_oauth_template).
|
|
11
|
+
# Cloud Run names must use only lowercase letters, numbers, and hyphens.
|
|
12
|
+
# So react_oauth_template might be invalid if it contains underscores.
|
|
13
|
+
# I will auto-convert underscores to hyphens to be safe, or I should check validation.
|
|
14
|
+
# Cloud Run Service naming: "only lowercase letters, numbers, and hyphens".
|
|
15
|
+
# So react_oauth_template MUST be converted to react-oauth-template.
|
|
16
|
+
SANITIZED_APP_NAME=$(echo "$APP_NAME" | tr '_' '-' | tr '[:upper:]' '[:lower:]')
|
|
17
|
+
|
|
18
|
+
IMAGE_NAME="gcr.io/$PROJECT_ID/$SANITIZED_APP_NAME"
|
|
19
|
+
REGION="us-central1"
|
|
20
|
+
|
|
21
|
+
echo "========================================================"
|
|
22
|
+
echo "Deploying $APP_NAME (as service: $SANITIZED_APP_NAME)"
|
|
23
|
+
echo "Project: $PROJECT_ID"
|
|
24
|
+
echo "Region: $REGION"
|
|
25
|
+
echo "========================================================"
|
|
26
|
+
|
|
27
|
+
# 1. Set Project
|
|
28
|
+
echo "Setting project to $PROJECT_ID..."
|
|
29
|
+
gcloud config set project "$PROJECT_ID"
|
|
30
|
+
|
|
31
|
+
# 2. Build
|
|
32
|
+
echo "Submitting build..."
|
|
33
|
+
gcloud builds submit --tag "$IMAGE_NAME" .
|
|
34
|
+
|
|
35
|
+
# 3. Deploy
|
|
36
|
+
echo "Deploying to Cloud Run..."
|
|
37
|
+
gcloud run deploy "$SANITIZED_APP_NAME" \
|
|
38
|
+
--image "$IMAGE_NAME" \
|
|
39
|
+
--platform managed \
|
|
40
|
+
--region "$REGION" \
|
|
41
|
+
--allow-unauthenticated
|
|
42
|
+
|
|
43
|
+
echo "========================================================"
|
|
44
|
+
echo "Deployment Complete!"
|
|
45
|
+
echo "Service URL:"
|
|
46
|
+
gcloud run services describe "$SANITIZED_APP_NAME" --platform managed --region "$REGION" --format 'value(status.url)'
|
|
47
|
+
echo "========================================================"
|
package/nginx.conf
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
server {
|
|
2
|
+
listen 8080;
|
|
3
|
+
server_name localhost;
|
|
4
|
+
|
|
5
|
+
location / {
|
|
6
|
+
root /usr/share/nginx/html;
|
|
7
|
+
index index.html index.htm;
|
|
8
|
+
try_files $uri $uri/ /index.html;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
error_page 500 502 503 504 /50x.html;
|
|
12
|
+
location = /50x.html {
|
|
13
|
+
root /usr/share/nginx/html;
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gcp-material-ui",
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"ng": "ng",
|
|
6
|
+
"deploy": "./deploy.sh",
|
|
7
|
+
"publish": "./publish.sh",
|
|
8
|
+
"start": "ng serve",
|
|
9
|
+
"build": "ng build",
|
|
10
|
+
"watch": "ng build --watch --configuration development",
|
|
11
|
+
"test": "ng test"
|
|
12
|
+
},
|
|
13
|
+
"private": false,
|
|
14
|
+
"exports": {
|
|
15
|
+
"./styles": "./src/styles.scss",
|
|
16
|
+
"./variables": "./src/_variables.scss",
|
|
17
|
+
"./page": "./src/app/components/page/page.ts"
|
|
18
|
+
},
|
|
19
|
+
"packageManager": "npm@10.9.3",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@angular/animations": "^21.2.4",
|
|
22
|
+
"@angular/cdk": "^21.2.2",
|
|
23
|
+
"@angular/common": "^21.2.0",
|
|
24
|
+
"@angular/compiler": "^21.2.0",
|
|
25
|
+
"@angular/core": "^21.2.0",
|
|
26
|
+
"@angular/forms": "^21.2.0",
|
|
27
|
+
"@angular/material": "^21.2.2",
|
|
28
|
+
"@angular/platform-browser": "^21.2.0",
|
|
29
|
+
"@angular/router": "^21.2.0",
|
|
30
|
+
"@google/workflow-graph": "^0.1.2",
|
|
31
|
+
"@ngstack/code-editor": "^9.0.0",
|
|
32
|
+
"angular-oauth2-oidc": "^20.0.2",
|
|
33
|
+
"chart.js": "^4.5.1",
|
|
34
|
+
"ng2-charts": "^10.0.0",
|
|
35
|
+
"rxjs": "~7.8.0",
|
|
36
|
+
"tslib": "^2.3.0",
|
|
37
|
+
"zone.js": "^0.16.1"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@angular/build": "^21.2.2",
|
|
41
|
+
"@angular/cli": "^21.2.2",
|
|
42
|
+
"@angular/compiler-cli": "^21.2.0",
|
|
43
|
+
"jsdom": "^28.0.0",
|
|
44
|
+
"prettier": "^3.8.1",
|
|
45
|
+
"typescript": "~5.9.2",
|
|
46
|
+
"vitest": "^4.0.8"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg data-name="Google Cloud logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 138.35 24"><path d="M89.75 18.62A8.36 8.36 0 0 1 81.2 10a8.33 8.33 0 0 1 2.43-6.1 8.25 8.25 0 0 1 6.12-2.48 7.62 7.62 0 0 1 6 2.69l-1.47 1.47a5.64 5.64 0 0 0-4.53-2.14 6.22 6.22 0 0 0-4.57 1.84A6.38 6.38 0 0 0 83.36 10a6.38 6.38 0 0 0 1.82 4.74 6.18 6.18 0 0 0 4.57 1.84 6.44 6.44 0 0 0 5-2.42l1.54 1.5a8 8 0 0 1-2.87 2.17 8.67 8.67 0 0 1-3.67.79Zm10.37-16.83v16.47H98V1.79Zm1.82 10.83a6 6 0 0 1 1.64-4.3 5.57 5.57 0 0 1 4.16-1.7 5.51 5.51 0 0 1 4.14 1.7 5.92 5.92 0 0 1 1.65 4.3 5.87 5.87 0 0 1-1.65 4.3 5.47 5.47 0 0 1-4.14 1.7 5.53 5.53 0 0 1-4.16-1.7 6 6 0 0 1-1.64-4.3Zm2.12 0a4.1 4.1 0 0 0 1.06 2.94 3.6 3.6 0 0 0 5.24 0 4.1 4.1 0 0 0 1.06-2.94 4.07 4.07 0 0 0-1.06-2.92 3.56 3.56 0 0 0-5.24 0 4.07 4.07 0 0 0-1.06 2.92Zm21.17 5.64h-2v-1.57h-.1a3.75 3.75 0 0 1-1.48 1.38 4.23 4.23 0 0 1-2.08.55 4.18 4.18 0 0 1-3.19-1.18 4.74 4.74 0 0 1-1.11-3.37V7h2.11v6.94a2.49 2.49 0 0 0 2.79 2.76 2.63 2.63 0 0 0 2.11-1 3.69 3.69 0 0 0 .85-2.45V7h2.12Zm7.16.36a5 5 0 0 1-3.79-1.74 6.24 6.24 0 0 1-1.6-4.26 6.2 6.2 0 0 1 1.56-4.25 4.94 4.94 0 0 1 3.79-1.75 4.78 4.78 0 0 1 2.27.53 4 4 0 0 1 1.58 1.4h.09L136.24 7V1.79h2.11v16.47h-2v-1.57h-.09a4 4 0 0 1-1.58 1.4 4.78 4.78 0 0 1-2.29.53Zm.35-1.93a3.21 3.21 0 0 0 2.55-1.13 4.17 4.17 0 0 0 1-2.94 4.21 4.21 0 0 0-1-2.92 3.23 3.23 0 0 0-2.55-1.15 3.29 3.29 0 0 0-2.55 1.15 4.21 4.21 0 0 0-1 2.92 4.14 4.14 0 0 0 1 2.92 3.29 3.29 0 0 0 2.55 1.15Z" style="fill:#5f6368"/><g data-name="75x24px"><path d="M9.49 18.62A9.46 9.46 0 0 1 0 9.31 9.46 9.46 0 0 1 9.49 0a8.91 8.91 0 0 1 6.41 2.57l-1.81 1.79a6.51 6.51 0 0 0-4.6-1.82 6.69 6.69 0 0 0-6.71 6.77 6.69 6.69 0 0 0 6.71 6.77 6.25 6.25 0 0 0 4.72-1.87A5.26 5.26 0 0 0 15.6 11H9.49V8.47h8.6a8.38 8.38 0 0 1 .13 1.59A8.37 8.37 0 0 1 16 16a8.57 8.57 0 0 1-6.51 2.62Z" style="fill:#4285f4"/><path d="M31.52 12.62a5.94 5.94 0 1 1-11.87 0 5.94 5.94 0 1 1 11.87 0Zm-2.6 0a3.35 3.35 0 1 0-6.67 0 3.35 3.35 0 1 0 6.67 0Z" style="fill:#ea4335"/><path d="M44.83 12.62a5.94 5.94 0 1 1-11.87 0 5.94 5.94 0 1 1 11.87 0Zm-2.6 0a3.35 3.35 0 1 0-6.68 0 3.35 3.35 0 1 0 6.68 0Z" style="fill:#fbbc04"/><path d="M57.8 7v10.76c0 4.42-2.63 6.24-5.73 6.24a5.75 5.75 0 0 1-5.34-3.54l2.31-1a3.32 3.32 0 0 0 3 2.14c2 0 3.22-1.23 3.22-3.52v-.86h-.06a4.16 4.16 0 0 1-3.2 1.4 6 6 0 0 1 0-12A4.22 4.22 0 0 1 55.2 8h.09V7Zm-2.33 5.66A3.39 3.39 0 0 0 52.25 9a3.48 3.48 0 0 0-3.35 3.66 3.45 3.45 0 0 0 3.35 3.61 3.35 3.35 0 0 0 3.22-3.62Z" style="fill:#4285f4"/><path d="M62.43.64v17.62h-2.64V.64Z" style="fill:#34a853"/><path d="m72.83 14.6 2.06 1.4a6 6 0 0 1-5 2.66 5.81 5.81 0 0 1-5.89-6 5.52 5.52 0 0 1 10.75-2.18l.27.69-8 3.31a3.07 3.07 0 0 0 2.92 1.82 3.44 3.44 0 0 0 2.89-1.7Zm-6.31-2.16 5.38-2.22A2.34 2.34 0 0 0 69.66 9a3.29 3.29 0 0 0-3.14 3.44Z" style="fill:#ea4335"/></g></svg>
|
package/publish.sh
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
VERSION_TYPE=${1:-patch}
|
|
6
|
+
|
|
7
|
+
echo "Bumping version ($VERSION_TYPE) without git tag..."
|
|
8
|
+
npm version "$VERSION_TYPE" --no-git-tag-version
|
|
9
|
+
|
|
10
|
+
echo "Publishing to npm..."
|
|
11
|
+
# Using --access public ensures it is published publicly (change if needed for private scope)
|
|
12
|
+
npm publish --access public
|
|
13
|
+
|
|
14
|
+
echo "✅ Published successfully!"
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
@use 'sass:math';
|
|
3
|
+
|
|
4
|
+
// --- Local Utilities ---
|
|
5
|
+
@function px-to-rem($px) {
|
|
6
|
+
@return math.div($px, 16) * 1rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// --- GM2 Palette: White/Black ---
|
|
10
|
+
$white: #fff;
|
|
11
|
+
$black: #000;
|
|
12
|
+
|
|
13
|
+
// --- GM2 Palette: Grey ---
|
|
14
|
+
$grey50: #f8f9fa;
|
|
15
|
+
$grey100: #f1f3f4;
|
|
16
|
+
$grey200: #e8eaed;
|
|
17
|
+
$grey300: #dadce0;
|
|
18
|
+
$grey400: #bdc1c6;
|
|
19
|
+
$grey500: #9aa0a6;
|
|
20
|
+
$grey600: #80868b;
|
|
21
|
+
$grey700: #5f6368;
|
|
22
|
+
$grey800: #3c4043;
|
|
23
|
+
$grey900: #202124;
|
|
24
|
+
$grey1000: #131314;
|
|
25
|
+
$grey1100: #000;
|
|
26
|
+
|
|
27
|
+
// --- GM2 Brand Palette: Blue ---
|
|
28
|
+
$blue50: #e8f0fe;
|
|
29
|
+
$blue100: #d2e3fc;
|
|
30
|
+
$blue200: #aecbfa;
|
|
31
|
+
$blue300: #8ab4f8;
|
|
32
|
+
$blue400: #669df6;
|
|
33
|
+
$blue500: #4285f4;
|
|
34
|
+
$blue600: #0c67df;
|
|
35
|
+
$blue700: #1967d2;
|
|
36
|
+
$blue800: #185abc;
|
|
37
|
+
$blue900: #174ea6;
|
|
38
|
+
$blue1000: #16427f;
|
|
39
|
+
$blue1100: #153258;
|
|
40
|
+
$blue1200: #14243a;
|
|
41
|
+
|
|
42
|
+
// --- GM2 Brand Palette: Green ---
|
|
43
|
+
$green50: #e6f4ea;
|
|
44
|
+
$green100: #ceead6;
|
|
45
|
+
$green600: #1e8e3e;
|
|
46
|
+
$green700: #137333;
|
|
47
|
+
|
|
48
|
+
// --- GM2 Brand Palette: Yellow ---
|
|
49
|
+
$yellow50: #fef7e0;
|
|
50
|
+
$yellow100: #feefc3;
|
|
51
|
+
$yellow600: #f9ab00;
|
|
52
|
+
$yellow700: #ea8600;
|
|
53
|
+
|
|
54
|
+
// --- GM2 Brand Palette: Red ---
|
|
55
|
+
$red50: #fce8e6;
|
|
56
|
+
$red100: #fad2cf;
|
|
57
|
+
$red200: #f6aea9;
|
|
58
|
+
$red300: #f28b82;
|
|
59
|
+
$red400: #ee675c;
|
|
60
|
+
$red500: #ea4335;
|
|
61
|
+
$red600: #d93025;
|
|
62
|
+
$red700: #c5221f;
|
|
63
|
+
$red800: #b31412;
|
|
64
|
+
$red900: #a50e0e;
|
|
65
|
+
$red1000: #771b1a;
|
|
66
|
+
$red1100: #521c19;
|
|
67
|
+
$red1200: #371817;
|
|
68
|
+
|
|
69
|
+
// LINT.IfChange
|
|
70
|
+
// --- Local Typography Setup ---
|
|
71
|
+
$_cm-ref-gm2-type-family-display: ('Google Sans', sans-serif);
|
|
72
|
+
$_cm-ref-gm2-type-family-body: ('Roboto', sans-serif);
|
|
73
|
+
$_font-weight-regular: 400;
|
|
74
|
+
$_font-weight-medium: 500;
|
|
75
|
+
|
|
76
|
+
// --- Compound M3 Palette Definition ---
|
|
77
|
+
$my-m3-palette: (
|
|
78
|
+
0: #000000,
|
|
79
|
+
10: $blue900,
|
|
80
|
+
20: $blue800,
|
|
81
|
+
25: $blue700,
|
|
82
|
+
30: $blue700,
|
|
83
|
+
35: $blue600,
|
|
84
|
+
40: $blue600,
|
|
85
|
+
50: $blue500,
|
|
86
|
+
60: $blue400,
|
|
87
|
+
70: $blue300,
|
|
88
|
+
80: $blue200,
|
|
89
|
+
90: $blue100,
|
|
90
|
+
95: $blue50,
|
|
91
|
+
98: $grey50,
|
|
92
|
+
99: #ffffff,
|
|
93
|
+
100: #ffffff,
|
|
94
|
+
secondary: (
|
|
95
|
+
0: #000000,
|
|
96
|
+
10: $blue900,
|
|
97
|
+
20: $blue800,
|
|
98
|
+
25: $blue700,
|
|
99
|
+
30: $blue700,
|
|
100
|
+
35: $blue600,
|
|
101
|
+
40: $blue600,
|
|
102
|
+
50: $blue500,
|
|
103
|
+
60: $blue400,
|
|
104
|
+
70: $blue300,
|
|
105
|
+
80: $blue200,
|
|
106
|
+
90: $blue100,
|
|
107
|
+
95: $blue50,
|
|
108
|
+
98: $grey50,
|
|
109
|
+
99: #ffffff,
|
|
110
|
+
100: #ffffff,
|
|
111
|
+
),
|
|
112
|
+
neutral: (
|
|
113
|
+
0: #000000,
|
|
114
|
+
10: $grey900,
|
|
115
|
+
20: $grey800,
|
|
116
|
+
25: $grey700,
|
|
117
|
+
30: $grey700,
|
|
118
|
+
35: $grey600,
|
|
119
|
+
40: $grey600,
|
|
120
|
+
50: $grey500,
|
|
121
|
+
60: $grey400,
|
|
122
|
+
70: $grey300,
|
|
123
|
+
80: $grey200,
|
|
124
|
+
90: $grey100,
|
|
125
|
+
95: $grey50,
|
|
126
|
+
98: #ffffff,
|
|
127
|
+
99: #ffffff,
|
|
128
|
+
100: #ffffff,
|
|
129
|
+
),
|
|
130
|
+
neutral-variant: (
|
|
131
|
+
0: #000000,
|
|
132
|
+
10: $grey900,
|
|
133
|
+
20: $grey800,
|
|
134
|
+
25: $grey700,
|
|
135
|
+
30: $grey700,
|
|
136
|
+
35: $grey600,
|
|
137
|
+
40: $grey600,
|
|
138
|
+
50: $grey500,
|
|
139
|
+
60: $grey400,
|
|
140
|
+
70: $grey300,
|
|
141
|
+
80: $grey200,
|
|
142
|
+
90: $grey100,
|
|
143
|
+
95: $grey50,
|
|
144
|
+
98: #ffffff,
|
|
145
|
+
99: #ffffff,
|
|
146
|
+
100: #ffffff,
|
|
147
|
+
),
|
|
148
|
+
error: (
|
|
149
|
+
0: #000000,
|
|
150
|
+
10: #410002,
|
|
151
|
+
20: #690005,
|
|
152
|
+
25: #7e0007,
|
|
153
|
+
30: #93000a,
|
|
154
|
+
35: #a80710,
|
|
155
|
+
40: #ba1a1a,
|
|
156
|
+
50: #de3730,
|
|
157
|
+
60: #ff5449,
|
|
158
|
+
70: #ff897d,
|
|
159
|
+
80: #ffb4ab,
|
|
160
|
+
90: #ffdad6,
|
|
161
|
+
95: #ffedea,
|
|
162
|
+
98: #fff8f7,
|
|
163
|
+
99: #fffbff,
|
|
164
|
+
100: #ffffff,
|
|
165
|
+
),
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
// --- M3 Theme Definition ---
|
|
169
|
+
$my-theme: mat.define-theme(
|
|
170
|
+
(
|
|
171
|
+
color: (
|
|
172
|
+
theme-type: light,
|
|
173
|
+
primary: $my-m3-palette,
|
|
174
|
+
),
|
|
175
|
+
typography: (
|
|
176
|
+
plain-family: $_cm-ref-gm2-type-family-body,
|
|
177
|
+
brand-family: $_cm-ref-gm2-type-family-display,
|
|
178
|
+
regular-weight: $_font-weight-regular,
|
|
179
|
+
medium-weight: $_font-weight-medium,
|
|
180
|
+
bold-weight: 700,
|
|
181
|
+
),
|
|
182
|
+
)
|
|
183
|
+
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ApplicationConfig, provideBrowserGlobalErrorListeners, importProvidersFrom } from '@angular/core';
|
|
2
|
+
import { provideRouter } from '@angular/router';
|
|
3
|
+
import { provideCharts, withDefaultRegisterables } from 'ng2-charts';
|
|
4
|
+
import { provideAnimations } from '@angular/platform-browser/animations';
|
|
5
|
+
import { provideHttpClient } from '@angular/common/http';
|
|
6
|
+
import { CodeEditorModule } from '@ngstack/code-editor';
|
|
7
|
+
|
|
8
|
+
import { routes } from './app.routes';
|
|
9
|
+
|
|
10
|
+
export const appConfig: ApplicationConfig = {
|
|
11
|
+
providers: [
|
|
12
|
+
provideBrowserGlobalErrorListeners(),
|
|
13
|
+
provideRouter(routes),
|
|
14
|
+
provideCharts(withDefaultRegisterables()),
|
|
15
|
+
provideAnimations(),
|
|
16
|
+
provideHttpClient(),
|
|
17
|
+
importProvidersFrom(CodeEditorModule.forRoot())
|
|
18
|
+
]
|
|
19
|
+
};
|
package/src/app/app.html
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<router-outlet></router-outlet>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Routes } from '@angular/router';
|
|
2
|
+
import { LayoutComponent } from './layout/layout';
|
|
3
|
+
import { FormsDemoComponent } from './demo-components/forms/forms-demo';
|
|
4
|
+
import { TablesDemoComponent } from './demo-components/tables/tables-demo';
|
|
5
|
+
import { ButtonsDemoComponent } from './demo-components/buttons/buttons-demo';
|
|
6
|
+
import { ToolbarsDemoComponent } from './demo-components/toolbars/toolbars-demo';
|
|
7
|
+
import { TabsDemoComponent } from './demo-components/tabs/tabs-demo';
|
|
8
|
+
import { WorkflowGraphDemoComponent } from './demo-components/workflow-graph/workflow-graph-demo';
|
|
9
|
+
import { ChartsDemoComponent } from './demo-components/charts/charts-demo';
|
|
10
|
+
import { SidebarDemoComponent } from './demo-components/sidebar/sidebar-demo';
|
|
11
|
+
import { ChipsDemoComponent } from './demo-components/chips/chips-demo';
|
|
12
|
+
import { TypographyDemoComponent } from './demo-components/typography/typography-demo';
|
|
13
|
+
import { ExpandButtonDemoComponent } from './demo-components/expand-button/expand-button-demo';
|
|
14
|
+
import { SlideToggleDemoComponent } from './demo-components/slide-toggle/slide-toggle-demo';
|
|
15
|
+
import { CodeSnippetDemoComponent } from './demo-components/code-snippet/code-snippet-demo';
|
|
16
|
+
import { TooltipDemoComponent } from './demo-components/tooltip/tooltip-demo';
|
|
17
|
+
import { CardDemoComponent } from './demo-components/card/card-demo';
|
|
18
|
+
|
|
19
|
+
import { ExpansionDemoComponent } from './demo-components/expansion/expansion-demo';
|
|
20
|
+
import { DialogDemoComponent } from './demo-components/dialog/dialog-demo';
|
|
21
|
+
import { StepperDemoComponent } from './demo-components/stepper/stepper-demo';
|
|
22
|
+
import { MessageDemoComponent } from './demo-components/message/message-demo';
|
|
23
|
+
import { FirewallTemplateListComponent } from './page-templates/firewall-list/firewall-list';
|
|
24
|
+
import { FirewallTemplateAddComponent } from './page-templates/firewall-add/firewall-add';
|
|
25
|
+
import { FirewallTemplateDetailsComponent } from './page-templates/firewall-details/firewall-details';
|
|
26
|
+
import { ComplexFormComponent } from './page-templates/complex-form/complex-form';
|
|
27
|
+
import { authGuard } from './auth/auth.guard';
|
|
28
|
+
import { DashboardComponent } from './dashboard/dashboard';
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export const routes: Routes = [
|
|
32
|
+
{
|
|
33
|
+
path: '',
|
|
34
|
+
component: LayoutComponent,
|
|
35
|
+
canActivate: [authGuard],
|
|
36
|
+
children: [
|
|
37
|
+
{ path: '', component: DashboardComponent },
|
|
38
|
+
{ path: 'demo-components/forms', component: FormsDemoComponent },
|
|
39
|
+
{ path: 'demo-components/tables', component: TablesDemoComponent },
|
|
40
|
+
{ path: 'demo-components/buttons', component: ButtonsDemoComponent },
|
|
41
|
+
{ path: 'demo-components/toolbars', component: ToolbarsDemoComponent },
|
|
42
|
+
{ path: 'demo-components/tabs', component: TabsDemoComponent },
|
|
43
|
+
{ path: 'demo-components/workflow-graph', component: WorkflowGraphDemoComponent },
|
|
44
|
+
{ path: 'demo-components/charts', component: ChartsDemoComponent },
|
|
45
|
+
{ path: 'demo-components/sidebar', component: SidebarDemoComponent },
|
|
46
|
+
{ path: 'demo-components/chips', component: ChipsDemoComponent },
|
|
47
|
+
{ path: 'demo-components/typography', component: TypographyDemoComponent },
|
|
48
|
+
{ path: 'demo-components/expand-button', component: ExpandButtonDemoComponent },
|
|
49
|
+
{ path: 'demo-components/slide-toggle', component: SlideToggleDemoComponent },
|
|
50
|
+
{ path: 'demo-components/code-snippet', component: CodeSnippetDemoComponent },
|
|
51
|
+
{ path: 'demo-components/tooltip', component: TooltipDemoComponent },
|
|
52
|
+
{ path: 'demo-components/card', component: CardDemoComponent },
|
|
53
|
+
{ path: 'demo-components/expansion', component: ExpansionDemoComponent },
|
|
54
|
+
{ path: 'demo-components/dialog', component: DialogDemoComponent },
|
|
55
|
+
{ path: 'demo-components/stepper', component: StepperDemoComponent },
|
|
56
|
+
{ path: 'demo-components/message', component: MessageDemoComponent },
|
|
57
|
+
{ path: 'templates/firewalls', component: FirewallTemplateListComponent },
|
|
58
|
+
{ path: 'templates/firewalls/add', component: FirewallTemplateAddComponent },
|
|
59
|
+
{ path: 'templates/firewalls/:id', component: FirewallTemplateDetailsComponent },
|
|
60
|
+
{ path: 'templates/complex-form', component: ComplexFormComponent },
|
|
61
|
+
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
|
package/src/app/app.scss
ADDED
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
import { App } from './app';
|
|
3
|
+
|
|
4
|
+
describe('App', () => {
|
|
5
|
+
beforeEach(async () => {
|
|
6
|
+
await TestBed.configureTestingModule({
|
|
7
|
+
imports: [App],
|
|
8
|
+
}).compileComponents();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('should create the app', () => {
|
|
12
|
+
const fixture = TestBed.createComponent(App);
|
|
13
|
+
const app = fixture.componentInstance;
|
|
14
|
+
expect(app).toBeTruthy();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('should render title', async () => {
|
|
18
|
+
const fixture = TestBed.createComponent(App);
|
|
19
|
+
await fixture.whenStable();
|
|
20
|
+
const compiled = fixture.nativeElement as HTMLElement;
|
|
21
|
+
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, components');
|
|
22
|
+
});
|
|
23
|
+
});
|
package/src/app/app.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { RouterOutlet } from '@angular/router';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'app-root',
|
|
6
|
+
imports: [RouterOutlet],
|
|
7
|
+
templateUrl: './app.html',
|
|
8
|
+
styleUrl: './app.scss'
|
|
9
|
+
})
|
|
10
|
+
export class App {
|
|
11
|
+
protected readonly title = signal('components');
|
|
12
|
+
}
|