@incursa/ui-kit 1.8.0 → 1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incursa/ui-kit",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "private": false,
5
5
  "description": "Reusable UI kit for data-heavy business applications.",
6
6
  "keywords": [
@@ -75,6 +75,9 @@
75
75
  "package": "npm run build && npm run smoke && npm run pack:tarball"
76
76
  },
77
77
  "dependencies": {
78
+ "d3-array": "^3.2.4",
79
+ "d3-scale": "^4.0.2",
80
+ "d3-shape": "^3.2.0",
78
81
  "lucide": "^1.17.0"
79
82
  },
80
83
  "devDependencies": {
@@ -3394,6 +3394,100 @@ dialog.inc-native-dialog.inc-native-dialog--drawer .inc-native-dialog__body {
3394
3394
  }
3395
3395
  }
3396
3396
 
3397
+ .inc-sparkline {
3398
+ --inc-sparkline-stroke: var(--inc-text-secondary);
3399
+ --inc-sparkline-fill: rgba(var(--inc-text-secondary-rgb), 0.12);
3400
+ --inc-sparkline-marker: var(--inc-sparkline-stroke);
3401
+ --inc-sparkline-reference: rgba(var(--inc-text-muted-rgb), 0.68);
3402
+ --inc-sparkline-muted: rgba(var(--inc-text-muted-rgb), 0.54);
3403
+ display: inline-flex;
3404
+ align-items: center;
3405
+ justify-content: center;
3406
+ inline-size: var(--inc-sparkline-width, 7.5rem);
3407
+ block-size: var(--inc-sparkline-height, 2rem);
3408
+ min-inline-size: 1rem;
3409
+ min-block-size: 1rem;
3410
+ vertical-align: middle;
3411
+ color: var(--inc-sparkline-stroke);
3412
+ contain: paint;
3413
+
3414
+ &--tone-positive {
3415
+ --inc-sparkline-stroke: var(--bs-success);
3416
+ --inc-sparkline-fill: rgba(var(--bs-success-rgb), 0.16);
3417
+ --inc-sparkline-marker: var(--bs-success-text-emphasis);
3418
+ }
3419
+
3420
+ &--tone-negative {
3421
+ --inc-sparkline-stroke: var(--bs-danger);
3422
+ --inc-sparkline-fill: rgba(var(--bs-danger-rgb), 0.14);
3423
+ --inc-sparkline-marker: var(--bs-danger-text-emphasis);
3424
+ }
3425
+
3426
+ &--tone-muted {
3427
+ --inc-sparkline-stroke: var(--inc-text-muted);
3428
+ --inc-sparkline-fill: rgba(var(--inc-text-muted-rgb), 0.1);
3429
+ --inc-sparkline-marker: var(--inc-text-secondary);
3430
+ }
3431
+
3432
+ &--tone-accent {
3433
+ --inc-sparkline-stroke: var(--bs-primary);
3434
+ --inc-sparkline-fill: rgba(var(--bs-primary-rgb), 0.14);
3435
+ --inc-sparkline-marker: var(--bs-primary);
3436
+ }
3437
+
3438
+ &__svg {
3439
+ display: block;
3440
+ inline-size: 100%;
3441
+ block-size: 100%;
3442
+ overflow: visible;
3443
+ }
3444
+
3445
+ &__line,
3446
+ &__empty-line {
3447
+ fill: none;
3448
+ stroke: var(--inc-sparkline-stroke);
3449
+ stroke-width: 1.6;
3450
+ stroke-linecap: round;
3451
+ stroke-linejoin: round;
3452
+ }
3453
+
3454
+ &__area {
3455
+ fill: var(--inc-sparkline-fill);
3456
+ stroke: none;
3457
+ }
3458
+
3459
+ &__bar {
3460
+ fill: var(--inc-sparkline-stroke);
3461
+ opacity: 0.82;
3462
+ }
3463
+
3464
+ &__marker {
3465
+ fill: var(--inc-sparkline-marker);
3466
+ stroke: var(--inc-surface-primary);
3467
+ stroke-width: 1.5;
3468
+ }
3469
+
3470
+ &__reference {
3471
+ stroke: var(--inc-sparkline-reference);
3472
+ stroke-width: 1;
3473
+ stroke-dasharray: 3 3;
3474
+ }
3475
+
3476
+ &__empty-line {
3477
+ stroke: var(--inc-sparkline-muted);
3478
+ stroke-dasharray: 2 4;
3479
+ }
3480
+
3481
+ &__empty {
3482
+ fill: var(--inc-text-muted);
3483
+ font-family: $font-family-sans-serif;
3484
+ font-size: 0.625rem;
3485
+ font-weight: 600;
3486
+ letter-spacing: 0;
3487
+ pointer-events: none;
3488
+ }
3489
+ }
3490
+
3397
3491
  .inc-alert-container {
3398
3492
  @extend .container-xxl;
3399
3493
  position: relative;
@@ -71,6 +71,8 @@ The runtime auto-defines the shipped elements on load. If a consumer needs expli
71
71
  Button, button-group, button-toolbar, close-button, alert, and empty-state custom elements.
72
72
  - [`components/collections.js`](components/collections.js)
73
73
  List-group, key-value-grid, and key-value custom elements.
74
+ - [`components/visualizations.js`](components/visualizations.js)
75
+ D3-backed sparkline custom element and small path/data helpers.
74
76
  - [`components/overlays.js`](components/overlays.js)
75
77
  Disclosure, dialog, and drawer custom elements.
76
78
  - [`index.js`](index.js)
@@ -86,6 +88,7 @@ The Web Component layer should mirror the current CSS kit, not reinterpret it.
86
88
  - Form wrappers should keep native controls native.
87
89
  - Navigation components should reflect keyboard and focus state in the DOM.
88
90
  - Feedback and status shells should announce state accessibly, badge/spinner atoms should standardize the common tone and loading defaults, and action/detail plus collection hosts should keep buttons, alerts, list groups, and description-list pairs declarative without inventing a second styling vocabulary.
91
+ - Visualization components should stay compact, accessible, and evidence-supporting. Use D3 for geometry and scales, not DOM mutation.
89
92
  - Overlays should prefer native `<details>` and `<dialog>` behavior when that satisfies the contract.
90
93
  - Tables, data presentation, utility atoms, and the remaining presentation-only surfaces should remain CSS-first until the component contract is explicit and worth the runtime cost.
91
94
 
@@ -12,6 +12,7 @@ The runtime defines the approved v1 host family set:
12
12
  - feedback and status: `inc-state-panel`, `inc-live-region`, `inc-auto-refresh`, `inc-theme-switcher`, `inc-badge`, `inc-spinner`
13
13
  - actions and detail shells: `inc-button`, `inc-button-group`, `inc-button-toolbar`, `inc-close-button`, `inc-alert`, `inc-empty-state`
14
14
  - collections: `inc-list-group`, `inc-key-value-grid`, `inc-key-value`
15
+ - data visualization: `inc-sparkline`
15
16
  - overlays: `inc-disclosure`, `inc-dialog`, `inc-drawer`
16
17
 
17
18
  ## Contract shape
@@ -28,6 +29,7 @@ The runtime defines the approved v1 host family set:
28
29
  - `components/feedback.js`
29
30
  - `components/actions.js`
30
31
  - `components/collections.js`
32
+ - `components/visualizations.js`
31
33
  - `components/overlays.js`
32
34
  - Public registration API is idempotent:
33
35
  - `window.IncWebComponents.defineAll()`