@purpurds/label 8.8.0 → 8.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +3 -3
- package/dist/label.cjs.js +1 -5
- package/dist/label.cjs.js.map +1 -1
- package/dist/label.es.js +89 -87
- package/dist/label.es.js.map +1 -1
- package/package.json +20 -20
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.
|
|
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.
|
|
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.
|
|
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,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),
|
|
2
|
-
Copyright (c) 2018 Jed Watson.
|
|
3
|
-
Licensed under the MIT License (MIT), see
|
|
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;
|
|
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.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,SAAS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,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.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,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,OA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,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,72 +1,80 @@
|
|
|
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
|
|
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
|
-
function
|
|
10
|
-
return (
|
|
11
|
-
let
|
|
12
|
-
const i = t.map((
|
|
13
|
-
const e =
|
|
14
|
-
return !
|
|
9
|
+
function g(...t) {
|
|
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() :
|
|
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"), c = 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
|
|
27
|
-
const
|
|
28
|
-
|
|
33
|
+
function R(t) {
|
|
34
|
+
const n = /* @__PURE__ */ w(t), r = a.forwardRef((i, o) => {
|
|
35
|
+
let { children: e, ...l } = i;
|
|
36
|
+
v(e) && typeof c == "function" && (e = c(e._payload));
|
|
37
|
+
const s = a.Children.toArray(e), u = s.find(P);
|
|
29
38
|
if (u) {
|
|
30
|
-
const
|
|
31
|
-
return /* @__PURE__ */
|
|
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__ */ p(n, { ...l, ref: o, children: a.isValidElement(f) ? a.cloneElement(f, void 0, S) : null });
|
|
32
41
|
}
|
|
33
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ p(n, { ...l, ref: o, children: e });
|
|
34
43
|
});
|
|
35
|
-
return
|
|
44
|
+
return r.displayName = `${t}.Slot`, r;
|
|
36
45
|
}
|
|
37
46
|
// @__NO_SIDE_EFFECTS__
|
|
38
|
-
function
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
if (a.isValidElement(
|
|
42
|
-
const l =
|
|
43
|
-
return
|
|
47
|
+
function w(t) {
|
|
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);
|
|
44
53
|
}
|
|
45
|
-
return a.Children.count(
|
|
54
|
+
return a.Children.count(o) > 1 ? a.Children.only(null) : null;
|
|
46
55
|
});
|
|
47
|
-
return
|
|
56
|
+
return n.displayName = `${t}.SlotClone`, n;
|
|
48
57
|
}
|
|
49
|
-
var
|
|
50
|
-
function
|
|
51
|
-
return a.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId ===
|
|
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
|
|
54
|
-
const
|
|
55
|
-
for (const i in
|
|
56
|
-
const
|
|
57
|
-
/^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) => {
|
|
58
67
|
const u = e(...s);
|
|
59
|
-
return
|
|
60
|
-
} :
|
|
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(" "));
|
|
61
70
|
}
|
|
62
|
-
return { ...t, ...
|
|
71
|
+
return { ...t, ...r };
|
|
63
72
|
}
|
|
64
|
-
function
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
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);
|
|
73
|
+
function O(t) {
|
|
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);
|
|
68
76
|
}
|
|
69
|
-
var
|
|
77
|
+
var $ = [
|
|
70
78
|
"a",
|
|
71
79
|
"button",
|
|
72
80
|
"div",
|
|
@@ -84,43 +92,37 @@ var R = [
|
|
|
84
92
|
"span",
|
|
85
93
|
"svg",
|
|
86
94
|
"ul"
|
|
87
|
-
],
|
|
88
|
-
const
|
|
89
|
-
const { asChild: l, ...s } =
|
|
90
|
-
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 });
|
|
91
99
|
});
|
|
92
|
-
return i.displayName = `Primitive.${
|
|
93
|
-
}, {}),
|
|
94
|
-
|
|
100
|
+
return i.displayName = `Primitive.${n}`, { ...t, [n]: i };
|
|
101
|
+
}, {}), A = "Label", _ = a.forwardRef((t, n) => /* @__PURE__ */ p(
|
|
102
|
+
j.label,
|
|
95
103
|
{
|
|
96
104
|
...t,
|
|
97
|
-
ref:
|
|
98
|
-
onMouseDown: (
|
|
99
|
-
|
|
100
|
-
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());
|
|
101
108
|
}
|
|
102
109
|
}
|
|
103
110
|
));
|
|
104
|
-
|
|
105
|
-
var
|
|
106
|
-
function
|
|
111
|
+
_.displayName = A;
|
|
112
|
+
var D = _;
|
|
113
|
+
function L(t) {
|
|
107
114
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
108
115
|
}
|
|
109
|
-
var
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
http://jedwatson.github.io/classnames
|
|
114
|
-
*/
|
|
115
|
-
var y;
|
|
116
|
-
function D() {
|
|
117
|
-
return y || (y = 1, (function(t) {
|
|
116
|
+
var d = { exports: {} };
|
|
117
|
+
var h;
|
|
118
|
+
function V() {
|
|
119
|
+
return h || (h = 1, (function(t) {
|
|
118
120
|
(function() {
|
|
119
|
-
var
|
|
120
|
-
function
|
|
121
|
+
var n = {}.hasOwnProperty;
|
|
122
|
+
function r() {
|
|
121
123
|
for (var e = "", l = 0; l < arguments.length; l++) {
|
|
122
124
|
var s = arguments[l];
|
|
123
|
-
s && (e =
|
|
125
|
+
s && (e = o(e, i.call(this, s)));
|
|
124
126
|
}
|
|
125
127
|
return e;
|
|
126
128
|
}
|
|
@@ -130,40 +132,40 @@ function D() {
|
|
|
130
132
|
if (typeof e != "object")
|
|
131
133
|
return "";
|
|
132
134
|
if (Array.isArray(e))
|
|
133
|
-
return
|
|
135
|
+
return r.apply(this, e);
|
|
134
136
|
if (e.toString !== Object.prototype.toString && !e.toString.toString().includes("[native code]"))
|
|
135
137
|
return e.toString();
|
|
136
138
|
var l = "";
|
|
137
139
|
for (var s in e)
|
|
138
|
-
|
|
140
|
+
n.call(e, s) && e[s] && (l = o(l, this && this[s] || s));
|
|
139
141
|
return l;
|
|
140
142
|
}
|
|
141
|
-
function
|
|
143
|
+
function o(e, l) {
|
|
142
144
|
return l ? e ? e + " " + l : e + l : e;
|
|
143
145
|
}
|
|
144
|
-
t.exports ? (
|
|
146
|
+
t.exports ? (r.default = r, t.exports = r) : window.classNames = r;
|
|
145
147
|
})();
|
|
146
|
-
})(
|
|
148
|
+
})(d)), d.exports;
|
|
147
149
|
}
|
|
148
|
-
var
|
|
149
|
-
const
|
|
150
|
+
var I = V();
|
|
151
|
+
const T = /* @__PURE__ */ L(I), W = {
|
|
150
152
|
"purpur-label": "_purpur-label_1x80u_1",
|
|
151
153
|
"purpur-label--negative": "_purpur-label--negative_1x80u_8",
|
|
152
154
|
"purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
|
|
153
|
-
},
|
|
155
|
+
}, B = T.bind(W), y = "purpur-label", q = ({
|
|
154
156
|
children: t,
|
|
155
|
-
className:
|
|
156
|
-
disabled:
|
|
157
|
+
className: n,
|
|
158
|
+
disabled: r,
|
|
157
159
|
negative: i = !1,
|
|
158
|
-
...
|
|
160
|
+
...o
|
|
159
161
|
}) => {
|
|
160
|
-
const e =
|
|
161
|
-
[`${
|
|
162
|
-
[`${
|
|
162
|
+
const e = B(n, y, {
|
|
163
|
+
[`${y}--disabled`]: r,
|
|
164
|
+
[`${y}--negative`]: i
|
|
163
165
|
});
|
|
164
|
-
return /* @__PURE__ */
|
|
166
|
+
return /* @__PURE__ */ p(D, { className: e, ...o, children: t });
|
|
165
167
|
};
|
|
166
168
|
export {
|
|
167
|
-
|
|
169
|
+
q as Label
|
|
168
170
|
};
|
|
169
171
|
//# sourceMappingURL=label.es.js.map
|
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.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,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APP7D;AAAA,MAQV;AAEC,MAAqC8D,EAAO,WAC3CP,EAAW,UAAUA,GACrBO,YAAiBP,KAOjB,OAAO,aAAaA;AAAA,IAEtB;;;;;;;;GCrEMQ,IAAKC,EAAE,KAAKC,CAAM,GAElBC,IAAgB,gBAQTf,IAAQ,CAAC;AAAA,EACpB,UAAAnC;AAAA,EACA,WAAAmD;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,GAAGvD;AACL,MAAkB;AAChB,QAAM0C,IAAUO,EAAGI,GAAWD,GAAe;AAAA,IAC3C,CAAC,GAAGA,CAAa,YAAY,GAAGE;AAAA,IAChC,CAAC,GAAGF,CAAa,YAAY,GAAGG;AAAA,EAAA,CACjC;AAED,SACE,gBAAA7C,EAAC8C,GAAA,EAAgB,WAAWd,GAAU,GAAG1C,GACtC,UAAAE,GACH;AAEJ;","x_google_ignoreList":[0,1,2,3,4]}
|
|
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.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;AA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@purpurds/label",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.9.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/
|
|
22
|
-
"@purpurds/
|
|
19
|
+
"classnames": "~2.5.1",
|
|
20
|
+
"@purpurds/common-types": "8.9.0",
|
|
21
|
+
"@purpurds/tokens": "8.9.0",
|
|
22
|
+
"@purpurds/icon": "8.9.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@storybook/react-vite": "^
|
|
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": "^
|
|
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": {
|