@kouji-ui/core 0.8.4 → 0.9.0

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/icon/icon.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /* packages/core/src/icon/icon.css
2
2
  *
3
- * Renders icons set up by `KjIconDirective`. The directive writes:
3
+ * Renders icons set up by `KjIcon`. The directive writes:
4
4
  * --kj-icon → CSS-ready value (`url("...")` or `"glyph"`)
5
5
  * data-kj-icon-mode → "svg" | "font"
6
6
  *
@@ -10,31 +10,33 @@
10
10
  * font and (optionally) set `--kj-icon-font` on a parent.
11
11
  */
12
12
 
13
- .kj-icon {
14
- display: inline-block;
15
- width: 1em;
16
- height: 1em;
17
- flex-shrink: 0;
18
- line-height: 1;
19
- vertical-align: middle;
20
- }
13
+ @layer kj.component {
14
+ .kj-icon {
15
+ display: inline-block;
16
+ width: 1em;
17
+ height: 1em;
18
+ flex-shrink: 0;
19
+ line-height: 1;
20
+ vertical-align: middle;
21
+ }
21
22
 
22
- .kj-icon[data-kj-icon-mode='svg'] {
23
- background-color: currentColor;
24
- mask-image: var(--kj-icon);
25
- -webkit-mask-image: var(--kj-icon);
26
- mask-size: contain;
27
- -webkit-mask-size: contain;
28
- mask-repeat: no-repeat;
29
- -webkit-mask-repeat: no-repeat;
30
- mask-position: center;
31
- -webkit-mask-position: center;
32
- }
23
+ .kj-icon[data-kj-icon-mode='svg'] {
24
+ background-color: currentColor;
25
+ mask-image: var(--kj-icon);
26
+ -webkit-mask-image: var(--kj-icon);
27
+ mask-size: contain;
28
+ -webkit-mask-size: contain;
29
+ mask-repeat: no-repeat;
30
+ -webkit-mask-repeat: no-repeat;
31
+ mask-position: center;
32
+ -webkit-mask-position: center;
33
+ }
33
34
 
34
- .kj-icon[data-kj-icon-mode='font'] {
35
- font-family: var(--kj-icon-font, inherit);
36
- }
35
+ .kj-icon[data-kj-icon-mode='font'] {
36
+ font-family: var(--kj-icon-font, inherit);
37
+ }
37
38
 
38
- .kj-icon[data-kj-icon-mode='font']::before {
39
- content: var(--kj-icon);
39
+ .kj-icon[data-kj-icon-mode='font']::before {
40
+ content: var(--kj-icon);
41
+ }
40
42
  }
@@ -37,11 +37,19 @@
37
37
  pointer-events: auto;
38
38
  }
39
39
 
40
+ /* Scrim colour: the theme's `--kj-bg-overlay` (every theme declares one);
41
+ `--kj-backdrop-bg` remains a per-overlay override knob. */
40
42
  .kj-backdrop,
41
43
  .kj-overlay-backdrop {
42
44
  position: absolute;
43
45
  inset: 0;
44
- background: var(--kj-backdrop-bg, rgb(0 0 0 / 0.5));
46
+ background: var(--kj-backdrop-bg, var(--kj-bg-overlay, rgb(0 0 0 / 0.5)));
45
47
  pointer-events: auto;
46
48
  }
49
+
50
+ /* `blurredBackdrop()` adds this modifier on top of the solid scrim. */
51
+ .kj-backdrop--blur {
52
+ -webkit-backdrop-filter: blur(var(--kj-backdrop-blur, 4px));
53
+ backdrop-filter: blur(var(--kj-backdrop-blur, 4px));
54
+ }
47
55
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kouji-ui/core",
3
- "version": "0.8.4",
4
- "description": "Headless Angular 21 UI primitives — directives over CDK with WCAG 2.1 AAA semantics and zero CSS.",
3
+ "version": "0.9.0",
4
+ "description": "Headless Angular UI primitives — signal-driven directives with WCAG 2.1 AAA semantics, no CDK, and a handful of opt-in global stylesheets.",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -17,9 +17,9 @@
17
17
  "ui",
