@askrjs/themes 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/THEMING.md +5 -1
  2. package/dist/components/_internal/box-layout.js.map +1 -1
  3. package/dist/components/_internal/classes.js.map +1 -1
  4. package/dist/components/_internal/jsx.js.map +1 -1
  5. package/dist/components/_internal/layout.js.map +1 -1
  6. package/dist/components/_internal/merge-props.js.map +1 -1
  7. package/dist/components/_internal/pathname.js.map +1 -1
  8. package/dist/components/_internal/style.js.map +1 -1
  9. package/dist/components/alert/alert.js.map +1 -1
  10. package/dist/components/aspect-ratio/aspect-ratio.js.map +1 -1
  11. package/dist/components/badge/badge.js.map +1 -1
  12. package/dist/components/block/block.js.map +1 -1
  13. package/dist/components/box/box.js.map +1 -1
  14. package/dist/components/breadcrumb/breadcrumb.a11y.js.map +1 -1
  15. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  16. package/dist/components/button-group/button-group.js.map +1 -1
  17. package/dist/components/card/card.js.map +1 -1
  18. package/dist/components/close/close.js.map +1 -1
  19. package/dist/components/container/container.js.map +1 -1
  20. package/dist/components/empty-state/empty-state.js.map +1 -1
  21. package/dist/components/field/field.js.map +1 -1
  22. package/dist/components/flex/flex.js.map +1 -1
  23. package/dist/components/header/header.a11y.js.map +1 -1
  24. package/dist/components/header/header.js.map +1 -1
  25. package/dist/components/inline/index.js.map +1 -1
  26. package/dist/components/input-group/input-group.js.map +1 -1
  27. package/dist/components/list-group/list-group.js.map +1 -1
  28. package/dist/components/nav/nav.js.map +1 -1
  29. package/dist/components/navbar/navbar-panel.js +10 -16
  30. package/dist/components/navbar/navbar-panel.js.map +1 -1
  31. package/dist/components/navbar/navbar.context.js.map +1 -1
  32. package/dist/components/navbar/navbar.js.map +1 -1
  33. package/dist/components/navbar/navbar.render.js.map +1 -1
  34. package/dist/components/navbar/navbar.shared.js.map +1 -1
  35. package/dist/components/overlays/dropdown-content.js.map +1 -1
  36. package/dist/components/pagination/pagination.js.map +1 -1
  37. package/dist/components/section/section.js.map +1 -1
  38. package/dist/components/separator/separator.a11y.js.map +1 -1
  39. package/dist/components/separator/separator.js.map +1 -1
  40. package/dist/components/shell/shell-panel.js.map +1 -1
  41. package/dist/components/shell/shell-responsive.js +13 -5
  42. package/dist/components/shell/shell-responsive.js.map +1 -1
  43. package/dist/components/shell/shell.a11y.js.map +1 -1
  44. package/dist/components/shell/shell.js.map +1 -1
  45. package/dist/components/sidebar/sidebar-panel.js +14 -24
  46. package/dist/components/sidebar/sidebar-panel.js.map +1 -1
  47. package/dist/components/sidebar/sidebar-toggle.js.map +1 -1
  48. package/dist/components/sidebar/sidebar.context.js.map +1 -1
  49. package/dist/components/sidebar/sidebar.js.map +1 -1
  50. package/dist/components/sidebar/sidebar.shared.js.map +1 -1
  51. package/dist/components/skeleton/skeleton.js.map +1 -1
  52. package/dist/components/spacer/spacer.js.map +1 -1
  53. package/dist/components/spinner/spinner.js.map +1 -1
  54. package/dist/components/stack/stack.js.map +1 -1
  55. package/dist/components/theme/theme.js +20 -5
  56. package/dist/components/theme/theme.js.map +1 -1
  57. package/dist/controls.d.ts +1 -1
  58. package/dist/feedback.d.ts +1 -1
  59. package/dist/layouts.d.ts +1 -1
  60. package/dist/navs.d.ts +1 -1
  61. package/dist/shells.d.ts +1 -1
  62. package/dist/surfaces.d.ts +1 -1
  63. package/dist/themes/default/index.css +152 -136
  64. package/package.json +14 -12
  65. package/src/components/navbar/navbar-panel.tsx +11 -16
  66. package/src/components/shell/shell-responsive.tsx +57 -23
  67. package/src/components/sidebar/sidebar-panel.tsx +15 -24
  68. package/src/components/theme/theme.tsx +29 -4
  69. package/src/themes/default/index.css +1 -1
  70. package/src/themes/default/styles/actions/button.css +16 -0
  71. package/src/themes/default/styles/base/utilities.css +34 -5
  72. package/templates/theme/index.css +1 -1
  73. package/templates/theme/styles/actions/button.css +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askrjs/themes",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Default theme tokens, styles, and themed layout wrappers for Askr apps.",
