wimui 0.7.0 → 0.9.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.
Files changed (33) hide show
  1. package/README.ja.md +32 -0
  2. package/README.md +32 -0
  3. package/dist/components/_internal/field-label-content.module.cjs +1 -1
  4. package/dist/components/_internal/field-label-content.module.js +1 -1
  5. package/dist/components/ai/CodeBlock/code-block.module.cjs +1 -1
  6. package/dist/components/ai/CodeBlock/code-block.module.js +1 -1
  7. package/dist/components/feedback/ErrorBoundary/errorboundary.module.cjs +1 -1
  8. package/dist/components/feedback/ErrorBoundary/errorboundary.module.js +1 -1
  9. package/dist/components/form/Fieldset/fieldset.module.cjs +1 -1
  10. package/dist/components/form/Fieldset/fieldset.module.js +1 -1
  11. package/dist/components/form/SegmentedControl/segmented-control.module.cjs +1 -1
  12. package/dist/components/form/SegmentedControl/segmented-control.module.js +1 -1
  13. package/dist/components/typography/Code/code.module.cjs +1 -1
  14. package/dist/components/typography/Code/code.module.js +1 -1
  15. package/dist/components/typography/Legend/Legend.cjs +1 -1
  16. package/dist/components/typography/Legend/Legend.d.ts +32 -2
  17. package/dist/components/typography/Legend/Legend.js +15 -10
  18. package/dist/components/typography/Legend/legend.module.cjs +1 -1
  19. package/dist/components/typography/Legend/legend.module.js +1 -1
  20. package/dist/fonts/NOTICE.txt +43 -0
  21. package/dist/fonts/OFL-Noto-Sans-JP.txt +93 -0
  22. package/dist/fonts/OFL-Noto-Sans-Mono.txt +93 -0
  23. package/dist/fonts/OFL-Noto-Sans.txt +93 -0
  24. package/dist/llms-full.txt +8 -3
  25. package/dist/llms.txt +2 -1
  26. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +1 -1
  27. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +20 -13
  28. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
  29. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +40 -29
  30. package/dist/styles.css +1 -1
  31. package/dist/wimui.umd.css +1 -1
  32. package/dist/wimui.umd.js +5 -5
  33. package/package.json +26 -23
package/dist/llms.txt CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## What this is
6
6
 
7
- **wimui** v0.7.0 — a React 19 component library: 216 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).
7
+ **wimui** v0.9.0 — a React 19 component library: 216 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
 
@@ -26,6 +26,7 @@ import { Stack, Grid } from "wimui/layout";
26
26
  - **Density**: `data-density="comfortable|compact"`, or `WimProvider` / `setWimDensity()`.
27
27
  - **Never hardcode** colors / spacing / sizes in consumer code — use the `--wim-*` CSS custom properties (tokens) that styles.css defines.
28
28
  - **Form + RHF** helpers live in `wimui/rhf` (react-hook-form + zod), not the root barrel.
29
+ - **Fonts are NOT bundled** and styles.css requests none. The tokens name `"Noto Sans"` (default/en/pt), `"Noto Sans JP"` (ja) and `"Noto Sans Mono"` (mono) first, then fall back to system faces — so omitting fonts is valid and renders fine. To match the documentation site, have the app load those families itself (weights 400/500/700), e.g. `npm i @fontsource/noto-sans @fontsource/noto-sans-mono` then `import "@fontsource/noto-sans/latin-400.css"` before styles.css. Do not invent a `wimui/fonts.css` — it does not exist. To use different fonts, override `--wim-font-family-*` instead.
29
30
 
30
31
  ## Import paths
