@flytedan/flytebot-design-system 0.61.0 → 0.62.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": "@flytedan/flytebot-design-system",
3
- "version": "0.61.0",
3
+ "version": "0.62.0",
4
4
  "description": "flytedesk Design System — shared component library, tokens, and business-logic kits for flytedesk apps.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -66,13 +66,17 @@
66
66
  },
67
67
  "devDependencies": {
68
68
  "@testing-library/user-event": "^14.6.7",
69
+ "@types/d3-geo": "^3.1.1",
69
70
  "@types/node": "^26.6.3",
70
71
  "@types/react": "^18.3.12",
71
72
  "@types/react-dom": "^18.3.1",
73
+ "@types/topojson-client": "^3.1.5",
74
+ "@types/topojson-specification": "^1.0.5",
72
75
  "@typescript-eslint/eslint-plugin": "^8.14.0",
73
76
  "@typescript-eslint/parser": "^8.14.0",
74
77
  "@vitejs/plugin-react": "^4.3.4",
75
78
  "@vitest/browser": "^2.1.9",
79
+ "d3-geo": "^3.1.1",
76
80
  "eslint": "^9.14.0",
77
81
  "eslint-plugin-react-hooks": "^5.0.0",
78
82
  "fast-check": "^4.10.2",
@@ -80,8 +84,10 @@
80
84
  "playwright": "^1.63.0",
81
85
  "react": "^18.3.1",
82
86
  "react-dom": "^18.3.1",
87
+ "topojson-client": "^3.1.0",
83
88
  "tsup": "^8.3.5",
84
89
  "typescript": "^5.6.3",
90
+ "us-atlas": "^3.0.1",
85
91
  "vite": "^5.4.11",
86
92
  "vitest": "^2.1.4"
87
93
  }
@@ -8318,3 +8318,88 @@ button.fd-erow-metric:focus-visible {
8318
8318
  animation: fd-pulse 1.6s ease-in-out infinite;
8319
8319
  }
8320
8320
  }
