@hemerson/design-system 0.4.0 → 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
@@ -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
  }
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hemerson/design-system",
3
- "version": "0.4.0",
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",