@hemerson/design-system 0.3.1 → 0.5.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/dist/styles.css CHANGED
@@ -28,7 +28,7 @@
28
28
  --line-strong: var(--secondary-500);
29
29
  --focus-ring: var(--accent);
30
30
  --glass-regular-tint: #1b1b1b4d;
31
- --glass-thick-tint: #1b1b1bf0;
31
+ --glass-thick-tint: #1b1b1b80;
32
32
  --glass-solid: var(--surface-raised);
33
33
  --glass-clear-tint: #e4e3de12;
34
34
  --glass-sheen: #ffffff2e;
@@ -41,7 +41,7 @@
41
41
  --warning: #e3c47b;
42
42
  --danger: #f19b90;
43
43
  --on-danger: var(--dark-900);
44
- --scrim: #0000008c;
44
+ --scrim: #00000026;
45
45
  --shadow-glass: inset 0 1px 1px rgba(255,255,255,0.45), inset 0 -1px 1px rgba(255,255,255,0.12), inset 0 0 20px rgba(255,255,255,0.08), 0 10px 30px -8px rgba(0,0,0,0.45);
46
46
  --shadow-glow: 0 0 14px rgba(126,168,167,0.55);
47
47
  --shadow-raised: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
@@ -71,7 +71,7 @@
71
71
  --line-strong: var(--secondary-500);
72
72
  --focus-ring: var(--accent);
73
73
  --glass-regular-tint: #f2f1ec33;
74
- --glass-thick-tint: #f2f1ecf0;
74
+ --glass-thick-tint: #f2f1ecb3;
75
75
  --glass-solid: var(--surface-raised);
76
76
  --glass-clear-tint: #ffffff8c;
77
77
  --glass-sheen: #ffffff66;
@@ -84,7 +84,7 @@
84
84
  --warning: #765811;
85
85
  --danger: #a1342a;
86
86
  --on-danger: #ffffff;
87
- --scrim: #1b1b1b59;
87
+ --scrim: #1b1b1b0f;
88
88
  --shadow-glass: inset 0 1px 1px rgba(255,255,255,0.9), inset 0 -1px 1px rgba(255,255,255,0.4), inset 0 0 20px rgba(255,255,255,0.25), 0 10px 30px -8px rgba(27,27,27,0.25);
89
89
  --shadow-glow: 0 0 14px rgba(63,107,106,0.35);
90
90
  --shadow-raised: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
@@ -109,7 +109,7 @@
109
109
  --content-max: 1152px;
110
110
  --sidebar-width: 64px;
111
111
  --glass-blur: blur(6px) saturate(180%);
112
- --glass-thick-blur: blur(20px) saturate(150%);
112
+ --glass-thick-blur: blur(10px) saturate(170%);
113
113
  --glass-accent-blur: blur(6px) saturate(200%);
114
114
  --font-sans: Raleway, "Segoe UI", system-ui, sans-serif;
115
115
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
@@ -210,7 +210,7 @@
210
210
  }
211
211
 
212
212
  :where(.hds-btn, .hds-input, .hds-select, .hds-checkbox-input, .hds-segmented-option,
213
- .hds-menu-item, .hds-sidebar-item, .hds-navbar-link, .hds-scroll):focus-visible {
213
+ .hds-menu-item, .hds-sidebar-item, .hds-navbar-link, .hds-scroll, .hds-date-day):focus-visible {
214
214
  outline: 2px solid var(--focus-ring);
215
215
  outline-offset: 2px;
216
216
  }
@@ -296,7 +296,7 @@
296
296
 
297
297
  .hds-glass--thick {
298
298
  background: linear-gradient(135deg, var(--glass-sheen), transparent 42%), var(--glass-thick-tint);
299
- -webkit-backdrop-filter: blur(20px) saturate(150%);
299
+ -webkit-backdrop-filter: blur(10px) saturate(170%);
300
300
  backdrop-filter: var(--glass-thick-blur);
301
301
  }
302
302
 
@@ -949,6 +949,197 @@ html[data-transparency="reduced"] .hds-glass::before {
949
949
  pointer-events: none;
950
950
  }
951
951
 
