-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b3e2a7
commit f663ec4
Showing
9 changed files
with
651 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-web-components-542808a8-7f11-430c-8996-27ca4cc8714d.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "minor", | ||
"comment": "add data grid as a new web component", | ||
"packageName": "@fluentui/web-components", | ||
"email": "chhol@microsoft.com", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
packages/web-components/src/data-grid/data-grid-cell.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { css } from '@microsoft/fast-element'; | ||
import { SystemColors } from '@microsoft/fast-web-utilities'; | ||
import { focusVisible, forcedColorsStylesheetBehavior } from '@microsoft/fast-foundation'; | ||
import { neutralFocusBehavior, neutralForegroundActiveBehavior, neutralForegroundRestBehavior } from '../styles'; | ||
|
||
export const DataGridCellStyles = css` | ||
:host { | ||
padding: calc(var(--design-unit) * 1px) calc(var(--design-unit) * 3px); | ||
color: ${neutralForegroundRestBehavior.var}; | ||
box-sizing: border-box; | ||
font-family: var(--body-font); | ||
font-size: var(--type-ramp-base-font-size); | ||
line-height: var(--type-ramp-base-line-height); | ||
font-weight: 400; | ||
border: transparent calc(var(--outline-width) * 1px) solid; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
border-radius: calc(var(--corner-radius) * 1px); | ||
} | ||
:host(.column-header) { | ||
font-weight: 600; | ||
} | ||
:host(:${focusVisible}) { | ||
border: ${neutralFocusBehavior.var} calc(var(--outline-width) * 1px) solid; | ||
color: ${neutralForegroundActiveBehavior.var}; | ||
} | ||
`.withBehaviors( | ||
neutralFocusBehavior, | ||
neutralForegroundActiveBehavior, | ||
neutralForegroundRestBehavior, | ||
forcedColorsStylesheetBehavior( | ||
css` | ||
:host { | ||
forced-color-adjust: none; | ||
border-color: transparent; | ||
background: ${SystemColors.Field}; | ||
color: ${SystemColors.FieldText}; | ||
} | ||
:host(:${focusVisible}) { | ||
border-color: ${SystemColors.FieldText}; | ||
box-shadow: 0 0 0 2px inset ${SystemColors.Field}; | ||
color: ${SystemColors.FieldText}; | ||
} | ||
`, | ||
), | ||
); |
31 changes: 31 additions & 0 deletions
31
packages/web-components/src/data-grid/data-grid-row.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { css } from '@microsoft/fast-element'; | ||
import { forcedColorsStylesheetBehavior } from '@microsoft/fast-foundation'; | ||
import { neutralDividerRestBehavior, neutralFillRestBehavior } from '../styles'; | ||
|
||
export const DataGridRowStyles = css` | ||
:host { | ||
display: grid; | ||
padding: 1px 0; | ||
box-sizing: border-box; | ||
width: 100%; | ||
border-bottom: calc(var(--outline-width) * 1px) solid var(--neutral-divider-rest); | ||
} | ||
:host(.header) { | ||
} | ||
:host(.sticky-header) { | ||
background: ${neutralFillRestBehavior.var}; | ||
position: sticky; | ||
top: 0; | ||
} | ||
`.withBehaviors( | ||
neutralDividerRestBehavior, | ||
neutralFillRestBehavior, | ||
forcedColorsStylesheetBehavior( | ||
css` | ||
:host { | ||
} | ||
`, | ||
), | ||
); |
Oops, something went wrong.