@juice-js/layout 2.5.0-alpha.5 → 3.0.0-alpha.2

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,9 +1,10 @@
1
1
  {
2
2
  "name": "@juice-js/layout",
3
- "version": "2.5.0-alpha.5",
4
- "description": "Juice layout",
3
+ "version": "3.0.0-alpha.2",
4
+ "description": "Juice layout: the Material-free app shell (CDK and @juice-js/ui), side menu, page switcher and layout primitives",
5
5
  "author": {
6
- "name": "jack@creatorflow.io"
6
+ "name": "Pavellis Labs",
7
+ "email": "dev@pavellis.com"
7
8
  },
8
9
  "license": "MIT",
9
10
  "bugs": {
@@ -19,8 +20,17 @@
19
20
  "url": "git+https://github.com/PavellisLabs/juice-layout.git"
20
21
  },
21
22
  "peerDependencies": {
22
- "@juice-js/core": "2.5.0-alpha.5",
23
- "@juice-js/localize": "2.5.0-alpha.5"
23
+ "@angular/cdk": "^22.0.0",
24
+ "@angular/common": "^22.0.0",
25
+ "@angular/core": "^22.0.0",
26
+ "@angular/router": "^22.0.0",
27
+ "@juice-js/core": "3.0.0-alpha.2",
28
+ "@juice-js/design-tokens": "3.0.0-alpha.2",
29
+ "@juice-js/icons": "3.0.0-alpha.2",
30
+ "@juice-js/ui": "3.0.0-alpha.2",
31
+ "@ngx-translate/core": "^18.0.0",
32
+ "angular-oauth2-oidc": "^22.0.0",
33
+ "lucide": "^1.0.0"
24
34
  },
25
35
  "dependencies": {
26
36
  "tslib": "^2.3.0"
@@ -28,10 +38,13 @@
28
38
  "sideEffects": false,
29
39
  "exports": {
30
40
  ".": {
31
- "sass": "./styles/_theming.scss",
41
+ "sass": "./styles/_index.scss",
32
42
  "types": "./types/juice-js-layout.d.ts",
33
43
  "default": "./fesm2022/juice-js-layout.mjs"
34
44
  },
45
+ "./shell": {
46
+ "sass": "./styles/_shell.scss"
47
+ },
35
48
  "./page-header": {
36
49
  "sass": "./styles/_page-header.scss"
37
50
  },
@@ -43,5 +56,5 @@
43
56
  "typings": "types/juice-js-layout.d.ts",
44
57
  "type": "module",
45
58
  "readme": "ERROR: No README data found!",
46
- "_id": "@juice-js/layout@2.5.0-alpha.5"
59
+ "_id": "@juice-js/layout@3.0.0-alpha.2"
47
60
  }
@@ -0,0 +1,12 @@
1
+ // juice-layout 3: the design tokens and the layout's global styles, once, in the app's global styles:
2
+ //
3
+ // @use '@juice-js/layout';
4
+ //
5
+ // No Material. A 2.x page still on Material follows the tokens with the bridge:
6
+ // @use '@juice-js/design-tokens' as tokens;
7
+ // @include tokens.material-bridge();
8
+ @use '@juice-js/design-tokens' as tokens;
9
+ @use 'shell';
10
+ @use 'page-header';
11
+
12
+ @include tokens.css();
@@ -1,8 +1,8 @@
1
- // The shared page header (jc-page-header) and the visually hidden label (.jc-sr-only). Plain CSS: `@use '@juice-js/layout/page-header';`
2
- // once in the app's global styles, with or without layout.theme(). It reads only CSS variables, each with a fallback: --jc-border and
3
- // --jc-muted (else layout.theme()'s --juice-border and --juice-muted), --jc-font-2xl and --jc-font-md (layout.theme()'s type scale).
4
- .jc-page-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 4px 0 12px; border-bottom: 1px solid var(--jc-border, var(--juice-border, currentcolor)); margin-bottom: 12px; }
5
- .jc-page-header .jc-crumb, .jc-page-header .jc-crumb-sep, .jc-page-subtitle { color: var(--jc-muted, var(--juice-muted, inherit)); }
1
+ // The shared page header (jc-page-header / juice-page-header) and the visually hidden label (.jc-sr-only). Plain CSS:
2
+ // `@use '@juice-js/layout/page-header';` (`@use '@juice-js/layout'` includes it). It reads only CSS variables, each with a fallback:
3
+ // --jc-border and --jc-muted (else the tokens' --juice-color-border and --juice-color-text-muted), --jc-font-2xl and --jc-font-md.
4
+ .jc-page-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 4px 0 12px; border-bottom: 1px solid var(--jc-border, var(--juice-color-border, currentcolor)); margin-bottom: 12px; }
5
+ .jc-page-header .jc-crumb, .jc-page-header .jc-crumb-sep, .jc-page-subtitle { color: var(--jc-muted, var(--juice-color-text-muted, inherit)); }
6
6
  .jc-page-title { font-size: var(--jc-font-2xl, 20px); margin: 0; font-weight: 500; }
7
7
  .jc-page-subtitle { font-size: var(--jc-font-md, 13px); }
8
8
  .jc-page-header .jc-spacer { flex: 1; }
@@ -0,0 +1,30 @@
1
+ // The layout's global styles without the tokens: the page frame, the dialog panels (page switcher, profile) and scrollbars. Plain
2
+ // CSS reading only --juice-* variables. `@use '@juice-js/layout'` includes it with the tokens; use it alone
3
+ // (`@use '@juice-js/layout/shell'`) when the app emits the tokens itself.
4
+ html { scroll-behavior: smooth; }
5
+ @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
6
+ html, body, app-root, juice-standard-workspace, app-page { height: 100%; margin: 0; }
7
+ app-root, juice-standard-workspace, app-page { display: block; }
8
+ body {
9
+ background: var(--juice-color-bg);
10
+ color: var(--juice-color-text);
11
+ font-family: var(--juice-font-sans);
12
+ font-size: var(--juice-text-md);
13
+ line-height: var(--juice-leading-md, 1.5);
14
+ }
15
+
16
+ // The CDK dialogs the shell opens (the page switcher, the profile): the panel brings the surface.
17
+ .juice-dialog-panel { max-height: calc(100vh - 2rem); }
18
+ .juice-page-switcher-panel .cdk-dialog-container {
19
+ overflow: hidden;
20
+ border: 1px solid var(--juice-panel-border);
21
+ border-radius: var(--juice-panel-radius);
22
+ background: var(--juice-panel-bg);
23
+ color: var(--juice-panel-fg);
24
+ box-shadow: var(--juice-shadow-overlay);
25
+ }
26
+ .cdk-overlay-dark-backdrop { background: color-mix(in srgb, var(--juice-color-overlay, #000) 40%, transparent); }
27
+
28
+ ::-webkit-scrollbar { width: 10px; height: 10px; }
29
+ ::-webkit-scrollbar-thumb { background: var(--juice-color-border-strong); border-radius: 10px; }
30
+ ::-webkit-scrollbar-track { background: transparent; }