@acronis-platform/ui-react 0.50.0 → 0.53.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/dist/components/ui/accordion/accordion.js +53 -0
- package/dist/components/ui/accordion/accordion.js.map +1 -0
- package/dist/components/ui/app-shell/app-shell.js +75 -0
- package/dist/components/ui/app-shell/app-shell.js.map +1 -0
- package/dist/components/ui/auth-layout/auth-layout.js +56 -0
- package/dist/components/ui/auth-layout/auth-layout.js.map +1 -0
- package/dist/components/ui/collapsible/collapsible.js +22 -0
- package/dist/components/ui/collapsible/collapsible.js.map +1 -0
- package/dist/components/ui/grid/grid.js +69 -0
- package/dist/components/ui/grid/grid.js.map +1 -0
- package/dist/components/ui/number-field/number-field.js +61 -0
- package/dist/components/ui/number-field/number-field.js.map +1 -0
- package/dist/components/ui/page-content/page-content.js +19 -0
- package/dist/components/ui/page-content/page-content.js.map +1 -0
- package/dist/components/ui/page-header/page-header.js +74 -0
- package/dist/components/ui/page-header/page-header.js.map +1 -0
- package/dist/components/ui/pagination/pagination.js +87 -0
- package/dist/components/ui/pagination/pagination.js.map +1 -0
- package/dist/components/ui/section/section.js +37 -0
- package/dist/components/ui/section/section.js.map +1 -0
- package/dist/components/ui/slider/slider.js +42 -0
- package/dist/components/ui/slider/slider.js.map +1 -0
- package/dist/components/ui/stack/stack.js +61 -0
- package/dist/components/ui/stack/stack.js.map +1 -0
- package/dist/components/ui/toggle-group/toggle-group.js +47 -0
- package/dist/components/ui/toggle-group/toggle-group.js.map +1 -0
- package/dist/index.js +354 -292
- package/dist/index.js.map +1 -1
- package/dist/react.js +354 -292
- package/dist/react.js.map +1 -1
- package/dist/src/components/ui/accordion/accordion.d.ts +7 -0
- package/dist/src/components/ui/accordion/index.d.ts +1 -0
- package/dist/src/components/ui/app-shell/app-shell.d.ts +8 -0
- package/dist/src/components/ui/app-shell/index.d.ts +1 -0
- package/dist/src/components/ui/auth-layout/auth-layout.d.ts +6 -0
- package/dist/src/components/ui/auth-layout/index.d.ts +1 -0
- package/dist/src/components/ui/collapsible/collapsible.d.ts +5 -0
- package/dist/src/components/ui/collapsible/index.d.ts +1 -0
- package/dist/src/components/ui/grid/grid.d.ts +15 -0
- package/dist/src/components/ui/grid/index.d.ts +1 -0
- package/dist/src/components/ui/number-field/index.d.ts +1 -0
- package/dist/src/components/ui/number-field/number-field.d.ts +7 -0
- package/dist/src/components/ui/page-content/index.d.ts +1 -0
- package/dist/src/components/ui/page-content/page-content.d.ts +4 -0
- package/dist/src/components/ui/page-header/index.d.ts +1 -0
- package/dist/src/components/ui/page-header/page-header.d.ts +8 -0
- package/dist/src/components/ui/pagination/index.d.ts +2 -0
- package/dist/src/components/ui/pagination/pagination.d.ts +25 -0
- package/dist/src/components/ui/section/index.d.ts +1 -0
- package/dist/src/components/ui/section/section.d.ts +7 -0
- package/dist/src/components/ui/slider/index.d.ts +1 -0
- package/dist/src/components/ui/slider/slider.d.ts +7 -0
- package/dist/src/components/ui/stack/index.d.ts +1 -0
- package/dist/src/components/ui/stack/stack.d.ts +13 -0
- package/dist/src/components/ui/toggle-group/index.d.ts +1 -0
- package/dist/src/components/ui/toggle-group/toggle-group.d.ts +7 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/ui-react.css +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { Accordion as n } from "@base-ui/react/accordion";
|
|
4
|
+
import { ChevronDownIcon as d } from "@acronis-platform/icons-react/stroke-mono";
|
|
5
|
+
import { cn as s } from "../../../lib/utils.js";
|
|
6
|
+
const h = n.Root, m = a.forwardRef(({ className: e, ...o }, r) => /* @__PURE__ */ t(
|
|
7
|
+
n.Item,
|
|
8
|
+
{
|
|
9
|
+
ref: r,
|
|
10
|
+
className: s("border-b border-border", e),
|
|
11
|
+
...o
|
|
12
|
+
}
|
|
13
|
+
));
|
|
14
|
+
m.displayName = "AccordionItem";
|
|
15
|
+
const l = a.forwardRef(({ className: e, children: o, ...r }, i) => /* @__PURE__ */ t(n.Header, { className: "flex", children: /* @__PURE__ */ c(
|
|
16
|
+
n.Trigger,
|
|
17
|
+
{
|
|
18
|
+
ref: i,
|
|
19
|
+
className: s(
|
|
20
|
+
"flex flex-1 items-center justify-between py-4 text-sm font-medium outline-none transition-all hover:underline focus-visible:rounded-sm focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-primary)] [&[data-panel-open]>svg]:rotate-180",
|
|
21
|
+
e
|
|
22
|
+
),
|
|
23
|
+
...r,
|
|
24
|
+
children: [
|
|
25
|
+
o,
|
|
26
|
+
/* @__PURE__ */ t(
|
|
27
|
+
d,
|
|
28
|
+
{
|
|
29
|
+
size: 16,
|
|
30
|
+
className: "shrink-0 text-[var(--ui-text-on-surface-secondary)] transition-transform duration-200"
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
) }));
|
|
36
|
+
l.displayName = "AccordionTrigger";
|
|
37
|
+
const f = a.forwardRef(({ className: e, children: o, ...r }, i) => /* @__PURE__ */ t(
|
|
38
|
+
n.Panel,
|
|
39
|
+
{
|
|
40
|
+
ref: i,
|
|
41
|
+
className: "overflow-hidden text-sm transition-[height] duration-200 ease-out data-[ending-style]:h-0 data-[starting-style]:h-0",
|
|
42
|
+
...r,
|
|
43
|
+
children: /* @__PURE__ */ t("div", { className: s("pb-4 pt-0 text-[var(--ui-text-on-surface-secondary)]", e), children: o })
|
|
44
|
+
}
|
|
45
|
+
));
|
|
46
|
+
f.displayName = "AccordionContent";
|
|
47
|
+
export {
|
|
48
|
+
h as Accordion,
|
|
49
|
+
f as AccordionContent,
|
|
50
|
+
m as AccordionItem,
|
|
51
|
+
l as AccordionTrigger
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.js","sources":["../../../../src/components/ui/accordion/accordion.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Accordion as AccordionPrimitive } from '@base-ui/react/accordion';\nimport { ChevronDownIcon } from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\n\n// Ported from `@acronis-platform/shadcn-uikit`'s `accordion`. A vertical set of\n// disclosure sections built on Base UI's Accordion. Markup-only — the item divider\n// uses the shared border token (bare `border-b` renders transparent in ui-react,\n// so it must name `border-border`); text inherits the foreground.\nconst Accordion = AccordionPrimitive.Root;\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item\n ref={ref}\n className={cn('border-b border-border', className)}\n {...props}\n />\n));\nAccordionItem.displayName = 'AccordionItem';\n\nconst AccordionTrigger = React.forwardRef<\n HTMLButtonElement,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref as React.Ref<HTMLElement>}\n className={cn(\n 'flex flex-1 items-center justify-between py-4 text-sm font-medium outline-none transition-all hover:underline focus-visible:rounded-sm focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-primary)] [&[data-panel-open]>svg]:rotate-180',\n className\n )}\n {...props}\n >\n {children}\n <ChevronDownIcon\n size={16}\n className=\"shrink-0 text-[var(--ui-text-on-surface-secondary)] transition-transform duration-200\"\n />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n));\nAccordionTrigger.displayName = 'AccordionTrigger';\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Panel>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Panel>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Panel\n ref={ref}\n className=\"overflow-hidden text-sm transition-[height] duration-200 ease-out data-[ending-style]:h-0 data-[starting-style]:h-0\"\n {...props}\n >\n <div className={cn('pb-4 pt-0 text-[var(--ui-text-on-surface-secondary)]', className)}>\n {children}\n </div>\n </AccordionPrimitive.Panel>\n));\nAccordionContent.displayName = 'AccordionContent';\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent };\n"],"names":["Accordion","AccordionPrimitive","AccordionItem","React","className","props","ref","jsx","cn","AccordionTrigger","children","jsxs","ChevronDownIcon","AccordionContent"],"mappings":";;;;;AAYA,MAAMA,IAAYC,EAAmB,MAE/BC,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAACN,EAAmB;AAAA,EAAnB;AAAA,IACC,KAAAK;AAAA,IACA,WAAWE,EAAG,0BAA0BJ,CAAS;AAAA,IAChD,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAc,cAAc;AAE5B,MAAMO,IAAmBN,EAAM,WAG7B,CAAC,EAAE,WAAAC,GAAW,UAAAM,GAAU,GAAGL,EAAA,GAASC,MACpC,gBAAAC,EAACN,EAAmB,QAAnB,EAA0B,WAAU,QACnC,UAAA,gBAAAU;AAAA,EAACV,EAAmB;AAAA,EAAnB;AAAA,IACC,KAAAK;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,IAEH,UAAA;AAAA,MAAAK;AAAA,MACD,gBAAAH;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,MAAM;AAAA,UACN,WAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IACZ;AAAA,EAAA;AACF,GACF,CACD;AACDH,EAAiB,cAAc;AAE/B,MAAMI,IAAmBV,EAAM,WAG7B,CAAC,EAAE,WAAAC,GAAW,UAAAM,GAAU,GAAGL,KAASC,MACpC,gBAAAC;AAAA,EAACN,EAAmB;AAAA,EAAnB;AAAA,IACC,KAAAK;AAAA,IACA,WAAU;AAAA,IACT,GAAGD;AAAA,IAEJ,4BAAC,OAAA,EAAI,WAAWG,EAAG,wDAAwDJ,CAAS,GACjF,UAAAM,EAAA,CACH;AAAA,EAAA;AACF,CACD;AACDG,EAAiB,cAAc;"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { cn as o } from "../../../lib/utils.js";
|
|
4
|
+
const s = r.forwardRef(({ className: e, ...a }, l) => /* @__PURE__ */ p(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
ref: l,
|
|
8
|
+
"data-slot": "app-shell",
|
|
9
|
+
className: o("flex min-h-screen w-full bg-background", e),
|
|
10
|
+
...a
|
|
11
|
+
}
|
|
12
|
+
));
|
|
13
|
+
s.displayName = "AppShell";
|
|
14
|
+
const d = r.forwardRef(({ className: e, ...a }, l) => /* @__PURE__ */ p(
|
|
15
|
+
"aside",
|
|
16
|
+
{
|
|
17
|
+
ref: l,
|
|
18
|
+
"data-slot": "app-shell-sidebar",
|
|
19
|
+
className: o("flex shrink-0", e),
|
|
20
|
+
...a
|
|
21
|
+
}
|
|
22
|
+
));
|
|
23
|
+
d.displayName = "AppShellSidebar";
|
|
24
|
+
const t = r.forwardRef(({ className: e, ...a }, l) => /* @__PURE__ */ p(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
ref: l,
|
|
28
|
+
"data-slot": "app-shell-body",
|
|
29
|
+
className: o("flex min-w-0 flex-1 flex-col", e),
|
|
30
|
+
...a
|
|
31
|
+
}
|
|
32
|
+
));
|
|
33
|
+
t.displayName = "AppShellBody";
|
|
34
|
+
const f = r.forwardRef(({ className: e, ...a }, l) => /* @__PURE__ */ p(
|
|
35
|
+
"header",
|
|
36
|
+
{
|
|
37
|
+
ref: l,
|
|
38
|
+
"data-slot": "app-shell-header",
|
|
39
|
+
className: o(
|
|
40
|
+
"sticky top-0 z-10 flex h-16 shrink-0 items-center gap-4 border-b border-border bg-background px-6",
|
|
41
|
+
e
|
|
42
|
+
),
|
|
43
|
+
...a
|
|
44
|
+
}
|
|
45
|
+
));
|
|
46
|
+
f.displayName = "AppShellHeader";
|
|
47
|
+
const i = r.forwardRef(({ className: e, ...a }, l) => /* @__PURE__ */ p(
|
|
48
|
+
"main",
|
|
49
|
+
{
|
|
50
|
+
ref: l,
|
|
51
|
+
"data-slot": "app-shell-main",
|
|
52
|
+
className: o("flex-1 overflow-auto", e),
|
|
53
|
+
...a
|
|
54
|
+
}
|
|
55
|
+
));
|
|
56
|
+
i.displayName = "AppShellMain";
|
|
57
|
+
const h = r.forwardRef(({ className: e, ...a }, l) => /* @__PURE__ */ p(
|
|
58
|
+
"footer",
|
|
59
|
+
{
|
|
60
|
+
ref: l,
|
|
61
|
+
"data-slot": "app-shell-footer",
|
|
62
|
+
className: o("shrink-0 border-t border-border bg-background px-6 py-4", e),
|
|
63
|
+
...a
|
|
64
|
+
}
|
|
65
|
+
));
|
|
66
|
+
h.displayName = "AppShellFooter";
|
|
67
|
+
export {
|
|
68
|
+
s as AppShell,
|
|
69
|
+
t as AppShellBody,
|
|
70
|
+
h as AppShellFooter,
|
|
71
|
+
f as AppShellHeader,
|
|
72
|
+
i as AppShellMain,
|
|
73
|
+
d as AppShellSidebar
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=app-shell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-shell.js","sources":["../../../../src/components/ui/app-shell/app-shell.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n// The full-page application scaffold from the Figma App Shell (node 2782-1495):\n// a left sidebar column (holds SidebarPrimary, optionally a secondary menu) beside\n// a body column of a sticky header (with the global search) over the scrolling\n// main content. Layout-only — the rich parts come from SidebarPrimary /\n// SidebarSecondary / SearchGlobal placed inside these slots. Surfaces use the\n// shared `--ui-*` tokens (bg-background / border-border; a bare `border` is\n// transparent in ui-react, so borders name `border-border`).\n\nconst AppShell = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"app-shell\"\n className={cn('flex min-h-screen w-full bg-background', className)}\n {...props}\n />\n));\nAppShell.displayName = 'AppShell';\n\nconst AppShellSidebar = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <aside\n ref={ref}\n data-slot=\"app-shell-sidebar\"\n className={cn('flex shrink-0', className)}\n {...props}\n />\n));\nAppShellSidebar.displayName = 'AppShellSidebar';\n\nconst AppShellBody = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"app-shell-body\"\n className={cn('flex min-w-0 flex-1 flex-col', className)}\n {...props}\n />\n));\nAppShellBody.displayName = 'AppShellBody';\n\nconst AppShellHeader = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <header\n ref={ref}\n data-slot=\"app-shell-header\"\n className={cn(\n 'sticky top-0 z-10 flex h-16 shrink-0 items-center gap-4 border-b border-border bg-background px-6',\n className\n )}\n {...props}\n />\n));\nAppShellHeader.displayName = 'AppShellHeader';\n\nconst AppShellMain = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <main\n ref={ref}\n data-slot=\"app-shell-main\"\n className={cn('flex-1 overflow-auto', className)}\n {...props}\n />\n));\nAppShellMain.displayName = 'AppShellMain';\n\nconst AppShellFooter = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <footer\n ref={ref}\n data-slot=\"app-shell-footer\"\n className={cn('shrink-0 border-t border-border bg-background px-6 py-4', className)}\n {...props}\n />\n));\nAppShellFooter.displayName = 'AppShellFooter';\n\nexport {\n AppShell,\n AppShellSidebar,\n AppShellBody,\n AppShellHeader,\n AppShellMain,\n AppShellFooter,\n};\n"],"names":["AppShell","React","className","props","ref","jsx","cn","AppShellSidebar","AppShellBody","AppShellHeader","AppShellMain","AppShellFooter"],"mappings":";;;AAYA,MAAMA,IAAWC,EAAM,WAGrB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,0CAA0CJ,CAAS;AAAA,IAChE,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAS,cAAc;AAEvB,MAAMO,IAAkBN,EAAM,WAG5B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,iBAAiBJ,CAAS;AAAA,IACvC,GAAGC;AAAA,EAAA;AACN,CACD;AACDI,EAAgB,cAAc;AAE9B,MAAMC,IAAeP,EAAM,WAGzB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,gCAAgCJ,CAAS;AAAA,IACtD,GAAGC;AAAA,EAAA;AACN,CACD;AACDK,EAAa,cAAc;AAE3B,MAAMC,IAAiBR,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDM,EAAe,cAAc;AAE7B,MAAMC,IAAeT,EAAM,WAGzB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,wBAAwBJ,CAAS;AAAA,IAC9C,GAAGC;AAAA,EAAA;AACN,CACD;AACDO,EAAa,cAAc;AAE3B,MAAMC,IAAiBV,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,2DAA2DJ,CAAS;AAAA,IACjF,GAAGC;AAAA,EAAA;AACN,CACD;AACDQ,EAAe,cAAc;"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { cn as u } from "../../../lib/utils.js";
|
|
4
|
+
const s = r.forwardRef(({ className: t, ...a }, o) => /* @__PURE__ */ e(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
ref: o,
|
|
8
|
+
"data-slot": "auth-layout",
|
|
9
|
+
className: u(
|
|
10
|
+
"flex min-h-screen w-full items-center justify-center bg-background p-4",
|
|
11
|
+
t
|
|
12
|
+
),
|
|
13
|
+
...a
|
|
14
|
+
}
|
|
15
|
+
));
|
|
16
|
+
s.displayName = "AuthLayout";
|
|
17
|
+
const d = r.forwardRef(({ className: t, ...a }, o) => /* @__PURE__ */ e(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
ref: o,
|
|
21
|
+
"data-slot": "auth-layout-card",
|
|
22
|
+
className: u(
|
|
23
|
+
"w-full max-w-sm rounded-lg border border-border bg-background p-6 shadow-sm",
|
|
24
|
+
t
|
|
25
|
+
),
|
|
26
|
+
...a
|
|
27
|
+
}
|
|
28
|
+
));
|
|
29
|
+
d.displayName = "AuthLayoutCard";
|
|
30
|
+
const l = r.forwardRef(({ className: t, ...a }, o) => /* @__PURE__ */ e(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
ref: o,
|
|
34
|
+
"data-slot": "auth-layout-logo",
|
|
35
|
+
className: u("mb-6 flex justify-center", t),
|
|
36
|
+
...a
|
|
37
|
+
}
|
|
38
|
+
));
|
|
39
|
+
l.displayName = "AuthLayoutLogo";
|
|
40
|
+
const m = r.forwardRef(({ className: t, ...a }, o) => /* @__PURE__ */ e(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
ref: o,
|
|
44
|
+
"data-slot": "auth-layout-footer",
|
|
45
|
+
className: u("mt-6 text-center text-sm text-muted-foreground", t),
|
|
46
|
+
...a
|
|
47
|
+
}
|
|
48
|
+
));
|
|
49
|
+
m.displayName = "AuthLayoutFooter";
|
|
50
|
+
export {
|
|
51
|
+
s as AuthLayout,
|
|
52
|
+
d as AuthLayoutCard,
|
|
53
|
+
m as AuthLayoutFooter,
|
|
54
|
+
l as AuthLayoutLogo
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=auth-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-layout.js","sources":["../../../../src/components/ui/auth-layout/auth-layout.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n// A centered card layout for auth flows (sign-in / sign-up / forgot-password /\n// 2FA), reconciled with the Main-menu-improvements Figma (node 4906-362342).\n// Ported from `@acronis-platform`'s `auth-layout`. Token fixes vs legacy: the card\n// uses `bg-background` (legacy `bg-card` isn't bridged in ui-react) and a named\n// `border-border` (a bare `border` is transparent here).\n//\n// Anatomy:\n// AuthLayout (full-page centered)\n// AuthLayoutCard (centered surface card)\n// AuthLayoutLogo (top brand slot)\n// …children (title + form)…\n// AuthLayoutFooter (bottom links)\n\nconst AuthLayout = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"auth-layout\"\n className={cn(\n 'flex min-h-screen w-full items-center justify-center bg-background p-4',\n className\n )}\n {...props}\n />\n));\nAuthLayout.displayName = 'AuthLayout';\n\nconst AuthLayoutCard = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"auth-layout-card\"\n className={cn(\n 'w-full max-w-sm rounded-lg border border-border bg-background p-6 shadow-sm',\n className\n )}\n {...props}\n />\n));\nAuthLayoutCard.displayName = 'AuthLayoutCard';\n\nconst AuthLayoutLogo = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"auth-layout-logo\"\n className={cn('mb-6 flex justify-center', className)}\n {...props}\n />\n));\nAuthLayoutLogo.displayName = 'AuthLayoutLogo';\n\nconst AuthLayoutFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"auth-layout-footer\"\n className={cn('mt-6 text-center text-sm text-muted-foreground', className)}\n {...props}\n />\n));\nAuthLayoutFooter.displayName = 'AuthLayoutFooter';\n\nexport { AuthLayout, AuthLayoutCard, AuthLayoutLogo, AuthLayoutFooter };\n"],"names":["AuthLayout","React","className","props","ref","jsx","cn","AuthLayoutCard","AuthLayoutLogo","AuthLayoutFooter"],"mappings":";;;AAiBA,MAAMA,IAAaC,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAW,cAAc;AAEzB,MAAMO,IAAiBN,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDI,EAAe,cAAc;AAE7B,MAAMC,IAAiBP,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,4BAA4BJ,CAAS;AAAA,IAClD,GAAGC;AAAA,EAAA;AACN,CACD;AACDK,EAAe,cAAc;AAE7B,MAAMC,IAAmBR,EAAM,WAG7B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,kDAAkDJ,CAAS;AAAA,IACxE,GAAGC;AAAA,EAAA;AACN,CACD;AACDM,EAAiB,cAAc;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { Collapsible as o } from "@base-ui/react/collapsible";
|
|
4
|
+
import { cn as s } from "../../../lib/utils.js";
|
|
5
|
+
const d = o.Root, C = o.Trigger, r = i.forwardRef(({ className: t, ...e }, l) => /* @__PURE__ */ a(
|
|
6
|
+
o.Panel,
|
|
7
|
+
{
|
|
8
|
+
ref: l,
|
|
9
|
+
className: s(
|
|
10
|
+
"overflow-hidden transition-[height] duration-200 ease-out data-[ending-style]:h-0 data-[starting-style]:h-0",
|
|
11
|
+
t
|
|
12
|
+
),
|
|
13
|
+
...e
|
|
14
|
+
}
|
|
15
|
+
));
|
|
16
|
+
r.displayName = "CollapsibleContent";
|
|
17
|
+
export {
|
|
18
|
+
d as Collapsible,
|
|
19
|
+
r as CollapsibleContent,
|
|
20
|
+
C as CollapsibleTrigger
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=collapsible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible.js","sources":["../../../../src/components/ui/collapsible/collapsible.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Collapsible as CollapsiblePrimitive } from '@base-ui/react/collapsible';\n\nimport { cn } from '@/lib/utils';\n\n// Ported from `@acronis-platform/shadcn-uikit`'s `collapsible`. A thin wrapper over\n// Base UI's Collapsible — a disclosure: a trigger toggles a height-animating panel.\n// No colors of its own (it's the primitive behind Accordion and the sidebars).\nconst Collapsible = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger = CollapsiblePrimitive.Trigger;\n\nconst CollapsibleContent = React.forwardRef<\n React.ElementRef<typeof CollapsiblePrimitive.Panel>,\n React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Panel>\n>(({ className, ...props }, ref) => (\n <CollapsiblePrimitive.Panel\n ref={ref}\n className={cn(\n 'overflow-hidden transition-[height] duration-200 ease-out data-[ending-style]:h-0 data-[starting-style]:h-0',\n className\n )}\n {...props}\n />\n));\nCollapsibleContent.displayName = 'CollapsibleContent';\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"],"names":["Collapsible","CollapsiblePrimitive","CollapsibleTrigger","CollapsibleContent","React","className","props","ref","jsx","cn"],"mappings":";;;;AAUA,MAAMA,IAAcC,EAAqB,MAEnCC,IAAqBD,EAAqB,SAE1CE,IAAqBC,EAAM,WAG/B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAACP,EAAqB;AAAA,EAArB;AAAA,IACC,KAAAM;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAmB,cAAc;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { cva as m } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
|
|
4
|
+
import { cn as o } from "../../../lib/utils.js";
|
|
5
|
+
const t = m("grid", {
|
|
6
|
+
variants: {
|
|
7
|
+
cols: {
|
|
8
|
+
1: "grid-cols-1",
|
|
9
|
+
2: "grid-cols-1 sm:grid-cols-2",
|
|
10
|
+
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
11
|
+
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
12
|
+
6: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",
|
|
13
|
+
12: "grid-cols-4 sm:grid-cols-6 lg:grid-cols-12"
|
|
14
|
+
},
|
|
15
|
+
gap: {
|
|
16
|
+
none: "gap-0",
|
|
17
|
+
sm: "gap-2",
|
|
18
|
+
md: "gap-4",
|
|
19
|
+
lg: "gap-6",
|
|
20
|
+
xl: "gap-8"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
cols: 3,
|
|
25
|
+
gap: "md"
|
|
26
|
+
}
|
|
27
|
+
}), n = {
|
|
28
|
+
1: "grid-cols-1",
|
|
29
|
+
2: "grid-cols-1 @md/grid:grid-cols-2",
|
|
30
|
+
3: "grid-cols-1 @md/grid:grid-cols-2 @4xl/grid:grid-cols-3",
|
|
31
|
+
4: "grid-cols-1 @md/grid:grid-cols-2 @4xl/grid:grid-cols-4",
|
|
32
|
+
6: "grid-cols-2 @lg/grid:grid-cols-3 @4xl/grid:grid-cols-6",
|
|
33
|
+
12: "grid-cols-4 @lg/grid:grid-cols-6 @4xl/grid:grid-cols-12"
|
|
34
|
+
}, p = {
|
|
35
|
+
none: "gap-0",
|
|
36
|
+
sm: "gap-2",
|
|
37
|
+
md: "gap-4",
|
|
38
|
+
lg: "gap-6",
|
|
39
|
+
xl: "gap-8"
|
|
40
|
+
}, e = a.forwardRef(
|
|
41
|
+
({ className: g, cols: d = 3, gap: i = "md", container: c, ...s }, l) => c ? /* @__PURE__ */ r("div", { className: "@container/grid", children: /* @__PURE__ */ r(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
ref: l,
|
|
45
|
+
"data-slot": "grid",
|
|
46
|
+
className: o(
|
|
47
|
+
"grid",
|
|
48
|
+
p[i ?? "md"],
|
|
49
|
+
n[d ?? 3],
|
|
50
|
+
g
|
|
51
|
+
),
|
|
52
|
+
...s
|
|
53
|
+
}
|
|
54
|
+
) }) : /* @__PURE__ */ r(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
ref: l,
|
|
58
|
+
"data-slot": "grid",
|
|
59
|
+
className: o(t({ cols: d, gap: i }), g),
|
|
60
|
+
...s
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
);
|
|
64
|
+
e.displayName = "Grid";
|
|
65
|
+
export {
|
|
66
|
+
e as Grid,
|
|
67
|
+
t as gridVariants
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.js","sources":["../../../../src/components/ui/grid/grid.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\n// A responsive CSS-grid layout primitive. By default columns step down at viewport\n// breakpoints. With `container`, the grid is wrapped in a `@container/grid` and its\n// columns respond to the grid's own available width (its column/content area)\n// rather than the viewport — the right behavior for widget grids inside App Shell,\n// whose width shrinks as the sidebar expands.\nconst gridVariants = cva('grid', {\n variants: {\n cols: {\n 1: 'grid-cols-1',\n 2: 'grid-cols-1 sm:grid-cols-2',\n 3: 'grid-cols-1 sm:grid-cols-2 lg:grid-cols-3',\n 4: 'grid-cols-1 sm:grid-cols-2 lg:grid-cols-4',\n 6: 'grid-cols-2 sm:grid-cols-3 lg:grid-cols-6',\n 12: 'grid-cols-4 sm:grid-cols-6 lg:grid-cols-12',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-2',\n md: 'gap-4',\n lg: 'gap-6',\n xl: 'gap-8',\n },\n },\n defaultVariants: {\n cols: 3,\n gap: 'md',\n },\n});\n\n// Container-query column classes (named container `grid`), mirroring the viewport\n// scale above but keyed to the grid's own width.\nconst containerColsClass: Record<NonNullable<GridProps['cols']>, string> = {\n 1: 'grid-cols-1',\n 2: 'grid-cols-1 @md/grid:grid-cols-2',\n 3: 'grid-cols-1 @md/grid:grid-cols-2 @4xl/grid:grid-cols-3',\n 4: 'grid-cols-1 @md/grid:grid-cols-2 @4xl/grid:grid-cols-4',\n 6: 'grid-cols-2 @lg/grid:grid-cols-3 @4xl/grid:grid-cols-6',\n 12: 'grid-cols-4 @lg/grid:grid-cols-6 @4xl/grid:grid-cols-12',\n};\nconst gapClass: Record<NonNullable<GridProps['gap']>, string> = {\n none: 'gap-0',\n sm: 'gap-2',\n md: 'gap-4',\n lg: 'gap-6',\n xl: 'gap-8',\n};\n\nexport interface GridProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof gridVariants> {\n /**\n * Size columns by the grid's own width (container queries) instead of the\n * viewport. Wraps the grid in a `@container/grid`.\n */\n container?: boolean;\n}\n\nconst Grid = React.forwardRef<HTMLDivElement, GridProps>(\n ({ className, cols = 3, gap = 'md', container, ...props }, ref) => {\n if (container) {\n return (\n <div className=\"@container/grid\">\n <div\n ref={ref}\n data-slot=\"grid\"\n className={cn(\n 'grid',\n gapClass[gap ?? 'md'],\n containerColsClass[cols ?? 3],\n className\n )}\n {...props}\n />\n </div>\n );\n }\n return (\n <div\n ref={ref}\n data-slot=\"grid\"\n className={cn(gridVariants({ cols, gap }), className)}\n {...props}\n />\n );\n }\n);\nGrid.displayName = 'Grid';\n\nexport { Grid, gridVariants };\n"],"names":["gridVariants","cva","containerColsClass","gapClass","Grid","React","className","cols","gap","container","props","ref","jsx","cn"],"mappings":";;;;AAUA,MAAMA,IAAeC,EAAI,QAAQ;AAAA,EAC/B,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG;AAAA,MACH,IAAI;AAAA,IAAA;AAAA,IAEN,KAAK;AAAA,MACH,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,EACN;AAAA,EAEF,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,KAAK;AAAA,EAAA;AAET,CAAC,GAIKC,IAAqE;AAAA,EACzE,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AACN,GACMC,IAA0D;AAAA,EAC9D,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAYMC,IAAOC,EAAM;AAAA,EACjB,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,GAAG,KAAAC,IAAM,MAAM,WAAAC,GAAW,GAAGC,EAAA,GAASC,MACrDF,IAEA,gBAAAG,EAAC,OAAA,EAAI,WAAU,mBACb,UAAA,gBAAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,aAAU;AAAA,MACV,WAAWE;AAAA,QACT;AAAA,QACAV,EAASK,KAAO,IAAI;AAAA,QACpBN,EAAmBK,KAAQ,CAAC;AAAA,QAC5BD;AAAA,MAAA;AAAA,MAED,GAAGI;AAAA,IAAA;AAAA,EAAA,GAER,IAIF,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,aAAU;AAAA,MACV,WAAWE,EAAGb,EAAa,EAAE,MAAAO,GAAM,KAAAC,EAAA,CAAK,GAAGF,CAAS;AAAA,MACnD,GAAGI;AAAA,IAAA;AAAA,EAAA;AAIZ;AACAN,EAAK,cAAc;"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { NumberField as t } from "@base-ui/react/number-field";
|
|
4
|
+
import { MinusIcon as n, PlusIcon as u } from "@acronis-platform/icons-react/stroke-mono";
|
|
5
|
+
import { cn as l } from "../../../lib/utils.js";
|
|
6
|
+
const g = t.Root, b = a.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ i(
|
|
7
|
+
t.Group,
|
|
8
|
+
{
|
|
9
|
+
ref: o,
|
|
10
|
+
className: l(
|
|
11
|
+
"flex h-[var(--ui-input-text-global-box-height)] w-full min-w-0 items-stretch overflow-hidden rounded-[var(--ui-input-text-global-box-border-radius)] border bg-[var(--ui-input-text-global-box-color-idle)] border-[var(--ui-input-text-normal-box-border-color-idle)] transition-colors",
|
|
12
|
+
"not-has-disabled:hover:border-[var(--ui-input-text-normal-box-border-color-hover)]",
|
|
13
|
+
"has-[input:focus-visible]:border-[var(--ui-input-text-normal-box-border-color-hover)] has-[input:focus-visible]:ring-[3px] has-[input:focus-visible]:ring-[var(--ui-focus-primary)]",
|
|
14
|
+
"has-disabled:cursor-not-allowed has-disabled:border-[var(--ui-input-text-normal-box-border-color-disabled)] has-disabled:bg-[var(--ui-input-text-global-box-color-disabled)]",
|
|
15
|
+
"has-[input[aria-invalid=true]]:border-[var(--ui-input-text-error-msg-box-border-color-idle)] has-[input[aria-invalid=true]:focus-visible]:ring-[var(--ui-focus-error)]",
|
|
16
|
+
e
|
|
17
|
+
),
|
|
18
|
+
...r
|
|
19
|
+
}
|
|
20
|
+
));
|
|
21
|
+
b.displayName = "NumberFieldGroup";
|
|
22
|
+
const c = a.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ i(
|
|
23
|
+
t.Input,
|
|
24
|
+
{
|
|
25
|
+
ref: o,
|
|
26
|
+
className: l(
|
|
27
|
+
"min-w-0 flex-1 bg-transparent px-[var(--ui-input-text-global-box-padding-x)] text-center text-sm leading-6 text-[var(--ui-input-text-global-value-color-idle)] outline-none placeholder:text-[var(--ui-input-text-global-placeholder-color-idle)] disabled:cursor-not-allowed disabled:text-[var(--ui-input-text-global-value-color-disabled)]",
|
|
28
|
+
e
|
|
29
|
+
),
|
|
30
|
+
...r
|
|
31
|
+
}
|
|
32
|
+
));
|
|
33
|
+
c.displayName = "NumberFieldInput";
|
|
34
|
+
const s = "flex w-9 shrink-0 cursor-pointer items-center justify-center text-[var(--ui-text-on-surface-secondary)] transition-colors not-disabled:hover:bg-[var(--ui-background-surface-hover)] not-disabled:hover:text-[var(--ui-text-on-surface-primary)] disabled:cursor-not-allowed disabled:text-[var(--ui-text-on-surface-disabled)]", m = a.forwardRef(({ className: e, children: r, ...o }, d) => /* @__PURE__ */ i(
|
|
35
|
+
t.Decrement,
|
|
36
|
+
{
|
|
37
|
+
ref: d,
|
|
38
|
+
className: l(s, e),
|
|
39
|
+
...o,
|
|
40
|
+
children: r ?? /* @__PURE__ */ i(n, { size: 16 })
|
|
41
|
+
}
|
|
42
|
+
));
|
|
43
|
+
m.displayName = "NumberFieldDecrement";
|
|
44
|
+
const p = a.forwardRef(({ className: e, children: r, ...o }, d) => /* @__PURE__ */ i(
|
|
45
|
+
t.Increment,
|
|
46
|
+
{
|
|
47
|
+
ref: d,
|
|
48
|
+
className: l(s, e),
|
|
49
|
+
...o,
|
|
50
|
+
children: r ?? /* @__PURE__ */ i(u, { size: 16 })
|
|
51
|
+
}
|
|
52
|
+
));
|
|
53
|
+
p.displayName = "NumberFieldIncrement";
|
|
54
|
+
export {
|
|
55
|
+
g as NumberField,
|
|
56
|
+
m as NumberFieldDecrement,
|
|
57
|
+
b as NumberFieldGroup,
|
|
58
|
+
p as NumberFieldIncrement,
|
|
59
|
+
c as NumberFieldInput
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=number-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-field.js","sources":["../../../../src/components/ui/number-field/number-field.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { NumberField as NumberFieldPrimitive } from '@base-ui/react/number-field';\nimport { MinusIcon, PlusIcon } from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\n\n// Ported from `@acronis-platform`'s `number-field`, on Base UI's NumberField\n// (Root / Group / Decrement / Input / Increment). No `--ui-number-field-*` tier —\n// the box reuses the `--ui-input-text-*` tier (already imported) so it matches\n// InputBox / InputText; the steppers use the muted/primary surface + text tokens.\n\nconst NumberField = NumberFieldPrimitive.Root;\n\n// The bordered box wrapping the steppers + input. Mirrors the InputBox field box\n// (height / radius / border / bg / hover / focus-within ring / disabled / invalid).\nconst NumberFieldGroup = React.forwardRef<\n React.ElementRef<typeof NumberFieldPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof NumberFieldPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <NumberFieldPrimitive.Group\n ref={ref}\n className={cn(\n 'flex h-[var(--ui-input-text-global-box-height)] w-full min-w-0 items-stretch overflow-hidden rounded-[var(--ui-input-text-global-box-border-radius)] border bg-[var(--ui-input-text-global-box-color-idle)] border-[var(--ui-input-text-normal-box-border-color-idle)] transition-colors',\n 'not-has-disabled:hover:border-[var(--ui-input-text-normal-box-border-color-hover)]',\n 'has-[input:focus-visible]:border-[var(--ui-input-text-normal-box-border-color-hover)] has-[input:focus-visible]:ring-[3px] has-[input:focus-visible]:ring-[var(--ui-focus-primary)]',\n 'has-disabled:cursor-not-allowed has-disabled:border-[var(--ui-input-text-normal-box-border-color-disabled)] has-disabled:bg-[var(--ui-input-text-global-box-color-disabled)]',\n 'has-[input[aria-invalid=true]]:border-[var(--ui-input-text-error-msg-box-border-color-idle)] has-[input[aria-invalid=true]:focus-visible]:ring-[var(--ui-focus-error)]',\n className\n )}\n {...props}\n />\n));\nNumberFieldGroup.displayName = 'NumberFieldGroup';\n\nconst NumberFieldInput = React.forwardRef<\n React.ElementRef<typeof NumberFieldPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof NumberFieldPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <NumberFieldPrimitive.Input\n ref={ref}\n className={cn(\n 'min-w-0 flex-1 bg-transparent px-[var(--ui-input-text-global-box-padding-x)] text-center text-sm leading-6 text-[var(--ui-input-text-global-value-color-idle)] outline-none placeholder:text-[var(--ui-input-text-global-placeholder-color-idle)] disabled:cursor-not-allowed disabled:text-[var(--ui-input-text-global-value-color-disabled)]',\n className\n )}\n {...props}\n />\n));\nNumberFieldInput.displayName = 'NumberFieldInput';\n\nconst stepperClassName =\n 'flex w-9 shrink-0 cursor-pointer items-center justify-center text-[var(--ui-text-on-surface-secondary)] transition-colors not-disabled:hover:bg-[var(--ui-background-surface-hover)] not-disabled:hover:text-[var(--ui-text-on-surface-primary)] disabled:cursor-not-allowed disabled:text-[var(--ui-text-on-surface-disabled)]';\n\nconst NumberFieldDecrement = React.forwardRef<\n React.ElementRef<typeof NumberFieldPrimitive.Decrement>,\n React.ComponentPropsWithoutRef<typeof NumberFieldPrimitive.Decrement>\n>(({ className, children, ...props }, ref) => (\n <NumberFieldPrimitive.Decrement\n ref={ref}\n className={cn(stepperClassName, className)}\n {...props}\n >\n {children ?? <MinusIcon size={16} />}\n </NumberFieldPrimitive.Decrement>\n));\nNumberFieldDecrement.displayName = 'NumberFieldDecrement';\n\nconst NumberFieldIncrement = React.forwardRef<\n React.ElementRef<typeof NumberFieldPrimitive.Increment>,\n React.ComponentPropsWithoutRef<typeof NumberFieldPrimitive.Increment>\n>(({ className, children, ...props }, ref) => (\n <NumberFieldPrimitive.Increment\n ref={ref}\n className={cn(stepperClassName, className)}\n {...props}\n >\n {children ?? <PlusIcon size={16} />}\n </NumberFieldPrimitive.Increment>\n));\nNumberFieldIncrement.displayName = 'NumberFieldIncrement';\n\nexport {\n NumberField,\n NumberFieldGroup,\n NumberFieldInput,\n NumberFieldDecrement,\n NumberFieldIncrement,\n};\n"],"names":["NumberField","NumberFieldPrimitive","NumberFieldGroup","React","className","props","ref","jsx","cn","NumberFieldInput","stepperClassName","NumberFieldDecrement","children","MinusIcon","NumberFieldIncrement","PlusIcon"],"mappings":";;;;;AAaA,MAAMA,IAAcC,EAAqB,MAInCC,IAAmBC,EAAM,WAG7B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAACN,EAAqB;AAAA,EAArB;AAAA,IACC,KAAAK;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAiB,cAAc;AAE/B,MAAMO,IAAmBN,EAAM,WAG7B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAACN,EAAqB;AAAA,EAArB;AAAA,IACC,KAAAK;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDI,EAAiB,cAAc;AAE/B,MAAMC,IACJ,mUAEIC,IAAuBR,EAAM,WAGjC,CAAC,EAAE,WAAAC,GAAW,UAAAQ,GAAU,GAAGP,KAASC,MACpC,gBAAAC;AAAA,EAACN,EAAqB;AAAA,EAArB;AAAA,IACC,KAAAK;AAAA,IACA,WAAWE,EAAGE,GAAkBN,CAAS;AAAA,IACxC,GAAGC;AAAA,IAEH,UAAAO,KAAY,gBAAAL,EAACM,GAAA,EAAU,MAAM,GAAA,CAAI;AAAA,EAAA;AACpC,CACD;AACDF,EAAqB,cAAc;AAEnC,MAAMG,IAAuBX,EAAM,WAGjC,CAAC,EAAE,WAAAC,GAAW,UAAAQ,GAAU,GAAGP,KAASC,MACpC,gBAAAC;AAAA,EAACN,EAAqB;AAAA,EAArB;AAAA,IACC,KAAAK;AAAA,IACA,WAAWE,EAAGE,GAAkBN,CAAS;AAAA,IACxC,GAAGC;AAAA,IAEH,UAAAO,KAAY,gBAAAL,EAACQ,GAAA,EAAS,MAAM,GAAA,CAAI;AAAA,EAAA;AACnC,CACD;AACDD,EAAqB,cAAc;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { cn as m } from "../../../lib/utils.js";
|
|
4
|
+
const n = r.forwardRef(
|
|
5
|
+
({ className: t, ...o }, a) => /* @__PURE__ */ e(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
ref: a,
|
|
9
|
+
"data-slot": "page-content",
|
|
10
|
+
className: m("flex-1 p-6", t),
|
|
11
|
+
...o
|
|
12
|
+
}
|
|
13
|
+
)
|
|
14
|
+
);
|
|
15
|
+
n.displayName = "PageContent";
|
|
16
|
+
export {
|
|
17
|
+
n as PageContent
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=page-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-content.js","sources":["../../../../src/components/ui/page-content/page-content.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n// The page content region — the padded gutter for a page's body. Ported from\n// `@acronis-platform`'s `page-content`. Rendered as a `<div>` (not `<main>`) so it\n// nests inside `AppShellMain` without duplicating the `main` landmark; if used\n// standalone, wrap it in your own `<main>`. Layout-only (flex-1 + page padding).\nexport type PageContentProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst PageContent = React.forwardRef<HTMLDivElement, PageContentProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"page-content\"\n className={cn('flex-1 p-6', className)}\n {...props}\n />\n )\n);\nPageContent.displayName = 'PageContent';\n\nexport { PageContent };\n"],"names":["PageContent","React","className","props","ref","jsx","cn"],"mappings":";;;AAUA,MAAMA,IAAcC,EAAM;AAAA,EACxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MACxB,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,aAAU;AAAA,MACV,WAAWE,EAAG,cAAcJ,CAAS;AAAA,MACpC,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AACAH,EAAY,cAAc;"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { cn as s } from "../../../lib/utils.js";
|
|
4
|
+
const o = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
ref: r,
|
|
8
|
+
"data-slot": "page-header",
|
|
9
|
+
role: "banner",
|
|
10
|
+
className: s("flex flex-col gap-2 pb-4", e),
|
|
11
|
+
...a
|
|
12
|
+
}
|
|
13
|
+
));
|
|
14
|
+
o.displayName = "PageHeader";
|
|
15
|
+
const i = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
16
|
+
"nav",
|
|
17
|
+
{
|
|
18
|
+
ref: r,
|
|
19
|
+
"data-slot": "page-header-breadcrumb",
|
|
20
|
+
"aria-label": "Breadcrumb",
|
|
21
|
+
className: s("text-sm text-muted-foreground", e),
|
|
22
|
+
...a
|
|
23
|
+
}
|
|
24
|
+
));
|
|
25
|
+
i.displayName = "PageHeaderBreadcrumb";
|
|
26
|
+
const l = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
ref: r,
|
|
30
|
+
"data-slot": "page-header-row",
|
|
31
|
+
className: s("flex items-center justify-between gap-4", e),
|
|
32
|
+
...a
|
|
33
|
+
}
|
|
34
|
+
));
|
|
35
|
+
l.displayName = "PageHeaderRow";
|
|
36
|
+
const m = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
37
|
+
"h1",
|
|
38
|
+
{
|
|
39
|
+
ref: r,
|
|
40
|
+
"data-slot": "page-header-title",
|
|
41
|
+
className: s("text-lg font-semibold leading-tight tracking-tight", e),
|
|
42
|
+
...a
|
|
43
|
+
}
|
|
44
|
+
));
|
|
45
|
+
m.displayName = "PageHeaderTitle";
|
|
46
|
+
const c = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
47
|
+
"p",
|
|
48
|
+
{
|
|
49
|
+
ref: r,
|
|
50
|
+
"data-slot": "page-header-description",
|
|
51
|
+
className: s("text-sm text-muted-foreground", e),
|
|
52
|
+
...a
|
|
53
|
+
}
|
|
54
|
+
));
|
|
55
|
+
c.displayName = "PageHeaderDescription";
|
|
56
|
+
const g = d.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
ref: r,
|
|
60
|
+
"data-slot": "page-header-actions",
|
|
61
|
+
className: s("flex shrink-0 items-center gap-2", e),
|
|
62
|
+
...a
|
|
63
|
+
}
|
|
64
|
+
));
|
|
65
|
+
g.displayName = "PageHeaderActions";
|
|
66
|
+
export {
|
|
67
|
+
o as PageHeader,
|
|
68
|
+
g as PageHeaderActions,
|
|
69
|
+
i as PageHeaderBreadcrumb,
|
|
70
|
+
c as PageHeaderDescription,
|
|
71
|
+
l as PageHeaderRow,
|
|
72
|
+
m as PageHeaderTitle
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=page-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-header.js","sources":["../../../../src/components/ui/page-header/page-header.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n// The page header region from the Figma (shadcn-uikit node 2850-701): an optional\n// breadcrumb, a title row (title left, actions right), and an optional description.\n// Ported from `@acronis-platform`'s `page-header` and reconciled with the Figma —\n// the title is a moderate page title (not the legacy 2xl). Markup-only; the only\n// color is the muted breadcrumb/description (text-muted-foreground →\n// --ui-text-on-surface-secondary).\n\nconst PageHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"page-header\"\n role=\"banner\"\n className={cn('flex flex-col gap-2 pb-4', className)}\n {...props}\n />\n));\nPageHeader.displayName = 'PageHeader';\n\nconst PageHeaderBreadcrumb = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <nav\n ref={ref}\n data-slot=\"page-header-breadcrumb\"\n aria-label=\"Breadcrumb\"\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n));\nPageHeaderBreadcrumb.displayName = 'PageHeaderBreadcrumb';\n\n// The title + actions row: title on the left, actions pushed to the right.\nconst PageHeaderRow = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"page-header-row\"\n className={cn('flex items-center justify-between gap-4', className)}\n {...props}\n />\n));\nPageHeaderRow.displayName = 'PageHeaderRow';\n\nconst PageHeaderTitle = React.forwardRef<\n HTMLHeadingElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h1\n ref={ref}\n data-slot=\"page-header-title\"\n className={cn('text-lg font-semibold leading-tight tracking-tight', className)}\n {...props}\n />\n));\nPageHeaderTitle.displayName = 'PageHeaderTitle';\n\nconst PageHeaderDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n data-slot=\"page-header-description\"\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n));\nPageHeaderDescription.displayName = 'PageHeaderDescription';\n\nconst PageHeaderActions = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"page-header-actions\"\n className={cn('flex shrink-0 items-center gap-2', className)}\n {...props}\n />\n));\nPageHeaderActions.displayName = 'PageHeaderActions';\n\nexport {\n PageHeader,\n PageHeaderBreadcrumb,\n PageHeaderRow,\n PageHeaderTitle,\n PageHeaderDescription,\n PageHeaderActions,\n};\n"],"names":["PageHeader","React","className","props","ref","jsx","cn","PageHeaderBreadcrumb","PageHeaderRow","PageHeaderTitle","PageHeaderDescription","PageHeaderActions"],"mappings":";;;AAWA,MAAMA,IAAaC,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,MAAK;AAAA,IACL,WAAWE,EAAG,4BAA4BJ,CAAS;AAAA,IAClD,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAW,cAAc;AAEzB,MAAMO,IAAuBN,EAAM,WAGjC,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,cAAW;AAAA,IACX,WAAWE,EAAG,iCAAiCJ,CAAS;AAAA,IACvD,GAAGC;AAAA,EAAA;AACN,CACD;AACDI,EAAqB,cAAc;AAGnC,MAAMC,IAAgBP,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,2CAA2CJ,CAAS;AAAA,IACjE,GAAGC;AAAA,EAAA;AACN,CACD;AACDK,EAAc,cAAc;AAE5B,MAAMC,IAAkBR,EAAM,WAG5B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,sDAAsDJ,CAAS;AAAA,IAC5E,GAAGC;AAAA,EAAA;AACN,CACD;AACDM,EAAgB,cAAc;AAE9B,MAAMC,IAAwBT,EAAM,WAGlC,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,iCAAiCJ,CAAS;AAAA,IACvD,GAAGC;AAAA,EAAA;AACN,CACD;AACDO,EAAsB,cAAc;AAEpC,MAAMC,IAAoBV,EAAM,WAG9B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,oCAAoCJ,CAAS;AAAA,IAC1D,GAAGC;AAAA,EAAA;AACN,CACD;AACDQ,EAAkB,cAAc;"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { EllipsisIcon as l, ChevronRightIcon as c, ChevronLeftIcon as m } from "@acronis-platform/icons-react/stroke-mono";
|
|
4
|
+
import { cn as t } from "../../../lib/utils.js";
|
|
5
|
+
function y({ className: a, ...i }) {
|
|
6
|
+
return /* @__PURE__ */ e(
|
|
7
|
+
"nav",
|
|
8
|
+
{
|
|
9
|
+
role: "navigation",
|
|
10
|
+
"aria-label": "pagination",
|
|
11
|
+
className: t("mx-auto flex w-full justify-center", a),
|
|
12
|
+
...i
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
const u = r.forwardRef(({ className: a, ...i }, n) => /* @__PURE__ */ e(
|
|
17
|
+
"ul",
|
|
18
|
+
{
|
|
19
|
+
ref: n,
|
|
20
|
+
className: t("flex flex-row items-center gap-1", a),
|
|
21
|
+
...i
|
|
22
|
+
}
|
|
23
|
+
));
|
|
24
|
+
u.displayName = "PaginationContent";
|
|
25
|
+
const g = r.forwardRef(({ className: a, ...i }, n) => /* @__PURE__ */ e("li", { ref: n, className: a, ...i }));
|
|
26
|
+
g.displayName = "PaginationItem";
|
|
27
|
+
const f = (a) => t(
|
|
28
|
+
"inline-flex h-8 min-w-8 select-none items-center justify-center rounded-md px-2 text-sm font-medium text-[var(--ui-text-on-surface-primary)] transition-colors outline-none",
|
|
29
|
+
"focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-primary)]",
|
|
30
|
+
a ? "bg-[var(--ui-background-surface-active)]" : "hover:bg-[var(--ui-background-surface-hover)]"
|
|
31
|
+
), o = ({
|
|
32
|
+
className: a,
|
|
33
|
+
isActive: i,
|
|
34
|
+
...n
|
|
35
|
+
}) => /* @__PURE__ */ e(
|
|
36
|
+
"a",
|
|
37
|
+
{
|
|
38
|
+
"aria-current": i ? "page" : void 0,
|
|
39
|
+
className: t(f(i), a),
|
|
40
|
+
...n
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
o.displayName = "PaginationLink";
|
|
44
|
+
const p = ({
|
|
45
|
+
className: a,
|
|
46
|
+
...i
|
|
47
|
+
}) => /* @__PURE__ */ e(
|
|
48
|
+
o,
|
|
49
|
+
{
|
|
50
|
+
"aria-label": "Go to previous page",
|
|
51
|
+
className: a,
|
|
52
|
+
...i,
|
|
53
|
+
children: /* @__PURE__ */ e(m, { size: 16 })
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
p.displayName = "PaginationPrevious";
|
|
57
|
+
const d = ({ className: a, ...i }) => /* @__PURE__ */ e(o, { "aria-label": "Go to next page", className: a, ...i, children: /* @__PURE__ */ e(c, { size: 16 }) });
|
|
58
|
+
d.displayName = "PaginationNext";
|
|
59
|
+
const x = ({
|
|
60
|
+
className: a,
|
|
61
|
+
...i
|
|
62
|
+
}) => /* @__PURE__ */ s(
|
|
63
|
+
"span",
|
|
64
|
+
{
|
|
65
|
+
"aria-hidden": !0,
|
|
66
|
+
className: t(
|
|
67
|
+
"flex h-8 w-8 items-center justify-center text-[var(--ui-text-on-surface-secondary)]",
|
|
68
|
+
a
|
|
69
|
+
),
|
|
70
|
+
...i,
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ e(l, { size: 16 }),
|
|
73
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "More pages" })
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
x.displayName = "PaginationEllipsis";
|
|
78
|
+
export {
|
|
79
|
+
y as Pagination,
|
|
80
|
+
u as PaginationContent,
|
|
81
|
+
x as PaginationEllipsis,
|
|
82
|
+
g as PaginationItem,
|
|
83
|
+
o as PaginationLink,
|
|
84
|
+
d as PaginationNext,
|
|
85
|
+
p as PaginationPrevious
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.js","sources":["../../../../src/components/ui/pagination/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n EllipsisIcon,\n} from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\n\n// Ported from `@acronis-platform`'s `pagination`. Markup-only (no Base UI\n// primitive). The page links are styled directly with semantic tokens (rather than\n// the Button cva, whose min-width tokens don't fit a compact square link): neutral\n// foreground page numbers, the active surface for the current page, and the hover\n// surface on hover.\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<'ul'>\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn('flex flex-row items-center gap-1', className)}\n {...props}\n />\n));\nPaginationContent.displayName = 'PaginationContent';\n\nconst PaginationItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<'li'>\n>(({ className, ...props }, ref) => <li ref={ref} className={className} {...props} />);\nPaginationItem.displayName = 'PaginationItem';\n\nexport interface PaginationLinkProps extends React.ComponentProps<'a'> {\n /** Marks the current page (sets aria-current and the selected treatment). */\n isActive?: boolean;\n}\n\nconst paginationLinkClassName = (isActive?: boolean) =>\n cn(\n 'inline-flex h-8 min-w-8 select-none items-center justify-center rounded-md px-2 text-sm font-medium text-[var(--ui-text-on-surface-primary)] transition-colors outline-none',\n 'focus-visible:ring-2 focus-visible:ring-[var(--ui-focus-primary)]',\n isActive\n ? 'bg-[var(--ui-background-surface-active)]'\n : 'hover:bg-[var(--ui-background-surface-hover)]'\n );\n\nconst PaginationLink = ({\n className,\n isActive,\n ...props\n}: PaginationLinkProps) => (\n <a\n aria-current={isActive ? 'page' : undefined}\n className={cn(paginationLinkClassName(isActive), className)}\n {...props}\n />\n);\nPaginationLink.displayName = 'PaginationLink';\n\nconst PaginationPrevious = ({\n className,\n ...props\n}: PaginationLinkProps) => (\n <PaginationLink\n aria-label=\"Go to previous page\"\n className={className}\n {...props}\n >\n <ChevronLeftIcon size={16} />\n </PaginationLink>\n);\nPaginationPrevious.displayName = 'PaginationPrevious';\n\nconst PaginationNext = ({ className, ...props }: PaginationLinkProps) => (\n <PaginationLink aria-label=\"Go to next page\" className={className} {...props}>\n <ChevronRightIcon size={16} />\n </PaginationLink>\n);\nPaginationNext.displayName = 'PaginationNext';\n\nconst PaginationEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<'span'>) => (\n <span\n aria-hidden\n className={cn(\n 'flex h-8 w-8 items-center justify-center text-[var(--ui-text-on-surface-secondary)]',\n className\n )}\n {...props}\n >\n <EllipsisIcon size={16} />\n <span className=\"sr-only\">More pages</span>\n </span>\n);\nPaginationEllipsis.displayName = 'PaginationEllipsis';\n\nexport {\n Pagination,\n PaginationContent,\n PaginationItem,\n PaginationLink,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"names":["Pagination","className","props","jsx","cn","PaginationContent","React","ref","PaginationItem","paginationLinkClassName","isActive","PaginationLink","PaginationPrevious","ChevronLeftIcon","PaginationNext","ChevronRightIcon","PaginationEllipsis","jsxs","EllipsisIcon"],"mappings":";;;;AAcA,SAASA,EAAW,EAAE,WAAAC,GAAW,GAAGC,KAAsC;AACxE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACX,WAAWC,EAAG,sCAAsCH,CAAS;AAAA,MAC5D,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,MAAMG,IAAoBC,EAAM,WAG9B,CAAC,EAAE,WAAAL,GAAW,GAAGC,EAAA,GAASK,MAC1B,gBAAAJ;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAI;AAAA,IACA,WAAWH,EAAG,oCAAoCH,CAAS;AAAA,IAC1D,GAAGC;AAAA,EAAA;AACN,CACD;AACDG,EAAkB,cAAc;AAEhC,MAAMG,IAAiBF,EAAM,WAG3B,CAAC,EAAE,WAAAL,GAAW,GAAGC,EAAA,GAASK,wBAAS,MAAA,EAAG,KAAAA,GAAU,WAAAN,GAAuB,GAAGC,GAAO,CAAE;AACrFM,EAAe,cAAc;AAO7B,MAAMC,IAA0B,CAACC,MAC/BN;AAAA,EACE;AAAA,EACA;AAAA,EACAM,IACI,6CACA;AACN,GAEIC,IAAiB,CAAC;AAAA,EACtB,WAAAV;AAAA,EACA,UAAAS;AAAA,EACA,GAAGR;AACL,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,gBAAcO,IAAW,SAAS;AAAA,IAClC,WAAWN,EAAGK,EAAwBC,CAAQ,GAAGT,CAAS;AAAA,IACzD,GAAGC;AAAA,EAAA;AACN;AAEFS,EAAe,cAAc;AAE7B,MAAMC,IAAqB,CAAC;AAAA,EAC1B,WAAAX;AAAA,EACA,GAAGC;AACL,MACE,gBAAAC;AAAA,EAACQ;AAAA,EAAA;AAAA,IACC,cAAW;AAAA,IACX,WAAAV;AAAA,IACC,GAAGC;AAAA,IAEJ,UAAA,gBAAAC,EAACU,GAAA,EAAgB,MAAM,GAAA,CAAI;AAAA,EAAA;AAC7B;AAEFD,EAAmB,cAAc;AAEjC,MAAME,IAAiB,CAAC,EAAE,WAAAb,GAAW,GAAGC,EAAA,MACtC,gBAAAC,EAACQ,GAAA,EAAe,cAAW,mBAAkB,WAAAV,GAAuB,GAAGC,GACrE,4BAACa,GAAA,EAAiB,MAAM,IAAI,EAAA,CAC9B;AAEFD,EAAe,cAAc;AAE7B,MAAME,IAAqB,CAAC;AAAA,EAC1B,WAAAf;AAAA,EACA,GAAGC;AACL,MACE,gBAAAe;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,eAAW;AAAA,IACX,WAAWb;AAAA,MACT;AAAA,MACAH;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAC,EAACe,GAAA,EAAa,MAAM,GAAA,CAAI;AAAA,MACxB,gBAAAf,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,aAAA,CAAU;AAAA,IAAA;AAAA,EAAA;AACtC;AAEFa,EAAmB,cAAc;"}
|