@hermes-ui/angular 0.1.7 → 0.2.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.
Files changed (108) hide show
  1. package/README.md +6 -6
  2. package/button/_buttons.clarity.scss +80 -2
  3. package/button/_mixins.buttons.scss +44 -2
  4. package/button/_properties.buttons.scss +209 -247
  5. package/button/_variables.buttons.scss +22 -0
  6. package/fesm2022/hermes-ui-angular-accordion.mjs +2 -2
  7. package/fesm2022/hermes-ui-angular-accordion.mjs.map +1 -1
  8. package/fesm2022/hermes-ui-angular-addons-card-container.mjs +3 -3
  9. package/fesm2022/hermes-ui-angular-addons-card-container.mjs.map +1 -1
  10. package/fesm2022/hermes-ui-angular-addons-certificate-viewer.mjs +2 -2
  11. package/fesm2022/hermes-ui-angular-addons-certificate-viewer.mjs.map +1 -1
  12. package/fesm2022/hermes-ui-angular-addons-datagrid-filters.mjs +2 -2
  13. package/fesm2022/hermes-ui-angular-addons-datagrid-filters.mjs.map +1 -1
  14. package/fesm2022/hermes-ui-angular-addons-datagrid.mjs +2 -2
  15. package/fesm2022/hermes-ui-angular-addons-datagrid.mjs.map +1 -1
  16. package/fesm2022/hermes-ui-angular-addons-property-view.mjs +2 -2
  17. package/fesm2022/hermes-ui-angular-addons-property-view.mjs.map +1 -1
  18. package/fesm2022/hermes-ui-angular-addons-theme-builder.mjs +66 -66
  19. package/fesm2022/hermes-ui-angular-addons-theme-builder.mjs.map +1 -1
  20. package/fesm2022/hermes-ui-angular-addons-var.mjs +2 -2
  21. package/fesm2022/hermes-ui-angular-addons-var.mjs.map +1 -1
  22. package/fesm2022/hermes-ui-angular-addons-wizard.mjs +2 -2
  23. package/fesm2022/hermes-ui-angular-addons-wizard.mjs.map +1 -1
  24. package/fesm2022/hermes-ui-angular-button.mjs +2 -2
  25. package/fesm2022/hermes-ui-angular-button.mjs.map +1 -1
  26. package/fesm2022/hermes-ui-angular-data-datagrid.mjs +2 -2
  27. package/fesm2022/hermes-ui-angular-data-datagrid.mjs.map +1 -1
  28. package/fesm2022/hermes-ui-angular-data-stack-view.mjs +2 -2
  29. package/fesm2022/hermes-ui-angular-data-stack-view.mjs.map +1 -1
  30. package/fesm2022/hermes-ui-angular-data-tree-view.mjs +2 -2
  31. package/fesm2022/hermes-ui-angular-data-tree-view.mjs.map +1 -1
  32. package/fesm2022/hermes-ui-angular-emphasis-alert.mjs +2 -2
  33. package/fesm2022/hermes-ui-angular-emphasis-alert.mjs.map +1 -1
  34. package/fesm2022/hermes-ui-angular-forms-checkbox.mjs +2 -2
  35. package/fesm2022/hermes-ui-angular-forms-checkbox.mjs.map +1 -1
  36. package/fesm2022/hermes-ui-angular-forms-combobox.mjs +2 -2
  37. package/fesm2022/hermes-ui-angular-forms-combobox.mjs.map +1 -1
  38. package/fesm2022/hermes-ui-angular-forms-common.mjs +2 -2
  39. package/fesm2022/hermes-ui-angular-forms-common.mjs.map +1 -1
  40. package/fesm2022/hermes-ui-angular-forms-datalist.mjs +2 -2
  41. package/fesm2022/hermes-ui-angular-forms-datalist.mjs.map +1 -1
  42. package/fesm2022/hermes-ui-angular-forms-datepicker.mjs +3 -3
  43. package/fesm2022/hermes-ui-angular-forms-datepicker.mjs.map +1 -1
  44. package/fesm2022/hermes-ui-angular-forms-file-input.mjs +2 -2
  45. package/fesm2022/hermes-ui-angular-forms-file-input.mjs.map +1 -1
  46. package/fesm2022/hermes-ui-angular-forms-input.mjs +2 -2
  47. package/fesm2022/hermes-ui-angular-forms-input.mjs.map +1 -1
  48. package/fesm2022/hermes-ui-angular-forms-native-select.mjs +2 -2
  49. package/fesm2022/hermes-ui-angular-forms-native-select.mjs.map +1 -1
  50. package/fesm2022/hermes-ui-angular-forms-number-input.mjs +2 -2
  51. package/fesm2022/hermes-ui-angular-forms-number-input.mjs.map +1 -1
  52. package/fesm2022/hermes-ui-angular-forms-password.mjs +2 -2
  53. package/fesm2022/hermes-ui-angular-forms-password.mjs.map +1 -1
  54. package/fesm2022/hermes-ui-angular-forms-radio.mjs +2 -2
  55. package/fesm2022/hermes-ui-angular-forms-radio.mjs.map +1 -1
  56. package/fesm2022/hermes-ui-angular-forms-range.mjs +2 -2
  57. package/fesm2022/hermes-ui-angular-forms-range.mjs.map +1 -1
  58. package/fesm2022/hermes-ui-angular-forms-select.mjs +2 -2
  59. package/fesm2022/hermes-ui-angular-forms-select.mjs.map +1 -1
  60. package/fesm2022/hermes-ui-angular-forms-textarea.mjs +2 -2
  61. package/fesm2022/hermes-ui-angular-forms-textarea.mjs.map +1 -1
  62. package/fesm2022/hermes-ui-angular-icon.mjs +29 -29
  63. package/fesm2022/hermes-ui-angular-icon.mjs.map +1 -1
  64. package/fesm2022/hermes-ui-angular-layout-nav.mjs +2 -2
  65. package/fesm2022/hermes-ui-angular-layout-nav.mjs.map +1 -1
  66. package/fesm2022/hermes-ui-angular-layout-tabs.mjs +2 -2
  67. package/fesm2022/hermes-ui-angular-layout-tabs.mjs.map +1 -1
  68. package/fesm2022/hermes-ui-angular-layout-vertical-nav.mjs +382 -28
  69. package/fesm2022/hermes-ui-angular-layout-vertical-nav.mjs.map +1 -1
  70. package/fesm2022/hermes-ui-angular-modal.mjs +2 -2
  71. package/fesm2022/hermes-ui-angular-modal.mjs.map +1 -1
  72. package/fesm2022/hermes-ui-angular-popover-signpost.mjs +2 -2
  73. package/fesm2022/hermes-ui-angular-popover-signpost.mjs.map +1 -1
  74. package/fesm2022/hermes-ui-angular-stepper.mjs +2 -2
  75. package/fesm2022/hermes-ui-angular-stepper.mjs.map +1 -1
  76. package/fesm2022/hermes-ui-angular-timeline.mjs +2 -2
  77. package/fesm2022/hermes-ui-angular-timeline.mjs.map +1 -1
  78. package/fesm2022/hermes-ui-angular-toast.mjs +2 -2
  79. package/fesm2022/hermes-ui-angular-toast.mjs.map +1 -1
  80. package/fesm2022/hermes-ui-angular-utils.mjs +6 -0
  81. package/fesm2022/hermes-ui-angular-utils.mjs.map +1 -1
  82. package/fesm2022/hermes-ui-angular-wizard.mjs +2 -2
  83. package/fesm2022/hermes-ui-angular-wizard.mjs.map +1 -1
  84. package/forms/combobox/_combobox.clarity.scss +18 -4
  85. package/forms/combobox/_properties.combobox.scss +5 -5
  86. package/forms/styles/_input-group.clarity.scss +7 -0
  87. package/forms/styles/_mixins.forms.scss +12 -10
  88. package/forms/styles/_native-select.clarity.scss +17 -5
  89. package/forms/styles/_properties.forms.scss +29 -18
  90. package/forms/styles/_textarea.clarity.scss +4 -4
  91. package/forms/styles/_variables.forms.scss +6 -0
  92. package/layout/main-container/_properties.header.scss +44 -6
  93. package/layout/main-container/_variables.header.scss +11 -0
  94. package/layout/nav/_header.clarity.scss +14 -0
  95. package/layout/nav/_mixins.header.scss +55 -40
  96. package/layout/nav/_responsive-nav.clarity.scss +21 -10
  97. package/layout/vertical-nav/_properties.vertical-nav.scss +77 -27
  98. package/layout/vertical-nav/_variables.vertical-nav.scss +23 -0
  99. package/layout/vertical-nav/_vertical-nav.clarity.scss +418 -277
  100. package/package.json +1 -1
  101. package/types/hermes-ui-angular-addons-theme-builder.d.ts +2 -2
  102. package/types/hermes-ui-angular-addons-theme-builder.d.ts.map +1 -1
  103. package/types/hermes-ui-angular-icon.d.ts +3 -3
  104. package/types/hermes-ui-angular-icon.d.ts.map +1 -1
  105. package/types/hermes-ui-angular-layout-vertical-nav.d.ts +134 -10
  106. package/types/hermes-ui-angular-layout-vertical-nav.d.ts.map +1 -1
  107. package/types/hermes-ui-angular-utils.d.ts +12 -0
  108. package/types/hermes-ui-angular-utils.d.ts.map +1 -1