5
5
  "keywords": [
6
6
  "askr",
@@ -129,33 +129,35 @@
129
129
  "bench:tier2": "cross-env NODE_ENV=production vp test bench --run --reporter=default --config vitest.bench.tier2.config.ts",
130
130
  "bench:tier3": "cross-env NODE_ENV=production vp test bench --run --reporter=default --config vitest.bench.tier3.config.ts",
131
131
  "bench:tier4": "cross-env NODE_ENV=production vp test bench --run --reporter=default --config vitest.bench.tier4.config.ts",
132
- "test": "npm run test:unit && npm run test:jsdom && npm run test:browser",
132
+ "test": "npm run test:unit && npm run test:checks && npm run test:jsdom && npm run test:browser",
133
133
  "test:unit": "vp test run -c vitest.test.unit.config.ts",
134
134
  "test:jsdom": "cross-env NODE_ENV=production vp test run -c vitest.test.jsdom.config.ts",
135
135
  "test:browser": "vp test run -c vitest.test.browser.config.ts --mode production",
136
136
  "fmt": "vp fmt .",
137
137
  "lint": "vp lint .",
138
138
  "build": "vp pack",
139
- "prepublishOnly": "npm run build"
139
+ "prepublishOnly": "npm run build",
140
+ "test:checks": "vp test run -c vitest.test.checks.config.ts"
140
141
  },
141
142
  "devDependencies": {
142
- "@askrjs/askr": "^0.0.39",
143
- "@askrjs/ui": "^0.0.7",
144
- "@askrjs/vite": "^0.0.2",
145
- "@tsdown/css": "0.22.0",
146
- "@types/node": "^25.9.1",
143
+ "@askrjs/askr": ">=0.0.1 <0.1.0",
144
+ "@askrjs/ui": ">=0.0.1 <0.1.0",
145
+ "@askrjs/vite": ">=0.0.1 <0.1.0",
146
+ "@tsdown/css": "0.22.3",
147
+ "@types/node": "^25.9.3",
148
+ "@vitest/browser-playwright": "^4.1.9",
147
149
  "cross-env": "^10.1.0",
148
150
  "jsdom": "^29.1.1",
149
- "playwright": "^1.60.0",
151
+ "playwright": "^1.61.0",
150
152
  "typescript": "^6.0.3",
151
- "vite-plus": "^0.1.22"
153
+ "vite-plus": "^0.2.0"
152
154
  },
153
155
  "peerDependencies": {
154
156
  "@askrjs/askr": ">=0.0.1 <0.1.0",
155
- "@askrjs/ui": ">=0.0.1 <0.1.0"
157
+ "@askrjs/ui": ">=0.0.10 <0.1.0"
156
158
  },
157
159
  "engines": {
158
160
  "node": ">=18"
159
161
  },
160
- "packageManager": "npm@11.15.0"
162
+ "packageManager": "npm@11.17.0"
161
163
  }