18
18
  "headless",
19
19
  "directives",
20
- "cdk",
21
20
  "a11y",
22
- "wcag"
21
+ "wcag",
22
+ "signals"
23
23
  ],
24
24
  "publishConfig": {
25
25
  "access": "public",
@@ -29,7 +29,6 @@
29
29
  "peerDependencies": {
30
30
  "@angular/common": "^22.0.0",
31
31
  "@angular/core": "^22.0.0",
32
- "@angular/cdk": "^22.0.0",
33
32
  "@angular/forms": "^22.0.0",
34
33
  "rxjs": "^7.8.0",
35
34
  "echarts": "^6.0.0",
@@ -47,9 +46,14 @@
47
46
  },
48
47
  "sideEffects": false,
49
48
  "type": "module",
50
- "module": "fesm2022/kouji-ui-core.mjs",
51
- "typings": "types/kouji-ui-core.d.ts",
52
49
  "exports": {
50
+ "./package.json": {
51
+ "default": "./package.json"
52
+ },
53
+ "./styles.css": {
54
+ "style": "./styles.css",
55
+ "default": "./styles.css"
56
+ },
53
57
  "./overlay/overlay.css": {
54
58
  "style": "./overlay/overlay.css",
55
59
  "default": "./overlay/overlay.css"
@@ -66,9 +70,6 @@
66
70
  "style": "./motion/motion.css",
67
71
  "default": "./motion/motion.css"
68
72
  },
69
- "./package.json": {
70
- "default": "./package.json"
71
- },
72
73
  ".": {
73
74
  "types": "./types/kouji-ui-core.d.ts",
74
75
  "default": "./fesm2022/kouji-ui-core.mjs"
@@ -115,5 +116,7 @@
115
116
  "dependencies": {
116
117
  "@tanstack/angular-table": "^8.21.4",
117
118
  "tslib": "^2.3.0"
118
- }
119
+ },
120
+ "module": "fesm2022/kouji-ui-core.mjs",
121
+ "typings": "types/kouji-ui-core.d.ts"
119
122
  }
package/styles.css ADDED
@@ -0,0 +1,32 @@
1
+ /* ─────────────────────────────────────────────────────────────
2
+ @kouji-ui/core — aggregated global stylesheet
3
+ --------------------------------------------------------------
4
+ Published as `@kouji-ui/core/styles.css`: one line in the
5
+ `styles` array of angular.json, or `@import "@kouji-ui/core/styles.css"`
6
+ from a bundler that resolves package exports. It pulls in every
7
+ global piece the package ships — each is also published on its
8
+ own for à-la-carte registration:
9
+
10
+ @kouji-ui/core/overlay/overlay.css overlay container / wrapper / backdrop chrome
11
+ @kouji-ui/core/icon/icon.css [kjIcon] mask + font rendering
12
+ @kouji-ui/core/typography/prose.css .kj-prose long-form typography
13
+ @kouji-ui/core/motion/motion.css kjMotion enter / exit presets
14
+
15
+ The THEMED overlay surfaces (popover, tooltip, dropdown-menu,
16
+ dialog, drawer, toast, confirm-popup, sheet, action-sheet) live
17
+ one package up, in `@kouji-ui/components/src/overlay/overlay.css`
18
+ — register that one too, or every panel composed from the
19
+ headless directives paints with no background, border or shadow.
20
+
21
+ The @imports below are SOURCE-relative because the docs app
22
+ registers this file straight from the repo. ng-packagr flattens
23
+ the parts (`ng-package.json` assets), so `scripts/write-core-styles.mjs`
24
+ rewrites each import to its published path when the package
25
+ builds; `package-exports.spec.ts` pins that every import maps to
26
+ a shipped, exported asset.
27
+ ──────────────────────────────────────────────────────────── */
28
+
29
+ @import "./overlay/overlay.css";
30
+ @import "./typography/prose.css";
31
+ @import "./icon/icon.css";
32
+ @import "./motion/motion.css";