@@ -51,6 +51,13 @@
51
51
  background-color: forms-variables.$hermes-forms-invalid-color;
52
52
  }
53
53
 
54
+ // Boxed fields signal focus with the frame ring (see .hermes-combobox-wrapper below), so
55
+ // the bottom bar is not drawn.
56
+ .hermes-combobox-wrapper ~ .hermes-focus-indicator,
57
+ .hermes-combobox-wrapper .hermes-focus-indicator {
58
+ display: none;
59
+ }
60
+
54
61
  .hermes-combobox-wrapper {
55
62
  position: relative;
56
63
  flex-wrap: wrap;
@@ -65,10 +72,14 @@
65
72
  calc(density.$hermes-base-vertical-offset-xs - tokens.$hermes-alias-object-border-width-100)
66
73
  combobox-variables.$hermes-combobox-trigger-padding-left;
67
74
  min-width: combobox-variables.$hermes-combobox-min-width;
75
+ // same height as the other boxed fields; pills wrapping onto more lines still grow it
76
+ min-height: forms-variables.$hermes-forms-input-wrapper-height;
77
+ align-content: center;
78
+ align-items: center;
68
79
 
69
80
  .hermes-input {
70
81
  padding: 0;
71
- max-height: density.$hermes-base-row-height-xs;
82
+ max-height: forms-variables.$hermes-forms-input-line-height;
72
83
 
73
84
  &:not(:disabled) {
74
85
  color: combobox-variables.$hermes-combobox-text-color;
@@ -101,6 +112,7 @@
101
112
  //Mixins
102
113
 
103
114
  @include styles-mixins.form-fields-appearance();
115
+ @include styles-mixins.field-focus-ring();
104
116
 
105
117
  // override the above mixin for combobox-specific styles
106
118
  background-color: combobox-variables.$hermes-combobox-input-background-color;
@@ -113,15 +125,17 @@
113
125
  // must stay borderless so it doesn't render as a second nested box
114
126
  .hermes-input.hermes-combobox-input,
115
127
  .hermes-input.hermes-combobox-input:focus,
128
+ .hermes-input.hermes-combobox-input:focus-within,
116
129
  .hermes-input.hermes-combobox-input.hermes-focus {
117
130
  background: none;
118
131
  border: none;
119
132
  border-radius: 0;
120
133
  box-shadow: none;
134
+ outline: none;
121
135
  }
122
136
 
123
137
  &.invalid {
124
- border-bottom-color: forms-variables.$hermes-forms-invalid-color;
138
+ border-color: forms-variables.$hermes-forms-invalid-color;
125
139
  }
126
140
 
127
141
  //Others
@@ -129,8 +143,8 @@
129
143
  background: none;
130
144
  border-bottom: none;
131
145
  vertical-align: middle;
132
- height: density.$hermes-base-row-height-xs;
133
- line-height: density.$hermes-base-typography-line-height-16;
146
+ height: forms-variables.$hermes-forms-input-line-height;
147
+ line-height: forms-variables.$hermes-forms-input-line-height;
134
148
  }
135
149
 
136
150
  .hermes-combobox-remove-btn {
@@ -17,10 +17,10 @@
17
17
 
18
18
  &,
19
19
  & [hermes-density] {
20
- --hermes-combobox-font-size: #{density.$hermes-base-typography-font-size-inline};
20
+ --hermes-combobox-font-size: var(--hermes-forms-input-font-size);
21
21
  // shares the same rounding as input/select/textarea
22
- --hermes-combobox-border-radius: var(--hermes-forms-border-radius, 0.375rem);
23
- --hermes-combobox-trigger-padding-left: #{density.$hermes-base-horizontal-offset-m};
22
+ --hermes-combobox-border-radius: var(--hermes-forms-border-radius, #{mixins.baselinePx(6)});
23
+ --hermes-combobox-trigger-padding-left: #{mixins.baselinePx(16)};
24
24
  --hermes-combobox-trigger-padding-right: #{density.$hermes-base-horizontal-offset-m};
25
25
  --hermes-combobox-pill-padding: 0 #{density.$hermes-base-horizontal-offset-xs};
26
26
  --hermes-combobox-pill-height: #{density.$hermes-base-row-height-xs};
@@ -30,8 +30,8 @@
30
30
 
31
31
  &,
32
32
  & [hermes-theme] {
33
- --hermes-combobox-border-color: #{tokens.$hermes-alias-object-border-color};
34
- --hermes-combobox-input-background-color: #{tokens.$hermes-alias-object-container-background-tint};
33
+ --hermes-combobox-border-color: var(--hermes-forms-field-border-color);
34
+ --hermes-combobox-input-background-color: var(--hermes-forms-background-color);
35
35
  --hermes-combobox-pill-background-color: #{tokens.$hermes-alias-object-interaction-background};
36
36
  --hermes-combobox-pill-border-color: #{tokens.$hermes-alias-object-border-color};
37
37
  --hermes-combobox-pill-font-color: #{tokens.$hermes-alias-typography-color-500};
@@ -37,11 +37,17 @@
37
37
  max-width: 100%;
38
38
 
39
39
  &:not([readonly]):focus,
40
+ &:not([readonly]):focus-within,
40
41
  &.hermes-focus {
41
42
  background: none;
42
43
  background-size: 0;
43
44
  border: 0;
44
45
  box-shadow: none;
46
+ outline: none;
47
+ }
48
+
49
+ &:disabled {
50
+ background: none;
45
51
  }
46
52
  }
47
53
 
@@ -96,6 +102,7 @@
96
102
  .hermes-form-control-disabled {
97
103
  .hermes-input-group {
98
104
  border-color: forms-variables.$hermes-forms-border-disabled-color;
105
+ background-color: forms-variables.$hermes-forms-field-disabled-background-color;
99
106
  }
100
107
 
101
108
  .hermes-input-group-icon-action {
@@ -65,19 +65,19 @@
65
65
  }
66
66
  }
67
67
 
68
- // shadcn-style focus ring: border changes color and a soft glow appears around the field,
69
- // instead of the Clarity underline growing from 0 to 100% width
70
- @mixin field-focus-ring($border-color: forms-variables.$hermes-forms-focused-color) {
71
- transition:
72
- border-color 0.15s ease,
73
- box-shadow 0.15s ease;
68
+ // Focus ring of boxed fields: a 2px outline offset 4px from the frame, in the focus color.
69
+ // The frame border does not change on focus, so a validation border (error/success) stays
70
+ // visible while the field is focused. The $ring-color argument is only kept for the
71
+ // validation callers that used to pass their own color; the ring is always the focus color.
72
+ @mixin field-focus-ring($ring-color: null) {
73
+ transition: border-color forms-variables.$hermes-forms-field-transition-duration
74
+ cubic-bezier(0.4, 0, 0.2, 1);
74
75
 
75
76
  &:focus,
76
77
  &.hermes-focus,
77
78
  &:focus-within {
78
- border-color: $border-color;
79
- box-shadow: 0 0 0 3px color-mix(in srgb, #{$border-color} 35%, transparent);
80
- outline: none;
79
+ outline: forms-variables.$hermes-forms-focus-ring-width solid forms-variables.$hermes-forms-focused-color;
80
+ outline-offset: forms-variables.$hermes-forms-focus-ring-offset;
81
81
  }
82
82
  }
83
83
 
@@ -99,7 +99,7 @@
99
99
  }
100
100
  }
101
101
  @mixin form-fields-appearance(
102
- $border-color: forms-variables.$hermes-forms-border-color,
102
+ $border-color: forms-variables.$hermes-forms-field-border-color,
103
103
  $text-color: forms-variables.$hermes-forms-text-color
104
104
  ) {
105
105
  color: $text-color;
@@ -111,6 +111,8 @@
111
111
  align-items: center;
112
112
  }
113
113
  @mixin disabled-form-fields() {
114
+ border-color: forms-variables.$hermes-forms-border-disabled-color;
115
+ background-color: forms-variables.$hermes-forms-field-disabled-background-color;
114
116
  color: forms-variables.$hermes-forms-text-disabled-color;
115
117
  cursor: not-allowed;
116
118
  }
@@ -23,7 +23,9 @@
23
23
  select {
24
24
  @include forms-mixins.custom-inputs(forms-variables.$hermes-forms-input-wrapper-height);
25
25
  @include forms-mixins.form-fields-appearance();
26
- @include mixins.generate-typography-token('SECONDARY-13-RG-EXP');
26
+
27
+ font-size: forms-variables.$hermes-forms-input-font-size;
28
+ line-height: forms-variables.$hermes-forms-input-line-height;
27
29
 
28
30
  &:not([multiple]) {
29
31
  @include forms-mixins.field-focus-ring();
@@ -34,7 +36,11 @@
34
36
  }
35
37
 
36
38
  position: relative;
37
- padding: 0 density.$hermes-base-icon-size-l 0 #{density.$hermes-base-horizontal-offset-s};
39
+ padding: 0
40
+ calc(
41
+ #{mixins.baselinePx(16)} + #{forms-variables.$hermes-forms-native-select-caret-size} + #{forms-variables.$hermes-forms-input-gap}
42
+ )
43
+ 0 #{mixins.baselinePx(16)};
38
44
  cursor: pointer;
39
45
 
40
46
  //Moves the :after pseudo element (arrow) to the back so that clicking over it activates
@@ -76,7 +82,11 @@
76
82
  @include mixins.equilateral(forms-variables.$hermes-forms-native-select-caret-size);
77
83
 
78
84
  top: calc((100% - forms-variables.$hermes-forms-native-select-caret-size) / 2);
79
- right: density.$hermes-base-horizontal-offset-s;
85
+ right: #{mixins.baselinePx(16)};
86
+ // above the select (which sits over it so the whole box opens the list), but not
87
+ // clickable: the click has to reach the select
88
+ z-index: calc(#{map.get(variables.$hermes-layers, native-select-box)} + 1);
89
+ pointer-events: none;
80
90
  // Using mask instead of background-image so we can use the CSS properties
81
91
  // and support both light / dark themes.
82
92
  mask: icons.generateCaretIcon();
@@ -165,9 +175,11 @@
165
175
  color: forms-variables.$hermes-forms-native-select-disabled-color;
166
176
  cursor: not-allowed;
167
177
 
178
+ background-color: forms-variables.$hermes-forms-field-disabled-background-color;
179
+
168
180
  &:hover {
169
- background: none;
170
- border-color: forms-variables.$hermes-forms-border-color;
181
+ background: forms-variables.$hermes-forms-field-disabled-background-color;
182
+ border-color: forms-variables.$hermes-forms-border-disabled-color;
171
183
  }
172
184
  }
173
185
  }
@@ -23,12 +23,12 @@
23
23
  --hermes-forms-input-group-icon-action-size: #{density.$hermes-base-icon-size-s};
24
24
  --hermes-forms-checkbox-border-radius: #{density.$hermes-base-border-radius-s};
25
25
  --hermes-forms-native-select-caret-size: #{density.$hermes-base-icon-size-xs};
26
- // shadcn-style rounding, shared by every boxed text/select field (input, password,
27
- // number-input, textarea, select, datalist, combobox).
28
- // Kept well under half of --hermes-forms-input-wrapper-height (24px): anything close
29
- // to 12px turns these short, grouped fields into a pill/stadium shape instead of a
30
- // rounded rectangle.
31
- --hermes-forms-border-radius: 0.375rem;
26
+ // Rounding shared by every boxed text/select field (input, password, number-input,
27
+ // textarea, select, datalist, combobox): 6px, the same as the login field frame.
28
+ // Kept well under half of --hermes-forms-input-wrapper-height: anything close to half
29
+ // turns these short, grouped fields into a pill/stadium shape instead of a rounded
30
+ // rectangle.
31
+ --hermes-forms-border-radius: #{mixins.baselinePx(6)};
32
32
  --hermes-forms-textarea-border-radius: var(--hermes-forms-border-radius);
33
33
  --hermes-forms-datalist-caret-icon-size: #{density.$hermes-base-icon-size-s};
34
34
 
@@ -53,25 +53,32 @@
53
53
  --hermes-select-item-indicator-size: #{mixins.baselinePx(14)};
54
54
 
55
55
  // Input
56
- // shadcn-style default sizing (32px tall field, 12px horizontal padding, 14px/20px text),
57
- // matching real shadcn Input pixel measurements. The former density-driven default
58
- // (row-height-s / horizontal-offset-m / SECONDARY-13-RG-EXP type) becomes the compact
59
- // variant below instead of being replaced.
56
+ // Field frame sizing: 32px tall, 16px horizontal padding, 16px/24px text. It is the frame
57
+ // of the login form fields (border, radius, height, padding and focus ring). The former
58
+ // density-driven default (row-height-s / horizontal-offset-m / SECONDARY-13-RG-EXP type)
59
+ // becomes the compact variant below instead of being replaced.
60
60
  //
61
61
  // Pixel values here MUST go through mixins.baselinePx($px), not bare rem literals: this
62
62
  // codebase's rem scale is calibrated to a 20px root font-size (--hermes-global-base: 20),
63
- // not the browser's usual 16px. Writing e.g. `2.25rem` to mean shadcn's 36px renders as
64
- // 2.25 * 20 = 45px instead - that's exactly how this got 25% too big the first time.
63
+ // not the browser's usual 16px. Writing e.g. `2.25rem` to mean 36px renders as
64
+ // 2.25 * 20 = 45px instead.
65
65
  //
66
66
  // The compact values are hardcoded from tokens.$hermes-global-space-9 / -5 rather than
67
67
  // density.$hermes-base-row-height-s / horizontal-offset-m: those density.* aliases are
68
68
  // `var(--hermes-base-*)` passthroughs that re-resolve against whatever density context
69
69
  // they're read in, so referencing them here would just echo compact's own (smaller) value
70
70
  // instead of the old un-densitied default.
71
- --hermes-forms-input-padding: 0 #{mixins.baselinePx(12)};
71
+ --hermes-forms-input-padding: 0 #{mixins.baselinePx(16)};
72
+ --hermes-forms-input-gap: #{mixins.baselinePx(8)};
72
73
  --hermes-forms-input-wrapper-height: #{mixins.baselinePx(32)};
73
- --hermes-forms-input-font-size: #{mixins.baselinePx(14)};
74
- --hermes-forms-input-line-height: #{mixins.baselinePx(20)};
74
+ --hermes-forms-input-font-size: #{mixins.baselinePx(16)};
75
+ --hermes-forms-input-line-height: #{mixins.baselinePx(24)};
76
+
77
+ // Focus ring: a 2px outline offset 4px from the frame. The frame border does not change
78
+ // color on focus; only validation states change it.
79
+ --hermes-forms-focus-ring-width: #{mixins.baselinePx(2)};
80
+ --hermes-forms-focus-ring-offset: #{mixins.baselinePx(4)};
81
+ --hermes-forms-field-transition-duration: 240ms;
75
82
 
76
83
  [hermes-density='compact'] {
77
84
  --hermes-forms-input-padding: 0 #{tokens.$hermes-global-space-5};
@@ -94,9 +101,12 @@
94
101
  --hermes-forms-subtext-color: #{tokens.$hermes-alias-typography-color-300};
95
102
  --hermes-forms-placeholder-color: #{tokens.$hermes-alias-typography-color-200};
96
103
  --hermes-forms-border-color: #{tokens.$hermes-alias-object-interaction-border-color};
104
+ // Frame of boxed fields. Checkbox/radio keep --hermes-forms-border-color.
105
+ --hermes-forms-field-border-color: #{tokens.$hermes-global-color-construction-300};
106
+ --hermes-forms-field-disabled-background-color: #{tokens.$hermes-alias-object-container-background-tint};
97
107
  --hermes-forms-focused-color: #{tokens.$hermes-alias-object-interaction-background-highlight};
98
108
  --hermes-forms-background-color: #{tokens.$hermes-alias-object-container-background};
99
- --hermes-forms-shadow: #{tokens.$hermes-alias-object-shadow-100};
109
+ --hermes-forms-shadow: none;
100
110
  --hermes-forms-subtext-disabled-color: #{tokens.$hermes-alias-typography-disabled};
101
111
  --hermes-forms-border-disabled-color: #{tokens.$hermes-alias-object-interaction-color-disabled};
102
112
  --hermes-forms-text-disabled-color: #{tokens.$hermes-alias-typography-disabled};
@@ -144,7 +154,8 @@
144
154
  // Select
145
155
  --hermes-forms-native-select-hover-background: transparent;
146
156
  --hermes-forms-native-select-disabled-color: #{tokens.$hermes-alias-object-interaction-color-disabled};
147
- --hermes-forms-native-select-hover-border-color: #{tokens.$hermes-alias-object-interaction-color-hover};
157
+ // The field frame has no hover state: the border stays the same until focus or validation.
158
+ --hermes-forms-native-select-hover-border-color: var(--hermes-forms-field-border-color);
148
159
  --hermes-forms-native-select-disabled-border-color: #{tokens.$hermes-alias-object-interaction-color-disabled};
149
160
  --hermes-forms-native-select-caret-hover-color: #{tokens.$hermes-alias-object-interaction-color-hover};
150
161
  --hermes-forms-native-select-caret-color: #{tokens.$hermes-alias-object-interaction-color};
@@ -170,7 +181,7 @@
170
181
 
171
182
  // Textarea
172
183
  --hermes-forms-textarea-background-color: #{tokens.$hermes-alias-object-container-background};
173
- --hermes-forms-textarea-disabled-background: #{tokens.$hermes-alias-object-container-background};
184
+ --hermes-forms-textarea-disabled-background: var(--hermes-forms-field-disabled-background-color);
174
185
 
175
186
  // Datalist
176
187
  --hermes-forms-datalist-caret-color: #{tokens.$hermes-alias-status-neutral};
@@ -26,14 +26,14 @@
26
26
  max-width: calc(100% - forms-variables.$hermes-forms-baseline);
27
27
  height: auto;
28
28
  resize: vertical;
29
- border: tokens.$hermes-alias-object-border-width-100 solid forms-variables.$hermes-forms-border-color;
29
+ border: tokens.$hermes-alias-object-border-width-100 solid forms-variables.$hermes-forms-field-border-color;
30
30
  background: forms-variables.$hermes-forms-textarea-background-color;
31
31
  color: forms-variables.$hermes-forms-text-color;
32
32
  border-radius: forms-variables.$hermes-forms-textarea-border-radius;
33
33
  box-shadow: forms-variables.$hermes-forms-shadow;
34
- padding: density.$hermes-base-vertical-offset-xl density.$hermes-base-horizontal-offset-xl;
35
-
36
- @include mixins.generate-typography-token('SECONDARY-13-RG-STD');
34
+ padding: mixins.baselinePx(8) mixins.baselinePx(16);
35
+ font-size: forms-variables.$hermes-forms-input-font-size;
36
+ line-height: forms-variables.$hermes-forms-input-line-height;
37
37
 
38
38
  @include forms-mixins.field-focus-ring();
39
39
 
@@ -26,6 +26,11 @@ $hermes-forms-placeholder-color: var(--hermes-forms-placeholder-color) !default;
26
26
  $hermes-forms-border-color: var(--hermes-forms-border-color) !default;
27
27
  $hermes-forms-focused-color: var(--hermes-forms-focused-color) !default;
28
28
  $hermes-forms-icon-color: #{tokens.$hermes-alias-object-interaction-color} !default;
29
+ $hermes-forms-field-border-color: var(--hermes-forms-field-border-color) !default;
30
+ $hermes-forms-field-disabled-background-color: var(--hermes-forms-field-disabled-background-color) !default;
31
+ $hermes-forms-focus-ring-width: var(--hermes-forms-focus-ring-width) !default;
32
+ $hermes-forms-focus-ring-offset: var(--hermes-forms-focus-ring-offset) !default;
33
+ $hermes-forms-field-transition-duration: var(--hermes-forms-field-transition-duration) !default;
29
34
  $hermes-forms-border-radius: var(--hermes-forms-border-radius) !default;
30
35
  $hermes-forms-background-color: var(--hermes-forms-background-color) !default;
31
36
  $hermes-forms-shadow: var(--hermes-forms-shadow) !default;
@@ -38,6 +43,7 @@ $hermes-forms-placeholder-disabled-color: var(--hermes-forms-placeholder-disable
38
43
 
39
44
  // Input
40
45
  $hermes-forms-input-padding: var(--hermes-forms-input-padding);
46
+ $hermes-forms-input-gap: var(--hermes-forms-input-gap);
41
47
  $hermes-forms-input-wrapper-height: var(--hermes-forms-input-wrapper-height);
42
48
  $hermes-forms-input-font-size: var(--hermes-forms-input-font-size);
43
49
  $hermes-forms-input-line-height: var(--hermes-forms-input-line-height);
@@ -5,6 +5,7 @@
5
5
  * The full license information can be found in LICENSE in the root directory of this project.
6
6
  */
7
7
 
8
+ @use 'sass:map';
8
9
  @use '../../styles/mixins';
9
10
  @use '../../styles/variables/variables';
10
11
  @use '../../styles/variables/variables.density' as density;
@@ -12,19 +13,34 @@
12
13
 
13
14
  @include mixins.exports('header.properties') {
14
15
  @include mixins.root-or-host() {
15
- --hermes-header-title-font-weight: #{tokens.$hermes-alias-typography-subsection-font-weight};
16
+ // The header is a brand band: dark in both modes, white text, and a translucent white veil
17
+ // (--hermes-header-highlight-color) for hover and for the search field. No token of the
18
+ // light palette works over the dark band, but a white veil follows any dark background.
19
+ --hermes-header-title-font-weight: #{tokens.$hermes-alias-typography-font-weight-bold};
16
20
  --hermes-header-title-font-family: #{variables.$hermes-font};
17
21
  --hermes-header-search-input-font-color: #{tokens.$hermes-global-color-white};
18
22
  --hermes-header-search-placeholder-font-weight: #{tokens.$hermes-alias-typography-font-weight-regular};
19
- --hermes-header-search-placeholder-text-color: #{tokens.$hermes-global-color-construction-400};
20
- --hermes-header-search-border-active: #{tokens.$hermes-alias-object-border-width-100} solid Highlight;
23
+ --hermes-header-search-placeholder-text-color: rgb(255 255 255 / 70%);
24
+ --hermes-header-search-bg-color: var(--hermes-header-highlight-color);
25
+ --hermes-header-search-border-color: var(--hermes-header-highlight-color);
26
+ --hermes-header-search-border-active: #{tokens.$hermes-alias-object-border-width-100} solid
27
+ #{tokens.$hermes-global-color-white};
21
28
  --hermes-header-search-border-hover: #{tokens.$hermes-alias-object-border-width-100} solid
22
- #{tokens.$hermes-global-color-construction-400};
29
+ #{tokens.$hermes-global-color-white};
23
30
  --hermes-header-divider-color: #{tokens.$hermes-global-color-construction-600};
24
31
  --hermes-header-2-bg-color: #{tokens.$hermes-global-color-construction-800};
25
32
  --hermes-header-3-bg-color: #{tokens.$hermes-global-color-azure-900};
26
- --hermes-header-font-color: #{tokens.$hermes-global-color-construction-100};
27
- --hermes-header-font-color-hover: #{tokens.$hermes-global-color-construction-50};
33
+ --hermes-header-font-color: #{tokens.$hermes-global-color-white};
34
+ --hermes-header-font-color-hover: #{tokens.$hermes-global-color-white};
35
+ --hermes-header-border-color: rgb(255 255 255 / 12%);
36
+ --hermes-header-highlight-color: rgb(255 255 255 / 12%);
37
+ --hermes-header-focus-color: var(--hermes-alias-primary);
38
+ --hermes-header-control-radius: #{mixins.baselinePx(6)};
39
+ --hermes-header-transition: 240ms cubic-bezier(0.4, 0, 0.2, 1);
40
+ --hermes-header-gap: #{tokens.$hermes-global-space-9};
41
+ --hermes-header-padding-start: #{tokens.$hermes-global-space-7};
42
+ --hermes-header-padding-end: #{tokens.$hermes-global-space-9};
43
+ --hermes-header-control-size: #{tokens.$hermes-global-space-10};
28
44
 
29
45
  &,
30
46
  & [hermes-density] {
@@ -51,5 +67,27 @@
51
67
  var(--hermes-alias-primary) 30%
52
68
  );
53
69
  }
70
+
71
+ // Dark mode: the band stays the deepest step of the page, below the app background
72
+ // (construction-1000 + 20% primary) and the sidenav (construction-1100 + 10% primary) —
73
+ // otherwise it would read as lighter than what it sits over. Measured: at 15% the band came
74
+ // out lighter than the sidenav. Declared after the rule above, which has the same specificity.
75
+ & [hermes-theme~='dark'] {
76
+ --hermes-header-bg-color: color-mix(
77
+ in oklch,
78
+ #{tokens.$hermes-global-color-construction-1100},
79
+ var(--hermes-alias-primary) 4%
80
+ );
81
+ }
82
+ }
83
+
84
+ // Small screens: side padding and the gap between blocks shrink, since every pixel here is
85
+ // width taken from the content. The bar keeps its height.
86
+ @media screen and (max-width: map.get(variables.$hermes-grid-breakpoints, md)) {
87
+ @include mixins.root-or-host() {
88
+ --hermes-header-gap: #{tokens.$hermes-global-space-5};
89
+ --hermes-header-padding-start: #{tokens.$hermes-global-space-7};
90
+ --hermes-header-padding-end: #{tokens.$hermes-global-space-7};
91
+ }
54
92
  }
55
93
  }
@@ -30,3 +30,14 @@ $hermes-header-search-input-font-color: var(--hermes-header-search-input-font-co
30
30
  $hermes-header-search-placeholder-text-color: var(--hermes-header-search-placeholder-text-color) !default;
31
31
  $hermes-header-search-border-active: var(--hermes-header-search-border-active) !default;
32
32
  $hermes-header-search-border-hover: var(--hermes-header-search-border-hover) !default;
33
+ $hermes-header-search-bg-color: var(--hermes-header-search-bg-color) !default;
34
+ $hermes-header-search-border-color: var(--hermes-header-search-border-color) !default;
35
+ $hermes-header-border-color: var(--hermes-header-border-color) !default;
36
+ $hermes-header-highlight-color: var(--hermes-header-highlight-color) !default;
37
+ $hermes-header-focus-color: var(--hermes-header-focus-color) !default;
38
+ $hermes-header-gap: var(--hermes-header-gap) !default;
39
+ $hermes-header-padding-start: var(--hermes-header-padding-start) !default;
40
+ $hermes-header-padding-end: var(--hermes-header-padding-end) !default;
41
+ $hermes-header-control-size: var(--hermes-header-control-size) !default;
42
+ $hermes-header-control-radius: var(--hermes-header-control-radius) !default;
43
+ $hermes-header-transition: var(--hermes-header-transition) !default;
@@ -9,6 +9,7 @@
9
9
  @use 'sass:meta';
10
10
  @use '../../styles/mixins';
11
11
  @use '../../styles/variables/variables';
12
+ @use '../../styles/core/tokens/variables.tokens' as tokens;
12
13
  @use '../main-container/variables.header' as header-variables;
13
14
  @use 'mixins.header' as header-mixins;
14
15
 
@@ -18,10 +19,23 @@
18
19
  header,
19
20
  .header {
20
21
  display: flex;
22
+ align-items: center;
23
+ // The gap is the distance between the bar's blocks (brand, nav, actions), and its side
24
+ // padding is the screen margin. Both shrink on small screens (see the properties file).
25
+ gap: header-variables.$hermes-header-gap;
26
+ padding: 0 header-variables.$hermes-header-padding-end 0 header-variables.$hermes-header-padding-start;
21
27
  color: header-variables.$hermes-header-font-color;
22
28
  background-color: header-variables.$hermes-header-bg-color;
23
29
  height: header-variables.$hermes-header-height;
24
30
  white-space: nowrap;
31
+ // The bottom edge separates the band from the content below: in dark mode the two are close
32
+ // in tone, and the line is what gives the edge. Fixed in light mode too, at no cost.
33
+ border-block-end: tokens.$hermes-alias-object-border-width-100 solid header-variables.$hermes-header-border-color;
34
+
35
+ // Only shown, and only takes up room, while a sliding nav is open (see responsive-nav).
36
+ .header-backdrop {
37
+ display: none;
38
+ }
25
39
 
26
40
  @include header-mixins.header-backgrounds();
27
41
  @include header-mixins.header-branding();