@jamsrui/label 0.0.5 → 0.0.6
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useCallback as p}from"react";import{useFieldA11yContext as m}from"@jamsrui/context";import{useMergeRefs as f}from"@jamsrui/hooks";import{cn as i}from"@jamsrui/utils";var L=o=>{let{onMouseDown:t,className:s,ref:a,...l}=o,r=m(),n=f([a,r?.setLabelRef]),u=p(e=>{e.target.closest("input, button, textarea, select")||(t?.(e),document.activeElement?.nodeName==="INPUT"&&e.preventDefault(),e.detail>1&&e.preventDefault())},[t]);return{ref:n,onMouseDown:u,className:i("label cursor-default shrink-0 text-sm font-normal text-foreground group-data-invalid:text-danger group-data-disabled:cursor-not-allowed",s),...r?.getLabelProps(),...l}};export{L as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-7BWQSTKU.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var p=r=>{let o=e(r);return t("label",{props:[o]})};export{p as a};
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{a as e}from"./chunk-
|
|
1
|
+
"use client";import{a as e}from"./chunk-ASONIKEB.mjs";import"./chunk-7BWQSTKU.mjs";export{e as Label};
|
package/dist/label.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-ASONIKEB.mjs";import"./chunk-7BWQSTKU.mjs";export{a as Label};
|
package/dist/use-label.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-7BWQSTKU.mjs";export{a as useLabel};
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/label",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@jamsrui/
|
|
9
|
-
"@jamsrui/
|
|
8
|
+
"@jamsrui/context": "^0.0.2",
|
|
9
|
+
"@jamsrui/utils": "^0.0.13",
|
|
10
|
+
"@jamsrui/hooks": "^0.0.13"
|
|
10
11
|
},
|
|
11
12
|
"exports": {
|
|
12
13
|
".": {
|
package/dist/chunk-T44OHNJJ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useCallback as a}from"react";import{cn as n}from"@jamsrui/utils";var m=o=>{let{onMouseDown:t,className:r,...s}=o;return{onMouseDown:a(e=>{e.target.closest("input, button, textarea, select")||(t?.(e),document.activeElement?.nodeName==="INPUT"&&e.preventDefault(),e.detail>1&&e.preventDefault())},[t]),className:n("label cursor-default shrink-0 text-sm font-normal text-foreground",r),...s}};export{m as a};
|