commerce-toolkit 0.0.41 → 0.0.42

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.
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("./utils-LBH114_M.cjs"),s=require("./index-DGaxX11V.cjs");function f({className:t,children:a,...n}){return e.jsx("nav",{className:r.cn("py-10 text-xs font-[var(--offset-pagination-font-family,var(--font-family-body))]",t),"data-slot":"offset-pagination-root",...n,children:a})}function l({className:t,children:a,...n}){return e.jsx("ul",{className:r.cn("flex items-center justify-center gap-2",t),"data-slot":"offset-pagination-list",...n,children:a})}function c({className:t,children:a,...n}){return e.jsx("li",{className:r.cn(t),"data-slot":"offset-pagination-item",...n,children:a})}function u({className:t,children:a,asChild:n=!1,...o}){const i=n?s.Slot:"a";return e.jsx(i,{className:r.cn("flex h-12 w-12 items-center justify-center rounded-full border transition-colors duration-300 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--offset-pagination-focus,hsl(var(--primary)))]","border-[var(--offset-pagination-border,hsl(var(--contrast-100)))] text-[var(--offset-pagination-text,hsl(var(--foreground)))] hover:bg-[var(--offset-pagination-background-hover,hsl(var(--contrast-100)))]","aria-[current=page]:border-[var(--offset-pagination-current-page-border,hsl(var(--foreground)))] aria-[current=page]:bg-[var(--offset-pagination-current-page-background,hsl(var(--foreground)))] aria-[current=page]:text-[var(--offset-pagination-current-page-text,hsl(var(--background)))] aria-[current=page]:hover:bg-[var(--offset-pagination-current-page-background-hover,hsl(var(--contrast-500)))]",t),"data-slot":"offset-pagination-link",...o,children:a})}function g({className:t,children:a="...",...n}){return e.jsx("span",{"aria-hidden":!0,className:r.cn("flex h-12 w-12 items-center justify-center text-[var(--offset-pagination-ellipsis,hsl(var(--foreground)))]",t),"data-slot":"offset-pagination-ellipsis",...n,children:a})}exports.Ellipsis=g;exports.Item=c;exports.Link=u;exports.List=l;exports.Root=f;
2
+ //# sourceMappingURL=offset-pagination.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offset-pagination.cjs","sources":["../src/components/offset-pagination/primitives/offset-pagination-root.tsx","../src/components/offset-pagination/primitives/offset-pagination-list.tsx","../src/components/offset-pagination/primitives/offset-pagination-item.tsx","../src/components/offset-pagination/primitives/offset-pagination-link.tsx","../src/components/offset-pagination/primitives/offset-pagination-ellipsis.tsx"],"sourcesContent":["import { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type OffsetPaginationRootProps = ComponentProps<'nav'>;\n\nexport function OffsetPaginationRoot({ className, children, ...props }: OffsetPaginationRootProps) {\n return (\n <nav\n className={cn(\n 'py-10 text-xs font-[var(--offset-pagination-font-family,var(--font-family-body))]',\n className,\n )}\n data-slot=\"offset-pagination-root\"\n {...props}\n >\n {children}\n </nav>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type OffsetPaginationListProps = ComponentProps<'ul'>;\n\nexport function OffsetPaginationList({ className, children, ...props }: OffsetPaginationListProps) {\n return (\n <ul\n className={cn('flex items-center justify-center gap-2', className)}\n data-slot=\"offset-pagination-list\"\n {...props}\n >\n {children}\n </ul>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type OffsetPaginationItemProps = ComponentProps<'li'>;\n\nexport function OffsetPaginationItem({ className, children, ...props }: OffsetPaginationItemProps) {\n return (\n <li className={cn(className)} data-slot=\"offset-pagination-item\" {...props}>\n {children}\n </li>\n );\n}\n","import { Slot } from '@radix-ui/react-slot';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport interface OffsetPaginationLinkProps extends ComponentProps<'a'> {\n asChild?: boolean;\n}\n\nexport function OffsetPaginationLink({\n className,\n children,\n asChild = false,\n ...props\n}: OffsetPaginationLinkProps) {\n const Component = asChild ? Slot : 'a';\n\n return (\n <Component\n className={cn(\n 'flex h-12 w-12 items-center justify-center rounded-full border transition-colors duration-300 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--offset-pagination-focus,hsl(var(--primary)))]',\n 'border-[var(--offset-pagination-border,hsl(var(--contrast-100)))] text-[var(--offset-pagination-text,hsl(var(--foreground)))] hover:bg-[var(--offset-pagination-background-hover,hsl(var(--contrast-100)))]',\n 'aria-[current=page]:border-[var(--offset-pagination-current-page-border,hsl(var(--foreground)))] aria-[current=page]:bg-[var(--offset-pagination-current-page-background,hsl(var(--foreground)))] aria-[current=page]:text-[var(--offset-pagination-current-page-text,hsl(var(--background)))] aria-[current=page]:hover:bg-[var(--offset-pagination-current-page-background-hover,hsl(var(--contrast-500)))]',\n className,\n )}\n data-slot=\"offset-pagination-link\"\n {...props}\n >\n {children}\n </Component>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type OffsetPaginationEllipsisProps = ComponentProps<'span'>;\n\nexport function OffsetPaginationEllipsis({\n className,\n children = '...',\n ...props\n}: OffsetPaginationEllipsisProps) {\n return (\n <span\n aria-hidden\n className={cn(\n 'flex h-12 w-12 items-center justify-center text-[var(--offset-pagination-ellipsis,hsl(var(--foreground)))]',\n className,\n )}\n data-slot=\"offset-pagination-ellipsis\"\n {...props}\n >\n {children}\n </span>\n );\n}\n"],"names":["OffsetPaginationRoot","className","children","props","jsx","cn","OffsetPaginationList","OffsetPaginationItem","OffsetPaginationLink","asChild","Component","Slot","OffsetPaginationEllipsis"],"mappings":"yLAMO,SAASA,EAAqB,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGC,GAAoC,CACjG,OACEC,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,GACT,oFACAJ,CAAA,EAEF,YAAU,yBACT,GAAGE,EAEH,SAAAD,CAAA,CAAA,CAGP,CCbO,SAASI,EAAqB,CAAE,UAAAL,EAAW,SAAAC,EAAU,GAAGC,GAAoC,CACjG,OACEC,EAAAA,IAAC,KAAA,CACC,UAAWC,EAAAA,GAAG,yCAA0CJ,CAAS,EACjE,YAAU,yBACT,GAAGE,EAEH,SAAAD,CAAA,CAAA,CAGP,CCVO,SAASK,EAAqB,CAAE,UAAAN,EAAW,SAAAC,EAAU,GAAGC,GAAoC,CACjG,OACEC,MAAC,KAAA,CAAG,UAAWC,EAAAA,GAAGJ,CAAS,EAAG,YAAU,yBAA0B,GAAGE,EAClE,SAAAD,CAAA,CACH,CAEJ,CCHO,SAASM,EAAqB,CACnC,UAAAP,EACA,SAAAC,EACA,QAAAO,EAAU,GACV,GAAGN,CACL,EAA8B,CAC5B,MAAMO,EAAYD,EAAUE,EAAAA,KAAO,IAEnC,OACEP,EAAAA,IAACM,EAAA,CACC,UAAWL,EAAAA,GACT,gNACA,8MACA,gZACAJ,CAAA,EAEF,YAAU,yBACT,GAAGE,EAEH,SAAAD,CAAA,CAAA,CAGP,CCzBO,SAASU,EAAyB,CACvC,UAAAX,EACA,SAAAC,EAAW,MACX,GAAGC,CACL,EAAkC,CAChC,OACEC,EAAAA,IAAC,OAAA,CACC,cAAW,GACX,UAAWC,EAAAA,GACT,6GACAJ,CAAA,EAEF,YAAU,6BACT,GAAGE,EAEH,SAAAD,CAAA,CAAA,CAGP"}
@@ -0,0 +1,79 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { c as r } from "./utils-BOGlfttm.js";
3
+ import { S as i } from "./index-DD8W7cMj.js";
4
+ function c({ className: t, children: a, ...n }) {
5
+ return /* @__PURE__ */ o(
6
+ "nav",
7
+ {
8
+ className: r(
9
+ "py-10 text-xs font-[var(--offset-pagination-font-family,var(--font-family-body))]",
10
+ t
11
+ ),
12
+ "data-slot": "offset-pagination-root",
13
+ ...n,
14
+ children: a
15
+ }
16
+ );
17
+ }
18
+ function u({ className: t, children: a, ...n }) {
19
+ return /* @__PURE__ */ o(
20
+ "ul",
21
+ {
22
+ className: r("flex items-center justify-center gap-2", t),
23
+ "data-slot": "offset-pagination-list",
24
+ ...n,
25
+ children: a
26
+ }
27
+ );
28
+ }
29
+ function p({ className: t, children: a, ...n }) {
30
+ return /* @__PURE__ */ o("li", { className: r(t), "data-slot": "offset-pagination-item", ...n, children: a });
31
+ }
32
+ function v({
33
+ className: t,
34
+ children: a,
35
+ asChild: n = !1,
36
+ ...e
37
+ }) {
38
+ return /* @__PURE__ */ o(
39
+ n ? i : "a",
40
+ {
41
+ className: r(
42
+ "flex h-12 w-12 items-center justify-center rounded-full border transition-colors duration-300 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--offset-pagination-focus,hsl(var(--primary)))]",
43
+ "border-[var(--offset-pagination-border,hsl(var(--contrast-100)))] text-[var(--offset-pagination-text,hsl(var(--foreground)))] hover:bg-[var(--offset-pagination-background-hover,hsl(var(--contrast-100)))]",
44
+ "aria-[current=page]:border-[var(--offset-pagination-current-page-border,hsl(var(--foreground)))] aria-[current=page]:bg-[var(--offset-pagination-current-page-background,hsl(var(--foreground)))] aria-[current=page]:text-[var(--offset-pagination-current-page-text,hsl(var(--background)))] aria-[current=page]:hover:bg-[var(--offset-pagination-current-page-background-hover,hsl(var(--contrast-500)))]",
45
+ t
46
+ ),
47
+ "data-slot": "offset-pagination-link",
48
+ ...e,
49
+ children: a
50
+ }
51
+ );
52
+ }
53
+ function d({
54
+ className: t,
55
+ children: a = "...",
56
+ ...n
57
+ }) {
58
+ return /* @__PURE__ */ o(
59
+ "span",
60
+ {
61
+ "aria-hidden": !0,
62
+ className: r(
63
+ "flex h-12 w-12 items-center justify-center text-[var(--offset-pagination-ellipsis,hsl(var(--foreground)))]",
64
+ t
65
+ ),
66
+ "data-slot": "offset-pagination-ellipsis",
67
+ ...n,
68
+ children: a
69
+ }
70
+ );
71
+ }
72
+ export {
73
+ d as Ellipsis,
74
+ p as Item,
75
+ v as Link,
76
+ u as List,
77
+ c as Root
78
+ };
79
+ //# sourceMappingURL=offset-pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offset-pagination.js","sources":["../src/components/offset-pagination/primitives/offset-pagination-root.tsx","../src/components/offset-pagination/primitives/offset-pagination-list.tsx","../src/components/offset-pagination/primitives/offset-pagination-item.tsx","../src/components/offset-pagination/primitives/offset-pagination-link.tsx","../src/components/offset-pagination/primitives/offset-pagination-ellipsis.tsx"],"sourcesContent":["import { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type OffsetPaginationRootProps = ComponentProps<'nav'>;\n\nexport function OffsetPaginationRoot({ className, children, ...props }: OffsetPaginationRootProps) {\n return (\n <nav\n className={cn(\n 'py-10 text-xs font-[var(--offset-pagination-font-family,var(--font-family-body))]',\n className,\n )}\n data-slot=\"offset-pagination-root\"\n {...props}\n >\n {children}\n </nav>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type OffsetPaginationListProps = ComponentProps<'ul'>;\n\nexport function OffsetPaginationList({ className, children, ...props }: OffsetPaginationListProps) {\n return (\n <ul\n className={cn('flex items-center justify-center gap-2', className)}\n data-slot=\"offset-pagination-list\"\n {...props}\n >\n {children}\n </ul>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type OffsetPaginationItemProps = ComponentProps<'li'>;\n\nexport function OffsetPaginationItem({ className, children, ...props }: OffsetPaginationItemProps) {\n return (\n <li className={cn(className)} data-slot=\"offset-pagination-item\" {...props}>\n {children}\n </li>\n );\n}\n","import { Slot } from '@radix-ui/react-slot';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport interface OffsetPaginationLinkProps extends ComponentProps<'a'> {\n asChild?: boolean;\n}\n\nexport function OffsetPaginationLink({\n className,\n children,\n asChild = false,\n ...props\n}: OffsetPaginationLinkProps) {\n const Component = asChild ? Slot : 'a';\n\n return (\n <Component\n className={cn(\n 'flex h-12 w-12 items-center justify-center rounded-full border transition-colors duration-300 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--offset-pagination-focus,hsl(var(--primary)))]',\n 'border-[var(--offset-pagination-border,hsl(var(--contrast-100)))] text-[var(--offset-pagination-text,hsl(var(--foreground)))] hover:bg-[var(--offset-pagination-background-hover,hsl(var(--contrast-100)))]',\n 'aria-[current=page]:border-[var(--offset-pagination-current-page-border,hsl(var(--foreground)))] aria-[current=page]:bg-[var(--offset-pagination-current-page-background,hsl(var(--foreground)))] aria-[current=page]:text-[var(--offset-pagination-current-page-text,hsl(var(--background)))] aria-[current=page]:hover:bg-[var(--offset-pagination-current-page-background-hover,hsl(var(--contrast-500)))]',\n className,\n )}\n data-slot=\"offset-pagination-link\"\n {...props}\n >\n {children}\n </Component>\n );\n}\n","import type { ComponentProps } from 'react';\n\nimport { cn } from '@/lib';\n\nexport type OffsetPaginationEllipsisProps = ComponentProps<'span'>;\n\nexport function OffsetPaginationEllipsis({\n className,\n children = '...',\n ...props\n}: OffsetPaginationEllipsisProps) {\n return (\n <span\n aria-hidden\n className={cn(\n 'flex h-12 w-12 items-center justify-center text-[var(--offset-pagination-ellipsis,hsl(var(--foreground)))]',\n className,\n )}\n data-slot=\"offset-pagination-ellipsis\"\n {...props}\n >\n {children}\n </span>\n );\n}\n"],"names":["OffsetPaginationRoot","className","children","props","jsx","cn","OffsetPaginationList","OffsetPaginationItem","OffsetPaginationLink","asChild","Slot","OffsetPaginationEllipsis"],"mappings":";;;AAMO,SAASA,EAAqB,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAAoC;AACjG,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEF,aAAU;AAAA,MACT,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;ACbO,SAASI,EAAqB,EAAE,WAAAL,GAAW,UAAAC,GAAU,GAAGC,KAAoC;AACjG,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAG,0CAA0CJ,CAAS;AAAA,MACjE,aAAU;AAAA,MACT,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;ACVO,SAASK,EAAqB,EAAE,WAAAN,GAAW,UAAAC,GAAU,GAAGC,KAAoC;AACjG,SACE,gBAAAC,EAAC,MAAA,EAAG,WAAWC,EAAGJ,CAAS,GAAG,aAAU,0BAA0B,GAAGE,GAClE,UAAAD,EAAA,CACH;AAEJ;ACHO,SAASM,EAAqB;AAAA,EACnC,WAAAP;AAAA,EACA,UAAAC;AAAA,EACA,SAAAO,IAAU;AAAA,EACV,GAAGN;AACL,GAA8B;AAG5B,SACE,gBAAAC;AAAA,IAHgBK,IAAUC,IAAO;AAAA,IAGhC;AAAA,MACC,WAAWL;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEF,aAAU;AAAA,MACT,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;ACzBO,SAASS,EAAyB;AAAA,EACvC,WAAAV;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,GAAGC;AACL,GAAkC;AAChC,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAW;AAAA,MACX,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEF,aAAU;AAAA,MACT,GAAGE;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commerce-toolkit",
3
- "version": "0.0.41",
3
+ "version": "0.0.42",
4
4
  "description": "A collection of modern, accessible commerce UI components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -167,6 +167,16 @@
167
167
  "default": "./dist/modal.cjs"
168
168
  }
169
169
  },
170
+ "./offset-pagination": {
171
+ "import": {
172
+ "types": "./dist/components/offset-pagination/primitives.d.ts",
173
+ "default": "./dist/offset-pagination.js"
174
+ },
175
+ "require": {
176
+ "types": "./dist/components/offset-pagination/primitives.d.ts",
177
+ "default": "./dist/offset-pagination.cjs"
178
+ }
179
+ },
170
180
  "./price": {
171
181
  "import": {
172
182
  "types": "./dist/components/price/primitives.d.ts",