@jamsrui/label 0.0.4 → 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.
- package/dist/chunk-7BWQSTKU.mjs +1 -0
- package/dist/chunk-ASONIKEB.mjs +1 -0
- package/dist/index.d.mts +1 -2
- package/dist/index.mjs +1 -1
- package/dist/label.d.mts +2 -3
- package/dist/label.mjs +1 -1
- package/dist/use-label.d.mts +1 -2
- package/dist/use-label.mjs +1 -1
- package/package.json +4 -2
- package/dist/chunk-C6QF2KUR.mjs +0 -1
- package/dist/chunk-MTITZOBM.mjs +0 -1
|
@@ -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};
|
|
@@ -0,0 +1 @@
|
|
|
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.d.mts
CHANGED
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.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { useLabel } from './use-label.mjs';
|
|
3
3
|
import '@jamsrui/utils';
|
|
4
|
-
import 'react';
|
|
5
4
|
|
|
6
|
-
declare const Label: (props: Label.Props) =>
|
|
5
|
+
declare const Label: (props: Label.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
7
6
|
declare namespace Label {
|
|
8
7
|
interface Props extends useLabel.Props {
|
|
9
8
|
}
|
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.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { UIProps } from '@jamsrui/utils';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
2
|
|
|
4
3
|
declare const useLabel: (props: useLabel.Props) => useLabel.ReturnType;
|
|
5
4
|
declare namespace useLabel {
|
|
6
|
-
interface ReturnType extends
|
|
5
|
+
interface ReturnType extends UIProps<"label"> {
|
|
7
6
|
}
|
|
8
7
|
interface Props extends UIProps<"label"> {
|
|
9
8
|
}
|
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,11 +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/
|
|
8
|
+
"@jamsrui/context": "^0.0.2",
|
|
9
|
+
"@jamsrui/utils": "^0.0.13",
|
|
10
|
+
"@jamsrui/hooks": "^0.0.13"
|
|
9
11
|
},
|
|
10
12
|
"exports": {
|
|
11
13
|
".": {
|
package/dist/chunk-C6QF2KUR.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-MTITZOBM.mjs";import{jsx as a}from"react/jsx-runtime";var s=l=>{let{children:o,...r}=e(l);return a("label",{...r,children:o})};export{s as a};
|
package/dist/chunk-MTITZOBM.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useCallback as s}from"react";var l=o=>{let{onMouseDown:t,...r}=o;return{onMouseDown:s(e=>{e.target.closest("input, button, textarea, select")||(t?.(e),e.detail>1&&e.preventDefault())},[t]),...r}};export{l as a};
|