@porscheinformatik/material-addons 22.3.1 → 22.4.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@porscheinformatik/material-addons",
3
- "version": "22.3.1",
3
+ "version": "22.4.1",
4
4
  "description": "Custom theme and components for Angular Material",
5
5
  "homepage": "https://github.com/porscheinformatik/material-addons",
6
6
  "repository": {
@@ -48,7 +48,17 @@
48
48
  "uuid": "^13.0.0",
49
49
  "embla-carousel": "^8.6.0",
50
50
  "tailwindcss": "^4.0.0",
51
- "@tailwindcss/postcss": "^4.0.0"
51
+ "@tailwindcss/postcss": "^4.0.0",
52
+ "docx-preview": "^0.3.7",
53
+ "pdfjs-dist": ">=4.10.38 <5"
54
+ },
55
+ "peerDependenciesMeta": {
56
+ "docx-preview": {
57
+ "optional": true
58
+ },
59
+ "pdfjs-dist": {
60
+ "optional": true
61
+ }
52
62
  },
53
63
  "exports": {
54
64
  "./package.json": {
@@ -3,6 +3,7 @@
3
3
  @use './common/styles' as common;
4
4
  @use './common/theme-entry' as theme-entry;
5
5
  @use './carcat-palettes' as carcat;
6
+ @use './file-preview-dialog';
6
7
 
7
8
  $theme-name: 'carcat';
8
9
 
@@ -0,0 +1,22 @@
1
+ // =====================================================================
2
+ // Shared responsive breakpoints for Material Addons components.
3
+ //
4
+ // Why SCSS variables and not CSS custom properties: a custom property is not
5
+ // allowed in a media query condition (`@media (max-width: var(--x))` is invalid
6
+ // CSS), so a breakpoint can only ever be a build-time constant.
7
+ //
8
+ // Always query these with CSS range syntax — `(width < $mobile)` and
9
+ // `(width >= $mobile)` — never with `max-width` / `min-width` pairs. Range syntax
10
+ // has no off-by-one: `max-width: 479px` paired with `min-width: 480px` leaves a
11
+ // dead band at fractional viewport widths (479.5px, which browser zoom produces),
12
+ // which is why these are plain, even numbers and need no `- 1px` adjustment.
13
+ //
14
+ // MAINTENANCE NOTE: Tailwind utility classes in component templates cannot read
15
+ // these variables. They encode the same edge literally, as
16
+ // `[@media(width<480px)]:`. If `$mobile` changes here, find/replace that literal
17
+ // across the library templates in the same commit, or the two layers disagree.
18
+ // =====================================================================
19
+
20
+ $mobile: 480px;
21
+ $tablet: 768px;
22
+ $desktop: 1024px; // mirrors Tailwind's stock `lg:` breakpoint
@@ -0,0 +1,67 @@
1
+ @use './common/breakpoints' as bp;
2
+
3
+ // ── File Preview Dialog CDK Overlay Panel Styles ──────────────────────
4
+ // These styles must be global because they target the CDK overlay container
5
+ // which lives outside the component hierarchy
6
+
7
+ // Remove default mat-dialog padding so the header/body fill the panel cleanly
8
+ .fp-mat-dialog {
9
+ .mat-mdc-dialog-surface,
10
+ .mdc-dialog__surface {
11
+ padding: 0 !important;
12
+ overflow: hidden !important;
13
+ transition: border-radius 0.2s ease;
14
+ }
15
+ }
16
+
17
+ // Responsive dialog sizing via CSS media queries
18
+ .fp-mat-dialog--normal {
19
+ // Small mobile (<480px): maximize usage with minimal margins
20
+ @media (width < bp.$mobile) {
21
+ width: 95vw;
22
+ height: 90vh;
23
+ max-width: 95vw;
24
+ max-height: 90vh;
25
+ }
26
+
27
+ // Mobile/Portrait tablet (480px - 768px)
28
+ @media (bp.$mobile <= width < bp.$tablet) {
29
+ width: 90vw;
30
+ height: 85vh;
31
+ max-width: 90vw;
32
+ max-height: 85vh;
33
+ }
34
+
35
+ // Tablet/Small desktop (768px - 1024px)
36
+ @media (bp.$tablet <= width < bp.$desktop) {
37
+ width: 80vw;
38
+ height: 80vh;
39
+ max-width: 80vw;
40
+ max-height: 80vh;
41
+ }
42
+
43
+ // Desktop (≥1024px): fixed dimensions with fallback constraints
44
+ @media (width >= bp.$desktop) {
45
+ width: 800px;
46
+ height: 600px;
47
+ max-width: 90vw;
48
+ max-height: 85vh;
49
+ }
50
+
51
+ .mat-mdc-dialog-surface,
52
+ .mdc-dialog__surface {
53
+ border-radius: 4px !important;
54
+ }
55
+ }
56
+
57
+ .fp-mat-dialog--maximized {
58
+ width: 100vw !important;
59
+ height: 100vh !important;
60
+ max-width: 100vw !important;
61
+ max-height: 100vh !important;
62
+
63
+ .mat-mdc-dialog-surface,
64
+ .mdc-dialog__surface {
65
+ border-radius: 0 !important;
66
+ }
67
+ }
package/themes/pbv.scss CHANGED
@@ -2,6 +2,7 @@
2
2
  @use './common/styles' as common;
3
3
  @use './common/theme-entry' as theme-entry;
4
4
  @use './carcat-palettes' as carcat;
5
+ @use './file-preview-dialog';
5
6
 
6
7
  $theme-name: 'pbv';
7
8
 
package/themes/poa.scss CHANGED
@@ -2,6 +2,7 @@
2
2
  @use './common/styles' as common;
3
3
  @use './common/theme-entry' as theme-entry;
4
4
  @use './poa-palettes' as poa;
5
+ @use './file-preview-dialog';
5
6
 
6
7
  $theme-name: 'poa';
7
8