@purpurds/label 8.8.1 → 8.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/label.cjs.js +1 -5
- package/dist/label.cjs.js.map +1 -1
- package/dist/label.es.js +58 -65
- package/dist/label.es.js.map +1 -1
- package/package.json +20 -20
package/dist/label.cjs.js
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
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
|
|
2
|
-
Copyright (c) 2018 Jed Watson.
|
|
3
|
-
Licensed under the MIT License (MIT), see
|
|
4
|
-
http://jedwatson.github.io/classnames
|
|
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;
|
|
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 n=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(n,r,i.get?i:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const a=j(S);function m(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}function x(...t){return n=>{let r=!1;const i=t.map(o=>{const e=m(o,n);return!r&&typeof e=="function"&&(r=!0),e});if(r)return()=>{for(let o=0;o<i.length;o++){const e=i[o];typeof e=="function"?e():m(t[o],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 n=R(t),r=a.forwardRef((i,o)=>{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(n,{...l,ref:o,children:a.isValidElement(c)?a.cloneElement(c,void 0,_):null})}return f.jsx(n,{...l,ref:o,children:e})});return r.displayName=`${t}.Slot`,r}function R(t){const n=a.forwardRef((r,i)=>{let{children:o,...e}=r;if(h(o)&&typeof p=="function"&&(o=p(o._payload)),a.isValidElement(o)){const l=$(o),s=N(e,o.props);return o.type!==a.Fragment&&(s.ref=i?x(i,l):l),a.cloneElement(o,s)}return a.Children.count(o)>1?a.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}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,n){const r={...n};for(const i in n){const o=t[i],e=n[i];/^on[A-Z]/.test(i)?o&&e?r[i]=(...s)=>{const u=e(...s);return o(...s),u}:o&&(r[i]=o):i==="style"?r[i]={...o,...e}:i==="className"&&(r[i]=[o,e].filter(Boolean).join(" "))}return{...t,...r}}function $(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=n&&"isReactWarning"in n&&n.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,n)=>{const r=P(`Primitive.${n}`),i=a.forwardRef((o,e)=>{const{asChild:l,...s}=o,u=l?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(u,{...s,ref:e})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{}),L="Label",v=a.forwardRef((t,n)=>f.jsx(A.label,{...t,ref:n,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(t.onMouseDown?.(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:{}};var g;function M(){return g||(g=1,(function(t){(function(){var n={}.hasOwnProperty;function r(){for(var e="",l=0;l<arguments.length;l++){var s=arguments[l];s&&(e=o(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)n.call(e,s)&&e[s]&&(l=o(l,this&&this[s]||s));return l}function o(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:n,disabled:r,negative:i=!1,...o})=>{const e=B(n,y,{[`${y}--disabled`]:r,[`${y}--negative`]:i});return f.jsx(T,{className:e,...o,children:t})};exports.Label=z;
|
|
6
2
|
//# sourceMappingURL=label.cjs.js.map
|
package/dist/label.cjs.js.map
CHANGED
|
@@ -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.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,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,OAA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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]}
|
|
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.6_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.6_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.6_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.6_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","mayWarn","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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,CACtC,OAAKA,EAID/D,EACIA,EAAQ,IAAM+D,EAGf/D,EAAQ+D,EAPP/D,CAQV,CAEsCgE,EAAO,SAC3CP,EAAW,QAAUA,EACrBO,UAAiBP,GAOjB,OAAO,WAAaA,CAEtB,8MCrEMQ,EAAKC,EAAE,KAAKC,CAAM,EAElBC,EAAgB,eAQTf,EAAQ,CAAC,CACpB,SAAAhC,EACA,UAAAgD,EACA,SAAAC,EACA,SAAAC,EAAW,GACX,GAAGpD,CACL,IAAkB,CAChB,MAAMuC,EAAUO,EAAGI,EAAWD,EAAe,CAC3C,CAAC,GAAGA,CAAa,YAAY,EAAGE,EAChC,CAAC,GAAGF,CAAa,YAAY,EAAGG,CAAA,CACjC,EAED,OACE1C,EAAAA,IAAC2C,EAAA,CAAgB,UAAWd,EAAU,GAAGvC,EACtC,SAAAE,EACH,CAEJ","x_google_ignoreList":[0,1,2,3,4]}
|
package/dist/label.es.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "react";
|
|
3
3
|
import "react-dom";
|
|
4
|
-
function m(t,
|
|
4
|
+
function m(t, n) {
|
|
5
5
|
if (typeof t == "function")
|
|
6
|
-
return t(
|
|
7
|
-
t != null && (t.current =
|
|
6
|
+
return t(n);
|
|
7
|
+
t != null && (t.current = n);
|
|
8
8
|
}
|
|
9
9
|
function g(...t) {
|
|
10
|
-
return (
|
|
11
|
-
let
|
|
12
|
-
const i = t.map((
|
|
13
|
-
const e = m(
|
|
14
|
-
return !
|
|
10
|
+
return (n) => {
|
|
11
|
+
let r = !1;
|
|
12
|
+
const i = t.map((o) => {
|
|
13
|
+
const e = m(o, n);
|
|
14
|
+
return !r && typeof e == "function" && (r = !0), e;
|
|
15
15
|
});
|
|
16
|
-
if (
|
|
16
|
+
if (r)
|
|
17
17
|
return () => {
|
|
18
|
-
for (let
|
|
19
|
-
const e = i[
|
|
20
|
-
typeof e == "function" ? e() : m(t[
|
|
18
|
+
for (let o = 0; o < i.length; o++) {
|
|
19
|
+
const e = i[o];
|
|
20
|
+
typeof e == "function" ? e() : m(t[o], null);
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
var E = Symbol.for("react.lazy"),
|
|
25
|
+
var E = Symbol.for("react.lazy"), c = a[" use ".trim().toString()];
|
|
26
26
|
function C(t) {
|
|
27
27
|
return typeof t == "object" && t !== null && "then" in t;
|
|
28
28
|
}
|
|
@@ -31,49 +31,48 @@ function v(t) {
|
|
|
31
31
|
}
|
|
32
32
|
// @__NO_SIDE_EFFECTS__
|
|
33
33
|
function R(t) {
|
|
34
|
-
const
|
|
34
|
+
const n = /* @__PURE__ */ w(t), r = a.forwardRef((i, o) => {
|
|
35
35
|
let { children: e, ...l } = i;
|
|
36
|
-
v(e) && typeof
|
|
36
|
+
v(e) && typeof c == "function" && (e = c(e._payload));
|
|
37
37
|
const s = a.Children.toArray(e), u = s.find(P);
|
|
38
38
|
if (u) {
|
|
39
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__ */
|
|
40
|
+
return /* @__PURE__ */ p(n, { ...l, ref: o, children: a.isValidElement(f) ? a.cloneElement(f, void 0, S) : null });
|
|
41
41
|
}
|
|
42
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ p(n, { ...l, ref: o, children: e });
|
|
43
43
|
});
|
|
44
|
-
return
|
|
44
|
+
return r.displayName = `${t}.Slot`, r;
|
|
45
45
|
}
|
|
46
46
|
// @__NO_SIDE_EFFECTS__
|
|
47
47
|
function w(t) {
|
|
48
|
-
const
|
|
49
|
-
let { children:
|
|
50
|
-
if (v(
|
|
51
|
-
const l = O(
|
|
52
|
-
return
|
|
48
|
+
const n = a.forwardRef((r, i) => {
|
|
49
|
+
let { children: o, ...e } = r;
|
|
50
|
+
if (v(o) && typeof c == "function" && (o = c(o._payload)), a.isValidElement(o)) {
|
|
51
|
+
const l = O(o), s = N(e, o.props);
|
|
52
|
+
return o.type !== a.Fragment && (s.ref = i ? g(i, l) : l), a.cloneElement(o, s);
|
|
53
53
|
}
|
|
54
|
-
return a.Children.count(
|
|
54
|
+
return a.Children.count(o) > 1 ? a.Children.only(null) : null;
|
|
55
55
|
});
|
|
56
|
-
return
|
|
56
|
+
return n.displayName = `${t}.SlotClone`, n;
|
|
57
57
|
}
|
|
58
58
|
var x = Symbol("radix.slottable");
|
|
59
59
|
function P(t) {
|
|
60
60
|
return a.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === x;
|
|
61
61
|
}
|
|
62
|
-
function N(t,
|
|
63
|
-
const
|
|
64
|
-
for (const i in
|
|
65
|
-
const
|
|
66
|
-
/^on[A-Z]/.test(i) ?
|
|
62
|
+
function N(t, n) {
|
|
63
|
+
const r = { ...n };
|
|
64
|
+
for (const i in n) {
|
|
65
|
+
const o = t[i], e = n[i];
|
|
66
|
+
/^on[A-Z]/.test(i) ? o && e ? r[i] = (...s) => {
|
|
67
67
|
const u = e(...s);
|
|
68
|
-
return
|
|
69
|
-
} :
|
|
68
|
+
return o(...s), u;
|
|
69
|
+
} : o && (r[i] = o) : i === "style" ? r[i] = { ...o, ...e } : i === "className" && (r[i] = [o, e].filter(Boolean).join(" "));
|
|
70
70
|
}
|
|
71
|
-
return { ...t, ...
|
|
71
|
+
return { ...t, ...r };
|
|
72
72
|
}
|
|
73
73
|
function O(t) {
|
|
74
|
-
|
|
75
|
-
|
|
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);
|
|
74
|
+
let n = Object.getOwnPropertyDescriptor(t.props, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning;
|
|
75
|
+
return r ? t.ref : (n = Object.getOwnPropertyDescriptor(t, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? t.props.ref : t.props.ref || t.ref);
|
|
77
76
|
}
|
|
78
77
|
var $ = [
|
|
79
78
|
"a",
|
|
@@ -93,20 +92,19 @@ var $ = [
|
|
|
93
92
|
"span",
|
|
94
93
|
"svg",
|
|
95
94
|
"ul"
|
|
96
|
-
], j = $.reduce((t,
|
|
97
|
-
const
|
|
98
|
-
const { asChild: l, ...s } =
|
|
99
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */
|
|
95
|
+
], j = $.reduce((t, n) => {
|
|
96
|
+
const r = /* @__PURE__ */ R(`Primitive.${n}`), i = a.forwardRef((o, e) => {
|
|
97
|
+
const { asChild: l, ...s } = o, u = l ? r : n;
|
|
98
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(u, { ...s, ref: e });
|
|
100
99
|
});
|
|
101
|
-
return i.displayName = `Primitive.${
|
|
102
|
-
}, {}), A = "Label", _ = a.forwardRef((t,
|
|
100
|
+
return i.displayName = `Primitive.${n}`, { ...t, [n]: i };
|
|
101
|
+
}, {}), A = "Label", _ = a.forwardRef((t, n) => /* @__PURE__ */ p(
|
|
103
102
|
j.label,
|
|
104
103
|
{
|
|
105
104
|
...t,
|
|
106
|
-
ref:
|
|
107
|
-
onMouseDown: (
|
|
108
|
-
|
|
109
|
-
n.target.closest("button, input, select, textarea") || ((r = t.onMouseDown) == null || r.call(t, n), !n.defaultPrevented && n.detail > 1 && n.preventDefault());
|
|
105
|
+
ref: n,
|
|
106
|
+
onMouseDown: (r) => {
|
|
107
|
+
r.target.closest("button, input, select, textarea") || (t.onMouseDown?.(r), !r.defaultPrevented && r.detail > 1 && r.preventDefault());
|
|
110
108
|
}
|
|
111
109
|
}
|
|
112
110
|
));
|
|
@@ -116,20 +114,15 @@ function L(t) {
|
|
|
116
114
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
117
115
|
}
|
|
118
116
|
var d = { exports: {} };
|
|
119
|
-
/*!
|
|
120
|
-
Copyright (c) 2018 Jed Watson.
|
|
121
|
-
Licensed under the MIT License (MIT), see
|
|
122
|
-
http://jedwatson.github.io/classnames
|
|
123
|
-
*/
|
|
124
117
|
var h;
|
|
125
118
|
function V() {
|
|
126
119
|
return h || (h = 1, (function(t) {
|
|
127
120
|
(function() {
|
|
128
|
-
var
|
|
129
|
-
function
|
|
121
|
+
var n = {}.hasOwnProperty;
|
|
122
|
+
function r() {
|
|
130
123
|
for (var e = "", l = 0; l < arguments.length; l++) {
|
|
131
124
|
var s = arguments[l];
|
|
132
|
-
s && (e =
|
|
125
|
+
s && (e = o(e, i.call(this, s)));
|
|
133
126
|
}
|
|
134
127
|
return e;
|
|
135
128
|
}
|
|
@@ -139,18 +132,18 @@ function V() {
|
|
|
139
132
|
if (typeof e != "object")
|
|
140
133
|
return "";
|
|
141
134
|
if (Array.isArray(e))
|
|
142
|
-
return
|
|
135
|
+
return r.apply(this, e);
|
|
143
136
|
if (e.toString !== Object.prototype.toString && !e.toString.toString().includes("[native code]"))
|
|
144
137
|
return e.toString();
|
|
145
138
|
var l = "";
|
|
146
139
|
for (var s in e)
|
|
147
|
-
|
|
140
|
+
n.call(e, s) && e[s] && (l = o(l, this && this[s] || s));
|
|
148
141
|
return l;
|
|
149
142
|
}
|
|
150
|
-
function
|
|
143
|
+
function o(e, l) {
|
|
151
144
|
return l ? e ? e + " " + l : e + l : e;
|
|
152
145
|
}
|
|
153
|
-
t.exports ? (
|
|
146
|
+
t.exports ? (r.default = r, t.exports = r) : window.classNames = r;
|
|
154
147
|
})();
|
|
155
148
|
})(d)), d.exports;
|
|
156
149
|
}
|
|
@@ -161,16 +154,16 @@ const T = /* @__PURE__ */ L(I), W = {
|
|
|
161
154
|
"purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
|
|
162
155
|
}, B = T.bind(W), y = "purpur-label", q = ({
|
|
163
156
|
children: t,
|
|
164
|
-
className:
|
|
165
|
-
disabled:
|
|
157
|
+
className: n,
|
|
158
|
+
disabled: r,
|
|
166
159
|
negative: i = !1,
|
|
167
|
-
...
|
|
160
|
+
...o
|
|
168
161
|
}) => {
|
|
169
|
-
const e = B(
|
|
170
|
-
[`${y}--disabled`]:
|
|
162
|
+
const e = B(n, y, {
|
|
163
|
+
[`${y}--disabled`]: r,
|
|
171
164
|
[`${y}--negative`]: i
|
|
172
165
|
});
|
|
173
|
-
return /* @__PURE__ */
|
|
166
|
+
return /* @__PURE__ */ p(D, { className: e, ...o, children: t });
|
|
174
167
|
};
|
|
175
168
|
export {
|
|
176
169
|
q as Label
|
package/dist/label.es.js.map
CHANGED
|
@@ -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.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;AA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1.2_@types+react@19.2.6_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.6_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.6_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.6_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","mayWarn","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,YAAY,GACzCC,IAAMC,EAAM,QAAQ,KAAI,EAAG,SAAQ,CAAE;A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rBO,YAAiBP,KAOjB,OAAO,aAAaA;AAAA,IAEtB;;;;;;;;GCrEMQ,IAAKC,EAAE,KAAKC,CAAM,GAElBC,IAAgB,gBAQTf,IAAQ,CAAC;AAAA,EACpB,UAAAhC;AAAA,EACA,WAAAgD;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,GAAGpD;AACL,MAAkB;AAChB,QAAMuC,IAAUO,EAAGI,GAAWD,GAAe;AAAA,IAC3C,CAAC,GAAGA,CAAa,YAAY,GAAGE;AAAA,IAChC,CAAC,GAAGF,CAAa,YAAY,GAAGG;AAAA,EAAA,CACjC;AAED,SACE,gBAAA1C,EAAC2C,GAAA,EAAgB,WAAWd,GAAU,GAAGvC,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.
|
|
3
|
+
"version": "8.10.0",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"main": "./dist/label.cjs.js",
|
|
6
6
|
"types": "./dist/label.d.ts",
|
|
@@ -16,29 +16,29 @@
|
|
|
16
16
|
"source": "src/label.tsx",
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@radix-ui/react-label": "~2.1.2",
|
|
19
|
-
"classnames": "~2.5.
|
|
20
|
-
"@purpurds/common-types": "8.
|
|
21
|
-
"@purpurds/icon": "8.
|
|
22
|
-
"@purpurds/tokens": "8.
|
|
19
|
+
"classnames": "~2.5.1",
|
|
20
|
+
"@purpurds/common-types": "8.10.0",
|
|
21
|
+
"@purpurds/icon": "8.10.0",
|
|
22
|
+
"@purpurds/tokens": "8.10.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@storybook/react-vite": "^10.0.
|
|
26
|
-
"@testing-library/dom": "~10.4.
|
|
27
|
-
"@testing-library/jest-dom": "~6.
|
|
28
|
-
"@testing-library/react": "~16.
|
|
25
|
+
"@storybook/react-vite": "^10.0.8",
|
|
26
|
+
"@testing-library/dom": "~10.4.1",
|
|
27
|
+
"@testing-library/jest-dom": "~6.9.1",
|
|
28
|
+
"@testing-library/react": "~16.3.0",
|
|
29
29
|
"@types/node": "22.17",
|
|
30
|
-
"@types/react-dom": "^19.
|
|
31
|
-
"@types/react": "^19.
|
|
32
|
-
"eslint": "9.
|
|
33
|
-
"jsdom": "~
|
|
34
|
-
"lint-staged": "
|
|
30
|
+
"@types/react-dom": "^19.2.3",
|
|
31
|
+
"@types/react": "^19.2.6",
|
|
32
|
+
"eslint": "9.39.1",
|
|
33
|
+
"jsdom": "~27.2.0",
|
|
34
|
+
"lint-staged": "16.2.6",
|
|
35
35
|
"prettier": "~2.8.8",
|
|
36
|
-
"react-dom": "^19.
|
|
37
|
-
"react": "^19.
|
|
38
|
-
"storybook": "^10.0.
|
|
39
|
-
"typescript": "^5.
|
|
40
|
-
"vite": "^
|
|
41
|
-
"vitest": "^
|
|
36
|
+
"react-dom": "^19.2.0",
|
|
37
|
+
"react": "^19.2.0",
|
|
38
|
+
"storybook": "^10.0.8",
|
|
39
|
+
"typescript": "^5.9.3",
|
|
40
|
+
"vite": "^7.2.2",
|
|
41
|
+
"vitest": "^4.0.10",
|
|
42
42
|
"@purpurds/component-rig": "1.0.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|