@newtone-dev/ui-react-web 0.2.0 → 0.5.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/README.md +40 -14
- package/dist/action/action.css +64 -5
- package/dist/action/action.d.ts +22 -1
- package/dist/action/action.d.ts.map +1 -1
- package/dist/action/action.js +16 -2
- package/dist/action/action.js.map +1 -1
- package/dist/button/button.css +81 -5
- package/dist/button/button.d.ts +24 -1
- package/dist/button/button.d.ts.map +1 -1
- package/dist/button/button.js +12 -2
- package/dist/button/button.js.map +1 -1
- package/dist/control/control.css +49 -23
- package/dist/control/control.d.ts +33 -9
- package/dist/control/control.d.ts.map +1 -1
- package/dist/control/control.js +31 -17
- package/dist/control/control.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/navbar/link/drawer/drawer.css +4 -3
- package/dist/navbar/link/link.css +15 -3
- package/dist/navbar/menu-button/menu-button.css +10 -3
- package/dist/navbar/navbar.css +186 -4
- package/dist/navbar/navbar.d.ts +33 -1
- package/dist/navbar/navbar.d.ts.map +1 -1
- package/dist/navbar/navbar.js +4 -2
- package/dist/navbar/navbar.js.map +1 -1
- package/dist/page/band.d.ts +52 -0
- package/dist/page/band.d.ts.map +1 -0
- package/dist/page/band.js +36 -0
- package/dist/page/band.js.map +1 -0
- package/dist/page/index.d.ts +4 -0
- package/dist/page/index.d.ts.map +1 -0
- package/dist/page/index.js +8 -0
- package/dist/page/index.js.map +1 -0
- package/dist/page/page.css +240 -0
- package/dist/page/page.d.ts +137 -0
- package/dist/page/page.d.ts.map +1 -0
- package/dist/page/page.js +29 -0
- package/dist/page/page.js.map +1 -0
- package/dist/quick-action/quick-action.css +36 -7
- package/dist/quick-action/quick-action.d.ts +26 -6
- package/dist/quick-action/quick-action.d.ts.map +1 -1
- package/dist/quick-action/quick-action.js +11 -7
- package/dist/quick-action/quick-action.js.map +1 -1
- package/dist/wrapper/wrapper.d.ts +11 -2
- package/dist/wrapper/wrapper.d.ts.map +1 -1
- package/dist/wrapper/wrapper.js +5 -1
- package/dist/wrapper/wrapper.js.map +1 -1
- package/package.json +6 -1
|
@@ -6,11 +6,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
*
|
|
7
7
|
* ---- it does not position itself, and is not named for where it sits ------
|
|
8
8
|
*
|
|
9
|
-
* Whatever pins it -- a corner, a safe-area inset, a dock -- belongs to the page that placed it.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* `
|
|
9
|
+
* Whatever pins it -- a corner, a safe-area inset, a dock -- belongs to the page that placed it. A
|
|
10
|
+
* component called `FloatingButton` would be carrying a word about a slot it does not own.
|
|
11
|
+
*
|
|
12
|
+
* `--newtone-quick-action-size` WAS THE ONE PROPERTY A CALLER RETUNED, and it is **deleted** rather
|
|
13
|
+
* than kept beside `size` -- two ways to say one thing, and the knob had zero call sites anywhere.
|
|
14
|
+
* That is issues/open/201 arriving early: a consumer writes no Newtone property, and what replaces
|
|
15
|
+
* one is a prop.
|
|
14
16
|
*
|
|
15
17
|
* ---- NOTHING RENDERS ONE, and that is recorded rather than smoothed over --
|
|
16
18
|
*
|
|
@@ -43,8 +45,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
43
45
|
* is genuinely weaker than the component it came from, and the fix is a vocabulary rather than
|
|
44
46
|
* anything in this folder -- `newtone_ui_tokens.md` section 8, *Shadows, blur, spread*.
|
|
45
47
|
*/
|
|
46
|
-
export function QuickAction({ label, children, className, ...rest }) {
|
|
47
|
-
const classes = ['newtone-quick-action', className]
|
|
48
|
+
export function QuickAction({ label, children, size = 'lg', className, ...rest }) {
|
|
49
|
+
const classes = ['newtone-quick-action', `newtone-quick-action--${size}`, className]
|
|
50
|
+
.filter(Boolean)
|
|
51
|
+
.join(' ');
|
|
48
52
|
if (rest.href !== undefined) {
|
|
49
53
|
const { href, ...anchor } = rest;
|
|
50
54
|
return (_jsx("a", { href: href, className: classes, "aria-label": label, ...anchor, children: children }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quick-action.js","sourceRoot":"","sources":["../../src/quick-action/quick-action.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"quick-action.js","sourceRoot":"","sources":["../../src/quick-action/quick-action.tsx"],"names":[],"mappings":";AA+CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,UAAU,WAAW,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,IAAI,GAAG,IAAI,EACX,SAAS,EACT,GAAG,IAAI,EACQ;IACf,MAAM,OAAO,GAAG,CAAC,sBAAsB,EAAE,yBAAyB,IAAI,EAAE,EAAE,SAAS,CAAC;SAC/E,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAA;IAEd,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,GAAG,IAG3B,CAAA;QACD,OAAO,CACH,YAAG,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,gBAAc,KAAK,KAAM,MAAM,YAC3D,QAAQ,GACT,CACP,CAAA;IACL,CAAC;IAED,OAAO,CACH,iBACI,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,OAAO,gBACN,KAAK,KACZ,IAAgD,YAEpD,QAAQ,GACJ,CACZ,CAAA;AACL,CAAC"}
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { type ElementType, type HTMLAttributes } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* A step on the tokens' spacing scale. These
|
|
3
|
+
* A step on the tokens' spacing scale. These fourteen are the ones `newtone_ui_tokens` emits as
|
|
4
4
|
* `--newtone-space-*`; there is no 7 and no 9.
|
|
5
5
|
*
|
|
6
6
|
* **A step that is not on this list resolves to nothing and the declaration is dropped, in
|
|
7
7
|
* silence** -- `var(--newtone-space-7)` is not an error, it is an undefined custom property with
|
|
8
8
|
* no fallback. That is why this union is closed rather than `number`, and why the blueprint's
|
|
9
9
|
* section 5 carries a one-line check comparing it against the emitted stylesheet.
|
|
10
|
+
*
|
|
11
|
+
* `'2-5'` IS 10px, THE SCALE'S ONE HALF-STEP, AND IT IS A STRING BECAUSE THE EMITTED NAME IS.
|
|
12
|
+
* It arrived 2026-09-21 for the control ladder's 40px rung -- 20 of leading and 10 each side, and
|
|
13
|
+
* the quarter-rem grid has 8 and 12 and nothing between. The key is spelled `2-5` everywhere: in
|
|
14
|
+
* the token source, in the reference, in `--newtone-space-2-5` and here. **`2.5` would have been
|
|
15
|
+
* the obvious spelling and it needs three translations** -- a token reference is split on `.`, a
|
|
16
|
+
* custom property name is a `<dashed-ident>` and `.` is not an ident code point, and the
|
|
17
|
+
* interpolation below would have emitted a name nothing declares. One spelling costs none of them.
|
|
18
|
+
* newtone_ui_tokens.md section 3.
|
|
10
19
|
*/
|
|
11
|
-
export type SpaceStep = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24;
|
|
20
|
+
export type SpaceStep = 0 | 1 | 2 | '2-5' | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24;
|
|
12
21
|
export type WrapperDirection = 'row' | 'column';
|
|
13
22
|
/**
|
|
14
23
|
* Where the contents sit, as one of the nine positions of a 3x3 grid.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../src/wrapper/wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAEhG
|
|
1
|
+
{"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../src/wrapper/wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,W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,0FAiBd"}
|
package/dist/wrapper/wrapper.js
CHANGED
|
@@ -73,7 +73,11 @@ export function Wrapper({ direction = 'column', gap, padding, align, wrap, as =
|
|
|
73
73
|
function resolvePadding(padding) {
|
|
74
74
|
if (padding === undefined)
|
|
75
75
|
return {};
|
|
76
|
-
|
|
76
|
+
// NOT `typeof padding === 'number'`. `SpaceStep` gained the string `'2-5'` on 2026-09-21 -- the
|
|
77
|
+
// scale's one half-step, spelled the way the emitted custom property is -- and a number test
|
|
78
|
+
// sends it to the object branch, where `.block` does not exist. The discriminator is whether
|
|
79
|
+
// this is the pair, so that is what is asked.
|
|
80
|
+
if (typeof padding !== 'object')
|
|
77
81
|
return { padding: SPACE(padding) };
|
|
78
82
|
return {
|
|
79
83
|
...(padding.block !== undefined ? { paddingBlock: SPACE(padding.block) } : null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapper.js","sourceRoot":"","sources":["../../src/wrapper/wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA6D,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"wrapper.js","sourceRoot":"","sources":["../../src/wrapper/wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA6D,MAAM,OAAO,CAAA;AA6FhG,MAAM,KAAK,GAAG,CAAC,IAAe,EAAE,EAAE,CAAC,uBAAuB,IAAI,GAAG,CAAA;AAEjE,MAAM,IAAI,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAW,CAAA;AAEhF;;;;GAIG;AACH,SAAS,YAAY,CAAC,KAAmB,EAAE,SAA2B;IAClE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;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AK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAClD,sFAAsF;QACtF,GAAG,KAAK;KACX,CAAA;IAED,OAAO,aAAa,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,CAAA;AACxD,CAAC;AAED,SAAS,cAAc,CAAC,OAAmC;IACvD,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,EAAE,CAAA;IACpC,gGAAgG;IAChG,6FAA6F;IAC7F,6FAA6F;IAC7F,8CAA8C;IAC9C,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,CAAA;IACnE,OAAO;QACH,GAAG,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QAChF,GAAG,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KACtF,CAAA;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newtone-dev/ui-react-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -89,6 +89,10 @@
|
|
|
89
89
|
"types": "./dist/numbered-list/index.d.ts",
|
|
90
90
|
"default": "./dist/numbered-list/index.js"
|
|
91
91
|
},
|
|
92
|
+
"./page": {
|
|
93
|
+
"types": "./dist/page/index.d.ts",
|
|
94
|
+
"default": "./dist/page/index.js"
|
|
95
|
+
},
|
|
92
96
|
"./quick-action": {
|
|
93
97
|
"types": "./dist/quick-action/index.d.ts",
|
|
94
98
|
"default": "./dist/quick-action/index.js"
|
|
@@ -141,6 +145,7 @@
|
|
|
141
145
|
"./navbar.css": "./dist/navbar/navbar.css",
|
|
142
146
|
"./numbered-list.css": "./dist/numbered-list/numbered-list.css",
|
|
143
147
|
"./on-media.css": "./dist/on-media/on-media.css",
|
|
148
|
+
"./page.css": "./dist/page/page.css",
|
|
144
149
|
"./quick-action.css": "./dist/quick-action/quick-action.css",
|
|
145
150
|
"./segmented-control.css": "./dist/segmented-control/segmented-control.css",
|
|
146
151
|
"./stat-card.css": "./dist/stat-card/stat-card.css",
|