sodtrack-web-ui 0.45.0 → 0.46.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/dist/chip-context.d.mts +117 -0
- package/dist/chip-context.d.ts +117 -0
- package/dist/chip-context.js +1 -0
- package/dist/chip-context.mjs +1 -0
- package/dist/chip-form-complementary.d.mts +3 -3
- package/dist/chip-form-complementary.d.ts +3 -3
- package/dist/chip-form.d.mts +3 -3
- package/dist/chip-form.d.ts +3 -3
- package/dist/chip-status-complementary.d.mts +1 -1
- package/dist/chip-status-complementary.d.ts +1 -1
- package/dist/chip-status-table.d.mts +1 -1
- package/dist/chip-status-table.d.ts +1 -1
- package/dist/chunk-4HLOKQOY.mjs +1 -0
- package/dist/{chunk-FSUUQZNY.mjs → chunk-E2TEMGYB.mjs} +1 -1
- package/dist/{chunk-MUSDM2JF.mjs → chunk-X47ITJEB.mjs} +1 -1
- package/dist/drawer.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/list-item-arrow.css +1 -1
- package/dist/list-item-arrow.mjs +1 -1
- package/dist/list-item-checkbox.css +1 -1
- package/dist/list-item-checkbox.mjs +1 -1
- package/dist/list-item.css +1 -1
- package/dist/list-item.mjs +1 -1
- package/dist/spinner.d.mts +1 -1
- package/dist/spinner.d.ts +1 -1
- package/dist/tab.d.mts +1 -1
- package/dist/tab.d.ts +1 -1
- package/dist/tailwind-preset.js +1 -1
- package/dist/tailwind-preset.mjs +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { HTMLAttributes, FC } from 'react';
|
|
4
|
+
import { LucideIcon } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
declare const ChipContextVariants: readonly ["light", "fill", "outlined", "ghost"];
|
|
7
|
+
type ChipContextVariantType = (typeof ChipContextVariants)[number];
|
|
8
|
+
declare const ChipContextSizes: readonly ["xs", "sm", "md"];
|
|
9
|
+
type ChipContextSizeType = (typeof ChipContextSizes)[number];
|
|
10
|
+
declare const ChipContextColors: readonly ["p-light", "p-dark", "neutral", "violet", "sunny", "disabled"];
|
|
11
|
+
type ChipContextColorType = (typeof ChipContextColors)[number];
|
|
12
|
+
declare const chipContextStyles: tailwind_variants.TVReturnType<{
|
|
13
|
+
color: {
|
|
14
|
+
"p-light": string;
|
|
15
|
+
"p-dark": string;
|
|
16
|
+
neutral: string;
|
|
17
|
+
violet: string;
|
|
18
|
+
sunny: string;
|
|
19
|
+
disabled: string;
|
|
20
|
+
};
|
|
21
|
+
variant: {
|
|
22
|
+
light: {};
|
|
23
|
+
fill: {};
|
|
24
|
+
outlined: {};
|
|
25
|
+
ghost: {};
|
|
26
|
+
};
|
|
27
|
+
size: {
|
|
28
|
+
sm: {
|
|
29
|
+
container: string;
|
|
30
|
+
text: string;
|
|
31
|
+
};
|
|
32
|
+
xs: {
|
|
33
|
+
container: string;
|
|
34
|
+
text: string;
|
|
35
|
+
};
|
|
36
|
+
md: {
|
|
37
|
+
container: string;
|
|
38
|
+
text: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
}, {
|
|
42
|
+
container: string;
|
|
43
|
+
text: string;
|
|
44
|
+
icon: string;
|
|
45
|
+
}, undefined, TVConfig<V, EV>, {
|
|
46
|
+
color: {
|
|
47
|
+
"p-light": string;
|
|
48
|
+
"p-dark": string;
|
|
49
|
+
neutral: string;
|
|
50
|
+
violet: string;
|
|
51
|
+
sunny: string;
|
|
52
|
+
disabled: string;
|
|
53
|
+
};
|
|
54
|
+
variant: {
|
|
55
|
+
light: {};
|
|
56
|
+
fill: {};
|
|
57
|
+
outlined: {};
|
|
58
|
+
ghost: {};
|
|
59
|
+
};
|
|
60
|
+
size: {
|
|
61
|
+
sm: {
|
|
62
|
+
container: string;
|
|
63
|
+
text: string;
|
|
64
|
+
};
|
|
65
|
+
xs: {
|
|
66
|
+
container: string;
|
|
67
|
+
text: string;
|
|
68
|
+
};
|
|
69
|
+
md: {
|
|
70
|
+
container: string;
|
|
71
|
+
text: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
}, {
|
|
75
|
+
container: string;
|
|
76
|
+
text: string;
|
|
77
|
+
icon: string;
|
|
78
|
+
}, tailwind_variants.TVReturnType<{
|
|
79
|
+
color: {
|
|
80
|
+
"p-light": string;
|
|
81
|
+
"p-dark": string;
|
|
82
|
+
neutral: string;
|
|
83
|
+
violet: string;
|
|
84
|
+
sunny: string;
|
|
85
|
+
disabled: string;
|
|
86
|
+
};
|
|
87
|
+
variant: {
|
|
88
|
+
light: {};
|
|
89
|
+
fill: {};
|
|
90
|
+
outlined: {};
|
|
91
|
+
ghost: {};
|
|
92
|
+
};
|
|
93
|
+
size: {
|
|
94
|
+
sm: {
|
|
95
|
+
container: string;
|
|
96
|
+
text: string;
|
|
97
|
+
};
|
|
98
|
+
xs: {
|
|
99
|
+
container: string;
|
|
100
|
+
text: string;
|
|
101
|
+
};
|
|
102
|
+
md: {
|
|
103
|
+
container: string;
|
|
104
|
+
text: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
}, {
|
|
108
|
+
container: string;
|
|
109
|
+
text: string;
|
|
110
|
+
icon: string;
|
|
111
|
+
}, undefined, TVConfig<V, EV>, unknown, unknown, undefined>>;
|
|
112
|
+
type ChipContextProps = Omit<HTMLAttributes<HTMLDivElement>, "color"> & Omit<Omit<Omit<VariantProps<typeof chipContextStyles>, "variant">, "color">, "size"> & Required<Pick<VariantProps<typeof chipContextStyles>, "variant">> & Required<Pick<VariantProps<typeof chipContextStyles>, "color">> & Required<Pick<VariantProps<typeof chipContextStyles>, "size">> & {
|
|
113
|
+
StartIcon?: LucideIcon;
|
|
114
|
+
};
|
|
115
|
+
declare const ChipContext: FC<ChipContextProps>;
|
|
116
|
+
|
|
117
|
+
export { ChipContext, type ChipContextColorType, ChipContextColors, type ChipContextProps, type ChipContextSizeType, ChipContextSizes, type ChipContextVariantType, ChipContextVariants };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { HTMLAttributes, FC } from 'react';
|
|
4
|
+
import { LucideIcon } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
declare const ChipContextVariants: readonly ["light", "fill", "outlined", "ghost"];
|
|
7
|
+
type ChipContextVariantType = (typeof ChipContextVariants)[number];
|
|
8
|
+
declare const ChipContextSizes: readonly ["xs", "sm", "md"];
|
|
9
|
+
type ChipContextSizeType = (typeof ChipContextSizes)[number];
|
|
10
|
+
declare const ChipContextColors: readonly ["p-light", "p-dark", "neutral", "violet", "sunny", "disabled"];
|
|
11
|
+
type ChipContextColorType = (typeof ChipContextColors)[number];
|
|
12
|
+
declare const chipContextStyles: tailwind_variants.TVReturnType<{
|
|
13
|
+
color: {
|
|
14
|
+
"p-light": string;
|
|
15
|
+
"p-dark": string;
|
|
16
|
+
neutral: string;
|
|
17
|
+
violet: string;
|
|
18
|
+
sunny: string;
|
|
19
|
+
disabled: string;
|
|
20
|
+
};
|
|
21
|
+
variant: {
|
|
22
|
+
light: {};
|
|
23
|
+
fill: {};
|
|
24
|
+
outlined: {};
|
|
25
|
+
ghost: {};
|
|
26
|
+
};
|
|
27
|
+
size: {
|
|
28
|
+
sm: {
|
|
29
|
+
container: string;
|
|
30
|
+
text: string;
|
|
31
|
+
};
|
|
32
|
+
xs: {
|
|
33
|
+
container: string;
|
|
34
|
+
text: string;
|
|
35
|
+
};
|
|
36
|
+
md: {
|
|
37
|
+
container: string;
|
|
38
|
+
text: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
}, {
|
|
42
|
+
container: string;
|
|
43
|
+
text: string;
|
|
44
|
+
icon: string;
|
|
45
|
+
}, undefined, TVConfig<V, EV>, {
|
|
46
|
+
color: {
|
|
47
|
+
"p-light": string;
|
|
48
|
+
"p-dark": string;
|
|
49
|
+
neutral: string;
|
|
50
|
+
violet: string;
|
|
51
|
+
sunny: string;
|
|
52
|
+
disabled: string;
|
|
53
|
+
};
|
|
54
|
+
variant: {
|
|
55
|
+
light: {};
|
|
56
|
+
fill: {};
|
|
57
|
+
outlined: {};
|
|
58
|
+
ghost: {};
|
|
59
|
+
};
|
|
60
|
+
size: {
|
|
61
|
+
sm: {
|
|
62
|
+
container: string;
|
|
63
|
+
text: string;
|
|
64
|
+
};
|
|
65
|
+
xs: {
|
|
66
|
+
container: string;
|
|
67
|
+
text: string;
|
|
68
|
+
};
|
|
69
|
+
md: {
|
|
70
|
+
container: string;
|
|
71
|
+
text: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
}, {
|
|
75
|
+
container: string;
|
|
76
|
+
text: string;
|
|
77
|
+
icon: string;
|
|
78
|
+
}, tailwind_variants.TVReturnType<{
|
|
79
|
+
color: {
|
|
80
|
+
"p-light": string;
|
|
81
|
+
"p-dark": string;
|
|
82
|
+
neutral: string;
|
|
83
|
+
violet: string;
|
|
84
|
+
sunny: string;
|
|
85
|
+
disabled: string;
|
|
86
|
+
};
|
|
87
|
+
variant: {
|
|
88
|
+
light: {};
|
|
89
|
+
fill: {};
|
|
90
|
+
outlined: {};
|
|
91
|
+
ghost: {};
|
|
92
|
+
};
|
|
93
|
+
size: {
|
|
94
|
+
sm: {
|
|
95
|
+
container: string;
|
|
96
|
+
text: string;
|
|
97
|
+
};
|
|
98
|
+
xs: {
|
|
99
|
+
container: string;
|
|
100
|
+
text: string;
|
|
101
|
+
};
|
|
102
|
+
md: {
|
|
103
|
+
container: string;
|
|
104
|
+
text: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
}, {
|
|
108
|
+
container: string;
|
|
109
|
+
text: string;
|
|
110
|
+
icon: string;
|
|
111
|
+
}, undefined, TVConfig<V, EV>, unknown, unknown, undefined>>;
|
|
112
|
+
type ChipContextProps = Omit<HTMLAttributes<HTMLDivElement>, "color"> & Omit<Omit<Omit<VariantProps<typeof chipContextStyles>, "variant">, "color">, "size"> & Required<Pick<VariantProps<typeof chipContextStyles>, "variant">> & Required<Pick<VariantProps<typeof chipContextStyles>, "color">> & Required<Pick<VariantProps<typeof chipContextStyles>, "size">> & {
|
|
113
|
+
StartIcon?: LucideIcon;
|
|
114
|
+
};
|
|
115
|
+
declare const ChipContext: FC<ChipContextProps>;
|
|
116
|
+
|
|
117
|
+
export { ChipContext, type ChipContextColorType, ChipContextColors, type ChipContextProps, type ChipContextSizeType, ChipContextSizes, type ChipContextVariantType, ChipContextVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var tailwindVariants=require('tailwind-variants'),jsxRuntime=require('react/jsx-runtime');function Z(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Z(e[t]))&&(o&&(o+=" "),o+=r);}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Q(){for(var e,t,r=0,o="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Z(e))&&(o&&(o+=" "),o+=t);return o}var F="-",le=e=>{let t=de(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return {getClassGroupId:l=>{let s=l.split(F);return s[0]===""&&s.length!==1&&s.shift(),ee(s,t)||ce(l)},getConflictingClassGroupIds:(l,s)=>{let p=r[l]||[];return s&&o[l]?[...p,...o[l]]:p}}},ee=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),a=o?ee(e.slice(1),o):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(F);return t.validators.find(({validator:l})=>l(n))?.classGroupId},Y=/^\[(.+)\]$/,ce=e=>{if(Y.test(e)){let t=Y.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return "arbitrary.."+r}},de=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return ue(Object.entries(e.classGroups),r).forEach(([n,l])=>{$(l,o,n,t);}),o},$=(e,t,r,o)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:D(t,a);n.classGroupId=r;return}if(typeof a=="function"){if(pe(a)){$(a(o),t,r,o);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([n,l])=>{$(l,D(t,n),r,o);});});},D=(e,t)=>{let r=e;return t.split(F).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o);}),r},pe=e=>e.isThemeGetter,ue=(e,t)=>t?e.map(([r,o])=>{let a=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([l,s])=>[t+l,s])):n);return [r,a]}):e,ge=e=>{if(e<1)return {get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,a=(n,l)=>{r.set(n,l),t++,t>e&&(t=0,o=r,r=new Map);};return {get(n){let l=r.get(n);if(l!==void 0)return l;if((l=o.get(n))!==void 0)return a(n,l),l},set(n,l){r.has(n)?r.set(n,l):a(n,l);}}},te="!",be=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,a=t[0],n=t.length,l=s=>{let p=[],g=0,f=0,h;for(let u=0;u<s.length;u++){let m=s[u];if(g===0){if(m===a&&(o||s.slice(u,u+n)===t)){p.push(s.slice(f,u)),f=u+n;continue}if(m==="/"){h=u;continue}}m==="["?g++:m==="]"&&g--;}let y=p.length===0?s:s.substring(f),w=y.startsWith(te),v=w?y.substring(1):y,b=h&&h>f?h-f:void 0;return {modifiers:p,hasImportantModifier:w,baseClassName:v,maybePostfixModifierPosition:b}};return r?s=>r({className:s,parseClassName:l}):l},me=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o);}),t.push(...r.sort()),t},fe=e=>({cache:ge(e.cacheSize),parseClassName:be(e),...le(e)}),xe=/\s+/,he=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:a}=t,n=[],l=e.trim().split(xe),s="";for(let p=l.length-1;p>=0;p-=1){let g=l[p],{modifiers:f,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:w}=r(g),v=!!w,b=o(v?y.substring(0,w):y);if(!b){if(!v){s=g+(s.length>0?" "+s:s);continue}if(b=o(y),!b){s=g+(s.length>0?" "+s:s);continue}v=!1;}let u=me(f).join(":"),m=h?u+te:u,x=m+b;if(n.includes(x))continue;n.push(x);let M=a(b,v);for(let S=0;S<M.length;++S){let T=M[S];n.push(m+T);}s=g+(s.length>0?" "+s:s);}return s};function ye(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=re(t))&&(o&&(o+=" "),o+=r);return o}var re=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=re(e[o]))&&(r&&(r+=" "),r+=t);return r};function ve(e,...t){let r,o,a,n=l;function l(p){let g=t.reduce((f,h)=>h(f),e());return r=fe(g),o=r.cache.get,a=r.cache.set,n=s,s(p)}function s(p){let g=o(p);if(g)return g;let f=he(p,r);return a(p,f),f}return function(){return n(ye.apply(null,arguments))}}var c=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},oe=/^\[(?:([a-z-]+):)?(.+)\]$/i,we=/^\d+\/\d+$/,Ce=new Set(["px","full","screen"]),ke=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ze=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Se=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Pe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,k=e=>P(e)||Ce.has(e)||we.test(e),z=e=>A(e,"length",Le),P=e=>!!e&&!Number.isNaN(Number(e)),O=e=>A(e,"number",P),G=e=>!!e&&Number.isInteger(Number(e)),Ae=e=>e.endsWith("%")&&P(e.slice(0,-1)),i=e=>oe.test(e),N=e=>ke.test(e),Me=new Set(["length","size","percentage"]),Re=e=>A(e,Me,ne),Ge=e=>A(e,"position",ne),Ie=new Set(["image","url"]),Te=e=>A(e,Ie,je),Ve=e=>A(e,"",Ee),I=()=>!0,A=(e,t,r)=>{let o=oe.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},Le=e=>ze.test(e)&&!Ne.test(e),ne=()=>!1,Ee=e=>Se.test(e),je=e=>Pe.test(e);var _e=()=>{let e=c("colors"),t=c("spacing"),r=c("blur"),o=c("brightness"),a=c("borderColor"),n=c("borderRadius"),l=c("borderSpacing"),s=c("borderWidth"),p=c("contrast"),g=c("grayscale"),f=c("hueRotate"),h=c("invert"),y=c("gap"),w=c("gradientColorStops"),v=c("gradientColorStopPositions"),b=c("inset"),u=c("margin"),m=c("opacity"),x=c("padding"),M=c("saturate"),S=c("scale"),T=c("sepia"),q=c("skew"),B=c("space"),U=c("translate"),E=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",i,t],d=()=>[i,t],H=()=>["",k,z],V=()=>["auto",P,i],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",i],X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>[P,i];return {cacheSize:500,separator:":",theme:{colors:[I],spacing:[k,z],blur:["none","",N,i],brightness:C(),borderColor:[e],borderRadius:["none","","full",N,i],borderSpacing:d(),borderWidth:H(),contrast:C(),grayscale:R(),hueRotate:C(),invert:R(),gap:d(),gradientColorStops:[e],gradientColorStopPositions:[Ae,z],inset:_(),margin:_(),opacity:C(),padding:d(),saturate:C(),scale:C(),sepia:R(),skew:C(),space:d(),translate:d()},classGroups:{aspect:[{aspect:["auto","square","video",i]}],container:["container"],columns:[{columns:[N]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...J(),i]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",G,i]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",i]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",G,i]}],"grid-cols":[{"grid-cols":[I]}],"col-start-end":[{col:["auto",{span:["full",G,i]},i]}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":[I]}],"row-start-end":[{row:["auto",{span:[G,i]},i]}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",i]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",i]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...W()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...W(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...W(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[u]}],mx:[{mx:[u]}],my:[{my:[u]}],ms:[{ms:[u]}],me:[{me:[u]}],mt:[{mt:[u]}],mr:[{mr:[u]}],mb:[{mb:[u]}],ml:[{ml:[u]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",i,t]}],"min-w":[{"min-w":[i,t,"min","max","fit"]}],"max-w":[{"max-w":[i,t,"none","full","min","max","fit","prose",{screen:[N]},N]}],h:[{h:[i,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[i,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[i,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[i,t,"auto","min","max","fit"]}],"font-size":[{text:["base",N,z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",O]}],"font-family":[{font:[I]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",i]}],"line-clamp":[{"line-clamp":["none",P,O]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",k,i]}],"list-image":[{"list-image":["none",i]}],"list-style-type":[{list:["none","disc","decimal",i]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",k,z]}],"underline-offset":[{"underline-offset":["auto",k,i]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:d()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",i]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",i]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),Ge]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Re]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Te]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:L()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[k,i]}],"outline-w":[{outline:[k,z]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[k,z]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",N,Ve]}],"shadow-color":[{shadow:[I]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",N,i]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[h]}],saturate:[{saturate:[M]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",i]}],duration:[{duration:C()}],ease:[{ease:["linear","in","out","in-out",i]}],delay:[{delay:C()}],animate:[{animate:["none","spin","ping","pulse","bounce",i]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[G,i]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[q]}],"skew-y":[{"skew-y":[q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",i]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",i]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":d()}],"scroll-mx":[{"scroll-mx":d()}],"scroll-my":[{"scroll-my":d()}],"scroll-ms":[{"scroll-ms":d()}],"scroll-me":[{"scroll-me":d()}],"scroll-mt":[{"scroll-mt":d()}],"scroll-mr":[{"scroll-mr":d()}],"scroll-mb":[{"scroll-mb":d()}],"scroll-ml":[{"scroll-ml":d()}],"scroll-p":[{"scroll-p":d()}],"scroll-px":[{"scroll-px":d()}],"scroll-py":[{"scroll-py":d()}],"scroll-ps":[{"scroll-ps":d()}],"scroll-pe":[{"scroll-pe":d()}],"scroll-pt":[{"scroll-pt":d()}],"scroll-pr":[{"scroll-pr":d()}],"scroll-pb":[{"scroll-pb":d()}],"scroll-pl":[{"scroll-pl":d()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",i]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[k,z,O]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var se=ve(_e);function ae(...e){return se(Q(e))}var Ze=["light","fill","outlined","ghost"],Qe=["xs","sm","md"],Ye=["p-light","p-dark","neutral","violet","sunny","disabled"],Oe=tailwindVariants.tv({slots:{container:"flex items-center gap-1",text:"line-clamp-1 tracking-[130%]",icon:"h-3.5 w-3.5"},variants:{color:{"p-light":"","p-dark":"",neutral:"",violet:"",sunny:"",disabled:""},variant:{light:{},fill:{},outlined:{},ghost:{}},size:{sm:{container:"py-0.5 h-6 rounded-2xl px-2",text:"text-sm"},xs:{container:"h-4.5 rounded-2xl px-2",text:"text-xs"},md:{container:"h-8 rounded-3xl px-3 py-1",text:"text-base"}}},compoundVariants:[{variant:"light",color:"p-light",className:{container:"bg-primary-200",text:"text-primary-700",icon:"text-primary-700"}},{variant:"fill",color:"p-light",className:{container:"bg-primary-500",text:"text-neutral-50",icon:"text-neutral-50"}},{variant:"outlined",color:"p-light",className:{container:"ring-1 ring-primary-500",text:"text-primary-500",icon:"text-primary-500"}},{variant:"ghost",color:"p-light",className:{text:"font-semibold text-primary-500",icon:"text-primary-500"}},{variant:"light",color:"p-dark",className:{container:"bg-primary-400",text:"text-primary-700",icon:"text-primary-700"}},{variant:"fill",color:"p-dark",className:{container:"bg-primary-600",text:"text-neutral-50",icon:"text-neutral-50"}},{variant:"outlined",color:"p-dark",className:{container:"ring-1 ring-primary-600",text:"text-primary-600",icon:"text-primary-600"}},{variant:"ghost",color:"p-dark",className:{text:"font-semibold text-primary-600",icon:"text-primary-600"}},{variant:"light",color:"neutral",className:{container:"bg-neutral-100",text:"text-neutral-700",icon:"text-neutral-700"}},{variant:"fill",color:"neutral",className:{container:"bg-neutral-600",text:"text-neutral-50",icon:"text-neutral-50"}},{variant:"outlined",color:"neutral",className:{container:"ring-1 ring-neutral-600",text:"text-neutral-600",icon:"text-neutral-600"}},{variant:"ghost",color:"neutral",className:{text:"font-semibold text-neutral-600",icon:"text-neutral-600"}},{variant:"light",color:"violet",className:{container:"bg-ivankov-300",text:"text-merry-800",icon:"text-merry-800"}},{variant:"fill",color:"violet",className:{container:"bg-merry-600",text:"text-neutral-50",icon:"text-neutral-50"}},{variant:"outlined",color:"violet",className:{container:"ring-merry-600 ring-1",text:"text-merry-600",icon:"text-merry-600"}},{variant:"ghost",color:"violet",className:{text:"text-merry-600 font-semibold",icon:"text-merry-600"}},{variant:"light",color:"sunny",className:{container:"bg-sanji-300",text:"text-polartang-800",icon:"text-polartang-800"}},{variant:"fill",color:"sunny",className:{container:"bg-polartang-600",text:"text-neutral-50",icon:"text-neutral-50"}},{variant:"outlined",color:"sunny",className:{container:"ring-polartang-600 ring-1",text:"text-polartang-600",icon:"text-polartang-600"}},{variant:"ghost",color:"sunny",className:{text:"text-polartang-600 font-semibold",icon:"text-polartang-600"}},{variant:"light",color:"disabled",className:{container:"bg-neutral-100",text:"text-neutral-400",icon:"text-neutral-400"}},{variant:"outlined",color:"disabled",className:{container:"ring-1 ring-neutral-400",text:"text-neutral-400",icon:"text-neutral-400"}},{variant:"ghost",color:"disabled",className:{text:"font-semibold text-neutral-400",icon:"text-neutral-400"}}]}),De=({children:e,className:t,size:r,color:o,variant:a,StartIcon:n,...l})=>{let{container:s,text:p,icon:g}=Oe({size:r,color:o,variant:a});return jsxRuntime.jsxs("div",{className:ae(s(),t),...l,children:[n&&jsxRuntime.jsx(n,{className:g()}),jsxRuntime.jsx("span",{className:p(),children:e})]})};exports.ChipContext=De;exports.ChipContextColors=Ye;exports.ChipContextSizes=Qe;exports.ChipContextVariants=Ze;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{d as ChipContext,c as ChipContextColors,b as ChipContextSizes,a as ChipContextVariants}from'./chunk-4HLOKQOY.mjs';import'./chunk-2WINTZSS.mjs';
|
|
@@ -6,7 +6,7 @@ type ChipFormComplementaryVariantsType = (typeof ChipFormComplementaryVariants)[
|
|
|
6
6
|
declare const ChipFormComplementaryVariantsClassNames: Record<ChipFormComplementaryVariantsType, string>;
|
|
7
7
|
declare const chipForm: (props?: ({
|
|
8
8
|
variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
|
|
9
|
-
size?: "
|
|
9
|
+
size?: "md" | "sm" | undefined;
|
|
10
10
|
selected?: boolean | undefined;
|
|
11
11
|
disabled?: boolean | undefined;
|
|
12
12
|
} & ({
|
|
@@ -74,7 +74,7 @@ declare const ChipFormComplementary: React__default.ForwardRefExoticComponent<{
|
|
|
74
74
|
children?: React__default.ReactNode | undefined;
|
|
75
75
|
} & Omit<VariantProps<(props?: ({
|
|
76
76
|
variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
|
|
77
|
-
size?: "
|
|
77
|
+
size?: "md" | "sm" | undefined;
|
|
78
78
|
selected?: boolean | undefined;
|
|
79
79
|
disabled?: boolean | undefined;
|
|
80
80
|
} & ({
|
|
@@ -133,7 +133,7 @@ declare const ChipFormComplementary: React__default.ForwardRefExoticComponent<{
|
|
|
133
133
|
} | null | undefined;
|
|
134
134
|
})) | undefined) => string>, "variant"> & Required<Pick<VariantProps<(props?: ({
|
|
135
135
|
variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
|
|
136
|
-
size?: "
|
|
136
|
+
size?: "md" | "sm" | undefined;
|
|
137
137
|
selected?: boolean | undefined;
|
|
138
138
|
disabled?: boolean | undefined;
|
|
139
139
|
} & ({
|
|
@@ -6,7 +6,7 @@ type ChipFormComplementaryVariantsType = (typeof ChipFormComplementaryVariants)[
|
|
|
6
6
|
declare const ChipFormComplementaryVariantsClassNames: Record<ChipFormComplementaryVariantsType, string>;
|
|
7
7
|
declare const chipForm: (props?: ({
|
|
8
8
|
variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
|
|
9
|
-
size?: "
|
|
9
|
+
size?: "md" | "sm" | undefined;
|
|
10
10
|
selected?: boolean | undefined;
|
|
11
11
|
disabled?: boolean | undefined;
|
|
12
12
|
} & ({
|
|
@@ -74,7 +74,7 @@ declare const ChipFormComplementary: React__default.ForwardRefExoticComponent<{
|
|
|
74
74
|
children?: React__default.ReactNode | undefined;
|
|
75
75
|
} & Omit<VariantProps<(props?: ({
|
|
76
76
|
variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
|
|
77
|
-
size?: "
|
|
77
|
+
size?: "md" | "sm" | undefined;
|
|
78
78
|
selected?: boolean | undefined;
|
|
79
79
|
disabled?: boolean | undefined;
|
|
80
80
|
} & ({
|
|
@@ -133,7 +133,7 @@ declare const ChipFormComplementary: React__default.ForwardRefExoticComponent<{
|
|
|
133
133
|
} | null | undefined;
|
|
134
134
|
})) | undefined) => string>, "variant"> & Required<Pick<VariantProps<(props?: ({
|
|
135
135
|
variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
|
|
136
|
-
size?: "
|
|
136
|
+
size?: "md" | "sm" | undefined;
|
|
137
137
|
selected?: boolean | undefined;
|
|
138
138
|
disabled?: boolean | undefined;
|
|
139
139
|
} & ({
|
package/dist/chip-form.d.mts
CHANGED
|
@@ -19,7 +19,7 @@ declare const ChipForm: React__default.ForwardRefExoticComponent<{
|
|
|
19
19
|
selected?: boolean | undefined;
|
|
20
20
|
disabled?: boolean | undefined;
|
|
21
21
|
duotone?: boolean | undefined;
|
|
22
|
-
size?: "
|
|
22
|
+
size?: "md" | "sm" | "xs" | undefined;
|
|
23
23
|
} & ({
|
|
24
24
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
25
25
|
[x: string]: any;
|
|
@@ -80,7 +80,7 @@ declare const ChipForm: React__default.ForwardRefExoticComponent<{
|
|
|
80
80
|
selected?: boolean | undefined;
|
|
81
81
|
disabled?: boolean | undefined;
|
|
82
82
|
duotone?: boolean | undefined;
|
|
83
|
-
size?: "
|
|
83
|
+
size?: "md" | "sm" | "xs" | undefined;
|
|
84
84
|
} & ({
|
|
85
85
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
86
86
|
[x: string]: any;
|
|
@@ -141,7 +141,7 @@ declare const ChipForm: React__default.ForwardRefExoticComponent<{
|
|
|
141
141
|
selected?: boolean | undefined;
|
|
142
142
|
disabled?: boolean | undefined;
|
|
143
143
|
duotone?: boolean | undefined;
|
|
144
|
-
size?: "
|
|
144
|
+
size?: "md" | "sm" | "xs" | undefined;
|
|
145
145
|
} & ({
|
|
146
146
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
147
147
|
[x: string]: any;
|
package/dist/chip-form.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare const ChipForm: React__default.ForwardRefExoticComponent<{
|
|
|
19
19
|
selected?: boolean | undefined;
|
|
20
20
|
disabled?: boolean | undefined;
|
|
21
21
|
duotone?: boolean | undefined;
|
|
22
|
-
size?: "
|
|
22
|
+
size?: "md" | "sm" | "xs" | undefined;
|
|
23
23
|
} & ({
|
|
24
24
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
25
25
|
[x: string]: any;
|
|
@@ -80,7 +80,7 @@ declare const ChipForm: React__default.ForwardRefExoticComponent<{
|
|
|
80
80
|
selected?: boolean | undefined;
|
|
81
81
|
disabled?: boolean | undefined;
|
|
82
82
|
duotone?: boolean | undefined;
|
|
83
|
-
size?: "
|
|
83
|
+
size?: "md" | "sm" | "xs" | undefined;
|
|
84
84
|
} & ({
|
|
85
85
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
86
86
|
[x: string]: any;
|
|
@@ -141,7 +141,7 @@ declare const ChipForm: React__default.ForwardRefExoticComponent<{
|
|
|
141
141
|
selected?: boolean | undefined;
|
|
142
142
|
disabled?: boolean | undefined;
|
|
143
143
|
duotone?: boolean | undefined;
|
|
144
|
-
size?: "
|
|
144
|
+
size?: "md" | "sm" | "xs" | undefined;
|
|
145
145
|
} & ({
|
|
146
146
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
147
147
|
[x: string]: any;
|
|
@@ -6,7 +6,7 @@ type ChipStatusComplementaryVariantType = (typeof ChipStatusComplementaryVariant
|
|
|
6
6
|
type ChipStatusComplementarySizeType = (typeof ChipStatusComplementarySizes)[number];
|
|
7
7
|
declare const chipStatusComplementary: (props?: ({
|
|
8
8
|
variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
|
|
9
|
-
size?: "
|
|
9
|
+
size?: "md" | "sm" | "xs" | undefined;
|
|
10
10
|
} & ({
|
|
11
11
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
12
12
|
[x: string]: any;
|
|
@@ -6,7 +6,7 @@ type ChipStatusComplementaryVariantType = (typeof ChipStatusComplementaryVariant
|
|
|
6
6
|
type ChipStatusComplementarySizeType = (typeof ChipStatusComplementarySizes)[number];
|
|
7
7
|
declare const chipStatusComplementary: (props?: ({
|
|
8
8
|
variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
|
|
9
|
-
size?: "
|
|
9
|
+
size?: "md" | "sm" | "xs" | undefined;
|
|
10
10
|
} & ({
|
|
11
11
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
12
12
|
[x: string]: any;
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'cva';
|
|
|
2
2
|
import { HTMLAttributes, FC } from 'react';
|
|
3
3
|
|
|
4
4
|
declare const chipStatusTable: (props?: ({
|
|
5
|
-
variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" |
|
|
5
|
+
variant?: "success" | "info" | "warning" | "error" | "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
|
|
6
6
|
} & ({
|
|
7
7
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
8
8
|
[x: string]: any;
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'cva';
|
|
|
2
2
|
import { HTMLAttributes, FC } from 'react';
|
|
3
3
|
|
|
4
4
|
declare const chipStatusTable: (props?: ({
|
|
5
|
-
variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" |
|
|
5
|
+
variant?: "success" | "info" | "warning" | "error" | "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
|
|
6
6
|
} & ({
|
|
7
7
|
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
8
8
|
[x: string]: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-2WINTZSS.mjs';import {tv}from'tailwind-variants';import {jsxs,jsx}from'react/jsx-runtime';var v=["light","fill","outlined","ghost"],C=["xs","sm","md"],b=["p-light","p-dark","neutral","violet","sunny","disabled"],u=tv({slots:{container:"flex items-center gap-1",text:"line-clamp-1 tracking-[130%]",icon:"h-3.5 w-3.5"},variants:{color:{"p-light":"","p-dark":"",neutral:"",violet:"",sunny:"",disabled:""},variant:{light:{},fill:{},outlined:{},ghost:{}},size:{sm:{container:"py-0.5 h-6 rounded-2xl px-2",text:"text-sm"},xs:{container:"h-4.5 rounded-2xl px-2",text:"text-xs"},md:{container:"h-8 rounded-3xl px-3 py-1",text:"text-base"}}},compoundVariants:[{variant:"light",color:"p-light",className:{container:"bg-primary-200",text:"text-primary-700",icon:"text-primary-700"}},{variant:"fill",color:"p-light",className:{container:"bg-primary-500",text:"text-neutral-50",icon:"text-neutral-50"}},{variant:"outlined",color:"p-light",className:{container:"ring-1 ring-primary-500",text:"text-primary-500",icon:"text-primary-500"}},{variant:"ghost",color:"p-light",className:{text:"font-semibold text-primary-500",icon:"text-primary-500"}},{variant:"light",color:"p-dark",className:{container:"bg-primary-400",text:"text-primary-700",icon:"text-primary-700"}},{variant:"fill",color:"p-dark",className:{container:"bg-primary-600",text:"text-neutral-50",icon:"text-neutral-50"}},{variant:"outlined",color:"p-dark",className:{container:"ring-1 ring-primary-600",text:"text-primary-600",icon:"text-primary-600"}},{variant:"ghost",color:"p-dark",className:{text:"font-semibold text-primary-600",icon:"text-primary-600"}},{variant:"light",color:"neutral",className:{container:"bg-neutral-100",text:"text-neutral-700",icon:"text-neutral-700"}},{variant:"fill",color:"neutral",className:{container:"bg-neutral-600",text:"text-neutral-50",icon:"text-neutral-50"}},{variant:"outlined",color:"neutral",className:{container:"ring-1 ring-neutral-600",text:"text-neutral-600",icon:"text-neutral-600"}},{variant:"ghost",color:"neutral",className:{text:"font-semibold text-neutral-600",icon:"text-neutral-600"}},{variant:"light",color:"violet",className:{container:"bg-ivankov-300",text:"text-merry-800",icon:"text-merry-800"}},{variant:"fill",color:"violet",className:{container:"bg-merry-600",text:"text-neutral-50",icon:"text-neutral-50"}},{variant:"outlined",color:"violet",className:{container:"ring-merry-600 ring-1",text:"text-merry-600",icon:"text-merry-600"}},{variant:"ghost",color:"violet",className:{text:"text-merry-600 font-semibold",icon:"text-merry-600"}},{variant:"light",color:"sunny",className:{container:"bg-sanji-300",text:"text-polartang-800",icon:"text-polartang-800"}},{variant:"fill",color:"sunny",className:{container:"bg-polartang-600",text:"text-neutral-50",icon:"text-neutral-50"}},{variant:"outlined",color:"sunny",className:{container:"ring-polartang-600 ring-1",text:"text-polartang-600",icon:"text-polartang-600"}},{variant:"ghost",color:"sunny",className:{text:"text-polartang-600 font-semibold",icon:"text-polartang-600"}},{variant:"light",color:"disabled",className:{container:"bg-neutral-100",text:"text-neutral-400",icon:"text-neutral-400"}},{variant:"outlined",color:"disabled",className:{container:"ring-1 ring-neutral-400",text:"text-neutral-400",icon:"text-neutral-400"}},{variant:"ghost",color:"disabled",className:{text:"font-semibold text-neutral-400",icon:"text-neutral-400"}}]}),N=({children:r,className:n,size:o,color:i,variant:l,StartIcon:t,...c})=>{let{container:s,text:x,icon:p}=u({size:o,color:i,variant:l});return jsxs("div",{className:a(s(),n),...c,children:[t&&jsx(t,{className:p()}),jsx("span",{className:x(),children:r})]})};export{v as a,C as b,b as c,N as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-HLCVPPIL.mjs';import {b}from'./chunk-OCDNP76Y.mjs';import {d}from'./chunk-AZOZKDKH.mjs';import {a}from'./chunk-JGL2V7EX.mjs';import {a as a$1}from'./chunk-WGMDH4XX.mjs';import {a as a$3}from'./chunk-BVHU5ZT3.mjs';import {c}from'./chunk-4ZB4CDZE.mjs';import {c as c$1,h}from'./chunk-TYHJTIAW.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import bt,{createContext,useMemo,useCallback,useState,useRef,useEffect,useContext,useId}from'react';import*as Ct from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var jt=({title:t,titleLines:o=2,description:r,descriptionLines:e=1,Icon:l,iconAsColumn:i=!0,className:a,...n})=>jsxs("div",{className:a$2("flex gap-2 py-4 pl-4 pr-6",i&&"flex-col items-center gap-1",!i&&!r&&"items-center"),...n,children:[l&&jsx(l,{className:a$2("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$2("flex flex-col gap-1",i&&"text-center"),children:[jsx("p",{className:a$2("leading-[130%] text-neutral-500",!!r&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),r&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:e?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:e}:void 0,children:r})]})]}),at=jt;var Ut=bt.memo(({handleSelect:t,NoResultsIcon:o,noResultsLabel:r,noResultsDescription:e,noResultsDescriptionLines:l,noResultsAsColumn:i,noResultsButtonOnClick:a$3,optionDescriptionLines:n,noResultsButtonLabel:w,filteredOptions:c$1,inputRect:p,inputRef:f,popoverPosition:x,optionsListRef:k,selectedOption:m,options:R,setFilteredOptions:h})=>jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:k,className:"pointer-events-auto fixed z-50 hidden w-full",style:p?{width:`${p.width}px`,left:p.left,top:x==="bottom"?`${p.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-p.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",children:[c$1.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:r,description:e,Icon:o,iconAsColumn:i,descriptionLines:l}),a$3&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:u=>{k.current.style.display="none",f.current.value="",h(R),a$3();},children:w})]})]}),c$1.map(u=>jsx(Mt,{title:u.label,disabled:u.disabled,description:u.description,descriptionLines:n,onClick:()=>t(u),className:a$2(m?.value===u.value&&"bg-primary-200")},u.key??u.value))]})})})),zt=Ut;var qt=336,rr=({options:t,defaultSelectedOption:o,onSelect:r,onClick:e,onInputChange:l,error:i,helperText:a,label:n,placeholder:w,value:c,size:p="lg",optionDescriptionLines:f=1,noResultsLabel:x,noResultsIcon:k,noResultsDescription:m,noResultsDescriptionLines:R,noResultsAsColumn:h,noResultsButtonOnClick:u,noResultsButtonLabel:A,className:V,disabled:b})=>{let[d,y]=useState(o??null),L=useRef(null),g=useRef(null),[nt,lt]=useState(),[st,T]=useState([]),[ct,H]=useState("bottom"),[j,K]=useState(),G=qt,N=useCallback(v=>{L.current.style.display="none",g.current.value=v.label,y(v),r?.(v);},[r]),z=useCallback(()=>{if(!g?.current)return;let v=g.current.getBoundingClientRect();lt(v);let O=j?j.height:G,M=window.innerHeight-v.bottom>O,Q=v.top>O;H(M?"bottom":Q?"top":"bottom");},[j?.height]),U=useCallback(()=>{let v=t.filter(O=>O.label.toLowerCase().includes(g?.current?.value.toLowerCase()??""));if(T(v),L?.current){let O=L.current.getBoundingClientRect();K(O);}},[t]);return useEffect(()=>{T(t);},[t]),useEffect(()=>{if(!c){y(null),g.current&&(g.current.value="");return}(!g.current?.value||d?.value!==c.value)&&(y(c),g.current.value=c.label);},[c]),a$5(L,()=>{L.current.style.display="none",d&&g.current&&(g.current.value=d.label);}),useEffect(()=>{if(g?.current)return z(),g.current.addEventListener("mousedown",z),g.current.addEventListener("input",U),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{g.current?.removeEventListener("mousedown",z),g.current?.removeEventListener("input",U),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z);}},[z,U]),jsxs("div",{className:a$2("relative",V),children:[jsx(a$4,{ref:g,autoComplete:"off",list:"",selectMode:!0,onChange:v=>{v.target.value||(y(null),r?.(null)),l?.(v);},onClean:()=>{y(null),T(t),r?.(null);},onClick:v=>{L.current.style.display="flex",e?.(v);},onBlur:()=>{d&&g.current&&(g.current.value=d.label);},label:n,helperText:a,placeholder:w,size:p,error:i,disabled:b}),jsx(zt,{handleSelect:N,noResultsLabel:x,NoResultsIcon:k,optionDescriptionLines:f,noResultsAsColumn:h,noResultsButtonLabel:A,noResultsButtonOnClick:u,noResultsDescription:m,noResultsDescriptionLines:R,filteredOptions:st,inputRect:nt,inputRef:g,popoverPosition:ct,optionsListRef:L,selectedOption:d,options:t,setFilteredOptions:T})]})};var Kt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,disabled:i=!1,className:a,...n})=>jsxs("div",{className:"flex w-full flex-col",...n,children:[jsx("p",{className:a$2("break-all",!!e&&"font-medium"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:o}),e&&jsx("p",{className:a$2("text-sm",i?"text-neutral-400":"text-neutral-700"),style:l?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:l}:void 0,children:e})]}),Y=Kt;var mr=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,startIcon:i,badgeContent:a,hasDivider:n=!1,disabled:w=!1,onSelect:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:w,onClick:c,hasDivider:n,className:a$2(!w&&"cursor-pointer",p),...f,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:w}),jsxs("div",{className:"flex gap-2",children:[a&&jsx(a$3,{content:a,size:"lg",variant:"alert",className:a$2("self-center",w&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var St=({children:t,title:o,titleLines:r=1,description:e="",descriptionLines:l,startIcon:i,hasDivider:a=!1,disabled:n=!1,checked:w,onCheckedChange:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,...f,className:a$2("pr-6",p),children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:n}),jsx(b,{size:"sm",checked:w,onCheckedChange:c,className:"self-center",disabled:n})]});var E=336,Ft=createContext({inputRef:null,optionsListRef:null,scrollAreaRef:null,autocompleteId:"",inputRect:void 0,showChips:!1,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:E,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),I=()=>{let t=useContext(Ft);if(t===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return t},Dt=({children:t})=>{let o=useRef(null),r=useRef(null),e=useRef(null),l=useId(),[i,a]=useState(),[n,w]=useState(!0),[c,p]=useState([]),[f,x]=useState(-1),[k,m]=useState("bottom"),[R,h]=useState(),[u,A]=useState(E);return jsx(Ft.Provider,{value:{optionsListRef:o,inputRef:r,scrollAreaRef:e,autocompleteId:l,inputRect:i,showChips:n,filteredOptions:c,currentFocus:f,popoverPosition:k,setFilteredOptions:p,setCurrentFocus:x,setShowChips:w,setPopoverPosition:m,setInputRect:a,optionsListHeight:u,optionsListRect:R,setOptionsListRect:h,setOptionsListHeight:A},children:t})};var se=({option:t,onMountWidth:o,size:r})=>{let e=useRef(null);return useEffect(()=>{e.current&&o?.(e.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:e,className:"flex-shrink-0",size:r==="md"?"xs":"sm",hasCloseIcon:!1,children:t.label})},Tt=se;var ge=150,we=bt.memo(({selectedOptions:t,error:o,onCleanSelectedOptions:r,disabled:e,size:l})=>{let{autocompleteId:i,inputRect:a,inputRef:n,optionsListRef:w}=I(),c=bt.useRef(null),[p,f]=bt.useState(new Map),x=useMemo(()=>{if(!a?.width)return [];let m=0,R=a.width-ge,h=0;for(let u=0;u<t.length&&(h+=p.get(u)??0,!(h>R));u++)m++;return t.slice(0,m)},[a?.width,t,p]),k=useCallback(()=>{e||(n?.current?.focus(),w.current.style.display="flex");},[e]);return jsxs("div",{onClick:k,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",e&&"cursor-not-allowed"),style:{maxWidth:a?.width?a?.width:void 0,height:a?.height?a?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:c,children:x.map((m,R)=>jsx(Tt,{option:m,onMountWidth:h=>f(u=>new Map(u).set(R,h)),size:l},`chip-input-${i}-${m.value}`))}),t.length>x.length&&jsx("span",{className:"text-base",children:"..."}),t.length>0&&!o&&jsx(a$3,{content:String(t.length),size:l}),o&&t.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:m=>{m.stopPropagation(),r();}})]})}),Ht=we;var be=bt.memo(({option:t,index:o,onPressOption:r,isSelected:e,optionDescriptionLines:l})=>{let{currentFocus:i,inputRef:a}=I();return jsx(St,{title:t.label,checked:e,disabled:t.disabled,className:i===o?"bg-primary-200":void 0,onMouseDown:n=>{a?.current?.value&&n.preventDefault(),r?.(t,n);},description:t.description,descriptionLines:l})}),ht=be;var xe=bt.memo(({selectedOptions:t,handleSelect:o,NoResultsIcon:r,noResultsLabel:e,noResultsDescription:l,noResultsDescriptionLines:i,noResultsAsColumn:a$2,noResultsButtonOnClick:n,optionDescriptionLines:w,noResultsButtonLabel:c$1})=>{let{popoverPosition:p,scrollAreaRef:f,optionsListRef:x,filteredOptions:k,inputRect:m,autocompleteId:R,inputRef:h,optionsListHeight:u}=I(),A=useCallback(b=>t.some(d=>d.value===b.value),[t]),V=useMemo(()=>t.filter(b=>b.label.toLowerCase().includes(h?.current?.value.toLowerCase()??"")),[t,h?.current?.value]);return jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:x,className:"pointer-events-auto fixed z-50 hidden w-full",style:m?{width:`${m.width}px`,left:m.left,top:p==="bottom"?`${m.bottom}px`:void 0,bottom:p==="top"?`${window.innerHeight-m.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex w-full flex-col rounded-lg bg-neutral-50",style:{maxHeight:u+"px"},ref:f,children:[k.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:e,description:l,Icon:r,iconAsColumn:a$2,descriptionLines:i}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:b=>{x.current.style.display="none",h.current.value="",n();},children:c$1})]})]}),V.map((b,d)=>jsx(ht,{option:b,index:d,onPressOption:(y,L)=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`)),k.map((b,d)=>!t.some(y=>y.value===b.value)&&jsx(ht,{option:b,index:d,onPressOption:(y,L)=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`))]})})})}),Xt=xe;var Le=bt.memo(({selectedOptions:t,onSelect:o,error:r,helperText:e,label:l,placeholder:i,options:a,onInputChange:n,size:w,disabled:c})=>{let{setCurrentFocus:p,setFilteredOptions:f,optionsListRef:x,inputRef:k}=I();return jsx(a$4,{ref:k,autoComplete:"off",list:"",disabled:c,selectMode:!0,onChange:m=>{p(-1),n?.(m.target.value);},onClean:()=>{p(-1),f(a),o?.(null,t);},onClick:()=>{c||(x.current.style.display="flex");},error:r,helperText:e,label:l,placeholder:i,fixedTopLabel:t.length>0,size:w})}),Bt=Le;var Yt=({options:t,defaultSelectedOptions:o,onSelect:r,error:e,helperText:l,label:i,placeholder:a,noResultsLabel:n,noResultsIcon:w,noResultsDescription:c,noResultsDescriptionLines:p,noResultsAsColumn:f,noResultsButtonOnClick:x,noResultsButtonLabel:k,className:m,onInputChange:R,value:h,loading:u,size:A="lg",optionDescriptionLines:V=1,disabled:b})=>{let{inputRef:d,optionsListRef:y,setFilteredOptions:L,setShowChips:g,setInputRect:nt,setPopoverPosition:lt,setCurrentFocus:st,showChips:T,setOptionsListRect:ct,optionsListRect:H,setOptionsListHeight:j}=I(),K=useRef(!1),[G,N]=useState(o??[]),z=useCallback(C=>{N(P=>{let S,$=P.findIndex(Vt=>Vt.value===C.value);return $===-1?(S=P.concat(C),r?.(C,S),S):(S=P.toSpliced($,1),r?.(C,S),S)});},[]),U=useCallback(()=>{N([]),L(t),r?.(null,[]);},[]),v=useCallback(()=>{g(!1);},[]),O=useCallback(()=>{g(!0);},[]),M=useCallback(()=>{if(!d?.current)return;let C=d.current.getBoundingClientRect();nt(C);let P=H?H.height>E?E:H.height:E,S=window.innerHeight-C.bottom>P,$=C.top>P;lt(S?"bottom":$?"top":"bottom"),j($?E:window.innerHeight-C.bottom>E?E:window.innerHeight-C.bottom);},[H?.height]),Q=useCallback(()=>{let C=t.filter(P=>P.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(L(C),y?.current){let P=y.current.getBoundingClientRect();ct(P);}},[t,y?.current]);return useEffect(()=>{L(t);},[t]),a$5(y,()=>{y.current.style.display="none",st(-1);}),useEffect(()=>{if(d?.current)return M(),d.current.addEventListener("mousedown",M),d.current.addEventListener("input",Q),d.current.addEventListener("focusin",v),d.current.addEventListener("focusout",O),window.addEventListener("scroll",M,!0),window.addEventListener("resize",M),()=>{d.current?.removeEventListener("mousedown",M),d.current?.removeEventListener("input",M),d.current?.removeEventListener("focusout",O),d.current?.removeEventListener("focusin",v),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M);}},[M,O,v,Q]),useEffect(()=>{h&&(N(h),g(!0));},[h]),useEffect(()=>{u||o&&o.length&&!K.current&&(N(o),K.current=!0,g(!0));},[o,u]),jsxs("div",{className:a$2("relative",m),children:[jsx(Bt,{selectedOptions:G,onSelect:r,error:e,helperText:l,label:i,placeholder:a,handleSelect:z,options:t,onInputChange:R,size:A,disabled:b}),T&&jsx(Ht,{selectedOptions:G,disabled:b,error:e,onCleanSelectedOptions:U,size:A}),jsx(Xt,{handleSelect:z,selectedOptions:G,noResultsLabel:n,NoResultsIcon:w,optionDescriptionLines:V,noResultsAsColumn:f,noResultsButtonLabel:k,noResultsButtonOnClick:x,noResultsDescription:c,noResultsDescriptionLines:p})]})};var Oo=t=>jsx(Dt,{children:jsx(Yt,{...t})});var Oe=({children:t,hasDescription:o=!1,disabled:r=!1,hasDivider:e=!1,className:l,onClick:i,...a})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("line-height-[120%] flex flex-row gap-4 pl-4 pr-3",o?"py-3":"py-[0.875rem]",r?"text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",l),onClick:n=>{r||i?.(n);},...a,children:t}),e&&jsx(a$1,{})]}),_=Oe;var Mt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,startIcon:i,hasDivider:a=!1,disabled:n=!1,className:w,...c})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,className:w,...c,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:n})]});export{rr as a,Mt as b,mr as c,St as d,Oo as e};
|
|
1
|
+
import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-HLCVPPIL.mjs';import {a}from'./chunk-JGL2V7EX.mjs';import {b}from'./chunk-OCDNP76Y.mjs';import {d}from'./chunk-AZOZKDKH.mjs';import {a as a$1}from'./chunk-WGMDH4XX.mjs';import {a as a$3}from'./chunk-BVHU5ZT3.mjs';import {c}from'./chunk-4ZB4CDZE.mjs';import {c as c$1,h}from'./chunk-TYHJTIAW.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import bt,{createContext,useMemo,useCallback,useState,useRef,useEffect,useContext,useId}from'react';import*as Ct from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var jt=({title:t,titleLines:o=2,description:r,descriptionLines:e=1,Icon:l,iconAsColumn:i=!0,className:a,...n})=>jsxs("div",{className:a$2("flex gap-2 py-4 pl-4 pr-6",i&&"flex-col items-center gap-1",!i&&!r&&"items-center"),...n,children:[l&&jsx(l,{className:a$2("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$2("flex flex-col gap-1",i&&"text-center"),children:[jsx("p",{className:a$2("leading-[130%] text-neutral-500",!!r&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),r&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:e?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:e}:void 0,children:r})]})]}),at=jt;var Ut=bt.memo(({handleSelect:t,NoResultsIcon:o,noResultsLabel:r,noResultsDescription:e,noResultsDescriptionLines:l,noResultsAsColumn:i,noResultsButtonOnClick:a$3,optionDescriptionLines:n,noResultsButtonLabel:w,filteredOptions:c$1,inputRect:p,inputRef:f,popoverPosition:x,optionsListRef:k,selectedOption:m,options:R,setFilteredOptions:h})=>jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:k,className:"pointer-events-auto fixed z-50 hidden w-full",style:p?{width:`${p.width}px`,left:p.left,top:x==="bottom"?`${p.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-p.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",children:[c$1.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:r,description:e,Icon:o,iconAsColumn:i,descriptionLines:l}),a$3&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:u=>{k.current.style.display="none",f.current.value="",h(R),a$3();},children:w})]})]}),c$1.map(u=>jsx(Mt,{title:u.label,disabled:u.disabled,description:u.description,descriptionLines:n,onClick:()=>t(u),className:a$2(m?.value===u.value&&"bg-primary-200")},u.key??u.value))]})})})),zt=Ut;var qt=336,rr=({options:t,defaultSelectedOption:o,onSelect:r,onClick:e,onInputChange:l,error:i,helperText:a,label:n,placeholder:w,value:c,size:p="lg",optionDescriptionLines:f=1,noResultsLabel:x,noResultsIcon:k,noResultsDescription:m,noResultsDescriptionLines:R,noResultsAsColumn:h,noResultsButtonOnClick:u,noResultsButtonLabel:A,className:V,disabled:b})=>{let[d,y]=useState(o??null),L=useRef(null),g=useRef(null),[nt,lt]=useState(),[st,T]=useState([]),[ct,H]=useState("bottom"),[j,K]=useState(),G=qt,N=useCallback(v=>{L.current.style.display="none",g.current.value=v.label,y(v),r?.(v);},[r]),z=useCallback(()=>{if(!g?.current)return;let v=g.current.getBoundingClientRect();lt(v);let O=j?j.height:G,M=window.innerHeight-v.bottom>O,Q=v.top>O;H(M?"bottom":Q?"top":"bottom");},[j?.height]),U=useCallback(()=>{let v=t.filter(O=>O.label.toLowerCase().includes(g?.current?.value.toLowerCase()??""));if(T(v),L?.current){let O=L.current.getBoundingClientRect();K(O);}},[t]);return useEffect(()=>{T(t);},[t]),useEffect(()=>{if(!c){y(null),g.current&&(g.current.value="");return}(!g.current?.value||d?.value!==c.value)&&(y(c),g.current.value=c.label);},[c]),a$5(L,()=>{L.current.style.display="none",d&&g.current&&(g.current.value=d.label);}),useEffect(()=>{if(g?.current)return z(),g.current.addEventListener("mousedown",z),g.current.addEventListener("input",U),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{g.current?.removeEventListener("mousedown",z),g.current?.removeEventListener("input",U),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z);}},[z,U]),jsxs("div",{className:a$2("relative",V),children:[jsx(a$4,{ref:g,autoComplete:"off",list:"",selectMode:!0,onChange:v=>{v.target.value||(y(null),r?.(null)),l?.(v);},onClean:()=>{y(null),T(t),r?.(null);},onClick:v=>{L.current.style.display="flex",e?.(v);},onBlur:()=>{d&&g.current&&(g.current.value=d.label);},label:n,helperText:a,placeholder:w,size:p,error:i,disabled:b}),jsx(zt,{handleSelect:N,noResultsLabel:x,NoResultsIcon:k,optionDescriptionLines:f,noResultsAsColumn:h,noResultsButtonLabel:A,noResultsButtonOnClick:u,noResultsDescription:m,noResultsDescriptionLines:R,filteredOptions:st,inputRect:nt,inputRef:g,popoverPosition:ct,optionsListRef:L,selectedOption:d,options:t,setFilteredOptions:T})]})};var Kt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,disabled:i=!1,className:a,...n})=>jsxs("div",{className:"flex w-full flex-col",...n,children:[jsx("p",{className:a$2("break-all",!!e&&"font-medium"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:o}),e&&jsx("p",{className:a$2("text-sm",i?"text-neutral-400":"text-neutral-700"),style:l?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:l}:void 0,children:e})]}),Y=Kt;var mr=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,startIcon:i,badgeContent:a,hasDivider:n=!1,disabled:w=!1,onSelect:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:w,onClick:c,hasDivider:n,className:a$2(!w&&"cursor-pointer",p),...f,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:w}),jsxs("div",{className:"flex gap-2",children:[a&&jsx(a$3,{content:a,size:"lg",variant:"alert",className:a$2("self-center",w&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var St=({children:t,title:o,titleLines:r=1,description:e="",descriptionLines:l,startIcon:i,hasDivider:a=!1,disabled:n=!1,checked:w,onCheckedChange:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,...f,className:a$2("pr-6",p),children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:n}),jsx(b,{size:"sm",checked:w,onCheckedChange:c,className:"self-center",disabled:n})]});var E=336,Ft=createContext({inputRef:null,optionsListRef:null,scrollAreaRef:null,autocompleteId:"",inputRect:void 0,showChips:!1,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:E,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),I=()=>{let t=useContext(Ft);if(t===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return t},Dt=({children:t})=>{let o=useRef(null),r=useRef(null),e=useRef(null),l=useId(),[i,a]=useState(),[n,w]=useState(!0),[c,p]=useState([]),[f,x]=useState(-1),[k,m]=useState("bottom"),[R,h]=useState(),[u,A]=useState(E);return jsx(Ft.Provider,{value:{optionsListRef:o,inputRef:r,scrollAreaRef:e,autocompleteId:l,inputRect:i,showChips:n,filteredOptions:c,currentFocus:f,popoverPosition:k,setFilteredOptions:p,setCurrentFocus:x,setShowChips:w,setPopoverPosition:m,setInputRect:a,optionsListHeight:u,optionsListRect:R,setOptionsListRect:h,setOptionsListHeight:A},children:t})};var se=({option:t,onMountWidth:o,size:r})=>{let e=useRef(null);return useEffect(()=>{e.current&&o?.(e.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:e,className:"flex-shrink-0",size:r==="md"?"xs":"sm",hasCloseIcon:!1,children:t.label})},Tt=se;var ge=150,we=bt.memo(({selectedOptions:t,error:o,onCleanSelectedOptions:r,disabled:e,size:l})=>{let{autocompleteId:i,inputRect:a,inputRef:n,optionsListRef:w}=I(),c=bt.useRef(null),[p,f]=bt.useState(new Map),x=useMemo(()=>{if(!a?.width)return [];let m=0,R=a.width-ge,h=0;for(let u=0;u<t.length&&(h+=p.get(u)??0,!(h>R));u++)m++;return t.slice(0,m)},[a?.width,t,p]),k=useCallback(()=>{e||(n?.current?.focus(),w.current.style.display="flex");},[e]);return jsxs("div",{onClick:k,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",e&&"cursor-not-allowed"),style:{maxWidth:a?.width?a?.width:void 0,height:a?.height?a?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:c,children:x.map((m,R)=>jsx(Tt,{option:m,onMountWidth:h=>f(u=>new Map(u).set(R,h)),size:l},`chip-input-${i}-${m.value}`))}),t.length>x.length&&jsx("span",{className:"text-base",children:"..."}),t.length>0&&!o&&jsx(a$3,{content:String(t.length),size:l}),o&&t.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:m=>{m.stopPropagation(),r();}})]})}),Ht=we;var be=bt.memo(({option:t,index:o,onPressOption:r,isSelected:e,optionDescriptionLines:l})=>{let{currentFocus:i,inputRef:a}=I();return jsx(St,{title:t.label,checked:e,disabled:t.disabled,className:i===o?"bg-primary-200":void 0,onMouseDown:n=>{a?.current?.value&&n.preventDefault(),r?.(t,n);},description:t.description,descriptionLines:l})}),ht=be;var xe=bt.memo(({selectedOptions:t,handleSelect:o,NoResultsIcon:r,noResultsLabel:e,noResultsDescription:l,noResultsDescriptionLines:i,noResultsAsColumn:a$2,noResultsButtonOnClick:n,optionDescriptionLines:w,noResultsButtonLabel:c$1})=>{let{popoverPosition:p,scrollAreaRef:f,optionsListRef:x,filteredOptions:k,inputRect:m,autocompleteId:R,inputRef:h,optionsListHeight:u}=I(),A=useCallback(b=>t.some(d=>d.value===b.value),[t]),V=useMemo(()=>t.filter(b=>b.label.toLowerCase().includes(h?.current?.value.toLowerCase()??"")),[t,h?.current?.value]);return jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:x,className:"pointer-events-auto fixed z-50 hidden w-full",style:m?{width:`${m.width}px`,left:m.left,top:p==="bottom"?`${m.bottom}px`:void 0,bottom:p==="top"?`${window.innerHeight-m.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex w-full flex-col rounded-lg bg-neutral-50",style:{maxHeight:u+"px"},ref:f,children:[k.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:e,description:l,Icon:r,iconAsColumn:a$2,descriptionLines:i}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:b=>{x.current.style.display="none",h.current.value="",n();},children:c$1})]})]}),V.map((b,d)=>jsx(ht,{option:b,index:d,onPressOption:(y,L)=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`)),k.map((b,d)=>!t.some(y=>y.value===b.value)&&jsx(ht,{option:b,index:d,onPressOption:(y,L)=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`))]})})})}),Xt=xe;var Le=bt.memo(({selectedOptions:t,onSelect:o,error:r,helperText:e,label:l,placeholder:i,options:a,onInputChange:n,size:w,disabled:c})=>{let{setCurrentFocus:p,setFilteredOptions:f,optionsListRef:x,inputRef:k}=I();return jsx(a$4,{ref:k,autoComplete:"off",list:"",disabled:c,selectMode:!0,onChange:m=>{p(-1),n?.(m.target.value);},onClean:()=>{p(-1),f(a),o?.(null,t);},onClick:()=>{c||(x.current.style.display="flex");},error:r,helperText:e,label:l,placeholder:i,fixedTopLabel:t.length>0,size:w})}),Bt=Le;var Yt=({options:t,defaultSelectedOptions:o,onSelect:r,error:e,helperText:l,label:i,placeholder:a,noResultsLabel:n,noResultsIcon:w,noResultsDescription:c,noResultsDescriptionLines:p,noResultsAsColumn:f,noResultsButtonOnClick:x,noResultsButtonLabel:k,className:m,onInputChange:R,value:h,loading:u,size:A="lg",optionDescriptionLines:V=1,disabled:b})=>{let{inputRef:d,optionsListRef:y,setFilteredOptions:L,setShowChips:g,setInputRect:nt,setPopoverPosition:lt,setCurrentFocus:st,showChips:T,setOptionsListRect:ct,optionsListRect:H,setOptionsListHeight:j}=I(),K=useRef(!1),[G,N]=useState(o??[]),z=useCallback(C=>{N(P=>{let S,$=P.findIndex(Vt=>Vt.value===C.value);return $===-1?(S=P.concat(C),r?.(C,S),S):(S=P.toSpliced($,1),r?.(C,S),S)});},[]),U=useCallback(()=>{N([]),L(t),r?.(null,[]);},[]),v=useCallback(()=>{g(!1);},[]),O=useCallback(()=>{g(!0);},[]),M=useCallback(()=>{if(!d?.current)return;let C=d.current.getBoundingClientRect();nt(C);let P=H?H.height>E?E:H.height:E,S=window.innerHeight-C.bottom>P,$=C.top>P;lt(S?"bottom":$?"top":"bottom"),j($?E:window.innerHeight-C.bottom>E?E:window.innerHeight-C.bottom);},[H?.height]),Q=useCallback(()=>{let C=t.filter(P=>P.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(L(C),y?.current){let P=y.current.getBoundingClientRect();ct(P);}},[t,y?.current]);return useEffect(()=>{L(t);},[t]),a$5(y,()=>{y.current.style.display="none",st(-1);}),useEffect(()=>{if(d?.current)return M(),d.current.addEventListener("mousedown",M),d.current.addEventListener("input",Q),d.current.addEventListener("focusin",v),d.current.addEventListener("focusout",O),window.addEventListener("scroll",M,!0),window.addEventListener("resize",M),()=>{d.current?.removeEventListener("mousedown",M),d.current?.removeEventListener("input",M),d.current?.removeEventListener("focusout",O),d.current?.removeEventListener("focusin",v),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M);}},[M,O,v,Q]),useEffect(()=>{h&&(N(h),g(!0));},[h]),useEffect(()=>{u||o&&o.length&&!K.current&&(N(o),K.current=!0,g(!0));},[o,u]),jsxs("div",{className:a$2("relative",m),children:[jsx(Bt,{selectedOptions:G,onSelect:r,error:e,helperText:l,label:i,placeholder:a,handleSelect:z,options:t,onInputChange:R,size:A,disabled:b}),T&&jsx(Ht,{selectedOptions:G,disabled:b,error:e,onCleanSelectedOptions:U,size:A}),jsx(Xt,{handleSelect:z,selectedOptions:G,noResultsLabel:n,NoResultsIcon:w,optionDescriptionLines:V,noResultsAsColumn:f,noResultsButtonLabel:k,noResultsButtonOnClick:x,noResultsDescription:c,noResultsDescriptionLines:p})]})};var Oo=t=>jsx(Dt,{children:jsx(Yt,{...t})});var Oe=({children:t,hasDescription:o=!1,disabled:r=!1,hasDivider:e=!1,className:l,onClick:i,...a})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("line-height-[120%] flex flex-row gap-4 pl-4 pr-3",o?"py-3":"py-[0.875rem]",r?"text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",l),onClick:n=>{r||i?.(n);},...a,children:t}),e&&jsx(a$1,{})]}),_=Oe;var Mt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,startIcon:i,hasDivider:a=!1,disabled:n=!1,className:w,...c})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,className:w,...c,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:n})]});export{rr as a,Mt as b,mr as c,St as d,Oo as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-562EYVK4.mjs';import {j as j$1}from'./chunk-GIQQT37U.mjs';import {
|
|
1
|
+
import {a as a$2}from'./chunk-562EYVK4.mjs';import {j as j$1}from'./chunk-GIQQT37U.mjs';import {a as a$1}from'./chunk-JGL2V7EX.mjs';import {c as c$1}from'./chunk-KSIZIAKW.mjs';import {c}from'./chunk-4ZB4CDZE.mjs';import {a}from'./chunk-2WINTZSS.mjs';import*as s from'react';import*as t from'@radix-ui/react-dialog';import*as v from'@radix-ui/react-visually-hidden';import {jsx,jsxs}from'react/jsx-runtime';var V=["sm","md","lg","xl"],h=({...r})=>jsx(t.Root,{...r});h.displayName="Drawer";var j=t.Trigger,B=t.Portal,k=t.Close,x=s.forwardRef(({className:r,...a$1},o)=>jsx(t.Overlay,{ref:o,className:a("fixed inset-0 z-50 bg-neutral-900/60","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=open]:animate-in data-[state=closed]:animate-out","transition-all",r),...a$1}));x.displayName=t.Overlay.displayName;var A=s.forwardRef(({className:r,size:a$3="sm",title:o,description:i,children:f,isLoading:c=!1,loadingText:n="",buttons:d,hideHeader:D=!1,onPointerDownOutside:b,...H},T)=>jsx(B,{children:jsx(x,{children:jsx(t.Content,{onPointerDownOutside:m=>{m.target instanceof Element&&m.target.closest(".pac-container")&&m.preventDefault(),b?.(m);},ref:T,...!i||D?{"aria-describedby":void 0}:{},className:a("fixed right-0 top-0 z-50 flex h-full flex-col bg-neutral-50",a$3==="sm"&&"w-[29.375rem] max-w-[29.375rem]",a$3==="md"&&"w-[47.5rem] max-w-[47.5rem]",a$3==="lg"&&"w-[58.75rem] max-w-[58.75rem]",a$3==="xl"&&"w-[78.125rem] max-w-[78.125rem]","data-[state=open]:animate-slideIn","data-[state=closed]:animate-swipeOut",r),...H,children:jsxs(a$1,{className:"h-full",viewPortClassName:"pr-8 pt-10 pl-6",children:[D?jsx(v.Root,{children:jsx(j$1,{children:"Drawer"})}):jsx(N,{title:o,description:i,buttons:d}),jsx("div",{className:a("flex flex-1 flex-col pb-6",r),children:c?jsxs("div",{className:"flex flex-1 flex-col items-center justify-center",children:[jsx(a$2,{}),n&&jsx("p",{children:n})]}):f})]})})})}));A.displayName="DrawerContent";var N=({className:r,title:a$1,description:o,buttons:i=[],...f})=>jsxs("div",{className:a("mb-7",r),...f,children:[jsxs("div",{className:"flex justify-between gap-2",children:[a$1&&jsx(C,{children:a$1}),!Array.isArray(i)&&i.visible!==!1&&jsx(c,{size:"sm",variant:"ghost",...i}),Array.isArray(i)&&jsx("div",{className:"flex gap-1",children:i.map(({visible:c=!0,...n},d)=>c?jsx(c$1,{variant:"ghost",size:"sm",...n},d):null)})]}),o&&jsx(P,{className:"mt-1",children:o})]});N.displayName="DrawerHeader";var O=({className:r,...a$1})=>jsx("div",{className:a("mt-auto flex pt-6",r),...a$1});O.displayName="DrawerFooter";var C=s.forwardRef(({className:r,...a$1},o)=>jsx(t.Title,{ref:o,className:a("font-jakarta text-2xl font-semibold leading-[130%] text-neutral-900",r),...a$1}));C.displayName=t.Title.displayName;var P=s.forwardRef(({className:r,...a$1},o)=>jsx(t.Description,{ref:o,className:a("text-sm leading-[130%] text-neutral-900",r),...a$1}));P.displayName=t.Description.displayName;export{V as a,h as b,j as c,B as d,k as e,x as f,A as g,N as h,O as i,C as j,P as k};
|
package/dist/drawer.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as Drawer,e as DrawerClose,g as DrawerContent,k as DrawerDescription,i as DrawerFooter,h as DrawerHeader,f as DrawerOverlay,d as DrawerPortal,a as DrawerSizes,j as DrawerTitle,c as DrawerTrigger}from'./chunk-
|
|
1
|
+
export{b as Drawer,e as DrawerClose,g as DrawerContent,k as DrawerDescription,i as DrawerFooter,h as DrawerHeader,f as DrawerOverlay,d as DrawerPortal,a as DrawerSizes,j as DrawerTitle,c as DrawerTrigger}from'./chunk-X47ITJEB.mjs';import'./chunk-562EYVK4.mjs';import'./chunk-GIQQT37U.mjs';import'./chunk-JGL2V7EX.mjs';import'./chunk-KSIZIAKW.mjs';import'./chunk-WGMDH4XX.mjs';import'./chunk-4ZB4CDZE.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
|