@box-kite/react 2.2.1 → 2.2.3
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.
- package/.claude/rules/box-kite-rules.md +1 -1
- package/.claude/skills/box-kite/SKILL.md +1 -1
- package/.claude/skills/box-kite/references/components.md +1 -1
- package/.claude/skills/box-kite/references/styling.md +2 -1
- package/.cursor/rules/box-kite.mdc +1 -1
- package/AGENTS.md +1 -1
- package/BOX_AI_CONTEXT.md +18 -4
- package/BOX_KITE_AI_CONTEXT.md +18 -4
- package/README.md +0 -3
- package/client.cjs +1 -1
- package/client.mjs +61 -51
- package/components/dataGrid/components/dataGridColumnsPanel.d.ts +10 -0
- package/components/dataGrid/models/columnModel.d.ts +2 -0
- package/components/dataGrid/models/columnVisibilityModel.d.ts +16 -2
- package/components/dataGrid/models/gridModel.d.ts +5 -0
- package/components/dataGrid/models/groupRowModel.d.ts +2 -2
- package/components/dataGrid/models/headerCellModel.d.ts +5 -0
- package/components/dataGrid/models/localeText.d.ts +7 -1
- package/components/dataGrid/models/rowModel.d.ts +1 -1
- package/components/dataGrid.cjs +3 -3
- package/components/dataGrid.mjs +839 -732
- package/components/semantics.d.ts +29 -29
- package/docs/props.md +1 -1
- package/layer.cjs +1 -1
- package/layer.mjs +4 -1
- package/package.json +69 -46
- package/react/theme/theme.d.ts +5 -3
- package/components/dataGrid/components/dataGridTopBarContextMenu.d.ts +0 -6
package/docs/props.md
CHANGED
|
@@ -613,7 +613,7 @@ What a `::before`/`::after` renders — and whether it renders at all: a generat
|
|
|
613
613
|
The content-visibility CSS property controls whether or not an element renders its contents at all, along with forcing a strong set of containments, allowing user agents to potentially omit large swathes of layout and rendering work until it becomes needed. It enables the user agent to skip an element's rendering work (including layout and painting) until it is needed — which makes the initial page load much faster.
|
|
614
614
|
|
|
615
615
|
- Writes: `content-visibility`
|
|
616
|
-
- Values: `visible` · `hidden`
|
|
616
|
+
- Values: `visible` · `hidden` · `auto`
|
|
617
617
|
- Example: `contentVisibility="visible"` → `content-visibility: visible`
|
|
618
618
|
|
|
619
619
|
### `contrast`
|
package/layer.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./platform.cjs"),t=require("./effects.cjs"),n=require("./behavior.cjs"),r=require("./identity.cjs");let i=require("react");var a=()=>()=>{},o=()=>!0;function s(){return(0,i.useSyncExternalStore)(a,e.a,o)}function c(a){let{haspopup:o,id:c,idPrefix:l,open:u,defaultOpen:d=!1,onOpenChange:f,onOpened:p,onClosing:m,inside:h}=a,g=r.t(l),_=c??g,[v,y]=n.i({value:u,defaultValue:d,onChange:f}),[b,x]=(0,i.useState)(null),[S,C]=(0,i.useState)(null),w=s(),[T,E]=(0,i.useState)(!1),[D,O]=(0,i.useState)(),k=(0,i.useRef)(`imperative`),A=(0,i.useRef)(!1),j=n.a(p),M=n.a(m),N=n.a(e=>{let t=e.newState===`open`,n=e.currentTarget;if(t&&u===!1){e.preventDefault();return}t||(A.current=n.contains(document.activeElement),M(A.current,b)),E(t);let r=t?`trigger`:k.current;k.current=`imperative`,y(t,{reason:r,event:e})}),P=n.a(e=>{let t=e.currentTarget;e.newState===`open`&&j(t)});t.n(()=>{if(!w||!S)return;let e=new AbortController;return S.addEventListener(`beforetoggle`,N,{signal:e.signal}),S.addEventListener(`toggle`,P,{signal:e.signal}),()=>e.abort()},[w,S,N,P]),t.n(()=>{!w||!e.a()||!S||v===T||(v?S.showPopover():S.hidePopover())},[v,T,S,w]),t.n(()=>{if(!w||!v)return;let t=new AbortController,n=(e,n)=>document.addEventListener(e,n,{signal:t.signal,capture:!0});return n(`keydown`,e=>{e.key===`Escape`&&(k.current=`escape`)}),n(`pointerdown`,t=>{let n=!!b&&e.l(t,[b]);k.current=n?`trigger`:`outside-pointer`}),()=>t.abort()},[w,v,b]),t.n(()=>{b&&(b.id||b.setAttribute(`id`,`${_}-trigger`),O(b.id))},[b,_]),t.n(()=>{if(!(!w||!b))return b.setAttribute(`popovertarget`,_),()=>b.removeAttribute(`popovertarget`)},[w,b,_]),t.n(()=>{w||!v||!S||j(S)},[w,v,S,j]),n.r({enabled:!w&&v,inside:[S,b,...h??[]],onDismiss:(e,t)=>y(!1,{reason:e,event:t})}),n.n({enabled:!w&&v,returnTo:b});let F=n.a(e=>{y(e=>!e,{reason:`trigger`,event:e})});return{platform:w,isOpen:v,setOpen:y,id:_,trigger:(0,i.useMemo)(()=>({ref:x,props:{"aria-expanded":v,"aria-haspopup":o,"aria-controls":v?_:void 0,...w?{}:{onClick:F}}}),[F,o,v,_,w]),triggerElement:b,triggerId:D,setPanel:C,panelElement:S}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
|
|
1
|
+
const e=require("./platform.cjs"),t=require("./effects.cjs"),n=require("./behavior.cjs"),r=require("./identity.cjs");let i=require("react");var a=()=>()=>{},o=()=>!0;function s(){return(0,i.useSyncExternalStore)(a,e.a,o)}function c(a){let{haspopup:o,id:c,idPrefix:l,open:u,defaultOpen:d=!1,onOpenChange:f,onOpened:p,onClosing:m,inside:h}=a,g=r.t(l),_=c??g,[v,y]=n.i({value:u,defaultValue:d,onChange:f}),[b,x]=(0,i.useState)(null),[S,C]=(0,i.useState)(null),w=s(),[T,E]=(0,i.useState)(!1),[D,O]=(0,i.useState)(),k=(0,i.useRef)(`imperative`),A=(0,i.useRef)(!1),j=n.a(p),M=n.a(m),N=n.a(e=>{let t=e.newState===`open`,n=e.currentTarget;if(t&&u===!1){e.preventDefault(),setTimeout(()=>y(!0,{reason:`trigger`,event:e}));return}t||(A.current=n.contains(document.activeElement),M(A.current,b)),E(t);let r=t?`trigger`:k.current;k.current=`imperative`,y(t,{reason:r,event:e})}),P=n.a(e=>{let t=e.currentTarget;e.newState===`open`&&j(t)});t.n(()=>{if(!w||!S)return;let e=new AbortController;return S.addEventListener(`beforetoggle`,N,{signal:e.signal}),S.addEventListener(`toggle`,P,{signal:e.signal}),()=>e.abort()},[w,S,N,P]),t.n(()=>{!w||!e.a()||!S||v===T||(v?S.showPopover():S.hidePopover())},[v,T,S,w]),t.n(()=>{if(!w||!v)return;let t=new AbortController,n=(e,n)=>document.addEventListener(e,n,{signal:t.signal,capture:!0});return n(`keydown`,e=>{e.key===`Escape`&&(k.current=`escape`)}),n(`pointerdown`,t=>{let n=!!b&&e.l(t,[b]);k.current=n?`trigger`:`outside-pointer`}),()=>t.abort()},[w,v,b]),t.n(()=>{b&&(b.id||b.setAttribute(`id`,`${_}-trigger`),O(b.id))},[b,_]),t.n(()=>{if(!(!w||!b))return b.setAttribute(`popovertarget`,_),()=>b.removeAttribute(`popovertarget`)},[w,b,_]),t.n(()=>{w||!v||!S||j(S)},[w,v,S,j]),n.r({enabled:!w&&v,inside:[S,b,...h??[]],onDismiss:(e,t)=>y(!1,{reason:e,event:t})}),n.n({enabled:!w&&v,returnTo:b});let F=n.a(e=>{y(e=>!e,{reason:`trigger`,event:e})});return{platform:w,isOpen:v,setOpen:y,id:_,trigger:(0,i.useMemo)(()=>({ref:x,props:{"aria-expanded":v,"aria-haspopup":o,"aria-controls":v?_:void 0,...w?{}:{onClick:F}}}),[F,o,v,_,w]),triggerElement:b,triggerId:D,setPanel:C,panelElement:S}}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
|
package/layer.mjs
CHANGED
|
@@ -18,7 +18,10 @@ function h(d) {
|
|
|
18
18
|
}), [E, D] = u(null), [O, k] = u(null), A = m(), [j, M] = u(!1), [N, P] = u(), F = l("imperative"), I = l(!1), L = r(y), R = r(b), z = r((e) => {
|
|
19
19
|
let t = e.newState === "open", n = e.currentTarget;
|
|
20
20
|
if (t && g === !1) {
|
|
21
|
-
e.preventDefault()
|
|
21
|
+
e.preventDefault(), setTimeout(() => T(!0, {
|
|
22
|
+
reason: "trigger",
|
|
23
|
+
event: e
|
|
24
|
+
}));
|
|
22
25
|
return;
|
|
23
26
|
}
|
|
24
27
|
t || (I.current = n.contains(document.activeElement), R(I.current, E)), M(t);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box-kite/react",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"pages/**"
|
|
@@ -76,7 +76,6 @@
|
|
|
76
76
|
"build:core": "vite build --config vite.core.config.ts && node scripts/postbuild-core.mjs",
|
|
77
77
|
"build:mcp": "vite build --config vite.mcp.config.ts && node scripts/postbuild-mcp.mjs",
|
|
78
78
|
"postbuild": "node scripts/postbuild.mjs",
|
|
79
|
-
"build:bridge": "node scripts/build-bridge.mjs",
|
|
80
79
|
"build:dev": "npm run build:core && vite build --mode dev",
|
|
81
80
|
"compile": "tsc --noEmit --skipLibCheck",
|
|
82
81
|
"test": "vitest run",
|
|
@@ -113,10 +112,11 @@
|
|
|
113
112
|
"ignore": [
|
|
114
113
|
"react",
|
|
115
114
|
"react-dom",
|
|
116
|
-
"./diagnostics-*"
|
|
115
|
+
"./diagnostics-*",
|
|
116
|
+
"./themeReveal-*"
|
|
117
117
|
],
|
|
118
118
|
"gzip": true,
|
|
119
|
-
"limit": "
|
|
119
|
+
"limit": "37.54 KB"
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
"name": "Box in a Server Component (react-server entry)",
|
|
@@ -124,10 +124,11 @@
|
|
|
124
124
|
"ignore": [
|
|
125
125
|
"react",
|
|
126
126
|
"react-dom",
|
|
127
|
-
"./diagnostics-*"
|
|
127
|
+
"./diagnostics-*",
|
|
128
|
+
"./themeReveal-*"
|
|
128
129
|
],
|
|
129
130
|
"gzip": true,
|
|
130
|
-
"limit": "35.
|
|
131
|
+
"limit": "35.63 KB"
|
|
131
132
|
},
|
|
132
133
|
{
|
|
133
134
|
"name": "Behavior primitives (a11y entry)",
|
|
@@ -135,7 +136,8 @@
|
|
|
135
136
|
"ignore": [
|
|
136
137
|
"react",
|
|
137
138
|
"react-dom",
|
|
138
|
-
"./diagnostics-*"
|
|
139
|
+
"./diagnostics-*",
|
|
140
|
+
"./themeReveal-*"
|
|
139
141
|
],
|
|
140
142
|
"gzip": true,
|
|
141
143
|
"limit": "3.2 KB"
|
|
@@ -146,7 +148,8 @@
|
|
|
146
148
|
"ignore": [
|
|
147
149
|
"react",
|
|
148
150
|
"react-dom",
|
|
149
|
-
"./diagnostics-*"
|
|
151
|
+
"./diagnostics-*",
|
|
152
|
+
"./themeReveal-*"
|
|
150
153
|
],
|
|
151
154
|
"gzip": true,
|
|
152
155
|
"limit": "2.25 KB"
|
|
@@ -157,10 +160,11 @@
|
|
|
157
160
|
"ignore": [
|
|
158
161
|
"react",
|
|
159
162
|
"react-dom",
|
|
160
|
-
"./diagnostics-*"
|
|
163
|
+
"./diagnostics-*",
|
|
164
|
+
"./themeReveal-*"
|
|
161
165
|
],
|
|
162
166
|
"gzip": true,
|
|
163
|
-
"limit": "55.
|
|
167
|
+
"limit": "55.64 KB"
|
|
164
168
|
},
|
|
165
169
|
{
|
|
166
170
|
"name": "Spec renderer (spec entry)",
|
|
@@ -168,7 +172,8 @@
|
|
|
168
172
|
"ignore": [
|
|
169
173
|
"react",
|
|
170
174
|
"react-dom",
|
|
171
|
-
"./diagnostics-*"
|
|
175
|
+
"./diagnostics-*",
|
|
176
|
+
"./themeReveal-*"
|
|
172
177
|
],
|
|
173
178
|
"gzip": true,
|
|
174
179
|
"limit": "4.7 KB"
|
|
@@ -179,7 +184,8 @@
|
|
|
179
184
|
"ignore": [
|
|
180
185
|
"react",
|
|
181
186
|
"react-dom",
|
|
182
|
-
"./diagnostics-*"
|
|
187
|
+
"./diagnostics-*",
|
|
188
|
+
"./themeReveal-*"
|
|
183
189
|
],
|
|
184
190
|
"gzip": true,
|
|
185
191
|
"limit": "4 KB"
|
|
@@ -188,9 +194,10 @@
|
|
|
188
194
|
"name": "Core engine (@box-kite/core, no React)",
|
|
189
195
|
"path": "dist-core/core.mjs",
|
|
190
196
|
"gzip": true,
|
|
191
|
-
"limit": "36.
|
|
197
|
+
"limit": "36.90 KB",
|
|
192
198
|
"ignore": [
|
|
193
|
-
"./diagnostics-*"
|
|
199
|
+
"./diagnostics-*",
|
|
200
|
+
"./themeReveal-*"
|
|
194
201
|
]
|
|
195
202
|
},
|
|
196
203
|
{
|
|
@@ -199,10 +206,11 @@
|
|
|
199
206
|
"ignore": [
|
|
200
207
|
"react",
|
|
201
208
|
"react-dom",
|
|
202
|
-
"./diagnostics-*"
|
|
209
|
+
"./diagnostics-*",
|
|
210
|
+
"./themeReveal-*"
|
|
203
211
|
],
|
|
204
212
|
"gzip": true,
|
|
205
|
-
"limit": "
|
|
213
|
+
"limit": "39.61 KB"
|
|
206
214
|
},
|
|
207
215
|
{
|
|
208
216
|
"name": "Popover",
|
|
@@ -210,10 +218,11 @@
|
|
|
210
218
|
"ignore": [
|
|
211
219
|
"react",
|
|
212
220
|
"react-dom",
|
|
213
|
-
"./diagnostics-*"
|
|
221
|
+
"./diagnostics-*",
|
|
222
|
+
"./themeReveal-*"
|
|
214
223
|
],
|
|
215
224
|
"gzip": true,
|
|
216
|
-
"limit": "
|
|
225
|
+
"limit": "41.15 KB"
|
|
217
226
|
},
|
|
218
227
|
{
|
|
219
228
|
"name": "Menu",
|
|
@@ -221,10 +230,11 @@
|
|
|
221
230
|
"ignore": [
|
|
222
231
|
"react",
|
|
223
232
|
"react-dom",
|
|
224
|
-
"./diagnostics-*"
|
|
233
|
+
"./diagnostics-*",
|
|
234
|
+
"./themeReveal-*"
|
|
225
235
|
],
|
|
226
236
|
"gzip": true,
|
|
227
|
-
"limit": "
|
|
237
|
+
"limit": "43.41 KB"
|
|
228
238
|
},
|
|
229
239
|
{
|
|
230
240
|
"name": "Accordion",
|
|
@@ -232,10 +242,11 @@
|
|
|
232
242
|
"ignore": [
|
|
233
243
|
"react",
|
|
234
244
|
"react-dom",
|
|
235
|
-
"./diagnostics-*"
|
|
245
|
+
"./diagnostics-*",
|
|
246
|
+
"./themeReveal-*"
|
|
236
247
|
],
|
|
237
248
|
"gzip": true,
|
|
238
|
-
"limit": "38.
|
|
249
|
+
"limit": "38.88 KB"
|
|
239
250
|
},
|
|
240
251
|
{
|
|
241
252
|
"name": "Agent",
|
|
@@ -243,10 +254,11 @@
|
|
|
243
254
|
"ignore": [
|
|
244
255
|
"react",
|
|
245
256
|
"react-dom",
|
|
246
|
-
"./diagnostics-*"
|
|
257
|
+
"./diagnostics-*",
|
|
258
|
+
"./themeReveal-*"
|
|
247
259
|
],
|
|
248
260
|
"gzip": true,
|
|
249
|
-
"limit": "
|
|
261
|
+
"limit": "39.63 KB"
|
|
250
262
|
},
|
|
251
263
|
{
|
|
252
264
|
"name": "Markdown",
|
|
@@ -254,10 +266,11 @@
|
|
|
254
266
|
"ignore": [
|
|
255
267
|
"react",
|
|
256
268
|
"react-dom",
|
|
257
|
-
"./diagnostics-*"
|
|
269
|
+
"./diagnostics-*",
|
|
270
|
+
"./themeReveal-*"
|
|
258
271
|
],
|
|
259
272
|
"gzip": true,
|
|
260
|
-
"limit": "
|
|
273
|
+
"limit": "38.10 KB"
|
|
261
274
|
},
|
|
262
275
|
{
|
|
263
276
|
"name": "Skeleton",
|
|
@@ -265,10 +278,11 @@
|
|
|
265
278
|
"ignore": [
|
|
266
279
|
"react",
|
|
267
280
|
"react-dom",
|
|
268
|
-
"./diagnostics-*"
|
|
281
|
+
"./diagnostics-*",
|
|
282
|
+
"./themeReveal-*"
|
|
269
283
|
],
|
|
270
284
|
"gzip": true,
|
|
271
|
-
"limit": "
|
|
285
|
+
"limit": "37.44 KB"
|
|
272
286
|
},
|
|
273
287
|
{
|
|
274
288
|
"name": "Tabs",
|
|
@@ -276,10 +290,11 @@
|
|
|
276
290
|
"ignore": [
|
|
277
291
|
"react",
|
|
278
292
|
"react-dom",
|
|
279
|
-
"./diagnostics-*"
|
|
293
|
+
"./diagnostics-*",
|
|
294
|
+
"./themeReveal-*"
|
|
280
295
|
],
|
|
281
296
|
"gzip": true,
|
|
282
|
-
"limit": "
|
|
297
|
+
"limit": "40.06 KB"
|
|
283
298
|
},
|
|
284
299
|
{
|
|
285
300
|
"name": "Slider",
|
|
@@ -287,10 +302,11 @@
|
|
|
287
302
|
"ignore": [
|
|
288
303
|
"react",
|
|
289
304
|
"react-dom",
|
|
290
|
-
"./diagnostics-*"
|
|
305
|
+
"./diagnostics-*",
|
|
306
|
+
"./themeReveal-*"
|
|
291
307
|
],
|
|
292
308
|
"gzip": true,
|
|
293
|
-
"limit": "
|
|
309
|
+
"limit": "39.22 KB"
|
|
294
310
|
},
|
|
295
311
|
{
|
|
296
312
|
"name": "Progress",
|
|
@@ -298,10 +314,11 @@
|
|
|
298
314
|
"ignore": [
|
|
299
315
|
"react",
|
|
300
316
|
"react-dom",
|
|
301
|
-
"./diagnostics-*"
|
|
317
|
+
"./diagnostics-*",
|
|
318
|
+
"./themeReveal-*"
|
|
302
319
|
],
|
|
303
320
|
"gzip": true,
|
|
304
|
-
"limit": "
|
|
321
|
+
"limit": "37.41 KB"
|
|
305
322
|
},
|
|
306
323
|
{
|
|
307
324
|
"name": "Toaster",
|
|
@@ -309,10 +326,11 @@
|
|
|
309
326
|
"ignore": [
|
|
310
327
|
"react",
|
|
311
328
|
"react-dom",
|
|
312
|
-
"./diagnostics-*"
|
|
329
|
+
"./diagnostics-*",
|
|
330
|
+
"./themeReveal-*"
|
|
313
331
|
],
|
|
314
332
|
"gzip": true,
|
|
315
|
-
"limit": "40.
|
|
333
|
+
"limit": "40.84 KB"
|
|
316
334
|
},
|
|
317
335
|
{
|
|
318
336
|
"name": "Combobox",
|
|
@@ -320,10 +338,11 @@
|
|
|
320
338
|
"ignore": [
|
|
321
339
|
"react",
|
|
322
340
|
"react-dom",
|
|
323
|
-
"./diagnostics-*"
|
|
341
|
+
"./diagnostics-*",
|
|
342
|
+
"./themeReveal-*"
|
|
324
343
|
],
|
|
325
344
|
"gzip": true,
|
|
326
|
-
"limit": "
|
|
345
|
+
"limit": "46.65 KB"
|
|
327
346
|
},
|
|
328
347
|
{
|
|
329
348
|
"name": "Dashboard",
|
|
@@ -331,10 +350,11 @@
|
|
|
331
350
|
"ignore": [
|
|
332
351
|
"react",
|
|
333
352
|
"react-dom",
|
|
334
|
-
"./diagnostics-*"
|
|
353
|
+
"./diagnostics-*",
|
|
354
|
+
"./themeReveal-*"
|
|
335
355
|
],
|
|
336
356
|
"gzip": true,
|
|
337
|
-
"limit": "
|
|
357
|
+
"limit": "43.06 KB"
|
|
338
358
|
},
|
|
339
359
|
{
|
|
340
360
|
"name": "DataGrid",
|
|
@@ -342,10 +362,11 @@
|
|
|
342
362
|
"ignore": [
|
|
343
363
|
"react",
|
|
344
364
|
"react-dom",
|
|
345
|
-
"./diagnostics-*"
|
|
365
|
+
"./diagnostics-*",
|
|
366
|
+
"./themeReveal-*"
|
|
346
367
|
],
|
|
347
368
|
"gzip": true,
|
|
348
|
-
"limit": "
|
|
369
|
+
"limit": "89.79 KB"
|
|
349
370
|
},
|
|
350
371
|
{
|
|
351
372
|
"name": "DataGrid export, the chunk fetched on the first press",
|
|
@@ -353,7 +374,8 @@
|
|
|
353
374
|
"ignore": [
|
|
354
375
|
"react",
|
|
355
376
|
"react-dom",
|
|
356
|
-
"./diagnostics-*"
|
|
377
|
+
"./diagnostics-*",
|
|
378
|
+
"./themeReveal-*"
|
|
357
379
|
],
|
|
358
380
|
"gzip": true,
|
|
359
381
|
"limit": "3.8 KB"
|
|
@@ -364,10 +386,11 @@
|
|
|
364
386
|
"ignore": [
|
|
365
387
|
"react",
|
|
366
388
|
"react-dom",
|
|
367
|
-
"./diagnostics-*"
|
|
389
|
+
"./diagnostics-*",
|
|
390
|
+
"./themeReveal-*"
|
|
368
391
|
],
|
|
369
392
|
"gzip": true,
|
|
370
|
-
"limit": "
|
|
393
|
+
"limit": "120.52 KB"
|
|
371
394
|
}
|
|
372
395
|
],
|
|
373
396
|
"repository": {
|
|
@@ -407,7 +430,7 @@
|
|
|
407
430
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
408
431
|
},
|
|
409
432
|
"dependencies": {
|
|
410
|
-
"@box-kite/core": "2.2.
|
|
433
|
+
"@box-kite/core": "2.2.3",
|
|
411
434
|
"csstype": "^3.2.3",
|
|
412
435
|
"use-sync-external-store": "^1.6.0"
|
|
413
436
|
},
|
package/react/theme/theme.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { ThemeTransition } from '@box-kite/core';
|
|
2
3
|
import { BoxStyleProps } from '@box-kite/core/types';
|
|
3
4
|
interface ThemeProps {
|
|
4
5
|
children: React.ReactNode;
|
|
@@ -13,15 +14,16 @@ interface ThemeProps {
|
|
|
13
14
|
*/
|
|
14
15
|
globalStyles?: BoxStyleProps;
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
17
|
+
* Animate a theme change where the browser has view transitions: `true` or `'fade'` cross-fades the page,
|
|
18
|
+
* `'reveal'` grows the new theme out of the control that was pressed (or focused) as a circle. Off by
|
|
19
|
+
* default, because a transition is a decision about the app rather than about theming.
|
|
18
20
|
*
|
|
19
21
|
* It exists as a prop rather than a recipe because the recipe has a trap in it: `startViewTransition`
|
|
20
22
|
* screenshots the page the moment its callback returns, and a `setState` has not rendered by then — so
|
|
21
23
|
* a hand-rolled version captures the old theme twice and nothing appears to change. This flushes the
|
|
22
24
|
* update inside the callback. Reduced motion skips the transition and keeps the theme change.
|
|
23
25
|
*/
|
|
24
|
-
viewTransition?: boolean;
|
|
26
|
+
viewTransition?: boolean | ThemeTransition;
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
29
|
* The React binding for the theme system. Everything that actually touches the platform — reading
|