@jamsrui/time-field 0.0.23 → 0.1.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/README.md +1 -3
- package/dist/index.d.mts +11 -4
- package/dist/index.mjs +1 -1
- package/dist/time-field.mjs +1 -1
- package/dist/use-time-field.mjs +1 -1
- package/package.json +5 -5
- package/dist/styles.d.mts +0 -20
- package/dist/styles.mjs +0 -1
- package/dist/time-field-config.d.mts +0 -21
- package/dist/time-field-config.mjs +0 -1
package/README.md
CHANGED
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
**A comprehensive React UI component library designed for developers, with Tailwind CSS integration for seamless styling.**
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
## 📖 **Overview**
|
|
7
6
|
|
|
8
7
|
[JamsrUI](https://jamsr-ui.jamsrworld.com) is designed to help developers build modern, fast and visually appealing web applications with ease.
|
|
9
8
|
|
|
10
|
-
## 🚀 Getting Started
|
|
9
|
+
## 🚀 Getting Started
|
|
11
10
|
|
|
12
11
|
Boost & Build your websites using [JamsrUI](https://jamsr-ui.jamsrworld.com).
|
|
13
12
|
|
|
@@ -37,4 +36,3 @@ We welcome contributions from developers of all skill levels!
|
|
|
37
36
|
## ⭐ Support the Project
|
|
38
37
|
|
|
39
38
|
If you find **JamsrUI** helpful, consider giving it a ⭐ on [GitHub](https://github.com/jamsrworld/jamsr-ui).
|
|
40
|
-
|
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { TimeField as TimeField$1 } from './time-field.mjs';
|
|
4
|
-
export { TimeFieldConfig, useTimeFieldConfig } from './time-field-config.mjs';
|
|
5
4
|
import { TimeFieldSeparator } from './time-field-separator.mjs';
|
|
6
5
|
import { TimeInput } from './time-input.mjs';
|
|
7
6
|
import { TimeSegment } from './time-segment.mjs';
|
|
8
|
-
export { TimeFieldSlots, TimeFieldVariants, timeFieldVariants } from './styles.mjs';
|
|
9
7
|
export { useTimeField } from './use-time-field.mjs';
|
|
10
8
|
export { useTimeSegment } from './use-time-segment.mjs';
|
|
11
|
-
import '@jamsrui/core';
|
|
12
9
|
import '@jamsrui/utils';
|
|
13
10
|
import './time-field-root.mjs';
|
|
14
11
|
|
|
@@ -17,5 +14,15 @@ declare const TimeField: ((props: TimeField$1.Props) => react_jsx_runtime.JSX.El
|
|
|
17
14
|
Segment: (props: TimeSegment.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
18
15
|
Separator: (props: TimeFieldSeparator.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
19
16
|
};
|
|
17
|
+
declare namespace TimeField {
|
|
18
|
+
interface Props extends TimeField$1.Props {
|
|
19
|
+
}
|
|
20
|
+
interface Input extends TimeInput.Props {
|
|
21
|
+
}
|
|
22
|
+
interface Segment extends TimeSegment.Props {
|
|
23
|
+
}
|
|
24
|
+
interface Separator extends TimeFieldSeparator.Props {
|
|
25
|
+
}
|
|
26
|
+
}
|
|
20
27
|
|
|
21
|
-
export { TimeField
|
|
28
|
+
export { TimeField };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{TimeField as e}from"./time-field.mjs";import{
|
|
1
|
+
import{TimeField as e}from"./time-field.mjs";import{TimeFieldSeparator as t}from"./time-field-separator.mjs";import{TimeInput as r}from"./time-input.mjs";import{TimeSegment as o}from"./time-segment.mjs";import{useTimeField as i}from"./use-time-field.mjs";import{useTimeSegment as m}from"./use-time-segment.mjs";const x=Object.assign(e,{Input:r,Segment:o,Separator:t});export{x as TimeField,i as useTimeField,m as useTimeSegment};
|
package/dist/time-field.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as o}from"react/jsx-runtime";import{
|
|
1
|
+
"use client";import{jsx as o}from"react/jsx-runtime";import{TimeFieldContext as m}from"./time-field-context.mjs";import{useTimeField as s}from"./use-time-field.mjs";const d=t=>{const e=s(t),{Component:i,getRootProps:n,children:r}=e;return o(m,{value:e,children:o(i,{...n({}),children:r})})};export{d as TimeField};
|
package/dist/use-time-field.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{useCallback as
|
|
1
|
+
"use client";import{useCallback as t,useRef as l,useState as o}from"react";import{TimeFieldRoot as a}from"./time-field-root.mjs";const f=u=>{const[r,c]=o({hour:"",minute:"",second:"",period:""}),[n,s]=o("hour"),d=l([]),[g,S]=o(null),i=t(e=>({...e,"data-component":"time-field","data-slot":"root"}),[]),m=t(e=>({...e,contentEditable:!0,suppressContentEditableWarning:!0,"data-slot":"input",inputMode:"numeric",spellCheck:!1}),[]),p=t(e=>({...e,"data-slot":"separator"}),[]);return{Component:a,segments:r,activeSegment:n,getRootProps:i,getInputProps:m,getSeparatorProps:p,setActiveSegment:s,segmentList:["hour","minute","period"],children:null}};export{f as useTimeField};
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/time-field",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@jamsrui/hooks": "^0.0
|
|
9
|
-
"@jamsrui/utils": "^0.0
|
|
10
|
-
"@jamsrui/core": "^0.0
|
|
11
|
-
"@jamsrui/input": "^0.0
|
|
8
|
+
"@jamsrui/hooks": "^0.1.0",
|
|
9
|
+
"@jamsrui/utils": "^0.1.0",
|
|
10
|
+
"@jamsrui/core": "^0.1.0",
|
|
11
|
+
"@jamsrui/input": "^0.1.0"
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
package/dist/styles.d.mts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as _jamsrui_utils from '@jamsrui/utils';
|
|
2
|
-
import { VariantProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const timeFieldVariants: _jamsrui_utils.TVReturnType<{}, {
|
|
5
|
-
root: string;
|
|
6
|
-
input: string;
|
|
7
|
-
separator: string;
|
|
8
|
-
}, undefined, {}, {
|
|
9
|
-
root: string;
|
|
10
|
-
input: string;
|
|
11
|
-
separator: string;
|
|
12
|
-
}, _jamsrui_utils.TVReturnType<{}, {
|
|
13
|
-
root: string;
|
|
14
|
-
input: string;
|
|
15
|
-
separator: string;
|
|
16
|
-
}, undefined, unknown, unknown, undefined>>;
|
|
17
|
-
type TimeFieldVariants = VariantProps<typeof timeFieldVariants>;
|
|
18
|
-
type TimeFieldSlots = keyof ReturnType<typeof timeFieldVariants>;
|
|
19
|
-
|
|
20
|
-
export { type TimeFieldSlots, type TimeFieldVariants, timeFieldVariants };
|
package/dist/styles.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{tv as t}from"@jamsrui/utils";const r=t({slots:{root:"flex gap-1 items-center",input:"focus:bg-default px-0.5 caret-transparent outline-none rounded text-sm",separator:"opacity-50"},variants:{},defaultVariants:{}});export{r as timeFieldVariants};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { WithGlobalConfig } from '@jamsrui/core';
|
|
3
|
-
import { TimeField } from './time-field.mjs';
|
|
4
|
-
import './use-time-field.mjs';
|
|
5
|
-
import 'react';
|
|
6
|
-
import '@jamsrui/utils';
|
|
7
|
-
import './time-segment.mjs';
|
|
8
|
-
import './time-field-separator.mjs';
|
|
9
|
-
import './time-field-root.mjs';
|
|
10
|
-
|
|
11
|
-
declare const useTimeFieldConfig: () => TimeFieldConfig.Props;
|
|
12
|
-
declare const TimeFieldConfig: (props: Omit<Partial<TimeFieldConfig.Props>, "children"> & {
|
|
13
|
-
merge?: boolean;
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
16
|
-
declare namespace TimeFieldConfig {
|
|
17
|
-
interface Props extends WithGlobalConfig<TimeField.Props> {
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { TimeFieldConfig, useTimeFieldConfig };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{createConfigContext as e}from"@jamsrui/utils";const[o,t]=e({displayName:"TimeFieldConfig"});export{o as TimeFieldConfig,t as useTimeFieldConfig};
|