952
+ /* Customizable select (Chromium 135+): the open list is glass, like Menu. The select stays
953
+ native for the keyboard, screen readers and forms; other browsers keep their own list. */
954
+ @supports (appearance: base-select) {
955
+ .hds-select,
956
+ .hds-select::picker(select) {
957
+ appearance: base-select;
958
+ }
959
+
960
+ .hds-select {
961
+ display: flex;
962
+ align-items: center;
963
+ }
964
+
965
+ /* The wrapper already draws the chevron */
966
+ .hds-select::picker-icon {
967
+ display: none;
968
+ }
969
+
970
+ .hds-select::picker(select) {
971
+ margin-block: var(--space-2);
972
+ padding: var(--space-1);
973
+ border: 0;
974
+ border-radius: var(--radius-lg);
975
+ color: var(--ink);
976
+ font-family: var(--font-sans);
977
+ background: linear-gradient(135deg, var(--glass-sheen), transparent 42%), var(--glass-regular-tint);
978
+ box-shadow: 0 0 0 0.5px var(--glass-edge), var(--shadow-glass);
979
+ text-shadow: var(--glass-text-shadow);
980
+ -webkit-backdrop-filter: blur(6px) saturate(180%);
981
+ backdrop-filter: var(--glass-blur);
982
+ }
983
+
984
+ .hds-select option {
985
+ display: flex;
986
+ align-items: center;
987
+ gap: var(--space-2);
988
+ min-height: 36px;
989
+ padding: var(--space-2) var(--space-3);
990
+ border-radius: var(--space-1);
991
+ font-size: 14px;
992
+ line-height: 20px;
993
+ font-weight: 500;
994
+ cursor: pointer;
995
+ }
996
+
997
+ .hds-select option:hover,
998
+ .hds-select option:focus-visible {
999
+ outline: none;
1000
+ background: var(--accent-soft);
1001
+ }
1002
+
1003
+ .hds-select option:checked {
1004
+ font-weight: 600;
1005
+ }
1006
+
1007
+ .hds-select option::checkmark {
1008
+ order: 1;
1009
+ margin-left: auto;
1010
+ color: var(--accent);
1011
+ }
1012
+
1013
+ .hds-select option:disabled {
1014
+ color: var(--ink-muted);
1015
+ cursor: default;
1016
+ }
1017
+
1018
+ html[data-transparency="reduced"] .hds-select::picker(select) {
1019
+ border: 1px solid var(--line);
1020
+ background: var(--glass-solid);
1021
+ box-shadow: var(--shadow-raised);
1022
+ text-shadow: none;
1023
+ -webkit-backdrop-filter: none;
1024
+ backdrop-filter: none;
1025
+ }
1026
+
1027
+ @media (prefers-reduced-transparency: reduce) {
1028
+ .hds-select::picker(select) {
1029
+ border: 1px solid var(--line);
1030
+ background: var(--glass-solid);
1031
+ box-shadow: var(--shadow-raised);
1032
+ text-shadow: none;
1033
+ -webkit-backdrop-filter: none;
1034
+ backdrop-filter: none;
1035
+ }
1036
+ }
1037
+ }
1038
+
1039
+ /* ---------- DateInput ---------- */
1040
+ .hds-date-wrap {
1041
+ position: relative;
1042
+ }
1043
+
1044
+ .hds-date-input {
1045
+ padding-right: var(--space-10);
1046
+ }
1047
+
1048
+ .hds-date-wrap > .hds-date-button {
1049
+ position: absolute;
1050
+ top: 50%;
1051
+ right: var(--space-1);
1052
+ transform: translateY(-50%);
1053
+ }
1054
+
1055
+ .hds-date-panel {
1056
+ position: fixed;
1057
+ top: 0;
1058
+ left: 0;
1059
+ z-index: 70;
1060
+ width: 304px;
1061
+ padding: var(--space-3);
1062
+ border-radius: var(--radius-xl);
1063
+ font-family: var(--font-sans);
1064
+ }
1065
+
1066
+ .hds-date-header {
1067
+ display: flex;
1068
+ align-items: center;
1069
+ justify-content: space-between;
1070
+ gap: var(--space-2);
1071
+ margin-bottom: var(--space-2);
1072
+ }
1073
+
1074
+ .hds-date-title {
1075
+ margin: 0;
1076
+ font-size: 15px;
1077
+ line-height: 20px;
1078
+ font-weight: 600;
1079
+ }
1080
+
1081
+ .hds-date-grid {
1082
+ width: 100%;
1083
+ border-collapse: collapse;
1084
+ table-layout: fixed;
1085
+ }
1086
+
1087
+ .hds-date-grid th {
1088
+ height: 28px;
1089
+ color: var(--ink-muted);
1090
+ font-size: 12px;
1091
+ font-weight: 600;
1092
+ text-transform: uppercase;
1093
+ }
1094
+
1095
+ .hds-date-grid td {
1096
+ padding: 1px;
1097
+ text-align: center;
1098
+ }
1099
+
1100
+ .hds-date-day {
1101
+ width: 36px;
1102
+ height: 36px;
1103
+ border: 0;
1104
+ border-radius: var(--radius-full);
1105
+ background: transparent;
1106
+ color: var(--ink);
1107
+ font-family: var(--font-mono);
1108
+ font-size: 14px;
1109
+ font-variant-numeric: tabular-nums;
1110
+ cursor: pointer;
1111
+ transition: background-color 150ms;
1112
+ }
1113
+
1114
+ .hds-date-day:hover {
1115
+ background: var(--accent-soft);
1116
+ }
1117
+
1118
+ .hds-date-day--outside {
1119
+ color: var(--ink-muted);
1120
+ }
1121
+
1122
+ .hds-date-day[aria-current="date"] {
1123
+ box-shadow: inset 0 0 0 1px var(--accent);
1124
+ }
1125
+
1126
+ .hds-date-day--selected,
1127
+ .hds-date-day--selected:hover {
1128
+ background: var(--accent-fill);
1129
+ color: var(--on-accent);
1130
+ font-weight: 600;
1131
+ text-shadow: none;
1132
+ }
1133
+
1134
+ .hds-date-day[aria-disabled="true"] {
1135
+ opacity: 0.35;
1136
+ cursor: not-allowed;
1137
+ }
1138
+
1139
+ .hds-date-day[aria-disabled="true"]:hover {
1140
+ background: transparent;
1141
+ }
1142
+
952
1143
  .hds-checkbox {
953
1144
  display: inline-flex;
954
1145
  align-items: flex-start;
@@ -1119,8 +1310,12 @@ html[data-transparency="reduced"] .hds-glass::before {
1119
1310
 
1120
1311
  .hds-table-wrap {
1121
1312
  overflow-x: auto;
1122
- border: 1px solid var(--line);
1123
1313
  border-radius: var(--radius-lg);
1314
+ }
1315
+
1316
+ /* Solid unless the table is on glass, which brings its own background and edge */
1317
+ .hds-table-wrap:not(.hds-glass) {
1318
+ border: 1px solid var(--line);
1124
1319
  background: var(--surface-raised);
1125
1320
  }
1126
1321
 
@@ -1181,6 +1376,27 @@ html[data-transparency="reduced"] .hds-glass::before {
1181
1376
  text-align: center;
1182
1377
  }
1183
1378
 
1379
+ /* On glass the header is frosted too, so rows scrolling under it stay out of the way */
1380
+ .hds-table-wrap--glass .hds-table th {
1381
+ background: color-mix(in srgb, var(--surface-sunken) 60%, transparent);
1382
+ -webkit-backdrop-filter: blur(12px);
1383
+ backdrop-filter: blur(12px);
1384
+ }
1385
+
1386
+ html[data-transparency="reduced"] .hds-table-wrap--glass .hds-table th {
1387
+ background: var(--surface-sunken);
1388
+ -webkit-backdrop-filter: none;
1389
+ backdrop-filter: none;
1390
+ }
1391
+
1392
+ @media (prefers-reduced-transparency: reduce) {
1393
+ .hds-table-wrap--glass .hds-table th {
1394
+ background: var(--surface-sunken);
1395
+ -webkit-backdrop-filter: none;
1396
+ backdrop-filter: none;
1397
+ }
1398
+ }
1399
+
1184
1400
  .hds-table-empty {
1185
1401
  padding: var(--space-8) var(--space-4);
1186
1402
  color: var(--ink-muted);
package/dist/tokens.css CHANGED
@@ -24,7 +24,7 @@
24
24
  --line-strong: var(--secondary-500);
25
25
  --focus-ring: var(--accent);
26
26
  --glass-regular-tint: #1b1b1b4d;
27
- --glass-thick-tint: #1b1b1bf0;
27
+ --glass-thick-tint: #1b1b1b80;
28
28
  --glass-solid: var(--surface-raised);
29
29
  --glass-clear-tint: #e4e3de12;
30
30
  --glass-sheen: #ffffff2e;
@@ -37,7 +37,7 @@
37
37
  --warning: #e3c47b;
38
38
  --danger: #f19b90;
39
39
  --on-danger: var(--dark-900);
40
- --scrim: #0000008c;
40
+ --scrim: #00000026;
41
41
  --shadow-glass: inset 0 1px 1px rgba(255,255,255,0.45), inset 0 -1px 1px rgba(255,255,255,0.12), inset 0 0 20px rgba(255,255,255,0.08), 0 10px 30px -8px rgba(0,0,0,0.45);
42
42
  --shadow-glow: 0 0 14px rgba(126,168,167,0.55);
43
43
  --shadow-raised: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
@@ -67,7 +67,7 @@
67
67
  --line-strong: var(--secondary-500);
68
68
  --focus-ring: var(--accent);
69
69
  --glass-regular-tint: #f2f1ec33;
70
- --glass-thick-tint: #f2f1ecf0;
70
+ --glass-thick-tint: #f2f1ecb3;
71
71
  --glass-solid: var(--surface-raised);
72
72
  --glass-clear-tint: #ffffff8c;
73
73
  --glass-sheen: #ffffff66;
@@ -80,7 +80,7 @@
80
80
  --warning: #765811;
81
81
  --danger: #a1342a;
82
82
  --on-danger: #ffffff;
83
- --scrim: #1b1b1b59;
83
+ --scrim: #1b1b1b0f;
84
84
  --shadow-glass: inset 0 1px 1px rgba(255,255,255,0.9), inset 0 -1px 1px rgba(255,255,255,0.4), inset 0 0 20px rgba(255,255,255,0.25), 0 10px 30px -8px rgba(27,27,27,0.25);
85
85
  --shadow-glow: 0 0 14px rgba(63,107,106,0.35);
86
86
  --shadow-raised: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
@@ -105,7 +105,7 @@
105
105
  --content-max: 1152px;
106
106
  --sidebar-width: 64px;
107
107
  --glass-blur: blur(6px) saturate(180%);
108
- --glass-thick-blur: blur(20px) saturate(150%);
108
+ --glass-thick-blur: blur(10px) saturate(170%);
109
109
  --glass-accent-blur: blur(6px) saturate(200%);
110
110
  --font-sans: Raleway, "Segoe UI", system-ui, sans-serif;
111
111
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
package/dist/tokens.json CHANGED
@@ -166,10 +166,10 @@
166
166
  {
167
167
  "name": "glass-thick-tint",
168
168
  "value": {
169
- "dark": "#1b1b1bf0",
170
- "light": "#f2f1ecf0"
169
+ "dark": "#1b1b1b80",
170
+ "light": "#f2f1ecb3"
171
171
  },
172
- "usage": "Thick glass for dialogs and sheets that hold forms and longer text; ink, ink-muted and accent all stay above 4.5:1 over any content."
172
+ "usage": "Thick glass for dialogs and sheets that hold forms and longer text: 50% in dark, 70% in light, so the page behind shows through the blur. Ink and ink-muted stay at 4.5:1 or more over the app's own surfaces, text and fills behind the scrim; over imagery much brighter (dark theme) or darker (light theme), give the glass the other theme with data-theme."
173
173
  },
174
174
  {
175
175
  "name": "glass-solid",
@@ -261,10 +261,10 @@
261
261
  {
262
262
  "name": "scrim",
263
263
  "value": {
264
- "dark": "#0000008c",
265
- "light": "#1b1b1b59"
264
+ "dark": "#00000026",
265
+ "light": "#1b1b1b0f"
266
266
  },
267
- "usage": "Dims the page behind a dialog; the dialog itself is thick glass."
267
+ "usage": "Lightly dims the page behind a dialog, enough to set it back without hiding it; the dialog itself is see-through thick glass."
268
268
  }
269
269
  ]
270
270
  },
@@ -511,8 +511,8 @@
511
511
  },
512
512
  {
513
513
  "name": "glass-thick-blur",
514
- "value": "blur(20px) saturate(150%)",
515
- "usage": "Thick glass: dialogs and sheets. Kept at 20px because large blurred areas are expensive to repaint."
514
+ "value": "blur(10px) saturate(170%)",
515
+ "usage": "Thick glass: dialogs and sheets. Enough blur to soften the text behind into shapes, light enough that those shapes stay recognisable."
516
516
  },
517
517
  {
518
518
  "name": "glass-accent-blur",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hemerson/design-system",
3
- "version": "0.3.1",
3
+ "version": "0.5.0",
4
4
  "description": "Liquid-glass design system: tokens, styles and React components for Hemerson's projects.",
5
5
  "license": "MIT",
6
6
  "author": "Hemerson Oliveira",