@akbarsafari00/ods-react 0.1.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 +61 -0
- package/dist/components/alert-dialog.d.ts +32 -0
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +48 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.d.ts +11 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +28 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/badge.d.ts +10 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +25 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button-group.d.ts +17 -0
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button-group.js +38 -0
- package/dist/components/button-group.js.map +1 -0
- package/dist/components/button.d.ts +8 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +21 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/card.d.ts +10 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +25 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/checkbox.d.ts +5 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +10 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapsible.d.ts +15 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +16 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/combobox.d.ts +34 -0
- package/dist/components/combobox.d.ts.map +1 -0
- package/dist/components/combobox.js +280 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/context-menu.d.ts +60 -0
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +71 -0
- package/dist/components/context-menu.js.map +1 -0
- package/dist/components/data-table.d.ts +68 -0
- package/dist/components/data-table.d.ts.map +1 -0
- package/dist/components/data-table.js +100 -0
- package/dist/components/data-table.js.map +1 -0
- package/dist/components/dialog.d.ts +32 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +43 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/drawer.d.ts +32 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +43 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/field.d.ts +50 -0
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +93 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/icon-button.d.ts +14 -0
- package/dist/components/icon-button.d.ts.map +1 -0
- package/dist/components/icon-button.js +28 -0
- package/dist/components/icon-button.js.map +1 -0
- package/dist/components/input-group.d.ts +17 -0
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +56 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input.d.ts +9 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +7 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.d.ts +5 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +8 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/menubar.d.ts +73 -0
- package/dist/components/menubar.d.ts.map +1 -0
- package/dist/components/menubar.js +74 -0
- package/dist/components/menubar.js.map +1 -0
- package/dist/components/pagination.d.ts +23 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +64 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/progress.d.ts +17 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +23 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/radio-group.d.ts +6 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +12 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/select.d.ts +14 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +38 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +5 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +8 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/skeleton.d.ts +23 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +18 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/switch.d.ts +7 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +8 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.d.ts +22 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +31 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +36 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +49 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +4 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +7 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles/globals.css +660 -0
- package/dist/styles/themes/ods-default.css +130 -0
- package/package.json +88 -0
package/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# @akbarsafari00/ods-react
|
|
2
|
+
|
|
3
|
+
ODS React components, semantic styles, accessible interaction patterns, and RTL-aware layouts.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @akbarsafari00/ods-react react react-dom tailwindcss
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The package currently targets React 19 and Tailwind CSS 4.
|
|
12
|
+
|
|
13
|
+
## Add the ODS styles
|
|
14
|
+
|
|
15
|
+
Import the stylesheet once in your application entry point:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import "@akbarsafari00/ods-react/globals.css"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The default theme is selected with document attributes:
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<html data-theme="ods-default" data-mode="light"></html>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Use `data-mode="dark"` and a matching `dark` class for dark mode.
|
|
28
|
+
|
|
29
|
+
## Use components
|
|
30
|
+
|
|
31
|
+
Import from the root barrel:
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { Button, Card, CardContent, CardHeader } from "@akbarsafari00/ods-react"
|
|
35
|
+
|
|
36
|
+
export function Example() {
|
|
37
|
+
return (
|
|
38
|
+
<Card>
|
|
39
|
+
<CardHeader>Account</CardHeader>
|
|
40
|
+
<CardContent>
|
|
41
|
+
<Button variant="primary">Save changes</Button>
|
|
42
|
+
</CardContent>
|
|
43
|
+
</Card>
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Or use stable component subpaths to keep package boundaries explicit:
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
import { Button } from "@akbarsafari00/ods-react/components/button"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Package exports
|
|
55
|
+
|
|
56
|
+
- `@akbarsafari00/ods-react` — all public React components and types.
|
|
57
|
+
- `@akbarsafari00/ods-react/components/*` — individual component modules.
|
|
58
|
+
- `@akbarsafari00/ods-react/globals.css` — Tailwind and ODS semantic styles.
|
|
59
|
+
- `@akbarsafari00/ods-react/themes/ods-default` — the default theme variable map.
|
|
60
|
+
|
|
61
|
+
Product labels, business validation, permissions, persistence, authentication, and application-specific state remain consumer responsibilities.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type AlertDialogProps = {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
open?: boolean;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
type AlertDialogIntent = "confirmation" | "danger";
|
|
9
|
+
type AlertDialogSize = "compact" | "standard";
|
|
10
|
+
type AlertDialogTriggerProps = React.ComponentProps<"button">;
|
|
11
|
+
type AlertDialogActionProps = React.ComponentProps<"button">;
|
|
12
|
+
type AlertDialogCancelProps = React.ComponentProps<"button">;
|
|
13
|
+
type AlertDialogPartProps = React.ComponentPropsWithoutRef<"div">;
|
|
14
|
+
type AlertDialogTitleProps = React.ComponentProps<"h2">;
|
|
15
|
+
type AlertDialogDescriptionProps = React.ComponentProps<"p">;
|
|
16
|
+
type AlertDialogContentProps = AlertDialogPartProps & {
|
|
17
|
+
intent?: AlertDialogIntent;
|
|
18
|
+
size?: AlertDialogSize;
|
|
19
|
+
};
|
|
20
|
+
declare function AlertDialog(props: AlertDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function AlertDialogTrigger({ className, type, ...props }: AlertDialogTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function AlertDialogContent({ className, children, intent, size, ...props }: AlertDialogContentProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function AlertDialogHeader({ className, children, ...props }: AlertDialogPartProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function AlertDialogBody({ className, ...props }: AlertDialogPartProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function AlertDialogFooter({ className, ...props }: AlertDialogPartProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare function AlertDialogTitle({ className, ...props }: AlertDialogTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare function AlertDialogDescription({ className, ...props }: AlertDialogDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function AlertDialogCancel({ className, type, ...props }: AlertDialogCancelProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare function AlertDialogAction({ className, type, ...props }: AlertDialogActionProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, };
|
|
31
|
+
export type { AlertDialogContentProps, AlertDialogIntent, AlertDialogProps, AlertDialogSize, };
|
|
32
|
+
//# sourceMappingURL=alert-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../src/components/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,KAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;CACvC,CAAA;AAED,KAAK,iBAAiB,GAAG,cAAc,GAAG,QAAQ,CAAA;AAClD,KAAK,eAAe,GAAG,SAAS,GAAG,UAAU,CAAA;AAC7C,KAAK,uBAAuB,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;AAC7D,KAAK,sBAAsB,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;AAC5D,KAAK,sBAAsB,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;AAC5D,KAAK,oBAAoB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AACjE,KAAK,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAA;AACvD,KAAK,2BAA2B,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAA;AAE5D,KAAK,uBAAuB,GAAG,oBAAoB,GAAG;IACpD,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,IAAI,CAAC,EAAE,eAAe,CAAA;CACvB,CAAA;AAKD,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAE3C;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,IAAe,EACf,GAAG,KAAK,EACT,EAAE,uBAAuB,2CASzB;AAeD,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,QAAQ,EACR,MAAiB,EACjB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAoBzB;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,2CA6BtB;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,2CAWrE;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,2CAWvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,2CAQvE;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,2BAA2B,2CAQ7B;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,IAAe,EACf,GAAG,KAAK,EACT,EAAE,sBAAsB,2CAUxB;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,IAAe,EACf,GAAG,KAAK,EACT,EAAE,sBAAsB,2CAcxB;AAED,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GACnB,CAAA;AACD,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,GAChB,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { CircleHelp, TriangleAlert } from "lucide-react";
|
|
5
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
6
|
+
import { buttonVariants } from "@akbarsafari00/ods-react/components/button";
|
|
7
|
+
import { cn } from "@akbarsafari00/ods-react/lib/utils";
|
|
8
|
+
const AlertDialogIntentContext = React.createContext("danger");
|
|
9
|
+
function AlertDialog(props) {
|
|
10
|
+
return _jsx(AlertDialogPrimitive.Root, { ...props });
|
|
11
|
+
}
|
|
12
|
+
function AlertDialogTrigger({ className, type = "button", ...props }) {
|
|
13
|
+
return (_jsx(AlertDialogPrimitive.Trigger, { ...props, type: type, "data-slot": "alert-dialog-trigger", className: cn(buttonVariants({ variant: "neutral" }), className) }));
|
|
14
|
+
}
|
|
15
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
16
|
+
return (_jsx(AlertDialogPrimitive.Overlay, { ...props, "data-slot": "alert-dialog-overlay", className: cn("fixed inset-0 z-[var(--ods-layer-scrim)] bg-foreground/40 backdrop-blur-[1px]", className) }));
|
|
17
|
+
}
|
|
18
|
+
function AlertDialogContent({ className, children, intent = "danger", size = "compact", ...props }) {
|
|
19
|
+
return (_jsx(AlertDialogIntentContext.Provider, { value: intent, children: _jsxs(AlertDialogPrimitive.Portal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { ...props, "data-slot": "alert-dialog-content", "data-intent": intent, "data-size": size, className: cn("fixed z-[var(--ods-layer-modal)] grid max-h-[calc(100dvh-0.5rem)] grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden border bg-surface-raised text-foreground shadow-2xl outline-none sm:max-h-[calc(100dvh-2rem)]", className), children: children })] }) }));
|
|
20
|
+
}
|
|
21
|
+
function AlertDialogHeader({ className, children, ...props }) {
|
|
22
|
+
const intent = React.useContext(AlertDialogIntentContext);
|
|
23
|
+
const Icon = intent === "danger" ? TriangleAlert : CircleHelp;
|
|
24
|
+
return (_jsxs("div", { "data-slot": "alert-dialog-header", className: cn("row-start-1 flex gap-3 border-b px-4 pt-4 pb-4 in-data-[density=compact]:px-3 in-data-[density=compact]:pt-3 in-data-[density=compact]:pb-3", className), ...props, children: [_jsx("span", { "data-slot": "alert-dialog-icon", "data-intent": intent, className: cn("mt-0.5 inline-flex size-8 shrink-0 items-center justify-center rounded-full", intent === "danger"
|
|
25
|
+
? "bg-destructive/12 text-destructive"
|
|
26
|
+
: "bg-primary/12 text-primary"), "aria-hidden": "true", children: _jsx(Icon, { className: "size-4" }) }), _jsx("div", { className: "min-w-0 flex-1 space-y-1.5", children: children })] }));
|
|
27
|
+
}
|
|
28
|
+
function AlertDialogBody({ className, ...props }) {
|
|
29
|
+
return (_jsx("div", { "data-slot": "alert-dialog-body", className: cn("row-start-2 min-h-0 overflow-y-auto overscroll-contain p-4 text-sm leading-6 in-data-[density=compact]:p-3", className), ...props }));
|
|
30
|
+
}
|
|
31
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
32
|
+
return (_jsx("div", { "data-slot": "alert-dialog-footer", className: cn("row-start-3 flex flex-col-reverse gap-2 border-t bg-surface-raised px-4 pt-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] in-data-[density=compact]:px-3 in-data-[density=compact]:pt-2 in-data-[density=compact]:pb-[max(0.5rem,env(safe-area-inset-bottom))] sm:flex-row sm:justify-end sm:pb-3 sm:in-data-[density=compact]:pb-2", className), ...props }));
|
|
33
|
+
}
|
|
34
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
35
|
+
return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: cn("text-base leading-6 font-semibold", className), ...props }));
|
|
36
|
+
}
|
|
37
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
38
|
+
return (_jsx(AlertDialogPrimitive.Description, { "data-slot": "alert-dialog-description", className: cn("text-sm leading-6 text-muted-foreground", className), ...props }));
|
|
39
|
+
}
|
|
40
|
+
function AlertDialogCancel({ className, type = "button", ...props }) {
|
|
41
|
+
return (_jsx(AlertDialogPrimitive.Cancel, { ...props, type: type, autoFocus: true, "data-slot": "alert-dialog-cancel", className: cn(buttonVariants({ variant: "neutral" }), className) }));
|
|
42
|
+
}
|
|
43
|
+
function AlertDialogAction({ className, type = "button", ...props }) {
|
|
44
|
+
const intent = React.useContext(AlertDialogIntentContext);
|
|
45
|
+
return (_jsx(AlertDialogPrimitive.Action, { ...props, type: type, "data-slot": "alert-dialog-action", className: cn(buttonVariants({ variant: intent === "danger" ? "danger" : "primary" }), className) }));
|
|
46
|
+
}
|
|
47
|
+
export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, };
|
|
48
|
+
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.js","sourceRoot":"","sources":["../../src/components/alert-dialog.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AlertAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Alert, AlertTitle, AlertDescription, AlertAction };
|
|
11
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,aAAa;;8EAclB,CAAA;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,2CASlE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAW7B;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQxE;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "@akbarsafari00/ods-react/lib/utils";
|
|
4
|
+
const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "bg-card text-card-foreground",
|
|
8
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: {
|
|
12
|
+
variant: "default",
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
function Alert({ className, variant, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "alert", role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function AlertTitle({ className, ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "alert-title", className: cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function AlertDescription({ className, ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "alert-description", className: cn("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
function AlertAction({ className, ...props }) {
|
|
25
|
+
return (_jsx("div", { "data-slot": "alert-action", className: cn("absolute end-2 top-2", className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
export { Alert, AlertTitle, AlertDescription, AlertAction };
|
|
28
|
+
//# sourceMappingURL=alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,oCAAoC,CAAA;AAEvD,MAAM,aAAa,GAAG,GAAG,CACvB,4TAA4T,EAC5T;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,8BAA8B;YACvC,WAAW,EACT,mGAAmG;SACtG;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAA;AAED,SAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACyD;IACjE,OAAO,CACL,2BACY,OAAO,EACjB,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACtE,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,qHAAqH,EACrH,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACoB;IAC5B,OAAO,CACL,2BACY,mBAAmB,EAC7B,SAAS,EAAE,EAAE,CACX,4JAA4J,EAC5J,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACvE,OAAO,CACL,2BACY,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,SAAS,CAAC,KAC5C,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
10
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKjE,QAAA,MAAM,aAAa;;8EAqBlB,CAAA;AAED,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAmB,EACnB,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GAC7B,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,2CAW3D;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { Slot } from "radix-ui";
|
|
4
|
+
import { cn } from "@akbarsafari00/ods-react/lib/utils";
|
|
5
|
+
const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
9
|
+
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
10
|
+
destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
11
|
+
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
12
|
+
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
13
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
variant: "default",
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
function Badge({ className, variant = "default", asChild = false, ...props }) {
|
|
21
|
+
const Comp = asChild ? Slot.Root : "span";
|
|
22
|
+
return (_jsx(Comp, { "data-slot": "badge", "data-variant": variant, className: cn(badgeVariants({ variant }), className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
export { Badge, badgeVariants };
|
|
25
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,oCAAoC,CAAA;AAEvD,MAAM,aAAa,GAAG,GAAG,CACvB,4eAA4e,EAC5e;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,4DAA4D;YACrE,SAAS,EACP,kEAAkE;YACpE,WAAW,EACT,gKAAgK;YAClK,OAAO,EACL,kFAAkF;YACpF,KAAK,EACH,mEAAmE;YACrE,IAAI,EAAE,iDAAiD;SACxD;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAA;AAED,SAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,OAAO,GAAG,KAAK,EACf,GAAG,KAAK,EAEkD;IAC1D,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAA;IAEzC,OAAO,CACL,KAAC,IAAI,iBACO,OAAO,kBACH,OAAO,EACrB,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonGroupVariants: (props?: ({
|
|
4
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
5
|
+
fullWidth?: boolean | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
type ButtonGroupProps = Omit<React.ComponentProps<"div">, "aria-label" | "role"> & VariantProps<typeof buttonGroupVariants> & {
|
|
8
|
+
"aria-label": string;
|
|
9
|
+
};
|
|
10
|
+
declare function ButtonGroup({ "aria-label": ariaLabel, className, fullWidth, orientation, ...props }: ButtonGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const buttonGroupItemVariants: (props?: ({
|
|
12
|
+
tone?: "neutral" | "danger" | null | undefined;
|
|
13
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
|
+
declare function ButtonGroupItem({ className, tone, type, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonGroupItemVariants>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { ButtonGroup, ButtonGroupItem, buttonGroupItemVariants, buttonGroupVariants, };
|
|
16
|
+
export type { ButtonGroupProps };
|
|
17
|
+
//# sourceMappingURL=button-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../src/components/button-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,mBAAmB;;;8EAkBxB,CAAA;AAED,KAAK,gBAAgB,GAAG,IAAI,CAC1B,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC3B,YAAY,GAAG,MAAM,CACtB,GACC,YAAY,CAAC,OAAO,mBAAmB,CAAC,GAAG;IACzC,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAEH,iBAAS,WAAW,CAAC,EACnB,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,SAAiB,EACjB,WAA0B,EAC1B,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAWlB;AAED,QAAA,MAAM,uBAAuB;;8EAc5B,CAAA;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,IAAgB,EAChB,IAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAC/B,YAAY,CAAC,OAAO,uBAAuB,CAAC,2CAU7C;AAED,OAAO,EACL,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,mBAAmB,GACpB,CAAA;AACD,YAAY,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "@akbarsafari00/ods-react/lib/utils";
|
|
4
|
+
const buttonGroupVariants = cva("isolate inline-flex w-fit max-w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col [&>*]:rounded-none data-[orientation=horizontal]:[&>*+*]:-ms-px data-[orientation=vertical]:[&>*+*]:-mt-px data-[orientation=horizontal]:[&>*:first-child]:rounded-s-[4px] data-[orientation=vertical]:[&>*:first-child]:rounded-t-[4px] data-[orientation=horizontal]:[&>*:last-child]:rounded-e-[4px] data-[orientation=vertical]:[&>*:last-child]:rounded-b-[4px]", {
|
|
5
|
+
variants: {
|
|
6
|
+
orientation: {
|
|
7
|
+
horizontal: "",
|
|
8
|
+
vertical: "",
|
|
9
|
+
},
|
|
10
|
+
fullWidth: {
|
|
11
|
+
true: "w-full [&>*]:flex-1",
|
|
12
|
+
false: "",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
orientation: "horizontal",
|
|
17
|
+
fullWidth: false,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
function ButtonGroup({ "aria-label": ariaLabel, className, fullWidth = false, orientation = "horizontal", ...props }) {
|
|
21
|
+
return (_jsx("div", { role: "group", "data-slot": "button-group", "data-orientation": orientation, "aria-label": ariaLabel, className: cn(buttonGroupVariants({ orientation, fullWidth, className })), ...props }));
|
|
22
|
+
}
|
|
23
|
+
const buttonGroupItemVariants = cva("relative inline-flex min-h-10 items-center justify-center gap-2 rounded-none border border-border bg-background px-4 py-2 text-sm leading-5 font-medium text-foreground transition-colors outline-none select-none hover:z-10 hover:bg-muted focus-visible:z-20 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:bg-muted/80 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground aria-pressed:z-10 aria-pressed:border-primary/40 aria-pressed:bg-primary/12 aria-pressed:text-primary [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
24
|
+
variants: {
|
|
25
|
+
tone: {
|
|
26
|
+
neutral: "",
|
|
27
|
+
danger: "text-destructive hover:bg-destructive/8 focus-visible:border-destructive focus-visible:ring-destructive/30 active:bg-destructive/14",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
tone: "neutral",
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
function ButtonGroupItem({ className, tone = "neutral", type = "button", ...props }) {
|
|
35
|
+
return (_jsx("button", { type: type, "data-slot": "button-group-item", "data-tone": tone, className: cn(buttonGroupItemVariants({ tone, className })), ...props }));
|
|
36
|
+
}
|
|
37
|
+
export { ButtonGroup, ButtonGroupItem, buttonGroupItemVariants, buttonGroupVariants, };
|
|
38
|
+
//# sourceMappingURL=button-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group.js","sourceRoot":"","sources":["../../src/components/button-group.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,oCAAoC,CAAA;AAEvD,MAAM,mBAAmB,GAAG,GAAG,CAC7B,udAAud,EACvd;IACE,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,EAAE;SACb;QACD,SAAS,EAAE;YACT,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,EAAE;SACV;KACF;IACD,eAAe,EAAE;QACf,WAAW,EAAE,YAAY;QACzB,SAAS,EAAE,KAAK;KACjB;CACF,CACF,CAAA;AAUD,SAAS,WAAW,CAAC,EACnB,YAAY,EAAE,SAAS,EACvB,SAAS,EACT,SAAS,GAAG,KAAK,EACjB,WAAW,GAAG,YAAY,EAC1B,GAAG,KAAK,EACS;IACjB,OAAO,CACL,cACE,IAAI,EAAC,OAAO,eACF,cAAc,sBACN,WAAW,gBACjB,SAAS,EACrB,SAAS,EAAE,EAAE,CAAC,mBAAmB,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC,KACrE,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,MAAM,uBAAuB,GAAG,GAAG,CACjC,0mBAA0mB,EAC1mB;IACE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE;YACX,MAAM,EACJ,qIAAqI;SACxI;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAA;AAED,SAAS,eAAe,CAAC,EACvB,SAAS,EACT,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,QAAQ,EACf,GAAG,KAAK,EAEoC;IAC5C,OAAO,CACL,iBACE,IAAI,EAAE,IAAI,eACA,mBAAmB,eAClB,IAAI,EACf,SAAS,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,KACvD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,mBAAmB,GACpB,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "primary" | "outlined" | "neutral" | "danger" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Button({ className, type, variant, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Button, buttonVariants };
|
|
8
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,cAAc;;8EAmBnB,CAAA;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,IAAe,EACf,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,2CAUtE;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "@akbarsafari00/ods-react/lib/utils";
|
|
4
|
+
const buttonVariants = cva("group/button inline-flex min-h-10 shrink-0 items-center justify-center gap-2 rounded-[4px] border px-4 py-2 text-center text-sm leading-5 font-medium transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-border disabled:bg-muted disabled:text-muted-foreground in-data-[density=compact]:min-h-8 in-data-[density=compact]:gap-1.5 in-data-[density=compact]:px-3 in-data-[density=compact]:py-1.5 aria-busy:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
primary: "border-primary bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",
|
|
8
|
+
outlined: "border-primary bg-background text-primary hover:bg-primary/8 active:bg-primary/14",
|
|
9
|
+
neutral: "border-border bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_6%)] active:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_10%)]",
|
|
10
|
+
danger: "border-destructive bg-destructive text-destructive-foreground hover:bg-[color-mix(in_oklch,var(--destructive),black_10%)] focus-visible:border-destructive focus-visible:ring-destructive/30 active:bg-[color-mix(in_oklch,var(--destructive),black_16%)] dark:focus-visible:ring-destructive/40",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
variant: "neutral",
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
function Button({ className, type = "button", variant = "neutral", ...props }) {
|
|
18
|
+
return (_jsx("button", { type: type, "data-slot": "button", "data-variant": variant, className: cn(buttonVariants({ variant, className })), ...props }));
|
|
19
|
+
}
|
|
20
|
+
export { Button, buttonVariants };
|
|
21
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,oCAAoC,CAAA;AAEvD,MAAM,cAAc,GAAG,GAAG,CACxB,2mBAA2mB,EAC3mB;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,4FAA4F;YAC9F,QAAQ,EACN,mFAAmF;YACrF,OAAO,EACL,kMAAkM;YACpM,MAAM,EACJ,kSAAkS;SACrS;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAA;AAED,SAAS,MAAM,CAAC,EACd,SAAS,EACT,IAAI,GAAG,QAAQ,EACf,OAAO,GAAG,SAAS,EACnB,GAAG,KAAK,EAC6D;IACrE,OAAO,CACL,iBACE,IAAI,EAAE,IAAI,eACA,QAAQ,kBACJ,OAAO,EACrB,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,KACjD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Card({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
10
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWjE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWtE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ5E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "@akbarsafari00/ods-react/lib/utils";
|
|
3
|
+
function Card({ className, ...props }) {
|
|
4
|
+
return (_jsx("div", { "data-slot": "card", className: cn("group/card flex min-w-0 flex-col overflow-hidden rounded-[6px] border bg-card text-sm text-card-foreground", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
function CardHeader({ className, ...props }) {
|
|
7
|
+
return (_jsx("div", { "data-slot": "card-header", className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 p-4 in-data-[density=compact]:p-3 has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function CardTitle({ className, ...props }) {
|
|
10
|
+
return (_jsx("div", { "data-slot": "card-title", className: cn("font-heading text-base leading-snug font-semibold", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function CardDescription({ className, ...props }) {
|
|
13
|
+
return (_jsx("div", { "data-slot": "card-description", className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
function CardAction({ className, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "card-action", className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function CardContent({ className, ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "card-content", className: cn("px-4 pb-4 in-data-[density=compact]:px-3 in-data-[density=compact]:pb-3", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function CardFooter({ className, ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "card-footer", className: cn("flex flex-wrap items-center gap-2 border-t px-4 py-3 in-data-[density=compact]:px-3 in-data-[density=compact]:py-2", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
|
|
25
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,oCAAoC,CAAA;AAEvD,SAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IAChE,OAAO,CACL,2BACY,MAAM,EAChB,SAAS,EAAE,EAAE,CACX,4GAA4G,EAC5G,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACtE,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,mOAAmO,EACnO,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACrE,OAAO,CACL,2BACY,YAAY,EACtB,SAAS,EAAE,EAAE,CACX,mDAAmD,EACnD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IAC3E,OAAO,CACL,2BACY,kBAAkB,EAC5B,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACtE,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,gEAAgE,EAChE,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACvE,OAAO,CACL,2BACY,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,yEAAyE,EACzE,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACtE,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,oHAAoH,EACpH,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
3
|
+
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { Checkbox };
|
|
5
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAKxD,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,2CAmBrD;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "@akbarsafari00/ods-react/lib/utils";
|
|
5
|
+
import { CheckIcon, MinusIcon } from "lucide-react";
|
|
6
|
+
function Checkbox({ className, ...props }) {
|
|
7
|
+
return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("group/checkbox peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-[:disabled]/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-[state=checked]:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground group-has-[:focus-visible]/field-label:data-[state=checked]:border-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary dark:data-[state=indeterminate]:bg-primary", className), ...props, children: _jsxs(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none [&>svg]:size-3.5", children: [_jsx(CheckIcon, { className: "group-data-[state=indeterminate]/checkbox:hidden" }), _jsx(MinusIcon, { className: "hidden group-data-[state=indeterminate]/checkbox:block" })] }) }));
|
|
8
|
+
}
|
|
9
|
+
export { Checkbox };
|
|
10
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAExD,OAAO,EAAE,EAAE,EAAE,MAAM,oCAAoC,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAEnD,SAAS,QAAQ,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EAC4C;IACpD,OAAO,CACL,KAAC,iBAAiB,CAAC,IAAI,iBACX,UAAU,EACpB,SAAS,EAAE,EAAE,CACX,ykCAAykC,EACzkC,SAAS,CACV,KACG,KAAK,YAET,MAAC,iBAAiB,CAAC,SAAS,iBAChB,oBAAoB,EAC9B,SAAS,EAAC,yEAAyE,aAEnF,KAAC,SAAS,IAAC,SAAS,EAAC,kDAAkD,GAAG,EAC1E,KAAC,SAAS,IAAC,SAAS,EAAC,wDAAwD,GAAG,IACpD,GACP,CAC1B,CAAA;AACH,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type CollapsibleProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
type CollapsibleTriggerProps = React.ComponentPropsWithoutRef<"button">;
|
|
9
|
+
type CollapsibleContentProps = React.ComponentPropsWithoutRef<"div">;
|
|
10
|
+
declare function Collapsible({ className, ...props }: CollapsibleProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function CollapsibleTrigger({ className, children, type, ...props }: CollapsibleTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function CollapsibleContent({ className, children, ...props }: CollapsibleContentProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
14
|
+
export type { CollapsibleContentProps, CollapsibleProps, CollapsibleTriggerProps, };
|
|
15
|
+
//# sourceMappingURL=collapsible.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../src/components/collapsible.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,KAAK,gBAAgB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC9D,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,KAAK,uBAAuB,GAAG,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAA;AACvE,KAAK,uBAAuB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAEpE,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAW7D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,QAAQ,EACR,IAAe,EACf,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAqBzB;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,uBAAuB,2CAezB;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA;AAC9D,YAAY,EACV,uBAAuB,EACvB,gBAAgB,EAChB,uBAAuB,GACxB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronDown } from "lucide-react";
|
|
4
|
+
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "@akbarsafari00/ods-react/lib/utils";
|
|
6
|
+
function Collapsible({ className, ...props }) {
|
|
7
|
+
return (_jsx(CollapsiblePrimitive.Root, { ...props, "data-slot": "collapsible", className: cn("group/collapsible overflow-hidden rounded-[var(--ods-radius-surface)] border bg-surface text-foreground", className) }));
|
|
8
|
+
}
|
|
9
|
+
function CollapsibleTrigger({ className, children, type = "button", ...props }) {
|
|
10
|
+
return (_jsxs(CollapsiblePrimitive.Trigger, { ...props, type: type, "data-slot": "collapsible-trigger", className: cn("flex min-h-11 w-full items-center gap-3 px-4 py-2.5 text-start text-sm leading-5 font-medium outline-none select-none hover:bg-muted/70 focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset disabled:cursor-not-allowed disabled:bg-muted/40 disabled:text-muted-foreground in-data-[density=compact]:min-h-9 in-data-[density=compact]:gap-2 in-data-[density=compact]:px-3 in-data-[density=compact]:py-2", className), children: [_jsx("span", { "data-slot": "collapsible-trigger-label", className: "min-w-0 flex-1", children: children }), _jsx(ChevronDown, { "data-slot": "collapsible-indicator", className: "size-4 shrink-0 text-muted-foreground transition-transform duration-[var(--ods-motion-duration-feedback)] ease-[var(--ods-motion-easing-standard)] group-data-[state=open]/collapsible:rotate-180", "aria-hidden": "true" })] }));
|
|
11
|
+
}
|
|
12
|
+
function CollapsibleContent({ className, children, ...props }) {
|
|
13
|
+
return (_jsx(CollapsiblePrimitive.Content, { ...props, "data-slot": "collapsible-content", className: cn("overflow-hidden", className), children: _jsx("div", { "data-slot": "collapsible-panel", className: "border-t px-4 py-3 text-sm leading-6 text-muted-foreground in-data-[density=compact]:px-3 in-data-[density=compact]:py-2.5", children: children }) }));
|
|
14
|
+
}
|
|
15
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
16
|
+
//# sourceMappingURL=collapsible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible.js","sourceRoot":"","sources":["../../src/components/collapsible.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE9D,OAAO,EAAE,EAAE,EAAE,MAAM,oCAAoC,CAAA;AAYvD,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB;IAC5D,OAAO,CACL,KAAC,oBAAoB,CAAC,IAAI,OACpB,KAAK,eACC,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,yGAAyG,EACzG,SAAS,CACV,GACD,CACH,CAAA;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,QAAQ,EACR,IAAI,GAAG,QAAQ,EACf,GAAG,KAAK,EACgB;IACxB,OAAO,CACL,MAAC,oBAAoB,CAAC,OAAO,OACvB,KAAK,EACT,IAAI,EAAE,IAAI,eACA,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CACX,kbAAkb,EAClb,SAAS,CACV,aAED,4BAAgB,2BAA2B,EAAC,SAAS,EAAC,gBAAgB,YACnE,QAAQ,GACJ,EACP,KAAC,WAAW,iBACA,uBAAuB,EACjC,SAAS,EAAC,mMAAmM,iBACjM,MAAM,GAClB,IAC2B,CAChC,CAAA;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACgB;IACxB,OAAO,CACL,KAAC,oBAAoB,CAAC,OAAO,OACvB,KAAK,eACC,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,YAE3C,2BACY,mBAAmB,EAC7B,SAAS,EAAC,4HAA4H,YAErI,QAAQ,GACL,GACuB,CAChC,CAAA;AACH,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type ComboboxOption = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
keywords?: string[];
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type ComboboxFilter = (option: ComboboxOption, query: string) => boolean;
|
|
10
|
+
type ComboboxLabels = {
|
|
11
|
+
toggle: string;
|
|
12
|
+
clear: string;
|
|
13
|
+
loading: string;
|
|
14
|
+
error: string;
|
|
15
|
+
empty: string;
|
|
16
|
+
suggestionCount: (count: number) => string;
|
|
17
|
+
};
|
|
18
|
+
type ComboboxProps = Omit<React.ComponentPropsWithoutRef<"input">, "aria-activedescendant" | "aria-autocomplete" | "aria-controls" | "aria-expanded" | "children" | "defaultValue" | "onChange" | "role" | "type" | "value"> & {
|
|
19
|
+
options: ComboboxOption[];
|
|
20
|
+
value?: string;
|
|
21
|
+
defaultValue?: string;
|
|
22
|
+
onValueChange?: (value: string, option?: ComboboxOption) => void;
|
|
23
|
+
allowCustomValue?: boolean;
|
|
24
|
+
clearable?: boolean;
|
|
25
|
+
loading?: boolean;
|
|
26
|
+
error?: boolean;
|
|
27
|
+
minQueryLength?: number;
|
|
28
|
+
filter?: ComboboxFilter;
|
|
29
|
+
labels?: Partial<ComboboxLabels>;
|
|
30
|
+
};
|
|
31
|
+
declare function Combobox({ options, value, defaultValue, onValueChange, allowCustomValue, clearable, loading, error, minQueryLength, filter, labels: labelOverrides, className, disabled, required, name, id, placeholder, autoComplete, onBlur, onFocus, onKeyDown, ...inputProps }: ComboboxProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export { Combobox };
|
|
33
|
+
export type { ComboboxFilter, ComboboxLabels, ComboboxOption, ComboboxProps };
|
|
34
|
+
//# sourceMappingURL=combobox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../src/components/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,KAAK,cAAc,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAA;AAExE,KAAK,cAAc,GAAG;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CAC3C,CAAA;AAYD,KAAK,aAAa,GAAG,IAAI,CACvB,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC,EACrC,uBAAuB,GACvB,mBAAmB,GACnB,eAAe,GACf,eAAe,GACf,UAAU,GACV,cAAc,GACd,UAAU,GACV,MAAM,GACN,MAAM,GACN,OAAO,CACV,GAAG;IACF,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;IAChE,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;CACjC,CAAA;AA4CD,iBAAS,QAAQ,CAAC,EAChB,OAAO,EACP,KAAK,EACL,YAAY,EACZ,aAAa,EACb,gBAAwB,EACxB,SAAgB,EAChB,OAAe,EACf,KAAa,EACb,cAAkB,EAClB,MAAsB,EACtB,MAAM,EAAE,cAAc,EACtB,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,EAAE,EACF,WAAW,EACX,YAAoB,EACpB,MAAM,EACN,OAAO,EACP,SAAS,EACT,GAAG,UAAU,EACd,EAAE,aAAa,2CAiaf;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA;AACnB,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA"}
|