@jamsrui/label 0.0.4 → 0.0.5

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{a as e}from"./chunk-T44OHNJJ.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var p=r=>{let o=e(r);return t("label",{props:[o]})};export{p as a};
@@ -0,0 +1 @@
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};
package/dist/index.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  export { Label } from './label.mjs';
2
- import 'react/jsx-runtime';
2
+ import 'react';
3
3
  import './use-label.mjs';
4
4
  import '@jamsrui/utils';
5
- import 'react';
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- "use client";import{a as e}from"./chunk-C6QF2KUR.mjs";import"./chunk-MTITZOBM.mjs";export{e as Label};
1
+ "use client";import{a as e}from"./chunk-T2XOKW2S.mjs";import"./chunk-T44OHNJJ.mjs";export{e as Label};
package/dist/label.d.mts CHANGED
@@ -1,9 +1,8 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
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) => react_jsx_runtime.JSX.Element;
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-C6QF2KUR.mjs";import"./chunk-MTITZOBM.mjs";export{a as Label};
1
+ import{a}from"./chunk-T2XOKW2S.mjs";import"./chunk-T44OHNJJ.mjs";export{a as Label};
@@ -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 ComponentProps<"label"> {
5
+ interface ReturnType extends UIProps<"label"> {
7
6
  }
8
7
  interface Props extends UIProps<"label"> {
9
8
  }
@@ -1 +1 @@
1
- import{a}from"./chunk-MTITZOBM.mjs";export{a as useLabel};
1
+ import{a}from"./chunk-T44OHNJJ.mjs";export{a as useLabel};
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@jamsrui/label",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "peerDependencies": {
5
5
  "react": ">=19"
6
6
  },
7
7
  "dependencies": {
8
- "@jamsrui/utils": "^0.0.11"
8
+ "@jamsrui/utils": "^0.0.12",
9
+ "@jamsrui/hooks": "^0.0.12"
9
10
  },
10
11
  "exports": {
11
12
  ".": {
@@ -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};
@@ -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};