@purpurds/label 6.0.0 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/LICENSE.txt CHANGED
@@ -1,41 +1,5 @@
1
- Name: @babel/runtime
2
- Version: 7.26.0
3
- License: MIT
4
- Private: false
5
- Description: babel's modular runtime helpers
6
- Repository: https://github.com/babel/babel.git
7
- Homepage: https://babel.dev/docs/en/next/babel-runtime
8
- Author: The Babel Team (https://babel.dev/team)
9
- License Copyright:
10
- ===
11
-
12
- MIT License
13
-
14
- Copyright (c) 2014-present Sebastian McKenzie and other contributors
15
-
16
- Permission is hereby granted, free of charge, to any person obtaining
17
- a copy of this software and associated documentation files (the
18
- "Software"), to deal in the Software without restriction, including
19
- without limitation the rights to use, copy, modify, merge, publish,
20
- distribute, sublicense, and/or sell copies of the Software, and to
21
- permit persons to whom the Software is furnished to do so, subject to
22
- the following conditions:
23
-
24
- The above copyright notice and this permission notice shall be
25
- included in all copies or substantial portions of the Software.
26
-
27
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
30
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
31
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
32
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
33
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34
-
35
- ---
36
-
37
1
  Name: @radix-ui/react-compose-refs
38
- Version: 1.0.1
2
+ Version: 1.1.1
39
3
  License: MIT
40
4
  Private: false
41
5
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -44,7 +8,7 @@ Homepage: https://radix-ui.com/primitives
44
8
  ---
45
9
 
46
10
  Name: @radix-ui/react-slot
47
- Version: 1.0.2
11
+ Version: 1.1.2
48
12
  License: MIT
49
13
  Private: false
50
14
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -53,7 +17,7 @@ Homepage: https://radix-ui.com/primitives
53
17
  ---
54
18
 
55
19
  Name: @radix-ui/react-primitive
56
- Version: 1.0.3
20
+ Version: 2.0.2
57
21
  License: MIT
58
22
  Private: false
59
23
  Repository: git+https://github.com/radix-ui/primitives.git
@@ -62,7 +26,7 @@ Homepage: https://radix-ui.com/primitives
62
26
  ---
63
27
 
64
28
  Name: @radix-ui/react-label
65
- Version: 2.0.2
29
+ Version: 2.1.2
66
30
  License: MIT
67
31
  Private: false
68
32
  Repository: git+https://github.com/radix-ui/primitives.git
package/dist/label.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),s=require("react");require("react-dom");function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},i.apply(null,arguments)}function y(e,r){typeof e=="function"?e(r):e!=null&&(e.current=r)}function v(...e){return r=>e.forEach(t=>y(t,r))}const m=s.forwardRef((e,r)=>{const{children:t,...l}=e,c=s.Children.toArray(t),n=c.find(E);if(n){const o=n.props.children,a=c.map(p=>p===n?s.Children.count(o)>1?s.Children.only(null):s.isValidElement(o)?o.props.children:null:p);return s.createElement(d,i({},l,{ref:r}),s.isValidElement(o)?s.cloneElement(o,void 0,a):null)}return s.createElement(d,i({},l,{ref:r}),t)});m.displayName="Slot";const d=s.forwardRef((e,r)=>{const{children:t,...l}=e;return s.isValidElement(t)?s.cloneElement(t,{...w(l,t.props),ref:r?v(r,t.ref):t.ref}):s.Children.count(t)>1?s.Children.only(null):null});d.displayName="SlotClone";const h=({children:e})=>s.createElement(s.Fragment,null,e);function E(e){return s.isValidElement(e)&&e.type===h}function w(e,r){const t={...r};for(const l in r){const c=e[l],n=r[l];/^on[A-Z]/.test(l)?c&&n?t[l]=(...a)=>{n(...a),c(...a)}:c&&(t[l]=c):l==="style"?t[l]={...c,...n}:l==="className"&&(t[l]=[c,n].filter(Boolean).join(" "))}return{...e,...t}}const S=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],_=S.reduce((e,r)=>{const t=s.forwardRef((l,c)=>{const{asChild:n,...o}=l,a=n?m:r;return s.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),s.createElement(a,i({},o,{ref:c}))});return t.displayName=`Primitive.${r}`,{...e,[r]:t}},{}),g=s.forwardRef((e,r)=>s.createElement(_.label,i({},e,{ref:r,onMouseDown:t=>{var l;(l=e.onMouseDown)===null||l===void 0||l.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}}))),x=g;function C(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),v=require("react");require("react-dom");function h(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const s=h(v);function m(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function j(...e){return n=>{let t=!1;const l=e.map(o=>{const r=m(o,n);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let o=0;o<l.length;o++){const r=l[o];typeof r=="function"?r():m(e[o],null)}}}}var b=s.forwardRef((e,n)=>{const{children:t,...l}=e,o=s.Children.toArray(t),r=o.find(w);if(r){const i=r.props.children,a=o.map(d=>d===r?s.Children.count(i)>1?s.Children.only(null):s.isValidElement(i)?i.props.children:null:d);return u.jsx(p,{...l,ref:n,children:s.isValidElement(i)?s.cloneElement(i,void 0,a):null})}return u.jsx(p,{...l,ref:n,children:t})});b.displayName="Slot";var p=s.forwardRef((e,n)=>{const{children:t,...l}=e;if(s.isValidElement(t)){const o=N(t),r=O(l,t.props);return t.type!==s.Fragment&&(r.ref=n?j(n,o):o),s.cloneElement(t,r)}return s.Children.count(t)>1?s.Children.only(null):null});p.displayName="SlotClone";var S=({children:e})=>u.jsx(u.Fragment,{children:e});function w(e){return s.isValidElement(e)&&e.type===S}function O(e,n){const t={...n};for(const l in n){const o=e[l],r=n[l];/^on[A-Z]/.test(l)?o&&r?t[l]=(...a)=>{r(...a),o(...a)}:o&&(t[l]=o):l==="style"?t[l]={...o,...r}:l==="className"&&(t[l]=[o,r].filter(Boolean).join(" "))}return{...e,...t}}function N(e){var l,o;let n=(l=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:l.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var P=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],R=P.reduce((e,n)=>{const t=s.forwardRef((l,o)=>{const{asChild:r,...i}=l,a=r?b:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(a,{...i,ref:o})});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{}),_="Label",y=s.forwardRef((e,n)=>u.jsx(R.label,{...e,ref:n,onMouseDown:t=>{var o;t.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));y.displayName=_;var C=y;function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var g={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */(function(e){(function(){var r={}.hasOwnProperty;function t(){for(var n="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(n=c(n,l(a)))}return n}function l(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var o="";for(var a in n)r.call(n,a)&&n[a]&&(o=c(o,a));return o}function c(n,o){return o?n?n+" "+o:n+o:n}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})($);var N=$.exports;const j=C(N),u={"purpur-label":"_purpur-label_12cfi_1","purpur-label--negative":"_purpur-label--negative_12cfi_9","purpur-label--disabled":"_purpur-label--disabled_12cfi_12"},f="purpur-label",O=({children:e,className:r,htmlFor:t,"data-testid":l,disabled:c,negative:n=!1,...o})=>{const a=j([r,u[f],{[u[`${f}--disabled`]]:c,[u[`${f}--negative`]]:n}]);return b.jsx(x,{className:a,"data-testid":l,htmlFor:t,...o,children:e})};exports.Label=O;
5
+ */(function(e){(function(){var n={}.hasOwnProperty;function t(){for(var r="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(r=o(r,l(a)))}return r}function l(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var i="";for(var a in r)n.call(r,a)&&r[a]&&(i=o(i,a));return i}function o(r,i){return i?r?r+" "+i:r+i:r}e.exports?(t.default=t,e.exports=t):window.classNames=t})()})(g);var x=g.exports;const D=E(x),c={"purpur-label":"_purpur-label_12cfi_1","purpur-label--negative":"_purpur-label--negative_12cfi_9","purpur-label--disabled":"_purpur-label--disabled_12cfi_12"},f="purpur-label",V=({children:e,className:n,htmlFor:t,"data-testid":l,disabled:o,negative:r=!1,...i})=>{const a=D([n,c[f],{[c[`${f}--disabled`]]:o,[c[`${f}--negative`]]:r}]);return u.jsx(C,{className:a,"data-testid":l,htmlFor:t,...i,children:e})};exports.Label=V;
6
6
  //# sourceMappingURL=label.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.cjs.js","sources":["../../../common/temp/node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/extends.js","../../../common/temp/node_modules/.pnpm/@radix-ui+react-compose-refs@1.0.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-slot@1.0.2_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-primitive@1.0.3_@types+react-dom@18.3.5_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-label@2.0.2_@types+react-dom@18.3.5_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1/node_modules/@radix-ui/react-label/dist/index.mjs","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js","../src/label.tsx"],"sourcesContent":["function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","import {useCallback as $3vqmr$useCallback} from \"react\";\n\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$var$setRef(ref, value) {\n if (typeof ref === 'function') ref(value);\n else if (ref !== null && ref !== undefined) ref.current = value;\n}\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {\n return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)\n )\n ;\n}\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return $3vqmr$useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);\n}\n\n\n\n\nexport {$6ed0406888f73fc4$export$43e446d32b3d21af as composeRefs, $6ed0406888f73fc4$export$c7b2cbe3552a0d05 as useComposedRefs};\n//# sourceMappingURL=index.mjs.map\n","import $9IrjX$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $9IrjX$forwardRef, Children as $9IrjX$Children, isValidElement as $9IrjX$isValidElement, createElement as $9IrjX$createElement, cloneElement as $9IrjX$cloneElement, Fragment as $9IrjX$Fragment} from \"react\";\nimport {composeRefs as $9IrjX$composeRefs} from \"@radix-ui/react-compose-refs\";\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ $9IrjX$forwardRef((props, forwardedRef)=>{\n const { children: children , ...slotProps } = props;\n const childrenArray = $9IrjX$Children.toArray(children);\n const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child)=>{\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if ($9IrjX$Children.count(newElement) > 1) return $9IrjX$Children.only(null);\n return /*#__PURE__*/ $9IrjX$isValidElement(newElement) ? newElement.props.children : null;\n } else return child;\n });\n return /*#__PURE__*/ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, $9IrjX$babelruntimehelpersesmextends({}, slotProps, {\n ref: forwardedRef\n }), /*#__PURE__*/ $9IrjX$isValidElement(newElement) ? /*#__PURE__*/ $9IrjX$cloneElement(newElement, undefined, newChildren) : null);\n }\n return /*#__PURE__*/ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, $9IrjX$babelruntimehelpersesmextends({}, slotProps, {\n ref: forwardedRef\n }), children);\n});\n$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ $9IrjX$forwardRef((props, forwardedRef)=>{\n const { children: children , ...slotProps } = props;\n if (/*#__PURE__*/ $9IrjX$isValidElement(children)) return /*#__PURE__*/ $9IrjX$cloneElement(children, {\n ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),\n ref: forwardedRef ? $9IrjX$composeRefs(forwardedRef, children.ref) : children.ref\n });\n return $9IrjX$Children.count(children) > 1 ? $9IrjX$Children.only(null) : null;\n});\n$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{\n return /*#__PURE__*/ $9IrjX$createElement($9IrjX$Fragment, null, children);\n};\n/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {\n return /*#__PURE__*/ $9IrjX$isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;\n}\nfunction $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {\n // all child props should override\n const overrideProps = {\n ...childProps\n };\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 the handler exists on both, we compose them\n if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{\n childPropValue(...args);\n slotPropValue(...args);\n };\n else if (slotPropValue) overrideProps[propName] = slotPropValue;\n } else if (propName === 'style') overrideProps[propName] = {\n ...slotPropValue,\n ...childPropValue\n };\n else if (propName === 'className') overrideProps[propName] = [\n slotPropValue,\n childPropValue\n ].filter(Boolean).join(' ');\n }\n return {\n ...slotProps,\n ...overrideProps\n };\n}\nconst $5e63c961fc1ce211$export$be92b6f5f03c0fe9 = $5e63c961fc1ce211$export$8c6ed5c666ac1360;\n\n\n\n\nexport {$5e63c961fc1ce211$export$8c6ed5c666ac1360 as Slot, $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 as Slottable, $5e63c961fc1ce211$export$be92b6f5f03c0fe9 as Root};\n//# sourceMappingURL=index.mjs.map\n","import $4q5Fq$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $4q5Fq$forwardRef, useEffect as $4q5Fq$useEffect, createElement as $4q5Fq$createElement} from \"react\";\nimport {flushSync as $4q5Fq$flushSync} from \"react-dom\";\nimport {Slot as $4q5Fq$Slot} from \"@radix-ui/react-slot\";\n\n\n\n\n\nconst $8927f6f2acc4f386$var$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 'span',\n 'svg',\n 'ul'\n]; // Temporary while we await merge of this fix:\n// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396\n// prettier-ignore\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{\n const Node = /*#__PURE__*/ $4q5Fq$forwardRef((props, forwardedRef)=>{\n const { asChild: asChild , ...primitiveProps } = props;\n const Comp = asChild ? $4q5Fq$Slot : node;\n $4q5Fq$useEffect(()=>{\n window[Symbol.for('radix-ui')] = true;\n }, []);\n return /*#__PURE__*/ $4q5Fq$createElement(Comp, $4q5Fq$babelruntimehelpersesmextends({}, primitiveProps, {\n ref: forwardedRef\n }));\n });\n Node.displayName = `Primitive.${node}`;\n return {\n ...primitive,\n [node]: Node\n };\n}, {});\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/ /**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click 👎\n * target.dispatchEvent(new Event(‘click’))\n *\n * dispatching a custom type within a non-discrete event 👎\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}\n *\n * dispatching a custom type within a `discrete` event 👍\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {\n if (target) $4q5Fq$flushSync(()=>target.dispatchEvent(event)\n );\n}\n/* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$be92b6f5f03c0fe9 = $8927f6f2acc4f386$export$250ffa63cdc0d034;\n\n\n\n\nexport {$8927f6f2acc4f386$export$250ffa63cdc0d034 as Primitive, $8927f6f2acc4f386$export$be92b6f5f03c0fe9 as Root, $8927f6f2acc4f386$export$6d1a0317bde7de7f as dispatchDiscreteCustomEvent};\n//# sourceMappingURL=index.mjs.map\n","import $7V4JZ$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $7V4JZ$forwardRef, createElement as $7V4JZ$createElement} from \"react\";\nimport {Primitive as $7V4JZ$Primitive} from \"@radix-ui/react-primitive\";\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Label\n * -----------------------------------------------------------------------------------------------*/ const $b73a6c6685e72184$var$NAME = 'Label';\nconst $b73a6c6685e72184$export$b04be29aa201d4f5 = /*#__PURE__*/ $7V4JZ$forwardRef((props, forwardedRef)=>{\n return /*#__PURE__*/ $7V4JZ$createElement($7V4JZ$Primitive.label, $7V4JZ$babelruntimehelpersesmextends({}, props, {\n ref: forwardedRef,\n onMouseDown: (event)=>{\n var _props$onMouseDown;\n (_props$onMouseDown = props.onMouseDown) === null || _props$onMouseDown === void 0 || _props$onMouseDown.call(props, event); // prevent text selection when double clicking label\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }));\n});\n/*#__PURE__*/ Object.assign($b73a6c6685e72184$export$b04be29aa201d4f5, {\n displayName: $b73a6c6685e72184$var$NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ const $b73a6c6685e72184$export$be92b6f5f03c0fe9 = $b73a6c6685e72184$export$b04be29aa201d4f5;\n\n\n\n\nexport {$b73a6c6685e72184$export$b04be29aa201d4f5 as Label, $b73a6c6685e72184$export$be92b6f5f03c0fe9 as Root};\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(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 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(null, 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, 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, { LabelHTMLAttributes, ReactNode } from \"react\";\nimport * as RadixLabel from \"@radix-ui/react-label\";\nimport c from \"classnames\";\n\nimport styles from \"./label.module.scss\";\n\nconst rootClassName = \"purpur-label\";\n\nexport type LabelProps = {\n \"data-testid\"?: string;\n children: ReactNode;\n className?: string;\n htmlFor: string;\n disabled?: boolean;\n negative?: boolean;\n} & LabelHTMLAttributes<HTMLLabelElement>;\n\nexport const Label = ({\n children,\n className,\n htmlFor,\n \"data-testid\": dataTestId,\n disabled,\n negative = false,\n ...props\n}: LabelProps) => {\n const classes = c([\n className,\n styles[rootClassName],\n {\n [styles[`${rootClassName}--disabled`]]: disabled,\n [styles[`${rootClassName}--negative`]]: negative,\n },\n ]);\n\n return (\n <RadixLabel.Root className={classes} data-testid={dataTestId} htmlFor={htmlFor} {...props}>\n {children}\n </RadixLabel.Root>\n );\n};\n"],"names":["_extends","n","e","r","$6ed0406888f73fc4$var$setRef","ref","value","$6ed0406888f73fc4$export$43e446d32b3d21af","refs","node","$5e63c961fc1ce211$export$8c6ed5c666ac1360","$9IrjX$forwardRef","props","forwardedRef","children","slotProps","childrenArray","$9IrjX$Children","slottable","$5e63c961fc1ce211$var$isSlottable","newElement","newChildren","child","$9IrjX$isValidElement","$9IrjX$createElement","$5e63c961fc1ce211$var$SlotClone","$9IrjX$babelruntimehelpersesmextends","$9IrjX$cloneElement","$5e63c961fc1ce211$var$mergeProps","$9IrjX$composeRefs","$5e63c961fc1ce211$export$d9f1ccf0bdb05d45","$9IrjX$Fragment","childProps","overrideProps","propName","slotPropValue","childPropValue","args","$8927f6f2acc4f386$var$NODES","$8927f6f2acc4f386$export$250ffa63cdc0d034","primitive","Node","$4q5Fq$forwardRef","asChild","primitiveProps","Comp","$4q5Fq$Slot","$4q5Fq$useEffect","$4q5Fq$createElement","$4q5Fq$babelruntimehelpersesmextends","$b73a6c6685e72184$export$b04be29aa201d4f5","$7V4JZ$forwardRef","$7V4JZ$createElement","$7V4JZ$Primitive","$7V4JZ$babelruntimehelpersesmextends","event","_props$onMouseDown","$b73a6c6685e72184$export$be92b6f5f03c0fe9","hasOwn","classNames","classes","i","arg","appendClass","parseValue","key","newClass","module","rootClassName","Label","className","htmlFor","dataTestId","disabled","negative","c","styles","jsx","RadixLabel.Root"],"mappings":"6JAAA,SAASA,GAAW,CAClB,OAAOA,EAAW,OAAO,OAAS,OAAO,OAAO,KAAI,EAAK,SAAUC,EAAG,CACpE,QAASC,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAAK,CACzC,IAAI,EAAI,UAAUA,CAAC,EACnB,QA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,SAAS,SAAQ,EAAG,SAAS,eAAe,EAClG,OAAOA,EAAI,SAAU,EAGtB,IAAIF,EAAU,GAEd,QAASK,KAAOH,EACXJ,EAAO,KAAKI,EAAKG,CAAG,GAAKH,EAAIG,CAAG,IACnCL,EAAUG,EAAYH,EAASK,CAAG,GAIpC,OAAOL,EAGR,SAASG,EAAazD,EAAO4D,EAAU,CACtC,OAAKA,EAID5D,EACIA,EAAQ,IAAM4D,EAGf5D,EAAQ4D,EAPP5D,EAU4B6D,EAAO,SAC3CR,EAAW,QAAUA,EACrBQ,EAAA,QAAiBR,GAOjB,OAAO,WAAaA,CAEtB,yMCtEMS,EAAgB,eAWTC,EAAQ,CAAC,CACpB,SAAAvD,EACA,UAAAwD,EACA,QAAAC,EACA,cAAeC,EACf,SAAAC,EACA,SAAAC,EAAW,GACX,GAAG9D,CACL,IAAkB,CAChB,MAAMgD,EAAUe,EAAE,CAChBL,EACAM,EAAOR,CAAa,EACpB,CACE,CAACQ,EAAO,GAAGR,CAAa,YAAY,CAAC,EAAGK,EACxC,CAACG,EAAO,GAAGR,CAAa,YAAY,CAAC,EAAGM,CAAA,CAC1C,CACD,EAGC,OAAAG,MAACC,EAAA,CAAgB,UAAWlB,EAAS,cAAaY,EAAY,QAAAD,EAAmB,GAAG3D,EACjF,SAAAE,CACH,CAAA,CAEJ","x_google_ignoreList":[0,1,2,3,4,5]}
1
+ {"version":3,"file":"label.cjs.js","sources":["../../../common/temp/node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-slot@1.1.2_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-primitive@2.0.2_@types+react-dom@18.3.5_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-label@2.1.2_@types+react-dom@18.3.5_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1/node_modules/@radix-ui/react-label/dist/index.mjs","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js","../src/label.tsx"],"sourcesContent":["// packages/react/compose-refs/src/composeRefs.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","// packages/react/slot/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 Slot = 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});\nSlot.displayName = \"Slot\";\nvar 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});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n};\nfunction isSlottable(child) {\n return React.isValidElement(child) && child.type === Slottable;\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 childPropValue(...args);\n slotPropValue(...args);\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}\nvar Root = Slot;\nexport {\n Root,\n Slot,\n Slottable\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/primitive/src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Slot } 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 \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((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// packages/react/label/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(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 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(null, 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, 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, { LabelHTMLAttributes, ReactNode } from \"react\";\nimport * as RadixLabel from \"@radix-ui/react-label\";\nimport c from \"classnames\";\n\nimport styles from \"./label.module.scss\";\n\nconst rootClassName = \"purpur-label\";\n\nexport type LabelProps = {\n \"data-testid\"?: string;\n children: ReactNode;\n className?: string;\n htmlFor: string;\n disabled?: boolean;\n negative?: boolean;\n} & LabelHTMLAttributes<HTMLLabelElement>;\n\nexport const Label = ({\n children,\n className,\n htmlFor,\n \"data-testid\": dataTestId,\n disabled,\n negative = false,\n ...props\n}: LabelProps) => {\n const classes = c([\n className,\n styles[rootClassName],\n {\n [styles[`${rootClassName}--disabled`]]: disabled,\n [styles[`${rootClassName}--negative`]]: negative,\n },\n ]);\n\n return (\n <RadixLabel.Root className={classes} data-testid={dataTestId} htmlFor={htmlFor} {...props}>\n {children}\n </RadixLabel.Root>\n );\n};\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","Slot","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","SlotClone","childrenRef","getElementRef","props2","mergeProps","Slottable","Fragment2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","_a","mayWarn","_b","NODES","Primitive","primitive","Node","asChild","primitiveProps","Comp","NAME","Label","event","Root","hasOwn","classNames","classes","arg","appendClass","parseValue","key","newClass","module","rootClassName","className","htmlFor","dataTestId","disabled","negative","c","styles","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,CACb,CAAK,EACD,GAAIF,EACF,MAAO,IAAM,CACX,QAASG,EAAI,EAAGA,EAAIF,EAAS,OAAQE,IAAK,CACxC,MAAMD,EAAUD,EAASE,CAAC,EACtB,OAAOD,GAAW,WACpBA,EAAS,EAETR,EAAOI,EAAKK,CAAC,EAAG,IAAI,CAEhC,CACO,CAEJ,CACH,CC5BA,IAAIC,EAAOC,EAAM,WAAW,CAACC,EAAOC,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KG,CAAG,GAAKH,EAAIG,CAAG,IACnCJ,EAAUE,EAAYF,EAASI,CAAG,GAIpC,OAAOJ,EAGR,SAASE,EAAatD,EAAOyD,EAAU,CACtC,OAAKA,EAIDzD,EACIA,EAAQ,IAAMyD,EAGfzD,EAAQyD,EAPPzD,EAU4B0D,EAAO,SAC3CP,EAAW,QAAUA,EACrBO,EAAA,QAAiBP,GAOjB,OAAO,WAAaA,CAEtB,yMCtEMQ,EAAgB,eAWTZ,EAAQ,CAAC,CACpB,SAAAnC,EACA,UAAAgD,EACA,QAAAC,EACA,cAAeC,EACf,SAAAC,EACA,SAAAC,EAAW,GACX,GAAGtD,CACL,IAAkB,CAChB,MAAM0C,EAAUa,EAAE,CAChBL,EACAM,EAAOP,CAAa,EACpB,CACE,CAACO,EAAO,GAAGP,CAAa,YAAY,CAAC,EAAGI,EACxC,CAACG,EAAO,GAAGP,CAAa,YAAY,CAAC,EAAGK,CAAA,CAC1C,CACD,EAGC,OAAA5C,MAAC+C,EAAA,CAAgB,UAAWf,EAAS,cAAaU,EAAY,QAAAD,EAAmB,GAAGnD,EACjF,SAAAE,CACH,CAAA,CAEJ","x_google_ignoreList":[0,1,2,3,4]}
package/dist/label.es.js CHANGED
@@ -1,70 +1,65 @@
1
- import { jsx as _ } from "react/jsx-runtime";
2
- import { forwardRef as p, Children as i, isValidElement as f, createElement as u, cloneElement as v, Fragment as x, useEffect as N } from "react";
1
+ import { jsx as u, Fragment as g } from "react/jsx-runtime";
2
+ import * as s from "react";
3
3
  import "react-dom";
4
- function a() {
5
- return a = Object.assign ? Object.assign.bind() : function(e) {
6
- for (var r = 1; r < arguments.length; r++) {
7
- var t = arguments[r];
8
- for (var o in t) ({}).hasOwnProperty.call(t, o) && (e[o] = t[o]);
9
- }
10
- return e;
11
- }, a.apply(null, arguments);
12
- }
13
- function S(e, r) {
14
- typeof e == "function" ? e(r) : e != null && (e.current = r);
4
+ function m(e, n) {
5
+ if (typeof e == "function")
6
+ return e(n);
7
+ e != null && (e.current = n);
15
8
  }
16
- function g(...e) {
17
- return (r) => e.forEach(
18
- (t) => S(t, r)
19
- );
9
+ function h(...e) {
10
+ return (n) => {
11
+ let r = !1;
12
+ const i = e.map((o) => {
13
+ const t = m(o, n);
14
+ return !r && typeof t == "function" && (r = !0), t;
15
+ });
16
+ if (r)
17
+ return () => {
18
+ for (let o = 0; o < i.length; o++) {
19
+ const t = i[o];
20
+ typeof t == "function" ? t() : m(e[o], null);
21
+ }
22
+ };
23
+ };
20
24
  }
21
- const y = /* @__PURE__ */ p((e, r) => {
22
- const { children: t, ...o } = e, s = i.toArray(t), n = s.find(E);
23
- if (n) {
24
- const l = n.props.children, c = s.map((b) => b === n ? i.count(l) > 1 ? i.only(null) : /* @__PURE__ */ f(l) ? l.props.children : null : b);
25
- return /* @__PURE__ */ u(m, a({}, o, {
26
- ref: r
27
- }), /* @__PURE__ */ f(l) ? /* @__PURE__ */ v(l, void 0, c) : null);
25
+ var y = s.forwardRef((e, n) => {
26
+ const { children: r, ...i } = e, o = s.Children.toArray(r), t = o.find(N);
27
+ if (t) {
28
+ const l = t.props.children, a = o.map((d) => d === t ? s.Children.count(l) > 1 ? s.Children.only(null) : s.isValidElement(l) ? l.props.children : null : d);
29
+ return /* @__PURE__ */ u(p, { ...i, ref: n, children: s.isValidElement(l) ? s.cloneElement(l, void 0, a) : null });
28
30
  }
29
- return /* @__PURE__ */ u(m, a({}, o, {
30
- ref: r
31
- }), t);
31
+ return /* @__PURE__ */ u(p, { ...i, ref: n, children: r });
32
32
  });
33
33
  y.displayName = "Slot";
34
- const m = /* @__PURE__ */ p((e, r) => {
35
- const { children: t, ...o } = e;
36
- return /* @__PURE__ */ f(t) ? /* @__PURE__ */ v(t, {
37
- ...O(o, t.props),
38
- ref: r ? g(r, t.ref) : t.ref
39
- }) : i.count(t) > 1 ? i.only(null) : null;
34
+ var p = s.forwardRef((e, n) => {
35
+ const { children: r, ...i } = e;
36
+ if (s.isValidElement(r)) {
37
+ const o = C(r), t = S(i, r.props);
38
+ return r.type !== s.Fragment && (t.ref = n ? h(n, o) : o), s.cloneElement(r, t);
39
+ }
40
+ return s.Children.count(r) > 1 ? s.Children.only(null) : null;
40
41
  });
41
- m.displayName = "SlotClone";
42
- const w = ({ children: e }) => /* @__PURE__ */ u(x, null, e);
43
- function E(e) {
44
- return /* @__PURE__ */ f(e) && e.type === w;
42
+ p.displayName = "SlotClone";
43
+ var w = ({ children: e }) => /* @__PURE__ */ u(g, { children: e });
44
+ function N(e) {
45
+ return s.isValidElement(e) && e.type === w;
45
46
  }
46
- function O(e, r) {
47
- const t = {
48
- ...r
49
- };
50
- for (const o in r) {
51
- const s = e[o], n = r[o];
52
- /^on[A-Z]/.test(o) ? s && n ? t[o] = (...c) => {
53
- n(...c), s(...c);
54
- } : s && (t[o] = s) : o === "style" ? t[o] = {
55
- ...s,
56
- ...n
57
- } : o === "className" && (t[o] = [
58
- s,
59
- n
60
- ].filter(Boolean).join(" "));
47
+ function S(e, n) {
48
+ const r = { ...n };
49
+ for (const i in n) {
50
+ const o = e[i], t = n[i];
51
+ /^on[A-Z]/.test(i) ? o && t ? r[i] = (...a) => {
52
+ t(...a), o(...a);
53
+ } : o && (r[i] = o) : i === "style" ? r[i] = { ...o, ...t } : i === "className" && (r[i] = [o, t].filter(Boolean).join(" "));
61
54
  }
62
- return {
63
- ...e,
64
- ...t
65
- };
55
+ return { ...e, ...r };
56
+ }
57
+ function C(e) {
58
+ var i, o;
59
+ let n = (i = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : i.get, r = n && "isReactWarning" in n && n.isReactWarning;
60
+ return r ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
66
61
  }
67
- const P = [
62
+ var E = [
68
63
  "a",
69
64
  "button",
70
65
  "div",
@@ -81,30 +76,29 @@ const P = [
81
76
  "span",
82
77
  "svg",
83
78
  "ul"
84
- ], j = P.reduce((e, r) => {
85
- const t = /* @__PURE__ */ p((o, s) => {
86
- const { asChild: n, ...l } = o, c = n ? y : r;
87
- return N(() => {
88
- window[Symbol.for("radix-ui")] = !0;
89
- }, []), /* @__PURE__ */ u(c, a({}, l, {
90
- ref: s
91
- }));
79
+ ], R = E.reduce((e, n) => {
80
+ const r = s.forwardRef((i, o) => {
81
+ const { asChild: t, ...l } = i, a = t ? y : n;
82
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(a, { ...l, ref: o });
92
83
  });
93
- return t.displayName = `Primitive.${r}`, {
84
+ return r.displayName = `Primitive.${n}`, { ...e, [n]: r };
85
+ }, {}), P = "Label", b = s.forwardRef((e, n) => /* @__PURE__ */ u(
86
+ R.label,
87
+ {
94
88
  ...e,
95
- [r]: t
96
- };
97
- }, {}), C = /* @__PURE__ */ p((e, r) => /* @__PURE__ */ u(j.label, a({}, e, {
98
- ref: r,
99
- onMouseDown: (t) => {
100
- var o;
101
- (o = e.onMouseDown) === null || o === void 0 || o.call(e, t), !t.defaultPrevented && t.detail > 1 && t.preventDefault();
89
+ ref: n,
90
+ onMouseDown: (r) => {
91
+ var o;
92
+ r.target.closest("button, input, select, textarea") || ((o = e.onMouseDown) == null || o.call(e, r), !r.defaultPrevented && r.detail > 1 && r.preventDefault());
93
+ }
102
94
  }
103
- }))), D = C;
104
- function A(e) {
95
+ ));
96
+ b.displayName = P;
97
+ var _ = b;
98
+ function O(e) {
105
99
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
106
100
  }
107
- var h = { exports: {} };
101
+ var v = { exports: {} };
108
102
  /*!
109
103
  Copyright (c) 2018 Jed Watson.
110
104
  Licensed under the MIT License (MIT), see
@@ -112,59 +106,59 @@ var h = { exports: {} };
112
106
  */
113
107
  (function(e) {
114
108
  (function() {
115
- var r = {}.hasOwnProperty;
116
- function t() {
117
- for (var n = "", l = 0; l < arguments.length; l++) {
118
- var c = arguments[l];
119
- c && (n = s(n, o(c)));
109
+ var n = {}.hasOwnProperty;
110
+ function r() {
111
+ for (var t = "", l = 0; l < arguments.length; l++) {
112
+ var a = arguments[l];
113
+ a && (t = o(t, i(a)));
120
114
  }
121
- return n;
115
+ return t;
122
116
  }
123
- function o(n) {
124
- if (typeof n == "string" || typeof n == "number")
125
- return n;
126
- if (typeof n != "object")
117
+ function i(t) {
118
+ if (typeof t == "string" || typeof t == "number")
119
+ return t;
120
+ if (typeof t != "object")
127
121
  return "";
128
- if (Array.isArray(n))
129
- return t.apply(null, n);
130
- if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
131
- return n.toString();
122
+ if (Array.isArray(t))
123
+ return r.apply(null, t);
124
+ if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
125
+ return t.toString();
132
126
  var l = "";
133
- for (var c in n)
134
- r.call(n, c) && n[c] && (l = s(l, c));
127
+ for (var a in t)
128
+ n.call(t, a) && t[a] && (l = o(l, a));
135
129
  return l;
136
130
  }
137
- function s(n, l) {
138
- return l ? n ? n + " " + l : n + l : n;
131
+ function o(t, l) {
132
+ return l ? t ? t + " " + l : t + l : t;
139
133
  }
140
- e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
134
+ e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
141
135
  })();
142
- })(h);
143
- var M = h.exports;
144
- const V = /* @__PURE__ */ A(M), d = {
136
+ })(v);
137
+ var j = v.exports;
138
+ const D = /* @__PURE__ */ O(j), f = {
145
139
  "purpur-label": "_purpur-label_12cfi_1",
146
140
  "purpur-label--negative": "_purpur-label--negative_12cfi_9",
147
141
  "purpur-label--disabled": "_purpur-label--disabled_12cfi_12"
148
- }, $ = "purpur-label", L = ({
142
+ }, c = "purpur-label", A = ({
149
143
  children: e,
150
- className: r,
151
- htmlFor: t,
152
- "data-testid": o,
153
- disabled: s,
154
- negative: n = !1,
144
+ className: n,
145
+ htmlFor: r,
146
+ "data-testid": i,
147
+ disabled: o,
148
+ negative: t = !1,
155
149
  ...l
156
150
  }) => {
157
- const c = V([
158
- r,
159
- d[$],
151
+ const a = D([
152
+ n,
153
+ f[c],
160
154
  {
161
- [d[`${$}--disabled`]]: s,
162
- [d[`${$}--negative`]]: n
155
+ [f[`${c}--disabled`]]: o,
156
+ [f[`${c}--negative`]]: t
163
157
  }
164
158
  ]);
165
- return /* @__PURE__ */ _(D, { className: c, "data-testid": o, htmlFor: t, ...l, children: e });
159
+ return /* @__PURE__ */ u(_, { className: a, "data-testid": i, htmlFor: r, ...l, children: e });
166
160
  };
167
161
  export {
168
- L as Label
162
+ A as Label
169
163
  };
170
164
  //# sourceMappingURL=label.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.es.js","sources":["../../../common/temp/node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/extends.js","../../../common/temp/node_modules/.pnpm/@radix-ui+react-compose-refs@1.0.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-slot@1.0.2_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-primitive@1.0.3_@types+react-dom@18.3.5_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-label@2.0.2_@types+react-dom@18.3.5_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1/node_modules/@radix-ui/react-label/dist/index.mjs","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js","../src/label.tsx"],"sourcesContent":["function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","import {useCallback as $3vqmr$useCallback} from \"react\";\n\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$var$setRef(ref, value) {\n if (typeof ref === 'function') ref(value);\n else if (ref !== null && ref !== undefined) ref.current = value;\n}\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {\n return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)\n )\n ;\n}\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return $3vqmr$useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);\n}\n\n\n\n\nexport {$6ed0406888f73fc4$export$43e446d32b3d21af as composeRefs, $6ed0406888f73fc4$export$c7b2cbe3552a0d05 as useComposedRefs};\n//# sourceMappingURL=index.mjs.map\n","import $9IrjX$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $9IrjX$forwardRef, Children as $9IrjX$Children, isValidElement as $9IrjX$isValidElement, createElement as $9IrjX$createElement, cloneElement as $9IrjX$cloneElement, Fragment as $9IrjX$Fragment} from \"react\";\nimport {composeRefs as $9IrjX$composeRefs} from \"@radix-ui/react-compose-refs\";\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ $9IrjX$forwardRef((props, forwardedRef)=>{\n const { children: children , ...slotProps } = props;\n const childrenArray = $9IrjX$Children.toArray(children);\n const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child)=>{\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if ($9IrjX$Children.count(newElement) > 1) return $9IrjX$Children.only(null);\n return /*#__PURE__*/ $9IrjX$isValidElement(newElement) ? newElement.props.children : null;\n } else return child;\n });\n return /*#__PURE__*/ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, $9IrjX$babelruntimehelpersesmextends({}, slotProps, {\n ref: forwardedRef\n }), /*#__PURE__*/ $9IrjX$isValidElement(newElement) ? /*#__PURE__*/ $9IrjX$cloneElement(newElement, undefined, newChildren) : null);\n }\n return /*#__PURE__*/ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, $9IrjX$babelruntimehelpersesmextends({}, slotProps, {\n ref: forwardedRef\n }), children);\n});\n$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ $9IrjX$forwardRef((props, forwardedRef)=>{\n const { children: children , ...slotProps } = props;\n if (/*#__PURE__*/ $9IrjX$isValidElement(children)) return /*#__PURE__*/ $9IrjX$cloneElement(children, {\n ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),\n ref: forwardedRef ? $9IrjX$composeRefs(forwardedRef, children.ref) : children.ref\n });\n return $9IrjX$Children.count(children) > 1 ? $9IrjX$Children.only(null) : null;\n});\n$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{\n return /*#__PURE__*/ $9IrjX$createElement($9IrjX$Fragment, null, children);\n};\n/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {\n return /*#__PURE__*/ $9IrjX$isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;\n}\nfunction $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {\n // all child props should override\n const overrideProps = {\n ...childProps\n };\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 the handler exists on both, we compose them\n if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{\n childPropValue(...args);\n slotPropValue(...args);\n };\n else if (slotPropValue) overrideProps[propName] = slotPropValue;\n } else if (propName === 'style') overrideProps[propName] = {\n ...slotPropValue,\n ...childPropValue\n };\n else if (propName === 'className') overrideProps[propName] = [\n slotPropValue,\n childPropValue\n ].filter(Boolean).join(' ');\n }\n return {\n ...slotProps,\n ...overrideProps\n };\n}\nconst $5e63c961fc1ce211$export$be92b6f5f03c0fe9 = $5e63c961fc1ce211$export$8c6ed5c666ac1360;\n\n\n\n\nexport {$5e63c961fc1ce211$export$8c6ed5c666ac1360 as Slot, $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 as Slottable, $5e63c961fc1ce211$export$be92b6f5f03c0fe9 as Root};\n//# sourceMappingURL=index.mjs.map\n","import $4q5Fq$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $4q5Fq$forwardRef, useEffect as $4q5Fq$useEffect, createElement as $4q5Fq$createElement} from \"react\";\nimport {flushSync as $4q5Fq$flushSync} from \"react-dom\";\nimport {Slot as $4q5Fq$Slot} from \"@radix-ui/react-slot\";\n\n\n\n\n\nconst $8927f6f2acc4f386$var$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 'span',\n 'svg',\n 'ul'\n]; // Temporary while we await merge of this fix:\n// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396\n// prettier-ignore\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{\n const Node = /*#__PURE__*/ $4q5Fq$forwardRef((props, forwardedRef)=>{\n const { asChild: asChild , ...primitiveProps } = props;\n const Comp = asChild ? $4q5Fq$Slot : node;\n $4q5Fq$useEffect(()=>{\n window[Symbol.for('radix-ui')] = true;\n }, []);\n return /*#__PURE__*/ $4q5Fq$createElement(Comp, $4q5Fq$babelruntimehelpersesmextends({}, primitiveProps, {\n ref: forwardedRef\n }));\n });\n Node.displayName = `Primitive.${node}`;\n return {\n ...primitive,\n [node]: Node\n };\n}, {});\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/ /**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click 👎\n * target.dispatchEvent(new Event(‘click’))\n *\n * dispatching a custom type within a non-discrete event 👎\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}\n *\n * dispatching a custom type within a `discrete` event 👍\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {\n if (target) $4q5Fq$flushSync(()=>target.dispatchEvent(event)\n );\n}\n/* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$be92b6f5f03c0fe9 = $8927f6f2acc4f386$export$250ffa63cdc0d034;\n\n\n\n\nexport {$8927f6f2acc4f386$export$250ffa63cdc0d034 as Primitive, $8927f6f2acc4f386$export$be92b6f5f03c0fe9 as Root, $8927f6f2acc4f386$export$6d1a0317bde7de7f as dispatchDiscreteCustomEvent};\n//# sourceMappingURL=index.mjs.map\n","import $7V4JZ$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $7V4JZ$forwardRef, createElement as $7V4JZ$createElement} from \"react\";\nimport {Primitive as $7V4JZ$Primitive} from \"@radix-ui/react-primitive\";\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Label\n * -----------------------------------------------------------------------------------------------*/ const $b73a6c6685e72184$var$NAME = 'Label';\nconst $b73a6c6685e72184$export$b04be29aa201d4f5 = /*#__PURE__*/ $7V4JZ$forwardRef((props, forwardedRef)=>{\n return /*#__PURE__*/ $7V4JZ$createElement($7V4JZ$Primitive.label, $7V4JZ$babelruntimehelpersesmextends({}, props, {\n ref: forwardedRef,\n onMouseDown: (event)=>{\n var _props$onMouseDown;\n (_props$onMouseDown = props.onMouseDown) === null || _props$onMouseDown === void 0 || _props$onMouseDown.call(props, event); // prevent text selection when double clicking label\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }));\n});\n/*#__PURE__*/ Object.assign($b73a6c6685e72184$export$b04be29aa201d4f5, {\n displayName: $b73a6c6685e72184$var$NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ const $b73a6c6685e72184$export$be92b6f5f03c0fe9 = $b73a6c6685e72184$export$b04be29aa201d4f5;\n\n\n\n\nexport {$b73a6c6685e72184$export$b04be29aa201d4f5 as Label, $b73a6c6685e72184$export$be92b6f5f03c0fe9 as Root};\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(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 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(null, 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, 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, { LabelHTMLAttributes, ReactNode } from \"react\";\nimport * as RadixLabel from \"@radix-ui/react-label\";\nimport c from \"classnames\";\n\nimport styles from \"./label.module.scss\";\n\nconst rootClassName = \"purpur-label\";\n\nexport type LabelProps = {\n \"data-testid\"?: string;\n children: ReactNode;\n className?: string;\n htmlFor: string;\n disabled?: boolean;\n negative?: boolean;\n} & LabelHTMLAttributes<HTMLLabelElement>;\n\nexport const Label = ({\n children,\n className,\n htmlFor,\n \"data-testid\": dataTestId,\n disabled,\n negative = false,\n ...props\n}: LabelProps) => {\n const classes = c([\n className,\n styles[rootClassName],\n {\n [styles[`${rootClassName}--disabled`]]: disabled,\n [styles[`${rootClassName}--negative`]]: negative,\n },\n ]);\n\n return (\n <RadixLabel.Root className={classes} data-testid={dataTestId} htmlFor={htmlFor} {...props}>\n {children}\n </RadixLabel.Root>\n );\n};\n"],"names":["_extends","n","e","r","$6ed0406888f73fc4$var$setRef","ref","value","$6ed0406888f73fc4$export$43e446d32b3d21af","refs","node","$5e63c961fc1ce211$export$8c6ed5c666ac1360","$9IrjX$forwardRef","props","forwardedRef","children","slotProps","childrenArray","$9IrjX$Children","slottable","$5e63c961fc1ce211$var$isSlottable","newElement","newChildren","child","$9IrjX$isValidElement","$9IrjX$createElement","$5e63c961fc1ce211$var$SlotClone","$9IrjX$babelruntimehelpersesmextends","$9IrjX$cloneElement","$5e63c961fc1ce211$var$mergeProps","$9IrjX$composeRefs","$5e63c961fc1ce211$export$d9f1ccf0bdb05d45","$9IrjX$Fragment","childProps","overrideProps","propName","slotPropValue","childPropValue","args","$8927f6f2acc4f386$var$NODES","$8927f6f2acc4f386$export$250ffa63cdc0d034","primitive","Node","$4q5Fq$forwardRef","asChild","primitiveProps","Comp","$4q5Fq$Slot","$4q5Fq$useEffect","$4q5Fq$createElement","$4q5Fq$babelruntimehelpersesmextends","$b73a6c6685e72184$export$b04be29aa201d4f5","$7V4JZ$forwardRef","$7V4JZ$createElement","$7V4JZ$Primitive","$7V4JZ$babelruntimehelpersesmextends","event","_props$onMouseDown","$b73a6c6685e72184$export$be92b6f5f03c0fe9","hasOwn","classNames","classes","i","arg","appendClass","parseValue","key","newClass","module","rootClassName","Label","className","htmlFor","dataTestId","disabled","negative","c","styles","jsx","RadixLabel.Root"],"mappings":";;;AAAA,SAASA,IAAW;AAClB,SAAOA,IAAW,OAAO,SAAS,OAAO,OAAO,KAAI,IAAK,SAAUC,GAAG;AACpE,aAASC,IAAI,GAAGA,IAAI,UAAU,QAAQA,KAAK;AACzC,UAAI,IAAI,UAAUA,CAAC;AACnB,eAASC,KAAK,EAAG,EAAC,CAAE,GAAE,eAAe,KAAK,GAAGA,CAAC,MAAMF,EAAEE,CAAC,IAAI,EAAEA,CAAC;AAAA,IACpE;AACI,WAAOF;AAAA,EACR,GAAED,EAAS,MAAM,MAAM,SAAS;AACnC;ACFI,SAASI,EAA6BC,GAAKC,GAAO;AAClD,EAAI,OAAOD,KAAQ,aAAYA,EAAIC,CAAK,IAC/BD,KAAQ,SAA2BA,EAAI,UAAUC;AAC9D;AAII,SAASC,KAA6CC,GAAM;AAC5D,SAAO,CAACC,MAAOD,EAAK;AAAA,IAAQ,CAACH,MAAMD,EAA6BC,GAAKI,CAAI;AAAA,EAC7E;AAEA;ACRqG,MAAMC,IAA0DC,gBAAAA,EAAkB,CAACC,GAAOC,MAAe;AAC1M,QAAM,EAAE,UAAUC,GAAW,GAAGC,EAAW,IAAGH,GACxCI,IAAgBC,EAAgB,QAAQH,CAAQ,GAChDI,IAAYF,EAAc,KAAKG,CAAiC;AACtE,MAAID,GAAW;AAEX,UAAME,IAAaF,EAAU,MAAM,UAC7BG,IAAcL,EAAc,IAAI,CAACM,MAC/BA,MAAUJ,IAGND,EAAgB,MAAMG,CAAU,IAAI,IAAUH,EAAgB,KAAK,IAAI,IACtDM,gBAAAA,EAAsBH,CAAU,IAAIA,EAAW,MAAM,WAAW,OAC3EE,CACjB;AACD,WAAqBE,gBAAAA,EAAqBC,GAAiCC,EAAqC,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vD;AAAA,EACA,WAAAwD;AAAA,EACA,SAAAC;AAAA,EACA,eAAeC;AAAA,EACf,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,GAAG9D;AACL,MAAkB;AAChB,QAAMgD,IAAUe,EAAE;AAAA,IAChBL;AAAA,IACAM,EAAOR,CAAa;AAAA,IACpB;AAAA,MACE,CAACQ,EAAO,GAAGR,CAAa,YAAY,CAAC,GAAGK;AAAA,MACxC,CAACG,EAAO,GAAGR,CAAa,YAAY,CAAC,GAAGM;AAAA,IAAA;AAAA,EAC1C,CACD;AAGC,SAAA,gBAAAG,EAACC,GAAA,EAAgB,WAAWlB,GAAS,eAAaY,GAAY,SAAAD,GAAmB,GAAG3D,GACjF,UAAAE,EACH,CAAA;AAEJ;","x_google_ignoreList":[0,1,2,3,4,5]}
1
+ {"version":3,"file":"label.es.js","sources":["../../../common/temp/node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-slot@1.1.2_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-primitive@2.0.2_@types+react-dom@18.3.5_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../common/temp/node_modules/.pnpm/@radix-ui+react-label@2.1.2_@types+react-dom@18.3.5_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1/node_modules/@radix-ui/react-label/dist/index.mjs","../../../common/temp/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js","../src/label.tsx"],"sourcesContent":["// packages/react/compose-refs/src/composeRefs.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","// packages/react/slot/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 Slot = 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});\nSlot.displayName = \"Slot\";\nvar 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});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n};\nfunction isSlottable(child) {\n return React.isValidElement(child) && child.type === Slottable;\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 childPropValue(...args);\n slotPropValue(...args);\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}\nvar Root = Slot;\nexport {\n Root,\n Slot,\n Slottable\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/primitive/src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Slot } 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 \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((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// packages/react/label/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(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 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(null, 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, 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, { LabelHTMLAttributes, ReactNode } from \"react\";\nimport * as RadixLabel from \"@radix-ui/react-label\";\nimport c from \"classnames\";\n\nimport styles from \"./label.module.scss\";\n\nconst rootClassName = \"purpur-label\";\n\nexport type LabelProps = {\n \"data-testid\"?: string;\n children: ReactNode;\n className?: string;\n htmlFor: string;\n disabled?: boolean;\n negative?: boolean;\n} & LabelHTMLAttributes<HTMLLabelElement>;\n\nexport const Label = ({\n children,\n className,\n htmlFor,\n \"data-testid\": dataTestId,\n disabled,\n negative = false,\n ...props\n}: LabelProps) => {\n const classes = c([\n className,\n styles[rootClassName],\n {\n [styles[`${rootClassName}--disabled`]]: disabled,\n [styles[`${rootClassName}--negative`]]: negative,\n },\n ]);\n\n return (\n <RadixLabel.Root className={classes} data-testid={dataTestId} htmlFor={htmlFor} {...props}>\n {children}\n </RadixLabel.Root>\n );\n};\n"],"names":["setRef","ref","value","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","Slot","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","SlotClone","childrenRef","getElementRef","props2","mergeProps","Slottable","Fragment2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","element","getter","_a","mayWarn","_b","NODES","Primitive","primitive","Node","asChild","primitiveProps","Comp","NAME","Label","event","Root","hasOwn","classNames","classes","arg","appendClass","parseValue","key","newClass","module","rootClassName","className","htmlFor","dataTestId","disabled","negative","c","styles","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,IACb,CAAK;AACD,QAAIF;AACF,aAAO,MAAM;AACX,iBAASG,IAAI,GAAGA,IAAIF,EAAS,QAAQE,KAAK;AACxC,gBAAMD,IAAUD,EAASE,CAAC;AAC1B,UAAI,OAAOD,KAAW,aACpBA,EAAS,IAETR,EAAOI,EAAKK,CAAC,GAAG,IAAI;AAAA,QAEhC;AAAA,MACO;AAAA,EAEJ;AACH;AC5BA,IAAIC,IAAOC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACnD,QAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IAAgBL,EAAM,SAAS,QAAQG,CAAQ,GAC/CG,IAAYD,EAAc,KAAKE,CAAW;AAChD,MAAID,GAAW;AACb,UAAME,IAAaF,EAAU,MAAM,UAC7BG,IAAcJ,EAAc,IAAI,CAACK,MACjCA,MAAUJ,IACRN,EAAM,SAAS,MAAMQ,CAAU,IAAI,IAAUR,EAAM,SAAS,KAAK,IAAI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AYF,GAASI,CAAG;AAIpC,aAAOJ;AAAA;AAGR,aAASE,EAAatD,GAAOyD,GAAU;AACtC,aAAKA,IAIDzD,IACIA,IAAQ,MAAMyD,IAGfzD,IAAQyD,IAPPzD;AAAA;AAUT,IAAqC0D,EAAO,WAC3CP,EAAW,UAAUA,GACrBO,EAAA,UAAiBP,KAOjB,OAAO,aAAaA;AAAA,EAEtB;;;;;;;GCtEMQ,IAAgB,gBAWTZ,IAAQ,CAAC;AAAA,EACpB,UAAAnC;AAAA,EACA,WAAAgD;AAAA,EACA,SAAAC;AAAA,EACA,eAAeC;AAAA,EACf,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,GAAGtD;AACL,MAAkB;AAChB,QAAM0C,IAAUa,EAAE;AAAA,IAChBL;AAAA,IACAM,EAAOP,CAAa;AAAA,IACpB;AAAA,MACE,CAACO,EAAO,GAAGP,CAAa,YAAY,CAAC,GAAGI;AAAA,MACxC,CAACG,EAAO,GAAGP,CAAa,YAAY,CAAC,GAAGK;AAAA,IAAA;AAAA,EAC1C,CACD;AAGC,SAAA,gBAAA5C,EAAC+C,GAAA,EAAgB,WAAWf,GAAS,eAAaU,GAAY,SAAAD,GAAmB,GAAGnD,GACjF,UAAAE,EACH,CAAA;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": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "license": "AGPL-3.0-only",
5
5
  "main": "./dist/label.cjs.js",
6
6
  "types": "./dist/label.d.ts",
@@ -15,10 +15,10 @@
15
15
  },
16
16
  "source": "src/label.tsx",
17
17
  "dependencies": {
18
- "@radix-ui/react-label": "~2.0.2",
18
+ "@radix-ui/react-label": "~2.1.2",
19
19
  "classnames": "~2.5.0",
20
- "@purpurds/icon": "6.0.0",
21
- "@purpurds/tokens": "6.0.0"
20
+ "@purpurds/tokens": "6.0.2",
21
+ "@purpurds/icon": "6.0.2"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@rushstack/eslint-patch": "~1.10.0",