@taicode/common-web 3.7.5 → 3.7.7
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/LICENSE +21 -0
- package/package.json +12 -13
- package/output/components/alert-dialog.d.ts +0 -20
- package/output/components/alert-dialog.d.ts.map +0 -1
- package/output/components/alert-dialog.js +0 -65
- package/output/components/alert.d.ts +0 -11
- package/output/components/alert.d.ts.map +0 -1
- package/output/components/alert.js +0 -38
- package/output/components/avatar.d.ts +0 -13
- package/output/components/avatar.d.ts.map +0 -1
- package/output/components/avatar.js +0 -40
- package/output/components/badge.d.ts +0 -11
- package/output/components/badge.d.ts.map +0 -1
- package/output/components/badge.js +0 -39
- package/output/components/button.d.ts +0 -12
- package/output/components/button.d.ts.map +0 -1
- package/output/components/button.js +0 -48
- package/output/components/calendar.d.ts +0 -13
- package/output/components/calendar.d.ts.map +0 -1
- package/output/components/calendar.js +0 -57
- package/output/components/card.d.ts +0 -13
- package/output/components/card.d.ts.map +0 -1
- package/output/components/card.js +0 -43
- package/output/components/chart.d.ts +0 -56
- package/output/components/chart.d.ts.map +0 -1
- package/output/components/chart.js +0 -127
- package/output/components/checkbox.d.ts +0 -5
- package/output/components/checkbox.d.ts.map +0 -1
- package/output/components/checkbox.js +0 -21
- package/output/components/command.d.ts +0 -20
- package/output/components/command.d.ts.map +0 -1
- package/output/components/command.js +0 -55
- package/output/components/dialog.d.ts +0 -20
- package/output/components/dialog.d.ts.map +0 -1
- package/output/components/dialog.js +0 -58
- package/output/components/direction.d.ts +0 -9
- package/output/components/direction.d.ts.map +0 -1
- package/output/components/direction.js +0 -10
- package/output/components/drawer.d.ts +0 -14
- package/output/components/drawer.d.ts.map +0 -1
- package/output/components/drawer.js +0 -56
- package/output/components/dropdown-menu.d.ts +0 -29
- package/output/components/dropdown-menu.d.ts.map +0 -1
- package/output/components/dropdown-menu.js +0 -78
- package/output/components/field.d.ts +0 -39
- package/output/components/field.d.ts.map +0 -1
- package/output/components/field.js +0 -102
- package/output/components/footer/index.d.ts +0 -27
- package/output/components/footer/index.d.ts.map +0 -1
- package/output/components/footer/index.js +0 -17
- package/output/components/form.d.ts +0 -26
- package/output/components/form.d.ts.map +0 -1
- package/output/components/form.js +0 -69
- package/output/components/index.d.ts +0 -46
- package/output/components/index.d.ts.map +0 -1
- package/output/components/index.js +0 -45
- package/output/components/input-group.d.ts +0 -17
- package/output/components/input-group.d.ts.map +0 -1
- package/output/components/input-group.js +0 -75
- package/output/components/input.d.ts +0 -4
- package/output/components/input.d.ts.map +0 -1
- package/output/components/input.js +0 -19
- package/output/components/item.d.ts +0 -25
- package/output/components/item.d.ts.map +0 -1
- package/output/components/item.js +0 -89
- package/output/components/json-view/index.d.ts +0 -11
- package/output/components/json-view/index.d.ts.map +0 -1
- package/output/components/json-view/index.js +0 -52
- package/output/components/json-view/lazy/index.d.ts +0 -18
- package/output/components/json-view/lazy/index.d.ts.map +0 -1
- package/output/components/json-view/lazy/index.js +0 -22
- package/output/components/kbd.d.ts +0 -4
- package/output/components/kbd.d.ts.map +0 -1
- package/output/components/kbd.js +0 -22
- package/output/components/label.d.ts +0 -5
- package/output/components/label.d.ts.map +0 -1
- package/output/components/label.js +0 -20
- package/output/components/list-actions/index.d.ts +0 -23
- package/output/components/list-actions/index.d.ts.map +0 -1
- package/output/components/list-actions/index.js +0 -15
- package/output/components/loading-button/index.d.ts +0 -44
- package/output/components/loading-button/index.d.ts.map +0 -1
- package/output/components/loading-button/index.js +0 -75
- package/output/components/loading-button/index.test.d.ts +0 -2
- package/output/components/loading-button/index.test.d.ts.map +0 -1
- package/output/components/loading-button/index.test.js +0 -203
- package/output/components/native-select.d.ts +0 -9
- package/output/components/native-select.d.ts.map +0 -1
- package/output/components/native-select.js +0 -28
- package/output/components/page-back-button/index.d.ts +0 -8
- package/output/components/page-back-button/index.d.ts.map +0 -1
- package/output/components/page-back-button/index.js +0 -7
- package/output/components/page-state.d.ts +0 -19
- package/output/components/page-state.d.ts.map +0 -1
- package/output/components/page-state.js +0 -13
- package/output/components/pagination/index.d.ts +0 -34
- package/output/components/pagination/index.d.ts.map +0 -1
- package/output/components/pagination/index.js +0 -75
- package/output/components/popover.d.ts +0 -11
- package/output/components/popover.d.ts.map +0 -1
- package/output/components/popover.js +0 -44
- package/output/components/progress.d.ts +0 -5
- package/output/components/progress.d.ts.map +0 -1
- package/output/components/progress.js +0 -21
- package/output/components/radio-group.d.ts +0 -6
- package/output/components/radio-group.d.ts.map +0 -1
- package/output/components/radio-group.js +0 -25
- package/output/components/route-pending-indicator/index.d.ts +0 -20
- package/output/components/route-pending-indicator/index.d.ts.map +0 -1
- package/output/components/route-pending-indicator/index.js +0 -17
- package/output/components/scroll-area.d.ts +0 -6
- package/output/components/scroll-area.d.ts.map +0 -1
- package/output/components/scroll-area.js +0 -24
- package/output/components/searchable-select/index.d.ts +0 -41
- package/output/components/searchable-select/index.d.ts.map +0 -1
- package/output/components/searchable-select/index.js +0 -46
- package/output/components/select.d.ts +0 -17
- package/output/components/select.d.ts.map +0 -1
- package/output/components/select.js +0 -58
- package/output/components/separator.d.ts +0 -5
- package/output/components/separator.d.ts.map +0 -1
- package/output/components/separator.js +0 -20
- package/output/components/sheet.d.ts +0 -16
- package/output/components/sheet.d.ts.map +0 -1
- package/output/components/sheet.js +0 -58
- package/output/components/sidebar.d.ts +0 -78
- package/output/components/sidebar.d.ts.map +0 -1
- package/output/components/sidebar.js +0 -233
- package/output/components/size-provider/index.d.ts +0 -2
- package/output/components/size-provider/index.d.ts.map +0 -1
- package/output/components/size-provider/index.js +0 -1
- package/output/components/size-provider/size-provider.d.ts +0 -9
- package/output/components/size-provider/size-provider.d.ts.map +0 -1
- package/output/components/size-provider/size-provider.js +0 -29
- package/output/components/skeleton.d.ts +0 -3
- package/output/components/skeleton.d.ts.map +0 -1
- package/output/components/skeleton.js +0 -18
- package/output/components/sonner.d.ts +0 -8
- package/output/components/sonner.d.ts.map +0 -1
- package/output/components/sonner.js +0 -34
- package/output/components/spinner.d.ts +0 -3
- package/output/components/spinner.d.ts.map +0 -1
- package/output/components/spinner.js +0 -19
- package/output/components/switch.d.ts +0 -8
- package/output/components/switch.d.ts.map +0 -1
- package/output/components/switch.js +0 -20
- package/output/components/table.d.ts +0 -11
- package/output/components/table.d.ts.map +0 -1
- package/output/components/table.js +0 -47
- package/output/components/tabs.d.ts +0 -12
- package/output/components/tabs.d.ts.map +0 -1
- package/output/components/tabs.js +0 -45
- package/output/components/textarea.d.ts +0 -4
- package/output/components/textarea.d.ts.map +0 -1
- package/output/components/textarea.js +0 -19
- package/output/components/theme-switcher.d.ts +0 -6
- package/output/components/theme-switcher.d.ts.map +0 -1
- package/output/components/theme-switcher.js +0 -19
- package/output/components/toaster/index.d.ts +0 -16
- package/output/components/toaster/index.d.ts.map +0 -1
- package/output/components/toaster/index.js +0 -70
- package/output/components/toggle-group.d.ts +0 -12
- package/output/components/toggle-group.d.ts.map +0 -1
- package/output/components/toggle-group.js +0 -38
- package/output/components/toggle.d.ts +0 -10
- package/output/components/toggle.d.ts.map +0 -1
- package/output/components/toggle.js +0 -38
- package/output/components/tooltip.d.ts +0 -8
- package/output/components/tooltip.d.ts.map +0 -1
- package/output/components/tooltip.js +0 -33
- package/output/features/confirm-dialog/index.d.ts +0 -41
- package/output/features/confirm-dialog/index.d.ts.map +0 -1
- package/output/features/confirm-dialog/index.js +0 -19
- package/output/features/input-confirm/index.d.ts +0 -26
- package/output/features/input-confirm/index.d.ts.map +0 -1
- package/output/features/input-confirm/index.js +0 -59
- package/output/features/signin/context.d.ts +0 -14
- package/output/features/signin/context.d.ts.map +0 -1
- package/output/features/signin/context.js +0 -13
- package/output/features/signin/index.d.ts +0 -58
- package/output/features/signin/index.d.ts.map +0 -1
- package/output/features/signin/index.js +0 -137
- package/output/features/signin/service.d.ts +0 -92
- package/output/features/signin/service.d.ts.map +0 -1
- package/output/features/signin/service.js +0 -519
- package/output/features/signin/service.test.d.ts +0 -2
- package/output/features/signin/service.test.d.ts.map +0 -1
- package/output/features/signin/service.test.js +0 -211
- package/output/features/signin/types.d.ts +0 -63
- package/output/features/signin/types.d.ts.map +0 -1
- package/output/features/signin/types.js +0 -1
- package/output/hooks/use-loading/index.d.ts +0 -6
- package/output/hooks/use-loading/index.d.ts.map +0 -1
- package/output/hooks/use-loading/index.js +0 -14
- package/output/hooks/use-loading/index.test.d.ts +0 -2
- package/output/hooks/use-loading/index.test.d.ts.map +0 -1
- package/output/hooks/use-loading/index.test.js +0 -24
- package/output/hooks/use-mobile/index.d.ts +0 -2
- package/output/hooks/use-mobile/index.d.ts.map +0 -1
- package/output/hooks/use-mobile/index.js +0 -16
- package/output/hooks/use-observer/index.d.ts +0 -2
- package/output/hooks/use-observer/index.d.ts.map +0 -1
- package/output/hooks/use-observer/index.js +0 -1
- package/output/hooks/use-observer/use-observer.d.ts +0 -3
- package/output/hooks/use-observer/use-observer.d.ts.map +0 -1
- package/output/hooks/use-observer/use-observer.js +0 -16
- package/output/hooks/use-observer/use-observer.test.d.ts +0 -2
- package/output/hooks/use-observer/use-observer.test.d.ts.map +0 -1
- package/output/hooks/use-observer/use-observer.test.js +0 -134
- package/output/hooks/use-offline/index.d.ts +0 -6
- package/output/hooks/use-offline/index.d.ts.map +0 -1
- package/output/hooks/use-offline/index.js +0 -19
- package/output/layout/app/index.d.ts +0 -34
- package/output/layout/app/index.d.ts.map +0 -1
- package/output/layout/app/index.js +0 -34
- package/output/layout/dashboard/index.d.ts +0 -76
- package/output/layout/dashboard/index.d.ts.map +0 -1
- package/output/layout/dashboard/index.js +0 -84
- package/output/layout/index.d.ts +0 -3
- package/output/layout/index.d.ts.map +0 -1
- package/output/layout/index.js +0 -2
- package/output/services/cache-api/cache-api.d.ts +0 -23
- package/output/services/cache-api/cache-api.d.ts.map +0 -1
- package/output/services/cache-api/cache-api.js +0 -145
- package/output/services/cache-api/cache-api.test.d.ts +0 -2
- package/output/services/cache-api/cache-api.test.d.ts.map +0 -1
- package/output/services/cache-api/cache-api.test.js +0 -610
- package/output/services/cache-api/index.d.ts +0 -2
- package/output/services/cache-api/index.d.ts.map +0 -1
- package/output/services/cache-api/index.js +0 -1
- package/output/services/cached-fetch/index.d.ts +0 -50
- package/output/services/cached-fetch/index.d.ts.map +0 -1
- package/output/services/cached-fetch/index.js +0 -196
- package/output/services/service/index.d.ts +0 -2
- package/output/services/service/index.d.ts.map +0 -1
- package/output/services/service/index.js +0 -1
- package/output/services/service/service.d.ts +0 -135
- package/output/services/service/service.d.ts.map +0 -1
- package/output/services/service/service.js +0 -276
- package/output/services/service/service.test.d.ts +0 -2
- package/output/services/service/service.test.d.ts.map +0 -1
- package/output/services/service/service.test.js +0 -1399
- package/output/services/side-cache/index.d.ts +0 -2
- package/output/services/side-cache/index.d.ts.map +0 -1
- package/output/services/side-cache/index.js +0 -1
- package/output/services/side-cache/side-cache.d.ts +0 -11
- package/output/services/side-cache/side-cache.d.ts.map +0 -1
- package/output/services/side-cache/side-cache.js +0 -161
- package/output/services/side-cache/side-cache.test.d.ts +0 -2
- package/output/services/side-cache/side-cache.test.d.ts.map +0 -1
- package/output/services/side-cache/side-cache.test.js +0 -271
- package/output/utils/avatar/index.d.ts +0 -28
- package/output/utils/avatar/index.d.ts.map +0 -1
- package/output/utils/avatar/index.js +0 -35
- package/output/utils/delay/index.d.ts +0 -2
- package/output/utils/delay/index.d.ts.map +0 -1
- package/output/utils/delay/index.js +0 -5
- package/output/utils/form/index.d.ts +0 -3
- package/output/utils/form/index.d.ts.map +0 -1
- package/output/utils/form/index.js +0 -1
- package/output/utils/merge-class-names/index.d.ts +0 -3
- package/output/utils/merge-class-names/index.d.ts.map +0 -1
- package/output/utils/merge-class-names/index.js +0 -5
- package/output/utils/merge-class-names/index.test.d.ts +0 -2
- package/output/utils/merge-class-names/index.test.d.ts.map +0 -1
- package/output/utils/merge-class-names/index.test.js +0 -7
- package/output/utils/performance/index.d.ts +0 -82
- package/output/utils/performance/index.d.ts.map +0 -1
- package/output/utils/performance/index.js +0 -129
- package/output/utils/redirect/index.d.ts +0 -6
- package/output/utils/redirect/index.d.ts.map +0 -1
- package/output/utils/redirect/index.js +0 -32
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import * as React from "react";
|
|
14
|
-
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
15
|
-
import { mergeClassNames } from "../utils/merge-class-names/index.js";
|
|
16
|
-
function ScrollArea(params) {
|
|
17
|
-
const { className, children } = params, props = __rest(params, ["className", "children"]);
|
|
18
|
-
return (_jsxs(ScrollAreaPrimitive.Root, Object.assign({ "data-slot": "scroll-area", className: mergeClassNames("relative", className) }, props, { children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] })));
|
|
19
|
-
}
|
|
20
|
-
function ScrollBar(params) {
|
|
21
|
-
const { className, orientation = "vertical" } = params, props = __rest(params, ["className", "orientation"]);
|
|
22
|
-
return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, Object.assign({ "data-slot": "scroll-area-scrollbar", "data-orientation": orientation, orientation: orientation, className: mergeClassNames("data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none", className) }, props, { children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "rounded-full bg-border relative flex-1" }) })));
|
|
23
|
-
}
|
|
24
|
-
export { ScrollArea, ScrollBar };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
export interface SearchableSelectProps<T = string> {
|
|
3
|
-
/** 当前选中值 */
|
|
4
|
-
value: T;
|
|
5
|
-
/** 可选项列表 */
|
|
6
|
-
options: T[];
|
|
7
|
-
/** 是否加载中 */
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
/** 值变化回调 */
|
|
10
|
-
onChange: (value: T) => void;
|
|
11
|
-
/** 将选项转换为显示文本 */
|
|
12
|
-
displayValue: (item: T) => string;
|
|
13
|
-
/** 输入框占位符 */
|
|
14
|
-
placeholder?: string;
|
|
15
|
-
/** 无匹配时是否允许创建新项 */
|
|
16
|
-
creatable?: boolean;
|
|
17
|
-
/** 创建新项时的文案模板 */
|
|
18
|
-
createLabel?: (query: string) => string;
|
|
19
|
-
/** 自定义 className */
|
|
20
|
-
className?: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* 通用可搜索下拉选择器
|
|
24
|
-
*
|
|
25
|
-
* 基于 Popover + Command 构建,支持本地过滤、键盘导航和选中标记。
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```tsx
|
|
29
|
-
* const [value, setValue] = useState('')
|
|
30
|
-
*
|
|
31
|
-
* <SearchableSelect
|
|
32
|
-
* value={value}
|
|
33
|
-
* options={['Apple', 'Banana', 'Cherry']}
|
|
34
|
-
* onChange={setValue}
|
|
35
|
-
* displayValue={(item) => item}
|
|
36
|
-
* placeholder="Select fruit..."
|
|
37
|
-
* />
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
export declare function SearchableSelect<T = string>(props: SearchableSelectProps<T>): React.JSX.Element;
|
|
41
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/components/searchable-select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,MAAM;IAC/C,YAAY;IACZ,KAAK,EAAE,CAAC,CAAA;IACR,YAAY;IACZ,OAAO,EAAE,CAAC,EAAE,CAAA;IACZ,YAAY;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY;IACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;IAC5B,iBAAiB;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAA;IACjC,aAAa;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mBAAmB;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,iBAAiB;IACjB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACvC,oBAAoB;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,MAAM,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,qBA6F3E"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { Check } from 'lucide-react';
|
|
4
|
-
import { Command, CommandEmpty, CommandGroup, CommandItem, CommandList, } from '../../components/command.js';
|
|
5
|
-
import { Input } from '../../components/input.js';
|
|
6
|
-
import { Popover, PopoverContent, PopoverTrigger, } from '../../components/popover.js';
|
|
7
|
-
import { mergeClassNames } from '../../utils/merge-class-names/index.js';
|
|
8
|
-
/**
|
|
9
|
-
* 通用可搜索下拉选择器
|
|
10
|
-
*
|
|
11
|
-
* 基于 Popover + Command 构建,支持本地过滤、键盘导航和选中标记。
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* const [value, setValue] = useState('')
|
|
16
|
-
*
|
|
17
|
-
* <SearchableSelect
|
|
18
|
-
* value={value}
|
|
19
|
-
* options={['Apple', 'Banana', 'Cherry']}
|
|
20
|
-
* onChange={setValue}
|
|
21
|
-
* displayValue={(item) => item}
|
|
22
|
-
* placeholder="Select fruit..."
|
|
23
|
-
* />
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export function SearchableSelect(props) {
|
|
27
|
-
const { value, options, loading = false, onChange, displayValue, placeholder = 'Select...', creatable = false, createLabel = (query) => `Create: ${query}`, className, } = props;
|
|
28
|
-
const [query, setQuery] = useState('');
|
|
29
|
-
const [open, setOpen] = useState(false);
|
|
30
|
-
const matched = options.filter((item) => displayValue(item).toLowerCase().includes(query.toLowerCase()));
|
|
31
|
-
const handleSelect = (item) => {
|
|
32
|
-
onChange(item);
|
|
33
|
-
setQuery('');
|
|
34
|
-
setOpen(false);
|
|
35
|
-
};
|
|
36
|
-
const display = displayValue(value) || query;
|
|
37
|
-
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx("div", { className: mergeClassNames('relative', className), children: _jsx(Input, { value: display, onChange: (event) => {
|
|
38
|
-
setQuery(event.target.value);
|
|
39
|
-
if (!open)
|
|
40
|
-
setOpen(true);
|
|
41
|
-
}, onFocus: () => setOpen(true), placeholder: placeholder, className: "w-full", "aria-label": placeholder, disabled: loading }) }) }), _jsx(PopoverContent, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", onOpenAutoFocus: (e) => e.preventDefault(), children: _jsx(Command, { shouldFilter: false, children: _jsx(CommandList, { children: matched.length > 0 ? (_jsx(CommandGroup, { children: matched.map((item, index) => {
|
|
42
|
-
const label = displayValue(item);
|
|
43
|
-
const isSelected = displayValue(value) === label;
|
|
44
|
-
return (_jsxs(CommandItem, { value: label, onSelect: () => handleSelect(item), children: [_jsx(Check, { className: mergeClassNames('mr-2 h-4 w-4', isSelected ? 'opacity-100' : 'opacity-0') }), label] }, index));
|
|
45
|
-
}) })) : (_jsx(CommandEmpty, { children: creatable && query && (_jsx(CommandItem, { value: query, onSelect: () => handleSelect(query), children: createLabel(query) })) })) }) }) })] }));
|
|
46
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Select as SelectPrimitive } from "radix-ui";
|
|
3
|
-
type SelectTriggerParams = {
|
|
4
|
-
size?: "sm" | "default";
|
|
5
|
-
};
|
|
6
|
-
declare function Select(params: React.ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
|
|
7
|
-
declare function SelectGroup(params: React.ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
|
|
8
|
-
declare function SelectValue(params: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
|
|
9
|
-
declare function SelectTrigger(params: React.ComponentProps<typeof SelectPrimitive.Trigger> & SelectTriggerParams): React.JSX.Element;
|
|
10
|
-
declare function SelectContent(params: React.ComponentProps<typeof SelectPrimitive.Content>): React.JSX.Element;
|
|
11
|
-
declare function SelectLabel(params: React.ComponentProps<typeof SelectPrimitive.Label>): React.JSX.Element;
|
|
12
|
-
declare function SelectItem(params: React.ComponentProps<typeof SelectPrimitive.Item>): React.JSX.Element;
|
|
13
|
-
declare function SelectSeparator(params: React.ComponentProps<typeof SelectPrimitive.Separator>): React.JSX.Element;
|
|
14
|
-
declare function SelectScrollUpButton(params: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React.JSX.Element;
|
|
15
|
-
declare function SelectScrollDownButton(params: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React.JSX.Element;
|
|
16
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
17
|
-
//# sourceMappingURL=select.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../source/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAA;AAKpD,KAAK,mBAAmB,GAAG;IACzB,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;CACxB,CAAA;AAED,iBAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,qBAKxE;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAY9E;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAK9E;AAED,iBAAS,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,GAAG,mBAAmB,qBAuBxG;AAED,iBAAS,aAAa,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,qBAgClF;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAY9E;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,qBAuB5E;AAED,iBAAS,eAAe,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,qBAYtF;AAED,iBAAS,oBAAoB,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,cAAc,CAAC,qBAehG;AAED,iBAAS,sBAAsB,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,gBAAgB,CAAC,qBAepG;AAED,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,CAAA"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
import * as React from "react";
|
|
15
|
-
import { Select as SelectPrimitive } from "radix-ui";
|
|
16
|
-
import { mergeClassNames } from "../utils/merge-class-names/index.js";
|
|
17
|
-
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
18
|
-
function Select(params) {
|
|
19
|
-
const props = __rest(params, []);
|
|
20
|
-
return _jsx(SelectPrimitive.Root, Object.assign({ "data-slot": "select" }, props));
|
|
21
|
-
}
|
|
22
|
-
function SelectGroup(params) {
|
|
23
|
-
const { className } = params, props = __rest(params, ["className"]);
|
|
24
|
-
return (_jsx(SelectPrimitive.Group, Object.assign({ "data-slot": "select-group", className: mergeClassNames("scroll-my-1 p-1", className) }, props)));
|
|
25
|
-
}
|
|
26
|
-
function SelectValue(params) {
|
|
27
|
-
const props = __rest(params, []);
|
|
28
|
-
return _jsx(SelectPrimitive.Value, Object.assign({ "data-slot": "select-value" }, props));
|
|
29
|
-
}
|
|
30
|
-
function SelectTrigger(params) {
|
|
31
|
-
const { className, size = "default", children } = params, props = __rest(params, ["className", "size", "children"]);
|
|
32
|
-
return (_jsxs(SelectPrimitive.Trigger, Object.assign({ "data-slot": "select-trigger", "data-size": size, className: mergeClassNames("border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] focus-visible:ring-[3px] aria-invalid:ring-[3px] data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0", className) }, props, { children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "text-muted-foreground size-4 pointer-events-none" }) })] })));
|
|
33
|
-
}
|
|
34
|
-
function SelectContent(params) {
|
|
35
|
-
const { className, children, position = "item-aligned", align = "center" } = params, props = __rest(params, ["className", "children", "position", "align"]);
|
|
36
|
-
return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, Object.assign({ "data-slot": "select-content", "data-align-trigger": position === "item-aligned", className: mergeClassNames("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-md shadow-md ring-1 duration-100 relative z-50 max-h-(--radix-select-content-available-height) origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto data-[align-trigger=true]:animate-none", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, align: align }, props, { children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { "data-position": position, className: mergeClassNames("data-[position=popper]:h-[var(--radix-select-trigger-height)] data-[position=popper]:w-full data-[position=popper]:min-w-[var(--radix-select-trigger-width)]", position === "popper" && ""), children: children }), _jsx(SelectScrollDownButton, {})] })) }));
|
|
37
|
-
}
|
|
38
|
-
function SelectLabel(params) {
|
|
39
|
-
const { className } = params, props = __rest(params, ["className"]);
|
|
40
|
-
return (_jsx(SelectPrimitive.Label, Object.assign({ "data-slot": "select-label", className: mergeClassNames("text-muted-foreground px-2 py-1.5 text-xs", className) }, props)));
|
|
41
|
-
}
|
|
42
|
-
function SelectItem(params) {
|
|
43
|
-
const { className, children } = params, props = __rest(params, ["className", "children"]);
|
|
44
|
-
return (_jsxs(SelectPrimitive.Item, Object.assign({ "data-slot": "select-item", className: mergeClassNames("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className) }, props, { children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "pointer-events-none" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
|
|
45
|
-
}
|
|
46
|
-
function SelectSeparator(params) {
|
|
47
|
-
const { className } = params, props = __rest(params, ["className"]);
|
|
48
|
-
return (_jsx(SelectPrimitive.Separator, Object.assign({ "data-slot": "select-separator", className: mergeClassNames("bg-border -mx-1 my-1 h-px pointer-events-none", className) }, props)));
|
|
49
|
-
}
|
|
50
|
-
function SelectScrollUpButton(params) {
|
|
51
|
-
const { className } = params, props = __rest(params, ["className"]);
|
|
52
|
-
return (_jsx(SelectPrimitive.ScrollUpButton, Object.assign({ "data-slot": "select-scroll-up-button", className: mergeClassNames("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className) }, props, { children: _jsx(ChevronUpIcon, {}) })));
|
|
53
|
-
}
|
|
54
|
-
function SelectScrollDownButton(params) {
|
|
55
|
-
const { className } = params, props = __rest(params, ["className"]);
|
|
56
|
-
return (_jsx(SelectPrimitive.ScrollDownButton, Object.assign({ "data-slot": "select-scroll-down-button", className: mergeClassNames("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className) }, props, { children: _jsx(ChevronDownIcon, {}) })));
|
|
57
|
-
}
|
|
58
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../source/components/separator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAI1D,iBAAS,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,qBAc9E;AAED,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import * as React from 'react';
|
|
14
|
-
import { Separator as SeparatorPrimitive } from 'radix-ui';
|
|
15
|
-
import { mergeClassNames } from '../utils/merge-class-names/index.js';
|
|
16
|
-
function Separator(params) {
|
|
17
|
-
const { className, orientation = 'horizontal', decorative = true } = params, props = __rest(params, ["className", "orientation", "decorative"]);
|
|
18
|
-
return (_jsx(SeparatorPrimitive.Root, Object.assign({ "data-slot": "separator", decorative: decorative, orientation: orientation, className: mergeClassNames('bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch', className) }, props)));
|
|
19
|
-
}
|
|
20
|
-
export { Separator };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
3
|
-
type SheetContentParams = {
|
|
4
|
-
side?: "top" | "right" | "bottom" | "left";
|
|
5
|
-
showCloseButton?: boolean;
|
|
6
|
-
};
|
|
7
|
-
declare function Sheet(params: React.ComponentProps<typeof SheetPrimitive.Root>): React.JSX.Element;
|
|
8
|
-
declare function SheetTrigger(params: React.ComponentProps<typeof SheetPrimitive.Trigger>): React.JSX.Element;
|
|
9
|
-
declare function SheetClose(params: React.ComponentProps<typeof SheetPrimitive.Close>): React.JSX.Element;
|
|
10
|
-
declare function SheetContent(params: React.ComponentProps<typeof SheetPrimitive.Content> & SheetContentParams): React.JSX.Element;
|
|
11
|
-
declare function SheetHeader(params: React.ComponentProps<"div">): React.JSX.Element;
|
|
12
|
-
declare function SheetFooter(params: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
|
-
declare function SheetTitle(params: React.ComponentProps<typeof SheetPrimitive.Title>): React.JSX.Element;
|
|
14
|
-
declare function SheetDescription(params: React.ComponentProps<typeof SheetPrimitive.Description>): React.JSX.Element;
|
|
15
|
-
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
16
|
-
//# sourceMappingURL=sheet.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../source/components/sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,UAAU,CAAA;AAMnD,KAAK,kBAAkB,GAAG;IACxB,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,iBAAS,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,qBAGtE;AAED,iBAAS,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,qBAKhF;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,qBAK5E;AAuBD,iBAAS,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,GAAG,kBAAkB,qBA8BrG;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBASvD;AAED,iBAAS,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBASvD;AAED,iBAAS,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,qBAY5E;AAED,iBAAS,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,qBAYxF;AAED,OAAO,EACL,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,GACjB,CAAA"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import * as React from "react";
|
|
14
|
-
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
15
|
-
import { mergeClassNames } from "../utils/merge-class-names/index.js";
|
|
16
|
-
import { Button } from "./button.js";
|
|
17
|
-
import { XIcon } from "lucide-react";
|
|
18
|
-
function Sheet(params) {
|
|
19
|
-
const props = __rest(params, []);
|
|
20
|
-
return _jsx(SheetPrimitive.Root, Object.assign({ "data-slot": "sheet" }, props));
|
|
21
|
-
}
|
|
22
|
-
function SheetTrigger(params) {
|
|
23
|
-
const props = __rest(params, []);
|
|
24
|
-
return _jsx(SheetPrimitive.Trigger, Object.assign({ "data-slot": "sheet-trigger" }, props));
|
|
25
|
-
}
|
|
26
|
-
function SheetClose(params) {
|
|
27
|
-
const props = __rest(params, []);
|
|
28
|
-
return _jsx(SheetPrimitive.Close, Object.assign({ "data-slot": "sheet-close" }, props));
|
|
29
|
-
}
|
|
30
|
-
function SheetPortal(params) {
|
|
31
|
-
const props = __rest(params, []);
|
|
32
|
-
return _jsx(SheetPrimitive.Portal, Object.assign({ "data-slot": "sheet-portal" }, props));
|
|
33
|
-
}
|
|
34
|
-
function SheetOverlay(params) {
|
|
35
|
-
const { className } = params, props = __rest(params, ["className"]);
|
|
36
|
-
return (_jsx(SheetPrimitive.Overlay, Object.assign({ "data-slot": "sheet-overlay", className: mergeClassNames("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50", className) }, props)));
|
|
37
|
-
}
|
|
38
|
-
function SheetContent(params) {
|
|
39
|
-
const { className, children, side = "right", showCloseButton = true } = params, props = __rest(params, ["className", "children", "side", "showCloseButton"]);
|
|
40
|
-
return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, Object.assign({ "data-slot": "sheet-content", "data-side": side, className: mergeClassNames("bg-background data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className) }, props, { children: [children, showCloseButton && (_jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", asChild: true, children: _jsxs(Button, { variant: "ghost", className: "absolute top-4 right-4", size: "icon-sm", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }) }))] }))] }));
|
|
41
|
-
}
|
|
42
|
-
function SheetHeader(params) {
|
|
43
|
-
const { className } = params, props = __rest(params, ["className"]);
|
|
44
|
-
return (_jsx("div", Object.assign({ "data-slot": "sheet-header", className: mergeClassNames("gap-1.5 p-4 flex flex-col", className) }, props)));
|
|
45
|
-
}
|
|
46
|
-
function SheetFooter(params) {
|
|
47
|
-
const { className } = params, props = __rest(params, ["className"]);
|
|
48
|
-
return (_jsx("div", Object.assign({ "data-slot": "sheet-footer", className: mergeClassNames("gap-2 p-4 mt-auto flex flex-col", className) }, props)));
|
|
49
|
-
}
|
|
50
|
-
function SheetTitle(params) {
|
|
51
|
-
const { className } = params, props = __rest(params, ["className"]);
|
|
52
|
-
return (_jsx(SheetPrimitive.Title, Object.assign({ "data-slot": "sheet-title", className: mergeClassNames("text-foreground font-medium", className) }, props)));
|
|
53
|
-
}
|
|
54
|
-
function SheetDescription(params) {
|
|
55
|
-
const { className } = params, props = __rest(params, ["className"]);
|
|
56
|
-
return (_jsx(SheetPrimitive.Description, Object.assign({ "data-slot": "sheet-description", className: mergeClassNames("text-muted-foreground text-sm", className) }, props)));
|
|
57
|
-
}
|
|
58
|
-
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { Button } from './button.js';
|
|
4
|
-
import { Input } from './input.js';
|
|
5
|
-
import { Separator } from './separator.js';
|
|
6
|
-
import { TooltipContent } from './tooltip.js';
|
|
7
|
-
type SidebarGroupActionParams = {
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
};
|
|
10
|
-
type SidebarGroupLabelParams = {
|
|
11
|
-
asChild?: boolean;
|
|
12
|
-
};
|
|
13
|
-
type SidebarMenuActionParams = {
|
|
14
|
-
asChild?: boolean;
|
|
15
|
-
showOnHover?: boolean;
|
|
16
|
-
};
|
|
17
|
-
type SidebarMenuButtonParams = {
|
|
18
|
-
asChild?: boolean;
|
|
19
|
-
isActive?: boolean;
|
|
20
|
-
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
21
|
-
};
|
|
22
|
-
type SidebarMenuSkeletonParams = {
|
|
23
|
-
showIcon?: boolean;
|
|
24
|
-
};
|
|
25
|
-
type SidebarMenuSubButtonParams = {
|
|
26
|
-
asChild?: boolean;
|
|
27
|
-
size?: 'sm' | 'md';
|
|
28
|
-
isActive?: boolean;
|
|
29
|
-
};
|
|
30
|
-
type SidebarParams = {
|
|
31
|
-
side?: 'left' | 'right';
|
|
32
|
-
variant?: 'sidebar' | 'floating' | 'inset';
|
|
33
|
-
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
34
|
-
};
|
|
35
|
-
type SidebarProviderParams = {
|
|
36
|
-
defaultOpen?: boolean;
|
|
37
|
-
open?: boolean;
|
|
38
|
-
onOpenChange?: (open: boolean) => void;
|
|
39
|
-
};
|
|
40
|
-
type SidebarContextProps = {
|
|
41
|
-
state: 'expanded' | 'collapsed';
|
|
42
|
-
open: boolean;
|
|
43
|
-
setOpen: (open: boolean) => void;
|
|
44
|
-
openMobile: boolean;
|
|
45
|
-
setOpenMobile: (open: boolean) => void;
|
|
46
|
-
isMobile: boolean;
|
|
47
|
-
toggleSidebar: () => void;
|
|
48
|
-
};
|
|
49
|
-
declare function useSidebar(): SidebarContextProps;
|
|
50
|
-
declare function SidebarProvider(params: React.ComponentProps<'div'> & SidebarProviderParams): React.JSX.Element;
|
|
51
|
-
declare function Sidebar(params: React.ComponentProps<'div'> & SidebarParams): React.JSX.Element;
|
|
52
|
-
declare function SidebarTrigger(params: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
53
|
-
declare function SidebarRail(params: React.ComponentProps<'button'>): React.JSX.Element;
|
|
54
|
-
declare function SidebarInset(params: React.ComponentProps<'main'>): React.JSX.Element;
|
|
55
|
-
declare function SidebarInput(params: React.ComponentProps<typeof Input>): React.JSX.Element;
|
|
56
|
-
declare function SidebarHeader(params: React.ComponentProps<'div'>): React.JSX.Element;
|
|
57
|
-
declare function SidebarFooter(params: React.ComponentProps<'div'>): React.JSX.Element;
|
|
58
|
-
declare function SidebarSeparator(params: React.ComponentProps<typeof Separator>): React.JSX.Element;
|
|
59
|
-
declare function SidebarContent(params: React.ComponentProps<'div'>): React.JSX.Element;
|
|
60
|
-
declare function SidebarGroup(params: React.ComponentProps<'div'>): React.JSX.Element;
|
|
61
|
-
declare function SidebarGroupLabel(params: React.ComponentProps<'div'> & SidebarGroupLabelParams): React.JSX.Element;
|
|
62
|
-
declare function SidebarGroupAction(params: React.ComponentProps<'button'> & SidebarGroupActionParams): React.JSX.Element;
|
|
63
|
-
declare function SidebarGroupContent(params: React.ComponentProps<'div'>): React.JSX.Element;
|
|
64
|
-
declare function SidebarMenu(params: React.ComponentProps<'ul'>): React.JSX.Element;
|
|
65
|
-
declare function SidebarMenuItem(params: React.ComponentProps<'li'>): React.JSX.Element;
|
|
66
|
-
declare const sidebarMenuButtonVariants: (props?: ({
|
|
67
|
-
variant?: "default" | "outline" | null | undefined;
|
|
68
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
69
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
70
|
-
declare function SidebarMenuButton(params: React.ComponentProps<'button'> & SidebarMenuButtonParams & VariantProps<typeof sidebarMenuButtonVariants>): React.JSX.Element;
|
|
71
|
-
declare function SidebarMenuAction(params: React.ComponentProps<'button'> & SidebarMenuActionParams): React.JSX.Element;
|
|
72
|
-
declare function SidebarMenuBadge(params: React.ComponentProps<'div'>): React.JSX.Element;
|
|
73
|
-
declare function SidebarMenuSkeleton(params: React.ComponentProps<'div'> & SidebarMenuSkeletonParams): React.JSX.Element;
|
|
74
|
-
declare function SidebarMenuSub(params: React.ComponentProps<'ul'>): React.JSX.Element;
|
|
75
|
-
declare function SidebarMenuSubItem(params: React.ComponentProps<'li'>): React.JSX.Element;
|
|
76
|
-
declare function SidebarMenuSubButton(params: React.ComponentProps<'a'> & SidebarMenuSubButtonParams): React.JSX.Element;
|
|
77
|
-
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
|
78
|
-
//# sourceMappingURL=sidebar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../source/components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