-
Notifications
You must be signed in to change notification settings - Fork 394
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
9277284
commit ba71dbf
Showing
26 changed files
with
168 additions
and
129 deletions.
There are no files selected for viewing
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
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
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
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
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
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 |
---|---|---|
@@ -1,34 +1,51 @@ | ||
@import 'part:@sanity/base/theme/variables-style'; | ||
|
||
.root { | ||
display: flex; | ||
align-items: center; | ||
:root { | ||
--from-to-arrow-width: 25px; | ||
} | ||
|
||
.root { | ||
@nest &[data-from-to-layout='inline'] { | ||
display: inline-flex; | ||
max-width: 100%; | ||
} | ||
|
||
@nest &[data-from-to-layout='grid'] { | ||
/* display: grid; | ||
grid-template-columns: 1fr auto 1fr; */ | ||
display: grid; | ||
grid-template-columns: minmax(0, 1fr) var(--from-to-arrow-width) minmax(0, 1fr); | ||
} | ||
} | ||
|
||
.from, | ||
.to { | ||
max-width: calc(50% - 13px); | ||
|
||
@nest .root[data-from-to-layout='grid'] & { | ||
flex: 1; | ||
.column { | ||
@nest [data-from-to-layout='inline'] & { | ||
min-width: 0; | ||
flex-shrink: 1; | ||
flex-basis: 1; | ||
} | ||
} | ||
|
||
.arrow { | ||
padding: calc(var(--extra-small-padding) + 2px) var(--extra-small-padding); | ||
} | ||
|
||
.column, | ||
.arrow { | ||
display: flex; | ||
padding: 0 var(--extra-small-padding); | ||
align-items: center; | ||
font-size: var(--font-size-large); | ||
line-height: var(--line-height-large); | ||
color: var(--text-muted); | ||
|
||
@nest & > * { | ||
min-width: 0; | ||
min-height: 0; | ||
} | ||
|
||
@nest .root[data-from-to-align='top'] > & { | ||
align-items: flex-start; | ||
} | ||
|
||
@nest .root[data-from-to-align='center'] > & { | ||
align-items: center; | ||
} | ||
|
||
@nest .root[data-from-to-align='bottom'] > & { | ||
align-items: flex-end; | ||
} | ||
} |
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
10 changes: 10 additions & 0 deletions
10
packages/@sanity/field/src/diff/components/FromToArrow.css
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,10 @@ | ||
@import 'part:@sanity/base/theme/variables-style'; | ||
|
||
.root { | ||
color: var(--text-muted); | ||
|
||
@nest & > svg { | ||
display: block; | ||
font-size: calc(17 / 16 * 1rem); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
packages/@sanity/field/src/diff/components/FromToArrow.tsx
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,22 @@ | ||
import classNames from 'classnames' | ||
import React from 'react' | ||
|
||
import styles from './FromToArrow.css' | ||
|
||
export const FromToArrow = ({ | ||
className, | ||
...restProps | ||
}: Omit<React.HTMLProps<HTMLDivElement>, 'children'>) => ( | ||
<div {...restProps} className={classNames(styles.root, className)}> | ||
<svg | ||
width="1em" | ||
height="1em" | ||
viewBox="0 0 17 17" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path d="M4 8.5L12 8.5" stroke="currentColor" strokeWidth="1.2" /> | ||
<path d="M9 5.5L12 8.5L9 11.5" stroke="currentColor" strokeWidth="1.2" /> | ||
</svg> | ||
</div> | ||
) |
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
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
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
7 changes: 7 additions & 0 deletions
7
packages/@sanity/field/src/types/datetime/diff/DatetimeFieldDiff.css
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 @@ | ||
@import 'part:@sanity/base/theme/variables-style'; | ||
|
||
.card { | ||
display: inline-block; | ||
padding: calc(var(--small-padding) - 4px) var(--small-padding) calc(var(--small-padding) - 3px); | ||
word-break: break-all; | ||
} |
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
11 changes: 0 additions & 11 deletions
11
packages/@sanity/field/src/types/datetime/preview/DatetimePreview.css
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
} | ||
|
||
.annotation { | ||
align-self: stretch; | ||
border-radius: var(--border-radius-small); | ||
} | ||
|
||
|
Oops, something went wrong.