@deephaven/components 0.55.1-beta.13 → 0.55.1-beta.16

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 (93) hide show
  1. package/css/BaseStyleSheet.css +837 -3627
  2. package/css/BaseStyleSheet.css.map +1 -1
  3. package/dist/AutoCompleteInput.css +4 -4
  4. package/dist/AutoCompleteInput.css.map +1 -1
  5. package/dist/ComboBox.css +7 -7
  6. package/dist/ComboBox.css.map +1 -1
  7. package/dist/CustomTimeSelect.css +9 -9
  8. package/dist/CustomTimeSelect.css.map +1 -1
  9. package/dist/DraggableItemList.css +14 -14
  10. package/dist/DraggableItemList.css.map +1 -1
  11. package/dist/HierarchicalCheckboxMenu.css +20 -6
  12. package/dist/HierarchicalCheckboxMenu.css.map +1 -1
  13. package/dist/HierarchicalCheckboxMenu.d.ts.map +1 -1
  14. package/dist/HierarchicalCheckboxMenu.js +2 -4
  15. package/dist/HierarchicalCheckboxMenu.js.map +1 -1
  16. package/dist/ItemList.css +1 -1
  17. package/dist/ItemList.css.map +1 -1
  18. package/dist/ItemListItem.css +7 -7
  19. package/dist/ItemListItem.css.map +1 -1
  20. package/dist/LoadingOverlay.css +1 -1
  21. package/dist/LoadingOverlay.css.map +1 -1
  22. package/dist/MaskedInput.css.map +1 -1
  23. package/dist/RandomAreaPlotAnimation.d.ts +1 -1
  24. package/dist/RandomAreaPlotAnimation.d.ts.map +1 -1
  25. package/dist/RandomAreaPlotAnimation.js +49 -13
  26. package/dist/RandomAreaPlotAnimation.js.map +1 -1
  27. package/dist/SearchInput.css +3 -3
  28. package/dist/SearchInput.css.map +1 -1
  29. package/dist/SelectValueList.css +3 -3
  30. package/dist/SelectValueList.css.map +1 -1
  31. package/dist/SocketedButton.css +33 -33
  32. package/dist/SocketedButton.css.map +1 -1
  33. package/dist/ThemeExport.module.css +33 -33
  34. package/dist/ThemeExport.module.css.map +1 -1
  35. package/dist/TimeSlider.css +10 -10
  36. package/dist/TimeSlider.css.map +1 -1
  37. package/dist/TimeSlider.module.css +10 -10
  38. package/dist/TimeSlider.module.css.map +1 -1
  39. package/dist/ToastNotification.css +4 -4
  40. package/dist/ToastNotification.css.map +1 -1
  41. package/dist/UISwitch.css +19 -19
  42. package/dist/UISwitch.css.map +1 -1
  43. package/dist/ValidateLabelInput.css +1 -1
  44. package/dist/ValidateLabelInput.css.map +1 -1
  45. package/dist/context-actions/ContextActions.css +19 -19
  46. package/dist/context-actions/ContextActions.css.map +1 -1
  47. package/dist/menu-actions/DropdownMenu.css +2 -2
  48. package/dist/menu-actions/DropdownMenu.css.map +1 -1
  49. package/dist/navigation/MenuItem.css +9 -9
  50. package/dist/navigation/MenuItem.css.map +1 -1
  51. package/dist/navigation/Page.css.map +1 -1
  52. package/dist/navigation/Stack.css +2 -2
  53. package/dist/navigation/Stack.css.map +1 -1
  54. package/dist/popper/Popper.css +4 -4
  55. package/dist/popper/Popper.css.map +1 -1
  56. package/dist/theme/SpectrumThemeProvider.d.ts.map +1 -1
  57. package/dist/theme/SpectrumThemeProvider.js +1 -0
  58. package/dist/theme/SpectrumThemeProvider.js.map +1 -1
  59. package/dist/theme/ThemeModel.d.ts +1 -1
  60. package/dist/theme/ThemeModel.d.ts.map +1 -1
  61. package/dist/theme/ThemeModel.js +56 -7
  62. package/dist/theme/ThemeModel.js.map +1 -1
  63. package/dist/theme/ThemeUtils.d.ts +5 -3
  64. package/dist/theme/ThemeUtils.d.ts.map +1 -1
  65. package/dist/theme/ThemeUtils.js +6 -3
  66. package/dist/theme/ThemeUtils.js.map +1 -1
  67. package/dist/theme/theme-dark/theme-dark-components.css +1 -1
  68. package/dist/theme/theme-dark/theme-dark-components.css.map +1 -1
  69. package/dist/theme/theme-dark/theme-dark-palette.css +1 -1
  70. package/dist/theme/theme-dark/theme-dark-palette.css.map +1 -1
  71. package/dist/theme/theme-dark/theme-dark-semantic-chart.css +1 -1
  72. package/dist/theme/theme-dark/theme-dark-semantic-chart.css.map +1 -1
  73. package/dist/theme/theme-dark/theme-dark-semantic-editor.css +1 -1
  74. package/dist/theme/theme-dark/theme-dark-semantic-editor.css.map +1 -1
  75. package/dist/theme/theme-dark/theme-dark-semantic-grid.css +1 -1
  76. package/dist/theme/theme-dark/theme-dark-semantic-grid.css.map +1 -1
  77. package/dist/theme/theme-dark/theme-dark-semantic.css +1 -1
  78. package/dist/theme/theme-dark/theme-dark-semantic.css.map +1 -1
  79. package/dist/theme/theme-light/theme-light-palette.css +1 -1
  80. package/dist/theme/theme-light/theme-light-palette.css.map +1 -1
  81. package/dist/theme/theme-spectrum/theme-spectrum-alias.module.css +1 -1
  82. package/dist/theme/theme-spectrum/theme-spectrum-alias.module.css.map +1 -1
  83. package/package.json +7 -7
  84. package/scss/BaseStyleSheet.scss +68 -60
  85. package/scss/bootstrap_imports.scss +49 -0
  86. package/scss/bootstrap_override_functions.scss +31 -0
  87. package/scss/bootstrap_override_mixins_background_variant.scss +16 -0
  88. package/scss/bootstrap_override_mixins_buttons.scss +123 -0
  89. package/scss/bootstrap_override_mixins_forms.scss +231 -0
  90. package/scss/bootstrap_override_mixins_text_emphasis.scss +21 -0
  91. package/scss/bootstrap_overrides.scss +144 -101
  92. package/scss/new_variables.scss +18 -0
  93. package/scss/util.scss +2 -2
