@almanaclabs/blaze-ui 0.3.2 → 0.5.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 +23 -0
- package/dist/components/accordion/accordion.js +53 -0
- package/dist/components/alert/alert.d.ts +1 -1
- package/dist/components/alert/alert.js +43 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog/alert-dialog.js +94 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +13 -0
- package/dist/components/attachment/attachment.d.ts +2 -2
- package/dist/components/attachment/attachment.js +104 -0
- package/dist/components/avatar/avatar.d.ts +6 -4
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +51 -0
- package/dist/components/badge/badge.d.ts +3 -2
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +45 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +72 -0
- package/dist/components/bubble/bubble.d.ts +1 -1
- package/dist/components/bubble/bubble.js +73 -0
- package/dist/components/button/button.d.ts +5 -3
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +65 -0
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button-group/button-group.js +41 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/calendar.js +92 -0
- package/dist/components/card/card.js +56 -0
- package/dist/components/carousel/carousel.d.ts.map +1 -1
- package/dist/components/carousel/carousel.js +110 -0
- package/dist/components/chart/chart.js +131 -0
- package/dist/components/checkbox/checkbox.js +20 -0
- package/dist/components/collapsible/collapsible.js +23 -0
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +165 -0
- package/dist/components/data-table/data-table.js +30 -0
- package/dist/components/date-picker/date-picker.js +39 -0
- package/dist/components/dialog/dialog.js +92 -0
- package/dist/components/drawer/drawer.js +121 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +136 -0
- package/dist/components/empty/empty.d.ts.map +1 -1
- package/dist/components/empty/empty.js +59 -0
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/field.js +107 -0
- package/dist/components/hover-card/hover-card.js +36 -0
- package/dist/components/identity-mark/identity-mark.d.ts +5 -0
- package/dist/components/identity-mark/identity-mark.d.ts.map +1 -0
- package/dist/components/identity-mark/identity-mark.js +20 -0
- package/dist/components/identity-mark/index.d.ts +2 -0
- package/dist/components/identity-mark/index.d.ts.map +1 -0
- package/dist/components/input/input.d.ts +9 -2
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +28 -0
- package/dist/components/input-group/input-group.d.ts +11 -3
- package/dist/components/input-group/input-group.d.ts.map +1 -1
- package/dist/components/input-group/input-group.js +95 -0
- package/dist/components/item/item.d.ts +2 -2
- package/dist/components/item/item.js +121 -0
- package/dist/components/label/label.js +13 -0
- package/dist/components/marker/marker.d.ts +1 -1
- package/dist/components/marker/marker.js +43 -0
- package/dist/components/message/message.js +49 -0
- package/dist/components/metric-overview/index.d.ts +2 -0
- package/dist/components/metric-overview/index.d.ts.map +1 -0
- package/dist/components/metric-overview/metric-overview.d.ts +12 -0
- package/dist/components/metric-overview/metric-overview.d.ts.map +1 -0
- package/dist/components/metric-overview/metric-overview.js +42 -0
- package/dist/components/native-select/native-select.d.ts +2 -1
- package/dist/components/native-select/native-select.d.ts.map +1 -1
- package/dist/components/native-select/native-select.js +40 -0
- package/dist/components/navigation-action/index.d.ts +2 -0
- package/dist/components/navigation-action/index.d.ts.map +1 -0
- package/dist/components/navigation-action/navigation-action.d.ts +6 -0
- package/dist/components/navigation-action/navigation-action.d.ts.map +1 -0
- package/dist/components/navigation-action/navigation-action.js +18 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/pagination/pagination.js +80 -0
- package/dist/components/popover/popover.js +54 -0
- package/dist/components/progress/progress.js +45 -0
- package/dist/components/questionnaire/questionnaire-primitive.js +353 -0
- package/dist/components/questionnaire/questionnaire.d.ts.map +1 -1
- package/dist/components/questionnaire/questionnaire.js +169 -0
- package/dist/components/radio-group/radio-group.js +26 -0
- package/dist/components/scroll-area/scroll-area.js +37 -0
- package/dist/components/select/select.d.ts +2 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +99 -0
- package/dist/components/separator/separator.js +15 -0
- package/dist/components/sheet/sheet.js +89 -0
- package/dist/components/sidebar/sidebar.d.ts +13 -2
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.js +419 -0
- package/dist/components/skeleton/skeleton.js +12 -0
- package/dist/components/slider/slider.js +37 -0
- package/dist/components/spinner/spinner.js +15 -0
- package/dist/components/switch/switch.js +19 -0
- package/dist/components/table/table.d.ts +4 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +68 -0
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tabs/tabs.js +46 -0
- package/dist/components/textarea/textarea.js +13 -0
- package/dist/components/toast/toast.d.ts.map +1 -1
- package/dist/components/toast/toast.js +116 -0
- package/dist/components/toggle/toggle.d.ts +1 -1
- package/dist/components/toggle/toggle.js +35 -0
- package/dist/components/toggle-group/toggle-group.js +52 -0
- package/dist/components/tooltip/tooltip.js +41 -0
- package/dist/hooks/use-mobile.js +14 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +59 -3699
- package/dist/lib/control-size.d.ts +9 -0
- package/dist/lib/control-size.d.ts.map +1 -0
- package/dist/lib/control-size.js +10 -0
- package/dist/lib/utils.js +8 -0
- package/dist/recipes/recipe-runtime.d.ts +18 -0
- package/dist/recipes/recipe-runtime.d.ts.map +1 -0
- package/package.json +2 -1
- package/recipes/README.md +24 -0
- package/recipes/guided-workflow/README.md +51 -0
- package/recipes/guided-workflow/guided-workflow.tsx +495 -0
- package/recipes/manifest.json +19 -0
- package/recipes/workspace-shell/README.md +95 -0
- package/recipes/workspace-shell/assets/google-search-ads.svg +6 -0
- package/recipes/workspace-shell/assets/home.svg +5 -0
- package/recipes/workspace-shell/assets/radiant-health.png +0 -0
- package/recipes/workspace-shell/workspace-shell.css +55 -0
- package/recipes/workspace-shell/workspace-shell.tsx +636 -0
- package/src/styles/fonts/Sohne-Book.woff2 +0 -0
- package/src/styles/fonts/Sohne-Medium.woff2 +0 -0
- package/src/styles/fonts/Sohne-Semi.woff2 +0 -0
- package/src/styles/globals.css +233 -54
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/message/message.tsx
|
|
5
|
+
function n({ className: n, ...r }) {
|
|
6
|
+
return /* @__PURE__ */ t("div", {
|
|
7
|
+
"data-slot": "message-group",
|
|
8
|
+
className: e("flex min-w-0 flex-col gap-2", n),
|
|
9
|
+
...r
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function r({ className: n, align: r = "start", ...i }) {
|
|
13
|
+
return /* @__PURE__ */ t("div", {
|
|
14
|
+
"data-slot": "message",
|
|
15
|
+
"data-align": r,
|
|
16
|
+
className: e("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", n),
|
|
17
|
+
...i
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function i({ className: n, ...r }) {
|
|
21
|
+
return /* @__PURE__ */ t("div", {
|
|
22
|
+
"data-slot": "message-avatar",
|
|
23
|
+
className: e("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", n),
|
|
24
|
+
...r
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function a({ className: n, ...r }) {
|
|
28
|
+
return /* @__PURE__ */ t("div", {
|
|
29
|
+
"data-slot": "message-content",
|
|
30
|
+
className: e("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", n),
|
|
31
|
+
...r
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function o({ className: n, ...r }) {
|
|
35
|
+
return /* @__PURE__ */ t("div", {
|
|
36
|
+
"data-slot": "message-header",
|
|
37
|
+
className: e("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0", n),
|
|
38
|
+
...r
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function s({ className: n, ...r }) {
|
|
42
|
+
return /* @__PURE__ */ t("div", {
|
|
43
|
+
"data-slot": "message-footer",
|
|
44
|
+
className: e("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end", n),
|
|
45
|
+
...r
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { r as Message, i as MessageAvatar, a as MessageContent, s as MessageFooter, n as MessageGroup, o as MessageHeader };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/metric-overview/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface MetricOverviewItem {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
shortLabel?: React.ReactNode;
|
|
5
|
+
value: React.ReactNode;
|
|
6
|
+
description?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface MetricOverviewProps extends Omit<React.ComponentProps<'dl'>, 'children'> {
|
|
9
|
+
items: readonly MetricOverviewItem[];
|
|
10
|
+
}
|
|
11
|
+
export declare function MetricOverview({ items, className, tabIndex, ...props }: MetricOverviewProps): React.JSX.Element;
|
|
12
|
+
//# sourceMappingURL=metric-overview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metric-overview.d.ts","sourceRoot":"","sources":["../../../src/components/metric-overview/metric-overview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAC1B,UAAU,CACX;IACC,KAAK,EAAE,SAAS,kBAAkB,EAAE,CAAA;CACrC;AAED,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,SAAS,EACT,QAAY,EACZ,GAAG,KAAK,EACT,EAAE,mBAAmB,qBA8DrB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Separator as t } from "../separator/separator.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/metric-overview/metric-overview.tsx
|
|
6
|
+
function o({ items: o, className: s, tabIndex: c = 0, ...l }) {
|
|
7
|
+
return /* @__PURE__ */ i("dl", {
|
|
8
|
+
"data-slot": "metric-overview",
|
|
9
|
+
className: e("type-content @container/metric-overview flex w-full flex-nowrap items-center overflow-x-auto rounded-md border border-border bg-background px-4 py-3.5 text-foreground outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-border-subtle", s),
|
|
10
|
+
tabIndex: c,
|
|
11
|
+
...l,
|
|
12
|
+
children: o.map((e, s) => /* @__PURE__ */ a(n.Fragment, { children: [/* @__PURE__ */ a("div", {
|
|
13
|
+
"data-slot": "metric-overview-item",
|
|
14
|
+
className: "flex min-w-[9.5rem] flex-[1_0_auto] items-center justify-start gap-1.5 px-4 whitespace-nowrap @max-[64rem]/metric-overview:flex-[1_0_9.5rem] @max-[64rem]/metric-overview:flex-col @max-[64rem]/metric-overview:items-start",
|
|
15
|
+
children: [/* @__PURE__ */ i("dt", {
|
|
16
|
+
className: "font-normal",
|
|
17
|
+
title: e.shortLabel && typeof e.label == "string" ? e.label : void 0,
|
|
18
|
+
children: e.shortLabel ? /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("span", {
|
|
19
|
+
className: "@max-[64rem]/metric-overview:sr-only",
|
|
20
|
+
children: e.label
|
|
21
|
+
}), /* @__PURE__ */ i("span", {
|
|
22
|
+
"aria-hidden": "true",
|
|
23
|
+
className: "hidden @max-[64rem]/metric-overview:inline",
|
|
24
|
+
children: e.shortLabel
|
|
25
|
+
})] }) : e.label
|
|
26
|
+
}), /* @__PURE__ */ a("dd", {
|
|
27
|
+
className: "font-medium",
|
|
28
|
+
children: [e.value, e.description ? /* @__PURE__ */ a("span", {
|
|
29
|
+
className: "sr-only",
|
|
30
|
+
children: [". ", e.description]
|
|
31
|
+
}) : null]
|
|
32
|
+
})]
|
|
33
|
+
}), s < o.length - 1 ? /* @__PURE__ */ i(t, {
|
|
34
|
+
"data-slot": "metric-overview-separator",
|
|
35
|
+
orientation: "vertical",
|
|
36
|
+
className: "h-[18px] self-center @max-[64rem]/metric-overview:h-14",
|
|
37
|
+
"aria-hidden": "true"
|
|
38
|
+
}) : null] }, typeof e.label == "string" ? e.label : s))
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { o as MetricOverview };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ControlSize } from '../../lib/control-size';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
type NativeSelectProps = Omit<React.ComponentProps<'select'>, 'size'> & {
|
|
3
|
-
size?:
|
|
4
|
+
size?: ControlSize;
|
|
4
5
|
};
|
|
5
6
|
declare function NativeSelect({ className, size, 'aria-label': ariaLabel, ...props }: NativeSelectProps): React.JSX.Element;
|
|
6
7
|
declare function NativeSelectOption({ className, ...props }: React.ComponentProps<'option'>): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../../src/components/native-select/native-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../../src/components/native-select/native-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAI5E,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,GAAG;IACtE,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,CAAA;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,IAAW,EACX,YAAY,EAAE,SAA8B,EAC5C,GAAG,KAAK,EACT,EAAE,iBAAiB,qBAkCnB;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,qBAQhC;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,qBAQlC;AAED,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { controlSizeClassNames as e } from "../../lib/control-size.js";
|
|
2
|
+
import { cn as t } from "../../lib/utils.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import { IconChevronDown as i } from "@tabler/icons-react";
|
|
6
|
+
//#region src/components/native-select/native-select.tsx
|
|
7
|
+
function a({ className: a, size: o = "md", "aria-label": s = "Select an option", ...c }) {
|
|
8
|
+
return /* @__PURE__ */ r("div", {
|
|
9
|
+
className: t("group/native-select relative w-fit", a),
|
|
10
|
+
"data-slot": "native-select-wrapper",
|
|
11
|
+
"data-size": o,
|
|
12
|
+
children: [/* @__PURE__ */ n("select", {
|
|
13
|
+
"aria-label": s,
|
|
14
|
+
"data-slot": "native-select",
|
|
15
|
+
"data-size": o,
|
|
16
|
+
className: t("w-full min-w-0 appearance-none border border-input bg-background pt-[calc(var(--sohne-control-optical-offset)+var(--sohne-control-optical-offset))] text-foreground transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground hover:border-foreground/15 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-border-subtle disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-surface-subtle disabled:text-foreground-tertiary aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/10 dark:aria-invalid:border-destructive/60 dark:aria-invalid:ring-destructive/20", e[o], o === "xs" && "pr-7", (o === "sm" || o === "md") && "pr-8", o === "lg" && "pr-9", o === "xl" && "pr-10"),
|
|
17
|
+
...c
|
|
18
|
+
}), /* @__PURE__ */ n(i, {
|
|
19
|
+
className: t("pointer-events-none absolute top-1/2 -translate-y-1/2 text-muted-foreground select-none", o === "xs" && "icon-optical-14 right-1.5", (o === "sm" || o === "md") && "icon-optical-15 right-2", o === "lg" && "icon-optical-18 right-[13px]", o === "xl" && "icon-optical-24 right-[18px]"),
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
"data-slot": "native-select-icon"
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function o({ className: e, ...r }) {
|
|
26
|
+
return /* @__PURE__ */ n("option", {
|
|
27
|
+
"data-slot": "native-select-option",
|
|
28
|
+
className: t("bg-[Canvas] text-[CanvasText]", e),
|
|
29
|
+
...r
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function s({ className: e, ...r }) {
|
|
33
|
+
return /* @__PURE__ */ n("optgroup", {
|
|
34
|
+
"data-slot": "native-select-optgroup",
|
|
35
|
+
className: t("bg-[Canvas] text-[CanvasText]", e),
|
|
36
|
+
...r
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { a as NativeSelect, s as NativeSelectOptGroup, o as NativeSelectOption };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/navigation-action/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ButtonProps } from '../button';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const navigationActionVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
4
|
+
declare function NavigationAction({ className, variant, size, ...props }: ButtonProps): React.JSX.Element;
|
|
5
|
+
export { NavigationAction, navigationActionVariants };
|
|
6
|
+
//# sourceMappingURL=navigation-action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-action.d.ts","sourceRoot":"","sources":["../../../src/components/navigation-action/navigation-action.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAG9D,QAAA,MAAM,wBAAwB,oFAE7B,CAAA;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,OAAoB,EACpB,IAAW,EACX,GAAG,KAAK,EACT,EAAE,WAAW,qBAcb;AAED,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Button as t } from "../button/button.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { cva as n } from "class-variance-authority";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/navigation-action/navigation-action.tsx
|
|
7
|
+
var i = n("bg-transparent text-foreground hover:bg-muted hover:text-foreground aria-[current=page]:bg-navigation-selected aria-[current=page]:text-foreground aria-[current=page]:hover:bg-navigation-selected aria-[selected=true]:bg-navigation-selected aria-[selected=true]:text-foreground aria-[selected=true]:hover:bg-navigation-selected data-active:bg-navigation-selected data-active:text-foreground data-active:hover:bg-navigation-selected");
|
|
8
|
+
function a({ className: n, variant: a = "tertiary", size: o = "sm", ...s }) {
|
|
9
|
+
return /* @__PURE__ */ r(t, {
|
|
10
|
+
"data-slot": "navigation-action",
|
|
11
|
+
variant: a,
|
|
12
|
+
size: o,
|
|
13
|
+
className: typeof n == "function" ? (t) => e(i(), n(t)) : e(i(), n),
|
|
14
|
+
...s
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { a as NavigationAction, i as navigationActionVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/components/pagination/pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAO5C,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAUvE;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAQ5B;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAE/D;AAED,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,CAAC,GACnD,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAA;AAE3B,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,QAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/components/pagination/pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAO5C,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAUvE;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAQ5B;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAE/D;AAED,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,CAAC,GACnD,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,CAAA;AAE3B,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,QAAQ,EACR,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,mBAAmB,qBAiBrB;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,IAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,qBAYjE;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,IAAa,EACb,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,qBAYjE;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAe9B;AAED,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,CAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import { Button as t } from "../button/button.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import { IconChevronLeft as i, IconChevronRight as a, IconDots as o } from "@tabler/icons-react";
|
|
6
|
+
//#region src/components/pagination/pagination.tsx
|
|
7
|
+
function s({ className: t, ...r }) {
|
|
8
|
+
return /* @__PURE__ */ n("nav", {
|
|
9
|
+
role: "navigation",
|
|
10
|
+
"aria-label": "pagination",
|
|
11
|
+
"data-slot": "pagination",
|
|
12
|
+
className: e("mx-auto flex w-full justify-center", t),
|
|
13
|
+
...r
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function c({ className: t, ...r }) {
|
|
17
|
+
return /* @__PURE__ */ n("ul", {
|
|
18
|
+
"data-slot": "pagination-content",
|
|
19
|
+
className: e("flex items-center gap-0.5", t),
|
|
20
|
+
...r
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function l({ ...e }) {
|
|
24
|
+
return /* @__PURE__ */ n("li", {
|
|
25
|
+
"data-slot": "pagination-item",
|
|
26
|
+
...e
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function u({ className: r, isActive: i, size: a = "icon-md", ...o }) {
|
|
30
|
+
return /* @__PURE__ */ n(t, {
|
|
31
|
+
variant: i ? "secondary" : "tertiary",
|
|
32
|
+
size: a,
|
|
33
|
+
className: e(r),
|
|
34
|
+
nativeButton: !1,
|
|
35
|
+
render: /* @__PURE__ */ n("a", {
|
|
36
|
+
"aria-current": i ? "page" : void 0,
|
|
37
|
+
"data-slot": "pagination-link",
|
|
38
|
+
"data-active": i,
|
|
39
|
+
...o
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function d({ className: t, text: a = "Previous", ...o }) {
|
|
44
|
+
return /* @__PURE__ */ r(u, {
|
|
45
|
+
"aria-label": "Go to previous page",
|
|
46
|
+
size: "md",
|
|
47
|
+
className: e("pl-1.5!", t),
|
|
48
|
+
...o,
|
|
49
|
+
children: [/* @__PURE__ */ n(i, { "data-icon": "inline-start" }), /* @__PURE__ */ n("span", {
|
|
50
|
+
className: "hidden sm:block",
|
|
51
|
+
children: a
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function f({ className: t, text: i = "Next", ...o }) {
|
|
56
|
+
return /* @__PURE__ */ r(u, {
|
|
57
|
+
"aria-label": "Go to next page",
|
|
58
|
+
size: "md",
|
|
59
|
+
className: e("pr-1.5!", t),
|
|
60
|
+
...o,
|
|
61
|
+
children: [/* @__PURE__ */ n("span", {
|
|
62
|
+
className: "hidden sm:block",
|
|
63
|
+
children: i
|
|
64
|
+
}), /* @__PURE__ */ n(a, { "data-icon": "inline-end" })]
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function p({ className: t, ...i }) {
|
|
68
|
+
return /* @__PURE__ */ r("span", {
|
|
69
|
+
"aria-hidden": !0,
|
|
70
|
+
"data-slot": "pagination-ellipsis",
|
|
71
|
+
className: e("flex size-8 items-center justify-center [--icon-stroke-width:var(--icon-stroke-16)] [&_svg:not([class*='size-'])]:size-4", t),
|
|
72
|
+
...i,
|
|
73
|
+
children: [/* @__PURE__ */ n(o, {}), /* @__PURE__ */ n("span", {
|
|
74
|
+
className: "sr-only",
|
|
75
|
+
children: "More pages"
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { s as Pagination, c as PaginationContent, p as PaginationEllipsis, l as PaginationItem, u as PaginationLink, f as PaginationNext, d as PaginationPrevious };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { Popover as n } from "@base-ui/react/popover";
|
|
5
|
+
//#region src/components/popover/popover.tsx
|
|
6
|
+
function r({ ...e }) {
|
|
7
|
+
return /* @__PURE__ */ t(n.Root, {
|
|
8
|
+
"data-slot": "popover",
|
|
9
|
+
...e
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function i({ ...e }) {
|
|
13
|
+
return /* @__PURE__ */ t(n.Trigger, {
|
|
14
|
+
"data-slot": "popover-trigger",
|
|
15
|
+
...e
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function a({ className: r, align: i = "center", alignOffset: a = 0, side: o = "bottom", sideOffset: s = 4, ...c }) {
|
|
19
|
+
return /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(n.Positioner, {
|
|
20
|
+
align: i,
|
|
21
|
+
alignOffset: a,
|
|
22
|
+
side: o,
|
|
23
|
+
sideOffset: s,
|
|
24
|
+
className: "isolate z-50",
|
|
25
|
+
children: /* @__PURE__ */ t(n.Popup, {
|
|
26
|
+
"data-slot": "popover-content",
|
|
27
|
+
className: e("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", r),
|
|
28
|
+
...c
|
|
29
|
+
})
|
|
30
|
+
}) });
|
|
31
|
+
}
|
|
32
|
+
function o({ className: n, ...r }) {
|
|
33
|
+
return /* @__PURE__ */ t("div", {
|
|
34
|
+
"data-slot": "popover-header",
|
|
35
|
+
className: e("flex flex-col gap-0.5 text-sm", n),
|
|
36
|
+
...r
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function s({ className: r, ...i }) {
|
|
40
|
+
return /* @__PURE__ */ t(n.Title, {
|
|
41
|
+
"data-slot": "popover-title",
|
|
42
|
+
className: e("font-medium", r),
|
|
43
|
+
...i
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function c({ className: r, ...i }) {
|
|
47
|
+
return /* @__PURE__ */ t(n.Description, {
|
|
48
|
+
"data-slot": "popover-description",
|
|
49
|
+
className: e("text-muted-foreground", r),
|
|
50
|
+
...i
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { r as Popover, a as PopoverContent, c as PopoverDescription, o as PopoverHeader, s as PopoverTitle, i as PopoverTrigger };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
import { Progress as r } from "@base-ui/react/progress";
|
|
5
|
+
//#region src/components/progress/progress.tsx
|
|
6
|
+
function i({ className: i, children: s, value: c, "aria-label": l = "Progress", ...u }) {
|
|
7
|
+
return /* @__PURE__ */ n(r.Root, {
|
|
8
|
+
value: c,
|
|
9
|
+
"aria-label": l,
|
|
10
|
+
"data-slot": "progress",
|
|
11
|
+
className: e("flex flex-wrap gap-3", i),
|
|
12
|
+
...u,
|
|
13
|
+
children: [s, /* @__PURE__ */ t(a, { children: /* @__PURE__ */ t(o, {}) })]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function a({ className: n, ...i }) {
|
|
17
|
+
return /* @__PURE__ */ t(r.Track, {
|
|
18
|
+
className: e("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted", n),
|
|
19
|
+
"data-slot": "progress-track",
|
|
20
|
+
...i
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function o({ className: n, ...i }) {
|
|
24
|
+
return /* @__PURE__ */ t(r.Indicator, {
|
|
25
|
+
"data-slot": "progress-indicator",
|
|
26
|
+
className: e("h-full bg-primary transition-all", n),
|
|
27
|
+
...i
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function s({ className: n, ...i }) {
|
|
31
|
+
return /* @__PURE__ */ t(r.Label, {
|
|
32
|
+
className: e("type-label font-medium", n),
|
|
33
|
+
"data-slot": "progress-label",
|
|
34
|
+
...i
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function c({ className: n, ...i }) {
|
|
38
|
+
return /* @__PURE__ */ t(r.Value, {
|
|
39
|
+
className: e("type-body ml-auto text-muted-foreground tabular-nums", n),
|
|
40
|
+
"data-slot": "progress-value",
|
|
41
|
+
...i
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { i as Progress, o as ProgressIndicator, s as ProgressLabel, a as ProgressTrack, c as ProgressValue };
|