@cryptlex/web-components 6.6.6-alpha46 → 6.6.6-alpha47

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,33 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ /**
3
+ * Divider component - Visual separator between sections of content
4
+ *
5
+ * @example
6
+ * ```tsx
7
+ * <Divider />
8
+ * <Divider orientation="vertical" />
9
+ * <Divider label="OR" />
10
+ * <Divider spacing="lg" />
11
+ * ```
12
+ */
13
+ declare const dividerVariants: (props?: ({
14
+ orientation?: "horizontal" | "vertical" | null | undefined;
15
+ spacing?: "sm" | "md" | "lg" | null | undefined;
16
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
17
+ export interface DividerProps extends VariantProps<typeof dividerVariants> {
18
+ /**
19
+ * Optional label/text in the center (horizontal only)
20
+ */
21
+ label?: string;
22
+ /**
23
+ * Additional CSS classes
24
+ */
25
+ className?: string;
26
+ /**
27
+ * ARIA role
28
+ * @default 'separator'
29
+ */
30
+ role?: 'separator' | 'presentation' | 'none';
31
+ }
32
+ export declare function Divider({ orientation, label, spacing, className, role, }: DividerProps): import("react/jsx-runtime").JSX.Element;
33
+ export {};
@@ -0,0 +1,2 @@
1
+ "use client";import{jsxs as n,jsx as a}from"react/jsx-runtime";import{cva as l}from"class-variance-authority";import{classNames as s}from"../utilities/theme.js";import"clsx";const m=l("shrink-0",{variants:{orientation:{horizontal:"w-full h-[1px] border-t border-border",vertical:"self-stretch w-[1px] border-l border-border"},spacing:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",spacing:"sm",class:"my-2"},{orientation:"horizontal",spacing:"md",class:"my-4"},{orientation:"horizontal",spacing:"lg",class:"my-6"},{orientation:"vertical",spacing:"sm",class:"mx-2"},{orientation:"vertical",spacing:"md",class:"mx-4"},{orientation:"vertical",spacing:"lg",class:"mx-6"}],defaultVariants:{orientation:"horizontal",spacing:"md"}});function h({orientation:r="horizontal",label:i,spacing:o="md",className:t,role:e="separator"}){return i&&r==="horizontal"?n("div",{className:s("flex items-center gap-2 w-full",o==="sm"&&"my-2",o==="md"&&"my-4",o==="lg"&&"my-6",t),role:e,"aria-orientation":r,children:[a("div",{className:"flex-1 h-[1px] border-t border-border"}),a("span",{className:"body-sm text-muted-foreground px-2 select-none",children:i}),a("div",{className:"flex-1 h-[1px] border-t border-border"})]}):a("div",{className:s(m({orientation:r,spacing:o}),t),role:e,"aria-orientation":r??void 0})}export{h as Divider};
2
+ //# sourceMappingURL=divider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.js","sources":["../../lib/components/divider.tsx"],"sourcesContent":["'use client';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { classNames } from '../utilities/theme';\n\n/**\n * Divider component - Visual separator between sections of content\n *\n * @example\n * ```tsx\n * <Divider />\n * <Divider orientation=\"vertical\" />\n * <Divider label=\"OR\" />\n * <Divider spacing=\"lg\" />\n * ```\n */\n\nconst dividerVariants = cva('shrink-0', {\n variants: {\n orientation: {\n horizontal: 'w-full h-[1px] border-t border-border',\n vertical: 'self-stretch w-[1px] border-l border-border',\n },\n spacing: {\n sm: '',\n md: '',\n lg: '',\n },\n },\n compoundVariants: [\n // Horizontal spacing\n {\n orientation: 'horizontal',\n spacing: 'sm',\n class: 'my-2',\n },\n {\n orientation: 'horizontal',\n spacing: 'md',\n class: 'my-4',\n },\n {\n orientation: 'horizontal',\n spacing: 'lg',\n class: 'my-6',\n },\n // Vertical spacing\n {\n orientation: 'vertical',\n spacing: 'sm',\n class: 'mx-2',\n },\n {\n orientation: 'vertical',\n spacing: 'md',\n class: 'mx-4',\n },\n {\n orientation: 'vertical',\n spacing: 'lg',\n class: 'mx-6',\n },\n ],\n defaultVariants: {\n orientation: 'horizontal',\n spacing: 'md',\n },\n});\n\nexport interface DividerProps extends VariantProps<typeof dividerVariants> {\n /**\n * Optional label/text in the center (horizontal only)\n */\n label?: string;\n /**\n * Additional CSS classes\n */\n className?: string;\n /**\n * ARIA role\n * @default 'separator'\n */\n role?: 'separator' | 'presentation' | 'none';\n}\n\nexport function Divider({\n orientation = 'horizontal',\n label,\n spacing = 'md',\n className,\n role = 'separator',\n}: DividerProps) {\n // If label is provided and orientation is horizontal, use a different layout\n if (label && orientation === 'horizontal') {\n return (\n <div\n className={classNames(\n 'flex items-center gap-2 w-full',\n spacing === 'sm' && 'my-2',\n spacing === 'md' && 'my-4',\n spacing === 'lg' && 'my-6',\n className\n )}\n role={role}\n aria-orientation={orientation}\n >\n <div className=\"flex-1 h-[1px] border-t border-border\" />\n <span className=\"body-sm text-muted-foreground px-2 select-none\">{label}</span>\n <div className=\"flex-1 h-[1px] border-t border-border\" />\n </div>\n );\n }\n\n return (\n <div\n className={classNames(dividerVariants({ orientation, spacing }), className)}\n role={role}\n aria-orientation={orientation ?? undefined}\n />\n );\n}\n"],"names":["dividerVariants","cva","Divider","orientation","label","spacing","className","role","jsxs","classNames","jsx"],"mappings":"8KAgBA,MAAMA,EAAkBC,EAAI,WAAY,CACpC,SAAU,CACN,YAAa,CACT,WAAY,wCACZ,SAAU,6CAAA,EAEd,QAAS,CACL,GAAI,GACJ,GAAI,GACJ,GAAI,EAAA,CACR,EAEJ,iBAAkB,CAEd,CACI,YAAa,aACb,QAAS,KACT,MAAO,MAAA,EAEX,CACI,YAAa,aACb,QAAS,KACT,MAAO,MAAA,EAEX,CACI,YAAa,aACb,QAAS,KACT,MAAO,MAAA,EAGX,CACI,YAAa,WACb,QAAS,KACT,MAAO,MAAA,EAEX,CACI,YAAa,WACb,QAAS,KACT,MAAO,MAAA,EAEX,CACI,YAAa,WACb,QAAS,KACT,MAAO,MAAA,CACX,EAEJ,gBAAiB,CACb,YAAa,aACb,QAAS,IAAA,CAEjB,CAAC,EAkBM,SAASC,EAAQ,CACpB,YAAAC,EAAc,aACd,MAAAC,EACA,QAAAC,EAAU,KACV,UAAAC,EACA,KAAAC,EAAO,WACX,EAAiB,CAEb,OAAIH,GAASD,IAAgB,aAErBK,EAAC,MAAA,CACG,UAAWC,EACP,iCACAJ,IAAY,MAAQ,OACpBA,IAAY,MAAQ,OACpBA,IAAY,MAAQ,OACpBC,CAAA,EAEJ,KAAAC,EACA,mBAAkBJ,EAElB,SAAA,CAAAO,EAAC,MAAA,CAAI,UAAU,uCAAA,CAAwC,EACvDA,EAAC,OAAA,CAAK,UAAU,iDAAkD,SAAAN,EAAM,EACxEM,EAAC,MAAA,CAAI,UAAU,uCAAA,CAAwC,CAAA,CAAA,CAAA,EAM/DA,EAAC,MAAA,CACG,UAAWD,EAAWT,EAAgB,CAAE,YAAAG,EAAa,QAAAE,CAAA,CAAS,EAAGC,CAAS,EAC1E,KAAAC,EACA,mBAAkBJ,GAAe,MAAA,CAAA,CAG7C"}
@@ -3,6 +3,6 @@ import { default as createClient } from 'openapi-fetch';
3
3
  export type CtxClientType = ReturnType<typeof createClient<paths>>;
4
4
  export declare function CtxClientProvider({ client, children }: {
5
5
  client: CtxClientType;
6
- children: React.ReactNode;
6
+ children?: React.ReactNode;
7
7
  }): import("react/jsx-runtime").JSX.Element;
8
8
  export declare function useCtxClient(): CtxClientType;
@@ -1 +1 @@
1
- {"version":3,"file":"ctx-client.js","sources":["../../lib/utilities/ctx-client.tsx"],"sourcesContent":["import type { paths } from '@cryptlex/web-api-types/develop';\nimport createClient from 'openapi-fetch';\nimport { createContext, use } from 'react';\n\nexport type CtxClientType = ReturnType<typeof createClient<paths>>;\n\nconst CtxClientContext = createContext<CtxClientType | null>(null);\n\nexport function CtxClientProvider({ client, children }: { client: CtxClientType; children: React.ReactNode }) {\n return <CtxClientContext.Provider value={client}>{children}</CtxClientContext.Provider>;\n}\n\nexport function useCtxClient(): CtxClientType {\n const client = use(CtxClientContext);\n if (!client) {\n throw new Error('useCtxClient must be used within a CtxClientProvider.');\n }\n return client;\n}\n"],"names":["CtxClientContext","createContext","CtxClientProvider","client","children","useCtxClient","use"],"mappings":"uFAMA,MAAMA,EAAmBC,EAAoC,IAAI,EAE1D,SAASC,EAAkB,CAAE,OAAAC,EAAQ,SAAAC,GAAkE,CAC1G,SAAQJ,EAAiB,SAAjB,CAA0B,MAAOG,EAAS,SAAAC,EAAS,CAC/D,CAEO,SAASC,GAA8B,CAC1C,MAAMF,EAASG,EAAIN,CAAgB,EACnC,GAAI,CAACG,EACD,MAAM,IAAI,MAAM,uDAAuD,EAE3E,OAAOA,CACX"}
1
+ {"version":3,"file":"ctx-client.js","sources":["../../lib/utilities/ctx-client.tsx"],"sourcesContent":["import type { paths } from '@cryptlex/web-api-types/develop';\nimport createClient from 'openapi-fetch';\nimport { createContext, use } from 'react';\n\nexport type CtxClientType = ReturnType<typeof createClient<paths>>;\n\nconst CtxClientContext = createContext<CtxClientType | null>(null);\n\nexport function CtxClientProvider({ client, children }: { client: CtxClientType; children?: React.ReactNode }) {\n return <CtxClientContext.Provider value={client}>{children}</CtxClientContext.Provider>;\n}\n\nexport function useCtxClient(): CtxClientType {\n const client = use(CtxClientContext);\n if (!client) {\n throw new Error('useCtxClient must be used within a CtxClientProvider.');\n }\n return client;\n}\n"],"names":["CtxClientContext","createContext","CtxClientProvider","client","children","useCtxClient","use"],"mappings":"uFAMA,MAAMA,EAAmBC,EAAoC,IAAI,EAE1D,SAASC,EAAkB,CAAE,OAAAC,EAAQ,SAAAC,GAAmE,CAC3G,SAAQJ,EAAiB,SAAjB,CAA0B,MAAOG,EAAS,SAAAC,EAAS,CAC/D,CAEO,SAASC,GAA8B,CAC1C,MAAMF,EAASG,EAAIN,CAAgB,EACnC,GAAI,CAACG,EACD,MAAM,IAAI,MAAM,uDAAuD,EAE3E,OAAOA,CACX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptlex/web-components",
3
- "version": "6.6.6-alpha46",
3
+ "version": "6.6.6-alpha47",
4
4
  "description": "React component library for Cryptlex web applications",
5
5
  "author": "Cryptlex",
6
6
  "type": "module",