@forsyteco/product-ui 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{active-element-history-BJ1HYFpN.mjs → active-element-history-B7wA4w4L.mjs} +3 -3
- package/dist/autocomplete/autocomplete.d.ts +87 -0
- package/dist/autocomplete/autocomplete.d.ts.map +1 -0
- package/dist/autocomplete/index.cjs +1 -0
- package/dist/autocomplete/index.d.ts +4 -0
- package/dist/autocomplete/index.d.ts.map +1 -0
- package/dist/autocomplete/index.mjs +4 -0
- package/dist/autocomplete/types.d.ts +7 -0
- package/dist/autocomplete/types.d.ts.map +1 -0
- package/dist/autocomplete-DqDP76nV.mjs +318 -0
- package/dist/autocomplete-DuGKfbQn.js +1 -0
- package/dist/avatar/index.mjs +1 -1
- package/dist/{avatar-CN9vtSKm.mjs → avatar-Br4ih6PQ.mjs} +2 -2
- package/dist/breadcrumb/index.cjs +1 -1
- package/dist/breadcrumb/index.mjs +1 -1
- package/dist/{breadcrumb-Bz_JVFcb.mjs → breadcrumb-C81R8CJz.mjs} +2 -2
- package/dist/{breadcrumb-y_RB72EG.js → breadcrumb-DJGlCCR1.js} +1 -1
- package/dist/{bugs-bn44RJ1Q.mjs → bugs-g7aYPtcD.mjs} +1 -1
- package/dist/calendar/calendar.d.ts.map +1 -1
- package/dist/calendar/index.cjs +1 -1
- package/dist/calendar/index.mjs +1 -1
- package/dist/{calendar-CAySGYDy.mjs → calendar-DQdo9vO-.mjs} +1058 -993
- package/dist/calendar-v2NOtsdr.js +1 -0
- package/dist/chevron-right-CIgI-iLu.js +1 -0
- package/dist/{chevron-right-DcjcIxI2.mjs → chevron-right-Ck5BtE5n.mjs} +11 -6
- package/dist/combobox/combobox.d.ts +72 -17
- package/dist/combobox/combobox.d.ts.map +1 -1
- package/dist/combobox/index.cjs +1 -1
- package/dist/combobox/index.d.ts +2 -1
- package/dist/combobox/index.d.ts.map +1 -1
- package/dist/combobox/index.mjs +1 -1
- package/dist/combobox/types.d.ts +7 -0
- package/dist/combobox/types.d.ts.map +1 -0
- package/dist/combobox-B1h2hn6a.js +4 -0
- package/dist/combobox-BHLjk9D9.mjs +293 -0
- package/dist/combobox-DxpuSWuM.js +1 -0
- package/dist/{combobox-Dyen_KC6.mjs → combobox-Umb1ZW9S.mjs} +358 -408
- package/dist/data-table/components/table-body.d.ts.map +1 -1
- package/dist/date-picker/date-picker.d.ts.map +1 -1
- package/dist/{description-CAH1nOgr.mjs → description-hiFZ303Y.mjs} +2 -2
- package/dist/dialog/index.mjs +1 -1
- package/dist/{dialog-nGcnK6o1.mjs → dialog-Cs7TMa7R.mjs} +53 -53
- package/dist/disclosure/index.cjs +1 -1
- package/dist/disclosure/index.mjs +1 -1
- package/dist/{disclosure-CA45jH3I.mjs → disclosure-DOWglOHy.mjs} +8 -12
- package/dist/{disclosure-CGxPdR-8.js → disclosure-qEQ_kll8.js} +1 -1
- package/dist/dropdown-menu/index.cjs +1 -1
- package/dist/dropdown-menu/index.mjs +1 -1
- package/dist/{dropdown-menu-Bj9ftuBZ.mjs → dropdown-menu--aGYYbJi.mjs} +22 -30
- package/dist/dropdown-menu-B9fTvSZe.js +1 -0
- package/dist/{element-movement-B3AVr940.mjs → element-movement-Bad2OqSj.mjs} +4 -4
- package/dist/floating-C1n3e5u7.js +1 -0
- package/dist/{floating-dEgEvBqv.mjs → floating-DQ2M2ViQ.mjs} +429 -425
- package/dist/{focus-management-DUVCz_zm.mjs → focus-management-BGuC9pKE.mjs} +2 -2
- package/dist/{form-fields-CXtJvVC5.mjs → form-fields-Bpp9kTvo.mjs} +2 -2
- package/dist/{frozen-Cpa22rmr.mjs → frozen-CXF36eio.mjs} +2 -2
- package/dist/{hidden-Blo8kfIB.mjs → hidden-H5tOTsXH.mjs} +1 -1
- package/dist/{index-CuNisU0H.mjs → index-Dh75VhI6.mjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +769 -776
- package/dist/{keyboard-Bi11Rnr0.mjs → keyboard-BzaAKRwG.mjs} +1 -1
- package/dist/{label-DAaE-vxI.mjs → label--pGndX3z.mjs} +3 -3
- package/dist/listbox/index.cjs +1 -1
- package/dist/listbox/index.mjs +1 -1
- package/dist/{listbox-DZ4v8TYt.mjs → listbox-3DAgC6_y.mjs} +17 -21
- package/dist/{listbox-BIwbzCji.js → listbox-cpJossI7.js} +1 -1
- package/dist/{open-closed-BkH8ZC7H.mjs → open-closed-Be5nD5U2.mjs} +4 -4
- package/dist/popover/index.cjs +1 -1
- package/dist/popover/index.mjs +1 -1
- package/dist/{popover-BAm_8SCx.mjs → popover-CZO6Afya.mjs} +22 -22
- package/dist/{popover-B5-dVDC1.js → popover-CysmX396.js} +1 -1
- package/dist/{portal-BaBdcS83.mjs → portal-D-TZOwvF.mjs} +6 -6
- package/dist/radio-group/index.cjs +1 -1
- package/dist/radio-group/index.mjs +1 -1
- package/dist/{radio-group-CTf6mrDs.mjs → radio-group-BIQWXrVI.mjs} +8 -8
- package/dist/{radio-group-d2V69c7t.js → radio-group-CbQAsBFv.js} +1 -1
- package/dist/sonner/index.cjs +1 -1
- package/dist/sonner/index.mjs +1 -1
- package/dist/{sonner-CuPfwlK5.js → sonner-BRjN2nJD.js} +1 -1
- package/dist/{sonner-Ce9PJbum.mjs → sonner-Cgc0p6ph.mjs} +3 -5
- package/dist/switch/index.cjs +1 -1
- package/dist/switch/index.mjs +1 -1
- package/dist/{switch-DqAuXwa2.js → switch-D0OrcI50.js} +1 -1
- package/dist/{switch-DKcD0IFH.mjs → switch-Eoi1pTsi.mjs} +13 -13
- package/dist/tabs/index.cjs +1 -1
- package/dist/tabs/index.mjs +1 -1
- package/dist/{tabs-DLqfQ301.mjs → tabs-Cufnu60W.mjs} +15 -15
- package/dist/{tabs-X4sPQQYs.js → tabs-TTkcVq-Q.js} +1 -1
- package/dist/transition/index.mjs +1 -1
- package/dist/{transition-B0MGuDho.mjs → transition-B4KhhkrB.mjs} +4 -4
- package/dist/{transition-D0HuUd2-.mjs → transition-Dfxdl8Si.mjs} +1 -1
- package/dist/{use-event-listener-BjXsgSkG.mjs → use-event-listener-BUA2xXRr.mjs} +1 -1
- package/dist/{use-inert-others-BCB16FKE.mjs → use-inert-others-CgSXXC-d.mjs} +3 -3
- package/dist/{use-is-mounted-COmayWN0.mjs → use-is-mounted-DJc35WXO.mjs} +1 -1
- package/dist/{use-resolve-button-type-637wy6MK.mjs → use-resolve-button-type-BhmWA6Dl.mjs} +2 -2
- package/dist/{use-sync-refs-B0fmGxD4.mjs → use-sync-refs-CDCE8QtA.mjs} +2 -2
- package/dist/{use-tab-direction-BTonGsg0.mjs → use-tab-direction-tJsn3ckX.mjs} +8 -8
- package/dist/{use-text-value-BMXU9EaO.mjs → use-text-value-BKEvykNe.mjs} +2 -2
- package/dist/{use-tree-walker-D25YXIMY.mjs → use-tree-walker-CHC6ccbq.mjs} +2 -2
- package/dist/useFocusRing-BM96K_1O.js +1 -0
- package/dist/useFocusRing-Df1NuOsX.mjs +497 -0
- package/package.json +32 -22
- package/dist/calendar-BIhWkTtG.js +0 -1
- package/dist/chevron-right-HwlOajQy.js +0 -1
- package/dist/combobox-Cm_xVD4l.js +0 -4
- package/dist/dropdown-menu-BPMdVlet.js +0 -1
- package/dist/floating-CTjRm9bt.js +0 -1
- package/dist/useFocusRing-Bocdsy5M.mjs +0 -446
- package/dist/useFocusRing-uXUSOfAR.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRef as a, useEffect as f } from "react";
|
|
2
|
-
import { a as s } from "./use-sync-refs-
|
|
3
|
-
import { i as m } from "./keyboard-
|
|
4
|
-
import { E as l } from "./focus-management-
|
|
2
|
+
import { a as s } from "./use-sync-refs-CDCE8QtA.mjs";
|
|
3
|
+
import { i as m } from "./keyboard-BzaAKRwG.mjs";
|
|
4
|
+
import { E as l } from "./focus-management-BGuC9pKE.mjs";
|
|
5
5
|
function y(t, e) {
|
|
6
6
|
let n = a([]), r = s(t);
|
|
7
7
|
f(() => {
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ComboboxInput, ComboboxOption, ComboboxOptions } from '@headlessui/react';
|
|
2
|
+
import { AutocompleteOption } from './types';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
type Ctx = {
|
|
5
|
+
options: AutocompleteOption[];
|
|
6
|
+
filteredOptions: AutocompleteOption[];
|
|
7
|
+
value: AutocompleteOption | null;
|
|
8
|
+
setValue: (next: AutocompleteOption | null) => void;
|
|
9
|
+
query: string;
|
|
10
|
+
setQuery: (next: string) => void;
|
|
11
|
+
placeholder: string;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
invalid: boolean;
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
setIsOpen: (next: boolean) => void;
|
|
16
|
+
clearable: boolean;
|
|
17
|
+
minQueryLength: number;
|
|
18
|
+
filterFn: (option: AutocompleteOption, query: string) => boolean;
|
|
19
|
+
renderOption?: (option: AutocompleteOption, state: {
|
|
20
|
+
active: boolean;
|
|
21
|
+
selected: boolean;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
}) => React.ReactNode;
|
|
24
|
+
loading: boolean;
|
|
25
|
+
emptyBeforeThresholdText: (min: number) => string;
|
|
26
|
+
emptyAfterThresholdText: string;
|
|
27
|
+
};
|
|
28
|
+
export type AutocompleteRootProps = {
|
|
29
|
+
options: AutocompleteOption[];
|
|
30
|
+
value?: AutocompleteOption | null;
|
|
31
|
+
defaultValue?: AutocompleteOption | null;
|
|
32
|
+
onChange?: (value: AutocompleteOption | null) => void;
|
|
33
|
+
query?: string;
|
|
34
|
+
defaultQuery?: string;
|
|
35
|
+
onQueryChange?: (query: string) => void;
|
|
36
|
+
placeholder?: string;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
invalid?: boolean;
|
|
39
|
+
clearable?: boolean;
|
|
40
|
+
/** Default 1 – options open on first character typed */
|
|
41
|
+
minQueryLength?: number;
|
|
42
|
+
loading?: boolean;
|
|
43
|
+
filterFn?: (option: AutocompleteOption, query: string) => boolean;
|
|
44
|
+
renderOption?: Ctx['renderOption'];
|
|
45
|
+
emptyBeforeThresholdText?: (min: number) => string;
|
|
46
|
+
emptyAfterThresholdText?: string;
|
|
47
|
+
className?: string;
|
|
48
|
+
children: React.ReactNode;
|
|
49
|
+
};
|
|
50
|
+
declare function Root({ options, value: valueProp, defaultValue, onChange, query: queryProp, defaultQuery, onQueryChange, placeholder, disabled, invalid, clearable, minQueryLength, loading, filterFn, renderOption, emptyBeforeThresholdText, emptyAfterThresholdText, className, children, }: AutocompleteRootProps): React.JSX.Element;
|
|
51
|
+
declare function Label({ className, ...props }: React.LabelHTMLAttributes<HTMLLabelElement>): React.JSX.Element;
|
|
52
|
+
declare function Control({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
53
|
+
declare function LeadingIcon({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
54
|
+
type InputProps = Omit<React.ComponentProps<typeof ComboboxInput>, 'displayValue' | 'onChange'> & {
|
|
55
|
+
displayValue?: (option: AutocompleteOption | null) => string;
|
|
56
|
+
onValueTextChange?: (text: string) => void;
|
|
57
|
+
placeholder?: string;
|
|
58
|
+
};
|
|
59
|
+
declare function Input({ className, displayValue, onValueTextChange, onFocus, onBlur, ...props }: InputProps): React.JSX.Element;
|
|
60
|
+
declare function ClearButton({ className, 'aria-label': ariaLabel, onClick, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>): React.JSX.Element | null;
|
|
61
|
+
declare function Options({ className, children, ...props }: Omit<React.ComponentProps<typeof ComboboxOptions>, 'children'> & {
|
|
62
|
+
children?: React.ReactNode;
|
|
63
|
+
}): React.JSX.Element | null;
|
|
64
|
+
declare function Loading({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
65
|
+
declare function Empty({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
66
|
+
declare function Option({ option, className, children, ...props }: Omit<React.ComponentProps<typeof ComboboxOption>, 'value' | 'children'> & {
|
|
67
|
+
option: AutocompleteOption;
|
|
68
|
+
children?: React.ReactNode;
|
|
69
|
+
}): React.JSX.Element;
|
|
70
|
+
declare function Hint({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>): React.JSX.Element;
|
|
71
|
+
declare function Error({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>): React.JSX.Element;
|
|
72
|
+
export declare const Autocomplete: {
|
|
73
|
+
readonly Root: typeof Root;
|
|
74
|
+
readonly Label: typeof Label;
|
|
75
|
+
readonly Control: typeof Control;
|
|
76
|
+
readonly LeadingIcon: typeof LeadingIcon;
|
|
77
|
+
readonly Input: typeof Input;
|
|
78
|
+
readonly ClearButton: typeof ClearButton;
|
|
79
|
+
readonly Options: typeof Options;
|
|
80
|
+
readonly Option: typeof Option;
|
|
81
|
+
readonly Empty: typeof Empty;
|
|
82
|
+
readonly Loading: typeof Loading;
|
|
83
|
+
readonly Hint: typeof Hint;
|
|
84
|
+
readonly Error: typeof Error;
|
|
85
|
+
};
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=autocomplete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../src/autocomplete/autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,aAAa,EACb,cAAc,EACd,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,KAAK,GAAG,GAAG;IACT,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,eAAe,EAAE,kBAAkB,EAAE,CAAC;IACtC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,CAAC,IAAI,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AAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,qBA8CA;AAED,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,qBAE5C;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,qBAE5C;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;CAaf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../autocomplete-DuGKfbQn.js");exports.Autocomplete=e.Autocomplete;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/autocomplete/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/autocomplete/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import { jsx as r, Fragment as U } from "react/jsx-runtime";
|
|
2
|
+
import * as f from "react";
|
|
3
|
+
import { c as i } from "./tailwind-DtaLkIY8.mjs";
|
|
4
|
+
import { H as j, U as z, k as $, a as D } from "./combobox-Umb1ZW9S.mjs";
|
|
5
|
+
const I = f.createContext(null);
|
|
6
|
+
function g() {
|
|
7
|
+
const e = f.useContext(I);
|
|
8
|
+
if (!e) throw new globalThis.Error("Autocomplete.* must be used within <Autocomplete.Root>.");
|
|
9
|
+
return e;
|
|
10
|
+
}
|
|
11
|
+
function G(e, t) {
|
|
12
|
+
const o = t.trim().toLowerCase();
|
|
13
|
+
return o ? e.label.toLowerCase().includes(o) : !0;
|
|
14
|
+
}
|
|
15
|
+
function J({
|
|
16
|
+
options: e,
|
|
17
|
+
value: t,
|
|
18
|
+
defaultValue: o = null,
|
|
19
|
+
onChange: l,
|
|
20
|
+
query: s,
|
|
21
|
+
defaultQuery: u = "",
|
|
22
|
+
onQueryChange: n,
|
|
23
|
+
placeholder: a = "Search…",
|
|
24
|
+
disabled: m = !1,
|
|
25
|
+
invalid: h = !1,
|
|
26
|
+
clearable: c = !0,
|
|
27
|
+
minQueryLength: p = 1,
|
|
28
|
+
loading: x = !1,
|
|
29
|
+
filterFn: q,
|
|
30
|
+
renderOption: C,
|
|
31
|
+
emptyBeforeThresholdText: N = (y) => `Type ${y}+ characters…`,
|
|
32
|
+
emptyAfterThresholdText: O = "No results",
|
|
33
|
+
className: B,
|
|
34
|
+
children: H
|
|
35
|
+
}) {
|
|
36
|
+
const [y, M] = f.useState(o), L = t !== void 0 ? t : y, w = f.useCallback(
|
|
37
|
+
(d) => {
|
|
38
|
+
t === void 0 && M(d), l?.(d);
|
|
39
|
+
},
|
|
40
|
+
[l, t]
|
|
41
|
+
), [S, E] = f.useState(u), b = s !== void 0 ? s : S, k = f.useCallback(
|
|
42
|
+
(d) => {
|
|
43
|
+
s === void 0 && E(d), n?.(d);
|
|
44
|
+
},
|
|
45
|
+
[n, s]
|
|
46
|
+
), [A, T] = f.useState(!1), v = q ?? G, F = f.useMemo(() => b.trim() ? e.filter((d) => v(d, b)) : e, [e, b, v]), Z = f.useMemo(
|
|
47
|
+
() => ({
|
|
48
|
+
options: e,
|
|
49
|
+
filteredOptions: F,
|
|
50
|
+
value: L,
|
|
51
|
+
setValue: w,
|
|
52
|
+
query: b,
|
|
53
|
+
setQuery: k,
|
|
54
|
+
placeholder: a,
|
|
55
|
+
disabled: m,
|
|
56
|
+
invalid: h,
|
|
57
|
+
isOpen: A,
|
|
58
|
+
setIsOpen: T,
|
|
59
|
+
clearable: c,
|
|
60
|
+
minQueryLength: p,
|
|
61
|
+
filterFn: v,
|
|
62
|
+
renderOption: C,
|
|
63
|
+
loading: x,
|
|
64
|
+
emptyBeforeThresholdText: N,
|
|
65
|
+
emptyAfterThresholdText: O
|
|
66
|
+
}),
|
|
67
|
+
[
|
|
68
|
+
e,
|
|
69
|
+
F,
|
|
70
|
+
L,
|
|
71
|
+
w,
|
|
72
|
+
b,
|
|
73
|
+
k,
|
|
74
|
+
a,
|
|
75
|
+
m,
|
|
76
|
+
h,
|
|
77
|
+
A,
|
|
78
|
+
c,
|
|
79
|
+
p,
|
|
80
|
+
v,
|
|
81
|
+
C,
|
|
82
|
+
x,
|
|
83
|
+
N,
|
|
84
|
+
O
|
|
85
|
+
]
|
|
86
|
+
);
|
|
87
|
+
return /* @__PURE__ */ r(I.Provider, { value: Z, children: /* @__PURE__ */ r("div", { className: i("relative", B), children: /* @__PURE__ */ r(
|
|
88
|
+
D,
|
|
89
|
+
{
|
|
90
|
+
by: "id",
|
|
91
|
+
value: L,
|
|
92
|
+
onChange: (d) => w(d),
|
|
93
|
+
disabled: m,
|
|
94
|
+
nullable: !0,
|
|
95
|
+
children: H
|
|
96
|
+
}
|
|
97
|
+
) }) });
|
|
98
|
+
}
|
|
99
|
+
function K({
|
|
100
|
+
className: e,
|
|
101
|
+
...t
|
|
102
|
+
}) {
|
|
103
|
+
return /* @__PURE__ */ r(
|
|
104
|
+
"label",
|
|
105
|
+
{
|
|
106
|
+
...t,
|
|
107
|
+
className: i("mb-1 block text-sm font-medium text-foreground", e)
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
function W({
|
|
112
|
+
className: e,
|
|
113
|
+
...t
|
|
114
|
+
}) {
|
|
115
|
+
return /* @__PURE__ */ r("div", { ...t, className: i("relative", e) });
|
|
116
|
+
}
|
|
117
|
+
function X({
|
|
118
|
+
className: e,
|
|
119
|
+
children: t,
|
|
120
|
+
...o
|
|
121
|
+
}) {
|
|
122
|
+
const l = t ?? /* @__PURE__ */ r("svg", { className: "h-4 w-4", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r(
|
|
123
|
+
"path",
|
|
124
|
+
{
|
|
125
|
+
fillRule: "evenodd",
|
|
126
|
+
d: "M9 3a6 6 0 1 0 3.476 10.892l3.316 3.316a1 1 0 0 0 1.414-1.414l-3.316-3.316A6 6 0 0 0 9 3Zm-4 6a4 4 0 1 1 8 0 4 4 0 0 1-8 0Z",
|
|
127
|
+
clipRule: "evenodd"
|
|
128
|
+
}
|
|
129
|
+
) });
|
|
130
|
+
return /* @__PURE__ */ r(
|
|
131
|
+
"div",
|
|
132
|
+
{
|
|
133
|
+
...o,
|
|
134
|
+
className: i(
|
|
135
|
+
"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-muted-foreground",
|
|
136
|
+
e
|
|
137
|
+
),
|
|
138
|
+
children: l
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
function Y({
|
|
143
|
+
className: e,
|
|
144
|
+
displayValue: t,
|
|
145
|
+
onValueTextChange: o,
|
|
146
|
+
onFocus: l,
|
|
147
|
+
onBlur: s,
|
|
148
|
+
...u
|
|
149
|
+
}) {
|
|
150
|
+
const n = g(), a = t ?? ((c) => c?.label ?? ""), m = u.placeholder ?? n.placeholder, h = {
|
|
151
|
+
...u,
|
|
152
|
+
placeholder: m,
|
|
153
|
+
displayValue: a
|
|
154
|
+
};
|
|
155
|
+
return /* @__PURE__ */ r(
|
|
156
|
+
$,
|
|
157
|
+
{
|
|
158
|
+
...h,
|
|
159
|
+
className: i(
|
|
160
|
+
"w-full rounded-md border bg-background py-2 pl-9 pr-10 text-base leading-5 text-foreground",
|
|
161
|
+
"border-input focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background",
|
|
162
|
+
n.invalid && "border-destructive focus:ring-destructive",
|
|
163
|
+
n.disabled && "cursor-not-allowed opacity-50",
|
|
164
|
+
e
|
|
165
|
+
),
|
|
166
|
+
onChange: (c) => {
|
|
167
|
+
const p = c.target.value;
|
|
168
|
+
if (n.setQuery(p), o?.(p), !n.disabled) {
|
|
169
|
+
const x = p.trim().length;
|
|
170
|
+
n.setIsOpen(x >= n.minQueryLength);
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
onFocus: (c) => {
|
|
174
|
+
l?.(c);
|
|
175
|
+
},
|
|
176
|
+
onBlur: (c) => {
|
|
177
|
+
n.disabled || n.setIsOpen(!1), s?.(c);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
function _({
|
|
183
|
+
className: e,
|
|
184
|
+
"aria-label": t,
|
|
185
|
+
onClick: o,
|
|
186
|
+
...l
|
|
187
|
+
}) {
|
|
188
|
+
const s = g();
|
|
189
|
+
return s.clearable && !!s.value && !s.disabled ? /* @__PURE__ */ r(
|
|
190
|
+
"button",
|
|
191
|
+
{
|
|
192
|
+
type: "button",
|
|
193
|
+
...l,
|
|
194
|
+
"aria-label": t ?? "Clear selection",
|
|
195
|
+
className: i(
|
|
196
|
+
"absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground",
|
|
197
|
+
e
|
|
198
|
+
),
|
|
199
|
+
onClick: (n) => {
|
|
200
|
+
n.preventDefault(), s.setValue(null), s.setQuery(""), s.setIsOpen(!1), o?.(n);
|
|
201
|
+
},
|
|
202
|
+
children: /* @__PURE__ */ r("svg", { className: "h-4 w-4", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r(
|
|
203
|
+
"path",
|
|
204
|
+
{
|
|
205
|
+
fillRule: "evenodd",
|
|
206
|
+
d: "M10 8.586 4.293 2.879A1 1 0 1 0 2.879 4.293L8.586 10l-5.707 5.707a1 1 0 1 0 1.414 1.414L10 11.414l5.707 5.707a1 1 0 0 0 1.414-1.414L11.414 10l5.707-5.707A1 1 0 0 0 15.707 2.88L10 8.586Z",
|
|
207
|
+
clipRule: "evenodd"
|
|
208
|
+
}
|
|
209
|
+
) })
|
|
210
|
+
}
|
|
211
|
+
) : null;
|
|
212
|
+
}
|
|
213
|
+
function P({
|
|
214
|
+
className: e,
|
|
215
|
+
children: t,
|
|
216
|
+
...o
|
|
217
|
+
}) {
|
|
218
|
+
const l = g(), u = l.query.trim().length >= l.minQueryLength;
|
|
219
|
+
if (!l.isOpen || l.disabled || !u) return null;
|
|
220
|
+
const n = l.filteredOptions.length > 0;
|
|
221
|
+
return /* @__PURE__ */ r(
|
|
222
|
+
z,
|
|
223
|
+
{
|
|
224
|
+
...o,
|
|
225
|
+
className: i(
|
|
226
|
+
"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-background py-1 text-base shadow-lg",
|
|
227
|
+
"ring-1 ring-border focus:outline-none",
|
|
228
|
+
e
|
|
229
|
+
),
|
|
230
|
+
children: t || (l.loading ? /* @__PURE__ */ r(R, {}) : n ? l.filteredOptions.map((a) => /* @__PURE__ */ r(V, { option: a }, a.id)) : /* @__PURE__ */ r(Q, {}))
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
function R({ className: e, ...t }) {
|
|
235
|
+
return /* @__PURE__ */ r(
|
|
236
|
+
"div",
|
|
237
|
+
{
|
|
238
|
+
...t,
|
|
239
|
+
className: i("cursor-default select-none px-4 py-2 text-muted-foreground", e),
|
|
240
|
+
children: "Loading…"
|
|
241
|
+
}
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
function Q({ className: e, ...t }) {
|
|
245
|
+
const o = g(), l = o.query.trim().length;
|
|
246
|
+
return /* @__PURE__ */ r(
|
|
247
|
+
"div",
|
|
248
|
+
{
|
|
249
|
+
...t,
|
|
250
|
+
className: i("cursor-default select-none px-4 py-2 text-muted-foreground", e),
|
|
251
|
+
children: l < o.minQueryLength ? o.emptyBeforeThresholdText(o.minQueryLength) : o.emptyAfterThresholdText
|
|
252
|
+
}
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
function V({
|
|
256
|
+
option: e,
|
|
257
|
+
className: t,
|
|
258
|
+
children: o,
|
|
259
|
+
...l
|
|
260
|
+
}) {
|
|
261
|
+
const s = g();
|
|
262
|
+
return /* @__PURE__ */ r(
|
|
263
|
+
j,
|
|
264
|
+
{
|
|
265
|
+
...l,
|
|
266
|
+
value: e,
|
|
267
|
+
disabled: e.disabled,
|
|
268
|
+
className: ({
|
|
269
|
+
active: u,
|
|
270
|
+
selected: n,
|
|
271
|
+
disabled: a
|
|
272
|
+
}) => i(
|
|
273
|
+
"relative select-none py-2 pl-3 pr-4",
|
|
274
|
+
a ? "cursor-not-allowed opacity-50" : "cursor-default",
|
|
275
|
+
u ? "bg-accent text-accent-foreground" : "text-foreground",
|
|
276
|
+
n && "font-medium",
|
|
277
|
+
typeof t == "function" ? t({ active: u, selected: n, disabled: a }) : t
|
|
278
|
+
),
|
|
279
|
+
children: ({
|
|
280
|
+
active: u,
|
|
281
|
+
selected: n,
|
|
282
|
+
disabled: a
|
|
283
|
+
}) => {
|
|
284
|
+
const m = o || (s.renderOption ? s.renderOption(e, { active: u, selected: n, disabled: a }) : e.label);
|
|
285
|
+
return /* @__PURE__ */ r(U, { children: m });
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
);
|
|
289
|
+
}
|
|
290
|
+
function ee({
|
|
291
|
+
className: e,
|
|
292
|
+
...t
|
|
293
|
+
}) {
|
|
294
|
+
return /* @__PURE__ */ r("p", { ...t, className: i("mt-1 text-sm text-muted-foreground", e) });
|
|
295
|
+
}
|
|
296
|
+
function te({
|
|
297
|
+
className: e,
|
|
298
|
+
...t
|
|
299
|
+
}) {
|
|
300
|
+
return /* @__PURE__ */ r("p", { ...t, className: i("mt-1 text-sm text-destructive", e) });
|
|
301
|
+
}
|
|
302
|
+
const le = {
|
|
303
|
+
Root: J,
|
|
304
|
+
Label: K,
|
|
305
|
+
Control: W,
|
|
306
|
+
LeadingIcon: X,
|
|
307
|
+
Input: Y,
|
|
308
|
+
ClearButton: _,
|
|
309
|
+
Options: P,
|
|
310
|
+
Option: V,
|
|
311
|
+
Empty: Q,
|
|
312
|
+
Loading: R,
|
|
313
|
+
Hint: ee,
|
|
314
|
+
Error: te
|
|
315
|
+
};
|
|
316
|
+
export {
|
|
317
|
+
le as A
|
|
318
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime"),_=require("react"),i=require("./tailwind-D2U2F80P.js"),j=require("./combobox-B1h2hn6a.js");function z(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=z(_),A=f.createContext(null);function g(){const e=f.useContext(A);if(!e)throw new globalThis.Error("Autocomplete.* must be used within <Autocomplete.Root>.");return e}function D(e,t){const n=t.trim().toLowerCase();return n?e.label.toLowerCase().includes(n):!0}function U({options:e,value:t,defaultValue:n=null,onChange:r,query:l,defaultQuery:u="",onQueryChange:s,placeholder:c="Search…",disabled:m=!1,invalid:p=!1,clearable:a=!0,minQueryLength:x=1,loading:h=!1,filterFn:V,renderOption:O,emptyBeforeThresholdText:C=y=>`Type ${y}+ characters…`,emptyAfterThresholdText:N="No results",className:S,children:M}){const[y,B]=f.useState(n),w=t!==void 0?t:y,L=f.useCallback(d=>{t===void 0&&B(d),r?.(d)},[r,t]),[T,E]=f.useState(u),b=l!==void 0?l:T,q=f.useCallback(d=>{l===void 0&&E(d),s?.(d)},[s,l]),[R,H]=f.useState(!1),v=V??D,k=f.useMemo(()=>b.trim()?e.filter(d=>v(d,b)):e,[e,b,v]),Z=f.useMemo(()=>({options:e,filteredOptions:k,value:w,setValue:L,query:b,setQuery:q,placeholder:c,disabled:m,invalid:p,isOpen:R,setIsOpen:H,clearable:a,minQueryLength:x,filterFn:v,renderOption:O,loading:h,emptyBeforeThresholdText:C,emptyAfterThresholdText:N}),[e,k,w,L,b,q,c,m,p,R,a,x,v,O,h,C,N]);return o.jsx(A.Provider,{value:Z,children:o.jsx("div",{className:i.cn("relative",S),children:o.jsx(j.Ht,{by:"id",value:w,onChange:d=>L(d),disabled:m,nullable:!0,children:M})})})}function $({className:e,...t}){return o.jsx("label",{...t,className:i.cn("mb-1 block text-sm font-medium text-foreground",e)})}function G({className:e,...t}){return o.jsx("div",{...t,className:i.cn("relative",e)})}function J({className:e,children:t,...n}){const r=t??o.jsx("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:o.jsx("path",{fillRule:"evenodd",d:"M9 3a6 6 0 1 0 3.476 10.892l3.316 3.316a1 1 0 0 0 1.414-1.414l-3.316-3.316A6 6 0 0 0 9 3Zm-4 6a4 4 0 1 1 8 0 4 4 0 0 1-8 0Z",clipRule:"evenodd"})});return o.jsx("div",{...n,className:i.cn("pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-muted-foreground",e),children:r})}function K({className:e,displayValue:t,onValueTextChange:n,onFocus:r,onBlur:l,...u}){const s=g(),c=t??(a=>a?.label??""),m=u.placeholder??s.placeholder,p={...u,placeholder:m,displayValue:c};return o.jsx(j.ko,{...p,className:i.cn("w-full rounded-md border bg-background py-2 pl-9 pr-10 text-base leading-5 text-foreground","border-input focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background",s.invalid&&"border-destructive focus:ring-destructive",s.disabled&&"cursor-not-allowed opacity-50",e),onChange:a=>{const x=a.target.value;if(s.setQuery(x),n?.(x),!s.disabled){const h=x.trim().length;s.setIsOpen(h>=s.minQueryLength)}},onFocus:a=>{r?.(a)},onBlur:a=>{s.disabled||s.setIsOpen(!1),l?.(a)}})}function W({className:e,"aria-label":t,onClick:n,...r}){const l=g();return l.clearable&&!!l.value&&!l.disabled?o.jsx("button",{type:"button",...r,"aria-label":t??"Clear selection",className:i.cn("absolute inset-y-0 right-0 flex items-center px-3 text-muted-foreground hover:text-foreground",e),onClick:s=>{s.preventDefault(),l.setValue(null),l.setQuery(""),l.setIsOpen(!1),n?.(s)},children:o.jsx("svg",{className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:o.jsx("path",{fillRule:"evenodd",d:"M10 8.586 4.293 2.879A1 1 0 1 0 2.879 4.293L8.586 10l-5.707 5.707a1 1 0 1 0 1.414 1.414L10 11.414l5.707 5.707a1 1 0 0 0 1.414-1.414L11.414 10l5.707-5.707A1 1 0 0 0 15.707 2.88L10 8.586Z",clipRule:"evenodd"})})}):null}function X({className:e,children:t,...n}){const r=g(),u=r.query.trim().length>=r.minQueryLength;if(!r.isOpen||r.disabled||!u)return null;const s=r.filteredOptions.length>0;return o.jsx(j.Uo,{...n,className:i.cn("absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-background py-1 text-base shadow-lg","ring-1 ring-border focus:outline-none",e),children:t||(r.loading?o.jsx(F,{}):s?r.filteredOptions.map(c=>o.jsx(Q,{option:c},c.id)):o.jsx(I,{}))})}function F({className:e,...t}){return o.jsx("div",{...t,className:i.cn("cursor-default select-none px-4 py-2 text-muted-foreground",e),children:"Loading…"})}function I({className:e,...t}){const n=g(),r=n.query.trim().length;return o.jsx("div",{...t,className:i.cn("cursor-default select-none px-4 py-2 text-muted-foreground",e),children:r<n.minQueryLength?n.emptyBeforeThresholdText(n.minQueryLength):n.emptyAfterThresholdText})}function Q({option:e,className:t,children:n,...r}){const l=g();return o.jsx(j.Ho,{...r,value:e,disabled:e.disabled,className:({active:u,selected:s,disabled:c})=>i.cn("relative select-none py-2 pl-3 pr-4",c?"cursor-not-allowed opacity-50":"cursor-default",u?"bg-accent text-accent-foreground":"text-foreground",s&&"font-medium",typeof t=="function"?t({active:u,selected:s,disabled:c}):t),children:({active:u,selected:s,disabled:c})=>{const m=n||(l.renderOption?l.renderOption(e,{active:u,selected:s,disabled:c}):e.label);return o.jsx(o.Fragment,{children:m})}})}function Y({className:e,...t}){return o.jsx("p",{...t,className:i.cn("mt-1 text-sm text-muted-foreground",e)})}function P({className:e,...t}){return o.jsx("p",{...t,className:i.cn("mt-1 text-sm text-destructive",e)})}const ee={Root:U,Label:$,Control:G,LeadingIcon:J,Input:K,ClearButton:W,Options:X,Option:Q,Empty:I,Loading:F,Hint:Y,Error:P};exports.Autocomplete=ee;
|
package/dist/avatar/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import * as g from "react";
|
|
|
3
3
|
import N from "react";
|
|
4
4
|
import { c as k } from "./tailwind-DtaLkIY8.mjs";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import { c as re } from "./index-
|
|
6
|
+
import { c as re } from "./index-Dh75VhI6.mjs";
|
|
7
7
|
const b = (r) => {
|
|
8
8
|
let i = 0;
|
|
9
9
|
for (let n = 0; n < r.length; n++) {
|
|
@@ -506,7 +506,7 @@ var ye = [
|
|
|
506
506
|
], $ = ye.reduce((r, i) => {
|
|
507
507
|
const n = re(`Primitive.${i}`), o = g.forwardRef((l, a) => {
|
|
508
508
|
const { asChild: e, ...s } = l, c = e ? n : i;
|
|
509
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ t(c, { ...s, ref: a });
|
|
509
|
+
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ t(c, { ...s, ref: a });
|
|
510
510
|
});
|
|
511
511
|
return o.displayName = `Primitive.${i}`, { ...r, [i]: o };
|
|
512
512
|
}, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../breadcrumb-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../breadcrumb-DJGlCCR1.js");exports.Breadcrumb=r.Breadcrumb;exports.BreadcrumbEllipsis=r.BreadcrumbEllipsis;exports.BreadcrumbItem=r.BreadcrumbItem;exports.BreadcrumbLink=r.BreadcrumbLink;exports.BreadcrumbList=r.BreadcrumbList;exports.BreadcrumbPage=r.BreadcrumbPage;exports.BreadcrumbSeparator=r.BreadcrumbSeparator;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { c as t } from "./tailwind-DtaLkIY8.mjs";
|
|
4
|
-
import { c as i, C as n } from "./chevron-right-
|
|
5
|
-
import { S as o } from "./index-
|
|
4
|
+
import { c as i, C as n } from "./chevron-right-Ck5BtE5n.mjs";
|
|
5
|
+
import { S as o } from "./index-Dh75VhI6.mjs";
|
|
6
6
|
const l = [
|
|
7
7
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
8
8
|
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime");require("react");const t=require("./tailwind-D2U2F80P.js"),s=require("./chevron-right-
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime");require("react");const t=require("./tailwind-D2U2F80P.js"),s=require("./chevron-right-CIgI-iLu.js"),i=require("./index-6ty0K2BA.js");const l=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],u=s.createLucideIcon("ellipsis",l);function o({...e}){return a.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function d({className:e,...r}){return a.jsx("ol",{"data-slot":"breadcrumb-list",className:t.cn("flex flex-wrap items-center gap-1.5 text-base break-words text-muted-foreground sm:gap-2.5",e),...r})}function m({className:e,...r}){return a.jsx("li",{"data-slot":"breadcrumb-item",className:t.cn("inline-flex items-center gap-1.5",e),...r})}function b({asChild:e,className:r,...c}){const n=e?i.Slot:"a";return a.jsx(n,{"data-slot":"breadcrumb-link",className:t.cn("transition-colors hover:text-foreground",r),...c})}function x({className:e,...r}){return a.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:t.cn("font-normal text-foreground",e),...r})}function p({children:e,className:r,...c}){return a.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:t.cn("[&>svg]:size-3.5",r),...c,children:e??a.jsx(s.ChevronRight,{})})}function f({className:e,...r}){return a.jsxs("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:t.cn("flex size-9 items-center justify-center",e),...r,children:[a.jsx(u,{className:"size-4"}),a.jsx("span",{className:"sr-only",children:"More"})]})}exports.Breadcrumb=o;exports.BreadcrumbEllipsis=f;exports.BreadcrumbItem=m;exports.BreadcrumbLink=b;exports.BreadcrumbList=d;exports.BreadcrumbPage=x;exports.BreadcrumbSeparator=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/calendar/calendar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAmB,eAAe,EAAoB,MAAM,cAAc,CAAC;AAClF,OAAO,EACL,SAAS,EAIT,KAAK,SAAS,EAGf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,MAAM,EAAkB,MAAM,WAAW,CAAC;AAEnD,KAAK,oBAAoB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,GAAG;IACzE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACzC,CAAC;AAEF,iBAAS,e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AS,EACT,GAAG,EACH,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,qBAsBxC;AAED,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,eAAe,EAAE,CAAA"}
|
package/dist/calendar/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../calendar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../calendar-v2NOtsdr.js");exports.Calendar=a.Calendar;exports.CalendarDayButton=a.CalendarDayButton;
|
package/dist/calendar/index.mjs
CHANGED