31
32
 
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);function n(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function r(...e){return t=>{let r=!1,i=e.map(e=>{let i=n(e,t);return!r&&typeof i==`function`&&(r=!0),i});if(r)return()=>{for(let t=0;t<i.length;t++){let r=i[t];typeof r==`function`?r():n(e[t],null)}}}}function i(...e){return t.useCallback(r(...e),e)}exports.composeRefs=r,exports.useComposedRefs=i;
2
+ const e=require("../../../../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);var n=Object.defineProperty,r=(e,t)=>n(e,`name`,{value:t,configurable:!0});function i(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}r(i,`setRef`);function a(...e){return t=>{let n=!1,r=e.map(e=>{let r=i(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():i(e[t],null)}}}}r(a,`composeRefs`);function o(...e){return t.useCallback(a(...e),e)}r(o,`useComposedRefs`),exports.composeRefs=a,exports.useComposedRefs=o;
@@ -1,26 +1,33 @@
1
1
  "use client";
2
2
  import * as e from "react";
3
3
  //#region node_modules/@radix-ui/react-compose-refs/dist/index.mjs
4
- function t(e, t) {
4
+ var t = Object.defineProperty, n = (e, n) => t(e, "name", {
5
+ value: n,
6
+ configurable: !0
7
+ });
8
+ function r(e, t) {
5
9
  if (typeof e == "function") return e(t);
6
10
  e != null && (e.current = t);
7
11
  }
8
- function n(...e) {
9
- return (n) => {
10
- let r = !1, i = e.map((e) => {
11
- let i = t(e, n);
12
- return !r && typeof i == "function" && (r = !0), i;
12
+ n(r, "setRef");
13
+ function i(...e) {
14
+ return (t) => {
15
+ let n = !1, i = e.map((e) => {
16
+ let i = r(e, t);
17
+ return !n && typeof i == "function" && (n = !0), i;
13
18
  });
14
- if (r) return () => {
15
- for (let n = 0; n < i.length; n++) {
16
- let r = i[n];
17
- typeof r == "function" ? r() : t(e[n], null);
19
+ if (n) return () => {
20
+ for (let t = 0; t < i.length; t++) {
21
+ let n = i[t];
22
+ typeof n == "function" ? n() : r(e[t], null);
18
23
  }
19
24
  };
20
25
  };
21
26
  }
22
- function r(...t) {
23
- return e.useCallback(n(...t), t);
27
+ n(i, "composeRefs");
28
+ function a(...t) {
29
+ return e.useCallback(i(...t), t);
24
30
  }
31
+ n(a, "useComposedRefs");
25
32
  //#endregion
26
- export { n as composeRefs, r as useComposedRefs };
33
+ export { i as composeRefs, a as useComposedRefs };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../react-compose-refs/dist/index.cjs");let n=require("react");n=e.__toESM(n,1);function r(e){let r=n.forwardRef((r,i)=>{let{children:a,...o}=r,s=null,f=!1,m=[];p(a)&&typeof _==`function`&&(a=_(a._payload)),n.Children.forEach(a,e=>{if(d(e)){f=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;p(n)&&typeof _==`function`&&(n=_(n._payload)),s=c(t,n),m.push(s?.props?.children)}else m.push(e)}),s?s=n.cloneElement(s,void 0,m):!f&&n.Children.count(a)===1&&n.isValidElement(a)&&(s=a);let v=s?u(s):void 0,y=t.useComposedRefs(i,v);if(!s){if(a||a===0)throw Error(f?g(e):h(e));return a}let b=l(o,s.props??{});return s.type!==n.Fragment&&(b.ref=i?y:v),n.cloneElement(s,b)});return r.displayName=`${e}.Slot`,r}var i=r(`Slot`),a=Symbol.for(`radix.slottable`);function o(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=a,t}var s=o(`Slottable`),c=(e,t)=>{if(`child`in e.props){let t=e.props.child;return n.isValidElement(t)?n.cloneElement(t,void 0,e.props.children(t.props.children)):null}return n.isValidElement(t)?t:null};function l(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function u(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function d(e){return n.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===a}var f=Symbol.for(`react.lazy`);function p(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===f&&`_payload`in e&&m(e._payload)}function m(e){return typeof e==`object`&&!!e&&`then`in e}var h=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,g=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,_=n.use;exports.Root=i,exports.Slot=i,exports.Slottable=s,exports.createSlot=r,exports.createSlottable=o;
2
+ const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../react-compose-refs/dist/index.cjs");let n=require("react");n=e.__toESM(n,1);var r=Object.defineProperty,i=(e,t)=>r(e,`name`,{value:t,configurable:!0});function a(e){let r=n.forwardRef((r,i)=>{let{children:a,...o}=r,s=null,c=!1,l=[];h(a)&&typeof y==`function`&&(a=y(a._payload)),n.Children.forEach(a,e=>{if(p(e)){c=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;h(n)&&typeof y==`function`&&(n=y(n._payload)),s=u(t,n),l.push(s?.props?.children)}else l.push(e)}),s?s=n.cloneElement(s,void 0,l):!c&&n.Children.count(a)===1&&n.isValidElement(a)&&(s=a);let m=s?f(s):void 0,g=t.useComposedRefs(i,m);if(!s){if(a||a===0)throw Error(c?v(e):_(e));return a}let b=d(o,s.props??{});return s.type!==n.Fragment&&(b.ref=i?g:m),n.cloneElement(s,b)});return r.displayName=`${e}.Slot`,r}i(a,`createSlot`);var o=a(`Slot`),s=Symbol.for(`radix.slottable`);function c(e){let t=i(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=s,t}i(c,`createSlottable`);var l=c(`Slottable`),u=i((e,t)=>{if(`child`in e.props){let t=e.props.child;return n.isValidElement(t)?n.cloneElement(t,void 0,e.props.children(t.props.children)):null}return n.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function d(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}i(d,`mergeProps`);function f(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}i(f,`getElementRef`);function p(e){return n.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===s}i(p,`isSlottable`);var m=Symbol.for(`react.lazy`);function h(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===m&&`_payload`in e&&g(e._payload)}i(h,`isLazyComponent`);function g(e){return typeof e==`object`&&!!e&&`then`in e}i(g,`isPromiseLike`);var _=i(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),v=i(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),y=n.use;exports.Root=o,exports.Slot=o,exports.Slottable=l,exports.createSlot=a,exports.createSlottable=c;
@@ -2,41 +2,47 @@
2
2
  import { useComposedRefs as e } from "../../react-compose-refs/dist/index.js";
3
3
  import * as t from "react";
4
4
  //#region node_modules/@radix-ui/react-slot/dist/index.mjs
5
+ var n = Object.defineProperty, r = (e, t) => n(e, "name", {
6
+ value: t,
7
+ configurable: !0
8
+ });
5
9
  // @__NO_SIDE_EFFECTS__
6
- function n(n) {
10
+ function i(n) {
7
11
  let r = t.forwardRef((r, i) => {
8
- let { children: a, ...o } = r, d = null, p = !1, _ = [];
9
- f(a) && typeof g == "function" && (a = g(a._payload)), t.Children.forEach(a, (e) => {
10
- if (u(e)) {
11
- p = !0;
12
+ let { children: a, ...o } = r, s = null, c = !1, p = [];
13
+ m(a) && typeof v == "function" && (a = v(a._payload)), t.Children.forEach(a, (e) => {
14
+ if (f(e)) {
15
+ c = !0;
12
16
  let t = e, n = "child" in t.props ? t.props.child : t.props.children;
13
- f(n) && typeof g == "function" && (n = g(n._payload)), d = s(t, n), _.push(d?.props?.children);
14
- } else _.push(e);
15
- }), d ? d = t.cloneElement(d, void 0, _) : !p && t.Children.count(a) === 1 && t.isValidElement(a) && (d = a);
16
- let v = d ? l(d) : void 0, y = e(i, v);
17
- if (!d) {
18
- if (a || a === 0) throw Error(p ? h(n) : m(n));
17
+ m(n) && typeof v == "function" && (n = v(n._payload)), s = l(t, n), p.push(s?.props?.children);
18
+ } else p.push(e);
19
+ }), s ? s = t.cloneElement(s, void 0, p) : !c && t.Children.count(a) === 1 && t.isValidElement(a) && (s = a);
20
+ let h = s ? d(s) : void 0, y = e(i, h);
21
+ if (!s) {
22
+ if (a || a === 0) throw Error(c ? _(n) : g(n));
19
23
  return a;
20
24
  }
21
- let b = c(o, d.props ?? {});
22
- return d.type !== t.Fragment && (b.ref = i ? y : v), t.cloneElement(d, b);
25
+ let b = u(o, s.props ?? {});
26
+ return s.type !== t.Fragment && (b.ref = i ? y : h), t.cloneElement(s, b);
23
27
  });
24
28
  return r.displayName = `${n}.Slot`, r;
25
29
  }
26
- var r = /* @__PURE__ */ n("Slot"), i = Symbol.for("radix.slottable");
30
+ r(i, "createSlot");
31
+ var a = /* @__PURE__ */ i("Slot"), o = Symbol.for("radix.slottable");
27
32
  // @__NO_SIDE_EFFECTS__
28
- function a(e) {
29
- let t = (e) => "child" in e ? e.children(e.child) : e.children;
30
- return t.displayName = `${e}.Slottable`, t.__radixId = i, t;
33
+ function s(e) {
34
+ let t = /* @__PURE__ */ r((e) => "child" in e ? e.children(e.child) : e.children, "Slottable");
35
+ return t.displayName = `${e}.Slottable`, t.__radixId = o, t;
31
36
  }
32
- var o = /* @__PURE__ */ a("Slottable"), s = (e, n) => {
37
+ r(s, "createSlottable");
38
+ var c = /* @__PURE__ */ s("Slottable"), l = /* @__PURE__ */ r((e, n) => {
33
39
  if ("child" in e.props) {
34
40
  let n = e.props.child;
35
41
  return t.isValidElement(n) ? t.cloneElement(n, void 0, e.props.children(n.props.children)) : null;
36
42
  }
37
43
  return t.isValidElement(n) ? n : null;
38
- };
39
- function c(e, t) {
44
+ }, "getSlottableElementFromSlottable");
45
+ function u(e, t) {
40
46
  let n = { ...t };
41
47
  for (let r in t) {
42
48
  let i = e[r], a = t[r];
@@ -53,20 +59,25 @@ function c(e, t) {
53
59
  ...n
54
60
  };
55
61
  }
56
- function l(e) {
62
+ r(u, "mergeProps");
63
+ function d(e) {
57
64
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
58
65
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
59
66
  }
60
- function u(e) {
61
- return t.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === i;
62
- }
63
- var d = Symbol.for("react.lazy");
67
+ r(d, "getElementRef");
64
68
  function f(e) {
65
- return typeof e == "object" && !!e && "$$typeof" in e && e.$$typeof === d && "_payload" in e && p(e._payload);
69
+ return t.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === o;
70
+ }
71
+ r(f, "isSlottable");
72
+ var p = Symbol.for("react.lazy");
73
+ function m(e) {
74
+ return typeof e == "object" && !!e && "$$typeof" in e && e.$$typeof === p && "_payload" in e && h(e._payload);
66
75
  }
67
- function p(e) {
76
+ r(m, "isLazyComponent");
77
+ function h(e) {
68
78
  return typeof e == "object" && !!e && "then" in e;
69
79
  }
70
- var m = (e) => `${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`, h = (e) => `${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`, g = t.use;
80
+ r(h, "isPromiseLike");
81
+ var g = /* @__PURE__ */ r((e) => `${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`, "createSlotError"), _ = /* @__PURE__ */ r((e) => `${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`, "createSlottableError"), v = t.use;
71
82
  //#endregion
72
- export { r as Root, r as Slot, o as Slottable, n as createSlot, a as createSlottable };
83
+ export { a as Root, a as Slot, c as Slottable, i as createSlot, s as createSlottable };