@box-kite/react 2.3.0 → 2.4.0
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 +58 -92
- package/.claude/skills/box-kite/SKILL.md +81 -114
- package/.claude/skills/box-kite/references/components.md +1 -1
- package/.claude/skills/box-kite/references/patterns.md +1 -1
- package/.claude/skills/box-kite/references/rules.md +115 -0
- package/.claude/skills/box-kite/references/styling.md +2 -2
- package/.cursor/rules/box-kite.mdc +61 -95
- package/AGENTS.md +62 -96
- package/BOX_AI_CONTEXT.md +82 -78
- package/BOX_KITE_AI_CONTEXT.md +82 -78
- package/README.md +201 -716
- package/catalog.cjs +1 -1
- package/catalog.mjs +3 -0
- package/client.cjs +1 -1
- package/client.mjs +81 -81
- package/components/combobox/comboboxListbox.d.ts +2 -1
- package/components/combobox.cjs +1 -1
- package/components/combobox.d.ts +1 -1
- package/components/combobox.mjs +199 -188
- package/components/dataGrid/components/dataGridFooter.d.ts +6 -2
- package/components/dataGrid/contracts/dataGridContract.d.ts +2 -1
- package/components/dataGrid/models/gridModel.d.ts +21 -2
- package/components/dataGrid/models/groupRowModel.d.ts +1 -1
- package/components/dataGrid/models/rowModel.d.ts +1 -1
- package/components/dataGrid/models/sourceGroupRowModel.d.ts +5 -1
- package/components/dataGrid/models/sourceRowModel.d.ts +5 -1
- package/components/dataGrid/useListLayout.d.ts +1 -1
- package/components/dataGrid.cjs +3 -3
- package/components/dataGrid.mjs +732 -682
- package/components/radioGroup.cjs +1 -1
- package/components/radioGroup.mjs +1 -0
- package/components/semantics.d.ts +29 -29
- package/components/skeleton.cjs +1 -1
- package/components/skeleton.d.ts +1 -1
- package/components/skeleton.mjs +2 -1
- package/components/sortableList.cjs +1 -1
- package/components/sortableList.mjs +1 -1
- package/components/svg.d.ts +2 -2
- package/components/swipeItem.cjs +1 -1
- package/components/swipeItem.mjs +1 -1
- package/components/textarea.d.ts +1 -1
- package/components/textbox.d.ts +1 -1
- package/components/timeZoneSelect.d.ts +1 -1
- package/components/toaster.cjs +1 -1
- package/components/toaster.mjs +13 -14
- package/dataGridList.cjs +1 -1
- package/dataGridList.mjs +3 -5
- package/docs/a11y.md +1 -2
- package/docs/index.md +1 -1
- package/docs/props.md +43 -19
- package/effects.cjs +1 -1
- package/effects.mjs +2 -2
- package/identity.cjs +1 -1
- package/identity.mjs +5 -7
- package/package.json +12 -12
- package/react/effects.d.ts +5 -6
- package/react/identity/useIdentifier.d.ts +0 -3
package/docs/props.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Every prop (
|
|
1
|
+
# Every prop (238)
|
|
2
2
|
|
|
3
3
|
Generated from the prop registry of `@box-kite/react`. The description is the prop's own doc comment and the example is **measured** — the CSS beside a value is what the engine emits for it, not what a doc claims. Alphabetical; the registry's own order is what decides the cascade and is not this.
|
|
4
4
|
|
|
@@ -642,11 +642,11 @@ The cursor CSS property sets the mouse cursor, if any, to show when the mouse po
|
|
|
642
642
|
|
|
643
643
|
### `cx`
|
|
644
644
|
|
|
645
|
-
The centre of a `<circle>` or `<ellipse>`, horizontally, in user units. Real CSS, so unlike the attribute it transitions — moving a point on hover is one prop and no JavaScript.
|
|
645
|
+
The centre of a `<circle>` or `<ellipse>`, horizontally, in user units. Real CSS, so unlike the attribute it transitions — moving a point on hover is one prop and no JavaScript. Written in `px`, which is a user unit: Firefox and Safari drop a bare number here, and so does every geometry prop (bug #330).
|
|
646
646
|
|
|
647
647
|
- Writes: `cx`
|
|
648
648
|
- Values: a number, anything else the types allow
|
|
649
|
-
- Example: `cx={4}` → `cx:
|
|
649
|
+
- Example: `cx={4}` → `cx: 4px`
|
|
650
650
|
|
|
651
651
|
### `cy`
|
|
652
652
|
|
|
@@ -654,7 +654,7 @@ The cy CSS property positions the centre of a `<circle>` or an `<ellipse>` verti
|
|
|
654
654
|
|
|
655
655
|
- Writes: `cy`
|
|
656
656
|
- Values: a number, anything else the types allow
|
|
657
|
-
- Example: `cy={4}` → `cy:
|
|
657
|
+
- Example: `cy={4}` → `cy: 4px`
|
|
658
658
|
|
|
659
659
|
### `d`
|
|
660
660
|
|
|
@@ -1242,10 +1242,10 @@ The padding CSS shorthand property sets the padding area on all four sides of an
|
|
|
1242
1242
|
|
|
1243
1243
|
### `paintOrder`
|
|
1244
1244
|
|
|
1245
|
-
The paint-order CSS property sets what is painted first. `paintOrder="stroke"` puts the stroke behind the fill, which is how outlined SVG text stays legible.
|
|
1245
|
+
The paint-order CSS property sets what is painted first. `paintOrder="stroke"` puts the stroke behind the fill, which is how outlined SVG text stays legible. Up to three keywords in the order they paint (`'stroke fill markers'`); the ones left out follow in their usual order.
|
|
1246
1246
|
|
|
1247
1247
|
- Writes: `paint-order`
|
|
1248
|
-
- Values: `normal` · `fill` · `stroke` · `markers`
|
|
1248
|
+
- Values: `normal` · `fill` · `stroke` · `markers` · `fill stroke` · `fill markers` · `stroke fill` · `stroke markers` · `markers fill` · `markers stroke` · `fill stroke markers` · `fill markers stroke` · `stroke fill markers` · `stroke markers fill` · `markers fill stroke` · `markers stroke fill`
|
|
1249
1249
|
- Example: `paintOrder="normal"` → `paint-order: normal`
|
|
1250
1250
|
|
|
1251
1251
|
### `pb`
|
|
@@ -1290,10 +1290,10 @@ The place-items CSS shorthand sets `align-items` and `justify-items` in one decl
|
|
|
1290
1290
|
|
|
1291
1291
|
### `pointerEvents`
|
|
1292
1292
|
|
|
1293
|
-
The pointer-events CSS property sets under what circumstances (if any) a particular graphic element can become the target of pointer events.
|
|
1293
|
+
The pointer-events CSS property sets under what circumstances (if any) a particular graphic element can become the target of pointer events. On SVG the keywords say which part takes the press: `visibleStroke` over a wide transparent stroke is an edge's hit area. `bounding-box` is not in Firefox, which falls back to `visiblePainted`.
|
|
1294
1294
|
|
|
1295
1295
|
- Writes: `pointer-events`
|
|
1296
|
-
- Values: `none` · `auto` · `all`
|
|
1296
|
+
- Values: `none` · `auto` · `all` · `visiblePainted` · `visibleFill` · `visibleStroke` · `visible` · `painted` · `fill` · `stroke` · `bounding-box`
|
|
1297
1297
|
- Example: `pointerEvents="none"` → `pointer-events: none`
|
|
1298
1298
|
|
|
1299
1299
|
### `position`
|
|
@@ -1390,7 +1390,7 @@ The r CSS property sets the radius of a `<circle>`, in user units. Transition it
|
|
|
1390
1390
|
|
|
1391
1391
|
- Writes: `r`
|
|
1392
1392
|
- Values: a number, anything else the types allow
|
|
1393
|
-
- Example: `r={4}` → `r:
|
|
1393
|
+
- Example: `r={4}` → `r: 4px`
|
|
1394
1394
|
|
|
1395
1395
|
### `resize`
|
|
1396
1396
|
|
|
@@ -1446,7 +1446,7 @@ The horizontal radius of an `<ellipse>` or corner radius of a `<rect>` — `bord
|
|
|
1446
1446
|
|
|
1447
1447
|
- Writes: `rx`
|
|
1448
1448
|
- Values: `auto`, a number, anything else the types allow
|
|
1449
|
-
- Example: `rx={4}` → `rx:
|
|
1449
|
+
- Example: `rx={4}` → `rx: 4px`
|
|
1450
1450
|
|
|
1451
1451
|
### `ry`
|
|
1452
1452
|
|
|
@@ -1454,7 +1454,7 @@ The ry CSS property sets the vertical radius of an `<ellipse>` or the vertical c
|
|
|
1454
1454
|
|
|
1455
1455
|
- Writes: `ry`
|
|
1456
1456
|
- Values: `auto`, a number, anything else the types allow
|
|
1457
|
-
- Example: `ry={4}` → `ry:
|
|
1457
|
+
- Example: `ry={4}` → `ry: 4px`
|
|
1458
1458
|
|
|
1459
1459
|
### `saturate`
|
|
1460
1460
|
|
|
@@ -1562,10 +1562,10 @@ The stroke CSS property defines the color or SVG paint server used to draw an el
|
|
|
1562
1562
|
|
|
1563
1563
|
### `strokeDasharray`
|
|
1564
1564
|
|
|
1565
|
-
The stroke-dasharray CSS property turns an SVG stroke into dashes: a single number is the dash and the gap alike, a string is the full pattern (`'8 4'`). Lengths are user units.
|
|
1565
|
+
The stroke-dasharray CSS property turns an SVG stroke into dashes: a single number is the dash and the gap alike, a string is the full pattern (`'8 4'`). Lengths are user units. `dashed` (four widths on, two off) and `dotted` (one on, one off) follow the `strokeWidth` prop, so a thicker line keeps its pattern.
|
|
1566
1566
|
|
|
1567
1567
|
- Writes: `stroke-dasharray`
|
|
1568
|
-
- Values: a number, anything else the types allow
|
|
1568
|
+
- Values: `dashed` · `dotted`, a number, anything else the types allow
|
|
1569
1569
|
- Example: `strokeDasharray={4}` → `stroke-dasharray: 4`
|
|
1570
1570
|
|
|
1571
1571
|
### `strokeDashoffset`
|
|
@@ -1610,11 +1610,11 @@ The stroke-opacity CSS property defines the opacity of the paint applied to an S
|
|
|
1610
1610
|
|
|
1611
1611
|
### `strokeWidth`
|
|
1612
1612
|
|
|
1613
|
-
The stroke-width CSS property sets the width of an SVG element's stroke, in user units — `strokeWidth={2}` is `stroke-width: 2`, no divider.
|
|
1613
|
+
The stroke-width CSS property sets the width of an SVG element's stroke, in user units — `strokeWidth={2}` is `stroke-width: 2`, no divider. It also sets `--boxStrokeWidth`, which `strokeDasharray="dashed"` scales with. Firefox drops a unitless one inside `calc()`, hence the `px`.
|
|
1614
1614
|
|
|
1615
|
-
- Writes: `stroke-width`
|
|
1615
|
+
- Writes: `--boxStrokeWidth`, `stroke-width`
|
|
1616
1616
|
- Values: a number
|
|
1617
|
-
- Example: `strokeWidth={4}` →
|
|
1617
|
+
- Example: `strokeWidth={4}` → `--boxStrokeWidth: 4px; stroke-width: 4`
|
|
1618
1618
|
|
|
1619
1619
|
### `tableLayout`
|
|
1620
1620
|
|
|
@@ -1704,6 +1704,30 @@ The top CSS property sets the vertical position of a positioned element. This in
|
|
|
1704
1704
|
- Values: 55 named values, a number, anything else the types allow
|
|
1705
1705
|
- Example: `top={4}` → `top: 1rem`
|
|
1706
1706
|
|
|
1707
|
+
### `touchAction`
|
|
1708
|
+
|
|
1709
|
+
The touch-action CSS property sets which gestures the browser keeps for itself on a touch screen: `none` hands every press to the page, which is what a drag needs, and `pan-y` keeps the vertical scroll while a sideways swipe is the page's.
|
|
1710
|
+
|
|
1711
|
+
- Writes: `touch-action`
|
|
1712
|
+
- Values: `auto` · `none` · `manipulation` · `pan-x` · `pan-y` · `pinch-zoom` · `pan-x pan-y` · `pan-x pinch-zoom` · `pan-y pinch-zoom` · `pan-x pan-y pinch-zoom`
|
|
1713
|
+
- Example: `touchAction="auto"` → `touch-action: auto`
|
|
1714
|
+
|
|
1715
|
+
### `transformBox`
|
|
1716
|
+
|
|
1717
|
+
The box `transformOrigin` is measured in. An SVG shape's default is `view-box`, so it turns about the viewBox's corner; `transformBox="fill-box"` with `transformOrigin="center"` turns it about its own centre.
|
|
1718
|
+
|
|
1719
|
+
- Writes: `transform-box`
|
|
1720
|
+
- Values: `content-box` · `border-box` · `fill-box` · `stroke-box` · `view-box`
|
|
1721
|
+
- Example: `transformBox="content-box"` → `transform-box: content-box`
|
|
1722
|
+
|
|
1723
|
+
### `transformOrigin`
|
|
1724
|
+
|
|
1725
|
+
The point `rotate` and `scale` turn about: a keyword (`'center'`, `'top left'`), a fraction or a percentage, a number on the ÷4 scale, or two or three positions as CSS writes them (`'48px 48px'`, `'1/2 1/4'`).
|
|
1726
|
+
|
|
1727
|
+
- Writes: `transform-origin`
|
|
1728
|
+
- Values: a number, anything else the types allow
|
|
1729
|
+
- Example: `transformOrigin={4}` → `transform-origin: 1rem`
|
|
1730
|
+
|
|
1707
1731
|
### `transition`
|
|
1708
1732
|
|
|
1709
1733
|
What a transition applies to: `all` (what the base class already does), `none`, or one of the property groups — `colors`, `opacity`, `shadow`, `transform`, `size`, `filter`.
|
|
@@ -1866,11 +1890,11 @@ The will-change CSS property warns the browser that a property is about to chang
|
|
|
1866
1890
|
|
|
1867
1891
|
### `x`
|
|
1868
1892
|
|
|
1869
|
-
Positions a `<rect>`, `<image>`, `<use>`, `<foreignObject>` or nested `<svg>` horizontally, in user units. Not `<text>`, whose `x` takes a list of positions
|
|
1893
|
+
Positions a `<rect>`, `<image>`, `<use>`, `<foreignObject>` or nested `<svg>` horizontally, in user units. Not `<text>`, whose `x` takes a list of positions: `<SvgText x={4}>` writes it as the attribute.
|
|
1870
1894
|
|
|
1871
1895
|
- Writes: `x`
|
|
1872
1896
|
- Values: a number, anything else the types allow
|
|
1873
|
-
- Example: `x={4}` → `x:
|
|
1897
|
+
- Example: `x={4}` → `x: 4px`
|
|
1874
1898
|
|
|
1875
1899
|
### `y`
|
|
1876
1900
|
|
|
@@ -1878,7 +1902,7 @@ The y CSS property positions a `<rect>`, `<image>`, `<use>`, `<foreignObject>` o
|
|
|
1878
1902
|
|
|
1879
1903
|
- Writes: `y`
|
|
1880
1904
|
- Values: a number, anything else the types allow
|
|
1881
|
-
- Example: `y={4}` → `y:
|
|
1905
|
+
- Example: `y={4}` → `y: 4px`
|
|
1882
1906
|
|
|
1883
1907
|
### `zIndex`
|
|
1884
1908
|
|
package/effects.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./
|
|
1
|
+
const e=require("./platform.cjs");let t=require("react");var n=e.i(),r=n?t.useLayoutEffect:t.useEffect,i=n?t.useInsertionEffect:t.useEffect;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|
package/effects.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as e } from "./platform.mjs";
|
|
2
|
-
import
|
|
2
|
+
import { useEffect as t, useInsertionEffect as n, useLayoutEffect as r } from "react";
|
|
3
3
|
//#region src/react/effects.ts
|
|
4
|
-
var i = e(), a = i ? r :
|
|
4
|
+
var i = e(), a = i ? r : t, o = i ? n : t;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { a as n, o as t };
|
package/identity.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
let e=require("react");function t(e){return e.replace(/[^\w-]/g,``)}function n(n=`box`){return`${n}-${t((0,e.useId)())}`}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
|
package/identity.mjs
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useId as e } from "react";
|
|
2
2
|
//#region src/react/identity/useIdentifier.ts
|
|
3
|
-
|
|
4
|
-
function i(e) {
|
|
3
|
+
function t(e) {
|
|
5
4
|
return e.replace(/[^\w-]/g, "");
|
|
6
5
|
}
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
return `${e}-${a ? i(a) : o}`;
|
|
6
|
+
function n(n = "box") {
|
|
7
|
+
return `${n}-${t(e())}`;
|
|
10
8
|
}
|
|
11
9
|
//#endregion
|
|
12
|
-
export {
|
|
10
|
+
export { n as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box-kite/react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"pages/**"
|
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
"docs:components": "node scripts/check-components-api.mjs --fix",
|
|
105
105
|
"check:catalog": "node scripts/check-catalog-api.mjs",
|
|
106
106
|
"docs:catalog": "node scripts/check-catalog-api.mjs --fix",
|
|
107
|
+
"check:csstype": "node scripts/check-csstype.mjs",
|
|
108
|
+
"docs:csstype": "node scripts/check-csstype.mjs --fix",
|
|
107
109
|
"check:create": "node scripts/check-create-templates.mjs",
|
|
108
110
|
"docs:create": "node scripts/check-create-templates.mjs --fix",
|
|
109
111
|
"check:conventions": "node scripts/check-component-conventions.mjs",
|
|
@@ -548,7 +550,7 @@
|
|
|
548
550
|
"../dataGridDateParts.mjs"
|
|
549
551
|
],
|
|
550
552
|
"gzip": true,
|
|
551
|
-
"limit": "
|
|
553
|
+
"limit": "100.21 kB"
|
|
552
554
|
},
|
|
553
555
|
{
|
|
554
556
|
"name": "Interaction delivery, the chunk the first Box.onInteraction fetches",
|
|
@@ -614,7 +616,7 @@
|
|
|
614
616
|
"./interactionListening.mjs"
|
|
615
617
|
],
|
|
616
618
|
"gzip": true,
|
|
617
|
-
"limit": "
|
|
619
|
+
"limit": "170.45 kB"
|
|
618
620
|
}
|
|
619
621
|
],
|
|
620
622
|
"repository": {
|
|
@@ -648,15 +650,10 @@
|
|
|
648
650
|
"url": "https://github.com/box-kite/box-kite/issues"
|
|
649
651
|
},
|
|
650
652
|
"homepage": "https://www.box-kite.dev",
|
|
651
|
-
"description": "One React component
|
|
653
|
+
"description": "One React component that takes CSS properties as typed props and generates atomic CSS at runtime — no CSS files, no build step, renders in a Server Component.",
|
|
652
654
|
"peerDependencies": {
|
|
653
|
-
"react": "
|
|
654
|
-
"react-dom": "
|
|
655
|
-
},
|
|
656
|
-
"dependencies": {
|
|
657
|
-
"@box-kite/core": "2.3.0",
|
|
658
|
-
"csstype": "^3.2.3",
|
|
659
|
-
"use-sync-external-store": "^1.6.0"
|
|
655
|
+
"react": ">=18.0.0",
|
|
656
|
+
"react-dom": ">=18.0.0"
|
|
660
657
|
},
|
|
661
658
|
"devDependencies": {
|
|
662
659
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
@@ -686,13 +683,13 @@
|
|
|
686
683
|
"@types/node": "^26.1.2",
|
|
687
684
|
"@types/react": "^19.2.18",
|
|
688
685
|
"@types/react-dom": "^19.2.4",
|
|
689
|
-
"@types/use-sync-external-store": "^1.5.0",
|
|
690
686
|
"@vitejs/plugin-react": "^6.0.5",
|
|
691
687
|
"@vitest/coverage-v8": "^4.1.11",
|
|
692
688
|
"ag-grid-community": "^36.2.0",
|
|
693
689
|
"ag-grid-react": "^36.2.0",
|
|
694
690
|
"axe-core": "^4.13.0",
|
|
695
691
|
"create-vite": "^9.3.0",
|
|
692
|
+
"csstype": "^3.2.3",
|
|
696
693
|
"eslint": "^10.8.0",
|
|
697
694
|
"eslint-config-prettier": "^10.1.8",
|
|
698
695
|
"eslint-plugin-import-x": "^4.17.1",
|
|
@@ -719,5 +716,8 @@
|
|
|
719
716
|
"vite-plugin-dts": "^5.0.3",
|
|
720
717
|
"vitest": "^4.1.10",
|
|
721
718
|
"zod": "^4.6.5"
|
|
719
|
+
},
|
|
720
|
+
"dependencies": {
|
|
721
|
+
"@box-kite/core": "2.4.0"
|
|
722
722
|
}
|
|
723
723
|
}
|
package/react/effects.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect, useLayoutEffect } from 'react';
|
|
2
2
|
/** A layout effect on the browser, a passive one everywhere else. */
|
|
3
|
-
export declare const useIsomorphicLayoutEffect: typeof
|
|
3
|
+
export declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
4
4
|
/**
|
|
5
|
-
* An insertion effect on the browser
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `getStyles()` flushes for itself, so `useEffect` keeps React quiet.
|
|
5
|
+
* An insertion effect on the browser — React's own recommendation for injecting CSS-in-JS. It runs during
|
|
6
|
+
* the commit ahead of *every* layout effect, so a component measuring its DOM already sees the styles. Off
|
|
7
|
+
* the browser nothing paints and `getStyles()` flushes for itself, so `useEffect` keeps React quiet.
|
|
9
8
|
*/
|
|
10
9
|
export declare const useIsomorphicInsertionEffect: typeof useLayoutEffect;
|
|
@@ -10,8 +10,5 @@
|
|
|
10
10
|
* const id = useIdentifier('select');
|
|
11
11
|
* // `${id}-trigger`, `${id}-listbox`
|
|
12
12
|
* ```
|
|
13
|
-
*
|
|
14
|
-
* On React 16/17 the fallback is a module counter, which cannot match between a server render and
|
|
15
|
-
* the client one — pass ids in explicitly there if the tree is hydrated.
|
|
16
13
|
*/
|
|
17
14
|
export default function useIdentifier(prefix?: string): string;
|