Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/guides/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,10 @@ type: example
<TextInput renderLabel="Name" placeholder="Doe, John Doe"/>
</InstUISettingsProvider>
```

### Breadcrumb

#### New tokens
#### New tokens

- gapSm - Gap spacing for small size breadcrumbs
- gapMd - Gap spacing for medium size breadcrumbs
Expand Down Expand Up @@ -255,6 +256,10 @@ type: example
- theme variable `invalidAsteriskColor` is now removed
- `error` or `success` messages are no longer displayed when the component is '`readOnly` or `disabled`

### SourceCodeEdtor

- theme variable `focusBorderColor` is now removed and now uses `sharedTokens.focusOutline.infoColor`

### TextInput

- theme variable `requiredInvalidColor` is now removed
Expand Down
5 changes: 2 additions & 3 deletions packages/ui-source-code-editor/src/SourceCodeEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,11 @@ import type { RequestAnimationFrameType } from '@instructure/ui-dom-utils'
import { ScreenReaderContent } from '@instructure/ui-a11y-content'
import { textDirectionContextConsumer } from '@instructure/ui-i18n'

import { withStyleRework as withStyle } from '@instructure/emotion'
import { withStyle } from '@instructure/emotion'

import customSearch from './SearchPanel'

import generateStyle from './styles'
import generateComponentTheme from './theme'

import { rtlHorizontalArrowKeymap } from './customKeybinding'

Expand All @@ -105,7 +104,7 @@ category: components
---
**/
@withDeterministicId()
@withStyle(generateStyle, generateComponentTheme)
@withStyle(generateStyle)
@textDirectionContextConsumer()
class SourceCodeEditor extends Component<SourceCodeEditorProps> {
static readonly componentId = 'SourceCodeEditor'
Expand Down
9 changes: 5 additions & 4 deletions packages/ui-source-code-editor/src/SourceCodeEditor/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import { tags } from '@lezer/highlight'

import type { SourceCodeEditorTheme } from '@instructure/shared-types'
import type { NewComponentTypes, SharedTokens } from '@instructure/ui-themes'
import type { SourceCodeEditorProps, SourceCodeEditorStyle } from './props'

/**
Expand All @@ -37,8 +37,9 @@ import type { SourceCodeEditorProps, SourceCodeEditorStyle } from './props'
* @return {Object} The final style object, which will be used in the component
*/
const generateStyle = (
componentTheme: SourceCodeEditorTheme,
props: SourceCodeEditorProps
componentTheme: NewComponentTypes['SourceCodeEditor'],
props: SourceCodeEditorProps,
sharedTokens: SharedTokens
): SourceCodeEditorStyle => {
const { attachment, height, width } = props

Expand Down Expand Up @@ -121,7 +122,7 @@ const generateStyle = (
// are, for some reason, drawn behind the element content, which
// will cause things like the active line background to cover
// the outline (#297).
outline: `${componentTheme?.borderWidth} solid ${componentTheme?.focusBorderColor}`
outline: `${componentTheme?.borderWidth} solid ${sharedTokens.focusOutline.infoColor}`
},

'.cm-content': {
Expand Down
55 changes: 0 additions & 55 deletions packages/ui-source-code-editor/src/SourceCodeEditor/theme.ts

This file was deleted.

Loading