wimui 0.7.0 → 0.8.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.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_text_13rfz_2`,t=`_badge_13rfz_5`,n={text:e,badge:t};exports.badge=t,exports.default=n,exports.text=e;
2
+ var e=`_text_1ojtz_2`,t=`_badge_1ojtz_5`,n={text:e,badge:t};exports.badge=t,exports.default=n,exports.text=e;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  //#region src/components/_internal/field-label-content.module.scss
3
- var e = "_text_13rfz_2", t = "_badge_13rfz_5", n = {
3
+ var e = "_text_1ojtz_2", t = "_badge_1ojtz_5", n = {
4
4
  text: e,
5
5
  badge: t
6
6
  };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_root_ngdgp_2`,t=`_fullWidth_ngdgp_12`,n=`_plain_ngdgp_15`,r={root:e,fullWidth:t,plain:n};exports.default=r,exports.fullWidth=t,exports.plain=n,exports.root=e;
2
+ var e=`_root_1uiyp_2`,t=`_fullWidth_1uiyp_12`,n=`_plain_1uiyp_15`,r={root:e,fullWidth:t,plain:n};exports.default=r,exports.fullWidth=t,exports.plain=n,exports.root=e;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  //#region src/components/form/Fieldset/fieldset.module.scss
3
- var e = "_root_ngdgp_2", t = "_fullWidth_ngdgp_12", n = "_plain_ngdgp_15", r = {
3
+ var e = "_root_1uiyp_2", t = "_fullWidth_1uiyp_12", n = "_plain_1uiyp_15", r = {
4
4
  root: e,
5
5
  fullWidth: t,
6
6
  plain: n
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_root_o619x_22`,t=`_fullWidth_o619x_37`,n=`_danger_o619x_13`,r=`_sm_o619x_44`,i=`_item_o619x_47`,a=`_iconOnly_o619x_52`,o=`_icon_o619x_52`,s=`_md_o619x_62`,c=`_lg_o619x_80`,l=`_slider_o619x_98`,u=`_ready_o619x_112`,d=`_active_o619x_149`,f=`_label_o619x_156`,p={root:e,fullWidth:t,danger:n,sm:r,item:i,iconOnly:a,icon:o,md:s,lg:c,slider:l,ready:u,active:d,label:f};exports.active=d,exports.danger=n,exports.default=p,exports.fullWidth=t,exports.icon=o,exports.iconOnly=a,exports.item=i,exports.label=f,exports.lg=c,exports.md=s,exports.ready=u,exports.root=e,exports.slider=l,exports.sm=r;
2
+ var e=`_root_1sve6_22`,t=`_fullWidth_1sve6_45`,n=`_danger_1sve6_13`,r=`_sm_1sve6_52`,i=`_item_1sve6_55`,a=`_iconOnly_1sve6_60`,o=`_icon_1sve6_60`,s=`_md_1sve6_70`,c=`_lg_1sve6_88`,l=`_slider_1sve6_106`,u=`_ready_1sve6_120`,d=`_active_1sve6_157`,f=`_label_1sve6_164`,p={root:e,fullWidth:t,danger:n,sm:r,item:i,iconOnly:a,icon:o,md:s,lg:c,slider:l,ready:u,active:d,label:f};exports.active=d,exports.danger=n,exports.default=p,exports.fullWidth=t,exports.icon=o,exports.iconOnly=a,exports.item=i,exports.label=f,exports.lg=c,exports.md=s,exports.ready=u,exports.root=e,exports.slider=l,exports.sm=r;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  //#region src/components/form/SegmentedControl/segmented-control.module.scss
3
- var e = "_root_o619x_22", t = "_fullWidth_o619x_37", n = "_danger_o619x_13", r = "_sm_o619x_44", i = "_item_o619x_47", a = "_iconOnly_o619x_52", o = "_icon_o619x_52", s = "_md_o619x_62", c = "_lg_o619x_80", l = "_slider_o619x_98", u = "_ready_o619x_112", d = "_active_o619x_149", f = "_label_o619x_156", p = {
3
+ var e = "_root_1sve6_22", t = "_fullWidth_1sve6_45", n = "_danger_1sve6_13", r = "_sm_1sve6_52", i = "_item_1sve6_55", a = "_iconOnly_1sve6_60", o = "_icon_1sve6_60", s = "_md_1sve6_70", c = "_lg_1sve6_88", l = "_slider_1sve6_106", u = "_ready_1sve6_120", d = "_active_1sve6_157", f = "_label_1sve6_164", p = {
4
4
  root: e,
5
5
  fullWidth: t,
6
6
  danger: n,
@@ -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("../../_internal/FieldLabelContent.cjs"),r=require("./legend.module.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=i.default.forwardRef(({asChild:e=!1,label:i,required:s,showOptional:c,className:l,children:u,...d},f)=>(0,o.jsxs)(e?t.Root:`legend`,{className:(0,a.default)(`wim-legend`,r.default.root,l),ref:f,...d,children:[(0,o.jsx)(n.FieldLabelContent,{label:i,required:s,showOptional:c}),(0,o.jsx)(t.Slottable,{children:u})]}));s.displayName=`Legend`,exports.Legend=s;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../_internal/FieldLabelContent.cjs"),r=require("./legend.module.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=i.default.forwardRef(({asChild:e=!1,label:i,required:s,requiredLabel:c,showOptional:l,optionalLabel:u,className:d,children:f,...p},m)=>{let h=e?t.Root:`legend`,g=i!=null&&i!==!1?!0:!!(s||l);return(0,o.jsxs)(h,{className:(0,a.default)(`wim-legend`,r.default.root,d),ref:m,...p,children:[g&&(0,o.jsx)(n.FieldLabelContent,{label:i,required:s,requiredLabel:c,showOptional:l,optionalLabel:u}),(0,o.jsx)(t.Slottable,{children:f})]})});s.displayName=`Legend`,exports.Legend=s;
@@ -1,6 +1,36 @@
1
1
  import { default as React } from 'react';
2
- import { FieldLabelContentProps } from '../../_internal/FieldLabelContent';
3
- export interface LegendProps extends React.HTMLAttributes<HTMLLegendElement>, FieldLabelContentProps {
2
+ export interface LegendProps extends React.HTMLAttributes<HTMLLegendElement> {
3
+ /**
4
+ * The group name. Optional — a Legend can also be written with children only
5
+ * (`<Legend>Group title</Legend>`), which is what you want when the group name
6
+ * is a heading: `<legend>` may contain heading content directly, while the
7
+ * `label` slot wraps its value in a `<span>` (phrasing content, so a heading
8
+ * inside it is invalid).
9
+ */
10
+ label?: React.ReactNode;
11
+ /**
12
+ * Whether the group is mandatory. If true, displays a required badge.
13
+ */
14
+ required?: boolean;
15
+ /**
16
+ * Custom text or element for the required badge.
17
+ * Defaults to the localized `form.required` string.
18
+ */
19
+ requiredLabel?: React.ReactNode;
20
+ /**
21
+ * Whether to display an optional badge when `required` is false.
22
+ * @default false
23
+ */
24
+ showOptional?: boolean;
25
+ /**
26
+ * Custom text or element for the optional badge.
27
+ * Defaults to the localized `form.optional` string.
28
+ */
29
+ optionalLabel?: React.ReactNode;
30
+ /**
31
+ * Additional CSS class name for the container.
32
+ */
33
+ className?: string;
4
34
  /**
5
35
  * If true, the Legend will be rendered as its child, merging its props onto that child.
6
36
  */
@@ -6,16 +6,21 @@ import i from "react";
6
6
  import a from "classnames";
7
7
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
8
  //#region src/components/typography/Legend/Legend.tsx
9
- var c = i.forwardRef(({ asChild: i = !1, label: c, required: l, showOptional: u, className: d, children: f, ...p }, m) => /* @__PURE__ */ s(i ? e : "legend", {
10
- className: a("wim-legend", r.root, d),
11
- ref: m,
12
- ...p,
13
- children: [/* @__PURE__ */ o(n, {
14
- label: c,
15
- required: l,
16
- showOptional: u
17
- }), /* @__PURE__ */ o(t, { children: f })]
18
- }));
9
+ var c = i.forwardRef(({ asChild: i = !1, label: c, required: l, requiredLabel: u, showOptional: d, optionalLabel: f, className: p, children: m, ...h }, g) => {
10
+ let _ = i ? e : "legend", v = c != null && c !== !1 ? !0 : !!(l || d);
11
+ return /* @__PURE__ */ s(_, {
12
+ className: a("wim-legend", r.root, p),
13
+ ref: g,
14
+ ...h,
15
+ children: [v && /* @__PURE__ */ o(n, {
16
+ label: c,
17
+ required: l,
18
+ requiredLabel: u,
19
+ showOptional: d,
20
+ optionalLabel: f
21
+ }), /* @__PURE__ */ o(t, { children: m })]
22
+ });
23
+ });
19
24
  c.displayName = "Legend";
20
25
  //#endregion
21
26
  export { c as Legend };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_root_1g8r9_3`,t={root:e};exports.default=t,exports.root=e;
2
+ var e=`_root_1vxwj_3`,t={root:e};exports.default=t,exports.root=e;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
2
  //#region src/components/typography/Legend/legend.module.scss
3
- var e = "_root_1g8r9_3", t = { root: e };
3
+ var e = "_root_1vxwj_3", t = { root: e };
4
4
  //#endregion
5
5
  export { t as default, e as root };
@@ -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.8.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
 
@@ -2532,8 +2532,12 @@ Defaults to the localized `form.optional` string.
2532
2532
  - `className: string` — Additional CSS class name for the container.
2533
2533
  - `asChild: boolean` = false — If true, the Label will be rendered as its child, merging its props onto that child.
2534
2534
  - **Legend** — Group title
2535
- - `label: React.ReactNode` (required) — The main label text or element.
2536
- - `required: boolean` — Whether the field is mandatory. If true, displays a required badge.
2535
+ - `label: React.ReactNode` — The group name. Optional a Legend can also be written with children only
2536
+ (`<Legend>Group title</Legend>`), which is what you want when the group name
2537
+ is a heading: `<legend>` may contain heading content directly, while the
2538
+ `label` slot wraps its value in a `<span>` (phrasing content, so a heading
2539
+ inside it is invalid).
2540
+ - `required: boolean` — Whether the group is mandatory. If true, displays a required badge.
2537
2541
  - `requiredLabel: React.ReactNode` — Custom text or element for the required badge.
2538
2542
  Defaults to the localized `form.required` string.
2539
2543
  - `showOptional: boolean` — Whether to display an optional badge when `required` is false.
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.8.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
 
@@ -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 };