@purpurds/label 8.7.0 → 8.8.1

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/dist/LICENSE.txt CHANGED
@@ -8,7 +8,7 @@ Homepage: https://radix-ui.com/primitives
8
8
  ---
9
9
 
10
10
  Name: @radix-ui/react-slot
11
- Version: 1.2.3
11
+ Version: 1.2.4
12
12
  License: MIT
13
13
  Private: false
14
14
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -41,7 +41,7 @@ SOFTWARE.
41
41
  ---
42
42
 
43
43
  Name: @radix-ui/react-primitive
44
- Version: 2.1.3
44
+ Version: 2.1.4
45
45
  License: MIT
46
46
  Private: false
47
47
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -74,7 +74,7 @@ SOFTWARE.
74
74
  ---
75
75
 
76
76
  Name: @radix-ui/react-label
77
- Version: 2.1.7
77
+ Version: 2.1.8
78
78
  License: MIT
79
79
  Private: false
80
80
  Repository: git+https://github.com/radix-ui/primitives.git
package/dist/label.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),h=require("react");require("react-dom");function S(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const u=S(h);function m(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function _(...e){return n=>{let r=!1;const i=e.map(o=>{const t=m(o,n);return!r&&typeof t=="function"&&(r=!0),t});if(r)return()=>{for(let o=0;o<i.length;o++){const t=i[o];typeof t=="function"?t():m(e[o],null)}}}}function j(e){const n=x(e),r=u.forwardRef((i,o)=>{const{children:t,...l}=i,s=u.Children.toArray(t),a=s.find(R);if(a){const c=a.props.children,g=s.map(b=>b===a?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:b);return f.jsx(n,{...l,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,g):null})}return f.jsx(n,{...l,ref:o,children:t})});return r.displayName=`${e}.Slot`,r}function x(e){const n=u.forwardRef((r,i)=>{const{children:o,...t}=r;if(u.isValidElement(o)){const l=E(o),s=w(t,o.props);return o.type!==u.Fragment&&(s.ref=i?_(i,l):l),u.cloneElement(o,s)}return u.Children.count(o)>1?u.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var O=Symbol("radix.slottable");function R(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===O}function w(e,n){const r={...n};for(const i in n){const o=e[i],t=n[i];/^on[A-Z]/.test(i)?o&&t?r[i]=(...s)=>{const a=t(...s);return o(...s),a}:o&&(r[i]=o):i==="style"?r[i]={...o,...t}:i==="className"&&(r[i]=[o,t].filter(Boolean).join(" "))}return{...e,...r}}function E(e){var i,o;let n=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var P=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],C=P.reduce((e,n)=>{const r=j(`Primitive.${n}`),i=u.forwardRef((o,t)=>{const{asChild:l,...s}=o,a=l?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(a,{...s,ref:t})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{}),N="Label",v=u.forwardRef((e,n)=>f.jsx(C.label,{...e,ref:n,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));v.displayName=N;var D=v;function A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),S=require("react");require("react-dom");function j(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(o,r,i.get?i:{enumerable:!0,get:()=>t[r]})}}return o.default=t,Object.freeze(o)}const a=j(S);function m(t,o){if(typeof t=="function")return t(o);t!=null&&(t.current=o)}function x(...t){return o=>{let r=!1;const i=t.map(n=>{const e=m(n,o);return!r&&typeof e=="function"&&(r=!0),e});if(r)return()=>{for(let n=0;n<i.length;n++){const e=i[n];typeof e=="function"?e():m(t[n],null)}}}}var E=Symbol.for("react.lazy"),p=a[" use ".trim().toString()];function O(t){return typeof t=="object"&&t!==null&&"then"in t}function h(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===E&&"_payload"in t&&O(t._payload)}function P(t){const o=R(t),r=a.forwardRef((i,n)=>{let{children:e,...l}=i;h(e)&&typeof p=="function"&&(e=p(e._payload));const s=a.Children.toArray(e),u=s.find(w);if(u){const c=u.props.children,_=s.map(b=>b===u?a.Children.count(c)>1?a.Children.only(null):a.isValidElement(c)?c.props.children:null:b);return f.jsx(o,{...l,ref:n,children:a.isValidElement(c)?a.cloneElement(c,void 0,_):null})}return f.jsx(o,{...l,ref:n,children:e})});return r.displayName=`${t}.Slot`,r}function R(t){const o=a.forwardRef((r,i)=>{let{children:n,...e}=r;if(h(n)&&typeof p=="function"&&(n=p(n._payload)),a.isValidElement(n)){const l=$(n),s=N(e,n.props);return n.type!==a.Fragment&&(s.ref=i?x(i,l):l),a.cloneElement(n,s)}return a.Children.count(n)>1?a.Children.only(null):null});return o.displayName=`${t}.SlotClone`,o}var C=Symbol("radix.slottable");function w(t){return a.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===C}function N(t,o){const r={...o};for(const i in o){const n=t[i],e=o[i];/^on[A-Z]/.test(i)?n&&e?r[i]=(...s)=>{const u=e(...s);return n(...s),u}:n&&(r[i]=n):i==="style"?r[i]={...n,...e}:i==="className"&&(r[i]=[n,e].filter(Boolean).join(" "))}return{...t,...r}}function $(t){var i,n;let o=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,r=o&&"isReactWarning"in o&&o.isReactWarning;return r?t.ref:(o=(n=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:n.get,r=o&&"isReactWarning"in o&&o.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var D=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],A=D.reduce((t,o)=>{const r=P(`Primitive.${o}`),i=a.forwardRef((n,e)=>{const{asChild:l,...s}=n,u=l?r:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(u,{...s,ref:e})});return i.displayName=`Primitive.${o}`,{...t,[o]:i}},{}),L="Label",v=a.forwardRef((t,o)=>f.jsx(A.label,{...t,ref:o,onMouseDown:r=>{var n;r.target.closest("button, input, select, textarea")||((n=t.onMouseDown)==null||n.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));v.displayName=L;var T=v;function V(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */var y;function V(){return y||(y=1,(function(e){(function(){var n={}.hasOwnProperty;function r(){for(var t="",l=0;l<arguments.length;l++){var s=arguments[l];s&&(t=o(t,i.call(this,s)))}return t}function i(t){if(typeof t=="string"||typeof t=="number")return this&&this[t]||t;if(typeof t!="object")return"";if(Array.isArray(t))return r.apply(this,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var l="";for(var s in t)n.call(t,s)&&t[s]&&(l=o(l,this&&this[s]||s));return l}function o(t,l){return l?t?t+" "+l:t+l:t}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(p)),p.exports}var $=V();const L=A($),M={"purpur-label":"_purpur-label_1x80u_1","purpur-label--negative":"_purpur-label--negative_1x80u_8","purpur-label--disabled":"_purpur-label--disabled_1x80u_11"},q=L.bind(M),d="purpur-label",I=({children:e,className:n,disabled:r,negative:i=!1,...o})=>{const t=q(n,d,{[`${d}--disabled`]:r,[`${d}--negative`]:i});return f.jsx(D,{className:t,...o,children:e})};exports.Label=I;
5
+ */var g;function M(){return g||(g=1,(function(t){(function(){var o={}.hasOwnProperty;function r(){for(var e="",l=0;l<arguments.length;l++){var s=arguments[l];s&&(e=n(e,i.call(this,s)))}return e}function i(e){if(typeof e=="string"||typeof e=="number")return this&&this[e]||e;if(typeof e!="object")return"";if(Array.isArray(e))return r.apply(this,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var l="";for(var s in e)o.call(e,s)&&e[s]&&(l=n(l,this&&this[s]||s));return l}function n(e,l){return l?e?e+" "+l:e+l:e}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(d)),d.exports}var q=M();const I=V(q),W={"purpur-label":"_purpur-label_1x80u_1","purpur-label--negative":"_purpur-label--negative_1x80u_8","purpur-label--disabled":"_purpur-label--disabled_1x80u_11"},B=I.bind(W),y="purpur-label",z=({children:t,className:o,disabled:r,negative:i=!1,...n})=>{const e=B(o,y,{[`${y}--disabled`]:r,[`${y}--negative`]:i});return f.jsx(T,{className:e,...n,children:t})};exports.Label=z;
6
6
  //# sourceMappingURL=label.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.cjs.js","sources":["../../../common/temp/node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.1.16_react@19.1.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.16_react@19.1.1/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.9_@types+react@19.1.16_react-dom@19.1.1_react@19.1.1/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.9_@types+react@19.1.16_react-dom@19.1.1_react@19.1.1/node_modules/@radix-ui/react-label/dist/index.mjs","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/label.tsx"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpurds/common-types\";\nimport * as RadixLabel from \"@radix-ui/react-label\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./label.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-label\";\n\nexport type LabelProps = Omit<BaseProps<\"label\">, \"children\"> & {\n children: ReactNode;\n disabled?: boolean;\n negative?: boolean;\n};\n\nexport const Label = ({\n children,\n className,\n disabled,\n negative = false,\n ...props\n}: LabelProps) => {\n const classes = cx(className, rootClassName, {\n [`${rootClassName}--disabled`]: disabled,\n [`${rootClassName}--negative`]: negative,\n });\n\n return (\n <RadixLabel.Root className={classes} {...props}>\n {children}\n </RadixLabel.Root>\n );\n};\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","_a","mayWarn","_b","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","NAME","Label","event","Root","hasOwn","classNames","classes","arg","appendClass","parseValue","key","newClass","module","cx","c","styles","rootClassName","className","disabled","negative","RadixLabel.Root"],"mappings":"ubAEA,SAASA,EAAOC,EAAKC,EAAO,CAC1B,GAAI,OAAOD,GAAQ,WACjB,OAAOA,EAAIC,CAAK,EACPD,GAAQ,OACjBA,EAAI,QAAUC,EAElB,CACA,SAASC,KAAeC,EAAM,CAC5B,OAAQC,GAAS,CACf,IAAIC,EAAa,GACjB,MAAMC,EAAWH,EAAK,IAAKH,GAAQ,CACjC,MAAMO,EAAUR,EAAOC,EAAKI,CAAI,EAChC,MAAI,CAACC,GAAc,OAAOE,GAAW,aACnCF,EAAa,IAERE,CACT,CAAC,EACD,GAAIF,EACF,MAAO,IAAM,CACX,QAASG,EAAI,EAAGA,EAAIF,EAAS,OAAQE,IAAK,CACxC,MAAMD,EAAUD,EAASE,CAAC,EACtB,OAAOD,GAAW,WACpBA,EAAO,EAEPR,EAAOI,EAAKK,CAAC,EAAG,IAAI,CAExB,CACF,CAEJ,CACF,CC3BA,SAASC,EAAWC,EAAW,CAC7B,MAAMC,EAA4BC,EAAgBF,CAAS,EACrDG,EAAQC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACtD,KAAM,CAAE,SAAAC,EAAU,GAAGC,CAAS,EAAKH,EAC7BI,EAAgBL,EAAM,SAAS,QAAQG,CAAQ,EAC/CG,EAAYD,EAAc,KAAKE,CAAW,EAChD,GAAID,EAAW,CACb,MAAME,EAAaF,EAAU,MAAM,SAC7BG,EAAcJ,EAAc,IAAKK,GACjCA,IAAUJ,EACRN,EAAM,SAAS,MAAMQ,CAAU,EAAI,EAAUR,EAAM,SAAS,KAAK,IAAI,EAClEA,EAAM,eAAeQ,CAAU,EAAIA,EAAW,MAAM,SAAW,KAE/DE,CAEV,EACD,OAAuBC,EAAAA,IAAId,EAAW,CAAE,GAAGO,EAAW,IAAKF,EAAc,SAAUF,EAAM,eAAeQ,CAAU,EAAIR,EAAM,aAAaQ,EAAY,OAAQC,CAAW,EAAI,K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AEtB,8MCrEMQ,EAAKC,EAAE,KAAKC,CAAM,EAElBC,EAAgB,eAQTf,EAAQ,CAAC,CACpB,SAAAnC,EACA,UAAAmD,EACA,SAAAC,EACA,SAAAC,EAAW,GACX,GAAGvD,CACL,IAAkB,CAChB,MAAM0C,EAAUO,EAAGI,EAAWD,EAAe,CAC3C,CAAC,GAAGA,CAAa,YAAY,EAAGE,EAChC,CAAC,GAAGF,CAAa,YAAY,EAAGG,CAAA,CACjC,EAED,OACE7C,EAAAA,IAAC8C,EAAA,CAAgB,UAAWd,EAAU,GAAG1C,EACtC,SAAAE,EACH,CAEJ","x_google_ignoreList":[0,1,2,3,4]}
1
+ {"version":3,"file":"label.cjs.js","sources":["../../../common/temp/node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.3_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.3_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-primitive@2.1.4_@types+react-dom@19.2.3_@types+react@19.2.3_react-dom@19.2.0_react@19.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-label@2.1.8_@types+react-dom@19.2.3_@types+react@19.2.3_react-dom@19.2.0_react@19.2.0/node_modules/@radix-ui/react-label/dist/index.mjs","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/label.tsx"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nvar use = React[\" use \".trim().toString()];\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpurds/common-types\";\nimport * as RadixLabel from \"@radix-ui/react-label\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./label.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-label\";\n\nexport type LabelProps = Omit<BaseProps<\"label\">, \"children\"> & {\n children: ReactNode;\n disabled?: boolean;\n negative?: boolean;\n};\n\nexport const Label = ({\n children,\n className,\n disabled,\n negative = false,\n ...props\n}: LabelProps) => {\n const classes = cx(className, rootClassName, {\n [`${rootClassName}--disabled`]: disabled,\n [`${rootClassName}--negative`]: negative,\n });\n\n return (\n <RadixLabel.Root className={classes} {...props}>\n {children}\n </RadixLabel.Root>\n );\n};\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","REACT_LAZY_TYPE","use","React","isPromiseLike","isLazyComponent","element","createSlot","ownerName","SlotClone","createSlotClone","Slot2","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","getter","_a","mayWarn","_b","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","NAME","Label","event","Root","hasOwn","classNames","classes","arg","appendClass","parseValue","key","newClass","module","cx","c","styles","rootClassName","className","disabled","negative","RadixLabel.Root"],"mappings":"ubAEA,SAASA,EAAOC,EAAKC,EAAO,CAC1B,GAAI,OAAOD,GAAQ,WACjB,OAAOA,EAAIC,CAAK,EACPD,GAAQ,OACjBA,EAAI,QAAUC,EAElB,CACA,SAASC,KAAeC,EAAM,CAC5B,OAAQC,GAAS,CACf,IAAIC,EAAa,GACjB,MA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,EAAS,MAAQ,KAAKI,CAAG,GAAKA,CAAG,GAIzD,OAAOJ,CACT,CAEC,SAASE,EAAa9D,EAAOiE,EAAU,CACtC,OAAKA,EAIDjE,EACIA,EAAQ,IAAMiE,EAGfjE,EAAQiE,EAPPjE,CAQV,CAEsCkE,EAAO,SAC3CP,EAAW,QAAUA,EACrBO,UAAiBP,GAOjB,OAAO,WAAaA,CAEtB,8MCrEMQ,EAAKC,EAAE,KAAKC,CAAM,EAElBC,EAAgB,eAQTf,EAAQ,CAAC,CACpB,SAAAlC,EACA,UAAAkD,EACA,SAAAC,EACA,SAAAC,EAAW,GACX,GAAGtD,CACL,IAAkB,CAChB,MAAMyC,EAAUO,EAAGI,EAAWD,EAAe,CAC3C,CAAC,GAAGA,CAAa,YAAY,EAAGE,EAChC,CAAC,GAAGF,CAAa,YAAY,EAAGG,CAAA,CACjC,EAED,OACE5C,EAAAA,IAAC6C,EAAA,CAAgB,UAAWd,EAAU,GAAGzC,EACtC,SAAAE,EACH,CAEJ","x_google_ignoreList":[0,1,2,3,4]}
package/dist/label.es.js CHANGED
@@ -1,56 +1,65 @@
1
- import { jsx as f } from "react/jsx-runtime";
1
+ import { jsx as c } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
3
  import "react-dom";
4
- function b(t, o) {
4
+ function m(t, o) {
5
5
  if (typeof t == "function")
6
6
  return t(o);
7
7
  t != null && (t.current = o);
8
8
  }
9
- function S(...t) {
9
+ function g(...t) {
10
10
  return (o) => {
11
11
  let n = !1;
12
12
  const i = t.map((r) => {
13
- const e = b(r, o);
13
+ const e = m(r, o);
14
14
  return !n && typeof e == "function" && (n = !0), e;
15
15
  });
16
16
  if (n)
17
17
  return () => {
18
18
  for (let r = 0; r < i.length; r++) {
19
19
  const e = i[r];
20
- typeof e == "function" ? e() : b(t[r], null);
20
+ typeof e == "function" ? e() : m(t[r], null);
21
21
  }
22
22
  };
23
23
  };
24
24
  }
25
+ var E = Symbol.for("react.lazy"), p = a[" use ".trim().toString()];
26
+ function C(t) {
27
+ return typeof t == "object" && t !== null && "then" in t;
28
+ }
29
+ function v(t) {
30
+ return t != null && typeof t == "object" && "$$typeof" in t && t.$$typeof === E && "_payload" in t && C(t._payload);
31
+ }
25
32
  // @__NO_SIDE_EFFECTS__
26
- function g(t) {
27
- const o = /* @__PURE__ */ _(t), n = a.forwardRef((i, r) => {
28
- const { children: e, ...l } = i, s = a.Children.toArray(e), u = s.find(w);
33
+ function R(t) {
34
+ const o = /* @__PURE__ */ w(t), n = a.forwardRef((i, r) => {
35
+ let { children: e, ...l } = i;
36
+ v(e) && typeof p == "function" && (e = p(e._payload));
37
+ const s = a.Children.toArray(e), u = s.find(P);
29
38
  if (u) {
30
- const c = u.props.children, v = s.map((m) => m === u ? a.Children.count(c) > 1 ? a.Children.only(null) : a.isValidElement(c) ? c.props.children : null : m);
31
- return /* @__PURE__ */ f(o, { ...l, ref: r, children: a.isValidElement(c) ? a.cloneElement(c, void 0, v) : null });
39
+ const f = u.props.children, S = s.map((b) => b === u ? a.Children.count(f) > 1 ? a.Children.only(null) : a.isValidElement(f) ? f.props.children : null : b);
40
+ return /* @__PURE__ */ c(o, { ...l, ref: r, children: a.isValidElement(f) ? a.cloneElement(f, void 0, S) : null });
32
41
  }
33
- return /* @__PURE__ */ f(o, { ...l, ref: r, children: e });
42
+ return /* @__PURE__ */ c(o, { ...l, ref: r, children: e });
34
43
  });
35
44
  return n.displayName = `${t}.Slot`, n;
36
45
  }
37
46
  // @__NO_SIDE_EFFECTS__
38
- function _(t) {
47
+ function w(t) {
39
48
  const o = a.forwardRef((n, i) => {
40
- const { children: r, ...e } = n;
41
- if (a.isValidElement(r)) {
42
- const l = C(r), s = x(e, r.props);
43
- return r.type !== a.Fragment && (s.ref = i ? S(i, l) : l), a.cloneElement(r, s);
49
+ let { children: r, ...e } = n;
50
+ if (v(r) && typeof p == "function" && (r = p(r._payload)), a.isValidElement(r)) {
51
+ const l = O(r), s = N(e, r.props);
52
+ return r.type !== a.Fragment && (s.ref = i ? g(i, l) : l), a.cloneElement(r, s);
44
53
  }
45
54
  return a.Children.count(r) > 1 ? a.Children.only(null) : null;
46
55
  });
47
56
  return o.displayName = `${t}.SlotClone`, o;
48
57
  }
49
- var E = Symbol("radix.slottable");
50
- function w(t) {
51
- return a.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === E;
58
+ var x = Symbol("radix.slottable");
59
+ function P(t) {
60
+ return a.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === x;
52
61
  }
53
- function x(t, o) {
62
+ function N(t, o) {
54
63
  const n = { ...o };
55
64
  for (const i in o) {
56
65
  const r = t[i], e = o[i];
@@ -61,12 +70,12 @@ function x(t, o) {
61
70
  }
62
71
  return { ...t, ...n };
63
72
  }
64
- function C(t) {
73
+ function O(t) {
65
74
  var i, r;
66
75
  let o = (i = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : i.get, n = o && "isReactWarning" in o && o.isReactWarning;
67
76
  return n ? t.ref : (o = (r = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : r.get, n = o && "isReactWarning" in o && o.isReactWarning, n ? t.props.ref : t.props.ref || t.ref);
68
77
  }
69
- var R = [
78
+ var $ = [
70
79
  "a",
71
80
  "button",
72
81
  "div",
@@ -84,14 +93,14 @@ var R = [
84
93
  "span",
85
94
  "svg",
86
95
  "ul"
87
- ], N = R.reduce((t, o) => {
88
- const n = /* @__PURE__ */ g(`Primitive.${o}`), i = a.forwardRef((r, e) => {
96
+ ], j = $.reduce((t, o) => {
97
+ const n = /* @__PURE__ */ R(`Primitive.${o}`), i = a.forwardRef((r, e) => {
89
98
  const { asChild: l, ...s } = r, u = l ? n : o;
90
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(u, { ...s, ref: e });
99
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ c(u, { ...s, ref: e });
91
100
  });
92
101
  return i.displayName = `Primitive.${o}`, { ...t, [o]: i };
93
- }, {}), P = "Label", h = a.forwardRef((t, o) => /* @__PURE__ */ f(
94
- N.label,
102
+ }, {}), A = "Label", _ = a.forwardRef((t, o) => /* @__PURE__ */ c(
103
+ j.label,
95
104
  {
96
105
  ...t,
97
106
  ref: o,
@@ -101,20 +110,20 @@ var R = [
101
110
  }
102
111
  }
103
112
  ));
104
- h.displayName = P;
105
- var O = h;
106
- function j(t) {
113
+ _.displayName = A;
114
+ var D = _;
115
+ function L(t) {
107
116
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
108
117
  }
109
- var p = { exports: {} };
118
+ var d = { exports: {} };
110
119
  /*!
111
120
  Copyright (c) 2018 Jed Watson.
112
121
  Licensed under the MIT License (MIT), see
113
122
  http://jedwatson.github.io/classnames
114
123
  */
115
- var y;
116
- function D() {
117
- return y || (y = 1, (function(t) {
124
+ var h;
125
+ function V() {
126
+ return h || (h = 1, (function(t) {
118
127
  (function() {
119
128
  var o = {}.hasOwnProperty;
120
129
  function n() {
@@ -143,27 +152,27 @@ function D() {
143
152
  }
144
153
  t.exports ? (n.default = n, t.exports = n) : window.classNames = n;
145
154
  })();
146
- })(p)), p.exports;
155
+ })(d)), d.exports;
147
156
  }
148
- var A = D();
149
- const V = /* @__PURE__ */ j(A), $ = {
157
+ var I = V();
158
+ const T = /* @__PURE__ */ L(I), W = {
150
159
  "purpur-label": "_purpur-label_1x80u_1",
151
160
  "purpur-label--negative": "_purpur-label--negative_1x80u_8",
152
161
  "purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
153
- }, I = V.bind($), d = "purpur-label", B = ({
162
+ }, B = T.bind(W), y = "purpur-label", q = ({
154
163
  children: t,
155
164
  className: o,
156
165
  disabled: n,
157
166
  negative: i = !1,
158
167
  ...r
159
168
  }) => {
160
- const e = I(o, d, {
161
- [`${d}--disabled`]: n,
162
- [`${d}--negative`]: i
169
+ const e = B(o, y, {
170
+ [`${y}--disabled`]: n,
171
+ [`${y}--negative`]: i
163
172
  });
164
- return /* @__PURE__ */ f(O, { className: e, ...r, children: t });
173
+ return /* @__PURE__ */ c(D, { className: e, ...r, children: t });
165
174
  };
166
175
  export {
167
- B as Label
176
+ q as Label
168
177
  };
169
178
  //# sourceMappingURL=label.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.es.js","sources":["../../../common/temp/node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.1.16_react@19.1.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.16_react@19.1.1/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.9_@types+react@19.1.16_react-dom@19.1.1_react@19.1.1/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-label@2.1.7_@types+react-dom@19.1.9_@types+react@19.1.16_react-dom@19.1.1_react@19.1.1/node_modules/@radix-ui/react-label/dist/index.mjs","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/label.tsx"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpurds/common-types\";\nimport * as RadixLabel from \"@radix-ui/react-label\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./label.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-label\";\n\nexport type LabelProps = Omit<BaseProps<\"label\">, \"children\"> & {\n children: ReactNode;\n disabled?: boolean;\n negative?: boolean;\n};\n\nexport const Label = ({\n children,\n className,\n disabled,\n negative = false,\n ...props\n}: LabelProps) => {\n const classes = cx(className, rootClassName, {\n [`${rootClassName}--disabled`]: disabled,\n [`${rootClassName}--negative`]: negative,\n });\n\n return (\n <RadixLabel.Root className={classes} {...props}>\n {children}\n </RadixLabel.Root>\n );\n};\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","_a","mayWarn","_b","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","NAME","Label","event","Root","hasOwn","classNames","classes","arg","appendClass","parseValue","key","newClass","module","cx","c","styles","rootClassName","className","disabled","negative","RadixLabel.Root"],"mappings":";;;AAEA,SAASA,EAAOC,GAAKC,GAAO;AAC1B,MAAI,OAAOD,KAAQ;AACjB,WAAOA,EAAIC,CAAK;AACX,EAAID,KAAQ,SACjBA,EAAI,UAAUC;AAElB;AACA,SAASC,KAAeC,GAAM;AAC5B,SAAO,CAACC,MAAS;AACf,QAAIC,IAAa;AACjB,UAAMC,IAAWH,EAAK,IAAI,CAACH,MAAQ;AACjC,YAAMO,IAAUR,EAAOC,GAAKI,CAAI;AAChC,aAAI,CAACC,KAAc,OAAOE,KAAW,eACnCF,IAAa,KAERE;AAAA,IACT,CAAC;AACD,QAAIF;AACF,aAAO,MAAM;AACX,iBAASG,IAAI,GAAGA,IAAIF,EAAS,QAAQE,KAAK;AACxC,gBAAMD,IAAUD,EAASE,CAAC;AAC1B,UAAI,OAAOD,KAAW,aACpBA,EAAO,IAEPR,EAAOI,EAAKK,CAAC,GAAG,IAAI;AAAA,QAExB;AAAA,MACF;AAAA,EAEJ;AACF;AAAA;AC3BA,SAASC,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IA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js","sources":["../../../common/temp/node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.3_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.3_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-primitive@2.1.4_@types+react-dom@19.2.3_@types+react@19.2.3_react-dom@19.2.0_react@19.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-label@2.1.8_@types+react-dom@19.2.3_@types+react@19.2.3_react-dom@19.2.0_react@19.2.0/node_modules/@radix-ui/react-label/dist/index.mjs","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/bind.js","../src/label.tsx"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nvar use = React[\" use \".trim().toString()];\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue.call(this, arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn this && this[arg] || arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(this, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, this && this[key] || key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import React, { type ReactNode } from \"react\";\nimport type { BaseProps } from \"@purpurds/common-types\";\nimport * as RadixLabel from \"@radix-ui/react-label\";\nimport c from \"classnames/bind\";\n\nimport styles from \"./label.module.scss\";\n\nconst cx = c.bind(styles);\n\nconst rootClassName = \"purpur-label\";\n\nexport type LabelProps = Omit<BaseProps<\"label\">, \"children\"> & {\n children: ReactNode;\n disabled?: boolean;\n negative?: boolean;\n};\n\nexport const Label = ({\n children,\n className,\n disabled,\n negative = false,\n ...props\n}: LabelProps) => {\n const classes = cx(className, rootClassName, {\n [`${rootClassName}--disabled`]: disabled,\n [`${rootClassName}--negative`]: negative,\n });\n\n return (\n <RadixLabel.Root className={classes} {...props}>\n {children}\n </RadixLabel.Root>\n );\n};\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","REACT_LAZY_TYPE","use","React","isPromiseLike","isLazyComponent","element","createSlot","ownerName","SlotClone","createSlotClone","Slot2","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","getter","_a","mayWarn","_b","NODES","Primitive","primitive","Slot","Node","asChild","primitiveProps","Comp","NAME","Label","event","Root","hasOwn","classNames","classes","arg","appendClass","parseValue","key","newClass","module","cx","c","styles","rootClassName","className","disabled","negative","RadixLabel.Root"],"mappings":";;;AAEA,SAASA,EAAOC,GAAKC,GAAO;AAC1B,MAAI,OAAOD,KAAQ;AACjB,WAAOA,EAAIC,CAAK;AACX,EAAID,KAAQ,SACjBA,EAAI,UAAUC;AAElB;AACA,SAASC,KAAeC,GAAM;AAC5B,SAAO,CAACC,MAAS;AACf,QAAIC,IAAa;AACjB,UAAMC,IAAWH,EAAK,IAAI,CAACH,MAAQ;AACjC,YAAMO,IAAUR,EAAOC,GAAKI,CAAI;AAChC,aAAI,CAACC,KAAc,OAAOE,KAAW,eACnCF,IAAa,KAERE;AAAA,IACT,CAAC;AACD,QAAIF;AACF,aAAO,MAAM;AACX,iBAASG,IAAI,GAAGA,IAAIF,EAAS,QAAQE,KAAK;AACxC,gBAAMD,IAAUD,EAASE,CAAC;AAC1B,UAAI,OAAOD,KAAW,aACpBA,EAAO,IAEPR,EAAOI,EAAKK,CAAC,GAAG,IAAI;AAAA,QAExB;AAAA,MACF;AAAA,EAEJ;AACF;AC5BA,IAAIC,IAAkB,OAAO,IAAI,YA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D,GAAOiE,GAAU;AACtC,eAAKA,IAIDjE,IACIA,IAAQ,MAAMiE,IAGfjE,IAAQiE,IAPPjE;AAAA,MAQV;AAEC,MAAqCkE,EAAO,WAC3CP,EAAW,UAAUA,GACrBO,YAAiBP,KAOjB,OAAO,aAAaA;AAAA,IAEtB;;;;;;;;GCrEMQ,IAAKC,EAAE,KAAKC,CAAM,GAElBC,IAAgB,gBAQTf,IAAQ,CAAC;AAAA,EACpB,UAAAlC;AAAA,EACA,WAAAkD;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,GAAGtD;AACL,MAAkB;AAChB,QAAMyC,IAAUO,EAAGI,GAAWD,GAAe;AAAA,IAC3C,CAAC,GAAGA,CAAa,YAAY,GAAGE;AAAA,IAChC,CAAC,GAAGF,CAAa,YAAY,GAAGG;AAAA,EAAA,CACjC;AAED,SACE,gBAAA5C,EAAC6C,GAAA,EAAgB,WAAWd,GAAU,GAAGzC,GACtC,UAAAE,GACH;AAEJ;","x_google_ignoreList":[0,1,2,3,4]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpurds/label",
3
- "version": "8.7.0",
3
+ "version": "8.8.1",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "./dist/label.cjs.js",
6
6
  "types": "./dist/label.d.ts",
@@ -17,12 +17,12 @@
17
17
  "dependencies": {
18
18
  "@radix-ui/react-label": "~2.1.2",
19
19
  "classnames": "~2.5.0",
20
- "@purpurds/common-types": "8.7.0",
21
- "@purpurds/icon": "8.7.0",
22
- "@purpurds/tokens": "8.7.0"
20
+ "@purpurds/common-types": "8.8.1",
21
+ "@purpurds/icon": "8.8.1",
22
+ "@purpurds/tokens": "8.8.1"
23
23
  },
24
24
  "devDependencies": {
25
- "@storybook/react-vite": "^9.0.18",
25
+ "@storybook/react-vite": "^10.0.7",
26
26
  "@testing-library/dom": "~10.4.0",
27
27
  "@testing-library/jest-dom": "~6.4.0",
28
28
  "@testing-library/react": "~16.2.0",
@@ -35,7 +35,7 @@
35
35
  "prettier": "~2.8.8",
36
36
  "react-dom": "^19.0.0",
37
37
  "react": "^19.0.0",
38
- "storybook": "^9.0.18",
38
+ "storybook": "^10.0.7",
39
39
  "typescript": "^5.6.3",
40
40
  "vite": "^6.2.1",
41
41
  "vitest": "^3.1.2",