8321
+
8322
+ /* USChoropleth: a US map shaded on the sequential ramp (--seq-1..5), its legend, an optional ranking
8323
+ and a table view. The component's own width decides the layout (a container query), not the
8324
+ window's: the same card sits in different page widths. */
8325
+ .fd-uschoro {
8326
+ container-type: inline-size;
8327
+ display: flex;
8328
+ flex-direction: column;
8329
+ gap: 16px;
8330
+ }
8331
+ .fd-uschoro-layout {
8332
+ display: grid;
8333
+ grid-template-columns: minmax(0, 1fr);
8334
+ gap: 20px;
8335
+ }
8336
+ @container (min-width: 640px) {
8337
+ .fd-uschoro-layout:has(.fd-uschoro-top) {
8338
+ grid-template-columns: minmax(0, 1fr) 280px;
8339
+ align-items: start;
8340
+ }
8341
+ }
8342
+ .fd-uschoro-main {
8343
+ display: flex;
8344
+ flex-direction: column;
8345
+ gap: 12px;
8346
+ min-width: 0;
8347
+ }
8348
+ .fd-uschoro-stage {
8349
+ position: relative;
8350
+ }
8351
+ .fd-uschoro-svg {
8352
+ display: block;
8353
+ width: 100%;
8354
+ height: auto;
8355
+ }
8356
+ /* The skeleton holds the map's own proportions, so the page does not jump when the outlines arrive. */
8357
+ .fd-uschoro-skeleton {
8358
+ aspect-ratio: 975 / 610;
8359
+ }
8360
+ .fd-uschoro-state {
8361
+ stroke: var(--surface);
8362
+ stroke-width: 1;
8363
+ outline: none;
8364
+ }
8365
+ .fd-uschoro-state[data-step="none"] { fill: var(--surface-3); stroke: var(--border-strong); }
8366
+ .fd-uschoro-state[data-step="1"] { fill: var(--seq-1); }
8367
+ .fd-uschoro-state[data-step="2"] { fill: var(--seq-2); }
8368
+ .fd-uschoro-state[data-step="3"] { fill: var(--seq-3); }
8369
+ .fd-uschoro-state[data-step="4"] { fill: var(--seq-4); }
8370
+ .fd-uschoro-state[data-step="5"] { fill: var(--seq-5); }
8371
+ /* The state being read (hovered, focused or tapped): an outline drawn over its neighbours, whatever its shade. */
8372
+ .fd-uschoro-active {
8373
+ fill: none;
8374
+ stroke: var(--text);
8375
+ stroke-width: 2.5;
8376
+ stroke-linejoin: round;
8377
+ pointer-events: none;
8378
+ }
8379
+ .fd-uschoro-legend {
8380
+ display: flex;
8381
+ flex-wrap: wrap;
8382
+ gap: 6px 14px;
8383
+ margin: 0;
8384
+ padding: 0;
8385
+ list-style: none;
8386
+ font-size: var(--body-sm-size);
8387
+ color: var(--text-2);
8388
+ }
8389
+ .fd-uschoro-legend li {
8390
+ display: inline-flex;
8391
+ align-items: center;
8392
+ gap: 6px;
8393
+ }
8394
+ .fd-uschoro-swatch {
8395
+ width: 16px;
8396
+ height: 12px;
8397
+ border-radius: 3px;
8398
+ border: 1px solid var(--border-strong);
8399
+ }
8400
+ .fd-uschoro-swatch[data-step="none"] { background: var(--surface-3); }
8401
+ .fd-uschoro-swatch[data-step="1"] { background: var(--seq-1); }
8402
+ .fd-uschoro-swatch[data-step="2"] { background: var(--seq-2); }
8403
+ .fd-uschoro-swatch[data-step="3"] { background: var(--seq-3); }
8404
+ .fd-uschoro-swatch[data-step="4"] { background: var(--seq-4); }
8405
+ .fd-uschoro-swatch[data-step="5"] { background: var(--seq-5); }
package/styles/tokens.css CHANGED
@@ -131,6 +131,12 @@
131
131
  --chart-1:#2272BA;--chart-2:#23A183;--chart-3:#7C8698;--chart-4:#C8890B;
132
132
  --chart-5:#6E5BC9;--chart-6:#C86B8A;--chart-7:#4F97D6;--chart-8:#A8B0BD;
133
133
 
134
+ /* sequential data ramp — one hue, five steps, for a magnitude (a count per state). Light runs pale to
135
+ dark, dark runs near-surface to light, so the largest value is always the most prominent against
136
+ its surface. Distinct from the saturation index (--csi-*, teal, reserved for that index) and from
137
+ the categorical --chart-* ramp (which names kinds, never amounts). */
138
+ --seq-1:var(--blue-100);--seq-2:var(--blue-300);--seq-3:var(--blue-500);--seq-4:var(--blue-700);--seq-5:var(--blue-900);
139
+
134
140
  /* channel identity — one hue per medium, hue family per channel group.
135
141
  Blues = large format, violets = moving, ambers = paper, roses = direct,
136
142
  slate = digital. Never reuse a channel hue for anything else; the colour IS
@@ -238,6 +244,7 @@
238
244
  --link-hover:#A0C9E8;
239
245
  --skeleton-base:#1F242D;
240
246
  --skeleton-sheen:rgba(255,255,255,.06);
247
+ --seq-1:var(--blue-900);--seq-2:var(--blue-700);--seq-3:var(--blue-600);--seq-4:var(--blue-500);--seq-5:var(--blue-300);
241
248
  --grad-primary:linear-gradient(100deg,#1A5B96 0%,#3671B8 100%);/* @kind color */
242
249
  --grad-primary-hover:linear-gradient(100deg,#22699F 0%,#4180C7 100%);/* @kind color */
243
250
  --wash-hero:none;/* @kind color */--wash-panel:none;/* @kind color */--wash-edge:none;/* @kind color */