@smitag/angular-shared-ui 20.1.4 → 22.1.5
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
CHANGED
|
@@ -103,3 +103,23 @@ These levels are defined as CSS box-shadow values that can be styled to an eleme
|
|
|
103
103
|
| .level3 | .mat-mdc-mini-fab, .mat-mdc-fab |
|
|
104
104
|
| .level4 | none |
|
|
105
105
|
| .level5 | none |
|
|
106
|
+
|
|
107
|
+
## AI Agent Style Guide
|
|
108
|
+
|
|
109
|
+
This package ships an AI-agent style guide and class catalog under `skills/smit-ui-style-guide/` so external coding agents across repositories follow the same design tokens, layout utilities, and Angular Material conventions.
|
|
110
|
+
|
|
111
|
+
### Referencing from a consuming project
|
|
112
|
+
|
|
113
|
+
Add the following instruction to your project's `AGENTS.md`, `CLAUDE.md`, `.cursor/rules`, or `.github/copilot-instructions.md`:
|
|
114
|
+
|
|
115
|
+
```markdown
|
|
116
|
+
## UI & Styling
|
|
117
|
+
|
|
118
|
+
Before creating or editing any Angular template or SCSS file, read and follow:
|
|
119
|
+
- `node_modules/@smitag/angular-shared-ui/skills/smit-ui-style-guide/SKILL.md`
|
|
120
|
+
- `node_modules/@smitag/angular-shared-ui/skills/smit-ui-style-guide/references/class-catalog.md`
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Installing as an Agent Skill
|
|
124
|
+
|
|
125
|
+
Agents supporting the `SKILL.md` format (Antigravity, Claude Code, Codex, Cursor, etc.) can also load `node_modules/@smitag/angular-shared-ui/skills/smit-ui-style-guide/` directly as a skill folder.
|
package/package.json
CHANGED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: smit-ui-style-guide
|
|
3
|
+
description: Design system and SCSS style guide for Angular applications using @smitag/angular-shared-ui. Apply whenever creating or editing Angular component templates, SCSS/CSS files, Angular Material components, layouts, color roles, typography, elevation, cards, toolbars, drawers, dialogs, forms, tabs, or snackbars in a consuming project.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Smart InsurTech UI (`@smitag/angular-shared-ui`) Style Guide
|
|
7
|
+
|
|
8
|
+
Enforce visual and structural consistency across Angular applications built on `@smitag/angular-shared-ui` (Angular >= 20, Angular Material >= 20, Material 3).
|
|
9
|
+
|
|
10
|
+
Consult [references/class-catalog.md](references/class-catalog.md) for the complete inventory of utility classes, color roles, typography scales, elevation levels, and component classes.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. Mandatory Workflow Before Writing UI Code
|
|
15
|
+
|
|
16
|
+
1. **Inspect the project's global `styles.scss`** to check:
|
|
17
|
+
- Which theme is imported (`themes/default` vs `themes/admin`).
|
|
18
|
+
- Whether `@smitag/angular-shared-ui/src/lib/styles/layout` is imported or omitted (projects using Tailwind CSS omit `layout`).
|
|
19
|
+
- Whether Font Awesome Pro is configured (look for `@fortawesome/fontawesome-pro`).
|
|
20
|
+
2. **Use `shared-ui` classes and Material 3 CSS variables first.** Only write component-scoped SCSS for layout or spacing that cannot be expressed with existing utility classes or `var(--mat-sys-*)` tokens.
|
|
21
|
+
3. **Never inspect or guess token names from memory** — verify them in [references/class-catalog.md](references/class-catalog.md).
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Global Setup Rules
|
|
26
|
+
|
|
27
|
+
In the application's global `styles.scss`, import the library entry points in this exact order:
|
|
28
|
+
|
|
29
|
+
```scss
|
|
30
|
+
@use '@smitag/angular-shared-ui/src/lib/styles/components';
|
|
31
|
+
@use '@smitag/angular-shared-ui/src/lib/styles/tokens';
|
|
32
|
+
@use '@smitag/angular-shared-ui/src/lib/styles/layout'; // Omit if using Tailwind CSS
|
|
33
|
+
@use '@smitag/angular-shared-ui/src/lib/styles/themes/default'; // Or themes/admin
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- **Never** include an Angular Material prebuilt theme alongside `@smitag/angular-shared-ui`.
|
|
37
|
+
- **Theme variants**:
|
|
38
|
+
- `themes/default` applies the `helper.whiteToolbar` mixin (white `.first-toolbar`, primary gradient `.second-toolbar` with white `.mat-icon` and `.toolbar-title`).
|
|
39
|
+
- `themes/admin` omits `whiteToolbar` (primary-colored `.first-toolbar`, unstyled `.second-toolbar` background with `--mat-sys-primary` `.mat-icon` and `.toolbar-title`).
|
|
40
|
+
- **Tailwind CSS projects**: If `layout` is omitted from `styles.scss`, do **not** emit `shared-ui` layout classes (`.flex-row`, `.gap-16`, `.flex-col-md`, etc.). Use Tailwind utilities for layout while continuing to use `shared-ui` color tokens, typography, elevation, and component classes.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 3. Strict Guardrails (DO NOT)
|
|
45
|
+
|
|
46
|
+
- **No hardcoded colors**: Do not write hex (`#...`), `rgb(...)`, `rgba(...)`, or `hsl(...)` colors in templates or component SCSS. Use color role classes (`.primary`, `.on-primary`, `.surface-container`, etc.) or `var(--mat-sys-*)` CSS custom properties.
|
|
47
|
+
- **Always pair background and foreground roles**: Whenever you apply a color background class (e.g., `.primary`, `.secondary-container`, `.tertiary-container`, `.error`), apply its matching foreground `on-*` class on the text/icon elements inside it (`.on-primary`, `.on-secondary-container`, `.on-tertiary-container`, `.on-error`) to guarantee accessible contrast.
|
|
48
|
+
- **No hardcoded typography**: Do not set custom `font-family` (`Poppins`, `IBM Plex Sans`, `Source Sans Pro`) or custom heading `font-size` in component SCSS. Use semantic `<h1>`–`<h6>` tags or `.mat-display-*`, `.mat-headline-*`, `.mat-title-*`, `.mat-body-*`, `.mat-label-*` classes.
|
|
49
|
+
- **No hardcoded shadows**: Do not write custom `box-shadow` rules. Use `.level0`–`.level5` or card modifier classes (`.border-card`, `.flat-card`).
|
|
50
|
+
- **No Material internal overrides in apps**: Do not target `.mat-mdc-*` internal classes, use `::ng-deep`, or add `!important` overrides inside consumer components.
|
|
51
|
+
- **No redundant `mat-form-field` width**: `_form.scss` already sets `.mat-mdc-form-field { width: 100%; }` globally. Do not redeclare `width: 100%` on every form field.
|
|
52
|
+
- **Do not use `.text-default`**: `components.scss` defines `.text-default { color: #0000; }` (transparent). Use `.on-surface` via `var(--mat-sys-on-surface)` or omit the class instead.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 4. Component Usage Guidelines
|
|
57
|
+
|
|
58
|
+
### Cards (`_card.scss`)
|
|
59
|
+
Choose the right card variant based on purpose:
|
|
60
|
+
- **Elevated (default `<mat-card>`)**: Actionable cards, especially those with `<mat-card-actions>`.
|
|
61
|
+
- **Outlined (`class="border-card"`)**: Informational / read-only cards without primary actions (`border: 1px solid var(--mat-sys-outline-variant)`, `box-shadow: none`).
|
|
62
|
+
- **Flat / Filled (`class="flat-card"`)**: Nested cards inside another card, or tinted surface cards combined with `.surface-container-low|surface-container|surface-container-high|surface-container-highest` or `.primary-container` / `.secondary-container` / `.tertiary-container`.
|
|
63
|
+
- **Equal height rows**: Add `.fill` (`height: 100%; min-height: 100%`) to `<mat-card>` inside `.flex-row` columns.
|
|
64
|
+
- **Centered desktop content**: Wrap or apply `.card-container` (`max-width` centered at `1170px` for `>= 1280px`).
|
|
65
|
+
- **Card icons**: Use `<div mat-card-avatar>` or `.card-icon` / `.card-right-icon`. Note `.mat-mdc-card-avatar` is sized to `24px x 24px`.
|
|
66
|
+
|
|
67
|
+
### App Shell, Toolbars & Drawer (`_toolbar.scss`, `_header.scss`, `_drawer.scss`, `components.scss`)
|
|
68
|
+
- **Top header**: `<mat-toolbar class="mat-toolbar mat-toolbar-single-row first-toolbar flex-row justify-between">` with `.header-logo` or `.admin-logo` on the brand `<img>`.
|
|
69
|
+
- **Page sub-toolbar**: `<mat-toolbar class="second-toolbar">` containing a sidenav toggle button (if needed) and `<div class="toolbar-title">`.
|
|
70
|
+
- **Sidenav**: `<mat-drawer-container>` (`height: calc(100vh - 64px)`) + `<mat-drawer>` (`width: 255px`). Apply `.active` on the current `<mat-list-item>` for the `2px solid var(--mat-sys-primary)` active border.
|
|
71
|
+
- **Main content area**: Place page content directly inside `<main>`. `components.scss` already applies responsive padding (`32px` desktop, `16px` at `960px–1279px`, `8px` at `<= 959px`, `0px` inside `.mobile`). Do not duplicate outer page padding inside `<main>`.
|
|
72
|
+
|
|
73
|
+
### Dialogs (`_dialog.scss`)
|
|
74
|
+
- Pass `panelClass: 'dialog'` when opening `MatDialog` if full-screen mobile behavior (`<= 959px`) and card/divider styling inside dialogs are desired.
|
|
75
|
+
- Use standard `<h2 mat-dialog-title>`, `<mat-dialog-content>`, `<mat-dialog-actions>`, and `.label` for bold field labels inside dialogs.
|
|
76
|
+
|
|
77
|
+
### Snackbars (`_snackbar.scss`)
|
|
78
|
+
- Never style snackbars inline. Pass the built-in `panelClass`:
|
|
79
|
+
- Success: `panelClass: ['snack-bar-success']`
|
|
80
|
+
- Error: `panelClass: ['snack-bar-error']`
|
|
81
|
+
|
|
82
|
+
### Forms & Lists (`_form.scss`, `components.scss`)
|
|
83
|
+
- Form hint helpers: `.text-hint`, `.attachment-hint`, `.logo-hint`, `.email-hint`, `.mat-form-field-hint`.
|
|
84
|
+
- Destructive icon button inside forms: `.mdc-icon-button.mat-warn`.
|
|
85
|
+
- Unbulleted lists: `<ul class="no-dot">` (global `ul li` adds `16px` bottom margin, except `:last-child`).
|
|
86
|
+
|
|
87
|
+
### Icons
|
|
88
|
+
- Prefer Font Awesome Pro when installed in the app (`<mat-icon fontSet="far" fontIcon="fa-..."></mat-icon>` or `fontSet="fas"` / `fontSet="fab"`), or standard Material Icons (`<mat-icon>...</mat-icon>`).
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 5. Concrete Do / Don't Examples
|
|
93
|
+
|
|
94
|
+
### Responsive Card Grid
|
|
95
|
+
|
|
96
|
+
**Do:**
|
|
97
|
+
```html
|
|
98
|
+
<main>
|
|
99
|
+
<div class="card-container flex-col gap-32 gap-16-md gap-8-sm">
|
|
100
|
+
<mat-card class="border-card">
|
|
101
|
+
<mat-card-header>
|
|
102
|
+
<mat-card-title>Overview</mat-card-title>
|
|
103
|
+
</mat-card-header>
|
|
104
|
+
<mat-card-content>
|
|
105
|
+
<p class="mat-body-medium">Informational summary without actions.</p>
|
|
106
|
+
</mat-card-content>
|
|
107
|
+
</mat-card>
|
|
108
|
+
|
|
109
|
+
<div class="flex-row flex-col-md gap-32 gap-16-md gap-8-sm">
|
|
110
|
+
<div class="flex-grow">
|
|
111
|
+
<mat-card class="fill">
|
|
112
|
+
<mat-card-header>
|
|
113
|
+
<mat-card-title>Actionable Card</mat-card-title>
|
|
114
|
+
</mat-card-header>
|
|
115
|
+
<mat-card-content>Requires user action.</mat-card-content>
|
|
116
|
+
<mat-card-actions>
|
|
117
|
+
<button matButton>Cancel</button>
|
|
118
|
+
<button matButton="filled">Confirm</button>
|
|
119
|
+
</mat-card-actions>
|
|
120
|
+
</mat-card>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<div class="flex-grow">
|
|
124
|
+
<mat-card class="fill flat-card primary">
|
|
125
|
+
<mat-card-header>
|
|
126
|
+
<mat-card-title class="on-primary">Highlighted</mat-card-title>
|
|
127
|
+
<mat-card-subtitle class="on-primary">Paired contrast</mat-card-subtitle>
|
|
128
|
+
</mat-card-header>
|
|
129
|
+
</mat-card>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</main>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Don't:**
|
|
137
|
+
```html
|
|
138
|
+
<!-- Avoid inline styles, raw hex colors, un-paired text on .primary, and redundant shadows -->
|
|
139
|
+
<div style="display: flex; gap: 32px; padding: 32px;">
|
|
140
|
+
<mat-card style="background: #03036a; color: white; box-shadow: 0 2px 4px rgba(0,0,0,0.2);">
|
|
141
|
+
<mat-card-title style="font-family: 'IBM Plex Sans'; font-size: 20px;">Highlighted</mat-card-title>
|
|
142
|
+
</mat-card>
|
|
143
|
+
</div>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Snackbars & Dialogs in TypeScript
|
|
147
|
+
|
|
148
|
+
**Do:**
|
|
149
|
+
```typescript
|
|
150
|
+
this.snackBar.open('Saved successfully', '', {
|
|
151
|
+
duration: 10000,
|
|
152
|
+
panelClass: ['snack-bar-success'],
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
this.snackBar.open('Operation failed', 'X', {
|
|
156
|
+
panelClass: ['snack-bar-error'],
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
this.dialog.open(MyDialogComponent, {
|
|
160
|
+
panelClass: 'dialog',
|
|
161
|
+
data: {},
|
|
162
|
+
});
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Custom Component SCSS (only when utilities do not cover the need)
|
|
166
|
+
|
|
167
|
+
**Do:**
|
|
168
|
+
```scss
|
|
169
|
+
.summary-panel {
|
|
170
|
+
border: 1px solid var(--mat-sys-outline-variant);
|
|
171
|
+
background-color: var(--mat-sys-surface-container-low);
|
|
172
|
+
color: var(--mat-sys-on-surface);
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Don't:**
|
|
177
|
+
```scss
|
|
178
|
+
.summary-panel {
|
|
179
|
+
border: 1px solid #dde3ee;
|
|
180
|
+
background-color: #f3eff4;
|
|
181
|
+
font-family: 'Poppins', sans-serif;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
::ng-deep .mat-mdc-form-field {
|
|
185
|
+
width: 100%;
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## 6. Pre-Completion Checklist
|
|
192
|
+
|
|
193
|
+
Before finishing any UI task, verify:
|
|
194
|
+
- [ ] Zero hardcoded hex/rgb/hsl colors, `font-family`, or `box-shadow` values in new/edited HTML or SCSS.
|
|
195
|
+
- [ ] Every color background class (`.primary`, `.secondary-container`, `.error`, etc.) has a matching `on-*` foreground class where text or icons appear.
|
|
196
|
+
- [ ] Layout uses `shared-ui` classes (or Tailwind if `layout.scss` is omitted), without duplicating `<main>` outer padding or `mat-form-field` `width: 100%`.
|
|
197
|
+
- [ ] Snackbars use `snack-bar-success` / `snack-bar-error`; dialogs use `dialog` when appropriate.
|
|
198
|
+
- [ ] Project linter/build passes (`nx lint` / `nx build`).
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# `@smitag/angular-shared-ui` Class & Token Catalog
|
|
2
|
+
|
|
3
|
+
Complete reference of utility classes, Material 3 tokens, and component classes exported by `shared-ui/src/lib/styles/`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Color Roles (`tokens/_colors.scss`)
|
|
8
|
+
|
|
9
|
+
All color utility classes use `!important` and map to Angular Material 3 `--mat-sys-*` CSS variables.
|
|
10
|
+
|
|
11
|
+
| Role | Background Class | Foreground (`color`) Class | CSS Variable(s) |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| Primary | `.primary` | `.on-primary` | `--mat-sys-primary` / `--mat-sys-on-primary` |
|
|
14
|
+
| Primary fixed | — | `.on-primary-fixed` | `--mat-sys-on-primary-fixed` |
|
|
15
|
+
| Primary container | `.primary-container` | `.on-primary-container` | `--mat-sys-primary-container` / `--mat-sys-on-primary-container` |
|
|
16
|
+
| Secondary | `.secondary` | `.on-secondary` | `--mat-sys-secondary` / `--mat-sys-on-secondary` |
|
|
17
|
+
| Secondary fixed | — | `.on-secondary-fixed` | `--mat-sys-on-secondary-fixed` |
|
|
18
|
+
| Secondary container | `.secondary-container` | `.on-secondary-container` | `--mat-sys-secondary-container` / `--mat-sys-on-secondary-container` |
|
|
19
|
+
| Tertiary | `.tertiary` | `.on-tertiary` | `--mat-sys-tertiary` / `--mat-sys-on-tertiary` |
|
|
20
|
+
| Tertiary fixed | — | `.on-tertiary-fixed` | `--mat-sys-on-tertiary-fixed` |
|
|
21
|
+
| Tertiary container | `.tertiary-container` | `.on-tertiary-container` | `--mat-sys-tertiary-container` / `--mat-sys-on-tertiary-container` |
|
|
22
|
+
| Error | `.error` | `.on-error` | `--mat-sys-error` / `--mat-sys-on-error` |
|
|
23
|
+
| Error fixed | — | `.on-error-fixed` | `--mat-sys-error` |
|
|
24
|
+
| Error container | `.error-container` | `.on-error-container` | `--mat-sys-error-container` / `--mat-sys-on-error-container` |
|
|
25
|
+
| Outline | — | `.outline` | `--mat-sys-outline` |
|
|
26
|
+
| Outline variant | — | `.outline-variant` | `--mat-sys-outline-variant` |
|
|
27
|
+
| Surface | `.surface` | — | `--mat-sys-surface` |
|
|
28
|
+
| Surface container lowest | `.surface-container-lowest` | — | `--mat-sys-surface-container-lowest` |
|
|
29
|
+
| Surface container low | `.surface-container-low` | — | `--mat-sys-surface-container-low` |
|
|
30
|
+
| Surface container | `.surface-container` | — | `--mat-sys-surface-container` |
|
|
31
|
+
| Surface container high | `.surface-container-high` | — | `--mat-sys-surface-container-high` |
|
|
32
|
+
| Surface container highest | `.surface-container-highest` | — | `--mat-sys-surface-container-highest` |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 2. Typography (`tokens/_typo.scss` & `themes/*.scss`)
|
|
37
|
+
|
|
38
|
+
- **Theme font config**: `brand-family: 'IBM Plex Sans'`, `plain-family: 'Poppins'` (`regular-weight: 400`, `medium-weight: 500`, `bold-weight: 900`).
|
|
39
|
+
- **Bundled `@font-face` families**:
|
|
40
|
+
- `IBM Plex Sans` (`300`, `400`, `500`, `600`, `700`)
|
|
41
|
+
- `IBM Plex Sans Condensed` (`400`, `500`, `600`)
|
|
42
|
+
- `Poppins` (`300`, `400`, `500`, `600`, `700`)
|
|
43
|
+
- `Source Sans Pro` (`300`, `400`, `600`, `700`)
|
|
44
|
+
- `Material Icons` (`400`)
|
|
45
|
+
|
|
46
|
+
| CSS Class | Typescale Level | Native Element |
|
|
47
|
+
| --- | --- | --- |
|
|
48
|
+
| `.mat-display-large` | `display-large` | `<h1>` |
|
|
49
|
+
| `.mat-display-medium` | `display-medium` | `<h2>` |
|
|
50
|
+
| `.mat-display-small` | `display-small` | `<h3>` |
|
|
51
|
+
| `.mat-headline-large` | `headline-large` | `<h4>` |
|
|
52
|
+
| `.mat-headline-medium` | `headline-medium` | `<h5>` |
|
|
53
|
+
| `.mat-headline-small` | `headline-small` | `<h6>` |
|
|
54
|
+
| `.mat-title-large` | `title-large` | — |
|
|
55
|
+
| `.mat-title-medium` | `title-medium` | — |
|
|
56
|
+
| `.mat-title-small` | `title-small` | — |
|
|
57
|
+
| `.mat-body-large` | `body-large` | — |
|
|
58
|
+
| `.mat-body-medium` | `body-medium` | — |
|
|
59
|
+
| `.mat-body-small` | `body-small` | — |
|
|
60
|
+
| `.mat-label-large` | `label-large` | — |
|
|
61
|
+
| `.mat-label-medium` | `label-medium` | — |
|
|
62
|
+
| `.mat-label-small` | `label-small` | — |
|
|
63
|
+
|
|
64
|
+
Note: `<h1>`–`<h6>` automatically apply `margin: 0 0 0.5em` and the corresponding `--mat-sys-*` font & tracking tokens.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 3. Elevation (`tokens/_elevation.scss`)
|
|
69
|
+
|
|
70
|
+
| CSS Class | Value | Default Styled Elements |
|
|
71
|
+
| --- | --- | --- |
|
|
72
|
+
| `.level0` | `var(--mat-sys-level0)` | — |
|
|
73
|
+
| `.level1` | `0 1px 1px 0 rgba(60, 64, 67, 0.08), 0 1px 3px 0 rgba(60, 64, 67, 0.16)` | `.second-toolbar`, `.mat-mdc-card` |
|
|
74
|
+
| `.level2` | `var(--mat-sys-level2)` | — |
|
|
75
|
+
| `.level3` | `var(--mat-sys-level3)` | `.mat-mdc-mini-fab`, `.mat-mdc-fab` |
|
|
76
|
+
| `.level4` | `var(--mat-sys-level4)` | — |
|
|
77
|
+
| `.level5` | `var(--mat-sys-level5)` | — |
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 4. Layout Utilities (`layout/_layout.scss`)
|
|
82
|
+
|
|
83
|
+
Only available when `@use '@smitag/angular-shared-ui/src/lib/styles/layout';` is imported (skip in Tailwind CSS apps).
|
|
84
|
+
|
|
85
|
+
### Breakpoints
|
|
86
|
+
- `xs`: `max-width: 599px` (`gt-xs`: `min-width: 600px`)
|
|
87
|
+
- `sm`: `max-width: 959px` (`gt-sm`: `min-width: 960px`)
|
|
88
|
+
- `sm-xs`: `600px` – `959px`
|
|
89
|
+
- `md`: `max-width: 1279px`
|
|
90
|
+
- `md-sm`: `960px` – `1279px`
|
|
91
|
+
- `lg`: `max-width: 1919px` (`gt-lg`: `min-width: 1920px`)
|
|
92
|
+
- `lg-md`: `1280px` – `1919px`
|
|
93
|
+
|
|
94
|
+
### Display, Direction & Sizing
|
|
95
|
+
- Containers: `.flex`, `.inline-flex`, `.grid`, `.flex-row`, `.flex-col`, `.flex-wrap`, `.fill` (`height: 100%; min-height: 100%`), `.center` (`display: block; margin-left: auto; margin-right: auto`)
|
|
96
|
+
- Flex item sizing: `.flex-auto` (`1 1 auto`), `.flex-1` (`flex: 1`), `.flex-grow` (`1 1 100%`), `.flex-grow-0` (`0 1 0%`), `.flex-shrink` (`flex-shrink: 1`)
|
|
97
|
+
- Percentage flex widths: `.flex-grow-20`, `.flex-grow-25`, `.flex-grow-30`, `.flex-grow-50`, `.flex-grow-70`, `.flex-grow-75`, `.flex-grow-80`
|
|
98
|
+
- Inside `.flex-row`, adding `.lg`, `.md`, `.sm`, or `.xs` resets `max-width: 100%` at that breakpoint (e.g., `class="flex-grow-50 md"`).
|
|
99
|
+
|
|
100
|
+
### Alignment & Justification
|
|
101
|
+
- Justification: `.justify-start`, `.justify-end`, `.justify-center`, `.justify-between`, `.justify-around`, `.justify-evenly`, `.justify-start-xs`, `.justify-end-xs`
|
|
102
|
+
- Alignment: `.align-center`, `.align-end`, `.align-stretch`, `.align-baseline`
|
|
103
|
+
|
|
104
|
+
### Spacing (Gaps)
|
|
105
|
+
- Base gaps: `.gap-4`, `.gap-8`, `.gap-16`, `.gap-24`, `.gap-32`, `.gap-64`
|
|
106
|
+
- Responsive gap overrides (`0`, `8`, `16`):
|
|
107
|
+
- `.gap-0-xs`, `.gap-8-xs`, `.gap-16-xs`
|
|
108
|
+
- `.gap-0-sm`, `.gap-8-sm`, `.gap-16-sm`
|
|
109
|
+
- `.gap-0-md`, `.gap-8-md`, `.gap-16-md`
|
|
110
|
+
- `.gap-0-lg`, `.gap-8-lg`, `.gap-16-lg`
|
|
111
|
+
- `.gap-0-sm-xs`, `.gap-8-sm-xs`, `.gap-16-sm-xs`
|
|
112
|
+
- `.gap-0-md-sm`, `.gap-8-md-sm`, `.gap-16-md-sm`
|
|
113
|
+
- `.gap-0-lg-md`, `.gap-8-lg-md`, `.gap-16-lg-md`
|
|
114
|
+
|
|
115
|
+
### Responsive Column Stacking & Visibility
|
|
116
|
+
- Column stacking: `.flex-col-xs`, `.flex-col-sm`, `.flex-col-md`, `.flex-col-lg`, `.flex-col-sm-xs`, `.flex-col-md-sm`, `.flex-col-lg-md`
|
|
117
|
+
- Visibility: `.hidden` (`visibility: hidden`), `.none` (`display: none`), `.hide-xs`, `.hide-gt-xs`, `.hide-sm`, `.hide-gt-sm`, `.hide-lg`, `.hide-gt-lg`
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 5. Component & Global Classes (`components.scss` & `components/_*.scss`)
|
|
122
|
+
|
|
123
|
+
| Scope | Class / Selector | Purpose |
|
|
124
|
+
| --- | --- | --- |
|
|
125
|
+
| Global | `main`, `.mobile main` | Responsive page padding (`32px` -> `16px` md-sm -> `8px` <=959px; `0px` under `.mobile`). |
|
|
126
|
+
| Global | `ul.no-dot` | Removes list bullets and left padding (`ul li` has `16px` bottom margin). |
|
|
127
|
+
| Global | `.admin-logo`, `.material-icons` | Max-width `140px` logo; Material Icons font rendering rules. |
|
|
128
|
+
| Card | `.border-card` | Outlined `<mat-card>` (`1px solid var(--mat-sys-outline-variant)`, no shadow). |
|
|
129
|
+
| Card | `.flat-card` | Removes shadow on `mat-card`, `table`, `mat-accordion`, `mat-expansion-panel`. |
|
|
130
|
+
| Card | `.card-container` | Centered `1170px` container for viewports `>= 1280px`. |
|
|
131
|
+
| Card | `.card-icon`, `.card-right-icon` | Card icon alignment/sizing (`36px` icon size). |
|
|
132
|
+
| Card | `.mat-mdc-card-avatar`, `.mat-mdc-card-actions` | Avatar sized `24px x 24px`; actions end-aligned with `8px` button gap. |
|
|
133
|
+
| Toolbar & Header | `.first-toolbar`, `.second-toolbar`, `.toolbar-title` | Primary top toolbar and secondary page toolbar styles. |
|
|
134
|
+
| Toolbar & Header | `.header-logo`, `.bars-icon` | Header brand logo (`max-width: 140px`) and menu icon (`24px`, `#fff`). |
|
|
135
|
+
| Toolbar Mixin | `helper.whiteToolbar($primary, $second-color)` | Used by `themes/default.scss` for white `.first-toolbar` + gradient `.second-toolbar`. |
|
|
136
|
+
| Drawer | `mat-drawer-container`, `mat-drawer`, `.drawer-title`, `.mat-mdc-list-item.active` | `calc(100vh - 64px)` container, `255px` sidenav, active `2px` primary border. |
|
|
137
|
+
| Dialog | `.dialog`, `.label`, `.mat-card-avatar.icon-left` | Dialog `panelClass` (full-screen at `<= 959px`), bold `.label`, icon avatar spacing. |
|
|
138
|
+
| Form | `.mat-mdc-form-field` | Global `width: 100%`. |
|
|
139
|
+
| Form | `.text-hint`, `.attachment-hint`, `.logo-hint`, `.email-hint`, `.mat-form-field-hint` | Hint typography and spacing helpers. |
|
|
140
|
+
| Form | `input[type='file']`, `.mdc-icon-button.mat-warn` | Styled file input button and `#cc0000` warn icon button. |
|
|
141
|
+
| Snackbar | `.snack-bar-success`, `.snack-bar-error` | `panelClass` styles for `MatSnackBar` (`#058514` green / `#cc0000` red with `#fff` action). |
|
|
142
|
+
| Tabs | `.mat-tab-body-wrapper`, `.mat-tab-action` | Negative horizontal margin (`-16px`) and end-aligned tab actions. |
|