@cryptlex/web-components 3.7.2 → 3.8.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/data-table/data-table.es.js +135 -146
- package/dist/components/data-table/data-table.es.js.map +1 -1
- package/dist/components/data-table/table-commons.es.js +1 -1
- package/dist/components/data-table/table-commons.es.js.map +1 -1
- package/dist/components/data-table/table-content.es.js +54 -87
- package/dist/components/data-table/table-content.es.js.map +1 -1
- package/dist/components/inputs/checkbox.es.js +1 -1
- package/dist/components/inputs/checkbox.es.js.map +1 -1
- package/dist/components/ui/badge.es.js +11 -10
- package/dist/components/ui/badge.es.js.map +1 -1
- package/dist/components/ui/dropdown-menu.es.js +35 -35
- package/dist/components/ui/dropdown-menu.es.js.map +1 -1
- package/dist/index.es.d.ts +18 -14
- package/dist/node_modules/.pnpm/{@floating-ui_core@1.7.1 → @floating-ui_core@1.7.2}/node_modules/@floating-ui/core/dist/floating-ui.core.es.js +36 -36
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.es.js.map +1 -0
- package/dist/node_modules/.pnpm/{@floating-ui_dom@1.7.1 → @floating-ui_dom@1.7.2}/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js +57 -56
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js.map +1 -0
- package/dist/node_modules/.pnpm/{@floating-ui_react-dom@2.1.3_react-dom@19.1.0_react@19.1.0 → @floating-ui_react-dom@2.1.4_react-dom@19.1.0_react@19.1.0}/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js +2 -2
- package/dist/node_modules/.pnpm/{@floating-ui_react-dom@2.1.3_react-dom@19.1.0_react@19.1.0 → @floating-ui_react-dom@2.1.4_react-dom@19.1.0_react@19.1.0}/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js.map +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js +137 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js.map +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js +131 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js.map +1 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-popper@1.2.7_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-popper/dist/index.es.js +2 -2
- package/package.json +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.1/node_modules/@floating-ui/core/dist/floating-ui.core.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js +0 -132
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js +0 -130
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-content.es.js","sources":["../../../lib/components/data-table/table-content.tsx"],"sourcesContent":["import { ACTIONS_COLUMN_ID } from \"@/components/data-table/data-table\";\nimport { Button
|
|
1
|
+
{"version":3,"file":"table-content.es.js","sources":["../../../lib/components/data-table/table-content.tsx"],"sourcesContent":["import { ACTIONS_COLUMN_ID } from \"@/components/data-table/data-table\";\nimport { Button } from \"@/components/ui\";\nimport {\n\tTableBody,\n\tTableCell,\n\tTable as TableComponent,\n\tTableHead,\n\tTableHeader,\n\tTableRow,\n} from \"@/components/ui/table\";\nimport {\n\ttype HeaderGroup,\n\ttype RowModel,\n\tflexRender,\n} from \"@tanstack/react-table\";\nimport {\n\tArrowDownNarrowWide,\n\tArrowDownWideNarrow,\n\tArrowUpDown\n} from \"lucide-react\";\n\n// TODO, automate checking valid HTML\nexport function TableContent({\n\tclassName,\n\tgetHeaderGroups,\n\tgetRowModel,\n}: {\n\tclassName?: string;\n\tgetRowModel: () => RowModel<any>;\n\tgetHeaderGroups: () => HeaderGroup<any>[];\n}) {\n\treturn (\n\t\t<TableComponent className={className}>\n\t\t\t<TableHeader className=\"sticky top-0 z-10\">\n\t\t\t\t{getHeaderGroups().map((headerGroup) => (\n\t\t\t\t\t<TableRow key={headerGroup.id}>\n\t\t\t\t\t\t{headerGroup.headers.map((header) => (\n\t\t\t\t\t\t\t<TableHead\n\t\t\t\t\t\t\t\tkey={header.id}\n\t\t\t\t\t\t\t\tclassName={`px-4 py-2 text-left text-sm font-medium bg-card whitespace-nowrap ${header.id === ACTIONS_COLUMN_ID ? \"sticky right-0 z-50 text-center\" : \"\"}`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span className=\"inline-flex items-center gap-1\">\n\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t{header.isPlaceholder\n\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t: flexRender(\n\t\t\t\t\t\t\t\t\t\t\t\theader.column.columnDef.header,\n\t\t\t\t\t\t\t\t\t\t\t\theader.getContext(),\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{header.column.getCanSort() && (\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={header.column.getToggleSortingHandler()}\n\t\t\t\t\t\t\t\t\t\t\ticon={() => {\n\t\t\t\t\t\t\t\t\t\t\t\tconst sort = header.column.getIsSorted();\n\t\t\t\t\t\t\t\t\t\t\t\tif (sort === \"asc\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn ArrowDownNarrowWide;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif (sort === \"desc\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn ArrowDownWideNarrow;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\treturn ArrowUpDown;\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</TableHead>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</TableRow>\n\t\t\t\t))}\n\t\t\t</TableHeader>\n\t\t\t<TableBody className=\"flex-1 overflow-y-auto relative\">\n\t\t\t\t{getRowModel().rows.length !== 0 &&\n\t\t\t\t\tgetRowModel().rows.map((row) => (\n\t\t\t\t\t\t<TableRow\n\t\t\t\t\t\t\tclassName=\"h-input transition-colors data-[state=selected]:bg-muted-foreground/30 hover:bg-muted-foreground/20\"\n\t\t\t\t\t\t\tkey={row.id}\n\t\t\t\t\t\t\tdata-state={row.getIsSelected() && \"selected\"}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{row.getVisibleCells().map((cell) => (\n\t\t\t\t\t\t\t\t<TableCell\n\t\t\t\t\t\t\t\t\tkey={cell.id}\n\t\t\t\t\t\t\t\t\tclassName={`\n px-4 py-2 text-left text-sm whitespace-nowrap\n ${cell.column.id === ACTIONS_COLUMN_ID\n\t\t\t\t\t\t\t\t\t\t\t? \"sticky right-0 w-20 bg-card\"\n\t\t\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t\t\t\t}\n `}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{flexRender(\n\t\t\t\t\t\t\t\t\t\tcell.column.columnDef.cell,\n\t\t\t\t\t\t\t\t\t\tcell.getContext(),\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</TableCell>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</TableRow>\n\t\t\t\t\t))}\n\t\t\t</TableBody>\n\t\t</TableComponent>\n\t);\n}\n"],"names":["TableContent","className","getHeaderGroups","getRowModel","jsxs","TableComponent","jsx","TableHeader","headerGroup","TableRow","header","TableHead","ACTIONS_COLUMN_ID","flexRender","Button","sort","ArrowDownNarrowWide","ArrowDownWideNarrow","ArrowUpDown","TableBody","row","cell","TableCell"],"mappings":";;;;;;AAsBO,SAASA,EAAa;AAAA,EAC5B,WAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,aAAAC;AACD,GAIG;AACF,SACC,gBAAAC,EAACC,KAAe,WAAAJ,GACf,UAAA;AAAA,IAAA,gBAAAK,EAACC,GAAA,EAAY,WAAU,qBACrB,UAAAL,EAAA,EAAkB,IAAI,CAACM,MACvB,gBAAAF,EAACG,GAAA,EACC,UAAAD,EAAY,QAAQ,IAAI,CAACE,MACzB,gBAAAJ;AAAA,MAACK;AAAA,MAAA;AAAA,QAEA,WAAW,qEAAqED,EAAO,OAAOE,IAAoB,oCAAoC,EAAE;AAAA,QAExJ,UAAA,gBAAAR,EAAC,QAAA,EAAK,WAAU,kCACf,UAAA;AAAA,UAAA,gBAAAE,EAAC,QAAA,EACC,UAAAI,EAAO,gBACL,OACAG;AAAA,YACDH,EAAO,OAAO,UAAU;AAAA,YACxBA,EAAO,WAAA;AAAA,UAAW,GAErB;AAAA,UACCA,EAAO,OAAO,WAAA,KACd,gBAAAJ;AAAA,YAACQ;AAAA,YAAA;AAAA,cACA,MAAK;AAAA,cACL,SAAQ;AAAA,cACR,SAASJ,EAAO,OAAO,wBAAA;AAAA,cACvB,MAAM,MAAM;AACX,sBAAMK,IAAOL,EAAO,OAAO,YAAA;AAC3B,uBAAIK,MAAS,QACLC,IAEJD,MAAS,SACLE,IAGDC;AAAA,cAAA;AAAA,YACR;AAAA,UAAA;AAAA,QACD,EAAA,CAEF;AAAA,MAAA;AAAA,MA9BKR,EAAO;AAAA,IAAA,CAgCb,KAnCaF,EAAY,EAoC3B,CACA,EAAA,CACF;AAAA,IACA,gBAAAF,EAACa,GAAA,EAAU,WAAU,mCACnB,cAAc,KAAK,WAAW,KAC9BhB,EAAA,EAAc,KAAK,IAAI,CAACiB,MACvB,gBAAAd;AAAA,MAACG;AAAA,MAAA;AAAA,QACA,WAAU;AAAA,QAEV,cAAYW,EAAI,cAAA,KAAmB;AAAA,QAElC,UAAAA,EAAI,gBAAA,EAAkB,IAAI,CAACC,MAC3B,gBAAAf;AAAA,UAACgB;AAAA,UAAA;AAAA,YAEA,WAAW;AAAA;AAAA,sBAEED,EAAK,OAAO,OAAOT,IAC5B,gCACA,EACH;AAAA;AAAA,YAGA,UAAAC;AAAA,cACAQ,EAAK,OAAO,UAAU;AAAA,cACtBA,EAAK,WAAA;AAAA,YAAW;AAAA,UACjB;AAAA,UAZKA,EAAK;AAAA,QAAA,CAcX;AAAA,MAAA;AAAA,MAnBID,EAAI;AAAA,IAAA,CAqBV,EAAA,CACH;AAAA,EAAA,GACD;AAEF;"}
|
|
@@ -3,7 +3,7 @@ import { cn as t } from "../../utils/index.es.js";
|
|
|
3
3
|
import { useFieldContext as a } from "../../utils/form-context.es.js";
|
|
4
4
|
import { CircleDashed as l, Check as c } from "lucide-react";
|
|
5
5
|
function u({ className: n, checked: e, indeterminate: i, ...r }) {
|
|
6
|
-
return /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
6
|
+
return /* @__PURE__ */ s("div", { className: "relative size-input", children: [
|
|
7
7
|
i && /* @__PURE__ */ o(l, { className: "pointer-events-none absolute size-icon top-2 left-2" }),
|
|
8
8
|
e && !i && /* @__PURE__ */ o(c, { className: "pointer-events-none absolute size-icon top-2 left-2" }),
|
|
9
9
|
/* @__PURE__ */ o(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.es.js","sources":["../../../lib/components/inputs/checkbox.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\nimport { useFieldContext } from \"@/utils/form-context\";\nimport { Check, CircleDashed } from \"lucide-react\";\nimport type * as React from \"react\";\n\nexport interface CheckboxProps\n\textends Omit<React.ComponentProps<\"input\">, \"type\" | \"value\"> {\n\tindeterminate?: boolean\n}\n\nexport function Checkbox({ className, checked, indeterminate, ...props }: CheckboxProps) {\n\treturn (\n\t\t<div className=\"relative\">\n\t\t\t{indeterminate && <CircleDashed className=\"pointer-events-none absolute size-icon top-2 left-2\" />}\n\t\t\t{checked && !indeterminate && <Check className=\"pointer-events-none absolute size-icon top-2 left-2\" />}\n\t\t\t<input\n\t\t\t\tchecked={checked}\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"appearance-none size-input border border-input bg-card checked:bg-primary rounded-none focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\n\t\t</div>\n\t);\n}\n\nexport interface TfCheckboxProps\n\textends Omit<\n\t\tReact.ComponentProps<typeof Checkbox>,\n\t\t\"onChange\" | \"onBlur\" | \"checked\"\n\t> { }\nexport function TfCheckbox({ ...props }: TfCheckboxProps) {\n\tconst field = useFieldContext<boolean>();\n\n\treturn (\n\t\t<Checkbox\n\t\t\tchecked={field.state.value}\n\t\t\tonChange={() => field.handleChange(!field.state.value)}\n\t\t\tonBlur={field.handleBlur}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n"],"names":["Checkbox","className","checked","indeterminate","props","jsxs","jsx","CircleDashed","Check","cn","TfCheckbox","field","useFieldContext"],"mappings":";;;;AAUO,SAASA,EAAS,EAAE,WAAAC,GAAW,SAAAC,GAAS,eAAAC,GAAe,GAAGC,KAAwB;AACxF,SACC,gBAAAC,EAAC,OAAA,EAAI,WAAU,
|
|
1
|
+
{"version":3,"file":"checkbox.es.js","sources":["../../../lib/components/inputs/checkbox.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\nimport { useFieldContext } from \"@/utils/form-context\";\nimport { Check, CircleDashed } from \"lucide-react\";\nimport type * as React from \"react\";\n\nexport interface CheckboxProps\n\textends Omit<React.ComponentProps<\"input\">, \"type\" | \"value\"> {\n\tindeterminate?: boolean\n}\n\nexport function Checkbox({ className, checked, indeterminate, ...props }: CheckboxProps) {\n\treturn (\n\t\t<div className=\"relative size-input\">\n\t\t\t{indeterminate && <CircleDashed className=\"pointer-events-none absolute size-icon top-2 left-2\" />}\n\t\t\t{checked && !indeterminate && <Check className=\"pointer-events-none absolute size-icon top-2 left-2\" />}\n\t\t\t<input\n\t\t\t\tchecked={checked}\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"appearance-none size-input border border-input bg-card checked:bg-primary rounded-none focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\n\t\t</div>\n\t);\n}\n\nexport interface TfCheckboxProps\n\textends Omit<\n\t\tReact.ComponentProps<typeof Checkbox>,\n\t\t\"onChange\" | \"onBlur\" | \"checked\"\n\t> { }\nexport function TfCheckbox({ ...props }: TfCheckboxProps) {\n\tconst field = useFieldContext<boolean>();\n\n\treturn (\n\t\t<Checkbox\n\t\t\tchecked={field.state.value}\n\t\t\tonChange={() => field.handleChange(!field.state.value)}\n\t\t\tonBlur={field.handleBlur}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n"],"names":["Checkbox","className","checked","indeterminate","props","jsxs","jsx","CircleDashed","Check","cn","TfCheckbox","field","useFieldContext"],"mappings":";;;;AAUO,SAASA,EAAS,EAAE,WAAAC,GAAW,SAAAC,GAAS,eAAAC,GAAe,GAAGC,KAAwB;AACxF,SACC,gBAAAC,EAAC,OAAA,EAAI,WAAU,uBACb,UAAA;AAAA,IAAAF,KAAiB,gBAAAG,EAACC,GAAA,EAAa,WAAU,sDAAA,CAAsD;AAAA,IAC/FL,KAAW,CAACC,KAAiB,gBAAAG,EAACE,GAAA,EAAM,WAAU,uDAAsD;AAAA,IACrG,gBAAAF;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,SAAAJ;AAAA,QACA,MAAK;AAAA,QACL,WAAWO;AAAA,UACV;AAAA,UACAR;AAAA,QAAA;AAAA,QAEA,GAAGG;AAAA,MAAA;AAAA,IAAA;AAAA,EACL,GAED;AAEF;AAOO,SAASM,EAAW,EAAE,GAAGN,KAA0B;AACzD,QAAMO,IAAQC,EAAA;AAEd,SACC,gBAAAN;AAAA,IAACN;AAAA,IAAA;AAAA,MACA,SAASW,EAAM,MAAM;AAAA,MACrB,UAAU,MAAMA,EAAM,aAAa,CAACA,EAAM,MAAM,KAAK;AAAA,MACrD,QAAQA,EAAM;AAAA,MACb,GAAGP;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
function
|
|
4
|
-
return /* @__PURE__ */
|
|
5
|
-
"
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as t } from "../../utils/index.es.js";
|
|
3
|
+
function s({ className: n, children: r, ...i }) {
|
|
4
|
+
return /* @__PURE__ */ e(
|
|
5
|
+
"span",
|
|
6
6
|
{
|
|
7
|
-
className:
|
|
8
|
-
"text-muted
|
|
9
|
-
|
|
7
|
+
className: t(
|
|
8
|
+
"text-muted leading-none inline-flex items-center justify-center select-none bg-card border h-input focus:outline-hidden focus:ring-1 focus:ring-ring",
|
|
9
|
+
n
|
|
10
10
|
),
|
|
11
|
-
...
|
|
11
|
+
...i,
|
|
12
|
+
children: /* @__PURE__ */ e("span", { children: r })
|
|
12
13
|
}
|
|
13
14
|
);
|
|
14
15
|
}
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
+
s as Badge
|
|
17
18
|
};
|
|
18
19
|
//# sourceMappingURL=badge.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.es.js","sources":["../../../lib/components/ui/badge.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\nimport type * as React from \"react\";\n\nexport function Badge({ className, ...props }: React.ComponentProps<\"
|
|
1
|
+
{"version":3,"file":"badge.es.js","sources":["../../../lib/components/ui/badge.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\nimport type * as React from \"react\";\n\nexport function Badge({ className, children, ...props }: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\n\t\t\t\t\"text-muted leading-none inline-flex items-center justify-center select-none bg-card border h-input focus:outline-hidden focus:ring-1 focus:ring-ring\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{/* Contents */}\n\t\t\t<span>\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t</span>\n\t);\n}\n"],"names":["Badge","className","children","props","jsx","cn"],"mappings":";;AAGO,SAASA,EAAM,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAAuC;AACtF,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWC;AAAA,QACV;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEA,GAAGE;AAAA,MAGJ,UAAA,gBAAAC,EAAC,UACC,UAAAF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGH;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { cn as n } from "../../utils/index.es.js";
|
|
3
|
-
import { Root as c, Trigger as
|
|
4
|
-
import { Check as m, ChevronRight as
|
|
5
|
-
const S = c, v =
|
|
3
|
+
import { Root as c, Trigger as l, Group as u, Portal as i, Content as p, CheckboxItem as f, ItemIndicator as d, RadioGroup as b, RadioItem as g, Sub as h, SubTrigger as w, SubContent as x, Item as N, Label as D } from "../../node_modules/.pnpm/@radix-ui_react-dropdown-menu@2.1.15_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-dropdown-menu/dist/index.es.js";
|
|
4
|
+
import { Check as m, ChevronRight as I } from "lucide-react";
|
|
5
|
+
const S = c, v = l, G = u, T = i, k = h, y = b;
|
|
6
6
|
function L({
|
|
7
|
-
className:
|
|
8
|
-
inset:
|
|
7
|
+
className: o,
|
|
8
|
+
inset: e,
|
|
9
9
|
children: a,
|
|
10
10
|
...r
|
|
11
11
|
}) {
|
|
@@ -14,102 +14,102 @@ function L({
|
|
|
14
14
|
{
|
|
15
15
|
className: n(
|
|
16
16
|
"flex cursor-default select-none items-center px-2 py-1.5 body outline-hidden focus:bg-accent data-[state=open]:bg-accent",
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
e && "pl-8",
|
|
18
|
+
o
|
|
19
19
|
),
|
|
20
20
|
...r,
|
|
21
21
|
children: [
|
|
22
22
|
a,
|
|
23
|
-
/* @__PURE__ */ t(
|
|
23
|
+
/* @__PURE__ */ t(I, { className: "ml-auto size-4" })
|
|
24
24
|
]
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
function P({
|
|
29
|
-
className:
|
|
30
|
-
...
|
|
29
|
+
className: o,
|
|
30
|
+
...e
|
|
31
31
|
}) {
|
|
32
32
|
return /* @__PURE__ */ t(
|
|
33
33
|
x,
|
|
34
34
|
{
|
|
35
35
|
className: n(
|
|
36
36
|
"z-50 min-w-32 overflow-hidden border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
37
|
-
|
|
37
|
+
o
|
|
38
38
|
),
|
|
39
|
-
...
|
|
39
|
+
...e
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
function j({
|
|
44
|
-
className:
|
|
45
|
-
sideOffset:
|
|
44
|
+
className: o,
|
|
45
|
+
sideOffset: e = 4,
|
|
46
46
|
...a
|
|
47
47
|
}) {
|
|
48
|
-
return /* @__PURE__ */ t(
|
|
48
|
+
return /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(
|
|
49
49
|
p,
|
|
50
50
|
{
|
|
51
51
|
align: "start",
|
|
52
|
-
sideOffset:
|
|
52
|
+
sideOffset: e,
|
|
53
53
|
className: n(
|
|
54
54
|
"z-50 min-w-48 max-w-2xs overflow-y-auto max-h-48 border bg-popover text-popover-foreground",
|
|
55
55
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
56
|
-
|
|
56
|
+
o
|
|
57
57
|
),
|
|
58
58
|
...a
|
|
59
59
|
}
|
|
60
60
|
) });
|
|
61
61
|
}
|
|
62
62
|
function q({
|
|
63
|
-
className:
|
|
64
|
-
...
|
|
63
|
+
className: o,
|
|
64
|
+
...e
|
|
65
65
|
}) {
|
|
66
|
-
return /* @__PURE__ */ t(
|
|
66
|
+
return /* @__PURE__ */ t(N, { className: n("dropdown-item"), ...e });
|
|
67
67
|
}
|
|
68
68
|
function A({
|
|
69
|
-
className:
|
|
70
|
-
children:
|
|
69
|
+
className: o,
|
|
70
|
+
children: e,
|
|
71
71
|
checked: a,
|
|
72
72
|
...r
|
|
73
73
|
}) {
|
|
74
74
|
return /* @__PURE__ */ s(
|
|
75
75
|
f,
|
|
76
76
|
{
|
|
77
|
-
className: n("dropdown-item",
|
|
77
|
+
className: n("dropdown-item inline-flex items-center", o),
|
|
78
78
|
checked: a,
|
|
79
79
|
...r,
|
|
80
80
|
children: [
|
|
81
|
-
/* @__PURE__ */ t(
|
|
82
|
-
|
|
81
|
+
/* @__PURE__ */ t(d, { className: "absolute right-2 size-icon", children: /* @__PURE__ */ t(m, { className: "size-icon" }) }),
|
|
82
|
+
/* @__PURE__ */ t("span", { className: "leading-none pe-3", children: e })
|
|
83
83
|
]
|
|
84
84
|
}
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
87
|
function B({
|
|
88
|
-
className:
|
|
89
|
-
children:
|
|
88
|
+
className: o,
|
|
89
|
+
children: e,
|
|
90
90
|
...a
|
|
91
91
|
}) {
|
|
92
92
|
return /* @__PURE__ */ s(
|
|
93
93
|
g,
|
|
94
94
|
{
|
|
95
|
-
className: n("dropdown-item",
|
|
95
|
+
className: n("dropdown-item", o),
|
|
96
96
|
...a,
|
|
97
97
|
children: [
|
|
98
|
-
/* @__PURE__ */ t(
|
|
99
|
-
|
|
98
|
+
/* @__PURE__ */ t(d, { className: "absolute right-2 size-icon", children: /* @__PURE__ */ t(m, { className: "size-icon" }) }),
|
|
99
|
+
e
|
|
100
100
|
]
|
|
101
101
|
}
|
|
102
102
|
);
|
|
103
103
|
}
|
|
104
104
|
function E({
|
|
105
|
-
className:
|
|
106
|
-
...
|
|
105
|
+
className: o,
|
|
106
|
+
...e
|
|
107
107
|
}) {
|
|
108
108
|
return /* @__PURE__ */ t(
|
|
109
|
-
|
|
109
|
+
D,
|
|
110
110
|
{
|
|
111
|
-
className: n("p-2 border-b caption",
|
|
112
|
-
...
|
|
111
|
+
className: n("p-2 border-b caption", o),
|
|
112
|
+
...e
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
115
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.es.js","sources":["../../../lib/components/ui/dropdown-menu.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight } from \"lucide-react\";\nimport type * as React from \"react\";\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub;\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/**\n * TODO (mudasirpandith)\n * Focus on trigger.\n * Focus on content after trigger is pressed?\n * List keyboard navigation in buttons within DropdownItems\n */\nexport function DropdownMenuSubTrigger({\n\tclassName,\n\tinset,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<DropdownMenuPrimitive.SubTrigger\n\t\t\tclassName={cn(\n\t\t\t\t\"flex cursor-default select-none items-center px-2 py-1.5 body outline-hidden focus:bg-accent data-[state=open]:bg-accent\",\n\t\t\t\tinset && \"pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRight className=\"ml-auto size-4\" />\n\t\t</DropdownMenuPrimitive.SubTrigger>\n\t);\n}\n\nexport function DropdownMenuSubContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.SubContent\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 min-w-32 overflow-hidden border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function DropdownMenuContent({\n\tclassName,\n\tsideOffset = 4,\n\t...props\n}: React.CustomComponentPropsWithRef<typeof DropdownMenuPrimitive.Content>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Portal>\n\t\t\t<DropdownMenuPrimitive.Content\n\t\t\t\talign=\"start\"\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"z-50 min-w-48 max-w-2xs overflow-y-auto max-h-48 border bg-popover text-popover-foreground\",\n\t\t\t\t\t\"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</DropdownMenuPrimitive.Portal>\n\t);\n}\n\nexport function DropdownMenuItem({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Item className={cn(\"dropdown-item\")} {...props} />\n\t);\n}\n\nexport function DropdownMenuCheckboxItem({\n\tclassName,\n\tchildren,\n\tchecked,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.CheckboxItem\n\t\t\tclassName={cn(\"dropdown-item\", className)}\n\t\t\tchecked={checked}\n\t\t\t{...props}\n\t\t>\n\t\t\t<DropdownMenuPrimitive.ItemIndicator className=\"absolute right-2 size-icon\">\n\t\t\t\t<Check className=\"size-icon\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t\t{children}\n\t\t</DropdownMenuPrimitive.CheckboxItem>\n\t);\n}\n\nexport function DropdownMenuRadioItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.RadioItem\n\t\t\tclassName={cn(\"dropdown-item\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<DropdownMenuPrimitive.ItemIndicator className=\"absolute right-2 size-icon\">\n\t\t\t\t<Check className=\"size-icon\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t\t{children}\n\t\t</DropdownMenuPrimitive.RadioItem>\n\t);\n}\n\nexport function DropdownMenuLabel({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Label\n\t\t\tclassName={cn(\"p-2 border-b caption\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}"],"names":["DropdownMenu","DropdownMenuPrimitive.Root","DropdownMenuTrigger","DropdownMenuPrimitive.Trigger","DropdownMenuGroup","DropdownMenuPrimitive.Group","DropdownMenuPortal","DropdownMenuPrimitive.Portal","DropdownMenuSub","DropdownMenuPrimitive.Sub","DropdownMenuRadioGroup","DropdownMenuPrimitive.RadioGroup","DropdownMenuSubTrigger","className","inset","children","props","jsxs","DropdownMenuPrimitive.SubTrigger","cn","jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuPrimitive.SubContent","DropdownMenuContent","sideOffset","DropdownMenuPrimitive.Content","DropdownMenuItem","DropdownMenuPrimitive.Item","DropdownMenuCheckboxItem","checked","DropdownMenuPrimitive.CheckboxItem","DropdownMenuPrimitive.ItemIndicator","Check","DropdownMenuRadioItem","DropdownMenuPrimitive.RadioItem","DropdownMenuLabel","DropdownMenuPrimitive.Label"],"mappings":";;;;AAKO,MAAMA,IAAeC,GACfC,IAAsBC,GACtBC,IAAoBC,GACpBC,IAAqBC,GACrBC,IAAkBC,GAClBC,IAAyBC;AAQ/B,SAASC,EAAuB;AAAA,EACtC,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACJ,GAEG;AACF,SACC,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACA,WAAWC;AAAA,QACV;AAAA,QACAL,KAAS;AAAA,QACTD;AAAA,MAAA;AAAA,MAEA,GAAGG;AAAA,MAEH,UAAA;AAAA,QAAAD;AAAA,QACD,gBAAAK,EAACC,GAAA,EAAa,WAAU,iBAAA,CAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG5C;AAEO,SAASC,EAAuB;AAAA,EACtC,WAAAT;AAAA,EACA,GAAGG;AACJ,GAAkE;AACjE,SACC,gBAAAI;AAAA,IAACG;AAAAA,IAAA;AAAA,MACA,WAAWJ;AAAA,QACV;AAAA,QACAN;AAAA,MAAA;AAAA,MAEA,GAAGG;AAAA,IAAA;AAAA,EAAA;AAGP;AAEO,SAASQ,EAAoB;AAAA,EACnC,WAAAX;AAAA,EACA,YAAAY,IAAa;AAAA,EACb,GAAGT;AACJ,GAA4E;AAC3E,SACC,gBAAAI,EAACb,GAAA,EACA,UAAA,gBAAAa;AAAA,IAACM;AAAAA,IAAA;AAAA,MACA,OAAM;AAAA,MACN,YAAAD;AAAA,MACA,WAAWN;AAAA,QACV;AAAA,QACA;AAAA,QACAN;AAAA,MAAA;AAAA,MAEA,GAAGG;AAAA,IAAA;AAAA,EAAA,GAEN;AAEF;AAEO,SAASW,EAAiB;AAAA,EAChC,WAAAd;AAAA,EACA,GAAGG;AACJ,GAA4D;AAC3D,SACC,gBAAAI,EAACQ,GAAA,EAA2B,WAAWT,EAAG,eAAe,GAAI,GAAGH,GAAO;AAEzE;AAEO,SAASa,EAAyB;AAAA,EACxC,WAAAhB;AAAA,EACA,UAAAE;AAAA,EACA,SAAAe;AAAA,EACA,GAAGd;AACJ,GAAoE;AACnE,SACC,gBAAAC;AAAA,IAACc;AAAAA,IAAA;AAAA,MACA,WAAWZ,EAAG,
|
|
1
|
+
{"version":3,"file":"dropdown-menu.es.js","sources":["../../../lib/components/ui/dropdown-menu.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight } from \"lucide-react\";\nimport type * as React from \"react\";\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub;\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/**\n * TODO (mudasirpandith)\n * Focus on trigger.\n * Focus on content after trigger is pressed?\n * List keyboard navigation in buttons within DropdownItems\n */\nexport function DropdownMenuSubTrigger({\n\tclassName,\n\tinset,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<DropdownMenuPrimitive.SubTrigger\n\t\t\tclassName={cn(\n\t\t\t\t\"flex cursor-default select-none items-center px-2 py-1.5 body outline-hidden focus:bg-accent data-[state=open]:bg-accent\",\n\t\t\t\tinset && \"pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRight className=\"ml-auto size-4\" />\n\t\t</DropdownMenuPrimitive.SubTrigger>\n\t);\n}\n\nexport function DropdownMenuSubContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.SubContent\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 min-w-32 overflow-hidden border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function DropdownMenuContent({\n\tclassName,\n\tsideOffset = 4,\n\t...props\n}: React.CustomComponentPropsWithRef<typeof DropdownMenuPrimitive.Content>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Portal>\n\t\t\t<DropdownMenuPrimitive.Content\n\t\t\t\talign=\"start\"\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"z-50 min-w-48 max-w-2xs overflow-y-auto max-h-48 border bg-popover text-popover-foreground\",\n\t\t\t\t\t\"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</DropdownMenuPrimitive.Portal>\n\t);\n}\n\nexport function DropdownMenuItem({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Item className={cn(\"dropdown-item\")} {...props} />\n\t);\n}\n\nexport function DropdownMenuCheckboxItem({\n\tclassName,\n\tchildren,\n\tchecked,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.CheckboxItem\n\t\t\tclassName={cn(\"dropdown-item inline-flex items-center\", className)}\n\t\t\tchecked={checked}\n\t\t\t{...props}\n\t\t>\n\t\t\t<DropdownMenuPrimitive.ItemIndicator className=\"absolute right-2 size-icon\">\n\t\t\t\t<Check className=\"size-icon\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t\t<span className=\"leading-none pe-3\">\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t</DropdownMenuPrimitive.CheckboxItem>\n\t);\n}\n\nexport function DropdownMenuRadioItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.RadioItem\n\t\t\tclassName={cn(\"dropdown-item\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<DropdownMenuPrimitive.ItemIndicator className=\"absolute right-2 size-icon\">\n\t\t\t\t<Check className=\"size-icon\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t\t{children}\n\t\t</DropdownMenuPrimitive.RadioItem>\n\t);\n}\n\nexport function DropdownMenuLabel({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Label\n\t\t\tclassName={cn(\"p-2 border-b caption\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}"],"names":["DropdownMenu","DropdownMenuPrimitive.Root","DropdownMenuTrigger","DropdownMenuPrimitive.Trigger","DropdownMenuGroup","DropdownMenuPrimitive.Group","DropdownMenuPortal","DropdownMenuPrimitive.Portal","DropdownMenuSub","DropdownMenuPrimitive.Sub","DropdownMenuRadioGroup","DropdownMenuPrimitive.RadioGroup","DropdownMenuSubTrigger","className","inset","children","props","jsxs","DropdownMenuPrimitive.SubTrigger","cn","jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuPrimitive.SubContent","DropdownMenuContent","sideOffset","DropdownMenuPrimitive.Content","DropdownMenuItem","DropdownMenuPrimitive.Item","DropdownMenuCheckboxItem","checked","DropdownMenuPrimitive.CheckboxItem","DropdownMenuPrimitive.ItemIndicator","Check","DropdownMenuRadioItem","DropdownMenuPrimitive.RadioItem","DropdownMenuLabel","DropdownMenuPrimitive.Label"],"mappings":";;;;AAKO,MAAMA,IAAeC,GACfC,IAAsBC,GACtBC,IAAoBC,GACpBC,IAAqBC,GACrBC,IAAkBC,GAClBC,IAAyBC;AAQ/B,SAASC,EAAuB;AAAA,EACtC,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACJ,GAEG;AACF,SACC,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACA,WAAWC;AAAA,QACV;AAAA,QACAL,KAAS;AAAA,QACTD;AAAA,MAAA;AAAA,MAEA,GAAGG;AAAA,MAEH,UAAA;AAAA,QAAAD;AAAA,QACD,gBAAAK,EAACC,GAAA,EAAa,WAAU,iBAAA,CAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG5C;AAEO,SAASC,EAAuB;AAAA,EACtC,WAAAT;AAAA,EACA,GAAGG;AACJ,GAAkE;AACjE,SACC,gBAAAI;AAAA,IAACG;AAAAA,IAAA;AAAA,MACA,WAAWJ;AAAA,QACV;AAAA,QACAN;AAAA,MAAA;AAAA,MAEA,GAAGG;AAAA,IAAA;AAAA,EAAA;AAGP;AAEO,SAASQ,EAAoB;AAAA,EACnC,WAAAX;AAAA,EACA,YAAAY,IAAa;AAAA,EACb,GAAGT;AACJ,GAA4E;AAC3E,SACC,gBAAAI,EAACb,GAAA,EACA,UAAA,gBAAAa;AAAA,IAACM;AAAAA,IAAA;AAAA,MACA,OAAM;AAAA,MACN,YAAAD;AAAA,MACA,WAAWN;AAAA,QACV;AAAA,QACA;AAAA,QACAN;AAAA,MAAA;AAAA,MAEA,GAAGG;AAAA,IAAA;AAAA,EAAA,GAEN;AAEF;AAEO,SAASW,EAAiB;AAAA,EAChC,WAAAd;AAAA,EACA,GAAGG;AACJ,GAA4D;AAC3D,SACC,gBAAAI,EAACQ,GAAA,EAA2B,WAAWT,EAAG,eAAe,GAAI,GAAGH,GAAO;AAEzE;AAEO,SAASa,EAAyB;AAAA,EACxC,WAAAhB;AAAA,EACA,UAAAE;AAAA,EACA,SAAAe;AAAA,EACA,GAAGd;AACJ,GAAoE;AACnE,SACC,gBAAAC;AAAA,IAACc;AAAAA,IAAA;AAAA,MACA,WAAWZ,EAAG,0CAA0CN,CAAS;AAAA,MACjE,SAAAiB;AAAA,MACC,GAAGd;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAI,EAACY,GAAA,EAAoC,WAAU,8BAC9C,UAAA,gBAAAZ,EAACa,GAAA,EAAM,WAAU,YAAA,CAAY,EAAA,CAC9B;AAAA,QACA,gBAAAb,EAAC,QAAA,EAAK,WAAU,qBACd,UAAAL,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGH;AAEO,SAASmB,EAAsB;AAAA,EACrC,WAAArB;AAAA,EACA,UAAAE;AAAA,EACA,GAAGC;AACJ,GAAiE;AAChE,SACC,gBAAAC;AAAA,IAACkB;AAAAA,IAAA;AAAA,MACA,WAAWhB,EAAG,iBAAiBN,CAAS;AAAA,MACvC,GAAGG;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAI,EAACY,GAAA,EAAoC,WAAU,8BAC9C,UAAA,gBAAAZ,EAACa,GAAA,EAAM,WAAU,YAAA,CAAY,EAAA,CAC9B;AAAA,QACClB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGJ;AAEO,SAASqB,EAAkB;AAAA,EACjC,WAAAvB;AAAA,EACA,GAAGG;AACJ,GAA6D;AAC5D,SACC,gBAAAI;AAAA,IAACiB;AAAAA,IAAA;AAAA,MACA,WAAWlB,EAAG,wBAAwBN,CAAS;AAAA,MAC9C,GAAGG;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
package/dist/index.es.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ import { components } from '@cryptlex/web-api-types';
|
|
|
9
9
|
import { ComponentType } from 'react';
|
|
10
10
|
import { Context } from 'react';
|
|
11
11
|
import { DayPicker } from 'react-day-picker';
|
|
12
|
-
import { default as default_2 } from '
|
|
13
|
-
import { default as default_3 } from '
|
|
12
|
+
import { default as default_2 } from 'react';
|
|
13
|
+
import { default as default_3 } from 'openapi-fetch';
|
|
14
14
|
import { DialogCloseProps } from '@radix-ui/react-dialog';
|
|
15
15
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
16
16
|
import { DialogTriggerProps } from '@radix-ui/react-dialog';
|
|
@@ -39,6 +39,7 @@ import { RefAttributes } from 'react';
|
|
|
39
39
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
40
40
|
import { SortingState } from '@tanstack/react-table';
|
|
41
41
|
import { TableOptions } from '@tanstack/react-table';
|
|
42
|
+
import { TableState } from '@tanstack/react-table';
|
|
42
43
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
43
44
|
import { Toaster as Toaster_2 } from 'sonner';
|
|
44
45
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -73,7 +74,7 @@ export declare function Avatar({ className, initials, ...props }: AvatarProps):
|
|
|
73
74
|
export declare interface AvatarProps extends Omit<React_2.ComponentProps<"div">, "children">, InitialString {
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
export declare function Badge({ className, ...props }: React_2.ComponentProps<"
|
|
77
|
+
export declare function Badge({ className, children, ...props }: React_2.ComponentProps<"span">): JSX.Element;
|
|
77
78
|
|
|
78
79
|
declare interface BaseFormFieldProps {
|
|
79
80
|
label: string;
|
|
@@ -131,7 +132,7 @@ export declare interface CheckboxProps extends Omit<React_2.ComponentProps<"inpu
|
|
|
131
132
|
indeterminate?: boolean;
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
declare type Client = ReturnType<typeof
|
|
135
|
+
declare type Client = ReturnType<typeof default_3<paths>>;
|
|
135
136
|
|
|
136
137
|
/** Classnames */
|
|
137
138
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
@@ -176,16 +177,19 @@ export declare type CtxPortals = "customer-portal" | "system-portal" | "reseller
|
|
|
176
177
|
/** Application Names */
|
|
177
178
|
export declare type CtxProjectName = "admin-portal" | "customer-portal" | "internal-portal" | "reseller-portal";
|
|
178
179
|
|
|
179
|
-
export declare function DataTable<TData extends object>({ columns, fetchFn,
|
|
180
|
+
export declare function DataTable<TData extends object>({ columns, fetchFn, tableActions, columnsToHideByDefault, allowSelection, className, ...props }: DataTableProps<TData>): JSX.Element;
|
|
180
181
|
|
|
181
|
-
export declare interface DataTableProps<TData> extends Pick<TableOptions<TData>, 'columns'>,
|
|
182
|
-
tableName: string;
|
|
182
|
+
export declare interface DataTableProps<TData> extends Pick<TableOptions<TData>, 'columns'>, default_2.ComponentProps<'section'> {
|
|
183
183
|
fetchFn: TableFetchFn<TData>;
|
|
184
184
|
tableActions: TableActions;
|
|
185
|
-
allowSelection
|
|
186
|
-
columnsToHideByDefault
|
|
185
|
+
allowSelection?: boolean;
|
|
186
|
+
columnsToHideByDefault?: VisibilityState_2;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
export declare type DataTableState = Pick<TableState, 'sorting' | 'columnFilters' | 'columnVisibility' | 'rowSelection' | 'pagination'> & {
|
|
190
|
+
search: string;
|
|
191
|
+
};
|
|
192
|
+
|
|
189
193
|
export declare const DEFAULT_FILTERABLE_FIELDS: FilterableProperties<any>;
|
|
190
194
|
|
|
191
195
|
/*** Type for hide some of the columns based on the dto of the particular page
|
|
@@ -312,7 +316,7 @@ export declare function FormField({ field, label, caption, children, className,
|
|
|
312
316
|
|
|
313
317
|
declare interface FormFieldProps extends BaseFormFieldProps {
|
|
314
318
|
field?: FieldApi<any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>;
|
|
315
|
-
children:
|
|
319
|
+
children: default_2.ReactNode;
|
|
316
320
|
className?: string;
|
|
317
321
|
}
|
|
318
322
|
|
|
@@ -355,7 +359,7 @@ export declare function InputOTPSlot({ index, className, ...props }: React_2.Com
|
|
|
355
359
|
index: number;
|
|
356
360
|
}): JSX.Element;
|
|
357
361
|
|
|
358
|
-
export declare type InputProps =
|
|
362
|
+
export declare type InputProps = default_2.ComponentProps<"input"> & {
|
|
359
363
|
icon?: LucideIcon;
|
|
360
364
|
buttonProps?: ButtonProps;
|
|
361
365
|
};
|
|
@@ -460,13 +464,13 @@ declare interface SearchInputProps extends Omit<InputProps, "onChange"> {
|
|
|
460
464
|
|
|
461
465
|
export declare function secondsToDuration(seconds: number): string;
|
|
462
466
|
|
|
463
|
-
export declare interface SelectionProps<V extends number | string | string[]> extends Omit<
|
|
467
|
+
export declare interface SelectionProps<V extends number | string | string[]> extends Omit<default_2.ComponentProps<"button">, "value" | "values" | "defaultValue"> {
|
|
464
468
|
value: V;
|
|
465
469
|
setValue: (v: V) => void;
|
|
466
|
-
buttonLabel?:
|
|
470
|
+
buttonLabel?: default_2.ReactNode;
|
|
467
471
|
options: {
|
|
468
472
|
value: string;
|
|
469
|
-
label:
|
|
473
|
+
label: default_2.ReactElement;
|
|
470
474
|
disabled?: boolean;
|
|
471
475
|
}[];
|
|
472
476
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { evaluate as L, getSideAxis as T, getSide as j, clamp as X, getOppositePlacement as
|
|
1
|
+
import { evaluate as L, getSideAxis as T, getSide as j, clamp as X, getOppositePlacement as ee, getExpandedPlacements as te, getOppositeAxisPlacements as ne, getAlignmentSides as ie, getAlignment as z, min as $, max as W, getPaddingObject as J, rectToClientRect as _, getOppositeAxis as K, getAlignmentAxis as N, sides as se, getAxisLength as Q } from "../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.es.js";
|
|
2
2
|
function I(t, e, d) {
|
|
3
3
|
let {
|
|
4
4
|
reference: a,
|
|
@@ -47,7 +47,7 @@ function I(t, e, d) {
|
|
|
47
47
|
}
|
|
48
48
|
return i;
|
|
49
49
|
}
|
|
50
|
-
const
|
|
50
|
+
const ce = async (t, e, d) => {
|
|
51
51
|
const {
|
|
52
52
|
placement: a = "bottom",
|
|
53
53
|
strategy: r = "absolute",
|
|
@@ -153,7 +153,7 @@ async function Y(t, e) {
|
|
|
153
153
|
right: (w.right - y.right + l.right) / v.x
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
const
|
|
156
|
+
const le = (t) => ({
|
|
157
157
|
name: "arrow",
|
|
158
158
|
options: t,
|
|
159
159
|
async fn(e) {
|
|
@@ -177,20 +177,20 @@ const ce = (t) => ({
|
|
|
177
177
|
}, i = N(r), l = Q(i), g = await o.getDimensions(h), x = i === "y", y = x ? "top" : "left", A = x ? "bottom" : "right", p = x ? "clientHeight" : "clientWidth", v = n.reference[l] + n.reference[i] - f[i] - n.floating[l], w = f[i] - n.reference[i], P = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(h));
|
|
178
178
|
let C = P ? P[p] : 0;
|
|
179
179
|
(!C || !await (o.isElement == null ? void 0 : o.isElement(P))) && (C = m.floating[p] || n.floating[l]);
|
|
180
|
-
const M = v / 2 - w / 2, k = C / 2 - g[l] / 2 - 1, O = $(s[y], k), H = $(s[A], k), D = O, F = C - g[l] - H, b = C / 2 - g[l] / 2 + M, B = X(D, b, F), E = !u.arrow && z(r) != null && b !== B && n.reference[l] / 2 - (b < D ? O : H) - g[l] / 2 < 0,
|
|
180
|
+
const M = v / 2 - w / 2, k = C / 2 - g[l] / 2 - 1, O = $(s[y], k), H = $(s[A], k), D = O, F = C - g[l] - H, b = C / 2 - g[l] / 2 + M, B = X(D, b, F), E = !u.arrow && z(r) != null && b !== B && n.reference[l] / 2 - (b < D ? O : H) - g[l] / 2 < 0, S = E ? b < D ? b - D : b - F : 0;
|
|
181
181
|
return {
|
|
182
|
-
[i]: f[i] +
|
|
182
|
+
[i]: f[i] + S,
|
|
183
183
|
data: {
|
|
184
184
|
[i]: B,
|
|
185
|
-
centerOffset: b - B -
|
|
185
|
+
centerOffset: b - B - S,
|
|
186
186
|
...E && {
|
|
187
|
-
alignmentOffset:
|
|
187
|
+
alignmentOffset: S
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
190
|
reset: E
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
}),
|
|
193
|
+
}), re = function(t) {
|
|
194
194
|
return t === void 0 && (t = {}), {
|
|
195
195
|
name: "flip",
|
|
196
196
|
options: t,
|
|
@@ -214,12 +214,12 @@ const ce = (t) => ({
|
|
|
214
214
|
} = L(t, e);
|
|
215
215
|
if ((d = n.arrow) != null && d.alignmentOffset)
|
|
216
216
|
return {};
|
|
217
|
-
const y = j(r), A = T(m), p = j(m) === m, v = await (u.isRTL == null ? void 0 : u.isRTL(h.floating)), w = f || (p || !g ? [
|
|
218
|
-
!f && P && w.push(...
|
|
217
|
+
const y = j(r), A = T(m), p = j(m) === m, v = await (u.isRTL == null ? void 0 : u.isRTL(h.floating)), w = f || (p || !g ? [ee(m)] : te(m)), P = l !== "none";
|
|
218
|
+
!f && P && w.push(...ne(m, g, l, v));
|
|
219
219
|
const C = [m, ...w], M = await Y(e, x), k = [];
|
|
220
220
|
let O = ((a = n.flip) == null ? void 0 : a.overflows) || [];
|
|
221
221
|
if (c && k.push(M[y]), s) {
|
|
222
|
-
const b =
|
|
222
|
+
const b = ie(r, o, v);
|
|
223
223
|
k.push(M[b[0]], M[b[1]]);
|
|
224
224
|
}
|
|
225
225
|
if (O = [...O, {
|
|
@@ -230,7 +230,7 @@ const ce = (t) => ({
|
|
|
230
230
|
const b = (((H = n.flip) == null ? void 0 : H.index) || 0) + 1, B = C[b];
|
|
231
231
|
if (B && (!(s === "alignment" ? A !== T(B) : !1) || // We leave the current main axis only if every placement on that axis
|
|
232
232
|
// overflows the main axis.
|
|
233
|
-
O.every((
|
|
233
|
+
O.every((R) => R.overflows[0] > 0 && T(R.placement) === A)))
|
|
234
234
|
return {
|
|
235
235
|
data: {
|
|
236
236
|
index: b,
|
|
@@ -240,21 +240,21 @@ const ce = (t) => ({
|
|
|
240
240
|
placement: B
|
|
241
241
|
}
|
|
242
242
|
};
|
|
243
|
-
let E = (D = O.filter((
|
|
243
|
+
let E = (D = O.filter((S) => S.overflows[0] <= 0).sort((S, R) => S.overflows[1] - R.overflows[1])[0]) == null ? void 0 : D.placement;
|
|
244
244
|
if (!E)
|
|
245
245
|
switch (i) {
|
|
246
246
|
case "bestFit": {
|
|
247
247
|
var F;
|
|
248
|
-
const
|
|
248
|
+
const S = (F = O.filter((R) => {
|
|
249
249
|
if (P) {
|
|
250
|
-
const V = T(
|
|
250
|
+
const V = T(R.placement);
|
|
251
251
|
return V === A || // Create a bias to the `y` side axis due to horizontal
|
|
252
252
|
// reading directions favoring greater width.
|
|
253
253
|
V === "y";
|
|
254
254
|
}
|
|
255
255
|
return !0;
|
|
256
|
-
}).map((
|
|
257
|
-
|
|
256
|
+
}).map((R) => [R.placement, R.overflows.filter((V) => V > 0).reduce((V, Z) => V + Z, 0)]).sort((R, V) => R[1] - V[1])[0]) == null ? void 0 : F[0];
|
|
257
|
+
S && (E = S);
|
|
258
258
|
break;
|
|
259
259
|
}
|
|
260
260
|
case "initialPlacement":
|
|
@@ -281,9 +281,9 @@ function q(t, e) {
|
|
|
281
281
|
};
|
|
282
282
|
}
|
|
283
283
|
function G(t) {
|
|
284
|
-
return
|
|
284
|
+
return se.some((e) => t[e] >= 0);
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const fe = function(t) {
|
|
287
287
|
return t === void 0 && (t = {}), {
|
|
288
288
|
name: "hide",
|
|
289
289
|
options: t,
|
|
@@ -324,13 +324,13 @@ const re = function(t) {
|
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
};
|
|
327
|
-
};
|
|
328
|
-
async function
|
|
327
|
+
}, U = /* @__PURE__ */ new Set(["left", "top"]);
|
|
328
|
+
async function oe(t, e) {
|
|
329
329
|
const {
|
|
330
330
|
placement: d,
|
|
331
331
|
platform: a,
|
|
332
332
|
elements: r
|
|
333
|
-
} = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = j(d), m = z(d), u = T(d) === "y", h =
|
|
333
|
+
} = t, n = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = j(d), m = z(d), u = T(d) === "y", h = U.has(o) ? -1 : 1, c = n && u ? -1 : 1, s = L(e, t);
|
|
334
334
|
let {
|
|
335
335
|
mainAxis: f,
|
|
336
336
|
crossAxis: i,
|
|
@@ -352,7 +352,7 @@ async function se(t, e) {
|
|
|
352
352
|
y: i * c
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
-
const
|
|
355
|
+
const me = function(t) {
|
|
356
356
|
return t === void 0 && (t = 0), {
|
|
357
357
|
name: "offset",
|
|
358
358
|
options: t,
|
|
@@ -363,7 +363,7 @@ const fe = function(t) {
|
|
|
363
363
|
y: n,
|
|
364
364
|
placement: o,
|
|
365
365
|
middlewareData: m
|
|
366
|
-
} = e, u = await
|
|
366
|
+
} = e, u = await oe(e, t);
|
|
367
367
|
return o === ((d = m.offset) == null ? void 0 : d.placement) && (a = m.arrow) != null && a.alignmentOffset ? {} : {
|
|
368
368
|
x: r + u.x,
|
|
369
369
|
y: n + u.y,
|
|
@@ -374,7 +374,7 @@ const fe = function(t) {
|
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
};
|
|
377
|
-
},
|
|
377
|
+
}, de = function(t) {
|
|
378
378
|
return t === void 0 && (t = {}), {
|
|
379
379
|
name: "shift",
|
|
380
380
|
options: t,
|
|
@@ -430,7 +430,7 @@ const fe = function(t) {
|
|
|
430
430
|
};
|
|
431
431
|
}
|
|
432
432
|
};
|
|
433
|
-
},
|
|
433
|
+
}, xe = function(t) {
|
|
434
434
|
return t === void 0 && (t = {}), {
|
|
435
435
|
options: t,
|
|
436
436
|
fn(e) {
|
|
@@ -463,7 +463,7 @@ const fe = function(t) {
|
|
|
463
463
|
}
|
|
464
464
|
if (h) {
|
|
465
465
|
var y, A;
|
|
466
|
-
const p = f === "y" ? "width" : "height", v =
|
|
466
|
+
const p = f === "y" ? "width" : "height", v = U.has(j(r)), w = n.reference[s] - n.floating[p] + (v && ((y = o.offset) == null ? void 0 : y[s]) || 0) + (v ? 0 : x.crossAxis), P = n.reference[s] + n.reference[p] + (v ? 0 : ((A = o.offset) == null ? void 0 : A[s]) || 0) - (v ? x.crossAxis : 0);
|
|
467
467
|
l < w ? l = w : l > P && (l = P);
|
|
468
468
|
}
|
|
469
469
|
return {
|
|
@@ -472,7 +472,7 @@ const fe = function(t) {
|
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
474
|
};
|
|
475
|
-
},
|
|
475
|
+
}, ge = function(t) {
|
|
476
476
|
return t === void 0 && (t = {}), {
|
|
477
477
|
name: "size",
|
|
478
478
|
options: t,
|
|
@@ -514,15 +514,15 @@ const fe = function(t) {
|
|
|
514
514
|
};
|
|
515
515
|
};
|
|
516
516
|
export {
|
|
517
|
-
|
|
518
|
-
|
|
517
|
+
le as arrow,
|
|
518
|
+
ce as computePosition,
|
|
519
519
|
Y as detectOverflow,
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
520
|
+
re as flip,
|
|
521
|
+
fe as hide,
|
|
522
|
+
xe as limitShift,
|
|
523
|
+
me as offset,
|
|
524
524
|
_ as rectToClientRect,
|
|
525
|
-
|
|
526
|
-
|
|
525
|
+
de as shift,
|
|
526
|
+
ge as size
|
|
527
527
|
};
|
|
528
528
|
//# sourceMappingURL=floating-ui.core.es.js.map
|