@@ -3,6 +3,15 @@ import { renderShellPanel } from "../shell/shell-panel";
3
3
  import { NavbarResponsiveContext } from "./navbar.context";
4
4
  import type { NavbarPanelProps } from "./navbar.types";
5
5
 
6
+ const DEFAULT_NAVBAR_RESPONSIVE_CONTEXT = {
7
+ active: () => false,
8
+ collapseLabel: () => "Menu",
9
+ closePanel: () => undefined,
10
+ panelId: () => undefined,
11
+ panelOpen: () => false,
12
+ togglePanel: () => undefined,
13
+ };
14
+
6
15
  export function NavbarPanel(props: NavbarPanelProps): JSX.Element | null {
7
16
  const {
8
17
  active: activeProp,
@@ -27,24 +36,10 @@ export function NavbarPanel(props: NavbarPanelProps): JSX.Element | null {
27
36
  try {
28
37
  return readContext(NavbarResponsiveContext);
29
38
  } catch {
30
- return {
31
- active: () => false,
32
- collapseLabel: () => "Menu",
33
- closePanel: () => undefined,
34
- panelId: () => undefined,
35
- panelOpen: () => false,
36
- togglePanel: () => undefined,
37
- };
39
+ return DEFAULT_NAVBAR_RESPONSIVE_CONTEXT;
38
40
  }
39
41
  })()
40
- : {
41
- active: () => false,
42
- collapseLabel: () => "Menu",
43
- closePanel: () => undefined,
44
- panelId: () => undefined,
45
- panelOpen: () => false,
46
- togglePanel: () => undefined,
47
- };
42
+ : DEFAULT_NAVBAR_RESPONSIVE_CONTEXT;
48
43
  const active = activeProp ?? responsive.active();
49
44
  const open = openProp ?? responsive.panelOpen();
50
45
  const panelId = panelIdProp ?? responsive.panelId();
@@ -47,16 +47,20 @@ export function isShellPanelChild(child: unknown, panelComponent: unknown): chil
47
47
  }
48
48
 
