hlmnhkl-ui 0.27.0 → 0.29.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # hlmnhkl/ui
2
2
 
3
- React components, measured down to the part you never see: the 44px tap area, the 2px focus ring, the timing of every move. Black, white and grey, and copied into your app so the code is yours.
3
+ React components, measured down to the part you never see: the 44px tap area, the 2px focus ring, the timing of every move. Black, white and grey with one blue accent, and copied into your app so the code is yours.
4
4
 
5
5
  <picture>
6
6
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/hilmanhaikal/hlmnhkl-ui/main/.github/assets/home-dark.png">
@@ -74,7 +74,7 @@ Setup for other tools: [MCP server](https://ui.hlmnhkl.my/mcp).
74
74
 
75
75
  ## Pro
76
76
 
77
- 71 more components (such as DataGrid, Calendar, Chart, KanbanBoard and Combobox), page blocks, full templates and brand themes are coming as hlmnhkl/ui Pro. You can see them on the [docs site](https://ui.hlmnhkl.my).
77
+ 72 more components (such as DataGrid, Calendar, Chart, KanbanBoard and Combobox), page blocks, full templates and brand themes are coming as hlmnhkl/ui Pro. You can see them on the [docs site](https://ui.hlmnhkl.my).
78
78
 
79
79
  ## Licence
80
80
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hlmnhkl-ui",
3
- "version": "0.27.0",
4
- "description": "React components in a monochrome style. Copy them into your app with npx hlmnhkl-ui add <name>.",
3
+ "version": "0.29.0",
4
+ "description": "React components in black, white and grey with one blue accent. Copy them into your app with npx hlmnhkl-ui add <name>.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://ui.hlmnhkl.my",
7
7
  "repository": {
@@ -22,6 +22,7 @@
22
22
  "Drawer",
23
23
  "EmojiPicker",
24
24
  "FileUpload",
25
+ "GlassLens",
25
26
  "HoverCard",
26
27
  "IcInput",
27
28
  "Image",
@@ -74,7 +74,7 @@
74
74
  box-shadow: var(--hl-shadow-1);
75
75
  }
76
76
  @media (hover: hover) {
77
- .primary:hover:not([aria-disabled="true"]) { background: var(--hl-color-inverse-hover); }
77
+ .primary:hover:not([aria-disabled="true"]) { background: var(--hl-color-accent-hover); }
78
78
  }
79
79
 
80
80
  .secondary {
@@ -27,9 +27,11 @@
27
27
  max-height: calc(100dvh - var(--hl-space-5) * 2);
28
28
  display: flex;
29
29
  flex-direction: column;
30
- border: var(--hl-line) solid var(--hl-color-border);
30
+ border: var(--hl-line) solid var(--hl-glass-edge, var(--hl-color-border));
31
31
  border-radius: var(--hl-radius-panel);
32
- background: var(--hl-color-surface);
32
+ background: var(--hl-glass-bg, var(--hl-color-surface));
33
+ -webkit-backdrop-filter: var(--hl-glass-filter, none);
34
+ backdrop-filter: var(--hl-glass-filter, none);
33
35
  box-shadow: var(--hl-shadow-4);
34
36
  outline: none;
35
37
  pointer-events: auto;
@@ -6,9 +6,11 @@
6
6
  max-height: calc(100dvh - 2 * var(--hl-space-5));
7
7
  overflow-y: auto;
8
8
  padding: var(--hl-space-2);
9
- border: var(--hl-line) solid var(--hl-color-border);
9
+ border: var(--hl-line) solid var(--hl-glass-edge, var(--hl-color-border));
10
10
  border-radius: var(--hl-radius-md);
11
- background: var(--hl-color-surface);
11
+ background: var(--hl-glass-bg, var(--hl-color-surface));
12
+ -webkit-backdrop-filter: var(--hl-glass-filter, none);
13
+ backdrop-filter: var(--hl-glass-filter, none);
12
14
  box-shadow: var(--hl-shadow-3);
13
15
  outline: none;
14
16
  transform-origin: top left;
@@ -45,7 +45,7 @@
45
45
  }
46
46
 
47
47
  @media (hover: hover) {
48
- .fab:hover { background: var(--hl-color-inverse-hover); }
48
+ .fab:hover { background: var(--hl-color-accent-hover); }
49
49
  }
50
50
 
51
51
  .fab:active { scale: var(--hl-press-scale); }
@@ -142,7 +142,9 @@
142
142
  .actionLabel {
143
143
  padding: var(--hl-space-2) var(--hl-space-4);
144
144
  border-radius: var(--hl-radius-full);
145
- background: var(--hl-color-surface);
145
+ background: var(--hl-glass-bg, var(--hl-color-surface));
146
+ -webkit-backdrop-filter: var(--hl-glass-filter, none);
147
+ backdrop-filter: var(--hl-glass-filter, none);
146
148
  box-shadow: var(--hl-shadow-2);
147
149
  font-size: var(--hl-text-sm);
148
150
  font-weight: var(--hl-weight-medium);
@@ -157,7 +159,9 @@
157
159
  height: var(--hl-hit-min);
158
160
  margin-inline-end: calc((var(--hl-fab-size) - var(--hl-hit-min)) / 2);
159
161
  border-radius: var(--hl-radius-full);
160
- background: var(--hl-color-surface);
162
+ background: var(--hl-glass-bg, var(--hl-color-surface));
163
+ -webkit-backdrop-filter: var(--hl-glass-filter, none);
164
+ backdrop-filter: var(--hl-glass-filter, none);
161
165
  box-shadow: var(--hl-shadow-2);
162
166
  }
163
167
 
@@ -74,5 +74,5 @@
74
74
  }
75
75
  .primary { background: var(--hl-color-accent); color: var(--hl-color-accent-fg); }
76
76
  @media (hover: hover) {
77
- .primary:hover:not(:disabled) { background: var(--hl-color-inverse-hover); }
77
+ .primary:hover:not(:disabled) { background: var(--hl-color-accent-hover); }
78
78
  }
@@ -4,9 +4,11 @@
4
4
  width: max-content;
5
5
  max-width: min(var(--hl-panel-w-sm), calc(100vw - var(--hl-space-5) * 2));
6
6
  padding: var(--hl-space-5);
7
- border: var(--hl-line) solid var(--hl-color-border);
7
+ border: var(--hl-line) solid var(--hl-glass-edge, var(--hl-color-border));
8
8
  border-radius: var(--hl-radius-panel);
9
- background: var(--hl-color-surface);
9
+ background: var(--hl-glass-bg, var(--hl-color-surface));
10
+ -webkit-backdrop-filter: var(--hl-glass-filter, none);
11
+ backdrop-filter: var(--hl-glass-filter, none);
10
12
  box-shadow: var(--hl-shadow-3);
11
13
  outline: none;
12
14
  transform-origin: top left;
@@ -19,10 +19,12 @@
19
19
  display: flex;
20
20
  flex-direction: column;
21
21
  margin-left: calc(min(100%, var(--hl-panel-w-lg)) / -2);
22
- border: var(--hl-line) solid var(--hl-color-border);
22
+ border: var(--hl-line) solid var(--hl-glass-edge, var(--hl-color-border));
23
23
  border-bottom: 0;
24
24
  border-radius: var(--hl-radius-sheet) var(--hl-radius-sheet) 0 0;
25
- background: var(--hl-color-surface);
25
+ background: var(--hl-glass-bg, var(--hl-color-surface));
26
+ -webkit-backdrop-filter: var(--hl-glass-filter, none);
27
+ backdrop-filter: var(--hl-glass-filter, none);
26
28
  box-shadow: var(--hl-shadow-4);
27
29
  outline: none;
28
30
  padding-bottom: env(safe-area-inset-bottom);
@@ -46,9 +46,11 @@
46
46
  align-items: flex-start;
47
47
  gap: var(--hl-space-4);
48
48
  padding: var(--hl-space-5) var(--hl-space-2) var(--hl-space-5) var(--hl-space-5);
49
- border: var(--hl-line) solid var(--hl-color-border);
49
+ border: var(--hl-line) solid var(--hl-glass-edge, var(--hl-color-border));
50
50
  border-radius: var(--hl-radius-md);
51
- background: var(--hl-color-surface);
51
+ background: var(--hl-glass-bg, var(--hl-color-surface));
52
+ -webkit-backdrop-filter: var(--hl-glass-filter, none);
53
+ backdrop-filter: var(--hl-glass-filter, none);
52
54
  box-shadow: var(--hl-shadow-3);
53
55
  pointer-events: auto;
54
56
  touch-action: pan-y;
@@ -59,7 +59,7 @@
59
59
 
60
60
  @media (hover: hover) {
61
61
  .root:hover:not(:disabled):not([data-on]) { background: var(--hl-color-surface-hover); }
62
- .root[data-on]:hover:not(:disabled) { background: var(--hl-color-inverse-hover); }
62
+ .root[data-on]:hover:not(:disabled) { background: var(--hl-color-accent-hover); }
63
63
  }
64
64
 
65
65
  .root:focus-visible {
package/src/tokens.css CHANGED
@@ -36,9 +36,13 @@
36
36
  --hl-color-inverse-fg: var(--hl-gray-0);
37
37
  --hl-color-inverse-hover: var(--hl-gray-700);
38
38
  --hl-color-shimmer: rgb(255 255 255 / 0.7);
39
- /* Accent: the foreground by default, so the library stays monochrome */
40
- --hl-color-accent: var(--hl-color-inverse);
41
- --hl-color-accent-fg: var(--hl-color-inverse-fg);
39
+ /* Accent: marking blue, the layout dye a machinist wipes on a part to check its fit, for what is chosen
40
+ or on: primary buttons, checked and selected states, the current tab, progress. Blue because most
41
+ apps use it for the main action, so it reads at once. Everything else stays black, white and grey.
42
+ White on it is 6.8:1. */
43
+ --hl-color-accent: #1f5aa6;
44
+ --hl-color-accent-fg: #ffffff;
45
+ --hl-color-accent-hover: #194a8a;
42
46
 
43
47
  /* Status: always paired with an icon or word */
44
48
  --hl-color-success: #12733a;
@@ -235,6 +239,9 @@
235
239
  --hl-color-inverse: #ececec;
236
240
  --hl-color-inverse-fg: #0a0a0a;
237
241
  --hl-color-inverse-hover: var(--hl-gray-300);
242
+ --hl-color-accent: #7fa8e6;
243
+ --hl-color-accent-fg: #0a0a0a;
244
+ --hl-color-accent-hover: #9bbcec;
238
245
  --hl-color-shimmer: rgb(255 255 255 / 0.06);
239
246
  --hl-color-success: #4cc97a;
240
247
  --hl-color-warning: #f2b33d;
@@ -273,6 +280,9 @@
273
280
  --hl-color-inverse: #ececec;
274
281
  --hl-color-inverse-fg: #0a0a0a;
275
282
  --hl-color-inverse-hover: var(--hl-gray-300);
283
+ --hl-color-accent: #7fa8e6;
284
+ --hl-color-accent-fg: #0a0a0a;
285
+ --hl-color-accent-hover: #9bbcec;
276
286
  --hl-color-shimmer: rgb(255 255 255 / 0.06);
277
287
  --hl-color-success: #4cc97a;
278
288
  --hl-color-warning: #f2b33d;
@@ -411,15 +421,18 @@
411
421
  /* A cell's widest, so long text wraps and a sideways-scrolling table stays readable. */
412
422
  --hl-table-cell-max: 320px;
413
423
 
414
- /* Charts: series differ by shade, dash and marker, never colour alone */
424
+ /* Charts: series differ by colour, dash and marker, never colour alone. The colours are a survey map's
425
+ own code, in a fixed order: navy (the accent's family), contour brown, survey green, revision purple,
426
+ chart ochre. Checked for colour-blind separation (8.0 or more for adjacent pairs) and 3:1 against the surface, in both
427
+ themes. A sixth series folds into "Other" or a second chart; it never gets a made-up colour. */
415
428
  --hl-chart-h: 260px;
416
429
  --hl-chart-donut: 220px;
417
430
  --hl-chart-area-opacity: 0.14;
418
- --hl-chart-1: var(--hl-gray-950);
419
- --hl-chart-2: var(--hl-gray-600);
420
- --hl-chart-3: #8a8a8a;
421
- --hl-chart-4: var(--hl-gray-800);
422
- --hl-chart-5: var(--hl-gray-500);
431
+ --hl-chart-1: #2f64b4;
432
+ --hl-chart-2: #b36324;
433
+ --hl-chart-3: #2f9a6e;
434
+ --hl-chart-4: #8a52c2;
435
+ --hl-chart-5: #a8861a;
423
436
  --hl-chart-dash-1: none;
424
437
  --hl-chart-dash-2: 6 4;
425
438
  --hl-chart-dash-3: 1.5 3.5;
@@ -434,22 +447,23 @@
434
447
  --hl-editor-min-h: 160px;
435
448
  }
436
449
 
450
+ /* The same five colours, a step lighter for the dark surface, checked there on their own. */
437
451
  @media (prefers-color-scheme: dark) {
438
452
  :root:not([data-theme="light"]) {
439
- --hl-chart-1: var(--hl-gray-50);
440
- --hl-chart-2: var(--hl-gray-400);
441
- --hl-chart-3: #707070;
442
- --hl-chart-4: var(--hl-gray-200);
443
- --hl-chart-5: var(--hl-gray-500);
453
+ --hl-chart-1: #638fdb;
454
+ --hl-chart-2: #c97638;
455
+ --hl-chart-3: #3ea97a;
456
+ --hl-chart-4: #a873d6;
457
+ --hl-chart-5: #b0902a;
444
458
  }
445
459
  }
446
460
 
447
461
  [data-theme="dark"] {
448
- --hl-chart-1: var(--hl-gray-50);
449
- --hl-chart-2: var(--hl-gray-400);
450
- --hl-chart-3: #707070;
451
- --hl-chart-4: var(--hl-gray-200);
452
- --hl-chart-5: var(--hl-gray-500);
462
+ --hl-chart-1: #638fdb;
463
+ --hl-chart-2: #c97638;
464
+ --hl-chart-3: #3ea97a;
465
+ --hl-chart-4: #a873d6;
466
+ --hl-chart-5: #b0902a;
453
467
  }
454
468
 
455
469
  @media (prefers-reduced-motion: reduce) {