You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/__docs__/buildScripts/ai-accessible-documentation/summaries-for-llms-file.json
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -465,8 +465,12 @@
465
465
"summary": "Quick start: Create a React app, add `@instructure/ui`, wrap with `InstUISettingsProvider`, and use components. Integrate with existing projects by adding the dependency and provider. Read about theme overrides and accessibility for best practices."
466
466
},
467
467
{
468
-
"title": "using-theme-overrides",
469
-
"summary": "Customize components via theme overrides while ensuring WCAG compliance. Use nested `InstUISettingsProvider` for subtree themes, override global or component themes, and leverage branding variables for user customization. Deprecated global theming causes issues with multiple InstUI versions."
468
+
"title": "legacy-theme-overrides",
469
+
"summary": "Theme overrides for version `/v11_6` and earlier. Apply via `themeOverride` on `InstUISettingsProvider` for a subtree or per-component `themeOverride` prop (component's own flat theme-variable map, object or function form)."
470
+
},
471
+
{
472
+
"title": "new-theme-overrides",
473
+
"summary": "Theme overrides for version `/v11_7` and later on the new token-based theming. Layered model: `primitives` → `semantics` → `components`, plus `sharedTokens` for cross-component patterns (focus rings, box shadows). Apply via structured `themeOverride` on `InstUISettingsProvider` keyed by token layer, or per-component `themeOverride` prop (object or `(componentTheme) => ({...})` function). Per-component overrides have highest priority."
Copy file name to clipboardExpand all lines: packages/__docs__/src/withStyleForDocs.tsx
+12-62Lines changed: 12 additions & 62 deletions
Original file line number
Diff line number
Diff line change
@@ -114,77 +114,27 @@ const defaultValues = {
114
114
* category: utilities/themes
115
115
* ---
116
116
*
117
-
* Same as `withStyle`, used only for the docs app.
118
-
*
119
-
* A decorator or higher order component that makes a component themeable.
120
-
*
121
-
* It adds a `makeStyles` function and the generated `styles` object to the decorated Component's props. If it has an own theme, it also adds the `themeOverride` prop to the component.
122
-
*
123
-
* As a HOC:
117
+
* Same shape as the legacy `withStyle` decorator, used only by the docs app.
118
+
* Injects a `makeStyles` function and the generated `styles` object as props,
119
+
* and forwards a `themeOverride` prop to the component.
124
120
*
125
121
* ```js-code
126
-
* import { withStyleForDocs as withStyleNew } from '@instructure/emotion'
122
+
* import { withStyleForDocs } from '../withStyleForDocs'
* Themeable components inject their themed styles into the document
134
-
* when they are mounted.
135
-
*
136
-
* ### Applying themes
137
-
*
138
-
* A themeable component’s theme can be configured via wrapping it in an
139
-
* [InstUISettingsProvider](InstUISettingsProvider) component, and/or set
140
-
* explicitly via its `themeOverride` prop.
141
-
*
142
-
* InstUISettingsProvider provides a theme object (e.g. the [canvas theme](/#canvas)).
143
-
* These variables are mapped to the component's own variables in `theme.js`.
144
-
*
145
-
* With the `themeOverride` prop you can directly set/override the component theme variables declared in theme.js. It accepts an object or a function. The function has the component's theme and the currently active main theme as its parameter.
146
-
*
147
-
* See more about the overrides on the [Legacy theme overrides](/#legacy-theme-overrides) docs page.
Copy file name to clipboardExpand all lines: packages/emotion/src/InstUISettingsProvider/README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,10 @@ ReactDOM.render(
62
62
63
63
#### Theme overrides
64
64
65
-
There are multiple ways to override themes in InstUI. You can read about how these work on the dedicated docs page: [Using theme overrides](/#using-theme-overrides).
65
+
There are multiple ways to override themes in InstUI. You can read about how these work on the dedicated docs pages:
Copy file name to clipboardExpand all lines: packages/emotion/src/withStyleNew.tsx
+11-37Lines changed: 11 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -98,11 +98,9 @@ const defaultValues = {
98
98
* category: utilities/themes
99
99
* ---
100
100
*
101
-
* A decorator or higher order component that makes a component themeable.
102
-
*
103
-
* It adds a `makeStyles` function and the generated `styles` object to the decorated Component's props. If it has an own theme, it also adds the `themeOverride` prop to the component.
104
-
*
105
-
* As a HOC:
101
+
* Decorator (or HOC) that makes a component themeable using InstUI's new
102
+
* theming system. Injects a `makeStyles` function and the
103
+
* generated `styles` object as props.
106
104
*
107
105
* ```js-code
108
106
* import { withStyleNew } from '@instructure/emotion'
* Themeable components inject their themed styles into the document
115
-
* when they are mounted.
116
-
*
117
-
* ### Applying themes
118
-
*
119
-
* A themeable component’s theme can be configured via wrapping it in an
120
-
* [InstUISettingsProvider](InstUISettingsProvider) component, and/or set
121
-
* explicitly via its `themeOverride` prop.
122
-
*
123
-
* InstUISettingsProvider provides a theme object (e.g. the [canvas theme](/#canvas)).
124
-
* These variables are mapped to the component's own variables in `theme.js` (see [theming](theming-basics) for more info).
112
+
* Optionally pass a `useTokensFrom` key as the second argument to consume
113
+
* another component's tokens (e.g. `withStyleNew(generateStyle, 'BaseButton')`).
125
114
*
126
-
* With the `themeOverride` prop you can directly set/override the component theme variables declared in theme.js. It accepts an object or a function. The function has the component's theme and the currently active main theme as its parameter.
127
-
*
128
-
* See more about the overrides on the [Using theme overrides](/#using-theme-overrides) docs page.
0 commit comments