wimui 0.29.9 → 0.30.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/NOTICE +91 -0
- package/README.ja.md +2 -2
- package/README.md +2 -2
- package/dist/components/_internal/IndicatorBase.cjs +1 -1
- package/dist/components/_internal/IndicatorBase.d.ts +1 -1
- package/dist/components/_internal/IndicatorBase.js +1 -1
- package/dist/components/data-display/Card/Card.cjs +1 -1
- package/dist/components/data-display/Card/Card.js +1 -1
- package/dist/components/data-display/Chip/Chip.cjs +1 -1
- package/dist/components/data-display/Chip/Chip.js +1 -1
- package/dist/components/data-display/Stats/Stats.cjs +1 -1
- package/dist/components/data-display/Stats/Stats.js +1 -1
- package/dist/components/feedback/Skeleton/skeleton.module.cjs +1 -1
- package/dist/components/feedback/Skeleton/skeleton.module.js +3 -3
- package/dist/components/layout/BentoGrid/BentoGrid.cjs +1 -1
- package/dist/components/layout/BentoGrid/BentoGrid.d.ts +12 -1
- package/dist/components/layout/BentoGrid/BentoGrid.js +3 -3
- package/dist/components/layout/BentoGrid/bento-grid.module.cjs +1 -1
- package/dist/components/layout/BentoGrid/bento-grid.module.js +6 -1
- package/dist/components/media/Audio/audio.module.cjs +1 -1
- package/dist/components/media/Audio/audio.module.js +2 -2
- package/dist/llms-full.txt +17 -6
- package/dist/llms.txt +14 -3
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +1 -1
- package/package.json +58 -39
package/NOTICE
CHANGED
|
@@ -83,3 +83,94 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
83
83
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
84
84
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
85
85
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
Bundled third-party code
|
|
89
|
+
========================
|
|
90
|
+
|
|
91
|
+
The published package externalises almost every dependency, so consumers get
|
|
92
|
+
those libraries — and their licences — from their own `node_modules`. The
|
|
93
|
+
packages below are the exception: the build copies their source into `dist/`,
|
|
94
|
+
so this package redistributes them and reproduces their notices here.
|
|
95
|
+
|
|
96
|
+
The list is checked on every build — see `npm run check:licenses`. It fails in
|
|
97
|
+
both directions: a package that appears in `dist/node_modules/` without being
|
|
98
|
+
listed here, and an entry here that is no longer bundled.
|
|
99
|
+
|
|
100
|
+
- @radix-ui/react-slot 1.3.3 — MIT — dist/node_modules/@radix-ui/react-slot/
|
|
101
|
+
- @radix-ui/react-compose-refs 1.1.5 — MIT — dist/node_modules/@radix-ui/react-compose-refs/
|
|
102
|
+
- @fullcalendar/core 6.1.21 — MIT — dist/node_modules/@fullcalendar/core/locales/
|
|
103
|
+
(only the ja, pt and pt-br locale files; the library itself is a peer
|
|
104
|
+
dependency and is not bundled)
|
|
105
|
+
|
|
106
|
+
MIT License
|
|
107
|
+
|
|
108
|
+
Copyright (c) 2022 WorkOS
|
|
109
|
+
|
|
110
|
+
(applies to @radix-ui/react-slot and @radix-ui/react-compose-refs)
|
|
111
|
+
|
|
112
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
113
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
114
|
+
in the Software without restriction, including without limitation the rights
|
|
115
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
116
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
117
|
+
furnished to do so, subject to the following conditions:
|
|
118
|
+
|
|
119
|
+
The above copyright notice and this permission notice shall be included in all
|
|
120
|
+
copies or substantial portions of the Software.
|
|
121
|
+
|
|
122
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
123
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
124
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
125
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
126
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
127
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
128
|
+
SOFTWARE.
|
|
129
|
+
|
|
130
|
+
MIT License
|
|
131
|
+
|
|
132
|
+
Copyright (c) 2021 Adam Shaw
|
|
133
|
+
|
|
134
|
+
(applies to @fullcalendar/core)
|
|
135
|
+
|
|
136
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
137
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
138
|
+
in the Software without restriction, including without limitation the rights
|
|
139
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
140
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
141
|
+
furnished to do so, subject to the following conditions:
|
|
142
|
+
|
|
143
|
+
The above copyright notice and this permission notice shall be included in all
|
|
144
|
+
copies or substantial portions of the Software.
|
|
145
|
+
|
|
146
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
147
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
148
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
149
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
150
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
151
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
152
|
+
SOFTWARE.
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
Peer dependencies with conditions beyond attribution
|
|
156
|
+
====================================================
|
|
157
|
+
|
|
158
|
+
Nothing below is bundled — these libraries reach the consumer through their own
|
|
159
|
+
`node_modules`, with their own licence files. No copyright notice is owed here.
|
|
160
|
+
They are listed because they carry a condition a consumer can breach without
|
|
161
|
+
noticing, and because this package's own behaviour with respect to that
|
|
162
|
+
condition is worth stating.
|
|
163
|
+
|
|
164
|
+
React Flow (`@xyflow/react`) — used by `NodeGraph` and `InteractiveGraph`
|
|
165
|
+
React Flow renders an attribution link in the corner of the canvas. Removing
|
|
166
|
+
it requires a React Flow Pro subscription. **This package does not remove
|
|
167
|
+
it.** `hideAttribution` and `proOptions` appear nowhere in this repository;
|
|
168
|
+
the only styling applied to `.react-flow__attribution` is colour and
|
|
169
|
+
background, because the upstream default (#999) falls below WCAG AA on the
|
|
170
|
+
canvas (2.7:1 measured). A consumer who hides the attribution takes on that
|
|
171
|
+
obligation themselves.
|
|
172
|
+
|
|
173
|
+
FullCalendar (`@fullcalendar/*`) — used by `ScheduleView`
|
|
174
|
+
Only the standard packages are used (`core`, `daygrid`, `timegrid`,
|
|
175
|
+
`interaction`), all MIT. FullCalendar's premium plugins are under a separate
|
|
176
|
+
licence and require a key; this package does not use or require them.
|
package/README.ja.md
CHANGED
|
@@ -245,7 +245,7 @@ import { WimProvider } from "wimui";
|
|
|
245
245
|
|
|
246
246
|
- `primary-rgb` は `rgb(...)` で包まない(`11, 110, 79` の形)。
|
|
247
247
|
- ダークの塗り面などで `primary-fill` を独自にしている場合は、必要ならそれも上書きする。
|
|
248
|
-
- トークン一覧は Storybook **Token → Colors** / `
|
|
248
|
+
- トークン一覧は Storybook **Token → Colors** / `docs/design/color.md` を参照。
|
|
249
249
|
|
|
250
250
|
## UI 密度(Density)
|
|
251
251
|
|
|
@@ -426,7 +426,7 @@ npm run scaffold -- <Name> <category> [categoryId]
|
|
|
426
426
|
# 例: npm run scaffold -- MyInput form basic-inputs
|
|
427
427
|
```
|
|
428
428
|
|
|
429
|
-
`src/components/<category>/<Name>/` と `stories/<category>/<Name>/` のボイラープレートを生成します。続けて `src/<category>.ts` への export 追加、翻訳キー、MDX 記述が必要です(詳細は `
|
|
429
|
+
`src/components/<category>/<Name>/` と `stories/<category>/<Name>/` のボイラープレートを生成します。続けて `src/<category>.ts` への export 追加、翻訳キー、MDX 記述が必要です(詳細は `AGENTS.md` / `SKILLS.md`)。
|
|
430
430
|
|
|
431
431
|
### パッケージバージョン確認
|
|
432
432
|
|
package/README.md
CHANGED
|
@@ -243,7 +243,7 @@ Many derivatives (`primary-hover` / `primary-active` / `primary-muted` / `primar
|
|
|
243
243
|
|
|
244
244
|
- Do not wrap `primary-rgb` in `rgb(...)` (use the `11, 110, 79` form).
|
|
245
245
|
- If you customize `primary-fill` (e.g. for dark-mode fills), override it too if needed.
|
|
246
|
-
- For the full token list, see Storybook **Token → Colors** / `
|
|
246
|
+
- For the full token list, see Storybook **Token → Colors** / `docs/design/color.md`.
|
|
247
247
|
|
|
248
248
|
## UI density
|
|
249
249
|
|
|
@@ -424,7 +424,7 @@ npm run scaffold -- <Name> <category> [categoryId]
|
|
|
424
424
|
# e.g. npm run scaffold -- MyInput form basic-inputs
|
|
425
425
|
```
|
|
426
426
|
|
|
427
|
-
Generates boilerplate under `src/components/<category>/<Name>/` and `stories/<category>/<Name>/`. You then need to add the export to `src/<category>.ts`, add translation keys, and write the MDX (see `
|
|
427
|
+
Generates boilerplate under `src/components/<category>/<Name>/` and `stories/<category>/<Name>/`. You then need to add the export to `src/<category>.ts`, add translation keys, and write the MDX (see `AGENTS.md` / `SKILLS.md`).
|
|
428
428
|
|
|
429
429
|
### Check package versions
|
|
430
430
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../node_modules/@radix-ui/react-slot/dist/index.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=n.default.forwardRef(({asChild:e=!1,children:n,content:a,icon:o,intent:s=`
|
|
2
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../node_modules/@radix-ui/react-slot/dist/index.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=n.default.forwardRef(({asChild:e=!1,children:n,content:a,icon:o,intent:s=`neutral`,variant:c=`solid`,size:l=`md`,styles:u,interactive:d=!1,as:f,className:p,...m},h)=>{let g=e?t.Root:f||`span`,_=a??n,v=(0,r.default)(u?.root,u?.[s],u?.[c],u?.[l],d&&u?.interactive,p),y=u?.icon;return(0,i.jsxs)(g,{ref:h,className:v,...m,children:[o&&(0,i.jsx)(`span`,{className:y,children:o}),(0,i.jsx)(t.Slottable,{children:_})]})});a.displayName=`IndicatorBase`,exports.IndicatorBase=a;
|
|
@@ -3,7 +3,7 @@ import { Root as e, Slottable as t } from "../../node_modules/@radix-ui/react-sl
|
|
|
3
3
|
import n from "react";
|
|
4
4
|
import r from "classnames";
|
|
5
5
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
-
var o = n.forwardRef(({ asChild: n = !1, children: o, content: s, icon: c, intent: l = "
|
|
6
|
+
var o = n.forwardRef(({ asChild: n = !1, children: o, content: s, icon: c, intent: l = "neutral", variant: u = "solid", size: d = "md", styles: f, interactive: p = !1, as: m, className: h, ...g }, _) => {
|
|
7
7
|
let v = n ? e : m || "span", y = s ?? o, b = r(f?.root, f?.[l], f?.[u], f?.[d], p && f?.interactive, h), x = f?.icon;
|
|
8
8
|
return /* @__PURE__ */ a(v, {
|
|
9
9
|
ref: _,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../utilities/warn-unstyled-value.cjs"),r=require("./styled-values.cjs"),i=require("./card.module.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("classnames");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c=a.default.forwardRef(({asChild:e=!1,variant:a=`
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../utilities/warn-unstyled-value.cjs"),r=require("./styled-values.cjs"),i=require("./card.module.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("classnames");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c=a.default.forwardRef(({asChild:e=!1,variant:a=`outline`,padding:c=`md`,radius:l=`lg`,interactive:u=!1,className:d,children:f,...p},m)=>{let h=e?t.Root:`div`;return r.CARD_STYLED_PADDING.includes(c)||n.warnUnstyledValue(`Card`,`padding`,c,r.CARD_STYLED_PADDING),r.CARD_STYLED_RADIUS.includes(l)||n.warnUnstyledValue(`Card`,`radius`,l,r.CARD_STYLED_RADIUS),(0,s.jsx)(h,{ref:m,className:(0,o.default)(`wim-card`,i.default.root,i.default[a],i.default[`padding-${c}`],i.default[`radius-${l}`],u&&i.default.interactive,d),...p,children:f})});c.displayName=`Card`;var l=({className:e,children:t,...n})=>(0,s.jsx)(`div`,{className:(0,o.default)(i.default.header,e),...n,children:t}),u=({className:e,children:t,...n})=>(0,s.jsx)(`div`,{className:(0,o.default)(i.default.body,e),...n,children:t}),d=({className:e,children:t,...n})=>(0,s.jsx)(`div`,{className:(0,o.default)(i.default.footer,e),...n,children:t});l.displayName=`Card.Header`,u.displayName=`Card.Body`,d.displayName=`Card.Footer`,c.Header=l,c.Body=u,c.Footer=d,exports.Card=c,exports.default=c,exports.CardBody=u,exports.CardFooter=d,exports.CardHeader=l;
|
|
@@ -6,7 +6,7 @@ import i from "./card.module.js";
|
|
|
6
6
|
import a from "react";
|
|
7
7
|
import o from "classnames";
|
|
8
8
|
import { jsx as s } from "react/jsx-runtime";
|
|
9
|
-
var c = a.forwardRef(({ asChild: a = !1, variant: c = "
|
|
9
|
+
var c = a.forwardRef(({ asChild: a = !1, variant: c = "outline", padding: l = "md", radius: u = "lg", interactive: d = !1, className: f, children: p, ...m }, h) => {
|
|
10
10
|
let g = a ? e : "div";
|
|
11
11
|
return n.includes(l) || t("Card", "padding", l, n), r.includes(u) || t("Card", "radius", u, r), /* @__PURE__ */ s(g, {
|
|
12
12
|
ref: h,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../i18n/useWimTranslation.cjs"),r=require("../../../icon/close.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../../_internal/mergeRefs.cjs"),o=require("./chip.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u=s.default.forwardRef(({asChild:e=!1,children:s,content:u,onClick:d,onDelete:f,avatar:p,icon:m,selected:h=!1,disabled:g=!1,intent:_=`
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../i18n/useWimTranslation.cjs"),r=require("../../../icon/close.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../../_internal/mergeRefs.cjs"),o=require("./chip.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u=s.default.forwardRef(({asChild:e=!1,children:s,content:u,onClick:d,onDelete:f,avatar:p,icon:m,selected:h=!1,disabled:g=!1,intent:_=`neutral`,variant:v=`solid`,size:y=`md`,deleteAriaLabel:b,className:x,...S},C)=>{let{t:w}=n.useWimTranslation(`common`),T=b??w(`a11y.delete`);if(e&&f)throw Error("[wimui] Chip: `asChild` cannot be combined with `onDelete`. Use a removable Chip without asChild, or put the delete control on the slotted child yourself.");let E=e?t.Root:d?`button`:`span`,D=u??s;return(0,l.jsxs)(E,{ref:a.mergeRefs(C),className:(0,c.default)(`wim-chip`,o.default.root,o.default[_],o.default[v],o.default[y],h&&o.default.selected,d&&!g&&o.default.clickable,g&&o.default.disabled,x),onClick:g?void 0:d,...!e&&d?{disabled:g}:{},type:e?void 0:d?`button`:void 0,...S,children:[p&&(0,l.jsx)(`span`,{className:o.default.avatar,children:p}),!p&&m&&(0,l.jsx)(`span`,{className:o.default.icon,children:m}),e?(0,l.jsx)(t.Slottable,{children:D}):(0,l.jsx)(`span`,{className:o.default.label,children:D}),f&&!g&&(0,l.jsx)(`button`,{type:`button`,className:o.default.delete,"data-chip-delete":!0,onClick:e=>{e.stopPropagation(),f(e)},"aria-label":T,children:(0,l.jsx)(i.Icon,{component:r.default,size:`sm`})})]})});u.displayName=`Chip`,exports.Chip=u;
|
|
@@ -9,7 +9,7 @@ import s from "react";
|
|
|
9
9
|
import c from "classnames";
|
|
10
10
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/data-display/Chip/Chip.tsx
|
|
12
|
-
var d = s.forwardRef(({ asChild: s = !1, children: d, content: f, onClick: p, onDelete: m, avatar: h, icon: g, selected: _ = !1, disabled: v = !1, intent: y = "
|
|
12
|
+
var d = s.forwardRef(({ asChild: s = !1, children: d, content: f, onClick: p, onDelete: m, avatar: h, icon: g, selected: _ = !1, disabled: v = !1, intent: y = "neutral", variant: b = "solid", size: x = "md", deleteAriaLabel: S, className: C, ...w }, T) => {
|
|
13
13
|
let { t: E } = n("common"), D = S ?? E("a11y.delete");
|
|
14
14
|
if (s && m) throw Error("[wimui] Chip: `asChild` cannot be combined with `onDelete`. Use a removable Chip without asChild, or put the delete control on the slotted child yourself.");
|
|
15
15
|
let O = s ? e : p ? "button" : "span", k = f ?? d;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../icon/arrow-down.cjs"),n=require("../../../icon/arrow-right.cjs"),r=require("../../../icon/arrow-up.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../Card/Card.cjs"),o=require("./stats.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u={up:r.default,down:t.default,neutral:n.default},d=({variant:e=`
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../icon/arrow-down.cjs"),n=require("../../../icon/arrow-right.cjs"),r=require("../../../icon/arrow-up.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../Card/Card.cjs"),o=require("./stats.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u={up:r.default,down:t.default,neutral:n.default},d=({variant:e=`outline`,className:t,children:n,...r})=>(0,l.jsx)(a.Card,{variant:e,className:(0,c.default)(`wim-stats`,o.default.root,t),padding:`none`,...r,children:(0,l.jsx)(`div`,{className:o.default.inner,children:n})}),f=({className:e,children:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(o.default.label,e),...n,children:t}),p=({className:e,children:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(o.default.value,e),...n,children:t}),m=({className:e,children:t,...n})=>(0,l.jsx)(`div`,{className:(0,c.default)(o.default.description,e),...n,children:t}),h=({direction:e=`up`,className:t,children:n,...r})=>(0,l.jsxs)(`div`,{className:(0,c.default)(o.default.trend,o.default[e],t),...r,children:[(0,l.jsx)(`span`,{"aria-hidden":`true`,children:(0,l.jsx)(i.Icon,{component:u[e],size:`sm`})}),(0,l.jsx)(`span`,{children:n})]});d.displayName=`Stats`,f.displayName=`Stats.Label`,p.displayName=`Stats.Value`,m.displayName=`Stats.Description`,h.displayName=`Stats.Trend`,d.Label=f,d.Value=p,d.Description=m,d.Trend=h,exports.Stats=d,exports.default=d,exports.StatsDescription=m,exports.StatsLabel=f,exports.StatsTrend=h,exports.StatsValue=p;
|
|
@@ -13,7 +13,7 @@ var l = {
|
|
|
13
13
|
up: n,
|
|
14
14
|
down: e,
|
|
15
15
|
neutral: t
|
|
16
|
-
}, u = ({ variant: e = "
|
|
16
|
+
}, u = ({ variant: e = "outline", className: t, children: n, ...r }) => /* @__PURE__ */ s(i, {
|
|
17
17
|
variant: e,
|
|
18
18
|
className: o("wim-stats", a.root, t),
|
|
19
19
|
padding: "none",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_qbn67_3`,t=`_text_qbn67_10`,n=`_rect_qbn67_25`,r=`_circle_qbn67_28`,i=`_pulse_qbn67_31`,a=`_wave_qbn67_34`,o={root:e,text:t,rect:n,circle:r,pulse:i,"skeleton-pulse":`_skeleton-pulse_qbn67_1`,wave:a,"skeleton-wave":`_skeleton-wave_qbn67_1`};exports.circle=r,exports.default=o,exports.pulse=i,exports.rect=n,exports.root=e,exports.text=t,exports.wave=a;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/feedback/Skeleton/skeleton.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_qbn67_3", t = "_text_qbn67_10", n = "_rect_qbn67_25", r = "_circle_qbn67_28", i = "_pulse_qbn67_31", a = "_wave_qbn67_34", o = {
|
|
4
4
|
root: e,
|
|
5
5
|
text: t,
|
|
6
6
|
rect: n,
|
|
7
7
|
circle: r,
|
|
8
8
|
pulse: i,
|
|
9
|
-
"skeleton-pulse": "_skeleton-
|
|
9
|
+
"skeleton-pulse": "_skeleton-pulse_qbn67_1",
|
|
10
10
|
wave: a,
|
|
11
|
-
"skeleton-wave": "_skeleton-
|
|
11
|
+
"skeleton-wave": "_skeleton-wave_qbn67_1"
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
14
|
export { r as circle, o as default, i as pulse, n as rect, e as root, t as text, a as wave };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./bento-grid.module.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=({className:e,children:n,rowHeight:a,style:o,...s})=>(0,i.jsx)(`div`,{className:t.default.container,children:(0,i.jsx)(`div`,{className:(0,r.default)(`wim-bento-grid`,t.default.root,e),style:a?{...o,"--wim-bento-row-height":a}:o,...s,children:n})});a.displayName=`BentoGrid`;var o=({className:e,title:n,description:a,header:o,icon:s,...
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./bento-grid.module.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("classnames");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=({className:e,children:n,rowHeight:a,style:o,...s})=>(0,i.jsx)(`div`,{className:t.default.container,children:(0,i.jsx)(`div`,{className:(0,r.default)(`wim-bento-grid`,t.default.root,e),style:a?{...o,"--wim-bento-row-height":a}:o,...s,children:n})});a.displayName=`BentoGrid`;var o=({className:e,title:n,description:a,header:o,icon:s,span:c=1,rowSpan:l=1,...u})=>(0,i.jsxs)(`div`,{className:(0,r.default)(t.default.item,t.default[`span-${c}`],t.default[`row-${l}`],e),...u,children:[o&&(0,i.jsx)(`div`,{className:t.default.itemHeader,children:o}),(0,i.jsxs)(`div`,{className:t.default.itemContent,children:[s&&(0,i.jsx)(`div`,{className:t.default.itemIcon,children:s}),(0,i.jsxs)(`div`,{className:t.default.itemText,children:[n&&(0,i.jsx)(`div`,{className:t.default.itemTitle,children:n}),a&&(0,i.jsx)(`div`,{className:t.default.itemDescription,children:a})]})]})]});o.displayName=`BentoGridItem`,exports.BentoGrid=a,exports.BentoGridItem=o;
|
|
@@ -14,9 +14,20 @@ export type BentoGridItemProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
|
14
14
|
description?: React.ReactNode;
|
|
15
15
|
header?: React.ReactNode;
|
|
16
16
|
icon?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* How many columns the tile occupies where the grid is 3 columns wide.
|
|
19
|
+
* Below that width the grid is a single column and every tile spans it.
|
|
20
|
+
* @default 1
|
|
21
|
+
*/
|
|
22
|
+
span?: 1 | 2 | 3;
|
|
23
|
+
/**
|
|
24
|
+
* How many rows the tile occupies where the grid is 3 columns wide.
|
|
25
|
+
* @default 1
|
|
26
|
+
*/
|
|
27
|
+
rowSpan?: 1 | 2;
|
|
17
28
|
};
|
|
18
29
|
export declare const BentoGridItem: {
|
|
19
|
-
({ className, title, description, header, icon, ...props }: BentoGridItemProps): React.JSX.Element;
|
|
30
|
+
({ className, title, description, header, icon, span, rowSpan, ...props }: BentoGridItemProps): React.JSX.Element;
|
|
20
31
|
displayName: string;
|
|
21
32
|
};
|
|
22
33
|
export {};
|
|
@@ -17,9 +17,9 @@ var i = ({ className: r, children: i, rowHeight: a, style: o, ...s }) => /* @__P
|
|
|
17
17
|
})
|
|
18
18
|
});
|
|
19
19
|
i.displayName = "BentoGrid";
|
|
20
|
-
var a = ({ className: i, title: a, description: o, header: s, icon: c,
|
|
21
|
-
className: t(e.item, i),
|
|
22
|
-
...
|
|
20
|
+
var a = ({ className: i, title: a, description: o, header: s, icon: c, span: l = 1, rowSpan: u = 1, ...d }) => /* @__PURE__ */ r("div", {
|
|
21
|
+
className: t(e.item, e[`span-${l}`], e[`row-${u}`], i),
|
|
22
|
+
...d,
|
|
23
23
|
children: [s && /* @__PURE__ */ n("div", {
|
|
24
24
|
className: e.itemHeader,
|
|
25
25
|
children: s
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_container_1lu3a_4`,t=`_root_1lu3a_16`,n=`_item_1lu3a_52`,r=`_itemHeader_1lu3a_66`,i=`_itemContent_1lu3a_78`,a=`_itemIcon_1lu3a_83`,o=`_itemText_1lu3a_86`,s=`_itemTitle_1lu3a_90`,c=`_itemDescription_1lu3a_95`,l={container:e,root:t,"span-1":`_span-1_1lu3a_36`,"span-2":`_span-2_1lu3a_39`,"span-3":`_span-3_1lu3a_42`,"row-1":`_row-1_1lu3a_45`,"row-2":`_row-2_1lu3a_48`,item:n,itemHeader:r,itemContent:i,itemIcon:a,itemText:o,itemTitle:s,itemDescription:c};exports.container=e,exports.default=l,exports.item=n,exports.itemContent=i,exports.itemDescription=c,exports.itemHeader=r,exports.itemIcon=a,exports.itemText=o,exports.itemTitle=s,exports.root=t;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/layout/BentoGrid/bento-grid.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_container_1lu3a_4", t = "_root_1lu3a_16", n = "_item_1lu3a_52", r = "_itemHeader_1lu3a_66", i = "_itemContent_1lu3a_78", a = "_itemIcon_1lu3a_83", o = "_itemText_1lu3a_86", s = "_itemTitle_1lu3a_90", c = "_itemDescription_1lu3a_95", l = {
|
|
4
4
|
container: e,
|
|
5
5
|
root: t,
|
|
6
|
+
"span-1": "_span-1_1lu3a_36",
|
|
7
|
+
"span-2": "_span-2_1lu3a_39",
|
|
8
|
+
"span-3": "_span-3_1lu3a_42",
|
|
9
|
+
"row-1": "_row-1_1lu3a_45",
|
|
10
|
+
"row-2": "_row-2_1lu3a_48",
|
|
6
11
|
item: n,
|
|
7
12
|
itemHeader: r,
|
|
8
13
|
itemContent: i,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_1y982_3`,t=`_inner_1y982_13`,n=`_radiusSm_1y982_23`,r=`_radiusMd_1y982_27`,i=`_radiusLg_1y982_31`,a=`_radiusFull_1y982_35`,o=`_shadow_1y982_39`,s=`_loading_1y982_43`,c=`_border_1y982_46`,l=`_fadeIn_1y982_49`,u=`_audio_1y982_49`,d=`_customControls_1y982_50`,f=`_metadata_1y982_51`,p=`_isLoaded_1y982_55`,m=`_caption_1y982_89`,h=`_custom_1y982_50`,g=`_visualizerCanvas_1y982_122`,_=`_cover_1y982_146`,v=`_info_1y982_153`,y=`_title_1y982_159`,b=`_artist_1y982_165`,x=`_badge_1y982_170`,S=`_controlsRow_1y982_193`,C=`_controlsGroup_1y982_200`,w=`_btn_1y982_204`,T=`_active_1y982_225`,E=`_btnText_1y982_229`,D=`_btnPlay_1y982_236`,O=`_time_1y982_250`,k=`_progressContainer_1y982_262`,A=`_progress_1y982_262`,j=`_progressFill_1y982_286`,M=`_volumeContainer_1y982_308`,N=`_volume_1y982_308`,P={root:e,inner:t,radiusSm:n,radiusMd:r,radiusLg:i,radiusFull:a,shadow:o,loading:s,border:c,fadeIn:l,audio:u,customControls:d,metadata:f,isLoaded:p,"skeleton-loading":`_skeleton-loading_1y982_1`,caption:m,custom:h,visualizerCanvas:g,cover:_,info:v,title:y,artist:b,badge:x,controlsRow:S,controlsGroup:C,btn:w,active:T,btnText:E,btnPlay:D,time:O,progressContainer:k,progress:A,progressFill:j,volumeContainer:M,volume:N};exports.active=T,exports.artist=b,exports.audio=u,exports.badge=x,exports.border=c,exports.btn=w,exports.btnPlay=D,exports.btnText=E,exports.caption=m,exports.controlsGroup=C,exports.controlsRow=S,exports.cover=_,exports.custom=h,exports.customControls=d,exports.default=P,exports.fadeIn=l,exports.info=v,exports.inner=t,exports.isLoaded=p,exports.loading=s,exports.metadata=f,exports.progress=A,exports.progressContainer=k,exports.progressFill=j,exports.radiusFull=a,exports.radiusLg=i,exports.radiusMd=r,exports.radiusSm=n,exports.root=e,exports.shadow=o,exports.time=O,exports.title=y,exports.visualizerCanvas=g,exports.volume=N,exports.volumeContainer=M;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/media/Audio/audio.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_1y982_3", t = "_inner_1y982_13", n = "_radiusSm_1y982_23", r = "_radiusMd_1y982_27", i = "_radiusLg_1y982_31", a = "_radiusFull_1y982_35", o = "_shadow_1y982_39", s = "_loading_1y982_43", c = "_border_1y982_46", l = "_fadeIn_1y982_49", u = "_audio_1y982_49", d = "_customControls_1y982_50", f = "_metadata_1y982_51", p = "_isLoaded_1y982_55", m = "_caption_1y982_89", h = "_custom_1y982_50", g = "_visualizerCanvas_1y982_122", _ = "_cover_1y982_146", v = "_info_1y982_153", y = "_title_1y982_159", b = "_artist_1y982_165", x = "_badge_1y982_170", S = "_controlsRow_1y982_193", C = "_controlsGroup_1y982_200", w = "_btn_1y982_204", T = "_active_1y982_225", E = "_btnText_1y982_229", D = "_btnPlay_1y982_236", O = "_time_1y982_250", k = "_progressContainer_1y982_262", A = "_progress_1y982_262", j = "_progressFill_1y982_286", M = "_volumeContainer_1y982_308", N = "_volume_1y982_308", P = {
|
|
4
4
|
root: e,
|
|
5
5
|
inner: t,
|
|
6
6
|
radiusSm: n,
|
|
@@ -15,7 +15,7 @@ var e = "_root_1x6tc_3", t = "_inner_1x6tc_13", n = "_radiusSm_1x6tc_23", r = "_
|
|
|
15
15
|
customControls: d,
|
|
16
16
|
metadata: f,
|
|
17
17
|
isLoaded: p,
|
|
18
|
-
"skeleton-loading": "_skeleton-
|
|
18
|
+
"skeleton-loading": "_skeleton-loading_1y982_1",
|
|
19
19
|
caption: m,
|
|
20
20
|
custom: h,
|
|
21
21
|
visualizerCanvas: g,
|
package/dist/llms-full.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.30.0 — a React 19 component library: 225 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
8
|
|
|
9
9
|
## Install & required setup
|
|
10
10
|
|
|
@@ -45,7 +45,7 @@ Every component works from the root barrel `"wimui"`. For smaller bundles, impor
|
|
|
45
45
|
|
|
46
46
|
## Composition rules — build screens that don't look AI-generated
|
|
47
47
|
|
|
48
|
-
Single components are judged by state/a11y/token compliance. **Composed screens** are judged by hierarchy, rhythm, asymmetry and real-feeling content. Apply these whenever combining components into a screen, page, pattern or demo.
|
|
48
|
+
Single components are judged by state/a11y/token compliance. **Composed screens** are judged by hierarchy, rhythm, asymmetry and real-feeling content. Apply these whenever combining components into a screen, page, pattern or demo — **and also when you write a single component on its own**, because the way it renders with no props is judged by the same rules (rule 22). That split is about what is being judged, not about where the problem lives: a default that emits a banned pattern emits it into every screen that uses the component.
|
|
49
49
|
|
|
50
50
|
**Before laying out**: pick exactly ONE visual protagonist for the screen. If every element has the same volume, it reads as AI-generated.
|
|
51
51
|
|
|
@@ -65,7 +65,7 @@ Single components are judged by state/a11y/token compliance. **Composed screens*
|
|
|
65
65
|
**Machine-enforced banned vocabulary** (a linter, `check:slop`, fails builds that use these in demo copy — say concrete actions/numbers instead):
|
|
66
66
|
- Hype adjectives/verbs: seamless, powerful, effortless, cutting-edge, next-gen, next-generation, revolutionary, game-changing, state-of-the-art, world-class, best-in-class, unparalleled, lightning-fast, blazing-fast, supercharge, innovative, disruptive, harness, leverage, elevate, empower, reimagine, unleash, delight, magical, 圧倒的, 革新的, 次世代, 究極, 最先端.
|
|
67
67
|
- Hype phrases: "in today's digital landscape", "built for the modern team", "supercharge your", "unleash your", "reimagine the way", "experience the power of", "innovative solutions".
|
|
68
|
-
- Stock placeholder names: John Doe, Jane Doe, John Smith, Jane Smith, Lorem Ipsum, Example User, Acme (a realistic example name in an input placeholder is fine).
|
|
68
|
+
- Stock placeholder names: John Doe, Jane Doe, John Smith, Jane Smith, Lorem Ipsum, Example User, Acme, Alice, Bob, Charlie, User 1, User 2, User 3, Step 1, Step 2, Step 3 (a realistic example name in an input placeholder is fine).
|
|
69
69
|
|
|
70
70
|
**Must rules:**
|
|
71
71
|
1. One visual protagonist per screen (jump in size/weight/color creates the entry point).
|
|
@@ -84,6 +84,17 @@ Single components are judged by state/a11y/token compliance. **Composed screens*
|
|
|
84
84
|
14. Keep the chrome quiet. Breadcrumb, page title, summary line, toolbar and filter bar frame the content; they must not compete with the protagonist. Don't promote a one-line summary to an `Alert`/`Banner`, don't wrap the filter bar in a `Card` (its border doubles up with the data region's), keep primary surfaces out of the chrome, and don't stack a KPI tile row above a table screen. Corollary of protagonist and accent limits, but it is the rule most often broken on admin/list screens — the test is whether the eye lands on the data first.
|
|
85
85
|
15. Add intentional "wobble": mix in 1–2 incomplete rows (a truncated long name, a missing optional field, an extreme value, an error/unread state) and show non-happy-path states (hover/focus/disabled/error/empty/loading).
|
|
86
86
|
16. Check the screen at 390px and 768px before calling it done. The page itself must never scroll sideways (`document.scrollWidth > document.documentElement.clientWidth` is a bug — the usual cause is a group of controls that cannot wrap, e.g. several buttons packed into one `Toolbar.Group`; split them into separate groups). Data tables need their narrow mode turned on (`<DataGrid mobileCard>` / `<Table mobileCard>`) rather than an inner scrollbar: without it columns collapse and a short string like a `Code` lot number breaks one character per line. The default card switch is `container-down(sm)` (576px). Wide grids that still overflow at tablet should pass `mobileCard="md"` so cards continue through 768px.
|
|
87
|
+
17. Left-align by default. At most one centred section per page, counted per section — cards repeated inside one grid count as one, and this exemption is about how to count centring only: the repetition of a uniform grid is still caught by the rule-of-three rule.
|
|
88
|
+
18. Never fall back to three equal parallel items (three feature cards with icon + short heading + one line, or "Fast. Secure. Reliable."). Let the count come from the content — two or five is fine — and vary card grain and body length.
|
|
89
|
+
19. Subtract every decoration that does not help the reader act or understand (excess shadow, border, gradient, emoji). AI fills empty space by habit, so decoration accumulates without intent.
|
|
90
|
+
20. Never hand-draw fake chrome (browser bars, phone frames, IDE windows) to make a demo look like a screenshot.
|
|
91
|
+
21. Never fall back to a stock diagonal gradient (a 135deg hero background, a `to bottom right` panel, a gradient blob). Split surfaces with the surface tokens instead. Gradients parallel to an axis are fine when they implement motion (a 90deg shimmer).
|
|
92
|
+
22. Judge a component the way it renders with no props. If placing it bare produces something on the banned list — a stock hero, three equal feature cards, a diagonal gradient panel, rainbow categories, empty placeholder copy — the default is the defect, not the screen that used it. Catalogue "Default" stories teach the component, so they are read as composition, not as craft.
|
|
93
|
+
23. Never ship hollow boilerplate copy ("No data found", "Get started", "This is a description", "Ready to start?", "Your operation has been executed"). It displays the fact that nobody decided what to say yet. Name the thing that is missing and the one action that changes it. This is a different defect from hype: hype overclaims, hollow copy says nothing.
|
|
94
|
+
24. Avoid the stock hero anatomy: icon or badge, big heading, one line of subtext, two buttons (one solid, one outline), all centred. It is the single most recognisable AI screen. Decide one protagonist and build asymmetrically around it; one primary action plus a text link beats two equal buttons.
|
|
95
|
+
25. Never assign a different colour per tag, per person or per KPI. Colour carries good/bad (success / warning / danger) and nothing else; everything else stays neutral. A rainbow of categories makes every value look like an exception, which means none of them do.
|
|
96
|
+
26. Never draw a stand-in for content you did not build: a Skeleton used as a fake screenshot, a grey box or gradient panel captioned "Chart placeholder". Either put the real component in (a Sparkline, a table) or leave the region out. A labelled empty box teaches readers that the library cannot fill it.
|
|
97
|
+
27. Glass / neumorphic "futuristic tech" surfaces may exist as an opt-in variant, but never as a default or as the first example in the docs. Shown first, it becomes what the library looks like, and that look is the most generic one available.
|
|
87
98
|
|
|
88
99
|
## Recipes — copy-paste starting points
|
|
89
100
|
|
|
@@ -2240,7 +2251,7 @@ what a scanner would read.
|
|
|
2240
2251
|
- `children: React.ReactNode` — Content to render inside.
|
|
2241
2252
|
- **Card** — Information containers
|
|
2242
2253
|
- `asChild: boolean` = false — If true, the card will be rendered as its child, merging its props onto that child.
|
|
2243
|
-
- `variant: "elevated" | "outline" | "flat" | "glass"` = "
|
|
2254
|
+
- `variant: "elevated" | "outline" | "flat" | "glass"` = "outline" — Visual style variant of the card
|
|
2244
2255
|
- `interactive: boolean` = false — Whether to enable hover animation and click effects
|
|
2245
2256
|
- `padding: (typeof CARD_STYLED_PADDING)[number]` = "md" — Padding size.
|
|
2246
2257
|
|
|
@@ -2277,7 +2288,7 @@ Cannot be combined with `onDelete` (T99).
|
|
|
2277
2288
|
- `icon: React.ReactNode` — Icon
|
|
2278
2289
|
- `selected: boolean` = false — Whether the chip is selected
|
|
2279
2290
|
- `disabled: boolean` = false — Whether the chip is disabled
|
|
2280
|
-
- `intent: IndicatorIntent` = "
|
|
2291
|
+
- `intent: IndicatorIntent` = "neutral" — Intent (semantic state)
|
|
2281
2292
|
- `variant: "solid" | "outline" | "subtle"` = "solid" — Visual style variant
|
|
2282
2293
|
- `size: Extract<ComponentSize, "sm" | "md" | "lg">` = "md" — Size
|
|
2283
2294
|
- `deleteAriaLabel: string` — Accessible label for the delete button
|
|
@@ -2529,7 +2540,7 @@ renders inline, next to whatever follows it.
|
|
|
2529
2540
|
- `onSortEnd: (oldIndex: number, newIndex: number) => void` — Callback called when reordering is completed.
|
|
2530
2541
|
- `disabled: boolean` = false — Whether the entire list is disabled.
|
|
2531
2542
|
- **Stats** — A component to highlight key performance indicators and metrics
|
|
2532
|
-
- `variant: React.ComponentProps<typeof Card>["variant"]` = "
|
|
2543
|
+
- `variant: React.ComponentProps<typeof Card>["variant"]` = "outline" — Visual style variant of the card
|
|
2533
2544
|
- `asChild: boolean` = false — If true, the card will be rendered as its child, merging its props onto that child.
|
|
2534
2545
|
- `interactive: boolean` = false — Whether to enable hover animation and click effects
|
|
2535
2546
|
- `padding: (typeof CARD_STYLED_PADDING)[number]` = "md" — Padding size.
|
package/dist/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.30.0 — a React 19 component library: 225 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
8
|
|
|
9
9
|
## Install & required setup
|
|
10
10
|
|
|
@@ -45,7 +45,7 @@ Every component works from the root barrel `"wimui"`. For smaller bundles, impor
|
|
|
45
45
|
|
|
46
46
|
## Composition rules — build screens that don't look AI-generated
|
|
47
47
|
|
|
48
|
-
Single components are judged by state/a11y/token compliance. **Composed screens** are judged by hierarchy, rhythm, asymmetry and real-feeling content. Apply these whenever combining components into a screen, page, pattern or demo.
|
|
48
|
+
Single components are judged by state/a11y/token compliance. **Composed screens** are judged by hierarchy, rhythm, asymmetry and real-feeling content. Apply these whenever combining components into a screen, page, pattern or demo — **and also when you write a single component on its own**, because the way it renders with no props is judged by the same rules (rule 22). That split is about what is being judged, not about where the problem lives: a default that emits a banned pattern emits it into every screen that uses the component.
|
|
49
49
|
|
|
50
50
|
**Before laying out**: pick exactly ONE visual protagonist for the screen. If every element has the same volume, it reads as AI-generated.
|
|
51
51
|
|
|
@@ -65,7 +65,7 @@ Single components are judged by state/a11y/token compliance. **Composed screens*
|
|
|
65
65
|
**Machine-enforced banned vocabulary** (a linter, `check:slop`, fails builds that use these in demo copy — say concrete actions/numbers instead):
|
|
66
66
|
- Hype adjectives/verbs: seamless, powerful, effortless, cutting-edge, next-gen, next-generation, revolutionary, game-changing, state-of-the-art, world-class, best-in-class, unparalleled, lightning-fast, blazing-fast, supercharge, innovative, disruptive, harness, leverage, elevate, empower, reimagine, unleash, delight, magical, 圧倒的, 革新的, 次世代, 究極, 最先端.
|
|
67
67
|
- Hype phrases: "in today's digital landscape", "built for the modern team", "supercharge your", "unleash your", "reimagine the way", "experience the power of", "innovative solutions".
|
|
68
|
-
- Stock placeholder names: John Doe, Jane Doe, John Smith, Jane Smith, Lorem Ipsum, Example User, Acme (a realistic example name in an input placeholder is fine).
|
|
68
|
+
- Stock placeholder names: John Doe, Jane Doe, John Smith, Jane Smith, Lorem Ipsum, Example User, Acme, Alice, Bob, Charlie, User 1, User 2, User 3, Step 1, Step 2, Step 3 (a realistic example name in an input placeholder is fine).
|
|
69
69
|
|
|
70
70
|
**Must rules:**
|
|
71
71
|
1. One visual protagonist per screen (jump in size/weight/color creates the entry point).
|
|
@@ -84,6 +84,17 @@ Single components are judged by state/a11y/token compliance. **Composed screens*
|
|
|
84
84
|
14. Keep the chrome quiet. Breadcrumb, page title, summary line, toolbar and filter bar frame the content; they must not compete with the protagonist. Don't promote a one-line summary to an `Alert`/`Banner`, don't wrap the filter bar in a `Card` (its border doubles up with the data region's), keep primary surfaces out of the chrome, and don't stack a KPI tile row above a table screen. Corollary of protagonist and accent limits, but it is the rule most often broken on admin/list screens — the test is whether the eye lands on the data first.
|
|
85
85
|
15. Add intentional "wobble": mix in 1–2 incomplete rows (a truncated long name, a missing optional field, an extreme value, an error/unread state) and show non-happy-path states (hover/focus/disabled/error/empty/loading).
|
|
86
86
|
16. Check the screen at 390px and 768px before calling it done. The page itself must never scroll sideways (`document.scrollWidth > document.documentElement.clientWidth` is a bug — the usual cause is a group of controls that cannot wrap, e.g. several buttons packed into one `Toolbar.Group`; split them into separate groups). Data tables need their narrow mode turned on (`<DataGrid mobileCard>` / `<Table mobileCard>`) rather than an inner scrollbar: without it columns collapse and a short string like a `Code` lot number breaks one character per line. The default card switch is `container-down(sm)` (576px). Wide grids that still overflow at tablet should pass `mobileCard="md"` so cards continue through 768px.
|
|
87
|
+
17. Left-align by default. At most one centred section per page, counted per section — cards repeated inside one grid count as one, and this exemption is about how to count centring only: the repetition of a uniform grid is still caught by the rule-of-three rule.
|
|
88
|
+
18. Never fall back to three equal parallel items (three feature cards with icon + short heading + one line, or "Fast. Secure. Reliable."). Let the count come from the content — two or five is fine — and vary card grain and body length.
|
|
89
|
+
19. Subtract every decoration that does not help the reader act or understand (excess shadow, border, gradient, emoji). AI fills empty space by habit, so decoration accumulates without intent.
|
|
90
|
+
20. Never hand-draw fake chrome (browser bars, phone frames, IDE windows) to make a demo look like a screenshot.
|
|
91
|
+
21. Never fall back to a stock diagonal gradient (a 135deg hero background, a `to bottom right` panel, a gradient blob). Split surfaces with the surface tokens instead. Gradients parallel to an axis are fine when they implement motion (a 90deg shimmer).
|
|
92
|
+
22. Judge a component the way it renders with no props. If placing it bare produces something on the banned list — a stock hero, three equal feature cards, a diagonal gradient panel, rainbow categories, empty placeholder copy — the default is the defect, not the screen that used it. Catalogue "Default" stories teach the component, so they are read as composition, not as craft.
|
|
93
|
+
23. Never ship hollow boilerplate copy ("No data found", "Get started", "This is a description", "Ready to start?", "Your operation has been executed"). It displays the fact that nobody decided what to say yet. Name the thing that is missing and the one action that changes it. This is a different defect from hype: hype overclaims, hollow copy says nothing.
|
|
94
|
+
24. Avoid the stock hero anatomy: icon or badge, big heading, one line of subtext, two buttons (one solid, one outline), all centred. It is the single most recognisable AI screen. Decide one protagonist and build asymmetrically around it; one primary action plus a text link beats two equal buttons.
|
|
95
|
+
25. Never assign a different colour per tag, per person or per KPI. Colour carries good/bad (success / warning / danger) and nothing else; everything else stays neutral. A rainbow of categories makes every value look like an exception, which means none of them do.
|
|
96
|
+
26. Never draw a stand-in for content you did not build: a Skeleton used as a fake screenshot, a grey box or gradient panel captioned "Chart placeholder". Either put the real component in (a Sparkline, a table) or leave the region out. A labelled empty box teaches readers that the library cannot fill it.
|
|
97
|
+
27. Glass / neumorphic "futuristic tech" surfaces may exist as an opt-in variant, but never as a default or as the first example in the docs. Shown first, it becomes what the library looks like, and that look is the most generic one available.
|
|
87
98
|
|
|
88
99
|
## Recipes — copy-paste starting points
|
|
89
100
|
|