49
49
  export function renderKeyedShellChildren(children: unknown, keyPrefix: string): JSX.Element {
50
- const keyedChildren = toChildArray(children).map((child, index) => {
51
- if (!isJsxElement(child) || child.key != null) {
52
- return child;
53
- }
50
+ const childList = toChildArray(children);
51
+ const needsKeying = childList.some((child) => isJsxElement(child) && child.key == null);
52
+ const keyedChildren = needsKeying
53
+ ? childList.map((child, index) => {
54
+ if (!isJsxElement(child) || child.key != null) {
55
+ return child;
56
+ }
54
57
 
55
- return {
56
- ...child,
57
- key: `${keyPrefix}-${index}`,
58
- };
59
- });
58
+ return {
59
+ ...child,
60
+ key: `${keyPrefix}-${index}`,
61
+ };
62
+ })
63
+ : childList;
60
64
 
61
65
  return (
62
66
  <For
@@ -75,24 +79,54 @@ export function renderKeyedShellPanelChildren(
75
79
  keyPrefix: string,
76
80
  panelProps: ShellResponsivePanelProps,
77
81
  ): JSX.Element {
78
- const keyedChildren = toChildArray(children).map((child, index) => {
82
+ const childList = toChildArray(children);
83
+ const needsPanelProps = childList.some((child) => {
79
84
  if (!isJsxElement(child)) {
80
- return child;
85
+ return false;
81
86
  }
82
87
 
83
- return {
84
- ...child,
85
- key: child.key != null ? child.key : `${keyPrefix}-${index}`,
86
- props: {
87
- ...child.props,
88
- active: panelProps.active,
89
- collapseLabel: panelProps.collapseLabel,
90
- onClose: panelProps.onClose,
91
- open: panelProps.open,
92
- panelId: panelProps.panelId,
93
- },
94
- };
88
+ const props = child.props as Record<string, unknown> | undefined;
89
+
90
+ return (
91
+ props?.active !== panelProps.active ||
92
+ props?.collapseLabel !== panelProps.collapseLabel ||
93
+ props?.onClose !== panelProps.onClose ||
94
+ props?.open !== panelProps.open ||
95
+ props?.panelId !== panelProps.panelId
96
+ );
95
97
  });
98
+ const keyedChildren = needsPanelProps
99
+ ? childList.map((child, index) => {
100
+ if (!isJsxElement(child)) {
101
+ return child;
102
+ }
103
+
104
+ const props = child.props as Record<string, unknown> | undefined;
105
+
106
+ if (
107
+ props?.active === panelProps.active &&
108
+ props?.collapseLabel === panelProps.collapseLabel &&
109
+ props?.onClose === panelProps.onClose &&
110
+ props?.open === panelProps.open &&
111
+ props?.panelId === panelProps.panelId
112
+ ) {
113
+ return child;
114
+ }
115
+
116
+ return {
117
+ ...child,
118
+ key: child.key != null ? child.key : `${keyPrefix}-${index}`,
119
+ props: {
120
+ ...props,
121
+ active: panelProps.active,
122
+ collapseLabel: panelProps.collapseLabel,
123
+ onClose: panelProps.onClose,
124
+ open: panelProps.open,
125
+ panelId: panelProps.panelId,
126
+ },
127
+ };
128
+ })
129
+ : childList;
96
130
 
97
131
  return (
98
132
  <For
@@ -3,6 +3,19 @@ import { renderShellPanel } from "../shell/shell-panel";
3
3
  import { SidebarResponsiveContext } from "./sidebar.context";
4
4
  import type { SidebarPanelProps } from "./sidebar.types";
5
5
 
6
+ const DEFAULT_SIDEBAR_RESPONSIVE_CONTEXT = {
7
+ active: () => false,
8
+ collapseLabel: () => "Menu",
9
+ closePanel: () => undefined,
10
+ iconCollapsed: () => false,
11
+ isRailCollapsible: () => false,
12
+ orientation: () => "vertical" as const,
13
+ panelId: () => undefined,
14
+ panelOpen: () => false,
15
+ togglePanel: () => undefined,
16
+ toggleRail: () => undefined,
17
+ };
18
+
6
19
  export function SidebarPanel(props: SidebarPanelProps): JSX.Element | null {
7
20
  const {
8
21
  active: activeProp,
@@ -27,32 +40,10 @@ export function SidebarPanel(props: SidebarPanelProps): JSX.Element | null {
27
40
  try {
28
41
  return readContext(SidebarResponsiveContext);
29
42
  } catch {
30
- return {
31
- active: () => false,
32
- collapseLabel: () => "Menu",
33
- closePanel: () => undefined,
34
- iconCollapsed: () => false,
35
- isRailCollapsible: () => false,
36
- orientation: () => "vertical" as const,
37
- panelId: () => undefined,
38
- panelOpen: () => false,
39
- togglePanel: () => undefined,
40
- toggleRail: () => undefined,
41
- };
43
+ return DEFAULT_SIDEBAR_RESPONSIVE_CONTEXT;
42
44
  }
43
45
  })()
44
- : {
45
- active: () => false,
46
- collapseLabel: () => "Menu",
47
- closePanel: () => undefined,
48
- iconCollapsed: () => false,
49
- isRailCollapsible: () => false,
50
- orientation: () => "vertical" as const,
51
- panelId: () => undefined,
52
- panelOpen: () => false,
53
- togglePanel: () => undefined,
54
- toggleRail: () => undefined,
55
- };
46
+ : DEFAULT_SIDEBAR_RESPONSIVE_CONTEXT;
56
47
  const active = activeProp ?? responsive.active();
57
48
  const open = openProp ?? responsive.panelOpen();
58
49
  const panelId = panelIdProp ?? responsive.panelId();
@@ -1,4 +1,5 @@
1
1
  import { defineContext, readContext, state } from "@askrjs/askr";
2
+ import type { JSXElement } from "@askrjs/askr/foundations/structures";
2
3
  import { resource } from "@askrjs/askr/resources";
3
4
  import { Button } from "@askrjs/ui";
4
5
  import type { ButtonNativeProps, PressEvent } from "@askrjs/ui";
@@ -85,6 +86,7 @@ export function ThemeProvider(props: ThemeProviderProps): JSX.Element {
85
86
  } = props;
86
87
 
87
88
  const themeState = state<ThemeName>(readStoredTheme(storageKey) ?? defaultTheme);
89
+ const currentTheme = themeState();
88
90
 
89
91
  const setTheme = (nextTheme: ThemeName) => {
90
92
  themeState.set(nextTheme);
@@ -99,8 +101,6 @@ export function ThemeProvider(props: ThemeProviderProps): JSX.Element {
99
101
  storageKey,
100
102
  };
101
103
 
102
- const currentTheme = themeState();
103
-
104
104
  return (
105
105
  <ThemeContext.Scope value={value}>
106
106
  <ThemeRootSync theme={currentTheme} />
@@ -186,8 +186,9 @@ export function ThemeToggle(props: ThemeToggleProps): JSX.Element {
186
186
  darkIcon,
187
187
  systemIcon,
188
188
  });
189
+ const renderedIcon = cloneThemeToggleIcon(themedIcon);
189
190
  const content =
190
- typeof children === "function" ? children(renderContext) : (children ?? themedIcon);
191
+ typeof children === "function" ? children(renderContext) : (children ?? renderedIcon);
191
192
 
192
193
  return (
193
194
  <Button
@@ -201,7 +202,7 @@ export function ThemeToggle(props: ThemeToggleProps): JSX.Element {
201
202
  if (!event.defaultPrevented) theme.setTheme(nextTheme);
202
203
  }}
203
204
  >
204
- {content}
205
+ <span data-slot="theme-toggle-content">{content}</span>
205
206
  </Button>
206
207
  );
207
208
  }
@@ -230,6 +231,30 @@ export function resolveThemeToggleIcon(
230
231
  return getThemeIcon(theme, icons) ?? getThemeIcon(nextTheme, icons);
231
232
  }
232
233
 
234
+ function isJSXElement(value: unknown): value is JSXElement {
235
+ return (
236
+ typeof value === "object" &&
237
+ value !== null &&
238
+ "$$typeof" in value &&
239
+ "type" in value &&
240
+ "props" in value
241
+ );
242
+ }
243
+
244
+ function cloneThemeToggleIcon(icon: unknown): unknown {
245
+ if (!isJSXElement(icon)) return icon;
246
+
247
+ const props = icon.props as Record<string, unknown> | undefined;
248
+ if (!props || Object.keys(props).length === 0) {
249
+ return icon;
250
+ }
251
+
252
+ return {
253
+ ...icon,
254
+ props: { ...props },
255
+ };
256
+ }
257
+
233
258
  function syncThemeRoot(themeChoice: ThemeName | null | undefined): void {
234
259
  if (typeof document === "undefined") {
235
260
  return;
@@ -2,9 +2,9 @@
2
2
  @import "./styles/base/reset.css";
3
3
  @import "./styles/base/typography.css";
4
4
  @import "./styles/base/icon.css";
5
- @import "./styles/base/utilities.css";
6
5
  @import "./styles/layout/layout.css";
7
6
  @import "./styles/layout/responsive-layout.css";
7
+ @import "./styles/base/utilities.css";
8
8
  @import "./styles/layout/block.css";
9
9
  @import "./styles/layout/patterns.css";
10
10
  @import "./styles/layout/aspect-ratio.css";
@@ -35,6 +35,22 @@
35
35
  opacity var(--ak-duration-fast) var(--ak-ease-standard);
36
36
  }
37
37
 
38
+ :where([data-slot="theme-toggle-content"]) {
39
+ --_ak-theme-toggle-icon-size: var(--ak-theme-toggle-icon-size, var(--ak-icon-size, 1em));
40
+ display: inline-flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ flex: none;
44
+ min-inline-size: 0;
45
+ }
46
+
47
+ :where([data-slot="theme-toggle-content"]) > :where([data-slot="icon"], svg) {
48
+ flex: none;
49
+ inline-size: var(--_ak-theme-toggle-icon-size);
50
+ block-size: var(--_ak-theme-toggle-icon-size);
51
+ color: currentColor;
52
+ }
53
+
38
54
  :where(.btn) > :where([data-slot="icon"], svg),
39
55
  :where([data-slot="button"]) > :where([data-slot="icon"], svg) {
40
56
  flex: none;
@@ -147,21 +147,34 @@
147
147
  row-gap: var(--ak-space-lg);
148
148
  }
149
149
 
150
- :where(.flex-col, [data-slot="flex"][data-direction="initial:column"]) {
150
+ :where(
151
+ .flex-col,
152
+ [data-slot="flex"][data-direction="initial:column"],
153
+ [data-slot="inline"][data-direction="initial:column"]
154
+ ) {
151
155
  flex-direction: column;
152
156
  }
153
157
 
154
- :where(.flex-row-reverse, [data-slot="flex"][data-direction="initial:row-reverse"]) {
158
+ :where(
159
+ .flex-row-reverse,
160
+ [data-slot="flex"][data-direction="initial:row-reverse"],
161
+ [data-slot="inline"][data-direction="initial:row-reverse"]
162
+ ) {
155
163
  flex-direction: row-reverse;
156
164
  }
157
165
 
158
- :where(.flex-col-reverse, [data-slot="flex"][data-direction="initial:column-reverse"]) {
166
+ :where(
167
+ .flex-col-reverse,
168
+ [data-slot="flex"][data-direction="initial:column-reverse"],
169
+ [data-slot="inline"][data-direction="initial:column-reverse"]
170
+ ) {
159
171
  flex-direction: column-reverse;
160
172
  }
161
173
 
162
174
  :where(
163
175
  .items-start,
164
176
  [data-slot="flex"][data-align="initial:start"],
177
+ [data-slot="inline"][data-align="initial:start"],
165
178
  [data-slot="block"][data-align="initial:start"]
166
179
  ) {
167
180
  align-items: flex-start;
@@ -170,6 +183,7 @@
170
183
  :where(
171
184
  .items-end,
172
185
  [data-slot="flex"][data-align="initial:end"],
186
+ [data-slot="inline"][data-align="initial:end"],
173
187
  [data-slot="block"][data-align="initial:end"]
174
188
  ) {
175
189
  align-items: flex-end;
@@ -178,6 +192,7 @@
178
192
  :where(
179
193
  .items-center,
180
194
  [data-slot="flex"][data-align="initial:center"],
195
+ [data-slot="inline"][data-align="initial:center"],
181
196
  [data-slot="block"][data-align="initial:center"]
182
197
  ) {
183
198
  align-items: center;
@@ -186,6 +201,7 @@
186
201
  :where(
187
202
  .items-stretch,
188
203
  [data-slot="flex"][data-align="initial:stretch"],
204
+ [data-slot="inline"][data-align="initial:stretch"],
189
205
  [data-slot="block"][data-align="initial:stretch"]
190
206
  ) {
191
207
  align-items: stretch;
@@ -194,6 +210,7 @@
194
210
  :where(
195
211
  .items-baseline,
196
212
  [data-slot="flex"][data-align="initial:baseline"],
213
+ [data-slot="inline"][data-align="initial:baseline"],
197
214
  [data-slot="block"][data-align="initial:baseline"]
198
215
  ) {
199
216
  align-items: baseline;
@@ -202,6 +219,7 @@
202
219
  :where(
203
220
  .justify-start,
204
221
  [data-slot="flex"][data-justify="initial:start"],
222
+ [data-slot="inline"][data-justify="initial:start"],
205
223
  [data-slot="block"][data-justify="initial:start"]
206
224
  ) {
207
225
  justify-content: flex-start;
@@ -210,6 +228,7 @@
210
228
  :where(
211
229
  .justify-end,
212
230
  [data-slot="flex"][data-justify="initial:end"],
231
+ [data-slot="inline"][data-justify="initial:end"],
213
232
  [data-slot="block"][data-justify="initial:end"]
214
233
  ) {
215
234
  justify-content: flex-end;
@@ -218,6 +237,7 @@
218
237
  :where(
219
238
  .justify-center,
220
239
  [data-slot="flex"][data-justify="initial:center"],
240
+ [data-slot="inline"][data-justify="initial:center"],
221
241
  [data-slot="block"][data-justify="initial:center"]
222
242
  ) {
223
243
  justify-content: center;
@@ -226,15 +246,24 @@
226
246
  :where(
227
247
  .justify-between,
228
248
  [data-slot="flex"][data-justify="initial:between"],
249
+ [data-slot="inline"][data-justify="initial:between"],
229
250
  [data-slot="block"][data-justify="initial:between"]
230
251
  ) {
231
252
  justify-content: space-between;
232
253
  }
233
254
 
234
- :where(.flex-nowrap, [data-slot="flex"][data-wrap="initial:nowrap"]) {
255
+ :where(
256
+ .flex-nowrap,
257
+ [data-slot="flex"][data-wrap="initial:nowrap"],
258
+ [data-slot="inline"][data-wrap="initial:nowrap"]
259
+ ) {
235
260
  flex-wrap: nowrap;
236
261
  }
237
262
 
238
- :where(.flex-wrap-reverse, [data-slot="flex"][data-wrap="initial:wrap-reverse"]) {
263
+ :where(
264
+ .flex-wrap-reverse,
265
+ [data-slot="flex"][data-wrap="initial:wrap-reverse"],
266
+ [data-slot="inline"][data-wrap="initial:wrap-reverse"]
267
+ ) {
239
268
  flex-wrap: wrap-reverse;
240
269
  }
@@ -2,9 +2,9 @@
2
2
  @import "./styles/base/reset.css";
3
3
  @import "./styles/base/typography.css";
4
4
  @import "./styles/base/icon.css";
5
- @import "./styles/base/utilities.css";
6
5
  @import "./styles/layout/layout.css";
7
6
  @import "./styles/layout/responsive-layout.css";
7
+ @import "./styles/base/utilities.css";
8
8
  @import "./styles/layout/block.css";
9
9
  @import "./styles/layout/patterns.css";
10
10
  @import "./styles/layout/aspect-ratio.css";
@@ -35,6 +35,22 @@
35
35
  opacity var(--ak-duration-fast) var(--ak-ease-standard);
36
36
  }
37
37
 
38
+ :where([data-slot="theme-toggle-content"]) {
39
+ --_ak-theme-toggle-icon-size: var(--ak-theme-toggle-icon-size, var(--ak-icon-size, 1em));
40
+ display: inline-flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ flex: none;
44
+ min-inline-size: 0;
45
+ }
46
+
47
+ :where([data-slot="theme-toggle-content"]) > :where([data-slot="icon"], svg) {
48
+ flex: none;
49
+ inline-size: var(--_ak-theme-toggle-icon-size);
50
+ block-size: var(--_ak-theme-toggle-icon-size);
51
+ color: currentColor;
52
+ }
53
+
38
54
  :where(.btn) > :where([data-slot="icon"], svg),
39
55
  :where([data-slot="button"]) > :where([data-slot="icon"], svg) {
40
56
  flex: none;