@hemerson/design-system 0.4.0 → 0.6.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
@@ -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
  }
@@ -738,6 +738,24 @@ html[data-transparency="reduced"] .hds-glass::before {
738
738
  color: var(--danger);
739
739
  }
740
740
 
741
+ .hds-menu-header {
742
+ display: flex;
743
+ flex-direction: column;
744
+ gap: 2px;
745
+ padding: var(--space-2) var(--space-3);
746
+ color: var(--ink);
747
+ font-size: 14px;
748
+ line-height: 20px;
749
+ cursor: default;
750
+ }
751
+
752
+ /* A second line, such as an email */
753
+ .hds-menu-header small {
754
+ color: var(--ink-muted);
755
+ font-size: 13px;
756
+ line-height: 18px;
757
+ }
758
+
741
759
  .hds-menu-separator {
742
760
  height: 1px;
743
761
  margin: var(--space-1) var(--space-2);
@@ -949,6 +967,197 @@ html[data-transparency="reduced"] .hds-glass::before {
949
967
  pointer-events: none;
950
968
  }
951
969
 
970
+ /* Customizable select (Chromium 135+): the open list is glass, like Menu. The select stays
971
+ native for the keyboard, screen readers and forms; other browsers keep their own list. */
972
+ @supports (appearance: base-select) {
973
+ .hds-select,
974
+ .hds-select::picker(select) {
975
+ appearance: base-select;
976
+ }
977
+
978
+ .hds-select {
979
+ display: flex;
980
+ align-items: center;
981
+ }
982
+
983
+ /* The wrapper already draws the chevron */
984
+ .hds-select::picker-icon {
985
+ display: none;
986
+ }
987
+
988
+ .hds-select::picker(select) {
989
+ margin-block: var(--space-2);
990
+ padding: var(--space-1);
991
+ border: 0;
992
+ border-radius: var(--radius-lg);
993
+ color: var(--ink);
994
+ font-family: var(--font-sans);
995
+ background: linear-gradient(135deg, var(--glass-sheen), transparent 42%), var(--glass-regular-tint);
996
+ box-shadow: 0 0 0 0.5px var(--glass-edge), var(--shadow-glass);
997
+ text-shadow: var(--glass-text-shadow);
998
+ -webkit-backdrop-filter: blur(6px) saturate(180%);
999
+ backdrop-filter: var(--glass-blur);
1000
+ }
1001
+
1002
+ .hds-select option {
1003
+ display: flex;
1004
+ align-items: center;
1005
+ gap: var(--space-2);
1006
+ min-height: 36px;
1007
+ padding: var(--space-2) var(--space-3);
1008
+ border-radius: var(--space-1);
1009
+ font-size: 14px;
1010
+ line-height: 20px;
1011
+ font-weight: 500;
1012
+ cursor: pointer;
1013
+ }
1014
+
1015
+ .hds-select option:hover,
1016
+ .hds-select option:focus-visible {
1017
+ outline: none;
1018
+ background: var(--accent-soft);
1019
+ }
1020
+
1021
+ .hds-select option:checked {
1022
+ font-weight: 600;
1023
+ }
1024
+
1025
+ .hds-select option::checkmark {
1026
+ order: 1;
1027
+ margin-left: auto;
1028
+ color: var(--accent);
1029
+ }
1030
+
1031
+ .hds-select option:disabled {
1032
+ color: var(--ink-muted);
1033
+ cursor: default;
1034
+ }
1035
+
1036
+ html[data-transparency="reduced"] .hds-select::picker(select) {
1037
+ border: 1px solid var(--line);
1038
+ background: var(--glass-solid);
1039
+ box-shadow: var(--shadow-raised);
1040
+ text-shadow: none;
1041
+ -webkit-backdrop-filter: none;
1042
+ backdrop-filter: none;
1043
+ }
1044
+
1045
+ @media (prefers-reduced-transparency: reduce) {
1046
+ .hds-select::picker(select) {
1047
+ border: 1px solid var(--line);
1048
+ background: var(--glass-solid);
1049
+ box-shadow: var(--shadow-raised);
1050
+ text-shadow: none;
1051
+ -webkit-backdrop-filter: none;
1052
+ backdrop-filter: none;
1053
+ }
1054
+ }
1055
+ }
1056
+
1057
+ /* ---------- DateInput ---------- */
1058
+ .hds-date-wrap {
1059
+ position: relative;
1060
+ }
1061
+
1062
+ .hds-date-input {
1063
+ padding-right: var(--space-10);
1064
+ }
1065
+
1066
+ .hds-date-wrap > .hds-date-button {
1067
+ position: absolute;
1068
+ top: 50%;
1069
+ right: var(--space-1);
1070
+ transform: translateY(-50%);
1071
+ }
1072
+
1073
+ .hds-date-panel {
1074
+ position: fixed;
1075
+ top: 0;
1076
+ left: 0;
1077
+ z-index: 70;
1078
+ width: 304px;
1079
+ padding: var(--space-3);
1080
+ border-radius: var(--radius-xl);
1081
+ font-family: var(--font-sans);
1082
+ }
1083
+
1084
+ .hds-date-header {
1085
+ display: flex;
1086
+ align-items: center;
1087
+ justify-content: space-between;
1088
+ gap: var(--space-2);
1089
+ margin-bottom: var(--space-2);
1090
+ }
1091
+
1092
+ .hds-date-title {
1093
+ margin: 0;
1094
+ font-size: 15px;
1095
+ line-height: 20px;
1096
+ font-weight: 600;
1097
+ }
1098
+
1099
+ .hds-date-grid {
1100
+ width: 100%;
1101
+ border-collapse: collapse;
1102
+ table-layout: fixed;
1103
+ }
1104
+
1105
+ .hds-date-grid th {
1106
+ height: 28px;
1107
+ color: var(--ink-muted);
1108
+ font-size: 12px;
1109
+ font-weight: 600;
1110
+ text-transform: uppercase;
1111
+ }
1112
+
1113
+ .hds-date-grid td {
1114
+ padding: 1px;
1115
+ text-align: center;
1116
+ }
1117
+
1118
+ .hds-date-day {
1119
+ width: 36px;
1120
+ height: 36px;
1121
+ border: 0;
1122
+ border-radius: var(--radius-full);
1123
+ background: transparent;
1124
+ color: var(--ink);
1125
+ font-family: var(--font-mono);
1126
+ font-size: 14px;
1127
+ font-variant-numeric: tabular-nums;
1128
+ cursor: pointer;
1129
+ transition: background-color 150ms;
1130
+ }
1131
+
1132
+ .hds-date-day:hover {
1133
+ background: var(--accent-soft);
1134
+ }
1135
+
1136
+ .hds-date-day--outside {
1137
+ color: var(--ink-muted);
1138
+ }
1139
+
1140
+ .hds-date-day[aria-current="date"] {
1141
+ box-shadow: inset 0 0 0 1px var(--accent);
1142
+ }
1143
+
1144
+ .hds-date-day--selected,
1145
+ .hds-date-day--selected:hover {
1146
+ background: var(--accent-fill);
1147
+ color: var(--on-accent);
1148
+ font-weight: 600;
1149
+ text-shadow: none;
1150
+ }
1151
+
1152
+ .hds-date-day[aria-disabled="true"] {
1153
+ opacity: 0.35;
1154
+ cursor: not-allowed;
1155
+ }
1156
+
1157
+ .hds-date-day[aria-disabled="true"]:hover {
1158
+ background: transparent;
1159
+ }
1160
+
952
1161
  .hds-checkbox {
953
1162
  display: inline-flex;
954
1163
  align-items: flex-start;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hemerson/design-system",
3
- "version": "0.4.0",
3
+ "version": "0.6.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",