@@ -0,0 +1,231 @@
1
+ /* stylelint-disable scss/comment-no-empty */
2
+ // Bootstrap mixin overrides for `bootstrap/scss/mixins/_forms.scss`
3
+
4
+ // Form control focus state
5
+ //
6
+ // Generate a customized focus state and for any input with the specified color,
7
+ // which defaults to the `$input-focus-border-color` variable.
8
+ //
9
+ // We highly encourage you to not customize the default value, but instead use
10
+ // this to tweak colors on an as-needed basis. This aesthetic change is based on
11
+ // WebKit's default styles, but applicable to a wider range of browsers. Its
12
+ // usability and accessibility should be taken into account with any change.
13
+ //
14
+ // Example usage: change the default blue border and shadow to white for better
15
+ // contrast against a dark gray background.
16
+ @mixin form-control-focus($ignore-warning: false) {
17
+ &:focus {
18
+ color: $input-focus-color;
19
+ background-color: $input-focus-bg;
20
+ border-color: $input-focus-border-color;
21
+ outline: 0;
22
+ @if $enable-shadows {
23
+ @include box-shadow($input-box-shadow, $input-focus-box-shadow);
24
+ } @else {
25
+ // Avoid using mixin so we can pass custom focus shadow properly
26
+ box-shadow: $input-focus-box-shadow;
27
+ }
28
+ }
29
+ @include deprecate(
30
+ 'The `form-control-focus()` mixin',
31
+ 'v4.4.0',
32
+ 'v5',
33
+ $ignore-warning
34
+ );
35
+ }
36
+
37
+ // This mixin overrides the one in `bootstrap/scss/mixins/_forms.scss`
38
+ // It's primary purpose is to convert the input color value into a dh css
39
+ // variable expression. There are a few additional tweaks annotated with
40
+ // `DH Customization:`
41
+ @mixin form-validation-state($state, $semantic-value, $icon) {
42
+ // DH Customization: Convert semantic value to css variable
43
+ $color: var(--dh-color-visual-#{$semantic-value});
44
+
45
+ .#{$state}-feedback {
46
+ display: none;
47
+ width: 100%;
48
+ margin-top: $form-feedback-margin-top;
49
+ @include font-size($form-feedback-font-size);
50
+
51
+ color: $color;
52
+ }
53
+
54
+ .#{$state}-tooltip {
55
+ position: absolute;
56
+ top: 100%;
57
+ left: 0;
58
+ z-index: 5;
59
+ display: none;
60
+ max-width: 100%; // Contain to parent when possible
61
+ padding: $form-feedback-tooltip-padding-y $form-feedback-tooltip-padding-x;
62
+ margin-top: 0.1rem;
63
+ @include font-size($form-feedback-tooltip-font-size);
64
+
65
+ line-height: $form-feedback-tooltip-line-height;
66
+ color: color-yiq($semantic-value);
67
+ background-color: $color;
68
+ @include border-radius($form-feedback-tooltip-border-radius);
69
+
70
+ // See https://github.com/twbs/bootstrap/pull/31557
71
+ // Align tooltip to form elements
72
+ .form-row > .col > &,
73
+ .form-row > [class*='col-'] > & {
74
+ left: $form-grid-gutter-width * 0.5;
75
+ }
76
+ }
77
+
78
+ @include form-validation-state-selector($state) {
79
+ ~ .#{$state}-feedback,
80
+ ~ .#{$state}-tooltip {
81
+ display: block;
82
+ }
83
+ }
84
+
85
+ .form-control {
86
+ @include form-validation-state-selector($state) {
87
+ border-color: $color;
88
+
89
+ @if $enable-validation-icons {
90
+ padding-right: $input-height-inner !important; // stylelint-disable-line declaration-no-important
91
+ background-image: escape-svg($icon);
92
+ background-repeat: no-repeat;
93
+ background-position: right $input-height-inner-quarter center;
94
+ background-size: $input-height-inner-half $input-height-inner-half;
95
+ }
96
+
97
+ &:focus {
98
+ border-color: $color;
99
+ }
100
+
101
+ // DH Customization: Moved box-shadow from :focus to :focus-visible and
102
+ // changed to $input-focus-box-shadow
103
+ &:focus-visible {
104
+ box-shadow: $input-focus-box-shadow;
105
+ }
106
+ }
107
+ }
108
+
109
+ // stylelint-disable-next-line selector-no-qualifying-type
110
+ select.form-control {
111
+ @include form-validation-state-selector($state) {
112
+ @if $enable-validation-icons {
113
+ padding-right: $input-padding-x *
114
+ 4 !important; // stylelint-disable-line declaration-no-important
115
+
116
+ background-position: right $input-padding-x * 2 center;
117
+ }
118
+ }
119
+ }
120
+
121
+ // stylelint-disable-next-line selector-no-qualifying-type
122
+ textarea.form-control {
123
+ @include form-validation-state-selector($state) {
124
+ @if $enable-validation-icons {
125
+ padding-right: $input-height-inner;
126
+ background-position: top
127
+ $input-height-inner-quarter
128
+ right
129
+ $input-height-inner-quarter;
130
+ }
131
+ }
132
+ }
133
+
134
+ .custom-select {
135
+ @include form-validation-state-selector($state) {
136
+ border-color: $color;
137
+
138
+ @if $enable-validation-icons {
139
+ padding-right: $custom-select-feedback-icon-padding-right !important; // stylelint-disable-line declaration-no-important
140
+ background:
141
+ $custom-select-background,
142
+ $custom-select-bg
143
+ escape-svg($icon)
144
+ $custom-select-feedback-icon-position /
145
+ $custom-select-feedback-icon-size
146
+ no-repeat;
147
+ }
148
+
149
+ &:focus {
150
+ border-color: $color;
151
+ }
152
+
153
+ // DH Customization: Moved box-shadow from :focus to :focus-visible and
154
+ // changed to $input-focus-box-shadow
155
+ &:focus-visible {
156
+ box-shadow: $input-focus-box-shadow;
157
+ }
158
+ }
159
+ }
160
+
161
+ .form-check-input {
162
+ @include form-validation-state-selector($state) {
163
+ ~ .form-check-label {
164
+ color: $color;
165
+ }
166
+
167
+ ~ .#{$state}-feedback,
168
+ ~ .#{$state}-tooltip {
169
+ display: block;
170
+ }
171
+ }
172
+ }
173
+
174
+ .custom-control-input {
175
+ @include form-validation-state-selector($state) {
176
+ ~ .custom-control-label {
177
+ color: $color;
178
+
179
+ &::before {
180
+ border-color: $color;
181
+ }
182
+ }
183
+
184
+ &:checked {
185
+ // DH Customization: Changed from lighten($color, 10%) to $color
186
+ ~ .custom-control-label::before {
187
+ border-color: $color;
188
+ @include gradient-bg($color);
189
+ }
190
+ }
191
+
192
+ // DH Customization: Moved box-shadow from :focus to :focus-visible and
193
+ // changed to $input-focus-box-shadow.
194
+ &:focus-visible {
195
+ ~ .custom-control-label::before {
196
+ box-shadow: $input-focus-box-shadow;
197
+ }
198
+ }
199
+
200
+ &:focus {
201
+ &:not(:checked) ~ .custom-control-label::before {
202
+ border-color: $color;
203
+ }
204
+ }
205
+ }
206
+ }
207
+
208
+ // custom file
209
+ .custom-file-input {
210
+ @include form-validation-state-selector($state) {
211
+ ~ .custom-file-label {
212
+ border-color: $color;
213
+ }
214
+
215
+ &:focus {
216
+ ~ .custom-file-label {
217
+ border-color: $color;
218
+ // DH Customization: Removed box-shadow
219
+ // box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
220
+ }
221
+ }
222
+
223
+ // DH Customization: Added rule
224
+ &:focus-visible {
225
+ ~ .custom-file-label {
226
+ box-shadow: $input-focus-box-shadow;
227
+ }
228
+ }
229
+ }
230
+ }
231
+ }
@@ -0,0 +1,21 @@
1
+ // Bootstrap mixin overrides for `bootstrap/scss/mixins/_text-emphasis.scss`
2
+
3
+ @mixin text-emphasis-variant($parent, $semantic-value, $ignore-warning: false) {
4
+ #{$parent} {
5
+ // if $semantic-value = primary then use accent-700
6
+ @if $semantic-value == 'accent' {
7
+ color: var(--spectrum-#{$semantic-value}-color-700) !important;
8
+ } @else {
9
+ color: var(--spectrum-#{$semantic-value}-visual-color) !important;
10
+ }
11
+ }
12
+ @if $emphasized-link-hover-darken-percentage != 0 {
13
+ a#{$parent} {
14
+ @include hover-focus {
15
+ color: var(
16
+ --spectrum-#{$semantic-value}-background-color-default
17
+ ) !important;
18
+ }
19
+ }
20
+ }
21
+ }
@@ -1,50 +1,88 @@
1
1
  // Styling overrides for bootstrap
