@collective-intelligence/ui-react 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -2
- package/dist/components/icons/index.d.ts +175 -0
- package/dist/components/icons/index.js +1 -0
- package/dist/components/illustrations/index.d.ts +180 -0
- package/dist/components/illustrations/index.js +1 -0
- package/dist/components/ui/index.d.ts +516 -0
- package/dist/components/ui/index.js +2 -0
- package/dist/components/ui-extensions/atoms/ThemeToggle/index.d.ts +23 -0
- package/dist/components/ui-extensions/atoms/ThemeToggle/index.js +2 -0
- package/dist/components/ui-extensions/hooks/use-mobile.d.ts +5 -0
- package/dist/components/ui-extensions/hooks/use-mobile.js +1 -0
- package/dist/components/ui-extensions/index.d.ts +1147 -0
- package/dist/components/ui-extensions/index.js +24 -0
- package/dist/hooks/index.d.ts +26 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/operations.d.ts +16 -0
- package/dist/hooks/operations.js +1 -0
- package/dist/hooks/use-debounced-callback.d.ts +9 -0
- package/dist/hooks/use-debounced-callback.js +1 -0
- package/dist/hooks/use-mount-action.d.ts +9 -0
- package/dist/hooks/use-mount-action.js +1 -0
- package/dist/index-225zhfvs.js +2 -0
- package/dist/index-4djc1w16.js +2 -0
- package/dist/index-5m33z54y.js +25 -0
- package/dist/index-eevg910d.js +2 -0
- package/dist/index-f91yzwpm.js +2 -0
- package/dist/index-fdh3nr3r.js +2 -0
- package/dist/index-fmpwyc92.js +2 -0
- package/dist/index-gzgwcnnv.js +42 -0
- package/dist/index-kghpgv95.js +2 -0
- package/dist/index-m283d3wz.js +2 -0
- package/dist/index-mtc4857g.js +2 -0
- package/dist/index-y8r5sgrk.js +2 -0
- package/dist/index-yaz3187s.js +2 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +1 -0
- package/dist/resources.d.ts +138 -0
- package/dist/resources.js +2 -0
- package/dist/tokens/theme.d.ts +19 -0
- package/dist/tokens/theme.js +1 -0
- package/dist/utils/cn.d.ts +11 -0
- package/dist/utils/cn.js +1 -0
- package/package.json +192 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
import { ClassValue, clsx } from 'clsx';
|
|
4
|
+
|
|
5
|
+
export declare const themeTokens: {
|
|
6
|
+
readonly radius: {
|
|
7
|
+
readonly lg: "0.75rem";
|
|
8
|
+
readonly md: "0.5rem";
|
|
9
|
+
readonly sm: "0.25rem";
|
|
10
|
+
};
|
|
11
|
+
readonly spacing: {
|
|
12
|
+
readonly lg: "1.5rem";
|
|
13
|
+
readonly md: "1rem";
|
|
14
|
+
readonly sm: "0.5rem";
|
|
15
|
+
readonly xl: "2rem";
|
|
16
|
+
readonly xs: "0.25rem";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type ThemeTokens = typeof themeTokens;
|
|
20
|
+
export declare const cn: (...inputs: Parameters<typeof clsx>) => string;
|
|
21
|
+
export declare const uiReactEntrypoint: "react";
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
ClassValue,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export {};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./index-f91yzwpm.js";import{Ih as y}from"./index-mtc4857g.js";import"./index-225zhfvs.js";var t="react";export{t as uiReactEntrypoint,n as themeTokens,y as cn};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
import { CSSProperties, ElementType, InputHTMLAttributes, ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
export type ResourceColumn = Readonly<{
|
|
6
|
+
id: string;
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
}>;
|
|
9
|
+
export type ResourceTablePrimitiveProps<Row> = Readonly<{
|
|
10
|
+
caption?: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
columns: readonly ResourceColumn[];
|
|
13
|
+
empty?: ReactNode;
|
|
14
|
+
getRowKey: (row: Row) => string;
|
|
15
|
+
onRowClick?: (row: Row) => void;
|
|
16
|
+
renderActions?: (row: Row) => ReactNode;
|
|
17
|
+
actionsLabel?: string;
|
|
18
|
+
stickyActions?: boolean;
|
|
19
|
+
isPending?: boolean;
|
|
20
|
+
isRowSelected?: (row: Row) => boolean;
|
|
21
|
+
isRowExpanded?: (row: Row) => boolean;
|
|
22
|
+
onExpandedChange?: (row: Row, expanded: boolean) => void;
|
|
23
|
+
renderDetails?: (row: Row, expanded: boolean) => ReactNode;
|
|
24
|
+
renderContextMenu?: (row: Row) => ReactNode;
|
|
25
|
+
renderCell: (row: Row, column: ResourceColumn) => ReactNode;
|
|
26
|
+
rows: readonly Row[];
|
|
27
|
+
style?: CSSProperties;
|
|
28
|
+
}>;
|
|
29
|
+
export type ResourceListPrimitiveProps<Item> = Readonly<{
|
|
30
|
+
ariaLabel?: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
empty?: ReactNode;
|
|
33
|
+
getItemKey: (item: Item) => string;
|
|
34
|
+
items: readonly Item[];
|
|
35
|
+
renderItem: (item: Item, index: number) => ReactNode;
|
|
36
|
+
renderContainer?: (children: ReactNode) => ReactNode;
|
|
37
|
+
style?: CSSProperties;
|
|
38
|
+
}>;
|
|
39
|
+
export type ResourceFilterPrimitiveProps = Readonly<{
|
|
40
|
+
className?: string;
|
|
41
|
+
inputProps?: Omit<InputHTMLAttributes<HTMLInputElement>, "aria-label" | "onChange" | "value">;
|
|
42
|
+
label: string;
|
|
43
|
+
onChange: (value: string) => void;
|
|
44
|
+
style?: CSSProperties;
|
|
45
|
+
value: string;
|
|
46
|
+
}>;
|
|
47
|
+
export type ResourcePaginationPrimitiveProps = Readonly<{
|
|
48
|
+
className?: string;
|
|
49
|
+
currentPage?: number;
|
|
50
|
+
hasNextPage: boolean;
|
|
51
|
+
hasPreviousPage?: boolean;
|
|
52
|
+
isPending?: boolean;
|
|
53
|
+
nextLabel?: ReactNode;
|
|
54
|
+
onNext: () => void;
|
|
55
|
+
onPrevious: () => void;
|
|
56
|
+
onPageChange?: (page: number) => void;
|
|
57
|
+
totalPages?: number;
|
|
58
|
+
ellipsisLabel?: string;
|
|
59
|
+
previousLabel?: ReactNode;
|
|
60
|
+
style?: CSSProperties;
|
|
61
|
+
}>;
|
|
62
|
+
export type ResourceActionPrimitiveProps = Readonly<{
|
|
63
|
+
children: ReactNode;
|
|
64
|
+
className?: string;
|
|
65
|
+
components?: Readonly<{
|
|
66
|
+
Button?: ElementType;
|
|
67
|
+
}>;
|
|
68
|
+
disabled?: boolean;
|
|
69
|
+
pending?: boolean;
|
|
70
|
+
onClick?: () => void;
|
|
71
|
+
style?: CSSProperties;
|
|
72
|
+
}>;
|
|
73
|
+
export type ResourceDialogPrimitiveProps = Readonly<{
|
|
74
|
+
children: ReactNode;
|
|
75
|
+
className?: string;
|
|
76
|
+
components?: Readonly<{
|
|
77
|
+
Dialog?: ElementType;
|
|
78
|
+
}>;
|
|
79
|
+
open: boolean;
|
|
80
|
+
onOpenChange?: (open: boolean) => void;
|
|
81
|
+
description?: ReactNode;
|
|
82
|
+
style?: CSSProperties;
|
|
83
|
+
title: ReactNode;
|
|
84
|
+
}>;
|
|
85
|
+
export type ResourceValue = string | number | boolean | null | readonly ResourceValue[] | ResourceObject;
|
|
86
|
+
export interface ResourceObject {
|
|
87
|
+
readonly [key: string]: ResourceValue;
|
|
88
|
+
}
|
|
89
|
+
/** Display-ready controls. Schema inference and registry selection belong to the consumer. */
|
|
90
|
+
export type ResourceField = Readonly<{
|
|
91
|
+
name: string;
|
|
92
|
+
label: string;
|
|
93
|
+
control: "text" | "email" | "number" | "checkbox" | "date" | "datetime-local" | "select" | "custom";
|
|
94
|
+
required?: boolean;
|
|
95
|
+
readOnly?: boolean;
|
|
96
|
+
nullable?: boolean;
|
|
97
|
+
options?: readonly Readonly<{
|
|
98
|
+
label: string;
|
|
99
|
+
value: string | number | boolean;
|
|
100
|
+
}>[];
|
|
101
|
+
}>;
|
|
102
|
+
export type ResourceFieldControlProps = Readonly<{
|
|
103
|
+
field: ResourceField;
|
|
104
|
+
id: string;
|
|
105
|
+
value: ResourceValue | undefined;
|
|
106
|
+
disabled: boolean;
|
|
107
|
+
errorId?: string | undefined;
|
|
108
|
+
onChange: (value: ResourceValue) => void;
|
|
109
|
+
}>;
|
|
110
|
+
export type ResourceFormPrimitiveProps = Readonly<{
|
|
111
|
+
label: string;
|
|
112
|
+
fields: readonly ResourceField[];
|
|
113
|
+
values: Readonly<Record<string, ResourceValue>>;
|
|
114
|
+
errors?: Readonly<Record<string, string | undefined>>;
|
|
115
|
+
onChange: (name: string, value: ResourceValue) => void;
|
|
116
|
+
onSubmit: () => void;
|
|
117
|
+
onCancel?: () => void;
|
|
118
|
+
renderControl?: (props: ResourceFieldControlProps) => ReactNode;
|
|
119
|
+
pending?: boolean;
|
|
120
|
+
disabled?: boolean;
|
|
121
|
+
submitLabel?: ReactNode;
|
|
122
|
+
cancelLabel?: ReactNode;
|
|
123
|
+
error?: ReactNode;
|
|
124
|
+
className?: string;
|
|
125
|
+
}>;
|
|
126
|
+
export type ResourceFilterControl = Readonly<{
|
|
127
|
+
key: string;
|
|
128
|
+
fullWidth?: boolean;
|
|
129
|
+
control: ReactNode;
|
|
130
|
+
}>;
|
|
131
|
+
export type ResourceFiltersBarProps = Readonly<{
|
|
132
|
+
label?: ReactNode;
|
|
133
|
+
layout?: "stacked" | "inline";
|
|
134
|
+
controls: readonly ResourceFilterControl[];
|
|
135
|
+
}>;
|
|
136
|
+
export declare const ResourceActionPrimitive: ({ children, className, components, disabled, onClick, pending, style }: ResourceActionPrimitiveProps) => import("react").JSX.Element, ResourceDialogPrimitive: ({ children, className, components, open, onOpenChange, description, style, title }: ResourceDialogPrimitiveProps) => import("react").JSX.Element | null, ResourceFilterPrimitive: ({ className, inputProps, label, onChange, style, value }: ResourceFilterPrimitiveProps) => import("react").JSX.Element, ResourceFormPrimitive: ({ label, fields, values, errors, onChange, onSubmit, onCancel, renderControl, pending, disabled, submitLabel, cancelLabel, error, className }: ResourceFormPrimitiveProps) => import("react").JSX.Element, ResourceFiltersBar: ({ label, layout, controls }: ResourceFiltersBarProps) => import("react").JSX.Element | null, ResourceListPrimitive: <Item>({ ariaLabel, className, empty, getItemKey, items, renderItem, renderContainer, style }: ResourceListPrimitiveProps<Item>) => string | number | bigint | boolean | import("react").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | null | undefined, ResourcePaginationPrimitive: ({ className, currentPage, hasNextPage, hasPreviousPage, isPending, nextLabel, onNext, onPrevious, onPageChange, totalPages, ellipsisLabel, previousLabel, style }: ResourcePaginationPrimitiveProps) => import("react").JSX.Element, ResourceTablePrimitive: <Row>({ caption, className, columns, empty, getRowKey, onRowClick, renderActions, actionsLabel, stickyActions, isPending, isRowSelected, isRowExpanded, onExpandedChange, renderDetails, renderContextMenu, renderCell, rows, style }: ResourceTablePrimitiveProps<Row>) => import("react").JSX.Element;
|
|
137
|
+
|
|
138
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{Ad as h,Bd as M,Cd as w,Dd as oe,Ed as A,Hc as K,Ic as V,Pc as G,dd as J,id as Q,md as U,nd as X,od as S,pd as Y,qd as Z,rd as F,vd as q,wd as x,xd as j,yd as ee}from"./index-eevg910d.js";import{ae as g}from"./index-gzgwcnnv.js";import{Hf as O,Jf as $}from"./index-fdh3nr3r.js";import"./index-mtc4857g.js";import{Mh as Ce}from"./index-225zhfvs.js";var L={};Ce(L,{ResourceTablePrimitive:()=>re,ResourcePaginationPrimitive:()=>ne,ResourceListPrimitive:()=>ie,ResourceFormPrimitive:()=>ce,ResourceFiltersBar:()=>pe,ResourceFilterPrimitive:()=>ae,ResourceDialogPrimitive:()=>se,ResourceActionPrimitive:()=>le});import{Fragment as te,useId as z}from"react";import{jsx as r,jsxs as y}from"react/jsx-runtime";var D=(...e)=>e.filter(Boolean).join(" "),Pe={border:"1px solid currentColor",borderRadius:"0.5rem",padding:"0.75rem"},re=({caption:e,className:i,columns:t,empty:n="No resources found",getRowKey:l,onRowClick:o,renderActions:s,actionsLabel:m="Actions",stickyActions:a=!0,isPending:c=!1,isRowSelected:N,isRowExpanded:d,onExpandedChange:v,renderDetails:R,renderContextMenu:p,renderCell:B,rows:I,style:Re})=>{let k=s!==void 0||R!==void 0,E=a?"sticky right-0 z-10 shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":"";return y(x,{className:D("ci-resource-table",i),style:{borderCollapse:"collapse",width:"100%",...Re},children:[e?r(oe,{children:e}):null,r(j,{children:y(h,{children:[t.map((u)=>r(M,{scope:"col",children:u.label},u.id)),k?r(M,{className:E,children:r("span",{className:"sr-only",children:m})}):null]})}),r(ee,{children:I.length===0?r(h,{children:r(w,{className:"py-10",colSpan:Math.max(t.length+(k?1:0),1),children:n})}):I.map((u)=>{let C=d?.(u)??!1,H=R?.(u,C),_=!!H,W=y(h,{"data-state":N?.(u)?"selected":void 0,tabIndex:o?0:void 0,className:o?"cursor-pointer":void 0,onKeyDown:(P)=>{if(P.target===P.currentTarget&&(P.key==="Enter"||P.key===" "))P.preventDefault(),o?.(u)},onClick:(P)=>{if(P.target instanceof Element&&P.target.closest("[data-slot='row-actions']"))return;o?.(u)},children:[t.map((P)=>r(w,{children:B(u,P)},P.id)),k?y(w,{"data-slot":"row-actions",className:`flex gap-2 justify-end ${E}`,children:[s?.(u),_&&v?r(g,{type:"button",variant:"ghost",size:"icon","aria-label":C?"Collapse":"Expand","aria-expanded":C,disabled:c,onClick:()=>v(u,!C),children:C?r(O,{}):r($,{})}):null]}):null]},l(u));return y(te,{children:[p?y(K,{children:[r(V,{asChild:!0,children:W}),r(G,{children:p(u)})]}):W,_&&C?r(h,{className:"hover:bg-transparent",children:r(w,{colSpan:t.length+(k?1:0),children:H})}):null]},l(u))})})]})},ie=({ariaLabel:e="Resources",className:i,empty:t="No resources found",getItemKey:n,items:l,renderItem:o,renderContainer:s,style:m})=>s?s(l.length===0?t:l.map((a,c)=>r(te,{children:o(a,c)},n(a)))):r("ul",{"aria-label":e,className:D("ci-resource-list",i),style:{display:"flex",flexDirection:"column",gap:"1rem",listStyle:"none",...m},children:l.length===0?r("li",{children:t}):l.map((a,c)=>r("li",{children:o(a,c)},n(a)))}),ae=({className:e,inputProps:i,label:t,onChange:n,style:l,value:o})=>r(S,{...i,"aria-label":t,className:D("ci-resource-filter",e),onChange:(s)=>{n(s.currentTarget.value)},style:l,type:"search",value:o}),ye=(e,i)=>{if(i<=7)return Array.from({length:i},(l,o)=>o+1);let t=Math.max(2,Math.min(e-1,i-3)),n=Math.min(i-1,Math.max(e+1,4));return[1,...t>2?[null]:[],...Array.from({length:n-t+1},(l,o)=>t+o),...n<i-1?[null]:[],i]},ne=({className:e,currentPage:i,hasNextPage:t,hasPreviousPage:n=!1,isPending:l=!1,nextLabel:o="Next",onNext:s,onPrevious:m,onPageChange:a,totalPages:c,ellipsisLabel:N="More pages",previousLabel:d="Previous",style:v})=>r(Y,{"aria-label":"Resource pagination",className:D("ci-resource-pagination",e),style:v,children:y(Z,{children:[r(F,{children:r(g,{variant:"ghost",disabled:!n||l,onClick:m,type:"button",children:d})}),i!==void 0&&c!==void 0&&a?ye(i,c).map((R,p)=>r(F,{children:R===null?r(q,{"aria-label":N}):r(g,{type:"button",size:"icon",variant:R===i?"outline":"ghost","aria-current":R===i?"page":void 0,disabled:l,onClick:()=>a(R),children:R})},R??`gap-${p}`)):null,i!==void 0&&(c===void 0||!a)?r(F,{children:y("span",{"aria-live":"polite",children:["Page ",i]})}):null,r(F,{children:r(g,{variant:"ghost",disabled:!t||l,onClick:s,type:"button",children:o})})]})}),le=({children:e,className:i,components:t,disabled:n=!1,onClick:l,pending:o=!1,style:s})=>{let m=t?.Button??g;return r(m,{"aria-busy":o,className:D("ci-resource-action",i),disabled:n||o,onClick:l,style:s,type:"button",children:e})},se=({children:e,className:i,components:t,open:n,onOpenChange:l,description:o,style:s,title:m})=>{let a=z(),c=z();if(!t?.Dialog)return r(J,{open:n,...l?{onOpenChange:l}:{},children:y(Q,{className:i,style:s,"aria-describedby":o?c:void 0,children:[r(U,{children:m}),o?r(X,{id:c,children:o}):null,e]})});if(!n)return null;let N=t.Dialog;return y(N,{open:n,"aria-labelledby":a,"aria-modal":"true",className:D("ci-resource-dialog",i),style:{...Pe,...s},children:[r("h2",{id:a,children:m}),e]})};import{useId as ge}from"react";import{jsx as b,jsxs as T}from"react/jsx-runtime";var be=(e)=>e===null||e===void 0?"":String(e),Ne=({field:e,id:i,value:t,disabled:n,errorId:l,onChange:o})=>{let s={"aria-describedby":l,"aria-invalid":l!==void 0,disabled:n,id:i,name:e.name,required:e.control!=="checkbox"&&e.required===!0&&t!==null};if(e.control==="select"){let m=e.options??[];return T("select",{...s,disabled:n||e.readOnly,className:"border-input bg-background h-9 w-full rounded-md border px-3 text-sm focus-visible:ring-ring focus-visible:ring-2",value:m.findIndex((a)=>a.value===t),onChange:(a)=>{let c=m[Number(a.currentTarget.value)];if(c)o(c.value)},children:[T("option",{value:-1,disabled:!0,children:["Select ",e.label]}),m.map((a,c)=>b("option",{value:c,children:a.label},c))]})}if(e.control==="checkbox")return b(S,{...s,className:"size-4",type:"checkbox",checked:t===!0,disabled:n||e.readOnly,onChange:(m)=>o(m.currentTarget.checked)});if(e.control==="custom")return T("p",{role:"alert",children:["A custom control is required for ",e.label,"."]});return b(S,{...s,readOnly:e.readOnly,type:e.control,value:be(t),onChange:(m)=>{let a=m.currentTarget;o(e.control==="number"&&a.value!==""?a.valueAsNumber:a.value)}})},ve=({field:e,value:i,error:t,disabled:n,onChange:l,renderControl:o})=>{let s=ge(),m=t?`${s}-error`:void 0,a={disabled:n,errorId:m,field:e,id:s,onChange:(c)=>{if(!n&&!e.readOnly)l(c)},value:i};return T("div",{className:"grid gap-2",children:[T(A,{htmlFor:s,children:[e.label,e.required?" *":""]}),e.control==="custom"&&o?o(a):b(Ne,{...a}),e.nullable?b(g,{"aria-label":`Clear ${e.label}`,type:"button",variant:"ghost",size:"sm",className:"justify-self-start",disabled:n||e.readOnly||i===null,onClick:()=>l(null),children:"Clear"}):null,t?b("p",{id:m,role:"alert",className:"text-destructive text-sm",children:t}):null]})},ce=({label:e,fields:i,values:t,errors:n,onChange:l,onSubmit:o,onCancel:s,renderControl:m,pending:a=!1,disabled:c=!1,submitLabel:N="Save",cancelLabel:d="Cancel",error:v,className:R})=>T("form",{"aria-label":e,"aria-busy":a,className:R??"grid gap-4",onSubmit:(p)=>{if(p.preventDefault(),!a&&!c)o()},children:[v?b("div",{role:"alert",className:"text-destructive text-sm",children:v}):null,i.map((p)=>b(ve,{field:p,value:t[p.name],error:n?.[p.name],disabled:c||a,onChange:(B)=>l(p.name,B),renderControl:m},p.name)),T("div",{"data-slot":"form-actions",className:"flex justify-end gap-2",children:[s?b(g,{type:"button",variant:"outline",disabled:a,onClick:s,children:d}):null,b(g,{type:"submit",disabled:c||a,children:N})]})]});import{jsx as f,jsxs as ue,Fragment as Te}from"react/jsx-runtime";var me=(e)=>f("div",{className:"contents",children:e.control},e.key),pe=({label:e="Filter by",layout:i="stacked",controls:t})=>{if(t.length===0)return null;let n=t.filter((o)=>!o.fullWidth),l=t.filter((o)=>o.fullWidth);return f("div",{className:"mb-4",children:i==="inline"?f("form",{className:"flex flex-wrap items-end gap-2",onSubmit:(o)=>o.preventDefault(),children:t.map(me)}):ue(Te,{children:[n.length>0?ue("form",{className:"flex flex-wrap gap-2 mb-2",onSubmit:(o)=>o.preventDefault(),children:[f(A,{className:"mt-3 mr-2",children:e}),n.map(me)]}):null,l.map((o)=>f("form",{className:"mb-2 last:mb-0",onSubmit:(s)=>s.preventDefault(),children:o.control},o.key))]})})};var{ResourceActionPrimitive:Ge,ResourceDialogPrimitive:Je,ResourceFilterPrimitive:Qe,ResourceFormPrimitive:Ue,ResourceFiltersBar:Xe,ResourceListPrimitive:Ye,ResourcePaginationPrimitive:Ze,ResourceTablePrimitive:qe}=L;export{qe as ResourceTablePrimitive,Ze as ResourcePaginationPrimitive,Ye as ResourceListPrimitive,Ue as ResourceFormPrimitive,Xe as ResourceFiltersBar,Qe as ResourceFilterPrimitive,Je as ResourceDialogPrimitive,Ge as ResourceActionPrimitive};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
export declare const themeTokens: {
|
|
4
|
+
readonly radius: {
|
|
5
|
+
readonly lg: "0.75rem";
|
|
6
|
+
readonly md: "0.5rem";
|
|
7
|
+
readonly sm: "0.25rem";
|
|
8
|
+
};
|
|
9
|
+
readonly spacing: {
|
|
10
|
+
readonly lg: "1.5rem";
|
|
11
|
+
readonly md: "1rem";
|
|
12
|
+
readonly sm: "0.5rem";
|
|
13
|
+
readonly xl: "2rem";
|
|
14
|
+
readonly xs: "0.25rem";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type ThemeTokens = typeof themeTokens;
|
|
18
|
+
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as j}from"../index-f91yzwpm.js";import"../index-225zhfvs.js";export{j as themeTokens};
|
package/dist/utils/cn.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ih as j}from"../index-mtc4857g.js";import"../index-225zhfvs.js";export{j as cn};
|
package/package.json
CHANGED
|
@@ -1,6 +1,194 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@collective-intelligence/ui-react",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Public React primitives, design-system components, icons, illustrations, and utilities for Collective Intelligence applications.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"ci-source": "./src/index.ts",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"default": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./resources": {
|
|
21
|
+
"ci-source": "./src/resources.ts",
|
|
22
|
+
"types": "./dist/resources.d.ts",
|
|
23
|
+
"import": "./dist/resources.js",
|
|
24
|
+
"default": "./dist/resources.js"
|
|
25
|
+
},
|
|
26
|
+
"./ui": {
|
|
27
|
+
"ci-source": "./src/components/ui/index.ts",
|
|
28
|
+
"types": "./dist/components/ui/index.d.ts",
|
|
29
|
+
"import": "./dist/components/ui/index.js",
|
|
30
|
+
"default": "./dist/components/ui/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./ui-extensions": {
|
|
33
|
+
"ci-source": "./src/components/ui-extensions/index.ts",
|
|
34
|
+
"types": "./dist/components/ui-extensions/index.d.ts",
|
|
35
|
+
"import": "./dist/components/ui-extensions/index.js",
|
|
36
|
+
"default": "./dist/components/ui-extensions/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./ui-extensions/theme-toggle": {
|
|
39
|
+
"ci-source": "./src/components/ui-extensions/atoms/ThemeToggle/index.tsx",
|
|
40
|
+
"types": "./dist/components/ui-extensions/atoms/ThemeToggle/index.d.ts",
|
|
41
|
+
"import": "./dist/components/ui-extensions/atoms/ThemeToggle/index.js",
|
|
42
|
+
"default": "./dist/components/ui-extensions/atoms/ThemeToggle/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./icons": {
|
|
45
|
+
"ci-source": "./src/components/icons/index.tsx",
|
|
46
|
+
"types": "./dist/components/icons/index.d.ts",
|
|
47
|
+
"import": "./dist/components/icons/index.js",
|
|
48
|
+
"default": "./dist/components/icons/index.js"
|
|
49
|
+
},
|
|
50
|
+
"./illustrations": {
|
|
51
|
+
"ci-source": "./src/components/illustrations/index.tsx",
|
|
52
|
+
"types": "./dist/components/illustrations/index.d.ts",
|
|
53
|
+
"import": "./dist/components/illustrations/index.js",
|
|
54
|
+
"default": "./dist/components/illustrations/index.js"
|
|
55
|
+
},
|
|
56
|
+
"./hooks": {
|
|
57
|
+
"ci-source": "./src/hooks/index.ts",
|
|
58
|
+
"types": "./dist/hooks/index.d.ts",
|
|
59
|
+
"import": "./dist/hooks/index.js",
|
|
60
|
+
"default": "./dist/hooks/index.js"
|
|
61
|
+
},
|
|
62
|
+
"./hooks/use-mobile": {
|
|
63
|
+
"ci-source": "./src/components/ui-extensions/hooks/use-mobile.ts",
|
|
64
|
+
"types": "./dist/components/ui-extensions/hooks/use-mobile.d.ts",
|
|
65
|
+
"import": "./dist/components/ui-extensions/hooks/use-mobile.js",
|
|
66
|
+
"default": "./dist/components/ui-extensions/hooks/use-mobile.js"
|
|
67
|
+
},
|
|
68
|
+
"./hooks/operations": {
|
|
69
|
+
"ci-source": "./src/hooks/operations.ts",
|
|
70
|
+
"types": "./dist/hooks/operations.d.ts",
|
|
71
|
+
"import": "./dist/hooks/operations.js",
|
|
72
|
+
"default": "./dist/hooks/operations.js"
|
|
73
|
+
},
|
|
74
|
+
"./hooks/useDebouncedCallback": {
|
|
75
|
+
"ci-source": "./src/hooks/use-debounced-callback.ts",
|
|
76
|
+
"types": "./dist/hooks/use-debounced-callback.d.ts",
|
|
77
|
+
"import": "./dist/hooks/use-debounced-callback.js",
|
|
78
|
+
"default": "./dist/hooks/use-debounced-callback.js"
|
|
79
|
+
},
|
|
80
|
+
"./hooks/useMountAction": {
|
|
81
|
+
"ci-source": "./src/hooks/use-mount-action.ts",
|
|
82
|
+
"types": "./dist/hooks/use-mount-action.d.ts",
|
|
83
|
+
"import": "./dist/hooks/use-mount-action.js",
|
|
84
|
+
"default": "./dist/hooks/use-mount-action.js"
|
|
85
|
+
},
|
|
86
|
+
"./utils/cn": {
|
|
87
|
+
"ci-source": "./src/utils/cn.ts",
|
|
88
|
+
"types": "./dist/utils/cn.d.ts",
|
|
89
|
+
"import": "./dist/utils/cn.js",
|
|
90
|
+
"default": "./dist/utils/cn.js"
|
|
91
|
+
},
|
|
92
|
+
"./tokens/theme": {
|
|
93
|
+
"ci-source": "./src/tokens/theme.ts",
|
|
94
|
+
"types": "./dist/tokens/theme.d.ts",
|
|
95
|
+
"import": "./dist/tokens/theme.js",
|
|
96
|
+
"default": "./dist/tokens/theme.js"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"scripts": {
|
|
100
|
+
"build": "bun tools/build.ts",
|
|
101
|
+
"test": "vitest run src test && bun test tools",
|
|
102
|
+
"test:pack": "bun tools/test-pack.ts",
|
|
103
|
+
"format": "oxfmt --write .",
|
|
104
|
+
"format:check": "oxfmt --check .",
|
|
105
|
+
"format:check:staged": "oxfmt --check",
|
|
106
|
+
"lint": "node \"../../../.agents/scripts/managed-lint-runner.mjs\" --scope \"packages/public/ui-react\"",
|
|
107
|
+
"lint:staged": "oxlint --no-error-on-unmatched-pattern",
|
|
108
|
+
"storybook": "storybook dev -p ${CI_STORYBOOK_PORT:-6006} --no-open",
|
|
109
|
+
"build-storybook": "storybook build",
|
|
110
|
+
"prepack": "bun run build",
|
|
111
|
+
"type-check": "tsc --noEmit"
|
|
112
|
+
},
|
|
113
|
+
"dependencies": {
|
|
114
|
+
"@dnd-kit/core": "^6.3.1",
|
|
115
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
116
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
117
|
+
"@hookform/resolvers": "^5.2.2",
|
|
118
|
+
"@mantine/hooks": "^9.0.2",
|
|
119
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
120
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
121
|
+
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
122
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
123
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
124
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
125
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
126
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
127
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
128
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
129
|
+
"@radix-ui/react-menubar": "^1.1.16",
|
|
130
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
131
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
132
|
+
"@radix-ui/react-progress": "^1.1.8",
|
|
133
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
134
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
135
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
136
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
137
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
138
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
139
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
140
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
141
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
142
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
143
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
144
|
+
"class-variance-authority": "^0.7.1",
|
|
145
|
+
"clsx": "^2.1.1",
|
|
146
|
+
"cmdk": "^1.1.1",
|
|
147
|
+
"date-fns": "^4.1.0",
|
|
148
|
+
"embla-carousel-react": "^8.6.0",
|
|
149
|
+
"input-otp": "^1.4.2",
|
|
150
|
+
"lucide-react": "^0.577.0",
|
|
151
|
+
"radix-ui": "^1.4.3",
|
|
152
|
+
"react-day-picker": "^9.14.0",
|
|
153
|
+
"react-markdown": "^10.1.0",
|
|
154
|
+
"react-resizable-panels": "^4",
|
|
155
|
+
"sonner": "^2.0.7",
|
|
156
|
+
"tailwind-merge": "^3.0.2",
|
|
157
|
+
"vaul": "^1.1.2"
|
|
158
|
+
},
|
|
159
|
+
"peerDependencies": {
|
|
160
|
+
"@tanstack/react-query": ">=5.0.0",
|
|
161
|
+
"react": ">=18 <20",
|
|
162
|
+
"react-dom": ">=18 <20",
|
|
163
|
+
"react-hook-form": "^7.72.1"
|
|
164
|
+
},
|
|
165
|
+
"publishConfig": {
|
|
166
|
+
"access": "public"
|
|
167
|
+
},
|
|
168
|
+
"devDependencies": {
|
|
169
|
+
"@oxlint/plugins": "1.85.0",
|
|
170
|
+
"@storybook/addon-a11y": "^10.4.6",
|
|
171
|
+
"@storybook/addon-docs": "^10.4.6",
|
|
172
|
+
"@storybook/addon-themes": "^10.4.6",
|
|
173
|
+
"@storybook/react": "^10.4.6",
|
|
174
|
+
"@storybook/react-vite": "^10.4.6",
|
|
175
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
176
|
+
"@types/bun": "1.3.14",
|
|
177
|
+
"@types/react": "^19.2.14",
|
|
178
|
+
"@types/react-dom": "^19.2.3",
|
|
179
|
+
"dts-bundle-generator": "9.5.1",
|
|
180
|
+
"eslint-plugin-react-you-might-not-need-an-effect": "latest",
|
|
181
|
+
"jsdom": "^28.1.0",
|
|
182
|
+
"oxfmt": "0.66.0",
|
|
183
|
+
"oxlint": "1.82.0",
|
|
184
|
+
"react": "^19.2.8",
|
|
185
|
+
"react-dom": "^19.2.8",
|
|
186
|
+
"react-hook-form": "^7.72.1",
|
|
187
|
+
"storybook": "^10.4.6",
|
|
188
|
+
"tailwindcss": "^4.1.18",
|
|
189
|
+
"typescript": "5.9.3",
|
|
190
|
+
"ultracite": "7.10.7",
|
|
191
|
+
"vite": "^8.0.0",
|
|
192
|
+
"vitest": "4.1.10"
|
|
193
|
+
}
|
|
194
|
+
}
|