@jamsrui/chip 0.0.12 → 0.0.13
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/chip-BOENO6Cd.d.mts +22 -0
- package/dist/chip-config.d.mts +3 -4
- package/dist/chip-config.mjs +1 -1
- package/dist/chip-context.d.mts +2 -3
- package/dist/chip-context.mjs +1 -1
- package/dist/chip-dot.mjs +1 -1
- package/dist/chip-root.d.mts +10 -0
- package/dist/chip-root.mjs +1 -0
- package/dist/chip.d.mts +3 -4
- package/dist/chip.mjs +1 -1
- package/dist/chunk-7NQ6C5LT.mjs +1 -0
- package/dist/chunk-DXTF5673.mjs +1 -0
- package/dist/chunk-EFHLADKU.mjs +1 -0
- package/dist/chunk-KENGK7EJ.mjs +1 -0
- package/dist/chunk-OS4PFH3W.mjs +1 -0
- package/dist/chunk-ULYEI3XZ.mjs +1 -0
- package/dist/chunk-XUDYJN3S.mjs +1 -0
- package/dist/index.d.mts +18 -6
- package/dist/index.mjs +1 -1
- package/dist/styles.d.mts +18 -36
- package/dist/styles.mjs +1 -1
- package/dist/use-chip.d.mts +3 -4
- package/dist/use-chip.mjs +1 -1
- package/package.json +5 -5
- package/dist/chip-DRTSt1tP.d.mts +0 -39
- package/dist/chip-close-button.d.mts +0 -10
- package/dist/chip-close-button.mjs +0 -1
- package/dist/chip-content.d.mts +0 -10
- package/dist/chip-content.mjs +0 -1
- package/dist/chunk-4H2Z2ASN.mjs +0 -1
- package/dist/chunk-74QYMEQ2.mjs +0 -1
- package/dist/chunk-7QJFLK5W.mjs +0 -1
- package/dist/chunk-CB3KJFCA.mjs +0 -1
- package/dist/chunk-KP46X2A7.mjs +0 -1
- package/dist/chunk-M24Y5IQ2.mjs +0 -1
- package/dist/chunk-TE6RQZ6F.mjs +0 -1
- package/dist/chunk-TQ2CHG5Q.mjs +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { PropGetter } from '@jamsrui/utils';
|
|
3
|
+
import { ChipDot } from './chip-dot.mjs';
|
|
4
|
+
import { ChipRoot } from './chip-root.mjs';
|
|
5
|
+
import { ChipVariantsProps } from './styles.mjs';
|
|
6
|
+
|
|
7
|
+
declare const useChip: (props: useChip.Props) => {
|
|
8
|
+
getRootProps: PropGetter<Chip.Props>;
|
|
9
|
+
getDotProps: PropGetter<ChipDot.Props>;
|
|
10
|
+
};
|
|
11
|
+
declare namespace useChip {
|
|
12
|
+
interface Props extends ChipRoot.Props, ChipVariantsProps {
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const Chip: (props: Chip.Props) => react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare namespace Chip {
|
|
18
|
+
interface Props extends useChip.Props {
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { Chip as C, useChip as u };
|
package/dist/chip-config.d.mts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { C as Chip } from './chip-DRTSt1tP.mjs';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import { GlobalConfigProps } from '@jamsrui/core';
|
|
4
|
-
import '
|
|
3
|
+
import { C as Chip } from './chip-BOENO6Cd.mjs';
|
|
5
4
|
import '@jamsrui/utils';
|
|
6
|
-
import './chip-close-button.mjs';
|
|
7
|
-
import './chip-content.mjs';
|
|
8
5
|
import './chip-dot.mjs';
|
|
6
|
+
import 'react';
|
|
7
|
+
import './chip-root.mjs';
|
|
9
8
|
import './styles.mjs';
|
|
10
9
|
|
|
11
10
|
declare const useChipConfig: () => ChipConfig.Props;
|
package/dist/chip-config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
"use client";import{a,b}from"./chunk-DXTF5673.mjs";export{a as ChipConfig,b as useChipConfig};
|
package/dist/chip-context.d.mts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { u as useChip } from './chip-
|
|
2
|
+
import { u as useChip } from './chip-BOENO6Cd.mjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import '@jamsrui/utils';
|
|
5
|
-
import './chip-close-button.mjs';
|
|
6
|
-
import './chip-content.mjs';
|
|
7
5
|
import './chip-dot.mjs';
|
|
6
|
+
import './chip-root.mjs';
|
|
8
7
|
import './styles.mjs';
|
|
9
8
|
|
|
10
9
|
declare const useChipContext: () => ChipContext.Props;
|
package/dist/chip-context.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-
|
|
1
|
+
"use client";import{a,b}from"./chunk-7NQ6C5LT.mjs";export{a as ChipContext,b as useChipContext};
|
package/dist/chip-dot.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
"use client";import{a}from"./chunk-ULYEI3XZ.mjs";import"./chunk-7NQ6C5LT.mjs";export{a as ChipDot};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { UIProps } from '@jamsrui/utils';
|
|
3
|
+
|
|
4
|
+
declare const ChipRoot: (props: ChipRoot.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
+
declare namespace ChipRoot {
|
|
6
|
+
interface Props extends UIProps<"div"> {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { ChipRoot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-OS4PFH3W.mjs";import"./chunk-7NQ6C5LT.mjs";export{a as ChipRoot};
|
package/dist/chip.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
|
-
export { C as Chip } from './chip-
|
|
3
|
-
import 'react';
|
|
2
|
+
export { C as Chip } from './chip-BOENO6Cd.mjs';
|
|
4
3
|
import '@jamsrui/utils';
|
|
5
|
-
import './chip-close-button.mjs';
|
|
6
|
-
import './chip-content.mjs';
|
|
7
4
|
import './chip-dot.mjs';
|
|
5
|
+
import 'react';
|
|
6
|
+
import './chip-root.mjs';
|
|
8
7
|
import './styles.mjs';
|
package/dist/chip.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
"use client";import{a}from"./chunk-KENGK7EJ.mjs";import"./chunk-DXTF5673.mjs";import"./chunk-OS4PFH3W.mjs";import"./chunk-7NQ6C5LT.mjs";import"./chunk-EFHLADKU.mjs";import"./chunk-XUDYJN3S.mjs";export{a as Chip};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as t,use as o}from"react";var p=t(null),r=()=>{let e=o(p);if(!e)throw new Error("useChipContext must be used within a ChipContext");return e};export{p as a,r as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createConfigContext as o}from"@jamsrui/utils";var[i,e]=o({displayName:"ChipConfig"});export{i as a,e as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-XUDYJN3S.mjs";import{useCallback as i,useMemo as h}from"react";import{dataAttrDev as p,mapPropsVariants as P}from"@jamsrui/utils";var d=m=>{let[c,n]=P(m,r.variantKeys),{...o}=c,t=r(n),s=i(()=>({"data-slot":p("root"),"data-component":p("chip"),...o,className:t.root({className:o.className})}),[o,t]),e=i(a=>({...a,"data-slot":p("dot"),className:t.dot({className:a.className})}),[t]);return h(()=>({getRootProps:s,getDotProps:e}),[e,s])};export{d as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-DXTF5673.mjs";import{a as t}from"./chunk-OS4PFH3W.mjs";import{a as r}from"./chunk-7NQ6C5LT.mjs";import{a as i}from"./chunk-EFHLADKU.mjs";import{mergeConfigProps as m}from"@jamsrui/utils";import{jsx as n}from"react/jsx-runtime";var u=o=>{let p=e(),C=m(p,p,o),s=i(C);return n(r,{value:s,children:n(t,{children:o.children})})};export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-7NQ6C5LT.mjs";import{useRenderElement as t}from"@jamsrui/hooks";var i=o=>{let{getRootProps:r}=e();return t("div",{props:[r(o)]})};export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e}from"./chunk-7NQ6C5LT.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var i=t=>{let{getDotProps:r}=e();return o("div",{props:[r(t)]})};export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{allColors as e,colorVariants as t,radiusVariant as a,tv as s}from"@jamsrui/utils";var i=s({slots:{root:"chip chip__root relative box-border inline-flex min-w-min max-w-fit shrink-0 items-center justify-between whitespace-nowrap rounded-full gap-2",dot:"chip__dot size-1.5 rounded-full"},variants:{variant:{solid:{root:"chip--solid"},bordered:{root:"chip--bordered border"},flat:{root:"chip--flat"},dot:{dot:"chip--dot outline-2"}},size:{sm:{root:"chip--xs h-5 px-1 text-xs"},md:{root:"chip--sm h-6 px-2 text-xs"},lg:{root:"chip--md h-7 px-3 text-sm"}},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},isSquare:{true:{root:"chip--squared flex aspect-square items-center justify-center"}},isBordered:{true:{root:"chip--bordered border"}},radius:a("root","chip")},compoundVariants:[...["solid","bordered","flat"].flatMap(r=>e.map(o=>({variant:r,color:o,className:{root:t[r][o]}}))),...e.map(r=>({variant:"dot",color:r,className:{dot:t.solid[r]}})),{variant:"dot",color:"primary",className:{dot:"outline-primary-border"}},{variant:"dot",color:"secondary",className:{dot:"outline-secondary-border"}},{variant:"dot",color:"success",className:{dot:"outline-success-border"}},{variant:"dot",color:"warning",className:{dot:"outline-warning-border"}},{variant:"dot",color:"danger",className:{dot:"outline-danger-border"}},{variant:"dot",color:"default",className:{dot:"outline-default-border"}},{isBordered:!0,color:"danger",className:{root:"border-danger"}},{isBordered:!0,color:"primary",className:{root:"border-primary"}},{isBordered:!0,color:"secondary",className:{root:"border-secondary"}},{isBordered:!0,color:"success",className:{root:"border-success"}},{isBordered:!0,color:"warning",className:{root:"border-warning"}},{isBordered:!0,color:"default",className:{root:"border-divider"}}],defaultVariants:{color:"default",size:"md",radius:"full",variant:"solid"}});export{i as a};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { C as Chip$1 } from './chip-BOENO6Cd.mjs';
|
|
4
|
+
import { ChipDot } from './chip-dot.mjs';
|
|
2
5
|
export { ChipConfig, useChipConfig } from './chip-config.mjs';
|
|
3
|
-
import 'react/jsx-runtime';
|
|
4
|
-
import 'react';
|
|
5
6
|
import '@jamsrui/utils';
|
|
6
|
-
import './chip-
|
|
7
|
-
import './chip-content.mjs';
|
|
8
|
-
import './chip-dot.mjs';
|
|
7
|
+
import './chip-root.mjs';
|
|
9
8
|
import './styles.mjs';
|
|
10
9
|
import '@jamsrui/core';
|
|
10
|
+
|
|
11
|
+
declare const Chip: ((props: Chip$1.Props) => react_jsx_runtime.JSX.Element) & {
|
|
12
|
+
Root: (props: Chip$1.Props) => react_jsx_runtime.JSX.Element;
|
|
13
|
+
Dot: (props: ChipDot.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
14
|
+
};
|
|
15
|
+
declare namespace Chip {
|
|
16
|
+
interface Props extends Chip$1.Props {
|
|
17
|
+
}
|
|
18
|
+
interface Dot extends ChipDot.Props {
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { Chip };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{a as p}from"./chunk-ULYEI3XZ.mjs";import{a as o}from"./chunk-KENGK7EJ.mjs";import{a as t,b as e}from"./chunk-DXTF5673.mjs";import"./chunk-OS4PFH3W.mjs";import"./chunk-7NQ6C5LT.mjs";import"./chunk-EFHLADKU.mjs";import"./chunk-XUDYJN3S.mjs";var s=Object.assign(o,{Root:o,Dot:p});export{s as Chip,t as ChipConfig,e as useChipConfig};
|
package/dist/styles.d.mts
CHANGED
|
@@ -3,31 +3,28 @@ import { VariantProps } from '@jamsrui/utils';
|
|
|
3
3
|
|
|
4
4
|
declare const chipVariants: _jamsrui_utils.TVReturnType<{
|
|
5
5
|
variant: {
|
|
6
|
-
solid: {
|
|
6
|
+
solid: {
|
|
7
|
+
root: string;
|
|
8
|
+
};
|
|
7
9
|
bordered: {
|
|
8
10
|
root: string;
|
|
9
11
|
};
|
|
10
|
-
flat: {
|
|
12
|
+
flat: {
|
|
13
|
+
root: string;
|
|
14
|
+
};
|
|
11
15
|
dot: {
|
|
12
16
|
dot: string;
|
|
13
17
|
};
|
|
14
18
|
};
|
|
15
19
|
size: {
|
|
16
|
-
xs: {
|
|
17
|
-
root: string;
|
|
18
|
-
content: string;
|
|
19
|
-
};
|
|
20
20
|
sm: {
|
|
21
21
|
root: string;
|
|
22
|
-
content: string;
|
|
23
22
|
};
|
|
24
23
|
md: {
|
|
25
24
|
root: string;
|
|
26
|
-
content: string;
|
|
27
25
|
};
|
|
28
26
|
lg: {
|
|
29
27
|
root: string;
|
|
30
|
-
content: string;
|
|
31
28
|
};
|
|
32
29
|
};
|
|
33
30
|
color: {
|
|
@@ -41,7 +38,6 @@ declare const chipVariants: _jamsrui_utils.TVReturnType<{
|
|
|
41
38
|
isSquare: {
|
|
42
39
|
true: {
|
|
43
40
|
root: string;
|
|
44
|
-
content: string;
|
|
45
41
|
};
|
|
46
42
|
};
|
|
47
43
|
isBordered: {
|
|
@@ -61,36 +57,31 @@ declare const chipVariants: _jamsrui_utils.TVReturnType<{
|
|
|
61
57
|
};
|
|
62
58
|
}, {
|
|
63
59
|
root: string;
|
|
64
|
-
content: string;
|
|
65
|
-
closeButton: string;
|
|
66
60
|
dot: string;
|
|
67
61
|
}, undefined, {
|
|
68
62
|
variant: {
|
|
69
|
-
solid: {
|
|
63
|
+
solid: {
|
|
64
|
+
root: string;
|
|
65
|
+
};
|
|
70
66
|
bordered: {
|
|
71
67
|
root: string;
|
|
72
68
|
};
|
|
73
|
-
flat: {
|
|
69
|
+
flat: {
|
|
70
|
+
root: string;
|
|
71
|
+
};
|
|
74
72
|
dot: {
|
|
75
73
|
dot: string;
|
|
76
74
|
};
|
|
77
75
|
};
|
|
78
76
|
size: {
|
|
79
|
-
xs: {
|
|
80
|
-
root: string;
|
|
81
|
-
content: string;
|
|
82
|
-
};
|
|
83
77
|
sm: {
|
|
84
78
|
root: string;
|
|
85
|
-
content: string;
|
|
86
79
|
};
|
|
87
80
|
md: {
|
|
88
81
|
root: string;
|
|
89
|
-
content: string;
|
|
90
82
|
};
|
|
91
83
|
lg: {
|
|
92
84
|
root: string;
|
|
93
|
-
content: string;
|
|
94
85
|
};
|
|
95
86
|
};
|
|
96
87
|
color: {
|
|
@@ -104,7 +95,6 @@ declare const chipVariants: _jamsrui_utils.TVReturnType<{
|
|
|
104
95
|
isSquare: {
|
|
105
96
|
true: {
|
|
106
97
|
root: string;
|
|
107
|
-
content: string;
|
|
108
98
|
};
|
|
109
99
|
};
|
|
110
100
|
isBordered: {
|
|
@@ -124,36 +114,31 @@ declare const chipVariants: _jamsrui_utils.TVReturnType<{
|
|
|
124
114
|
};
|
|
125
115
|
}, {
|
|
126
116
|
root: string;
|
|
127
|
-
content: string;
|
|
128
|
-
closeButton: string;
|
|
129
117
|
dot: string;
|
|
130
118
|
}, _jamsrui_utils.TVReturnType<{
|
|
131
119
|
variant: {
|
|
132
|
-
solid: {
|
|
120
|
+
solid: {
|
|
121
|
+
root: string;
|
|
122
|
+
};
|
|
133
123
|
bordered: {
|
|
134
124
|
root: string;
|
|
135
125
|
};
|
|
136
|
-
flat: {
|
|
126
|
+
flat: {
|
|
127
|
+
root: string;
|
|
128
|
+
};
|
|
137
129
|
dot: {
|
|
138
130
|
dot: string;
|
|
139
131
|
};
|
|
140
132
|
};
|
|
141
133
|
size: {
|
|
142
|
-
xs: {
|
|
143
|
-
root: string;
|
|
144
|
-
content: string;
|
|
145
|
-
};
|
|
146
134
|
sm: {
|
|
147
135
|
root: string;
|
|
148
|
-
content: string;
|
|
149
136
|
};
|
|
150
137
|
md: {
|
|
151
138
|
root: string;
|
|
152
|
-
content: string;
|
|
153
139
|
};
|
|
154
140
|
lg: {
|
|
155
141
|
root: string;
|
|
156
|
-
content: string;
|
|
157
142
|
};
|
|
158
143
|
};
|
|
159
144
|
color: {
|
|
@@ -167,7 +152,6 @@ declare const chipVariants: _jamsrui_utils.TVReturnType<{
|
|
|
167
152
|
isSquare: {
|
|
168
153
|
true: {
|
|
169
154
|
root: string;
|
|
170
|
-
content: string;
|
|
171
155
|
};
|
|
172
156
|
};
|
|
173
157
|
isBordered: {
|
|
@@ -187,8 +171,6 @@ declare const chipVariants: _jamsrui_utils.TVReturnType<{
|
|
|
187
171
|
};
|
|
188
172
|
}, {
|
|
189
173
|
root: string;
|
|
190
|
-
content: string;
|
|
191
|
-
closeButton: string;
|
|
192
174
|
dot: string;
|
|
193
175
|
}, undefined, unknown, unknown, undefined>>;
|
|
194
176
|
type ChipVariantsProps = VariantProps<typeof chipVariants>;
|
package/dist/styles.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-XUDYJN3S.mjs";export{a as chipVariants};
|
package/dist/use-chip.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import 'react';
|
|
2
1
|
import '@jamsrui/utils';
|
|
3
|
-
export { u as useChip } from './chip-
|
|
4
|
-
import './chip-close-button.mjs';
|
|
5
|
-
import './chip-content.mjs';
|
|
2
|
+
export { u as useChip } from './chip-BOENO6Cd.mjs';
|
|
6
3
|
import './chip-dot.mjs';
|
|
4
|
+
import './chip-root.mjs';
|
|
7
5
|
import './styles.mjs';
|
|
8
6
|
import 'react/jsx-runtime';
|
|
7
|
+
import 'react';
|
package/dist/use-chip.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-EFHLADKU.mjs";import"./chunk-XUDYJN3S.mjs";export{a as useChip};
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamsrui/chip",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": ">=19"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@jamsrui/
|
|
9
|
-
"@jamsrui/
|
|
10
|
-
"@jamsrui/icons": "^0.0.
|
|
11
|
-
"@jamsrui/utils": "^0.0.
|
|
8
|
+
"@jamsrui/core": "^0.0.11",
|
|
9
|
+
"@jamsrui/hooks": "^0.0.13",
|
|
10
|
+
"@jamsrui/icons": "^0.0.11",
|
|
11
|
+
"@jamsrui/utils": "^0.0.13"
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
package/dist/chip-DRTSt1tP.d.mts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as react from 'react';
|
|
3
|
-
import { PropGetter, UIProps, SlotsToClassNames } from '@jamsrui/utils';
|
|
4
|
-
import { ChipCloseButton } from './chip-close-button.mjs';
|
|
5
|
-
import { ChipContent } from './chip-content.mjs';
|
|
6
|
-
import { ChipDot } from './chip-dot.mjs';
|
|
7
|
-
import { ChipVariantsProps, ChipSlots } from './styles.mjs';
|
|
8
|
-
|
|
9
|
-
declare const useChip: (props: useChip.Props) => {
|
|
10
|
-
getRootProps: PropGetter<Chip.Props>;
|
|
11
|
-
getContentProps: PropGetter<ChipContent.Props>;
|
|
12
|
-
getCloseButtonProps: PropGetter<ChipCloseButton.Props>;
|
|
13
|
-
getDotProps: PropGetter<ChipDot.Props>;
|
|
14
|
-
startContent: react.ReactNode;
|
|
15
|
-
endContent: react.ReactNode;
|
|
16
|
-
isClosable: boolean;
|
|
17
|
-
isDotVariant: boolean;
|
|
18
|
-
};
|
|
19
|
-
declare namespace useChip {
|
|
20
|
-
interface Props extends UIProps<"div">, ChipVariantsProps {
|
|
21
|
-
startContent?: React.ReactNode;
|
|
22
|
-
endContent?: React.ReactNode;
|
|
23
|
-
onClose?: () => void;
|
|
24
|
-
classNames?: SlotsToClassNames<ChipSlots>;
|
|
25
|
-
slotProps?: {
|
|
26
|
-
content?: ChipContent.Props;
|
|
27
|
-
closeButton?: ChipCloseButton.Props;
|
|
28
|
-
dot?: ChipDot.Props;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
declare const Chip: (props: Chip.Props) => react_jsx_runtime.JSX.Element;
|
|
34
|
-
declare namespace Chip {
|
|
35
|
-
interface Props extends useChip.Props {
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export { Chip as C, useChip as u };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { UIProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const ChipCloseButton: (props: ChipCloseButton.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
-
declare namespace ChipCloseButton {
|
|
6
|
-
interface Props extends UIProps<"button"> {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { ChipCloseButton };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-TQ2CHG5Q.mjs";import"./chunk-4H2Z2ASN.mjs";export{a as ChipCloseButton};
|
package/dist/chip-content.d.mts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { UIProps } from '@jamsrui/utils';
|
|
3
|
-
|
|
4
|
-
declare const ChipContent: (props: ChipContent.Props) => react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
|
|
5
|
-
declare namespace ChipContent {
|
|
6
|
-
interface Props extends UIProps<"div"> {
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { ChipContent };
|
package/dist/chip-content.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-7QJFLK5W.mjs";import"./chunk-TE6RQZ6F.mjs";import"./chunk-4H2Z2ASN.mjs";export{a as ChipContent};
|
package/dist/chunk-4H2Z2ASN.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext as e,use as o}from"react";var p=e(null),r=()=>{let t=o(p);if(!t)throw new Error("useChipContext must be used within a ChipContext");return t};export{p as a,r as b};
|
package/dist/chunk-74QYMEQ2.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-M24Y5IQ2.mjs";import{useCallback as n,useMemo as D}from"react";import{cn as r,dataAttrDev as a,mapPropsVariants as g,mergeProps as i}from"@jamsrui/utils";var b=y=>{let[v,m]=g(y,l.variantKeys),{startContent:C,endContent:P,onClose:p,classNames:o,slotProps:t,...c}=v,s=l(m),h=typeof p=="function",d=m.variant==="dot",u=n(()=>({"data-slot":a("root"),"data-component":a("chip"),...c,className:s.root({className:r(o?.root,c.className)})}),[o?.root,c,s]),N=n(e=>({...i(t?.content,e),"data-slot":a("content"),className:s.content({className:r(t?.content?.className,o?.content,e.className)})}),[o?.content,t?.content,s]),f=n(e=>({...i(t?.closeButton,e,{onClick:p}),"data-slot":a("close-button"),className:s.closeButton({className:r(t?.closeButton?.className,o?.closeButton,e.className)})}),[o?.closeButton,p,t?.closeButton,s]),B=n(e=>({...i(t?.dot,e),"data-slot":a("dot"),className:s.dot({className:r(t?.dot?.className,o?.dot,e.className)})}),[o?.dot,t?.dot,s]);return D(()=>({getRootProps:u,getContentProps:N,getCloseButtonProps:f,getDotProps:B,startContent:C,endContent:P,isClosable:h,isDotVariant:d}),[P,f,N,B,u,C,h,d])};export{b as a};
|
package/dist/chunk-7QJFLK5W.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./chunk-TE6RQZ6F.mjs";import{b as e}from"./chunk-4H2Z2ASN.mjs";import{useRenderElement as C}from"@jamsrui/hooks";import{Fragment as c,jsx as d,jsxs as h}from"react/jsx-runtime";var u=t=>{let{children:o}=t,{getContentProps:r,startContent:p,endContent:i,isDotVariant:s}=e(),m=h(c,{children:[p,!!s&&d(n,{}),o,i]});return C("div",{props:[r(t),{children:m}]})};export{u as a};
|
package/dist/chunk-CB3KJFCA.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as C}from"./chunk-74QYMEQ2.mjs";import{a as p}from"./chunk-TQ2CHG5Q.mjs";import{b as i}from"./chunk-KP46X2A7.mjs";import{a as s}from"./chunk-7QJFLK5W.mjs";import{a as n}from"./chunk-4H2Z2ASN.mjs";import{useRenderElement as g}from"@jamsrui/hooks";import{mergeConfigProps as u}from"@jamsrui/utils";import{Fragment as x,jsx as e,jsxs as P}from"react/jsx-runtime";var q=o=>{let{children:m}=o,t=i(),c=u(t,t,o),r=C(c),{getRootProps:h,isClosable:f}=r,d=P(x,{children:[e(s,{children:m}),!!f&&e(p,{})]}),l=g("div",{props:[h(o),{children:d}]});return e(n,{value:r,children:l})};export{q as a};
|
package/dist/chunk-KP46X2A7.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createConfigContext as o}from"@jamsrui/utils";var[i,r]=o({displayName:"ChipConfig"});export{i as a,r as b};
|
package/dist/chunk-M24Y5IQ2.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{allColors as e,colorVariants as t,radiusVariant as a,tv as s}from"@jamsrui/utils";var i=s({slots:{root:"relative box-border inline-flex min-w-min max-w-fit shrink-0 items-center justify-between whitespace-nowrap rounded-full",content:"flex flex-1 items-center gap-2 text-inherit",closeButton:"z-10 cursor-pointer select-none appearance-none opacity-70 outline-none transition-opacity tap-highlight-transparent hover:opacity-100 active:opacity-disabled",dot:"size-1.5 rounded-full"},variants:{variant:{solid:{},bordered:{root:"border"},flat:{},dot:{dot:"outline-2"}},size:{xs:{root:"h-5 px-0.5 text-xs",content:"px-0.5"},sm:{root:"h-6 px-1 text-xs",content:"px-1"},md:{root:"h-7 px-1 text-sm",content:"px-1"},lg:{root:"h-8 px-2 text-base",content:"px-2"}},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},isSquare:{true:{root:"flex aspect-square items-center justify-center",content:"flex-none"}},isBordered:{true:{root:"border"}},radius:a("root")},compoundVariants:[...["solid","bordered","flat"].flatMap(r=>e.map(o=>({variant:r,color:o,className:{root:t[r][o]}}))),...e.map(r=>({variant:"dot",color:r,className:{dot:t.solid[r]}})),{variant:"dot",color:"primary",className:{dot:"outline-primary-border"}},{variant:"dot",color:"secondary",className:{dot:"outline-secondary-border"}},{variant:"dot",color:"success",className:{dot:"outline-success-border"}},{variant:"dot",color:"warning",className:{dot:"outline-warning-border"}},{variant:"dot",color:"danger",className:{dot:"outline-danger-border"}},{variant:"dot",color:"default",className:{dot:"outline-default-border"}},{isBordered:!0,color:"danger",className:{root:"border-danger"}},{isBordered:!0,color:"primary",className:{root:"border-primary"}},{isBordered:!0,color:"secondary",className:{root:"border-secondary"}},{isBordered:!0,color:"success",className:{root:"border-success"}},{isBordered:!0,color:"warning",className:{root:"border-warning"}},{isBordered:!0,color:"default",className:{root:"border-divider"}}],defaultVariants:{color:"default",size:"md",radius:"full",variant:"solid"}});export{i as a};
|
package/dist/chunk-TE6RQZ6F.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-4H2Z2ASN.mjs";import{useRenderElement as o}from"@jamsrui/hooks";var i=r=>{let{getDotProps:t}=e();return o("div",{props:[t(r)]})};export{i as a};
|
package/dist/chunk-TQ2CHG5Q.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./chunk-4H2Z2ASN.mjs";import{useRenderElement as s}from"@jamsrui/hooks";import{CloseFilledIcon as n}from"@jamsrui/icons";import{jsx as p}from"react/jsx-runtime";var C=o=>{let{getCloseButtonProps:t}=e(),r=p(n,{className:"size-4"});return s("button",{props:[t(o),{children:r}]})};export{C as a};
|