2
+ @use 'sass:map';
2
3
 
3
4
  // Override / set color variables
4
- $red: #f95d84;
5
- $orange: #f37e3f;
6
- $yellow: #fcd65b;
7
- $green: #9edc6f;
8
- $blue: #76d9e4;
9
- $purple: #aa9af4;
5
+ $red: var(--dh-color-visual-red);
6
+ $orange: var(--dh-color-visual-orange);
7
+ $yellow: var(--dh-color-visual-yellow);
8
+ $green: var(--dh-color-visual-green);
9
+ $blue: var(--dh-color-visual-blue);
10
+ $purple: var(--dh-color-visual-purple);
11
+
12
+ //Define our Gray scale
13
+ $gray-100: var(--dh-color-gray-900, #fcfcfa);
14
+ $gray-200: var(--dh-color-gray-800);
15
+ $gray-300: var(--dh-color-gray-700);
16
+ $gray-400: var(--dh-color-gray-600);
17
+ $gray-500: var(--dh-color-gray-500);
18
+ // intentional duplicate, scale doesn't line up otherwise
19
+ // as we have gray-850 and spectrum doesn't and it is needed
20
+ $gray-600: var(--dh-color-gray-500);
21
+ $gray-700: var(--dh-color-gray-400);
22
+ $gray-800: var(--dh-color-gray-300);
23
+ $gray-850: var(--dh-color-gray-200);
24
+ $gray-900: var(--dh-color-gray-75);
25
+ $black: var(--dh-color-black, #1a171a);
26
+ $white: var(--dh-color-white, #f0f0ee);
10
27
 
11
28
  //Define some UI colors
12
- $interfacegray: #2d2a2e;
13
- $interfaceblue: #4878ea;
14
- $interfacewhite: #f0f0ee; //same as gray-200
15
- $interfaceblack: #1a171a;
29
+ $interfacegray: var(--dh-color-content-bg, #2d2a2e);
30
+ $interfaceblue: var(--dh-color-accent-bg);
31
+ $interfacewhite: $white;
32
+ $interfaceblack: $black;
33
+ $content-bg: var(--dh-color-content-bg, #2d2a2e);
34
+ $background: var(--dh-color-bg);
35
+ $foreground: var(--dh-color-fg);
16
36
 
17
- //Define our Gray scale
18
- $white: $interfacewhite;
19
- $gray-100: #fcfcfa;
20
- $gray-200: $interfacewhite;
21
- $gray-300: #c0bfbf;
22
- $gray-400: #929192;
23
- $gray-500: #5b5a5c;
24
- $gray-600: #555356;
25
- $gray-700: #403e41;
26
- $gray-800: #373438;
27
- $gray-850: #322f33;
28
- $gray-900: #211f22;
29
- $black: $interfaceblack;
30
- $content-bg: $interfacegray;
31
- $background: $interfaceblack;
32
- $foreground: $interfacewhite;
33
-
34
- //Load colors into map
35
- $colors: ();
36
- $colors: map-merge(
37
- (
38
- 'red': $red,
39
- 'orange': $orange,
40
- 'yellow': $yellow,
41
- 'green': $green,
42
- 'blue': $blue,
43
- 'purple': $purple,
44
- 'white': $white,
45
- 'black': $black,
46
- ),
47
- $colors
37
+ // Extend default Bootstrap $grays map
38
+ $grays-custom: (
39
+ '850': $gray-850,
40
+ );
41
+ $grays: () !default;
42
+ $grays: map-merge($grays, $grays-custom);
43
+
44
+ // Extend default Bootstrap $colors map
45
+ $colors-custom: (
46
+ 'black': $black,
47
+ );
48
+ $colors: () !default;
49
+ $colors: map-merge($colors, $colors-custom);
50
+
51
+ // Override default Bootstrap $theme-colors map by mapping each key to itself.
52
+ // These will then be re-mapped inside of `button-outline-variant` and
53
+ // `button-outline-variant` mixins in `bootstrap_override_mixins_buttons.scss`
54
+ $theme-colors-self-map: ();
55
+ @each $key
56
+ in (
57
+ 'primary',
58
+ 'secondary',
59
+ 'success',
60
+ 'info',
61
+ 'warning',
62
+ 'danger',
63
+ 'light',
64
+ 'dark'
65
+ )
66
+ {
67
+ $theme-colors-self-map: map.set($theme-colors-self-map, $key, $key);
68
+ }
69
+ $theme-colors: () !default;
70
+ $theme-colors: map-merge($theme-colors, $theme-colors-self-map);
71
+
72
+ // Used by bootstrap_override_mixins_buttons.scss to map Bootstrap colors to
73
+ // DH semantic colors
74
+ $bootstrap-dh-semantic-map: (
75
+ 'primary': 'accent',
76
+ 'secondary': 'neutral',
77
+ 'success': 'positive',
78
+ 'info': 'info',
79
+ 'warning': 'notice',
80
+ 'danger': 'negative',
81
+ // We shouldn't be using these, but mapping so they work with our custom
82
+ // `color-yiq` mixin. If we find a way to remove $light + $dark that are
83
+ // defined in Bootstrap _variables.scss, we should remove these
84
+ 'light': 'neutral',
85
+ 'dark': 'neutral',
48
86
  );
49
87
 
50
88
  //Set default colors
@@ -52,42 +90,36 @@ $body-bg: $black;
52
90
  $body-color: $interfacewhite;
53
91
 
54
92
  // Set brand colors
55
- $primary: $interfaceblue;
56
- $primary-hover: darken($primary, 8%);
57
- $primary-dark: mix($primary, $content-bg, 25%);
58
- $primary-light: scale-color($primary, $lightness: -25%);
59
- $secondary: $gray-500;
60
- $secondary-hover: darken($secondary, 8%);
93
+ $primary: var(--dh-color-accent-bg);
94
+ $primary-hover: var(--dh-color-accent-hover-bg);
95
+ $primary-dark: var(--dh-color-accent-down-bg);
96
+ $primary-light: var(--dh-color-accent-1100);
97
+ $secondary: var(--dh-color-neutral-bg);
98
+ $secondary-hover: var(--dh-color-neutral-hover-bg);
61
99
  $success: $green;
62
100
  $info: $yellow;
63
101
  $warning: $orange;
64
- $danger: $red;
65
- $danger-hover: darken($danger, 8%);
66
- $light: $gray-100;
67
- $mid: $gray-400; //Added a mid color, useful for input styling
68
- $dark: $gray-800;
69
- $green-dark: scale-color($green, $lightness: -45%, $saturation: -10%);
102
+ $danger: var(--dh-color-negative-bg);
103
+ $danger-hover: var(--dh-color-negative-hover-bg);
104
+ // We really don't want to use $light or $dark variables, but Bootstrap defines
105
+ // them in _variables.scss. Explicitly setting them to ensure we are in control
106
+ // of their values. If we can find a way to remove them, we should
107
+ $light: var(--dh-color-gray-light);
108
+ $dark: var(--dh-color-gray-dark);
109
+ // Bootstrap doesn't define $mid, and we want to move away from this particular
110
+ // semantic. Should be deleted by #1635
111
+ $mid: var(--dh-color-gray-mid);
70
112
 
71
- $theme-colors: () !default;
72
- $theme-colors: map-merge(
73
- (
74
- 'primary': $primary,
75
- 'primary-hover': $primary-hover,
76
- 'primary-light': $primary-light,
77
- 'primary-dark': $primary-dark,
78
- 'secondary': $secondary,
79
- 'success': $success,
80
- 'info': $info,
81
- 'warning': $warning,
82
- 'danger': $danger,
83
- 'light': $light,
84
- 'dark': $dark,
85
- 'mid': $mid,
86
- 'content-bg': $interfacegray,
87
- 'background': $interfaceblack,
88
- 'foreground': $interfacewhite,
89
- ),
90
- $theme-colors
113
+ $semantic-colors: (
114
+ 'primary-hover': $primary-hover,
115
+ 'primary-light': $primary-light,
116
+ 'primary-dark': $primary-dark,
117
+ 'mid': $mid,
118
+ 'content-bg': $interfacegray,
119
+ 'background': $interfaceblack,
120
+ 'foreground': $interfacewhite,
121
+ 'secondary-hover': $secondary-hover,
122
+ 'danger-hover': $danger-hover,
91
123
  );
92
124
 
93
125
  $component-active-bg: $primary;
@@ -114,21 +146,15 @@ $headings-font-weight: 400;
114
146
  $text-muted: $gray-400;
115
147
 
116
148
  //Style Selection highlight color
117
- //so browsers add alpha to your color by default, ignoring opacity 1
118
- //by setting rgba with 0.99 it tricks browser into thinking there is alpha applied
119
- $text-select-color: $primary-hover;
120
- $text-select-color-editor: lighten(
121
- $gray-700,
122
- 15%
123
- ); //we lighten it abit to account for that 0.01 loss, and because it needs some anyways.
149
+ $text-select-color: var(--dh-color-text-highlight);
124
150
 
125
151
  //Grid variables, same value as default just making easily accessible
126
152
  $grid-gutter-width: 30px;
127
153
 
128
154
  //Visual Overrides
129
155
  $border-radius: 4px;
130
- $box-shadow: 0 0.1rem 1rem rgba($black, 45%); //because our UI is so dark, we need darker default shadows
131
- $box-shadow-900: 0 0.1rem 1rem rgba(0, 0, 0, 45%); //darkest shadow for $black popups over $black UI
156
+ $box-shadow: 0 0.1rem 1rem hsla(var(--dh-color-black-hsl), 0.45); //because our UI is so dark, we need darker default shadows
157
+ $box-shadow-900: 0 0.1rem 1rem hsla(var(--dh-color-true-black-hsl), 0.45); //darkest shadow for $black popups over $black UI
132
158
 
133
159
  //Override Btn
134
160
  $btn-border-radius: 4rem;
@@ -141,26 +167,31 @@ $btn-transition:
141
167
  $btn-border-width: 2px;
142
168
 
143
169
  //Override Inputs
144
- $input-bg: $gray-600;
145
- $input-disabled-bg: $gray-800;
146
- $input-color: $foreground;
147
- $input-border-color: $gray-400;
148
- $input-placeholder-color: $gray-400;
149
- $input-focus-border-color: rgba($primary, 85%);
170
+ $input-bg: var(--dh-color-input-bg);
171
+ $input-disabled-bg: var(--dh-color-input-disabled-bg);
172
+ $input-color: var(--dh-color-input-fg);
173
+ $input-border-color: var(--dh-color-input-border);
174
+ $input-placeholder-color: var(--dh-color-input-placeholder);
175
+ $input-focus-border-color: var(--dh-color-input-focus-border);
150
176
 
151
177
  $input-btn-focus-width: 0.2rem;
152
- $input-btn-focus-color: rgba($component-active-bg, 35%);
178
+ $input-btn-focus-color: hsla(var(--dh-color-accent-hsl), 0.35);
153
179
  $input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;
154
180
 
155
181
  //checkbox
156
182
  $custom-control-indicator-bg: $gray-600;
183
+ $custom-control-indicator-active-bg: var(--dh-color-accent-1100);
157
184
  $custom-control-indicator-bg-size: 75% 75%;
158
185
  $custom-control-indicator-disabled-bg: $gray-800;
159
186
  $custom-control-indicator-checked-disabled-bg: $gray-800;
160
187
  $custom-control-label-disabled-color: $gray-400;
161
188
 
162
- //Custom Select
163
- $custom-select-indicator-color: $gray-400;
189
+ // The $custom-select-indicator variable is used by Bootstrap to provide the
190
+ // icon for the select dropdown. Inline svgs can't use CSS variables, so we hard
191
+ // code the color to #929192 (the default value of --dh-color-gray-600). PR #1651
192
+ // overrides this icon altogether for known dropdowns, so technically we may not
193
+ // need this, but it's here in case there are any remaining instances.
194
+ $custom-select-indicator-color: #929192;
164
195
  $custom-select-bg-size: 16px 16px;
165
196
  //dhSort icon encoded
166
197
  $custom-select-indicator: str-replace(
@@ -169,7 +200,7 @@ $custom-select-indicator: str-replace(
169
200
  '%23'
170
201
  );
171
202
  $custom-select-focus-box-shadow: $input-btn-focus-box-shadow;
172
- $custom-select-disabled-color: darken($gray-400, 5%);
203
+ $custom-select-disabled-color: $gray-500;
173
204
  $custom-select-disabled-bg: $gray-800;
174
205
 
175
206
  //modal
@@ -178,15 +209,15 @@ $modal-content-border-width: 0;
178
209
  $modal-md: 550px;
179
210
 
180
211
  // Toast notification
181
- $toast-bg: $primary-dark;
182
- $toast-color: $foreground;
183
- $toast-error-bg: mix($danger, $content-bg, 15%);
184
- $toast-error-color: $foreground;
212
+ $toast-bg: var(--dh-color-accent-100);
213
+ $toast-color: var(--dh-color-text);
214
+ $toast-error-bg: var(--dh-color-negative-bg);
215
+ $toast-error-color: var(--dh-color-text);
185
216
 
186
217
  //tooltips
187
- $tooltip-bg: $gray-700;
188
- $tooltip-color: $foreground;
189
- $tooltip-box-shadow: 0 0.1rem 1.5rem 0.1rem rgba($black, 80%);
218
+ $tooltip-bg: var(--dh-color-tooltip-bg);
219
+ $tooltip-color: var(--dh-color-tooltip-fg);
220
+ $tooltip-box-shadow: 0 0.1rem 1.5rem 0.1rem var(--dh-color-tooltip-box-shadow);
190
221
 
191
222
  //drowdowns
192
223
  $dropdown-bg: $gray-600;
@@ -199,7 +230,7 @@ $dropdown-divider-bg: $gray-700;
199
230
  $contextmenu-bg: $gray-600;
200
231
  $contextmenu-color: $foreground;
201
232
  $contextmenu-disabled-color: $text-muted;
202
- $contextmenu-keyboard-selected-bg: rgba($primary, 50%);
233
+ $contextmenu-keyboard-selected-bg: hsla(var(--dh-color-accent-hsl), 0.5);
203
234
  $contextmenu-selected-bg: $primary;
204
235
  $contextmenu-selected-color: $foreground;
205
236
 
@@ -223,9 +254,21 @@ $transition-long: 0.3s;
223
254
  $transition-slow: 0.6s;
224
255
 
225
256
  //form-validation icon, uses vsWarning icon encoded here as svg
226
- $form-feedback-icon-invalid-color: theme-color('danger');
257
+ $form-feedback-icon-invalid-color: $danger;
227
258
  $form-feedback-icon-invalid: str-replace(
228
259
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none'%3E%3Cg fill='#{$form-feedback-icon-invalid-color}'%3E%3Cpath d='M7.56 1h.88l6.54 12.26-.44.74H1.44L1 13.26 7.56 1zM8 2.28 2.28 13H13.7L8 2.28zM8.625 12v-1h-1.25v1h1.25zm-1.25-2V6h1.25v4h-1.25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E "),
229
260
  '#',
230
261
  '%23'
231
262
  );
263
+
264
+ // This section of variables is not consumed directly by DH, but they need to be
265
+ // defined for sass to compile _variables
266
+ $table-dark-bg: $gray-800;
267
+ $table-dark-accent-bg: var(--dh-color-highlight-hover);
268
+ $table-dark-hover-bg: var(--dh-color-highlight-active);
269
+ $table-dark-border-color: $gray-700;
270
+ $popover-bg: var(--dh-color-tooltip-bg);
271
+ $popover-border-color: var(--dh-color-overlay-modal-bg);
272
+ $popover-header-bg: #000;
273
+ $popover-arrow-outer-color: var(--dh-color-dropshadow);
274
+ $custom-range-thumb-active-bg: var(--dh-color-accent-1100);
@@ -1,3 +1,5 @@
1
+ @use 'sass:math';
2
+
1
3
  //Set of spacer variables from the spacer map
2
4
  $spacer-0: map-get($spacers, 0); //0
3
5
  $spacer-1: map-get($spacers, 1);
@@ -49,6 +51,22 @@ $ant-thickness: 1px;
49
51
  }
50
52
  }
51
53
 
54
+ @function hsla-opacity($semantic-name, $i: 100) {
55
+ @return hsla(var(--dh-color-#{$semantic-name}-hsl), math.div($i, 100));
56
+ }
57
+
58
+ @function accent-opacity($i: 100) {
59
+ @return hsla-opacity('accent', $i);
60
+ }
61
+
62
+ @function background-opacity($i: 100) {
63
+ @return hsla-opacity('bg', $i);
64
+ }
65
+
66
+ @function foreground-opacity($i: 100) {
67
+ @return hsla-opacity('fg', $i);
68
+ }
69
+
52
70
  $focus-bg-transparency: 0.12;
53
71
  $hover-bg-transparency: 0.14;
54
72
  $active-bg-transparency: 0.28;
package/scss/util.scss CHANGED
@@ -1,7 +1,7 @@
1
1
  // Setup a mask-image for an inline svg
2
2
  @mixin icon-image-mask($mask-image, $size: 16px) {
3
3
  background-size: $size;
4
- background-color: var(--dh-color-foreground);
4
+ background-color: var(--dh-color-fg);
5
5
  mask-image: $mask-image;
6
6
  mask-position: center center;
7
7
  mask-repeat: no-repeat;
@@ -52,4 +52,4 @@
52
52
  // where we need a solid background image layer.
53
53
  @function solid-gradient($color) {
54
54
  @return linear-gradient(0deg, $color, $color);
55
- }
55
+ }