Skip to content

Commit

Permalink
pass units
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmmcken committed Dec 21, 2023
1 parent 4115983 commit d021d9e
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 26 deletions.
29 changes: 15 additions & 14 deletions packages/components/scss/BaseStyleSheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ span.btn-disabled-wrapper {
&:disabled {
--dh-color-text-disabled: var(--dh-color-positive-contrast);
--dh-color-disabled-bg: var(--dh-color-positive-bg);

opacity: 0.5;
}
}
Expand Down Expand Up @@ -469,6 +470,20 @@ form label small {
}

//Select, Checkboxes and Radios
.custom-control-label {
user-select: none; //checkboxs are label pseudo elements, clicking can toggle text selection otherwise
}

.custom-control-input:disabled ~ .custom-control-label::before {
cursor: not-allowed;
}

.custom-checkbox
.custom-control-input:disabled
~ .custom-control-label::before {
cursor: not-allowed;
}

.custom-radio {
.custom-control-input:checked ~ .custom-control-label {
&::after {
Expand Down Expand Up @@ -506,20 +521,6 @@ form label small {
}
}

.custom-control-label {
user-select: none; //checkboxs are label pseudo elements, clicking can toggle text selection otherwise
}

.custom-control-input:disabled ~ .custom-control-label::before {
cursor: not-allowed;
}

.custom-checkbox
.custom-control-input:disabled
~ .custom-control-label::before {
cursor: not-allowed;
}

.custom-select {
$caret-size: 10px 6px;
$error-size: 16px;
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/popper/Popper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $animation-offset: 10px;

.popper {
--background-color: var(--dh-color-popover-bg);

background: var(--background-color);
color: var(--dh-color-tooltip-fg);
border-radius: $border-radius;
Expand Down
12 changes: 12 additions & 0 deletions packages/components/src/theme/ThemeUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,18 @@ describe('getDefaultBaseThemes', () => {
'./theme-dark-components.css?raw',
].join('\n'),
},
{
name: 'Default Light',
themeKey: 'default-light',
styleContent: [
'./theme-light-palette.css?raw',
'./theme-light-semantic.css?raw',
'./theme-light-semantic-chart.css?raw',
'./theme-light-semantic-editor.css?raw',
'./theme-light-semantic-grid.css?raw',
'./theme-light-components.css?raw',
].join('\n'),
},
]);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ exports[`ThemeProvider setSelectedThemeKey: [ [Object] ] should change selected
<body>
<div>
<style
data-theme-key="default-dark"
data-theme-key="default-light"
>
./theme-dark-palette.css?raw
./theme-dark-semantic.css?raw
./theme-dark-semantic-chart.css?raw
./theme-dark-semantic-editor.css?raw
./theme-dark-semantic-grid.css?raw
./theme-dark-components.css?raw
./theme-light-palette.css?raw
./theme-light-semantic.css?raw
./theme-light-semantic-chart.css?raw
./theme-light-semantic-editor.css?raw
./theme-light-semantic-grid.css?raw
./theme-light-components.css?raw
</style>
<div
class="spectrum-theme-provider spectrum_b37d53 spectrum_2a241c spectrum--light_a40724 theme-spectrum-palette theme-spectrum-alias spectrum--large_c40598 spectrum_9e130c spectrum--medium_9e130c spectrum--large_9e130c spectrum--darkest_9e130c spectrum--dark_9e130c spectrum--light_9e130c spectrum--lightest_9e130c"
Expand Down
1 change: 1 addition & 0 deletions packages/console/src/ConsoleInput.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ $console-input-margin-color: $foreground;

.console-input-wrapper {
--console-input-bg: var(--dh-color-surface-bg);

background-color: var(--console-input-bg);
padding: $console-input-padding;
min-height: $console-input-min-height;
Expand Down
6 changes: 2 additions & 4 deletions packages/console/src/ConsoleStatusBar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { render, screen } from '@testing-library/react';
import dh from '@deephaven/jsapi-shim';
import { ContextActions, DropdownAction } from '@deephaven/components';
import { vsCheck } from '@deephaven/icons';
import userEvent, { TargetElement } from '@testing-library/user-event';
import userEvent from '@testing-library/user-event';
import ConsoleStatusBar from './ConsoleStatusBar';

jest.useFakeTimers();
Expand Down Expand Up @@ -51,9 +51,7 @@ it('dropdown menu disappears on toggle', async () => {
order: 10,
},
]);
const button = document.querySelector(
'.btn-overflow.btn-link-icon'
) as TargetElement;
const button = screen.getByLabelText('More Actions...');
await user.click(button);
let dropdown: HTMLElement | null = screen.getByText(title);
expect(dropdown).toBeTruthy();
Expand Down
2 changes: 1 addition & 1 deletion packages/iris-grid/src/IrisGridTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export function createDefaultIrisGridTheme(): Partial<IrisGridThemeType> {
reverseHeaderBarHeight: 4,
filterBarHorizontalPadding: 4,

shadowAlpha: parseFloat(IrisGridTheme['row-shadow-alpha']),
shadowAlpha: parseFloat(IrisGridTheme['row-shadow-alpha']) || 0.15,

// Amount of blur to apply to the bottom of the scrim while animating in
scrimBlurSize: 25,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ exports[`createDefaultIrisGridTheme should derive the default Iris grid theme 1`
"selectionColor": "IrisGridTheme['selection-color']",
"selectionOutlineCasingColor": "IrisGridTheme['selection-outline-casing-color']",
"selectionOutlineColor": "IrisGridTheme['selection-outline-color']",
"shadowAlpha": 0.15,
"sortHeaderBarHeight": 2,
"textColor": "IrisGridTheme['text-color']",
"treeLineColor": "IrisGridTheme['tree-line-color']",
Expand Down

0 comments on commit d021d9e

Please sign in to comment.