@jamsrui/divider 0.0.2 → 0.0.3
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/divider-config.mjs +1 -1
- package/dist/divider.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/styles.mjs +1 -1
- package/dist/use-divider.mjs +1 -1
- package/package.json +4 -4
- package/dist/chunk-5TIOUT4L.mjs +0 -1
- package/dist/chunk-65AQCZWD.mjs +0 -1
- package/dist/chunk-D6NH2KRI.mjs +0 -1
- package/dist/chunk-HZZZ2FIE.js +0 -1
- package/dist/chunk-NU7HNFTG.mjs +0 -1
- package/dist/chunk-O3EGLMGJ.js +0 -1
- package/dist/chunk-SRJCOHXD.js +0 -1
- package/dist/chunk-ZYIIUDSK.js +0 -1
- package/dist/divider-config.d.ts +0 -15
- package/dist/divider-config.js +0 -1
- package/dist/divider.d.ts +0 -10
- package/dist/divider.js +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -1
- package/dist/styles.d.ts +0 -90
- package/dist/styles.js +0 -1
- package/dist/use-divider.d.ts +0 -20
- package/dist/use-divider.js +0 -1
package/dist/divider-config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createConfigContext as i}from"@jamsrui/utils";const[r,e]=i({displayName:"DividerConfig"});export{r as DividerConfig,e as useDividerConfig};
|
package/dist/divider.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useRenderElement as p}from"@jamsrui/hooks";import{mergeConfigProps as m}from"@jamsrui/utils";import{useDividerConfig as c}from"./divider-config";import{useDivider as v}from"./use-divider";const D=e=>{const r=c(),t=m(r,r,e),n=v(t),{getRootProps:s,getDividerProps:o}=n,{children:i}=e,d=React.createElement(React.Fragment,null,React.createElement("div",{...o({})}),!!i&&React.createElement(React.Fragment,null,i,React.createElement("div",{...o({})})));return p("div",{props:[s({}),{children:d}]})};export{D as Divider};
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{Divider as r}from"./divider";import{DividerConfig as f,useDividerConfig as d}from"./divider-config";export{r as Divider,f as DividerConfig,d as useDividerConfig};
|
package/dist/styles.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,
|
|
1
|
+
import{tv as r}from"@jamsrui/utils";const i="",a=r({slots:{root:"flex items-center gap-2",divider:""},variants:{orientation:{vertical:{root:"flex-col",divider:"h-full w-px"},horizontal:{divider:"h-px w-full"}},variant:{light:{divider:"bg-stroke-secondary"},dark:{divider:"bg-stroke-secondary"},default:{divider:"bg-stroke-primary"},gradient:{divider:"from-transparent via-[#989AA6]/[0.5] to-transparent"}}},compoundVariants:[{orientation:"horizontal",variant:"gradient",className:{divider:"bg-gradient-to-r"}},{orientation:"vertical",variant:"gradient",className:{divider:"bg-gradient-to-b"}}],defaultVariants:{variant:"default",orientation:"horizontal",color:"default"}});export{a as dividerVariants,i as test};
|
package/dist/use-divider.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useCallback as d,useMemo as n}from"react";import{cn as p,dataAttrDev as P,mapPropsVariants as D,mergeProps as N}from"@jamsrui/utils";import{dividerVariants as m}from"./styles";const x=v=>{const[l,c]=D(v,m.variantKeys),r=m(c),{classNames:s,slotProps:e,...o}=l,i=d(()=>({...o,"data-component":P("divider"),"data-slot":"root",className:r.root({className:p(s?.root,o.className)})}),[s?.root,o,r]),t=d(a=>({...N(e?.divider,a),"data-slot":"divider",className:r.divider({className:p(e?.divider?.className,s?.divider,a.className)})}),[s?.divider,e?.divider,r]);return n(()=>({getRootProps:i,getDividerProps:t}),[i,t])};export{x as useDivider};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/divider",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@jamsrui/hooks": "^0.0.
|
|
9
|
-
"@jamsrui/core": "^0.0.
|
|
10
|
-
"@jamsrui/utils": "^0.0.
|
|
8
|
+
"@jamsrui/hooks": "^0.0.3",
|
|
9
|
+
"@jamsrui/core": "^0.0.3",
|
|
10
|
+
"@jamsrui/utils": "^0.0.3"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
package/dist/chunk-5TIOUT4L.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{tv as r}from"@jamsrui/utils";var i="",a=r({slots:{root:"flex items-center gap-2",divider:""},variants:{orientation:{vertical:{root:"flex-col",divider:"h-full w-px"},horizontal:{divider:"h-px w-full"}},variant:{light:{divider:"bg-stroke-secondary"},dark:{divider:"bg-stroke-secondary"},default:{divider:"bg-stroke-primary"},gradient:{divider:"from-transparent via-[#989AA6]/[0.5] to-transparent"}}},compoundVariants:[{orientation:"horizontal",variant:"gradient",className:{divider:"bg-gradient-to-r"}},{orientation:"vertical",variant:"gradient",className:{divider:"bg-gradient-to-b"}}],defaultVariants:{variant:"default",orientation:"horizontal",color:"default"}});export{i as a,a as b};
|
package/dist/chunk-65AQCZWD.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as i}from"./chunk-5TIOUT4L.mjs";import{useCallback as p,useMemo as n}from"react";import{cn as m,dataAttrDev as P,mapPropsVariants as D,mergeProps as N}from"@jamsrui/utils";var x=v=>{let[l,c]=D(v,i.variantKeys),r=i(c),{classNames:s,slotProps:e,...o}=l,t=p(()=>({...o,"data-component":P("divider"),"data-slot":"root",className:r.root({className:m(s?.root,o.className)})}),[s?.root,o,r]),a=p(d=>({...N(e?.divider,d),"data-slot":"divider",className:r.divider({className:m(e?.divider?.className,s?.divider,d.className)})}),[s?.divider,e?.divider,r]);return n(()=>({getRootProps:t,getDividerProps:a}),[t,a])};export{x as a};
|
package/dist/chunk-D6NH2KRI.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as t}from"./chunk-NU7HNFTG.mjs";import{a as n}from"./chunk-65AQCZWD.mjs";import{useRenderElement as c}from"@jamsrui/hooks";import{mergeConfigProps as v}from"@jamsrui/utils";var D=e=>{let r=t(),s=v(r,r,e),d=n(s),{getRootProps:p,getDividerProps:o}=d,{children:i}=e,m=React.createElement(React.Fragment,null,React.createElement("div",{...o({})}),!!i&&React.createElement(React.Fragment,null,i,React.createElement("div",{...o({})})));return c("div",{props:[p({}),{children:m}]})};export{D as a};
|
package/dist/chunk-HZZZ2FIE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utils = require('@jamsrui/utils');var[r,e]=_utils.createConfigContext.call(void 0, {displayName:"DividerConfig"});exports.a = r; exports.b = e;
|
package/dist/chunk-NU7HNFTG.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createConfigContext as i}from"@jamsrui/utils";var[r,e]=i({displayName:"DividerConfig"});export{r as a,e as b};
|
package/dist/chunk-O3EGLMGJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkSRJCOHXDjs = require('./chunk-SRJCOHXD.js');var _react = require('react');var _utils = require('@jamsrui/utils');var x=v=>{let[l,c]=_utils.mapPropsVariants.call(void 0, v,_chunkSRJCOHXDjs.b.variantKeys),r=_chunkSRJCOHXDjs.b.call(void 0, c),{classNames:s,slotProps:e,...o}=l,t=_react.useCallback.call(void 0, ()=>({...o,"data-component":_utils.dataAttrDev.call(void 0, "divider"),"data-slot":"root",className:r.root({className:_utils.cn.call(void 0, _optionalChain([s, 'optionalAccess', _ => _.root]),o.className)})}),[_optionalChain([s, 'optionalAccess', _2 => _2.root]),o,r]),a=_react.useCallback.call(void 0, d=>({..._utils.mergeProps.call(void 0, _optionalChain([e, 'optionalAccess', _3 => _3.divider]),d),"data-slot":"divider",className:r.divider({className:_utils.cn.call(void 0, _optionalChain([e, 'optionalAccess', _4 => _4.divider, 'optionalAccess', _5 => _5.className]),_optionalChain([s, 'optionalAccess', _6 => _6.divider]),d.className)})}),[_optionalChain([s, 'optionalAccess', _7 => _7.divider]),_optionalChain([e, 'optionalAccess', _8 => _8.divider]),r]);return _react.useMemo.call(void 0, ()=>({getRootProps:t,getDividerProps:a}),[t,a])};exports.a = x;
|
package/dist/chunk-SRJCOHXD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utils = require('@jamsrui/utils');var i="",a= exports.b =_utils.tv.call(void 0, {slots:{root:"flex items-center gap-2",divider:""},variants:{orientation:{vertical:{root:"flex-col",divider:"h-full w-px"},horizontal:{divider:"h-px w-full"}},variant:{light:{divider:"bg-stroke-secondary"},dark:{divider:"bg-stroke-secondary"},default:{divider:"bg-stroke-primary"},gradient:{divider:"from-transparent via-[#989AA6]/[0.5] to-transparent"}}},compoundVariants:[{orientation:"horizontal",variant:"gradient",className:{divider:"bg-gradient-to-r"}},{orientation:"vertical",variant:"gradient",className:{divider:"bg-gradient-to-b"}}],defaultVariants:{variant:"default",orientation:"horizontal",color:"default"}});exports.a = i; exports.b = a;
|
package/dist/chunk-ZYIIUDSK.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHZZZ2FIEjs = require('./chunk-HZZZ2FIE.js');var _chunkO3EGLMGJjs = require('./chunk-O3EGLMGJ.js');var _hooks = require('@jamsrui/hooks');var _utils = require('@jamsrui/utils');var D=e=>{let r=_chunkHZZZ2FIEjs.b.call(void 0, ),s=_utils.mergeConfigProps.call(void 0, r,r,e),d=_chunkO3EGLMGJjs.a.call(void 0, s),{getRootProps:p,getDividerProps:o}=d,{children:i}=e,m=React.createElement(React.Fragment,null,React.createElement("div",{...o({})}),!!i&&React.createElement(React.Fragment,null,i,React.createElement("div",{...o({})})));return _hooks.useRenderElement.call(void 0, "div",{props:[p({}),{children:m}]})};exports.a = D;
|
package/dist/divider-config.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Divider } from './divider.js';
|
|
2
|
-
import * as react from 'react';
|
|
3
|
-
import { GlobalConfigProps } from '@jamsrui/core';
|
|
4
|
-
import '@jamsrui/utils';
|
|
5
|
-
|
|
6
|
-
declare const useDividerConfig: () => DividerConfig.Props;
|
|
7
|
-
declare const DividerConfig: (props: DividerConfig.Props & {
|
|
8
|
-
merge?: boolean;
|
|
9
|
-
}) => react.JSX.Element;
|
|
10
|
-
declare namespace DividerConfig {
|
|
11
|
-
interface Props extends Divider.Props, GlobalConfigProps<Divider.Props> {
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { DividerConfig, useDividerConfig };
|
package/dist/divider-config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHZZZ2FIEjs = require('./chunk-HZZZ2FIE.js');exports.DividerConfig = _chunkHZZZ2FIEjs.a; exports.useDividerConfig = _chunkHZZZ2FIEjs.b;
|
package/dist/divider.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { UIProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const Divider: (props: Divider.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
-
declare namespace Divider {
|
|
6
|
-
interface Props extends UIProps<"div"> {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { Divider };
|
package/dist/divider.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZYIIUDSKjs = require('./chunk-ZYIIUDSK.js');require('./chunk-HZZZ2FIE.js');require('./chunk-O3EGLMGJ.js');require('./chunk-SRJCOHXD.js');exports.Divider = _chunkZYIIUDSKjs.a;
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkZYIIUDSKjs = require('./chunk-ZYIIUDSK.js');var _chunkHZZZ2FIEjs = require('./chunk-HZZZ2FIE.js');require('./chunk-O3EGLMGJ.js');require('./chunk-SRJCOHXD.js');exports.Divider = _chunkZYIIUDSKjs.a; exports.DividerConfig = _chunkHZZZ2FIEjs.a; exports.useDividerConfig = _chunkHZZZ2FIEjs.b;
|
package/dist/styles.d.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
-
import { VariantProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const test = "";
|
|
5
|
-
declare const dividerVariants: tailwind_variants.TVReturnType<{
|
|
6
|
-
orientation: {
|
|
7
|
-
vertical: {
|
|
8
|
-
root: string;
|
|
9
|
-
divider: string;
|
|
10
|
-
};
|
|
11
|
-
horizontal: {
|
|
12
|
-
divider: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
variant: {
|
|
16
|
-
light: {
|
|
17
|
-
divider: string;
|
|
18
|
-
};
|
|
19
|
-
dark: {
|
|
20
|
-
divider: string;
|
|
21
|
-
};
|
|
22
|
-
default: {
|
|
23
|
-
divider: string;
|
|
24
|
-
};
|
|
25
|
-
gradient: {
|
|
26
|
-
divider: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
}, {
|
|
30
|
-
root: string;
|
|
31
|
-
divider: string;
|
|
32
|
-
}, undefined, {
|
|
33
|
-
orientation: {
|
|
34
|
-
vertical: {
|
|
35
|
-
root: string;
|
|
36
|
-
divider: string;
|
|
37
|
-
};
|
|
38
|
-
horizontal: {
|
|
39
|
-
divider: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
variant: {
|
|
43
|
-
light: {
|
|
44
|
-
divider: string;
|
|
45
|
-
};
|
|
46
|
-
dark: {
|
|
47
|
-
divider: string;
|
|
48
|
-
};
|
|
49
|
-
default: {
|
|
50
|
-
divider: string;
|
|
51
|
-
};
|
|
52
|
-
gradient: {
|
|
53
|
-
divider: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
}, {
|
|
57
|
-
root: string;
|
|
58
|
-
divider: string;
|
|
59
|
-
}, tailwind_variants.TVReturnType<{
|
|
60
|
-
orientation: {
|
|
61
|
-
vertical: {
|
|
62
|
-
root: string;
|
|
63
|
-
divider: string;
|
|
64
|
-
};
|
|
65
|
-
horizontal: {
|
|
66
|
-
divider: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
variant: {
|
|
70
|
-
light: {
|
|
71
|
-
divider: string;
|
|
72
|
-
};
|
|
73
|
-
dark: {
|
|
74
|
-
divider: string;
|
|
75
|
-
};
|
|
76
|
-
default: {
|
|
77
|
-
divider: string;
|
|
78
|
-
};
|
|
79
|
-
gradient: {
|
|
80
|
-
divider: string;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
}, {
|
|
84
|
-
root: string;
|
|
85
|
-
divider: string;
|
|
86
|
-
}, undefined, unknown, unknown, undefined>>;
|
|
87
|
-
type DividerVariants = VariantProps<typeof dividerVariants>;
|
|
88
|
-
type DividerSlots = keyof ReturnType<typeof dividerVariants>;
|
|
89
|
-
|
|
90
|
-
export { type DividerSlots, type DividerVariants, dividerVariants, test };
|
package/dist/styles.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSRJCOHXDjs = require('./chunk-SRJCOHXD.js');exports.dividerVariants = _chunkSRJCOHXDjs.b; exports.test = _chunkSRJCOHXDjs.a;
|
package/dist/use-divider.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { PropGetter, UIProps, SlotsToClassNames } from '@jamsrui/utils';
|
|
2
|
-
import { Divider } from './divider.js';
|
|
3
|
-
import { DividerVariants, DividerSlots } from './styles.js';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'tailwind-variants';
|
|
6
|
-
|
|
7
|
-
declare const useDivider: (props: useDivider.Props) => {
|
|
8
|
-
getRootProps: PropGetter<Divider.Props>;
|
|
9
|
-
getDividerProps: PropGetter<Divider.Props>;
|
|
10
|
-
};
|
|
11
|
-
declare namespace useDivider {
|
|
12
|
-
interface Props extends UIProps<"div">, DividerVariants {
|
|
13
|
-
classNames?: SlotsToClassNames<DividerSlots>;
|
|
14
|
-
slotProps?: {
|
|
15
|
-
divider?: UIProps<"div">;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { useDivider };
|
package/dist/use-divider.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkO3EGLMGJjs = require('./chunk-O3EGLMGJ.js');require('./chunk-SRJCOHXD.js');exports.useDivider = _chunkO3EGLMGJjs.a;
|