wimui 0.52.6 → 0.52.8

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.
@@ -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("../../../icon/external-link.cjs"),r=require("../../media/Icon/Icon.cjs"),i=require("./link.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,label:a,size:c=`md`,priority:l=`primary`,iconName:u,iconPosition:d=`left`,external:f=!1,styles:p,className:m,children:h,target:g,..._},v)=>{let y=e?t.Root:`a`,b=f?`_blank`:g;return(0,s.jsx)(y,{ref:v,className:(0,o.default)(`wim-link`,i.default.root,i.default[c],i.default[l],m,p?.root),target:b,..._,children:(0,s.jsxs)(`span`,{className:(0,o.default)(i.default.inner,p?.inner),children:[u&&d===`left`&&(0,s.jsx)(r.Icon,{name:u,size:c}),(0,s.jsx)(`span`,{className:(0,o.default)(i.default.label,p?.label),children:(0,s.jsx)(t.Slottable,{children:a??h})}),u&&d===`right`&&(0,s.jsx)(r.Icon,{name:u,size:c}),f&&(0,s.jsx)(r.Icon,{component:n.default,size:c,className:(0,o.default)(i.default.externalIcon,p?.externalIcon)})]})})});c.displayName=`Link`,exports.Link=c;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../icon/external-link.cjs"),r=require("../../media/Icon/Icon.cjs"),i=require("./link.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,label:a,size:c=`md`,priority:l=`primary`,iconName:u,iconPosition:d=`left`,external:f=!1,styles:p,className:m,children:h,target:g,..._},v)=>{let y=e?t.Root:`a`,b=f?`_blank`:g,x=e=>(0,s.jsxs)(`span`,{className:(0,o.default)(i.default.inner,p?.inner),children:[u&&d===`left`&&(0,s.jsx)(r.Icon,{name:u,size:c}),(0,s.jsx)(`span`,{className:(0,o.default)(i.default.label,p?.label),children:e}),u&&d===`right`&&(0,s.jsx)(r.Icon,{name:u,size:c}),f&&(0,s.jsx)(r.Icon,{component:n.default,size:c,className:(0,o.default)(i.default.externalIcon,p?.externalIcon)})]});return(0,s.jsx)(y,{ref:v,className:(0,o.default)(`wim-link`,i.default.root,i.default[c],i.default[l],m,p?.root),target:b,..._,children:e?(0,s.jsx)(t.Slottable,{child:h,children:e=>x(a??e)}):x(a??h)})});c.displayName=`Link`,exports.Link=c;
@@ -8,34 +8,37 @@ import o from "classnames";
8
8
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
9
9
  //#region src/components/navigation/Link/Link.tsx
10
10
  var l = a.forwardRef(({ asChild: a = !1, label: l, size: u = "md", priority: d = "primary", iconName: f, iconPosition: p = "left", external: m = !1, styles: h, className: g, children: _, target: v, ...y }, b) => {
11
- let x = a ? e : "a", S = m ? "_blank" : v;
11
+ let x = a ? e : "a", S = m ? "_blank" : v, C = (e) => /* @__PURE__ */ c("span", {
12
+ className: o(i.inner, h?.inner),
13
+ children: [
14
+ f && p === "left" && /* @__PURE__ */ s(r, {
15
+ name: f,
16
+ size: u
17
+ }),
18
+ /* @__PURE__ */ s("span", {
19
+ className: o(i.label, h?.label),
20
+ children: e
21
+ }),
22
+ f && p === "right" && /* @__PURE__ */ s(r, {
23
+ name: f,
24
+ size: u
25
+ }),
26
+ m && /* @__PURE__ */ s(r, {
27
+ component: n,
28
+ size: u,
29
+ className: o(i.externalIcon, h?.externalIcon)
30
+ })
31
+ ]
32
+ });
12
33
  return /* @__PURE__ */ s(x, {
13
34
  ref: b,
14
35
  className: o("wim-link", i.root, i[u], i[d], g, h?.root),
15
36
  target: S,
16
37
  ...y,
17
- children: /* @__PURE__ */ c("span", {
18
- className: o(i.inner, h?.inner),
19
- children: [
20
- f && p === "left" && /* @__PURE__ */ s(r, {
21
- name: f,
22
- size: u
23
- }),
24
- /* @__PURE__ */ s("span", {
25
- className: o(i.label, h?.label),
26
- children: /* @__PURE__ */ s(t, { children: l ?? _ })
27
- }),
28
- f && p === "right" && /* @__PURE__ */ s(r, {
29
- name: f,
30
- size: u
31
- }),
32
- m && /* @__PURE__ */ s(r, {
33
- component: n,
34
- size: u,
35
- className: o(i.externalIcon, h?.externalIcon)
36
- })
37
- ]
38
- })
38
+ children: a ? /* @__PURE__ */ s(t, {
39
+ child: _,
40
+ children: (e) => C(l ?? e)
41
+ }) : C(l ?? _)
39
42
  });
40
43
  });
41
44
  l.displayName = "Link";
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## What this is
6
6
 
7
- **wimui** v0.52.6 — a React 19 component library: 228 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.52.8 — a React 19 component library: 228 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
 
package/dist/llms.txt CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## What this is
6
6
 
7
- **wimui** v0.52.6 — a React 19 component library: 228 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.52.8 — a React 19 component library: 228 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
 
@@ -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"),r=e.__toESM(n,1);n=e.__toESM(n);var i=Object.defineProperty,a=(e,t)=>i(e,`name`,{value:t,configurable:!0});function o(e){let n=r.forwardRef((n,i)=>{let{children:a,...o}=n,s=null,c=!1,l=[];g(a)&&typeof b==`function`&&(a=b(a._payload)),r.Children.forEach(a,e=>{if(m(e)){c=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;g(n)&&typeof b==`function`&&(n=b(n._payload)),s=d(t,n),l.push(s?.props?.children)}else l.push(e)}),s?s=r.cloneElement(s,void 0,l):!c&&r.Children.count(a)===1&&r.isValidElement(a)&&(s=a);let u=s?p(s):void 0,h=t.useComposedRefs(i,u);if(!s){if(a||a===0)throw Error(c?y(e):v(e));return a}let _=f(o,s.props??{});return s.type!==r.Fragment&&(_.ref=i?h:u),r.cloneElement(s,_)});return n.displayName=`${e}.Slot`,n}a(o,`createSlot`);var s=o(`Slot`),c=Symbol.for(`radix.slottable`);function l(e){let t=a(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=c,t}a(l,`createSlottable`);var u=l(`Slottable`),d=a((e,t)=>{if(`child`in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function f(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}}a(f,`mergeProps`);function p(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)}a(p,`getElementRef`);function m(e){return r.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===c}a(m,`isSlottable`);var h=Symbol.for(`react.lazy`);function g(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===h&&`_payload`in e&&_(e._payload)}a(g,`isLazyComponent`);function _(e){return typeof e==`object`&&!!e&&`then`in e}a(_,`isPromiseLike`);var v=a(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),y=a(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),b=r.use;exports.Root=s,exports.Slot=s,exports.Slottable=u,exports.createSlot=o,exports.createSlottable=l;
2
+ const e=require("../../../../_virtual/_rolldown/runtime.cjs"),t=require("../../react-compose-refs/dist/index.cjs");let n=require("react"),r=e.__toESM(n,1);n=e.__toESM(n);var i=Object.defineProperty,a=(e,t)=>i(e,`name`,{value:t,configurable:!0});function o(e){let n=r.forwardRef((n,i)=>{let{children:a,...o}=n,s=null,c=!1,l=[];g(a)&&typeof x==`function`&&(a=x(a._payload)),r.Children.forEach(a,e=>{if(m(e)){c=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;g(n)&&typeof x==`function`&&(n=x(n._payload)),s=d(t,n),l.push(s?.props?.children)}else l.push(e)}),s?s=r.cloneElement(s,void 0,l):!c&&r.Children.count(a)===1&&r.isValidElement(a)&&(s=a);let u=s?p(s):void 0,h=t.useComposedRefs(i,u);if(!s){if(a||a===0)throw Error(c?b(e):y(e));return a}let _=f(o,s.props??{});return s.type!==r.Fragment&&(_.ref=i?h:u),r.cloneElement(s,_)});return n.displayName=`${e}.Slot`,n}a(o,`createSlot`);var s=o(`Slot`),c=Symbol.for(`radix.slottable`);function l(e){let t=a(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=c,t}a(l,`createSlottable`);var u=l(`Slottable`),d=a((e,t)=>{if(`child`in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function f(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(` `):r===`aria-describedby`&&(n[r]=v(a,i))}return{...e,...n}}a(f,`mergeProps`);function p(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)}a(p,`getElementRef`);function m(e){return r.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===c}a(m,`isSlottable`);var h=Symbol.for(`react.lazy`);function g(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===h&&`_payload`in e&&_(e._payload)}a(g,`isLazyComponent`);function _(e){return typeof e==`object`&&!!e&&`then`in e}a(_,`isPromiseLike`);function v(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}a(v,`concatAriaDescribedby`);var y=a(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),b=a(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),x=r.use;exports.Root=s,exports.Slot=s,exports.Slottable=u,exports.createSlot=o,exports.createSlottable=l;
@@ -10,20 +10,20 @@ var n = Object.defineProperty, r = (e, t) => n(e, "name", {
10
10
  function i(n) {
11
11
  let r = t.forwardRef((r, i) => {
12
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) => {
13
+ m(a) && typeof y == "function" && (a = y(a._payload)), t.Children.forEach(a, (e) => {
14
14
  if (f(e)) {
15
15
  c = !0;
16
16
  let t = e, n = "child" in t.props ? t.props.child : t.props.children;
17
- m(n) && typeof v == "function" && (n = v(n._payload)), s = l(t, n), p.push(s?.props?.children);
17
+ m(n) && typeof y == "function" && (n = y(n._payload)), s = l(t, n), p.push(s?.props?.children);
18
18
  } else p.push(e);
19
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);
20
+ let h = s ? d(s) : void 0, g = e(i, h);
21
21
  if (!s) {
22
- if (a || a === 0) throw Error(c ? _(n) : g(n));
22
+ if (a || a === 0) throw Error(c ? v(n) : _(n));
23
23
  return a;
24
24
  }
25
25
  let b = u(o, s.props ?? {});
26
- return s.type !== t.Fragment && (b.ref = i ? y : h), t.cloneElement(s, b);
26
+ return s.type !== t.Fragment && (b.ref = i ? g : h), t.cloneElement(s, b);
27
27
  });
28
28
  return r.displayName = `${n}.Slot`, r;
29
29
  }
@@ -52,7 +52,7 @@ function u(e, t) {
52
52
  } : i && (n[r] = i) : r === "style" ? n[r] = {
53
53
  ...i,
54
54
  ...a
55
- } : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
55
+ } : r === "className" ? n[r] = [i, a].filter(Boolean).join(" ") : r === "aria-describedby" && (n[r] = g(a, i));
56
56
  }
57
57
  return {
58
58
  ...e,
@@ -78,6 +78,12 @@ function h(e) {
78
78
  return typeof e == "object" && !!e && "then" in e;
79
79
  }
80
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;
81
+ function g(...e) {
82
+ let t = /* @__PURE__ */ new Set();
83
+ for (let n of e) if (typeof n == "string") for (let e of String(n).trim().split(/\s+/)) e && t.add(e);
84
+ return t.size > 0 ? Array.from(t).join(" ") : void 0;
85
+ }
86
+ r(g, "concatAriaDescribedby");
87
+ var _ = /* @__PURE__ */ r((e) => `${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`, "createSlotError"), v = /* @__PURE__ */ r((e) => `${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`, "createSlottableError"), y = t.use;
82
88
  //#endregion
83
89
  export { a as Root, a as Slot, c as Slottable, i as createSlot, s as createSlottable };