@vlrc-fe/components 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +193 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +42 -0
- package/dist/index10.cjs +1 -0
- package/dist/index10.js +85 -0
- package/dist/index100.cjs +1 -0
- package/dist/index100.js +65 -0
- package/dist/index101.cjs +1 -0
- package/dist/index101.js +48 -0
- package/dist/index102.cjs +1 -0
- package/dist/index102.js +67 -0
- package/dist/index103.cjs +1 -0
- package/dist/index103.js +151 -0
- package/dist/index104.cjs +1 -0
- package/dist/index104.js +23 -0
- package/dist/index105.cjs +1 -0
- package/dist/index105.js +27 -0
- package/dist/index106.cjs +1 -0
- package/dist/index106.js +53 -0
- package/dist/index107.cjs +1 -0
- package/dist/index107.js +161 -0
- package/dist/index108.cjs +1 -0
- package/dist/index108.js +16 -0
- package/dist/index109.cjs +1 -0
- package/dist/index11.cjs +1 -0
- package/dist/index11.js +86 -0
- package/dist/index12.cjs +1 -0
- package/dist/index12.js +122 -0
- package/dist/index13.cjs +1 -0
- package/dist/index13.js +14 -0
- package/dist/index14.cjs +1 -0
- package/dist/index14.js +16 -0
- package/dist/index15.cjs +1 -0
- package/dist/index15.js +115 -0
- package/dist/index16.cjs +1 -0
- package/dist/index16.js +727 -0
- package/dist/index17.cjs +1 -0
- package/dist/index17.js +348 -0
- package/dist/index18.cjs +1 -0
- package/dist/index18.js +76 -0
- package/dist/index19.cjs +1 -0
- package/dist/index19.js +14 -0
- package/dist/index2.cjs +1 -0
- package/dist/index2.js +122 -0
- package/dist/index20.cjs +1 -0
- package/dist/index20.js +116 -0
- package/dist/index21.cjs +1 -0
- package/dist/index21.js +35 -0
- package/dist/index22.cjs +1 -0
- package/dist/index22.js +18 -0
- package/dist/index23.cjs +1 -0
- package/dist/index23.js +27 -0
- package/dist/index24.cjs +1 -0
- package/dist/index24.js +35 -0
- package/dist/index25.cjs +1 -0
- package/dist/index25.js +97 -0
- package/dist/index26.cjs +1 -0
- package/dist/index26.js +28 -0
- package/dist/index27.cjs +1 -0
- package/dist/index27.js +14 -0
- package/dist/index28.cjs +1 -0
- package/dist/index28.js +67 -0
- package/dist/index29.cjs +1 -0
- package/dist/index29.js +13 -0
- package/dist/index3.cjs +1 -0
- package/dist/index3.js +8 -0
- package/dist/index30.cjs +1 -0
- package/dist/index30.js +35 -0
- package/dist/index31.cjs +1 -0
- package/dist/index31.js +43 -0
- package/dist/index32.cjs +1 -0
- package/dist/index32.js +14 -0
- package/dist/index33.cjs +1 -0
- package/dist/index33.js +64 -0
- package/dist/index34.cjs +1 -0
- package/dist/index34.js +23 -0
- package/dist/index35.cjs +1 -0
- package/dist/index35.js +34 -0
- package/dist/index36.cjs +1 -0
- package/dist/index36.js +27 -0
- package/dist/index37.cjs +1 -0
- package/dist/index37.js +26 -0
- package/dist/index38.cjs +1 -0
- package/dist/index38.js +157 -0
- package/dist/index39.cjs +1 -0
- package/dist/index39.js +34 -0
- package/dist/index4.cjs +1 -0
- package/dist/index4.js +43 -0
- package/dist/index40.cjs +1 -0
- package/dist/index40.js +46 -0
- package/dist/index41.cjs +1 -0
- package/dist/index41.js +118 -0
- package/dist/index42.cjs +1 -0
- package/dist/index42.js +125 -0
- package/dist/index43.cjs +1 -0
- package/dist/index43.js +26 -0
- package/dist/index44.cjs +1 -0
- package/dist/index44.js +88 -0
- package/dist/index45.cjs +1 -0
- package/dist/index45.js +221 -0
- package/dist/index46.cjs +1 -0
- package/dist/index46.js +166 -0
- package/dist/index47.cjs +1 -0
- package/dist/index47.js +126 -0
- package/dist/index48.cjs +1 -0
- package/dist/index48.js +15 -0
- package/dist/index49.cjs +1 -0
- package/dist/index49.js +9 -0
- package/dist/index5.cjs +1 -0
- package/dist/index5.js +24 -0
- package/dist/index50.cjs +1 -0
- package/dist/index50.js +17 -0
- package/dist/index51.cjs +1 -0
- package/dist/index51.js +22 -0
- package/dist/index52.cjs +1 -0
- package/dist/index52.js +18 -0
- package/dist/index53.cjs +1 -0
- package/dist/index53.js +6 -0
- package/dist/index54.cjs +1 -0
- package/dist/index54.js +7 -0
- package/dist/index55.cjs +1 -0
- package/dist/index55.js +8 -0
- package/dist/index56.cjs +1 -0
- package/dist/index56.js +7 -0
- package/dist/index57.cjs +1 -0
- package/dist/index57.js +7 -0
- package/dist/index58.cjs +1 -0
- package/dist/index58.js +9 -0
- package/dist/index59.cjs +1 -0
- package/dist/index59.js +69 -0
- package/dist/index6.cjs +1 -0
- package/dist/index6.js +51 -0
- package/dist/index60.cjs +1 -0
- package/dist/index60.js +11 -0
- package/dist/index61.cjs +1 -0
- package/dist/index61.js +202 -0
- package/dist/index62.cjs +1 -0
- package/dist/index62.js +124 -0
- package/dist/index63.cjs +1 -0
- package/dist/index63.js +32 -0
- package/dist/index64.cjs +1 -0
- package/dist/index64.js +20 -0
- package/dist/index65.cjs +1 -0
- package/dist/index65.js +69 -0
- package/dist/index66.cjs +1 -0
- package/dist/index66.js +32 -0
- package/dist/index67.cjs +1 -0
- package/dist/index67.js +11 -0
- package/dist/index68.cjs +1 -0
- package/dist/index68.js +280 -0
- package/dist/index69.cjs +1 -0
- package/dist/index69.js +157 -0
- package/dist/index7.cjs +1 -0
- package/dist/index7.js +88 -0
- package/dist/index70.cjs +1 -0
- package/dist/index70.js +20 -0
- package/dist/index71.cjs +1 -0
- package/dist/index71.js +10 -0
- package/dist/index72.cjs +1 -0
- package/dist/index72.js +14 -0
- package/dist/index73.cjs +1 -0
- package/dist/index73.js +8 -0
- package/dist/index74.cjs +1 -0
- package/dist/index74.js +8 -0
- package/dist/index75.cjs +1 -0
- package/dist/index75.js +11 -0
- package/dist/index76.cjs +1 -0
- package/dist/index76.js +10 -0
- package/dist/index77.cjs +1 -0
- package/dist/index77.js +6 -0
- package/dist/index78.cjs +1 -0
- package/dist/index78.js +8 -0
- package/dist/index79.cjs +1 -0
- package/dist/index79.js +8 -0
- package/dist/index8.cjs +1 -0
- package/dist/index8.js +68 -0
- package/dist/index80.cjs +1 -0
- package/dist/index80.js +10 -0
- package/dist/index81.cjs +1 -0
- package/dist/index81.js +11 -0
- package/dist/index82.cjs +1 -0
- package/dist/index82.js +15 -0
- package/dist/index83.cjs +1 -0
- package/dist/index83.js +11 -0
- package/dist/index84.cjs +1 -0
- package/dist/index84.js +11 -0
- package/dist/index85.cjs +1 -0
- package/dist/index85.js +6 -0
- package/dist/index86.cjs +1 -0
- package/dist/index86.js +43 -0
- package/dist/index87.cjs +1 -0
- package/dist/index87.js +382 -0
- package/dist/index88.cjs +1 -0
- package/dist/index88.js +40 -0
- package/dist/index89.cjs +1 -0
- package/dist/index89.js +23 -0
- package/dist/index9.cjs +1 -0
- package/dist/index9.js +20 -0
- package/dist/index90.cjs +1 -0
- package/dist/index90.js +59 -0
- package/dist/index91.cjs +1 -0
- package/dist/index91.js +55 -0
- package/dist/index92.cjs +1 -0
- package/dist/index92.js +54 -0
- package/dist/index93.cjs +1 -0
- package/dist/index93.js +57 -0
- package/dist/index94.cjs +1 -0
- package/dist/index94.js +57 -0
- package/dist/index95.cjs +1 -0
- package/dist/index95.js +88 -0
- package/dist/index96.cjs +1 -0
- package/dist/index96.js +66 -0
- package/dist/index97.cjs +1 -0
- package/dist/index97.js +594 -0
- package/dist/index98.cjs +9 -0
- package/dist/index98.js +30 -0
- package/dist/index99.cjs +1 -0
- package/dist/index99.js +50 -0
- package/package.json +82 -0
package/dist/index47.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index45.cjs");let t=require("react");var n=({forwardedRef:n,...r})=>{let{options:i,onValueChange:a,defaultValue:o=[],animationConfig:s,maxCount:c=3,responsive:l,minWidth:u,maxWidth:d,deduplicateOptions:f=!1,resetOnDefaultValueChange:p=!0,closeOnSelect:m=!1,searchable:h=!0,autoSize:g=!1,disabled:_=!1}=r,[v,y]=(0,t.useState)(o),[b,x]=(0,t.useState)(!1),[S,C]=(0,t.useState)(!1),[w,T]=(0,t.useState)(``),[E,D]=(0,t.useState)(`desktop`),[O,k]=(0,t.useState)(``),[A,j]=(0,t.useState)(``),M=(0,t.useRef)(v.length),N=(0,t.useRef)(b),P=(0,t.useRef)(w),F=(0,t.useId)(),I=`${F}-listbox`,L=`${F}-description`,R=`${F}-count`,z=(0,t.useRef)(o),B=(0,t.useRef)(null),V=(0,t.useCallback)((e,t=`polite`)=>{t===`assertive`?(j(e),setTimeout(()=>j(``),100)):(k(e),setTimeout(()=>k(``),100))},[]),H=(0,t.useCallback)(()=>{let{options:t,duplicates:n}=e.buildAllOptions(i,f);return t},[f,i]),U=(0,t.useCallback)(e=>H().find(t=>t.value===e),[H]),W=(0,t.useMemo)(()=>e.filterOptions(i,w,h),[i,w,h]),G=e=>{if(!_){if(e.key===`Enter`)x(!0);else if(e.key===`Backspace`&&!e.currentTarget.value){let e=[...v];e.pop(),y(e),a(e)}}},K=e=>{if(_||U(e)?.disabled)return;let t=v.includes(e)?v.filter(t=>t!==e):[...v,e];y(t),a(t),m&&x(!1)},q=()=>{_||(y([]),a([]))},J=()=>{_||x(e=>!e)},Y=(0,t.useMemo)(()=>e.computeResponsiveSettings(l,c,E),[l,c,E]),X=()=>{if(_)return;let e=v.slice(0,Y.maxCount);y(e),a(e)},Z=()=>{if(_)return;let e=H().filter(e=>!e.disabled);if(v.length===e.length)q();else{let t=e.map(e=>e.value);y(t),a(t)}m&&x(!1)},Q=(0,t.useMemo)(()=>e.buildWidthConstraints(E,g,u,d),[g,d,u,E]);(0,t.useEffect)(()=>{if(!p)return;let t=z.current;e.arraysEqual(t,o)||(e.arraysEqual(v,o)||y(o),z.current=[...o])},[e.arraysEqual,o,p,v]),(0,t.useEffect)(()=>{b||T(``)},[b]),(0,t.useEffect)(()=>{let t=v.length,n=H(),r=n.filter(e=>!e.disabled).length;if(t!==M.current){let e=t-M.current;if(e>0){let i=v.slice(-e).map(e=>n.find(t=>t.value===e)?.label).filter(Boolean);i.length===1?V(`${i[0]} selected. ${t} of ${r} options selected.`):V(`${i.length} options selected. ${t} of ${r} total selected.`)}else e<0&&V(`Option removed. ${t} of ${r} options selected.`);M.current=t}if(b!==N.current&&(V(b?`Dropdown opened. ${r} options available. Use arrow keys to navigate.`:`Dropdown closed.`),N.current=b),w!==P.current&&w!==void 0){if(w&&b){let t=e.countMatchingOptions(n,w);V(`${t} option${t===1?``:`s`} found for "${w}"`)}P.current=w}},[V,e.countMatchingOptions,H,b,w,v]),(0,t.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>{let e=window.innerWidth;D(e<640?`mobile`:e<1024?`tablet`:`desktop`)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let $=(0,t.useMemo)(()=>e.buildBadgeAnimationClass(S,s),[s,S]),ee=(0,t.useMemo)(()=>e.buildPopoverAnimationClass(s),[s]);return(0,t.useImperativeHandle)(n,()=>({reset:()=>{y(o),x(!1),T(``),a(o)},getSelectedValues:()=>v,setSelectedValues:e=>{y(e),a(e)},clear:()=>{y([]),a([])},focus:()=>{if(B.current){B.current.focus();let e=B.current.style.outline,t=B.current.style.outlineOffset;B.current.style.outline=`2px solid hsl(var(--ring))`,B.current.style.outlineOffset=`2px`,setTimeout(()=>{B.current&&(B.current.style.outline=e,B.current.style.outlineOffset=t)},1e3)}}}),[o,n,a,v]),{ids:{multiSelectId:F,listboxId:I,triggerDescriptionId:L,selectedCountId:R},state:{selectedValues:v,isPopoverOpen:b,isAnimating:S,searchValue:w,screenSize:E},derived:{filteredOptions:W,responsiveSettings:Y,widthConstraints:Q,badgeAnimationClass:$,popoverAnimationClass:ee},refs:{buttonRef:B},helpers:{getAllOptions:H,getOptionByValue:U},a11yMessages:{politeMessage:O,assertiveMessage:A},handlers:{setIsPopoverOpen:x,handleTogglePopover:J,handleInputKeyDown:G,toggleOption:K,handleClear:q,clearExtraOptions:X,toggleAll:Z,setSearchValue:T,setIsAnimating:C}}};exports.useMultiSelect=n;
|
package/dist/index47.js
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { cn as e } from "./index3.js";
|
|
2
|
+
import { Button as t } from "./index6.js";
|
|
3
|
+
import { Popover as n, PopoverContent as ee, PopoverTrigger as r } from "./index21.js";
|
|
4
|
+
import { Icons as te } from "./index41.js";
|
|
5
|
+
import { LiveRegion as ne, OptionsContent as re, PlaceholderContent as i, SelectedValuesContent as a } from "./index45.js";
|
|
6
|
+
import { useMultiSelect as o } from "./index46.js";
|
|
7
|
+
import "react";
|
|
8
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
9
|
+
//#region src/MultiSelect/MultiSelect.tsx
|
|
10
|
+
var u = ({ options: u, onValueChange: d, variant: f, defaultValue: p = [], value: m, placeholder: h = "Select options", animation: g = 0, animationConfig: _, maxCount: ie = 3, modalPopover: ae = !1, className: v, hideSelectAll: y = !1, searchable: b = !0, emptyIndicator: x, autoSize: S = !1, singleLine: C = !1, popoverClassName: w, disabled: T = !1, responsive: E, minWidth: D, maxWidth: O, deduplicateOptions: k = !1, resetOnDefaultValueChange: A = !0, closeOnSelect: j = !1, ref: M, ...N }) => {
|
|
11
|
+
let { ids: P, state: F, derived: I, refs: L, helpers: R, a11yMessages: z, handlers: B } = o({
|
|
12
|
+
options: u,
|
|
13
|
+
onValueChange: d,
|
|
14
|
+
defaultValue: m || p,
|
|
15
|
+
animation: g,
|
|
16
|
+
animationConfig: _,
|
|
17
|
+
maxCount: ie,
|
|
18
|
+
responsive: E,
|
|
19
|
+
minWidth: D,
|
|
20
|
+
maxWidth: O,
|
|
21
|
+
deduplicateOptions: k,
|
|
22
|
+
resetOnDefaultValueChange: A,
|
|
23
|
+
closeOnSelect: j,
|
|
24
|
+
searchable: b,
|
|
25
|
+
autoSize: S,
|
|
26
|
+
disabled: T,
|
|
27
|
+
forwardedRef: M
|
|
28
|
+
}), { selectedValues: V, isPopoverOpen: H, isAnimating: U, searchValue: W, screenSize: G } = F, { filteredOptions: K, responsiveSettings: q, widthConstraints: J, badgeAnimationClass: oe, popoverAnimationClass: se } = I, { buttonRef: ce } = L, { getAllOptions: Y, getOptionByValue: X } = R, { politeMessage: le, assertiveMessage: ue } = z, { setIsPopoverOpen: Z, handleTogglePopover: de, handleInputKeyDown: fe, toggleOption: Q, handleClear: $, clearExtraOptions: pe, toggleAll: me, setSearchValue: he, setIsAnimating: ge } = B, _e = (e) => {
|
|
29
|
+
T || Z(e);
|
|
30
|
+
}, ve = `Multi-select: ${V.length} of ${Y().length} options selected. ${h}`;
|
|
31
|
+
return /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(ne, {
|
|
32
|
+
politeMessage: le,
|
|
33
|
+
assertiveMessage: ue
|
|
34
|
+
}), /* @__PURE__ */ l(n, {
|
|
35
|
+
open: H,
|
|
36
|
+
onOpenChange: _e,
|
|
37
|
+
modal: ae,
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ c("div", {
|
|
40
|
+
id: P.triggerDescriptionId,
|
|
41
|
+
className: "sr-only",
|
|
42
|
+
children: "Multi-select dropdown. Use arrow keys to navigate, Enter to select, and Escape to close."
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ c("div", {
|
|
45
|
+
id: P.selectedCountId,
|
|
46
|
+
className: "sr-only",
|
|
47
|
+
"aria-live": "polite",
|
|
48
|
+
children: V.length === 0 ? "No options selected" : `${V.length} option${V.length === 1 ? "" : "s"} selected: ${V.map((e) => X(e)?.label).filter(Boolean).join(", ")}`
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ c(r, {
|
|
51
|
+
asChild: !0,
|
|
52
|
+
children: /* @__PURE__ */ c(t, {
|
|
53
|
+
ref: ce,
|
|
54
|
+
...N,
|
|
55
|
+
onClick: de,
|
|
56
|
+
disabled: T,
|
|
57
|
+
role: "combobox",
|
|
58
|
+
"aria-expanded": H,
|
|
59
|
+
"aria-haspopup": "listbox",
|
|
60
|
+
"aria-controls": H ? P.listboxId : void 0,
|
|
61
|
+
"aria-describedby": `${P.triggerDescriptionId} ${P.selectedCountId}`,
|
|
62
|
+
"aria-label": ve,
|
|
63
|
+
className: e("flex p-1 rounded-md border min-h-10 h-auto items-center justify-between bg-inherit hover:bg-inherit [&_svg]:pointer-events-auto", S ? "w-auto" : "w-full", q.compactMode && "min-h-8 text-sm", G === "mobile" && "min-h-12 text-base", T && "opacity-50 cursor-not-allowed", v),
|
|
64
|
+
style: {
|
|
65
|
+
...J,
|
|
66
|
+
maxWidth: `min(${J.maxWidth}, 100%)`
|
|
67
|
+
},
|
|
68
|
+
children: V.length > 0 ? /* @__PURE__ */ c(a, {
|
|
69
|
+
selectedValues: V,
|
|
70
|
+
responsiveSettings: q,
|
|
71
|
+
screenSize: G,
|
|
72
|
+
singleLine: C,
|
|
73
|
+
animation: g,
|
|
74
|
+
animationConfig: _,
|
|
75
|
+
badgeAnimationClass: oe,
|
|
76
|
+
variant: f,
|
|
77
|
+
getOptionByValue: X,
|
|
78
|
+
toggleOption: Q,
|
|
79
|
+
clearExtraOptions: pe,
|
|
80
|
+
handleClear: $
|
|
81
|
+
}) : /* @__PURE__ */ c(i, { placeholder: h })
|
|
82
|
+
})
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ c(ee, {
|
|
85
|
+
id: P.listboxId,
|
|
86
|
+
role: "listbox",
|
|
87
|
+
"aria-multiselectable": "true",
|
|
88
|
+
"aria-label": "Available options",
|
|
89
|
+
className: e("w-auto p-0", se, G === "mobile" && "w-[85vw] max-w-70", G === "tablet" && "w-[70vw] max-w-md", G === "desktop" && "min-w-75", w),
|
|
90
|
+
style: {
|
|
91
|
+
animationDuration: `${_?.duration || g}s`,
|
|
92
|
+
animationDelay: `${_?.delay || 0}s`,
|
|
93
|
+
maxWidth: `min(${J.maxWidth}, 85vw)`,
|
|
94
|
+
maxHeight: G === "mobile" ? "70vh" : "60vh",
|
|
95
|
+
touchAction: "manipulation"
|
|
96
|
+
},
|
|
97
|
+
align: "start",
|
|
98
|
+
onEscapeKeyDown: () => Z(!1),
|
|
99
|
+
children: /* @__PURE__ */ c(re, {
|
|
100
|
+
filteredOptions: K,
|
|
101
|
+
hideSelectAll: y,
|
|
102
|
+
searchValue: W,
|
|
103
|
+
searchable: b,
|
|
104
|
+
selectedValues: V,
|
|
105
|
+
getAllOptions: Y,
|
|
106
|
+
toggleAll: me,
|
|
107
|
+
toggleOption: Q,
|
|
108
|
+
handleClear: $,
|
|
109
|
+
setIsPopoverOpen: Z,
|
|
110
|
+
handleInputKeyDown: fe,
|
|
111
|
+
setSearchValue: he,
|
|
112
|
+
multiSelectId: P.multiSelectId,
|
|
113
|
+
emptyIndicator: x,
|
|
114
|
+
screenSize: G
|
|
115
|
+
})
|
|
116
|
+
}),
|
|
117
|
+
g > 0 && V.length > 0 && /* @__PURE__ */ c(te.WandSparkles, {
|
|
118
|
+
className: e("cursor-pointer my-2 text-foreground bg-background w-3 h-3", U ? "" : "text-muted-foreground"),
|
|
119
|
+
onClick: () => ge(!U)
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
})] });
|
|
123
|
+
};
|
|
124
|
+
u.displayName = "MultiSelect";
|
|
125
|
+
//#endregion
|
|
126
|
+
export { u as default };
|
package/dist/index48.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index4.cjs"),t=require("./index7.cjs"),n=require("./index22.cjs"),r=require("./index42.cjs"),i=require("./index46.cjs"),a=require("./index47.cjs");require("react");let o=require("react/jsx-runtime");var s=({options:s,onValueChange:c,variant:l,defaultValue:ee=[],value:te,placeholder:u=`Select options`,animation:d=0,animationConfig:f,maxCount:p=3,modalPopover:ne=!1,className:m,hideSelectAll:h=!1,searchable:g=!0,emptyIndicator:_,autoSize:v=!1,singleLine:re=!1,popoverClassName:ie,disabled:y=!1,responsive:b,minWidth:x,maxWidth:S,deduplicateOptions:C=!1,resetOnDefaultValueChange:w=!0,closeOnSelect:T=!1,ref:E,...D})=>{let{ids:O,state:k,derived:A,refs:j,helpers:M,a11yMessages:N,handlers:P}=a.useMultiSelect({options:s,onValueChange:c,defaultValue:te||ee,animation:d,animationConfig:f,maxCount:p,responsive:b,minWidth:x,maxWidth:S,deduplicateOptions:C,resetOnDefaultValueChange:w,closeOnSelect:T,searchable:g,autoSize:v,disabled:y,forwardedRef:E}),{selectedValues:F,isPopoverOpen:I,isAnimating:L,searchValue:R,screenSize:z}=k,{filteredOptions:B,responsiveSettings:V,widthConstraints:H,badgeAnimationClass:U,popoverAnimationClass:W}=A,{buttonRef:G}=j,{getAllOptions:K,getOptionByValue:q}=M,{politeMessage:J,assertiveMessage:Y}=N,{setIsPopoverOpen:X,handleTogglePopover:ae,handleInputKeyDown:oe,toggleOption:Z,handleClear:Q,clearExtraOptions:$,toggleAll:se,setSearchValue:ce,setIsAnimating:le}=P,ue=e=>{y||X(e)},de=`Multi-select: ${F.length} of ${K().length} options selected. ${u}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.LiveRegion,{politeMessage:J,assertiveMessage:Y}),(0,o.jsxs)(n.Popover,{open:I,onOpenChange:ue,modal:ne,children:[(0,o.jsx)(`div`,{id:O.triggerDescriptionId,className:`sr-only`,children:`Multi-select dropdown. Use arrow keys to navigate, Enter to select, and Escape to close.`}),(0,o.jsx)(`div`,{id:O.selectedCountId,className:`sr-only`,"aria-live":`polite`,children:F.length===0?`No options selected`:`${F.length} option${F.length===1?``:`s`} selected: ${F.map(e=>q(e)?.label).filter(Boolean).join(`, `)}`}),(0,o.jsx)(n.PopoverTrigger,{asChild:!0,children:(0,o.jsx)(t.Button,{ref:G,...D,onClick:ae,disabled:y,role:`combobox`,"aria-expanded":I,"aria-haspopup":`listbox`,"aria-controls":I?O.listboxId:void 0,"aria-describedby":`${O.triggerDescriptionId} ${O.selectedCountId}`,"aria-label":de,className:e.cn(`flex p-1 rounded-md border min-h-10 h-auto items-center justify-between bg-inherit hover:bg-inherit [&_svg]:pointer-events-auto`,v?`w-auto`:`w-full`,V.compactMode&&`min-h-8 text-sm`,z===`mobile`&&`min-h-12 text-base`,y&&`opacity-50 cursor-not-allowed`,m),style:{...H,maxWidth:`min(${H.maxWidth}, 100%)`},children:F.length>0?(0,o.jsx)(i.SelectedValuesContent,{selectedValues:F,responsiveSettings:V,screenSize:z,singleLine:re,animation:d,animationConfig:f,badgeAnimationClass:U,variant:l,getOptionByValue:q,toggleOption:Z,clearExtraOptions:$,handleClear:Q}):(0,o.jsx)(i.PlaceholderContent,{placeholder:u})})}),(0,o.jsx)(n.PopoverContent,{id:O.listboxId,role:`listbox`,"aria-multiselectable":`true`,"aria-label":`Available options`,className:e.cn(`w-auto p-0`,W,z===`mobile`&&`w-[85vw] max-w-70`,z===`tablet`&&`w-[70vw] max-w-md`,z===`desktop`&&`min-w-75`,ie),style:{animationDuration:`${f?.duration||d}s`,animationDelay:`${f?.delay||0}s`,maxWidth:`min(${H.maxWidth}, 85vw)`,maxHeight:z===`mobile`?`70vh`:`60vh`,touchAction:`manipulation`},align:`start`,onEscapeKeyDown:()=>X(!1),children:(0,o.jsx)(i.OptionsContent,{filteredOptions:B,hideSelectAll:h,searchValue:R,searchable:g,selectedValues:F,getAllOptions:K,toggleAll:se,toggleOption:Z,handleClear:Q,setIsPopoverOpen:X,handleInputKeyDown:oe,setSearchValue:ce,multiSelectId:O.multiSelectId,emptyIndicator:_,screenSize:z})}),d>0&&F.length>0&&(0,o.jsx)(r.Icons.WandSparkles,{className:e.cn(`cursor-pointer my-2 text-foreground bg-background w-3 h-3`,L?``:`text-muted-foreground`),onClick:()=>le(!L)})]})]})};s.displayName=`MultiSelect`,exports.default=s;
|
package/dist/index48.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormBase as e } from "./index42.js";
|
|
2
|
+
import t from "./index47.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/Form/FormMultiSelect/FormMultiSelect.tsx
|
|
5
|
+
var r = ({ options: r, ...i }) => /* @__PURE__ */ n(e, {
|
|
6
|
+
...i,
|
|
7
|
+
children: ({ onChange: e, value: i, ...a }) => /* @__PURE__ */ n(t, {
|
|
8
|
+
...a,
|
|
9
|
+
options: r,
|
|
10
|
+
onValueChange: e,
|
|
11
|
+
value: i
|
|
12
|
+
})
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { r as default };
|
package/dist/index49.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index43.cjs"),t=require("./index48.cjs");let n=require("react/jsx-runtime");var r=({options:r,...i})=>(0,n.jsx)(e.FormBase,{...i,children:({onChange:e,value:i,...a})=>(0,n.jsx)(t.default,{...a,options:r,onValueChange:e,value:i})});exports.default=r;
|
package/dist/index49.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
return (t = {}) => {
|
|
4
|
+
let n = t.width ? String(t.width) : e.defaultWidth;
|
|
5
|
+
return e.formats[n] || e.formats[e.defaultWidth];
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { e as buildFormatLongFn };
|
package/dist/index5.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index2.cjs"),t=require("./index4.cjs");let n=require("lucide-react"),r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime"),a=require("@radix-ui/react-accordion");a=e.__toESM(a,1);function o({...e}){return(0,i.jsx)(a.Root,{"data-slot":`accordion`,...e})}function s({className:e,...n}){return(0,i.jsx)(a.Item,{"data-slot":`accordion-item`,className:t.cn(`border-b last:border-b-0`,e),...n})}function c({className:e,children:r,...o}){return(0,i.jsx)(a.Header,{className:`flex`,children:(0,i.jsxs)(a.Trigger,{"data-slot":`accordion-trigger`,className:t.cn(`focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180`,e),...o,children:[r,(0,i.jsx)(n.ChevronDownIcon,{className:`text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200`})]})})}function l({className:e,children:n,...r}){return(0,i.jsx)(a.Content,{"data-slot":`accordion-content`,className:`data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm`,...r,children:(0,i.jsx)(`div`,{className:t.cn(`pt-0 pb-4`,e),children:n})})}exports.Accordion=o,exports.AccordionContent=l,exports.AccordionItem=s,exports.AccordionTrigger=c;
|
package/dist/index5.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cn as e } from "./index3.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { Slot as n } from "@radix-ui/react-slot";
|
|
5
|
+
import { cva as r } from "class-variance-authority";
|
|
6
|
+
//#region src/ui/badge.tsx
|
|
7
|
+
var i = r("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
|
|
8
|
+
variants: { variant: {
|
|
9
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
10
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
11
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
12
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
13
|
+
} },
|
|
14
|
+
defaultVariants: { variant: "default" }
|
|
15
|
+
});
|
|
16
|
+
function a({ className: r, variant: a, asChild: o = !1, ...s }) {
|
|
17
|
+
return /* @__PURE__ */ t(o ? n : "span", {
|
|
18
|
+
"data-slot": "badge",
|
|
19
|
+
className: e(i({ variant: a }), r),
|
|
20
|
+
...s
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { a as Badge, i as badgeVariants };
|
package/dist/index50.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}exports.buildFormatLongFn=e;
|
package/dist/index50.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
return (t, n) => {
|
|
4
|
+
let r = n?.context ? String(n.context) : "standalone", i;
|
|
5
|
+
if (r === "formatting" && e.formattingValues) {
|
|
6
|
+
let t = e.defaultFormattingWidth || e.defaultWidth, r = n?.width ? String(n.width) : t;
|
|
7
|
+
i = e.formattingValues[r] || e.formattingValues[t];
|
|
8
|
+
} else {
|
|
9
|
+
let t = e.defaultWidth, r = n?.width ? String(n.width) : e.defaultWidth;
|
|
10
|
+
i = e.values[r] || e.values[t];
|
|
11
|
+
}
|
|
12
|
+
let a = e.argumentCallback ? e.argumentCallback(t) : t;
|
|
13
|
+
return i[a];
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { e as buildLocalizeFn };
|
package/dist/index51.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}exports.buildLocalizeFn=e;
|
package/dist/index51.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchFn.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
return (r, i = {}) => {
|
|
4
|
+
let a = i.width, o = a && e.matchPatterns[a] || e.matchPatterns[e.defaultMatchWidth], s = r.match(o);
|
|
5
|
+
if (!s) return null;
|
|
6
|
+
let c = s[0], l = a && e.parsePatterns[a] || e.parsePatterns[e.defaultParseWidth], u = Array.isArray(l) ? n(l, (e) => e.test(c)) : t(l, (e) => e.test(c)), d;
|
|
7
|
+
d = e.valueCallback ? e.valueCallback(u) : u, d = i.valueCallback ? i.valueCallback(d) : d;
|
|
8
|
+
let f = r.slice(c.length);
|
|
9
|
+
return {
|
|
10
|
+
value: d,
|
|
11
|
+
rest: f
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function t(e, t) {
|
|
16
|
+
for (let n in e) if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n])) return n;
|
|
17
|
+
}
|
|
18
|
+
function n(e, t) {
|
|
19
|
+
for (let n = 0; n < e.length; n++) if (t(e[n])) return n;
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { e as buildMatchFn };
|
package/dist/index52.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return(r,i={})=>{let a=i.width,o=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=r.match(o);if(!s)return null;let c=s[0],l=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?n(l,e=>e.test(c)):t(l,e=>e.test(c)),d;d=e.valueCallback?e.valueCallback(u):u,d=i.valueCallback?i.valueCallback(d):d;let f=r.slice(c.length);return{value:d,rest:f}}}function t(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function n(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}exports.buildMatchFn=e;
|
package/dist/index52.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
return (t, n = {}) => {
|
|
4
|
+
let r = t.match(e.matchPattern);
|
|
5
|
+
if (!r) return null;
|
|
6
|
+
let i = r[0], a = t.match(e.parsePattern);
|
|
7
|
+
if (!a) return null;
|
|
8
|
+
let o = e.valueCallback ? e.valueCallback(a[0]) : a[0];
|
|
9
|
+
o = n.valueCallback ? n.valueCallback(o) : o;
|
|
10
|
+
let s = t.slice(i.length);
|
|
11
|
+
return {
|
|
12
|
+
value: o,
|
|
13
|
+
rest: s
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { e as buildMatchPatternFn };
|
package/dist/index53.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}exports.buildMatchPatternFn=e;
|
package/dist/index53.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js
|
|
2
|
+
var e = 365.2425, t = 6048e5, n = 864e5, r = 3600 * 24;
|
|
3
|
+
r * 7, r * e / 12 * 3;
|
|
4
|
+
var i = Symbol.for("constructDateFrom");
|
|
5
|
+
//#endregion
|
|
6
|
+
export { i as constructFromSymbol, n as millisecondsInDay, t as millisecondsInWeek };
|
package/dist/index54.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=365.2425,t=6048e5,n=864e5,r=3600*24;r*7,r*e/12*3;var i=Symbol.for(`constructDateFrom`);exports.constructFromSymbol=i,exports.millisecondsInDay=n,exports.millisecondsInWeek=t;
|
package/dist/index54.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { constructFromSymbol as e } from "./index53.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js
|
|
3
|
+
function t(t, n) {
|
|
4
|
+
return typeof t == "function" ? t(n) : t && typeof t == "object" && e in t ? t[e](n) : t instanceof Date ? new t.constructor(n) : new Date(n);
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as default };
|
package/dist/index55.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index54.cjs");function t(t,n){return typeof t==`function`?t(n):t&&typeof t==`object`&&e.constructFromSymbol in t?t[e.constructFromSymbol](n):t instanceof Date?new t.constructor(n):new Date(n)}exports.default=t;
|
package/dist/index55.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import e from "./index54.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/normalizeDates.js
|
|
3
|
+
function t(t, ...n) {
|
|
4
|
+
let r = e.bind(null, t || n.find((e) => typeof e == "object"));
|
|
5
|
+
return n.map(r);
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as normalizeDates };
|
package/dist/index56.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index55.cjs");function t(t,...n){let r=e.default.bind(null,t||n.find(e=>typeof e==`object`));return n.map(r)}exports.normalizeDates=t;
|
package/dist/index56.js
ADDED
package/dist/index57.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={};function t(){return e}exports.getDefaultOptions=t;
|
package/dist/index57.js
ADDED
package/dist/index58.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index55.cjs");function t(t,n){return e.default(n||t,t)}exports.default=t;
|
package/dist/index58.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getDefaultOptions as e } from "./index56.js";
|
|
2
|
+
import t from "./index57.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/startOfWeek.js
|
|
4
|
+
function n(n, r) {
|
|
5
|
+
let i = e(), a = r?.weekStartsOn ?? r?.locale?.options?.weekStartsOn ?? i.weekStartsOn ?? i.locale?.options?.weekStartsOn ?? 0, o = t(n, r?.in), s = o.getDay(), c = (s < a ? 7 : 0) + s - a;
|
|
6
|
+
return o.setDate(o.getDate() - c), o.setHours(0, 0, 0, 0), o;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as default };
|
package/dist/index59.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index57.cjs"),t=require("./index58.cjs");function n(n,r){let i=e.getDefaultOptions(),a=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,o=t.default(n,r?.in),s=o.getDay(),c=(s<a?7:0)+s-a;return o.setDate(o.getDate()-c),o.setHours(0,0,0,0),o}exports.default=n;
|
package/dist/index59.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js
|
|
2
|
+
var e = {
|
|
3
|
+
lessThanXSeconds: {
|
|
4
|
+
one: "less than a second",
|
|
5
|
+
other: "less than {{count}} seconds"
|
|
6
|
+
},
|
|
7
|
+
xSeconds: {
|
|
8
|
+
one: "1 second",
|
|
9
|
+
other: "{{count}} seconds"
|
|
10
|
+
},
|
|
11
|
+
halfAMinute: "half a minute",
|
|
12
|
+
lessThanXMinutes: {
|
|
13
|
+
one: "less than a minute",
|
|
14
|
+
other: "less than {{count}} minutes"
|
|
15
|
+
},
|
|
16
|
+
xMinutes: {
|
|
17
|
+
one: "1 minute",
|
|
18
|
+
other: "{{count}} minutes"
|
|
19
|
+
},
|
|
20
|
+
aboutXHours: {
|
|
21
|
+
one: "about 1 hour",
|
|
22
|
+
other: "about {{count}} hours"
|
|
23
|
+
},
|
|
24
|
+
xHours: {
|
|
25
|
+
one: "1 hour",
|
|
26
|
+
other: "{{count}} hours"
|
|
27
|
+
},
|
|
28
|
+
xDays: {
|
|
29
|
+
one: "1 day",
|
|
30
|
+
other: "{{count}} days"
|
|
31
|
+
},
|
|
32
|
+
aboutXWeeks: {
|
|
33
|
+
one: "about 1 week",
|
|
34
|
+
other: "about {{count}} weeks"
|
|
35
|
+
},
|
|
36
|
+
xWeeks: {
|
|
37
|
+
one: "1 week",
|
|
38
|
+
other: "{{count}} weeks"
|
|
39
|
+
},
|
|
40
|
+
aboutXMonths: {
|
|
41
|
+
one: "about 1 month",
|
|
42
|
+
other: "about {{count}} months"
|
|
43
|
+
},
|
|
44
|
+
xMonths: {
|
|
45
|
+
one: "1 month",
|
|
46
|
+
other: "{{count}} months"
|
|
47
|
+
},
|
|
48
|
+
aboutXYears: {
|
|
49
|
+
one: "about 1 year",
|
|
50
|
+
other: "about {{count}} years"
|
|
51
|
+
},
|
|
52
|
+
xYears: {
|
|
53
|
+
one: "1 year",
|
|
54
|
+
other: "{{count}} years"
|
|
55
|
+
},
|
|
56
|
+
overXYears: {
|
|
57
|
+
one: "over 1 year",
|
|
58
|
+
other: "over {{count}} years"
|
|
59
|
+
},
|
|
60
|
+
almostXYears: {
|
|
61
|
+
one: "almost 1 year",
|
|
62
|
+
other: "almost {{count}} years"
|
|
63
|
+
}
|
|
64
|
+
}, t = (t, n, r) => {
|
|
65
|
+
let i, a = e[t];
|
|
66
|
+
return i = typeof a == "string" ? a : n === 1 ? a.one : a.other.replace("{{count}}", n.toString()), r?.addSuffix ? r.comparison && r.comparison > 0 ? "in " + i : i + " ago" : i;
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { t as formatDistance };
|
package/dist/index6.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index2.cjs"),t=require("./index4.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime"),i=require("@radix-ui/react-slot");var a=(0,require("class-variance-authority").cva)(`inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`}},defaultVariants:{variant:`default`}});function o({className:e,variant:n,asChild:o=!1,...s}){return(0,r.jsx)(o?i.Slot:`span`,{"data-slot":`badge`,className:t.cn(a({variant:n}),e),...s})}exports.Badge=o,exports.badgeVariants=a;
|
package/dist/index6.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { cn as e } from "./index3.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { Slot as n } from "@radix-ui/react-slot";
|
|
5
|
+
import { cva as r } from "class-variance-authority";
|
|
6
|
+
//#region src/ui/button.tsx
|
|
7
|
+
var i = r("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-all disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
11
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
12
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
13
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
14
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
15
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
16
|
+
accent: "bg-accent text-accent-foreground hover:bg-accent/90",
|
|
17
|
+
"accent-cta": "bg-accent text-accent-foreground hover:bg-accent/90 shadow-lg shadow-accent/25 hover:shadow-xl hover:shadow-accent/30 hover:scale-105",
|
|
18
|
+
gradient: "bg-linear-to-r from-primary to-accent text-primary-foreground hover:opacity-95 shadow-lg shadow-primary/25 hover:shadow-xl hover:shadow-primary/30",
|
|
19
|
+
"gradient-success": "bg-gradient-to-r from-emerald-500 to-green-600 hover:from-emerald-600 hover:to-green-700 text-white shadow-lg shadow-emerald-500/30 hover:shadow-emerald-500/40"
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
23
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
24
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
25
|
+
xl: "h-11 rounded-xl px-6 has-[>svg]:px-4",
|
|
26
|
+
"2xl": "h-14 rounded-xl px-8 text-lg has-[>svg]:px-6",
|
|
27
|
+
icon: "size-9",
|
|
28
|
+
"icon-sm": "size-8",
|
|
29
|
+
"icon-lg": "size-10"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
variant: "default",
|
|
34
|
+
size: "default"
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
function a({ className: r, variant: a = "default", size: o = "default", asChild: s = !1, ...c }) {
|
|
38
|
+
return /* @__PURE__ */ t(s ? n : "button", {
|
|
39
|
+
"data-slot": "button",
|
|
40
|
+
"data-variant": a,
|
|
41
|
+
"data-size": o,
|
|
42
|
+
className: e(i({
|
|
43
|
+
variant: a,
|
|
44
|
+
size: o,
|
|
45
|
+
className: r
|
|
46
|
+
})),
|
|
47
|
+
...c
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
export { a as Button, i as buttonVariants };
|
package/dist/index60.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},t=(t,n,r)=>{let i,a=e[t];return i=typeof a==`string`?a:n===1?a.one:a.other.replace(`{{count}}`,n.toString()),r?.addSuffix?r.comparison&&r.comparison>0?`in `+i:i+` ago`:i};exports.formatDistance=t;
|
package/dist/index60.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js
|
|
2
|
+
var e = {
|
|
3
|
+
lastWeek: "'last' eeee 'at' p",
|
|
4
|
+
yesterday: "'yesterday at' p",
|
|
5
|
+
today: "'today at' p",
|
|
6
|
+
tomorrow: "'tomorrow at' p",
|
|
7
|
+
nextWeek: "eeee 'at' p",
|
|
8
|
+
other: "P"
|
|
9
|
+
}, t = (t, n, r, i) => e[t];
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as formatRelative };
|
package/dist/index61.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},t=(t,n,r,i)=>e[t];exports.formatRelative=t;
|