@hemerson/design-system 0.7.0 → 0.9.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
@@ -1054,6 +1054,160 @@ html[data-transparency="reduced"] .hds-glass::before {
1054
1054
  }
1055
1055
  }
1056
1056
 
1057
+ /* ---------- BarChart ---------- */
1058
+ .hds-chart {
1059
+ display: flex;
1060
+ flex-direction: column;
1061
+ gap: var(--space-3);
1062
+ min-width: 0;
1063
+ margin: 0;
1064
+ color: var(--ink);
1065
+ font-family: var(--font-sans);
1066
+ }
1067
+
1068
+ .hds-chart-title {
1069
+ font-size: 15px;
1070
+ line-height: 20px;
1071
+ font-weight: 600;
1072
+ }
1073
+
1074
+ .hds-chart-empty {
1075
+ margin: 0;
1076
+ padding: var(--space-6) 0;
1077
+ color: var(--ink-muted);
1078
+ font-size: 14px;
1079
+ text-align: center;
1080
+ }
1081
+
1082
+ .hds-chart-legend {
1083
+ display: flex;
1084
+ flex-wrap: wrap;
1085
+ gap: var(--space-4);
1086
+ margin: 0;
1087
+ padding: 0;
1088
+ list-style: none;
1089
+ color: var(--ink-muted);
1090
+ font-size: 13px;
1091
+ }
1092
+
1093
+ .hds-chart-legend li {
1094
+ display: inline-flex;
1095
+ align-items: center;
1096
+ gap: var(--space-2);
1097
+ }
1098
+
1099
+ .hds-chart-swatch {
1100
+ width: 10px;
1101
+ height: 10px;
1102
+ border-radius: 3px;
1103
+ }
1104
+
1105
+ .hds-chart-tone--accent { background: var(--accent-fill); }
1106
+ .hds-chart-tone--secondary { background: var(--secondary-fill); }
1107
+ .hds-chart-tone--success { background: var(--success); }
1108
+ .hds-chart-tone--warning { background: var(--warning); }
1109
+ .hds-chart-tone--danger { background: var(--danger); }
1110
+ .hds-chart-tone--neutral { background: var(--ink-muted); }
1111
+
1112
+ .hds-chart-value,
1113
+ .hds-chart-label {
1114
+ font-size: 12px;
1115
+ line-height: 16px;
1116
+ white-space: nowrap;
1117
+ }
1118
+
1119
+ .hds-chart-value {
1120
+ font-family: var(--font-mono);
1121
+ font-variant-numeric: tabular-nums;
1122
+ }
1123
+
1124
+ .hds-chart-label {
1125
+ color: var(--ink-muted);
1126
+ }
1127
+
1128
+ .hds-chart-stack {
1129
+ display: flex;
1130
+ overflow: hidden;
1131
+ border-radius: var(--radius-sm);
1132
+ transition: height 300ms ease-out, width 300ms ease-out;
1133
+ }
1134
+
1135
+ .hds-chart-bar {
1136
+ flex-basis: 0;
1137
+ min-width: 2px;
1138
+ min-height: 2px;
1139
+ }
1140
+
1141
+ /* Vertical: one column per label, the stack grows from the baseline */
1142
+ .hds-chart-columns {
1143
+ display: flex;
1144
+ align-items: stretch;
1145
+ gap: var(--space-2);
1146
+ padding-bottom: var(--space-1);
1147
+ border-bottom: 1px solid var(--line);
1148
+ overflow-x: auto;
1149
+ }
1150
+
1151
+ .hds-chart-column {
1152
+ display: grid;
1153
+ flex: 1 0 44px;
1154
+ grid-template-rows: 1fr auto;
1155
+ justify-items: center;
1156
+ gap: var(--space-1);
1157
+ min-width: 44px;
1158
+ }
1159
+
1160
+ /* The bar area: the value sits right on top of its bar, with room kept for it above the tallest */
1161
+ .hds-chart-plot {
1162
+ display: flex;
1163
+ flex-direction: column;
1164
+ justify-content: flex-end;
1165
+ align-items: center;
1166
+ gap: var(--space-1);
1167
+ width: 100%;
1168
+ min-height: 0;
1169
+ padding-top: 20px;
1170
+ }
1171
+
1172
+ .hds-chart--vertical .hds-chart-stack {
1173
+ flex-direction: column-reverse;
1174
+ width: min(100%, 40px);
1175
+ }
1176
+
1177
+ /* Horizontal: one row per label */
1178
+ .hds-chart-rows {
1179
+ display: grid;
1180
+ grid-template-columns: minmax(0, max-content) 1fr auto;
1181
+ align-items: center;
1182
+ gap: var(--space-2) var(--space-3);
1183
+ }
1184
+
1185
+ .hds-chart-row {
1186
+ display: contents;
1187
+ }
1188
+
1189
+ .hds-chart-row .hds-chart-label {
1190
+ overflow: hidden;
1191
+ max-width: 220px;
1192
+ color: var(--ink);
1193
+ font-size: 13px;
1194
+ text-overflow: ellipsis;
1195
+ }
1196
+
1197
+ .hds-chart-track {
1198
+ min-width: 80px;
1199
+ }
1200
+
1201
+ .hds-chart--horizontal .hds-chart-stack {
1202
+ height: 14px;
1203
+ }
1204
+
1205
+ @media (prefers-reduced-motion: reduce) {
1206
+ .hds-chart-stack {
1207
+ transition: none;
1208
+ }
1209
+ }
1210
+
1057
1211
  /* ---------- Typeahead ---------- */
1058
1212
  .hds-typeahead-panel {
1059
1213
  position: fixed;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hemerson/design-system",
3
- "version": "0.7.0",
3
+ "version": "0.9.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",